summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--automation/source/server/statemnt.cxx33
-rw-r--r--basctl/inc/basidesh.hrc1
-rw-r--r--basctl/source/basicide/basicprint.src43
-rw-r--r--basctl/source/basicide/basicrenderable.cxx197
-rw-r--r--basctl/source/basicide/basicrenderable.hxx76
-rw-r--r--basctl/source/basicide/baside2.cxx50
-rw-r--r--basctl/source/basicide/baside2.hxx7
-rw-r--r--basctl/source/basicide/baside3.cxx9
-rw-r--r--basctl/source/basicide/basides2.cxx10
-rw-r--r--basctl/source/basicide/bastypes.cxx7
-rw-r--r--basctl/source/basicide/makefile.mk5
-rw-r--r--basctl/source/dlged/dlged.cxx19
-rw-r--r--basctl/source/inc/baside3.hxx5
-rw-r--r--basctl/source/inc/basidesh.hxx4
-rw-r--r--basctl/source/inc/bastypes.hxx6
-rw-r--r--basctl/source/inc/dlged.hxx5
-rw-r--r--basic/source/app/app.cxx9
-rw-r--r--basic/source/app/makefile.mk1
-rw-r--r--basic/source/app/printer.cxx98
-rw-r--r--basic/source/app/printer.hxx22
-rw-r--r--basic/source/runtime/basrdll.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx5
-rw-r--r--comphelper/source/property/opropertybag.cxx9
-rw-r--r--comphelper/source/property/property.cxx25
-rw-r--r--connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java31
-rw-r--r--connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java29
-rw-r--r--connectivity/inc/connectivity/BlobHelper.hxx54
-rw-r--r--connectivity/inc/connectivity/dbmetadata.hxx11
-rw-r--r--connectivity/inc/connectivity/dbtools.hxx15
-rw-r--r--connectivity/inc/connectivity/sqliterator.hxx3
-rw-r--r--connectivity/inc/connectivity/sqlnode.hxx4
-rw-r--r--connectivity/qa/connectivity/GeneralTest.java10
-rwxr-xr-xconnectivity/qa/connectivity/tools/AbstractDatabase.java31
-rw-r--r--connectivity/qa/connectivity/tools/CRMDatabase.java (renamed from dbaccess/qa/complex/dbaccess/CRMDatabase.java)98
-rw-r--r--connectivity/qa/connectivity/tools/DataSource.java40
-rwxr-xr-xconnectivity/qa/connectivity/tools/DatabaseAccess.java4
-rw-r--r--connectivity/qa/connectivity/tools/HsqlDatabase.java13
-rw-r--r--connectivity/qa/connectivity/tools/HsqlTableDescriptor.java16
-rw-r--r--connectivity/qa/connectivity/tools/makefile.mk14
-rw-r--r--connectivity/qa/connectivity/tools/sdb/Connection.java93
-rw-r--r--connectivity/source/commontools/BlobHelper.cxx72
-rw-r--r--connectivity/source/commontools/FValue.cxx134
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx21
-rw-r--r--connectivity/source/commontools/dbtools.cxx102
-rw-r--r--connectivity/source/commontools/makefile.mk1
-rw-r--r--connectivity/source/commontools/predicateinput.cxx5
-rw-r--r--connectivity/source/drivers/ado/AResultSet.cxx24
-rw-r--r--connectivity/source/drivers/ado/Aolevariant.cxx93
-rwxr-xr-xconnectivity/source/drivers/ado/ado.xcu5
-rw-r--r--connectivity/source/drivers/ado/adoimp.cxx2
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx17
-rw-r--r--connectivity/source/drivers/jdbc/Boolean.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/CallableStatement.cxx12
-rw-r--r--connectivity/source/drivers/jdbc/Clob.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/InputStream.cxx8
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx27
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx12
-rw-r--r--connectivity/source/drivers/jdbc/PreparedStatement.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx114
-rw-r--r--connectivity/source/drivers/jdbc/Timestamp.cxx14
-rwxr-xr-xconnectivity/source/drivers/jdbc/jdbc.xcu5
-rw-r--r--connectivity/source/drivers/jdbc/makefile.mk1
-rw-r--r--connectivity/source/drivers/jdbc/tools.cxx57
-rwxr-xr-xconnectivity/source/drivers/odbc/odbc.xcu5
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx10
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx16
-rw-r--r--connectivity/source/drivers/odbcbase/OPreparedStatement.cxx46
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx8
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx8
-rw-r--r--connectivity/source/inc/ado/Aolevariant.hxx1
-rw-r--r--connectivity/source/inc/java/lang/Boolean.hxx1
-rw-r--r--connectivity/source/inc/java/sql/Connection.hxx5
-rw-r--r--connectivity/source/inc/java/sql/Timestamp.hxx3
-rw-r--r--connectivity/source/inc/java/tools.hxx4
-rw-r--r--connectivity/source/inc/odbc/OBoundParam.hxx6
-rw-r--r--connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx1
-rw-r--r--connectivity/source/inc/odbc/OPreparedStatement.hxx3
-rw-r--r--connectivity/source/parse/sqlbison.y6
-rw-r--r--connectivity/source/parse/sqliterator.cxx98
-rw-r--r--connectivity/source/parse/sqlnode.cxx24
-rw-r--r--cui/source/inc/dbregister.hxx2
-rw-r--r--cui/source/options/dbregister.cxx147
-rw-r--r--cui/source/options/dbregisterednamesconfig.cxx171
-rw-r--r--cui/source/options/dbregistersettings.cxx18
-rw-r--r--cui/source/options/dbregistersettings.hxx40
-rw-r--r--dbaccess/inc/dbaccess_helpid.hrc2
-rw-r--r--dbaccess/qa/complex/dbaccess/ApplicationController.java19
-rw-r--r--dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java10
-rw-r--r--dbaccess/qa/complex/dbaccess/DataSource.java3
-rw-r--r--dbaccess/qa/complex/dbaccess/Query.java15
-rw-r--r--dbaccess/qa/complex/dbaccess/RowSet.java82
-rw-r--r--dbaccess/qa/complex/dbaccess/TestCase.java19
-rw-r--r--dbaccess/qa/complex/dbaccess/UISettings.java111
-rw-r--r--dbaccess/source/core/api/BookmarkSet.cxx5
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.cxx206
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.hxx33
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.cxx154
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.hxx14
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx83
-rw-r--r--dbaccess/source/core/api/KeySet.cxx80
-rw-r--r--dbaccess/source/core/api/KeySet.hxx2
-rw-r--r--dbaccess/source/core/api/RowSet.cxx54
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx10
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx38
-rw-r--r--dbaccess/source/core/api/RowSetCache.hxx1
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx21
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx6
-rw-r--r--dbaccess/source/core/api/column.cxx413
-rw-r--r--dbaccess/source/core/api/columnsettings.cxx181
-rw-r--r--dbaccess/source/core/api/datasettings.cxx29
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx1105
-rw-r--r--dbaccess/source/core/api/makefile.mk3
-rw-r--r--dbaccess/source/core/api/preparedstatement.cxx73
-rw-r--r--dbaccess/source/core/api/query.cxx9
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx4
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx7
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx196
-rw-r--r--dbaccess/source/core/api/table.cxx4
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx12
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx9
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx23
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx176
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.hxx105
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx13
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx398
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.hxx50
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx25
-rw-r--r--dbaccess/source/core/dataaccess/datasource.hxx2
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx9
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx84
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx361
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.hxx34
-rw-r--r--dbaccess/source/core/dataaccess/intercept.cxx130
-rw-r--r--dbaccess/source/core/dataaccess/makefile.mk1
-rw-r--r--dbaccess/source/core/inc/ContainerMediator.hxx17
-rw-r--r--dbaccess/source/core/inc/ContentHelper.hxx2
-rw-r--r--dbaccess/source/core/inc/PropertyForward.hxx36
-rw-r--r--dbaccess/source/core/inc/column.hxx187
-rw-r--r--dbaccess/source/core/inc/columnsettings.hxx108
-rw-r--r--dbaccess/source/core/inc/datasettings.hxx1
-rw-r--r--dbaccess/source/core/inc/definitioncolumn.hxx279
-rw-r--r--dbaccess/source/core/inc/querycontainer.hxx2
-rw-r--r--dbaccess/source/core/misc/ContainerMediator.cxx124
-rw-r--r--dbaccess/source/core/misc/PropertyForward.cxx192
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx10
-rw-r--r--dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx6
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx517
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx3
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx46
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx307
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx15
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx183
-rw-r--r--dbaccess/source/ui/dlg/DriverSettings.cxx51
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx82
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx72
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hrc5
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hxx4
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.src18
-rw-r--r--dbaccess/source/ui/dlg/datasourceui.cxx99
-rw-r--r--dbaccess/source/ui/dlg/datasourceui.hxx80
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx66
-rw-r--r--dbaccess/source/ui/dlg/makefile.mk4
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.cxx75
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.hxx66
-rw-r--r--dbaccess/source/ui/inc/TypeInfo.hxx1
-rw-r--r--dbaccess/source/ui/inc/dsitems.hxx (renamed from dbaccess/source/ui/dlg/dsitems.hxx)5
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx114
-rw-r--r--dbaccess/source/ui/inc/exsrcbrw.hxx11
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx20
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx6
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx12
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx40
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx177
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx1
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx9
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx15
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx15
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx217
-rw-r--r--dbaccess/source/ui/tabledesign/table.src2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx14
-rw-r--r--default_images/res/ko/lc10714.pngbin315 -> 0 bytes
-rw-r--r--default_images/res/ko/lch10714.pngbin124 -> 0 bytes
-rw-r--r--default_images/res/ko/sc10714.pngbin244 -> 0 bytes
-rw-r--r--default_images/res/ko/sch10714.pngbin243 -> 0 bytes
-rw-r--r--default_images/res/lc10616.pngbin810 -> 0 bytes
-rw-r--r--default_images/res/lc10617.pngbin734 -> 0 bytes
-rw-r--r--default_images/res/lc10618.pngbin720 -> 0 bytes
-rw-r--r--default_images/res/lc10619.pngbin810 -> 0 bytes
-rw-r--r--default_images/res/lc10620.pngbin1001 -> 0 bytes
-rw-r--r--default_images/res/lc10621.pngbin1239 -> 0 bytes
-rw-r--r--default_images/res/lc10627.pngbin1002 -> 0 bytes
-rw-r--r--default_images/res/lc10630.pngbin1876 -> 0 bytes
-rw-r--r--default_images/res/lc10714.pngbin629 -> 0 bytes
-rw-r--r--default_images/res/lc10723.pngbin1041 -> 0 bytes
-rw-r--r--default_images/res/lc10724.pngbin1603 -> 0 bytes
-rw-r--r--default_images/res/lch10616.pngbin139 -> 0 bytes
-rw-r--r--default_images/res/lch10617.pngbin127 -> 0 bytes
-rw-r--r--default_images/res/lch10618.pngbin131 -> 0 bytes
-rw-r--r--default_images/res/lch10619.pngbin130 -> 0 bytes
-rw-r--r--default_images/res/lch10620.pngbin172 -> 0 bytes
-rw-r--r--default_images/res/lch10621.pngbin186 -> 0 bytes
-rw-r--r--default_images/res/lch10627.pngbin166 -> 0 bytes
-rw-r--r--default_images/res/lch10630.pngbin209 -> 0 bytes
-rw-r--r--default_images/res/lch10714.pngbin176 -> 0 bytes
-rw-r--r--default_images/res/lch10723.pngbin179 -> 0 bytes
-rw-r--r--default_images/res/lch10724.pngbin190 -> 0 bytes
-rw-r--r--default_images/res/sc10616.pngbin530 -> 0 bytes
-rw-r--r--default_images/res/sc10617.pngbin474 -> 0 bytes
-rw-r--r--default_images/res/sc10618.pngbin467 -> 0 bytes
-rw-r--r--default_images/res/sc10619.pngbin530 -> 0 bytes
-rw-r--r--default_images/res/sc10620.pngbin662 -> 0 bytes
-rw-r--r--default_images/res/sc10621.pngbin682 -> 0 bytes
-rw-r--r--default_images/res/sc10627.pngbin688 -> 0 bytes
-rw-r--r--default_images/res/sc10630.pngbin1038 -> 0 bytes
-rw-r--r--default_images/res/sc10714.pngbin442 -> 0 bytes
-rw-r--r--default_images/res/sc10723.pngbin588 -> 0 bytes
-rw-r--r--default_images/res/sc10724.pngbin909 -> 0 bytes
-rw-r--r--default_images/res/sch10616.pngbin119 -> 0 bytes
-rw-r--r--default_images/res/sch10617.pngbin108 -> 0 bytes
-rw-r--r--default_images/res/sch10618.pngbin115 -> 0 bytes
-rw-r--r--default_images/res/sch10619.pngbin115 -> 0 bytes
-rw-r--r--default_images/res/sch10620.pngbin140 -> 0 bytes
-rw-r--r--default_images/res/sch10621.pngbin148 -> 0 bytes
-rw-r--r--default_images/res/sch10627.pngbin139 -> 0 bytes
-rw-r--r--default_images/res/sch10630.pngbin166 -> 0 bytes
-rw-r--r--default_images/res/sch10714.pngbin143 -> 0 bytes
-rw-r--r--default_images/res/sch10723.pngbin152 -> 0 bytes
-rw-r--r--default_images/res/sch10724.pngbin144 -> 0 bytes
-rw-r--r--default_images/svx/res/lc10622.pngbin1509 -> 0 bytes
-rw-r--r--default_images/svx/res/lch10622.pngbin191 -> 0 bytes
-rw-r--r--default_images/svx/res/sc10622.pngbin895 -> 0 bytes
-rw-r--r--default_images/svx/res/sch10622.pngbin144 -> 0 bytes
-rw-r--r--default_images/vcl/source/src/collate.pngbin0 -> 672 bytes
-rw-r--r--default_images/vcl/source/src/collate_h.pngbin0 -> 380 bytes
-rw-r--r--default_images/vcl/source/src/ncollate.pngbin0 -> 635 bytes
-rw-r--r--default_images/vcl/source/src/ncollate_h.pngbin0 -> 393 bytes
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx86
-rw-r--r--extensions/source/bibliography/datman.cxx39
-rw-r--r--extensions/source/bibliography/datman.hxx6
-rw-r--r--extensions/source/bibliography/framectr.cxx6
-rw-r--r--extensions/source/bibliography/framectr.hxx6
-rw-r--r--extensions/source/bibliography/general.cxx4
-rw-r--r--extensions/source/propctrlr/editpropertyhandler.cxx1
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx6
-rw-r--r--extras/source/truetype/symbol/OpenSymbol.sfd18408
-rw-r--r--extras/source/truetype/symbol/opens___.ttfbin178396 -> 198668 bytes
-rw-r--r--filter/source/pdf/impdialog.cxx331
-rw-r--r--filter/source/pdf/impdialog.hxx36
-rw-r--r--filter/source/pdf/pdfdialog.cxx10
-rw-r--r--filter/source/pdf/pdfdialog.hxx22
-rw-r--r--filter/source/pdf/pdfexport.cxx15
-rw-r--r--forms/qa/forms_all.sce1
-rw-r--r--forms/qa/integration/forms/DocumentViewHelper.java7
-rw-r--r--forms/qa/integration/forms/FormControlTest.java11
-rw-r--r--forms/qa/integration/forms/FormLayer.java48
-rw-r--r--forms/qa/integration/forms/FormPropertyBags.java10
-rw-r--r--forms/qa/integration/forms/ListBox.java290
-rw-r--r--forms/qa/integration/forms/ListSelection.java86
-rw-r--r--forms/qa/integration/forms/MasterDetailForms.java334
-rw-r--r--forms/qa/integration/forms/TestCase.java13
-rw-r--r--forms/qa/integration/forms/dbfTools.java9
-rw-r--r--forms/qa/org/openoffice/complex/forms/tools/ResultSet.java264
-rw-r--r--forms/source/component/Button.cxx14
-rw-r--r--forms/source/component/Button.hxx10
-rw-r--r--forms/source/component/Columns.cxx16
-rw-r--r--forms/source/component/DatabaseForm.cxx154
-rw-r--r--forms/source/component/FormComponent.cxx16
-rw-r--r--forms/source/component/ImageControl.cxx1
-rw-r--r--forms/source/cppugen/makefile.mk68
-rw-r--r--forms/source/helper/commanddescriptionprovider.cxx139
-rw-r--r--forms/source/helper/commandimageprovider.cxx180
-rw-r--r--forms/source/helper/formnavigation.cxx162
-rw-r--r--forms/source/helper/makefile.mk2
-rw-r--r--forms/source/inc/FormComponent.hxx106
-rw-r--r--forms/source/inc/commanddescriptionprovider.hxx68
-rw-r--r--forms/source/inc/commandimageprovider.hxx77
-rw-r--r--forms/source/inc/featuredispatcher.hxx12
-rw-r--r--forms/source/inc/formnavigation.hxx24
-rw-r--r--forms/source/inc/frm_strings.hxx2
-rw-r--r--forms/source/inc/property.hrc2
-rw-r--r--forms/source/richtext/richtextmodel.cxx12
-rw-r--r--forms/source/richtext/richtextmodel.hxx3
-rw-r--r--forms/source/runtime/formoperations.cxx2
-rw-r--r--forms/source/runtime/formoperations.hxx20
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx79
-rw-r--r--forms/source/solar/component/navbarcontrol.hxx22
-rw-r--r--forms/source/solar/control/navtoolbar.cxx254
-rw-r--r--forms/source/solar/inc/navtoolbar.hxx46
-rw-r--r--framework/inc/uielement/generictoolbarcontroller.hxx27
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx7
-rw-r--r--framework/inc/xml/menuconfiguration.hxx1
-rw-r--r--framework/inc/xml/menudocumenthandler.hxx5
-rw-r--r--framework/inc/xml/toolboxconfigurationdefines.hxx3
-rw-r--r--framework/inc/xml/toolboxdocumenthandler.hxx6
-rw-r--r--framework/source/classes/menumanager.cxx22
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx1
-rw-r--r--framework/source/services/backingwindow.cxx36
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx66
-rw-r--r--framework/source/uielement/menubarmanager.cxx26
-rw-r--r--framework/source/uielement/toolbarmanager.cxx65
-rw-r--r--framework/source/xml/menudocumenthandler.cxx135
-rw-r--r--framework/source/xml/toolboxdocumenthandler.cxx83
-rw-r--r--goodies/source/filter.vcl/ieps/ieps.cxx68
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_languages/CustomAc.ulf12
-rw-r--r--instsetoo_native/util/openoffice.lst54
-rw-r--r--linguistic/source/gciterator.cxx3
-rw-r--r--offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl11
-rw-r--r--offapi/com/sun/star/awt/UnoControlDateFieldModel.idl11
-rw-r--r--offapi/com/sun/star/awt/UnoControlEditModel.idl11
-rw-r--r--offapi/com/sun/star/awt/UnoControlFileControlModel.idl10
-rw-r--r--offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl11
-rw-r--r--offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl11
-rw-r--r--offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl11
-rw-r--r--offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl11
-rw-r--r--offapi/com/sun/star/form/FormController.idl105
-rw-r--r--offapi/com/sun/star/form/FormControllerDispatcher.idl170
-rw-r--r--offapi/com/sun/star/form/XFormController.idl53
-rw-r--r--offapi/com/sun/star/form/runtime/FilterEvent.idl64
-rw-r--r--offapi/com/sun/star/form/runtime/FormController.idl51
-rw-r--r--offapi/com/sun/star/form/runtime/FormOperations.idl4
-rw-r--r--offapi/com/sun/star/form/runtime/XFilterController.idl180
-rw-r--r--offapi/com/sun/star/form/runtime/XFilterControllerListener.idl84
-rw-r--r--offapi/com/sun/star/form/runtime/XFormController.idl373
-rw-r--r--offapi/com/sun/star/form/runtime/XFormControllerContext.idl57
-rw-r--r--offapi/com/sun/star/form/runtime/XFormOperations.idl6
-rw-r--r--offapi/com/sun/star/form/runtime/makefile.mk8
-rw-r--r--offapi/com/sun/star/sdb/DataSourceBrowser.idl6
-rw-r--r--offapi/com/sun/star/sdb/DatabaseContext.idl17
-rw-r--r--offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl60
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseAccess.idl49
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseAccessListener.idl35
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseEnvironment.idl27
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseRegistrations.idl158
-rw-r--r--offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl70
-rw-r--r--offapi/com/sun/star/sdb/makefile.mk3
-rw-r--r--offapi/com/sun/star/ui/ItemStyle.idl5
-rw-r--r--offapi/com/sun/star/view/DuplexMode.idl69
-rw-r--r--offapi/com/sun/star/view/PrintOptions.idl7
-rw-r--r--offapi/com/sun/star/view/XFormLayerAccess.idl8
-rw-r--r--offapi/com/sun/star/view/makefile.mk3
-rw-r--r--offapi/util/makefile.mk4
-rw-r--r--officecfg/registry/data/org/openoffice/Office/DataAccess.xcu2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Math.xcu198
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu10
-rw-r--r--officecfg/registry/data/org/openoffice/VCL.xcu8
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs8
-rw-r--r--ooo_custom_images/industrial/lc10713.png (renamed from ooo_custom_images/industrial/res/lc10713.png)bin195 -> 195 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10616.pngbin203 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10617.pngbin165 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10618.pngbin162 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10619.pngbin195 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10620.pngbin436 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10621.pngbin224 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10627.pngbin953 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10630.pngbin582 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10712.pngbin196 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10714.pngbin380 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10723.pngbin513 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/lc10724.pngbin916 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10616.pngbin103 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10617.pngbin96 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10618.pngbin98 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10619.pngbin102 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10620.pngbin364 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10621.pngbin173 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10627.pngbin487 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10630.pngbin329 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10712.pngbin184 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10714.pngbin287 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10723.pngbin290 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/res/sc10724.pngbin539 -> 0 bytes
-rw-r--r--ooo_custom_images/industrial/sc10713.png (renamed from ooo_custom_images/industrial/res/sc10713.png)bin185 -> 185 bytes
-rw-r--r--ooo_custom_images/tango/lc10713.png (renamed from ooo_custom_images/tango/res/lc10713.png)bin180 -> 180 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10616.pngbin203 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10617.pngbin147 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10618.pngbin147 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10619.pngbin196 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10620.pngbin436 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10621.pngbin224 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10627.pngbin826 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10630.pngbin841 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10712.pngbin203 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10714.pngbin376 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10723.pngbin541 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10724.pngbin1080 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/lc10724.xcf.bz2bin2339 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10616.pngbin103 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10617.pngbin96 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10618.pngbin98 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10619.pngbin102 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10620.pngbin364 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10621.pngbin169 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10627.pngbin367 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10630.pngbin467 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10712.pngbin173 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10714.pngbin355 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10723.pngbin381 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/res/sc10724.pngbin474 -> 0 bytes
-rw-r--r--ooo_custom_images/tango/sc10713.png (renamed from ooo_custom_images/tango/res/sc10713.png)bin172 -> 172 bytes
-rw-r--r--padmin/source/padialog.cxx149
-rw-r--r--padmin/source/padialog.hxx2
-rw-r--r--qadevOOo/tests/java/ifc/view/_XFormLayerAccess.java2
-rw-r--r--reportbuilder/registry/data/org/openoffice/Office/Accelerators.xcu7
-rw-r--r--reportbuilder/registry/data/org/openoffice/Office/UI/ReportCommands.xcu8
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx16
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx29
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx1
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
-rw-r--r--reportdesign/uiconfig/dbreport/accelerator/de-DE/default.xml1
-rw-r--r--reportdesign/uiconfig/dbreport/accelerator/en-GB/default.xml1
-rw-r--r--reportdesign/uiconfig/dbreport/accelerator/en-US/default.xml1
-rw-r--r--rsc/source/parser/rscicpx.cxx1
-rw-r--r--sal/osl/unx/file_misc.cxx18
-rw-r--r--sal/util/makefile.mk6
-rw-r--r--sal/util/salalloc.list7
-rw-r--r--sc/inc/docuno.hxx5
-rw-r--r--sc/inc/sc.hrc2
-rw-r--r--sc/inc/viewuno.hxx5
-rw-r--r--sc/source/core/data/documen4.cxx12
-rw-r--r--sc/source/core/tool/printopt.cxx4
-rw-r--r--sc/source/core/tool/rechead.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx7
-rw-r--r--sc/source/ui/inc/pfuncache.hxx6
-rw-r--r--sc/source/ui/src/scstring.src26
-rw-r--r--sc/source/ui/unoobj/docuno.cxx322
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
-rwxr-xr-x[-rw-r--r--]sc/source/ui/view/gridwin3.cxx1
-rw-r--r--sc/source/ui/view/olkact.cxx2
-rwxr-xr-x[-rw-r--r--]sc/source/ui/view/output3.cxx3
-rw-r--r--sc/source/ui/view/pfuncache.cxx4
-rw-r--r--sc/source/ui/view/prevwsh2.cxx2
-rwxr-xr-x[-rw-r--r--]sc/source/ui/view/printfun.cxx24
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
-rw-r--r--scp2/source/ooo/file_ooo.scp49
-rw-r--r--scp2/source/ooo/module_hidden_ooo.scp65
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx88
-rw-r--r--sd/source/ui/inc/DocumentRenderer.hxx85
-rw-r--r--sd/source/ui/inc/DrawController.hxx2
-rw-r--r--sd/source/ui/inc/PrintManager.hxx213
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx7
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx4
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2363
-rw-r--r--sd/source/ui/view/DocumentRenderer.hrc80
-rw-r--r--sd/source/ui/view/DocumentRenderer.src298
-rw-r--r--sd/source/ui/view/PrintManager.cxx1802
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx193
-rw-r--r--sd/source/ui/view/makefile.mk8
-rw-r--r--sd/util/makefile.mk1
-rwxr-xr-xsetup_native/source/packinfo/packinfo_office.txt88
-rw-r--r--setup_native/source/packinfo/spellchecker_selection.txt30
-rw-r--r--sfx2/inc/sfx2/event.hxx19
-rw-r--r--sfx2/inc/sfx2/objsh.hxx2
-rw-r--r--sfx2/inc/sfx2/prnmon.hxx12
-rw-r--r--sfx2/inc/sfx2/sfxbasecontroller.hxx4
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc2
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx2
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx9
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx79
-rwxr-xr-xsfx2/source/doc/printhelper.cxx92
-rw-r--r--sfx2/source/view/makefile.mk3
-rw-r--r--sfx2/source/view/printer.cxx14
-rw-r--r--sfx2/source/view/prnmon.cxx6
-rw-r--r--sfx2/source/view/topfrm.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx14
-rw-r--r--sfx2/source/view/viewimp.hxx4
-rw-r--r--sfx2/source/view/viewprn.cxx816
-rw-r--r--sfx2/source/view/viewsh.cxx23
-rw-r--r--[-rwxr-xr-x]solenv/config/sdev300.ini0
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/postset.mk1
-rw-r--r--sot/source/sdstor/stgstrms.cxx2
-rw-r--r--sot/source/sdstor/stgstrms.hxx3
-rw-r--r--starmath/inc/document.hxx5
-rw-r--r--starmath/inc/starmath.hrc2
-rw-r--r--starmath/inc/types.hxx102
-rw-r--r--starmath/inc/unomodel.hxx23
-rw-r--r--starmath/inc/view.hxx5
-rw-r--r--starmath/source/document.cxx11
-rw-r--r--starmath/source/format.cxx6
-rw-r--r--starmath/source/mathmlimport.cxx6379
-rw-r--r--starmath/source/node.cxx4
-rw-r--r--starmath/source/rect.cxx3
-rw-r--r--starmath/source/smres.src257
-rw-r--r--starmath/source/types.cxx214
-rw-r--r--starmath/source/unomodel.cxx149
-rw-r--r--starmath/source/view.cxx71
-rw-r--r--starmath/util/makefile.mk1
-rw-r--r--svl/inc/svl/solar.hrc11
-rw-r--r--svl/source/numbers/numhead.cxx2
-rw-r--r--svtools/inc/svtools/imapobj.hxx2
-rw-r--r--svtools/source/control/filectrl.cxx3
-rw-r--r--svtools/source/dialogs/prnsetup.cxx2
-rw-r--r--svtools/source/filter.vcl/filter/filter2.cxx3
-rw-r--r--svtools/source/misc/imap.cxx7
-rw-r--r--svtools/source/uno/unoiface.cxx80
-rw-r--r--svx/inc/fmhelp.hrc4
-rw-r--r--svx/inc/pch/precompiled_svx.hxx4
-rw-r--r--svx/inc/svx/fmdpage.hxx5
-rw-r--r--svx/inc/svx/fmgridcl.hxx5
-rw-r--r--svx/inc/svx/fmshell.hxx6
-rw-r--r--svx/inc/svx/fmtools.hxx158
-rw-r--r--svx/inc/svx/fmview.hxx6
-rw-r--r--svx/inc/svx/gridctrl.hxx7
-rw-r--r--svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx7
-rw-r--r--svx/inc/svx/svdograf.hxx1
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/svdpntv.hxx9
-rw-r--r--svx/source/dialog/fntctrl.cxx2
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx15
-rw-r--r--svx/source/fmcomp/fmgridif.cxx77
-rw-r--r--svx/source/fmcomp/gridcell.cxx10
-rw-r--r--svx/source/fmcomp/gridcols.cxx33
-rw-r--r--svx/source/fmcomp/gridctrl.cxx46
-rw-r--r--svx/source/form/confirmdelete.cxx138
-rw-r--r--svx/source/form/delayedevent.cxx4
-rw-r--r--svx/source/form/filtnav.cxx1112
-rw-r--r--svx/source/form/fmcontrolbordermanager.cxx3
-rw-r--r--svx/source/form/fmcontrollayout.cxx3
-rw-r--r--svx/source/form/fmobj.cxx70
-rw-r--r--svx/source/form/fmservs.cxx9
-rw-r--r--svx/source/form/fmshell.cxx11
-rw-r--r--svx/source/form/fmshimp.cxx463
-rw-r--r--svx/source/form/fmstring.src2
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx1
-rw-r--r--svx/source/form/fmtools.cxx734
-rw-r--r--svx/source/form/fmundo.cxx67
-rw-r--r--svx/source/form/fmview.cxx2
-rw-r--r--svx/source/form/fmvwimp.cxx225
-rw-r--r--svx/source/form/formcontrolfactory.cxx3
-rw-r--r--svx/source/form/formcontroller.cxx (renamed from svx/source/form/fmctrler.cxx)1761
-rw-r--r--svx/source/form/formcontrolling.cxx4
-rw-r--r--svx/source/form/formdispatchinterceptor.cxx213
-rw-r--r--svx/source/form/formfeaturedispatcher.cxx (renamed from svx/source/form/fmdispatch.cxx)48
-rw-r--r--svx/source/form/legacyformcontroller.cxx225
-rw-r--r--svx/source/form/makefile.mk9
-rw-r--r--svx/source/inc/delayedevent.hxx4
-rw-r--r--svx/source/inc/filtnav.hxx84
-rw-r--r--svx/source/inc/fmPropBrw.hxx1
-rw-r--r--svx/source/inc/fmcontrolbordermanager.hxx5
-rw-r--r--svx/source/inc/fmcontrollayout.hxx3
-rw-r--r--svx/source/inc/fmctrler.hxx617
-rw-r--r--svx/source/inc/fmexpl.hxx6
-rw-r--r--svx/source/inc/fmservs.hxx2
-rw-r--r--svx/source/inc/fmshimp.hxx28
-rw-r--r--svx/source/inc/fmsrcimp.hxx17
-rw-r--r--svx/source/inc/fmtextcontrolshell.hxx16
-rw-r--r--svx/source/inc/fmvwimp.hxx44
-rw-r--r--svx/source/inc/formcontroller.hxx592
-rw-r--r--svx/source/inc/formcontrolling.hxx15
-rw-r--r--svx/source/inc/formdispatchinterceptor.hxx118
-rw-r--r--svx/source/inc/formfeaturedispatcher.hxx (renamed from svx/source/inc/fmdispatch.hxx)23
-rw-r--r--svx/source/inc/gridcell.hxx2
-rw-r--r--svx/source/inc/tabwin.hxx3
-rwxr-xr-x[-rw-r--r--]svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx12
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx123
-rw-r--r--svx/source/src/app.src19
-rw-r--r--svx/source/svdraw/svdograf.cxx17
-rw-r--r--svx/source/svdraw/svdotext.cxx3
-rwxr-xr-x[-rw-r--r--]svx/source/svdraw/svdpntv.cxx3
-rw-r--r--svx/source/table/svdotable.cxx2
-rw-r--r--svx/source/unodraw/unoshap2.cxx4
-rw-r--r--svx/source/unodraw/unoshap4.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx8
-rwxr-xr-xsw/inc/IDocumentDeviceAccess.hxx2
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/dbfld.hxx1
-rw-r--r--sw/inc/dbmgr.hxx8
-rw-r--r--sw/inc/doc.hxx18
-rwxr-xr-x[-rw-r--r--]sw/inc/docsh.hxx1
-rw-r--r--sw/inc/globals.hrc1
-rwxr-xr-x[-rw-r--r--]sw/inc/printdata.hxx293
-rw-r--r--sw/inc/rolbck.hxx3
-rw-r--r--sw/inc/swprtopt.hxx42
-rw-r--r--sw/inc/unomod.hxx2
-rwxr-xr-x[-rw-r--r--]sw/inc/unotxdoc.hxx487
-rwxr-xr-x[-rw-r--r--]sw/inc/viewopt.hxx12
-rwxr-xr-x[-rw-r--r--]sw/inc/viewsh.hxx43
-rw-r--r--sw/sdi/swriter.sdi25
-rw-r--r--sw/sdi/swslots.src6
-rw-r--r--sw/sdi/viewsh.sdi4
-rw-r--r--sw/source/core/access/accpage.cxx5
-rwxr-xr-x[-rw-r--r--]sw/source/core/doc/doc.cxx638
-rw-r--r--sw/source/core/doc/docdesc.cxx1
-rw-r--r--sw/source/core/doc/docnew.cxx33
-rw-r--r--sw/source/core/doc/notxtfrm.cxx58
-rw-r--r--sw/source/core/fields/dbfld.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx3
-rw-r--r--sw/source/core/inc/cellfrm.hxx2
-rw-r--r--sw/source/core/inc/flyfrm.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx3
-rw-r--r--sw/source/core/inc/layfrm.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx2
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/tabfrm.hxx2
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx10
-rw-r--r--sw/source/core/layout/paintfrm.cxx22
-rw-r--r--sw/source/core/layout/unusedf.cxx2
-rw-r--r--sw/source/core/layout/wsfrm.cxx5
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx6
-rw-r--r--sw/source/core/text/porrst.cxx1
-rw-r--r--sw/source/core/unocore/unodraw.cxx24
-rw-r--r--sw/source/core/view/vdraw.cxx8
-rwxr-xr-x[-rw-r--r--]sw/source/core/view/viewpg.cxx744
-rw-r--r--sw/source/core/view/vnew.cxx7
-rwxr-xr-x[-rw-r--r--]sw/source/core/view/vprint.cxx1395
-rw-r--r--sw/source/filter/html/htmlform.cxx3
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx63
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx28
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx22
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx3
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par.cxx20
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx31
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx66
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx2
-rw-r--r--sw/source/ui/app/docsh2.cxx2
-rw-r--r--sw/source/ui/app/docst.cxx1
-rw-r--r--sw/source/ui/app/mn.src6
-rw-r--r--sw/source/ui/config/optdlg.hrc8
-rwxr-xr-x[-rw-r--r--]sw/source/ui/config/optdlg.src103
-rwxr-xr-x[-rw-r--r--]sw/source/ui/config/optpage.cxx85
-rw-r--r--sw/source/ui/config/prtopt.cxx30
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx494
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx19
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx4
-rw-r--r--sw/source/ui/inc/cfgitems.hxx8
-rw-r--r--sw/source/ui/inc/optpage.hxx8
-rw-r--r--sw/source/ui/inc/pview.hxx2
-rwxr-xr-x[-rw-r--r--]sw/source/ui/inc/srcview.hxx10
-rw-r--r--sw/source/ui/inc/unotxvw.hxx2
-rw-r--r--sw/source/ui/inc/view.hxx9
-rw-r--r--sw/source/ui/misc/glshell.cxx8
-rw-r--r--sw/source/ui/uiview/makefile.mk1
-rw-r--r--sw/source/ui/uiview/pview.cxx75
-rw-r--r--sw/source/ui/uiview/pview.src5
-rw-r--r--sw/source/ui/uiview/srcview.cxx170
-rw-r--r--sw/source/ui/uiview/view.cxx64
-rw-r--r--sw/source/ui/uiview/viewprt.cxx304
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx1
-rw-r--r--sw/source/ui/uno/unomod.cxx38
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx832
-rw-r--r--sw/source/ui/uno/unotxvw.cxx5
-rw-r--r--sw/uiconfig/sglobal/toolbar/previewobjectbar.xml1
-rw-r--r--sw/uiconfig/sweb/toolbar/previewobjectbar.xml1
-rw-r--r--sw/uiconfig/swform/toolbar/previewobjectbar.xml1
-rw-r--r--sw/uiconfig/swreport/toolbar/previewobjectbar.xml1
-rw-r--r--sw/uiconfig/swriter/toolbar/previewobjectbar.xml1
-rw-r--r--sw/uiconfig/swxform/toolbar/previewobjectbar.xml1
-rwxr-xr-xtestautomation/chart2/required/includes/ch2_format.inc74
-rw-r--r--testautomation/chart2/tools/ch_tools_statistics.inc2
-rwxr-xr-xtestautomation/dbaccess/optional/includes/ctrl_PropertyBrowser.inc2
-rwxr-xr-xtestautomation/dbaccess/optional/includes/ctrl_Wizards.inc3
-rwxr-xr-xtestautomation/framework/optional/f_CJK_GridLayout.bas6
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc1267
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc887
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc271
-rwxr-xr-xtestautomation/framework/optional/includes/options_ooo_general.inc615
-rwxr-xr-xtestautomation/framework/optional/includes/options_so_4.inc707
-rwxr-xr-xtestautomation/framework/optional/includes/options_so_5.inc612
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/w_grid_layout1.inc542
-rwxr-xr-xtestautomation/framework/required/includes/help_browser.inc57
-rwxr-xr-xtestautomation/framework/tools/includes/CJK_tools.inc31
-rwxr-xr-xtestautomation/framework/tools/includes/customize_tools.inc9
-rwxr-xr-xtestautomation/framework/tools/includes/fileoperations.inc17
-rwxr-xr-xtestautomation/framework/tools/includes/help_tools.inc4
-rwxr-xr-xtestautomation/global/required/includes/g_printing.inc524
-rwxr-xr-xtestautomation/global/tools/includes/optional/t_control_objects.inc157
-rwxr-xr-xtestautomation/global/tools/includes/optional/t_docfuncs.inc43
-rwxr-xr-xtestautomation/global/tools/includes/required/t_tools2.inc4
-rwxr-xr-xtestautomation/global/win/dial_d_h.win3
-rw-r--r--[-rwxr-xr-x]testautomation/global/win/edia_p_s.win96
-rwxr-xr-xtestautomation/global/win/sys_dial.win18
-rwxr-xr-xtestautomation/global/win/tab_a_d.win8
-rwxr-xr-xtestautomation/graphics/optional/g_print.bas64
-rwxr-xr-xtestautomation/graphics/optional/includes/global/g_print.inc164
-rwxr-xr-xtestautomation/graphics/optional/includes/global/id_001.inc25
-rwxr-xr-xtestautomation/graphics/optional/includes/global/id_009.inc6
-rwxr-xr-xtestautomation/graphics/required/d_updt.bas4
-rwxr-xr-xtestautomation/graphics/required/i_updt_2.bas5
-rwxr-xr-xtestautomation/graphics/required/includes/global/id_001.inc33
-rwxr-xr-xtestautomation/graphics/required/includes/global/id_009.inc6
-rwxr-xr-xtestautomation/graphics/tools/id_tools_2.inc1
-rwxr-xr-xtestautomation/math/optional/includes/m_101_.inc21
-rwxr-xr-xtestautomation/math/required/includes/m_001_.inc22
-rwxr-xr-xtestautomation/math/required/includes/m_007_.inc4
-rwxr-xr-xtestautomation/math/required/m_updt.bas5
-rwxr-xr-xtestautomation/spreadsheet/optional/includes/printrange/c_printrange.inc26
-rwxr-xr-xtestautomation/spreadsheet/optional/includes/printscale/c_print_scale.inc16
-rwxr-xr-xtestautomation/spreadsheet/required/c_updt1.bas4
-rwxr-xr-xtestautomation/spreadsheet/required/includes/c_upd_editmenu2.inc2
-rwxr-xr-xtestautomation/spreadsheet/required/includes/c_upd_filemenu.inc71
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields4.inc8
-rwxr-xr-xtestautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc122
-rwxr-xr-xtestautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc8
-rwxr-xr-xtestautomation/writer/optional/includes/option/wh_o_1.inc150
-rwxr-xr-xtestautomation/writer/optional/includes/option/wh_o_2.inc142
-rwxr-xr-xtestautomation/writer/optional/includes/option/wr_o_1.inc52
-rwxr-xr-xtestautomation/writer/optional/includes/option/wr_o_2.inc152
-rwxr-xr-xtestautomation/writer/optional/includes/option/wr_o_3.inc12
-rwxr-xr-xtestautomation/writer/optional/includes/option/wr_o_4.inc103
-rwxr-xr-xtestautomation/writer/optional/includes/option/wr_o_a.inc7
-rw-r--r--testautomation/writer/optional/w_fields.bas3
-rw-r--r--testautomation/writer/optional/w_insertgraphic.bas1
-rw-r--r--testautomation/writer/required/includes/w_001a_.inc1062
-rwxr-xr-xtestautomation/writer/required/includes/w_011_.inc2
-rwxr-xr-xtestautomation/writer/required/w_updt.bas5
-rwxr-xr-xtestautomation/writer/tools/includes/w_tools.inc6
-rw-r--r--toolkit/inc/toolkit/awt/vclxprinter.hxx15
-rw-r--r--toolkit/source/awt/vclxprinter.cxx36
-rw-r--r--toolkit/source/awt/vclxwindows.cxx6
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx1
-rw-r--r--toolkit/source/controls/unocontrols.cxx2
-rw-r--r--tools/inc/tools/multisel.hxx104
-rw-r--r--tools/inc/tools/stream.hxx5
-rw-r--r--tools/source/fsys/urlobj.cxx18
-rw-r--r--tools/source/memtools/makefile.mk2
-rw-r--r--tools/source/memtools/multisel.cxx298
-rw-r--r--tools/workben/urltest.cxx14
-rw-r--r--transex3/source/inireader.cxx2
-rw-r--r--unotools/inc/unotools/confignode.hxx3
-rw-r--r--unotools/source/config/confignode.cxx23
-rwxr-xr-xvcl/aqua/inc/aquaprintview.h26
-rw-r--r--vcl/aqua/inc/salgdi.h3
-rw-r--r--vcl/aqua/inc/salprn.h41
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm1237
-rwxr-xr-xvcl/aqua/source/gdi/aquaprintview.mm11
-rw-r--r--vcl/aqua/source/gdi/makefile.mk1
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx12
-rwxr-xr-xvcl/aqua/source/gdi/salgdiutils.cxx35
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx320
-rw-r--r--vcl/inc/vcl/arrange.hxx425
-rw-r--r--vcl/inc/vcl/button.hxx16
-rw-r--r--vcl/inc/vcl/configsettings.hxx3
-rw-r--r--vcl/inc/vcl/edit.hxx1
-rw-r--r--vcl/inc/vcl/fixed.hxx1
-rw-r--r--vcl/inc/vcl/gdimtf.hxx1
-rw-r--r--vcl/inc/vcl/impprn.hxx3
-rw-r--r--vcl/inc/vcl/jobdata.hxx2
-rw-r--r--vcl/inc/vcl/jobset.h13
-rw-r--r--vcl/inc/vcl/lstbox.h5
-rw-r--r--vcl/inc/vcl/menu.hxx2
-rw-r--r--vcl/inc/vcl/oldprintadaptor.hxx (renamed from svx/source/inc/confirmdelete.hxx)44
-rw-r--r--vcl/inc/vcl/outdev.hxx5
-rw-r--r--vcl/inc/vcl/print.h23
-rw-r--r--vcl/inc/vcl/print.hxx393
-rw-r--r--vcl/inc/vcl/printerjob.hxx2
-rw-r--r--vcl/inc/vcl/prndlg.hxx306
-rw-r--r--vcl/inc/vcl/prntypes.hxx3
-rw-r--r--vcl/inc/vcl/salprn.hxx18
-rw-r--r--vcl/inc/vcl/salptype.hxx6
-rw-r--r--vcl/inc/vcl/svdata.hxx8
-rw-r--r--vcl/inc/vcl/svids.hrc100
-rw-r--r--vcl/inc/vcl/tabctrl.hxx13
-rw-r--r--vcl/inc/vcl/toolbox.hxx3
-rw-r--r--vcl/inc/vcl/virdev.hxx11
-rw-r--r--vcl/inc/vcl/window.h3
-rw-r--r--vcl/os2/inc/salprn.h5
-rw-r--r--vcl/os2/source/gdi/salprn.cxx11
-rw-r--r--vcl/prj/build.lst2
-rw-r--r--vcl/prj/d.lst2
-rw-r--r--vcl/source/app/salvtables.cxx4
-rw-r--r--vcl/source/app/svdata.cxx11
-rw-r--r--vcl/source/app/svmain.cxx20
-rw-r--r--vcl/source/control/button.cxx99
-rw-r--r--vcl/source/control/edit.cxx45
-rw-r--r--vcl/source/control/fixed.cxx8
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/control/lstbox.cxx57
-rw-r--r--vcl/source/control/tabctrl.cxx189
-rw-r--r--vcl/source/gdi/bmpconv.cxx3
-rw-r--r--vcl/source/gdi/gdimtf.cxx34
-rw-r--r--vcl/source/gdi/impprn.cxx2
-rw-r--r--vcl/source/gdi/jobset.cxx26
-rw-r--r--[-rwxr-xr-x]vcl/source/gdi/makefile.mk4
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx117
-rw-r--r--vcl/source/gdi/print.cxx484
-rw-r--r--vcl/source/gdi/print2.cxx35
-rw-r--r--vcl/source/gdi/print3.cxx1765
-rw-r--r--vcl/source/gdi/virdev.cxx29
-rw-r--r--vcl/source/helper/xconnection.cxx36
-rw-r--r--vcl/source/src/images.src20
-rw-r--r--vcl/source/src/makefile.mk5
-rw-r--r--vcl/source/src/print.src495
-rw-r--r--vcl/source/src/stdtext.src7
-rw-r--r--vcl/source/window/arrange.cxx906
-rw-r--r--vcl/source/window/makefile.mk4
-rw-r--r--vcl/source/window/printdlg.cxx2489
-rw-r--r--vcl/source/window/toolbox.cxx26
-rw-r--r--vcl/source/window/window.cxx21
-rw-r--r--vcl/source/window/window2.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx13
-rw-r--r--vcl/unx/headless/svpprn.cxx114
-rw-r--r--vcl/unx/headless/svpprn.hxx6
-rw-r--r--vcl/unx/inc/salprn.h6
-rw-r--r--vcl/unx/source/app/saldisp.cxx6
-rw-r--r--vcl/unx/source/gdi/salprnpsp.cxx125
-rw-r--r--vcl/unx/source/plugadapt/salplug.cxx4
-rw-r--r--vcl/unx/source/printer/jobdata.cxx22
-rw-r--r--vcl/unx/source/printergfx/printerjob.cxx45
-rw-r--r--vcl/util/hidother.src34
-rw-r--r--vcl/util/makefile.mk1
-rw-r--r--vcl/win/inc/salprn.h5
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx61
-rw-r--r--vcl/win/source/gdi/salprn.cxx72
-rw-r--r--wizards/com/sun/star/wizards/db/CommandMetaData.java4
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java185
-rw-r--r--wizards/com/sun/star/wizards/table/TableWizard.java6
816 files changed, 51232 insertions, 31021 deletions
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 1477220d5953..be501ae901f6 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -91,16 +91,7 @@
#include <svtools/svtdata.hxx>
#include <tools/time.hxx>
#include <svtools/stringtransfer.hxx>
-#ifndef _PRINT_HXX //autogen
-#include <vcl/print.hxx>
-#endif
-#ifndef _PRNDLG_HXX //autogen
-#include <vcl/prndlg.hxx>
-#endif
#include <tools/stream.hxx>
-#ifndef _SV_DRAG_HXX //autogen
-//#include <vcl/drag.hxx>
-#endif
#include <tools/fsys.hxx>
#include <svl/stritem.hxx>
#include <svtools/ttprops.hxx>
@@ -4820,37 +4811,49 @@ BOOL StatementControl::Execute()
}
break;
case M_GetPage:
- pRet->GenReturn ( RET_Value, aUId, static_cast<comm_ULONG>(((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetSmartUniqueOrHelpId().GetNum())); //GetNum() ULONG != comm_ULONG on 64bit
+ pRet->GenReturn ( RET_Value, aUId, ((TabControl*)pControl)->GetTabPage(((TabControl*)pControl)->GetCurPageId())->GetSmartUniqueOrHelpId().GetText());
break;
case M_SetPage :
{ // Wegen lokaler Variablen
TabControl *pTControl = ((TabControl*)pControl);
USHORT nActive = pTControl->GetCurPageId();
USHORT i,anz;
- ULONG nID = 0;
+ SmartId aID;
+ SmartId aWantedID;
+ if ( (nParams & PARAM_ULONG_1) )
+ {
+ aWantedID = SmartId( nLNr1 );
+ }
+ else if ( (nParams & PARAM_STR_1) )
+ {
+ aWantedID = SmartId( aString1 );
+ }
+ else
+ ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
+
i = pTControl->GetPagePos( pTControl->GetCurPageId() );
- for ( anz=0 ; anz < pTControl->GetPageCount() && nID != nLNr1 ; anz++ )
+ for ( anz=0 ; anz < pTControl->GetPageCount() && !aID.Matches( aWantedID ) ; anz++ )
{
pTControl->SelectTabPage( pTControl->GetPageId(i) );
/*if (pTControl->GetCurPageId())
pTControl->DeactivatePage();
pTControl->SetCurPageId( pTControl->GetPageId(i) );
pTControl->ActivatePage();*/
- nID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetSmartUniqueOrHelpId().GetNum();
+ aID = pTControl->GetTabPage(pTControl->GetCurPageId())->GetSmartUniqueOrHelpId();
i++;
if ( i >= pTControl->GetPageCount() )
i = 0;
if ( !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) || !MaybeDoTypeKeysDelay( pTControl ) ) // 3 Mal aufrufen
break;
}
- if ( nID != nLNr1 )
+ if ( !aID.Matches( aWantedID ) )
{
pTControl->SelectTabPage( nActive );
/*if (pTControl->GetCurPageId())
pTControl->DeactivatePage();
pTControl->SetCurPageId( nActive );
pTControl->ActivatePage();*/
- ReportError( SmartId( nLNr1 ), GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) );
+ ReportError( aWantedID, GEN_RES_STR1( S_TABPAGE_NOT_FOUND, MethodString( nMethodId ) ) );
}
}
break;
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index ddff29283d2d..d4f048cda8d7 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -58,6 +58,7 @@
#define RID_DLG_NEWLIB ( RID_BASICIDE_START + 42 )
#define RID_DLG_EXPORT ( RID_BASICIDE_START + 43 )
#define RID_POPUP_DLGED ( RID_BASICIDE_START + 62 )
+#define RID_PRINTDLG_STRLIST ( RID_BASICIDE_START + 78 )
#define RID_IMG_LOCKED_HC ( RID_BASICIDE_START + 6 )
#define RID_IMGBTN_REMOVEWATCH ( RID_BASICIDE_START + 8 )
diff --git a/basctl/source/basicide/basicprint.src b/basctl/source/basicide/basicprint.src
new file mode 100644
index 000000000000..be5e7d2e1de3
--- /dev/null
+++ b/basctl/source/basicide/basicprint.src
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basidesh.src,v $
+ * $Revision: 1.107 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include <basidesh.hrc>
+
+StringArray RID_PRINTDLG_STRLIST
+{
+ ItemList [en-US] =
+ {
+ < "Print range"; >;
+ < "All ~Pages"; >;
+ < "Print all pages of the printable content."; >;
+ < "Pa~ges"; >;
+ < "Print only some pages of the printable content."; >;
+ };
+};
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
new file mode 100644
index 000000000000..fa30af874cff
--- /dev/null
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basidesh.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+#include "precompiled_basctl.hxx"
+
+#include "basicrenderable.hxx"
+#include "bastypes.hxx"
+#include "basidesh.hrc"
+
+#include "com/sun/star/awt/XDevice.hpp"
+#include "toolkit/awt/vclxdevice.hxx"
+#include "vcl/print.hxx"
+#include "tools/multisel.hxx"
+#include "tools/resary.hxx"
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace basicide;
+
+BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
+: cppu::WeakComponentImplHelper1< com::sun::star::view::XRenderable >( maMutex )
+, mpWindow( pWin )
+{
+ ResStringArray aStrings( IDEResId( RID_PRINTDLG_STRLIST ) );
+ DBG_ASSERT( aStrings.Count() >= 5, "resource incomplete" );
+ if( aStrings.Count() < 5 ) // bad resource ?
+ return;
+
+ m_aUIProperties.realloc( 3 );
+
+ // create Subgroup for print range
+ vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
+ aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ aPrintRangeOpt.mbInternalOnly = sal_True;
+ m_aUIProperties[0].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ),
+ rtl::OUString(),
+ aPrintRangeOpt
+ );
+
+ // create a choice for the range to print
+ rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
+ Sequence< rtl::OUString > aChoices( 2 );
+ Sequence< rtl::OUString > aHelpTexts( 2 );
+ aChoices[0] = aStrings.GetString( 1 );
+ aHelpTexts[0] = aStrings.GetString( 2 );
+ aChoices[1] = aStrings.GetString( 3 );
+ aHelpTexts[1] = aStrings.GetString( 4 );
+ m_aUIProperties[1].Value = getChoiceControlOpt( rtl::OUString(),
+ aHelpTexts,
+ aPrintContentName,
+ aChoices,
+ 0 );
+
+ // create a an Edit dependent on "Pages" selected
+ vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintContentName, 1, sal_True );
+ m_aUIProperties[2].Value = getEditControlOpt( rtl::OUString(),
+ rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
+ rtl::OUString(),
+ aPageRangeOpt
+ );
+}
+
+BasicRenderable::~BasicRenderable()
+{
+}
+
+Printer* BasicRenderable::getPrinter()
+{
+ Printer* pPrinter = NULL;
+ Any aValue( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) );
+ Reference<awt::XDevice> xRenderDevice;
+
+ if( aValue >>= xRenderDevice )
+ {
+ VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
+ OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
+ pPrinter = dynamic_cast<Printer*>(pOut);
+ }
+ return pPrinter;
+}
+
+sal_Int32 SAL_CALL BasicRenderable::getRendererCount (
+ const Any&, const Sequence<beans::PropertyValue >& i_xOptions
+ ) throw (lang::IllegalArgumentException, RuntimeException)
+{
+ processProperties( i_xOptions );
+
+ sal_Int32 nCount = 0;
+ if( mpWindow )
+ {
+ Printer* pPrinter = getPrinter();
+ if( pPrinter )
+ {
+ nCount = mpWindow->countPages( pPrinter );
+ sal_Int64 nContent = getIntValue( "PrintContent", -1 );
+ if( nContent == 1 )
+ {
+ rtl::OUString aPageRange( getStringValue( "PageRange" ) );
+ MultiSelection aSel( aPageRange );
+ long nSelCount = aSel.GetSelectCount();
+ if( nSelCount >= 0 && nSelCount < nCount )
+ nCount = nSelCount;
+ }
+ }
+ else
+ throw lang::IllegalArgumentException();
+ }
+
+ return nCount;
+}
+
+Sequence<beans::PropertyValue> SAL_CALL BasicRenderable::getRenderer (
+ sal_Int32, const Any&, const Sequence<beans::PropertyValue>& i_xOptions
+ ) throw (lang::IllegalArgumentException, RuntimeException)
+{
+ processProperties( i_xOptions );
+
+ Sequence< beans::PropertyValue > aVals;
+ // insert page size here
+ Printer* pPrinter = getPrinter();
+ // no renderdevice is legal; the first call is to get our print ui options
+ if( pPrinter )
+ {
+ Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+
+ aVals.realloc( 1 );
+ aVals[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
+ awt::Size aSize;
+ aSize.Width = aPageSize.Width();
+ aSize.Height = aPageSize.Height();
+ aVals[0].Value <<= aSize;
+ }
+
+ appendPrintUIOptions( aVals );
+
+ return aVals;
+}
+
+void SAL_CALL BasicRenderable::render (
+ sal_Int32 nRenderer, const Any&,
+ const Sequence<beans::PropertyValue>& i_xOptions
+ ) throw (lang::IllegalArgumentException, RuntimeException)
+{
+ processProperties( i_xOptions );
+
+ if( mpWindow )
+ {
+ Printer* pPrinter = getPrinter();
+ if( pPrinter )
+ {
+ sal_Int64 nContent = getIntValue( "PrintContent", -1 );
+ if( nContent == 1 )
+ {
+ rtl::OUString aPageRange( getStringValue( "PageRange" ) );
+ MultiSelection aSel( aPageRange );
+ long nSelect = aSel.FirstSelected();
+ while( nSelect != long(SFX_ENDOFSELECTION) && nRenderer-- )
+ nSelect = aSel.NextSelected();
+ if( nSelect != long(SFX_ENDOFSELECTION) )
+ mpWindow->printPage( sal_Int32(nSelect-1), pPrinter );
+ }
+ else
+ mpWindow->printPage( nRenderer, pPrinter );
+ }
+ else
+ throw lang::IllegalArgumentException();
+ }
+}
+
+
diff --git a/basctl/source/basicide/basicrenderable.hxx b/basctl/source/basicide/basicrenderable.hxx
new file mode 100644
index 000000000000..7cad19c784be
--- /dev/null
+++ b/basctl/source/basicide/basicrenderable.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basidesh.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+#ifndef _BASICRENDERABLE_HXX
+#define _BASICRENDERABLE_HXX
+
+#include "com/sun/star/view/XRenderable.hpp"
+#include "cppuhelper/compbase1.hxx"
+
+#include "vcl/print.hxx"
+
+class IDEBaseWindow;
+
+namespace basicide
+{
+class BasicRenderable :
+ public cppu::WeakComponentImplHelper1< com::sun::star::view::XRenderable >,
+ public vcl::PrinterOptionsHelper
+{
+ IDEBaseWindow* mpWindow;
+ osl::Mutex maMutex;
+
+ Printer* getPrinter();
+public:
+ BasicRenderable( IDEBaseWindow* pWin );
+ virtual ~BasicRenderable();
+
+ // XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount (
+ const com::sun::star::uno::Any& aSelection,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue >& xOptions)
+ throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+
+ virtual com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> SAL_CALL getRenderer (
+ sal_Int32 nRenderer,
+ const com::sun::star::uno::Any& rSelection,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rxOptions)
+ throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL render (
+ sal_Int32 nRenderer,
+ const com::sun::star::uno::Any& rSelection,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rxOptions)
+ throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+
+};
+
+} // namespace
+
+#endif
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index e23cd68a75af..6612f82fb92b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -110,7 +110,7 @@ DBG_NAME( ModulWindow )
TYPEINIT1( ModulWindow , IDEBaseWindow );
-void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle, bool bOutput )
{
short nLeftMargin = LMARGPRN;
Size aSz = pPrinter->GetOutputSize();
@@ -136,14 +136,16 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
long nXLeft = nLeftMargin-nBorder;
long nXRight = aSz.Width()-RMARGPRN+nBorder;
- pPrinter->DrawRect( Rectangle(
- Point( nXLeft, nYTop ),
- Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
+ if( bOutput )
+ pPrinter->DrawRect( Rectangle(
+ Point( nXLeft, nYTop ),
+ Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
long nY = TMARGPRN-2*nBorder;
Point aPos( nLeftMargin, nY );
- pPrinter->DrawText( aPos, rTitle );
+ if( bOutput )
+ pPrinter->DrawText( aPos, rTitle );
if ( nPages != 1 )
{
aFont.SetWeight( WEIGHT_NORMAL );
@@ -154,13 +156,15 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
aPageStr += String::CreateFromInt32( nCurPage );
aPageStr += ']';
aPos.X() += pPrinter->GetTextWidth( rTitle );
- pPrinter->DrawText( aPos, aPageStr );
+ if( bOutput )
+ pPrinter->DrawText( aPos, aPageStr );
}
nY = TMARGPRN-nBorder;
- pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
+ if( bOutput )
+ pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
pPrinter->SetFont( aOldFont );
pPrinter->SetFillColor( aOldFillColor );
@@ -914,8 +918,23 @@ void __EXPORT ModulWindow::UpdateData()
}
}
+sal_Int32 ModulWindow::countPages( Printer* pPrinter )
+{
+ return FormatAndPrint( pPrinter, -1 );
+}
+
+void ModulWindow::printPage( sal_Int32 nPage, Printer* pPrinter )
+{
+ FormatAndPrint( pPrinter, nPage );
+}
-void __EXPORT ModulWindow::PrintData( Printer* pPrinter )
+/* implementation note: this is totally inefficient for the XRenderable interface
+ usage since the whole "document" will be format for every page. Should this ever
+ become a problem we should
+ - format only once for every new printer
+ - keep an index list for each page which is the starting paragraph
+*/
+sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
{
DBG_CHKTHIS( ModulWindow, 0 );
@@ -949,10 +968,8 @@ void __EXPORT ModulWindow::PrintData( Printer* pPrinter )
USHORT nPages = (USHORT) (nParas/nLinespPage+1 );
USHORT nCurPage = 1;
- pPrinter->StartJob( aTitle );
- pPrinter->StartPage();
// Header drucken...
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
+ lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle, nPrintPage == 0 );
Point aPos( LMARGPRN, TMARGPRN );
for ( ULONG nPara = 0; nPara < nParas; nPara++ )
{
@@ -966,20 +983,19 @@ void __EXPORT ModulWindow::PrintData( Printer* pPrinter )
if ( aPos.Y() > ( aPaperSz.Height()+TMARGPRN ) )
{
nCurPage++;
- pPrinter->EndPage();
- pPrinter->StartPage();
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
+ lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle, nCurPage-1 == nPrintPage );
aPos = Point( LMARGPRN, TMARGPRN+nLineHeight );
}
- pPrinter->DrawText( aPos, aTmpLine );
+ if( nCurPage-1 == nPrintPage )
+ pPrinter->DrawText( aPos, aTmpLine );
}
aPos.Y() += nParaSpace;
}
- pPrinter->EndPage();
- pPrinter->EndJob();
pPrinter->SetFont( aOldFont );
pPrinter->SetMapMode( eOldMapMode );
+
+ return sal_Int32(nCurPage);
}
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 0c575229411e..25a04b0da6ab 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -359,6 +359,7 @@ private:
void GoOnTop();
void AssertValidEditEngine();
+ sal_Int32 FormatAndPrint( Printer* pPrinter, sal_Int32 nPage = -1 );
protected:
virtual void Resize();
virtual void GetFocus();
@@ -380,7 +381,11 @@ public:
virtual void StoreData();
virtual void UpdateData();
virtual BOOL CanClose();
- virtual void PrintData( Printer* pPrinter );
+ // virtual void PrintData( Printer* pPrinter );
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter );
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual String GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor();
virtual BOOL AllowUndo();
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index d33310b6e339..77181a0a2044 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1368,9 +1368,14 @@ void DialogWindow::Deactivating()
BasicIDE::MarkDocumentModified( GetDocument() );
}
-void DialogWindow::PrintData( Printer* pPrinter )
+sal_Int32 DialogWindow::countPages( Printer* pPrinter )
{
- pEditor->PrintData( pPrinter, CreateQualifiedName() );
+ return pEditor->countPages( pPrinter );
+}
+
+void DialogWindow::printPage( sal_Int32 nPage, Printer* pPrinter )
+{
+ pEditor->printPage( nPage, pPrinter, CreateQualifiedName() );
}
void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 74e1d59aad4d..eb59ca4f082b 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -38,8 +38,7 @@
#include <ide_pch.hxx>
#include <basic/sbx.hxx>
-
-#define _SOLAR__PRIVATE 1
+#include "basicrenderable.hxx"
#include <com/sun/star/frame/XTitle.hpp>
@@ -85,6 +84,12 @@ IMPL_LINK( BasicIDEShell, ObjectDialogInsertHdl, ObjectCatalog *, pObjCat )
}
*/
+Reference< view::XRenderable > BasicIDEShell::GetRenderable()
+{
+ return Reference< view::XRenderable >( new basicide::BasicRenderable( pCurWin ) );
+}
+
+#if 0
USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog )
{
if ( pCurWin )
@@ -98,6 +103,7 @@ USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, Print
}
return 0;
}
+#endif
BOOL BasicIDEShell::HasSelection( BOOL /* bText */ ) const
{
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 3b64b11b9abc..c44d3d00fdf0 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -207,13 +207,6 @@ void __EXPORT IDEBaseWindow::UpdateData()
}
-
-void __EXPORT IDEBaseWindow::PrintData( Printer* )
-{
-}
-
-
-
String __EXPORT IDEBaseWindow::GetTitle()
{
return String();
diff --git a/basctl/source/basicide/makefile.mk b/basctl/source/basicide/makefile.mk
index 8766473d8157..c5222951da6c 100644
--- a/basctl/source/basicide/makefile.mk
+++ b/basctl/source/basicide/makefile.mk
@@ -51,7 +51,8 @@ CDEFS+=-DBASICDEBUG
# --- Allgemein ----------------------------------------------------------
-EXCEPTIONSFILES=$(SLO)$/scriptdocument.obj \
+EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \
+ $(SLO)$/scriptdocument.obj \
$(SLO)$/basidesh.obj \
$(SLO)$/basides1.obj \
$(SLO)$/basides2.obj \
@@ -84,7 +85,7 @@ SLOFILES = $(EXCEPTIONSFILES) \
$(SLO)$/objdlg.obj \
SRS1NAME=$(TARGET)
-SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src tbxctl.src
+SRC1FILES= basidesh.src macrodlg.src moptions.src moduldlg.src objdlg.src brkdlg.src tbxctl.src basicprint.src
.INCLUDE : target.mk
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 423ef39079a0..80b9c26e07b4 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1283,7 +1283,20 @@ void lcl_PrintHeader( Printer* pPrinter, const String& rTitle ) // not working y
//----------------------------------------------------------------------------
-void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not working yet
+sal_Int32 DlgEditor::countPages( Printer* )
+{
+ return 1;
+}
+
+void DlgEditor::printPage( sal_Int32 nPage, Printer* pPrinter, const String& rTitle )
+{
+ if( nPage == 0 )
+ Print( pPrinter, rTitle );
+}
+
+//----------------------------------------------------------------------------
+
+void DlgEditor::Print( Printer* pPrinter, const String& rTitle ) // not working yet
{
if( pDlgEdView )
{
@@ -1304,8 +1317,6 @@ void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not w
aPaperSz.Width() -= (LMARGPRN+RMARGPRN);
aPaperSz.Height() -= (TMARGPRN+BMARGPRN);
- pPrinter->StartPage();
-
lcl_PrintHeader( pPrinter, rTitle );
Bitmap aDlg;
@@ -1350,8 +1361,6 @@ void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not w
pPrinter->DrawBitmap( aPosOffs, aOutputSz, aDlg );
- pPrinter->EndPage();
-
pPrinter->SetMapMode( aOldMap );
pPrinter->SetFont( aOldFont );
}
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 4c361d4545f5..7920e9ebdfc6 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -110,7 +110,10 @@ public:
virtual BOOL IsPasteAllowed();
virtual SfxUndoManager* GetUndoManager();
- virtual void PrintData( Printer* pPrinter );
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter );
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual void Deactivating();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index d8e58b968398..f4f118b0b277 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -199,7 +199,9 @@ public:
SfxUndoManager* GetUndoManager();
- virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
+ virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
+
+ // virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 );
virtual SfxPrinter* GetPrinter( BOOL bCreate );
virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual String GetSelectionText( BOOL bCompleteWords );
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 0c542ac405ad..a9540762172d 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -205,9 +205,13 @@ public:
virtual void StoreData();
virtual void UpdateData();
- virtual void PrintData( Printer* pPrinter );
virtual BOOL CanClose();
+ // return number of pages to be printed
+ virtual sal_Int32 countPages( Printer* pPrinter ) = 0;
+ // print page
+ virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0;
+
virtual String GetTitle();
String CreateQualifiedName();
virtual BasicEntryDescriptor CreateEntryDescriptor() = 0;
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 9a75e80a53e2..001c689a78a5 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -102,6 +102,8 @@ private:
DECL_LINK( PaintTimeout, Timer * );
DECL_LINK( MarkTimeout, Timer * );
+ void Print( Printer* pPrinter, const String& rTitle );
+
protected:
ScrollBar* pHScroll;
ScrollBar* pVScroll;
@@ -199,7 +201,8 @@ public:
void ShowProperties();
void UpdatePropertyBrowserDelayed();
- void PrintData( Printer*, const String& rTitle ); // not working yet
+ sal_Int32 countPages( Printer* pPrinter );
+ void printPage( sal_Int32 nPage, Printer* pPrinter, const String& );
bool AdjustPageSize();
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 31385f2f6e9e..4cc2765604fd 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -1401,19 +1401,10 @@ long BasicFrame::Command( short nID, BOOL bChecked )
// InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN ));
break;
case RID_FILEPRINT:
-#ifndef UNX
if( pWork )
pPrn->Print( pWork->GetText(), pWork->pDataEdit->GetText(), this );
-#else
- InfoBox( this, SttResId( IDS_NOPRINTERERROR ) ).Execute();
-#endif
break;
case RID_FILESETUP:
-#ifndef UNX
- pPrn->Setup();
-#else
- InfoBox( this, SttResId( IDS_NOPRINTERERROR ) ).Execute();
-#endif
break;
case RID_QUIT:
if( Close() ) aBasicApp.Quit();
diff --git a/basic/source/app/makefile.mk b/basic/source/app/makefile.mk
index 13c3b4a8b507..3a52f402b329 100644
--- a/basic/source/app/makefile.mk
+++ b/basic/source/app/makefile.mk
@@ -61,6 +61,7 @@ OBJFILES = \
EXCEPTIONSFILES = \
$(OBJ)$/app.obj \
+ $(OBJ)$/printer.obj \
$(OBJ)$/process.obj
.IF "$(GUI)" == "WNT"
diff --git a/basic/source/app/printer.cxx b/basic/source/app/printer.cxx
index 6f173fd53ffa..61879d628d39 100644
--- a/basic/source/app/printer.cxx
+++ b/basic/source/app/printer.cxx
@@ -64,35 +64,32 @@ public:
void ChangeMessage( short );
};
-BasicPrinter::BasicPrinter() : Printer()
+BasicPrinter::BasicPrinter() : mpPrinter( new Printer() )
{
nPage = 0; nLine = 9999;
- SetMapMode( MapMode( MAP_POINT ) );
- Size s( GetOutputSize() );
+ mpPrinter->SetMapMode( MapMode( MAP_POINT ) );
+ Size s( mpPrinter->GetOutputSize() );
// Use 10 point font
Font aFont( FAMILY_MODERN, Size( 0, 10 ) );
aFont.SetPitch( PITCH_FIXED );
- SetFont( aFont );
+ mpPrinter->SetFont( aFont );
// Output: 6 Lines/Inch = 12 Point
nLines = (short) s.Height() / 12;
nYoff = 12;
- SetStartPrintHdl( LINK( this, BasicPrinter, StartPrintHdl ) );
- SetEndPrintHdl( LINK( this, BasicPrinter, EndPrintHdl ) );
- SetPrintPageHdl( LINK( this, BasicPrinter, PrintPageHdl ) );
}
void BasicPrinter::Header()
{
- if( nPage ) EndPage();
+ if( nPage ) mpListener->EndPage();
nPage++;
- StartPage();
+ mpListener->StartPage();
String aHdr;
String aPage( SttResId( IDS_PAGE ) );
aPage.Append( String::CreateFromInt32(nPage) );
aHdr = aFile.Copy( 0, 80 - aPage.Len() );
aHdr.Expand( 80 - aPage.Len(), ' ' );
aHdr += aPage;
- DrawText( Point( 0, 0 ), aHdr );
+ mpPrinter->DrawText( Point( 0, 0 ), aHdr );
nLine = 2;
}
@@ -100,98 +97,29 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame *
{
nPage = 0; nLine = 9999;
aFile = rFile;
- // Setup dialog
- SttResId aResId( IDD_PRINT_DIALOG );
- pDlg = new PrintingDialog
- ( aBasicApp.pFrame, this, aResId, aFile );
- // Set position of dialog
- Size s1 = aBasicApp.pFrame->GetSizePixel();
- Size s2 = pDlg->GetSizePixel();
- pDlg->SetPosPixel( Point( (s1.Width() - s2.Width() ) / 2,
- (s1.Height()- s2.Height() ) / 2 ) );
// Disable PRINT-Menu
MenuBar* pBar = pFrame->GetMenuBar();
Menu* pFileMenu = pBar->GetPopupMenu( RID_APPFILE );
pFileMenu->EnableItem( RID_FILEPRINT, FALSE );
- pDlg->ChangeMessage( 1 );
- pDlg->Show();
- StartJob( rFile );
- StartPage();
+ mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
+ mpListener->StartPage();
xub_StrLen nDone=0;
while( nDone < rText.Len() )
{
if( nLine >= nLines ) Header();
xub_StrLen nLineEnd = std::min( rText.Search( '\n', nDone ), rText.Search( '\r', nDone ) );
- DrawText( Point( 0, nLine * nYoff ), rText, nDone, nLineEnd-nDone-1 );
+ mpPrinter->DrawText( Point( 0, nLine * nYoff ), rText, nDone, nLineEnd-nDone-1 );
nDone = nLineEnd;
if( nDone <= rText.Len() && rText.GetChar(nDone) == '\r' ) nDone++;
if( nDone <= rText.Len() && rText.GetChar(nDone) == '\n' ) nDone++;
nLine++;
- Application::Reschedule();
}
- EndPage();
- EndJob();
+ mpListener->EndPage();
+
+ Printer::PrintJob( mpListener, mpPrinter->GetJobSetup() );
nPage = 1;
- while( IsPrinting() ) Application::Reschedule();
- delete pDlg; pDlg = NULL;
pFileMenu->EnableItem( RID_FILEPRINT, TRUE );
}
-IMPL_LINK_INLINE_START( BasicPrinter, StartPrintHdl, Printer *, pPrinter )
-{
- (void) pPrinter; /* avoid warning about unused parameter */
- if( pDlg != NULL )
- pDlg->Show();
- return 0;
-}
-IMPL_LINK_INLINE_END( BasicPrinter, StartPrintHdl, Printer *, pPrinter )
-
-IMPL_LINK_INLINE_START( BasicPrinter, EndPrintHdl, Printer *, pPrinter )
-{
- (void) pPrinter; /* avoid warning about unused parameter */
- if( pDlg != NULL)
- pDlg->Hide();
- return 0;
-}
-IMPL_LINK_INLINE_END( BasicPrinter, EndPrintHdl, Printer *, pPrinter )
-
-IMPL_LINK_INLINE_START( BasicPrinter, PrintPageHdl, Printer *, pPrinter )
-{
- (void) pPrinter; /* avoid warning about unused parameter */
- if( pDlg != NULL)
- pDlg->ChangeMessage( nPage );
- return 0;
-}
-IMPL_LINK_INLINE_END( BasicPrinter, PrintPageHdl, Printer *, pPrinter )
-
-IMPL_LINK_INLINE( BasicPrinter, Abort , void *, EMPTYARG,
-{
- AbortJob();
- return 0L;
-}
-)
-
-/////////////////////////////////////////////////////////////////////////
-
-PrintingDialog::PrintingDialog
- ( Window* pParent, BasicPrinter* pPrn, ResId& rId, String& rName )
-: ModelessDialog( pParent, rId )
-, aName ( rName )
-, aText ( this, ResId( RID_TEXT, *rId.GetResMgr() ) )
-, aCancel( this, ResId( RID_CANCEL, *rId.GetResMgr() ) )
-{
- FreeResource();
- aCancel.SetClickHdl( LINK( pPrn, BasicPrinter, Abort ) );
-}
-
-void PrintingDialog::ChangeMessage( short nPage )
-{
- String aMsg( SttResId( IDS_PRINTMSG ) );
- aMsg += aName;
- aMsg += CUniString("\n");
- aMsg += String( SttResId( IDS_PAGE ) );
- aMsg += String::CreateFromInt32( nPage );
- aText.SetText( aMsg );
-}
diff --git a/basic/source/app/printer.hxx b/basic/source/app/printer.hxx
index d6db8154c57f..26b89b5278fe 100644
--- a/basic/source/app/printer.hxx
+++ b/basic/source/app/printer.hxx
@@ -31,31 +31,25 @@
#ifndef _BASICPRN_HXX
#define _BASICPRN_HXX
-#ifndef _PRINT_HXX //autogen
-#include <vcl/print.hxx>
-#endif
+#include "vcl/print.hxx"
+#include "vcl/oldprintadaptor.hxx"
-class PrintingDialog;
+class BasicPrinter
+{
+ boost::shared_ptr<Printer> mpPrinter;
+ boost::shared_ptr<vcl::OldStylePrintAdaptor> mpListener;
-class BasicPrinter : public Printer {
short nLine; // aktuelle Zeile
short nPage; // aktuelle Seite
short nLines; // Zeilen pro Seite
short nYoff; // Zeilenabstand in Points
String aFile; // Dateiname
- PrintingDialog* pDlg; // Druck-Dialog
+
void Header(); // Seitenkopf drucken
+ void StartPage();
public:
BasicPrinter();
void Print( const String& rFile, const String& rText, BasicFrame *pFrame );
- DECL_LINK( Abort, void * );
- DECL_LINK( StartPrintHdl, Printer * );
- DECL_LINK( EndPrintHdl, Printer * );
- DECL_LINK( PrintPageHdl, Printer * );
-#if defined( PM20 )
- // StarView-Bug, bald wieder zu entfernen:
- virtual void SetPageQueueSize( USHORT ) {}
-#endif
};
#endif
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index aa3fda6a7116..a13569ee0a9f 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -32,9 +32,7 @@
#include "precompiled_basic.hxx"
#include <tools/shl.hxx>
#include <vcl/svapp.hxx>
-#ifndef _SOLAR_HRC
#include <svl/solar.hrc>
-#endif
#include <tools/debug.hxx>
#include <vcl/msgbox.hxx>
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 5469010f2745..7a5e81a5512a 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -990,7 +990,8 @@ namespace cairocanvas
aEdge.setNextControlPoint(0, aCandidate.getNextControlPoint(a));
aEdge.setPrevControlPoint(1, aCandidate.getPrevControlPoint(nNextIndex));
- doPolyPolygonImplementation( aEdge, aOperation,
+ doPolyPolygonImplementation( basegfx::B2DPolyPolygon(aEdge),
+ aOperation,
pCairo, pTextures,
mpSurfaceProvider,
xPolyPolygon->getFillRule() );
@@ -1187,7 +1188,7 @@ namespace cairocanvas
cairo_save( mpCairo.get() );
useStates( viewState, renderState, true );
- doPolyPolygonPath( xPolyPolygon, Fill, &textures );
+ doPolyPolygonPath( xPolyPolygon, Fill, false, &textures );
cairo_restore( mpCairo.get() );
}
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index 8b816e8c1ce9..caa895021103 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -240,7 +240,7 @@ namespace comphelper
if ( !( _element >>= aProperty ) )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard g( m_aMutex );
// check whether the type is allowed, everything else will be checked
// by m_aDynamicProperties
@@ -254,6 +254,7 @@ namespace comphelper
// our property info is dirty
m_pArrayHelper.reset();
+ g.clear();
setModified(sal_True);
}
@@ -346,7 +347,7 @@ namespace comphelper
//--------------------------------------------------------------------
void SAL_CALL OPropertyBag::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard g( m_aMutex );
// check whether the type is allowed, everything else will be checked
// by m_aDynamicProperties
@@ -362,19 +363,21 @@ namespace comphelper
// our property info is dirty
m_pArrayHelper.reset();
+ g.clear();
setModified(sal_True);
}
//--------------------------------------------------------------------
void SAL_CALL OPropertyBag::removeProperty( const ::rtl::OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard g( m_aMutex );
m_aDynamicProperties.removeProperty( _rName );
// our property info is dirty
m_pArrayHelper.reset();
+ g.clear();
setModified(sal_True);
}
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx
index fe6cbaa9d767..0ccc28d4238b 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -38,15 +38,11 @@
#include <osl/diagnose.h>
#if OSL_DEBUG_LEVEL > 0
- #ifndef _RTL_STRBUF_HXX_
#include <rtl/strbuf.hxx>
- #endif
- #ifndef _CPPUHELPER_EXC_HLP_HXX_
#include <cppuhelper/exc_hlp.hxx>
- #endif
- #ifndef _OSL_THREAD_H_
#include <osl/thread.h>
- #endif
+ #include <com/sun/star/lang/XServiceInfo.hpp>
+ #include <typeinfo>
#endif
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -71,6 +67,10 @@ namespace comphelper
using ::com::sun::star::uno::cpp_queryInterface;
using ::com::sun::star::uno::cpp_acquire;
using ::com::sun::star::uno::cpp_release;
+#if OSL_DEBUG_LEVEL > 0
+ using ::com::sun::star::lang::XServiceInfo;
+#endif
+ using ::com::sun::star::uno::UNO_QUERY;
/** === end UNO using === **/
namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute;
@@ -110,7 +110,18 @@ void copyProperties(const Reference<XPropertySet>& _rxSource,
::rtl::OStringBuffer aBuffer;
aBuffer.append( "::comphelper::copyProperties: could not copy property '" );
aBuffer.append( ::rtl::OString( pSourceProps->Name.getStr(), pSourceProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US ) );
- aBuffer.append( "' to the destination set.\n" );
+ aBuffer.append( "' to the destination set (a '" );
+
+ Reference< XServiceInfo > xSI( _rxDest, UNO_QUERY );
+ if ( xSI.is() )
+ {
+ aBuffer.append( ::rtl::OUStringToOString( xSI->getImplementationName(), osl_getThreadTextEncoding() ) );
+ }
+ else
+ {
+ aBuffer.append( typeid( *_rxDest.get() ).name() );
+ }
+ aBuffer.append( "' implementation).\n" );
Any aException( ::cppu::getCaughtException() );
aBuffer.append( "Caught an exception of type '" );
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java
index 7fcfba0cf0a3..06f7da701f14 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java
@@ -1,4 +1,33 @@
-/*
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: StorageFileAccess.java,v $
+ * $Revision: 1.11 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+ /*
* NativeInputStreamHelper.java
*
* Created on 9. September 2004, 11:51
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java
index 50697e07c6aa..5778c9ab830c 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeInputStream.java
@@ -1,3 +1,32 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: StorageFileAccess.java,v $
+ * $Revision: 1.11 $
+ *
+ * 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.
+ *
+ ************************************************************************/
/*
* StorageNativeInputStream.java
*
diff --git a/connectivity/inc/connectivity/BlobHelper.hxx b/connectivity/inc/connectivity/BlobHelper.hxx
new file mode 100644
index 000000000000..2fb832823bd2
--- /dev/null
+++ b/connectivity/inc/connectivity/BlobHelper.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: FValue.cxx,v $
+ * $Revision: 1.34 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+#ifndef _CONNECTIVITY_BLOBHELPER_HXX_
+#define _CONNECTIVITY_BLOBHELPER_HXX_
+
+#include "connectivity/dbtoolsdllapi.hxx"
+#include <com/sun/star/sdbc/XBlob.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+namespace connectivity
+{
+ class OOO_DLLPUBLIC_DBTOOLS BlobHelper : public ::cppu::WeakImplHelper1< com::sun::star::sdbc::XBlob >
+ {
+ ::com::sun::star::uno::Sequence< sal_Int8 > m_aValue;
+ public:
+ BlobHelper(const ::com::sun::star::uno::Sequence< sal_Int8 >& _val);
+ private:
+ virtual ::sal_Int64 SAL_CALL length( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getBytes( ::sal_Int64 pos, ::sal_Int32 length ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int64 SAL_CALL position( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& pattern, ::sal_Int64 start ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int64 SAL_CALL positionOfBlob( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& pattern, ::sal_Int64 start ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ };
+}
+
+#endif //_CONNECTIVITY_BLOBHELPER_HXX_
+
diff --git a/connectivity/inc/connectivity/dbmetadata.hxx b/connectivity/inc/connectivity/dbmetadata.hxx
index 1ee1718247ae..4cfab247c10f 100644
--- a/connectivity/inc/connectivity/dbmetadata.hxx
+++ b/connectivity/inc/connectivity/dbmetadata.hxx
@@ -121,6 +121,17 @@ namespace dbtools
*/
bool supportsSubqueriesInFrom() const;
+ /** checks whether the database supports primary keys
+
+ Since there's no dedicated API to ask a database for this, a heuristics needs to be applied.
+ First, the <code>PrimaryKeySupport<code> settings of the data source is examined. If it is <TRUE/>
+ or <FALSE/>, then value is returned. If it is <NULL/>, then the database meta data are examined
+ for support of core SQL grammar, and the result is returned. The assumption is that a database/driver
+ which supports core SQL grammar usually also supports primary keys, and vice versa. At least, experience
+ shows this is true most of the time.
+ */
+ bool supportsPrimaryKeys() const;
+
/** determines whether names in the database should be restricted to SQL-92 identifiers
Effectively, this method checks the EnableSQL92Check property of the data source settings,
diff --git a/connectivity/inc/connectivity/dbtools.hxx b/connectivity/inc/connectivity/dbtools.hxx
index 493dc2a3802f..32ef3bcb7da1 100644
--- a/connectivity/inc/connectivity/dbtools.hxx
+++ b/connectivity/inc/connectivity/dbtools.hxx
@@ -37,6 +37,7 @@
#include <comphelper/stl_types.hxx>
#include <unotools/sharedunocomponent.hxx>
#include "connectivity/dbtoolsdllapi.hxx"
+#include "connectivity/FValue.hxx"
namespace com { namespace sun { namespace star {
@@ -593,6 +594,20 @@ namespace dbtools
sal_Int32 sqlType,
sal_Int32 scale=0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ /** call the appropiate set method for the specific sql type @see com::sun::star::sdbc::DataType
+ @param _xParams the parameters where to set the value
+ @param parameterIndex the index of the parameter, 1 based
+ @param x the value to set
+ @param sqlType the corresponding sql type @see com::sun::star::sdbc::DataType
+ @param scale the scale of the sql type can be 0
+ */
+ OOO_DLLPUBLIC_DBTOOLS
+ void setObjectWithInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XParameters>& _xParameters,
+ sal_Int32 parameterIndex,
+ const ::connectivity::ORowSetValue& x,
+ sal_Int32 sqlType,
+ sal_Int32 scale=0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
/** implements <method scope="com.sun.star.sdb">XParameters::setObject</method>
<p>The object which is to be set is analyzed, and in case it is a simlpe scalar type for which there
diff --git a/connectivity/inc/connectivity/sqliterator.hxx b/connectivity/inc/connectivity/sqliterator.hxx
index ddbf3e24af3c..e8e4c8e6a6f2 100644
--- a/connectivity/inc/connectivity/sqliterator.hxx
+++ b/connectivity/inc/connectivity/sqliterator.hxx
@@ -279,6 +279,9 @@ namespace connectivity
// return true when the tableNode is a rule like catalog_name, schema_name or table_name
sal_Bool isTableNode(const OSQLParseNode* _pTableNode) const;
+
+ // tries to find the correct type of the function
+ sal_Int32 getFunctionReturnType(const OSQLParseNode* _pNode );
private:
/** traverses the list of table names, and filles _rTables
*/
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index 0adcae01d966..cc1b27cf4f57 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -225,6 +225,10 @@ namespace connectivity
as,
op_column_commalist,
table_primary_as_range_column,
+ datetime_primary,
+ concatenation,
+ char_factor,
+ bit_value_fct,
rule_count, // letzter_wert
UNKNOWN_RULE // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID)
};
diff --git a/connectivity/qa/connectivity/GeneralTest.java b/connectivity/qa/connectivity/GeneralTest.java
index 18b6cf267a43..da894ba2cbdb 100644
--- a/connectivity/qa/connectivity/GeneralTest.java
+++ b/connectivity/qa/connectivity/GeneralTest.java
@@ -30,21 +30,13 @@
package complex.connectivity;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.util.XCloseable;
import com.sun.star.sdbc.*;
-import com.sun.star.sdb.*;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.XMultiServiceFactory;
import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
-import util.utils;
-import java.util.*;
-import java.io.*;
//import complex.connectivity.DBaseStringFunctions;
public class GeneralTest extends ComplexTestCase {
@@ -63,7 +55,7 @@ public class GeneralTest extends ComplexTestCase {
public void test() throws com.sun.star.uno.Exception,com.sun.star.beans.UnknownPropertyException {
try
{
- XDriverManager driverManager = (XDriverManager)UnoRuntime.queryInterface(XDriverManager.class,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.sdbc.DriverManager"));
+ XDriverManager driverManager = UnoRuntime.queryInterface( XDriverManager.class, ((XMultiServiceFactory)param.getMSF()).createInstance( "com.sun.star.sdbc.DriverManager" ) );
String databaseURL = "sdbc:calc:singin' in the rain" ;
XConnection catalogConnection = driverManager.getConnection(databaseURL);
failed();
diff --git a/connectivity/qa/connectivity/tools/AbstractDatabase.java b/connectivity/qa/connectivity/tools/AbstractDatabase.java
index d3150cd8aa07..4807860740ad 100755
--- a/connectivity/qa/connectivity/tools/AbstractDatabase.java
+++ b/connectivity/qa/connectivity/tools/AbstractDatabase.java
@@ -38,10 +38,10 @@ import com.sun.star.sdb.XDocumentDataSource;
import com.sun.star.sdb.XOfficeDatabaseDocument;
import com.sun.star.sdbc.SQLException;
import com.sun.star.sdbc.XCloseable;
-import com.sun.star.sdbc.XConnection;
import com.sun.star.sdbc.XStatement;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.CloseVetoException;
+import connectivity.tools.sdb.Connection;
import java.io.File;
/**
@@ -60,7 +60,7 @@ public abstract class AbstractDatabase implements DatabaseAccess
// the data source belonging to the database document
protected DataSource m_dataSource;
// the default connection
- protected XConnection m_connection;
+ protected Connection m_connection;
public AbstractDatabase(final XMultiServiceFactory orb) throws Exception
{
@@ -80,12 +80,10 @@ public abstract class AbstractDatabase implements DatabaseAccess
* the ownership of the connection, so you don't need to (and should not) dispose/close it.
*
*/
- public XConnection defaultConnection() throws SQLException
+ public Connection defaultConnection() throws SQLException
{
- if (m_connection == null)
- {
- m_connection = m_databaseDocument.getDataSource().getConnection("", "");
- }
+ if ( m_connection == null )
+ m_connection = new Connection( m_databaseDocument.getDataSource().getConnection("", "") );
return m_connection;
}
@@ -104,8 +102,7 @@ public abstract class AbstractDatabase implements DatabaseAccess
{
if (m_databaseDocument != null)
{
- final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class,
- m_databaseDocument);
+ final XStorable storeDoc = UnoRuntime.queryInterface(XStorable.class, m_databaseDocument);
storeDoc.store();
}
}
@@ -118,8 +115,8 @@ public abstract class AbstractDatabase implements DatabaseAccess
public void close()
{
// close connection
- final XCloseable closeConn = (XCloseable) UnoRuntime.queryInterface(XCloseable.class,
- m_connection);
+ final XCloseable closeConn = UnoRuntime.queryInterface( XCloseable.class,
+ m_connection != null ? m_connection.getXConnection() : null );
if (closeConn != null)
{
try
@@ -133,8 +130,7 @@ public abstract class AbstractDatabase implements DatabaseAccess
m_connection = null;
// close document
- final com.sun.star.util.XCloseable closeDoc = (com.sun.star.util.XCloseable) UnoRuntime.queryInterface(
- com.sun.star.util.XCloseable.class, m_databaseDocument);
+ final com.sun.star.util.XCloseable closeDoc = UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class, m_databaseDocument );
if (closeDoc != null)
{
try
@@ -178,7 +174,7 @@ public abstract class AbstractDatabase implements DatabaseAccess
*/
public XModel getModel()
{
- return (XModel) UnoRuntime.queryInterface(XModel.class, m_databaseDocument);
+ return UnoRuntime.queryInterface( XModel.class, m_databaseDocument );
}
public XMultiServiceFactory getORB()
@@ -191,10 +187,9 @@ public abstract class AbstractDatabase implements DatabaseAccess
{
m_databaseDocumentFile = _docURL;
- final XNameAccess dbContext = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,
- m_orb.createInstance("com.sun.star.sdb.DatabaseContext"));
- final XDocumentDataSource dataSource = (XDocumentDataSource) UnoRuntime.queryInterface(XDocumentDataSource.class,
- dbContext.getByName(_docURL));
+ final XNameAccess dbContext = UnoRuntime.queryInterface( XNameAccess.class,
+ m_orb.createInstance( "com.sun.star.sdb.DatabaseContext" ) );
+ final XDocumentDataSource dataSource = UnoRuntime.queryInterface( XDocumentDataSource.class, dbContext.getByName( _docURL ) );
m_databaseDocument = dataSource.getDatabaseDocument();
m_dataSource = new DataSource(m_orb, m_databaseDocument.getDataSource());
diff --git a/dbaccess/qa/complex/dbaccess/CRMDatabase.java b/connectivity/qa/connectivity/tools/CRMDatabase.java
index 77e2dcf6b2e2..7a6cb7e8c034 100644
--- a/dbaccess/qa/complex/dbaccess/CRMDatabase.java
+++ b/connectivity/qa/connectivity/tools/CRMDatabase.java
@@ -27,23 +27,27 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.dbaccess;
+package connectivity.tools;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.PropertyState;
import com.sun.star.container.ElementExistException;
+import com.sun.star.container.NoSuchElementException;
+import com.sun.star.frame.XComponentLoader;
+import com.sun.star.frame.XController;
+import com.sun.star.frame.XModel;
import com.sun.star.io.IOException;
+import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XSingleSelectQueryComposer;
+import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbc.XConnection;
import com.sun.star.sdbcx.XTablesSupplier;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.XRefreshable;
-import connectivity.tools.DataSource;
-import connectivity.tools.HsqlColumnDescriptor;
-import connectivity.tools.HsqlDatabase;
-import connectivity.tools.HsqlTableDescriptor;
-import connectivity.tools.QueryDefinition;
+import connectivity.tools.sdb.Connection;
/** implements a small Customer Relationship Management database
*
@@ -56,21 +60,52 @@ public class CRMDatabase
private final XMultiServiceFactory m_orb;
private final HsqlDatabase m_database;
private final DataSource m_dataSource;
- private final XConnection m_connection;
+ private final Connection m_connection;
/** constructs the CRM database
*/
- public CRMDatabase( XMultiServiceFactory _orb ) throws Exception
+ public CRMDatabase( XMultiServiceFactory _orb, boolean _withUI ) throws Exception
{
m_orb = _orb;
m_database = new HsqlDatabase( m_orb );
m_dataSource = m_database.getDataSource();
- m_connection = m_database.defaultConnection();
+
+ if ( _withUI )
+ {
+ final XComponentLoader loader = UnoRuntime.queryInterface( XComponentLoader.class,
+ m_orb.createInstance( "com.sun.star.frame.Desktop" ) );
+ PropertyValue[] loadArgs = new PropertyValue[] {
+ new PropertyValue( "PickListEntry", 0, false, PropertyState.DIRECT_VALUE )
+ };
+ loader.loadComponentFromURL( m_database.getDocumentURL(), "_blank", 0, loadArgs );
+ getDocumentUI().connect();
+ m_connection = new Connection( getDocumentUI().getActiveConnection() );
+ }
+ else
+ {
+ m_connection = m_database.defaultConnection();
+ }
+
createTables();
createQueries();
}
+ /**
+ * creates a CRMDatabase from an existing document, given by URL
+ * @param _orb
+ * @param _existingDocumentURL
+ * @throws Exceptio
+ */
+ public CRMDatabase( XMultiServiceFactory _orb, final String _existingDocumentURL ) throws Exception
+ {
+ m_orb = _orb;
+
+ m_database = new HsqlDatabase( m_orb, _existingDocumentURL );
+ m_dataSource = m_database.getDataSource();
+ m_connection = m_database.defaultConnection();
+ }
+
// --------------------------------------------------------------------------------------------------------
/** returns the database document underlying the CRM database
*/
@@ -82,16 +117,41 @@ public class CRMDatabase
// --------------------------------------------------------------------------------------------------------
/** returns the default connection to the database
*/
- public final XConnection getConnection()
+ public final Connection getConnection()
{
return m_connection;
}
// --------------------------------------------------------------------------------------------------------
- public void close() throws SQLException, IOException
+ public void saveAndClose() throws SQLException, IOException
{
+ XDatabaseDocumentUI ui = getDocumentUI();
+ if ( ui != null )
+ ui.closeSubComponents();
m_database.store();
- m_database.close();
+ m_database.closeAndDelete();
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+ public XDatabaseDocumentUI getDocumentUI()
+ {
+ XModel docModel = UnoRuntime.queryInterface( XModel.class, m_database.getDatabaseDocument() );
+ return UnoRuntime.queryInterface( XDatabaseDocumentUI.class, docModel.getCurrentController() );
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+ public XController loadSubComponent( final int _objectType, final String _name ) throws IllegalArgumentException, SQLException, NoSuchElementException
+ {
+ XDatabaseDocumentUI docUI = getDocumentUI();
+ if ( !docUI.isConnected() )
+ docUI.connect();
+
+ XComponent subComponent = docUI.loadComponent( _objectType, _name, false );
+ XController controller = UnoRuntime.queryInterface( XController.class, subComponent );
+ if ( controller != null )
+ return controller;
+ XModel document = UnoRuntime.queryInterface( XModel.class, subComponent );
+ return document.getCurrentController();
}
// --------------------------------------------------------------------------------------------------------
@@ -161,11 +221,7 @@ public class CRMDatabase
// since we created the tables by directly executing the SQL statements, we need to refresh
// the tables container
- final XTablesSupplier suppTables = (XTablesSupplier)UnoRuntime.queryInterface(
- XTablesSupplier.class, m_connection );
- final XRefreshable refreshTables = (XRefreshable)UnoRuntime.queryInterface(
- XRefreshable.class, suppTables.getTables() );
- refreshTables.refresh();
+ m_connection.refreshTables();
}
// --------------------------------------------------------------------------------------------------------
@@ -176,9 +232,9 @@ public class CRMDatabase
QueryDefinition unparseableQuery;
try
{
- final XMultiServiceFactory factory = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, m_database.defaultConnection() );
- composer = (XSingleSelectQueryComposer)UnoRuntime.queryInterface(
+ final XMultiServiceFactory factory = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, m_database.defaultConnection().getXConnection() );
+ composer = UnoRuntime.queryInterface(
XSingleSelectQueryComposer.class, factory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer" ) );
unparseableQuery = m_dataSource.getQueryDefinition( "unparseable" );
}
diff --git a/connectivity/qa/connectivity/tools/DataSource.java b/connectivity/qa/connectivity/tools/DataSource.java
index 1ed8f7f98af7..23d0d142128a 100644
--- a/connectivity/qa/connectivity/tools/DataSource.java
+++ b/connectivity/qa/connectivity/tools/DataSource.java
@@ -39,10 +39,8 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.beans.XPropertySet;
import com.sun.star.sdb.XQueryDefinitionsSupplier;
import com.sun.star.sdbc.XDataSource;
-import com.sun.star.sdbcx.XTablesSupplier;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.util.XRefreshable;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -57,11 +55,10 @@ public class DataSource
{
m_orb = _orb;
- final XNameAccess dbContext = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class,
- _orb.createInstance("com.sun.star.sdb.DatabaseContext"));
+ final XNameAccess dbContext = UnoRuntime.queryInterface(
+ XNameAccess.class, _orb.createInstance( "com.sun.star.sdb.DatabaseContext" ) );
- m_dataSource = (XDataSource) UnoRuntime.queryInterface(XDataSource.class,
- dbContext.getByName(_registeredName));
+ m_dataSource = UnoRuntime.queryInterface( XDataSource.class, dbContext.getByName( _registeredName ) );
}
public DataSource(final XMultiServiceFactory _orb,final XDataSource _dataSource)
@@ -86,13 +83,11 @@ public class DataSource
*/
public void createQuery(final String _name, final String _sqlCommand, final boolean _escapeProcessing) throws ElementExistException, WrappedTargetException, com.sun.star.lang.IllegalArgumentException
{
- final XSingleServiceFactory queryDefsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
- XSingleServiceFactory.class, getQueryDefinitions());
+ final XSingleServiceFactory queryDefsFac = UnoRuntime.queryInterface( XSingleServiceFactory.class, getQueryDefinitions() );
XPropertySet queryDef = null;
try
{
- queryDef = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, queryDefsFac.createInstance());
+ queryDef = UnoRuntime.queryInterface( XPropertySet.class, queryDefsFac.createInstance() );
queryDef.setPropertyValue("Command", _sqlCommand);
queryDef.setPropertyValue("EscapeProcessing", Boolean.valueOf(_escapeProcessing));
}
@@ -101,8 +96,7 @@ public class DataSource
e.printStackTrace(System.err);
}
- final XNameContainer queryDefsContainer = (XNameContainer) UnoRuntime.queryInterface(
- XNameContainer.class, getQueryDefinitions());
+ final XNameContainer queryDefsContainer = UnoRuntime.queryInterface( XNameContainer.class, getQueryDefinitions() );
queryDefsContainer.insertByName(_name, queryDef);
}
@@ -113,8 +107,7 @@ public class DataSource
final XNameAccess allDefs = getQueryDefinitions();
try
{
- return new QueryDefinition(
- (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, allDefs.getByName(_name)));
+ return new QueryDefinition( UnoRuntime.queryInterface( XPropertySet.class, allDefs.getByName( _name) ) );
}
catch (WrappedTargetException e)
{
@@ -126,25 +119,11 @@ public class DataSource
*/
public XNameAccess getQueryDefinitions()
{
- final XQueryDefinitionsSupplier suppQueries = (XQueryDefinitionsSupplier) UnoRuntime.queryInterface(
+ final XQueryDefinitionsSupplier suppQueries = UnoRuntime.queryInterface(
XQueryDefinitionsSupplier.class, m_dataSource);
return suppQueries.getQueryDefinitions();
}
- /** refreshs the table container of a given connection
- *
- * This is usually necessary if you created tables by directly executing SQL statements,
- * bypassing the SDBCX layer.
- */
- public void refreshTables(final com.sun.star.sdbc.XConnection _connection)
- {
- final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(
- XTablesSupplier.class, _connection);
- final XRefreshable refreshTables = (XRefreshable) UnoRuntime.queryInterface(
- XRefreshable.class, suppTables.getTables());
- refreshTables.refresh();
- }
-
/** returns the name of the data source
*
* If a data source is registered at the database context, the name is the registration
@@ -157,8 +136,7 @@ public class DataSource
String name = null;
try
{
- final XPropertySet dataSourceProps = (XPropertySet) UnoRuntime.queryInterface(
- XPropertySet.class, m_dataSource);
+ final XPropertySet dataSourceProps = UnoRuntime.queryInterface( XPropertySet.class, m_dataSource );
name = (String) dataSourceProps.getPropertyValue("Name");
}
catch (Exception ex)
diff --git a/connectivity/qa/connectivity/tools/DatabaseAccess.java b/connectivity/qa/connectivity/tools/DatabaseAccess.java
index bc39bb099087..78608063e64c 100755
--- a/connectivity/qa/connectivity/tools/DatabaseAccess.java
+++ b/connectivity/qa/connectivity/tools/DatabaseAccess.java
@@ -34,7 +34,7 @@ import com.sun.star.io.IOException;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XOfficeDatabaseDocument;
import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbc.XConnection;
+import connectivity.tools.sdb.Connection;
/**
*
@@ -42,7 +42,7 @@ import com.sun.star.sdbc.XConnection;
*/
public interface DatabaseAccess
{
- XConnection defaultConnection() throws SQLException;
+ Connection defaultConnection() throws SQLException;
void executeSQL(final String statementString) throws SQLException;
diff --git a/connectivity/qa/connectivity/tools/HsqlDatabase.java b/connectivity/qa/connectivity/tools/HsqlDatabase.java
index 593a5ad95981..896eed1525e9 100644
--- a/connectivity/qa/connectivity/tools/HsqlDatabase.java
+++ b/connectivity/qa/connectivity/tools/HsqlDatabase.java
@@ -30,6 +30,7 @@
package connectivity.tools;
import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.PropertyState;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.ElementExistException;
import com.sun.star.frame.XStorable;
@@ -83,9 +84,9 @@ public class HsqlDatabase extends AbstractDatabase
dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb");
final XStorable storable = (XStorable) UnoRuntime.queryInterface(XStorable.class, m_databaseDocument);
- storable.storeAsURL(m_databaseDocumentFile, new PropertyValue[]
- {
- });
+ storable.storeAsURL( m_databaseDocumentFile, new PropertyValue[]
+ { new PropertyValue( "PickListEntry", 0, false, PropertyState.DIRECT_VALUE )
+ } );
}
/** drops the table with a given name
@@ -208,10 +209,8 @@ public class HsqlDatabase extends AbstractDatabase
public void createTableInSDBCX(final HsqlTableDescriptor _tableDesc) throws SQLException, ElementExistException
{
final XPropertySet sdbcxDescriptor = _tableDesc.createSdbcxDescriptor(defaultConnection());
- final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(
- XTablesSupplier.class, defaultConnection());
- final XAppend appendTable = (XAppend) UnoRuntime.queryInterface(
- XAppend.class, suppTables.getTables());
+ final XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, defaultConnection().getXConnection() );
+ final XAppend appendTable = UnoRuntime.queryInterface( XAppend.class, suppTables.getTables() );
appendTable.appendByDescriptor(sdbcxDescriptor);
}
}
diff --git a/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java b/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java
index ec6c472309d5..2c4f9d6e6466 100644
--- a/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java
+++ b/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java
@@ -33,11 +33,11 @@ package connectivity.tools;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.sdbc.ColumnValue;
-import com.sun.star.sdbc.XConnection;
import com.sun.star.sdbcx.XColumnsSupplier;
import com.sun.star.sdbcx.XDataDescriptorFactory;
import com.sun.star.sdbcx.XTablesSupplier;
import com.sun.star.uno.UnoRuntime;
+import connectivity.tools.sdb.Connection;
/** is a very simply descriptor of a HSQL table, to be used with a HsqlDatabase.createTable method
*/
@@ -67,12 +67,10 @@ public class HsqlTableDescriptor
return m_columns;
}
- public XPropertySet createSdbcxDescriptor( XConnection _forConnection )
+ public XPropertySet createSdbcxDescriptor( Connection _forConnection )
{
- XTablesSupplier suppTables = (XTablesSupplier)UnoRuntime.queryInterface(
- XTablesSupplier.class, _forConnection );
- XDataDescriptorFactory tableDescFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(
- XDataDescriptorFactory.class, suppTables.getTables() );
+ XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, _forConnection.getXConnection() );
+ XDataDescriptorFactory tableDescFac = UnoRuntime.queryInterface( XDataDescriptorFactory.class, suppTables.getTables() );
XPropertySet tableDesc = tableDescFac.createDataDescriptor();
try
@@ -81,12 +79,10 @@ public class HsqlTableDescriptor
}
catch ( Exception e ) { e.printStackTrace( System.err ); }
- XColumnsSupplier suppDescCols = (XColumnsSupplier)UnoRuntime.queryInterface(
- XColumnsSupplier.class, tableDesc );
+ XColumnsSupplier suppDescCols = UnoRuntime.queryInterface( XColumnsSupplier.class, tableDesc );
XNameAccess descColumns = suppDescCols.getColumns();
- XDataDescriptorFactory columnDescFac = (XDataDescriptorFactory)UnoRuntime.queryInterface(
- XDataDescriptorFactory.class, descColumns );
+ XDataDescriptorFactory columnDescFac = UnoRuntime.queryInterface( XDataDescriptorFactory.class, descColumns );
HsqlColumnDescriptor[] myColumns = getColumns();
for ( int i = 0; i < myColumns.length; ++i )
diff --git a/connectivity/qa/connectivity/tools/makefile.mk b/connectivity/qa/connectivity/tools/makefile.mk
index 589a85ea385f..32aa94c77312 100644
--- a/connectivity/qa/connectivity/tools/makefile.mk
+++ b/connectivity/qa/connectivity/tools/makefile.mk
@@ -29,10 +29,10 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
+PRJ = ../../..
TARGET = ConnectivityTools
PRJNAME = connectivity
-PACKAGE = connectivity$/tools
+PACKAGE = connectivity/tools
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
@@ -46,14 +46,8 @@ all:
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunnerLight.jar
-# Do not use $/ with the $(FIND) command as for W32-4nt this leads to a backslash
-# in a posix command. In this special case use / instead of $/
-.IF "$(GUI)"=="OS2"
-JAVAFILES := $(shell @ls ./*.java)
-.ELSE
-JAVAFILES := $(shell @$(FIND) ./*.java)
-.ENDIF
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+JAVAFILES := $(shell @$(FIND) . -name "*.java")
+JAVACLASSFILES := $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:d)$(i:b).class)
#----- make a jar from compiled files ------------------------------
diff --git a/connectivity/qa/connectivity/tools/sdb/Connection.java b/connectivity/qa/connectivity/tools/sdb/Connection.java
new file mode 100644
index 000000000000..aac120fb1e73
--- /dev/null
+++ b/connectivity/qa/connectivity/tools/sdb/Connection.java
@@ -0,0 +1,93 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package connectivity.tools.sdb;
+
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.sdb.XSingleSelectQueryComposer;
+import com.sun.star.sdbc.SQLException;
+import com.sun.star.sdbc.XConnection;
+import com.sun.star.sdbc.XDatabaseMetaData;
+import com.sun.star.sdbc.XPreparedStatement;
+import com.sun.star.sdbc.XResultSet;
+import com.sun.star.sdbc.XStatement;
+import com.sun.star.sdbcx.XTablesSupplier;
+import com.sun.star.uno.Exception;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.XRefreshable;
+
+/**
+ * is a convenience wrapper around a SDB-level connection object
+ */
+public class Connection
+{
+ private final XConnection m_connection;
+
+ public Connection( final XConnection _connection )
+ {
+ m_connection = _connection;
+ }
+
+ public XConnection getXConnection()
+ {
+ return m_connection;
+ }
+
+ public boolean execute( final String _sql ) throws SQLException
+ {
+ XStatement statement = createStatement();
+ return statement.execute( _sql );
+ }
+
+ public XResultSet executeQuery( final String _sql ) throws SQLException
+ {
+ XStatement statement = createStatement();
+ return statement.executeQuery( _sql );
+ }
+
+ public int executeUpdate( final String _sql ) throws SQLException
+ {
+ XStatement statement = createStatement();
+ return statement.executeUpdate( _sql );
+ }
+
+ public void refreshTables()
+ {
+ final XTablesSupplier suppTables = UnoRuntime.queryInterface(XTablesSupplier.class, m_connection);
+ final XRefreshable refresh = UnoRuntime.queryInterface( XRefreshable.class, suppTables.getTables() );
+ refresh.refresh();
+ }
+
+ public XSingleSelectQueryComposer createSingleSelectQueryComposer() throws Exception
+ {
+ final XMultiServiceFactory connectionFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class, m_connection );
+ return UnoRuntime.queryInterface(
+ XSingleSelectQueryComposer.class, connectionFactory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer" ) );
+ }
+
+ public
+ XStatement createStatement() throws SQLException
+ {
+ return m_connection.createStatement();
+ }
+
+ public
+ XPreparedStatement prepareStatement( String _sql ) throws SQLException
+ {
+ return m_connection.prepareStatement( _sql );
+ }
+
+ public
+ XDatabaseMetaData getMetaData() throws SQLException
+ {
+ return m_connection.getMetaData();
+ }
+
+ public
+ void close() throws SQLException
+ {
+ m_connection.close();
+ }
+}
diff --git a/connectivity/source/commontools/BlobHelper.cxx b/connectivity/source/commontools/BlobHelper.cxx
new file mode 100644
index 000000000000..5859db9036ac
--- /dev/null
+++ b/connectivity/source/commontools/BlobHelper.cxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: FValue.cxx,v $
+ * $Revision: 1.34 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#include "connectivity/BlobHelper.hxx"
+#include <comphelper/seqstream.hxx>
+#include "connectivity/dbexception.hxx"
+
+using namespace connectivity;
+using namespace dbtools;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::uno;
+
+BlobHelper::BlobHelper(const ::com::sun::star::uno::Sequence< sal_Int8 >& _val) : m_aValue(_val)
+{
+}
+// -----------------------------------------------------------------------------
+::sal_Int64 SAL_CALL BlobHelper::length( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+{
+ return m_aValue.getLength();
+}
+// -----------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL BlobHelper::getBytes( ::sal_Int64 pos, ::sal_Int32 _length ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+{
+ if ( sal_Int32(pos + _length) > m_aValue.getLength() )
+ throw ::com::sun::star::sdbc::SQLException();
+ return ::com::sun::star::uno::Sequence< ::sal_Int8 >(m_aValue.getConstArray() + sal_Int32(pos),_length);
+}
+// -----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL BlobHelper::getBinaryStream( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+{
+ return new ::comphelper::SequenceInputStream(m_aValue);
+}
+// -----------------------------------------------------------------------------
+::sal_Int64 SAL_CALL BlobHelper::position( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& /*pattern*/, ::sal_Int64 /*start*/ ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+{
+ ::dbtools::throwFeatureNotImplementedException( "XBlob::position", *this );
+ return 0;
+}
+// -----------------------------------------------------------------------------
+::sal_Int64 SAL_CALL BlobHelper::positionOfBlob( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& /*pattern*/, ::sal_Int64 /*start*/ ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+{
+ ::dbtools::throwFeatureNotImplementedException( "XBlob::positionOfBlob", *this );
+ return 0;
+}
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index f7943fc4cf45..f171af5ec530 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -257,6 +257,7 @@ void ORowSetValue::setTypeKind(sal_Int32 _eType)
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
+ case DataType::OTHER:
(*this) = getAny();
break;
default:
@@ -847,6 +848,7 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
+ case DataType::OTHER:
bRet = false;
break;
default:
@@ -913,6 +915,7 @@ Any ORowSetValue::makeAny() const
case DataType::BLOB:
case DataType::CLOB:
case DataType::OBJECT:
+ case DataType::OTHER:
rValue = getAny();
break;
case DataType::BIT:
@@ -1019,6 +1022,19 @@ Any ORowSetValue::makeAny() const
else
aRet = ::rtl::OUString::valueOf((sal_Int64)*this);
break;
+ case DataType::CLOB:
+ {
+ Any aValue( getAny() );
+ Reference< XClob > xClob;
+ if ( aValue >>= xClob )
+ {
+ if ( xClob.is() )
+ {
+ aRet = xClob->getSubString(1,(sal_Int32)xClob->length() );
+ }
+ }
+ }
+ break;
}
}
return aRet;
@@ -1090,6 +1106,9 @@ sal_Bool ORowSetValue::getBool() const
case DataType::INTEGER:
bRet = m_bSigned ? (m_aValue.m_nInt32 != 0) : (*static_cast<sal_Int64*>(m_aValue.m_pValue) != sal_Int64(0));
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return bRet;
@@ -1131,6 +1150,8 @@ sal_Int8 ORowSetValue::getInt8() const
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"getInt8() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1155,6 +1176,9 @@ sal_Int8 ORowSetValue::getInt8() const
else
nRet = static_cast<sal_Int8>(*static_cast<sal_Int64*>(m_aValue.m_pValue));
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return nRet;
@@ -1196,6 +1220,8 @@ sal_Int16 ORowSetValue::getInt16() const
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"getInt16() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1220,6 +1246,9 @@ sal_Int16 ORowSetValue::getInt16() const
else
nRet = static_cast<sal_Int16>(*static_cast<sal_Int64*>(m_aValue.m_pValue));
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return nRet;
@@ -1261,6 +1290,8 @@ sal_Int32 ORowSetValue::getInt32() const
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"getInt32() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1285,6 +1316,9 @@ sal_Int32 ORowSetValue::getInt32() const
else
nRet = static_cast<sal_Int32>(*static_cast<sal_Int64*>(m_aValue.m_pValue));
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return nRet;
@@ -1326,6 +1360,8 @@ sal_Int64 ORowSetValue::getLong() const
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"getInt32() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1350,6 +1386,9 @@ sal_Int64 ORowSetValue::getLong() const
else
nRet = *(sal_Int64*)m_aValue.m_pValue;
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return nRet;
@@ -1395,6 +1434,8 @@ float ORowSetValue::getFloat() const
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"getDouble() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1419,6 +1460,9 @@ float ORowSetValue::getFloat() const
else
nRet = float(*(sal_Int64*)m_aValue.m_pValue);
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return nRet;
@@ -1466,6 +1510,8 @@ double ORowSetValue::getDouble() const
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"getDouble() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1490,6 +1536,9 @@ double ORowSetValue::getDouble() const
else
nRet = double(*(sal_Int64*)m_aValue.m_pValue);
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return nRet;
@@ -1551,6 +1600,8 @@ void ORowSetValue::setFromDouble(const double& _rVal,sal_Int32 _nDatatype)
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
+ case DataType::CLOB:
OSL_ASSERT(!"setFromDouble() for this type is not allowed!");
break;
case DataType::BIT:
@@ -1595,12 +1646,39 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
case DataType::BLOB:
{
Reference<XInputStream> xStream;
- Any aValue = getAny();
+ const Any aValue = makeAny();
if(aValue.hasValue())
{
- aValue >>= xStream;
+ Reference<XBlob> xBlob(aValue,UNO_QUERY);
+ if ( xBlob.is() )
+ xStream = xBlob->getBinaryStream();
+ else
+ {
+ Reference<XClob> xClob(aValue,UNO_QUERY);
+ if ( xClob.is() )
+ xStream = xClob->getCharacterStream();
+ }
if(xStream.is())
- xStream->readBytes(aSeq,xStream->available());
+ {
+ const sal_uInt32 nBytesToRead = 65535;
+ sal_uInt32 nRead;
+
+ do
+ {
+ ::com::sun::star::uno::Sequence< sal_Int8 > aReadSeq;
+
+ nRead = xStream->readSomeBytes( aReadSeq, nBytesToRead );
+
+ if( nRead )
+ {
+ const sal_uInt32 nOldLength = aSeq.getLength();
+ aSeq.realloc( nOldLength + nRead );
+ rtl_copyMemory( aSeq.getArray() + nOldLength, aReadSeq.getConstArray(), aReadSeq.getLength() );
+ }
+ }
+ while( nBytesToRead == nRead );
+ xStream->closeInput();
+ }
}
}
break;
@@ -1658,6 +1736,9 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
aValue.Year = pDateTime->Year;
}
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return aValue;
@@ -1696,6 +1777,10 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
break;
case DataType::TIME:
aValue = *static_cast< ::com::sun::star::util::Time*>(m_aValue.m_pValue);
+ break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return aValue;
@@ -1743,6 +1828,9 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
case DataType::TIMESTAMP:
aValue = *static_cast< ::com::sun::star::util::DateTime*>(m_aValue.m_pValue);
break;
+ default:
+ OSL_ENSURE(0,"Illegal conversion!");
+ break;
}
}
return aValue;
@@ -1833,6 +1921,9 @@ namespace detail
virtual Sequence< sal_Int8 > getBytes() const = 0;
virtual Reference< XInputStream > getBinaryStream() const = 0;
virtual Reference< XInputStream > getCharacterStream() const = 0;
+ virtual Reference< XBlob > getBlob() const = 0;
+ virtual Reference< XClob > getClob() const = 0;
+ virtual Any getObject() const = 0;
virtual sal_Bool wasNull() const = 0;
virtual ~IValueSource() { }
@@ -1862,6 +1953,9 @@ namespace detail
virtual Sequence< sal_Int8 > getBytes() const { return m_xRow->getBytes( m_nPos ); };
virtual Reference< XInputStream > getBinaryStream() const { return m_xRow->getBinaryStream( m_nPos ); };
virtual Reference< XInputStream > getCharacterStream() const { return m_xRow->getCharacterStream( m_nPos ); };
+ virtual Reference< XBlob > getBlob() const { return m_xRow->getBlob( m_nPos ); };
+ virtual Reference< XClob > getClob() const { return m_xRow->getClob( m_nPos ); };
+ virtual Any getObject() const { return m_xRow->getObject( m_nPos, NULL ); };
virtual sal_Bool wasNull() const { return m_xRow->wasNull( ); };
private:
@@ -1892,6 +1986,9 @@ namespace detail
virtual Sequence< sal_Int8 > getBytes() const { return m_xColumn->getBytes(); };
virtual Reference< XInputStream > getBinaryStream() const { return m_xColumn->getBinaryStream(); };
virtual Reference< XInputStream > getCharacterStream() const { return m_xColumn->getCharacterStream(); };
+ virtual Reference< XBlob > getBlob() const { return m_xColumn->getBlob(); };
+ virtual Reference< XClob > getClob() const { return m_xColumn->getClob(); };
+ virtual Any getObject() const { return m_xColumn->getObject( NULL ); };
virtual sal_Bool wasNull() const { return m_xColumn->wasNull( ); };
private:
@@ -1987,13 +2084,17 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, sal_Bool _bNullable, const
(*this) = _rValueSource.getLong();
break;
case DataType::CLOB:
- (*this) = ::com::sun::star::uno::makeAny(_rValueSource.getCharacterStream());
+ (*this) = ::com::sun::star::uno::makeAny(_rValueSource.getClob());
setTypeKind(DataType::CLOB);
break;
case DataType::BLOB:
- (*this) = ::com::sun::star::uno::makeAny(_rValueSource.getBinaryStream());
+ (*this) = ::com::sun::star::uno::makeAny(_rValueSource.getBlob());
setTypeKind(DataType::BLOB);
break;
+ case DataType::OTHER:
+ (*this) = _rValueSource.getObject();
+ setTypeKind(DataType::OTHER);
+ break;
default:
OSL_ENSURE( false, "ORowSetValue::fill: unsupported type!" );
bReadData = false;
@@ -2139,6 +2240,29 @@ void ORowSetValue::fill(const Any& _rValue)
break;
}
+ case TypeClass_INTERFACE:
+ {
+ Reference< XClob > xClob;
+ if ( _rValue >>= xClob )
+ {
+ (*this) = _rValue;
+ setTypeKind(DataType::CLOB);
+ }
+ else
+ {
+ Reference< XBlob > xBlob;
+ if ( _rValue >>= xBlob )
+ {
+ (*this) = _rValue;
+ setTypeKind(DataType::BLOB);
+ }
+ else
+ {
+ (*this) = _rValue;
+ }
+ }
+ }
+ break;
default:
OSL_ENSURE(0,"Unknown type");
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index c5b65a9d113b..d30161da497c 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -257,6 +257,27 @@ namespace dbtools
}
//--------------------------------------------------------------------
+ bool DatabaseMetaData::supportsPrimaryKeys() const
+ {
+ lcl_checkConnected( *m_pImpl );
+
+ bool doesSupportPrimaryKeys = false;
+ try
+ {
+ Any setting;
+ if ( !( lcl_getConnectionSetting( "PrimaryKeySupport", *m_pImpl, setting ) )
+ || !( setting >>= doesSupportPrimaryKeys )
+ )
+ doesSupportPrimaryKeys = m_pImpl->xConnectionMetaData->supportsCoreSQLGrammar();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return doesSupportPrimaryKeys;
+ }
+
+ //--------------------------------------------------------------------
const ::rtl::OUString& DatabaseMetaData::getIdentifierQuoteString() const
{
return lcl_getConnectionStringSetting( *m_pImpl, m_pImpl->sCachedIdentifierQuoteString, &XDatabaseMetaData::getIdentifierQuoteString );
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 02e6e420142f..f00cfe14a9e5 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -213,6 +213,7 @@ sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType,
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
nFormat = _xTypes->getStandardFormat(NumberFormat::TEXT, _rLocale);
break;
case DataType::DATE:
@@ -234,10 +235,10 @@ sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType,
case DataType::STRUCT:
case DataType::ARRAY:
case DataType::BLOB:
- case DataType::CLOB:
case DataType::REF:
default:
- nFormat = NumberFormat::UNDEFINED;
+ nFormat = _xTypes->getStandardFormat(NumberFormat::UNDEFINED, _rLocale);
+ //nFormat = NumberFormat::UNDEFINED;
}
return nFormat;
}
@@ -1850,9 +1851,20 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
sal_Int32 parameterIndex,
const Any& x,
sal_Int32 sqlType,
- sal_Int32 /*scale*/) throw(SQLException, RuntimeException)
+ sal_Int32 scale) throw(SQLException, RuntimeException)
+{
+ ORowSetValue aVal;
+ aVal.fill(x);
+ setObjectWithInfo(_xParams,parameterIndex,aVal,sqlType,scale);
+}
+// -----------------------------------------------------------------------------
+void setObjectWithInfo(const Reference<XParameters>& _xParams,
+ sal_Int32 parameterIndex,
+ const ::connectivity::ORowSetValue& _rValue,
+ sal_Int32 sqlType,
+ sal_Int32 scale) throw(SQLException, RuntimeException)
{
- if(!x.hasValue())
+ if ( _rValue.isNull() )
_xParams->setNull(parameterIndex,sqlType);
else
{
@@ -1860,65 +1872,62 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
{
case DataType::DECIMAL:
case DataType::NUMERIC:
- _xParams->setObjectWithInfo(parameterIndex,x,sqlType,0);
+ _xParams->setObjectWithInfo(parameterIndex,_rValue.makeAny(),sqlType,scale);
break;
case DataType::CHAR:
case DataType::VARCHAR:
- //case DataType::DECIMAL:
- //case DataType::NUMERIC:
case DataType::LONGVARCHAR:
- _xParams->setString(parameterIndex,::comphelper::getString(x));
+ _xParams->setString(parameterIndex,_rValue);
break;
- case DataType::BIGINT:
+ case DataType::CLOB:
{
- sal_Int64 nValue = 0;
- if(x >>= nValue)
+ Any x(_rValue.makeAny());
+ ::rtl::OUString sValue;
+ if ( x >>= sValue )
+ _xParams->setString(parameterIndex,sValue);
+ else
{
- _xParams->setLong(parameterIndex,nValue);
- break;
+ Reference< XClob > xClob;
+ if(x >>= xClob)
+ _xParams->setClob(parameterIndex,xClob);
+ else
+ {
+ Reference< ::com::sun::star::io::XInputStream > xStream;
+ if(x >>= xStream)
+ _xParams->setCharacterStream(parameterIndex,xStream,xStream->available());
+ }
}
}
break;
+ case DataType::BIGINT:
+ if ( _rValue.isSigned() )
+ _xParams->setLong(parameterIndex,_rValue);
+ else
+ _xParams->setString(parameterIndex,_rValue);
+ break;
case DataType::FLOAT:
+ _xParams->setFloat(parameterIndex,_rValue);
+ break;
case DataType::REAL:
- {
- float nValue = 0;
- if(x >>= nValue)
- {
- _xParams->setFloat(parameterIndex,nValue);
- break;
- }
- }
- // run through if we couldn't set a float value
case DataType::DOUBLE:
- _xParams->setDouble(parameterIndex,::comphelper::getDouble(x));
+ _xParams->setDouble(parameterIndex,_rValue);
break;
case DataType::DATE:
- {
- ::com::sun::star::util::Date aValue;
- if(x >>= aValue)
- _xParams->setDate(parameterIndex,aValue);
- }
+ _xParams->setDate(parameterIndex,_rValue);
break;
case DataType::TIME:
- {
- ::com::sun::star::util::Time aValue;
- if(x >>= aValue)
- _xParams->setTime(parameterIndex,aValue);
- }
+ _xParams->setTime(parameterIndex,_rValue);
break;
case DataType::TIMESTAMP:
- {
- ::com::sun::star::util::DateTime aValue;
- if(x >>= aValue)
- _xParams->setTimestamp(parameterIndex,aValue);
- }
+ _xParams->setTimestamp(parameterIndex,_rValue);
break;
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
{
+ Any x(_rValue.makeAny());
Sequence< sal_Int8> aBytes;
if(x >>= aBytes)
_xParams->setBytes(parameterIndex,aBytes);
@@ -1944,16 +1953,25 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams,
break;
case DataType::BIT:
case DataType::BOOLEAN:
- _xParams->setBoolean(parameterIndex,::cppu::any2bool(x));
+ _xParams->setBoolean(parameterIndex,_rValue);
break;
case DataType::TINYINT:
- _xParams->setByte(parameterIndex,(sal_Int8)::comphelper::getINT32(x));
+ if ( _rValue.isSigned() )
+ _xParams->setByte(parameterIndex,_rValue);
+ else
+ _xParams->setShort(parameterIndex,_rValue);
break;
case DataType::SMALLINT:
- _xParams->setShort(parameterIndex,(sal_Int16)::comphelper::getINT32(x));
+ if ( _rValue.isSigned() )
+ _xParams->setShort(parameterIndex,_rValue);
+ else
+ _xParams->setInt(parameterIndex,_rValue);
break;
case DataType::INTEGER:
- _xParams->setInt(parameterIndex,::comphelper::getINT32(x));
+ if ( _rValue.isSigned() )
+ _xParams->setInt(parameterIndex,_rValue);
+ else
+ _xParams->setLong(parameterIndex,_rValue);
break;
default:
{
diff --git a/connectivity/source/commontools/makefile.mk b/connectivity/source/commontools/makefile.mk
index cb5a4ad3f7aa..1cc6cf494919 100644
--- a/connectivity/source/commontools/makefile.mk
+++ b/connectivity/source/commontools/makefile.mk
@@ -89,6 +89,7 @@ EXCEPTIONSFILES=\
$(SLO)$/ParamterSubstitution.obj \
$(SLO)$/DriversConfig.obj \
$(SLO)$/formattedcolumnvalue.obj \
+ $(SLO)$/BlobHelper.obj \
$(SLO)$/warningscontainer.obj
SLOFILES=\
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 45e937235dd1..f5d22e2937aa 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -148,9 +148,10 @@ namespace dbtools
sal_Int32 nType = DataType::OTHER;
_rxField->getPropertyValue( ::rtl::OUString::createFromAscii( "Type" ) ) >>= nType;
- if ( ( DataType::CHAR == nType )
- || ( DataType::VARCHAR == nType )
+ if ( ( DataType::CHAR == nType )
+ || ( DataType::VARCHAR == nType )
|| ( DataType::LONGVARCHAR == nType )
+ || ( DataType::CLOB == nType )
)
{ // yes -> force a quoted text and try again
::rtl::OUString sQuoted( _rStatement );
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index 1c53614bba04..438f3bc473cc 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -334,11 +334,9 @@ Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw
}
// -------------------------------------------------------------------------
-Any SAL_CALL OResultSet::getObject( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
+Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
{
-
- ::dbtools::throwFeatureNotImplementedException( "XRow::getObject", *this );
- return Any();
+ return getValue(columnIndex).makeAny();
}
// -------------------------------------------------------------------------
@@ -786,14 +784,24 @@ void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::s
}
// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateBinaryStream", *this );
+ if(!x.is())
+ ::dbtools::throwFunctionSequenceException(*this);
+
+ Sequence<sal_Int8> aSeq;
+ x->readBytes(aSeq,length);
+ updateBytes(columnIndex,aSeq);
}
// -------------------------------------------------------------------------
-void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException)
+void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this );
+ if(!x.is())
+ ::dbtools::throwFunctionSequenceException(*this);
+
+ Sequence<sal_Int8> aSeq;
+ x->readBytes(aSeq,length);
+ updateBytes(columnIndex,aSeq);
}
// -------------------------------------------------------------------------
void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx
index 09596da61bd6..b1b8235da3d8 100644
--- a/connectivity/source/drivers/ado/Aolevariant.cxx
+++ b/connectivity/source/drivers/ado/Aolevariant.cxx
@@ -39,8 +39,17 @@
#include "diagnose_ex.h"
#include "resource/sharedresources.hxx"
#include "resource/ado_res.hrc"
-
+#include "com/sun/star/bridge/oleautomation/Date.hpp"
+#include "com/sun/star/bridge/oleautomation/Currency.hpp"
+#include "com/sun/star/bridge/oleautomation/SCode.hpp"
+#include "com/sun/star/bridge/oleautomation/Decimal.hpp"
+
+using namespace com::sun::star::beans;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::bridge::oleautomation;
using namespace connectivity::ado;
+using ::rtl::OUString;
+
OLEString::OLEString()
:m_sStr(NULL)
{
@@ -698,6 +707,88 @@ SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const
return V_ARRAY(&varDest);
}
// -----------------------------------------------------------------------------
+::com::sun::star::uno::Any OLEVariant::makeAny() const
+{
+ ::com::sun::star::uno::Any aValue;
+ switch (V_VT(this))
+ {
+ case VT_EMPTY:
+ case VT_NULL:
+ aValue.setValue(NULL, Type());
+ break;
+ case VT_I2:
+ aValue.setValue( & iVal, getCppuType( (sal_Int16*)0));
+ break;
+ case VT_I4:
+ aValue.setValue( & lVal, getCppuType( (sal_Int32*)0));
+ break;
+ case VT_R4:
+ aValue.setValue( & fltVal, getCppuType( (float*)0));
+ break;
+ case VT_R8:
+ aValue.setValue(& dblVal, getCppuType( (double*)0));
+ break;
+ case VT_CY:
+ {
+ Currency cy(cyVal.int64);
+ aValue <<= cy;
+ break;
+ }
+ case VT_DATE:
+ {
+ aValue <<= (::com::sun::star::util::Date)*this;
+ break;
+ }
+ case VT_BSTR:
+ {
+ OUString b(reinterpret_cast<const sal_Unicode*>(bstrVal));
+ aValue.setValue( &b, getCppuType( &b));
+ break;
+ }
+ case VT_BOOL:
+ {
+ sal_Bool b= boolVal == VARIANT_TRUE;
+ aValue.setValue( &b, getCppuType( &b));
+ break;
+ }
+ case VT_I1:
+ aValue.setValue( & cVal, getCppuType((sal_Int8*)0));
+ break;
+ case VT_UI1: // there is no unsigned char in UNO
+ aValue.setValue( & bVal, getCppuType( (sal_Int8*)0));
+ break;
+ case VT_UI2:
+ aValue.setValue( & uiVal, getCppuType( (sal_uInt16*)0));
+ break;
+ case VT_UI4:
+ aValue.setValue( & ulVal, getCppuType( (sal_uInt32*)0));
+ break;
+ case VT_INT:
+ aValue.setValue( & intVal, getCppuType( (sal_Int32*)0));
+ break;
+ case VT_UINT:
+ aValue.setValue( & uintVal, getCppuType( (sal_uInt32*)0));
+ break;
+ case VT_VOID:
+ aValue.setValue( NULL, Type());
+ break;
+ case VT_DECIMAL:
+ {
+ Decimal dec;
+ dec.Scale = decVal.scale;
+ dec.Sign = decVal.sign;
+ dec.LowValue = decVal.Lo32;
+ dec.MiddleValue = decVal.Mid32;
+ dec.HighValue = decVal.Hi32;
+ aValue <<= dec;
+ break;
+ }
+
+ default:
+ break;
+ }
+ return aValue;
+}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu
index 236d38bd7ff7..8a106c70283f 100755
--- a/connectivity/source/drivers/ado/ado.xcu
+++ b/connectivity/source/drivers/ado/ado.xcu
@@ -115,6 +115,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="PrimaryKeySupport" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsTableCreation" oor:op="replace">
diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx
index 188303a1ba50..e3412babfdf6 100644
--- a/connectivity/source/drivers/ado/adoimp.cxx
+++ b/connectivity/source/drivers/ado/adoimp.cxx
@@ -157,8 +157,10 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine)
case DataType::BIT: return adBoolean; break;
case DataType::BINARY: return adBinary; break;
case DataType::VARCHAR: return adVarWChar; break;
+ case DataType::CLOB:
case DataType::LONGVARCHAR: return adLongVarWChar; break;
case DataType::VARBINARY: return adVarBinary; break;
+ case DataType::BLOB:
case DataType::LONGVARBINARY: return adLongVarBinary; break;
case DataType::CHAR: return adWChar; break;
case DataType::TINYINT: return isJetEngine(_nJetEngine) ? adUnsignedTinyInt : adTinyInt;break;
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 07cdf95d7b44..6e583644e3b9 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -497,13 +497,16 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException,
// SELECT statement without columns -> error
m_pConnection->throwGenericSQLException(STR_QUERY_NO_COLUMN,*this);
- if ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_CREATE_TABLE )
- // CREATE TABLE is not supported at all
- m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
-
- if ( ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_ODBC_CALL ) || ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_UNKNOWN ) )
- // ODBC call or unknown statement type -> error
- m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
+ switch(m_aSQLIterator.getStatementType())
+ {
+ case SQL_STATEMENT_CREATE_TABLE:
+ case SQL_STATEMENT_ODBC_CALL:
+ case SQL_STATEMENT_UNKNOWN:
+ m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
+ break;
+ default:
+ break;
+ }
// at this moment we support only one table per select statement
Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(xTabs.begin()->second,UNO_QUERY);
diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx
index cac868d4792f..d778487655d5 100644
--- a/connectivity/source/drivers/jdbc/Boolean.cxx
+++ b/connectivity/source/drivers/jdbc/Boolean.cxx
@@ -40,17 +40,19 @@ jclass java_lang_Boolean::theClass = 0;
java_lang_Boolean::~java_lang_Boolean()
{}
-
-jclass java_lang_Boolean::getMyClass() const
+jclass java_lang_Boolean::st_getMyClass()
{
// die Klasse muss nur einmal geholt werden, daher statisch
if( !theClass )
- {
theClass = findMyClass("java/lang/Boolean");
- }
return theClass;
}
+jclass java_lang_Boolean::getMyClass() const
+{
+ return st_getMyClass();
+}
+
java_lang_Boolean::java_lang_Boolean( sal_Bool _par0 ): java_lang_Object( NULL, (jobject)NULL )
{
SDBThreadAttach t;
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 8cea582940d3..e6209a90f236 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -227,9 +227,8 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
// Parameter konvertieren
- jstring str = convertwchar_tToJavaString(t.pEnv,typeName);
- t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,str);
- t.pEnv->DeleteLocalRef(str);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,typeName));
+ t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,str.get());
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
}
@@ -336,23 +335,22 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/)
// Java-Call absetzen
jobject out = NULL;
// Parameter konvertieren
- jstring str = convertwchar_tToJavaString(t.pEnv,m_sSqlStatement);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,m_sSqlStatement));
static jmethodID mID(NULL);
if ( !mID )
mID = t.pEnv->GetMethodID( m_pConnection->getMyClass(), cMethodName, cSignature );
if( mID ){
- out = t.pEnv->CallObjectMethod( m_pConnection->getJavaObject(), mID, str ,m_nResultSetType,m_nResultSetConcurrency);
+ out = t.pEnv->CallObjectMethod( m_pConnection->getJavaObject(), mID, str.get() ,m_nResultSetType,m_nResultSetConcurrency);
} //mID
else
{
static const char * cSignature2 = "(Ljava/lang/String;)Ljava/sql/CallableStatement;";
static jmethodID mID2 = t.pEnv->GetMethodID( m_pConnection->getMyClass(), cMethodName, cSignature2 );OSL_ENSURE(mID2,"Unknown method id!");
if( mID2 ){
- out = t.pEnv->CallObjectMethod( m_pConnection->getJavaObject(), mID2, str );
+ out = t.pEnv->CallObjectMethod( m_pConnection->getJavaObject(), mID2, str.get() );
} //mID
}
- t.pEnv->DeleteLocalRef(str);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
if ( out )
diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx
index 632504448e06..ef64ca7b05e9 100644
--- a/connectivity/source/drivers/jdbc/Clob.cxx
+++ b/connectivity/source/drivers/jdbc/Clob.cxx
@@ -34,6 +34,8 @@
#include "java/tools.hxx"
#include "java/io/Reader.hxx"
#include <connectivity/dbexception.hxx>
+#include <rtl/logfile.hxx>
+
using namespace connectivity;
//**************************************************************
//************ Class: java.sql.Clob
@@ -61,6 +63,7 @@ jclass java_sql_Clob::getMyClass() const
sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::length" );
jlong out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
@@ -79,6 +82,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
::rtl::OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 subStringLength ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::getSubString" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
{
@@ -98,6 +102,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Clob::getCharacterStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::getCharacterStream" );
SDBThreadAttach t;
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getCharacterStream","()Ljava/io/Reader;", mID);
@@ -108,6 +113,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
sal_Int64 SAL_CALL java_sql_Clob::position( const ::rtl::OUString& searchstr, sal_Int32 start ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::position" );
jlong out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
@@ -130,6 +136,7 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const ::rtl::OUString& searchstr, sa
sal_Int64 SAL_CALL java_sql_Clob::positionOfClob( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob >& /*pattern*/, sal_Int64 /*start*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::positionOfClob" );
::dbtools::throwFeatureNotImplementedException( "XClob::positionOfClob", *this );
// this was put here in CWS warnings01. The previous implementation was defective, as it did ignore
// the pattern parameter. Since the effort for proper implementation is rather high - we would need
diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx
index 522c1f67973e..dd2b0566b33f 100644
--- a/connectivity/source/drivers/jdbc/InputStream.cxx
+++ b/connectivity/source/drivers/jdbc/InputStream.cxx
@@ -84,8 +84,9 @@ void SAL_CALL java_io_InputStream::closeInput( ) throw(::com::sun::star::io::No
// -----------------------------------------------------
sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
- if ( aData.getLength() < nBytesToRead )
- throw ::com::sun::star::io::BufferSizeExceededException();
+ if (nBytesToRead < 0)
+ throw ::com::sun::star::io::BufferSizeExceededException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), *this );
+
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
@@ -102,7 +103,8 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen
if(out > 0)
{
jboolean p = sal_False;
- memcpy(aData.getArray(),t.pEnv->GetByteArrayElements(pByteArray,&p),out);
+ aData.realloc ( out );
+ rtl_copyMemory(aData.getArray(),t.pEnv->GetByteArrayElements(pByteArray,&p),out);
}
t.pEnv->DeleteLocalRef((jbyteArray)pByteArray);
} //t.pEnv
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 96325511807f..9e967a65b85d 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -56,6 +56,7 @@
#include <rtl/ustrbuf.hxx>
#include <jni.h>
#include "resource/common_res.hrc"
+#include <unotools/confignode.hxx>
#include <list>
#include <memory>
@@ -553,10 +554,9 @@ Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareCall( const
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
// Parameter konvertieren
- jstring str = convertwchar_tToJavaString(t.pEnv,sql);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,sql));
- jobject out = t.pEnv->CallObjectMethod( object, mID, str );
- t.pEnv->DeleteLocalRef(str);
+ jobject out = t.pEnv->CallObjectMethod( object, mID, str.get() );
aStr = JavaString2String(t.pEnv, (jstring)out );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
} //t.pEnv
@@ -767,7 +767,20 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
enableAutoRetrievingEnabled( bAutoRetrievingEnabled );
setAutoRetrievingStatement( sGeneratedValueStatement );
}
-
+// -----------------------------------------------------------------------------
+::rtl::OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const ::rtl::OUString& _sDriverClass)
+{
+ static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths"));
+ ::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithServiceFactory(
+ m_pDriver->getContext().getLegacyServiceFactory(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
+ ::rtl::OUString sURL;
+ if ( aNamesRoot.isValid() && aNamesRoot.hasByName( _sDriverClass ) )
+ {
+ ::utl::OConfigurationNode aRegisterObj = aNamesRoot.openNode( _sDriverClass );
+ OSL_VERIFY( aRegisterObj.getNodeValue( "Path" ) >>= sURL );
+ }
+ return sURL;
+}
// -----------------------------------------------------------------------------
sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
const Sequence< PropertyValue >& info)
@@ -790,6 +803,8 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
::comphelper::NamedValueCollection aSettings( info );
sDriverClass = aSettings.getOrDefault( "JavaDriverClass", sDriverClass );
sDriverClassPath = aSettings.getOrDefault( "JavaDriverClassPath", sDriverClassPath);
+ if ( !sDriverClassPath.getLength() )
+ sDriverClassPath = impl_getJavaDriverClassPath_nothrow(sDriverClass);
bAutoRetrievingEnabled = aSettings.getOrDefault( "IsAutoRetrievingEnabled", bAutoRetrievingEnabled );
sGeneratedValueStatement = aSettings.getOrDefault( "AutoRetrievingStatement", sGeneratedValueStatement );
m_bParameterSubstitution = aSettings.getOrDefault( "ParameterNameSubstitution", m_bParameterSubstitution );
@@ -810,8 +825,8 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;";
static const char * cMethodName = "connect";
// Java-Call absetzen
- jmethodID mID = NULL;
- if ( !mID )
+ static jmethodID mID = NULL;
+ if ( !mID )
mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature );
if ( mID )
{
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 6f4e78550dc0..73829b46ec64 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -43,7 +43,7 @@
#include <vos/mutex.hxx>
#include <osl/thread.h>
#include <com/sun/star/uno/Sequence.hxx>
-
+#include "java/LocalRef.hxx"
#include "resource/jdbc_log.hrc"
#include <rtl/logfile.hxx>
#include <comphelper/logging.hxx>
@@ -395,10 +395,9 @@ void java_lang_Object::callVoidMethodWithStringArg( const char* _pMethodName, jm
OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java enviroment anymore!" );
obtainMethodId(t.pEnv, _pMethodName,"(Ljava/lang/String;)V", _inout_MethodID);
- jstring str = convertwchar_tToJavaString(t.pEnv,_nArgument);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument));
// call method
- t.pEnv->CallVoidMethod( object, _inout_MethodID , str);
- t.pEnv->DeleteLocalRef(str);
+ t.pEnv->CallVoidMethod( object, _inout_MethodID , str.get());
ThrowSQLException( t.pEnv, NULL );
}
// -------------------------------------------------------------------------
@@ -417,10 +416,9 @@ sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName
// *this
// );
- jstring str = convertwchar_tToJavaString(t.pEnv,_nArgument);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument));
// call method
- jint out = t.pEnv->CallIntMethod( object, _inout_MethodID , str);
- t.pEnv->DeleteLocalRef(str);
+ jint out = t.pEnv->CallIntMethod( object, _inout_MethodID , str.get());
ThrowSQLException( t.pEnv, NULL );
return (sal_Int32)out;
}
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index dbf7241885da..ae43b40b3a0b 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -45,7 +45,7 @@
#include "resource/jdbc_log.hrc"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
-
+#include "java/LocalRef.hxx"
#include <string.h>
using namespace connectivity;
@@ -138,10 +138,9 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c
// Java-Call absetzen
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- jstring str = convertwchar_tToJavaString(t.pEnv,x);
- t.pEnv->CallVoidMethod( object, mID, parameterIndex,str);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
+ t.pEnv->CallVoidMethod( object, mID, parameterIndex,str.get());
// und aufraeumen
- t.pEnv->DeleteLocalRef(str);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
} //t.pEnv
}
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 677985ac6a90..df90a68799bc 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -30,10 +30,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
+#include "java/lang/String.hxx"
+#include "java/lang/Boolean.hxx"
#include "java/sql/ResultSet.hxx"
#include "java/math/BigDecimal.hxx"
#include "java/sql/JStatement.hxx"
#include "java/sql/SQLWarning.hxx"
+#include "java/sql/Timestamp.hxx"
#include "java/sql/Array.hxx"
#include "java/sql/Ref.hxx"
#include "java/sql/Clob.hxx"
@@ -54,6 +57,7 @@
#include "connectivity/dbexception.hxx"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
+#include "java/LocalRef.hxx"
#include <rtl/logfile.hxx>
#include <string.h>
@@ -324,6 +328,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getObject" );
jobject out(0);
+ Any aRet;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
jvalue args[2];
@@ -341,15 +346,43 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
}
- out = t.pEnv->CallObjectMethodA( object, mID, args);
- t.pEnv->DeleteLocalRef((jstring)args[1].l);
- ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- // und aufraeumen
-
+ out = t.pEnv->CallObjectMethodA( object, mID, args);
+ t.pEnv->DeleteLocalRef((jstring)args[1].l);
+ ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ // und aufraeumen
+ if ( out )
+ {
+ if ( t.pEnv->IsInstanceOf(out,java_lang_String::st_getMyClass()) )
+ {
+ java_lang_String aVal(t.pEnv,out);
+ aRet <<= (::rtl::OUString)aVal;
+ }
+ else if ( t.pEnv->IsInstanceOf(out,java_lang_Boolean::st_getMyClass()) )
+ {
+ java_lang_Boolean aVal(t.pEnv,out);
+ static jmethodID methodID = NULL;
+ aRet <<= aVal.callBooleanMethod("booleanValue",methodID);
+ }
+ else if ( t.pEnv->IsInstanceOf(out,java_sql_Date::st_getMyClass()) )
+ {
+ java_sql_Date aVal(t.pEnv,out);
+ aRet <<= (::com::sun::star::util::Date)aVal;
+ }
+ else if ( t.pEnv->IsInstanceOf(out,java_sql_Time::st_getMyClass()) )
+ {
+ java_sql_Time aVal(t.pEnv,out);
+ aRet <<= (::com::sun::star::util::Time)aVal;
+ }
+ else if ( t.pEnv->IsInstanceOf(out,java_sql_Timestamp::st_getMyClass()) )
+ {
+ java_sql_Timestamp aVal(t.pEnv,out);
+ aRet <<= (::com::sun::star::util::DateTime)aVal;
+ }
+ else
+ t.pEnv->DeleteLocalRef(out);
+ }
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- ::dbtools::throwFunctionNotSupportedException( "XRow::getObject", *this );
- return out==0 ? Any() : Any();//new java_lang_Object( t.pEnv, out );
+ return aRet;
}
// -------------------------------------------------------------------------
@@ -689,9 +722,8 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r
{
// Parameter konvertieren
- jstring str = convertwchar_tToJavaString(t.pEnv,x);
- t.pEnv->CallVoidMethod( object, mID,columnIndex,str);
- t.pEnv->DeleteLocalRef(str);
+ jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
+ t.pEnv->CallVoidMethod( object, mID,columnIndex,str.get());
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
}
@@ -754,16 +786,68 @@ void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const
}
// -------------------------------------------------------------------------
-void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 /*columnIndex*/, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateBinaryStream" );
- ::dbtools::throwFeatureNotImplementedException( "XParameters::updateBinaryStream", *this );
+ try
+ {
+ SDBThreadAttach t;
+ {
+
+ // temporaere Variable initialisieren
+ // Java-Call absetzen
+ static jmethodID mID(NULL);
+ if ( !mID )
+ {
+ static const char * cSignature = "(ILjava/io/InputStream;I)V";
+ static const char * cMethodName = "updateBinaryStream";
+ obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
+ }
+
+ {
+ // Parameter konvertieren
+ jobject obj = createByteInputStream(x,length);
+ t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
+ ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
+ }
+ }
+ catch(Exception)
+ {
+ ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateBinaryStream", *this );
+ }
}
// -------------------------------------------------------------------------
-void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 /*columnIndex*/, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateCharacterStream" );
- ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this );
+ try
+ {
+ SDBThreadAttach t;
+ {
+
+ // temporaere Variable initialisieren
+ // Java-Call absetzen
+ static jmethodID mID(NULL);
+ if ( !mID )
+ {
+ static const char * cSignature = "(ILjava/io/Reader;I)V";
+ static const char * cMethodName = "updateCharacterStream";
+ obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
+ }
+
+ {
+ // Parameter konvertieren
+ jobject obj = createCharArrayReader(x,length);
+ t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
+ ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
+ }
+ }
+ catch(Exception)
+ {
+ ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this );
+ }
}
// -------------------------------------------------------------------------
void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx
index 8c30f7a14efc..065ffe11d3e7 100644
--- a/connectivity/source/drivers/jdbc/Timestamp.cxx
+++ b/connectivity/source/drivers/jdbc/Timestamp.cxx
@@ -71,6 +71,10 @@ java_sql_Date::~java_sql_Date()
jclass java_sql_Date::getMyClass() const
{
+ return st_getMyClass();
+}
+jclass java_sql_Date::st_getMyClass()
+{
// die Klasse muss nur einmal geholt werden, daher statisch
if( !theClass )
theClass = findMyClass("java/sql/Date");
@@ -94,12 +98,15 @@ java_sql_Time::~java_sql_Time()
jclass java_sql_Time::getMyClass() const
{
+ return st_getMyClass();
+}
+jclass java_sql_Time::st_getMyClass()
+{
// die Klasse muss nur einmal geholt werden, daher statisch
if( !theClass )
theClass = findMyClass("java/sql/Time");
return theClass;
}
-
java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( NULL, (jobject)NULL )
{
SDBThreadAttach t;
@@ -140,12 +147,15 @@ java_sql_Timestamp::~java_sql_Timestamp()
jclass java_sql_Timestamp::getMyClass() const
{
+ return st_getMyClass();
+}
+jclass java_sql_Timestamp::st_getMyClass()
+{
// die Klasse muss nur einmal geholt werden, daher statisch
if( !theClass )
theClass = findMyClass("java/sql/Timestamp");
return theClass;
}
-
java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _rOut)
:java_util_Date( NULL, (jobject)NULL )
{
diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu
index ae1bbad227e7..f5ac8f20db5c 100755
--- a/connectivity/source/drivers/jdbc/jdbc.xcu
+++ b/connectivity/source/drivers/jdbc/jdbc.xcu
@@ -145,6 +145,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="PrimaryKeySupport" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsTableCreation" oor:op="replace">
diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk
index 831a6755af91..fb37a3077743 100644
--- a/connectivity/source/drivers/jdbc/makefile.mk
+++ b/connectivity/source/drivers/jdbc/makefile.mk
@@ -95,6 +95,7 @@ SHL1STDLIBS=\
$(SALLIB) \
$(JVMACCESSLIB) \
$(DBTOOLSLIB) \
+ $(UNOTOOLSLIB) \
$(JVMFWKLIB) \
$(COMPHELPERLIB)
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index daaed46acdd9..f77c45d66fc8 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -218,5 +218,58 @@ sal_Bool connectivity::isExceptionOccured(JNIEnv *pEnv,sal_Bool _bClear)
return bRet;
}
-
-
+// -----------------------------------------------------------------------------
+jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length)
+{
+ SDBThreadAttach t;
+ if( !t.pEnv || !x.is() )
+ return NULL;
+ // Java-Call fuer den Konstruktor absetzen
+ // temporaere Variable initialisieren
+ jclass clazz = java_lang_Object::findMyClass("java/io/ByteArrayInputStream");
+ static jmethodID mID(NULL);
+ if ( !mID )
+ {
+ static const char * cSignature = "([B)V";
+ mID = t.pEnv->GetMethodID( clazz, "<init>", cSignature );
+ OSL_ENSURE( mID, cSignature );
+ if ( !mID )
+ throw SQLException();
+ } // if ( !_inout_MethodID )
+ jbyteArray pByteArray = t.pEnv->NewByteArray(length);
+ Sequence< sal_Int8 > aData;
+ x->readBytes(aData,length);
+ jboolean p = sal_False;
+ rtl_copyMemory(t.pEnv->GetByteArrayElements(pByteArray,&p),aData.getArray(),aData.getLength());
+ jobject out = t.pEnv->NewObject( clazz, mID,pByteArray);
+ t.pEnv->DeleteLocalRef((jbyteArray)pByteArray);
+ return out;
+}
+// -----------------------------------------------------------------------------
+jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length)
+{
+ SDBThreadAttach t;
+ if( !t.pEnv || !x.is() )
+ return NULL;
+ // Java-Call fuer den Konstruktor absetzen
+ // temporaere Variable initialisieren
+ jclass clazz = java_lang_Object::findMyClass("java/io/CharArrayReader");
+ static jmethodID mID(NULL);
+ if ( !mID )
+ {
+ static const char * cSignature = "([C)V";
+ mID = t.pEnv->GetMethodID( clazz, "<init>", cSignature );
+ OSL_ENSURE( mID, cSignature );
+ if ( !mID )
+ throw SQLException();
+ } // if ( !_inout_MethodID )
+ jcharArray pCharArray = t.pEnv->NewCharArray(length);
+ Sequence< sal_Int8 > aData;
+ x->readBytes(aData,length);
+ jboolean p = sal_False;
+ rtl_copyMemory(t.pEnv->GetCharArrayElements(pCharArray,&p),aData.getArray(),aData.getLength());
+ jobject out = t.pEnv->NewObject( clazz, mID,pCharArray);
+ t.pEnv->DeleteLocalRef((jcharArray)pCharArray);
+ return out;
+}
+// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbc/odbc.xcu b/connectivity/source/drivers/odbc/odbc.xcu
index cf306f10d57f..b3a9d7149650 100755
--- a/connectivity/source/drivers/odbc/odbc.xcu
+++ b/connectivity/source/drivers/odbc/odbc.xcu
@@ -150,6 +150,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="PrimaryKeySupport" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="MetaData">
<node oor:name="SupportsTableCreation" oor:op="replace">
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
index b92206199c24..f923987cc04e 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
@@ -921,6 +921,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_VARCHAR,nValue,*this);
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_LONGVARCHAR,nValue,*this);
break;
case DataType::DATE:
@@ -939,6 +940,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_VARBINARY,nValue,*this);
break;
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_LONGVARBINARY,nValue,*this);
break;
case DataType::SQLNULL:
@@ -959,12 +961,6 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In
case DataType::ARRAY:
// OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
break;
- case DataType::BLOB:
- // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
- break;
- case DataType::CLOB:
- // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
- break;
case DataType::REF:
// OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this);
break;
@@ -1009,6 +1005,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In
bConvert = (nValue & SQL_CVT_VARCHAR) == SQL_CVT_VARCHAR;
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
bConvert = (nValue & SQL_CVT_LONGVARCHAR) == SQL_CVT_LONGVARCHAR;
break;
case DataType::DATE:
@@ -1027,6 +1024,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In
bConvert = (nValue & SQL_CVT_VARBINARY) == SQL_CVT_VARBINARY;
break;
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
bConvert = (nValue & SQL_CVT_LONGVARBINARY) == SQL_CVT_LONGVARBINARY;
break;
}
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 77ecceeaacdf..d084561f9372 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -283,7 +283,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co
aDate.day = 0;
aDate.month = 0;
aDate.year = 0;
- OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,&aDate,sizeof aDate);
+ OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_DATE : SQL_C_TYPE_DATE,m_bWasNull,**this,&aDate,sizeof aDate);
return Date(aDate.day,aDate.month,aDate.year);
}
else
@@ -434,7 +434,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
columnIndex = mapColumn(columnIndex);
::rtl::OUString aVal;
if(columnIndex <= m_nDriverColumnCount)
- aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,(SWORD)SQL_C_WCHAR,m_bWasNull,**this,m_nTextEncoding);
+ aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,impl_getColumnType_nothrow(columnIndex),m_bWasNull,**this,m_nTextEncoding);
else
m_bWasNull = sal_True;
@@ -454,7 +454,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
columnIndex = mapColumn(columnIndex);
TIME_STRUCT aTime={0,0,0};
if(columnIndex <= m_nDriverColumnCount)
- OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
+ OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIME : SQL_C_TYPE_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
else
m_bWasNull = sal_True;
return Time(0,aTime.second,aTime.minute,aTime.hour);
@@ -472,7 +472,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex )
columnIndex = mapColumn(columnIndex);
TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0};
if(columnIndex <= m_nDriverColumnCount)
- OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
+ OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
else
m_bWasNull = sal_True;
return DateTime((sal_uInt16)aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
@@ -1316,5 +1316,11 @@ void ODatabaseMetaDataResultSet::checkColumnCount()
}
// -----------------------------------------------------------------------------
-
+SWORD ODatabaseMetaDataResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex)
+{
+ ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex);
+ if ( aFind == m_aODBCColumnTypes.end() )
+ aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pConnection,m_aStatementHandle,*this,columnIndex))).first;
+ return aFind->second;
+}
diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
index 8d72c3271b82..03d9912e4e22 100644
--- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
@@ -321,16 +321,6 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
setInt (parameterIndex, value);
}
// -------------------------------------------------------------------------
-#define PREP_BIND_PARAM(_ty,_jt) \
- OTools::bindParameter(m_pConnection, \
- m_aStatementHandle, \
- parameterIndex, \
- bindBuf, \
- getLengthBuf(parameterIndex), \
- (SWORD)_jt, \
- sal_False,m_pConnection->useOldDateFormat(),_pData,(Reference <XInterface>)*this,getOwnConnection()->getTextEncoding())
-
-
void OPreparedStatement::setParameter(sal_Int32 parameterIndex,sal_Int32 _nType,sal_Int32 _nSize,void* _pData)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -353,6 +343,10 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex,sal_Int32 _nType,
case SQL_NUMERIC:
++nRealSize;
break;
+ case SQL_BINARY:
+ case SQL_VARBINARY:
+ nRealSize=1; //dummy buffer, binary data isn't copied
+ break;
default:
break;
}
@@ -480,15 +474,17 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
}
// -------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException)
+void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedException( "XParameters::setClob", *this );
+ if ( x.is() )
+ setStream(parameterIndex, x->getCharacterStream(), (SQLLEN)x->length(), DataType::LONGVARCHAR);
}
// -------------------------------------------------------------------------
-void SAL_CALL OPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException)
+void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
{
- ::dbtools::throwFunctionNotSupportedException( "XParameters::setBlob", *this );
+ if ( x.is() )
+ setStream(parameterIndex, x->getBinaryStream(), (SQLLEN)x->length(), DataType::LONGVARCHAR);
}
// -------------------------------------------------------------------------
@@ -503,7 +499,12 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Re
::dbtools::throwFunctionNotSupportedException( "XParameters::setRef", *this );
}
// -------------------------------------------------------------------------
-
+void OPreparedStatement::setDecimal( sal_Int32 parameterIndex, const ::rtl::OUString& x )
+{
+ ::rtl::OString aString(::rtl::OUStringToOString(x,getOwnConnection()->getTextEncoding()));
+ setParameter(parameterIndex,DataType::DECIMAL,aString.getLength(),(void*)&x);
+}
+// -------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
@@ -528,6 +529,12 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
setNull(parameterIndex,sqlType);
break;
case DataType::DECIMAL:
+ {
+ ORowSetValue aValue;
+ aValue.fill(x);
+ setDecimal(parameterIndex,aValue);
+ }
+ break;
case DataType::NUMERIC:
{
ORowSetValue aValue;
@@ -568,19 +575,20 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,DataType::BINARY,x.getLength(),(void*)&x);
+ boundParams[parameterIndex-1].setSequence(x); // this assures that the sequence stays alive
}
// -------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
- setStream (parameterIndex, x, length, DataType::LONGVARCHAR);
+ setStream(parameterIndex, x, length, DataType::LONGVARCHAR);
}
// -------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
- setStream (parameterIndex, x, length, DataType::LONGVARBINARY);
+ setStream(parameterIndex, x, length, DataType::LONGVARBINARY);
}
// -------------------------------------------------------------------------
@@ -839,10 +847,10 @@ sal_Int32 OPreparedStatement::getPrecision ( sal_Int32 sqlType)
// Sets an input stream as a parameter, using the given SQL type
//--------------------------------------------------------------------
-void OPreparedStatement::setStream (
+void OPreparedStatement::setStream(
sal_Int32 ParameterIndex,
const Reference< XInputStream>& x,
- sal_Int32 length,
+ SQLLEN length,
sal_Int32 SQLtype)
throw(SQLException)
{
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 8c885f0924ad..fb1a08147338 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -223,9 +223,11 @@ SQLRETURN OResultSet::unbind(sal_Bool _bUnbindHandle)
delete static_cast< double* >(reinterpret_cast< void * >(pValue->first));
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
delete [] static_cast< char* >(reinterpret_cast< void * >(pValue->first));
break;
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
delete [] static_cast< char* >(reinterpret_cast< void * >(pValue->first));
break;
case DataType::DATE:
@@ -284,9 +286,11 @@ TVoidPtr OResultSet::allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex)
aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new double(0.0)),_nType);
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new char[2]),_nType); // dient nur zum auffinden
break;
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new char[2]),_nType); // dient nur zum auffinden
break;
case DataType::DATE:
@@ -1499,6 +1503,7 @@ void OResultSet::fillRow(sal_Int32 _nToColumn)
case DataType::DECIMAL:
case DataType::NUMERIC:
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
{
::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(nColumn);
if ( aFind == m_aODBCColumnTypes.end() )
@@ -1514,6 +1519,7 @@ void OResultSet::fillRow(sal_Int32 _nToColumn)
*pColumn = getDouble(nColumn);
break;
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
*pColumn = getBytes(nColumn);
break;
case DataType::DATE:
@@ -1719,6 +1725,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
aSeq = m_aRow[nColumnIndex];
N3SQLPutData (m_aStatementHandle, aSeq.getArray(), aSeq.getLength());
break;
@@ -1730,6 +1737,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
break;
}
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
{
::rtl::OUString sRet;
sRet = m_aRow[nColumnIndex].getString();
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 39c848f34eaf..daa6d28a0acf 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -135,6 +135,7 @@ void OTools::bindData( SQLSMALLINT _nOdbcType,
{
case SQL_CHAR:
case SQL_VARCHAR:
+ case SQL_DECIMAL:
if(_bUseWChar)
{
*pLen = SQL_NTS;
@@ -160,7 +161,7 @@ void OTools::bindData( SQLSMALLINT _nOdbcType,
*pLen = sizeof(sal_Int64);
_nColumnSize = *pLen;
break;
- case SQL_DECIMAL:
+
case SQL_NUMERIC:
if(_bUseWChar)
{
@@ -210,12 +211,9 @@ void OTools::bindData( SQLSMALLINT _nOdbcType,
if(pSeq)
{
- // memcpy(_pData,pSeq->getConstArray(),pSeq->getLength());
- _pData = (sal_Int8*)((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getConstArray();
+ _pData = (sal_Int8*)pSeq->getConstArray();
*pLen = pSeq->getLength();
}
- // _pData = (sal_Int8*)((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getConstArray();
- // *pLen = ((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getLength();
}
break;
case SQL_LONGVARBINARY:
diff --git a/connectivity/source/inc/ado/Aolevariant.hxx b/connectivity/source/inc/ado/Aolevariant.hxx
index f15d78a37ed9..c9fd9807af41 100644
--- a/connectivity/source/inc/ado/Aolevariant.hxx
+++ b/connectivity/source/inc/ado/Aolevariant.hxx
@@ -161,6 +161,7 @@ namespace connectivity
double getDate() const;
CY getCurrency() const;
SAFEARRAY* getUI1SAFEARRAYPtr() const;
+ ::com::sun::star::uno::Any makeAny() const;
static VARIANT_BOOL VariantBool(sal_Bool bEinBoolean);
diff --git a/connectivity/source/inc/java/lang/Boolean.hxx b/connectivity/source/inc/java/lang/Boolean.hxx
index 2f33ea27bc11..7cfd1bbc4aa1 100644
--- a/connectivity/source/inc/java/lang/Boolean.hxx
+++ b/connectivity/source/inc/java/lang/Boolean.hxx
@@ -48,6 +48,7 @@ namespace connectivity
java_lang_Boolean( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ){}
java_lang_Boolean( sal_Bool _par0 );
+ static jclass st_getMyClass();
};
}
diff --git a/connectivity/source/inc/java/sql/Connection.hxx b/connectivity/source/inc/java/sql/Connection.hxx
index 74d76d32f35a..41c18848021f 100644
--- a/connectivity/source/inc/java/sql/Connection.hxx
+++ b/connectivity/source/inc/java/sql/Connection.hxx
@@ -80,6 +80,11 @@ namespace connectivity
const ::rtl::OUString& _sDriverClassPath,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rSystemProperties
);
+ /** load driver class path from system configuration.
+ @param _sDriverClass
+ The driver class name to look for in the configuration.
+ */
+ ::rtl::OUString impl_getJavaDriverClassPath_nothrow(const ::rtl::OUString& _sDriverClass);
protected:
// statische Daten fuer die Klasse
diff --git a/connectivity/source/inc/java/sql/Timestamp.hxx b/connectivity/source/inc/java/sql/Timestamp.hxx
index ce6de39b5bb9..2d234e1b52a1 100644
--- a/connectivity/source/inc/java/sql/Timestamp.hxx
+++ b/connectivity/source/inc/java/sql/Timestamp.hxx
@@ -54,6 +54,7 @@ namespace connectivity
java_sql_Date( const ::com::sun::star::util::Date& _rOut );
operator ::com::sun::star::util::Date();
+ static jclass st_getMyClass();
};
@@ -73,6 +74,7 @@ namespace connectivity
java_sql_Time( JNIEnv * pEnv, jobject myObj ) : java_util_Date( pEnv, myObj ){}
java_sql_Time( const ::com::sun::star::util::Time& _rOut );
operator ::com::sun::star::util::Time();
+ static jclass st_getMyClass();
};
//**************************************************************
@@ -93,6 +95,7 @@ namespace connectivity
sal_Int32 getNanos();
void setNanos(sal_Int32 n);
+ static jclass st_getMyClass();
};
}
#endif // _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_
diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx
index af061d5599b7..a74865817ddb 100644
--- a/connectivity/source/inc/java/tools.hxx
+++ b/connectivity/source/inc/java/tools.hxx
@@ -41,6 +41,7 @@
#include <comphelper/uno3.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/DateTime.hpp>
@@ -85,6 +86,9 @@ namespace connectivity
<TRUE/> if an exception is occured
*/
sal_Bool isExceptionOccured(JNIEnv *pEnv,sal_Bool _bClear);
+
+ jobject createByteInputStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length);
+ jobject createCharArrayReader(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length);
}
#endif // _CONNECTIVITY_JAVA_TOOLS_HXX_
diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx b/connectivity/source/inc/odbc/OBoundParam.hxx
index c71977a94910..bc896c2361d8 100644
--- a/connectivity/source/inc/odbc/OBoundParam.hxx
+++ b/connectivity/source/inc/odbc/OBoundParam.hxx
@@ -119,6 +119,11 @@ namespace connectivity
paramInputStreamLen = len;
}
+ void setSequence(const ::com::sun::star::uno::Sequence< sal_Int8 >& _aSequence)
+ {
+ aSequence = _aSequence;
+ }
+
//--------------------------------------------------------------------
// getInputStream
// Gets the input stream for the bound parameter
@@ -191,6 +196,7 @@ namespace connectivity
// data is in native format.
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> paramInputStream;
+ ::com::sun::star::uno::Sequence< sal_Int8 > aSequence;
// When an input stream is
// bound to a parameter, the
// input stream is saved
diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
index 6248417828ba..46b5a020d1d0 100644
--- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
+++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
@@ -100,6 +100,7 @@ namespace connectivity
sal_Int32 getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
sal_Int32 getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
::rtl::OUString getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ SWORD impl_getColumnType_nothrow(sal_Int32 column);
sal_Int32 mapColumn (sal_Int32 column);
diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx b/connectivity/source/inc/odbc/OPreparedStatement.hxx
index 9e6f6ca8a61f..d167c9edb9a0 100644
--- a/connectivity/source/inc/odbc/OPreparedStatement.hxx
+++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx
@@ -89,7 +89,7 @@ namespace connectivity
void FreeParams();
void putParamData (sal_Int32 index) throw(::com::sun::star::sdbc::SQLException);
void setStream (sal_Int32 ParameterIndex,const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x,
- sal_Int32 length,sal_Int32 SQLtype) throw(::com::sun::star::sdbc::SQLException);
+ SQLLEN length,sal_Int32 SQLtype) throw(::com::sun::star::sdbc::SQLException);
sal_Int32 getParamLength ( sal_Int32 index);
sal_Int8* getLengthBuf (sal_Int32 index);
sal_Int8* getDataBuf (sal_Int32 index);
@@ -102,6 +102,7 @@ namespace connectivity
sal_Bool isPrepared() const { return m_bPrepared;}
void prepareStatement();
void checkParameterIndex(sal_Int32 _parameterIndex);
+ void setDecimal( sal_Int32 parameterIndex, const ::rtl::OUString& x );
/**
creates the driver specific resultset (factory)
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 97875dfd4de0..1680516e8dc0 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -107,7 +107,6 @@ static connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue,
const connectivity::SQLNodeType eNodeType,
const sal_uInt32 nNodeID = 0)
{
- OSL_TRACE("connectivity: Rule Number: %d,%d",eNodeType,nNodeID);
return new connectivity::OSQLInternalNode(pNewValue, eNodeType, nNodeID);
}
@@ -115,7 +114,6 @@ static connectivity::OSQLInternalNode* newNode(const ::rtl::OString& _NewValue,
const connectivity::SQLNodeType eNodeType,
const sal_uInt32 nNodeID = 0)
{
- OSL_TRACE("connectivity: Rule Number: %d,%d",eNodeType,nNodeID);
return new connectivity::OSQLInternalNode(_NewValue, eNodeType, nNodeID);
}
@@ -123,7 +121,6 @@ static connectivity::OSQLInternalNode* newNode(const ::rtl::OUString& _NewValue,
const connectivity::SQLNodeType eNodeType,
const sal_uInt32 nNodeID = 0)
{
- OSL_TRACE("connectivity: Rule Number: %d,%d",eNodeType,nNodeID);
return new connectivity::OSQLInternalNode(_NewValue, eNodeType, nNodeID);
}
@@ -2043,7 +2040,8 @@ join_spec:
| named_columns_join
;
join_type:
- SQL_TOKEN_INNER
+ /* empty */ {$$ = SQL_NEW_RULE;}
+ | SQL_TOKEN_INNER
{
$$ = SQL_NEW_RULE;
$$->append($1);
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 26086495be89..54ab874f70e1 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -952,21 +952,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
if ( pColumnRef->isRule() )
{
bFkt = sal_True;
- if ( SQL_ISRULE(pColumnRef,num_value_exp) || SQL_ISRULE(pColumnRef,term) || SQL_ISRULE(pColumnRef,factor) )
- {
- nType = DataType::DOUBLE;
- }
- else
- {
- ::rtl::OUString sFunctionName;
- if ( SQL_ISRULE(pColumnRef,length_exp) )
- pColumnRef->getChild(0)->getChild(0)->parseNodeToStr(
- sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
- else
- pColumnRef->getChild(0)->parseNodeToStr(
- sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
- nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
- }
+ nType = getFunctionReturnType(pColumnRef);
}
}
/*
@@ -1601,7 +1587,6 @@ void OSQLParseTreeIterator::impl_traverse( sal_uInt32 _nIncludeMask )
case SQL_STATEMENT_INSERT:
break;
default:
- OSL_ENSURE( false, "OSQLParseTreeIterator::traverseAll: not yet implemented for this statement type!" );
break;
}
}
@@ -2104,3 +2089,84 @@ void OSQLParseTreeIterator::impl_appendError( const SQLException& _rError )
m_aErrors = _rError;
}
// -----------------------------------------------------------------------------
+sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNode )
+{
+ sal_Int32 nType = DataType::OTHER;
+ ::rtl::OUString sFunctionName;
+ if ( SQL_ISRULE(_pNode,length_exp) )
+ {
+ _pNode->getChild(0)->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
+ nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
+ }
+ else if ( SQL_ISRULE(_pNode,num_value_exp) || SQL_ISRULE(_pNode,term) || SQL_ISRULE(_pNode,factor) )
+ {
+ nType = DataType::DOUBLE;
+ }
+ else
+ {
+ _pNode->getChild(0)->parseNodeToStr(sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False );
+
+ // MIN and MAX have another return type, we have to check the expression itself.
+ // @see http://qa.openoffice.org/issues/show_bug.cgi?id=99566
+ if ( SQL_ISRULE(_pNode,general_set_fct) && (SQL_ISTOKEN(_pNode->getChild(0),MIN) || SQL_ISTOKEN(_pNode->getChild(0),MAX) ))
+ {
+ const OSQLParseNode* pValueExp = _pNode->getChild(3);
+ if (SQL_ISRULE(pValueExp,column_ref))
+ {
+ ::rtl::OUString sColumnName;
+ ::rtl::OUString aTableRange;
+ getColumnRange(pValueExp,sColumnName,aTableRange);
+ OSL_ENSURE(sColumnName.getLength(),"Columnname darf nicht leer sein");
+ Reference<XPropertySet> xColumn = findColumn( sColumnName, aTableRange, true );
+
+ if ( xColumn.is() )
+ {
+ xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_TYPE)) >>= nType;
+ }
+ }
+ else
+ {
+ if ( SQL_ISRULE(pValueExp,num_value_exp) || SQL_ISRULE(pValueExp,term) || SQL_ISRULE(pValueExp,factor) )
+ {
+ nType = DataType::DOUBLE;
+ }
+ else if ( SQL_ISRULE(pValueExp,datetime_primary) )
+ {
+ switch(pValueExp->getChild(0)->getTokenID() )
+ {
+ case SQL_TOKEN_CURRENT_DATE:
+ nType = DataType::DATE;
+ break;
+ case SQL_TOKEN_CURRENT_TIME:
+ nType = DataType::TIME;
+ break;
+ case SQL_TOKEN_CURRENT_TIMESTAMP:
+ nType = DataType::TIMESTAMP;
+ break;
+ }
+ }
+ else if ( SQL_ISRULE(pValueExp,value_exp_primary) )
+ {
+ nType = getFunctionReturnType(pValueExp->getChild(1));
+ }
+ else if ( SQL_ISRULE(pValueExp,concatenation)
+ || SQL_ISRULE(pValueExp,char_factor)
+ || SQL_ISRULE(pValueExp,bit_value_fct)
+ || SQL_ISRULE(pValueExp,char_value_fct)
+ || SQL_ISRULE(pValueExp,char_substring_fct)
+ || SQL_ISRULE(pValueExp,fold)
+ || SQL_ISTOKEN(pValueExp,STRING) )
+ {
+ nType = DataType::VARCHAR;
+ }
+ }
+ if ( nType == DataType::OTHER )
+ nType = DataType::DOUBLE;
+ }
+ else
+ nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
+ }
+
+ return nType;
+}
+
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 8d869c2dea0a..c76dd44e3d18 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -813,8 +813,9 @@ OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType,OSQLParseNode*& pLiteral)
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
- if ( !SQL_ISRULE(pReturn,char_value_exp) && !buildStringNodes(pReturn) )
- pReturn = NULL;
+ case DataType::CLOB:
+ if ( !SQL_ISRULE(pReturn,char_value_exp) && !buildStringNodes(pReturn) )
+ pReturn = NULL;
default:
break;
}
@@ -829,6 +830,7 @@ OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType,OSQLParseNode*& pLiteral)
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
break;
case DataType::DATE:
case DataType::TIME:
@@ -872,12 +874,13 @@ OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType,OSQLParseNode*& pLiteral)
case DataType::REAL:
case DataType::DOUBLE:
// kill thousand seperators if any
- killThousandSeparator(pReturn);
+ killThousandSeparator(pReturn);
break;
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
- pReturn = buildNode_STR_NUM(pReturn);
+ case DataType::CLOB:
+ pReturn = buildNode_STR_NUM(pReturn);
break;
default:
m_sErrorMessage = m_pContext->getErrorMessage(IParseContext::ERROR_INVALID_INT_COMPARE);
@@ -893,12 +896,13 @@ OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType,OSQLParseNode*& pLiteral)
case DataType::REAL:
case DataType::DOUBLE:
// kill thousand seperators if any
- killThousandSeparator(pReturn);
+ killThousandSeparator(pReturn);
break;
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
- pReturn = buildNode_STR_NUM(pReturn);
+ case DataType::CLOB:
+ pReturn = buildNode_STR_NUM(pReturn);
break;
case DataType::INTEGER:
default:
@@ -967,6 +971,7 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode*& pAppend, OSQLParseNode*& pLi
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
if(pLiteral->isRule())
{
pAppend->append(pLiteral);
@@ -1228,6 +1233,7 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
s_pScanner->SetRule(s_pScanner->GetSTRINGRule());
break;
default:
@@ -1415,7 +1421,11 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star:
{ OSQLParseNode::table_node, "table_node" },
{ OSQLParseNode::as, "as" },
{ OSQLParseNode::op_column_commalist, "op_column_commalist" },
- { OSQLParseNode::table_primary_as_range_column, "table_primary_as_range_column" }
+ { OSQLParseNode::table_primary_as_range_column, "table_primary_as_range_column" },
+ { OSQLParseNode::datetime_primary, "datetime_primary" },
+ { OSQLParseNode::concatenation, "concatenation" },
+ { OSQLParseNode::char_factor, "char_factor" },
+ { OSQLParseNode::bit_value_fct, "bit_value_fct" }
};
size_t nRuleMapCount = sizeof( aRuleDescriptions ) / sizeof( aRuleDescriptions[0] );
OSL_ENSURE( nRuleMapCount == size_t( OSQLParseNode::rule_count ), "OSQLParser::OSQLParser: added a new rule? Adjust this map!" );
diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
index 00cf4cc911c2..84bc2fa4054c 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -87,7 +87,7 @@ namespace svx
@param _sLocation
The location of the file.
*/
- void insertNewEntry(const ::rtl::OUString& _sName,const ::rtl::OUString& _sLocation);
+ void insertNewEntry( const ::rtl::OUString& _sName,const ::rtl::OUString& _sLocation, const bool bReadOnly );
/** opens the LinkDialog to create a register pair
@param _sOldName
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index 23e8bf865626..91635d80f5f1 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -190,7 +190,7 @@ DbRegistrationOptionsPage::~DbRegistrationOptionsPage()
pHeaderBar->Hide();
for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i )
- delete static_cast<String*>(pPathBox->GetEntry(i)->GetUserData());
+ delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() );
delete pPathBox;
delete pHeaderBar;
}
@@ -209,21 +209,22 @@ BOOL DbRegistrationOptionsPage::FillItemSet( SfxItemSet& rCoreSet )
{
// the settings for the single drivers
sal_Bool bModified = sal_False;
- TNameLocationMap aMap;
+ DatabaseRegistrations aRegistrations;
ULONG nCount = pPathBox->GetEntryCount();
for ( ULONG i = 0; i < nCount; ++i )
{
SvLBoxEntry* pEntry = pPathBox->GetEntry(i);
- String* pPath = static_cast<String*>(pEntry->GetUserData());
- if ( pPath && pPath->Len() )
+ DatabaseRegistration* pRegistration = static_cast< DatabaseRegistration* >( pEntry->GetUserData() );
+ if ( pRegistration && pRegistration->sLocation.getLength() )
{
- OFileNotation aTransformer(*pPath);
- aMap.insert(TNameLocationMap::value_type(::rtl::OUString(pPathBox->GetEntryText(pEntry,0)),aTransformer.get(OFileNotation::N_URL)));
+ ::rtl::OUString sName( pPathBox->GetEntryText( pEntry, 0 ) );
+ OFileNotation aTransformer( pRegistration->sLocation );
+ aRegistrations[ sName ] = DatabaseRegistration( aTransformer.get( OFileNotation::N_URL ), pRegistration->bReadOnly );
}
}
- if ( m_nOldCount != aMap.size() || m_bModified )
+ if ( m_nOldCount != aRegistrations.size() || m_bModified )
{
- rCoreSet.Put(DatabaseMapItem(SID_SB_DB_REGISTER, aMap), SID_SB_DB_REGISTER);
+ rCoreSet.Put(DatabaseMapItem( SID_SB_DB_REGISTER, aRegistrations ), SID_SB_DB_REGISTER);
bModified = sal_True;
}
@@ -235,47 +236,44 @@ BOOL DbRegistrationOptionsPage::FillItemSet( SfxItemSet& rCoreSet )
void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet )
{
// the settings for the single drivers
- SFX_ITEMSET_GET( rSet, pSettings, DatabaseMapItem, SID_SB_DB_REGISTER, sal_True );
+ SFX_ITEMSET_GET( rSet, pRegistrations, DatabaseMapItem, SID_SB_DB_REGISTER, sal_True );
+ if ( !pRegistrations )
+ return;
- if ( pSettings )
+ pPathBox->Clear();
+
+ const DatabaseRegistrations& rRegistrations = pRegistrations->getRegistrations();
+ m_nOldCount = rRegistrations.size();
+ DatabaseRegistrations::const_iterator aIter = rRegistrations.begin();
+ DatabaseRegistrations::const_iterator aEnd = rRegistrations.end();
+ for ( ; aIter != aEnd; ++aIter )
+ {
+ OFileNotation aTransformer( aIter->second.sLocation );
+ insertNewEntry( aIter->first, aTransformer.get( OFileNotation::N_SYSTEM ), aIter->second.bReadOnly );
+ }
+
+ String aUserData = GetUserData();
+ if ( aUserData.Len() )
{
- // TabListBox f"ullen
- pPathBox->Clear();
-
- const TNameLocationMap& rMap = pSettings->getSettings();
- m_nOldCount = rMap.size();
- TNameLocationMap::const_iterator aIter = rMap.begin();
- TNameLocationMap::const_iterator aEnd = rMap.end();
- for (; aIter != aEnd; ++aIter)
+ // Spaltenbreite restaurieren
+ pHeaderBar->SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() );
+ HeaderEndDrag_Impl( NULL );
+ // Sortierrichtung restaurieren
+ BOOL bUp = (BOOL)(USHORT)aUserData.GetToken(1).ToInt32();
+ HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE);
+
+ if ( bUp )
{
- OFileNotation aTransformer(aIter->second);
- insertNewEntry(aIter->first,aTransformer.get(OFileNotation::N_SYSTEM));
+ nBits &= ~HIB_UPARROW;
+ nBits |= HIB_DOWNARROW;
}
-
- String aUserData = GetUserData();
-
- if ( aUserData.Len() )
+ else
{
- // Spaltenbreite restaurieren
- pHeaderBar->SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() );
- HeaderEndDrag_Impl( NULL );
- // Sortierrichtung restaurieren
- BOOL bUp = (BOOL)(USHORT)aUserData.GetToken(1).ToInt32();
- HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE);
-
- if ( bUp )
- {
- nBits &= ~HIB_UPARROW;
- nBits |= HIB_DOWNARROW;
- }
- else
- {
- nBits &= ~HIB_DOWNARROW;
- nBits |= HIB_UPARROW;
- }
- pHeaderBar->SetItemBits( ITEMID_TYPE, nBits );
- HeaderSelect_Impl( NULL );
+ nBits &= ~HIB_DOWNARROW;
+ nBits |= HIB_UPARROW;
}
+ pHeaderBar->SetItemBits( ITEMID_TYPE, nBits );
+ HeaderSelect_Impl( NULL );
}
}
@@ -316,16 +314,19 @@ IMPL_LINK( DbRegistrationOptionsPage, NewHdl, void *, EMPTYARG )
IMPL_LINK( DbRegistrationOptionsPage, EditHdl, void *, EMPTYARG )
{
SvLBoxEntry* pEntry = pPathBox->GetCurEntry();
- if ( pEntry )
- {
- String* pOldLocation = static_cast<String*>(pEntry->GetUserData());
- String sOldName = pPathBox->GetEntryText(pEntry,0);
- m_pCurEntry = pEntry;
- openLinkDialog(sOldName,*pOldLocation,pEntry);
- m_pCurEntry = NULL;
- }
+ if ( !pEntry )
+ return 0L;
- return 0;
+ DatabaseRegistration* pOldRegistration = static_cast< DatabaseRegistration* >( pEntry->GetUserData() );
+ if ( !pOldRegistration || pOldRegistration->bReadOnly )
+ return 0L;
+
+ String sOldName = pPathBox->GetEntryText(pEntry,0);
+ m_pCurEntry = pEntry;
+ openLinkDialog( sOldName, pOldRegistration->sLocation, pEntry );
+ m_pCurEntry = NULL;
+
+ return 1L;
}
// -----------------------------------------------------------------------
@@ -390,28 +391,42 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar )
// -----------------------------------------------------------------------
IMPL_LINK( DbRegistrationOptionsPage, PathSelect_Impl, SvTabListBox *, EMPTYARG )
-
-/* [Beschreibung]
-
-*/
-
{
SvLBoxEntry* pEntry = pPathBox->FirstSelected();
- m_aEdit.Enable( pEntry != NULL);
- m_aDelete.Enable( pEntry != NULL);
+ bool bReadOnly = true;
+ if ( pEntry )
+ {
+ DatabaseRegistration* pRegistration = static_cast< DatabaseRegistration* >( pEntry->GetUserData() );
+ bReadOnly = pRegistration->bReadOnly;
+ }
+
+ m_aEdit.Enable( !bReadOnly );
+ m_aDelete.Enable( !bReadOnly );
return 0;
}
// -----------------------------------------------------------------------------
-void DbRegistrationOptionsPage::insertNewEntry(const ::rtl::OUString& _sName,const ::rtl::OUString& _sLocation)
+void DbRegistrationOptionsPage::insertNewEntry( const ::rtl::OUString& _sName,const ::rtl::OUString& _sLocation, const bool _bReadOnly )
{
String aStr( _sName );
aStr += '\t';
aStr += String(_sLocation);
- SvLBoxEntry* pEntry = pPathBox->InsertEntry( aStr );
- String* pLocation = new String( _sLocation );
- pEntry->SetUserData( pLocation );
+
+ SvLBoxEntry* pEntry = NULL;
+ if ( _bReadOnly )
+ {
+ sal_Bool bHighContrast = pPathBox->GetDisplayBackground().GetColor().IsDark();
+ Image aLocked( CUI_RES( bHighContrast ? RID_SVXBMP_LOCK_HC : RID_SVXBMP_LOCK ) );
+ pEntry = pPathBox->InsertEntry( aStr, aLocked, aLocked );
+ }
+ else
+ {
+ pEntry = pPathBox->InsertEntry( aStr );
+ }
+
+ pEntry->SetUserData( new DatabaseRegistration( _sLocation, _bReadOnly ) );
}
+
// -----------------------------------------------------------------------------
String DbRegistrationOptionsPage::getFileLocation(const String& _sLocation)
{
@@ -482,10 +497,10 @@ void DbRegistrationOptionsPage::openLinkDialog(const String& _sOldName,const Str
{
if ( _pEntry )
{
- delete static_cast<String*>(_pEntry->GetUserData());
- pPathBox->GetModel()->Remove(_pEntry);
+ delete static_cast< DatabaseRegistration* >( _pEntry->GetUserData() );
+ pPathBox->GetModel()->Remove( _pEntry );
}
- insertNewEntry(sNewName,sNewLocation);
+ insertNewEntry( sNewName, sNewLocation, false );
m_bModified = sal_True;
}
}
diff --git a/cui/source/options/dbregisterednamesconfig.cxx b/cui/source/options/dbregisterednamesconfig.cxx
index 6fd7e34b2729..4ab867eaa44e 100644
--- a/cui/source/options/dbregisterednamesconfig.cxx
+++ b/cui/source/options/dbregisterednamesconfig.cxx
@@ -30,18 +30,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cui.hxx"
+#include "connpooloptions.hxx"
#include "dbregisterednamesconfig.hxx"
+#include "dbregistersettings.hxx"
+#include "svx/svxids.hrc"
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
+#include <svl/eitem.hxx>
#include <svl/itemset.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/confignode.hxx>
-#include <comphelper/extract.hxx>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/uno/XNamingService.hpp>
-#include <svl/eitem.hxx>
-#include <comphelper/processfactory.hxx>
-#include <unotools/pathoptions.hxx>
-#include "dbregistersettings.hxx"
-#include "connpooloptions.hxx"
//........................................................................
namespace svx
@@ -50,136 +51,92 @@ namespace svx
using namespace ::utl;
using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::container;
- //--------------------------------------------------------------------
- static const ::rtl::OUString& getDbRegisteredNamesNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/RegisteredNames");
- return s_sNodeName;
- }
-
- //--------------------------------------------------------------------
- static const ::rtl::OUString& getDbNameNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Name");
- return s_sNodeName;
- }
-
- //--------------------------------------------------------------------
- static const ::rtl::OUString& getDbLocationNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Location");
- return s_sNodeName;
- }
-
//====================================================================
//= DbRegisteredNamesConfig
//====================================================================
//--------------------------------------------------------------------
- void DbRegisteredNamesConfig::GetOptions(SfxItemSet& _rFillItems)
+ void DbRegisteredNamesConfig::GetOptions( SfxItemSet& _rFillItems )
{
- // the config node where all pooling relevant info are stored under
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_READONLY);
-
- TNameLocationMap aSettings;
+ DatabaseRegistrations aSettings;
- // then look for which of them settings are stored in the configuration
- Sequence< ::rtl::OUString > aDriverKeys = aDbRegisteredNamesRoot.getNodeNames();
- const ::rtl::OUString* pDriverKeys = aDriverKeys.getConstArray();
- const ::rtl::OUString* pDriverKeysEnd = pDriverKeys + aDriverKeys.getLength();
- for (;pDriverKeys != pDriverKeysEnd; ++pDriverKeys)
+ try
{
- // the name of the driver in this round
- OConfigurationNode aThisDriverSettings = aDbRegisteredNamesRoot.openNode(*pDriverKeys);
- ::rtl::OUString sName, sLocation;
- aThisDriverSettings.getNodeValue(getDbNameNodeName()) >>= sName;
- aThisDriverSettings.getNodeValue(getDbLocationNodeName()) >>= sLocation;
- sLocation = SvtPathOptions().SubstituteVariable(sLocation);
-
- aSettings.insert(TNameLocationMap::value_type(sName,sLocation));
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XDatabaseRegistrations > xRegistrations(
+ aContext.createComponent( "com.sun.star.sdb.DatabaseContext" ), UNO_QUERY_THROW );
+
+ Sequence< ::rtl::OUString > aRegistrationNames( xRegistrations->getRegistrationNames() );
+ const ::rtl::OUString* pRegistrationName = aRegistrationNames.getConstArray();
+ const ::rtl::OUString* pRegistrationNamesEnd = pRegistrationName + aRegistrationNames.getLength();
+ for ( ; pRegistrationName != pRegistrationNamesEnd; ++pRegistrationName )
+ {
+ ::rtl::OUString sLocation( xRegistrations->getDatabaseLocation( *pRegistrationName ) );
+ aSettings[ *pRegistrationName ] =
+ DatabaseRegistration( sLocation, xRegistrations->isDatabaseRegistrationReadOnly( *pRegistrationName ) );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
- _rFillItems.Put(DatabaseMapItem(SID_SB_DB_REGISTER, aSettings));
+ _rFillItems.Put( DatabaseMapItem( SID_SB_DB_REGISTER, aSettings ) );
}
//--------------------------------------------------------------------
void DbRegisteredNamesConfig::SetOptions(const SfxItemSet& _rSourceItems)
{
- // the config node where all pooling relevant info are stored under
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_UPDATABLE);
-
- if (!aDbRegisteredNamesRoot.isValid())
- // already asserted by the OConfigurationTreeRoot
+ // the settings for the single drivers
+ SFX_ITEMSET_GET( _rSourceItems, pRegistrations, DatabaseMapItem, SID_SB_DB_REGISTER, sal_True );
+ if ( !pRegistrations )
return;
- sal_Bool bNeedCommit = sal_False;
-
-
- // the settings for the single drivers
- SFX_ITEMSET_GET( _rSourceItems, pDriverSettings, DatabaseMapItem, SID_SB_DB_REGISTER, sal_True );
- if (pDriverSettings)
+ try
{
- Reference< XNameAccess > xDatabaseContext = Reference< XNameAccess >(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DatabaseContext"))), UNO_QUERY);
- Reference< XNamingService> xNamingService(xDatabaseContext,UNO_QUERY);
- ::rtl::OUString sName, sLocation;
- OConfigurationNode aThisDriverSettings;
-
- const TNameLocationMap& rNewSettings = pDriverSettings->getSettings();
- TNameLocationMap::const_iterator aEnd = rNewSettings.end();
- for ( TNameLocationMap::const_iterator aLoop = rNewSettings.begin();
- aLoop != aEnd;
- ++aLoop
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XDatabaseRegistrations > xRegistrations(
+ aContext.createComponent( "com.sun.star.sdb.DatabaseContext" ), UNO_QUERY_THROW );
+
+ const DatabaseRegistrations& rNewRegistrations = pRegistrations->getRegistrations();
+ for ( DatabaseRegistrations::const_iterator reg = rNewRegistrations.begin();
+ reg != rNewRegistrations.end();
+ ++reg
)
{
- // need the name as ::rtl::OUString
- sName = aLoop->first;
+ const ::rtl::OUString sName = reg->first;
+ const ::rtl::OUString sLocation = reg->second.sLocation;
- // the sub-node for this driver
- if (aDbRegisteredNamesRoot.hasByName(sName))
+ if ( xRegistrations->hasRegisteredDatabase( sName ) )
{
- aThisDriverSettings = aDbRegisteredNamesRoot.openNode(sName);
- // set the values
- aThisDriverSettings.setNodeValue(getDbNameNodeName(), makeAny(sName));
- aThisDriverSettings.setNodeValue(getDbLocationNodeName(), makeAny(aLoop->second));
- bNeedCommit = sal_True;
- }
- else
- {
- try
- {
- xNamingService->registerObject(sName,Reference< ::com::sun::star::uno::XInterface >(xDatabaseContext->getByName(aLoop->second),UNO_QUERY));
- }
- catch( const Exception& )
+ if ( !xRegistrations->isDatabaseRegistrationReadOnly( sName ) )
+ xRegistrations->changeDatabaseLocation( sName, sLocation );
+ else
{
- DBG_UNHANDLED_EXCEPTION();
+ OSL_ENSURE( xRegistrations->getDatabaseLocation( sName ) == sLocation,
+ "DbRegisteredNamesConfig::SetOptions: somebody changed a read-only registration. How unrespectful." );
}
}
+ else
+ xRegistrations->registerDatabaseLocation( sName, sLocation );
}
- if (bNeedCommit)
- aDbRegisteredNamesRoot.commit();
- // delete unused entry
- Sequence< ::rtl::OUString > aDriverKeys = xDatabaseContext->getElementNames();
- const ::rtl::OUString* pDriverKeys = aDriverKeys.getConstArray();
- const ::rtl::OUString* pDriverKeysEnd = pDriverKeys + aDriverKeys.getLength();
- for (;pDriverKeys != pDriverKeysEnd; ++pDriverKeys)
+ // delete unused entries
+ Sequence< ::rtl::OUString > aRegistrationNames = xRegistrations->getRegistrationNames();
+ const ::rtl::OUString* pRegistrationName = aRegistrationNames.getConstArray();
+ const ::rtl::OUString* pRegistrationNamesEnd = pRegistrationName + aRegistrationNames.getLength();
+ for ( ; pRegistrationName != pRegistrationNamesEnd; ++pRegistrationName )
{
- if ( rNewSettings.find(*pDriverKeys) == rNewSettings.end() )
- {
- try
- {
- xNamingService->revokeObject(*pDriverKeys);
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
+ if ( rNewRegistrations.find( *pRegistrationName ) == rNewRegistrations.end() )
+ xRegistrations->revokeDatabaseLocation( *pRegistrationName );
}
}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
//........................................................................
diff --git a/cui/source/options/dbregistersettings.cxx b/cui/source/options/dbregistersettings.cxx
index c3d3b7e8c244..cdcb899c2567 100644
--- a/cui/source/options/dbregistersettings.cxx
+++ b/cui/source/options/dbregistersettings.cxx
@@ -33,6 +33,8 @@
#include "dbregistersettings.hxx"
+#include <rtl/ustring.hxx>
+
//........................................................................
namespace svx
{
@@ -43,9 +45,9 @@ namespace svx
//====================================================================
TYPEINIT1( DatabaseMapItem, SfxPoolItem )
//--------------------------------------------------------------------
- DatabaseMapItem::DatabaseMapItem( sal_uInt16 _nId, const TNameLocationMap& _rSettings )
- :SfxPoolItem(_nId)
- ,m_aSettings(_rSettings)
+ DatabaseMapItem::DatabaseMapItem( sal_uInt16 _nId, const DatabaseRegistrations& _rRegistrations )
+ :SfxPoolItem( _nId )
+ ,m_aRegistrations( _rRegistrations )
{
}
@@ -53,19 +55,19 @@ namespace svx
int DatabaseMapItem::operator==( const SfxPoolItem& _rCompare ) const
{
const DatabaseMapItem* pItem = PTR_CAST(DatabaseMapItem, &_rCompare);
- if (!pItem)
+ if ( !pItem )
return sal_False;
- if (m_aSettings.size() != pItem->m_aSettings.size())
+ if ( m_aRegistrations.size() != pItem->m_aRegistrations.size() )
return sal_False;
- return m_aSettings != pItem->m_aSettings;
+ return m_aRegistrations == pItem->m_aRegistrations;
}
//--------------------------------------------------------------------
- SfxPoolItem* DatabaseMapItem::Clone( SfxItemPool * ) const
+ SfxPoolItem* DatabaseMapItem::Clone( SfxItemPool* ) const
{
- return new DatabaseMapItem(Which(), m_aSettings);
+ return new DatabaseMapItem( Which(), m_aRegistrations );
}
//--------------------------------------------------------------------
diff --git a/cui/source/options/dbregistersettings.hxx b/cui/source/options/dbregistersettings.hxx
index 672d4bf63bcd..b78031f06786 100644
--- a/cui/source/options/dbregistersettings.hxx
+++ b/cui/source/options/dbregistersettings.hxx
@@ -39,24 +39,56 @@ namespace svx
{
//........................................................................
+ struct DatabaseRegistration
+ {
+ ::rtl::OUString sLocation;
+ bool bReadOnly;
+
+ DatabaseRegistration()
+ :sLocation()
+ ,bReadOnly( true )
+ {
+ }
+
+ DatabaseRegistration( const ::rtl::OUString& _rLocation, const sal_Bool _bReadOnly )
+ :sLocation( _rLocation )
+ ,bReadOnly( _bReadOnly )
+ {
+ }
+
+ bool operator==( const DatabaseRegistration& _rhs ) const
+ {
+ return ( sLocation == _rhs.sLocation );
+ // do not take the read-only-ness into account, this is not maintained everywhere, but only
+ // properly set when filling the struct from the XDatabaseRegistrations data
+ }
+
+ bool operator!=( const DatabaseRegistration& _rhs ) const
+ {
+ return !( this->operator==( _rhs ) );
+ }
+ };
+
+ typedef ::std::map< ::rtl::OUString, DatabaseRegistration, ::comphelper::UStringLess > DatabaseRegistrations;
+
//====================================================================
//= DatabaseMapItem
//====================================================================
- DECLARE_STL_USTRINGACCESS_MAP(::rtl::OUString,TNameLocationMap);
class DatabaseMapItem : public SfxPoolItem
{
protected:
- TNameLocationMap m_aSettings;
+ DatabaseRegistrations m_aRegistrations;
public:
TYPEINFO();
- DatabaseMapItem( sal_uInt16 _nId, const TNameLocationMap& _rSettings );
+ DatabaseMapItem( sal_uInt16 _nId, const DatabaseRegistrations& _rRegistrations );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- const TNameLocationMap& getSettings() const { return m_aSettings; }
+ const DatabaseRegistrations&
+ getRegistrations() const { return m_aRegistrations; }
};
//........................................................................
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 8016124f894d..ec30ff3d3d1d 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -441,8 +441,8 @@
#define HID_EXTENSION_NOT_PRESENT_DLG ( HID_DBACCESS_START + 381)
#define HID_DLG_QRY_JOIN_CONTROL ( HID_DBACCESS_START + 382)
#define HID_DSADMIN_IGNORECURRENCY ( HID_DBACCESS_START + 383)
-
#define HID_MACRO_MIGRATION_BACKUP_LOCATION ( HID_DBACCESS_START + 384)
+#define HID_DSADMIN_PRIMARY_KEY_SUPPORT ( HID_DBACCESS_START + 385)
// this one below have hid in number space HID_SBA_START
#define HID_DLG_ADABAS_NEWDB (HID_SBA_START + 0)
diff --git a/dbaccess/qa/complex/dbaccess/ApplicationController.java b/dbaccess/qa/complex/dbaccess/ApplicationController.java
index df4aaa2f5cf9..5b2dd1e0e613 100644
--- a/dbaccess/qa/complex/dbaccess/ApplicationController.java
+++ b/dbaccess/qa/complex/dbaccess/ApplicationController.java
@@ -107,16 +107,16 @@ public class ApplicationController extends TestCase
// load it into a frame
final Object object = getORB().createInstance("com.sun.star.frame.Desktop");
- final XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, object);
+ final XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, object);
final XComponent loadedComponent = xComponentLoader.loadComponentFromURL(m_database.getDocumentURL(), "_blank", FrameSearchFlag.ALL, new PropertyValue[0]);
assure("too many document instances!",
UnoRuntime.areSame(loadedComponent, m_databaseDocument));
// get the controller, which provides access to various UI operations
- final XModel docModel = (XModel) UnoRuntime.queryInterface(XModel.class,
+ final XModel docModel = UnoRuntime.queryInterface(XModel.class,
loadedComponent);
- m_documentUI = (XDatabaseDocumentUI) UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
+ m_documentUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class,
docModel.getCurrentController());
}
@@ -144,11 +144,8 @@ public class ApplicationController extends TestCase
final String newDocumentURL = createTempFileURL();
// store the doc in a new location
- final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class,
- m_databaseDocument);
- storeDoc.storeAsURL(newDocumentURL, new PropertyValue[]
- {
- });
+ final XStorable storeDoc = UnoRuntime.queryInterface( XStorable.class, m_databaseDocument );
+ storeDoc.storeAsURL( newDocumentURL, new PropertyValue[] { } );
// connect
m_documentUI.connect();
@@ -166,8 +163,7 @@ public class ApplicationController extends TestCase
impl_switchToDocument(oldDocumentURL);
m_documentUI.connect();
assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected());
- XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class,
- m_documentUI.getActiveConnection());
+ XTablesSupplier suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() );
XNameAccess tables = suppTables.getTables();
assure("the table was created in the wrong database", !tables.hasByName("abc"));
@@ -176,8 +172,7 @@ public class ApplicationController extends TestCase
m_documentUI.connect();
assure("could not connect to " + m_database.getDocumentURL(), m_documentUI.isConnected());
- suppTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class,
- m_documentUI.getActiveConnection());
+ suppTables = UnoRuntime.queryInterface( XTablesSupplier.class, m_documentUI.getActiveConnection() );
tables = suppTables.getTables();
assure("the newly created table has not been written", tables.hasByName("abc"));
}
diff --git a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
index eccb48647bae..b7c1ea987968 100644
--- a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
+++ b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
@@ -32,6 +32,7 @@ package complex.dbaccess;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XSingleSelectQueryComposer;
import com.sun.star.uno.UnoRuntime;
+import connectivity.tools.CRMDatabase;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -44,7 +45,7 @@ public abstract class CRMBasedTestCase extends TestCase
{
try
{
- m_database = new CRMDatabase( getORB() );
+ m_database = new CRMDatabase( getORB(), false );
}
catch ( Exception e )
{
@@ -67,7 +68,7 @@ public abstract class CRMBasedTestCase extends TestCase
try
{
if ( m_database != null )
- m_database.close();
+ m_database.saveAndClose();
}
catch ( Exception ex )
{
@@ -80,9 +81,6 @@ public abstract class CRMBasedTestCase extends TestCase
*/
protected final XSingleSelectQueryComposer createQueryComposer() throws com.sun.star.uno.Exception
{
- final XMultiServiceFactory connectionFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, m_database.getConnection() );
- return (XSingleSelectQueryComposer)UnoRuntime.queryInterface(
- XSingleSelectQueryComposer.class, connectionFactory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer" ) );
+ return m_database.getConnection().createSingleSelectQueryComposer();
}
}
diff --git a/dbaccess/qa/complex/dbaccess/DataSource.java b/dbaccess/qa/complex/dbaccess/DataSource.java
index 29c9d2f2cdd7..6cb0b7ee4b17 100644
--- a/dbaccess/qa/complex/dbaccess/DataSource.java
+++ b/dbaccess/qa/complex/dbaccess/DataSource.java
@@ -34,6 +34,7 @@ import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XNamingService;
import complexlib.ComplexTestCase;
+import connectivity.tools.CRMDatabase;
import connectivity.tools.HsqlDatabase;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -66,7 +67,7 @@ public class DataSource extends ComplexTestCase
{
if (m_database == null)
{
- final CRMDatabase database = new CRMDatabase(getFactory());
+ final CRMDatabase database = new CRMDatabase( getFactory(), false );
m_database = database.getDatabase();
m_dataSource = m_database.getDataSource();
}
diff --git a/dbaccess/qa/complex/dbaccess/Query.java b/dbaccess/qa/complex/dbaccess/Query.java
index 684df2b65a25..f39c37a8fbdb 100644
--- a/dbaccess/qa/complex/dbaccess/Query.java
+++ b/dbaccess/qa/complex/dbaccess/Query.java
@@ -37,6 +37,7 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.sdb.XQueriesSupplier;
import com.sun.star.sdbcx.XColumnsSupplier;
import com.sun.star.uno.UnoRuntime;
+import connectivity.tools.CRMDatabase;
public class Query extends complexlib.ComplexTestCase {
@@ -62,7 +63,7 @@ public class Query extends complexlib.ComplexTestCase {
{
if ( m_database == null )
{
- final CRMDatabase database = new CRMDatabase( getFactory() );
+ final CRMDatabase database = new CRMDatabase( getFactory(), false );
m_database = database.getDatabase();
}
}
@@ -87,8 +88,8 @@ public class Query extends complexlib.ComplexTestCase {
try
{
- final XQueriesSupplier suppQueries = (XQueriesSupplier)UnoRuntime.queryInterface(
- XQueriesSupplier.class, m_database.defaultConnection());
+ final XQueriesSupplier suppQueries = UnoRuntime.queryInterface(
+ XQueriesSupplier.class, m_database.defaultConnection().getXConnection() );
final XNameAccess queries = suppQueries.getQueries();
final String[] queryNames = new String[] { "parseable", "parseable native", "unparseable" };
@@ -100,12 +101,12 @@ public class Query extends complexlib.ComplexTestCase {
for ( int i = 0; i < queryNames.length; ++i )
{
- final XPropertySet query = (XPropertySet)UnoRuntime.queryInterface(
+ final XPropertySet query = UnoRuntime.queryInterface(
XPropertySet.class, queries.getByName( queryNames[i] ) );
- final XColumnsSupplier suppCols = (XColumnsSupplier)UnoRuntime.queryInterface(
+ final XColumnsSupplier suppCols = UnoRuntime.queryInterface(
XColumnsSupplier.class, query);
- final XIndexAccess columns = (XIndexAccess)UnoRuntime.queryInterface(
+ final XIndexAccess columns = UnoRuntime.queryInterface(
XIndexAccess.class, suppCols.getColumns());
// check whether the columns supplied by the query match what we expected
@@ -113,7 +114,7 @@ public class Query extends complexlib.ComplexTestCase {
columns.getCount() == expectedColumnNames[i].length );
for ( int col = 0; col < columns.getCount(); ++col )
{
- final XNamed columnName = (XNamed)UnoRuntime.queryInterface(
+ final XNamed columnName = UnoRuntime.queryInterface(
XNamed.class, columns.getByIndex(col) );
assure( "column no. " + col + " of query \"" + queryNames[i] + "\" not matching",
columnName.getName().equals( expectedColumnNames[i][col] ) );
diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java b/dbaccess/qa/complex/dbaccess/RowSet.java
index d9145d7aaee8..6a2b4e49c25a 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -41,7 +41,6 @@ import com.sun.star.sdb.XParametersSupplier;
import com.sun.star.sdb.XResultSetAccess;
import com.sun.star.sdb.XRowSetApproveBroadcaster;
import com.sun.star.sdbc.SQLException;
-import com.sun.star.sdbc.XConnection;
import com.sun.star.sdbc.XParameters;
import com.sun.star.sdbc.XPreparedStatement;
import com.sun.star.sdbc.XResultSet;
@@ -52,12 +51,12 @@ import com.sun.star.sdbc.XRowUpdate;
import com.sun.star.sdbcx.XColumnsSupplier;
import com.sun.star.sdbcx.XDeleteRows;
import com.sun.star.sdbcx.XRowLocate;
-import com.sun.star.sdbcx.XTablesSupplier;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.util.XRefreshable;
import complexlib.ComplexTestCase;
+import connectivity.tools.CRMDatabase;
import connectivity.tools.DataSource;
import connectivity.tools.HsqlDatabase;
+import connectivity.tools.sdb.Connection;
import java.lang.reflect.Method;
import java.util.Random;
@@ -89,7 +88,7 @@ public class RowSet extends ComplexTestCase
public ResultSetMovementStress(XResultSet _resultSet, int _id) throws java.lang.Exception
{
m_resultSet = _resultSet;
- m_row = (XRow) UnoRuntime.queryInterface(XRow.class, m_resultSet);
+ m_row = UnoRuntime.queryInterface( XRow.class, m_resultSet );
m_id = _id;
}
@@ -144,7 +143,7 @@ public class RowSet extends ComplexTestCase
{
try
{
- final CRMDatabase database = new CRMDatabase(getFactory());
+ final CRMDatabase database = new CRMDatabase( getFactory(), false );
m_database = database.getDatabase();
m_dataSource = m_database.getDataSource();
}
@@ -204,23 +203,22 @@ public class RowSet extends ComplexTestCase
{
try
{
- m_rowSet = (XRowSet) UnoRuntime.queryInterface(XRowSet.class,
- getFactory().createInstance("com.sun.star.sdb.RowSet"));
- final XPropertySet rowSetProperties = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_rowSet);
+ m_rowSet = UnoRuntime.queryInterface( XRowSet.class, getFactory().createInstance( "com.sun.star.sdb.RowSet" ) );
+ final XPropertySet rowSetProperties = UnoRuntime.queryInterface( XPropertySet.class, m_rowSet );
rowSetProperties.setPropertyValue("Command", command);
rowSetProperties.setPropertyValue("CommandType", Integer.valueOf(commandType));
- rowSetProperties.setPropertyValue("ActiveConnection", m_database.defaultConnection());
+ rowSetProperties.setPropertyValue("ActiveConnection", m_database.defaultConnection().getXConnection());
if (limitFetchSize)
{
rowSetProperties.setPropertyValue("FetchSize", Integer.valueOf(MAX_FETCH_ROWS));
}
- m_resultSet = (XResultSet) UnoRuntime.queryInterface(XResultSet.class, m_rowSet);
- m_resultSetUpdate = (XResultSetUpdate) UnoRuntime.queryInterface(XResultSetUpdate.class, m_rowSet);
- m_row = (XRow) UnoRuntime.queryInterface(XRow.class, m_rowSet);
- m_rowLocate = (XRowLocate) UnoRuntime.queryInterface(XRowLocate.class, m_resultSet);
- m_rowSetProperties = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_rowSet);
- m_paramsSupplier = (XParametersSupplier) UnoRuntime.queryInterface(XParametersSupplier.class, m_rowSet);
+ m_resultSet = UnoRuntime.queryInterface( XResultSet.class, m_rowSet );
+ m_resultSetUpdate = UnoRuntime.queryInterface( XResultSetUpdate.class, m_rowSet );
+ m_row = UnoRuntime.queryInterface( XRow.class, m_rowSet );
+ m_rowLocate = UnoRuntime.queryInterface( XRowLocate.class, m_resultSet );
+ m_rowSetProperties = UnoRuntime.queryInterface( XPropertySet.class, m_rowSet );
+ m_paramsSupplier = UnoRuntime.queryInterface( XParametersSupplier.class, m_rowSet );
if (execute)
{
@@ -259,7 +257,7 @@ public class RowSet extends ComplexTestCase
// --------------------------------------------------------------------------------------------------------
XResultSet createClone() throws SQLException
{
- final XResultSetAccess rowAcc = (XResultSetAccess) UnoRuntime.queryInterface(XResultSetAccess.class, m_rowSet);
+ final XResultSetAccess rowAcc = UnoRuntime.queryInterface( XResultSetAccess.class, m_rowSet );
return rowAcc.createResultSet();
}
@@ -269,9 +267,9 @@ public class RowSet extends ComplexTestCase
m_database.executeSQL("DROP TABLE \"TEST1\" IF EXISTS");
m_database.executeSQL("CREATE TABLE \"TEST1\" (\"ID\" integer not null primary key, \"col2\" varchar(50) )");
- final XConnection connection = m_database.defaultConnection();
+ final Connection connection = m_database.defaultConnection();
final XPreparedStatement prep = connection.prepareStatement("INSERT INTO \"TEST1\" values (?,?)");
- final XParameters para = (XParameters) UnoRuntime.queryInterface(XParameters.class, prep);
+ final XParameters para = UnoRuntime.queryInterface( XParameters.class, prep );
for (int i = 1; i <= MAX_TABLE_ROWS; ++i)
{
para.setInt(1, i);
@@ -279,9 +277,7 @@ public class RowSet extends ComplexTestCase
prep.executeUpdate();
}
- final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, connection);
- final XRefreshable refresh = (XRefreshable) UnoRuntime.queryInterface(XRefreshable.class, suppTables.getTables());
- refresh.refresh();
+ connection.refreshTables();
}
// --------------------------------------------------------------------------------------------------------
@@ -335,8 +331,8 @@ public class RowSet extends ComplexTestCase
{
try
{
- final XRow _row = (XRow) UnoRuntime.queryInterface(XRow.class, _resultSet);
- final XRow cloneRow = (XRow) UnoRuntime.queryInterface(XRow.class, clone);
+ final XRow _row = UnoRuntime.queryInterface( XRow.class, _resultSet );
+ final XRow cloneRow = UnoRuntime.queryInterface( XRow.class, clone );
for (int i = 1; i <= MAX_FETCH_ROWS; ++i)
{
final int calcPos = (MAX_TABLE_ROWS % i) + 1;
@@ -359,14 +355,14 @@ public class RowSet extends ComplexTestCase
{
try
{
- final XRow _row = (XRow) UnoRuntime.queryInterface(XRow.class, _resultSet);
+ final XRow _row = UnoRuntime.queryInterface( XRow.class, _resultSet );
_resultSet.beforeFirst();
for (int i = 1; i <= MAX_TABLE_ROWS; ++i)
{
_resultSet.next();
final XResultSet clone = createClone();
- final XRow cloneRow = (XRow) UnoRuntime.queryInterface(XRow.class, clone);
+ final XRow cloneRow = UnoRuntime.queryInterface( XRow.class, clone );
final int calcPos = MAX_TABLE_ROWS - 1;
if (calcPos != 0 && clone.absolute(calcPos))
{
@@ -420,15 +416,15 @@ public class RowSet extends ComplexTestCase
// first we create our RowSet object
final RowSetEventListener pRow = new RowSetEventListener();
- final XColumnsSupplier colSup = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, m_rowSet);
- final XPropertySet col = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, colSup.getColumns().getByName("ID"));
+ final XColumnsSupplier colSup = UnoRuntime.queryInterface( XColumnsSupplier.class, m_rowSet );
+ final XPropertySet col = UnoRuntime.queryInterface( XPropertySet.class, colSup.getColumns().getByName( "ID" ) );
col.addPropertyChangeListener("Value", pRow);
m_rowSetProperties.addPropertyChangeListener("IsModified", pRow);
m_rowSetProperties.addPropertyChangeListener("IsNew", pRow);
m_rowSetProperties.addPropertyChangeListener("IsRowCountFinal", pRow);
m_rowSetProperties.addPropertyChangeListener("RowCount", pRow);
- final XRowSetApproveBroadcaster xApBroad = (XRowSetApproveBroadcaster) UnoRuntime.queryInterface(XRowSetApproveBroadcaster.class, m_resultSet);
+ final XRowSetApproveBroadcaster xApBroad = UnoRuntime.queryInterface( XRowSetApproveBroadcaster.class, m_resultSet );
xApBroad.addRowSetApproveListener(pRow);
m_rowSet.addRowSetListener(pRow);
@@ -458,13 +454,13 @@ public class RowSet extends ComplexTestCase
testCursorMove(m_resultSet, cResSet.getMethod("previous", (Class[]) null), pRow, moves, null);
testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), pRow, moves, null);
moves[RowSetEventListener.IS_MODIFIED] = true;
- final XRowUpdate updRow = (XRowUpdate) UnoRuntime.queryInterface(XRowUpdate.class, m_resultSet);
+ final XRowUpdate updRow = UnoRuntime.queryInterface( XRowUpdate.class, m_resultSet );
updRow.updateString(2, TEST21);
testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), pRow, moves, null);
moves[RowSetEventListener.IS_MODIFIED] = false;
final Class cupd = Class.forName("com.sun.star.sdbc.XResultSetUpdate");
- final XResultSetUpdate upd = (XResultSetUpdate) UnoRuntime.queryInterface(XResultSetUpdate.class, m_resultSet);
+ final XResultSetUpdate upd = UnoRuntime.queryInterface( XResultSetUpdate.class, m_resultSet );
testCursorMove(upd, cupd.getMethod("moveToInsertRow", (Class[]) null), pRow, moves, null);
updRow.updateInt(1, MAX_TABLE_ROWS + 2);
@@ -536,7 +532,7 @@ public class RowSet extends ComplexTestCase
moves[RowSetEventListener.ROW_COUNT] = true;
final Class cdelRows = Class.forName("com.sun.star.sdbcx.XDeleteRows");
ctemp[0] = Object[].class;
- final XDeleteRows delRows = (XDeleteRows) UnoRuntime.queryInterface(XDeleteRows.class, m_resultSet);
+ final XDeleteRows delRows = UnoRuntime.queryInterface( XDeleteRows.class, m_resultSet );
final Object bookmarks[] = new Object[5];
m_resultSet.first();
for (int i = 0; i < bookmarks.length; ++i)
@@ -549,7 +545,7 @@ public class RowSet extends ComplexTestCase
testCursorMove(delRows, cdelRows.getMethod("deleteRows", ctemp), pRow, moves, temp);
// now destroy the RowSet
- final XComponent xComp = (XComponent) UnoRuntime.queryInterface(XComponent.class, m_resultSet);
+ final XComponent xComp = UnoRuntime.queryInterface( XComponent.class, m_resultSet );
xComp.dispose();
}
@@ -715,7 +711,7 @@ public class RowSet extends ComplexTestCase
positionRandom();
final Object deleteBookmark = m_rowLocate.getBookmark();
m_resultSetUpdate.deleteRow();
- final XDeleteRows multiDelete = (XDeleteRows) UnoRuntime.queryInterface(XDeleteRows.class, m_resultSet);
+ final XDeleteRows multiDelete = UnoRuntime.queryInterface( XDeleteRows.class, m_resultSet );
final int[] deleteSuccess = multiDelete.deleteRows(new Object[]
{
firstBookmark, deleteBookmark
@@ -745,7 +741,7 @@ public class RowSet extends ComplexTestCase
// .....................................................................................................
// updating values in a deleted row should fail
deleteRandom();
- final XRowUpdate rowUpdated = (XRowUpdate) UnoRuntime.queryInterface(XRowUpdate.class, m_resultSet);
+ final XRowUpdate rowUpdated = UnoRuntime.queryInterface( XRowUpdate.class, m_resultSet );
caughtException = false;
try
{
@@ -762,6 +758,7 @@ public class RowSet extends ComplexTestCase
/** checks whether deletions on the main RowSet properly interfere (or don't interfere) with the movement
* on a clone of the RowSet
*/
+ @SuppressWarnings("empty-statement")
public void testCloneMovesPlusDeletions() throws SQLException, UnknownPropertyException, WrappedTargetException
{
createTestCase(true);
@@ -769,7 +766,7 @@ public class RowSet extends ComplexTestCase
m_resultSet.last();
final XResultSet clone = createClone();
- final XRowLocate cloneRowLocate = (XRowLocate) UnoRuntime.queryInterface(XRowLocate.class, clone);
+ final XRowLocate cloneRowLocate = UnoRuntime.queryInterface( XRowLocate.class, clone );
positionRandom();
@@ -837,7 +834,7 @@ public class RowSet extends ComplexTestCase
m_rowSetProperties.setPropertyValue("FetchSize", Integer.valueOf(10));
final XResultSet clone = createClone();
- final XRow cloneRow = (XRow) UnoRuntime.queryInterface(XRow.class, clone);
+ final XRow cloneRow = UnoRuntime.queryInterface( XRow.class, clone );
// .....................................................................................................
// first check the basic scenario without the |moveToInsertRow| |moveToCurrentRow|, to ensure that
@@ -893,8 +890,7 @@ public class RowSet extends ComplexTestCase
{
createRowSet("SELECT * FROM \"customers\"", CommandType.COMMAND, true);
m_rowSetProperties.setPropertyValue("Command", "SELECT * FROM \"customers\" WHERE \"City\" = :city");
- final XParameters rowsetParams = (XParameters) UnoRuntime.queryInterface(XParameters.class,
- m_rowSet);
+ final XParameters rowsetParams = UnoRuntime.queryInterface( XParameters.class, m_rowSet );
rowsetParams.setString(1, "London");
m_rowSet.execute();
}
@@ -921,8 +917,7 @@ public class RowSet extends ComplexTestCase
for (int i = 0; i < expected; ++i)
{
- final XPropertySet parameter = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
- params.getByIndex(i));
+ final XPropertySet parameter = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( i ) );
final String expectedName = _paramNames[i];
final String foundName = (String) parameter.getPropertyValue("Name");
@@ -959,12 +954,11 @@ public class RowSet extends ComplexTestCase
createRowSet("products like", CommandType.QUERY, false);
// let's fill in a parameter value via XParameters, and see whether it is respected by the parameters container
- final XParameters rowsetParams = (XParameters) UnoRuntime.queryInterface(XParameters.class,
- m_rowSet);
+ final XParameters rowsetParams = UnoRuntime.queryInterface(XParameters.class, m_rowSet);
rowsetParams.setString(1, "Apples");
XIndexAccess params = m_paramsSupplier.getParameters();
- XPropertySet firstParam = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, params.getByIndex(0));
+ XPropertySet firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) );
Object firstParamValue = firstParam.getPropertyValue("Value");
assure("XParameters and the parameters container do not properly interact",
@@ -978,7 +972,7 @@ public class RowSet extends ComplexTestCase
// the execution of the row set. It currently doesn't (though the values it represents do).
// It would be nice, but not strictly necessary, if it would.
params = m_paramsSupplier.getParameters();
- firstParam = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, params.getByIndex(0));
+ firstParam = UnoRuntime.queryInterface( XPropertySet.class, params.getByIndex( 0 ) );
}
firstParamValue = firstParam.getPropertyValue("Value");
assure("XParameters and the parameters container do not properly interact, after the row set has been executed",
diff --git a/dbaccess/qa/complex/dbaccess/TestCase.java b/dbaccess/qa/complex/dbaccess/TestCase.java
index 40370d9aeebd..e331ccc33e7c 100644
--- a/dbaccess/qa/complex/dbaccess/TestCase.java
+++ b/dbaccess/qa/complex/dbaccess/TestCase.java
@@ -29,8 +29,12 @@
************************************************************************/
package complex.dbaccess;
+import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
+import com.sun.star.frame.XComponentLoader;
+import com.sun.star.frame.XModel;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import helper.FileTools;
@@ -38,8 +42,6 @@ import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.net.URI;
-import java.net.URISyntaxException;
public abstract class TestCase extends complexlib.ComplexTestCase
{
@@ -55,8 +57,8 @@ public abstract class TestCase extends complexlib.ComplexTestCase
XComponentContext context = null;
try
{
- final XPropertySet orbProps = (XPropertySet) UnoRuntime.queryInterface( XPropertySet.class, getORB() );
- context = (XComponentContext)UnoRuntime.queryInterface( XComponentContext.class,
+ final XPropertySet orbProps = UnoRuntime.queryInterface( XPropertySet.class, getORB() );
+ context = UnoRuntime.queryInterface( XComponentContext.class,
orbProps.getPropertyValue( "DefaultContext" ) );
}
catch ( Exception ex )
@@ -109,6 +111,15 @@ public abstract class TestCase extends complexlib.ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
+ protected final XModel loadDocument( final String _docURL ) throws Exception
+ {
+ final XComponentLoader loader = UnoRuntime.queryInterface( XComponentLoader.class,
+ getORB().createInstance( "com.sun.star.frame.Desktop" ) );
+ return UnoRuntime.queryInterface( XModel.class,
+ loader.loadComponentFromURL( _docURL, "_blank", 0, new PropertyValue[] {} ) );
+ }
+
+ // --------------------------------------------------------------------------------------------------------
protected void assureException( Object _object, Class _unoInterfaceClass, String _methodName, Object[] _methodArgs,
Class _expectedExceptionClass )
{
diff --git a/dbaccess/qa/complex/dbaccess/UISettings.java b/dbaccess/qa/complex/dbaccess/UISettings.java
index 23fe10618810..92be58f28dd6 100644
--- a/dbaccess/qa/complex/dbaccess/UISettings.java
+++ b/dbaccess/qa/complex/dbaccess/UISettings.java
@@ -30,15 +30,17 @@
package complex.dbaccess;
import com.sun.star.awt.FontSlant;
-import com.sun.star.beans.PropertyValue;
+import com.sun.star.awt.TextAlign;
import com.sun.star.beans.XPropertySet;
-import com.sun.star.form.XFormController;
-import com.sun.star.frame.XComponentLoader;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.form.runtime.XFormController;
+import com.sun.star.frame.XController;
import com.sun.star.frame.XModel;
-import com.sun.star.lang.XComponent;
+import com.sun.star.sdb.application.DatabaseObject;
import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.util.XCloseable;
+import connectivity.tools.CRMDatabase;
public class UISettings extends TestCase
{
@@ -46,7 +48,8 @@ public class UISettings extends TestCase
public String[] getTestMethodNames()
{
return new String[] {
- "checkTableFormattingPersistence"
+ "checkTableFormattingPersistence",
+ "checkTransparentQueryColumnSettings"
};
}
@@ -61,25 +64,13 @@ public class UISettings extends TestCase
*/
public void checkTableFormattingPersistence() throws java.lang.Exception
{
- final CRMDatabase database = new CRMDatabase( getORB() );
-
- // load the document
- String docURL = database.getDatabase().getDocumentURL();
- final XComponentLoader loader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class,
- getORB().createInstance( "com.sun.star.frame.Desktop" ) );
- XModel doc = (XModel)UnoRuntime.queryInterface( XModel.class,
- loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );
-
- // establish the connection
- XDatabaseDocumentUI docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
- doc.getCurrentController() );
- docUI.connect();
-
- // display the table
- XComponent tableViewComp = docUI.loadComponent( com.sun.star.sdb.application.DatabaseObject.TABLE, "customers", false );
- XFormController tableViewController = (XFormController)UnoRuntime.queryInterface( XFormController.class,
- tableViewComp );
- XPropertySet tableControlModel = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class,
+ // create, load, and connect a DB doc
+ CRMDatabase database = new CRMDatabase( getORB(), true );
+
+ // display a table
+ XFormController tableViewController = UnoRuntime.queryInterface( XFormController.class,
+ database.loadSubComponent( DatabaseObject.TABLE, "customers" ) );
+ XPropertySet tableControlModel = UnoRuntime.queryInterface( XPropertySet.class,
tableViewController.getCurrentControl().getModel() );
// change the table's formatting
@@ -87,12 +78,10 @@ public class UISettings extends TestCase
tableControlModel.setPropertyValue( "FontHeight", Float.valueOf( 20 ) );
tableControlModel.setPropertyValue( "FontSlant", FontSlant.ITALIC );
- // close the table
- docUI.closeSubComponents();
+ String docURL = database.getDatabase().getModel().getURL();
- // save and close the database document
- database.getDatabase().store();
- database.close();
+ // save close the database document
+ database.saveAndClose();
// load a copy of the document
// normally, it should be sufficient to load the same doc. However, there might be objects in the Java VM
@@ -102,18 +91,13 @@ public class UISettings extends TestCase
// not cleaned up, the "database model impl" - the structure holding all document data - will
// stay alive, and subsequent requests to load the doc will just reuse it, without really loading it.
docURL = copyToTempFile( docURL );
- doc = (XModel)UnoRuntime.queryInterface( XModel.class,
- loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );
-
- docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
- doc.getCurrentController() );
- docUI.connect();
+ loadDocument( docURL );
+ database = new CRMDatabase( getORB(), docURL );
// display the table, again
- tableViewComp = docUI.loadComponent( com.sun.star.sdb.application.DatabaseObject.TABLE, "customers", false );
- tableViewController = (XFormController)UnoRuntime.queryInterface( XFormController.class,
- tableViewComp );
- tableControlModel = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class,
+ tableViewController = UnoRuntime.queryInterface( XFormController.class,
+ database.loadSubComponent( DatabaseObject.TABLE, "customers" ) );
+ tableControlModel = UnoRuntime.queryInterface( XPropertySet.class,
tableViewController.getCurrentControl().getModel() );
// verify the properties
@@ -122,9 +106,50 @@ public class UISettings extends TestCase
assureEquals( "wrong font slant", FontSlant.ITALIC, (FontSlant)tableControlModel.getPropertyValue( "FontSlant" ) );
// close the doc
- docUI.closeSubComponents();
- final XCloseable closeDoc = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,
- doc );
- closeDoc.close( true );
+ database.saveAndClose();
+ }
+
+ /**
+ * checks whether query columns use the settings of the underlying table column, if they do not (yet) have own
+ * settings
+ * @throws java.lang.Exception
+ */
+ public void checkTransparentQueryColumnSettings() throws java.lang.Exception
+ {
+ // create, load, and connect a DB doc
+ CRMDatabase database = new CRMDatabase( getORB(), true );
+
+ // display a table
+ XController tableView = database.loadSubComponent( DatabaseObject.TABLE, "customers" );
+ XFormController tableViewController = UnoRuntime.queryInterface( XFormController.class,
+ tableView );
+ XNameAccess tableControlModel = UnoRuntime.queryInterface( XNameAccess.class,
+ tableViewController.getCurrentControl().getModel() );
+
+ // change the formatting of a table column
+ XPropertySet idColumn = UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) );
+ assure( "precondition not met: column already centered",
+ ((Short)idColumn.getPropertyValue( "Align" )).shortValue() != TextAlign.CENTER );
+ idColumn.setPropertyValue( "Align", TextAlign.CENTER );
+
+ // close the table data view
+ XCloseable closeSubComponent = UnoRuntime.queryInterface( XCloseable.class, tableView.getFrame() );
+ closeSubComponent.close( true );
+
+ // create a query based on that column
+ database.getDatabase().getDataSource().createQuery( "q_customers", "SELECT * FROM \"customers\"" );
+
+ // load this query, and verify the table column settings was propagated to the query column
+ XFormController queryViewController = UnoRuntime.queryInterface( XFormController.class,
+ database.loadSubComponent( DatabaseObject.QUERY, "q_customers" ) );
+ tableControlModel = UnoRuntime.queryInterface( XNameAccess.class,
+ queryViewController.getCurrentControl().getModel() );
+ idColumn = UnoRuntime.queryInterface( XPropertySet.class, tableControlModel.getByName( "ID" ) );
+
+ assure( "table column alignment was not propagated to the query column",
+ ((Short)idColumn.getPropertyValue( "Align" )).shortValue() == TextAlign.CENTER );
+
+ // save close the database document
+ database.saveAndClose();
}
}
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx
index 63d287df08bd..127ee83aaf2c 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -270,7 +270,10 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet
case DataType::LONGVARBINARY:
_xParameter->updateBytes(nPos,_rValue);
break;
-
+ case DataType::BLOB:
+ case DataType::CLOB:
+ _xParameter->updateObject(nPos,_rValue.getAny());
+ break;
}
}
}
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index bc48a56ed3f0..0974963dfd72 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -31,186 +31,84 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
#include "apitools.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
-#include <comphelper/types.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
-#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef DBACCESS_CORE_API_CROWSETCOLUMN_HXX
#include "CRowSetColumn.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
+
#include <com/sun/star/sdb/XColumn.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
+#include <comphelper/types.hxx>
+#include <cppuhelper/typeprovider.hxx>
-using namespace dbaccess;
-// using namespace connectivity;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-// using namespace ::com::sun::star::util;
-using namespace cppu;
-using namespace osl;
+using namespace ::com::sun::star::beans;
+//..............................................................................
+namespace dbaccess
+{
+//..............................................................................
-// -------------------------------------------------------------------------
-//ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData,
-// const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
-// sal_Int32 _nPos,
-// ORowSetMatrix::iterator& _rColumnValue,
-// ORowSetMatrix::iterator& _rEnd)
-// : ORowSetDataColumn(_xMetaData,_xRow,NULL,_nPos,_rColumnValue,_rEnd)
-//{
-//
-//}
//------------------------------------------------------------------------------
-Any SAL_CALL ORowSetColumn::queryInterface( const Type & _rType ) throw (RuntimeException)
+ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData, const Reference < XRow >& _xRow, sal_Int32 _nPos,
+ const Reference< XDatabaseMetaData >& _rxDBMeta, const ::rtl::OUString& _rDescription, ORowSetCacheIterator& _rColumnValue )
+ :ORowSetDataColumn( _xMetaData, _xRow, NULL, _nPos, _rxDBMeta, _rDescription, _rColumnValue )
{
- Any aReturn = OResultColumn::queryInterface(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,static_cast< XColumn* >(this));
- return aReturn;
}
-// -------------------------------------------------------------------------
-// comphelper::OPropertyArrayUsageHelper
+
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(30)
- DECL_PROP2(ALIGN, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP1(CATALOGNAME, ::rtl::OUString, READONLY);
- DECL_PROP2(CONTROLDEFAULT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet, BOUND );
- DECL_PROP1(DISPLAYSIZE, sal_Int32, READONLY);
- DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP2(HELPTEXT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_BOOL(HIDDEN, BOUND);
- DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
- DECL_PROP1_BOOL(ISCASESENSITIVE, READONLY);
- DECL_PROP1_BOOL(ISCURRENCY, READONLY);
- DECL_PROP1_BOOL(ISDEFINITELYWRITABLE, READONLY);
- DECL_PROP1(ISNULLABLE, sal_Int32, READONLY);
- DECL_PROP1_BOOL(ISREADONLY, READONLY);
- DECL_PROP1_BOOL(ISROWVERSION, READONLY);
- DECL_PROP1_BOOL(ISSEARCHABLE, READONLY);
- DECL_PROP1_BOOL(ISSIGNED, READONLY);
- DECL_PROP1_BOOL(ISWRITABLE, READONLY);
- DECL_PROP1(LABEL, ::rtl::OUString, READONLY);
- DECL_PROP1(NAME, ::rtl::OUString, READONLY);
- DECL_PROP1(PRECISION, sal_Int32, READONLY);
- DECL_PROP2(RELATIVEPOSITION, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP1(SCALE, sal_Int32, READONLY);
- DECL_PROP1(SCHEMANAME, ::rtl::OUString, READONLY);
- DECL_PROP1(SERVICENAME, ::rtl::OUString, READONLY);
- DECL_PROP1(TABLENAME, ::rtl::OUString, READONLY);
- DECL_PROP1(TYPE, sal_Int32, READONLY);
- DECL_PROP1(TYPENAME, ::rtl::OUString, READONLY);
- DECL_PROP2(VALUE, Any, READONLY,BOUND);
- DECL_PROP1(WIDTH, sal_Int32, MAYBEVOID);
- END_PROPERTY_HELPER();
+ const sal_Int32 nDerivedProperties = 21;
+ Sequence< Property> aDerivedProperties( nDerivedProperties );
+ Property* pDesc = aDerivedProperties.getArray();
+ sal_Int32 nPos = 0;
+
+ DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( DISPLAYSIZE, sal_Int32, READONLY );
+ DECL_PROP1_BOOL( ISAUTOINCREMENT, READONLY );
+ DECL_PROP1_BOOL( ISCASESENSITIVE, READONLY );
+ DECL_PROP1_BOOL( ISCURRENCY, READONLY );
+ DECL_PROP1_BOOL( ISDEFINITELYWRITABLE, READONLY );
+ DECL_PROP1( ISNULLABLE, sal_Int32, READONLY );
+ DECL_PROP1_BOOL( ISREADONLY, READONLY );
+ DECL_PROP1_BOOL( ISROWVERSION, READONLY );
+ DECL_PROP1_BOOL( ISSEARCHABLE, READONLY );
+ DECL_PROP1_BOOL( ISSIGNED, READONLY );
+ DECL_PROP1_BOOL( ISWRITABLE, READONLY );
+ DECL_PROP1( LABEL, ::rtl::OUString, READONLY );
+ DECL_PROP1( PRECISION, sal_Int32, READONLY );
+ DECL_PROP1( SCALE, sal_Int32, READONLY );
+ DECL_PROP1( SCHEMANAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( SERVICENAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( TABLENAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( TYPE, sal_Int32, READONLY );
+ DECL_PROP1( TYPENAME, ::rtl::OUString, READONLY );
+ DECL_PROP2( VALUE, Any, READONLY, BOUND );
+ OSL_ENSURE( nPos == nDerivedProperties, "ORowSetColumn::createArrayHelper: inconsistency!" );
+
+ Sequence< Property > aRegisteredProperties;
+ describeProperties( aRegisteredProperties );
+
+ return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
}
-// cppu::OPropertySetHelper
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ORowSetColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn >* >(this)->getArrayHelper();
}
-// -------------------------------------------------------------------------
-void SAL_CALL ORowSetColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
-{
- switch(nHandle)
- {
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- OColumnSettings::getFastPropertyValue( rValue, nHandle );
- break;
- case PROPERTY_ID_VALUE:
- if ( !m_aColumnValue.isNull() && (*m_aColumnValue).isValid() )
- rValue = ((*m_aColumnValue)->get())[m_nPos].makeAny();
- break;
- default:
- ORowSetDataColumn::getFastPropertyValue(rValue,nHandle);
- }
-}
-// -------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue )throw (Exception)
{
- switch(nHandle)
- {
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- break;
- case PROPERTY_ID_VALUE:
- break;
- default:
- ORowSetDataColumn::setFastPropertyValue_NoBroadcast(nHandle,rValue );
- }
+ OSL_ENSURE( nHandle != PROPERTY_ID_VALUE, "ORowSetColumn::setFastPropertyValue_NoBroadcast: hmm? This property is marked as READONLY!" );
+ if ( nHandle != PROPERTY_ID_VALUE )
+ ORowSetDataColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
-// -------------------------------------------------------------------------
-sal_Bool SAL_CALL ORowSetColumn::convertFastPropertyValue( Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue ) throw (IllegalArgumentException)
-{
- sal_Bool bModified = sal_False;
- switch(nHandle)
- {
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
- break;
- case PROPERTY_ID_VALUE:
- rConvertedValue = rValue;
- getFastPropertyValue(rOldValue, PROPERTY_ID_VALUE);
- bModified = !::comphelper::compare(rConvertedValue, rOldValue);
- break;
- default:
- bModified = ORowSetDataColumn::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
-
- }
- return bModified;
-}
-// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
-Sequence< Type > ORowSetColumn::getTypes() throw (RuntimeException)
-{
- OTypeCollection aTypes(::getCppuType( (const Reference< XColumn > *)0 ),OColumn::getTypes());
- return aTypes.getTypes();
-}
-//--------------------------------------------------------------------------
+//..............................................................................
+} // namespace dbaccess
+//..............................................................................
diff --git a/dbaccess/source/core/api/CRowSetColumn.hxx b/dbaccess/source/core/api/CRowSetColumn.hxx
index 06b701f42601..45d71d8e513a 100644
--- a/dbaccess/source/core/api/CRowSetColumn.hxx
+++ b/dbaccess/source/core/api/CRowSetColumn.hxx
@@ -46,11 +46,9 @@
namespace dbaccess
{
class ORowSetColumn;
- typedef ::comphelper::OPropertyArrayUsageHelper<ORowSetColumn> ORowSetColumn_PROP;
+ class ORowSetColumn :public ORowSetDataColumn
+ ,public ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn >
- // -------------------------------------------------------------------------
- class ORowSetColumn : public ORowSetColumn_PROP,
- public ORowSetDataColumn
{
public:
ORowSetColumn( const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
@@ -58,34 +56,13 @@ namespace dbaccess
sal_Int32 _nPos,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta,
const ::rtl::OUString& _rDescription,
- ORowSetCacheIterator& _rColumnValue)
- : ORowSetDataColumn(_xMetaData,_xRow,NULL,_nPos,_rxDBMeta,_rDescription,_rColumnValue)
- {
- }
+ ORowSetCacheIterator& _rColumnValue);
- // com::sun::star::lang::XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
-
- // com::sun::star::uno::XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException);
-
- // comphelper::OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
-
- // cppu::OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-
- virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue,
- ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException);
- virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue )throw (::com::sun::star::uno::Exception);
-
- protected:
- using ORowSetDataColumn::getFastPropertyValue;
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue )throw (::com::sun::star::uno::Exception );
};
}
-#endif // DBACCESS_CORE_API_CROWSETCOLUMN_HXX
+#endif // DBACCESS_CORE_API_CROWSETCOLUMN_HXX
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index 3205d343f83b..ae78b8af7817 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -75,11 +75,13 @@ ORowSetDataColumn::ORowSetDataColumn( const Reference < XResultSetMetaData >&
const Reference< XDatabaseMetaData >& _rxDBMeta,
const ::rtl::OUString& _rDescription,
const ORowSetCacheIterator& _rColumnValue)
- : ODataColumn(_xMetaData,_xRow,_xRowUpdate,_nPos,_rxDBMeta)
+ :ODataColumn(_xMetaData,_xRow,_xRowUpdate,_nPos,_rxDBMeta)
,m_aColumnValue(_rColumnValue)
,m_aDescription(_rDescription)
{
DBG_CTOR(ORowSetDataColumn,NULL);
+ OColumnSettings::registerProperties( *this );
+ registerProperty( PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, PropertyAttribute::READONLY, &m_aDescription, ::getCppuType( &m_aDescription ) );
}
// -------------------------------------------------------------------------
ORowSetDataColumn::~ORowSetDataColumn()
@@ -91,39 +93,38 @@ ORowSetDataColumn::~ORowSetDataColumn()
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(31)
- DECL_PROP2(ALIGN, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP1(CATALOGNAME, ::rtl::OUString, READONLY);
- DECL_PROP2(CONTROLDEFAULT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet, BOUND );
- DECL_PROP1(DESCRIPTION, ::rtl::OUString, READONLY);
- DECL_PROP1(DISPLAYSIZE, sal_Int32, READONLY);
- DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP2(HELPTEXT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_BOOL(HIDDEN, BOUND);
- DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
- DECL_PROP1_BOOL(ISCASESENSITIVE, READONLY);
- DECL_PROP1_BOOL(ISCURRENCY, READONLY);
- DECL_PROP1_BOOL(ISDEFINITELYWRITABLE, READONLY);
- DECL_PROP1(ISNULLABLE, sal_Int32, READONLY);
- DECL_PROP1_BOOL(ISREADONLY, READONLY);
- DECL_PROP1_BOOL(ISROWVERSION, READONLY);
- DECL_PROP1_BOOL(ISSEARCHABLE, READONLY);
- DECL_PROP1_BOOL(ISSIGNED, READONLY);
- DECL_PROP1_BOOL(ISWRITABLE, READONLY);
- DECL_PROP1(LABEL, ::rtl::OUString, READONLY);
- DECL_PROP1(NAME, ::rtl::OUString, READONLY);
- DECL_PROP1(PRECISION, sal_Int32, READONLY);
- DECL_PROP2(RELATIVEPOSITION, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP1(SCALE, sal_Int32, READONLY);
- DECL_PROP1(SCHEMANAME, ::rtl::OUString, READONLY);
- DECL_PROP1(SERVICENAME, ::rtl::OUString, READONLY);
- DECL_PROP1(TABLENAME, ::rtl::OUString, READONLY);
- DECL_PROP1(TYPE, sal_Int32, READONLY);
- DECL_PROP1(TYPENAME, ::rtl::OUString, READONLY);
- DECL_PROP1(VALUE, Any, BOUND);
- DECL_PROP1(WIDTH, sal_Int32, MAYBEVOID);
- END_PROPERTY_HELPER();
+ const sal_Int32 nDerivedProperties = 21;
+ Sequence< Property> aDerivedProperties( nDerivedProperties );
+ Property* pDesc = aDerivedProperties.getArray();
+ sal_Int32 nPos = 0;
+
+ DECL_PROP1( CATALOGNAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( DISPLAYSIZE, sal_Int32, READONLY );
+ DECL_PROP1_BOOL( ISAUTOINCREMENT, READONLY );
+ DECL_PROP1_BOOL( ISCASESENSITIVE, READONLY );
+ DECL_PROP1_BOOL( ISCURRENCY, READONLY );
+ DECL_PROP1_BOOL( ISDEFINITELYWRITABLE, READONLY );
+ DECL_PROP1( ISNULLABLE, sal_Int32, READONLY );
+ DECL_PROP1_BOOL( ISREADONLY, READONLY );
+ DECL_PROP1_BOOL( ISROWVERSION, READONLY );
+ DECL_PROP1_BOOL( ISSEARCHABLE, READONLY );
+ DECL_PROP1_BOOL( ISSIGNED, READONLY );
+ DECL_PROP1_BOOL( ISWRITABLE, READONLY );
+ DECL_PROP1( LABEL, ::rtl::OUString, READONLY );
+ DECL_PROP1( PRECISION, sal_Int32, READONLY );
+ DECL_PROP1( SCALE, sal_Int32, READONLY );
+ DECL_PROP1( SCHEMANAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( SERVICENAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( TABLENAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( TYPE, sal_Int32, READONLY );
+ DECL_PROP1( TYPENAME, ::rtl::OUString, READONLY );
+ DECL_PROP1( VALUE, Any, BOUND );
+ OSL_ENSURE( nPos == nDerivedProperties, "ORowSetDataColumn::createArrayHelper: inconsistency!" );
+
+ Sequence< Property > aRegisteredProperties;
+ describeProperties( aRegisteredProperties );
+
+ return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
}
// cppu::OPropertySetHelper
@@ -135,57 +136,33 @@ ORowSetDataColumn::~ORowSetDataColumn()
// -------------------------------------------------------------------------
void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
- switch(nHandle)
+ if ( PROPERTY_ID_VALUE == nHandle )
{
- case PROPERTY_ID_DESCRIPTION:
- rValue <<= m_aDescription;
- break;
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- OColumnSettings::getFastPropertyValue( rValue, nHandle );
- break;
- case PROPERTY_ID_VALUE:
- if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() )
- {
- ::osl::Mutex* pMutex = m_aColumnValue.getMutex();
- ::osl::MutexGuard aGuard( *pMutex );
+ if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() )
+ {
+ ::osl::Mutex* pMutex = m_aColumnValue.getMutex();
+ ::osl::MutexGuard aGuard( *pMutex );
#if OSL_DEBUG_LEVEL > 0
- ORowSetRow aRow = *m_aColumnValue;
+ ORowSetRow aRow = *m_aColumnValue;
#endif
- OSL_ENSURE((sal_Int32)aRow->get().size() > m_nPos,"Pos is greater than size of vector");
- rValue = ((*m_aColumnValue)->get())[m_nPos].makeAny();
- }
- break;
- default:
- ODataColumn::getFastPropertyValue(rValue,nHandle);
+ OSL_ENSURE((sal_Int32)aRow->get().size() > m_nPos,"Pos is greater than size of vector");
+ rValue = ((*m_aColumnValue)->get())[m_nPos].makeAny();
+ }
}
+ else
+ ODataColumn::getFastPropertyValue( rValue, nHandle );
}
+
// -------------------------------------------------------------------------
void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue )throw (Exception)
{
- switch(nHandle)
+ if ( PROPERTY_ID_VALUE == nHandle )
+ {
+ updateObject(rValue);
+ }
+ else
{
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- break;
- case PROPERTY_ID_VALUE:
- updateObject(rValue);
- break;
- default:
- ODataColumn::setFastPropertyValue_NoBroadcast(nHandle,rValue );
+ ODataColumn::setFastPropertyValue_NoBroadcast( nHandle,rValue );
}
}
// -------------------------------------------------------------------------
@@ -195,27 +172,14 @@ sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedV
const Any& rValue ) throw (IllegalArgumentException)
{
sal_Bool bModified = sal_False;
- switch(nHandle)
+ if ( PROPERTY_ID_VALUE == nHandle )
{
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
- break;
- case PROPERTY_ID_VALUE:
- rConvertedValue = rValue;
- getFastPropertyValue(rOldValue, PROPERTY_ID_VALUE);
- bModified = !::comphelper::compare(rConvertedValue, rOldValue);
- break;
- default:
- bModified = ODataColumn::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
-
+ rConvertedValue = rValue;
+ getFastPropertyValue(rOldValue, PROPERTY_ID_VALUE);
+ bModified = rConvertedValue != rOldValue;
}
+ else
+ bModified = ODataColumn::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
return bModified;
}
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx
index 93b812815676..ceec7344737c 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.hxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx
@@ -30,21 +30,13 @@
#ifndef DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
#define DBACCESS_CORE_API_CROWSETDATACOLUMN_HXX
-#ifndef _DBACORE_DATACOLUMN_HXX_
#include "datacolumn.hxx"
-#endif
-#ifndef DBACCESS_CORE_API_ROWSETROW_HXX
#include "RowSetRow.hxx"
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
+#include "RowSetCacheIterator.hxx"
+#include "columnsettings.hxx"
+
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef DBACCESS_ROWSETCACHEITERATOR_HXX
-#include "RowSetCacheIterator.hxx"
-#endif
namespace dbaccess
{
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index bbb080a52238..f7be322caa1a 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -515,88 +515,7 @@ void OCacheSet::setParameter(sal_Int32 nPos
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::setParameter" );
sal_Int32 nType = ( _nType != DataType::OTHER ) ? _nType : _rValue.getTypeKind();
- if(!_rValue.isNull())
- {
-
- switch(nType)
- {
- case DataType::DECIMAL:
- case DataType::NUMERIC:
- _xParameter->setObjectWithInfo(nPos,_rValue.makeAny(),nType,_nScale);
- break;
- case DataType::CHAR:
- case DataType::VARCHAR:
- case DataType::LONGVARCHAR:
- _xParameter->setString(nPos,_rValue);
- break;
- case DataType::BIGINT:
- if ( _rValue.isSigned() )
- _xParameter->setLong(nPos,_rValue);
- else
- _xParameter->setString(nPos,_rValue);
- break;
- case DataType::BIT:
- case DataType::BOOLEAN:
- _xParameter->setBoolean(nPos,_rValue);
- break;
- case DataType::TINYINT:
- if ( _rValue.isSigned() )
- _xParameter->setByte(nPos,_rValue);
- else
- _xParameter->setShort(nPos,_rValue);
- break;
- case DataType::SMALLINT:
- if ( _rValue.isSigned() )
- _xParameter->setShort(nPos,_rValue);
- else
- _xParameter->setInt(nPos,_rValue);
- break;
- case DataType::INTEGER:
- if ( _rValue.isSigned() )
- _xParameter->setInt(nPos,_rValue);
- else
- _xParameter->setLong(nPos,_rValue);
- break;
- case DataType::FLOAT:
- _xParameter->setFloat(nPos,_rValue);
- break;
- case DataType::DOUBLE:
- case DataType::REAL:
- _xParameter->setDouble(nPos,_rValue);
- break;
- case DataType::DATE:
- _xParameter->setDate(nPos,_rValue);
- break;
- case DataType::TIME:
- _xParameter->setTime(nPos,_rValue);
- break;
- case DataType::TIMESTAMP:
- _xParameter->setTimestamp(nPos,_rValue);
- break;
- case DataType::BINARY:
- case DataType::VARBINARY:
- case DataType::LONGVARBINARY:
- _xParameter->setBytes(nPos,_rValue);
- break;
- case DataType::CLOB:
- {
- Reference<XInputStream> xStream(_rValue.getAny(),UNO_QUERY);
- _xParameter->setCharacterStream(nPos,xStream,xStream.is() ? xStream->available() : sal_Int32(0));
- }
- break;
- case DataType::BLOB:
- {
- Reference<XInputStream> xStream(_rValue.getAny(),UNO_QUERY);
- _xParameter->setBinaryStream(nPos,xStream,xStream.is() ? xStream->available() : sal_Int32(0));
- }
- break;
- case DataType::SQLNULL:
- _xParameter->setNull(nPos,nType);
- break;
- }
- }
- else
- _xParameter->setNull(nPos,nType);
+ ::dbtools::setObjectWithInfo(_xParameter,nPos,_rValue,nType,_nScale);
}
// -------------------------------------------------------------------------
void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index b3e815928bff..f028dba66ae0 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -211,8 +211,33 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet)
Reference<XColumnsSupplier> xSup(m_xComposer,UNO_QUERY);
Reference<XNameAccess> xSourceColumns = m_xTable->getColumns();
- ::dbaccess::getColumnPositions(xSup->getColumns(),xKeyColumns,m_sUpdateTableName,(*m_pKeyColumnNames));
- ::dbaccess::getColumnPositions(xSup->getColumns(),xSourceColumns,m_sUpdateTableName,(*m_pColumnNames));
+ ::rtl::OUString sCatalog,sSchema,sTable;
+
+ Reference<XPropertySet> xTableProp(m_xTable,UNO_QUERY);
+ Any aCatalog = xTableProp->getPropertyValue(PROPERTY_CATALOGNAME);
+ aCatalog >>= sCatalog;
+ xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
+ xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable;
+
+ ::std::vector< ::rtl::OUString> aBestRowColumnNames;
+ Reference<XResultSet> xBestRes(xMeta->getBestRowIdentifier(aCatalog,sSchema,sTable,0,sal_False));
+ Reference<XRow> xBestRow(xBestRes,uno::UNO_QUERY);
+ while ( xBestRes->next() )
+ {
+ aBestRowColumnNames.push_back(xBestRow->getString(2));
+ }
+
+ Sequence< ::rtl::OUString> aBestColumnNames;
+ if ( aBestRowColumnNames.empty() )
+ {
+ if ( xKeyColumns.is() )
+ aBestColumnNames = xKeyColumns->getElementNames();
+ }
+ else
+ aBestColumnNames = Sequence< ::rtl::OUString>(&aBestRowColumnNames[0],aBestRowColumnNames.size());
+
+ ::dbaccess::getColumnPositions(xSup->getColumns(),aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames));
+ ::dbaccess::getColumnPositions(xSup->getColumns(),xSourceColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames));
SelectColumnsMetaData::const_iterator aPosIter = (*m_pKeyColumnNames).begin();
SelectColumnsMetaData::const_iterator aPosEnd = (*m_pKeyColumnNames).end();
@@ -235,16 +260,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet)
static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
- ::rtl::OUString aQuote = getIdentifierQuoteString();
-
- ::rtl::OUStringBuffer aFilter;
- ::rtl::OUString sCatalog,sSchema,sTable;
-
- Reference<XPropertySet> xTableProp(m_xTable,UNO_QUERY);
- xTableProp->getPropertyValue(PROPERTY_CATALOGNAME) >>= sCatalog;
- xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
- xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable;
-
+ const ::rtl::OUString aQuote = getIdentifierQuoteString();
m_aSelectComposedTableName = getComposedTableName(sCatalog,sSchema,sTable);
::rtl::OUString sComposedName;
@@ -252,6 +268,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet)
::dbtools::qualifiedNameComponents(xMetaData,m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation );
+ ::rtl::OUStringBuffer aFilter;
static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM("."));
static ::rtl::OUString s_sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
// create the where clause
@@ -286,21 +303,20 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet)
::rtl::OUString sSelectTableName = ::dbtools::composeTableName( xMetaData, xProp, ::dbtools::eInDataManipulation, false, false, false );
Reference<XNameAccess > xSelectColumns = xSup->getColumns();
- ::dbaccess::getColumnPositions(xSelectColumns,xSelColSup->getColumns(),sSelectTableName,(*m_pForeignColumnNames));
+ ::dbaccess::getColumnPositions(xSelectColumns,xSelColSup->getColumns()->getElementNames(),sSelectTableName,(*m_pForeignColumnNames));
- uno::Sequence< ::rtl::OUString> aSelectColumnNames = xSelectColumns->getElementNames();
- const ::rtl::OUString* pSelectColumnName = aSelectColumnNames.getConstArray();
- const ::rtl::OUString* pSelectColumnEnd = pSelectColumnName + aSelectColumnNames.getLength();
- for( ; pSelectColumnName != pSelectColumnEnd ; ++pSelectColumnName)
+ aPosEnd = (*m_pForeignColumnNames).end();
+ for(aPosIter = (*m_pForeignColumnNames).begin();aPosIter != aPosEnd;++aPosIter)
{
// look for columns not in the source columns to use them as filter as well
- if ( !xSourceColumns->hasByName(*pSelectColumnName) )
+ // if ( !xSourceColumns->hasByName(aPosIter->first) )
{
+ if ( aFilter.getLength() )
+ aFilter.append(aAnd);
+ aFilter.append(::dbtools::quoteName( aQuote,sSelectTableName));
aFilter.append(s_sDot);
- aFilter.append(::dbtools::quoteName( aQuote,*pSelectColumnName));
+ aFilter.append(::dbtools::quoteName( aQuote,aPosIter->first));
aFilter.append(s_sParam);
- if ( (pSelectColumnName+1) != pSelectColumnEnd )
- aFilter.append(aAnd);
}
}
break;
@@ -311,8 +327,8 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet)
if ( sOldFilter.getLength() )
{
FilterCreator aFilterCreator;
- aFilterCreator.append( aFilter.makeStringAndClear() );
aFilterCreator.append( sOldFilter );
+ aFilterCreator.append( aFilter.makeStringAndClear() );
aFilter = aFilterCreator.getComposedAndClear();
}
xAnalyzer->setFilter(aFilter.makeStringAndClear());
@@ -502,7 +518,8 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
for(;aIter != aEnd;++aIter,++i)
{
- if(xKeyColumns.is() && xKeyColumns->hasByName(aIter->first))
+ //if(xKeyColumns.is() && xKeyColumns->hasByName(aIter->first))
+ if ( m_pKeyColumnNames->find(aIter->first) != m_pKeyColumnNames->end() )
{
sKeyCondition.append(::dbtools::quoteName( aQuote,aIter->first));
if((_rOrginalRow->get())[aIter->second.nPosition].isNull())
@@ -597,7 +614,8 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
::std::vector<sal_Int32>::iterator aIdxColIter = aIndexColumnPositions.begin();
::std::vector<sal_Int32>::iterator aIdxColEnd = aIndexColumnPositions.end();
j = 0;
- for(;aIdxColIter != aIdxColEnd;++aIdxColIter,++i,++j)
+ aIter = m_pColumnNames->begin();
+ for(;aIdxColIter != aIdxColEnd;++aIdxColIter,++i,++j,++aIter)
{
setParameter(i,xParameter,(_rOrginalRow->get())[*aIdxColIter],(_rOrginalRow->get())[*aIdxColIter].getTypeKind(),aIter->second.nScale);
}
@@ -829,7 +847,7 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
sal_Int32 i = 1;
for(i = 1;aIter != aEnd;++aIter,++i)
{
- if(xKeyColumns.is() && xKeyColumns->hasByName(aIter->first))
+ if ( m_pKeyColumnNames->find(aIter->first) != m_pKeyColumnNames->end() )
{
aSql.append(::dbtools::quoteName( aQuote,aIter->first));
if((_rDeleteRow->get())[aIter->second.nPosition].isNull())
@@ -882,7 +900,8 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
// now we have to set the index values
::std::vector<sal_Int32>::iterator aIdxColIter = aIndexColumnPositions.begin();
::std::vector<sal_Int32>::iterator aIdxColEnd = aIndexColumnPositions.end();
- for(;aIdxColIter != aIdxColEnd;++aIdxColIter,++i)
+ aIter = m_pColumnNames->begin();
+ for(;aIdxColIter != aIdxColEnd;++aIdxColIter,++i,++aIter)
{
setParameter(i,xParameter,(_rDeleteRow->get())[*aIdxColIter],(_rDeleteRow->get())[*aIdxColIter].getTypeKind(),aIter->second.nScale);
}
@@ -1397,7 +1416,7 @@ sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
namespace dbaccess
{
void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
- const Reference<XNameAccess>& _rxColumns,
+ const Sequence< ::rtl::OUString>& _aColumnNames,
const ::rtl::OUString& _rsUpdateTableName,
SelectColumnsMetaData& _rColumnNames)
{
@@ -1406,9 +1425,8 @@ namespace dbaccess
const ::rtl::OUString* pSelBegin = aSelNames.getConstArray();
const ::rtl::OUString* pSelEnd = pSelBegin + aSelNames.getLength();
- Sequence< ::rtl::OUString> aColumnNames(_rxColumns->getElementNames());
- const ::rtl::OUString* pColumnIter = aColumnNames.getConstArray();
- const ::rtl::OUString* pColumnEnd = pColumnIter + aColumnNames.getLength();
+ const ::rtl::OUString* pColumnIter = _aColumnNames.getConstArray();
+ const ::rtl::OUString* pColumnEnd = pColumnIter + _aColumnNames.getLength();
::comphelper::UStringMixLess aTmp(_rColumnNames.key_comp());
::comphelper::UStringMixEqual bCase(static_cast< ::comphelper::UStringMixLess*>(&aTmp)->isCaseSensitive());
@@ -1442,7 +1460,7 @@ namespace dbaccess
break;
}
}
- pColumnIter = aColumnNames.getConstArray();
+ pColumnIter = _aColumnNames.getConstArray();
}
}
}
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index 4193f60506d1..7a213d05b466 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -83,7 +83,7 @@ namespace dbaccess
// the elements of _rxQueryColumns must have the properties PROPERTY_REALNAME and PROPERTY_TABLENAME
void getColumnPositions(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxQueryColumns,
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString>& _aColumnNames,
const ::rtl::OUString& _rsUpdateTableName,
SelectColumnsMetaData& _rColumnNames /* out */);
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index d3df4552126c..18d8398c8233 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -74,6 +74,7 @@
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
#include <comphelper/uno3.hxx>
+#include <connectivity/BlobHelper.hxx>
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbtools.hxx>
@@ -713,7 +714,18 @@ void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
// XRowUpdate
void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
- updateValue(columnIndex,ORowSetValue());
+ ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
+
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ checkUpdateConditions(columnIndex);
+ checkUpdateIterator();
+
+ ::connectivity::ORowSetValue aOldValue(((*m_aCurrentRow)->get())[columnIndex]);
+ m_pCache->updateNull(columnIndex);
+ // we have to notify all listeners
+ ((*m_aCurrentRow)->get())[columnIndex].setNull();
+ firePropertyChange(columnIndex-1 ,aOldValue);
+ fireProperty(PROPERTY_ID_ISMODIFIED,sal_True,sal_False);
}
// -------------------------------------------------------------------------
void SAL_CALL ORowSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
@@ -785,25 +797,23 @@ void SAL_CALL ORowSet::updateBinaryStream( sal_Int32 columnIndex, const Referenc
checkUpdateConditions(columnIndex);
checkUpdateIterator();
- ::connectivity::ORowSetValue aOldValue;
- if(((*m_aCurrentRow)->get())[columnIndex].getTypeKind() == DataType::BLOB)
- {
- m_pCache->updateBinaryStream(columnIndex,x,length);
- aOldValue = ((*m_aCurrentRow)->get())[columnIndex];
- ((*m_aCurrentRow)->get())[columnIndex] = makeAny(x);
- }
- else
+
+ //if(((*m_aCurrentRow)->get())[columnIndex].getTypeKind() == DataType::BLOB)
+ //{
+ // ::connectivity::ORowSetValue aOldValue = ((*m_aCurrentRow)->get())[columnIndex];
+ // m_pCache->updateBinaryStream(columnIndex,x,length);
+ // ((*m_aCurrentRow)->get())[columnIndex] = makeAny(x);
+ // ((*m_aCurrentRow)->get())[columnIndex].setTypeKind(DataType::BLOB);
+ // firePropertyChange(columnIndex-1 ,aOldValue);
+ // fireProperty(PROPERTY_ID_ISMODIFIED,sal_True,sal_False);
+ //}
+ //else
{
Sequence<sal_Int8> aSeq;
if(x.is())
x->readBytes(aSeq,length);
updateValue(columnIndex,aSeq);
- aOldValue = ((*m_aCurrentRow)->get())[columnIndex];
- ((*m_aCurrentRow)->get())[columnIndex] = aSeq;
}
-
- firePropertyChange(columnIndex-1 ,aOldValue);
- fireProperty(PROPERTY_ID_ISMODIFIED,sal_True,sal_False);
}
// -------------------------------------------------------------------------
void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
@@ -1380,14 +1390,19 @@ Reference< XRef > SAL_CALL ORowSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQ
return Reference< XRef >();
}
// -------------------------------------------------------------------------
-Reference< XBlob > SAL_CALL ORowSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
+Reference< XBlob > SAL_CALL ORowSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
- return Reference< XBlob >();
+ if ( m_pCache && isInsertRow() )
+ {
+ checkCache();
+ return new ::connectivity::BlobHelper(((*m_pCache->m_aInsertRow)->get())[m_nLastColumnIndex = columnIndex].getSequence());
+ }
+ return ORowSetBase::getBlob(columnIndex);
}
// -------------------------------------------------------------------------
-Reference< XClob > SAL_CALL ORowSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
+Reference< XClob > SAL_CALL ORowSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
- return Reference< XClob >();
+ return Reference< XClob >(getInsertValue(columnIndex).makeAny(),UNO_QUERY);
}
// -------------------------------------------------------------------------
Reference< XArray > SAL_CALL ORowSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
@@ -2737,7 +2752,8 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
m_aDataColumns.push_back(pColumn);
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ALIGN,xColumn->getPropertyValue(PROPERTY_ALIGN));
- sal_Int32 nFormatKey = comphelper::getINT32(xColumn->getPropertyValue(PROPERTY_NUMBERFORMAT));
+ sal_Int32 nFormatKey = 0;
+ xColumn->getPropertyValue(PROPERTY_NUMBERFORMAT) >>= nFormatKey;
if(!nFormatKey && xColumn.is() && m_xNumberFormatTypes.is())
nFormatKey = ::dbtools::getDefaultNumberFormat(xColumn,m_xNumberFormatTypes,aLocale);
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_NUMBERFORMAT,makeAny(nFormatKey));
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index a8894bcf5f1b..d8449094fa85 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -469,18 +469,16 @@ Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 /*columnIndex*/ ) thro
return NULL;
}
// -------------------------------------------------------------------------
-Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
+Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBlob" );
- ::dbtools::throwFeatureNotImplementedException( "XRow::getBlob", *m_pMySelf );
- return NULL;
+ return Reference< XBlob >(getValue(columnIndex).makeAny(),UNO_QUERY);
}
// -------------------------------------------------------------------------
-Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
+Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getClob" );
- ::dbtools::throwFeatureNotImplementedException( "XRow::getClob", *m_pMySelf );
- return NULL;
+ return Reference< XClob >(getValue(columnIndex).makeAny(),UNO_QUERY);
}
// -------------------------------------------------------------------------
Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index a96de4b9fbe1..4156c32635a2 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -168,6 +168,16 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
Reference< XIndexAccess> xUpdateTableKeys;
::rtl::OUString aUpdateTableName = _rUpdateTableName;
Reference< XConnection> xConnection;
+ // first we need a connection
+ Reference< XStatement> xStmt(_xRs->getStatement(),UNO_QUERY);
+ if(xStmt.is())
+ xConnection = xStmt->getConnection();
+ else
+ {
+ Reference< XPreparedStatement> xPrepStmt(_xRs->getStatement(),UNO_QUERY);
+ xConnection = xPrepStmt->getConnection();
+ }
+ OSL_ENSURE(xConnection.is(),"No connection!");
if(_xAnalyzer.is())
{
try
@@ -215,16 +225,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
if(xColumnsSupplier.is())
{
- // first we need a connection
- Reference< XStatement> xStmt(_xRs->getStatement(),UNO_QUERY);
- if(xStmt.is())
- xConnection = xStmt->getConnection();
- else
- {
- Reference< XPreparedStatement> xPrepStmt(_xRs->getStatement(),UNO_QUERY);
- xConnection = xPrepStmt->getConnection();
- }
- OSL_ENSURE(xConnection.is(),"No connection!");
+
Reference<XNameAccess> xColumns = xColumnsSupplier->getColumns();
Reference<XColumnsSupplier> xColSup(_xAnalyzer,UNO_QUERY);
@@ -233,7 +234,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
Reference<XNameAccess> xSelColumns = xColSup->getColumns();
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
SelectColumnsMetaData aColumnNames(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers() ? true : false);
- ::dbaccess::getColumnPositions(xSelColumns,xColumns,aUpdateTableName,aColumnNames);
+ ::dbaccess::getColumnPositions(xSelColumns,xColumns->getElementNames(),aUpdateTableName,aColumnNames);
bAllKeysFound = !aColumnNames.empty() && sal_Int32(aColumnNames.size()) == xColumns->getElementNames().getLength();
}
}
@@ -303,7 +304,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
Reference<XColumnsSupplier> xColSup(_xAnalyzer,UNO_QUERY);
Reference<XNameAccess> xSelColumns = xColSup->getColumns();
Reference<XNameAccess> xColumns = m_aUpdateTable->getColumns();
- ::dbaccess::getColumnPositions(xSelColumns,xColumns,aUpdateTableName,aColumnNames);
+ ::dbaccess::getColumnPositions(xSelColumns,xColumns->getElementNames(),aUpdateTableName,aColumnNames);
// check privileges
m_nPrivileges = Privilege::SELECT;
@@ -560,10 +561,18 @@ sal_Int32 ORowSetCache::hashBookmark( const Any& bookmark )
// -------------------------------------------------------------------------
// XRowUpdate
// -----------------------------------------------------------------------------
-void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
+void ORowSetCache::updateNull(sal_Int32 columnIndex)
{
checkUpdateConditions(columnIndex);
+ ((*m_aInsertRow)->get())[columnIndex].setBound(sal_True);
+ ((*m_aInsertRow)->get())[columnIndex].setNull();
+ ((*m_aInsertRow)->get())[columnIndex].setModified();
+}
+// -----------------------------------------------------------------------------
+void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
+{
+ checkUpdateConditions(columnIndex);
((*m_aInsertRow)->get())[columnIndex].setBound(sal_True);
((*m_aInsertRow)->get())[columnIndex] = x;
@@ -1342,11 +1351,12 @@ void ORowSetCache::moveToInsertRow( )
// we don't unbound the bookmark column
ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin()+1;
ORowSetValueVector::Vector::iterator aEnd = (*m_aInsertRow)->get().end();
- for(;aIter != aEnd;++aIter)
+ for(sal_Int32 i = 1;aIter != aEnd;++aIter,++i)
{
aIter->setBound(sal_False);
aIter->setModified(sal_False);
aIter->setNull();
+ aIter->setTypeKind(m_xMetaData->getColumnType(i));
}
}
// -------------------------------------------------------------------------
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index 0576aa68ac02..1f5be3113f8b 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -225,6 +225,7 @@ namespace dbaccess
void updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length );
void updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x );
void updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale );
+ void updateNull(sal_Int32 columnIndex);
// ::com::sun::star::sdbc::XResultSet
sal_Bool next( );
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 10878f599c4f..9b8bae551cf1 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1530,6 +1530,27 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
aSQL.append( STR_LIKE );
aSQL.append( DBTypeConversion::toSQLString( nType, aValue, sal_True, m_xTypeConverter ) );
break;
+ case DataType::CLOB:
+ {
+ Reference< XClob > xClob(aValue,UNO_QUERY);
+ if ( xClob.is() )
+ {
+ const ::sal_Int64 nLength = xClob->length();
+ if ( sal_Int64(nLength + aSQL.getLength() + STR_LIKE.getLength() ) < sal_Int64(SAL_MAX_INT32) )
+ {
+ aSQL.append( STR_LIKE );
+ aSQL.appendAscii("'");
+ aSQL.append( xClob->getSubString(1,(sal_Int32)nLength) );
+ aSQL.appendAscii("'");
+ }
+ }
+ else
+ {
+ aSQL.append( STR_LIKE );
+ aSQL.append( DBTypeConversion::toSQLString( nType, aValue, sal_True, m_xTypeConverter ) );
+ }
+ }
+ break;
case DataType::VARBINARY:
case DataType::BINARY:
case DataType::LONGVARBINARY:
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index b0fa5b7492c6..c8225f1d7a28 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -706,7 +706,7 @@ OColumn* ODBTableDecorator::createColumn(const ::rtl::OUString& _rName) const
if ( m_xColumnDefinitions.is() && m_xColumnDefinitions->hasByName(_rName))
xColumnDefintion.set(m_xColumnDefinitions->getByName(_rName),UNO_QUERY);
- pReturn = new OTableColumnWrapper(xProp,xColumnDefintion);
+ pReturn = new OTableColumnWrapper( xProp, xColumnDefintion, false );
}
}
return pReturn;
@@ -734,8 +734,8 @@ Reference< XPropertySet > ODBTableDecorator::createColumnDescriptor()
if(m_xTable.is())
xNames.set(m_xTable->getColumns(),UNO_QUERY);
Reference< XPropertySet > xRet;
- if(xNames.is())
- xRet = new OTableColumnDescriptorWrapper(xNames->createDataDescriptor());
+ if ( xNames.is() )
+ xRet = new OTableColumnDescriptorWrapper( xNames->createDataDescriptor(), false, true );
return xRet;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index 0dde122faa1a..f789394d23f9 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -31,78 +31,31 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_COLUMN_HXX_
+#include "ContainerMediator.hxx"
+#include "apitools.hxx"
#include "column.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
-#include "dbastrings.hrc"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HXX_
-#include "core_resource.hxx"
-#endif
-#ifndef _DBA_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
-#include "apitools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
+#include "core_resource.hxx"
+#include "dbastrings.hrc"
+#include "sdbcoretools.hxx"
+
+#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
-#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
-#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
-#include <comphelper/sequence.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
-#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_ENUMHELPER_HXX_
+
+#include <comphelper/basicio.hxx>
#include <comphelper/enumhelper.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
-#include <comphelper/types.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
-#include <osl/diagnose.h>
-#endif
-#ifndef _COMPHELPER_SEQSTREAM_HXX
+#include <comphelper/property.hxx>
#include <comphelper/seqstream.hxx>
-#endif
-#ifndef _COMPHELPER_BASIC_IO_HXX_
-#include <comphelper/basicio.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef CONNECTIVITY_TABLEHELPER_HXX
+#include <comphelper/sequence.hxx>
+#include <comphelper/types.hxx>
#include <connectivity/TTableHelper.hxx>
-#endif
-#ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
-#include "definitioncolumn.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
-#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef DBA_CONTAINERMEDIATOR_HXX
-#include "ContainerMediator.hxx"
-#endif
-#ifndef DBACORE_SDBCORETOOLS_HXX
-#include "sdbcoretools.hxx"
-#endif
+#include <connectivity/dbtools.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <osl/diagnose.h>
+#include <tools/debug.hxx>
#include <algorithm>
@@ -128,11 +81,14 @@ DBG_NAME(OColumn)
//= OColumn
//============================================================
//--------------------------------------------------------------------------
-OColumn::OColumn()
- :OColumnBase(m_aMutex)
- , OPropertySetHelper(OColumnBase::rBHelper)
+OColumn::OColumn( const bool _bNameIsReadOnly )
+ :OColumnBase( m_aMutex )
+ ,::comphelper::OPropertyContainer( OColumnBase::rBHelper )
{
DBG_CTOR(OColumn, NULL);
+
+ registerProperty( PROPERTY_NAME, PROPERTY_ID_NAME, _bNameIsReadOnly ? PropertyAttribute::READONLY : 0,
+ &m_sName, ::getCppuType( &m_sName ) );
}
//--------------------------------------------------------------------------
@@ -145,37 +101,14 @@ OColumn::~OColumn()
//--------------------------------------------------------------------------
Sequence< Type > OColumn::getTypes() throw (RuntimeException)
{
- OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ),
- ::getCppuType( (const Reference< XMultiPropertySet > *)0 ),
- OColumnBase::getTypes());
- return aTypes.getTypes();
+ return ::comphelper::concatSequences(
+ OColumnBase::getTypes(),
+ ::comphelper::OPropertyContainer::getTypes()
+ );
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
-Any OColumn::queryInterface( const Type & rType ) throw (RuntimeException)
-{
- Any aIface = OColumnBase::queryInterface( rType );
- if (!aIface.hasValue())
- aIface = ::cppu::queryInterface(
- rType,
- static_cast< XPropertySet * >( this ),
- static_cast< XMultiPropertySet * >( this ));
-
- return aIface;
-}
-
-//--------------------------------------------------------------------------
-void OColumn::acquire() throw()
-{
- OColumnBase::acquire();
-}
-
-//--------------------------------------------------------------------------
-void OColumn::release() throw()
-{
- OColumnBase::release();
-}
+IMPLEMENT_FORWARD_XINTERFACE2( OColumn, OColumnBase, ::comphelper::OPropertyContainer )
// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
@@ -202,7 +135,7 @@ Sequence< ::rtl::OUString > OColumn::getSupportedServiceNames( ) throw (Runtime
//------------------------------------------------------------------------------
void OColumn::disposing()
{
- OPropertySetHelper::disposing();
+ OPropertyContainer::disposing();
}
// com::sun::star::beans::XPropertySet
@@ -212,77 +145,6 @@ Reference< XPropertySetInfo > OColumn::getPropertySetInfo() throw (RuntimeExcept
return createPropertySetInfo( getInfoHelper() ) ;
}
-//------------------------------------------------------------------------------
-void OColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
-{
- switch (nHandle)
- {
- case PROPERTY_ID_NAME:
- rValue <<= m_sName;
- break;
- }
-}
-
-//------------------------------------------------------------------------------
-sal_Bool OColumn::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (IllegalArgumentException)
-{
- sal_Bool bModified = sal_False;
- switch (nHandle)
- {
- case PROPERTY_ID_NAME:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_sName);
- break;
- }
- return bModified;
-}
-
-//------------------------------------------------------------------------------
-void OColumn::setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const Any& rValue
- )
- throw (Exception)
-{
- switch (nHandle)
- {
- case PROPERTY_ID_NAME:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< ::rtl::OUString* >(NULL))),
- "OColumn::setFastPropertyValue_NoBroadcast(NAME) : invalid value !");
- rValue >>= m_sName;
- break;
- }
-}
-
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OColumn::getUnoTunnelImplementationId()
-{
- static ::cppu::OImplementationId * pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-
-// com::sun::star::lang::XUnoTunnel
-//------------------------------------------------------------------
-sal_Int64 OColumn::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
-{
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
- return reinterpret_cast<sal_Int64>(this);
-
- return 0;
-}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OColumn::getName( ) throw(::com::sun::star::uno::RuntimeException)
{
@@ -293,235 +155,31 @@ void SAL_CALL OColumn::setName( const ::rtl::OUString& _rName ) throw(::com::sun
{
m_sName = _rName;
}
+
// -----------------------------------------------------------------------------
void OColumn::fireValueChange(const ::connectivity::ORowSetValue& /*_rOldValue*/)
{
DBG_ERROR( "OColumn::fireValueChange: not implemented!" );
}
-// -----------------------------------------------------------------------------
-//============================================================
-//= OColumnSettings
-//============================================================
-DBG_NAME( OColumnSettings )
-//------------------------------------------------------------------------------
-OColumnSettings::OColumnSettings()
- :m_bHidden(sal_False)
-{
- DBG_CTOR( OColumnSettings, NULL );
-}
//------------------------------------------------------------------------------
-OColumnSettings::~OColumnSettings()
+void OColumn::registerProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const Type& _rMemberType )
{
- DBG_DTOR( OColumnSettings, NULL );
-}
-
-// com::sun::star::lang::XUnoTunnel
-//------------------------------------------------------------------
-sal_Int64 OColumnSettings::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
-{
- if ( ( rId.getLength() == 16 )
- && ( 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
- )
- return reinterpret_cast< sal_Int64 >( this );
-
- return 0;
-}
-
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OColumnSettings::getUnoTunnelImplementationId()
-{
- static ::cppu::OImplementationId * pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+ ::comphelper::OPropertyContainer::registerProperty( _rName, _nHandle, _nAttributes, _pPointerToMember, _rMemberType );
}
//------------------------------------------------------------------------------
-void OColumnSettings::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
+void OColumn::registerMayBeVoidProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, Any* _pPointerToMember, const Type& _rExpectedType )
{
- switch (nHandle)
- {
- case PROPERTY_ID_ALIGN:
- rValue = m_aAlignment;
- break;
- case PROPERTY_ID_NUMBERFORMAT:
- rValue = m_aFormatKey;
- break;
- case PROPERTY_ID_RELATIVEPOSITION:
- rValue = m_aRelativePosition;
- break;
- case PROPERTY_ID_WIDTH:
- rValue = m_aWidth;
- break;
- case PROPERTY_ID_HIDDEN:
- rValue.setValue(&m_bHidden, getBooleanCppuType());
- break;
- case PROPERTY_ID_CONTROLMODEL:
- rValue <<= m_xControlModel;
- break;
- case PROPERTY_ID_HELPTEXT:
- rValue = m_aHelpText;
- break;
- case PROPERTY_ID_CONTROLDEFAULT:
- rValue = m_aControlDefault;
- break;
- }
+ ::comphelper::OPropertyContainer::registerMayBeVoidProperty( _rName, _nHandle, _nAttributes, _pPointerToMember, _rExpectedType );
}
//------------------------------------------------------------------------------
-sal_Bool OColumnSettings::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (IllegalArgumentException)
-{
- sal_Bool bModified = sal_False;
- switch (nHandle)
- {
- case PROPERTY_ID_ALIGN:
- bModified = !uno_type_equalData(
- const_cast< void* >( m_aAlignment.getValue() ), m_aAlignment.getValueType().getTypeLibType(),
- const_cast< void* >( rValue.getValue() ), rValue.getValueType().getTypeLibType(),
- reinterpret_cast< uno_QueryInterfaceFunc >( cpp_queryInterface ),
- reinterpret_cast< uno_ReleaseFunc >( cpp_release )
- );
- if ( bModified )
- {
- rConvertedValue = rValue;
- rOldValue = m_aAlignment;
- }
- break;
- case PROPERTY_ID_WIDTH:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aWidth,
- ::getCppuType(static_cast< sal_Int32* >(NULL)));
- break;
- case PROPERTY_ID_HIDDEN:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bHidden);
- break;
- case PROPERTY_ID_RELATIVEPOSITION:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aRelativePosition,
- ::getCppuType(static_cast< sal_Int32* >(NULL)));
- break;
- case PROPERTY_ID_NUMBERFORMAT:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aFormatKey,
- ::getCppuType(static_cast< sal_Int32* >(NULL)));
- break;
- case PROPERTY_ID_CONTROLMODEL:
- {
- Reference< XPropertySet > xTest;
- if (!::cppu::extractInterface(xTest, rValue))
- throw IllegalArgumentException();
- if (xTest.get() != m_xControlModel.get())
- {
- bModified = sal_True;
- rOldValue <<= m_xControlModel;
- rConvertedValue <<= rValue;
- }
- }
- break;
- case PROPERTY_ID_HELPTEXT:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aHelpText,
- ::getCppuType(static_cast< ::rtl::OUString* >(NULL)));
- break;
- case PROPERTY_ID_CONTROLDEFAULT:
- bModified = rValue != m_aControlDefault;
- if ( bModified )
- {
- rConvertedValue = rValue;
- rOldValue = m_aControlDefault;
- }
- break;
- }
- return bModified;
-}
-
-//------------------------------------------------------------------------------
-void OColumnSettings::setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const Any& rValue
- )
- throw (Exception)
+void OColumn::registerPropertyNoMember( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Type& _rType, const void* _pInitialValue )
{
- switch (nHandle)
- {
- case PROPERTY_ID_ALIGN:
- {
- if ( rValue.hasValue() )
- {
- sal_Int32 nAlign = 0;
- sal_Bool bSuccess =
- // copy the data from the to-be-set value
- uno_type_assignData(
- static_cast< void* >( &nAlign ), ::getCppuType(static_cast< sal_Int32* >(NULL)).getTypeLibType(),
- const_cast< void* >( rValue.getValue() ), rValue.getValueType().getTypeLibType(),
- reinterpret_cast< uno_QueryInterfaceFunc >( cpp_queryInterface ),
- reinterpret_cast< uno_AcquireFunc >( cpp_acquire ),
- reinterpret_cast< uno_ReleaseFunc >( cpp_release ) );
-
- OSL_ENSURE( bSuccess,
- "OPropertyStateContainer::setFastPropertyValue_NoBroadcast : ooops .... the value could not be assigned!");
- if ( bSuccess )
- m_aAlignment <<= nAlign;
- }
- else
- m_aAlignment = rValue;
- }
-
- break;
- case PROPERTY_ID_WIDTH:
- OSL_ENSURE(!rValue.hasValue() || rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OColumnSettings::setFastPropertyValue_NoBroadcast(WIDTH) : invalid value !");
- m_aWidth = rValue;
- break;
- case PROPERTY_ID_NUMBERFORMAT:
- OSL_ENSURE(!rValue.hasValue() || rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OColumnSettings::setFastPropertyValue_NoBroadcast(NUMBERFORMAT) : invalid value !");
- m_aFormatKey = rValue;
- break;
- case PROPERTY_ID_RELATIVEPOSITION:
- OSL_ENSURE(!rValue.hasValue() || rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OColumnSettings::setFastPropertyValue_NoBroadcast(ID_RELATIVEPOSITION) : invalid value !");
- m_aRelativePosition = rValue;
- break;
- case PROPERTY_ID_HIDDEN:
- OSL_ENSURE(rValue.getValueType().equals(::getBooleanCppuType()),
- "OColumnSettings::setFastPropertyValue_NoBroadcast(HIDDEN) : invalid value !");
- m_bHidden = ::comphelper::getBOOL(rValue);
- break;
- case PROPERTY_ID_HELPTEXT:
- OSL_ENSURE(!rValue.hasValue() || rValue.getValueType().equals(::getCppuType(static_cast< ::rtl::OUString* >(NULL))),
- "OColumnSettings::setFastPropertyValue_NoBroadcast(ID_RELATIVEPOSITION) : invalid value !");
- m_aHelpText = rValue;
- break;
- case PROPERTY_ID_CONTROLDEFAULT:
- m_aControlDefault = rValue;
- break;
- }
+ ::comphelper::OPropertyContainer::registerPropertyNoMember( _rName, _nHandle, _nAttributes, _rType, _pInitialValue );
}
-
-//------------------------------------------------------------------------------
-sal_Bool OColumnSettings::isDefaulted() const
-{
- return !m_aAlignment.hasValue()
- && !m_aWidth.hasValue()
- && !m_aFormatKey.hasValue()
- && !m_aRelativePosition.hasValue()
- && !m_aHelpText.hasValue()
- && !m_aControlDefault.hasValue()
- && !m_bHidden;
-}
-
-
//============================================================
//= OColumns
//============================================================
@@ -547,6 +205,7 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent,
{
DBG_CTOR(OColumns, NULL);
}
+
// -------------------------------------------------------------------------
OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns,
diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx
new file mode 100644
index 000000000000..3aba07d88749
--- /dev/null
+++ b/dbaccess/source/core/api/columnsettings.cxx
@@ -0,0 +1,181 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"
+
+#include "columnsettings.hxx"
+#include "dbastrings.hrc"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/typeprovider.hxx>
+#include <comphelper/property.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+
+//........................................................................
+namespace dbaccess
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ /** === end UNO using === **/
+ namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute;
+
+ //==============================================================================
+ //= OColumnSettings
+ //==============================================================================
+ DBG_NAME( OColumnSettings )
+ //------------------------------------------------------------------------------
+ OColumnSettings::OColumnSettings()
+ :m_bHidden(sal_False)
+ {
+ DBG_CTOR( OColumnSettings, NULL );
+ }
+
+ //------------------------------------------------------------------------------
+ OColumnSettings::~OColumnSettings()
+ {
+ DBG_DTOR( OColumnSettings, NULL );
+ }
+
+ //------------------------------------------------------------------------------
+ void OColumnSettings::registerProperties( IPropertyContainer& _rPropertyContainer )
+ {
+ const sal_Int32 nBoundAttr = PropertyAttribute::BOUND;
+ const sal_Int32 nMayBeVoidAttr = PropertyAttribute::MAYBEVOID | nBoundAttr;
+
+ const Type& rSalInt32Type = ::getCppuType( static_cast< sal_Int32* >( NULL ) );
+ const Type& rStringType = ::getCppuType( static_cast< ::rtl::OUString* >( NULL ) );
+
+ _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_ALIGN, PROPERTY_ID_ALIGN, nMayBeVoidAttr, &m_aAlignment, rSalInt32Type );
+ _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_NUMBERFORMAT, PROPERTY_ID_NUMBERFORMAT, nMayBeVoidAttr, &m_aFormatKey, rSalInt32Type );
+ _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_RELATIVEPOSITION, PROPERTY_ID_RELATIVEPOSITION, nMayBeVoidAttr, &m_aRelativePosition, rSalInt32Type );
+ _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_WIDTH, PROPERTY_ID_WIDTH, nMayBeVoidAttr, &m_aWidth, rSalInt32Type );
+ _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_HELPTEXT, PROPERTY_ID_HELPTEXT, nMayBeVoidAttr, &m_aHelpText, rStringType );
+ _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_CONTROLDEFAULT, PROPERTY_ID_CONTROLDEFAULT, nMayBeVoidAttr, &m_aControlDefault, rStringType );
+ _rPropertyContainer.registerProperty( PROPERTY_CONTROLMODEL, PROPERTY_ID_CONTROLMODEL, nBoundAttr, &m_xControlModel, ::getCppuType( &m_xControlModel ) );
+ _rPropertyContainer.registerProperty( PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN, nBoundAttr, &m_bHidden, ::getCppuType( &m_bHidden ) );
+ }
+
+ //------------------------------------------------------------------------------
+ bool OColumnSettings::isColumnSettingProperty( const sal_Int32 _nPropertyHandle )
+ {
+ return ( _nPropertyHandle == PROPERTY_ID_ALIGN )
+ || ( _nPropertyHandle == PROPERTY_ID_NUMBERFORMAT )
+ || ( _nPropertyHandle == PROPERTY_ID_RELATIVEPOSITION )
+ || ( _nPropertyHandle == PROPERTY_ID_WIDTH )
+ || ( _nPropertyHandle == PROPERTY_ID_HELPTEXT )
+ || ( _nPropertyHandle == PROPERTY_ID_CONTROLDEFAULT )
+ || ( _nPropertyHandle == PROPERTY_ID_CONTROLMODEL )
+ || ( _nPropertyHandle == PROPERTY_ID_HIDDEN );
+ }
+
+ //------------------------------------------------------------------------------
+ bool OColumnSettings::isDefaulted( const sal_Int32 _nPropertyHandle, const Any& _rPropertyValue )
+ {
+ switch ( _nPropertyHandle )
+ {
+ case PROPERTY_ID_ALIGN:
+ case PROPERTY_ID_NUMBERFORMAT:
+ case PROPERTY_ID_RELATIVEPOSITION:
+ case PROPERTY_ID_WIDTH:
+ case PROPERTY_ID_HELPTEXT:
+ case PROPERTY_ID_CONTROLDEFAULT:
+ return !_rPropertyValue.hasValue();
+
+ case PROPERTY_ID_CONTROLMODEL:
+ return !Reference< XPropertySet >( _rPropertyValue, UNO_QUERY ).is();
+
+ case PROPERTY_ID_HIDDEN:
+ {
+ sal_Bool bHidden = sal_False;
+ OSL_VERIFY( _rPropertyValue >>= bHidden );
+ return !bHidden;
+ }
+ }
+ OSL_ENSURE( false, "OColumnSettings::isDefaulted: illegal property handle!" );
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------
+ bool OColumnSettings::hasDefaultSettings( const Reference< XPropertySet >& _rxColumn )
+ {
+ ENSURE_OR_THROW( _rxColumn.is(), "illegal column" );
+ try
+ {
+ Reference< XPropertySetInfo > xPSI( _rxColumn->getPropertySetInfo(), UNO_SET_THROW );
+
+ struct PropertyDescriptor
+ {
+ ::rtl::OUString sName;
+ sal_Int32 nHandle;
+ };
+ PropertyDescriptor aProps[] =
+ {
+ { PROPERTY_ALIGN, PROPERTY_ID_ALIGN },
+ { PROPERTY_NUMBERFORMAT, PROPERTY_ID_NUMBERFORMAT },
+ { PROPERTY_RELATIVEPOSITION, PROPERTY_ID_RELATIVEPOSITION },
+ { PROPERTY_WIDTH, PROPERTY_ID_WIDTH },
+ { PROPERTY_HELPTEXT, PROPERTY_ID_HELPTEXT },
+ { PROPERTY_CONTROLDEFAULT, PROPERTY_ID_CONTROLDEFAULT },
+ { PROPERTY_CONTROLMODEL, PROPERTY_ID_CONTROLMODEL },
+ { PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN }
+ };
+
+ for ( size_t i=0; i < sizeof( aProps ) / sizeof( aProps[0] ); ++i )
+ {
+ if ( xPSI->hasPropertyByName( aProps[i].sName ) )
+ if ( !isDefaulted( aProps[i].nHandle, _rxColumn->getPropertyValue( aProps[i].sName ) ) )
+ return false;
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return true;
+ }
+
+//........................................................................
+} // namespace dbaccess
+//........................................................................
diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx
index dcca2c34d694..6cbc702dae9e 100644
--- a/dbaccess/source/core/api/datasettings.cxx
+++ b/dbaccess/source/core/api/datasettings.cxx
@@ -69,6 +69,7 @@
#include <com/sun/star/awt/FontWidth.hpp>
#endif
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::lang;
@@ -157,19 +158,25 @@ ODataSettings_Base::ODataSettings_Base()
//--------------------------------------------------------------------------
ODataSettings_Base::ODataSettings_Base(const ODataSettings_Base& _rSource)
+ :m_sFilter( _rSource.m_sFilter )
+ ,m_sHavingClause( _rSource.m_sHavingClause )
+ ,m_sGroupBy( _rSource.m_sGroupBy )
+ ,m_sOrder( _rSource.m_sOrder )
+ ,m_bApplyFilter( _rSource.m_bApplyFilter )
+ ,m_aFont( _rSource.m_aFont )
+ ,m_aRowHeight( _rSource.m_aRowHeight )
+ ,m_aTextColor( _rSource.m_aTextColor )
+ ,m_aTextLineColor( _rSource.m_aTextLineColor )
+ ,m_nFontEmphasis( _rSource.m_nFontEmphasis )
+ ,m_nFontRelief( _rSource.m_nFontRelief )
+{
+}
+
+// -----------------------------------------------------------------------------
+ODataSettings_Base::~ODataSettings_Base()
{
- m_sFilter = _rSource.m_sFilter;
- m_sHavingClause = _rSource.m_sHavingClause;
- m_sGroupBy = _rSource.m_sGroupBy;
- m_sOrder = _rSource.m_sOrder;
- m_bApplyFilter = _rSource.m_bApplyFilter;
- m_aFont = _rSource.m_aFont;
- m_aRowHeight = _rSource.m_aRowHeight;
- m_aTextColor = _rSource.m_aTextColor;
- m_aTextLineColor= _rSource.m_aTextLineColor;
- m_nFontEmphasis = _rSource.m_nFontEmphasis;
- m_nFontRelief = _rSource.m_nFontRelief;
}
+
// -----------------------------------------------------------------------------
void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const
{
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 8d0eb5e6b265..9f9e511fc9b4 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -31,39 +31,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_DEFINITIONSETTINGS_HXX_
+#include "apitools.hxx"
+#include "dbastrings.hrc"
#include "definitioncolumn.hxx"
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
-#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
+#include "sdbcoretools.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+/** === end UNO includes === **/
+
#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
-#include "dbastrings.hrc"
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
-#include "apitools.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
+#include <connectivity/dbtools.hxx>
+#include <cppuhelper/typeprovider.hxx>
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef DBACORE_SDBCORETOOLS_HXX
-#include "sdbcoretools.hxx"
-#endif
-
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
using namespace ::cppu;
using namespace ::comphelper;
using namespace ::osl;
@@ -79,23 +69,32 @@ using namespace dbaccess;
//============================================================
IMPLEMENT_FORWARD_XINTERFACE2(OTableColumnDescriptor,OColumn,TXChild)
-// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumnDescriptor::getImplementationId() throw (RuntimeException)
+//------------------------------------------------------------------------------
+void OTableColumnDescriptor::impl_registerProperties()
{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+ sal_Int32 nDefaultAttr = m_bActAsDescriptor ? 0 : PropertyAttribute::READONLY;
+
+ registerProperty( PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, nDefaultAttr, &m_aTypeName, ::getCppuType( &m_aTypeName ) );
+ registerProperty( PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, nDefaultAttr, &m_aDescription, ::getCppuType( &m_aDescription ) );
+ registerProperty( PROPERTY_DEFAULTVALUE, PROPERTY_ID_DEFAULTVALUE, nDefaultAttr, &m_aDefaultValue, ::getCppuType( &m_aDefaultValue ) );
+
+ if ( m_bActAsDescriptor )
+ registerProperty( PROPERTY_AUTOINCREMENTCREATION, PROPERTY_ID_AUTOINCREMENTCREATION, nDefaultAttr, &m_aAutoIncrementValue, ::getCppuType( &m_aAutoIncrementValue ) );
+
+ registerProperty( PROPERTY_TYPE, PROPERTY_ID_TYPE, nDefaultAttr, &m_nType, ::getCppuType( &m_nType ) );
+ registerProperty( PROPERTY_PRECISION, PROPERTY_ID_PRECISION, nDefaultAttr, &m_nPrecision, ::getCppuType( &m_nPrecision ) );
+ registerProperty( PROPERTY_SCALE, PROPERTY_ID_SCALE, nDefaultAttr, &m_nScale, ::getCppuType( &m_nScale ) );
+ registerProperty( PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE, nDefaultAttr, &m_nIsNullable, ::getCppuType( &m_nIsNullable ) );
+ registerProperty( PROPERTY_ISAUTOINCREMENT, PROPERTY_ID_ISAUTOINCREMENT, nDefaultAttr, &m_bAutoIncrement, ::getCppuType( &m_bAutoIncrement ) );
+ registerProperty( PROPERTY_ISROWVERSION, PROPERTY_ID_ISROWVERSION, nDefaultAttr, &m_bRowVersion, ::getCppuType( &m_bRowVersion ) );
+ registerProperty( PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY, nDefaultAttr, &m_bCurrency, ::getCppuType( &m_bCurrency ) );
+
+ OColumnSettings::registerProperties( *this );
}
+//--------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor )
+
// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
rtl::OUString OTableColumnDescriptor::getImplementationName( ) throw (RuntimeException)
@@ -107,7 +106,7 @@ rtl::OUString OTableColumnDescriptor::getImplementationName( ) throw (RuntimeEx
Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS[0] = SERVICE_SDBCX_COLUMNDESCRIPTOR;
+ aSNS[0] = m_bActAsDescriptor ? SERVICE_SDBCX_COLUMNDESCRIPTOR : SERVICE_SDBCX_COLUMN;
aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
return aSNS;
}
@@ -116,28 +115,9 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptor::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(20)
- DECL_PROP2(ALIGN, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP1(AUTOINCREMENTCREATION,::rtl::OUString, MAYBEVOID);
- DECL_PROP2(CONTROLDEFAULT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet, BOUND );
- DECL_PROP0(DEFAULTVALUE, ::rtl::OUString );
- DECL_PROP0(DESCRIPTION, ::rtl::OUString );
- DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP2(HELPTEXT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_BOOL(HIDDEN, BOUND);
- DECL_PROP0_BOOL(ISAUTOINCREMENT );
- DECL_PROP0_BOOL(ISCURRENCY );
- DECL_PROP0(ISNULLABLE, sal_Int32 );
- DECL_PROP0_BOOL(ISROWVERSION );
- DECL_PROP0(NAME, ::rtl::OUString );
- DECL_PROP0(PRECISION, sal_Int32 );
- DECL_PROP2(RELATIVEPOSITION, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP0(SCALE, sal_Int32 );
- DECL_PROP0(TYPE, sal_Int32 );
- DECL_PROP0(TYPENAME, ::rtl::OUString );
- DECL_PROP2(WIDTH, sal_Int32, BOUND, MAYBEVOID);
- END_PROPERTY_HELPER();
+ Sequence< Property > aProps;
+ describeProperties( aProps );
+ return new ::cppu::OPropertyArrayHelper( aProps );
}
// cppu::OPropertySetHelper
@@ -148,190 +128,10 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
}
//------------------------------------------------------------------------------
-void OTableColumnDescriptor::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
+void OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
- switch (nHandle)
- {
- case PROPERTY_ID_TYPE:
- rValue <<= m_nType;
- break;
- case PROPERTY_ID_PRECISION:
- rValue <<= m_nPrecision;
- break;
- case PROPERTY_ID_SCALE:
- rValue <<= m_nScale;
- break;
- case PROPERTY_ID_ISNULLABLE:
- rValue <<= m_nIsNullable;
- break;
- case PROPERTY_ID_TYPENAME:
- rValue <<= m_aTypeName;
- break;
- case PROPERTY_ID_DESCRIPTION:
- rValue <<= m_aDescription;
- break;
- case PROPERTY_ID_DEFAULTVALUE:
- rValue <<= m_aDefaultValue;
- break;
- case PROPERTY_ID_AUTOINCREMENTCREATION:
- rValue <<= m_aAutoIncrementValue;
- break;
- case PROPERTY_ID_ISAUTOINCREMENT:
- {
- sal_Bool bVal = m_bAutoIncrement;
- rValue.setValue(&bVal, getBooleanCppuType());
- } break;
- case PROPERTY_ID_ISCURRENCY:
- {
- sal_Bool bVal = m_bCurrency;
- rValue.setValue(&bVal, getBooleanCppuType());
- } break;
- case PROPERTY_ID_ISROWVERSION:
- {
- sal_Bool bVal = m_bRowVersion;
- rValue.setValue(&bVal, getBooleanCppuType());
- } break;
- case PROPERTY_ID_NAME:
- OColumn::getFastPropertyValue( rValue, nHandle );
- break;
- default:
- OColumnSettings::getFastPropertyValue( rValue, nHandle );
- }
-}
-
-//------------------------------------------------------------------------------
-sal_Bool OTableColumnDescriptor::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (IllegalArgumentException)
-{
- sal_Bool bModified = sal_False;
- switch (nHandle)
- {
- case PROPERTY_ID_TYPE:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nType);
- break;
- case PROPERTY_ID_PRECISION:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nPrecision);
- break;
- case PROPERTY_ID_SCALE:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nScale);
- break;
- case PROPERTY_ID_ISNULLABLE:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nIsNullable);
- break;
- case PROPERTY_ID_TYPENAME:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aTypeName);
- break;
- case PROPERTY_ID_DESCRIPTION:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDescription);
- break;
- case PROPERTY_ID_DEFAULTVALUE:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefaultValue);
- break;
- case PROPERTY_ID_AUTOINCREMENTCREATION:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aAutoIncrementValue);
- break;
- case PROPERTY_ID_ISAUTOINCREMENT:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAutoIncrement);
- break;
- case PROPERTY_ID_ISCURRENCY:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bCurrency);
- break;
- case PROPERTY_ID_ISROWVERSION:
- bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bRowVersion);
- break;
- case PROPERTY_ID_NAME:
- bModified = OColumn::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
- break;
- default:
- bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
- }
- return bModified;
-}
-
-//------------------------------------------------------------------------------
-void OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const Any& rValue
- )
- throw (Exception)
-{
- switch (nHandle)
- {
- case PROPERTY_ID_TYPE:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(TYPE) : invalid value !");
- rValue >>= m_nType;
- break;
- case PROPERTY_ID_PRECISION:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(PRECISION) : invalid value !");
- rValue >>= m_nPrecision;
- break;
- case PROPERTY_ID_SCALE:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(SCALE) : invalid value !");
- rValue >>= m_nScale;
- break;
- case PROPERTY_ID_ISNULLABLE:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Int32* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(ISNULLABLE) : invalid value !");
- rValue >>= m_nIsNullable;
- break;
- case PROPERTY_ID_TYPENAME:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< rtl::OUString* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(TYPENAME) : invalid value !");
- rValue >>= m_aTypeName;
- break;
- case PROPERTY_ID_DESCRIPTION:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< rtl::OUString* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(DESCRIPTION) : invalid value !");
- rValue >>= m_aDescription;
- break;
- case PROPERTY_ID_DEFAULTVALUE:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< rtl::OUString* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(DEFAULTVALUE) : invalid value !");
- rValue >>= m_aDefaultValue;
- break;
- case PROPERTY_ID_AUTOINCREMENTCREATION:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< rtl::OUString* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(AUTOINCREMENTVALUE) : invalid value !");
- rValue >>= m_aAutoIncrementValue;
- break;
- case PROPERTY_ID_ISAUTOINCREMENT:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Bool* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(ISAUTOINCREMENT) : invalid value !");
- m_bAutoIncrement = ::comphelper::getBOOL(rValue);
- break;
- case PROPERTY_ID_ISCURRENCY:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Bool* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(ISCURRENCY) : invalid value !");
- m_bCurrency = ::comphelper::getBOOL(rValue);
- break;
- case PROPERTY_ID_ISROWVERSION:
- OSL_ENSURE(rValue.getValueType().equals(::getCppuType(static_cast< sal_Bool* >(NULL))),
- "OTableColumnDescriptor::setFastPropertyValue_NoBroadcast(ISROWVERSION) : invalid value !");
- m_bRowVersion = ::comphelper::getBOOL(rValue);
- break;
- case PROPERTY_ID_NAME:
- OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- break;
- default:
- OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- }
- ::dbaccess::notifyDataSourceModified(m_xParent,sal_True);
-}
-
-// -----------------------------------------------------------------------------
-sal_Int64 SAL_CALL OTableColumnDescriptor::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw(RuntimeException)
-{
- sal_Int64 nReturn = OColumn::getSomething( aIdentifier );
- if ( !nReturn )
- nReturn = OColumnSettings::getSomething( aIdentifier );
- return nReturn;
+ OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ ::dbaccess::notifyDataSourceModified( m_xParent, sal_True );
}
// -----------------------------------------------------------------------------
@@ -350,51 +150,24 @@ void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >&
//= OTableColumn
//============================================================
DBG_NAME(OTableColumn);
-OTableColumn::OTableColumn(const ::rtl::OUString& _rName)
+
+// -------------------------------------------------------------------------
+OTableColumn::OTableColumn( const ::rtl::OUString& _rName )
+ :OTableColumnDescriptor( false /* do not act as descriptor */ )
{
DBG_CTOR(OTableColumn,NULL);
m_sName = _rName;
}
-// -------------------------------------------------------------------------
-OTableColumn::OTableColumn(const Reference<XPropertySet>& _xColumn)
-{
- DBG_CTOR(OTableColumn,NULL);
- m_aTypeName = (::comphelper::getString(_xColumn->getPropertyValue(PROPERTY_TYPENAME)));
- if(_xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
- m_aDefaultValue = (::comphelper::getString(_xColumn->getPropertyValue(PROPERTY_DEFAULTVALUE)));
- m_nIsNullable = (::comphelper::getINT32(_xColumn->getPropertyValue(PROPERTY_ISNULLABLE)));
- m_nPrecision = (::comphelper::getINT32(_xColumn->getPropertyValue(PROPERTY_PRECISION)));
- m_nScale = (::comphelper::getINT32(_xColumn->getPropertyValue(PROPERTY_SCALE)));
- m_nType = (::comphelper::getINT32(_xColumn->getPropertyValue(PROPERTY_TYPE)));
- m_bAutoIncrement = (::comphelper::getBOOL(_xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT)));
- m_bRowVersion = (sal_False);
- m_bCurrency = (::comphelper::getBOOL(_xColumn->getPropertyValue(PROPERTY_ISCURRENCY)));
- _xColumn->getPropertyValue(PROPERTY_NAME) >>= m_sName;
-}
// -----------------------------------------------------------------------------
OTableColumn::~OTableColumn()
{
DBG_DTOR(OTableColumn,NULL);
}
-// com::sun::star::lang::XTypeProvider
+
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumn::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn )
-// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
{
@@ -402,75 +175,203 @@ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
}
//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > OTableColumn::getSupportedServiceNames( ) throw (RuntimeException)
+::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper()
{
- Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS[0] = SERVICE_SDBCX_COLUMN;
- aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
- return aSNS;
+ return *OTableColumn_PBase::getArrayHelper();
}
//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper& OTableColumn::getInfoHelper()
+::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
{
- return *static_cast< ::comphelper::OPropertyArrayUsageHelper< OTableColumn >* >(this)->getArrayHelper();
+ return OTableColumnDescriptor::createArrayHelper();
+}
+
+// =========================================================================
+//= OQueryColumn
+// =========================================================================
+DBG_NAME( OQueryColumn );
+
+// -------------------------------------------------------------------------
+OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection )
+ :OTableColumnDescriptor( false /* do not act as descriptor */ )
+{
+ const sal_Int32 nPropAttr = PropertyAttribute::READONLY;
+ registerProperty( PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, nPropAttr, &m_sCatalogName, ::getCppuType( &m_sCatalogName ) );
+ registerProperty( PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, nPropAttr, &m_sSchemaName, ::getCppuType( &m_sSchemaName ) );
+ registerProperty( PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME, nPropAttr, &m_sTableName, ::getCppuType( &m_sTableName ) );
+ registerProperty( PROPERTY_REALNAME, PROPERTY_ID_REALNAME, nPropAttr, &m_sRealName, ::getCppuType( &m_sRealName ) );
+
+ DBG_CTOR( OQueryColumn, NULL );
+
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_TYPENAME ) >>= m_aTypeName );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= m_nIsNullable );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_PRECISION ) >>= m_nPrecision );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_SCALE ) >>= m_nScale );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_TYPE ) >>= m_nType );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
+ m_bRowVersion = sal_False;
+
+ Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW );
+ if ( xPSI->hasPropertyByName( PROPERTY_DEFAULTVALUE ) )
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_DEFAULTVALUE ) >>= m_aDefaultValue );
+
+ // copy some optional properties from the parser column
+ struct PropertyDescriptor
+ {
+ ::rtl::OUString sName;
+ sal_Int32 nHandle;
+ };
+ PropertyDescriptor aProps[] =
+ {
+ { PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME },
+ { PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME },
+ { PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME },
+ { PROPERTY_REALNAME, PROPERTY_ID_REALNAME }
+ };
+ for ( size_t i=0; i < sizeof( aProps ) / sizeof( aProps[0] ); ++i )
+ {
+ if ( xPSI->hasPropertyByName( aProps[i].sName ) )
+ setFastPropertyValue_NoBroadcast( aProps[i].nHandle, _rxParserColumn->getPropertyValue( aProps[i].sName ) );
+ }
+
+ // determine the table column we're based on
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ m_xOriginalTableColumn = impl_determineOriginalTableColumn( _rxConnection );
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+}
+
+//--------------------------------------------------------------------------
+OQueryColumn::~OQueryColumn()
+{
+ DBG_DTOR( OQueryColumn, NULL );
+}
+
+//--------------------------------------------------------------------------
+Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const Reference< XConnection >& _rxConnection )
+{
+ OSL_PRECOND( _rxConnection.is(), "OQueryColumn::impl_determineOriginalTableColumn: illegal connection!" );
+ if ( !_rxConnection.is() )
+ return NULL;
+
+ Reference< XPropertySet > xOriginalTableColumn;
+ try
+ {
+ // determine the composed table name, plus the column name, as indicated by the
+ // respective properties
+ ::rtl::OUString sCatalog, sSchema, sTable;
+ OSL_VERIFY( getPropertyValue( PROPERTY_CATALOGNAME ) >>= sCatalog );
+ OSL_VERIFY( getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema );
+ OSL_VERIFY( getPropertyValue( PROPERTY_TABLENAME ) >>= sTable );
+ if ( !sCatalog.getLength() && !sSchema.getLength() && !sTable.getLength() )
+ return NULL;
+
+ ::rtl::OUString sComposedTableName = ::dbtools::composeTableName(
+ _rxConnection->getMetaData(), sCatalog, sSchema, sTable, sal_False, ::dbtools::eComplete );
+
+ // retrieve the table in question
+ Reference< XTablesSupplier > xSuppTables( _rxConnection, UNO_QUERY_THROW );
+ Reference< XNameAccess > xTables( xSuppTables->getTables(), UNO_QUERY_THROW );
+ if ( !xTables->hasByName( sComposedTableName ) )
+ return NULL;
+
+ Reference< XColumnsSupplier > xSuppCols( xTables->getByName( sComposedTableName ), UNO_QUERY_THROW );
+ Reference< XNameAccess > xColumns( xSuppCols->getColumns(), UNO_QUERY_THROW );
+
+ ::rtl::OUString sColumn;
+ OSL_VERIFY( getPropertyValue( PROPERTY_REALNAME ) >>= sColumn );
+ if ( !xColumns->hasByName( sColumn ) )
+ return NULL;
+
+ xOriginalTableColumn.set( xColumns->getByName( sColumn ), UNO_QUERY );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return xOriginalTableColumn;
+}
+
+//--------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn )
+
+//--------------------------------------------------------------------------
+::rtl::OUString SAL_CALL OQueryColumn::getImplementationName( ) throw(RuntimeException)
+{
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.dbaccess.OQueryColumn" ) );
}
-// comphelper::OPropertyArrayUsageHelper
//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
+::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper()
{
- BEGIN_PROPERTY_HELPER(19)
- DECL_PROP2(ALIGN, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP2(CONTROLDEFAULT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet , BOUND);
- DECL_PROP1(DEFAULTVALUE, ::rtl::OUString, READONLY);
- DECL_PROP1(DESCRIPTION, ::rtl::OUString, READONLY);
- DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP2(HELPTEXT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_BOOL(HIDDEN, BOUND);
- DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
- DECL_PROP1_BOOL(ISCURRENCY, READONLY);
- DECL_PROP1(ISNULLABLE, sal_Int32, READONLY);
- DECL_PROP1_BOOL(ISROWVERSION, READONLY);
- DECL_PROP1(NAME, ::rtl::OUString, READONLY);
- DECL_PROP1(PRECISION, sal_Int32, READONLY);
- DECL_PROP2(RELATIVEPOSITION, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP1(SCALE, sal_Int32, READONLY);
- DECL_PROP1(TYPE, sal_Int32, READONLY);
- DECL_PROP1(TYPENAME, ::rtl::OUString, READONLY);
- DECL_PROP2(WIDTH, sal_Int32, BOUND, MAYBEVOID);
- END_PROPERTY_HELPER();
+ return *OQueryColumn_PBase::getArrayHelper();
}
-//============================================================
+//--------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper* OQueryColumn::createArrayHelper() const
+{
+ return OTableColumnDescriptor::createArrayHelper();
+}
+
+//--------------------------------------------------------------------------
+void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
+{
+ OTableColumnDescriptor::getFastPropertyValue( _rValue, _nHandle );
+
+ // special treatment for column settings:
+ if ( !OColumnSettings::isColumnSettingProperty( _nHandle ) )
+ return;
+
+ // If the setting has its default value, then try to obtain the value from the table column which
+ // this query column is based on
+ if ( !OColumnSettings::isDefaulted( _nHandle, _rValue ) )
+ return;
+
+ if ( !m_xOriginalTableColumn.is() )
+ return;
+
+ try
+ {
+ // determine original property name
+ ::rtl::OUString sPropName;
+ sal_Int16 nAttributes( 0 );
+ const_cast< OQueryColumn* >( this )->getInfoHelper().fillPropertyMembersByHandle( &sPropName, &nAttributes, _nHandle );
+ OSL_ENSURE( sPropName.getLength(), "OColumnWrapper::impl_getPropertyNameFromHandle: property not found!" );
+
+ _rValue = m_xOriginalTableColumn->getPropertyValue( sPropName );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//==========================================================================
//= OColumnWrapper
-//============================================================
+//==========================================================================
DBG_NAME(OColumnWrapper);
//--------------------------------------------------------------------------
-OColumnWrapper::OColumnWrapper(const Reference< XPropertySet > & rCol)
- :m_xAggregate(rCol)
- ,m_nColTypeID(-1)
+OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bool _bNameIsReadOnly )
+ :OColumn( _bNameIsReadOnly )
+ ,m_xAggregate(rCol)
+ ,m_nColTypeID(-1)
{
DBG_CTOR(OColumnWrapper,NULL);
- // which type of aggregate property do we have
- if (m_nColTypeID == -1)
+ // which type of aggregate property do we have?
+ // we distingish the properties by the containment of optional properties
+ m_nColTypeID = 0;
+ if ( m_xAggregate.is() )
{
- // we distingish the properties by the containment of optional properties, these are:
- // Description 0x0001
- // Hidden 0x0002
- // IsRowVersion 0x0004
- m_nColTypeID = 0;
- if ( m_xAggregate.is() )
- {
- Reference <XPropertySetInfo > xInfo(m_xAggregate->getPropertySetInfo());
- m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_DESCRIPTION) ? HAS_DESCRIPTION : 0;
- m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_DEFAULTVALUE) ? HAS_DEFAULTVALUE : 0;
- m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_ISROWVERSION) ? HAS_ROWVERSION : 0;
- m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ? HAS_AUTOINCREMENT_CREATION : 0;
+ Reference <XPropertySetInfo > xInfo(m_xAggregate->getPropertySetInfo());
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_DESCRIPTION) ? HAS_DESCRIPTION : 0;
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_DEFAULTVALUE) ? HAS_DEFAULTVALUE : 0;
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_ISROWVERSION) ? HAS_ROWVERSION : 0;
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ? HAS_AUTOINCREMENT_CREATION : 0;
- m_xAggregate->getPropertyValue(PROPERTY_NAME) >>= m_sName;
- }
+ m_xAggregate->getPropertyValue(PROPERTY_NAME) >>= m_sName;
}
}
// -----------------------------------------------------------------------------
@@ -480,91 +381,91 @@ OColumnWrapper::~OColumnWrapper()
}
//------------------------------------------------------------------------------
+::rtl::OUString OColumnWrapper::impl_getPropertyNameFromHandle( const sal_Int32 _nHandle ) const
+{
+ ::rtl::OUString sPropName;
+ sal_Int16 nAttributes( 0 );
+ const_cast< OColumnWrapper* >( this )->getInfoHelper().fillPropertyMembersByHandle( &sPropName, &nAttributes, _nHandle );
+ OSL_ENSURE( sPropName.getLength(), "OColumnWrapper::impl_getPropertyNameFromHandle: property not found!" );
+ return sPropName;
+}
+
+//------------------------------------------------------------------------------
void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
- switch (nHandle)
+ // derived classes are free to either use the OPropertyContainer(Helper) mechanisms for properties,
+ // or to declare additional properties which are to be forwarded to the wrapped object. So we need
+ // to distinguish those cases.
+ if ( OColumn::isRegisteredProperty( nHandle ) )
{
- case PROPERTY_ID_NAME:
- rValue <<= m_sName;
- break;
- default:
- {
- // get the property name
- ::rtl::OUString aPropName;
- sal_Int16 nAttributes;
- const_cast<OColumnWrapper*>(this)->getInfoHelper().
- fillPropertyMembersByHandle(&aPropName, &nAttributes, nHandle);
- OSL_ENSURE(aPropName.getLength(), "property not found?");
-
- // now read the value
- rValue = m_xAggregate->getPropertyValue(aPropName);
- }
+ OColumn::getFastPropertyValue( rValue, nHandle );
+ }
+ else
+ {
+ rValue = m_xAggregate->getPropertyValue( impl_getPropertyNameFromHandle( nHandle ) );
}
}
//------------------------------------------------------------------------------
-sal_Bool OColumnWrapper::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (IllegalArgumentException)
+sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle,
+ const Any& rValue ) throw (IllegalArgumentException)
{
- // used for the name
- sal_Bool bModified = OColumn::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
-
- // get the property name
- ::rtl::OUString aPropName;
- sal_Int16 nAttributes;
- getInfoHelper().fillPropertyMembersByHandle(&aPropName, &nAttributes, nHandle);
- OSL_ENSURE(aPropName.getLength(), "property not found?");
-
- // now read the value
- m_xAggregate->setPropertyValue(aPropName, rValue);
+ sal_Bool bModified( sal_False );
+ if ( OColumn::isRegisteredProperty( nHandle ) )
+ {
+ bModified = OColumn::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
+ }
+ else
+ {
+ getFastPropertyValue( rOldValue, nHandle );
+ if ( rOldValue != rValue )
+ {
+ rConvertedValue = rValue;
+ bModified = sal_True;
+ }
+ }
return bModified;
}
//------------------------------------------------------------------------------
-void OColumnWrapper::setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const Any& rValue
- )
- throw (Exception)
+void OColumnWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
- OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ if ( OColumn::isRegisteredProperty( nHandle ) )
+ {
+ OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ }
+ else
+ {
+ m_xAggregate->setPropertyValue( impl_getPropertyNameFromHandle( nHandle ), rValue );
+ }
}
+
// -----------------------------------------------------------------------------
sal_Int64 SAL_CALL OColumnWrapper::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw(RuntimeException)
{
- sal_Int64 nRet = OColumn::getSomething(aIdentifier);
- if(!nRet)
- {
- Reference<XUnoTunnel> xTunnel(m_xAggregate,UNO_QUERY);
- if(xTunnel.is())
- nRet = xTunnel->getSomething(aIdentifier);
- }
- return nRet;
+ Reference< XUnoTunnel > xTunnel( m_xAggregate, UNO_QUERY);
+ if ( xTunnel.is() )
+ return xTunnel->getSomething( aIdentifier );
+ return 0;
}
+
//============================================================
//= OTableColumnDescriptorWrapper
//============================================================
-// com::sun::star::lang::XTypeProvider
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumnDescriptorWrapper::getImplementationId() throw (RuntimeException)
+OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< XPropertySet >& _rCol, const bool _bPureWrap, const bool _bIsDescriptor )
+ :OColumnWrapper( _rCol, !_bIsDescriptor )
+ ,m_bPureWrap( _bPureWrap )
+ ,m_bIsDescriptor( _bIsDescriptor )
{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+ // let the ColumnSettings register its properties
+ OColumnSettings::registerProperties( *this );
}
+// com::sun::star::lang::XTypeProvider
+//--------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper )
+
// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
rtl::OUString OTableColumnDescriptorWrapper::getImplementationName( ) throw (RuntimeException)
@@ -581,74 +482,72 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
return aSNS;
}
-// -----------------------------------------------------------------------------
-sal_Int64 SAL_CALL OTableColumnDescriptorWrapper::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw(RuntimeException)
-{
- sal_Int64 nReturn = OColumnWrapper::getSomething( aIdentifier );
- if ( !nReturn )
- nReturn = OColumnSettings::getSomething( aIdentifier );
- return nReturn;
-}
-
// comphelper::OPropertyArrayUsageHelper
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptorWrapper::createArrayHelper( sal_Int32 nId ) const
{
- // BEGIN_PROPERTY_HELPER(17)
- sal_Int32 nPropertyCount = 16;
- // How many properties do we have?
+ const sal_Int32 nHaveAlways = 7;
+
// Which optional properties are contained?
+ sal_Int32 nHaveOptionally = 0;
if (nId & HAS_DESCRIPTION)
- ++nPropertyCount;
+ ++nHaveOptionally;
if (nId & HAS_DEFAULTVALUE)
- ++nPropertyCount;
+ ++nHaveOptionally;
if (nId & HAS_ROWVERSION)
- ++nPropertyCount;
+ ++nHaveOptionally;
if ( nId & HAS_AUTOINCREMENT_CREATION )
- ++nPropertyCount;
+ ++nHaveOptionally;
- Sequence< Property> aDescriptor(nPropertyCount);
- Property* pDesc = aDescriptor.getArray();
+ const sal_Int32 nPropertyCount( nHaveAlways + nHaveOptionally );
+ Sequence< Property > aTableDescProperties( nPropertyCount );
+ Property* pDesc = aTableDescProperties.getArray();
sal_Int32 nPos = 0;
- // Description, Defaultvalue, IsRowVersion
- DECL_PROP2(ALIGN, sal_Int32, BOUND,MAYBEVOID);
- if ( nId & HAS_AUTOINCREMENT_CREATION )
- {
- DECL_PROP1(AUTOINCREMENTCREATION,::rtl::OUString, MAYBEVOID);
- }
- DECL_PROP2(CONTROLDEFAULT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet, BOUND );
- if (nId & HAS_DEFAULTVALUE)
- {
- DECL_PROP0(DEFAULTVALUE, ::rtl::OUString );
- }
+ DECL_PROP0_BOOL( ISAUTOINCREMENT );
+ DECL_PROP0_BOOL( ISCURRENCY );
+ DECL_PROP0( ISNULLABLE, sal_Int32 );
+ DECL_PROP0( PRECISION, sal_Int32 );
+ DECL_PROP0( SCALE, sal_Int32 );
+ DECL_PROP0( TYPE, sal_Int32 );
+ DECL_PROP0( TYPENAME, ::rtl::OUString );
- if (nId & HAS_DESCRIPTION)
- {
- DECL_PROP0(DESCRIPTION, ::rtl::OUString );
- }
+ if ( nId & HAS_AUTOINCREMENT_CREATION )
+ {
+ DECL_PROP1( AUTOINCREMENTCREATION, ::rtl::OUString, MAYBEVOID );
+ }
+ if ( nId & HAS_DEFAULTVALUE )
+ {
+ DECL_PROP0( DEFAULTVALUE, ::rtl::OUString );
+ }
+ if ( nId & HAS_DESCRIPTION )
+ {
+ DECL_PROP0( DESCRIPTION, ::rtl::OUString );
+ }
+ if ( nId & HAS_ROWVERSION )
+ {
+ DECL_PROP0_BOOL( ISROWVERSION );
+ }
- DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND,MAYBEVOID);
- DECL_PROP2(HELPTEXT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_BOOL(HIDDEN, BOUND);
- DECL_PROP0_BOOL(ISAUTOINCREMENT );
- DECL_PROP0_BOOL(ISCURRENCY );
- DECL_PROP0(ISNULLABLE, sal_Int32 );
+ OSL_ENSURE( nPos == nPropertyCount, "OTableColumnDescriptorWrapper::createArrayHelper: something went wrong!" );
- if (nId & HAS_ROWVERSION)
+ if ( !m_bIsDescriptor )
+ {
+ for ( Property* prop = aTableDescProperties.getArray();
+ prop != aTableDescProperties.getArray() + aTableDescProperties.getLength();
+ ++prop
+ )
{
- DECL_PROP0_BOOL(ISROWVERSION );
+ prop->Attributes |= PropertyAttribute::READONLY;
}
+ }
- DECL_PROP0(NAME, ::rtl::OUString );
- DECL_PROP0(PRECISION, sal_Int32 );
- DECL_PROP2(RELATIVEPOSITION, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP0(SCALE, sal_Int32 );
- DECL_PROP0(TYPE, sal_Int32 );
- DECL_PROP0(TYPENAME, ::rtl::OUString );
- DECL_PROP1(WIDTH, sal_Int32, MAYBEVOID);
- END_PROPERTY_HELPER();
+ // finally also describe the properties which are maintained by our base class, in particular the OPropertyContainerHelper
+ Sequence< Property > aBaseProperties;
+ describeProperties( aBaseProperties );
+
+ Sequence< Property > aAllProperties( ::comphelper::concatSequences( aTableDescProperties, aBaseProperties ) );
+ return new ::cppu::OPropertyArrayHelper( aAllProperties, sal_False );
}
// cppu::OPropertySetHelper
@@ -663,75 +562,36 @@ void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32
{
if ( m_bPureWrap )
{
- // get the property name
- ::rtl::OUString aPropName;
- sal_Int16 nAttributes;
- const_cast<OTableColumnDescriptorWrapper*>(this)->getInfoHelper().
- fillPropertyMembersByHandle(&aPropName, &nAttributes, nHandle);
- OSL_ENSURE(aPropName.getLength(), "property not found?");
-
- // now read the value
- rValue = m_xAggregate->getPropertyValue(aPropName);
+ rValue = m_xAggregate->getPropertyValue( impl_getPropertyNameFromHandle( nHandle ) );
}
else
{
- switch (nHandle)
- {
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- OColumnSettings::getFastPropertyValue( rValue, nHandle );
- break;
- default:
- {
- // get the property name
- ::rtl::OUString aPropName;
- sal_Int16 nAttributes;
- const_cast<OTableColumnDescriptorWrapper*>(this)->getInfoHelper().
- fillPropertyMembersByHandle(&aPropName, &nAttributes, nHandle);
- OSL_ENSURE(aPropName.getLength(), "property not found?");
-
- // now read the value
- rValue = m_xAggregate->getPropertyValue(aPropName);
- }
- }
+ OColumnWrapper::getFastPropertyValue( rValue, nHandle );
}
}
//------------------------------------------------------------------------------
-sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
- const Any& rValue )
- throw (IllegalArgumentException)
+sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException)
{
sal_Bool bModified(sal_False);
if ( m_bPureWrap )
- bModified = OColumnWrapper::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
- else
{
- switch (nHandle)
+ // do not delegate to OColumnWrapper: It would, for the properties which were registered with registerProperty,
+ // ask the OPropertyContainer base class, which is not what we want here.
+ // TODO: the whole "m_bPureWrap"-thingie is strange. We should have a dedicated class doing this wrapping,
+ // not a class which normally serves other purposes, and only sometimes does a "pure wrap". It makes the
+ // code unnecessarily hard to maintain, and error prone.
+ rOldValue = m_xAggregate->getPropertyValue( impl_getPropertyNameFromHandle( nHandle ) );
+ if ( rOldValue != rValue )
{
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
- break;
- default:
- bModified = OColumnWrapper::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
+ rConvertedValue = rValue;
+ bModified = sal_True;
}
}
+ else
+ {
+ bModified = OColumnWrapper::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
+ }
return bModified;
}
@@ -743,24 +603,12 @@ void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
throw (Exception)
{
if ( m_bPureWrap )
- OColumnWrapper::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+ {
+ m_xAggregate->setPropertyValue( impl_getPropertyNameFromHandle( nHandle ), rValue );
+ }
else
{
- switch (nHandle)
- {
- case PROPERTY_ID_ALIGN:
- case PROPERTY_ID_NUMBERFORMAT:
- case PROPERTY_ID_RELATIVEPOSITION:
- case PROPERTY_ID_WIDTH:
- case PROPERTY_ID_HIDDEN:
- case PROPERTY_ID_CONTROLMODEL:
- case PROPERTY_ID_HELPTEXT:
- case PROPERTY_ID_CONTROLDEFAULT:
- OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- break;
- default:
- OColumnWrapper::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- }
+ OColumnWrapper::setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
}
@@ -768,24 +616,23 @@ void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
//= OTableColumnWrapper
//============================================================
//--------------------------------------------------------------------------
-OTableColumnWrapper::OTableColumnWrapper(const Reference< XPropertySet >& rCol
- ,const Reference< XPropertySet >& _xColDefintion
- ,sal_Bool _bPureWrap)
- :OTableColumnDescriptorWrapper(rCol,_bPureWrap)
+OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol, const Reference< XPropertySet >& _xColDefintion,
+ const bool _bPureWrap )
+ :OTableColumnDescriptorWrapper( rCol, _bPureWrap, false )
{
- osl_incrementInterlockedCount(&m_refCount);
+ osl_incrementInterlockedCount( &m_refCount );
if ( _xColDefintion.is() )
{
try
{
- ::comphelper::copyProperties(_xColDefintion,this);
+ ::comphelper::copyProperties( _xColDefintion, this );
}
- catch(Exception&)
+ catch( const Exception& )
{
- OSL_ENSURE(sal_False, "OTableColumnWrapper::OTableColumnWrapper: caught an exception!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
- osl_decrementInterlockedCount(&m_refCount);
+ osl_decrementInterlockedCount( &m_refCount );
}
//--------------------------------------------------------------------------
@@ -793,27 +640,13 @@ OTableColumnWrapper::~OTableColumnWrapper()
{
}
-// com::sun::star::lang::XTypeProvider
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumnWrapper::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-// ::com::sun::star::lang::XServiceInfo
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper )
+
//------------------------------------------------------------------------------
rtl::OUString OTableColumnWrapper::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumnWrapper");
+ return rtl::OUString::createFromAscii( "com.sun.star.sdb.OTableColumnWrapper" );
}
//------------------------------------------------------------------------------
@@ -835,206 +668,6 @@ Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) th
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnWrapper::createArrayHelper( sal_Int32 nId ) const
{
- // BEGIN_PROPERTY_HELPER(17)
- sal_Int32 nPropertyCount = 16;
- // How many properties do we have?
- // Which optional properties are contained?
- if (nId & HAS_DESCRIPTION)
- nPropertyCount++;
- if (nId & HAS_DEFAULTVALUE)
- nPropertyCount++;
- if (nId & HAS_ROWVERSION)
- nPropertyCount++;
- if ( nId & HAS_AUTOINCREMENT_CREATION )
- ++nPropertyCount;
-
- Sequence< Property> aDescriptor(nPropertyCount);
- Property* pDesc = aDescriptor.getArray();
- sal_Int32 nPos = 0;
-
- // Description, Defaultvalue, IsRowVersion
- DECL_PROP2(ALIGN, sal_Int32, BOUND, MAYBEVOID);
- if ( nId & HAS_AUTOINCREMENT_CREATION )
- {
- DECL_PROP1(AUTOINCREMENTCREATION,::rtl::OUString, MAYBEVOID);
- }
- DECL_PROP2(CONTROLDEFAULT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet , BOUND);
- if (nId & HAS_DEFAULTVALUE)
- {
- DECL_PROP1(DEFAULTVALUE, ::rtl::OUString, READONLY);
- }
-
- if (nId & HAS_DESCRIPTION)
- {
- DECL_PROP1(DESCRIPTION, ::rtl::OUString, READONLY);
- }
-
- DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP2(HELPTEXT, ::rtl::OUString, BOUND,MAYBEVOID);
- DECL_PROP1_BOOL(HIDDEN, BOUND);
- DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
- DECL_PROP1_BOOL(ISCURRENCY, READONLY);
-
- DECL_PROP1(ISNULLABLE, sal_Int32, READONLY);
-
- if (nId & HAS_ROWVERSION)
- {
- DECL_PROP1_BOOL(ISROWVERSION, READONLY);
- }
-
- DECL_PROP1(NAME, ::rtl::OUString, READONLY);
- DECL_PROP1(PRECISION, sal_Int32, READONLY);
- DECL_PROP2(RELATIVEPOSITION, sal_Int32, BOUND, MAYBEVOID);
- DECL_PROP1(SCALE, sal_Int32, READONLY);
- DECL_PROP1(TYPE, sal_Int32, READONLY);
- DECL_PROP1(TYPENAME, ::rtl::OUString, READONLY);
- DECL_PROP2(WIDTH, sal_Int32, BOUND, MAYBEVOID);
- END_PROPERTY_HELPER();
-}
-
-//============================================================
-//= OIndexColumnWrapper
-//============================================================
-// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OIndexColumnWrapper::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
-rtl::OUString OIndexColumnWrapper::getImplementationName( ) throw (RuntimeException)
-{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OIndexColumnWrapper");
-}
-
-//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > OIndexColumnWrapper::getSupportedServiceNames( ) throw (RuntimeException)
-{
- Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS[0] = SERVICE_SDBCX_COLUMN;
- aSNS[1] = SERVICE_SDBCX_INDEXCOLUMN;
- return aSNS;
-}
-
-//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper& OIndexColumnWrapper::getInfoHelper()
-{
- return *static_cast< OPropertyArrayUsageHelper< OIndexColumnWrapper >* >(this)->getArrayHelper();
-}
-
-// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper* OIndexColumnWrapper::createArrayHelper() const
-{
- BEGIN_PROPERTY_HELPER(9)
- DECL_PROP1_BOOL(ISASCENDING, READONLY);
- DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
- DECL_PROP1_BOOL(ISCURRENCY, READONLY);
- DECL_PROP1(ISNULLABLE, sal_Int32, READONLY);
- DECL_PROP1(NAME, ::rtl::OUString, READONLY);
- DECL_PROP1(PRECISION, sal_Int32, READONLY);
- DECL_PROP1(SCALE, sal_Int32, READONLY);
- DECL_PROP1(TYPE, sal_Int32, READONLY);
- DECL_PROP1(TYPENAME, ::rtl::OUString, READONLY);
- END_PROPERTY_HELPER();
-}
-
-//------------------------------------------------------------------------------
-void OIndexColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
-{
- switch (nHandle)
- {
- case PROPERTY_ID_ISASCENDING:
- {
- sal_Bool bVal = m_bAscending;
- rValue.setValue(&bVal, getBooleanCppuType());
- } break;
- default:
- OColumnWrapper::getFastPropertyValue( rValue, nHandle );
- }
+ return OTableColumnDescriptorWrapper::createArrayHelper( nId );
}
-//============================================================
-//= OKeyColumnWrapper
-//============================================================
-// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OKeyColumnWrapper::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
-rtl::OUString OKeyColumnWrapper::getImplementationName( ) throw (RuntimeException)
-{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OIndexColumnWrapper");
-}
-
-//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > OKeyColumnWrapper::getSupportedServiceNames( ) throw (RuntimeException)
-{
- Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS[0] = SERVICE_SDBCX_COLUMN;
- aSNS[1] = SERVICE_SDBCX_KEYCOLUMN;
- return aSNS;
-}
-
-//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper& OKeyColumnWrapper::getInfoHelper()
-{
- return *static_cast< OPropertyArrayUsageHelper< OKeyColumnWrapper >* >(this)->getArrayHelper();
-}
-
-// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper* OKeyColumnWrapper::createArrayHelper() const
-{
- BEGIN_PROPERTY_HELPER(9)
- DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
- DECL_PROP1_BOOL(ISCURRENCY, READONLY);
- DECL_PROP1(ISNULLABLE, sal_Int32, READONLY);
- DECL_PROP1(NAME, ::rtl::OUString, READONLY);
- DECL_PROP1(PRECISION, sal_Int32, READONLY);
- DECL_PROP1(RELATEDCOLUMN, ::rtl::OUString, READONLY);
- DECL_PROP1(SCALE, sal_Int32, READONLY);
- DECL_PROP1(TYPE, sal_Int32, READONLY);
- DECL_PROP1(TYPENAME, ::rtl::OUString, READONLY);
- END_PROPERTY_HELPER();
-}
-
-//------------------------------------------------------------------------------
-void OKeyColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
-{
- switch (nHandle)
- {
- case PROPERTY_ID_RELATEDCOLUMN:
- rValue <<= m_aRelatedColumn;
- break;
- default:
- OColumnWrapper::getFastPropertyValue( rValue, nHandle );
- }
-}
-
-
diff --git a/dbaccess/source/core/api/makefile.mk b/dbaccess/source/core/api/makefile.mk
index 59d89fb9036f..f983db38b640 100644
--- a/dbaccess/source/core/api/makefile.mk
+++ b/dbaccess/source/core/api/makefile.mk
@@ -73,7 +73,8 @@ SLOFILES= \
$(SLO)$/tablecontainer.obj \
$(SLO)$/SingleSelectQueryComposer.obj \
$(SLO)$/HelperCollections.obj \
- $(SLO)$/datasettings.obj
+ $(SLO)$/datasettings.obj \
+ $(SLO)$/columnsettings.obj
# --- Targets ----------------------------------
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index 761b27fc94ed..f2fd05cdf12c 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -30,39 +30,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBA_COREAPI_PREPAREDSTATEMENT_HXX_
-#include <preparedstatement.hxx>
-#endif
-#ifndef _DBA_COREAPI_RESULTSET_HXX_
-#include <resultset.hxx>
-#endif
-#ifndef _DBA_COREAPI_RESULTCOLUMN_HXX_
-#include <resultcolumn.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
+
#include "dbastrings.hrc"
-#endif
-#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+
#include <com/sun/star/lang/DisposedException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
+
+#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
-#include <comphelper/property.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <preparedstatement.hxx>
+#include <resultcolumn.hxx>
+#include <resultset.hxx>
#include <tools/debug.hxx>
-#endif
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
@@ -203,27 +185,23 @@ Reference< ::com::sun::star::container::XNameAccess > OPreparedStatement::getCol
{
try
{
- // get the metadata
- Reference< XResultSetMetaData > xMetaData = Reference< XResultSetMetaDataSupplier >(m_xAggregateAsSet, UNO_QUERY)->getMetaData();
- // do we have columns
- if ( xMetaData.is() )
+ Reference< XResultSetMetaDataSupplier > xSuppMeta( m_xAggregateAsSet, UNO_QUERY_THROW );
+ Reference< XResultSetMetaData > xMetaData( xSuppMeta->getMetaData(), UNO_SET_THROW );
+
+ Reference< XConnection > xConn( getConnection(), UNO_SET_THROW );
+ Reference< XDatabaseMetaData > xDBMeta( xConn->getMetaData(), UNO_SET_THROW );
+
+ for (sal_Int32 i = 0, nCount = xMetaData->getColumnCount(); i < nCount; ++i)
{
- Reference< XDatabaseMetaData > xDBMeta;
- Reference< XConnection > xConn( getConnection() );
- if ( xConn.is() )
- xDBMeta = xConn->getMetaData();
-
- for (sal_Int32 i = 0, nCount = xMetaData->getColumnCount(); i < nCount; ++i)
- {
- // retrieve the name of the column
- rtl::OUString aName = xMetaData->getColumnName(i + 1);
- OResultColumn* pColumn = new OResultColumn(xMetaData, i + 1, xDBMeta);
- m_pColumns->append(aName, pColumn);
- }
+ // retrieve the name of the column
+ rtl::OUString aName = xMetaData->getColumnName(i + 1);
+ OResultColumn* pColumn = new OResultColumn(xMetaData, i + 1, xDBMeta);
+ m_pColumns->append(aName, pColumn);
}
}
- catch (SQLException)
+ catch (const SQLException& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
m_pColumns->setInitialized();
}
@@ -236,7 +214,7 @@ Reference< XResultSetMetaData > OPreparedStatement::getMetaData(void) throw( SQL
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed);
- return Reference< XResultSetMetaDataSupplier >(m_xAggregateAsSet, UNO_QUERY)->getMetaData();
+ return Reference< XResultSetMetaDataSupplier >( m_xAggregateAsSet, UNO_QUERY_THROW )->getMetaData();
}
// XPreparedStatement
@@ -249,7 +227,7 @@ Reference< XResultSet > OPreparedStatement::executeQuery() throw( SQLException,
disposeResultSet();
Reference< XResultSet > xResultSet;
- Reference< XResultSet > xDrvResultSet = Reference< XPreparedStatement >(m_xAggregateAsSet, UNO_QUERY)->executeQuery();
+ Reference< XResultSet > xDrvResultSet = Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->executeQuery();
if (xDrvResultSet.is())
{
xResultSet = new OResultSet(xDrvResultSet, *this, m_pColumns->isCaseSensitive());
@@ -268,7 +246,7 @@ sal_Int32 OPreparedStatement::executeUpdate() throw( SQLException, RuntimeExcept
disposeResultSet();
- return Reference< XPreparedStatement >(m_xAggregateAsSet, UNO_QUERY)->executeUpdate();
+ return Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->executeUpdate();
}
//------------------------------------------------------------------------------
@@ -278,7 +256,8 @@ sal_Bool OPreparedStatement::execute() throw( SQLException, RuntimeException )
::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed);
disposeResultSet();
- return Reference< XPreparedStatement >(m_xAggregateAsSet, UNO_QUERY)->execute();
+
+ return Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->execute();
}
//------------------------------------------------------------------------------
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 489ca625c5d7..7468e88f4fff 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -241,13 +241,12 @@ void OQuery::rebuildColumns()
for ( ;pBegin != pEnd; ++pBegin)
{
Reference<XPropertySet> xSource(xColumns->getByName( *pBegin ),UNO_QUERY);
- OTableColumn* pColumn = new OTableColumn( xSource );
- Reference<XChild> xChild(*pColumn,UNO_QUERY);
- if ( xChild.is() )
- xChild->setParent(*this);
+ OQueryColumn* pColumn = new OQueryColumn( xSource, m_xConnection );
+ Reference< XChild > xChild( *pColumn, UNO_QUERY_THROW );
+ xChild->setParent( *this );
implAppendColumn( *pBegin, pColumn );
- Reference<XPropertySet> xDest(*pColumn,UNO_QUERY);
+ Reference< XPropertySet > xDest( *pColumn, UNO_QUERY_THROW );
if ( m_pColumnMediator.is() )
m_pColumnMediator->notifyElementCreated( *pBegin, xDest );
}
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index f86a1a8bf6e5..2d75ce3bf8bd 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -163,6 +163,10 @@ OQueryContainer::~OQueryContainer()
}
// -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
+
+//------------------------------------------------------------------------------
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
+
//------------------------------------------------------------------------------
void OQueryContainer::disposing()
{
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index 5f8c265e36df..2dfb6714ee63 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -242,7 +242,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru
{
rebuildColumns();
}
- catch(...)
+ catch ( const Exception& )
{
setColumnsOutOfDate( sal_True );
throw;
@@ -313,9 +313,10 @@ void OQueryDescriptor_Base::refreshColumns()
}
//------------------------------------------------------------------------------
-OColumn* OQueryDescriptor_Base::createColumn(const ::rtl::OUString& _rName) const
+OColumn* OQueryDescriptor_Base::createColumn( const ::rtl::OUString& /*_rName*/ ) const
{
- return new OTableColumn(_rName);
+ // creating a column/descriptor for a query/descriptor does not make sense at all
+ return NULL;
}
// -----------------------------------------------------------------------------
//........................................................................
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index 4fb765148df9..33cc93b02994 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -82,13 +82,12 @@ using namespace dbaccess;
DBG_NAME(OResultColumn)
//--------------------------------------------------------------------------
-OResultColumn::OResultColumn(
- const Reference < XResultSetMetaData >& _xMetaData,
- sal_Int32 _nPos,
- const Reference< XDatabaseMetaData >& _rxDBMeta )
- :m_xMetaData(_xMetaData)
- ,m_xDBMetaData(_rxDBMeta)
- ,m_nPos(_nPos)
+OResultColumn::OResultColumn( const Reference < XResultSetMetaData >& _xMetaData, sal_Int32 _nPos,
+ const Reference< XDatabaseMetaData >& _rxDBMeta )
+ :OColumn( true )
+ ,m_xMetaData( _xMetaData )
+ ,m_xDBMetaData( _rxDBMeta )
+ ,m_nPos( _nPos )
{
DBG_CTOR(OResultColumn,NULL);
}
@@ -216,112 +215,95 @@ void OResultColumn::disposing()
}
//------------------------------------------------------------------------------
+namespace
+{
+ template< typename TYPE >
+ void obtain( Any& _out_rValue, ::boost::optional< TYPE > _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, TYPE (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
+ {
+ if ( !_rCache )
+ _rCache.reset( (_rxResultMeta.get()->*Getter)( _nPos ) );
+ _out_rValue <<= *_rCache;
+ }
+}
+
+//------------------------------------------------------------------------------
void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
try
{
- switch (nHandle)
+ if ( OColumn::isRegisteredProperty( nHandle ) )
{
- case PROPERTY_ID_ISROWVERSION:
- const_cast< OResultColumn* >( this )->impl_determineIsRowVersion_nothrow();
- rValue = m_aIsRowVersion;
- break;
- case PROPERTY_ID_TABLENAME:
- rValue <<= m_xMetaData->getTableName(m_nPos);
- break;
- case PROPERTY_ID_SCHEMANAME:
- rValue <<= m_xMetaData->getSchemaName(m_nPos);
- break;
- case PROPERTY_ID_CATALOGNAME:
- rValue <<= m_xMetaData->getCatalogName(m_nPos);
- break;
- case PROPERTY_ID_ISSIGNED:
- {
- if ( !m_isSigned )
- m_isSigned.reset( m_xMetaData->isSigned(m_nPos));
- rValue <<= *m_isSigned;
- } break;
- case PROPERTY_ID_ISCURRENCY:
- {
- if ( !m_isCurrency )
- m_isCurrency.reset( m_xMetaData->isCurrency(m_nPos));
- rValue <<= *m_isCurrency;
- } break;
- case PROPERTY_ID_ISSEARCHABLE:
- {
- if ( !m_bSearchable )
- m_bSearchable.reset( m_xMetaData->isSearchable(m_nPos));
- rValue <<= *m_bSearchable;
- } break;
- case PROPERTY_ID_ISCASESENSITIVE:
- {
- if ( !m_isCaseSensitive )
- m_isCaseSensitive.reset( m_xMetaData->isCaseSensitive(m_nPos));
- rValue <<= *m_isCaseSensitive;
- } break;
- case PROPERTY_ID_ISREADONLY:
- {
- if ( !m_isReadOnly )
- m_isReadOnly.reset( m_xMetaData->isReadOnly(m_nPos));
- rValue <<= *m_isReadOnly;
- } break;
- case PROPERTY_ID_ISWRITABLE:
- {
- if ( !m_isWritable )
- m_isWritable.reset( m_xMetaData->isWritable(m_nPos));
- rValue <<= *m_isWritable;
- } break;
- case PROPERTY_ID_ISDEFINITELYWRITABLE:
- {
- if ( !m_isDefinitelyWritable )
- m_isDefinitelyWritable.reset( m_xMetaData->isDefinitelyWritable(m_nPos));
- rValue <<= *m_isDefinitelyWritable;
- } break;
- case PROPERTY_ID_ISAUTOINCREMENT:
+ OColumn::getFastPropertyValue( rValue, nHandle );
+ }
+ else
+ {
+ switch (nHandle)
{
- if ( !m_isAutoIncrement )
- m_isAutoIncrement.reset( m_xMetaData->isAutoIncrement(m_nPos));
- rValue <<= *m_isAutoIncrement;
- } break;
- case PROPERTY_ID_SERVICENAME:
- rValue <<= m_xMetaData->getColumnServiceName(m_nPos);
- break;
- case PROPERTY_ID_LABEL:
- if ( !m_sColumnLabel )
- m_sColumnLabel.reset( m_xMetaData->getColumnLabel(m_nPos));
- rValue <<= *m_sColumnLabel;
- break;
- case PROPERTY_ID_DISPLAYSIZE:
- if ( !m_nColumnDisplaySize )
- m_nColumnDisplaySize.reset( m_xMetaData->getColumnDisplaySize(m_nPos));
- rValue <<= *m_nColumnDisplaySize;
- break;
- case PROPERTY_ID_TYPE:
- if ( !m_nColumnType )
- m_nColumnType.reset( m_xMetaData->getColumnType(m_nPos));
- rValue <<= *m_nColumnType;
- break;
- case PROPERTY_ID_PRECISION:
- if ( !m_nPrecision )
- m_nPrecision.reset( m_xMetaData->getPrecision(m_nPos));
- rValue <<= *m_nPrecision;
- break;
- case PROPERTY_ID_SCALE:
- if ( !m_nScale )
- m_nScale.reset( m_xMetaData->getScale(m_nPos));
- rValue <<= *m_nScale;
- break;
- case PROPERTY_ID_ISNULLABLE:
- if ( !m_isNullable )
- m_isNullable.reset( m_xMetaData->isNullable(m_nPos));
- rValue <<= *m_isNullable;
- break;
- case PROPERTY_ID_TYPENAME:
- rValue <<= m_xMetaData->getColumnTypeName(m_nPos);
- break;
- case PROPERTY_ID_NAME:
- OColumn::getFastPropertyValue( rValue, nHandle );
- break;
+ case PROPERTY_ID_ISROWVERSION:
+ const_cast< OResultColumn* >( this )->impl_determineIsRowVersion_nothrow();
+ rValue = m_aIsRowVersion;
+ break;
+ case PROPERTY_ID_TABLENAME:
+ rValue <<= m_xMetaData->getTableName(m_nPos);
+ break;
+ case PROPERTY_ID_SCHEMANAME:
+ rValue <<= m_xMetaData->getSchemaName(m_nPos);
+ break;
+ case PROPERTY_ID_CATALOGNAME:
+ rValue <<= m_xMetaData->getCatalogName(m_nPos);
+ break;
+ case PROPERTY_ID_ISSIGNED:
+ obtain( rValue, m_isSigned, m_nPos, m_xMetaData, &XResultSetMetaData::isSigned );
+ break;
+ case PROPERTY_ID_ISCURRENCY:
+ obtain( rValue, m_isCurrency, m_nPos, m_xMetaData, &XResultSetMetaData::isCurrency );
+ break;
+ case PROPERTY_ID_ISSEARCHABLE:
+ obtain( rValue, m_bSearchable, m_nPos, m_xMetaData, &XResultSetMetaData::isSearchable );
+ break;
+ case PROPERTY_ID_ISCASESENSITIVE:
+ obtain( rValue, m_isCaseSensitive, m_nPos, m_xMetaData, &XResultSetMetaData::isCaseSensitive );
+ break;
+ case PROPERTY_ID_ISREADONLY:
+ obtain( rValue, m_isReadOnly, m_nPos, m_xMetaData, &XResultSetMetaData::isReadOnly );
+ break;
+ case PROPERTY_ID_ISWRITABLE:
+ obtain( rValue, m_isWritable, m_nPos, m_xMetaData, &XResultSetMetaData::isWritable );
+ break;
+ case PROPERTY_ID_ISDEFINITELYWRITABLE:
+ obtain( rValue, m_isDefinitelyWritable, m_nPos, m_xMetaData, &XResultSetMetaData::isDefinitelyWritable );
+ break;
+ case PROPERTY_ID_ISAUTOINCREMENT:
+ obtain( rValue, m_isAutoIncrement, m_nPos, m_xMetaData, &XResultSetMetaData::isAutoIncrement );
+ break;
+ case PROPERTY_ID_SERVICENAME:
+ rValue <<= m_xMetaData->getColumnServiceName(m_nPos);
+ break;
+ case PROPERTY_ID_LABEL:
+ obtain( rValue, m_sColumnLabel, m_nPos, m_xMetaData, &XResultSetMetaData::getColumnLabel );
+ break;
+ case PROPERTY_ID_DISPLAYSIZE:
+ obtain( rValue, m_nColumnDisplaySize, m_nPos, m_xMetaData, &XResultSetMetaData::getColumnDisplaySize );
+ break;
+ case PROPERTY_ID_TYPE:
+ obtain( rValue, m_nColumnType, m_nPos, m_xMetaData, &XResultSetMetaData::getColumnType );
+ break;
+ case PROPERTY_ID_PRECISION:
+ obtain( rValue, m_nPrecision, m_nPos, m_xMetaData, &XResultSetMetaData::getPrecision );
+ break;
+ case PROPERTY_ID_SCALE:
+ obtain( rValue, m_nScale, m_nPos, m_xMetaData, &XResultSetMetaData::getScale );
+ break;
+ case PROPERTY_ID_ISNULLABLE:
+ obtain( rValue, m_isNullable, m_nPos, m_xMetaData, &XResultSetMetaData::isNullable );
+ break;
+ case PROPERTY_ID_TYPENAME:
+ rValue <<= m_xMetaData->getColumnTypeName(m_nPos);
+ break;
+ default:
+ OSL_ENSURE( false, "OResultColumn::getFastPropertyValue: unknown property handle!" );
+ break;
+ }
}
}
catch (SQLException& )
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 9d2772a5f3ef..301038903b97 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -182,7 +182,7 @@ OColumn* ODBTable::createColumn(const ::rtl::OUString& _rName) const
Reference<XPropertySet> xColumnDefintion;
if ( m_xColumnDefinitions.is() && m_xColumnDefinitions->hasByName(_rName) )
xColumnDefintion.set(m_xColumnDefinitions->getByName(_rName),UNO_QUERY);
- pReturn = new OTableColumnWrapper(xProp,xColumnDefintion);
+ pReturn = new OTableColumnWrapper( xProp, xColumnDefintion, false );
return pReturn;
}
@@ -468,7 +468,7 @@ Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId()
Reference< XPropertySet > ODBTable::createColumnDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumnDescriptor" );
- return new OTableColumnDescriptor();
+ return new OTableColumnDescriptor( true );
}
// -----------------------------------------------------------------------------
sdbcx::OCollection* ODBTable::createColumns(const TStringVector& _rNames)
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 2d8ce453fb2c..8c1abc1f0048 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -364,15 +364,11 @@ ObjectType OTableContainer::appendObject( const ::rtl::OUString& _rForName, cons
if ( !xColumnDefinitions->hasByName(*pIter) )
{
Reference<XPropertySet> xColumn(xNames->getByName(*pIter),UNO_QUERY);
- OColumnSettings* pColumnSettings = NULL;
- if ( ::comphelper::getImplementation( pColumnSettings, xColumn ) )
+ if ( !OColumnSettings::hasDefaultSettings( xColumn ) )
{
- if ( ( pColumnSettings && !pColumnSettings->isDefaulted() ) )
- {
- ::comphelper::copyProperties(xColumn,xProp);
- xAppend->appendByDescriptor(xProp);
- bModified = sal_True;
- }
+ ::comphelper::copyProperties( xColumn, xProp );
+ xAppend->appendByDescriptor( xProp );
+ bModified = sal_True;
}
}
}
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 452931848e5c..678ed2ce612e 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -280,14 +280,16 @@ OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
if ( aFind != rDefinition.end() )
{
aFind->second->addPropertyChangeListener(::rtl::OUString(),m_xColumnPropertyListener.getRef());
- return new OTableColumnWrapper( aFind->second, aFind->second, sal_True );
+ return new OTableColumnWrapper( aFind->second, aFind->second, true );
}
+ OSL_ENSURE( false, "OComponentDefinition::createColumn: is this a valid case?" );
+ // This here is the last place creating a OTableColumn, and somehow /me thinks it is not needed ...
return new OTableColumn( _rName );
}
// -----------------------------------------------------------------------------
Reference< XPropertySet > OComponentDefinition::createColumnDescriptor()
{
- return new OTableColumnDescriptor();
+ return new OTableColumnDescriptor( true );
}
// -----------------------------------------------------------------------------
void OComponentDefinition::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
@@ -307,7 +309,7 @@ void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxS
::rtl::OUString sName;
_rxSourceDescriptor->getPropertyValue( PROPERTY_NAME ) >>= sName;
- Reference<XPropertySet> xColDesc = new OTableColumnDescriptor();
+ Reference<XPropertySet> xColDesc = new OTableColumnDescriptor( true );
::comphelper::copyProperties( _rxSourceDescriptor, xColDesc );
getDefinition().insert( sName, xColDesc );
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 755f8f717d25..fef47f68145a 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -546,7 +546,7 @@ void ODatabaseModelImpl::impl_construct_nothrow()
Property aProperty(
::rtl::OUString::createFromAscii( pSettings->AsciiName ),
-1,
- ::getCppuType( static_cast< ::rtl::OUString* >( NULL ) ),
+ pSettings->ValueType,
PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID
);
xSettingsSet->insert( makeAny( aProperty ) );
@@ -1164,8 +1164,9 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
AsciiPropertyValue( "ParameterNameSubstitution", makeAny( (sal_Bool)sal_False ) ),
AsciiPropertyValue( "AddIndexAppendix", makeAny( (sal_Bool)sal_True ) ),
AsciiPropertyValue( "IgnoreDriverPrivileges", makeAny( (sal_Bool)sal_True ) ),
- AsciiPropertyValue( "ImplicitCatalogRestriction", Any( ) ),
- AsciiPropertyValue( "ImplicitSchemaRestriction", Any( ) ),
+ AsciiPropertyValue( "ImplicitCatalogRestriction", ::cppu::UnoType< ::rtl::OUString >::get() ),
+ AsciiPropertyValue( "ImplicitSchemaRestriction", ::cppu::UnoType< ::rtl::OUString >::get() ),
+ AsciiPropertyValue( "PrimaryKeySupport", ::cppu::UnoType< sal_Bool >::get() ),
// known SDB level settings
AsciiPropertyValue( "NoNameLengthLimit", makeAny( (sal_Bool)sal_False ) ),
AsciiPropertyValue( "AppendTableAliasName", makeAny( (sal_Bool)sal_False ) ),
@@ -1182,7 +1183,7 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
AsciiPropertyValue( "FormsCheckRequiredFields", makeAny( (sal_Bool)sal_True ) ),
AsciiPropertyValue( "EscapeDateTime", makeAny( (sal_Bool)sal_True ) ),
- AsciiPropertyValue( NULL, Any() )
+ AsciiPropertyValue()
};
return aKnownSettings;
}
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index f9b38be569af..4dd72cf5b319 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -104,13 +104,32 @@ struct AsciiPropertyValue
// note: the canonic member order would be AsciiName / DefaultValue, but
// this crashes on unxlngi6.pro, since there's a bug which somehow results in
// getDefaultDataSourceSettings returning corrupted Any instances then.
- ::com::sun::star::uno::Any DefaultValue;
- const sal_Char* AsciiName;
+ ::com::sun::star::uno::Any DefaultValue;
+ const sal_Char* AsciiName;
+ const ::com::sun::star::uno::Type& ValueType;
+
+ AsciiPropertyValue()
+ :DefaultValue( )
+ ,AsciiName( NULL )
+ ,ValueType( ::cppu::UnoType< ::cppu::UnoVoidType >::get() )
+ {
+ }
AsciiPropertyValue( const sal_Char* _pAsciiName, const ::com::sun::star::uno::Any& _rDefaultValue )
:DefaultValue( _rDefaultValue )
,AsciiName( _pAsciiName )
+ ,ValueType( _rDefaultValue.getValueType() )
+ {
+ OSL_ENSURE( ValueType.getTypeClass() != ::com::sun::star::uno::TypeClass_VOID,
+ "AsciiPropertyValue::AsciiPropertyValue: NULL values not allowed here, use the other CTOR for this!" );
+ }
+ AsciiPropertyValue( const sal_Char* _pAsciiName, const ::com::sun::star::uno::Type& _rValeType )
+ :DefaultValue()
+ ,AsciiName( _pAsciiName )
+ ,ValueType( _rValeType )
{
+ OSL_ENSURE( ValueType.getTypeClass() != ::com::sun::star::uno::TypeClass_VOID,
+ "AsciiPropertyValue::AsciiPropertyValue: VOID property values not supported!" );
}
};
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 84dbdff17d13..8a7ff1b1595c 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -36,6 +36,7 @@
#include "core_resource.hxx"
#include "databasecontext.hxx"
#include "databasedocument.hxx"
+#include "databaseregistrations.hxx"
#include "datasource.hxx"
#include "dbastrings.hrc"
#include "module_dba.hxx"
@@ -70,7 +71,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <svl/filenotation.hxx>
-#include <unotools/pathoptions.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <tools/fsys.hxx>
@@ -114,30 +114,6 @@ namespace dbaccess
{
//........................................................................
- namespace
- {
- //--------------------------------------------------------------------
- const ::rtl::OUString& getDbRegisteredNamesNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/RegisteredNames");
- return s_sNodeName;
- }
-
- //--------------------------------------------------------------------
- const ::rtl::OUString& getDbNameNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Name");
- return s_sNodeName;
- }
-
- //--------------------------------------------------------------------
- const ::rtl::OUString& getDbLocationNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Location");
- return s_sNodeName;
- }
- // -----------------------------------------------------------------------------
- }
// .............................................................................
typedef ::cppu::WeakImplHelper1 < XTerminateListener
> DatabaseDocumentLoader_Base;
@@ -224,6 +200,15 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
{
m_pDatabaseDocumentLoader = new DatabaseDocumentLoader( m_aContext );
::basic::BasicManagerRepository::registerCreationListener( *this );
+
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ m_xDBRegistrationAggregate.set( createDataSourceRegistrations( m_aContext ), UNO_SET_THROW );
+ m_xDatabaseRegistrations.set( m_xDBRegistrationAggregate, UNO_QUERY_THROW );
+
+ m_xDBRegistrationAggregate->setDelegator( *this );
+ }
+ osl_decrementInterlockedCount( &m_refCount );
}
//--------------------------------------------------------------------------
@@ -232,6 +217,10 @@ ODatabaseContext::~ODatabaseContext()
::basic::BasicManagerRepository::revokeCreationListener( *this );
if ( m_pDatabaseDocumentLoader )
m_pDatabaseDocumentLoader->release();
+
+ m_xDBRegistrationAggregate->setDelegator( NULL );
+ m_xDBRegistrationAggregate.clear();
+ m_xDatabaseRegistrations.clear();
}
// Helper
@@ -327,25 +316,6 @@ void ODatabaseContext::disposing()
m_aDatabaseObjects.clear();
}
-//------------------------------------------------------------------------------
-bool ODatabaseContext::getURLForRegisteredObject( const ::rtl::OUString& _rRegisteredName, ::rtl::OUString& _rURL )
-{
- if ( !_rRegisteredName.getLength() )
- throw IllegalArgumentException();
-
- // the config node where all pooling relevant info are stored under
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- m_aContext.getLegacyServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_READONLY);
- if ( aDbRegisteredNamesRoot.isValid() && aDbRegisteredNamesRoot.hasByName( _rRegisteredName ) )
- {
- OConfigurationNode aRegisterObj = aDbRegisteredNamesRoot.openNode( _rRegisteredName );
- aRegisterObj.getNodeValue(getDbLocationNodeName()) >>= _rURL;
- _rURL = SvtPathOptions().SubstituteVariable( _rURL );
- return true;
- }
- return false;
-}
-
// XNamingService
//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
@@ -353,9 +323,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUStri
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- ::rtl::OUString sURL;
- if ( !getURLForRegisteredObject( _rName, sURL ) )
- throw NoSuchElementException(_rName, *this);
+ ::rtl::OUString sURL( getDatabaseLocation( _rName ) );
if ( !sURL.getLength() )
// there is a registration for this name, but no URL
@@ -493,23 +461,7 @@ void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Referen
if ( !sURL.getLength() )
throw IllegalArgumentException( DBACORE_RESSTRING( RID_STR_DATASOURCE_NOT_STORED ), *this, 2 );
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_UPDATABLE);
-
- if ( aDbRegisteredNamesRoot.isValid() )
- {
- OConfigurationNode oDataSourceRegistration;
- // the sub-node for the concrete registration
- if (aDbRegisteredNamesRoot.hasByName(_rName))
- oDataSourceRegistration = aDbRegisteredNamesRoot.openNode(_rName);
- else
- oDataSourceRegistration = aDbRegisteredNamesRoot.createNode(_rName);
-
- // set the values
- oDataSourceRegistration.setNodeValue(getDbNameNodeName(), makeAny(_rName));
- oDataSourceRegistration.setNodeValue(getDbLocationNodeName(), makeAny(sURL));
- aDbRegisteredNamesRoot.commit();
- }
+ registerDatabaseLocation( _rName, sURL );
ODatabaseSource::setName( xDocDataSource, _rName, ODatabaseSource::DBContextAccess() );
@@ -594,9 +546,10 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio
ClearableMutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- ::rtl::OUString sURL;
- if ( !getURLForRegisteredObject( _rName, sURL ) )
- throw NoSuchElementException( _rName, *this );
+ ::rtl::OUString sURL = getDatabaseLocation( _rName );
+
+ revokeDatabaseLocation( _rName );
+ // will throw if something goes wrong
if ( m_aDatabaseObjects.find( _rName ) != m_aDatabaseObjects.end() )
{
@@ -605,11 +558,10 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio
m_aDatasourceProperties[ sURL ] = m_aDatasourceProperties[ _rName ];
}
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_UPDATABLE );
- if ( !aDbRegisteredNamesRoot.removeNode( _rName ) )
- throw Exception( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "An unexpected und unknown error occured." ) ), *this );
- aDbRegisteredNamesRoot.commit();
+ // check if URL is already loaded
+ ObjectCacheIterator aExistent = m_aDatabaseObjects.find( sURL );
+ if ( aExistent != m_aDatabaseObjects.end() )
+ m_aDatabaseObjects.erase( aExistent );
// notify our container listeners
ContainerEvent aEvent( *this, makeAny( _rName ), Any(), Any() );
@@ -617,6 +569,60 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio
m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent );
}
+//------------------------------------------------------------------------------
+::sal_Bool SAL_CALL ODatabaseContext::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
+{
+ return m_xDatabaseRegistrations->hasRegisteredDatabase( _Name );
+}
+
+//------------------------------------------------------------------------------
+Sequence< ::rtl::OUString > SAL_CALL ODatabaseContext::getRegistrationNames() throw (RuntimeException)
+{
+ return m_xDatabaseRegistrations->getRegistrationNames();
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL ODatabaseContext::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
+{
+ return m_xDatabaseRegistrations->getDatabaseLocation( _Name );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL ODatabaseContext::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
+{
+ m_xDatabaseRegistrations->registerDatabaseLocation( _Name, _Location );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL ODatabaseContext::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
+{
+ m_xDatabaseRegistrations->revokeDatabaseLocation( _Name );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL ODatabaseContext::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
+{
+ m_xDatabaseRegistrations->changeDatabaseLocation( _Name, _NewLocation );
+}
+
+//------------------------------------------------------------------------------
+::sal_Bool SAL_CALL ODatabaseContext::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
+{
+ return m_xDatabaseRegistrations->isDatabaseRegistrationReadOnly( _Name );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL ODatabaseContext::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
+{
+ m_xDatabaseRegistrations->addDatabaseRegistrationsListener( _Listener );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL ODatabaseContext::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
+{
+ m_xDatabaseRegistrations->removeDatabaseRegistrationsListener( _Listener );
+}
+
// ::com::sun::star::container::XElementAccess
//------------------------------------------------------------------------------
Type ODatabaseContext::getElementType( ) throw(RuntimeException)
@@ -659,8 +665,9 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
// see whether this is an registered name
::rtl::OUString sURL;
- if ( getURLForRegisteredObject( _rName, sURL ) )
+ if ( hasRegisteredDatabase( _rName ) )
{
+ sURL = getDatabaseLocation( _rName );
// is the object cached under its URL?
xExistent = getObject( sURL );
}
@@ -687,7 +694,8 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
}
catch (Exception& e)
{ // exceptions other than the speciafied ones -> wrap
- throw WrappedTargetException(_rName, *this, makeAny( e ) );
+ Any aError = ::cppu::getCaughtException();
+ throw WrappedTargetException(_rName, *this, aError );
}
}
@@ -697,19 +705,7 @@ Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( Runtime
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- DECLARE_STL_USTRINGACCESS_MAP( bool , TNameMap);
- TNameMap aRet;
-
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- m_aContext.getLegacyServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_READONLY);
-
- Sequence< ::rtl::OUString> aSeq;
- if ( aDbRegisteredNamesRoot.isValid() )
- {
- aSeq = aDbRegisteredNamesRoot.getNodeNames();
- } // if ( aDbRegisteredNamesRoot.isValid() )
-
- return aSeq;
+ return getRegistrationNames();
}
//------------------------------------------------------------------------------
@@ -718,11 +714,9 @@ sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( Runtime
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- m_aContext.getLegacyServiceFactory(), getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_READONLY);
-
- return aDbRegisteredNamesRoot.isValid() && aDbRegisteredNamesRoot.hasByName(_rName);
+ return hasRegisteredDatabase( _rName );
}
+
// -----------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rURL )
{
diff --git a/dbaccess/source/core/dataaccess/databasecontext.hxx b/dbaccess/source/core/dataaccess/databasecontext.hxx
index 87ab49fe193c..5d05c2091fd1 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.hxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.hxx
@@ -31,57 +31,29 @@
#ifndef _DBA_COREDATAACCESS_DATABASECONTEXT_HXX_
#define _DBA_COREDATAACCESS_DATABASECONTEXT_HXX_
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
+#include "ModelImpl.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/container/ElementExistException.hpp>
+#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
-#include <com/sun/star/uno/XNamingService.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XDATABASEENVIRONMENT_HPP_
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/sdb/XDatabaseEnvironment.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HPP_
-#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
-#include <com/sun/star/container/XContainer.hpp>
-#endif
-#ifndef _CPPUHELPER_COMPBASE7_HXX_
-#include <cppuhelper/compbase7.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
-#include <comphelper/stl_types.hxx>
-#endif
-#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
+#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
+#include <com/sun/star/uno/XNamingService.hpp>
+#include <com/sun/star/uno/XAggregation.hpp>
+/** === end UNO includes === **/
+
+#include <basic/basicmanagerrepository.hxx>
#include <comphelper/componentcontext.hxx>
-#endif
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <comphelper/stl_types.hxx>
+#include <cppuhelper/compbase8.hxx>
#include <cppuhelper/interfacecontainer.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_ELEMENTEXISTEXCEPTION_HPP_
-#include <com/sun/star/container/ElementExistException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_
-#include <com/sun/star/lang/XEventListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-#ifndef _DBA_COREDATAACCESS_MODELIMPL_HXX_
-#include "ModelImpl.hxx"
-#endif
-#ifndef BASICMANAGERREPOSITORY_HXX
-#include <basic/basicmanagerrepository.hxx>
-#endif
#include <boost/shared_ptr.hpp>
@@ -105,13 +77,14 @@ class DatabaseDocumentLoader;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
ODatabaseContext_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
-typedef ::cppu::WeakComponentImplHelper7 < ::com::sun::star::lang::XServiceInfo
+typedef ::cppu::WeakComponentImplHelper8 < ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::container::XEnumerationAccess
, ::com::sun::star::container::XNameAccess
, ::com::sun::star::uno::XNamingService
, ::com::sun::star::container::XContainer
, ::com::sun::star::lang::XSingleServiceFactory
, ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::sdb::XDatabaseRegistrations
> DatabaseAccessContext_Base;
class ODatabaseContext :public DatabaseAccessContext_Base
@@ -126,12 +99,6 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getObject( const ::rtl::OUString& _rURL );
- /** retrieves the URL for a given registration name, if any
- @returns <FALSE/> if and only if there exists a registration for the given name
- @throws IllegalArgumentException if the name is empty
- */
- bool getURLForRegisteredObject( const ::rtl::OUString& _rRegisteredName, ::rtl::OUString& _rURL );
-
/** sets all properties which were transient at the data source. e.g. password
@param _sURL The file URL of the data source
@param _xObject The data source itself.
@@ -147,6 +114,11 @@ protected:
::osl::Mutex m_aMutex;
::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
+ m_xDBRegistrationAggregate;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseRegistrations >
+ m_xDatabaseRegistrations;
+
DECLARE_STL_USTRINGACCESS_MAP( ODatabaseModelImpl*, ObjectCache );
ObjectCache m_aDatabaseObjects;
@@ -166,42 +138,53 @@ public:
virtual ~ODatabaseContext();
-// OComponentHelper
+ // OComponentHelper
virtual void SAL_CALL disposing(void);
-// ::com::sun::star::lang::XSingleServiceFactory
+ // XSingleServiceFactory
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _rArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::lang::XServiceInfo
+ // XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::lang::XServiceInfo - static methods
+ // XServiceInfo - static methods
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::rtl::OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
-// ::com::sun::star::container::XElementAccess
+ // XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::container::XEnumerationAccess
+ // XEnumerationAccess
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::container::XNameAccess
+ // XNameAccess
virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::uno::XNamingService
+ // XNamingService
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRegisteredObject( const ::rtl::OUString& Name ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL registerObject( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Object ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL revokeObject( const ::rtl::OUString& Name ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::container::XContainer
+ // XDatabaseRegistrations
+ virtual ::sal_Bool SAL_CALL hasRegisteredDatabase( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRegistrationNames() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getDatabaseLocation( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL registerDatabaseLocation( const ::rtl::OUString& Name, const ::rtl::OUString& Location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL revokeDatabaseLocation( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changeDatabaseLocation( const ::rtl::OUString& Name, const ::rtl::OUString& NewLocation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isDatabaseRegistrationReadOnly( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addDatabaseRegistrationsListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseRegistrationsListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeDatabaseRegistrationsListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseRegistrationsListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XContainer
virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 5b3add2dcf82..37a68f058e3a 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -53,10 +53,13 @@
#include <com/sun/star/embed/XTransactionBroadcaster.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -838,8 +841,16 @@ void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const
// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const ::rtl::OUString& _rURL ) const
{
+ Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess;
+ m_pImpl->m_aContext.createComponent( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ,xTempAccess);
+ Reference< io::XStream > xStream = xTempAccess->openFileReadWrite( _rURL );
+ Reference< io::XTruncate > xTruncate(xStream,UNO_QUERY);
+ if ( xTruncate.is() )
+ {
+ xTruncate->truncate();
+ }
Sequence<Any> aParam(2);
- aParam[0] <<= _rURL;
+ aParam[0] <<= xStream;
aParam[1] <<= ElementModes::READWRITE | ElementModes::TRUNCATE;
Reference< XSingleServiceFactory > xStorageFactory( m_pImpl->createStorageFactory(), UNO_SET_THROW );
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
new file mode 100644
index 000000000000..df27c73f2665
--- /dev/null
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -0,0 +1,398 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <unotools/pathoptions.hxx>
+#include <tools/urlobj.hxx>
+#include <unotools/confignode.hxx>
+
+//........................................................................
+namespace dbaccess
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::container::NoSuchElementException;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::lang::IllegalAccessException;
+ using ::com::sun::star::container::ElementExistException;
+ using ::com::sun::star::sdb::XDatabaseRegistrations;
+ using ::com::sun::star::sdb::XDatabaseRegistrationsListener;
+ using ::com::sun::star::sdb::DatabaseRegistrationEvent;
+ using ::com::sun::star::uno::XAggregation;
+ /** === end UNO using === **/
+
+ //--------------------------------------------------------------------
+ static const ::rtl::OUString& getConfigurationRootPath()
+ {
+ static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/RegisteredNames");
+ return s_sNodeName;
+ }
+
+ //--------------------------------------------------------------------
+ const ::rtl::OUString& getLocationNodeName()
+ {
+ static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii( "Location" );
+ return s_sNodeName;
+ }
+
+ //--------------------------------------------------------------------
+ const ::rtl::OUString& getNameNodeName()
+ {
+ static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii( "Name" );
+ return s_sNodeName;
+ }
+
+ //====================================================================
+ //= DatabaseRegistrations - declaration
+ //====================================================================
+ typedef ::cppu::WeakAggImplHelper1 < XDatabaseRegistrations
+ > DatabaseRegistrations_Base;
+ class DatabaseRegistrations :public ::cppu::BaseMutex
+ ,public DatabaseRegistrations_Base
+ {
+ public:
+ DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext );
+
+ protected:
+ ~DatabaseRegistrations();
+
+ public:
+ virtual ::sal_Bool SAL_CALL hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException);
+ virtual Sequence< ::rtl::OUString > SAL_CALL getRegistrationNames() throw (RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException);
+ virtual void SAL_CALL registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException);
+ virtual void SAL_CALL revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException);
+ virtual void SAL_CALL changeDatabaseLocation( const ::rtl::OUString& Name, const ::rtl::OUString& NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException);
+ virtual ::sal_Bool SAL_CALL isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException);
+ virtual void SAL_CALL addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& Listener ) throw (RuntimeException);
+ virtual void SAL_CALL removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& Listener ) throw (RuntimeException);
+
+ private:
+ ::utl::OConfigurationNode
+ impl_checkValidName_throw( const ::rtl::OUString& _rName, const bool _bMustExist );
+
+ void impl_checkValidLocation_throw( const ::rtl::OUString& _rLocation );
+
+ /** retrieves the configuration node whose "Name" sub node has the given value
+
+ Since we separated the name of the registration node from the "Name" value of the registration, we cannot
+ simply do a "getByName" (equivalent) when we want to retrieve the node for a given registration name.
+ Instead, we must search all nodes.
+
+ If _bMustExist is <TRUE/>, and a node with the given display name does not exist, then a NoSuchElementException
+ is thrown.
+
+ If _bMustExist is <FALSE/>, and a node with the given name already exists, then a ElementExistException is
+ thrown.
+
+ In either case, if no exception is thrown, then a valid node is returned: If the node existed and was allowed
+ to exist, it is returned, if the node did not yet exist, and was required to not exist, a new node is created.
+ However, in this case the root node is not yet committed.
+ */
+ ::utl::OConfigurationNode
+ impl_getNodeForName_throw( const ::rtl::OUString& _rName, const bool _bMustExist );
+
+ ::utl::OConfigurationNode
+ impl_getNodeForName_nothrow( const ::rtl::OUString& _rName );
+
+ private:
+ ::comphelper::ComponentContext m_aContext;
+ ::utl::OConfigurationTreeRoot m_aConfigurationRoot;
+ ::cppu::OInterfaceContainerHelper m_aRegistrationListeners;
+ };
+
+ //====================================================================
+ //= DatabaseRegistrations - implementation
+ //====================================================================
+ //--------------------------------------------------------------------
+ DatabaseRegistrations::DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext )
+ :m_aContext( _rxContext )
+ ,m_aConfigurationRoot()
+ ,m_aRegistrationListeners( m_aMutex )
+ {
+ m_aConfigurationRoot = ::utl::OConfigurationTreeRoot::createWithServiceFactory(
+ m_aContext.getLegacyServiceFactory(), getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
+ }
+
+ //--------------------------------------------------------------------
+ DatabaseRegistrations::~DatabaseRegistrations()
+ {
+ }
+
+ //--------------------------------------------------------------------
+ ::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_nothrow( const ::rtl::OUString& _rName )
+ {
+ Sequence< ::rtl::OUString > aNames( m_aConfigurationRoot.getNodeNames() );
+ for ( const ::rtl::OUString* pName = aNames.getConstArray();
+ pName != aNames.getConstArray() + aNames.getLength();
+ ++pName
+ )
+ {
+ ::utl::OConfigurationNode aNodeForName = m_aConfigurationRoot.openNode( *pName );
+
+ ::rtl::OUString sTestName;
+ OSL_VERIFY( aNodeForName.getNodeValue( getNameNodeName() ) >>= sTestName );
+ if ( sTestName == _rName )
+ return aNodeForName;
+ }
+ return ::utl::OConfigurationNode();
+ }
+
+ //--------------------------------------------------------------------
+ ::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_throw( const ::rtl::OUString& _rName, const bool _bMustExist )
+ {
+ ::utl::OConfigurationNode aNodeForName( impl_getNodeForName_nothrow( _rName ) );
+
+ if ( aNodeForName.isValid() )
+ {
+ if ( !_bMustExist )
+ throw ElementExistException( _rName, *this );
+
+ return aNodeForName;
+ }
+
+ if ( _bMustExist )
+ throw NoSuchElementException( _rName, *this );
+
+ ::rtl::OUString sNewNodeName;
+ {
+ ::rtl::OUStringBuffer aNewNodeName;
+ aNewNodeName.appendAscii( "org.openoffice." );
+ aNewNodeName.append( _rName );
+
+ // make unique
+ ::rtl::OUStringBuffer aReset( aNewNodeName );
+ sNewNodeName = aNewNodeName.makeStringAndClear();
+ sal_Int32 i=2;
+ while ( m_aConfigurationRoot.hasByName( sNewNodeName ) )
+ {
+ aNewNodeName = aReset;
+ aNewNodeName.appendAscii( " " );
+ aNewNodeName.append( i );
+ sNewNodeName = aNewNodeName.makeStringAndClear();
+ }
+ }
+
+ ::utl::OConfigurationNode aNewNode( m_aConfigurationRoot.createNode( sNewNodeName ) );
+ aNewNode.setNodeValue( getNameNodeName(), makeAny( _rName ) );
+ return aNewNode;
+ }
+
+ //--------------------------------------------------------------------
+ ::utl::OConfigurationNode DatabaseRegistrations::impl_checkValidName_throw( const ::rtl::OUString& _rName, const bool _bMustExist )
+ {
+ if ( !m_aConfigurationRoot.isValid() )
+ throw RuntimeException( ::rtl::OUString(), *this );
+
+ if ( !_rName.getLength() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+
+ return impl_getNodeForName_throw( _rName, _bMustExist );
+ }
+
+ //--------------------------------------------------------------------
+ void DatabaseRegistrations::impl_checkValidLocation_throw( const ::rtl::OUString& _rLocation )
+ {
+ if ( !_rLocation.getLength() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
+
+ INetURLObject aURL( _rLocation );
+ if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
+ }
+
+ //--------------------------------------------------------------------
+ ::sal_Bool SAL_CALL DatabaseRegistrations::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ::utl::OConfigurationNode aNodeForName = impl_getNodeForName_nothrow( _Name );
+ return aNodeForName.isValid();
+ }
+
+ //------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL DatabaseRegistrations::getRegistrationNames() throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_aConfigurationRoot.isValid() )
+ throw RuntimeException( ::rtl::OUString(), *this );
+
+ Sequence< ::rtl::OUString > aProgrammaticNames( m_aConfigurationRoot.getNodeNames() );
+ Sequence< ::rtl::OUString > aDisplayNames( aProgrammaticNames.getLength() );
+ ::rtl::OUString* pDisplayName = aDisplayNames.getArray();
+
+ for ( const ::rtl::OUString* pName = aProgrammaticNames.getConstArray();
+ pName != aProgrammaticNames.getConstArray() + aProgrammaticNames.getLength();
+ ++pName, ++pDisplayName
+ )
+ {
+ ::utl::OConfigurationNode aRegistrationNode = m_aConfigurationRoot.openNode( *pName );
+ OSL_VERIFY( aRegistrationNode.getNodeValue( getNameNodeName() ) >>= *pDisplayName );
+
+ }
+
+ return aDisplayNames;
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL DatabaseRegistrations::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::utl::OConfigurationNode aNodeForName = impl_checkValidName_throw( _Name, true );
+
+ ::rtl::OUString sLocation;
+ OSL_VERIFY( aNodeForName.getNodeValue( getLocationNodeName() ) >>= sLocation );
+ sLocation = SvtPathOptions().SubstituteVariable( sLocation );
+
+ return sLocation;
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DatabaseRegistrations::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+
+ // check
+ impl_checkValidLocation_throw( _Location );
+ ::utl::OConfigurationNode aDataSourceRegistration = impl_checkValidName_throw( _Name, false );
+
+ // register
+ aDataSourceRegistration.setNodeValue( getLocationNodeName(), makeAny( _Location ) );
+ m_aConfigurationRoot.commit();
+
+ // notify
+ DatabaseRegistrationEvent aEvent( *this, _Name, ::rtl::OUString(), _Location );
+ aGuard.clear();
+ m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::registeredDatabaseLocation, aEvent );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DatabaseRegistrations::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+
+ // check
+ ::utl::OConfigurationNode aNodeForName = impl_checkValidName_throw( _Name, true );
+
+ // obtain properties for notification
+ ::rtl::OUString sLocation;
+ OSL_VERIFY( aNodeForName.getNodeValue( getLocationNodeName() ) >>= sLocation );
+
+ // revoke
+ if ( aNodeForName.isReadonly()
+ || !m_aConfigurationRoot.removeNode( aNodeForName.getLocalName() )
+ )
+ throw IllegalAccessException( ::rtl::OUString(), *this );
+
+ m_aConfigurationRoot.commit();
+
+ // notify
+ DatabaseRegistrationEvent aEvent( *this, _Name, sLocation, ::rtl::OUString() );
+ aGuard.clear();
+ m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::revokedDatabaseLocation, aEvent );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DatabaseRegistrations::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+
+ // check
+ impl_checkValidLocation_throw( _NewLocation );
+ ::utl::OConfigurationNode aDataSourceRegistration = impl_checkValidName_throw( _Name, true );
+
+ if ( aDataSourceRegistration.isReadonly() )
+ throw IllegalAccessException( ::rtl::OUString(), *this );
+
+ // obtain properties for notification
+ ::rtl::OUString sOldLocation;
+ OSL_VERIFY( aDataSourceRegistration.getNodeValue( getLocationNodeName() ) >>= sOldLocation );
+
+ // change
+ aDataSourceRegistration.setNodeValue( getLocationNodeName(), makeAny( _NewLocation ) );
+ m_aConfigurationRoot.commit();
+
+ // notify
+ DatabaseRegistrationEvent aEvent( *this, _Name, sOldLocation, _NewLocation );
+ aGuard.clear();
+ m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::changedDatabaseLocation, aEvent );
+ }
+
+ //--------------------------------------------------------------------
+ ::sal_Bool SAL_CALL DatabaseRegistrations::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ::utl::OConfigurationNode aDataSourceRegistration = impl_checkValidName_throw( _Name, true );
+ return aDataSourceRegistration.isReadonly();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DatabaseRegistrations::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
+ {
+ if ( _Listener.is() )
+ m_aRegistrationListeners.addInterface( _Listener );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL DatabaseRegistrations::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
+ {
+ if ( _Listener.is() )
+ m_aRegistrationListeners.removeInterface( _Listener );
+ }
+
+ //====================================================================
+ //= DatabaseRegistrations - factory
+ //====================================================================
+ Reference< XAggregation > createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext )
+ {
+ return new DatabaseRegistrations( _rxContext );
+ }
+
+//........................................................................
+} // namespace dbaccess
+//........................................................................
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.hxx b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
new file mode 100644
index 000000000000..068f6ea975c9
--- /dev/null
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef OOO_DATASOURCEREGISTRATIONS_HXX
+#define OOO_DATASOURCEREGISTRATIONS_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/uno/XAggregation.hpp>
+/** === end UNO includes === **/
+
+namespace comphelper
+{
+ class ComponentContext;
+}
+
+//........................................................................
+namespace dbaccess
+{
+//........................................................................
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
+ createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext );
+
+//........................................................................
+} // namespace dbaccess
+//........................................................................
+
+#endif // OOO_DATASOURCEREGISTRATIONS_HXX
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 58921fbab1e4..e0d3f10aed8d 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -782,8 +782,6 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
m_pImpl->getDefaultDataSourceSettings()
);
- impl_insertJavaDriverClassPath_nothrow(aDriverInfo);
-
if ( m_pImpl->isEmbeddedDatabase() )
{
sal_Int32 nCount = aDriverInfo.getLength();
@@ -1485,29 +1483,6 @@ Reference< XInterface > ODatabaseSource::getThis() const
return *const_cast< ODatabaseSource* >( this );
}
// -----------------------------------------------------------------------------
-void ODatabaseSource::impl_insertJavaDriverClassPath_nothrow(Sequence< PropertyValue >& _rDriverInfo)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::impl_insertJavaDriverClassPath_nothrow" );
- Reference< XPropertySet > xPropertySet( m_pImpl->m_xSettings, UNO_QUERY_THROW );
- ::rtl::OUString sJavaDriverClass;
- xPropertySet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass"))) >>= sJavaDriverClass;
- if ( sJavaDriverClass.getLength() )
- {
- static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths"));
- ::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithServiceFactory(
- m_pImpl->m_aContext.getLegacyServiceFactory(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
- if ( aNamesRoot.isValid() && aNamesRoot.hasByName( sJavaDriverClass ) )
- {
- ::utl::OConfigurationNode aRegisterObj = aNamesRoot.openNode( sJavaDriverClass );
- ::rtl::OUString sURL;
- OSL_VERIFY( aRegisterObj.getNodeValue( "Path" ) >>= sURL );
-
- ::comphelper::NamedValueCollection aDriverSettings( _rDriverInfo );
- aDriverSettings.put( "JavaDriverClassPath", sURL );
- aDriverSettings >>= _rDriverInfo;
- }
- }
-}
//........................................................................
} // namespace dbaccess
//........................................................................
diff --git a/dbaccess/source/core/dataaccess/datasource.hxx b/dbaccess/source/core/dataaccess/datasource.hxx
index 0fee4dac79e6..5e4dd7dc8ab5 100644
--- a/dbaccess/source/core/dataaccess/datasource.hxx
+++ b/dbaccess/source/core/dataaccess/datasource.hxx
@@ -295,8 +295,6 @@ private:
void clearConnections();
- void impl_insertJavaDriverClassPath_nothrow(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverInfo);
-
protected:
using ::cppu::OPropertySetHelper::getFastPropertyValue;
};
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 01a3b65b5c8a..e293e9693e51 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -727,23 +727,16 @@ void ODefinitionContainer::addObjectListener(const Reference< XContent >& _xNewO
{
xProp->addPropertyChangeListener(PROPERTY_NAME, this);
xProp->addVetoableChangeListener(PROPERTY_NAME, this);
- //::rtl::OUString sTitle(RTL_CONSTASCII_USTRINGPARAM( "Title" ));
- //xProp->addPropertyChangeListener(sTitle, this);
- //xProp->addVetoableChangeListener(sTitle, this);
- } // if ( xProp.is() )
+ }
}
// -----------------------------------------------------------------------------
void ODefinitionContainer::removeObjectListener(const Reference< XContent >& _xNewObject)
{
- OSL_ENSURE(_xNewObject.is(),"ODefinitionContainer::addObjectListener: Object is null!");
Reference<XPropertySet> xProp(_xNewObject,UNO_QUERY);
if ( xProp.is() )
{
xProp->removePropertyChangeListener(PROPERTY_NAME, this);
xProp->removeVetoableChangeListener(PROPERTY_NAME, this);
- //::rtl::OUString sTitle(RTL_CONSTASCII_USTRINGPARAM( "Title" ));
- //xProp->removePropertyChangeListener(sTitle, this);
- //xProp->removeVetoableChangeListener(sTitle, this);
}
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 9ba06976e555..7334e72a1ffc 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -88,6 +88,7 @@
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
+#include <comphelper/namedvaluecollection.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -212,60 +213,32 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
if ( ServiceSpecifier == SERVICE_SDB_DOCUMENTDEFINITION )
{
MutexGuard aGuard(m_aMutex);
- ::rtl::OUString sName,sPersistentName,sURL;
+
+ ::rtl::OUString sName, sPersistentName, sURL, sMediaType;
Reference< XCommandProcessor > xCopyFrom;
- Reference<XConnection> xConnection;
- Sequence<sal_Int8> aClassID;
+ Reference< XConnection > xConnection;
+ Sequence< sal_Int8 > aClassID;
sal_Bool bAsTemplate = sal_False;
- const Any* pBegin = _aArguments.getConstArray();
- const Any* pEnd = pBegin + _aArguments.getLength();
- PropertyValue aValue;
- for(;pBegin != pEnd;++pBegin)
- {
- *pBegin >>= aValue;
- if ( aValue.Name.equalsAscii(PROPERTY_NAME) )
- {
- aValue.Value >>= sName;
- }
- else if ( aValue.Name.equalsAscii(PROPERTY_PERSISTENT_NAME) )
- {
- aValue.Value >>= sPersistentName;
- }
- else if ( aValue.Name.equalsAscii(PROPERTY_EMBEDDEDOBJECT) )
- {
- xCopyFrom.set(aValue.Value,UNO_QUERY);
- }
- else if ( aValue.Name.equalsAscii(PROPERTY_URL) )
- {
- aValue.Value >>= sURL;
- }
- else if ( aValue.Name.equalsAscii(PROPERTY_ACTIVE_CONNECTION) )
- {
- xConnection.set(aValue.Value,UNO_QUERY);
- }
- else if ( aValue.Name.equalsAscii("ClassID") )
- {
- if (! ( aValue.Value >>= aClassID ) )
- {
- // Extended for usage also with a string
- ::rtl::OUString suValue;
- aValue.Value >>= suValue;
- aClassID = ::comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation( suValue );
+ ::comphelper::NamedValueCollection aArgs( _aArguments );
+ sName = aArgs.getOrDefault( (::rtl::OUString)PROPERTY_NAME, sName );
+ sPersistentName = aArgs.getOrDefault( (::rtl::OUString)PROPERTY_PERSISTENT_NAME, sPersistentName );
+ xCopyFrom = aArgs.getOrDefault( (::rtl::OUString)PROPERTY_EMBEDDEDOBJECT, xCopyFrom );
+ sURL = aArgs.getOrDefault( (::rtl::OUString)PROPERTY_URL, sURL );
+ xConnection = aArgs.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, xConnection );
+ bAsTemplate = aArgs.getOrDefault( (::rtl::OUString)PROPERTY_AS_TEMPLATE, bAsTemplate );
+ sMediaType = aArgs.getOrDefault( (::rtl::OUString)INFO_MEDIATYPE, sMediaType );
- }
- rtl::OUString suClassID = ::comphelper::MimeConfigurationHelper::GetStringClassIDRepresentation(aClassID);
- volatile int dummy = 0;
- (void)dummy;
- (void)suClassID;
- }
- else if ( aValue.Name.equalsAscii(PROPERTY_AS_TEMPLATE) )
- {
- aValue.Value >>= bAsTemplate;
- }
- else
+ if ( aArgs.has( "ClassID" ) )
+ {
+ Any aClassIDValue = aArgs.get( "ClassID" );
+ // class IDs might be passed as byte sequence ...
+ if ( !( aClassIDValue >>= aClassID ) )
{
- // DBG_ASSERT("unknown property exception");
+ // ... or as string
+ ::rtl::OUString sClassID;
+ aClassIDValue >>= sClassID;
+ aClassID = ::comphelper::MimeConfigurationHelper::GetSequenceClassIDRepresentation( sClassID );
}
}
@@ -282,6 +255,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
if ( xElements.is() )
sPersistentName = ::dbtools::createUniqueName(xElements,sPersistentName);
+ const bool bNeedClassID = ( aClassID.getLength() == 0 ) && ( 0 == sURL.getLength() );
if ( xCopyFrom.is() )
{
Sequence<Any> aIni(2);
@@ -295,10 +269,16 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
Reference<XPropertySet> xProp(xCopyFrom,UNO_QUERY);
if ( xProp.is() && xProp->getPropertySetInfo().is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_AS_TEMPLATE) )
xProp->getPropertyValue(PROPERTY_AS_TEMPLATE) >>= bAsTemplate;
- }
- if ( ( aClassID.getLength() == 0 ) && ( 0 == sURL.getLength() ) )
- ODocumentDefinition::GetDocumentServiceFromMediaType( getContainerStorage(), sPersistentName, m_aContext, aClassID );
+ // if we do not have an own class ID, see if we can determine one from the copy we just created
+ if ( bNeedClassID )
+ ODocumentDefinition::GetDocumentServiceFromMediaType( getContainerStorage(), sPersistentName, m_aContext, aClassID );
+ }
+ else
+ {
+ if ( bNeedClassID && sMediaType.getLength() )
+ ODocumentDefinition::GetDocumentServiceFromMediaType( sMediaType, m_aContext, aClassID );
+ }
}
ODefinitionContainer_Impl::const_iterator aFind = rDefinitions.find( sName );
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index c471981dbb52..e1c12034b49a 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -422,7 +422,7 @@ namespace dbaccess
//==================================================================
typedef ::cppu::WeakImplHelper1 < css::lang::XEventListener
> LifetimeCoupler_Base;
- /** helper class which couples the lifetime of a component to the lifetim
+ /** helper class which couples the lifetime of a component to the lifetime
of another component
Instances of this class are constructed with two components. The first is
@@ -617,13 +617,12 @@ void SAL_CALL ODocumentDefinition::disposing()
::osl::MutexGuard aGuard(m_aMutex);
closeObject();
::comphelper::disposeComponent(m_xListener);
- if ( m_bRemoveListener && m_xDesktop.is() )
+ if ( m_bRemoveListener )
{
Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
if ( xCloseable.is() )
xCloseable->removeCloseListener(this);
}
- m_xDesktop = NULL;
}
// -----------------------------------------------------------------------------
IMPLEMENT_TYPEPROVIDER3(ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base);
@@ -690,17 +689,15 @@ namespace
}
// -----------------------------------------------------------------------------
-void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const Reference< XFrame >& _rxFrame )
+void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const ::comphelper::ComponentContext& _rContxt, const Reference< XFrame >& _rxFrame )
{
- if ( !m_xDesktop.is() )
- m_xDesktop.set( m_aContext.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
-
- Reference< XFrames > xFrames( m_xDesktop->getFrames(), UNO_QUERY_THROW );
+ Reference< XFramesSupplier > xDesktop( _rContxt.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+ Reference< XFrames > xFrames( xDesktop->getFrames(), UNO_QUERY_THROW );
xFrames->remove( _rxFrame );
}
// -----------------------------------------------------------------------------
-void ODocumentDefinition::impl_onActivateEmbeddedObject()
+void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow()
{
try
{
@@ -712,26 +709,23 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject()
if ( !m_xListener.is() )
// it's the first time the embedded object has been activated
// create an OEmbedObjectHolder
- m_xListener = new OEmbedObjectHolder(m_xEmbeddedObject,this);
+ m_xListener = new OEmbedObjectHolder( m_xEmbeddedObject, this );
- Reference< XFrame > xFrame( xController->getFrame() );
- if ( xFrame.is() )
- {
- // raise the window to top (especially necessary if this is not the first activation)
- Reference< XTopWindow > xTopWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW );
- xTopWindow->toFront();
+ // raise the window to top (especially necessary if this is not the first activation)
+ Reference< XFrame > xFrame( xController->getFrame(), UNO_SET_THROW );
+ Reference< XTopWindow > xTopWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW );
+ xTopWindow->toFront();
- // remove the frame from the desktop's frame collection because we need full control of it.
- impl_removeFrameFromDesktop_throw( xFrame );
- }
+ // remove the frame from the desktop's frame collection because we need full control of it.
+ impl_removeFrameFromDesktop_throw( m_aContext, xFrame );
// ensure that we ourself are kept alive as long as the embedded object's frame is
// opened
LifetimeCoupler::couple( *this, Reference< XComponent >( xFrame, UNO_QUERY_THROW ) );
// init the edit view
- if ( m_bOpenInDesign )
- impl_initObjectEditView( xController );
+ if ( m_bForm && m_bOpenInDesign )
+ impl_initFormEditView( xController );
}
catch( const RuntimeException& )
{
@@ -833,12 +827,8 @@ namespace
}
// -----------------------------------------------------------------------------
-void ODocumentDefinition::impl_initObjectEditView( const Reference< XController >& _rxController )
+void ODocumentDefinition::impl_initFormEditView( const Reference< XController >& _rxController )
{
- if ( !m_bForm )
- // currently, only forms need to be initialized
- return;
-
try
{
Reference< XViewSettingsSupplier > xSettingsSupplier( _rxController, UNO_QUERY_THROW );
@@ -872,10 +862,10 @@ void ODocumentDefinition::impl_initObjectEditView( const Reference< XController
}
// -----------------------------------------------------------------------------
-void ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, const bool _bActivate,
- const Reference< XCommandEnvironment >& _rxEnvironment, Any& _out_rComponent, ::osl::ClearableMutexGuard & _aGuard )
+Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, const bool _bActivate,
+ const Reference< XCommandEnvironment >& _rxEnvironment )
{
- OExecuteImpl aExecuteGuard(m_bInExecute);
+ OExecuteImpl aExecuteGuard( m_bInExecute );
Reference< XConnection > xConnection;
sal_Int32 nOpenMode = OpenMode::DOCUMENT;
@@ -885,7 +875,9 @@ void ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, con
// for the document, default to the interaction handler as used for loading the DB doc
// This might be overwritten below, when examining _rOpenArgument.
::comphelper::NamedValueCollection aDBDocArgs( m_pImpl->m_pDataSource->getResource() );
- aDocumentArgs.put( "InteractionHandler", aDBDocArgs.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() ) );
+ Reference< XInteractionHandler > xHandler( aDBDocArgs.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() ) );
+ if ( xHandler.is() )
+ aDocumentArgs.put( "InteractionHandler", xHandler );
::boost::optional< sal_Int16 > aDocumentMacroMode;
@@ -999,7 +991,7 @@ void ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, con
OSL_ENSURE( m_pImpl->m_aProps.sPersistentName.getLength(),
"ODocumentDefinition::onCommandOpenSomething: no persistent name - cannot load!" );
if ( !m_pImpl->m_aProps.sPersistentName.getLength() )
- return;
+ return Any();
// embedded objects themself do not support the hidden flag. We implement support for
// it by changing the STATE to RUNNING only, instead of ACTIVE.
@@ -1009,7 +1001,7 @@ void ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, con
loadEmbeddedObject( xConnection, Sequence< sal_Int8 >(), aDocumentArgs.getPropertyValues(), false, !m_bOpenInDesign );
OSL_ENSURE( m_xEmbeddedObject.is(), "ODocumentDefinition::onCommandOpenSomething: what's this?" );
if ( !m_xEmbeddedObject.is() )
- return;
+ return Any();
Reference< XModel > xModel( getComponent(), UNO_QUERY );
Reference< report::XReportDefinition > xReportDefinition(xModel,UNO_QUERY);
@@ -1035,158 +1027,169 @@ void ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, con
xReportEngine->setReportDefinition(xReportDefinition);
xReportEngine->setActiveConnection(m_xLastKnownConnection);
if ( bOpenHidden )
- _out_rComponent <<= xReportEngine->createDocumentModel( );
- else
- _out_rComponent <<= xReportEngine->createDocumentAlive(NULL);
- return;
+ return makeAny( xReportEngine->createDocumentModel() );
+ return makeAny( xReportEngine->createDocumentAlive( NULL ) );
}
if ( _bActivate && !bOpenHidden )
{
m_xEmbeddedObject->changeState( EmbedStates::ACTIVE );
- impl_onActivateEmbeddedObject();
+ ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow();
}
- // LLA: Alle fillReportData() calls prfen, sollte es welche geben, die danach noch viel machen
- // LLA: sollten wir einen _aGuard Pointer bergeben, sonst erstmal als Referenz
- fillReportData(_aGuard);
- _out_rComponent <<= xModel;
+ if ( !m_bForm && m_pImpl->m_aProps.bAsTemplate && !m_bOpenInDesign )
+ ODocumentDefinition::fillReportData( m_aContext, getComponent(), xConnection );
+
+ return makeAny( xModel );
}
// -----------------------------------------------------------------------------
Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
- ::osl::ClearableMutexGuard aGuard(m_aMutex);
- if ( !m_bInExecute )
- {
- sal_Bool bOpen = aCommand.Name.equalsAscii( "open" );
- sal_Bool bOpenInDesign = aCommand.Name.equalsAscii( "openDesign" );
- sal_Bool bOpenForMail = aCommand.Name.equalsAscii( "openForMail" );
- if ( bOpen || bOpenInDesign || bOpenForMail )
- {
- bool bActivateObject = true;
- if ( bOpenForMail )
- {
- OSL_ENSURE( false, "ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
- bActivateObject = false;
- }
-
- // if the object is already opened, do nothing
- // #i89509# / 2008-05-22 / frank.schoenheit@sun.com
- if ( m_xEmbeddedObject.is() )
- {
- sal_Int32 nCurrentState = m_xEmbeddedObject->getCurrentState();
- bool bIsActive = ( nCurrentState == EmbedStates::ACTIVE );
-
- // exception: new-style reports always create a new document when "open" is executed
- Reference< report::XReportDefinition > xReportDefinition( getComponent(), UNO_QUERY );
- bool bIsAliveNewStyleReport = ( xReportDefinition.is() && ( bOpen || bOpenForMail ) );
-
- if ( bIsActive && !bIsAliveNewStyleReport )
- {
- impl_onActivateEmbeddedObject();
- return makeAny( getComponent() );
- }
- }
-
- // m_bOpenInDesign = bOpenInDesign;
- // onCommandOpenSomething( aCommand.Argument, !bOpenForMail, Environment, aRet, aGuard );
- m_bOpenInDesign = bOpenInDesign || bOpenForMail;
- onCommandOpenSomething( aCommand.Argument, bActivateObject, Environment, aRet, aGuard );
- }
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "copyTo" ) ) )
+ sal_Bool bOpen = aCommand.Name.equalsAscii( "open" );
+ sal_Bool bOpenInDesign = aCommand.Name.equalsAscii( "openDesign" );
+ sal_Bool bOpenForMail = aCommand.Name.equalsAscii( "openForMail" );
+ if ( bOpen || bOpenInDesign || bOpenForMail )
+ {
+ // opening the document involves a lot of VCL code, which is not thread-safe, but needs the SolarMutex locked.
+ // Unfortunately, the DocumentDefinition, as well as the EmbeddedObject implementation, calls into VCL-dependent
+ // components *without* releasing the own mutex, which is a guaranteed recipe for deadlocks.
+ // We have control over this implementation here, and in modifying it to release the own mutex before calling into
+ // the VCL-dependent components is not too difficult (was there, seen it).
+ // However, we do /not/ have control over the EmbeddedObject implementation, and from a first look, it seems as
+ // making it release the own mutex before calling SolarMutex-code is ... difficult, at least.
+ // So, to be on the same side, we lock the SolarMutex here. Yes, it sucks.
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::ClearableMutexGuard aGuard(m_aMutex);
+ if ( m_bInExecute )
+ return aRet;
+
+ bool bActivateObject = true;
+ if ( bOpenForMail )
{
- Sequence<Any> aIni;
- aCommand.Argument >>= aIni;
- if ( aIni.getLength() != 2 )
- {
- OSL_ENSURE( sal_False, "Wrong argument type!" );
- ucbhelper::cancelCommandExecution(
- makeAny( IllegalArgumentException(
- rtl::OUString(),
- static_cast< cppu::OWeakObject * >( this ),
- -1 ) ),
- Environment );
- // Unreachable
- }
- Reference< XStorage> xDest(aIni[0],UNO_QUERY);
- ::rtl::OUString sPersistentName;
- aIni[1] >>= sPersistentName;
- Reference< XStorage> xStorage = getContainerStorage();
- // -----------------------------------------------------------------------------
- xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName);
- /*loadEmbeddedObject( true );
- Reference<XEmbedPersist> xPersist(m_xEmbeddedObject,UNO_QUERY);
- if ( xPersist.is() )
- {
- xPersist->storeToEntry(xStorage,sPersistentName,Sequence<PropertyValue>(),Sequence<PropertyValue>());
- xPersist->storeOwn();
- m_xEmbeddedObject->changeState(EmbedStates::LOADED);
- }
- else
- throw CommandAbortedException();*/
- }
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preview" ) ) )
- {
- onCommandPreview(aRet);
+ OSL_ENSURE( false, "ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
+ bActivateObject = false;
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) ) )
+
+ // if the object is already opened, do nothing
+ // #i89509# / 2008-05-22 / frank.schoenheit@sun.com
+ if ( m_xEmbeddedObject.is() )
{
- Sequence<Any> aIni;
- aCommand.Argument >>= aIni;
- if ( aIni.getLength() > 0 && aIni.getLength() < 2 )
+ sal_Int32 nCurrentState = m_xEmbeddedObject->getCurrentState();
+ bool bIsActive = ( nCurrentState == EmbedStates::ACTIVE );
+
+ // exception: new-style reports always create a new document when "open" is executed
+ Reference< report::XReportDefinition > xReportDefinition( getComponent(), UNO_QUERY );
+ bool bIsAliveNewStyleReport = ( xReportDefinition.is() && ( bOpen || bOpenForMail ) );
+
+ if ( bIsActive && !bIsAliveNewStyleReport )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
- ucbhelper::cancelCommandExecution(
- makeAny( IllegalArgumentException(
- rtl::OUString(),
- static_cast< cppu::OWeakObject * >( this ),
- -1 ) ),
- Environment );
- // Unreachable
+ ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow();
+ return makeAny( getComponent() );
}
- ::rtl::OUString sURL;
- aIni[0] >>= sURL;
- onCommandInsert( sURL, Environment );
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getdocumentinfo" ) ) // compatibility
- || aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getDocumentInfo" ) )
- )
- {
- onCommandGetDocumentProperties( aRet );
- }
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) )
- {
- //////////////////////////////////////////////////////////////////
- // delete
- //////////////////////////////////////////////////////////////////
- closeObject();
- Reference< XStorage> xStorage = getContainerStorage();
- if ( xStorage.is() )
- xStorage->removeElement(m_pImpl->m_aProps.sPersistentName);
- dispose();
+ m_bOpenInDesign = bOpenInDesign || bOpenForMail;
+ return onCommandOpenSomething( aCommand.Argument, bActivateObject, Environment );
+ }
- }
- else if ( ( aCommand.Name.compareToAscii( "storeOwn" ) == 0 ) // compatibility
- || ( aCommand.Name.compareToAscii( "store" ) == 0 )
- )
+ ::osl::ClearableMutexGuard aGuard(m_aMutex);
+ if ( m_bInExecute )
+ return aRet;
+
+ if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "copyTo" ) ) )
+ {
+ Sequence<Any> aIni;
+ aCommand.Argument >>= aIni;
+ if ( aIni.getLength() != 2 )
{
- impl_store_throw();
+ OSL_ENSURE( sal_False, "Wrong argument type!" );
+ ucbhelper::cancelCommandExecution(
+ makeAny( IllegalArgumentException(
+ rtl::OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
}
- else if ( ( aCommand.Name.compareToAscii( "shutdown" ) == 0 ) // compatibility
- || ( aCommand.Name.compareToAscii( "close" ) == 0 )
- )
+ Reference< XStorage> xDest(aIni[0],UNO_QUERY);
+ ::rtl::OUString sPersistentName;
+ aIni[1] >>= sPersistentName;
+ Reference< XStorage> xStorage = getContainerStorage();
+ // -----------------------------------------------------------------------------
+ xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName);
+ /*loadEmbeddedObject( true );
+ Reference<XEmbedPersist> xPersist(m_xEmbeddedObject,UNO_QUERY);
+ if ( xPersist.is() )
{
- aRet <<= impl_close_throw();
+ xPersist->storeToEntry(xStorage,sPersistentName,Sequence<PropertyValue>(),Sequence<PropertyValue>());
+ xPersist->storeOwn();
+ m_xEmbeddedObject->changeState(EmbedStates::LOADED);
}
else
+ throw CommandAbortedException();*/
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preview" ) ) )
+ {
+ onCommandPreview(aRet);
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) ) )
+ {
+ Sequence<Any> aIni;
+ aCommand.Argument >>= aIni;
+ if ( !aIni.getLength() )
{
- aRet = OContentHelper::execute(aCommand,CommandId,Environment);
+ OSL_ENSURE( sal_False, "Wrong argument count!" );
+ ucbhelper::cancelCommandExecution(
+ makeAny( IllegalArgumentException(
+ rtl::OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
}
+ ::rtl::OUString sURL;
+ aIni[0] >>= sURL;
+ onCommandInsert( sURL, Environment );
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getdocumentinfo" ) ) // compatibility
+ || aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getDocumentInfo" ) )
+ )
+ {
+ onCommandGetDocumentProperties( aRet );
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) )
+ {
+ //////////////////////////////////////////////////////////////////
+ // delete
+ //////////////////////////////////////////////////////////////////
+ closeObject();
+ Reference< XStorage> xStorage = getContainerStorage();
+ if ( xStorage.is() )
+ xStorage->removeElement(m_pImpl->m_aProps.sPersistentName);
+
+ dispose();
+
}
+ else if ( ( aCommand.Name.compareToAscii( "storeOwn" ) == 0 ) // compatibility
+ || ( aCommand.Name.compareToAscii( "store" ) == 0 )
+ )
+ {
+ impl_store_throw();
+ }
+ else if ( ( aCommand.Name.compareToAscii( "shutdown" ) == 0 ) // compatibility
+ || ( aCommand.Name.compareToAscii( "close" ) == 0 )
+ )
+ {
+ aRet <<= impl_close_throw();
+ }
+ else
+ {
+ aRet = OContentHelper::execute(aCommand,CommandId,Environment);
+ }
+
return aRet;
}
// -----------------------------------------------------------------------------
@@ -1607,9 +1610,8 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
xParentFrame = lcl_getDatabaseDocumentFrame( *m_pImpl->m_pDataSource );
if ( !xParentFrame.is() )
{ // i87957 we need a parent frame
- if ( !m_xDesktop.is() )
- m_xDesktop.set( m_aContext.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
- xParentFrame.set(m_xDesktop,uno::UNO_QUERY);
+ Reference< XComponentLoader > xDesktop( m_aContext.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+ xParentFrame.set( xDesktop, UNO_QUERY );
if ( xParentFrame.is() )
{
Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
@@ -1918,10 +1920,8 @@ Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bFor
{
// no XDatabaseDocumentUI -> just execute the respective command
m_bOpenInDesign = _bForEditing;
- Any aComponent;
- onCommandOpenSomething( Any(), true, NULL, aComponent, aGuard );
- Reference< XComponent > xComponent;
- OSL_VERIFY( aComponent >>= xComponent );
+ Reference< XComponent > xComponent( onCommandOpenSomething( Any(), true, NULL ), UNO_QUERY );
+ OSL_ENSURE( xComponent.is(), "ODocumentDefinition::impl_openUI_nolck_throw: opening the thingie failed." );
return xComponent;
}
@@ -2122,26 +2122,29 @@ bool ODocumentDefinition::prepareClose()
return true;
}
// -----------------------------------------------------------------------------
-void ODocumentDefinition::fillReportData(::osl::ClearableMutexGuard & _aGuard)
+void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext& _rContext,
+ const Reference< util::XCloseable >& _rxComponent,
+ const Reference< XConnection >& _rxActiveConnection )
{
- if ( !m_bForm && m_pImpl->m_aProps.bAsTemplate && !m_bOpenInDesign ) // open a report in alive mode, so we need to fill it
- {
- Sequence<Any> aArgs(2);
- PropertyValue aValue;
- aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextDocument"));
- aValue.Value <<= getComponent();
- aArgs[0] <<= aValue;
- aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ActiveConnection"));
- aValue.Value <<= m_xLastKnownConnection;
- aArgs[1] <<= aValue;
-
- Reference< XJobExecutor > xExecuteable( m_aContext.createComponentWithArguments( "com.sun.star.wizards.report.CallReportWizard", aArgs ), UNO_QUERY );
- if ( xExecuteable.is() )
- {
- _aGuard.clear();
- xExecuteable->trigger(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fill")));
+ Sequence< Any > aArgs(2);
+ PropertyValue aValue;
+ aValue.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextDocument" ) );
+ aValue.Value <<= _rxComponent;
+ aArgs[0] <<= aValue;
+ aValue.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) );
+ aValue.Value <<= _rxActiveConnection;
+ aArgs[1] <<= aValue;
+
+ try
+ {
+ Reference< XJobExecutor > xExecuteable(
+ _rContext.createComponentWithArguments( "com.sun.star.wizards.report.CallReportWizard", aArgs ), UNO_QUERY_THROW );
+ xExecuteable->trigger( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "fill" ) ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
-}
}
// -----------------------------------------------------------------------------
void ODocumentDefinition::updateDocumentTitle()
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 2d8d5f6df343..c48d20ad58a3 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -92,7 +92,6 @@ class ODocumentDefinition
{
::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject> m_xEmbeddedObject;
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener > m_xListener;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier > m_xDesktop;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xLastKnownConnection;
OInterceptor* m_pInterceptor;
@@ -163,9 +162,17 @@ public:
sal_Bool saveAs();
void closeObject();
sal_Bool isModified();
- void fillReportData(::osl::ClearableMutexGuard & _aGuard);
inline sal_Bool isNewReport() const { return !m_bForm && !m_pImpl->m_aProps.bAsTemplate; }
+ static void fillReportData(
+ const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable >& _rxComponent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActiveConnection
+ );
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >&
+ getConnection() const { return m_xLastKnownConnection; }
+
/** prepares closing the document component
The method suspends the controller associated with the document, and saves the document
@@ -192,12 +199,10 @@ public:
private:
/** does necessary initializations after our embedded object has been switched to ACTIVE
- @param _bOpenedInDesignMode
- determines whether the embedded object has been opened for designing it or for data display
*/
- void impl_onActivateEmbeddedObject();
+ void impl_onActivateEmbeddedObject_nothrow();
- /** initializes a newly created view/controller which is displaying our embedded object
+ /** initializes a newly created view/controller of a form which is displaying our embedded object
Has only to be called if the respective embedded object has been loaded for design (and
not for data entry)
@@ -205,12 +210,15 @@ private:
@param _rxController
the controller which belongs to the XModel of our (active) embedded object
*/
- void impl_initObjectEditView( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& _rxController );
+ static void impl_initFormEditView( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& _rxController );
/** removes the given frame from the desktop's frame collection
@raises ::com::sun::star::uno::RuntimeException
*/
- void impl_removeFrameFromDesktop_throw( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
+ static void impl_removeFrameFromDesktop_throw(
+ const ::comphelper::ComponentContext& _rContxt,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
+ );
/** opens the UI for this sub document
*/
@@ -310,10 +318,12 @@ private:
void onCommandGetDocumentProperties( ::com::sun::star::uno::Any& _rProps );
void onCommandInsert( const ::rtl::OUString& _sURL, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& Environment ) throw( ::com::sun::star::uno::Exception );
void onCommandPreview( ::com::sun::star::uno::Any& _rImage );
- void onCommandOpenSomething( const ::com::sun::star::uno::Any& _rArgument, const bool _bActivate,
- const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& _rxEnvironment,
- ::com::sun::star::uno::Any& _out_rComponent,
- ::osl::ClearableMutexGuard & _aClearableGuard);
+ ::com::sun::star::uno::Any
+ onCommandOpenSomething(
+ const ::com::sun::star::uno::Any& _rArgument,
+ const bool _bActivate,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& _rxEnvironment
+ );
};
//........................................................................
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx
index 733f155dae5d..9211302f0d9b 100644
--- a/dbaccess/source/core/dataaccess/intercept.cxx
+++ b/dbaccess/source/core/dataaccess/intercept.cxx
@@ -31,28 +31,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _COM_SUN_STAR_EMBED_EMBEDSTATES_HPP_
+#include "intercept.hxx"
+#include "dbastrings.hrc"
+
#include <com/sun/star/embed/EmbedStates.hpp>
-#endif
-#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTBROADCASTER_HPP_
#include <com/sun/star/document/XEventBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_
#include <com/sun/star/util/XModifiable.hpp>
-#endif
-#ifndef _CPPUHELPER_WEAK_HXX_
#include <cppuhelper/weak.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
+
#include <comphelper/types.hxx>
-#endif
-#ifndef DBA_INTERCEPT_HXX
-#include "intercept.hxx"
-#endif
-#include "dbastrings.hrc"
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
+#include <tools/diagnose_ex.h>
namespace dbaccess
@@ -140,66 +129,78 @@ struct DispatchHelper
//XDispatch
void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyValue >& Arguments ) throw (RuntimeException)
{
- osl::ClearableMutexGuard aClearableGuard(m_aMutex);
- if( m_pContentHolder )
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_pContentHolder )
+ return;
+
+ if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_SAVE ] )
{
- if( _URL.Complete == m_aInterceptedURL[DISPATCH_SAVE] )
- {
- m_pContentHolder->save(sal_False);
- }
- else if( _URL.Complete == m_aInterceptedURL[DISPATCH_RELOAD] )
+ m_pContentHolder->save( sal_False );
+ return;
+ }
+
+ if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_RELOAD ] )
+ {
+ ODocumentDefinition::fillReportData(
+ m_pContentHolder->getContext(),
+ m_pContentHolder->getComponent(),
+ m_pContentHolder->getConnection()
+ );
+ return;
+ }
+
+ if( _URL.Complete == m_aInterceptedURL[ DISPATCH_SAVEAS ] )
+ {
+ if ( m_pContentHolder->isNewReport() )
{
- m_pContentHolder->fillReportData(aClearableGuard);
- // IMPORTANT: m_aMutex is cleared!
+ m_pContentHolder->saveAs();
}
- else if( _URL.Complete == m_aInterceptedURL[DISPATCH_SAVEAS] )
+ else if ( m_xSlaveDispatchProvider.is() )
{
- if ( m_pContentHolder->isNewReport() )
- {
- m_pContentHolder->saveAs();
- }
- else if ( m_xSlaveDispatchProvider.is() )
- {
- Sequence< PropertyValue > aNewArgs = Arguments;
- sal_Int32 nInd = 0;
+ Sequence< PropertyValue > aNewArgs = Arguments;
+ sal_Int32 nInd = 0;
- while( nInd < aNewArgs.getLength() )
- {
- if ( aNewArgs[nInd].Name.equalsAscii( "SaveTo" ) )
- {
- aNewArgs[nInd].Value <<= sal_True;
- break;
- }
- nInd++;
- }
-
- if ( nInd == aNewArgs.getLength() )
+ while( nInd < aNewArgs.getLength() )
+ {
+ if ( aNewArgs[nInd].Name.equalsAscii( "SaveTo" ) )
{
- aNewArgs.realloc( nInd + 1 );
- aNewArgs[nInd].Name = ::rtl::OUString::createFromAscii( "SaveTo" );
aNewArgs[nInd].Value <<= sal_True;
+ break;
}
+ nInd++;
+ }
- Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(
- _URL, ::rtl::OUString::createFromAscii( "_self" ), 0 );
- if ( xDispatch.is() )
- xDispatch->dispatch( _URL, aNewArgs );
+ if ( nInd == aNewArgs.getLength() )
+ {
+ aNewArgs.realloc( nInd + 1 );
+ aNewArgs[nInd].Name = ::rtl::OUString::createFromAscii( "SaveTo" );
+ aNewArgs[nInd].Value <<= sal_True;
}
+
+ Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(
+ _URL, ::rtl::OUString::createFromAscii( "_self" ), 0 );
+ if ( xDispatch.is() )
+ xDispatch->dispatch( _URL, aNewArgs );
}
- else if ( _URL.Complete == m_aInterceptedURL[DISPATCH_CLOSEDOC]
- || _URL.Complete == m_aInterceptedURL[DISPATCH_CLOSEWIN]
- || _URL.Complete == m_aInterceptedURL[DISPATCH_CLOSEFRAME])
- {
- DispatchHelper* pHelper = new DispatchHelper;
- pHelper->aArguments = Arguments;
- pHelper->aURL = _URL;
- Application::PostUserEvent(LINK(this, OInterceptor, OnDispatch),reinterpret_cast<void*>(pHelper) );
- }
+ return;
+ }
+
+ if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEDOC ]
+ || _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEWIN ]
+ || _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEFRAME ]
+ )
+ {
+ DispatchHelper* pHelper = new DispatchHelper;
+ pHelper->aArguments = Arguments;
+ pHelper->aURL = _URL;
+ Application::PostUserEvent( LINK( this, OInterceptor, OnDispatch ), reinterpret_cast< void* >( pHelper ) );
+ return;
}
}
-IMPL_LINK( OInterceptor, OnDispatch, void*, _nId)
+
+IMPL_LINK( OInterceptor, OnDispatch, void*, _pDispatcher )
{
- ::std::auto_ptr<DispatchHelper> pHelper(reinterpret_cast<DispatchHelper*>(_nId));
+ ::std::auto_ptr<DispatchHelper> pHelper( reinterpret_cast< DispatchHelper* >( _pDispatcher ) );
try
{
if ( m_pContentHolder && m_pContentHolder->prepareClose() && m_xSlaveDispatchProvider.is() )
@@ -217,10 +218,11 @@ IMPL_LINK( OInterceptor, OnDispatch, void*, _nId)
}
}
}
- catch(const Exception&)
+ catch ( const Exception& )
{
- OSL_ENSURE(sal_False, "caught an exception while starting the table wizard!");
+ DBG_UNHANDLED_EXCEPTION();
}
+
return 0L;
}
diff --git a/dbaccess/source/core/dataaccess/makefile.mk b/dbaccess/source/core/dataaccess/makefile.mk
index 580d62c08e55..aff531b3a388 100644
--- a/dbaccess/source/core/dataaccess/makefile.mk
+++ b/dbaccess/source/core/dataaccess/makefile.mk
@@ -56,6 +56,7 @@ SLOFILES= \
$(SLO)$/databasecontext.obj \
$(SLO)$/connection.obj \
$(SLO)$/datasource.obj \
+ $(SLO)$/databaseregistrations.obj \
$(SLO)$/intercept.obj \
$(SLO)$/myucp_datasupplier.obj \
$(SLO)$/myucp_resultset.obj \
diff --git a/dbaccess/source/core/inc/ContainerMediator.hxx b/dbaccess/source/core/inc/ContainerMediator.hxx
index af2076f3e0f9..0b129d5465f0 100644
--- a/dbaccess/source/core/inc/ContainerMediator.hxx
+++ b/dbaccess/source/core/inc/ContainerMediator.hxx
@@ -112,23 +112,12 @@ namespace dbaccess
*/
void impl_cleanup_nothrow();
- /** retrieves the settings object to initialize a container element
-
- Normally, this object will simply retrieve the object with the given name from our settings
- container. Hiowever, for columns, there's a fallback in case this settings object does
- not yet exist: Then, we check if the given destination object refers to a table column, via its
- TableName and RealName property. If so, this table column is used as initialization object.
-
- @param _rName
- the name of the destination object in its container
- @param _rxDestination
- the destination object to initialize
+ /** initializes the properties of the given object from its counterpart in our settings container
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
- impl_getSettingsForInitialization_nothrow(
+ void impl_initSettings_nothrow(
const ::rtl::OUString& _rName,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDestination
- ) const;
+ );
};
//........................................................................
} // namespace dbaccess
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index 227110bd324d..d9d000435ec4 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -236,6 +236,8 @@ namespace dbaccess
getPropertyValues( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::Property >& rProperties );
+ const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
+
inline TContentPtr getImpl() const { return m_pImpl; }
protected:
diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx
index a4adbb59ef47..1e5cd6f0d4d0 100644
--- a/dbaccess/source/core/inc/PropertyForward.hxx
+++ b/dbaccess/source/core/inc/PropertyForward.hxx
@@ -55,24 +55,31 @@
namespace dbaccess
{
//........................................................................
+
+ // ===================================================================
+ // = OPropertyForward
+ // ===================================================================
typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener
> OPropertyForward_Base;
- class OPropertyForward : public ::comphelper::OBaseMutex
+ class OPropertyForward :public ::comphelper::OBaseMutex
,public OPropertyForward_Base
{
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xSource;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xDest;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> m_xDestInfo;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xDestContainer;
- ::rtl::OUString m_sName;
- sal_Bool m_bInInsert;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSource;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDest;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xDestInfo;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xDestContainer;
+ ::rtl::OUString m_sName;
+ sal_Bool m_bInInsert;
+
protected:
virtual ~OPropertyForward();
+
public:
- OPropertyForward(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSource
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xDestContainer
- ,const ::rtl::OUString& _sName
- ,const ::std::vector< ::rtl::OUString>& _aPropertyList = ::std::vector< ::rtl::OUString>());
+ OPropertyForward( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSource,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xDestContainer,
+ const ::rtl::OUString& _sName,
+ const ::std::vector< ::rtl::OUString >& _aPropertyList
+ );
// ::com::sun::star::beans::XPropertyChangeListener
virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(::com::sun::star::uno::RuntimeException);
@@ -80,10 +87,11 @@ namespace dbaccess
// ::com::sun::star::lang::XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
- inline void setName(const ::rtl::OUString& _sName) { m_sName = _sName; }
- void setDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDest);
- inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getDefinition() const { return m_xDest;}
+ inline void setName( const ::rtl::OUString& _sName ) { m_sName = _sName; }
+ void setDefinition( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDest);
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDefinition() const { return m_xDest; }
};
+
//........................................................................
} // namespace dbaccess
//........................................................................
diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx
index bd1f2665da3a..ab4fcb211e6a 100644
--- a/dbaccess/source/core/inc/column.hxx
+++ b/dbaccess/source/core/inc/column.hxx
@@ -31,92 +31,40 @@
#ifndef _DBA_COREAPI_COLUMN_HXX_
#define _DBA_COREAPI_COLUMN_HXX_
-#include <hash_map>
+#include "columnsettings.hxx"
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
-#include <com/sun/star/container/XNamed.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
-#include <com/sun/star/sdbc/XResultSet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_WRAPPEDTARGETEXCEPTION_HPP_
-#include <com/sun/star/lang/WrappedTargetException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
+#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
-#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_IOEXCEPTION_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/io/IOException.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectInputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#include <com/sun/star/lang/WrappedTargetException.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
-#ifndef _OSL_DIAGNOSE_H_
-#include <osl/diagnose.h>
-#endif
-#ifndef _CPPUHELPER_COMPBASE3_HXX_
-#include <cppuhelper/compbase3.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
-#include <cppuhelper/implbase1.hxx>
-#endif
-#ifndef _CPPUHELPER_COMPBASE4_HXX_
-#include <cppuhelper/compbase4.hxx>
-#endif
-#ifndef _CPPUHELPER_PROPSHLP_HXX
-#include <cppuhelper/propshlp.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+
+#include <comphelper/broadcasthelper.hxx>
#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_
+#include <comphelper/propertycontainer.hxx>
+#include <comphelper/stl_types.hxx>
#include <connectivity/CommonTools.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
-#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef CONNECTIVITY_COLUMNSHELPER_HXX
-#include <connectivity/TColumnsHelper.hxx>
-#endif
-#ifndef _CONNECTIVITY_FILE_VALUE_HXX_
#include <connectivity/FValue.hxx>
-#endif
-#ifndef _CONNECTIVITY_SDBCX_IREFRESHABLE_HXX_
+#include <connectivity/TColumnsHelper.hxx>
#include <connectivity/sdbcx/IRefreshable.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
-#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
-#include <com/sun/star/container/XChild.hpp>
-#endif
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/compbase4.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <osl/diagnose.h>
+
+#include <hash_map>
namespace dbaccess
{
@@ -124,23 +72,25 @@ namespace dbaccess
//************************************************************
// OColumn
//************************************************************
- typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::container::XNamed,
- ::com::sun::star::lang::XUnoTunnel > OColumnBase;
+ typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XNamed
+ > OColumnBase;
//------------------------------------------------------------
class OColumn :public comphelper::OBaseMutex
,public OColumnBase
- ,public ::cppu::OPropertySetHelper
-
+ ,public ::comphelper::OPropertyContainer
+ ,public IPropertyContainer // convenience for the derived class which also derive from OColumnSettings
{
friend class OColumns;
protected:
+ // <properties>
::rtl::OUString m_sName;
+ // </properties>
protected:
- OColumn();
+ OColumn( const bool _bNameIsReadOnly );
public:
virtual ~OColumn();
@@ -157,27 +107,6 @@ namespace dbaccess
// com::sun::star::beans::XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- // ::cppu::OPropertySetHelper
- virtual void SAL_CALL getFastPropertyValue(
- ::com::sun::star::uno::Any& rValue,
- sal_Int32 nHandle
- ) const;
- virtual sal_Bool SAL_CALL convertFastPropertyValue(
- ::com::sun::star::uno::Any & rConvertedValue,
- ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException);
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue
- )
- throw (::com::sun::star::uno::Exception);
-
- // com::sun::star::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
-
// cppu::OComponentHelper
virtual void SAL_CALL disposing(void);
@@ -190,57 +119,13 @@ namespace dbaccess
virtual ::rtl::OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setName( const ::rtl::OUString& _rName ) throw(::com::sun::star::uno::RuntimeException);
- virtual void fireValueChange(const ::connectivity::ORowSetValue& _rOldValue);
+ virtual void fireValueChange( const ::connectivity::ORowSetValue& _rOldValue );
protected:
- using ::cppu::OPropertySetHelper::getFastPropertyValue;
- };
-
- //************************************************************
- // OColumnSettings
- //************************************************************
- class OColumnSettings
- {
- // <properties>
- ::com::sun::star::uno::Any m_aWidth; // sal_Int32 or void
- ::com::sun::star::uno::Any m_aFormatKey; // sal_Int32 or void
- ::com::sun::star::uno::Any m_aRelativePosition; // sal_Int32 or void
- ::com::sun::star::uno::Any m_aAlignment; // sal_Int32 (::com::sun::star::awt::TextAlign) or void
- ::com::sun::star::uno::Any m_aHelpText; // the description of the column which is visible in the helptext of the column
- ::com::sun::star::uno::Any m_aControlDefault; // the default value which should be displayed as by a control when moving to a new row
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
- m_xControlModel;
-
- sal_Bool m_bHidden;
- // </properties>
-
- // Setting of values
- public:
- OColumnSettings();
- virtual ~OColumnSettings();
-
- sal_Bool SAL_CALL convertFastPropertyValue(
- ::com::sun::star::uno::Any & rConvertedValue,
- ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException);
- void SAL_CALL setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue
- )
- throw (::com::sun::star::uno::Exception);
- void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
-
- // com::sun::star::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
-
- public:
-
- /** check if the persistent settings have their default value
- */
- sal_Bool isDefaulted() const;
+ // IPropertyContainer
+ virtual void registerProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const ::com::sun::star::uno::Type& _rMemberType );
+ virtual void registerMayBeVoidProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, ::com::sun::star::uno::Any* _pPointerToMember, const ::com::sun::star::uno::Type& _rExpectedType );
+ virtual void registerPropertyNoMember( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const ::com::sun::star::uno::Type& _rType, const void* _pInitialValue );
};
//============================================================
diff --git a/dbaccess/source/core/inc/columnsettings.hxx b/dbaccess/source/core/inc/columnsettings.hxx
new file mode 100644
index 000000000000..22d119d6c429
--- /dev/null
+++ b/dbaccess/source/core/inc/columnsettings.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef COLUMNSETTINGS_HXX
+#define COLUMNSETTINGS_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/XPropertySet.hpp>
+/** === end UNO includes === **/
+
+//........................................................................
+namespace dbaccess
+{
+//........................................................................
+
+ // TODO: move the following to comphelper/propertycontainerhelper.hxx
+ class IPropertyContainer
+ {
+ public:
+ virtual void registerProperty(
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ void* _pPointerToMember,
+ const ::com::sun::star::uno::Type& _rMemberType
+ ) = 0;
+
+ virtual void registerMayBeVoidProperty(
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ ::com::sun::star::uno::Any* _pPointerToMember,
+ const ::com::sun::star::uno::Type& _rExpectedType
+ ) = 0;
+
+ virtual void registerPropertyNoMember(
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ const ::com::sun::star::uno::Type& _rType,
+ const void* _pInitialValue
+ ) = 0;
+ };
+
+ //====================================================================
+ //= OColumnSettings
+ //====================================================================
+ class OColumnSettings
+ {
+ // <properties>
+ ::com::sun::star::uno::Any m_aWidth; // sal_Int32 or void
+ ::com::sun::star::uno::Any m_aFormatKey; // sal_Int32 or void
+ ::com::sun::star::uno::Any m_aRelativePosition; // sal_Int32 or void
+ ::com::sun::star::uno::Any m_aAlignment; // sal_Int32 (::com::sun::star::awt::TextAlign) or void
+ ::com::sun::star::uno::Any m_aHelpText; // the description of the column which is visible in the helptext of the column
+ ::com::sun::star::uno::Any m_aControlDefault; // the default value which should be displayed as by a control when moving to a new row
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ m_xControlModel;
+ sal_Bool m_bHidden;
+ // </properties>
+
+ protected:
+ virtual ~OColumnSettings();
+
+ public:
+ OColumnSettings();
+
+ protected:
+ void registerProperties( IPropertyContainer& _rPropertyContainer );
+
+ /** determines whether the property with the given handle is handled by the class
+ */
+ static bool isColumnSettingProperty( const sal_Int32 _nPropertyHandle );
+ static bool isDefaulted( const sal_Int32 _nPropertyHandle, const ::com::sun::star::uno::Any& _rPropertyValue );
+
+ public:
+ /** check if the persistent settings have their default value
+ */
+ static bool hasDefaultSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn );
+ };
+
+//........................................................................
+} // namespace dbaccess
+//........................................................................
+
+#endif // COLUMNSETTINGS_HXX
diff --git a/dbaccess/source/core/inc/datasettings.hxx b/dbaccess/source/core/inc/datasettings.hxx
index be4b137f4977..993881c4e9f6 100644
--- a/dbaccess/source/core/inc/datasettings.hxx
+++ b/dbaccess/source/core/inc/datasettings.hxx
@@ -81,6 +81,7 @@ public:
protected:
ODataSettings_Base();
ODataSettings_Base(const ODataSettings_Base& _rSource);
+ ~ODataSettings_Base();
};
//==========================================================================
//= ODataSettings - a base class which implements the property handling
diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx
index 5d9a3a7ae3b2..c5151e6bffd5 100644
--- a/dbaccess/source/core/inc/definitioncolumn.hxx
+++ b/dbaccess/source/core/inc/definitioncolumn.hxx
@@ -30,36 +30,26 @@
#ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
#define _DBACORE_DEFINITIONCOLUMN_HXX_
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
+#include "apitools.hxx"
+#include "column.hxx"
+#include "columnsettings.hxx"
+
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _DBASHARED_APITOOLS_HXX_
-#include "apitools.hxx"
-#endif
-#ifndef _DBA_COREAPI_COLUMN_HXX_
-#include "column.hxx"
-#endif
-#ifndef COMPHELPER_IDPROPERTYARRAYUSAGEHELPER_HXX
+
#include <comphelper/IdPropArrayHelper.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
#include <cppuhelper/implbase1.hxx>
-#endif
namespace dbaccess
{
typedef ::cppu::ImplHelper1< ::com::sun::star::container::XChild > TXChild;
+ // =========================================================================
+ //= OTableColumnDescriptor
+ // =========================================================================
/**
* provides the properties for description. A descriptor could be used to create a new table column.
*/
@@ -68,7 +58,9 @@ namespace dbaccess
,public ::comphelper::OPropertyArrayUsageHelper < OTableColumnDescriptor >
,public TXChild
{
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
+ const bool m_bActAsDescriptor;
+
protected:
// <properties>
rtl::OUString m_aTypeName;
@@ -79,24 +71,32 @@ namespace dbaccess
sal_Int32 m_nPrecision;
sal_Int32 m_nScale;
sal_Int32 m_nIsNullable;
- sal_Bool m_bAutoIncrement : 1;
- sal_Bool m_bRowVersion : 1;
- sal_Bool m_bCurrency : 1;
+ sal_Bool m_bAutoIncrement;
+ sal_Bool m_bRowVersion;
+ sal_Bool m_bCurrency;
// </properties>
+
public:
- OTableColumnDescriptor():m_nType(::com::sun::star::sdbc::DataType::SQLNULL)
- ,m_nPrecision(0)
- ,m_nScale(0)
- ,m_nIsNullable(::com::sun::star::sdbc::ColumnValue::NULLABLE_UNKNOWN)
- ,m_bAutoIncrement(sal_False)
- ,m_bRowVersion(sal_False)
- ,m_bCurrency(sal_False){}
+ OTableColumnDescriptor( const bool _bActAsDescriptor )
+ :OColumn( !_bActAsDescriptor )
+ ,m_bActAsDescriptor( _bActAsDescriptor )
+ ,m_nType( ::com::sun::star::sdbc::DataType::SQLNULL )
+ ,m_nPrecision( 0 )
+ ,m_nScale( 0 )
+ ,m_nIsNullable( ::com::sun::star::sdbc::ColumnValue::NULLABLE_UNKNOWN )
+ ,m_bAutoIncrement( sal_False )
+ ,m_bRowVersion( sal_False )
+ ,m_bCurrency( sal_False )
+ {
+ impl_registerProperties();
+ }
DECLARE_XINTERFACE( )
- // com::sun::star::lang::XTypeProvider
+
+ // com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::lang::XServiceInfo
+ // ::com::sun::star::lang::XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
@@ -104,67 +104,100 @@ namespace dbaccess
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
- // ::comphelper::OPropertyArrayUsageHelper
+ // ::comphelper::OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
- // ::cppu::OPropertySetHelper
+ // ::cppu::OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
- virtual void SAL_CALL getFastPropertyValue(
- ::com::sun::star::uno::Any& rValue,
- sal_Int32 nHandle
- ) const;
- virtual sal_Bool SAL_CALL convertFastPropertyValue(
- ::com::sun::star::uno::Any & rConvertedValue,
- ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue )
- throw (::com::sun::star::lang::IllegalArgumentException);
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const ::com::sun::star::uno::Any& rValue
- )
- throw (::com::sun::star::uno::Exception);
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
- protected:
- // XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
-
- protected:
- using OColumn::getFastPropertyValue;
+ private:
+ void impl_registerProperties();
};
- /**
- * describes a column of an existing table. The informations for the column are
- * retrieved in a generic way using the meta data of a connection.
+ // =========================================================================
+ // = OTableColumn
+ // =========================================================================
+ class OTableColumn;
+ typedef ::comphelper::OPropertyArrayUsageHelper < OTableColumn > OTableColumn_PBase;
+ /** describes a column of a table
*/
- class OTableColumn : public OTableColumnDescriptor,
- public ::comphelper::OPropertyArrayUsageHelper < OTableColumn >
+ class OTableColumn :public OTableColumnDescriptor
+ ,public OTableColumn_PBase
{
- friend class ODBTable;
-
protected:
virtual ~OTableColumn();
+
public:
OTableColumn(const ::rtl::OUString& _rName);
- OTableColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn);
- // com::sun::star::lang::XTypeProvider
+ // XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::lang::XServiceInfo
+ // XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
- // ::comphelper::OPropertyArrayUsageHelper
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
+ };
+
+ // =========================================================================
+ // = OQueryColumn
+ // =========================================================================
+ class OQueryColumn;
+ typedef ::comphelper::OPropertyArrayUsageHelper< OQueryColumn > OQueryColumn_PBase;
+ /** a column of a Query, with additional information obtained from parsing the query statement
+ */
+ class OQueryColumn :public OTableColumnDescriptor
+ ,public OQueryColumn_PBase
+ {
+ // <properties>
+ ::rtl::OUString m_sCatalogName;
+ ::rtl::OUString m_sSchemaName;
+ ::rtl::OUString m_sTableName;
+ ::rtl::OUString m_sRealName;
+ // </properties>
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xOriginalTableColumn;
+
+ protected:
+ ~OQueryColumn();
+
+ public:
+ OQueryColumn(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxParserColumn,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection
+ );
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // *Property*
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
+ virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ impl_determineOriginalTableColumn(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection
+ );
+
+ using ::cppu::OPropertySetHelper::getFastPropertyValue;
};
+ // =========================================================================
+ // = OColumnWrapper
+ // =========================================================================
/**
* describes all properties for a columns of a table. Only the view parts are provided
* directly, all the other parts are derived from a driver implementation
*/
- class OColumnWrapper : public OColumn
+ class OColumnWrapper :public OColumn
{
protected:
// definition which is provided by a driver!
@@ -174,7 +207,7 @@ namespace dbaccess
sal_Int32 m_nColTypeID;
protected:
- OColumnWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol);
+ OColumnWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rCol, const bool _bNameIsReadOnly );
virtual ~OColumnWrapper();
public:
@@ -195,24 +228,30 @@ namespace dbaccess
throw (::com::sun::star::uno::Exception);
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
- // Helper
-// sal_Int32 getColumnTypeID() const {return m_nColTypeID;}
+
+ protected:
+ ::rtl::OUString impl_getPropertyNameFromHandle( const sal_Int32 _nHandle ) const;
protected:
using OColumn::getFastPropertyValue;
};
+ // =========================================================================
+ // = OTableColumnDescriptorWrapper
+ // =========================================================================
/**
* provides the properties for description. A descriptor could be used to create a new table column.
*/
- class OTableColumnDescriptorWrapper : public OColumnWrapper,
- public OColumnSettings,
- public ::comphelper::OIdPropertyArrayUsageHelper < OTableColumnDescriptorWrapper >
+ class OTableColumnDescriptorWrapper :public OColumnWrapper
+ ,public OColumnSettings
+ ,public ::comphelper::OIdPropertyArrayUsageHelper < OTableColumnDescriptorWrapper >
{
- sal_Bool m_bPureWrap;
+ const bool m_bPureWrap;
+ const bool m_bIsDescriptor;
+
public:
- OTableColumnDescriptorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol,sal_Bool _bPureWrap = sal_False)
- :OColumnWrapper(rCol),m_bPureWrap(_bPureWrap){}
+ OTableColumnDescriptorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol,
+ const bool _bPureWrap, const bool _bIsDescriptor );
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
@@ -243,26 +282,26 @@ namespace dbaccess
throw (::com::sun::star::uno::Exception);
protected:
- // XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
-
- protected:
using OColumnWrapper::getFastPropertyValue;
};
+ // =========================================================================
+ // = OTableColumnWrapper
+ // =========================================================================
/**
* describes all properties for a columns of a table. Only the view parts are provided
* directly, all the other parts are derived from a driver implementation
*/
- class OTableColumnWrapper : public OTableColumnDescriptorWrapper,
- public ::comphelper::OIdPropertyArrayUsageHelper < OTableColumnWrapper >
+ class OTableColumnWrapper :public OTableColumnDescriptorWrapper
+ ,public ::comphelper::OIdPropertyArrayUsageHelper < OTableColumnWrapper >
{
protected:
~OTableColumnWrapper();
+
public:
- OTableColumnWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rColDefintion
- ,sal_Bool _bPureWrap = sal_False);
+ OTableColumnWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rColDefintion,
+ const bool _bPureWrap );
// ::com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
@@ -275,76 +314,6 @@ namespace dbaccess
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual ::cppu::IPropertyArrayHelper* createArrayHelper(sal_Int32 nId) const;
};
-
- /**
- * describes all properties for a columns of an index.
- */
- class OIndexColumnWrapper : public OColumnWrapper,
- public ::comphelper::OPropertyArrayUsageHelper < OIndexColumnWrapper >
- {
- protected:
- // <properties>
- sal_Bool m_bAscending;
- // </properties>
-
- public:
- OIndexColumnWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol )
- :OColumnWrapper(rCol) {}
-
- // com::sun::star::lang::XTypeProvider
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::lang::XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-
- // OPropertyArrayUsageHelper
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
-
- virtual void SAL_CALL getFastPropertyValue(
- ::com::sun::star::uno::Any& rValue,
- sal_Int32 nHandle
- ) const;
-
- protected:
- using OColumnWrapper::getFastPropertyValue;
- };
-
- /**
- * describes all properties for a columns of an key column.
- */
- class OKeyColumnWrapper : public OColumnWrapper,
- public ::comphelper::OPropertyArrayUsageHelper < OKeyColumnWrapper >
- {
- protected:
- // <properties>
- rtl::OUString m_aRelatedColumn;
- // </properties>
-
- public:
- OKeyColumnWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rCol)
- :OColumnWrapper(rCol) {}
-
- // com::sun::star::lang::XTypeProvider
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::lang::XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-
- // OPropertyArrayUsageHelper
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
-
- virtual void SAL_CALL getFastPropertyValue(
- ::com::sun::star::uno::Any& rValue,
- sal_Int32 nHandle
- ) const;
-
- protected:
- using OColumnWrapper::getFastPropertyValue;
- };
}
#endif // _DBACORE_DEFINITIONCOLUMN_HXX_
diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx
index ac3d61bac8d1..6d8b523ec84c 100644
--- a/dbaccess/source/core/inc/querycontainer.hxx
+++ b/dbaccess/source/core/inc/querycontainer.hxx
@@ -180,7 +180,7 @@ namespace dbaccess
);
DECLARE_XINTERFACE( )
- // ::com::sun::star::lang::XServiceInfo
+ DECLARE_XTYPEPROVIDER( )
DECLARE_SERVICE_INFO();
// ::com::sun::star::container::XContainerListener
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index c116928ce267..fdae237aad4c 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -128,7 +128,7 @@ void OContainerMediator::impl_cleanup_nothrow()
xContainer = m_xContainer;
if ( xContainer.is() )
xContainer->removeContainerListener( this );
- m_xContainer.clear();//WeakReference< XContainer >();
+ m_xContainer.clear();
m_aForwardList.clear();
}
@@ -214,115 +214,69 @@ void SAL_CALL OContainerMediator::disposing( const EventObject& /*Source*/ ) thr
{
::osl::MutexGuard aGuard(m_aMutex);
-// Reference< XContainer > xContainer = m_xContainer;
-// if ( Source.Source == xContainer || Source.Source == m_xSettings )
- // this can only be one of them :-) So no check needed here
impl_cleanup_nothrow();
}
// -----------------------------------------------------------------------------
-Reference< XPropertySet > OContainerMediator::impl_getSettingsForInitialization_nothrow( const ::rtl::OUString& _rName,
- const Reference< XPropertySet >& _rxDestination ) const
+void OContainerMediator::impl_initSettings_nothrow( const ::rtl::OUString& _rName, const Reference< XPropertySet >& _rxDestination )
{
- Reference< XPropertySet > xSettings;
try
{
if ( m_xSettings.is() && m_xSettings->hasByName( _rName ) )
- OSL_VERIFY( m_xSettings->getByName( _rName ) >>= xSettings );
- else if ( m_eType == eColumns )
{
- do // artifial loop for easier flow control
- {
-
- Reference< XConnection > xConnection( m_aConnection );
- if ( !xConnection.is() )
- break;
-
- Reference< XPropertySetInfo > xPSI( _rxDestination->getPropertySetInfo(), UNO_QUERY_THROW );
- if ( !xPSI->hasPropertyByName( PROPERTY_TABLENAME )
- || !xPSI->hasPropertyByName( PROPERTY_REALNAME )
- )
- break;
-
- // determine the composed table name, plus the column name, as indicated by the
- // respective properties at the destination object
- ::rtl::OUString sCatalog, sSchema, sTable, sColumn;
- if ( xPSI->hasPropertyByName( PROPERTY_CATALOGNAME ) )
- {
- OSL_VERIFY( _rxDestination->getPropertyValue( PROPERTY_CATALOGNAME ) >>= sCatalog );
- }
- if ( xPSI->hasPropertyByName( PROPERTY_SCHEMANAME ) )
- {
- OSL_VERIFY( _rxDestination->getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema );
- }
- OSL_VERIFY( _rxDestination->getPropertyValue( PROPERTY_TABLENAME ) >>= sTable );
- OSL_VERIFY( _rxDestination->getPropertyValue( PROPERTY_REALNAME ) >>= sColumn );
-
- ::rtl::OUString sComposedTableName = ::dbtools::composeTableName(
- xConnection->getMetaData(), sCatalog, sSchema, sTable, sal_False, ::dbtools::eComplete );
-
- // retrieve the table in question
- Reference< XTablesSupplier > xSuppTables( xConnection, UNO_QUERY_THROW );
- Reference< XNameAccess > xTables( xSuppTables->getTables(), UNO_QUERY_THROW );
- if ( !xTables->hasByName( sComposedTableName ) )
- break;
-
- Reference< XColumnsSupplier > xSuppCols( xTables->getByName( sComposedTableName ), UNO_QUERY_THROW );
- Reference< XNameAccess > xColumns( xSuppCols->getColumns(), UNO_QUERY_THROW );
- if ( !xColumns->hasByName( sColumn ) )
- break;
-
- xSettings.set( xColumns->getByName( sColumn ), UNO_QUERY );
-
- }
- while ( false );
+ Reference< XPropertySet > xSettings( m_xSettings->getByName( _rName ), UNO_QUERY_THROW );
+ ::comphelper::copyProperties( xSettings, _rxDestination );
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- return xSettings;
}
// -----------------------------------------------------------------------------
-void OContainerMediator::notifyElementCreated(const ::rtl::OUString& _sName,const Reference<XPropertySet>& _xDest)
+void OContainerMediator::notifyElementCreated( const ::rtl::OUString& _sName, const Reference< XPropertySet >& _xDest )
{
- PropertyForwardList::iterator aFind = m_aForwardList.find(_sName);
- if ( (aFind == m_aForwardList.end() || !aFind->second->getDefinition().is() )&& m_xSettings.is() )
- {
- ::std::vector< ::rtl::OUString> aPropertyList;
+ if ( !m_xSettings.is() )
+ return;
- try
- {
- // initially copy from the settings object (if existent) to the newly created object
- Reference< XPropertySet > xSetting( impl_getSettingsForInitialization_nothrow( _sName, _xDest ) );
- if ( xSetting.is() )
- ::comphelper::copyProperties( xSetting, _xDest );
+ PropertyForwardList::iterator aFind = m_aForwardList.find( _sName );
+ if ( aFind != m_aForwardList.end()
+ && aFind->second->getDefinition().is()
+ )
+ {
+ OSL_ENSURE( false, "OContainerMediator::notifyElementCreated: is this really a valid case?" );
+ return;
+ }
- // collect the to-be-monitored properties
- Reference< XPropertySetInfo > xPSI( _xDest->getPropertySetInfo(), UNO_QUERY_THROW );
- Sequence< Property > aProperties( xPSI->getProperties() );
- const Property* property = aProperties.getConstArray();
- const Property* propertyEnd = aProperties.getConstArray() + aProperties.getLength();
- for ( ; property != propertyEnd; ++property )
- {
- if ( ( property->Attributes & PropertyAttribute::READONLY ) != 0 )
- continue;
- if ( ( property->Attributes & PropertyAttribute::BOUND ) == 0 )
- continue;
+ ::std::vector< ::rtl::OUString > aPropertyList;
+ try
+ {
+ // initially copy from the settings object (if existent) to the newly created object
+ impl_initSettings_nothrow( _sName, _xDest );
- aPropertyList.push_back( property->Name );
- }
- }
- catch( const Exception& )
+ // collect the to-be-monitored properties
+ Reference< XPropertySetInfo > xPSI( _xDest->getPropertySetInfo(), UNO_QUERY_THROW );
+ Sequence< Property > aProperties( xPSI->getProperties() );
+ const Property* property = aProperties.getConstArray();
+ const Property* propertyEnd = aProperties.getConstArray() + aProperties.getLength();
+ for ( ; property != propertyEnd; ++property )
{
- DBG_UNHANDLED_EXCEPTION();
+ if ( ( property->Attributes & PropertyAttribute::READONLY ) != 0 )
+ continue;
+ if ( ( property->Attributes & PropertyAttribute::BOUND ) == 0 )
+ continue;
+
+ aPropertyList.push_back( property->Name );
}
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
- ::rtl::Reference< OPropertyForward > pForward( new OPropertyForward( _xDest, m_xSettings, _sName, aPropertyList ) );
- m_aForwardList[_sName] = pForward;
- } // if ( aFind == m_aForwardList.end() && m_xSettings.is() )
+ ::rtl::Reference< OPropertyForward > pForward( new OPropertyForward( _xDest, m_xSettings, _sName, aPropertyList ) );
+ m_aForwardList[ _sName ] = pForward;
}
// -----------------------------------------------------------------------------
//........................................................................
diff --git a/dbaccess/source/core/misc/PropertyForward.cxx b/dbaccess/source/core/misc/PropertyForward.cxx
index f5bc30825291..4db6ef964448 100644
--- a/dbaccess/source/core/misc/PropertyForward.cxx
+++ b/dbaccess/source/core/misc/PropertyForward.cxx
@@ -30,140 +30,146 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBA_PROPERTYSETFORWARD_HXX
+
#include "PropertyForward.hxx"
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
-#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
#include "dbastrings.hrc"
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
-#include <comphelper/property.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
+
+#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
+
+#include <comphelper/property.hxx>
#include <tools/debug.hxx>
-#endif
+#include <tools/diagnose_ex.h>
//........................................................................
namespace dbaccess
{
//........................................................................
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::sdbcx;
+ using namespace ::com::sun::star::lang;
-DBG_NAME(OPropertyForward)
-OPropertyForward::OPropertyForward(const Reference< XPropertySet>& _xSource
- ,const Reference< XNameAccess>& _xDestContainer
- ,const ::rtl::OUString& _sName
- ,const ::std::vector< ::rtl::OUString>& _aPropertyList)
- : m_xSource(_xSource)
- , m_xDestContainer(_xDestContainer)
- , m_sName(_sName)
- , m_bInInsert(sal_False)
-{
- DBG_CTOR(OPropertyForward,NULL);
- OSL_ENSURE(_xDestContainer.is(),"OPropertyForward::OPropertyForward: destination should be valid!");
- OSL_ENSURE(m_xSource.is(),"OPropertyForward::OPropertyForward: source must be valid!");
- osl_incrementInterlockedCount(&m_refCount);
- try
+ DBG_NAME(OPropertyForward)
+
+ //------------------------------------------------------------------------
+ OPropertyForward::OPropertyForward( const Reference< XPropertySet>& _xSource, const Reference< XNameAccess>& _xDestContainer,
+ const ::rtl::OUString& _sName, const ::std::vector< ::rtl::OUString>& _aPropertyList )
+ :m_xSource( _xSource, UNO_SET_THROW )
+ ,m_xDestContainer( _xDestContainer, UNO_SET_THROW )
+ ,m_sName( _sName )
+ ,m_bInInsert( sal_False )
{
- if ( _aPropertyList.empty() )
- _xSource->addPropertyChangeListener(::rtl::OUString(), this);
- else
+ DBG_CTOR(OPropertyForward,NULL);
+
+ osl_incrementInterlockedCount(&m_refCount);
+ try
{
- ::std::vector< ::rtl::OUString>::const_iterator aIter = _aPropertyList.begin();
- ::std::vector< ::rtl::OUString>::const_iterator aEnd = _aPropertyList.end();
- for (; aIter != aEnd ; ++aIter )
- _xSource->addPropertyChangeListener(*aIter, this);
+ if ( _aPropertyList.empty() )
+ _xSource->addPropertyChangeListener( ::rtl::OUString(), this );
+ else
+ {
+ ::std::vector< ::rtl::OUString >::const_iterator aIter = _aPropertyList.begin();
+ ::std::vector< ::rtl::OUString >::const_iterator aEnd = _aPropertyList.end();
+ for (; aIter != aEnd ; ++aIter )
+ _xSource->addPropertyChangeListener( *aIter, this );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
+ osl_decrementInterlockedCount( &m_refCount );
}
- catch(Exception&)
+
+ // -----------------------------------------------------------------------------
+ OPropertyForward::~OPropertyForward()
{
- OSL_ENSURE(sal_False, "OPropertyForward::OPropertyForward: caught an exception!");
+ DBG_DTOR(OPropertyForward,NULL);
}
- osl_decrementInterlockedCount(&m_refCount);
-}
-// -----------------------------------------------------------------------------
-OPropertyForward::~OPropertyForward()
-{
- DBG_DTOR(OPropertyForward,NULL);
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OPropertyForward::propertyChange( const PropertyChangeEvent& evt ) throw(RuntimeException)
-{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_xDestContainer.is() )
+
+ // -----------------------------------------------------------------------------
+ void SAL_CALL OPropertyForward::propertyChange( const PropertyChangeEvent& evt ) throw(RuntimeException)
{
- if ( m_xDestContainer->hasByName(m_sName) )
- {
- m_xDest.set(m_xDestContainer->getByName(m_sName),UNO_QUERY);
- }
- else
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if ( !m_xDestContainer.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+
+ try
{
- Reference<XDataDescriptorFactory> xFactory(m_xDestContainer,UNO_QUERY);
- if ( xFactory.is() )
+ if ( !m_xDest.is() )
{
- m_xDest = xFactory->createDataDescriptor();
- if ( m_xDest.is() )
+ if ( m_xDestContainer->hasByName( m_sName ) )
+ {
+ m_xDest.set( m_xDestContainer->getByName( m_sName ), UNO_QUERY_THROW );
+ }
+ else
{
- ::comphelper::copyProperties(m_xSource,m_xDest);
+ Reference< XDataDescriptorFactory > xFactory( m_xDestContainer, UNO_QUERY_THROW );
+ m_xDest.set( xFactory->createDataDescriptor(), UNO_SET_THROW );
+
+ ::comphelper::copyProperties( m_xSource, m_xDest );
+
m_bInInsert = sal_True;
- Reference<XAppend> xAppend(m_xDestContainer,UNO_QUERY);
- if ( xAppend.is() )
- xAppend->appendByDescriptor(m_xDest);
+ Reference< XAppend > xAppend( m_xDestContainer, UNO_QUERY_THROW );
+ xAppend->appendByDescriptor( m_xDest );
m_bInInsert = sal_False;
}
+
+ m_xDestInfo.set( m_xDest->getPropertySetInfo(), UNO_SET_THROW );
}
+
+ if ( m_xDestInfo->hasPropertyByName( evt.PropertyName ) )
+ {
+ m_xDest->setPropertyValue( evt.PropertyName, evt.NewValue );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
- if ( m_xDest.is() )
- m_xDestInfo = m_xDest->getPropertySetInfo();
}
- if ( m_xDestInfo.is() && m_xDestInfo->hasPropertyByName(evt.PropertyName) )
+ // -----------------------------------------------------------------------------
+ void SAL_CALL OPropertyForward::disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) throw (RuntimeException)
{
- m_xDest->setPropertyValue(evt.PropertyName,evt.NewValue);
- }
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OPropertyForward::disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) throw (RuntimeException)
-{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_xSource.is() )
- {
- m_xSource->removePropertyChangeListener(::rtl::OUString(), this);
+ ::osl::MutexGuard aGuard(m_aMutex);
+
+ if ( !m_xSource.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+
+ m_xSource->removePropertyChangeListener( ::rtl::OUString(), this );
m_xSource = NULL;
+ m_xDestContainer = NULL;
+ m_xDestInfo = NULL;
+ m_xDest = NULL;
}
- m_xDestContainer = NULL;
- m_xDestInfo = NULL;
- m_xDest = NULL;
-}
-// -----------------------------------------------------------------------------
-void OPropertyForward::setDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDest)
-{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( !m_bInInsert )
+
+ // -----------------------------------------------------------------------------
+ void OPropertyForward::setDefinition( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDest )
{
- OSL_ENSURE( !m_xDest.is(),"Definition object is already set!");
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_bInInsert )
+ return;
- m_xDest = _xDest;
- if ( m_xDest.is() )
+ OSL_ENSURE( !m_xDest.is(), "OPropertyForward::setDefinition: definition object is already set!" );
+ try
{
- m_xDestInfo = m_xDest->getPropertySetInfo();
- ::comphelper::copyProperties(m_xDest,m_xSource);
+ m_xDest.set( _xDest, UNO_SET_THROW );
+ m_xDestInfo.set( m_xDest->getPropertySetInfo(), UNO_SET_THROW );
+ ::comphelper::copyProperties( m_xDest, m_xSource );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
-}
+
//........................................................................
} // namespace dbaccess
//........................................................................
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 672b88c810d4..90294dd59869 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -185,7 +185,7 @@ String ODsnTypeCollection::getMediaType(const ::rtl::OUString& _sURL) const
// -----------------------------------------------------------------------------
String ODsnTypeCollection::getDatasourcePrefixFromMediaType(const ::rtl::OUString& _sMediaType,const ::rtl::OUString& _sExtension)
{
- String sURL;
+ String sURL, sFallbackURL;
const uno::Sequence< ::rtl::OUString > aURLs = m_aDriverConfig.getURLs();
const ::rtl::OUString* pIter = aURLs.getConstArray();
const ::rtl::OUString* pEnd = pIter + aURLs.getLength();
@@ -195,13 +195,19 @@ String ODsnTypeCollection::getDatasourcePrefixFromMediaType(const ::rtl::OUStrin
if ( aFeatures.getOrDefault("MediaType",::rtl::OUString()) == _sMediaType )
{
const ::rtl::OUString sFileExtension = aFeatures.getOrDefault("Extension",::rtl::OUString());
- if ( (sFileExtension.getLength() && _sExtension == sFileExtension ) || !sFileExtension.getLength() || !_sExtension.getLength() )
+ if ( _sExtension == sFileExtension )
{
sURL = *pIter;
break;
}
+ if ( !sFileExtension.getLength() && _sExtension.getLength() )
+ sFallbackURL = *pIter;
}
} // for(;pIter != pEnd;++pIter )
+
+ if ( !sURL.Len() && sFallbackURL.Len() )
+ sURL = sFallbackURL;
+
sURL.EraseTrailingChars('*');
return sURL;
}
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 35b4b84e8b90..edfb331d5b59 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -102,7 +102,11 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
rtl::OUString sFileName = aPathOptions.SubstituteVariable(sValue);
if ( sValue == sFileName )
{
- sLocation = ::svt::OFileNotation(rImport.GetAbsoluteReference(sValue)).get( ::svt::OFileNotation::N_SYSTEM );
+ const sal_Int32 nFileNameLength = sFileName.getLength();
+ if ( ( nFileNameLength > 0 ) && ( sFileName.getStr()[ nFileNameLength - 1 ] == '/' ) )
+ sFileName = sFileName.copy( 0, nFileNameLength - 1 );
+
+ sLocation = ::svt::OFileNotation( rImport.GetAbsoluteReference( sFileName ) ).get( ::svt::OFileNotation::N_SYSTEM );
}
if ( sLocation.getLength() == 0 )
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 91b0fd968afb..8db327fb8b85 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -32,187 +32,72 @@
#include "precompiled_dbaccess.hxx"
-#ifndef _SBA_BWRCTRLR_HXX
+
+#include "browserids.hxx"
#include "brwctrlr.hxx"
-#endif
-#ifndef _SBX_BRWVIEW_HXX
#include "brwview.hxx"
-#endif
-#ifndef _OSL_MUTEX_HXX_ //autogen wg. MutexGuard
-#include <osl/mutex.hxx>
-#endif
-#ifndef _SFXAPP_HXX //autogen wg. SFX_APP
-#include <sfx2/app.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UNO_TYPECLASS_HPP_
-#include <com/sun/star/uno/TypeClass.hpp>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
+#include "dbu_brw.hrc"
+#include "dbustrings.hrc"
+#include "queryfilter.hxx"
+#include "queryorder.hxx"
#include "sqlmessage.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
-#include <com/sun/star/form/XFormController.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
-#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
-#include <com/sun/star/sdbc/XRowSetListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
-#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
-#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
-#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLERRORBROADCASTER_HPP_
-#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_
-#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
-#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
-#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+
+/** === begin UNO includes === **/
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_FORMBUTTONTYPE_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XCHANGELISTENER_HPP_
-#include <com/sun/star/form/XChangeListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_FORMSUBMITENCODING_HPP_
#include <com/sun/star/form/FormSubmitEncoding.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_FORMSUBMITMETHOD_HPP_
#include <com/sun/star/form/FormSubmitMethod.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XSUBMITLISTENER_HPP_
-#include <com/sun/star/form/XSubmitListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XRESET_HPP_
-#include <com/sun/star/form/XReset.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XSUBMIT_HPP_
-#include <com/sun/star/form/XSubmit.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XAPPROVEACTIONBROADCASTER_HPP_
#include <com/sun/star/form/XApproveActionBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XCHANGEBROADCASTER_HPP_
+#include <com/sun/star/form/XBoundControl.hpp>
#include <com/sun/star/form/XChangeBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XRESETLISTENER_HPP_
-#include <com/sun/star/form/XResetListener.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCANCELLABLE_HPP_
-#include <com/sun/star/util/XCancellable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XDATABASEPARAMETERBROADCASTER_HPP_
+#include <com/sun/star/form/XChangeListener.hpp>
#include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XBOUNDCONTROL_HPP_
-#include <com/sun/star/form/XBoundControl.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
-#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
-#include <com/sun/star/container/XNamed.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/form/XReset.hpp>
+#include <com/sun/star/form/XResetListener.hpp>
+#include <com/sun/star/form/XSubmit.hpp>
+#include <com/sun/star/form/XSubmitListener.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdb/ErrorCondition.hpp>
+#include <com/sun/star/sdb/ParametersRequest.hpp>
+#include <com/sun/star/sdb/SQLContext.hpp>
+#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
+#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
-#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
-#include <cppuhelper/exc_hlp.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX //autogen
-#include <vcl/msgbox.hxx>
-#endif
-#ifndef _FMSEARCH_HXX
-#include <svx/fmsearch.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
-#include <vcl/waitobj.hxx>
-#endif
-#ifndef _TOOLS_COLOR_HXX
-#include <tools/color.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
-#include <tools/diagnose_ex.h>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
-#include <comphelper/sequence.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
-#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
-#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
-#include <cppuhelper/implbase2.hxx>
-#endif
-#ifndef _DBU_BRW_HRC_
-#include "dbu_brw.hrc"
-#endif
-#ifndef _SFX_HRC
-#include <sfx2/sfx.hrc>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
-#include "browserids.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
-#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_INTERACTION_HXX_
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/uno/TypeClass.hpp>
+#include <com/sun/star/util/XCancellable.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/enumhelper.hxx>
+#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <comphelper/sequence.hxx>
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef CONNECTIVITY_SQLERROR_HXX
+#include <connectivity/dbtools.hxx>
#include <connectivity/sqlerror.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
-#include <comphelper/extract.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XINTERACTIONSUPPLYPARAMETERS_HPP_
-#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_PARAMETERSREQUEST_HPP_
-#include <com/sun/star/sdb/ParametersRequest.hpp>
-#endif
-#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#endif
-#ifndef INCLUDED_COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP
-#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
-#endif
-#ifndef INCLUDED_COM_SUN_STAR_SDB_ERRORCONDITION_HPP
-#include <com/sun/star/sdb/ErrorCondition.hpp>
-#endif
-#ifndef DBAUI_QUERYFILTER_HXX
-#include "queryfilter.hxx"
-#endif
-#ifndef DBAUI_QUERYORDER_HXX
-#include "queryorder.hxx"
-#endif
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <osl/mutex.hxx>
#include <rtl/logfile.hxx>
-
-#include <svx/svxdlg.hxx> //CHINA001
-//#include <svx/fmresids.hrc> //CHINA001
+#include <sfx2/app.hxx>
+#include <sfx2/sfx.hrc>
+#include <svx/fmsearch.hxx>
+#include <svx/svxdlg.hxx>
+#include <tools/color.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/msgbox.hxx>
+#include <vcl/waitobj.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
@@ -280,12 +165,12 @@ void SAL_CALL OParameterContinuation::setParameters( const Sequence< PropertyVal
//==============================================================================
-// a helper class implementing a ::com::sun::star::form::XFormController, will be aggregated by SbaXDataBrowserController
-// (we can't derive from ::com::sun::star::form::XFormController as it's base class is ::com::sun::star::awt::XTabController and the ::com::sun::star::awt::XTabController::getModel collides
-// with the ::com::sun::star::frame::XController::getModel implemented in our base class SbaXDataBrowserController)
+// a helper class implementing a runtime::XFormController, will be aggregated by SbaXDataBrowserController
+// (we can't derive from XFormController as it's base class is XTabController and the XTabController::getModel collides
+// with the XController::getModel implemented in our base class SbaXDataBrowserController)
class SbaXDataBrowserController::FormControllerImpl
- : public ::cppu::WeakAggImplHelper2< ::com::sun::star::form::XFormController,
- ::com::sun::star::frame::XFrameActionListener>
+ : public ::cppu::WeakAggImplHelper2< ::com::sun::star::form::runtime::XFormController,
+ ::com::sun::star::frame::XFrameActionListener >
{
friend class SbaXDataBrowserController;
::cppu::OInterfaceContainerHelper m_aActivateListeners;
@@ -294,12 +179,68 @@ class SbaXDataBrowserController::FormControllerImpl
public:
FormControllerImpl(SbaXDataBrowserController* pOwner);
- // ::com::sun::star::form::XFormController
+ // XFormController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations > SAL_CALL getFormOperations() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getCurrentControl(void) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL addActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener > & l) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener > & l) throw( ::com::sun::star::uno::RuntimeException );
-
- // ::com::sun::star::awt::XTabController
+ virtual void SAL_CALL addChildController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _ChildController ) throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > SAL_CALL getContext() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setContext( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext >& _context ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL getInteractionHandler() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _interactionHandler ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XChild, base of XFormController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ // XComponent, base of XFormController
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XIndexAccess, base of XFormController
+ virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess, base of XIndexAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess, base of XElementAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifyBroadcaster, base of XFormController
+ virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XConfirmDeleteBroadcaster, base of XFormController
+ virtual void SAL_CALL addConfirmDeleteListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeConfirmDeleteListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XSQLErrorBroadcaster, base of XFormController
+ virtual void SAL_CALL addSQLErrorListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeSQLErrorListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XRowSetApproveBroadcaster, base of XFormController
+ virtual void SAL_CALL addRowSetApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRowSetApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XDatabaseParameterBroadcaster2, base of XFormController
+ virtual void SAL_CALL addDatabaseParameterListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeDatabaseParameterListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XDatabaseParameterBroadcaster, base of XDatabaseParameterBroadcaster2
+ virtual void SAL_CALL addParameterListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeParameterListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModeSelector, base of XFormController
+ virtual void SAL_CALL setMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getMode( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTabController, base of XFormController
virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > & Model) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & _Container) throw( ::com::sun::star::uno::RuntimeException );
@@ -310,10 +251,10 @@ public:
virtual void SAL_CALL activateFirst(void) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL activateLast(void) throw( ::com::sun::star::uno::RuntimeException );
- // ::com::sun::star::frame::XFrameActionListener
+ // XFrameActionListener
virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
- // ::com::sun::star::lang::XEventListener
+ // XEventListener
virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
protected:
@@ -340,6 +281,13 @@ SbaXDataBrowserController::FormControllerImpl::~FormControllerImpl()
}
//------------------------------------------------------------------
+Reference< runtime::XFormOperations > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getFormOperations() throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" );
+ return NULL;
+}
+
+//------------------------------------------------------------------
Reference< ::com::sun::star::awt::XControl > SbaXDataBrowserController::FormControllerImpl::getCurrentControl(void) throw( RuntimeException )
{
return m_pOwner->getBrowserView() ? m_pOwner->getBrowserView()->getGridControl() : Reference< ::com::sun::star::awt::XControl > ();
@@ -358,6 +306,202 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeActivateListe
}
//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addChildController( const Reference< runtime::XFormController >& /*_ChildController*/ ) throw( RuntimeException, IllegalArgumentException )
+{
+ // not supported
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+}
+
+//------------------------------------------------------------------
+Reference< runtime::XFormControllerContext > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContext() throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" );
+ return NULL;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const Reference< runtime::XFormControllerContext >& /*_context*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" );
+}
+
+//------------------------------------------------------------------
+Reference< XInteractionHandler > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getInteractionHandler() throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" );
+ return NULL;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandler( const Reference< XInteractionHandler >& /*_interactionHandler*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" );
+}
+
+//------------------------------------------------------------------
+Reference< XInterface > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getParent( ) throw (RuntimeException)
+{
+ // don't have any parent form controllers
+ return NULL;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setParent( const Reference< XInterface >& /*Parent*/ ) throw (NoSupportException, RuntimeException)
+{
+ throw NoSupportException( ::rtl::OUString(), *this );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::dispose( ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addEventListener( const Reference< XEventListener >& /*xListener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeEventListener( const Reference< XEventListener >& /*aListener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" );
+}
+
+//------------------------------------------------------------------
+::sal_Int32 SAL_CALL SbaXDataBrowserController::FormControllerImpl::getCount( ) throw (RuntimeException)
+{
+ // no sub controllers, never
+ return 0;
+}
+
+//------------------------------------------------------------------
+Any SAL_CALL SbaXDataBrowserController::FormControllerImpl::getByIndex( ::sal_Int32 /*Index*/ ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
+{
+ // no sub controllers, never
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+}
+
+//------------------------------------------------------------------
+Type SAL_CALL SbaXDataBrowserController::FormControllerImpl::getElementType( ) throw (RuntimeException)
+{
+ return ::cppu::UnoType< runtime::XFormController >::get();
+}
+
+//------------------------------------------------------------------
+::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::hasElements( ) throw (RuntimeException)
+{
+ // no sub controllers, never
+ return false;
+}
+
+//------------------------------------------------------------------
+Reference< XEnumeration > SAL_CALL SbaXDataBrowserController::FormControllerImpl::createEnumeration( ) throw (RuntimeException)
+{
+ return new ::comphelper::OEnumerationByIndex( this );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setMode( const ::rtl::OUString& _rMode ) throw (NoSupportException, RuntimeException)
+{
+ if ( !supportsMode( _rMode ) )
+ throw NoSupportException();
+}
+
+//------------------------------------------------------------------
+::rtl::OUString SAL_CALL SbaXDataBrowserController::FormControllerImpl::getMode( ) throw (RuntimeException)
+{
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) );
+}
+
+//------------------------------------------------------------------
+Sequence< ::rtl::OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getSupportedModes( ) throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aModes(1);
+ aModes[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) );
+ return aModes;
+}
+
+//------------------------------------------------------------------
+::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::supportsMode( const ::rtl::OUString& aMode ) throw (RuntimeException)
+{
+ return aMode.compareToAscii( "DataMode" ) == 0;
+}
+
+//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException )
{
OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !");
@@ -465,19 +609,12 @@ Sequence< sal_Int8 > SAL_CALL SbaXDataBrowserController::getImplementationId( )
//------------------------------------------------------------------
Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw (RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::queryInterface" );
// check for our additional interfaces
Any aRet = SbaXDataBrowserController_Base::queryInterface(_rType);
- // check for the base controllers interfaces
+ // check for our aggregate (implementing the XFormController)
if (!aRet.hasValue())
- {
- // check for our aggregate (implementing the XFormController)
- if (!aRet.hasValue())
- {
- aRet = m_xFormControllerImpl->queryAggregation(_rType);
- }
- }
+ aRet = m_xFormControllerImpl->queryAggregation(_rType);
// no more to offer
return aRet;
@@ -1206,16 +1343,6 @@ sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( Runtim
// -----------------------------------------------------------------------
void SbaXDataBrowserController::disposing()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::disposing" );
- // and dispose the aggregate
- if (m_xFormControllerImpl.is())
- {
- Reference< XComponent > xAggComp;
- m_xFormControllerImpl->queryAggregation(::getCppuType(&xAggComp)) >>= xAggComp;
- if (xAggComp.is())
- xAggComp->dispose();
- }
-
// the base class
SbaXDataBrowserController_Base::OGenericUnoController::disposing();
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 01475f549a14..da1b0968f2e9 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -43,9 +43,6 @@
#ifndef _COM_SUN_STAR_FORM_XGRIDCOLUMNFACTORY_HPP_
#include <com/sun/star/form/XGridColumnFactory.hpp>
#endif
-#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
-#include <com/sun/star/form/XFormController.hpp>
-#endif
#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
#endif
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 5440be1b5046..46f6c576c022 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -985,13 +985,13 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu)
rMenu.SetHelpId(ID_BROWSER_ROWHEIGHT, aNewItems.GetHelpId(ID_BROWSER_ROWHEIGHT));
rMenu.InsertSeparator(nPos++);
} // if (!IsReadOnlyDB())
-
- if ( GetSelectRowCount() > 0 )
- {
- rMenu.InsertItem(ID_BROWSER_COPY, aNewItems.GetItemText(SID_COPY), 0, nPos++);
- rMenu.SetHelpId(ID_BROWSER_COPY, aNewItems.GetHelpId(SID_COPY));
-
- rMenu.InsertSeparator(nPos++);
+
+ if ( GetSelectRowCount() > 0 )
+ {
+ rMenu.InsertItem(ID_BROWSER_COPY, aNewItems.GetItemText(SID_COPY), 0, nPos++);
+ rMenu.SetHelpId(ID_BROWSER_COPY, aNewItems.GetHelpId(SID_COPY));
+
+ rMenu.InsertSeparator(nPos++);
}
}
@@ -1428,20 +1428,20 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
}
// -----------------------------------------------------------------------
-void SbaGridControl::CopySelectedRowsToClipboard()
-{
- DBG_ASSERT( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" );
- implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true );
-}
-
-// -----------------------------------------------------------------------
-void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
-{
- implTransferSelectedRows( nRowPos, false );
-}
-
-// -----------------------------------------------------------------------
-void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
+void SbaGridControl::CopySelectedRowsToClipboard()
+{
+ DBG_ASSERT( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" );
+ implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true );
+}
+
+// -----------------------------------------------------------------------
+void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
+{
+ implTransferSelectedRows( nRowPos, false );
+}
+
+// -----------------------------------------------------------------------
+void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
{
Reference< XPropertySet > xDataSource(getDataSource(), UNO_QUERY);
DBG_ASSERT(xDataSource.is(), "SbaGridControl::implTransferSelectedRows : invalid data source !");
@@ -1478,8 +1478,8 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC
ODataClipboard* pTransfer = new ODataClipboard(xDataSource, aSelectedRows,xRowSetClone, getServiceManager());
Reference< XTransferable > xEnsureDelete = pTransfer;
- if ( _bTrueIfClipboardFalseIfDrag )
- pTransfer->CopyToClipboard( this );
+ if ( _bTrueIfClipboardFalseIfDrag )
+ pTransfer->CopyToClipboard( this );
else
pTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK);
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 3e37fe1fc75a..b63383e47c0e 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -77,6 +77,7 @@
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/XBookmarksSupplier.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
+#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/sdb/XParametersSupplier.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
@@ -109,6 +110,7 @@
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbexception.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <sfx2/app.hxx>
@@ -197,25 +199,21 @@ void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const ::
//-------------------------------------------------------------------------
::rtl::OUString SAL_CALL SbaTableQueryBrowser::getImplementationName() throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getImplementationName" );
return getImplementationName_Static();
}
//-------------------------------------------------------------------------
::comphelper::StringSequence SAL_CALL SbaTableQueryBrowser::getSupportedServiceNames() throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getSupportedServiceNames" );
return getSupportedServiceNames_Static();
}
// -------------------------------------------------------------------------
::rtl::OUString SbaTableQueryBrowser::getImplementationName_Static() throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getImplementationName_Static" );
return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.ODatasourceBrowser");
}
//-------------------------------------------------------------------------
::comphelper::StringSequence SbaTableQueryBrowser::getSupportedServiceNames_Static() throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getSupportedServiceNames_Static" );
::comphelper::StringSequence aSupported(1);
aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.DataSourceBrowser");
return aSupported;
@@ -223,7 +221,6 @@ void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const ::
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::Create" );
::vos::OGuard aGuard(Application::GetSolarMutex());
return *(new SbaTableQueryBrowser(_rxFactory));
}
@@ -246,7 +243,6 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XMultiServiceFactory
,m_bInSuspend(sal_False)
,m_bEnableBrowser(sal_True)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::SbaTableQueryBrowser" );
DBG_CTOR(SbaTableQueryBrowser,NULL);
}
@@ -266,7 +262,6 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser()
//------------------------------------------------------------------------------
Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::queryInterface" );
if ( _rType.equals( XScriptInvocationContext::static_type() ) )
{
OSL_PRECOND( !!m_aDocScriptSupport, "SbaTableQueryBrowser::queryInterface: did not initialize this, yet!" );
@@ -284,7 +279,6 @@ Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (Run
//------------------------------------------------------------------------------
Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getTypes" );
Sequence< Type > aTypes( ::comphelper::concatSequences(
SbaXDataBrowserController::getTypes(),
SbaTableQueryBrowser_Base::getTypes()
@@ -308,7 +302,6 @@ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeExcep
//------------------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getImplementationId" );
static ::cppu::OImplementationId * pId = 0;
if (! pId)
{
@@ -325,7 +318,6 @@ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) thro
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::disposing()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::disposing" );
::vos::OGuard aGuard(Application::GetSolarMutex());
// doin' a lot of VCL stuff here -> lock the SolarMutex
@@ -350,9 +342,15 @@ void SAL_CALL SbaTableQueryBrowser::disposing()
implRemoveStatusListeners();
// remove the container listener from the database context
- Reference< XContainer > xDatasourceContainer(m_xDatabaseContext, UNO_QUERY);
- if (xDatasourceContainer.is())
- xDatasourceContainer->removeContainerListener(this);
+ try
+ {
+ Reference< XDatabaseRegistrations > xDatabaseRegistrations( m_xDatabaseContext, UNO_QUERY_THROW );
+ xDatabaseRegistrations->removeDatabaseRegistrationsListener( this );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
// check out from all the objects we are listening
// the frame
@@ -364,23 +362,17 @@ void SAL_CALL SbaTableQueryBrowser::disposing()
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::Construct" );
- if (!SbaXDataBrowserController::Construct(pParent))
+ if ( !SbaXDataBrowserController::Construct( pParent ) )
return sal_False;
try
{
- Reference< XContainer > xDatasourceContainer(m_xDatabaseContext, UNO_QUERY);
- if (xDatasourceContainer.is())
- xDatasourceContainer->addContainerListener(this);
- else {
- DBG_ERROR("SbaTableQueryBrowser::Construct: the DatabaseContext should allow us to be a listener!");
- }
+ Reference< XDatabaseRegistrations > xDatabaseRegistrations( m_xDatabaseContext, UNO_QUERY_THROW );
+ xDatabaseRegistrations->addDatabaseRegistrationsListener( this );
// the collator for the string compares
- m_xCollator = Reference< XCollator >(getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.Collator")), UNO_QUERY);
- if (m_xCollator.is())
- m_xCollator->loadDefaultCollator(Application::GetSettings().GetLocale(), 0);
+ m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.i18n.Collator" ) ), UNO_QUERY_THROW );
+ m_xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 );
}
catch(Exception&)
{
@@ -433,7 +425,6 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
// -------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star::sdbc::XRowSet > & _rxForm)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::InitializeForm" );
if(!m_pCurrentlyDisplayed)
return sal_True;
@@ -490,7 +481,6 @@ sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star:
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::initializePreviewMode()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::initializePreviewMode" );
if ( getBrowserView() && getBrowserView()->getVclControl() )
{
getBrowserView()->getVclControl()->AlwaysEnableInput( FALSE );
@@ -509,7 +499,6 @@ void SbaTableQueryBrowser::initializePreviewMode()
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::InitializeGridModel" );
try
{
Reference< ::com::sun::star::form::XGridColumnFactory > xColFactory(xGrid, UNO_QUERY);
@@ -633,6 +622,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
aInitialValues.push_back( NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), makeAny( (sal_Bool)sal_True ) ) );
// NO break!
case DataType::BINARY:
@@ -750,7 +740,6 @@ Reference<XPropertySet> getColumnHelper(SvLBoxEntry* _pCurrentlyDisplayed,const
// -----------------------------------------------------------------------
void SbaTableQueryBrowser::transferChangedControlProperty(const ::rtl::OUString& _rProperty, const Any& _rNewValue)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::transferChangedControlProperty" );
if(m_pCurrentlyDisplayed)
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
@@ -764,7 +753,6 @@ void SbaTableQueryBrowser::transferChangedControlProperty(const ::rtl::OUString&
// -----------------------------------------------------------------------
void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::propertyChange" );
SbaXDataBrowserController::propertyChange(evt);
try
@@ -873,7 +861,6 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
// -----------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::suspend" );
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
@@ -898,7 +885,6 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEvent ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::statusChanged" );
// search the external dispatcher causing this call
Reference< XDispatch > xSource(_rEvent.Source, UNO_QUERY);
ExternalFeaturesMap::iterator aLoop;
@@ -953,7 +939,6 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::checkDocumentDataSource()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::checkDocumentDataSource" );
SvLBoxEntry* pDataSourceEntry = NULL;
SvLBoxEntry* pContainerEntry = NULL;
SvLBoxEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, sal_False );
@@ -991,7 +976,6 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, ::rtl::OUString& _rDataSource, ::rtl::OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::extractDescriptorProps" );
_rDataSource = _rDescriptor.getDataSource();
if ( _rDescriptor.has(daCommand) )
_rDescriptor[daCommand] >>= _rCommand;
@@ -1043,7 +1027,6 @@ namespace
// -------------------------------------------------------------------------
String SbaTableQueryBrowser::getDataSourceAcessor( SvLBoxEntry* _pDataSourceEntry ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getDataSourceAcessor" );
DBG_ASSERT( _pDataSourceEntry, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry!" );
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( _pDataSourceEntry->GetUserData() );
@@ -1057,7 +1040,6 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS
SvLBoxEntry** _ppDataSourceEntry, SvLBoxEntry** _ppContainerEntry, sal_Bool _bExpandAncestors,
const SharedConnection& _rxConnection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getObjectEntry" );
if (_ppDataSourceEntry)
*_ppDataSourceEntry = NULL;
if (_ppContainerEntry)
@@ -1080,9 +1062,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS
{
// special case, the data source is a URL
// add new entries to the list box model
- Image a, b, c; // not interested in reusing them
- String e, f;
- implAddDatasource( _rDataSource, a, e, b, f, c, _rxConnection );
+ implAddDatasource( _rDataSource, _rxConnection );
pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter );
DBG_ASSERT( pDataSource, "SbaTableQueryBrowser::getObjectEntry: hmm - did not find it again!" );
}
@@ -1132,7 +1112,6 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescri
SvLBoxEntry** _ppDataSourceEntry, SvLBoxEntry** _ppContainerEntry,
sal_Bool _bExpandAncestors)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getObjectEntry" );
// extract the props from the descriptor
::rtl::OUString sDataSource;
::rtl::OUString sCommand;
@@ -1146,7 +1125,6 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescri
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::connectExternalDispatches()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::connectExternalDispatches" );
Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY );
DBG_ASSERT(xProvider.is(), "SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !");
if (xProvider.is())
@@ -1213,7 +1191,6 @@ void SbaTableQueryBrowser::connectExternalDispatches()
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implCheckExternalSlot" );
if ( !m_xMainToolbar.is() )
return;
@@ -1236,7 +1213,6 @@ void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId )
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::disposing" );
// our frame ?
Reference< ::com::sun::star::frame::XFrame > xSourceFrame(_rSource.Source, UNO_QUERY);
if (m_xCurrentFrameParent.is() && (xSourceFrame == m_xCurrentFrameParent))
@@ -1299,7 +1275,6 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) thr
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implRemoveStatusListeners()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implRemoveStatusListeners" );
// clear all old dispatches
for ( ExternalFeaturesMap::const_iterator aLoop = m_aExternalFeatures.begin();
aLoop != m_aExternalFeatures.end();
@@ -1324,7 +1299,6 @@ void SbaTableQueryBrowser::implRemoveStatusListeners()
// -------------------------------------------------------------------------
sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::select" );
::vos::OGuard aGuard(Application::GetSolarMutex());
// doin' a lot of VCL stuff here -> lock the SolarMutex
@@ -1354,7 +1328,6 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (
// -------------------------------------------------------------------------
Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getSelection" );
Any aReturn;
try
@@ -1382,21 +1355,18 @@ Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException)
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::addSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::addSelectionChangeListener" );
m_aSelectionListeners.addInterface(_rxListener);
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::removeSelectionChangeListener" );
m_aSelectionListeners.removeInterface(_rxListener);
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame::XFrame > & _xFrame) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::attachFrame" );
implRemoveStatusListeners();
if (m_xCurrentFrameParent.is())
@@ -1441,7 +1411,6 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame:
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::addModelListeners" );
SbaXDataBrowserController::addModelListeners(_xGridControlModel);
Reference< XPropertySet > xSourceSet(_xGridControlModel, UNO_QUERY);
if (xSourceSet.is())
@@ -1459,7 +1428,6 @@ void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star::
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::removeModelListeners" );
SbaXDataBrowserController::removeModelListeners(_xGridControlModel);
Reference< XPropertySet > xSourceSet(_xGridControlModel, UNO_QUERY);
if (xSourceSet.is())
@@ -1475,7 +1443,6 @@ void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::sta
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::RowChanged()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::RowChanged" );
if(getBrowserView())
{
SbaGridControl* pControl = getBrowserView()->getVclControl();
@@ -1488,7 +1455,6 @@ void SbaTableQueryBrowser::RowChanged()
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::ColumnChanged()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::ColumnChanged" );
if(getBrowserView())
{
SbaGridControl* pControl = getBrowserView()->getVclControl();
@@ -1500,7 +1466,6 @@ void SbaTableQueryBrowser::ColumnChanged()
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & xCol)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::AddColumnListener" );
SbaXDataBrowserController::AddColumnListener(xCol);
SafeAddPropertyListener(xCol, PROPERTY_WIDTH, static_cast<XPropertyChangeListener*>(this));
SafeAddPropertyListener(xCol, PROPERTY_HIDDEN, static_cast<XPropertyChangeListener*>(this));
@@ -1511,7 +1476,6 @@ void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & x
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > & xCol)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::RemoveColumnListener" );
SbaXDataBrowserController::RemoveColumnListener(xCol);
SafeRemovePropertyListener(xCol, PROPERTY_WIDTH, static_cast<XPropertyChangeListener*>(this));
SafeRemovePropertyListener(xCol, PROPERTY_HIDDEN, static_cast<XPropertyChangeListener*>(this));
@@ -1522,7 +1486,6 @@ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet >
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::criticalFail()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::criticalFail" );
SbaXDataBrowserController::criticalFail();
unloadAndCleanup( sal_False );
}
@@ -1530,7 +1493,6 @@ void SbaTableQueryBrowser::criticalFail()
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::LoadFinished" );
SbaXDataBrowserController::LoadFinished(_bWasSynch);
m_sQueryCommand = ::rtl::OUString();
@@ -1552,7 +1514,6 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getExternalSlotState" );
sal_Bool bEnabled = sal_False;
ExternalFeaturesMap::const_iterator aPos = m_aExternalFeatures.find( _nId );
if ( ( m_aExternalFeatures.end() != aPos ) && aPos->second.xDispatcher.is() )
@@ -1563,7 +1524,6 @@ sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const
//------------------------------------------------------------------------------
FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::GetState" );
FeatureState aReturn;
// (disabled automatically)
@@ -1765,7 +1725,6 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& aArgs)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::Execute" );
switch (nId)
{
default:
@@ -1951,12 +1910,20 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
break;
}
}
+
+// -------------------------------------------------------------------------
+void SbaTableQueryBrowser::implAddDatasource( const String& _rDataSourceName, const SharedConnection& _rxConnection )
+{
+ Image a, b, c;
+ String d, e;
+ implAddDatasource( _rDataSourceName, a, d, b, e, c, _rxConnection );
+}
+
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDbImage,
String& _rQueryName, Image& _rQueryImage, String& _rTableName, Image& _rTableImage,
const SharedConnection& _rxConnection)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implAddDatasource" );
vos::OGuard aGuard( Application::GetSolarMutex() );
// initialize the names/images if necessary
if (!_rQueryName.Len())
@@ -2010,7 +1977,6 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::initializeTreeModel()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::initializeTreeModel" );
if (m_xDatabaseContext.is())
{
Image aDBImage, aQueriesImage, aTablesImage;
@@ -2029,7 +1995,6 @@ sal_Bool SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xName
SvLBoxEntry* _pParent,
EntryType _eEntryType)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::populateTree" );
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(_pParent->GetUserData());
if(pData) // don't ask if the nameaccess is already set see OnExpandEntry views and tables
pData->xContainer = _xNameAccess;
@@ -2060,7 +2025,6 @@ sal_Bool SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xName
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::implAppendEntry( SvLBoxEntry* _pParent, const String& _rName, void* _pUserData, EntryType _eEntryType )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implAppendEntry" );
::std::auto_ptr< ImageProvider > pImageProvider( getImageProviderFor( _pParent ) );
Image aImage, aImageHC;
@@ -2077,7 +2041,6 @@ void SbaTableQueryBrowser::implAppendEntry( SvLBoxEntry* _pParent, const String&
//------------------------------------------------------------------------------
IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::OnExpandEntry" );
if (_pParent->HasChilds())
// nothing to to ...
return 1L;
@@ -2180,7 +2143,6 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::ensureEntryObject" );
DBG_ASSERT(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!");
if (!_pEntry)
return sal_False;
@@ -2240,7 +2202,6 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implSelect(_rDescriptor,_bSelectDirect)" );
// extract the props
::rtl::OUString sDataSource;
::rtl::OUString sCommand;
@@ -2256,7 +2217,6 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _r
sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implLoadAnything" );
Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
if(xProp.is())
{
@@ -2274,8 +2234,6 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSou
xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing));
if ( m_bPreview )
{
- // this be undone by the grid control in DbGridControl::RecalcRows
- // xProp->setPropertyValue(PROPERTY_FETCHSIZE, makeAny(sal_Int32(20)));
xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD));
}
@@ -2310,21 +2268,24 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSou
InvalidateAll();
return bSuccess;
}
- catch(SQLException& e)
+ catch( const SQLException& e )
{
- showError(SQLExceptionInfo(e));
+ Any aException( ::cppu::getCaughtException() );
+ showError( SQLExceptionInfo( aException ) );
}
- catch(WrappedTargetException& e)
+ catch( const WrappedTargetException& e )
{
SQLException aSql;
- if(e.TargetException >>= aSql)
- showError(SQLExceptionInfo(aSql));
+ if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) )
+ showError( SQLExceptionInfo( e.TargetException ) );
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implLoadAnything: something strange happended!");
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implLoadAnything: something strange happended!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -2338,7 +2299,6 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::rtl::OUString& _rDataSourceNam
const SharedConnection& _rxConnection
,sal_Bool _bSelectDirect)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implSelect(_rDataSourceName,_rCommand,...)" );
if (_rDataSourceName.getLength() && _rCommand.getLength() && (-1 != _nCommandType))
{
SvLBoxEntry* pDataSource = NULL;
@@ -2387,7 +2347,6 @@ IMPL_LINK(SbaTableQueryBrowser, OnSelectionChange, void*, /*NOINTERESTEDIN*/)
//------------------------------------------------------------------------------
bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implSelect(_pEntry)" );
if ( !_pEntry )
return false;
@@ -2581,7 +2540,6 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
// -----------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAccess>& _rxNameAccess)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getEntryFromContainer" );
DBTreeListBox& rListBox = m_pTreeView->getListBox();
SvLBoxEntry* pContainer = NULL;
SvLBoxEntry* pDSLoop = rListBox.FirstChild(NULL);
@@ -2606,7 +2564,6 @@ SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAc
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::elementInserted" );
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
@@ -2638,24 +2595,12 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve
}
implAppendEntry( pEntry, ::comphelper::getString( _rEvent.Accessor ), pNewData, pNewData->eType );
}
- else if (xNames.get() == m_xDatabaseContext.get())
- { // a new datasource has been added to the context
- // the name of the new ds
- ::rtl::OUString sNewDS;
- _rEvent.Accessor >>= sNewDS;
-
- // add new entries to the list box model
- Image a, b, c; // not interested in reusing them
- String e, f;
- implAddDatasource( sNewDS, a, e, b, f, c, SharedConnection() );
- }
else
SbaXDataBrowserController::elementInserted(_rEvent);
}
// -------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const String& _sName,SvLBoxEntry* _pContainer)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::isCurrentlyDisplayedChanged" );
return m_pCurrentlyDisplayed
&& getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer)
&& m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer
@@ -2664,7 +2609,6 @@ sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const String& _sName,
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::elementRemoved" );
::vos::OGuard aSolarGuard(Application::GetSolarMutex());
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
@@ -2711,62 +2655,6 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
// maybe the object which is part of the document data source has been removed
checkDocumentDataSource();
}
- else if (xNames.get() == m_xDatabaseContext.get())
- { // a datasource has been removed from the context
-
- // the name
- ::rtl::OUString sNewDS;
- _rEvent.Accessor >>= sNewDS;
- String sNewDatasource = sNewDS;
-
- // get the top-level representing the removed data source
- SvLBoxEntry* pDSLoop = m_pTreeView->getListBox().FirstChild(NULL);
- while (pDSLoop)
- {
- if (m_pTreeView->getListBox().GetEntryText(pDSLoop) == sNewDatasource)
- break;
-
- pDSLoop = m_pTreeView->getListBox().NextSibling(pDSLoop);
- }
-
- if (pDSLoop)
- {
- if (isSelected(pDSLoop))
- { // a table or query belonging to the deleted data source is currently beeing displayed.
- OSL_ENSURE(m_pTreeView->getListBox().GetRootLevelParent(m_pCurrentlyDisplayed) == pDSLoop, "SbaTableQueryBrowser::elementRemoved: inconsistence (1)!");
- unloadAndCleanup( sal_True );
- }
- else
- OSL_ENSURE(
- (NULL == m_pCurrentlyDisplayed)
- || (m_pTreeView->getListBox().GetRootLevelParent(m_pCurrentlyDisplayed) != pDSLoop), "SbaTableQueryBrowser::elementRemoved: inconsistence (2)!");
-
- // look for user data to delete
- SvTreeEntryList* pList = m_pTreeModel->GetChildList(pDSLoop);
- if(pList)
- {
- SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>(pList->First());
- while (pEntryLoop)
- {
- DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pEntryLoop->GetUserData());
- pEntryLoop->SetUserData(NULL);
- delete pData;
- pEntryLoop = static_cast<SvLBoxEntry*>(pList->Next());
- }
- }
- // remove the entry. This should remove all children, too.
- DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pDSLoop->GetUserData());
- pDSLoop->SetUserData(NULL);
- delete pData;
- m_pTreeModel->Remove(pDSLoop);
- }
- else {
- DBG_ERROR("SbaTableQueryBrowser::elementRemoved: unknown datasource name!");
- }
-
- // maybe the object which is part of the document data source has been removed
- checkDocumentDataSource();
- }
else
SbaXDataBrowserController::elementRemoved(_rEvent);
}
@@ -2774,7 +2662,6 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::elementReplaced" );
::vos::OGuard aSolarGuard(Application::GetSolarMutex());
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
@@ -2847,7 +2734,6 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::impl_releaseConnection" );
// remove as event listener
Reference< XComponent > xComponent( _rxConnection, UNO_QUERY );
if ( xComponent.is() )
@@ -2876,7 +2762,6 @@ void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnecti
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::disposeConnection( SvLBoxEntry* _pDSEntry )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::disposeConnection" );
DBG_ASSERT( _pDSEntry, "SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" );
DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::disposeConnection: invalid entry (not top-level)!" );
@@ -2891,7 +2776,6 @@ void SbaTableQueryBrowser::disposeConnection( SvLBoxEntry* _pDSEntry )
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::closeConnection(SvLBoxEntry* _pDSEntry,sal_Bool _bDisposeConnection)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::closeConnection" );
DBG_ASSERT(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!");
DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!");
@@ -2928,7 +2812,6 @@ void SbaTableQueryBrowser::closeConnection(SvLBoxEntry* _pDSEntry,sal_Bool _bDis
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::unloadAndCleanup" );
if (!m_pCurrentlyDisplayed)
// nothing to do
return;
@@ -3016,7 +2899,6 @@ namespace
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::impl_initialize()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::impl_initialize" );
::vos::OGuard aGuard(Application::GetSolarMutex());
// doin' a lot of VCL stuff here -> lock the SolarMutex
@@ -3150,12 +3032,7 @@ void SbaTableQueryBrowser::impl_initialize()
}
}
- Image aDBImage, aQueriesImage, aTablesImage;
- String sQueriesName, sTablesName;
-
- implAddDatasource( sInitialDataSourceName,
- aDBImage, sQueriesName, aQueriesImage, sTablesName, aTablesImage, xConnection
- );
+ implAddDatasource( sInitialDataSourceName, xConnection );
m_pTreeView->getListBox().Expand( m_pTreeView->getListBox().First() );
}
else
@@ -3196,14 +3073,12 @@ void SbaTableQueryBrowser::impl_initialize()
// -------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::haveExplorer() const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::haveExplorer" );
return m_pTreeView && m_pTreeView->IsVisible();
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::hideExplorer()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::hideExplorer" );
if (!haveExplorer())
return;
if (!getBrowserView())
@@ -3219,7 +3094,6 @@ void SbaTableQueryBrowser::hideExplorer()
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::showExplorer()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::showExplorer" );
if (haveExplorer())
return;
@@ -3236,7 +3110,6 @@ void SbaTableQueryBrowser::showExplorer()
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureConnection(SvLBoxEntry* _pAnyEntry, SharedConnection& _rConnection)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::ensureConnection" );
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry);
DBTreeListUserData* pDSData =
pDSEntry
@@ -3249,7 +3122,6 @@ sal_Bool SbaTableQueryBrowser::ensureConnection(SvLBoxEntry* _pAnyEntry, SharedC
// -----------------------------------------------------------------------------
::std::auto_ptr< ImageProvider > SbaTableQueryBrowser::getImageProviderFor( SvLBoxEntry* _pAnyEntry )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getImageProviderFor" );
::std::auto_ptr< ImageProvider > pImageProvider( new ImageProvider );
SharedConnection xConnection;
if ( getExistentConnectionFor( _pAnyEntry, xConnection ) )
@@ -3260,7 +3132,6 @@ sal_Bool SbaTableQueryBrowser::ensureConnection(SvLBoxEntry* _pAnyEntry, SharedC
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvLBoxEntry* _pAnyEntry, SharedConnection& _rConnection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getExistentConnectionFor" );
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry );
DBTreeListUserData* pDSData =
pDSEntry
@@ -3275,7 +3146,6 @@ sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvLBoxEntry* _pAnyEntry
// -----------------------------------------------------------------------------
bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::impl_isDataSourceEntry" );
return m_pTreeModel->GetRootLevelParent( _pEntry ) == _pEntry;
}
#endif
@@ -3283,7 +3153,6 @@ bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureConnection( SvLBoxEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::ensureConnection" );
DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" );
if(_pDSEntry)
{
@@ -3386,7 +3255,6 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::implAdministrate( SvLBoxEntry* _pApplyTo )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implAdministrate" );
OSL_PRECOND( _pApplyTo, "SbaTableQueryBrowser::implAdministrate: illegal entry!" );
if ( !_pApplyTo )
return;
@@ -3444,7 +3312,6 @@ void SbaTableQueryBrowser::implAdministrate( SvLBoxEntry* _pApplyTo )
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::requestQuickHelp" );
const DBTreeListUserData* pData = static_cast< const DBTreeListUserData* >( _pEntry->GetUserData() );
if ( ( pData->eType == etDatasource ) && pData->sAccessor.Len() )
{
@@ -3457,7 +3324,6 @@ sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvLBoxEntry* _pEntry, Str
// -----------------------------------------------------------------------------
PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getContextMenu" );
OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl,
"SbaTableQueryBrowser::getContextMenu: where does this come from?" );
if ( &m_pTreeView->getListBox() != &_rControl )
@@ -3469,21 +3335,18 @@ PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const
// -----------------------------------------------------------------------------
IController& SbaTableQueryBrowser::getCommandController()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getCommandController" );
return *this;
}
// -----------------------------------------------------------------------------
::cppu::OInterfaceContainerHelper* SbaTableQueryBrowser::getContextMenuInterceptors()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getContextMenuInterceptors" );
return &m_aContextMenuInterceptors;
}
// -----------------------------------------------------------------------------
Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getCurrentSelection" );
OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl,
"SbaTableQueryBrowser::getCurrentSelection: where does this come from?" );
@@ -3525,7 +3388,6 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::implGetQuerySignature( ::rtl::OUString& _rCommand, sal_Bool& _bEscapeProcessing )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::implGetQuerySignature" );
_rCommand = ::rtl::OUString();
_bEscapeProcessing = sal_False;
@@ -3574,7 +3436,6 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( ::rtl::OUString& _rCommand
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::frameAction" );
if (aEvent.Frame == m_xCurrentFrameParent)
{
if(aEvent.Action == FrameAction_COMPONENT_DETACHING)
@@ -3589,7 +3450,6 @@ void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActio
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _xColContainer)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::clearGridColumns" );
// first we have to clear the grid
Sequence< ::rtl::OUString > aNames = _xColContainer->getElementNames();
const ::rtl::OUString* pIter = aNames.getConstArray();
@@ -3605,7 +3465,6 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::isHiContrast() const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::isHiContrast" );
sal_Bool bRet = sal_False;
if ( m_pTreeView )
bRet = m_pTreeView->getListBox().GetSettings().GetStyleSettings().GetHighContrastMode();
@@ -3614,7 +3473,6 @@ sal_Bool SbaTableQueryBrowser::isHiContrast() const
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::loadMenu" );
if ( m_bShowMenu )
{
OGenericUnoController::loadMenu(_xFrame);
@@ -3636,7 +3494,6 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
// -----------------------------------------------------------------------------
::rtl::OUString SbaTableQueryBrowser::getPrivateTitle() const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getPrivateTitle" );
::rtl::OUString sTitle;
if ( m_pCurrentlyDisplayed )
{
@@ -3661,7 +3518,6 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::preReloadForm()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::preReloadForm" );
sal_Bool bIni = sal_False;
if ( !m_pCurrentlyDisplayed )
{
@@ -3690,7 +3546,6 @@ sal_Bool SbaTableQueryBrowser::preReloadForm()
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::postReloadForm()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::postReloadForm" );
InitializeGridModel(getFormComponent());
LoadFinished(sal_True);
//updateTitle();
@@ -3699,7 +3554,6 @@ void SbaTableQueryBrowser::postReloadForm()
//------------------------------------------------------------------------------
Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer() throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::getScriptContainer" );
// update our database document
Reference< XModel > xDocument;
try
@@ -3726,7 +3580,6 @@ Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer(
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::registerContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::registerContextMenuInterceptor" );
if ( _Interceptor.is() )
m_aContextMenuInterceptors.addInterface( _Interceptor );
}
@@ -3734,10 +3587,90 @@ void SAL_CALL SbaTableQueryBrowser::registerContextMenuInterceptor( const Refere
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::releaseContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::releaseContextMenuInterceptor" );
- m_aContextMenuInterceptors.removeInterface( _Interceptor );
+ if ( _Interceptor.is() )
+ m_aContextMenuInterceptors.removeInterface( _Interceptor );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ implAddDatasource( _Event.Name, SharedConnection() );
}
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSourceName )
+{
+ // get the top-level representing the removed data source
+ SvLBoxEntry* pDataSourceEntry = m_pTreeView->getListBox().FirstChild( NULL );
+ while ( pDataSourceEntry )
+ {
+ if ( m_pTreeView->getListBox().GetEntryText( pDataSourceEntry ) == _rDataSourceName )
+ break;
+
+ pDataSourceEntry = m_pTreeView->getListBox().NextSibling( pDataSourceEntry );
+ }
+
+ OSL_ENSURE( pDataSourceEntry, "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: do not know this data source!" );
+ if ( !pDataSourceEntry )
+ return;
+
+ if ( isSelected( pDataSourceEntry ) )
+ { // a table or query belonging to the deleted data source is currently beeing displayed.
+ OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry,
+ "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" );
+ unloadAndCleanup( sal_True );
+ }
+ else
+ OSL_ENSURE(
+ ( NULL == m_pCurrentlyDisplayed )
+ || ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ),
+ "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (2)!");
+
+ // delete any user data of the child entries of the to-be-removed entry
+ SvTreeEntryList* pList = m_pTreeModel->GetChildList( pDataSourceEntry );
+ if ( pList )
+ {
+ SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>( pList->First() );
+ while ( pEntryLoop )
+ {
+ DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pEntryLoop->GetUserData() );
+ pEntryLoop->SetUserData( NULL );
+ delete pData;
+ pEntryLoop = static_cast< SvLBoxEntry* >( pList->Next() );
+ }
+ }
+
+ // remove the entry
+ DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() );
+ pDataSourceEntry->SetUserData( NULL );
+ delete pData;
+ m_pTreeModel->Remove( pDataSourceEntry );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ impl_cleanupDataSourceEntry( _Event.Name );
+
+ // maybe the object which is part of the document data source has been removed
+ checkDocumentDataSource();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ // in case the data source was expanded, and connected, we need to clean it up
+ // for simplicity, just do as if the data source were completely removed and re-added
+ impl_cleanupDataSourceEntry( _Event.Name );
+ implAddDatasource( _Event.Name, SharedConnection() );
+}
+
+
// .........................................................................
} // namespace dbaui
// .........................................................................
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 972d6c92c355..735e8264840c 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1375,6 +1375,14 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
ActivateAggregate( tpFormat );
break;
case DataType::BIT:
+ if ( pFieldType->aCreateParams.getLength() )
+ {
+ DeactivateAggregate( tpFormat );
+ DeactivateAggregate( tpTextLen );
+ DeactivateAggregate( tpBoolDefault );
+ break;
+ }
+ // run through
case DataType::BOOLEAN:
DeactivateAggregate( tpTextLen );
DeactivateAggregate( tpFormat );
@@ -1473,7 +1481,9 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if( pBoolDefault )
{
// wenn pRequired auf sal_True gesetzt ist, dann darf das sal_Bool Feld nicht den Eintrag <<keiner>> besitzen
- String sDef = BoolStringUI(::comphelper::getString(pFieldDescr->GetControlDefault()));
+ ::rtl::OUString sValue;
+ pFieldDescr->GetControlDefault() >>= sValue;
+ String sDef = BoolStringUI(sValue);
// sicher stellen das <<keiner>> nur vorhanden ist, wenn das Feld NULL sein darf
if ( ( pFieldType.get() && !pFieldType->bNullable ) || !pFieldDescr->IsNullable() )
@@ -1667,8 +1677,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr )
::rtl::OUString sDefault;
if (pDefault)
{
- if ( pDefault->GetSavedValue() != pDefault->GetText() )
- sDefault = pDefault->GetText();
+ sDefault = pDefault->GetText();
}
else if (pBoolDefault)
{
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 30f67e7fb5b1..8b86519fa812 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -34,93 +34,41 @@
#include "DbAdminImpl.hxx"
#include "dsmeta.hxx"
-#ifndef _SFXPOOLITEM_HXX
-#include <svl/poolitem.hxx>
-#endif
-#ifndef _SFXITEMPOOL_HXX
-#include <svl/itempool.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
-#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
-#include <svl/intitem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
-#include <svl/eitem.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_HXX_
-#include <comphelper/property.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
-#include <comphelper/sequence.hxx>
-#endif
-#ifndef _SVTOOLS_LOGINDLG_HXX_
-#include <svtools/logindlg.hxx>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
-#include <connectivity/dbexception.hxx>
-#endif
-#include <connectivity/DriversConfig.hxx>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
-#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_
-#include <com/sun/star/sdbc/XDriverAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDRIVER_HPP_
-#include <com/sun/star/sdbc/XDriver.hpp>
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
-#include "propertysetitem.hxx"
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
-#include "dsitems.hxx"
-#endif
-#ifndef DBAUI_ITEMSETHELPER_HXX
#include "IItemSetHelper.hxx"
-#endif
-#ifndef _DBU_DLG_HRC_
+#include "UITools.hxx"
#include "dbu_dlg.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _VCL_STDTEXT_HXX
-#include <vcl/stdtext.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
-#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SV_WAITOBJ_HXX
-#include <vcl/waitobj.hxx>
-#endif
-#ifndef _TYPELIB_TYPEDESCRIPTION_HXX_
-#include <typelib/typedescription.hxx>
-#endif
-
-#ifndef _OSL_FILE_HXX_
-#include <osl/file.hxx>
-#endif
-#ifndef _DBAUI_STRINGLISTITEM_HXX_
-#include "stringlistitem.hxx"
-#endif
-#ifndef _DBAUI_MODULE_DBU_HXX_
+#include "dsitems.hxx"
+#include "dsnItem.hxx"
#include "moduledbu.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
-#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
+#include "optionalboolitem.hxx"
+#include "propertysetitem.hxx"
+#include "stringlistitem.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#endif
-#include "dsnItem.hxx"
+#include <com/sun/star/sdb/SQLContext.hpp>
+#include <com/sun/star/sdbc/XDriver.hpp>
+#include <com/sun/star/sdbc/XDriverAccess.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/property.hxx>
+#include <comphelper/sequence.hxx>
+#include <connectivity/DriversConfig.hxx>
+#include <connectivity/dbexception.hxx>
+#include <osl/file.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/itempool.hxx>
+#include <svtools/logindlg.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/stritem.hxx>
+#include <typelib/typedescription.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/stdtext.hxx>
+#include <vcl/waitobj.hxx>
#include <algorithm>
#include <functional>
@@ -231,6 +179,7 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AS_BEFORE_CORRNAME, INFO_AS_BEFORE_CORRELATION_NAME ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CHECK_REQUIRED_FIELDS, INFO_FORMS_CHECK_REQUIRED_FIELDS ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ESCAPE_DATETIME, INFO_ESCAPE_DATETIME ) );
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PRIMARY_KEY_SUPPORT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrimaryKeySupport" ) ) ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PARAMETERNAMESUBST, INFO_PARAMETERNAMESUBST));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNOREDRIVER_PRIV, INFO_IGNOREDRIVER_PRIV));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_BOOLEANCOMPARISON, PROPERTY_BOOLEANCOMPARISONMODE));
@@ -909,14 +858,36 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem*
{
// translate the SfxPoolItem
Any aValue;
- if (_pItem->ISA(SfxStringItem))
- aValue <<= ::rtl::OUString(PTR_CAST(SfxStringItem, _pItem)->GetValue().GetBuffer());
- else if (_pItem->ISA(SfxBoolItem))
- aValue <<= PTR_CAST(SfxBoolItem, _pItem)->GetValue();
- else if (_pItem->ISA(SfxInt32Item))
- aValue <<= PTR_CAST(SfxInt32Item, _pItem)->GetValue();
- else if (_pItem->ISA(OStringListItem))
- aValue <<= PTR_CAST(OStringListItem, _pItem)->getList();
+
+ const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, _pItem );
+ const SfxBoolItem* pBoolItem = PTR_CAST( SfxBoolItem, _pItem );
+ const OptionalBoolItem* pOptBoolItem = PTR_CAST( OptionalBoolItem, _pItem );
+ const SfxInt32Item* pInt32Item = PTR_CAST( SfxInt32Item, _pItem );
+ const OStringListItem* pStringListItem = PTR_CAST( OStringListItem, _pItem );
+
+ if ( pStringItem )
+ {
+ aValue <<= ::rtl::OUString( pStringItem->GetValue().GetBuffer() );
+ }
+ else if ( pBoolItem )
+ {
+ aValue <<= pBoolItem->GetValue();
+ }
+ else if ( pOptBoolItem )
+ {
+ if ( !pOptBoolItem->HasValue() )
+ aValue.clear();
+ else
+ aValue <<= (sal_Bool)pOptBoolItem->GetValue();
+ }
+ else if ( pInt32Item )
+ {
+ aValue <<= pInt32Item->GetValue();
+ }
+ else if ( pStringListItem )
+ {
+ aValue <<= pStringListItem->getList();
+ }
else
{
DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!");
@@ -957,15 +928,14 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X
//-------------------------------------------------------------------------
void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet, sal_Int32 _nId, const Any& _rValue )
{
- USHORT nId = (USHORT)_nId;
- switch (_rValue.getValueType().getTypeClass())
+ switch ( _rValue.getValueType().getTypeClass() )
{
case TypeClass_STRING:
- if ( implCheckItemType( _rSet, nId, SfxStringItem::StaticType() ) )
+ if ( implCheckItemType( _rSet, _nId, SfxStringItem::StaticType() ) )
{
::rtl::OUString sValue;
_rValue >>= sValue;
- _rSet.Put(SfxStringItem(nId, sValue.getStr()));
+ _rSet.Put(SfxStringItem(_nId, sValue.getStr()));
}
else {
DBG_ERROR(
@@ -978,11 +948,24 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
break;
case TypeClass_BOOLEAN:
- if ( implCheckItemType( _rSet, nId, SfxBoolItem::StaticType() ) )
+ if ( implCheckItemType( _rSet, _nId, SfxBoolItem::StaticType() ) )
{
sal_Bool bVal = sal_False;
_rValue >>= bVal;
- _rSet.Put(SfxBoolItem(nId, bVal));
+ _rSet.Put(SfxBoolItem(_nId, bVal));
+ }
+ else if ( implCheckItemType( _rSet, _nId, OptionalBoolItem::StaticType() ) )
+ {
+ OptionalBoolItem aItem( _nId );
+ if ( _rValue.hasValue() )
+ {
+ sal_Bool bValue = sal_False;
+ _rValue >>= bValue;
+ aItem.SetValue( bValue );
+ }
+ else
+ aItem.ClearValue();
+ _rSet.Put( aItem );
}
else {
DBG_ERROR(
@@ -995,11 +978,11 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
break;
case TypeClass_LONG:
- if ( implCheckItemType( _rSet, nId, SfxInt32Item::StaticType() ) )
+ if ( implCheckItemType( _rSet, _nId, SfxInt32Item::StaticType() ) )
{
sal_Int32 nValue = 0;
_rValue >>= nValue;
- _rSet.Put( SfxInt32Item( nId, nValue ) );
+ _rSet.Put( SfxInt32Item( _nId, nValue ) );
}
else {
DBG_ERROR(
@@ -1012,7 +995,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
break;
case TypeClass_SEQUENCE:
- if ( implCheckItemType( _rSet, nId, OStringListItem::StaticType() ) )
+ if ( implCheckItemType( _rSet, _nId, OStringListItem::StaticType() ) )
{
// determine the element type
TypeDescription aTD(_rValue.getValueType());
@@ -1027,7 +1010,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
{
Sequence< ::rtl::OUString > aStringList;
_rValue >>= aStringList;
- _rSet.Put(OStringListItem(nId, aStringList));
+ _rSet.Put(OStringListItem(_nId, aStringList));
}
break;
default:
@@ -1045,7 +1028,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
break;
case TypeClass_VOID:
- _rSet.ClearItem(nId);
+ _rSet.ClearItem(_nId);
break;
default:
diff --git a/dbaccess/source/ui/dlg/DriverSettings.cxx b/dbaccess/source/ui/dlg/DriverSettings.cxx
index cf5d2edd65fc..4977658daeac 100644
--- a/dbaccess/source/ui/dlg/DriverSettings.cxx
+++ b/dbaccess/source/ui/dlg/DriverSettings.cxx
@@ -32,13 +32,13 @@
#include "precompiled_dbaccess.hxx"
#include "DriverSettings.hxx"
-#include "dsitems.hxx"
-#include "datasourceui.hxx"
-#include <connectivity/DriversConfig.hxx>
+#include "dsmeta.hxx"
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <connectivity/DriversConfig.hxx>
+
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::NamedValue;
@@ -47,34 +47,23 @@ void ODriversSettings::getSupportedIndirectSettings( const ::rtl::OUString& _sUR
{
// for a number of settings, we do not need to use hard-coded here, but can ask a
// central DataSourceUI instance.
- // TODO: isn't DataSourceUI obsolete, now that this is in the configuration?
- DataSourceMetaData aMeta(_sURLPrefix);
- DataSourceUI aDSUI( aMeta );
- const USHORT nGenericKnownSettings[] =
+ DataSourceMetaData aMeta( _sURLPrefix );
+ const FeatureSet& rFeatures( aMeta.getFeatureSet() );
+ for ( FeatureSet::const_iterator feature = rFeatures.begin();
+ feature != rFeatures.end();
+ ++feature
+ )
{
- DSID_SQL92CHECK,
- DSID_APPEND_TABLE_ALIAS,
- DSID_AS_BEFORE_CORRNAME,
- DSID_ENABLEOUTERJOIN,
- DSID_IGNOREDRIVER_PRIV,
- DSID_PARAMETERNAMESUBST,
- DSID_SUPPRESSVERSIONCL,
- DSID_CATALOG,
- DSID_SCHEMA,
- DSID_INDEXAPPENDIX,
- DSID_CHECK_REQUIRED_FIELDS,
- DSID_AUTORETRIEVEENABLED,
- DSID_AUTOINCREMENTVALUE,
- DSID_AUTORETRIEVEVALUE,
- DSID_BOOLEANCOMPARISON,
- DSID_ESCAPE_DATETIME,
- 0
- };
- for ( const USHORT* pGenericKnowSetting = nGenericKnownSettings; *pGenericKnowSetting; ++pGenericKnowSetting )
- if ( aDSUI.hasSetting( *pGenericKnowSetting ) )
- _out_rDetailsIds.push_back( *pGenericKnowSetting );
+ _out_rDetailsIds.push_back( *feature );
+ }
// the rest is configuration-based
+ // TODO: that's not really true: *everything* is configuration-based nowadays, even the FeatureSet obtained
+ // from the DataSourceMetaData has been initialized from the configuration. So in fact, we could consolidate
+ // the two blocks.
+ // The best approach would be to extend the FeatureSet to contain *all* known data source features, not only
+ // the ones from the "Advanced settings" UI.
+
::connectivity::DriversConfig aDriverConfig(_xFactory);
const ::comphelper::NamedValueCollection& aProperties = aDriverConfig.getProperties(_sURLPrefix);
#if OSL_DEBUG_LEVEL > 0
@@ -117,7 +106,11 @@ void ODriversSettings::getSupportedIndirectSettings( const ::rtl::OUString& _sUR
,TProperties(0,::rtl::OUString())
};
// TODO: This mapping between IDs and property names already exists - in ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper.
- // We should not duplicate it here.
+ // Another mapping (which is also duplicated in ODbDataSourceAdministrationHelper) exists in dsmeta.cxx. We should
+ // consolidate those three places into one.
+ // However, care has to be taken: We need to distinguish between "features" and "properties" of a data source (resp. driver).
+ // That is, a driver can support a certain property, but not allow to change it in the UI, which means it would
+ // not have the respective "feature".
for ( TProperties* pProps = aProps; pProps->first; ++pProps )
{
if ( aProperties.has(pProps->second) )
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index b55e271a0988..c1b9ddbd33c5 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -31,70 +31,31 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef _DBAUI_ADMINPAGES_HXX_
#include "adminpages.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HRC_
#include "dbadmin.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
+#include "dbadmin.hxx"
#include "dbu_dlg.hrc"
-#endif
-#ifndef _SFXSTRITEM_HXX
-#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
-#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
-#include <svl/intitem.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
-#include "dsitems.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_DBADMIN_HXX_
-#include "dbadmin.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
-#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
-#include "sqlmessage.hxx"
-#endif
-#ifndef _SV_ACCEL_HXX
-#include <vcl/accel.hxx>
-#endif
-#include <algorithm>
-#include <stdlib.h>
-#ifndef _OSL_FILE_HXX_
-#include <osl/file.hxx>
-#endif
-#ifndef _DBAUI_DSSELECT_HXX_
+#include "dsitems.hxx"
#include "dsselect.hxx"
-#endif
-#ifndef _DBAUI_ODBC_CONFIG_HXX_
-#include "odbcconfig.hxx"
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
#include "localresaccess.hxx"
-#endif
-#ifndef _SV_FIELD_HXX
+#include "odbcconfig.hxx"
+#include "optionalboolitem.hxx"
+#include "sqlmessage.hxx"
+
+#include <osl/file.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <vcl/accel.hxx>
+#include <vcl/button.hxx>
+#include <vcl/edit.hxx>
#include <vcl/field.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef _SV_EDIT_HXX
-#include <vcl/edit.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-
+#include <vcl/msgbox.hxx>
+#include <algorithm>
+#include <stdlib.h>
//.........................................................................
namespace dbaui
@@ -256,7 +217,16 @@ namespace dbaui
if ( _bRevertValue )
bValue = !bValue;
- _rSet.Put( SfxBoolItem( _nID, bValue ) );
+ if ( _pCheckBox->IsTriStateEnabled() )
+ {
+ OptionalBoolItem aValue( _nID );
+ if ( _pCheckBox->GetState() != STATE_DONTKNOW )
+ aValue.SetValue( bValue );
+ _rSet.Put( aValue );
+ }
+ else
+ _rSet.Put( SfxBoolItem( _nID, bValue ) );
+
_bChangedSomething = sal_True;
}
}
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 1540b562f9af..1fbe6806df74 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -37,8 +37,7 @@
#include "dsitems.hxx"
#include "DbAdminImpl.hxx"
#include "DriverSettings.hxx"
-#include "datasourceui.hxx"
-
+#include "optionalboolitem.hxx"
#include "dbu_resource.hrc"
#include "dbu_dlg.hrc"
#include "dbadmin.hrc"
@@ -98,15 +97,16 @@ namespace dbaui
,m_pCheckRequiredFields( NULL )
,m_pIgnoreCurrency(NULL)
,m_pEscapeDateTime(NULL)
+ ,m_pPrimaryKeySupport(NULL)
,m_pBooleanComparisonModeLabel( NULL )
,m_pBooleanComparisonMode( NULL )
,m_aControlDependencies()
,m_aBooleanSettings()
- ,m_aSupported( _rDSMeta.getAdvancedSettingsSupport() )
+ ,m_bHasBooleanComparisonMode( _rDSMeta.getFeatureSet().has( DSID_BOOLEANCOMPARISON ) )
{
impl_initBooleanSettings();
- DataSourceUI aDSUI( _rDSMeta );
+ const FeatureSet& rFeatures( _rDSMeta.getFeatureSet() );
// create all the check boxes for the boolean settings
for ( BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin();
setting != m_aBooleanSettings.end();
@@ -114,11 +114,16 @@ namespace dbaui
)
{
USHORT nItemId = setting->nItemId;
- if ( aDSUI.hasSetting( nItemId ) )
+ if ( rFeatures.has( nItemId ) )
{
- USHORT nID = setting->nControlResId;
- (*setting->ppControl) = new CheckBox( this, ModuleRes( nID ) );
+ USHORT nResourceId = setting->nControlResId;
+ (*setting->ppControl) = new CheckBox( this, ModuleRes( nResourceId ) );
(*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
+
+ // check whether this must be a tristate check box
+ const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId );
+ if ( rItem.ISA( OptionalBoolItem ) )
+ (*setting->ppControl)->EnableTriState( TRUE );
}
}
@@ -148,7 +153,7 @@ namespace dbaui
}
// create the controls for the boolean comparison mode
- if ( m_aSupported.bBooleanComparisonMode )
+ if ( m_bHasBooleanComparisonMode )
{
m_pBooleanComparisonModeLabel = new FixedText( this, ModuleRes( FT_BOOLEANCOMPARISON ) );
m_pBooleanComparisonMode = new ListBox( this, ModuleRes( LB_BOOLEANCOMPARISON ) );
@@ -185,6 +190,7 @@ namespace dbaui
DELETEZ( m_pCheckRequiredFields );
DELETEZ( m_pIgnoreCurrency );
DELETEZ( m_pEscapeDateTime );
+ DELETEZ( m_pPrimaryKeySupport );
DELETEZ( m_pBooleanComparisonModeLabel );
DELETEZ( m_pBooleanComparisonMode );
}
@@ -210,13 +216,12 @@ namespace dbaui
{ &m_pCheckRequiredFields, CB_CHECK_REQUIRED, DSID_CHECK_REQUIRED_FIELDS, false },
{ &m_pIgnoreCurrency, CB_IGNORECURRENCY, DSID_IGNORECURRENCY, false },
{ &m_pEscapeDateTime, CB_ESCAPE_DATETIME, DSID_ESCAPE_DATETIME, false },
+ { &m_pPrimaryKeySupport, CB_PRIMARY_KEY_SUPPORT, DSID_PRIMARY_KEY_SUPPORT, false },
{ NULL, 0, 0, false }
};
for ( const BooleanSettingDesc* pCopy = aSettings; pCopy->nItemId != 0; ++pCopy )
{
- USHORT nID = pCopy->nItemId;
- (void) nID;
m_aBooleanSettings.push_back( *pCopy );
}
}
@@ -224,7 +229,7 @@ namespace dbaui
// -----------------------------------------------------------------------
void SpecialSettingsPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
- if ( m_aSupported.bBooleanComparisonMode )
+ if ( m_bHasBooleanComparisonMode )
{
_rControlList.push_back( new ODisableWrapper< FixedText >( m_pBooleanComparisonModeLabel ) );
}
@@ -244,7 +249,7 @@ namespace dbaui
}
}
- if ( m_aSupported.bBooleanComparisonMode )
+ if ( m_bHasBooleanComparisonMode )
_rControlList.push_back( new OSaveValueWrapper< ListBox >( m_pBooleanComparisonMode ) );
}
@@ -270,16 +275,35 @@ namespace dbaui
if ( !*setting->ppControl )
continue;
- SFX_ITEMSET_GET( _rSet, pItem, SfxBoolItem, setting->nItemId, sal_True );
- bool bValue = pItem->GetValue();
- if ( setting->bInvertedDisplay )
- bValue = !bValue;
+ ::boost::optional< bool > aValue;
- (*setting->ppControl)->Check( bValue );
+ SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, sal_True );
+ if ( pItem->ISA( SfxBoolItem ) )
+ {
+ aValue.reset( PTR_CAST( SfxBoolItem, pItem )->GetValue() );
+ }
+ else if ( pItem->ISA( OptionalBoolItem ) )
+ {
+ aValue = PTR_CAST( OptionalBoolItem, pItem )->GetFullValue();
+ }
+ else
+ DBG_ERROR( "SpecialSettingsPage::implInitControls: unknown boolean item type!" );
+
+ if ( !aValue )
+ {
+ (*setting->ppControl)->SetState( STATE_DONTKNOW );
+ }
+ else
+ {
+ BOOL bValue = *aValue;
+ if ( setting->bInvertedDisplay )
+ bValue = !bValue;
+ (*setting->ppControl)->Check( bValue );
+ }
}
// the non-boolean items
- if ( m_aSupported.bBooleanComparisonMode )
+ if ( m_bHasBooleanComparisonMode )
{
SFX_ITEMSET_GET( _rSet, pBooleanComparison, SfxInt32Item, DSID_BOOLEANCOMPARISON, sal_True );
m_pBooleanComparisonMode->SelectEntryPos( static_cast< USHORT >( pBooleanComparison->GetValue() ) );
@@ -305,7 +329,7 @@ namespace dbaui
}
// the non-boolean items
- if ( m_aSupported.bBooleanComparisonMode )
+ if ( m_bHasBooleanComparisonMode )
{
if ( m_pBooleanComparisonMode->GetSelectEntryPos() != m_pBooleanComparisonMode->GetSavedValue() )
{
@@ -420,14 +444,14 @@ namespace dbaui
const ::rtl::OUString eType = m_pImpl->getDatasourceType(*_pItems);
DataSourceMetaData aMeta( eType );
- const AdvancedSettingsSupport& rAdvancedSupport( aMeta.getAdvancedSettingsSupport() );
+ const FeatureSet& rFeatures( aMeta.getFeatureSet() );
// auto-generated values?
- if ( rAdvancedSupport.bGeneratedValues )
+ if ( rFeatures.supportsGeneratedValues() )
AddTabPage( PAGE_GENERATED_VALUES, String( ModuleRes( STR_GENERATED_VALUE ) ), ODriversSettings::CreateGeneratedValuesPage, NULL );
// any "special settings"?
- if ( rAdvancedSupport.supportsAnySpecialSetting() )
+ if ( rFeatures.supportsAnySpecialSetting() )
AddTabPage( PAGE_ADVANCED_SETTINGS_SPECIAL, String( ModuleRes( STR_DS_BEHAVIOUR ) ), ODriversSettings::CreateSpecialSettingsPage, NULL );
// remove the reset button - it's meaning is much too ambiguous in this dialog
@@ -446,8 +470,8 @@ namespace dbaui
bool AdvancedSettingsDialog::doesHaveAnyAdvancedSettings( const ::rtl::OUString& _sURL )
{
DataSourceMetaData aMeta( _sURL );
- const AdvancedSettingsSupport& rSupport( aMeta.getAdvancedSettingsSupport() );
- if ( rSupport.bGeneratedValues || rSupport.supportsAnySpecialSetting() )
+ const FeatureSet& rFeatures( aMeta.getFeatureSet() );
+ if ( rFeatures.supportsGeneratedValues() || rFeatures.supportsAnySpecialSetting() )
return true;
return false;
}
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc
index 9617df464bd3..66dedbb0086c 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hrc
+++ b/dbaccess/source/ui/dlg/advancedsettings.hrc
@@ -31,7 +31,7 @@
#ifndef DBAUI_ADVANCEDSETTINGS_HRC
#define DBAUI_ADVANCEDSETTINGS_HRC
-#define ADVANCED_CHECKBOX_OPTIONS 14
+#define ADVANCED_CHECKBOX_OPTIONS 15
#define ADVANCED_LISTBOX_OPTIONS 1
#define ADVANCED_PAGE_X 200
@@ -40,7 +40,7 @@
/* label */ FIXEDTEXT_HEIGHT + RELATED_CONTROLS + \
/* check boxes */ ( ADVANCED_CHECKBOX_OPTIONS * ( CHECKBOX_HEIGHT + RELATED_CONTROLS ) ) + \
/* list boxes */ ( ADVANCED_LISTBOX_OPTIONS * ( LISTBOX_HEIGHT + RELATED_CONTROLS ) ) + \
- /* bottom space */ START_Y - RELATED_CONTROLS
+ /* bottom space */ START_Y
#define STR_GENERATED_VALUE 1
@@ -64,6 +64,7 @@
#define CB_CHECK_REQUIRED 13
#define CB_IGNORECURRENCY 14
#define CB_ESCAPE_DATETIME 15
+#define CB_PRIMARY_KEY_SUPPORT 16
#define ET_AUTOINCREMENTVALUE 1
#define ET_RETRIEVE_AUTO 2
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index 78a572d7fb0f..8145db32c4e2 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -74,6 +74,7 @@ namespace dbaui
CheckBox* m_pCheckRequiredFields;
CheckBox* m_pIgnoreCurrency;
CheckBox* m_pEscapeDateTime;
+ CheckBox* m_pPrimaryKeySupport;
FixedText* m_pBooleanComparisonModeLabel;
ListBox* m_pBooleanComparisonMode;
@@ -83,8 +84,7 @@ namespace dbaui
BooleanSettingDescs m_aBooleanSettings;
- AdvancedSettingsSupport
- m_aSupported;
+ bool m_bHasBooleanComparisonMode;
public:
virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src
index acb5fbb81656..dc06146402d7 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.src
+++ b/dbaccess/source/ui/dlg/advancedsettings.src
@@ -206,7 +206,18 @@
Size = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ; \
TabStop = TRUE ; \
HelpId = HID_DSADMIN_ESCAPE_DATETIME; \
- Text [ en-US ] = "Use ODBC conformant date/time literals"; \
+ Text [ en-US ] = "Use ODBC conformant date/time literals"; \
+ };
+
+
+#define AUTO_PRIMARY_KEY_SUPPORT(AUTO_Y) \
+ CheckBox CB_PRIMARY_KEY_SUPPORT \
+ { \
+ Pos = MAP_APPFONT ( 6 , AUTO_Y ) ; \
+ Size = MAP_APPFONT ( ADVANCED_PAGE_X - 12 , CHECKBOX_HEIGHT ) ; \
+ TabStop = TRUE ; \
+ HelpId = HID_DSADMIN_PRIMARY_KEY_SUPPORT; \
+ Text [ en-US ] = "Supports primary keys"; \
};
@@ -321,8 +332,9 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL
AUTO_DOSLINEENDS( 11*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 10*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_CHECKREQUIRED( 12*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 11*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_IGNORECURRENCY( 13*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 12*CHECKBOX_HEIGHT + RELATED_CONTROLS )
- AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS )
- AUTO_BOOLEANCOMPARISON( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 13*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
+ AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS )
+ AUTO_PRIMARY_KEY_SUPPORT( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS )
+ AUTO_BOOLEANCOMPARISON( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
};
//-------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/datasourceui.cxx b/dbaccess/source/ui/dlg/datasourceui.cxx
deleted file mode 100644
index f0a56e8dec83..000000000000
--- a/dbaccess/source/ui/dlg/datasourceui.cxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: datasourceui.cxx,v $
- * $Revision: 1.5.68.1 $
- *
- * 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.
- *
- ************************************************************************/
-
-#include "datasourceui.hxx"
-#include "dsmeta.hxx"
-#include "dsitems.hxx"
-
-/** === begin UNO includes === **/
-/** === end UNO includes === **/
-
-//........................................................................
-namespace dbaui
-{
-//........................................................................
-
- /** === begin UNO using === **/
- using ::com::sun::star::uno::Reference;
- using ::com::sun::star::uno::UNO_QUERY;
- using ::com::sun::star::uno::UNO_QUERY_THROW;
- using ::com::sun::star::uno::Exception;
- using ::com::sun::star::uno::RuntimeException;
- /** === end UNO using === **/
-
- //====================================================================
- //= DataSourceUI
- //====================================================================
- //--------------------------------------------------------------------
- DataSourceUI::DataSourceUI( const DataSourceMetaData& _rDSMeta )
- :m_aDSMeta( _rDSMeta )
- {
- }
-
- //--------------------------------------------------------------------
- DataSourceUI::~DataSourceUI()
- {
- }
-
- //--------------------------------------------------------------------
- bool DataSourceUI::hasSetting( const USHORT _nItemId ) const
- {
- const AdvancedSettingsSupport& rAdvancedSupport( m_aDSMeta.getAdvancedSettingsSupport() );
-
- switch ( _nItemId )
- {
- case DSID_SQL92CHECK: return rAdvancedSupport.bUseSQL92NamingConstraints;
- case DSID_APPEND_TABLE_ALIAS: return rAdvancedSupport.bAppendTableAliasInSelect;
- case DSID_AS_BEFORE_CORRNAME: return rAdvancedSupport.bUseKeywordAsBeforeAlias;
- case DSID_ENABLEOUTERJOIN: return rAdvancedSupport.bUseBracketedOuterJoinSyntax;
- case DSID_IGNOREDRIVER_PRIV: return rAdvancedSupport.bIgnoreDriverPrivileges;
- case DSID_PARAMETERNAMESUBST: return rAdvancedSupport.bParameterNameSubstitution;
- case DSID_SUPPRESSVERSIONCL: return rAdvancedSupport.bDisplayVersionColumns;
- case DSID_CATALOG: return rAdvancedSupport.bUseCatalogInSelect;
- case DSID_SCHEMA: return rAdvancedSupport.bUseSchemaInSelect;
- case DSID_INDEXAPPENDIX: return rAdvancedSupport.bUseIndexDirectionKeyword;
- case DSID_DOSLINEENDS: return rAdvancedSupport.bUseDOSLineEnds;
- case DSID_BOOLEANCOMPARISON: return rAdvancedSupport.bBooleanComparisonMode;
- case DSID_CHECK_REQUIRED_FIELDS:return rAdvancedSupport.bFormsCheckRequiredFields;
- case DSID_AUTORETRIEVEENABLED: return rAdvancedSupport.bGeneratedValues;
- case DSID_AUTOINCREMENTVALUE: return rAdvancedSupport.bGeneratedValues;
- case DSID_AUTORETRIEVEVALUE: return rAdvancedSupport.bGeneratedValues;
- case DSID_IGNORECURRENCY: return rAdvancedSupport.bIgnoreCurrency;
- case DSID_ESCAPE_DATETIME: return rAdvancedSupport.bEscapeDateTime;
- }
-
- OSL_ENSURE( false, "DataSourceUI::hasSetting: this item id is currently not supported!" );
- // Support for *all* items is a medium-term goal only.
- return false;
- }
-
-//........................................................................
-} // namespace dbaui
-//........................................................................
diff --git a/dbaccess/source/ui/dlg/datasourceui.hxx b/dbaccess/source/ui/dlg/datasourceui.hxx
deleted file mode 100644
index 4ea63439c0d5..000000000000
--- a/dbaccess/source/ui/dlg/datasourceui.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: datasourceui.hxx,v $
- * $Revision: 1.3.68.1 $
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef DBACCESS_DATASOURCEUI_HXX
-#define DBACCESS_DATASOURCEUI_HXX
-
-#include "dsntypes.hxx"
-#include "dsmeta.hxx"
-
-/** === begin UNO includes === **/
-/** === end UNO includes === **/
-
-#include <boost/shared_ptr.hpp>
-
-//........................................................................
-namespace dbaui
-{
-//........................................................................
-
- //====================================================================
- //= DataSourceUI
- //====================================================================
- /** encapsulates information about available UI features of a data source type
- */
- class DataSourceUI
- {
- public:
- DataSourceUI( const DataSourceMetaData& _rDSMeta );
- ~DataSourceUI();
-
- /** returns whether the data source's UI contains the specified setting
-
- Note that at the moment, not all items are supported by this method. In particular, use
- it for the following only
- <ul><li>All items which refer to advanced settings (see AdvancedSettingsSupport)</li>
- </ul>
-
- A complete support of *all* items is a medium-term goal.
-
- @param _nItemId
- the UI's item ID for the setting in question. See dsitems.hxx.
- */
- bool hasSetting( const USHORT _nItemId ) const;
-
- private:
- DataSourceMetaData m_aDSMeta;
- };
-
-//........................................................................
-} // namespace dbaui
-//........................................................................
-
-#endif // DBACCESS_DATASOURCEUI_HXX
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 048635edd07f..286236be75c6 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -31,58 +31,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#include "dsnItem.hxx"
-#ifndef _DBAUI_DBADMIN_HXX_
-#include "dbadmin.hxx"
-#endif
-#ifndef _DBAUI_DBADMIN_HRC_
+#include "ConnectionPage.hxx"
+#include "DbAdminImpl.hxx"
+#include "DriverSettings.hxx"
+#include "adminpages.hxx"
#include "dbadmin.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
+#include "dbadmin.hxx"
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
-#include "dsitems.hxx"
-#endif
-#ifndef _SFXSTRITEM_HXX
-#include <svl/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
-#include <svl/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
-#include <svl/intitem.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
-#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
-#include "adminpages.hxx"
-#endif
-#ifndef _DBAUI_LOCALRESACCESS_HXX_
+#include "dsitems.hxx"
+#include "dsnItem.hxx"
#include "localresaccess.hxx"
-#endif
-#ifndef _DBAUI_STRINGLISTITEM_HXX_
-#include "stringlistitem.hxx"
-#endif
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
+#include "optionalboolitem.hxx"
#include "propertysetitem.hxx"
-#endif
-#ifndef _UNOTOOLS_CONFIGNODE_HXX_
+#include "stringlistitem.hxx"
+
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
#include <unotools/confignode.hxx>
-#endif
-#ifndef DBAUI_CONNECTIONPAGE_HXX
-#include "ConnectionPage.hxx"
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
-#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_DBADMINIMPL_HXX_
-#include "DbAdminImpl.hxx"
-#endif
+#include <vcl/msgbox.hxx>
//.........................................................................
namespace dbaui
@@ -439,8 +407,9 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
*pCounter++ = new SfxBoolItem(DSID_CHECK_REQUIRED_FIELDS, sal_True);
*pCounter++ = new SfxBoolItem(DSID_IGNORECURRENCY, sal_False);
*pCounter++ = new SfxStringItem(DSID_CONN_SOCKET, String());
- *pCounter++ = new SfxBoolItem(DSID_ESCAPE_DATETIME, sal_True); // must be the same as in ModelImpl.cxx
+ *pCounter++ = new SfxBoolItem(DSID_ESCAPE_DATETIME, sal_True);
*pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, String());
+ *pCounter++ = new OptionalBoolItem( DSID_PRIMARY_KEY_SUPPORT );
// create the pool
static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] =
@@ -500,7 +469,8 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
{0,0},
{0,0},
{0,0},
- {0,0}, /* for Escape DateTime*/
+ {0,0},
+ {0,0},
{0,0},
{0,0}
};
diff --git a/dbaccess/source/ui/dlg/makefile.mk b/dbaccess/source/ui/dlg/makefile.mk
index ca2098778f06..2ec59f3d7840 100644
--- a/dbaccess/source/ui/dlg/makefile.mk
+++ b/dbaccess/source/ui/dlg/makefile.mk
@@ -124,13 +124,13 @@ EXCEPTIONSFILES= \
$(SLO)$/DriverSettings.obj \
$(SLO)$/odbcconfig.obj \
$(SLO)$/advancedsettings.obj \
- $(SLO)$/datasourceui.obj \
$(SLO)$/textconnectionsettings.obj
SLOFILES= \
$(EXCEPTIONSFILES) \
$(SLO)$/dlgsize.obj \
- $(SLO)$/dlgattr.obj
+ $(SLO)$/dlgattr.obj \
+ $(SLO)$/optionalboolitem.obj
.IF "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"==""
DISABLE_ADO=TRUE
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx
new file mode 100644
index 000000000000..9964e393061c
--- /dev/null
+++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"
+
+#include "optionalboolitem.hxx"
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= OptionalBoolItem
+ //====================================================================
+ TYPEINIT1( OptionalBoolItem, SfxPoolItem );
+ //--------------------------------------------------------------------
+ OptionalBoolItem::OptionalBoolItem( sal_Int16 _nWhich )
+ :SfxPoolItem( _nWhich )
+ ,m_aValue()
+ {
+ }
+
+ //--------------------------------------------------------------------
+ OptionalBoolItem::OptionalBoolItem( const OptionalBoolItem& _rSource )
+ :SfxPoolItem( _rSource )
+ ,m_aValue( _rSource.m_aValue )
+ {
+ }
+
+ //--------------------------------------------------------------------
+ int OptionalBoolItem::operator==( const SfxPoolItem& _rItem ) const
+ {
+ const OptionalBoolItem* pCompare = PTR_CAST( OptionalBoolItem, &_rItem );
+ if ( !pCompare )
+ return 0;
+
+ if ( m_aValue == pCompare->m_aValue )
+ return 1;
+
+ return 0;
+ }
+
+ //--------------------------------------------------------------------
+ SfxPoolItem* OptionalBoolItem::Clone( SfxItemPool* /*_pPool*/ ) const
+ {
+ return new OptionalBoolItem( *this );
+ }
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx
new file mode 100644
index 000000000000..4bc2054630eb
--- /dev/null
+++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef DBACCESS_OPTIONALBOOLITEM_HXX
+#define DBACCESS_OPTIONALBOOLITEM_HXX
+
+#include <svl/poolitem.hxx>
+
+#include <boost/optional.hpp>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= OptionalBoolItem
+ //====================================================================
+ class OptionalBoolItem : public SfxPoolItem
+ {
+ ::boost::optional< bool > m_aValue;
+
+ public:
+ TYPEINFO();
+ OptionalBoolItem( sal_Int16 nWhich );
+ OptionalBoolItem( const OptionalBoolItem& _rSource );
+
+ virtual int operator==( const SfxPoolItem& _rItem ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* _pPool = NULL ) const;
+
+ bool HasValue() const { return !!m_aValue; }
+ void ClearValue() { m_aValue.reset(); }
+ bool GetValue() const { return *m_aValue; }
+ void SetValue( const bool _bValue ) { m_aValue.reset( _bValue ); }
+
+ const ::boost::optional< bool >&
+ GetFullValue() const { return m_aValue; }
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_OPTIONALBOOLITEM_HXX
diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx
index b44daeba3beb..ee5a5235da68 100644
--- a/dbaccess/source/ui/inc/TypeInfo.hxx
+++ b/dbaccess/source/ui/inc/TypeInfo.hxx
@@ -83,6 +83,7 @@ const sal_uInt16 TYPE_BLOB = 27;
const sal_uInt16 TYPE_CLOB = 28;
const sal_uInt16 TYPE_REF = 29;
const sal_uInt16 TYPE_OTHER = 30;
+const sal_uInt16 TYPE_BIT = 31;
class OTypeInfo
{
diff --git a/dbaccess/source/ui/dlg/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx
index a0d95aca810b..20a6f4d83a8e 100644
--- a/dbaccess/source/ui/dlg/dsitems.hxx
+++ b/dbaccess/source/ui/inc/dsitems.hxx
@@ -31,6 +31,8 @@
#ifndef _DBAUI_DATASOURCEITEMS_HXX_
#define _DBAUI_DATASOURCEITEMS_HXX_
+typedef sal_Int32 ItemID;
+
//========================================================================
//= item ids for the data source administration dialog
@@ -92,6 +94,7 @@
#define DSID_CONN_SOCKET 56
#define DSID_ESCAPE_DATETIME 57
#define DSID_NAMED_PIPE 58
+#define DSID_PRIMARY_KEY_SUPPORT 59
// don't forget to adjust DSID_LAST_ITEM_ID below!
@@ -99,7 +102,7 @@
//= item range. Adjust this if you introduce new items above
#define DSID_FIRST_ITEM_ID DSID_NAME
-#define DSID_LAST_ITEM_ID DSID_NAMED_PIPE
+#define DSID_LAST_ITEM_ID DSID_PRIMARY_KEY_SUPPORT
#endif // _DBAUI_DATASOURCEITEMS_HXX_
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
index 5372c201e0c8..78ba0db1272e 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -32,6 +32,7 @@
#define DBACCESS_DSMETA_HXX
#include "dsntypes.hxx"
+#include "dsitems.hxx"
/** === begin UNO includes === **/
/** === end UNO includes === **/
@@ -56,7 +57,7 @@ namespace dbaui
//====================================================================
//= DataSourceMetaData
//====================================================================
- struct AdvancedSettingsSupport;
+ class FeatureSet;
class DataSourceMetaData_Impl;
/** encapsulates meta data for a data source
@@ -74,7 +75,7 @@ namespace dbaui
~DataSourceMetaData();
/// returns a struct describing this data source type's support for our known advanced settings
- const AdvancedSettingsSupport& getAdvancedSettingsSupport() const;
+ const FeatureSet& getFeatureSet() const;
/// determines whether or not the data source requires authentication
static AuthenticationMode getAuthentication( const ::rtl::OUString& _sURL );
@@ -84,77 +85,56 @@ namespace dbaui
};
//====================================================================
- //= AdvancedSettingsSupport
+ //= FeatureSet
//====================================================================
- /// struct taking flags for the supported advanced settings
- struct AdvancedSettingsSupport
+ /** can be used to ask for (UI) support for certain advanced features
+ */
+ class FeatureSet
{
- // auto-generated values
- bool bGeneratedValues;
- // various settings as found on the "Special Settings" page in the UI
- bool bUseSQL92NamingConstraints;
- bool bAppendTableAliasInSelect;
- bool bUseKeywordAsBeforeAlias;
- bool bUseBracketedOuterJoinSyntax;
- bool bIgnoreDriverPrivileges;
- bool bParameterNameSubstitution;
- bool bDisplayVersionColumns;
- bool bUseCatalogInSelect;
- bool bUseSchemaInSelect;
- bool bUseIndexDirectionKeyword;
- bool bUseDOSLineEnds;
- bool bBooleanComparisonMode;
- bool bFormsCheckRequiredFields;
- bool bIgnoreCurrency;
- bool bEscapeDateTime;
-
- // Note: If you extend this list, you need to adjust the ctor (of course)
- // and (maybe) the implementation of supportsAnySpecialSetting
-
- AdvancedSettingsSupport()
- :bGeneratedValues ( true )
- ,bUseSQL92NamingConstraints ( true )
- ,bAppendTableAliasInSelect ( true )
- ,bUseKeywordAsBeforeAlias ( true )
- ,bUseBracketedOuterJoinSyntax ( true )
- ,bIgnoreDriverPrivileges ( true )
- ,bParameterNameSubstitution ( true )
- ,bDisplayVersionColumns ( true )
- ,bUseCatalogInSelect ( true )
- ,bUseSchemaInSelect ( true )
- ,bUseIndexDirectionKeyword ( true )
- ,bUseDOSLineEnds ( true )
- ,bBooleanComparisonMode ( true )
- ,bFormsCheckRequiredFields ( true )
- ,bIgnoreCurrency ( false )
- ,bEscapeDateTime ( false )
- {
- }
-
- /** determines whether there is support for any of the settings found on the "Special Settings"
- UI
- */
- inline bool supportsAnySpecialSetting() const;
+ public:
+ typedef ::std::set< ItemID >::const_iterator const_iterator;
+
+ public:
+ inline FeatureSet() { }
+
+ inline void put( const ItemID _id ) { m_aContent.insert( _id ); }
+ inline bool has( const ItemID _id ) const { return m_aContent.find( _id ) != m_aContent.end(); }
+
+ inline bool supportsAnySpecialSetting() const;
+ inline bool supportsGeneratedValues() const;
+
+ inline const_iterator begin() const { return m_aContent.begin(); }
+ inline const_iterator end() const { return m_aContent.end(); }
+
+ private:
+ ::std::set< ItemID > m_aContent;
};
//--------------------------------------------------------------------
- inline bool AdvancedSettingsSupport::supportsAnySpecialSetting() const
+ inline bool FeatureSet::supportsGeneratedValues() const
+ {
+ return has( DSID_AUTORETRIEVEENABLED );
+ }
+
+ //--------------------------------------------------------------------
+ inline bool FeatureSet::supportsAnySpecialSetting() const
{
- return ( bUseSQL92NamingConstraints == true )
- || ( bAppendTableAliasInSelect == true )
- || ( bUseKeywordAsBeforeAlias == true )
- || ( bUseBracketedOuterJoinSyntax == true )
- || ( bIgnoreDriverPrivileges == true )
- || ( bParameterNameSubstitution == true )
- || ( bDisplayVersionColumns == true )
- || ( bUseCatalogInSelect == true )
- || ( bUseSchemaInSelect == true )
- || ( bUseIndexDirectionKeyword == true )
- || ( bUseDOSLineEnds == true )
- || ( bBooleanComparisonMode == true )
- || ( bFormsCheckRequiredFields == true )
- || ( bIgnoreCurrency == true )
- || ( bEscapeDateTime == true )
+ return has( DSID_SQL92CHECK )
+ || has( DSID_APPEND_TABLE_ALIAS )
+ || has( DSID_AS_BEFORE_CORRNAME )
+ || has( DSID_ENABLEOUTERJOIN )
+ || has( DSID_IGNOREDRIVER_PRIV )
+ || has( DSID_PARAMETERNAMESUBST )
+ || has( DSID_SUPPRESSVERSIONCL )
+ || has( DSID_CATALOG )
+ || has( DSID_SCHEMA )
+ || has( DSID_INDEXAPPENDIX )
+ || has( DSID_DOSLINEENDS )
+ || has( DSID_BOOLEANCOMPARISON )
+ || has( DSID_CHECK_REQUIRED_FIELDS )
+ || has( DSID_IGNORECURRENCY )
+ || has( DSID_ESCAPE_DATETIME )
+ || has( DSID_PRIMARY_KEY_SUPPORT )
;
}
diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx
index f8c8dc54688b..d4783560732a 100644
--- a/dbaccess/source/ui/inc/exsrcbrw.hxx
+++ b/dbaccess/source/ui/inc/exsrcbrw.hxx
@@ -31,18 +31,11 @@
#ifndef _SBA_EXTCTRLR_HXX
#define _SBA_EXTCTRLR_HXX
-#ifndef _SBA_BWRCTRLR_HXX
#include "brwctrlr.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
-#include <com/sun/star/form/XFormController.hpp>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
+
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
+
//==============================================================================
//= SbaExternalSourceBrowser
//==============================================================================
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index c6315cc1db22..23d9cfd5b542 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -70,8 +70,11 @@
#ifndef _COM_SUN_STAR_SDB_APPLICATION_DATABASEOBJECTCONTAINER_HPP_
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
#endif
-#ifndef _CPPUHELPER_IMPLBASE4_HXX_
-#include <cppuhelper/implbase4.hxx>
+#ifndef _COM_SUN_STAR_SDB_DATABASEOBJECTCONTAINER_HPP_
+#include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE5_HXX_
+#include <cppuhelper/implbase5.hxx>
#endif
#ifndef _DBACCESS_UI_CALLBACKS_HXX_
#include "callbacks.hxx"
@@ -113,10 +116,11 @@ namespace dbaui
class ImageProvider;
// =====================================================================
- typedef ::cppu::ImplHelper4 < ::com::sun::star::frame::XStatusListener
+ typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XStatusListener
, ::com::sun::star::view::XSelectionSupplier
, ::com::sun::star::document::XScriptInvocationContext
, ::com::sun::star::ui::XContextMenuInterception
+ , ::com::sun::star::sdb::XDatabaseRegistrationsListener
> SbaTableQueryBrowser_Base;
class SbaTableQueryBrowser
:public SbaXDataBrowserController
@@ -256,6 +260,11 @@ namespace dbaui
virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
+ // XDatabaseRegistrationsListener
+ virtual void SAL_CALL registeredDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL revokedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
// SbaXDataBrowserController overridables
virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
@@ -339,6 +348,11 @@ namespace dbaui
const SharedConnection& _rxConnection
);
+ void implAddDatasource( const String& _rDataSourceName, const SharedConnection& _rxConnection );
+
+ /// removes (and cleans up) the entry for the given data source
+ void impl_cleanupDataSourceEntry( const String& _rDataSourceName );
+
/// clears the tree list box
void clearTreeModel();
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 53b1105c6aba..2c679ba22da8 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -237,6 +237,12 @@ sal_Bool ORowSetImportExport::insertNewRow()
case DataType::VARBINARY:
aValue <<= m_xRow->getBytes(*aIter);
break;
+ case DataType::BLOB:
+ aValue <<= m_xRow->getBlob(*aIter);
+ break;
+ case DataType::CLOB:
+ aValue <<= m_xRow->getClob(*aIter);
+ break;
default:
OSL_ENSURE(0,"Unknown type");
}
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 55691d4164ff..8d7e24e2792c 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -803,6 +803,12 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo
aName = _rsTypeNames.GetToken(TYPE_DATETIME);
break;
case DataType::BIT:
+ if ( pInfo->aCreateParams.getLength() )
+ {
+ aName = _rsTypeNames.GetToken(TYPE_BIT);
+ break;
+ }
+ // run through
case DataType::BOOLEAN:
aName = _rsTypeNames.GetToken(TYPE_BOOL);
break;
@@ -1155,7 +1161,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent,
if (_bHasFormat)
{
// if the col is bound to a text field we have to disallow all non-text formats
- if ((DataType::CHAR == _nDataType) || (DataType::VARCHAR == _nDataType) || (DataType::LONGVARCHAR == _nDataType))
+ if ((DataType::CHAR == _nDataType) || (DataType::VARCHAR == _nDataType) || (DataType::LONGVARCHAR == _nDataType) || (DataType::CLOB == _nDataType))
{
bText = sal_True;
pFormatDescriptor->Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, sal_True));
@@ -1622,6 +1628,10 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
if ( pTypeInfo = queryTypeInfoByType(DataType::LONGVARCHAR,_rTypeInfo) )
break;
break;
+ case DataType::LONGVARCHAR:
+ if ( pTypeInfo = queryTypeInfoByType(DataType::CLOB,_rTypeInfo) )
+ break;
+ break;
default:
;
} // switch(_nDataType)
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 1feb51cf49a9..2b664c02f7e2 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -63,6 +63,7 @@
#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
+#include <connectivity/dbmetadata.hxx>
#include <rtl/logfile.hxx>
#include <rtl/ustrbuf.hxx>
@@ -632,6 +633,22 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const ::rtl::OUString& _rD
if ( !lcl_sameConnection_throw( _xSourceConnection, m_xDestConnection ) )
bAllowViews = false;
+ if ( m_bInterConnectionCopy )
+ {
+ Reference< XDatabaseMetaData > xSrcMeta = _xSourceConnection->getMetaData();
+ ::rtl::OUString sCatalog;
+ ::rtl::OUString sSchema;
+ ::rtl::OUString sTable;
+ ::dbtools::qualifiedNameComponents( xSrcMeta,
+ m_sName,
+ sCatalog,
+ sSchema,
+ sTable,
+ ::dbtools::eInDataManipulation);
+
+ m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,sal_False,::dbtools::eInTableDefinitions);
+ }
+
OCopyTable* pPage1( new OCopyTable( this ) );
pPage1->disallowUseHeaderLine();
if ( !bAllowViews )
@@ -1381,23 +1398,12 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
// -----------------------------------------------------------------------------
bool OCopyTableWizard::supportsPrimaryKey( const Reference< XConnection >& _rxConnection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OCopyTableWizard::supportsPrimaryKey" );
OSL_PRECOND( _rxConnection.is(), "OCopyTableWizard::supportsPrimaryKey: invalid connection!" );
+ if ( !_rxConnection.is() )
+ return false;
- bool bSupports( false );
- if ( _rxConnection.is() )
- {
- try
- {
- Reference< XDatabaseMetaData > xMetaData( _rxConnection->getMetaData(), UNO_QUERY_THROW );
- bSupports = xMetaData->supportsCoreSQLGrammar();
- }
- catch(const Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
- return bSupports;
+ ::dbtools::DatabaseMetaData aMetaData( _rxConnection );
+ return aMetaData.supportsPrimaryKeys();
}
// -----------------------------------------------------------------------------
@@ -1591,6 +1597,10 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool&
if ( supportsType(DataType::LONGVARCHAR,nDefaultType) )
break;
break;
+ case DataType::LONGVARCHAR:
+ if ( supportsType(DataType::CLOB,nDefaultType) )
+ break;
+ break;
default:
nDefaultType = DataType::VARCHAR;
}
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index b152f12688e2..7d299c7f5910 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -47,32 +47,6 @@ namespace dbaui
using namespace ::com::sun::star;
/** === end UNO using === **/
- struct InitAdvanced : public AdvancedSettingsSupport
- {
- enum Special { All, AllButIgnoreCurrency, None };
-
- InitAdvanced( Special _eType )
- :AdvancedSettingsSupport()
- {
- bGeneratedValues = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseSQL92NamingConstraints = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bAppendTableAliasInSelect = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseKeywordAsBeforeAlias = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseBracketedOuterJoinSyntax = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bIgnoreDriverPrivileges = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bParameterNameSubstitution = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bDisplayVersionColumns = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseCatalogInSelect = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseSchemaInSelect = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseIndexDirectionKeyword = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bUseDOSLineEnds = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bBooleanComparisonMode = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bFormsCheckRequiredFields = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- bIgnoreCurrency = ( _eType == All );
- bEscapeDateTime = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
- }
- };
-
struct FeatureSupport
{
// authentication mode of the data source
@@ -89,98 +63,75 @@ namespace dbaui
}
};
+ struct FeatureMapping
+ {
+ /// one of the items from dsitems.hxx
+ ItemID nItemID;
+ const sal_Char* pAsciiFeatureName;
+ };
+
//====================================================================
//= global tables
//====================================================================
//--------------------------------------------------------------------
- static const AdvancedSettingsSupport& getAdvancedSettingsSupport( const ::rtl::OUString& _sURL )
+ static const FeatureMapping* lcl_getFeatureMappings()
{
- DECLARE_STL_USTRINGACCESS_MAP( AdvancedSettingsSupport, AdvancedSupport);
- static AdvancedSupport s_aSupport;
- if ( s_aSupport.empty() )
+ static const FeatureMapping s_aMappings[] = {
+ { DSID_AUTORETRIEVEENABLED, "GeneratedValues" },
+ { DSID_AUTOINCREMENTVALUE, "GeneratedValues" },
+ { DSID_AUTORETRIEVEVALUE, "GeneratedValues" },
+ { DSID_SQL92CHECK, "UseSQL92NamingConstraints" },
+ { DSID_APPEND_TABLE_ALIAS, "AppendTableAliasInSelect" },
+ { DSID_AS_BEFORE_CORRNAME, "UseKeywordAsBeforeAlias" },
+ { DSID_ENABLEOUTERJOIN, "UseBracketedOuterJoinSyntax" },
+ { DSID_IGNOREDRIVER_PRIV, "IgnoreDriverPrivileges" },
+ { DSID_PARAMETERNAMESUBST, "ParameterNameSubstitution" },
+ { DSID_SUPPRESSVERSIONCL, "DisplayVersionColumns" },
+ { DSID_CATALOG, "UseCatalogInSelect" },
+ { DSID_SCHEMA, "UseSchemaInSelect" },
+ { DSID_INDEXAPPENDIX, "UseIndexDirectionKeyword" },
+ { DSID_DOSLINEENDS, "UseDOSLineEnds" },
+ { DSID_BOOLEANCOMPARISON, "BooleanComparisonMode" },
+ { DSID_CHECK_REQUIRED_FIELDS, "FormsCheckRequiredFields" },
+ { DSID_IGNORECURRENCY, "IgnoreCurrency" },
+ { DSID_ESCAPE_DATETIME, "EscapeDateTime" },
+ { DSID_PRIMARY_KEY_SUPPORT, "PrimaryKeySupport" },
+ { 0, NULL }
+ };
+ return s_aMappings;
+ }
+
+ //--------------------------------------------------------------------
+ static const FeatureSet& lcl_getFeatureSet( const ::rtl::OUString _rURL )
+ {
+ typedef ::std::map< ::rtl::OUString, FeatureSet, ::comphelper::UStringLess > FeatureSets;
+ static FeatureSets s_aFeatureSets;
+ if ( s_aFeatureSets.empty() )
{
- ::connectivity::DriversConfig aDriverConfig(::comphelper::getProcessServiceFactory());
- const uno::Sequence< ::rtl::OUString > aURLs = aDriverConfig.getURLs();
- const ::rtl::OUString* pIter = aURLs.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aURLs.getLength();
- for(;pIter != pEnd;++pIter)
+ ::connectivity::DriversConfig aDriverConfig( ::comphelper::getProcessServiceFactory() );
+ const uno::Sequence< ::rtl::OUString > aPatterns = aDriverConfig.getURLs();
+ for ( const ::rtl::OUString* pattern = aPatterns.getConstArray();
+ pattern != aPatterns.getConstArray() + aPatterns.getLength();
+ ++pattern
+ )
{
- InitAdvanced aInit(InitAdvanced::None);
- const uno::Sequence< beans::NamedValue> aProperties = aDriverConfig.getFeatures(*pIter).getNamedValues();
- const beans::NamedValue* pPropertiesIter = aProperties.getConstArray();
- const beans::NamedValue* pPropertiesEnd = pPropertiesIter + aProperties.getLength();
- for (;pPropertiesIter != pPropertiesEnd ; ++pPropertiesIter)
+ FeatureSet aCurrentSet;
+ const ::comphelper::NamedValueCollection aCurrentFeatures( aDriverConfig.getFeatures( *pattern ).getNamedValues() );
+
+ const FeatureMapping* pFeatureMapping = lcl_getFeatureMappings();
+ while ( pFeatureMapping->pAsciiFeatureName )
{
- if ( pPropertiesIter->Name.equalsAscii("GeneratedValues") )
- {
- pPropertiesIter->Value >>= aInit.bGeneratedValues;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseSQL92NamingConstraints") )
- {
- pPropertiesIter->Value >>= aInit.bUseSQL92NamingConstraints;
- }
- else if ( pPropertiesIter->Name.equalsAscii("AppendTableAliasInSelect") )
- {
- pPropertiesIter->Value >>= aInit.bAppendTableAliasInSelect;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseKeywordAsBeforeAlias") )
- {
- pPropertiesIter->Value >>= aInit.bUseKeywordAsBeforeAlias;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseBracketedOuterJoinSyntax") )
- {
- pPropertiesIter->Value >>= aInit.bUseBracketedOuterJoinSyntax;
- }
- else if ( pPropertiesIter->Name.equalsAscii("IgnoreDriverPrivileges") )
- {
- pPropertiesIter->Value >>= aInit.bIgnoreDriverPrivileges;
- }
- else if ( pPropertiesIter->Name.equalsAscii("ParameterNameSubstitution") )
- {
- pPropertiesIter->Value >>= aInit.bParameterNameSubstitution;
- }
- else if ( pPropertiesIter->Name.equalsAscii("DisplayVersionColumns") )
- {
- pPropertiesIter->Value >>= aInit.bDisplayVersionColumns;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseCatalogInSelect") )
- {
- pPropertiesIter->Value >>= aInit.bUseCatalogInSelect;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseSchemaInSelect") )
- {
- pPropertiesIter->Value >>= aInit.bUseSchemaInSelect;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseIndexDirectionKeyword") )
- {
- pPropertiesIter->Value >>= aInit.bUseIndexDirectionKeyword;
- }
- else if ( pPropertiesIter->Name.equalsAscii("UseDOSLineEnds") )
- {
- pPropertiesIter->Value >>= aInit.bUseDOSLineEnds;
- }
- else if ( pPropertiesIter->Name.equalsAscii("BooleanComparisonMode") )
- {
- pPropertiesIter->Value >>= aInit.bBooleanComparisonMode;
- }
- else if ( pPropertiesIter->Name.equalsAscii("FormsCheckRequiredFields") )
- {
- pPropertiesIter->Value >>= aInit.bFormsCheckRequiredFields;
- }
- else if ( pPropertiesIter->Name.equalsAscii("IgnoreCurrency") )
- {
- pPropertiesIter->Value >>= aInit.bIgnoreCurrency;
- }
- else if ( pPropertiesIter->Name.equalsAscii("EscapeDateTime") )
- {
- pPropertiesIter->Value >>= aInit.bEscapeDateTime;
- }
- } // for (;pPropertiesIter != pPropertiesEnd ; ++pPropertiesIter)
- s_aSupport.insert(AdvancedSupport::value_type(*pIter,aInit));
+ if ( aCurrentFeatures.has( pFeatureMapping->pAsciiFeatureName ) )
+ aCurrentSet.put( pFeatureMapping->nItemID );
+ ++pFeatureMapping;
+ }
+
+ s_aFeatureSets[ *pattern ] = aCurrentSet;
}
- } // if ( s_aSupport.empty() )
- OSL_ENSURE(s_aSupport.find(_sURL) != s_aSupport.end(),"Illegal URL!");
- return s_aSupport[ _sURL ];
+ }
+
+ OSL_ENSURE( s_aFeatureSets.find( _rURL ) != s_aFeatureSets.end(), "invalid URL/pattern!" );
+ return s_aFeatureSets[ _rURL ];
}
//--------------------------------------------------------------------
@@ -208,8 +159,8 @@ namespace dbaui
aInit = AuthPwd;
}
s_aSupport.insert(Supported::value_type(*pIter,aInit));
- } // for(;pIter != pEnd;++pIter)
- } // if ( s_aSupport.empty() )
+ }
+ }
OSL_ENSURE(s_aSupport.find(_sURL) != s_aSupport.end(),"Illegal URL!");
return s_aSupport[ _sURL ].eAuthentication;
}
@@ -249,9 +200,9 @@ namespace dbaui
}
//--------------------------------------------------------------------
- const AdvancedSettingsSupport& DataSourceMetaData::getAdvancedSettingsSupport() const
+ const FeatureSet& DataSourceMetaData::getFeatureSet() const
{
- return ::dbaui::getAdvancedSettingsSupport( m_pImpl->getType() );
+ return lcl_getFeatureSet( m_pImpl->getType() );
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index a7be84b5e497..13549b72d84c 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -350,7 +350,7 @@ namespace dbaui
//------------------------------------------------------------------
Reference< XComponent > OLinkedDocumentsAccess::newDocument( sal_Int32 _nNewFormId, Reference< XComponent >& _xDefinition, const sal_Int32 _nCommandType, const ::rtl::OUString& _sObjectName )
{
- OSL_ENSURE(m_xDocumentContainer.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid document container!");
+ OSL_ENSURE(m_xDocumentContainer.is(), "OLinkedDocumentsAccess::newDocument: invalid document container!");
// determine the URL to use for the new document
Sequence<sal_Int8> aClassId;
switch (_nNewFormId)
@@ -373,7 +373,7 @@ namespace dbaui
case SID_DB_FORM_NEW_PILOT:
default:
- OSL_ENSURE(sal_False, "OLinkedDocumentsAccess::newForm: pleas use newFormWithPilot!");
+ OSL_ENSURE(sal_False, "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!");
return Reference< XComponent >();
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 05c001751fef..27ad175c071c 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1207,6 +1207,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
if(aText.GetChar(0) != '\'' || aText.GetChar(aText.Len() -1) != '\'')
{
aText.SearchAndReplaceAll(String::CreateFromAscii("'"),String::CreateFromAscii("''"));
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 2f3a70890e92..785e29bb9a0c 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -229,16 +229,17 @@ namespace dbaui
Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")),UNO_QUERY );
m_xBeamer.set( xBeamerFrame );
+ OSL_ENSURE(m_xBeamer.is(),"No frame created!");
+ m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) );
// notify layout manager to not create internal toolbars
Reference < XPropertySet > xPropSet( xBeamerFrame, UNO_QUERY );
try
{
const ::rtl::OUString aLayoutManager( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ));
- Reference < XPropertySet > xLMPropSet;
+ Reference < XPropertySet > xLMPropSet(xPropSet->getPropertyValue( aLayoutManager ),UNO_QUERY);
- Any a = xPropSet->getPropertyValue( aLayoutManager );
- if ( a >>= xLMPropSet )
+ if ( xLMPropSet.is() )
{
const ::rtl::OUString aAutomaticToolbars( RTL_CONSTASCII_USTRINGPARAM( "AutomaticToolbars" ));
xLMPropSet->setPropertyValue( aAutomaticToolbars, Any( sal_False ));
@@ -248,8 +249,6 @@ namespace dbaui
{
}
- OSL_ENSURE(m_xBeamer.is(),"No frame created!");
- m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) );
m_xBeamer->setName(FRAME_NAME_QUERY_PREVIEW);
// append our frame
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 699a2db8404b..6e90ebed7e88 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -239,8 +239,19 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF
if ( bForce )
{
sal_Int32 nPrec = DEFAULT_OTHER_PRECSION;
- if ( GetPrecision() )
- nPrec = GetPrecision();
+ switch ( _pType->nType )
+ {
+ case DataType::BIT:
+ case DataType::BLOB:
+ case DataType::CLOB:
+ nPrec = _pType->nPrecision;
+ break;
+ default:
+ if ( GetPrecision() )
+ nPrec = GetPrecision();
+ break;
+ }
+
if ( _pType->nPrecision )
SetPrecision(::std::min<sal_Int32>(nPrec ? nPrec : DEFAULT_NUMERIC_PRECSION,_pType->nPrecision));
if ( _pType->nMaximumScale )
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 9694d285c511..347a19ca60ad 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1534,19 +1534,8 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ )
return sal_False;
OTableController& rController = GetView()->getController();
- try
- {
- Reference<XConnection> xCon = rController.getConnection();
-
- Reference< XDatabaseMetaData> xMetaData = xCon.is() ? xCon->getMetaData() : Reference< XDatabaseMetaData>();
- if(!xMetaData.is() || !xMetaData->supportsCoreSQLGrammar())
- return sal_False; // no primary keys allowed
-
- }
- catch(SQLException&)
- {
- OSL_ASSERT(!"supportsCoreSQLGrammar");
- }
+ if ( !rController.getSdbMetaData().supportsPrimaryKeys() )
+ return sal_False;
Reference<XPropertySet> xTable = rController.getTable();
//////////////////////////////////////////////////////////////
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index c447c002a830..1eed02543cda 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -30,143 +30,62 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBUI_TABLECONTROLLER_HXX
-#include "TableController.hxx"
-#endif
-#ifndef _DBAU_REGHELPER_HXX_
+#include "FieldDescriptions.hxx"
+#include "TEditControl.hxx"
+#include "TableController.hxx"
+#include "TableDesignView.hxx"
+#include "TableRow.hxx"
+#include "TypeInfo.hxx"
+#include "UITools.hxx"
+#include "browserids.hxx"
#include "dbu_reghelper.hxx"
-#endif
-#ifndef _STRING_HXX
-#include <tools/string.hxx>
-#endif
-#include <tools/diagnose_ex.h>
-#ifndef _SFXSIDS_HRC
-#include <sfx2/sfxsids.hrc>
-#endif
-#ifndef _DBU_TBL_HRC_
#include "dbu_tbl.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
-#include "browserids.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
-#include <comphelper/types.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
#include "defaultobjectnamecheck.hxx"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
-#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
-#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_DLGSAVE_HXX
#include "dlgsave.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include "dsmeta.hxx"
+#include "indexdialog.hxx"
+#include "sqlmessage.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/container/XChild.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
-#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
-#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
-#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
-#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XALTERTABLE_HPP_
-#include <com/sun/star/sdbcx/XAlterTable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
-#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XTitleChangeListener.hpp>
+#include <com/sun/star/frame/XUntitledNumbers.hpp>
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
-#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
+#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XINDEXESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/KeyType.hpp>
+#include <com/sun/star/sdbcx/XAlterTable.hpp>
+#include <com/sun/star/sdbcx/XAppend.hpp>
+#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
+#include <com/sun/star/sdbcx/XDrop.hpp>
#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
-#endif
-#include <com/sun/star/frame/XTitleChangeListener.hpp>
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
-#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_XEXECUTABLEDIALOG_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#include <com/sun/star/frame/XUntitledNumbers.hpp>
-#ifndef _COMPHELPER_STREAMSECTION_HXX_
+/** === end UNO includes === **/
+
+#include <comphelper/extract.hxx>
#include <comphelper/streamsection.hxx>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
-#include <com/sun/star/io/XActiveDataSink.hpp>
-#endif
-#ifndef DBAUI_TABLEDESIGNVIEW_HXX
-#include "TableDesignView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
-#include <com/sun/star/sdb/CommandType.hpp>
-#endif
-#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
-#include "FieldDescriptions.hxx"
-#endif
-#ifndef DBAUI_TABLEROW_HXX
-#include "TableRow.hxx"
-#endif
-#ifndef DBAUI_TYPEINFO_HXX
-#include "TypeInfo.hxx"
-#endif
-#ifndef DBAUI_TABLEEDITORCONTROL_HXX
-#include "TEditControl.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
-#include "sqlmessage.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
+#include <comphelper/types.hxx>
+#include <connectivity/dbexception.hxx>
+#include <connectivity/dbtools.hxx>
+#include <connectivity/dbmetadata.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <tools/diagnose_ex.h>
+#include <tools/string.hxx>
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBAUI_INDEXDIALOG_HXX_
-#include "indexdialog.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
-#include "UITools.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
-#include "UITools.hxx"
-#endif
-#include <boost/mem_fn.hpp>
-#ifndef _CPPUHELPER_EXC_HLP_HXX_
-#include <cppuhelper/exc_hlp.hxx>
-#endif
-#include "dsmeta.hxx"
+#include <boost/mem_fn.hpp>
#include <boost/bind.hpp>
+
#include <algorithm>
#include <functional>
@@ -1089,7 +1008,8 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::
{
sal_Bool bOk = sal_True;
sal_Bool bFoundPKey = sal_False;
- Reference< XDatabaseMetaData> xMetaData = getMetaData( );
+ Reference< XDatabaseMetaData > xMetaData = getMetaData( );
+ DatabaseMetaData aMetaData( getConnection() );
::comphelper::UStringMixEqual bCase(xMetaData.is() ? xMetaData->supportsMixedCaseQuotedIdentifiers() : sal_True);
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_vRowList.begin();
@@ -1115,39 +1035,38 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::
}
}
}
- if(!bFoundPKey)
+ if ( _bNew && !bFoundPKey && aMetaData.supportsPrimaryKeys() )
{
- if(_bNew && xMetaData.is() && xMetaData->supportsCoreSQLGrammar())
- {
- String sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD));
- String sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY));
- OSQLMessageBox aBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES);
+ String sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD));
+ String sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY));
+ OSQLMessageBox aBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES);
- INT16 nReturn = aBox.Execute();
-
- if (nReturn == RET_YES)
- {
- ::boost::shared_ptr<OTableRow> pNewRow(new OTableRow());
- TOTypeInfoSP pTypeInfo = ::dbaui::queryPrimaryKeyType(m_aTypeInfo);
+ switch ( aBox.Execute() )
+ {
+ case RET_YES:
+ {
+ ::boost::shared_ptr<OTableRow> pNewRow(new OTableRow());
+ TOTypeInfoSP pTypeInfo = ::dbaui::queryPrimaryKeyType(m_aTypeInfo);
+ if ( !pTypeInfo.get() )
+ break;
- if ( pTypeInfo.get() )
- {
- pNewRow->SetFieldType( pTypeInfo );
- OFieldDescription* pActFieldDescr = pNewRow->GetActFieldDescr();
+ pNewRow->SetFieldType( pTypeInfo );
+ OFieldDescription* pActFieldDescr = pNewRow->GetActFieldDescr();
- pActFieldDescr->SetAutoIncrement(sal_False); // #95927# pTypeInfo->bAutoIncrement
- pActFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
+ pActFieldDescr->SetAutoIncrement(sal_False); // #95927# pTypeInfo->bAutoIncrement
+ pActFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
- pActFieldDescr->SetName( createUniqueName(::rtl::OUString::createFromAscii("ID") ));
- pActFieldDescr->SetPrimaryKey( sal_True );
- m_vRowList.insert(m_vRowList.begin(),pNewRow);
+ pActFieldDescr->SetName( createUniqueName(::rtl::OUString::createFromAscii("ID") ));
+ pActFieldDescr->SetPrimaryKey( sal_True );
+ m_vRowList.insert(m_vRowList.begin(),pNewRow);
- static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->Invalidate();
- static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->RowInserted(0);
- } // if ( pTypeInfo.get() )
- }
- else if (nReturn == RET_CANCEL)
- bOk = sal_False;
+ static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->Invalidate();
+ static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->RowInserted(0);
+ }
+ break;
+ case RET_CANCEL:
+ bOk = sal_False;
+ break;
}
}
return bOk;
@@ -1471,7 +1390,7 @@ void OTableController::alterColumns()
bNeedAppendKey = sal_True;
}
- if ( bNeedDropKey )
+ if ( bNeedDropKey && xKeyColumns.is() && xKeyColumns->getElementNames().getLength() )
dropPrimaryKey();
if ( bNeedAppendKey )
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index af911ec85c07..9fa0b0743ef4 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -56,7 +56,7 @@
String STR_TABLEDESIGN_DBFIELDTYPES
{
- Text [ en-US ] = "Unknown;Text;Number;Date/Time;Date;Time;Yes/No;Currency;Memo;Counter;Image;Text (fix);Decimal;Binary (fix);Binary;BigInt;Double;Float;Real;Integer;Small Integer;Tiny Integer;SQL Null;Object;Distinct;Structure;Field;BLOB;CLOB;REF;OTHER";
+ Text [ en-US ] = "Unknown;Text;Number;Date/Time;Date;Time;Yes/No;Currency;Memo;Counter;Image;Text (fix);Decimal;Binary (fix);Binary;BigInt;Double;Float;Real;Integer;Small Integer;Tiny Integer;SQL Null;Object;Distinct;Structure;Field;BLOB;CLOB;REF;OTHER;Bit (fix)";
};
String STR_TABLEDESIGN_UNDO_PRIMKEY
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 26f859cf2045..ce79281f0cac 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -58,6 +58,8 @@
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/sdbc/XBlob.hpp>
+#include <com/sun/star/sdbc/XClob.hpp>
#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
@@ -127,6 +129,8 @@ namespace dbaui
using ::com::sun::star::sdbc::XParameters;
using ::com::sun::star::sdbc::XResultSet;
using ::com::sun::star::sdbc::XRow;
+ using ::com::sun::star::sdbc::XBlob;
+ using ::com::sun::star::sdbc::XClob;
using ::com::sun::star::sdbcx::XRowLocate;
using ::com::sun::star::sdbc::XResultSetMetaDataSupplier;
using ::com::sun::star::sdbc::XResultSetMetaData;
@@ -1281,6 +1285,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
case DataType::LONGVARBINARY:
case DataType::BINARY:
case DataType::VARBINARY:
+ case DataType::BIT:
aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes );
break;
@@ -1296,7 +1301,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
aTransfer.transferComplexValue( &XRow::getTimestamp, &XParameters::setTimestamp );
break;
- case DataType::BIT:
case DataType::BOOLEAN:
aTransfer.transferValue( &XRow::getBoolean, &XParameters::setBoolean );
break;
@@ -1313,6 +1317,14 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
aTransfer.transferValue( &XRow::getInt, &XParameters::setInt );
break;
+ case DataType::BLOB:
+ aTransfer.transferComplexValue( &XRow::getBlob, &XParameters::setBlob );
+ break;
+
+ case DataType::CLOB:
+ aTransfer.transferComplexValue( &XRow::getClob, &XParameters::setClob );
+ break;
+
default:
{
::rtl::OUString aMessage( String( ModuleRes( STR_CTW_UNSUPPORTED_COLUMN_TYPE ) ) );
diff --git a/default_images/res/ko/lc10714.png b/default_images/res/ko/lc10714.png
deleted file mode 100644
index 2b09b0f041ba..000000000000
--- a/default_images/res/ko/lc10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/ko/lch10714.png b/default_images/res/ko/lch10714.png
deleted file mode 100644
index 882c75b8e265..000000000000
--- a/default_images/res/ko/lch10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/ko/sc10714.png b/default_images/res/ko/sc10714.png
deleted file mode 100644
index 3b44ff677f47..000000000000
--- a/default_images/res/ko/sc10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/ko/sch10714.png b/default_images/res/ko/sch10714.png
deleted file mode 100644
index 9aab6e0c6c7d..000000000000
--- a/default_images/res/ko/sch10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10616.png b/default_images/res/lc10616.png
deleted file mode 100644
index 18fc0ec7c1a4..000000000000
--- a/default_images/res/lc10616.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10617.png b/default_images/res/lc10617.png
deleted file mode 100644
index 93674a8549d9..000000000000
--- a/default_images/res/lc10617.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10618.png b/default_images/res/lc10618.png
deleted file mode 100644
index cbe88f771160..000000000000
--- a/default_images/res/lc10618.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10619.png b/default_images/res/lc10619.png
deleted file mode 100644
index 28025791ae5a..000000000000
--- a/default_images/res/lc10619.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10620.png b/default_images/res/lc10620.png
deleted file mode 100644
index 4fe4c01219f7..000000000000
--- a/default_images/res/lc10620.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10621.png b/default_images/res/lc10621.png
deleted file mode 100644
index a3de4162e4ca..000000000000
--- a/default_images/res/lc10621.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10627.png b/default_images/res/lc10627.png
deleted file mode 100644
index a0b3ad8f56a1..000000000000
--- a/default_images/res/lc10627.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10630.png b/default_images/res/lc10630.png
deleted file mode 100644
index c7581e31c41c..000000000000
--- a/default_images/res/lc10630.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10714.png b/default_images/res/lc10714.png
deleted file mode 100644
index b7294c2884fd..000000000000
--- a/default_images/res/lc10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10723.png b/default_images/res/lc10723.png
deleted file mode 100644
index 3f22d02d41ef..000000000000
--- a/default_images/res/lc10723.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lc10724.png b/default_images/res/lc10724.png
deleted file mode 100644
index f7dabb6c3f50..000000000000
--- a/default_images/res/lc10724.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10616.png b/default_images/res/lch10616.png
deleted file mode 100644
index 1a564bcdcd49..000000000000
--- a/default_images/res/lch10616.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10617.png b/default_images/res/lch10617.png
deleted file mode 100644
index 42be87f94f7a..000000000000
--- a/default_images/res/lch10617.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10618.png b/default_images/res/lch10618.png
deleted file mode 100644
index 855bb9746bd4..000000000000
--- a/default_images/res/lch10618.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10619.png b/default_images/res/lch10619.png
deleted file mode 100644
index 8db57cf4ee69..000000000000
--- a/default_images/res/lch10619.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10620.png b/default_images/res/lch10620.png
deleted file mode 100644
index 6e6f0ce5246b..000000000000
--- a/default_images/res/lch10620.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10621.png b/default_images/res/lch10621.png
deleted file mode 100644
index 38314f036149..000000000000
--- a/default_images/res/lch10621.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10627.png b/default_images/res/lch10627.png
deleted file mode 100644
index 19a58943e506..000000000000
--- a/default_images/res/lch10627.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10630.png b/default_images/res/lch10630.png
deleted file mode 100644
index 99d21e01c975..000000000000
--- a/default_images/res/lch10630.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10714.png b/default_images/res/lch10714.png
deleted file mode 100644
index 807b7319c6d8..000000000000
--- a/default_images/res/lch10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10723.png b/default_images/res/lch10723.png
deleted file mode 100644
index 39f4771df7a1..000000000000
--- a/default_images/res/lch10723.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/lch10724.png b/default_images/res/lch10724.png
deleted file mode 100644
index 3ace4a7de639..000000000000
--- a/default_images/res/lch10724.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10616.png b/default_images/res/sc10616.png
deleted file mode 100644
index d5e2d06c9812..000000000000
--- a/default_images/res/sc10616.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10617.png b/default_images/res/sc10617.png
deleted file mode 100644
index 9f6ca72b5f19..000000000000
--- a/default_images/res/sc10617.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10618.png b/default_images/res/sc10618.png
deleted file mode 100644
index 732e155baafe..000000000000
--- a/default_images/res/sc10618.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10619.png b/default_images/res/sc10619.png
deleted file mode 100644
index 08661ddcdb0f..000000000000
--- a/default_images/res/sc10619.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10620.png b/default_images/res/sc10620.png
deleted file mode 100644
index 9d34e1acb428..000000000000
--- a/default_images/res/sc10620.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10621.png b/default_images/res/sc10621.png
deleted file mode 100644
index d45d15ae56d3..000000000000
--- a/default_images/res/sc10621.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10627.png b/default_images/res/sc10627.png
deleted file mode 100644
index df212ee3a0b5..000000000000
--- a/default_images/res/sc10627.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10630.png b/default_images/res/sc10630.png
deleted file mode 100644
index 42afba3fd99f..000000000000
--- a/default_images/res/sc10630.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10714.png b/default_images/res/sc10714.png
deleted file mode 100644
index 3f1cc65e9f25..000000000000
--- a/default_images/res/sc10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10723.png b/default_images/res/sc10723.png
deleted file mode 100644
index cbeed6207786..000000000000
--- a/default_images/res/sc10723.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sc10724.png b/default_images/res/sc10724.png
deleted file mode 100644
index d8f05260ca06..000000000000
--- a/default_images/res/sc10724.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10616.png b/default_images/res/sch10616.png
deleted file mode 100644
index 238986ea95c1..000000000000
--- a/default_images/res/sch10616.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10617.png b/default_images/res/sch10617.png
deleted file mode 100644
index 4ccbf095ce6a..000000000000
--- a/default_images/res/sch10617.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10618.png b/default_images/res/sch10618.png
deleted file mode 100644
index 1823634e1937..000000000000
--- a/default_images/res/sch10618.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10619.png b/default_images/res/sch10619.png
deleted file mode 100644
index 8ac3ad2970f8..000000000000
--- a/default_images/res/sch10619.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10620.png b/default_images/res/sch10620.png
deleted file mode 100644
index 47816ace8237..000000000000
--- a/default_images/res/sch10620.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10621.png b/default_images/res/sch10621.png
deleted file mode 100644
index fb7910bd2879..000000000000
--- a/default_images/res/sch10621.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10627.png b/default_images/res/sch10627.png
deleted file mode 100644
index 68401af67ccc..000000000000
--- a/default_images/res/sch10627.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10630.png b/default_images/res/sch10630.png
deleted file mode 100644
index 2240e182e83d..000000000000
--- a/default_images/res/sch10630.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10714.png b/default_images/res/sch10714.png
deleted file mode 100644
index 534564c46c4a..000000000000
--- a/default_images/res/sch10714.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10723.png b/default_images/res/sch10723.png
deleted file mode 100644
index cfc5700dd3e4..000000000000
--- a/default_images/res/sch10723.png
+++ /dev/null
Binary files differ
diff --git a/default_images/res/sch10724.png b/default_images/res/sch10724.png
deleted file mode 100644
index 43eb412f96db..000000000000
--- a/default_images/res/sch10724.png
+++ /dev/null
Binary files differ
diff --git a/default_images/svx/res/lc10622.png b/default_images/svx/res/lc10622.png
deleted file mode 100644
index e7b3ba49c795..000000000000
--- a/default_images/svx/res/lc10622.png
+++ /dev/null
Binary files differ
diff --git a/default_images/svx/res/lch10622.png b/default_images/svx/res/lch10622.png
deleted file mode 100644
index 4ea539882ed1..000000000000
--- a/default_images/svx/res/lch10622.png
+++ /dev/null
Binary files differ
diff --git a/default_images/svx/res/sc10622.png b/default_images/svx/res/sc10622.png
deleted file mode 100644
index 6683a3abf6c6..000000000000
--- a/default_images/svx/res/sc10622.png
+++ /dev/null
Binary files differ
diff --git a/default_images/svx/res/sch10622.png b/default_images/svx/res/sch10622.png
deleted file mode 100644
index 23ef7bc40395..000000000000
--- a/default_images/svx/res/sch10622.png
+++ /dev/null
Binary files differ
diff --git a/default_images/vcl/source/src/collate.png b/default_images/vcl/source/src/collate.png
new file mode 100644
index 000000000000..edbd5ea93584
--- /dev/null
+++ b/default_images/vcl/source/src/collate.png
Binary files differ
diff --git a/default_images/vcl/source/src/collate_h.png b/default_images/vcl/source/src/collate_h.png
new file mode 100644
index 000000000000..f4dc23974343
--- /dev/null
+++ b/default_images/vcl/source/src/collate_h.png
Binary files differ
diff --git a/default_images/vcl/source/src/ncollate.png b/default_images/vcl/source/src/ncollate.png
new file mode 100644
index 000000000000..a927de86bcf0
--- /dev/null
+++ b/default_images/vcl/source/src/ncollate.png
Binary files differ
diff --git a/default_images/vcl/source/src/ncollate_h.png b/default_images/vcl/source/src/ncollate_h.png
new file mode 100644
index 000000000000..dde8eba274fc
--- /dev/null
+++ b/default_images/vcl/source/src/ncollate_h.png
Binary files differ
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 14ad3543ac51..269c84adf163 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -30,30 +30,34 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
+
+#include "abpresid.hrc"
+#include "abptypes.hxx"
+#include "componentmodule.hxx"
#include "datasourcehandling.hxx"
+
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/sdb/SQLContext.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
+#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#include <tools/debug.hxx>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/uno/XNamingService.hpp>
+
#include <comphelper/interaction.hxx>
-#include <vcl/stdtext.hxx>
-#ifndef EXTENSIONS_ABPRESID_HRC
-#include "abpresid.hrc"
-#endif
-#include "componentmodule.hxx"
-#include "abptypes.hxx"
+#include <comphelper/componentcontext.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/confignode.hxx>
#include <unotools/sharedunocomponent.hxx>
+#include <vcl/stdtext.hxx>
//.........................................................................
namespace abp
@@ -76,26 +80,6 @@ namespace abp
struct PackageAccessControl { };
//=====================================================================
- //--------------------------------------------------------------------
- static const ::rtl::OUString& getDbRegisteredNamesNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/RegisteredNames");
- return s_sNodeName;
- }
-
- //--------------------------------------------------------------------
- static const ::rtl::OUString& getDbNameNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Name");
- return s_sNodeName;
- }
-
- //--------------------------------------------------------------------
- static const ::rtl::OUString& getDbLocationNodeName()
- {
- static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Location");
- return s_sNodeName;
- }
//---------------------------------------------------------------------
static Reference< XNameAccess > lcl_getDataSourceContext( const Reference< XMultiServiceFactory >& _rxORB ) SAL_THROW (( Exception ))
{
@@ -173,28 +157,24 @@ namespace abp
const Reference< XMultiServiceFactory >& _rxORB, const ::rtl::OUString& _sName,
const ::rtl::OUString& _sURL ) SAL_THROW (( ::com::sun::star::uno::Exception ))
{
- // the config node where all pooling relevant info are stored under
- OConfigurationTreeRoot aDbRegisteredNamesRoot = OConfigurationTreeRoot::createWithServiceFactory(
- _rxORB, getDbRegisteredNamesNodeName(), -1, OConfigurationTreeRoot::CM_UPDATABLE);
-
- if (!aDbRegisteredNamesRoot.isValid())
- // already asserted by the OConfigurationTreeRoot
- return;
-
- OSL_ENSURE(_sName.getLength(),"No Name given!");
- OSL_ENSURE(_sURL.getLength(),"No URL given!");
-
- OConfigurationNode aThisDriverSettings;
- if ( aDbRegisteredNamesRoot.hasByName(_sName) )
- aThisDriverSettings = aDbRegisteredNamesRoot.openNode(_sName);
- else
- aThisDriverSettings = aDbRegisteredNamesRoot.createNode(_sName);
+ OSL_ENSURE( _sName.getLength(), "lcl_registerDataSource: invalid name!" );
+ OSL_ENSURE( _sURL.getLength(), "lcl_registerDataSource: invalid URL!" );
+ try
+ {
- // set the values
- aThisDriverSettings.setNodeValue(getDbNameNodeName(), makeAny(_sName));
- aThisDriverSettings.setNodeValue(getDbLocationNodeName(), makeAny(_sURL));
+ ::comphelper::ComponentContext aContext( _rxORB );
+ Reference< XDatabaseRegistrations > xRegistrations(
+ aContext.createComponent( "com.sun.star.sdb.DatabaseContext" ), UNO_QUERY_THROW );
- aDbRegisteredNamesRoot.commit();
+ if ( xRegistrations->hasRegisteredDatabase( _sName ) )
+ xRegistrations->changeDatabaseLocation( _sName, _sURL );
+ else
+ xRegistrations->registerDatabaseLocation( _sName, _sURL );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
//=====================================================================
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 5a95f61f50c1..6f8395eae027 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -31,6 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
#include <osl/mutex.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/io/XPersistObject.hpp>
@@ -887,12 +888,14 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
sCurrentModelType = C2U("TextField");
break;
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
case DataType::CHAR:
+ case DataType::CLOB:
bFormattedIsNumeric = sal_False;
// _NO_ break !
default:
@@ -1085,20 +1088,16 @@ void BibDataManager::setFilter(const ::rtl::OUString& rQuery)
return;
try
{
- m_xParser->setFilter(rQuery);
- ::rtl::OUString aQuery=m_xParser->getFilter();
- Reference< XPropertySet > aPropertySet( m_xForm, UNO_QUERY );
- Any aVal; aVal <<= aQuery;
- aPropertySet->setPropertyValue(C2U("Filter"), aVal);
- BOOL bVal = sal_True;
- aVal.setValue(&bVal, ::getBooleanCppuType());
- aPropertySet->setPropertyValue(C2U("ApplyFilter"), aVal);
+ m_xParser->setFilter( rQuery );
+ ::rtl::OUString aQuery = m_xParser->getFilter();
+ Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW );
+ xFormProps->setPropertyValue( C2U( "Filter" ), makeAny( aQuery ) );
+ xFormProps->setPropertyValue( C2U( "ApplyFilter" ), makeAny( sal_True ) );
reload();
}
catch(Exception& e )
{
- (void) e; // make compiler happy
- DBG_ERROR("::setFilterOnActiveDataSource: something went wrong !");
+ DBG_UNHANDLED_EXCEPTION();
}
@@ -1110,18 +1109,12 @@ void BibDataManager::setFilter(const ::rtl::OUString& rQuery)
::rtl::OUString aQueryString;
try
{
- Reference< XPropertySet > aPropertySet( m_xForm, UNO_QUERY );
- Any aQuery=aPropertySet->getPropertyValue(C2U("Filter"));
-
- if(aQuery.getValueType() == ::getCppuType((::rtl::OUString*)0))
- {
- aQueryString=*(::rtl::OUString*)aQuery.getValue();
- }
+ Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW );
+ OSL_VERIFY( xFormProps->getPropertyValue( C2U( "Filter" ) ) >>= aQueryString );
}
- catch(Exception& e )
+ catch( const Exception& )
{
- (void) e; // make compiler happy
- DBG_ERROR("::getFilterOnActiveDataSource: something went wrong !");
+ DBG_UNHANDLED_EXCEPTION();
}
@@ -1795,13 +1788,13 @@ void BibDataManager::SetToolbar(BibToolBar* pSet)
/* -----------------------------08.05.2002 09:26------------------------------
---------------------------------------------------------------------------*/
-uno::Reference< form::XFormController > BibDataManager::GetFormController()
+uno::Reference< form::runtime::XFormController > BibDataManager::GetFormController()
{
if(!m_xFormCtrl.is())
{
Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory();
- m_xFormCtrl = uno::Reference< form::XFormController > (
- xMgr->createInstance(C2U("com.sun.star.form.FormController")), UNO_QUERY);
+ m_xFormCtrl = uno::Reference< form::runtime::XFormController > (
+ xMgr->createInstance(C2U("com.sun.star.form.runtime.FormController")), UNO_QUERY);
m_xFormCtrl->setModel(uno::Reference< awt::XTabControllerModel > (getForm(), UNO_QUERY));
// #100312# -------------
m_xFormDispatch = uno::Reference< frame::XDispatch > ( m_xFormCtrl, UNO_QUERY);
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
index 6f5bb6834e5c..17608142b6ab 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ -35,7 +35,7 @@
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <com/sun/star/form/XLoadable.hpp>
@@ -98,7 +98,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > m_xGridModel;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSourceProps;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xParser;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xFormCtrl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xFormCtrl;
// #100312# -------------------
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xFormDispatch;
BibInterceptorHelper* m_pInterceptorHelper;
@@ -191,7 +191,7 @@ public:
const rtl::OUString& GetIdentifierMapping();
void ResetIdentifierMapping() {sIdentifierMapping = rtl::OUString();}
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > GetFormController();
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController();
// #100312# ----------
void RegisterInterceptor( ::bib::BibBeamer* pBibBeamer);
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 5dc410db4c59..50bc4821f0ac 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -50,7 +50,7 @@
#include "bibliography.hrc"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/form/XConfirmDeleteListener.hpp>
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
@@ -384,7 +384,7 @@ sal_Bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet)
/* -----------------------------08.05.2002 08:58------------------------------
---------------------------------------------------------------------------*/
-sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::XFormController>& xController)
+sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XFormController>& xController)
{
if (!xController.is())
return sal_False;
@@ -592,7 +592,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
}
else if(aCommand.EqualsAscii("Bib/InsertRecord"))
{
- Reference<form::XFormController > xFormCtrl = pDatMan->GetFormController();
+ Reference<form::runtime::XFormController > xFormCtrl = pDatMan->GetFormController();
if(SaveModified(xFormCtrl))
{
try
diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx
index 99304c394021..b3a7469b8dae 100644
--- a/extensions/source/bibliography/framectr.hxx
+++ b/extensions/source/bibliography/framectr.hxx
@@ -44,9 +44,9 @@
class BibDataManager;
class BibFrameCtrl_Impl;
namespace com{namespace sun{namespace star{
- namespace form{
+ namespace form { namespace runtime {
class XFormController;
- }
+ } }
}}}
class BibStatusDispatch
{
@@ -83,7 +83,7 @@ friend class BibFrameCtrl_Impl;
DECL_STATIC_LINK( BibFrameController_Impl, DisposeHdl, void* );
- sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
+ sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& xController);
public:
BibFrameController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent,
BibDataManager* pDatMan);
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 62efe9127641..eb6e941c313b 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -417,7 +417,7 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan):
uno::Reference< sdbc::XRowSet > xRowSet(pDatMan->getForm(), UNO_QUERY);
if(xRowSet.is())
xRowSet->addRowSetListener(xPosListener);
- uno::Reference< form::XFormController > xFormCtrl = pDatMan->GetFormController();
+ uno::Reference< form::runtime::XFormController > xFormCtrl = pDatMan->GetFormController();
xFormCtrl->setContainer(xCtrlContnr);
xFormCtrl->activateTabOrder();
@@ -454,7 +454,7 @@ BibGeneralPage::~BibGeneralPage()
---------------------------------------------------------------------------*/
void BibGeneralPage::CommitActiveControl()
{
- uno::Reference< form::XFormController > xFormCtrl = pDatMan->GetFormController();
+ uno::Reference< form::runtime::XFormController > xFormCtrl = pDatMan->GetFormController();
uno::Reference< awt::XControl > xCurr = xFormCtrl->getCurrentControl();
if(xCurr.is())
{
diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx
index cd9d197e3fb5..bdefa5cff692 100644
--- a/extensions/source/propctrlr/editpropertyhandler.cxx
+++ b/extensions/source/propctrlr/editpropertyhandler.cxx
@@ -298,6 +298,7 @@ namespace pcr
_rxInspectorUI->enablePropertyUI( PROPERTY_DEFAULT_TEXT, nTextType != TEXTTYPE_RICHTEXT );
_rxInspectorUI->enablePropertyUI( PROPERTY_SHOW_SCROLLBARS, nTextType != TEXTTYPE_SINGLELINE );
_rxInspectorUI->enablePropertyUI( PROPERTY_LINEEND_FORMAT, nTextType != TEXTTYPE_SINGLELINE );
+ _rxInspectorUI->enablePropertyUI( PROPERTY_VERTICAL_ALIGN, nTextType == TEXTTYPE_SINGLELINE );
_rxInspectorUI->showCategory( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Data" ) ), nTextType != TEXTTYPE_RICHTEXT );
}
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index e6ef80f5ba6b..1f3c17377687 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -55,7 +55,7 @@
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XForm.hpp>
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/inspection/PropertyControlType.hpp>
#include <com/sun/star/lang/NullPointerException.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
@@ -118,7 +118,7 @@ namespace pcr
using ::com::sun::star::container::XNameContainer;
using ::com::sun::star::awt::XTabControllerModel;
using ::com::sun::star::form::XForm;
- using ::com::sun::star::form::XFormController;
+ using ::com::sun::star::form::runtime::XFormController;
using ::com::sun::star::beans::UnknownPropertyException;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::container::NoSuchElementException;
@@ -1155,7 +1155,7 @@ namespace pcr
m_aContext.createComponent( (const rtl::OUString&)SERVICE_FORMCONTROLLER ), UNO_QUERY_THROW );
xController->setModel( xComponentAsTCModel );
- xReturn = xController.get();
+ xReturn = xController;
}
else
{
diff --git a/extras/source/truetype/symbol/OpenSymbol.sfd b/extras/source/truetype/symbol/OpenSymbol.sfd
index e04c03f98b33..d7101ea3a855 100644
--- a/extras/source/truetype/symbol/OpenSymbol.sfd
+++ b/extras/source/truetype/symbol/OpenSymbol.sfd
@@ -4,7 +4,7 @@ FullName: OpenSymbol
FamilyName: OpenSymbol
Weight: Book
Copyright: (c) 2009 Sun Microsystems Inc.
-Version: 1.21
+Version: 2.1
ItalicAngle: 0
UnderlinePosition: -143
UnderlineWidth: 20
@@ -13,13 +13,14 @@ Descent: 410
LayerCount: 2
Layer: 0 1 "Back" 1
Layer: 1 1 "Fore" 0
+NeedsXUIDChange: 1
XUID: [1021 161 2043615882 15846768]
FSType: 8
OS2Version: 0
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1144938807
-ModificationTime: 1238168413
+ModificationTime: 1257779664
PfmFamily: 81
TTFWeight: 400
TTFWidth: 5
@@ -96,6 +97,9 @@ CALL
NOT
IF
EIF
+PUSHB_1
+ 20
+CALL
EndTTInstrs
TtTable: fpgm
PUSHB_1
@@ -530,8 +534,187 @@ POP
POP
EIF
ENDF
+PUSHB_1
+ 16
+FDEF
+DUP
+MDRP[rp0,min,white]
+PUSHB_1
+ 18
+CALL
+ENDF
+PUSHB_1
+ 17
+FDEF
+DUP
+MDRP[rp0,white]
+PUSHB_1
+ 18
+CALL
+ENDF
+PUSHB_1
+ 18
+FDEF
+DUP
+MDAP[rnd]
+PUSHB_1
+ 7
+CALL
+NOT
+IF
+DUP
+DUP
+GC[orig]
+SWAP
+GC[cur]
+SUB
+ROUND[White]
+ROLL
+DUP
+GC[orig]
+SWAP
+GC[cur]
+SWAP
+SUB
+ROUND[White]
+ADD
+DUP
+IF
+DUP
+ABS
+DIV
+SHPIX
+ELSE
+POP
+POP
+EIF
+ELSE
+POP
+POP
+EIF
+ENDF
+PUSHB_1
+ 19
+FDEF
+DUP
+ROLL
+DUP
+ROLL
+SDPVTL[orthog]
+DUP
+PUSHB_1
+ 3
+CINDEX
+MD[orig]
+ABS
+SWAP
+ROLL
+SPVTL[orthog]
+PUSHB_1
+ 32
+LT
+IF
+ALIGNRP
+ELSE
+MDRP[grey]
+EIF
+ENDF
+PUSHB_1
+ 20
+FDEF
+PUSHB_4
+ 0
+ 64
+ 1
+ 64
+WS
+WS
+SVTCA[x-axis]
+MPPEM
+PUSHW_1
+ 4096
+MUL
+SVTCA[y-axis]
+MPPEM
+PUSHW_1
+ 4096
+MUL
+DUP
+ROLL
+DUP
+ROLL
+NEQ
+IF
+DUP
+ROLL
+DUP
+ROLL
+GT
+IF
+SWAP
+DIV
+DUP
+PUSHB_1
+ 0
+SWAP
+WS
+ELSE
+DIV
+DUP
+PUSHB_1
+ 1
+SWAP
+WS
+EIF
+DUP
+PUSHB_1
+ 64
+GT
+IF
+PUSHB_3
+ 0
+ 32
+ 0
+RS
+MUL
+WS
+PUSHB_3
+ 1
+ 32
+ 1
+RS
+MUL
+WS
+PUSHB_1
+ 32
+MUL
+PUSHB_1
+ 25
+NEG
+JMPR
+POP
+EIF
+ELSE
+POP
+POP
+EIF
+ENDF
+PUSHB_1
+ 21
+FDEF
+PUSHB_1
+ 1
+RS
+MUL
+SWAP
+PUSHB_1
+ 0
+RS
+MUL
+SWAP
+ENDF
EndTTInstrs
-ShortTable: cvt 31
+ShortTable: cvt 38
0
148
145
@@ -563,6 +746,13 @@ ShortTable: cvt 31
176
167
64
+ 127
+ 132
+ 412
+ 25
+ 982
+ 1343
+ 1449
EndShort
ShortTable: maxp 16
1
@@ -574,111 +764,382 @@ ShortTable: maxp 16
0
2
1
- 1
- 16
+ 2
+ 22
0
256
0
0
0
EndShort
-LangName: 1033 "" "" "Regular" "OpenSymbol" "" "Version 1.21"
+LangName: 1033 "" "" "Regular" "OpenSymbol" "" "Version 2.1"
GaspTable: 1 65535 2
-Encoding: UnicodeBmp
-Compacted: 1
+Encoding: Custom
UnicodeInterp: none
NameList: Adobe Glyph List
DisplaySize: -24
AntiAlias: 1
FitToEm: 1
-WinInfo: 0 45 18
-BeginChars: 65539 912
+WinInfo: 135 45 20
+BeginChars: 992 992
-StartChar: .notdef
-Encoding: 65536 -1 0
-Width: 1024
+StartChar: Alpha
+Encoding: 909 913 0
+Width: 1572
Flags: W
-HStem: 0 129<256 768> 1511 127<256 768>
-VStem: 129 127<129 1511> 768 129<129 1511>
+HStem: 1 31<31 104.324 353.571 463 979 1080.42 1443.74 1530> 447 66<460.172 977.603>
TtInstrs:
SVTCA[y-axis]
PUSHB_3
- 0
+ 29
0
0
CALL
PUSHB_1
- 4
+ 10
+SHP[rp1]
+PUSHB_1
+ 27
MDRP[min,rnd,black]
+PUSHB_3
+ 8
+ 12
+ 31
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
PUSHB_1
- 7
+ 20
MDAP[rnd]
PUSHB_1
1
MDRP[min,rnd,black]
SVTCA[x-axis]
PUSHB_1
- 8
+ 35
MDAP[rnd]
+PUSHB_2
+ 36
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+728.164 1091.24 m 1,0,-1
+ 460.172 513 l 1,1,-1
+ 977.603 513 l 1,2,-1
+ 728.164 1091.24 l 1,0,-1
+768.182 1367 m 1,3,-1
+ 816.749 1367 l 1,4,-1
+ 1340.42 186.982 l 2,5,6
+ 1379.89 96.9287 1379.89 96.9287 1419.53 63.4648 c 128,-1,7
+ 1459.17 30 1459.17 30 1523 30 c 2,8,-1
+ 1530 30 l 1,9,-1
+ 1530 1 l 1,10,-1
+ 979 1 l 1,11,-1
+ 979 32.1299 l 1,12,13
+ 1062.34 34.5713 1062.34 34.5713 1094.17 53.8779 c 128,-1,14
+ 1126 73.1846 1126 73.1846 1126 123 c 0,15,16
+ 1126 141.464 1126 141.464 1122.9 157.996 c 128,-1,17
+ 1119.8 174.529 1119.8 174.529 1113.57 188.034 c 2,18,-1
+ 1002.29 447 l 1,19,-1
+ 435.717 447 l 1,20,-1
+ 340.399 226.959 l 2,21,22
+ 322.296 183.713 322.296 183.713 314.648 159.238 c 128,-1,23
+ 307 134.763 307 134.763 307 119 c 0,24,25
+ 307 74.1836 307 74.1836 341.802 53.0918 c 128,-1,26
+ 376.604 32 376.604 32 448 32 c 2,27,-1
+ 463 32 l 1,28,-1
+ 463 1 l 1,29,-1
+ 31 1 l 1,30,-1
+ 31 30.125 l 1,31,32
+ 95.5 32.4199 95.5 32.4199 137.299 69.1826 c 128,-1,33
+ 179.098 105.945 179.098 105.945 226.535 208.895 c 2,34,-1
+ 768.182 1367 l 1,3,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Beta
+Encoding: 910 914 1
+Width: 1383
+GlyphClass: 2
+Flags: W
+HStem: 0 68<515.552 888.183> 0 31.0947<71 186.333> 672 55<502.05 836.331> 1284 58<510.312 849.558> 1310.75 31.2461<71 178.116>
+VStem: 274 213<89.4084 659.265 741.507 1264.57> 1023 214<869.733 1172.85> 1069 231<203.859 535.878>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 50
+ 0
+ 0
+CALL
PUSHB_1
+ 51
+MDRP[min,rnd,black]
+PUSHB_3
+ 49
+ 0
0
+CALL
+PUSHB_1
+ 20
+MDRP[min,rnd,black]
+PUSHB_1
+ 28
+MDAP[rnd]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_1
+ 13
+MDAP[rnd]
+PUSHB_1
+ 34
+MDRP[min,rnd,black]
+PUSHB_1
+ 34
+SRP0
+PUSHB_1
+ 32
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 55
+MDAP[rnd]
+PUSHB_1
+ 54
MDRP[rp0,rnd,white]
PUSHB_1
- 4
+ 17
MDRP[min,rnd,black]
PUSHB_1
- 4
+ 2
+SHP[rp2]
+PUSHB_1
+ 17
SRP0
PUSHB_2
- 5
+ 24
1
CALL
PUSHB_1
- 3
+ 46
+MDRP[min,rnd,black]
+PUSHB_1
+ 10
+DUP
+MDRP[rp0,rnd,white]
+SRP1
+PUSHB_1
+ 37
MDRP[min,rnd,black]
PUSHB_2
- 9
+ 56
1
CALL
+PUSHB_2
+ 10
+ 17
+SRP1
+SRP2
+PUSHB_1
+ 42
+IP
SVTCA[y-axis]
+PUSHB_2
+ 28
+ 20
+SRP1
+SRP2
+PUSHB_1
+ 46
+IP
+PUSHB_1
+ 6
+SRP1
+PUSHB_2
+ 40
+ 42
+IP
+IP
+PUSHB_1
+ 13
+SRP2
+PUSHB_1
+ 37
+IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-129 0 m 1,0,-1
- 129 1638 l 1,1,-1
- 897 1638 l 1,2,-1
- 897 0 l 1,3,-1
- 129 0 l 1,0,-1
-256 129 m 1,4,-1
- 768 129 l 1,5,-1
- 768 1511 l 1,6,-1
- 256 1511 l 1,7,-1
- 256 129 l 1,4,-1
-EndSplineSet
-Validated: 1
-EndChar
-
-StartChar: glyph1
-Encoding: 65537 -1 1
-Width: 681
-GlyphClass: 2
-Flags: W
-LayerCount: 2
-EndChar
-
-StartChar: nonmarkingreturn
-Encoding: 65538 -1 2
-Width: 682
+509.595 1265.17 m 132,-1,1
+ 487 1246.34 487 1246.34 487 1175 c 6,2,-1
+ 487 816 l 6,3,4
+ 487 755.113 487 755.113 499.369 741.057 c 132,-1,5
+ 511.739 727 511.739 727 568 727 c 6,6,-1
+ 601 727 l 6,7,8
+ 824.514 727 824.514 727 923.757 793.162 c 132,-1,9
+ 1023 859.324 1023 859.324 1023 1009 c 4,10,11
+ 1023 1157.64 1023 1157.64 930.271 1220.82 c 132,-1,12
+ 837.541 1284 837.541 1284 601 1284 c 4,13,0
+ 532.189 1284 532.189 1284 509.595 1265.17 c 132,-1,1
+501.584 659.66 m 132,-1,15
+ 487 647.319 487 647.319 487 597 c 6,16,-1
+ 487 171 l 6,17,18
+ 487 109.5 487 109.5 514.666 88.75 c 132,-1,19
+ 542.333 68 542.333 68 656 68 c 6,20,-1
+ 689 68 l 6,21,22
+ 873.739 68 873.739 68 971.369 145.291 c 132,-1,23
+ 1069 222.581 1069 222.581 1069 372 c 4,24,25
+ 1069 525.634 1069 525.634 962.275 598.816 c 132,-1,26
+ 855.55 672 855.55 672 631 672 c 6,27,-1
+ 574 672 l 6,28,14
+ 516.168 672 516.168 672 501.584 659.66 c 132,-1,15
+274 1123 m 6,29,30
+ 274 1232.23 274 1232.23 233.885 1268.23 c 132,-1,31
+ 193.771 1304.23 193.771 1304.23 71 1310.75 c 5,32,-1
+ 71 1342 l 5,33,-1
+ 728 1342 l 6,34,35
+ 971.53 1342 971.53 1342 1104.27 1256.63 c 132,-1,36
+ 1237 1171.27 1237 1171.27 1237 1019 c 4,37,38
+ 1237 914.919 1237 914.919 1166.11 836.154 c 132,-1,39
+ 1095.22 757.391 1095.22 757.391 965.573 718.792 c 6,40,41
+ 945.888 712.932 l 5,42,-1
+ 966.064 709.088 l 6,43,44
+ 1132.58 677.371 1132.58 677.371 1216.29 595.137 c 132,-1,45
+ 1300 512.902 1300 512.902 1300 382 c 4,46,47
+ 1300 187.752 1300 187.752 1151.78 93.876 c 132,-1,48
+ 1003.55 0 1003.55 0 695 0 c 6,49,-1
+ 71 0 l 5,50,-1
+ 71 31.0947 l 5,51,52
+ 191.77 33.7656 191.77 33.7656 232.885 70.7695 c 132,-1,53
+ 274 107.773 274 107.773 274 216 c 6,54,-1
+ 274 1123 l 6,29,30
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Gamma
+Encoding: 911 915 2
+Width: 1280
GlyphClass: 2
Flags: W
+HStem: 1 31.1289<58 178.569 586.866 706> 1273 70<519.576 1006.89> 1312 31<58 177.402>
+VStem: 267 222<76.2623 1248.97>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 14
+ 0
+ 0
+CALL
+PUSHB_1
+ 15
+MDRP[min,rnd,black]
+PUSHB_1
+ 12
+SHP[rp2]
+PUSHB_1
+ 5
+MDAP[rnd]
+PUSHB_1
+ 25
+MDRP[min,rnd,black]
+PUSHB_1
+ 25
+SRP0
+PUSHB_1
+ 23
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 26
+MDAP[rnd]
+PUSHB_1
+ 18
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_3
+ 9
+ 18
+ 10
+CALL
+PUSHB_4
+ 64
+ 9
+ 13
+ 9
+CALL
+PUSHB_3
+ 18
+ 9
+ 10
+CALL
+PUSHB_4
+ 64
+ 18
+ 14
+ 9
+CALL
+PUSHB_1
+ 23
+SHP[rp2]
+PUSHB_2
+ 27
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 5
+ 15
+SRP1
+SRP2
+PUSHB_1
+ 0
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
LayerCount: 2
+Fore
+SplineSet
+1213.33 998 m 5,0,-1
+ 1181.59 998 l 5,1,2
+ 1133.36 1139.71 1133.36 1139.71 1054.6 1206.35 c 132,-1,3
+ 975.832 1273 975.832 1273 854 1273 c 6,4,-1
+ 639 1273 l 6,5,6
+ 548.271 1273 548.271 1273 518.635 1249.71 c 132,-1,7
+ 489 1226.43 489 1226.43 489 1131 c 6,8,-1
+ 489 223 l 6,9,10
+ 489 113.703 489 113.703 536.103 73.2559 c 132,-1,11
+ 583.205 32.8096 583.205 32.8096 706 32.0156 c 5,12,-1
+ 706 1 l 5,13,-1
+ 58 1 l 5,14,-1
+ 58 32.1289 l 5,15,16
+ 181.56 35.665 181.56 35.665 224.279 68.0918 c 132,-1,17
+ 267 100.518 267 100.518 267 223 c 6,18,-1
+ 267 1102 l 6,19,20
+ 267 1226.05 267 1226.05 224.545 1269.03 c 132,-1,21
+ 182.089 1312 182.089 1312 63 1312 c 6,22,-1
+ 58 1312 l 5,23,-1
+ 58 1343 l 5,24,-1
+ 1169.59 1343 l 5,25,-1
+ 1213.33 998 l 5,0,-1
+EndSplineSet
+Validated: 16385
EndChar
StartChar: nounicode-3-1-c
-Encoding: 12 12 3
+Encoding: 0 12 3
Width: 1024
GlyphClass: 2
Flags: W
@@ -686,7 +1147,7 @@ LayerCount: 2
EndChar
StartChar: nounicode-3-1-d
-Encoding: 13 13 4
+Encoding: 1 13 4
Width: 1024
GlyphClass: 2
Flags: W
@@ -694,7 +1155,7 @@ LayerCount: 2
EndChar
StartChar: space
-Encoding: 32 32 5
+Encoding: 2 32 5
Width: 1024
GlyphClass: 2
Flags: W
@@ -702,7 +1163,7 @@ LayerCount: 2
EndChar
StartChar: exclam
-Encoding: 33 33 6
+Encoding: 3 33 6
Width: 606
GlyphClass: 2
Flags: W
@@ -781,7 +1242,7 @@ Validated: 1
EndChar
StartChar: quotedbl
-Encoding: 34 34 7
+Encoding: 4 34 7
Width: 727
GlyphClass: 2
Flags: W
@@ -883,7 +1344,7 @@ Validated: 1
EndChar
StartChar: numbersign
-Encoding: 35 35 8
+Encoding: 5 35 8
Width: 1138
GlyphClass: 2
Flags: W
@@ -1197,7 +1658,7 @@ Validated: 1
EndChar
StartChar: percent
-Encoding: 37 37 9
+Encoding: 6 37 9
Width: 1705
GlyphClass: 2
Flags: W
@@ -1375,7 +1836,7 @@ Validated: 1
EndChar
StartChar: ampersand
-Encoding: 38 38 10
+Encoding: 7 38 10
Width: 1593
GlyphClass: 2
Flags: W
@@ -1578,7 +2039,7 @@ Validated: 1
EndChar
StartChar: parenleft
-Encoding: 40 40 11
+Encoding: 8 40 11
Width: 696
GlyphClass: 2
Flags: W
@@ -1632,7 +2093,7 @@ Validated: 1
EndChar
StartChar: parenright
-Encoding: 41 41 12
+Encoding: 9 41 12
Width: 696
GlyphClass: 2
Flags: W
@@ -1687,7 +2148,7 @@ Validated: 1
EndChar
StartChar: asterisk
-Encoding: 42 42 13
+Encoding: 10 42 13
Width: 796
GlyphClass: 2
Flags: W
@@ -1766,7 +2227,7 @@ Validated: 1
EndChar
StartChar: plus
-Encoding: 43 43 14
+Encoding: 11 43 14
Width: 1196
GlyphClass: 2
Flags: W
@@ -1875,7 +2336,7 @@ Validated: 1
EndChar
StartChar: comma
-Encoding: 44 44 15
+Encoding: 12 44 15
Width: 512
GlyphClass: 2
Flags: W
@@ -1954,7 +2415,7 @@ Validated: 1
EndChar
StartChar: hyphen
-Encoding: 45 45 16
+Encoding: 13 45 16
Width: 681
GlyphClass: 2
Flags: W
@@ -2003,7 +2464,7 @@ Validated: 1
EndChar
StartChar: period
-Encoding: 46 46 17
+Encoding: 14 46 17
Width: 512
GlyphClass: 2
Flags: W
@@ -2058,7 +2519,7 @@ Validated: 1
EndChar
StartChar: slash
-Encoding: 47 47 18
+Encoding: 15 47 18
Width: 569
GlyphClass: 2
Flags: W
@@ -2139,7 +2600,7 @@ Validated: 1
EndChar
StartChar: colon
-Encoding: 58 58 19
+Encoding: 16 58 19
Width: 569
GlyphClass: 2
Flags: W
@@ -2212,7 +2673,7 @@ Validated: 1
EndChar
StartChar: semicolon
-Encoding: 59 59 20
+Encoding: 17 59 20
Width: 569
GlyphClass: 2
Flags: W
@@ -2309,7 +2770,7 @@ Validated: 1
EndChar
StartChar: less
-Encoding: 60 60 21
+Encoding: 18 60 21
Width: 1196
GlyphClass: 2
Flags: W
@@ -2329,11 +2790,11 @@ Validated: 1
EndChar
StartChar: equal
-Encoding: 61 61 22
+Encoding: 19 61 22
Width: 1628
GlyphClass: 2
Flags: W
-HStem: 293 116<221 1405> 791 129<221 1405>
+HStem: 293 127<221 1405> 791 129<221 1405>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -2364,20 +2825,21 @@ LayerCount: 2
Fore
SplineSet
221 293 m 1,0,-1
- 221 409 l 1,1,-1
- 1405 409 l 1,2,-1
+ 221 420 l 5,1,-1
+ 1405 420 l 5,2,-1
1405 293 l 1,3,-1
221 293 l 1,0,-1
221 791 m 1,4,-1
- 221 920 l 5,5,-1
- 1405 920 l 5,6,-1
+ 221 920 l 1,5,-1
+ 1405 920 l 1,6,-1
1405 791 l 1,7,-1
221 791 l 1,4,-1
EndSplineSet
+Validated: 16385
EndChar
StartChar: greater
-Encoding: 62 62 23
+Encoding: 20 62 23
Width: 1196
GlyphClass: 2
Flags: W
@@ -2397,12 +2859,12 @@ Validated: 1
EndChar
StartChar: bracketleft
-Encoding: 91 91 24
+Encoding: 21 91 24
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<248 504> 1581 41<248 504>
-VStem: 150 98<-360 1581>
+HStem: -403 71<248 504> 1552 70<248 504>
+VStem: 150 98<-332 1552>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -2455,23 +2917,23 @@ SplineSet
150 -403 m 1,0,-1
150 1622 l 1,1,-1
504 1622 l 1,2,-1
- 504 1581 l 1,3,-1
- 248 1581 l 1,4,-1
- 248 -360 l 1,5,-1
- 504 -360 l 1,6,-1
+ 504 1552 l 1,3,-1
+ 248 1552 l 1,4,-1
+ 248 -332 l 5,5,-1
+ 504 -332 l 5,6,-1
504 -403 l 1,7,-1
150 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: bracketright
-Encoding: 93 93 25
+Encoding: 22 93 25
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<74 330> 1581 41<74 330>
-VStem: 330 98<-360 1581>
+HStem: -403 73<74 330> 1553 69<74 330>
+VStem: 330 98<-330 1553>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -2523,19 +2985,19 @@ Fore
SplineSet
428 -403 m 1,0,-1
74 -403 l 1,1,-1
- 74 -360 l 1,2,-1
- 330 -360 l 1,3,-1
- 330 1581 l 1,4,-1
- 74 1581 l 1,5,-1
+ 74 -330 l 5,2,-1
+ 330 -330 l 5,3,-1
+ 330 1553 l 1,4,-1
+ 74 1553 l 1,5,-1
74 1622 l 1,6,-1
428 1622 l 1,7,-1
428 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: braceleft
-Encoding: 123 123 26
+Encoding: 23 123 26
Width: 782
GlyphClass: 2
Flags: W
@@ -2664,7 +3126,7 @@ Validated: 1
EndChar
StartChar: braceright
-Encoding: 125 125 27
+Encoding: 24 125 27
Width: 782
GlyphClass: 2
Flags: W
@@ -2791,7 +3253,7 @@ Validated: 1
EndChar
StartChar: asciitilde
-Encoding: 126 126 28
+Encoding: 25 126 28
Width: 1628
GlyphClass: 2
Flags: W
@@ -2899,7 +3361,7 @@ Validated: 1
EndChar
StartChar: cent
-Encoding: 162 162 29
+Encoding: 26 162 29
Width: 876
GlyphClass: 2
Flags: W
@@ -3071,7 +3533,7 @@ Validated: 1
EndChar
StartChar: currency
-Encoding: 164 164 30
+Encoding: 27 164 30
Width: 1024
GlyphClass: 2
Flags: W
@@ -3223,7 +3685,7 @@ Validated: 1
EndChar
StartChar: yen
-Encoding: 165 165 31
+Encoding: 28 165 31
Width: 1024
GlyphClass: 2
Flags: W
@@ -3393,7 +3855,7 @@ Validated: 1
EndChar
StartChar: section
-Encoding: 167 167 32
+Encoding: 29 167 32
Width: 1138
GlyphClass: 2
Flags: W
@@ -3588,7 +4050,7 @@ Validated: 9
EndChar
StartChar: dieresis
-Encoding: 168 168 33
+Encoding: 30 168 33
Width: 542
GlyphClass: 2
Flags: W
@@ -3675,7 +4137,7 @@ Validated: 1
EndChar
StartChar: guillemotleft
-Encoding: 171 171 34
+Encoding: 31 171 34
Width: 1138
GlyphClass: 2
Flags: W
@@ -3701,7 +4163,7 @@ Validated: 9
EndChar
StartChar: logicalnot
-Encoding: 172 172 35
+Encoding: 32 172 35
Width: 1329
GlyphClass: 2
Flags: W
@@ -3759,7 +4221,7 @@ Validated: 1
EndChar
StartChar: softhyphen
-Encoding: 173 173 36
+Encoding: 33 173 36
Width: 1628
GlyphClass: 2
Flags: W
@@ -3800,7 +4262,7 @@ Validated: 1
EndChar
StartChar: degree
-Encoding: 176 176 37
+Encoding: 34 176 37
Width: 872
GlyphClass: 2
Flags: W
@@ -3896,7 +4358,7 @@ Validated: 1
EndChar
StartChar: plusminus
-Encoding: 177 177 38
+Encoding: 35 177 38
Width: 1628
GlyphClass: 2
Flags: W
@@ -4024,7 +4486,7 @@ Validated: 1
EndChar
StartChar: paragraph
-Encoding: 182 182 39
+Encoding: 36 182 39
Width: 1099
GlyphClass: 2
Flags: W
@@ -4115,7 +4577,7 @@ Validated: 1
EndChar
StartChar: guillemotright
-Encoding: 187 187 40
+Encoding: 37 187 40
Width: 1138
GlyphClass: 2
Flags: W
@@ -4141,7 +4603,7 @@ Validated: 9
EndChar
StartChar: questiondown
-Encoding: 191 191 41
+Encoding: 38 191 41
Width: 909
GlyphClass: 2
Flags: W
@@ -4301,7 +4763,7 @@ Validated: 1
EndChar
StartChar: multiply
-Encoding: 215 215 42
+Encoding: 39 215 42
Width: 1628
GlyphClass: 2
Flags: W
@@ -4341,7 +4803,7 @@ Validated: 1
EndChar
StartChar: divide
-Encoding: 247 247 43
+Encoding: 40 247 43
Width: 1628
GlyphClass: 2
Flags: W
@@ -4414,7 +4876,7 @@ Validated: 1
EndChar
StartChar: OE
-Encoding: 338 338 44
+Encoding: 41 338 44
Width: 2058
GlyphClass: 2
Flags: W
@@ -4636,7 +5098,7 @@ Validated: 1
EndChar
StartChar: oe
-Encoding: 339 339 45
+Encoding: 42 339 45
Width: 1748
GlyphClass: 2
Flags: W
@@ -4834,7 +5296,7 @@ Validated: 1
EndChar
StartChar: Scaron
-Encoding: 352 352 46
+Encoding: 43 352 46
Width: 1138
GlyphClass: 2
Flags: W
@@ -5004,7 +5466,7 @@ Validated: 33
EndChar
StartChar: scaron
-Encoding: 353 353 47
+Encoding: 44 353 47
Width: 796
GlyphClass: 2
Flags: W
@@ -5186,7 +5648,7 @@ Validated: 1
EndChar
StartChar: Ydieresis
-Encoding: 376 376 48
+Encoding: 45 376 48
Width: 1488
GlyphClass: 2
Flags: W
@@ -5406,7 +5868,7 @@ Validated: 1
EndChar
StartChar: Zcaron
-Encoding: 381 381 49
+Encoding: 46 381 49
Width: 1251
GlyphClass: 2
Flags: W
@@ -5541,7 +6003,7 @@ Validated: 1
EndChar
StartChar: zcaron
-Encoding: 382 382 50
+Encoding: 47 382 50
Width: 909
GlyphClass: 2
Flags: W
@@ -5681,7 +6143,7 @@ Validated: 1
EndChar
StartChar: florin
-Encoding: 402 402 51
+Encoding: 48 402 51
Width: 1024
GlyphClass: 2
Flags: W
@@ -5796,7 +6258,7 @@ Validated: 1
EndChar
StartChar: uni019B
-Encoding: 411 411 52
+Encoding: 49 411 52
Width: 1146
GlyphClass: 2
Flags: W
@@ -5940,7 +6402,7 @@ Validated: 1
EndChar
StartChar: circumflex
-Encoding: 710 710 53
+Encoding: 50 710 53
Width: 681
GlyphClass: 2
Flags: W
@@ -5987,7 +6449,7 @@ Validated: 1
EndChar
StartChar: dotaccent
-Encoding: 729 729 54
+Encoding: 51 729 54
Width: 542
GlyphClass: 2
Flags: W
@@ -6042,7 +6504,7 @@ Validated: 1
EndChar
StartChar: ring
-Encoding: 730 730 55
+Encoding: 52 730 55
Width: 532
GlyphClass: 2
Flags: W
@@ -6136,7 +6598,7 @@ Validated: 1
EndChar
StartChar: tilde
-Encoding: 732 732 56
+Encoding: 53 732 56
Width: 681
GlyphClass: 2
Flags: W
@@ -6219,7 +6681,7 @@ Validated: 1
EndChar
StartChar: uni03F1
-Encoding: 1009 1009 57
+Encoding: 54 1009 57
Width: 1132
GlyphClass: 2
Flags: W
@@ -6348,7 +6810,7 @@ Validated: 1
EndChar
StartChar: endash
-Encoding: 8211 8211 58
+Encoding: 55 8211 58
Width: 1138
GlyphClass: 2
Flags: W
@@ -6386,7 +6848,7 @@ Validated: 9
EndChar
StartChar: emdash
-Encoding: 8212 8212 59
+Encoding: 56 8212 59
Width: 2048
GlyphClass: 2
Flags: W
@@ -6424,7 +6886,7 @@ Validated: 9
EndChar
StartChar: quoteleft
-Encoding: 8216 8216 60
+Encoding: 57 8216 60
Width: 481
GlyphClass: 2
Flags: W
@@ -6497,7 +6959,7 @@ Validated: 1
EndChar
StartChar: quoteright
-Encoding: 8217 8217 61
+Encoding: 58 8217 61
Width: 481
GlyphClass: 2
Flags: W
@@ -6571,7 +7033,7 @@ Validated: 1
EndChar
StartChar: quotesinglbase
-Encoding: 8218 8218 62
+Encoding: 59 8218 62
Width: 481
GlyphClass: 2
Flags: W
@@ -6634,7 +7096,7 @@ Validated: 1
EndChar
StartChar: quotedblleft
-Encoding: 8220 8220 63
+Encoding: 60 8220 63
Width: 827
GlyphClass: 2
Flags: W
@@ -6768,7 +7230,7 @@ Validated: 5
EndChar
StartChar: quotedblright
-Encoding: 8221 8221 64
+Encoding: 61 8221 64
Width: 827
GlyphClass: 2
Flags: W
@@ -6917,7 +7379,7 @@ Validated: 5
EndChar
StartChar: quotedblbase
-Encoding: 8222 8222 65
+Encoding: 62 8222 65
Width: 827
GlyphClass: 2
Flags: W
@@ -7028,7 +7490,7 @@ Validated: 1
EndChar
StartChar: dagger
-Encoding: 8224 8224 66
+Encoding: 63 8224 66
Width: 919
GlyphClass: 2
Flags: W
@@ -7174,7 +7636,7 @@ Validated: 1
EndChar
StartChar: daggerdbl
-Encoding: 8225 8225 67
+Encoding: 64 8225 67
Width: 1024
GlyphClass: 2
Flags: W
@@ -7395,7 +7857,7 @@ Validated: 1
EndChar
StartChar: bullet
-Encoding: 8226 8226 68
+Encoding: 65 8226 68
Width: 729
GlyphClass: 2
Flags: W
@@ -7450,7 +7912,7 @@ Validated: 1
EndChar
StartChar: ellipsis
-Encoding: 8230 8230 69
+Encoding: 66 8230 69
Width: 1949
GlyphClass: 3
Flags: W
@@ -7550,7 +8012,7 @@ Ligature2: "'liga' Standard Ligatures lookup 0 subtable" period period period
EndChar
StartChar: perthousand
-Encoding: 8240 8240 70
+Encoding: 67 8240 70
Width: 1966
GlyphClass: 2
Flags: W
@@ -7778,7 +8240,7 @@ Validated: 1
EndChar
StartChar: guilsinglleft
-Encoding: 8249 8249 71
+Encoding: 68 8249 71
Width: 681
GlyphClass: 2
Flags: W
@@ -7828,7 +8290,7 @@ Validated: 1
EndChar
StartChar: guilsinglright
-Encoding: 8250 8250 72
+Encoding: 69 8250 72
Width: 681
GlyphClass: 2
Flags: W
@@ -7879,7 +8341,7 @@ Validated: 1
EndChar
StartChar: colonmonetary
-Encoding: 8353 8353 73
+Encoding: 70 8353 73
Width: 1366
GlyphClass: 2
Flags: W
@@ -8266,7 +8728,7 @@ Validated: 1
EndChar
StartChar: uni20A2
-Encoding: 8354 8354 74
+Encoding: 71 8354 74
Width: 1441
GlyphClass: 2
Flags: W
@@ -8468,7 +8930,7 @@ Validated: 1
EndChar
StartChar: franc
-Encoding: 8355 8355 75
+Encoding: 72 8355 75
Width: 1267
GlyphClass: 2
Flags: W
@@ -8665,7 +9127,7 @@ Validated: 1
EndChar
StartChar: lira
-Encoding: 8356 8356 76
+Encoding: 73 8356 76
Width: 1050
GlyphClass: 2
Flags: W
@@ -8974,7 +9436,7 @@ Validated: 1
EndChar
StartChar: uni20A8
-Encoding: 8360 8360 77
+Encoding: 74 8360 77
Width: 1964
GlyphClass: 2
Flags: W
@@ -9338,7 +9800,7 @@ Validated: 1
EndChar
StartChar: uni20A9
-Encoding: 8361 8361 78
+Encoding: 75 8361 78
Width: 2058
GlyphClass: 2
Flags: W
@@ -9507,7 +9969,7 @@ Validated: 33
EndChar
StartChar: dong
-Encoding: 8363 8363 79
+Encoding: 76 8363 79
Width: 1093
GlyphClass: 2
Flags: W
@@ -9684,7 +10146,7 @@ Validated: 5
EndChar
StartChar: Euro
-Encoding: 8364 8364 80
+Encoding: 77 8364 80
Width: 1566
GlyphClass: 2
Flags: W
@@ -9820,7 +10282,7 @@ Validated: 1
EndChar
StartChar: uni2102
-Encoding: 8450 8450 81
+Encoding: 78 8450 81
Width: 1374
GlyphClass: 2
Flags: W
@@ -9940,7 +10402,7 @@ Validated: 1
EndChar
StartChar: uni2107
-Encoding: 8455 8455 82
+Encoding: 79 8455 82
Width: 989
GlyphClass: 2
Flags: W
@@ -10100,7 +10562,7 @@ Validated: 1
EndChar
StartChar: uni210A
-Encoding: 8458 8458 83
+Encoding: 80 8458 83
Width: 1366
GlyphClass: 2
Flags: W
@@ -10323,7 +10785,7 @@ Validated: 1
EndChar
StartChar: uni210F
-Encoding: 8463 8463 84
+Encoding: 81 8463 84
Width: 1007
GlyphClass: 2
Flags: W
@@ -10569,7 +11031,7 @@ Validated: 33
EndChar
StartChar: Ifraktur
-Encoding: 8465 8465 85
+Encoding: 82 8465 85
Width: 1404
GlyphClass: 2
Flags: W
@@ -10820,7 +11282,7 @@ Validated: 1
EndChar
StartChar: uni2112
-Encoding: 8466 8466 86
+Encoding: 83 8466 86
Width: 2056
GlyphClass: 2
Flags: W
@@ -11047,7 +11509,7 @@ Validated: 1
EndChar
StartChar: afii61289
-Encoding: 8467 8467 87
+Encoding: 84 8467 87
Width: 1116
GlyphClass: 2
Flags: W
@@ -11205,7 +11667,7 @@ Validated: 1
EndChar
StartChar: uni2115
-Encoding: 8469 8469 88
+Encoding: 85 8469 88
Width: 1605
GlyphClass: 2
Flags: W
@@ -11285,7 +11747,7 @@ Validated: 1
EndChar
StartChar: weierstrass
-Encoding: 8472 8472 89
+Encoding: 86 8472 89
Width: 1710
GlyphClass: 2
Flags: W
@@ -11482,7 +11944,7 @@ Validated: 1
EndChar
StartChar: uni211A
-Encoding: 8474 8474 90
+Encoding: 87 8474 90
Width: 1538
GlyphClass: 2
Flags: W
@@ -11616,7 +12078,7 @@ Validated: 1
EndChar
StartChar: Rfraktur
-Encoding: 8476 8476 91
+Encoding: 88 8476 91
Width: 1628
GlyphClass: 2
Flags: W
@@ -11802,7 +12264,7 @@ Validated: 1
EndChar
StartChar: uni211D
-Encoding: 8477 8477 92
+Encoding: 89 8477 92
Width: 1525
GlyphClass: 2
Flags: W
@@ -11927,7 +12389,7 @@ Validated: 1
EndChar
StartChar: trademark
-Encoding: 8482 8482 93
+Encoding: 90 8482 93
Width: 2048
GlyphClass: 2
Flags: W
@@ -11962,7 +12424,7 @@ Validated: 9
EndChar
StartChar: uni2124
-Encoding: 8484 8484 94
+Encoding: 91 8484 94
Width: 1660
GlyphClass: 2
Flags: W
@@ -12023,7 +12485,7 @@ Validated: 1
EndChar
StartChar: uni2127
-Encoding: 8487 8487 95
+Encoding: 92 8487 95
Width: 1550
GlyphClass: 2
Flags: W
@@ -12203,7 +12665,7 @@ Validated: 1
EndChar
StartChar: uni2130
-Encoding: 8496 8496 96
+Encoding: 93 8496 96
Width: 1650
GlyphClass: 2
Flags: W
@@ -12455,7 +12917,7 @@ Validated: 33
EndChar
StartChar: uni2131
-Encoding: 8497 8497 97
+Encoding: 94 8497 97
Width: 1726
GlyphClass: 2
Flags: W
@@ -12708,7 +13170,7 @@ Validated: 1
EndChar
StartChar: aleph
-Encoding: 8501 8501 98
+Encoding: 95 8501 98
Width: 1685
GlyphClass: 2
Flags: W
@@ -12891,7 +13353,7 @@ Validated: 33
EndChar
StartChar: arrowleft
-Encoding: 8592 8592 99
+Encoding: 96 8592 99
Width: 1617
GlyphClass: 2
Flags: W
@@ -12948,7 +13410,7 @@ Validated: 1
EndChar
StartChar: arrowup
-Encoding: 8593 8593 100
+Encoding: 97 8593 100
Width: 1515
GlyphClass: 2
Flags: W
@@ -13007,7 +13469,7 @@ Validated: 5
EndChar
StartChar: arrowright
-Encoding: 8594 8594 101
+Encoding: 98 8594 101
Width: 1617
GlyphClass: 2
Flags: W
@@ -13064,7 +13526,7 @@ Validated: 1
EndChar
StartChar: arrowdown
-Encoding: 8595 8595 102
+Encoding: 99 8595 102
Width: 1515
GlyphClass: 2
Flags: W
@@ -13121,7 +13583,7 @@ Validated: 1
EndChar
StartChar: arrowboth
-Encoding: 8596 8596 103
+Encoding: 100 8596 103
Width: 2080
GlyphClass: 2
Flags: W
@@ -13184,7 +13646,7 @@ Validated: 1
EndChar
StartChar: arrowupdn
-Encoding: 8597 8597 104
+Encoding: 101 8597 104
Width: 937
GlyphClass: 2
Flags: W
@@ -13247,7 +13709,7 @@ Validated: 1
EndChar
StartChar: uni2197
-Encoding: 8599 8599 105
+Encoding: 102 8599 105
Width: 1259
GlyphClass: 2
Flags: W
@@ -13278,7 +13740,7 @@ Validated: 1
EndChar
StartChar: uni2198
-Encoding: 8600 8600 106
+Encoding: 103 8600 106
Width: 1214
GlyphClass: 2
Flags: W
@@ -13382,7 +13844,7 @@ Validated: 9
EndChar
StartChar: uni21B3
-Encoding: 8627 8627 107
+Encoding: 104 8627 107
Width: 1640
GlyphClass: 2
Flags: W
@@ -13477,7 +13939,7 @@ Validated: 5
EndChar
StartChar: carriagereturn
-Encoding: 8629 8629 108
+Encoding: 105 8629 108
Width: 1640
GlyphClass: 2
Flags: W
@@ -13541,7 +14003,7 @@ Validated: 5
EndChar
StartChar: arrowdblleft
-Encoding: 8656 8656 109
+Encoding: 106 8656 109
Width: 1658
GlyphClass: 2
Flags: W
@@ -13627,7 +14089,7 @@ Validated: 1
EndChar
StartChar: arrowdblright
-Encoding: 8658 8658 110
+Encoding: 107 8658 110
Width: 1634
GlyphClass: 2
Flags: W
@@ -13713,7 +14175,7 @@ Validated: 1
EndChar
StartChar: arrowdblboth
-Encoding: 8660 8660 111
+Encoding: 108 8660 111
Width: 1900
GlyphClass: 2
Flags: W
@@ -13818,7 +14280,7 @@ Validated: 1
EndChar
StartChar: uni21E4
-Encoding: 8676 8676 112
+Encoding: 109 8676 112
Width: 2099
GlyphClass: 2
Flags: W
@@ -13879,7 +14341,7 @@ Validated: 1
EndChar
StartChar: uni21E5
-Encoding: 8677 8677 113
+Encoding: 110 8677 113
Width: 2048
GlyphClass: 2
Flags: W
@@ -13940,7 +14402,7 @@ Validated: 1
EndChar
StartChar: uni21E6
-Encoding: 8678 8678 114
+Encoding: 111 8678 114
Width: 2390
GlyphClass: 2
Flags: W
@@ -14028,7 +14490,7 @@ Validated: 1
EndChar
StartChar: uni21E7
-Encoding: 8679 8679 115
+Encoding: 112 8679 115
Width: 2390
GlyphClass: 2
Flags: W
@@ -14116,7 +14578,7 @@ Validated: 1
EndChar
StartChar: uni21E8
-Encoding: 8680 8680 116
+Encoding: 113 8680 116
Width: 2390
GlyphClass: 2
Flags: W
@@ -14204,7 +14666,7 @@ Validated: 1
EndChar
StartChar: uni21E9
-Encoding: 8681 8681 117
+Encoding: 114 8681 117
Width: 2390
GlyphClass: 2
Flags: W
@@ -14292,7 +14754,7 @@ Validated: 1
EndChar
StartChar: universal
-Encoding: 8704 8704 118
+Encoding: 115 8704 118
Width: 1771
GlyphClass: 2
Flags: W
@@ -14338,7 +14800,7 @@ Validated: 1
EndChar
StartChar: partialdiff
-Encoding: 8706 8706 119
+Encoding: 116 8706 119
Width: 1091
GlyphClass: 2
Flags: W
@@ -14471,7 +14933,7 @@ Validated: 1
EndChar
StartChar: existential
-Encoding: 8707 8707 120
+Encoding: 117 8707 120
Width: 1345
GlyphClass: 2
Flags: W
@@ -14559,7 +15021,7 @@ Validated: 1
EndChar
StartChar: emptyset
-Encoding: 8709 8709 121
+Encoding: 118 8709 121
Width: 1798
GlyphClass: 2
Flags: W
@@ -14698,7 +15160,7 @@ Validated: 1
EndChar
StartChar: gradient
-Encoding: 8711 8711 122
+Encoding: 119 8711 122
Width: 1679
GlyphClass: 2
Flags: W
@@ -14739,7 +15201,7 @@ Validated: 1
EndChar
StartChar: element
-Encoding: 8712 8712 123
+Encoding: 120 8712 123
Width: 1460
GlyphClass: 2
Flags: W
@@ -14820,7 +15282,7 @@ Validated: 1
EndChar
StartChar: notelement
-Encoding: 8713 8713 124
+Encoding: 121 8713 124
Width: 1460
GlyphClass: 2
Flags: W
@@ -14946,7 +15408,7 @@ Validated: 1
EndChar
StartChar: suchthat
-Encoding: 8715 8715 125
+Encoding: 122 8715 125
Width: 1460
GlyphClass: 2
Flags: W
@@ -15027,7 +15489,7 @@ Validated: 1
EndChar
StartChar: uni220D
-Encoding: 8717 8717 126
+Encoding: 123 8717 126
Width: 899
GlyphClass: 2
Flags: W
@@ -15143,7 +15605,7 @@ Validated: 1
EndChar
StartChar: product
-Encoding: 8719 8719 127
+Encoding: 124 8719 127
Width: 1804
GlyphClass: 2
Flags: W
@@ -15304,7 +15766,7 @@ Validated: 1
EndChar
StartChar: uni2210
-Encoding: 8720 8720 128
+Encoding: 125 8720 128
Width: 1832
GlyphClass: 2
Flags: W
@@ -15462,7 +15924,7 @@ Validated: 1
EndChar
StartChar: summation
-Encoding: 8721 8721 129
+Encoding: 126 8721 129
Width: 1622
GlyphClass: 2
Flags: W
@@ -15584,7 +16046,7 @@ Validated: 1
EndChar
StartChar: minussign
-Encoding: 8722 8722 130
+Encoding: 127 8722 130
Width: 1628
GlyphClass: 2
Flags: W
@@ -15625,7 +16087,7 @@ Validated: 1
EndChar
StartChar: uni2213
-Encoding: 8723 8723 131
+Encoding: 128 8723 131
Width: 1628
GlyphClass: 2
Flags: W
@@ -15740,7 +16202,7 @@ Validated: 1
EndChar
StartChar: uni2216
-Encoding: 8726 8726 132
+Encoding: 129 8726 132
Width: 927
GlyphClass: 2
Flags: W
@@ -15757,7 +16219,7 @@ Validated: 1
EndChar
StartChar: asteriskmath
-Encoding: 8727 8727 133
+Encoding: 130 8727 133
Width: 1480
GlyphClass: 2
Flags: W
@@ -15788,7 +16250,7 @@ Validated: 1
EndChar
StartChar: radical
-Encoding: 8730 8730 134
+Encoding: 131 8730 134
Width: 1091
GlyphClass: 2
Flags: W
@@ -15870,7 +16332,7 @@ Validated: 1
EndChar
StartChar: proportional
-Encoding: 8733 8733 135
+Encoding: 132 8733 135
Width: 1460
GlyphClass: 2
Flags: W
@@ -15988,7 +16450,7 @@ Validated: 1
EndChar
StartChar: infinity
-Encoding: 8734 8734 136
+Encoding: 133 8734 136
Width: 1540
GlyphClass: 2
Flags: W
@@ -16123,7 +16585,7 @@ Validated: 1
EndChar
StartChar: uni2221
-Encoding: 8737 8737 137
+Encoding: 134 8737 137
Width: 1536
GlyphClass: 2
Flags: W
@@ -16180,7 +16642,7 @@ Validated: 1
EndChar
StartChar: uni2222
-Encoding: 8738 8738 138
+Encoding: 135 8738 138
Width: 1628
GlyphClass: 2
Flags: W
@@ -16248,7 +16710,7 @@ Validated: 1
EndChar
StartChar: uni2223
-Encoding: 8739 8739 139
+Encoding: 136 8739 139
Width: 813
GlyphClass: 2
Flags: W
@@ -16289,7 +16751,7 @@ Validated: 1
EndChar
StartChar: uni2224
-Encoding: 8740 8740 140
+Encoding: 137 8740 140
Width: 972
GlyphClass: 2
Flags: W
@@ -16363,7 +16825,7 @@ Validated: 1
EndChar
StartChar: uni2225
-Encoding: 8741 8741 141
+Encoding: 138 8741 141
Width: 1183
GlyphClass: 2
Flags: W
@@ -16416,7 +16878,7 @@ Validated: 1
EndChar
StartChar: logicaland
-Encoding: 8743 8743 142
+Encoding: 139 8743 142
Width: 1628
GlyphClass: 2
Flags: W
@@ -16450,7 +16912,7 @@ Validated: 1
EndChar
StartChar: logicalor
-Encoding: 8744 8744 143
+Encoding: 140 8744 143
Width: 1628
GlyphClass: 2
Flags: W
@@ -16484,7 +16946,7 @@ Validated: 1
EndChar
StartChar: intersection
-Encoding: 8745 8745 144
+Encoding: 141 8745 144
Width: 1628
GlyphClass: 2
Flags: W
@@ -16563,7 +17025,7 @@ Validated: 1
EndChar
StartChar: union
-Encoding: 8746 8746 145
+Encoding: 142 8746 145
Width: 1628
GlyphClass: 2
Flags: W
@@ -16644,7 +17106,7 @@ Validated: 1
EndChar
StartChar: integral
-Encoding: 8747 8747 146
+Encoding: 143 8747 146
Width: 1183
GlyphClass: 2
Flags: W
@@ -16803,7 +17265,7 @@ Validated: 1
EndChar
StartChar: uni222C
-Encoding: 8748 8748 147
+Encoding: 144 8748 147
Width: 1751
GlyphClass: 3
Flags: W
@@ -17049,7 +17511,7 @@ Ligature2: "'liga' Standard Ligatures lookup 0 subtable" integral integral
EndChar
StartChar: uni222D
-Encoding: 8749 8749 148
+Encoding: 145 8749 148
Width: 2318
GlyphClass: 3
Flags: W
@@ -17402,7 +17864,7 @@ Ligature2: "'liga' Standard Ligatures lookup 0 subtable" integral integral integ
EndChar
StartChar: uni222E
-Encoding: 8750 8750 149
+Encoding: 146 8750 149
Width: 1257
GlyphClass: 2
Flags: W
@@ -17639,7 +18101,7 @@ Validated: 1
EndChar
StartChar: uni222F
-Encoding: 8751 8751 150
+Encoding: 147 8751 150
Width: 1826
GlyphClass: 3
Flags: W
@@ -18048,7 +18510,7 @@ Ligature2: "'liga' Standard Ligatures lookup 0 subtable" uni222E uni222E
EndChar
StartChar: uni2230
-Encoding: 8752 8752 151
+Encoding: 148 8752 151
Width: 2392
GlyphClass: 3
Flags: W
@@ -18563,7 +19025,7 @@ Ligature2: "'liga' Standard Ligatures lookup 0 subtable" uni222E uni222E uni222E
EndChar
StartChar: uni2243
-Encoding: 8771 8771 152
+Encoding: 149 8771 152
Width: 1628
GlyphClass: 2
Flags: W
@@ -18688,7 +19150,7 @@ Validated: 1
EndChar
StartChar: congruent
-Encoding: 8773 8773 153
+Encoding: 150 8773 153
Width: 1628
GlyphClass: 2
Flags: W
@@ -18828,7 +19290,7 @@ Validated: 1
EndChar
StartChar: approxequal
-Encoding: 8776 8776 154
+Encoding: 151 8776 154
Width: 1628
GlyphClass: 2
Flags: W
@@ -19006,7 +19468,7 @@ Validated: 1
EndChar
StartChar: uni2254
-Encoding: 8788 8788 155
+Encoding: 152 8788 155
Width: 1738
GlyphClass: 2
Flags: W
@@ -19098,7 +19560,7 @@ Validated: 1
EndChar
StartChar: uni2255
-Encoding: 8789 8789 156
+Encoding: 153 8789 156
Width: 1685
GlyphClass: 2
Flags: W
@@ -19190,7 +19652,7 @@ Validated: 1
EndChar
StartChar: uni2259
-Encoding: 8793 8793 157
+Encoding: 154 8793 157
Width: 1628
GlyphClass: 2
Flags: W
@@ -19246,7 +19708,7 @@ Validated: 1
EndChar
StartChar: uni225D
-Encoding: 8797 8797 158
+Encoding: 155 8797 158
Width: 1628
GlyphClass: 2
Flags: W
@@ -19548,7 +20010,7 @@ Validated: 1
EndChar
StartChar: notequal
-Encoding: 8800 8800 159
+Encoding: 156 8800 159
Width: 1628
GlyphClass: 2
Flags: W
@@ -19620,7 +20082,7 @@ Validated: 1
EndChar
StartChar: equivalence
-Encoding: 8801 8801 160
+Encoding: 157 8801 160
Width: 1628
GlyphClass: 2
Flags: W
@@ -19680,7 +20142,7 @@ Validated: 1
EndChar
StartChar: lessequal
-Encoding: 8804 8804 161
+Encoding: 158 8804 161
Width: 1628
GlyphClass: 2
Flags: W
@@ -19727,7 +20189,7 @@ Validated: 1
EndChar
StartChar: greaterequal
-Encoding: 8805 8805 162
+Encoding: 159 8805 162
Width: 1628
GlyphClass: 2
Flags: W
@@ -19774,7 +20236,7 @@ Validated: 1
EndChar
StartChar: uni226A
-Encoding: 8810 8810 163
+Encoding: 160 8810 163
Width: 2289
GlyphClass: 2
Flags: W
@@ -19815,7 +20277,7 @@ Validated: 1
EndChar
StartChar: uni226B
-Encoding: 8811 8811 164
+Encoding: 161 8811 164
Width: 2289
GlyphClass: 2
Flags: W
@@ -19841,7 +20303,7 @@ Validated: 1
EndChar
StartChar: propersubset
-Encoding: 8834 8834 165
+Encoding: 162 8834 165
Width: 1628
GlyphClass: 2
Flags: W
@@ -19924,7 +20386,7 @@ Validated: 1
EndChar
StartChar: propersuperset
-Encoding: 8835 8835 166
+Encoding: 163 8835 166
Width: 1628
GlyphClass: 2
Flags: W
@@ -20007,7 +20469,7 @@ Validated: 1
EndChar
StartChar: notsubset
-Encoding: 8836 8836 167
+Encoding: 164 8836 167
Width: 1628
GlyphClass: 2
Flags: W
@@ -20119,7 +20581,7 @@ Validated: 1
EndChar
StartChar: uni2285
-Encoding: 8837 8837 168
+Encoding: 165 8837 168
Width: 1628
GlyphClass: 2
Flags: W
@@ -20222,7 +20684,7 @@ Validated: 1
EndChar
StartChar: reflexsubset
-Encoding: 8838 8838 169
+Encoding: 166 8838 169
Width: 1628
GlyphClass: 2
Flags: W
@@ -20323,7 +20785,7 @@ Validated: 1
EndChar
StartChar: reflexsuperset
-Encoding: 8839 8839 170
+Encoding: 167 8839 170
Width: 1628
GlyphClass: 2
Flags: W
@@ -20424,7 +20886,7 @@ Validated: 1
EndChar
StartChar: uni2288
-Encoding: 8840 8840 171
+Encoding: 168 8840 171
Width: 1628
GlyphClass: 2
Flags: W
@@ -20583,7 +21045,7 @@ Validated: 1
EndChar
StartChar: uni2289
-Encoding: 8841 8841 172
+Encoding: 169 8841 172
Width: 1628
GlyphClass: 2
Flags: W
@@ -20735,7 +21197,7 @@ Validated: 1
EndChar
StartChar: circleplus
-Encoding: 8853 8853 173
+Encoding: 170 8853 173
Width: 1628
GlyphClass: 2
Flags: W
@@ -20881,7 +21343,7 @@ Validated: 1
EndChar
StartChar: uni2296
-Encoding: 8854 8854 174
+Encoding: 171 8854 174
Width: 1628
GlyphClass: 2
Flags: W
@@ -20992,7 +21454,7 @@ Validated: 1
EndChar
StartChar: circlemultiply
-Encoding: 8855 8855 175
+Encoding: 172 8855 175
Width: 1628
GlyphClass: 2
Flags: W
@@ -21113,7 +21575,7 @@ Validated: 1
EndChar
StartChar: uni2298
-Encoding: 8856 8856 176
+Encoding: 173 8856 176
Width: 1628
GlyphClass: 2
Flags: W
@@ -21218,7 +21680,7 @@ Validated: 1
EndChar
StartChar: uni2299
-Encoding: 8857 8857 177
+Encoding: 174 8857 177
Width: 1628
GlyphClass: 2
Flags: W
@@ -21359,7 +21821,7 @@ Validated: 1
EndChar
StartChar: uni22A4
-Encoding: 8868 8868 178
+Encoding: 175 8868 178
Width: 1400
GlyphClass: 2
Flags: W
@@ -21433,7 +21895,7 @@ Validated: 1
EndChar
StartChar: perpendicular
-Encoding: 8869 8869 179
+Encoding: 176 8869 179
Width: 1431
GlyphClass: 2
Flags: W
@@ -21520,7 +21982,7 @@ Validated: 1
EndChar
StartChar: uni22B6
-Encoding: 8886 8886 180
+Encoding: 177 8886 180
Width: 1851
GlyphClass: 2
Flags: W
@@ -21617,7 +22079,7 @@ Validated: 1
EndChar
StartChar: uni22B7
-Encoding: 8887 8887 181
+Encoding: 178 8887 181
Width: 1851
GlyphClass: 2
Flags: W
@@ -21714,7 +22176,7 @@ Validated: 1
EndChar
StartChar: uni22BE
-Encoding: 8894 8894 182
+Encoding: 179 8894 182
Width: 1478
GlyphClass: 2
Flags: W
@@ -21869,7 +22331,7 @@ Validated: 1
EndChar
StartChar: dotmath
-Encoding: 8901 8901 183
+Encoding: 180 8901 183
Width: 1183
GlyphClass: 2
Flags: W
@@ -21924,7 +22386,7 @@ Validated: 1
EndChar
StartChar: uni22EE
-Encoding: 8942 8942 184
+Encoding: 181 8942 184
Width: 1210
GlyphClass: 2
Flags: W
@@ -22015,7 +22477,7 @@ Validated: 1
EndChar
StartChar: uni22EF
-Encoding: 8943 8943 185
+Encoding: 182 8943 185
Width: 2048
GlyphClass: 2
Flags: W
@@ -22114,7 +22576,7 @@ Validated: 1
EndChar
StartChar: uni22F0
-Encoding: 8944 8944 186
+Encoding: 183 8944 186
Width: 1693
GlyphClass: 2
Flags: W
@@ -22213,7 +22675,7 @@ Validated: 1
EndChar
StartChar: uni22F1
-Encoding: 8945 8945 187
+Encoding: 184 8945 187
Width: 1667
GlyphClass: 2
Flags: W
@@ -22310,12 +22772,12 @@ Validated: 1
EndChar
StartChar: uni2308
-Encoding: 8968 8968 188
+Encoding: 185 8968 188
Width: 577
GlyphClass: 2
Flags: W
-HStem: 1581 41<248 504>
-VStem: 150 98<-403 1581>
+HStem: 1549 73<248 504>
+VStem: 150 98<-403 1549>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -22370,21 +22832,21 @@ SplineSet
150 -403 m 1,0,-1
150 1622 l 1,1,-1
504 1622 l 1,2,-1
- 504 1581 l 1,3,-1
- 248 1581 l 1,4,-1
+ 504 1549 l 5,3,-1
+ 248 1549 l 5,4,-1
248 -403 l 1,5,-1
150 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uni2309
-Encoding: 8969 8969 189
+Encoding: 186 8969 189
Width: 577
GlyphClass: 2
Flags: W
-HStem: 1581 41<74 330>
-VStem: 330 98<-403 1581>
+HStem: 1548 74<74 330>
+VStem: 330 98<-403 1548>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -22438,22 +22900,22 @@ Fore
SplineSet
428 -403 m 1,0,-1
330 -403 l 1,1,-1
- 330 1581 l 1,2,-1
- 74 1581 l 1,3,-1
+ 330 1548 l 5,2,-1
+ 74 1548 l 5,3,-1
74 1622 l 1,4,-1
428 1622 l 1,5,-1
428 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uni230A
-Encoding: 8970 8970 190
+Encoding: 187 8970 190
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<248 504>
-VStem: 150 98<-360 1622>
+HStem: -403 73<248 504>
+VStem: 150 98<-330 1622>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -22508,21 +22970,21 @@ SplineSet
150 -403 m 1,0,-1
150 1622 l 1,1,-1
248 1622 l 1,2,-1
- 248 -360 l 1,3,-1
- 504 -360 l 1,4,-1
+ 248 -330 l 5,3,-1
+ 504 -330 l 5,4,-1
504 -403 l 1,5,-1
150 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uni230B
-Encoding: 8971 8971 191
+Encoding: 188 8971 191
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<74 330>
-VStem: 330 98<-360 1622>
+HStem: -403 73<74 330>
+VStem: 330 98<-330 1622>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -22576,17 +23038,17 @@ Fore
SplineSet
428 -403 m 1,0,-1
74 -403 l 1,1,-1
- 74 -360 l 1,2,-1
- 330 -360 l 1,3,-1
+ 74 -330 l 5,2,-1
+ 330 -330 l 5,3,-1
330 1622 l 1,4,-1
428 1622 l 1,5,-1
428 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: angleleft
-Encoding: 9001 9001 192
+Encoding: 189 9001 192
Width: 686
GlyphClass: 2
Flags: W
@@ -22626,7 +23088,7 @@ Validated: 1
EndChar
StartChar: angleright
-Encoding: 9002 9002 193
+Encoding: 190 9002 193
Width: 686
GlyphClass: 2
Flags: W
@@ -22677,7 +23139,7 @@ Validated: 1
EndChar
StartChar: uni2334
-Encoding: 9012 9012 194
+Encoding: 191 9012 194
Width: 619
GlyphClass: 2
Flags: W
@@ -22758,7 +23220,7 @@ Validated: 1
EndChar
StartChar: uni2373
-Encoding: 9075 9075 195
+Encoding: 192 9075 195
Width: 569
GlyphClass: 2
Flags: W
@@ -22858,7 +23320,7 @@ Validated: 1
EndChar
StartChar: uni2460
-Encoding: 9312 9312 196
+Encoding: 193 9312 196
Width: 1826
GlyphClass: 2
Flags: W
@@ -23007,7 +23469,7 @@ Validated: 1
EndChar
StartChar: uni2461
-Encoding: 9313 9313 197
+Encoding: 194 9313 197
Width: 1812
GlyphClass: 2
Flags: W
@@ -23173,7 +23635,7 @@ Validated: 1
EndChar
StartChar: uni2462
-Encoding: 9314 9314 198
+Encoding: 195 9314 198
Width: 1866
GlyphClass: 2
Flags: W
@@ -23372,7 +23834,7 @@ Validated: 1
EndChar
StartChar: uni2463
-Encoding: 9315 9315 199
+Encoding: 196 9315 199
Width: 1850
GlyphClass: 2
Flags: W
@@ -23571,7 +24033,7 @@ Validated: 1
EndChar
StartChar: uni2464
-Encoding: 9316 9316 200
+Encoding: 197 9316 200
Width: 1806
GlyphClass: 2
Flags: W
@@ -23764,7 +24226,7 @@ Validated: 1
EndChar
StartChar: uni2465
-Encoding: 9317 9317 201
+Encoding: 198 9317 201
Width: 1840
GlyphClass: 2
Flags: W
@@ -23961,7 +24423,7 @@ Validated: 1
EndChar
StartChar: uni2466
-Encoding: 9318 9318 202
+Encoding: 199 9318 202
Width: 1802
GlyphClass: 2
Flags: W
@@ -24102,7 +24564,7 @@ Validated: 1
EndChar
StartChar: uni2467
-Encoding: 9319 9319 203
+Encoding: 200 9319 203
Width: 1786
GlyphClass: 2
Flags: W
@@ -24299,7 +24761,7 @@ Validated: 1
EndChar
StartChar: uni2468
-Encoding: 9320 9320 204
+Encoding: 201 9320 204
Width: 1792
GlyphClass: 2
Flags: W
@@ -24496,7 +24958,7 @@ Validated: 1
EndChar
StartChar: uni2469
-Encoding: 9321 9321 205
+Encoding: 202 9321 205
Width: 1816
GlyphClass: 3
Flags: W
@@ -24713,7 +25175,7 @@ Validated: 1
EndChar
StartChar: uni24EA
-Encoding: 9450 9450 206
+Encoding: 203 9450 206
Width: 1826
GlyphClass: 2
Flags: W
@@ -24869,7 +25331,7 @@ Validated: 1
EndChar
StartChar: SF100000
-Encoding: 9472 9472 207
+Encoding: 204 9472 207
Width: 1628
GlyphClass: 2
Flags: W
@@ -24910,7 +25372,7 @@ Validated: 1
EndChar
StartChar: uni2501
-Encoding: 9473 9473 208
+Encoding: 205 9473 208
Width: 681
GlyphClass: 2
Flags: W
@@ -24959,7 +25421,7 @@ Validated: 1
EndChar
StartChar: SF110000
-Encoding: 9474 9474 209
+Encoding: 206 9474 209
Width: 741
GlyphClass: 2
Flags: W
@@ -25001,7 +25463,7 @@ Validated: 1
EndChar
StartChar: uni2503
-Encoding: 9475 9475 210
+Encoding: 207 9475 210
Width: 567
GlyphClass: 2
Flags: W
@@ -25043,7 +25505,7 @@ Validated: 1
EndChar
StartChar: filledbox
-Encoding: 9632 9632 211
+Encoding: 208 9632 211
Width: 1531
GlyphClass: 2
Flags: W
@@ -25094,7 +25556,7 @@ Validated: 1
EndChar
StartChar: H22073
-Encoding: 9633 9633 212
+Encoding: 209 9633 212
Width: 1826
GlyphClass: 2
Flags: W
@@ -25162,7 +25624,7 @@ Validated: 1
EndChar
StartChar: triagup
-Encoding: 9650 9650 213
+Encoding: 212 9650 213
Width: 1903
GlyphClass: 2
Flags: W
@@ -25193,7 +25655,7 @@ Validated: 1
EndChar
StartChar: uni25B3
-Encoding: 9651 9651 214
+Encoding: 213 9651 214
Width: 1903
GlyphClass: 2
Flags: W
@@ -25236,7 +25698,7 @@ Validated: 1
EndChar
StartChar: uni25B4
-Encoding: 9652 9652 215
+Encoding: 214 9652 215
Width: 1351
GlyphClass: 2
Flags: W
@@ -25252,7 +25714,7 @@ Validated: 1
EndChar
StartChar: uni25B5
-Encoding: 9653 9653 216
+Encoding: 215 9653 216
Width: 1351
GlyphClass: 2
Flags: W
@@ -25293,7 +25755,7 @@ Validated: 1
EndChar
StartChar: uni25B6
-Encoding: 9654 9654 217
+Encoding: 216 9654 217
Width: 1903
GlyphClass: 2
Flags: W
@@ -25309,7 +25771,7 @@ Validated: 1
EndChar
StartChar: uni25B7
-Encoding: 9655 9655 218
+Encoding: 217 9655 218
Width: 1903
GlyphClass: 2
Flags: W
@@ -25350,7 +25812,7 @@ Validated: 1
EndChar
StartChar: uni25B8
-Encoding: 9656 9656 219
+Encoding: 218 9656 219
Width: 1351
GlyphClass: 2
Flags: W
@@ -25366,7 +25828,7 @@ Validated: 1
EndChar
StartChar: uni25B9
-Encoding: 9657 9657 220
+Encoding: 219 9657 220
Width: 1351
GlyphClass: 2
Flags: W
@@ -25407,7 +25869,7 @@ Validated: 1
EndChar
StartChar: triagrt
-Encoding: 9658 9658 221
+Encoding: 220 9658 221
Width: 1670
GlyphClass: 2
Flags: W
@@ -25423,7 +25885,7 @@ Validated: 1
EndChar
StartChar: uni25BB
-Encoding: 9659 9659 222
+Encoding: 221 9659 222
Width: 1670
GlyphClass: 2
Flags: W
@@ -25464,7 +25926,7 @@ Validated: 1
EndChar
StartChar: triagdn
-Encoding: 9660 9660 223
+Encoding: 222 9660 223
Width: 1903
GlyphClass: 2
Flags: W
@@ -25495,7 +25957,7 @@ Validated: 1
EndChar
StartChar: uni25BD
-Encoding: 9661 9661 224
+Encoding: 223 9661 224
Width: 1903
GlyphClass: 2
Flags: W
@@ -25536,7 +25998,7 @@ Validated: 1
EndChar
StartChar: uni25BE
-Encoding: 9662 9662 225
+Encoding: 224 9662 225
Width: 1351
GlyphClass: 2
Flags: W
@@ -25552,7 +26014,7 @@ Validated: 1
EndChar
StartChar: uni25BF
-Encoding: 9663 9663 226
+Encoding: 225 9663 226
Width: 1351
GlyphClass: 2
Flags: W
@@ -25593,7 +26055,7 @@ Validated: 1
EndChar
StartChar: uni25C0
-Encoding: 9664 9664 227
+Encoding: 226 9664 227
Width: 1903
GlyphClass: 2
Flags: W
@@ -25609,7 +26071,7 @@ Validated: 1
EndChar
StartChar: uni25C1
-Encoding: 9665 9665 228
+Encoding: 227 9665 228
Width: 1903
GlyphClass: 2
Flags: W
@@ -25650,7 +26112,7 @@ Validated: 1
EndChar
StartChar: uni25C2
-Encoding: 9666 9666 229
+Encoding: 228 9666 229
Width: 1351
GlyphClass: 2
Flags: W
@@ -25666,7 +26128,7 @@ Validated: 1
EndChar
StartChar: uni25C3
-Encoding: 9667 9667 230
+Encoding: 229 9667 230
Width: 1351
GlyphClass: 2
Flags: W
@@ -25707,7 +26169,7 @@ Validated: 1
EndChar
StartChar: triaglf
-Encoding: 9668 9668 231
+Encoding: 230 9668 231
Width: 1670
GlyphClass: 2
Flags: W
@@ -25723,7 +26185,7 @@ Validated: 1
EndChar
StartChar: uni25C5
-Encoding: 9669 9669 232
+Encoding: 231 9669 232
Width: 1670
GlyphClass: 2
Flags: W
@@ -25764,7 +26226,7 @@ Validated: 1
EndChar
StartChar: circle
-Encoding: 9675 9675 233
+Encoding: 232 9675 233
Width: 1628
GlyphClass: 2
Flags: W
@@ -25860,7 +26322,7 @@ Validated: 1
EndChar
StartChar: H18533
-Encoding: 9679 9679 234
+Encoding: 233 9679 234
Width: 1628
GlyphClass: 2
Flags: W
@@ -25922,7 +26384,7 @@ Validated: 1
EndChar
StartChar: uni25D7
-Encoding: 9687 9687 235
+Encoding: 234 9687 235
Width: 897
GlyphClass: 2
Flags: W
@@ -25964,12 +26426,12 @@ Validated: 1
EndChar
StartChar: uni260E
-Encoding: 9742 9742 236
+Encoding: 236 9742 236
Width: 2154
GlyphClass: 2
Flags: W
-HStem: 86 145<584 1571> 272 187<883.292 1266.71> 477 96<930.112 1029.89 1092.97 1190.99> 524 97<1217.11 1316.89> 549 96<797.112 896.892> 559 281<932.061 1214.59> 635 96<1286.11 1385.89> 694 97<768.199 867.809> 754 96<1253.11 1353.89> 797 96<854.112 953.892> 823 97<1149.11 1248.89> 844 96<995.108 1095.89> 952 232<883.292 1267.67> 967 131<125.627 517.962 1628.9 2026.96> 985 135<138.312 253.407 261.03 286.045 292.92 499.341 1644.65 1839.17 1846.33 2013.45> 1348 331<808.186 1331.85>
-VStem: 393 350<161 763.5> 768 100<694.184 790.805> 797 100<549.184 644.809> 854 100<797.184 892.809> 930 100<477.184 572.809> 995 101<844.299 939.713> 1092 100<467.191 562.816> 1149 100<823.191 919.812> 1217 100<524.191 620.812> 1253 101<754.287 849.701> 1286 100<635.191 730.816> 1405 346<176 765.5>
+HStem: 21 145<584 1571> 207 187<883.292 1266.71> 412 96<930.112 1029.89 1092.97 1190.99> 459 97<1217.11 1316.89> 484 96<797.112 896.892> 494 281<932.061 1214.59> 570 96<1286.11 1385.89> 629 97<768.199 867.809> 689 96<1253.11 1353.89> 732 96<854.112 953.892> 758 97<1149.11 1248.89> 779 96<995.108 1095.89> 887 232<883.292 1267.67> 902 131<125.627 517.962 1628.9 2026.96> 920 135<138.312 253.407 261.03 286.045 292.92 499.341 1644.65 1839.17 1846.33 2013.45> 1283 331<808.186 1331.85>
+VStem: 393 350<96 698.5> 768 100<629.184 725.805> 797 100<484.184 579.809> 854 100<732.184 827.809> 930 100<412.184 507.809> 995 101<779.299 874.713> 1092 100<402.191 497.816> 1149 100<758.191 854.812> 1217 100<459.191 555.812> 1253 101<689.287 784.701> 1286 100<570.191 665.816> 1405 346<111 700.5>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -26022,7 +26484,9 @@ PUSHB_1
SRP0
PUSHB_1
114
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
110
MDRP[min,rnd,black]
@@ -26055,7 +26519,9 @@ PUSHB_1
SRP0
PUSHB_1
133
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
137
MDRP[min,rnd,black]
@@ -26070,7 +26536,9 @@ PUSHB_1
SRP0
PUSHB_1
90
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
86
MDRP[min,rnd,black]
@@ -26096,7 +26564,9 @@ SHP[rp2]
SHP[rp2]
PUSHB_1
60
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
54
MDRP[min,rnd,black]
@@ -26105,7 +26575,9 @@ PUSHB_1
SRP0
PUSHB_1
175
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
4
SHP[rp1]
@@ -26143,7 +26615,9 @@ PUSHB_1
MDRP[min,rnd,black]
PUSHB_1
167
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
163
MDRP[min,rnd,black]
@@ -26224,7 +26698,9 @@ PUSHB_1
SRP0
PUSHB_1
76
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
80
MDRP[min,rnd,black]
@@ -26273,6 +26749,22 @@ PUSHB_2
IP
IP
PUSHB_2
+ 131
+ 135
+SRP1
+SRP2
+PUSHB_1
+ 67
+IP
+PUSHB_2
+ 155
+ 159
+SRP1
+SRP2
+PUSHB_1
+ 127
+IP
+PUSHB_2
100
104
SRP1
@@ -26437,128 +26929,128 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-2056 1106 m 1,0,1
- 2056 1013 2056 1013 1989 985 c 0,2,3
- 1950 967 1950 967 1843 967 c 0,4,5
- 1720 967 1720 967 1669 987 c 0,6,7
- 1585 1020 1585 1020 1579 1120 c 1,8,9
- 1724 1096 1724 1096 1871 1097 c 0,10,11
- 1963 1097 1963 1097 2056 1106 c 1,0,1
-2056 1155 m 1,12,13
- 1986 1145 1986 1145 1919 1145 c 0,14,15
- 1890 1145 1890 1145 1554 1171 c 1,16,17
- 1542 1268 1542 1268 1409 1292 c 1,18,-1
- 1413 1149 l 1,19,20
- 1540 1026 1540 1026 1647 735 c 0,21,22
- 1751 453 1751 453 1751 266 c 0,23,24
- 1751 86 1751 86 1683 86 c 2,25,-1
- 479 86 l 2,26,27
- 393 86 393 86 393 236 c 0,28,29
- 393 422 393 422 500 719 c 0,30,31
- 612 1027 612 1027 737 1149 c 1,32,-1
- 737 1292 l 1,33,34
- 607 1269 607 1269 594 1171 c 1,35,36
- 481 1145 481 1145 291 1145 c 0,37,38
- 159 1145 159 1145 92 1155 c 1,39,40
- 103 1439 103 1439 266 1542 c 0,41,42
- 375 1612 375 1612 657 1651 c 0,43,44
- 869 1679 869 1679 1075 1679 c 0,45,46
- 1660 1679 1660 1679 1882 1542 c 0,47,48
- 2050 1440 2050 1440 2056 1155 c 1,12,13
-1339 1307 m 1,49,50
- 1192 1348 1192 1348 1071 1348 c 0,51,52
- 956 1348 956 1348 803 1307 c 1,53,-1
- 852 1184 l 1,54,-1
- 1292 1184 l 1,55,-1
- 1339 1307 l 1,49,50
-1405 707 m 128,-1,57
- 1405 824 1405 824 1294 893 c 0,58,59
- 1203 952 1203 952 1075 952 c 0,60,61
- 951 952 951 952 856 891 c 0,62,63
- 743 820 743 820 743 707 c 0,64,65
- 743 591 743 591 856 520 c 0,66,67
- 951 459 951 459 1075 459 c 128,-1,68
- 1199 459 1199 459 1294 520 c 0,69,56
- 1405 590 1405 590 1405 707 c 128,-1,57
-1571 231 m 1,70,-1
- 1591 252 l 1,71,-1
- 1571 272 l 1,72,-1
- 584 272 l 1,73,-1
- 563 252 l 1,74,-1
- 584 231 l 1,75,-1
- 1571 231 l 1,70,-1
-1354 801 m 0,76,77
- 1354 754 1354 754 1305 754 c 0,78,79
- 1253 754 1253 754 1253 801 c 0,80,81
- 1253 850 1253 850 1305 850 c 0,82,83
- 1354 850 1354 850 1354 801 c 0,76,77
-1249 872 m 0,84,85
- 1249 823 1249 823 1198 823 c 0,86,87
- 1149 823 1149 823 1149 872 c 0,88,89
- 1149 920 1149 920 1198 920 c 0,90,91
- 1249 920 1249 920 1249 872 c 0,84,85
-1386 684 m 0,92,93
- 1386 635 1386 635 1335 635 c 0,94,95
- 1286 635 1286 635 1286 684 c 0,96,97
- 1286 731 1286 731 1335 731 c 0,98,99
- 1386 731 1386 731 1386 684 c 0,92,93
-1096 893 m 0,100,101
- 1096 844 1096 844 1044 844 c 0,102,103
- 995 844 995 844 995 893 c 0,104,105
- 995 940 995 940 1044 940 c 0,106,107
- 1096 940 1096 940 1096 893 c 0,100,101
-1317 573 m 0,108,109
- 1317 524 1317 524 1266 524 c 0,110,111
- 1217 524 1217 524 1217 573 c 0,112,113
- 1217 621 1217 621 1266 621 c 0,114,115
- 1317 621 1317 621 1317 573 c 0,108,109
-1280 709 m 0,116,117
- 1280 645 1280 645 1206 598 c 0,118,119
- 1142 559 1142 559 1071 559 c 0,120,121
- 1001 559 1001 559 940 598 c 0,122,123
- 868 643 868 643 868 709 c 0,124,125
- 868 774 868 774 946 811 c 0,126,127
- 1009 840 1009 840 1079 840 c 128,-1,128
- 1149 840 1149 840 1208 809 c 0,129,130
- 1280 774 1280 774 1280 709 c 0,116,117
-954 844 m 0,131,132
- 954 797 954 797 905 797 c 0,133,134
- 854 797 854 797 854 844 c 0,135,136
- 854 893 854 893 905 893 c 0,137,138
- 954 893 954 893 954 844 c 0,131,132
-1192 516 m 0,139,140
- 1192 467 1192 467 1141 467 c 0,141,142
- 1092 467 1092 467 1092 516 c 0,143,144
- 1092 563 1092 563 1141 563 c 0,145,146
- 1192 563 1192 563 1192 516 c 0,139,140
-868 741 m 0,147,148
- 868 694 868 694 819 694 c 0,149,150
- 768 694 768 694 768 741 c 0,151,152
- 768 791 768 791 819 791 c 0,153,154
- 868 791 868 791 868 741 c 0,147,148
-1030 524 m 0,155,156
- 1030 477 1030 477 981 477 c 0,157,158
- 930 477 930 477 930 524 c 0,159,160
- 930 573 930 573 981 573 c 0,161,162
- 1030 573 1030 573 1030 524 c 0,155,156
-897 596 m 0,163,164
- 897 549 897 549 848 549 c 0,165,166
- 797 549 797 549 797 596 c 0,167,168
- 797 645 797 645 848 645 c 0,169,170
- 897 645 897 645 897 596 c 0,163,164
-571 1120 m 1,171,172
- 565 1020 565 1020 469 985 c 0,173,174
- 415 967 415 967 289 967 c 0,175,176
- 194 967 194 967 154 989 c 0,177,178
- 94 1020 94 1020 94 1106 c 1,179,180
- 173 1098 173 1098 256 1098 c 0,181,182
- 417 1098 417 1098 571 1120 c 1,171,172
-EndSplineSet
-Validated: 37
+2056 1041 m 5,0,1
+ 2056 948 2056 948 1989 920 c 4,2,3
+ 1950 902 1950 902 1843 902 c 4,4,5
+ 1720 902 1720 902 1669 922 c 4,6,7
+ 1585 955 1585 955 1579 1055 c 5,8,9
+ 1724 1031 1724 1031 1871 1032 c 4,10,11
+ 1963 1032 1963 1032 2056 1041 c 5,0,1
+2056 1090 m 5,12,13
+ 1986 1080 1986 1080 1919 1080 c 4,14,15
+ 1890 1080 1890 1080 1554 1106 c 5,16,17
+ 1542 1203 1542 1203 1409 1227 c 5,18,-1
+ 1413 1084 l 5,19,20
+ 1540 961 1540 961 1647 670 c 4,21,22
+ 1751 388 1751 388 1751 201 c 4,23,24
+ 1751 21 1751 21 1683 21 c 6,25,-1
+ 479 21 l 6,26,27
+ 393 21 393 21 393 171 c 4,28,29
+ 393 357 393 357 500 654 c 4,30,31
+ 612 962 612 962 737 1084 c 5,32,-1
+ 737 1227 l 5,33,34
+ 607 1204 607 1204 594 1106 c 5,35,36
+ 481 1080 481 1080 291 1080 c 4,37,38
+ 159 1080 159 1080 92 1090 c 5,39,40
+ 103 1374 103 1374 266 1477 c 4,41,42
+ 375 1547 375 1547 657 1586 c 4,43,44
+ 869 1614 869 1614 1075 1614 c 4,45,46
+ 1660 1614 1660 1614 1882 1477 c 4,47,48
+ 2050 1375 2050 1375 2056 1090 c 5,12,13
+1339 1242 m 5,49,50
+ 1192 1283 1192 1283 1071 1283 c 4,51,52
+ 956 1283 956 1283 803 1242 c 5,53,-1
+ 852 1119 l 5,54,-1
+ 1292 1119 l 5,55,-1
+ 1339 1242 l 5,49,50
+1405 642 m 132,-1,57
+ 1405 759 1405 759 1294 828 c 4,58,59
+ 1203 887 1203 887 1075 887 c 4,60,61
+ 951 887 951 887 856 826 c 4,62,63
+ 743 755 743 755 743 642 c 4,64,65
+ 743 526 743 526 856 455 c 4,66,67
+ 951 394 951 394 1075 394 c 132,-1,68
+ 1199 394 1199 394 1294 455 c 4,69,56
+ 1405 525 1405 525 1405 642 c 132,-1,57
+1571 166 m 5,70,-1
+ 1591 187 l 5,71,-1
+ 1571 207 l 5,72,-1
+ 584 207 l 5,73,-1
+ 563 187 l 5,74,-1
+ 584 166 l 5,75,-1
+ 1571 166 l 5,70,-1
+1354 736 m 4,76,77
+ 1354 689 1354 689 1305 689 c 4,78,79
+ 1253 689 1253 689 1253 736 c 4,80,81
+ 1253 785 1253 785 1305 785 c 4,82,83
+ 1354 785 1354 785 1354 736 c 4,76,77
+1249 807 m 4,84,85
+ 1249 758 1249 758 1198 758 c 4,86,87
+ 1149 758 1149 758 1149 807 c 4,88,89
+ 1149 855 1149 855 1198 855 c 4,90,91
+ 1249 855 1249 855 1249 807 c 4,84,85
+1386 619 m 4,92,93
+ 1386 570 1386 570 1335 570 c 4,94,95
+ 1286 570 1286 570 1286 619 c 4,96,97
+ 1286 666 1286 666 1335 666 c 4,98,99
+ 1386 666 1386 666 1386 619 c 4,92,93
+1096 828 m 4,100,101
+ 1096 779 1096 779 1044 779 c 4,102,103
+ 995 779 995 779 995 828 c 4,104,105
+ 995 875 995 875 1044 875 c 4,106,107
+ 1096 875 1096 875 1096 828 c 4,100,101
+1317 508 m 4,108,109
+ 1317 459 1317 459 1266 459 c 4,110,111
+ 1217 459 1217 459 1217 508 c 4,112,113
+ 1217 556 1217 556 1266 556 c 4,114,115
+ 1317 556 1317 556 1317 508 c 4,108,109
+1280 644 m 4,116,117
+ 1280 580 1280 580 1206 533 c 4,118,119
+ 1142 494 1142 494 1071 494 c 4,120,121
+ 1001 494 1001 494 940 533 c 4,122,123
+ 868 578 868 578 868 644 c 4,124,125
+ 868 709 868 709 946 746 c 4,126,127
+ 1009 775 1009 775 1079 775 c 132,-1,128
+ 1149 775 1149 775 1208 744 c 4,129,130
+ 1280 709 1280 709 1280 644 c 4,116,117
+954 779 m 4,131,132
+ 954 732 954 732 905 732 c 4,133,134
+ 854 732 854 732 854 779 c 4,135,136
+ 854 828 854 828 905 828 c 4,137,138
+ 954 828 954 828 954 779 c 4,131,132
+1192 451 m 4,139,140
+ 1192 402 1192 402 1141 402 c 4,141,142
+ 1092 402 1092 402 1092 451 c 4,143,144
+ 1092 498 1092 498 1141 498 c 4,145,146
+ 1192 498 1192 498 1192 451 c 4,139,140
+868 676 m 4,147,148
+ 868 629 868 629 819 629 c 4,149,150
+ 768 629 768 629 768 676 c 4,151,152
+ 768 726 768 726 819 726 c 4,153,154
+ 868 726 868 726 868 676 c 4,147,148
+1030 459 m 4,155,156
+ 1030 412 1030 412 981 412 c 4,157,158
+ 930 412 930 412 930 459 c 4,159,160
+ 930 508 930 508 981 508 c 4,161,162
+ 1030 508 1030 508 1030 459 c 4,155,156
+897 531 m 4,163,164
+ 897 484 897 484 848 484 c 4,165,166
+ 797 484 797 484 797 531 c 4,167,168
+ 797 580 797 580 848 580 c 4,169,170
+ 897 580 897 580 897 531 c 4,163,164
+571 1055 m 5,171,172
+ 565 955 565 955 469 920 c 4,173,174
+ 415 902 415 902 289 902 c 4,175,176
+ 194 902 194 902 154 924 c 4,177,178
+ 94 955 94 955 94 1041 c 5,179,180
+ 173 1033 173 1033 256 1033 c 4,181,182
+ 417 1033 417 1033 571 1055 c 5,171,172
+EndSplineSet
+Validated: 16421
EndChar
StartChar: uni2611
-Encoding: 9745 9745 237
+Encoding: 237 9745 237
Width: 1826
GlyphClass: 2
Flags: W
@@ -26651,7 +27143,7 @@ Validated: 1
EndChar
StartChar: uni2612
-Encoding: 9746 9746 238
+Encoding: 238 9746 238
Width: 1826
GlyphClass: 2
Flags: W
@@ -26778,7 +27270,7 @@ Validated: 1
EndChar
StartChar: uni261B
-Encoding: 9755 9755 239
+Encoding: 239 9755 239
Width: 1581
GlyphClass: 2
Flags: W
@@ -26867,7 +27359,7 @@ Validated: 1
EndChar
StartChar: uni261E
-Encoding: 9758 9758 240
+Encoding: 240 9758 240
Width: 2037
GlyphClass: 2
Flags: W
@@ -27034,7 +27526,7 @@ Validated: 1
EndChar
StartChar: uni2639
-Encoding: 9785 9785 241
+Encoding: 241 9785 241
Width: 1728
GlyphClass: 2
Flags: W
@@ -27241,7 +27733,7 @@ Validated: 1
EndChar
StartChar: smileface
-Encoding: 9786 9786 242
+Encoding: 242 9786 242
Width: 1728
GlyphClass: 2
Flags: W
@@ -27447,7 +27939,7 @@ Validated: 1
EndChar
StartChar: sun
-Encoding: 9788 9788 243
+Encoding: 243 9788 243
Width: 1752
GlyphClass: 2
Flags: W
@@ -27489,7 +27981,7 @@ Validated: 1
EndChar
StartChar: spade
-Encoding: 9824 9824 244
+Encoding: 244 9824 244
Width: 1282
GlyphClass: 2
Flags: W
@@ -27546,7 +28038,7 @@ Validated: 1
EndChar
StartChar: club
-Encoding: 9827 9827 245
+Encoding: 245 9827 245
Width: 1589
GlyphClass: 2
Flags: W
@@ -27681,7 +28173,7 @@ Validated: 1
EndChar
StartChar: heart
-Encoding: 9829 9829 246
+Encoding: 246 9829 246
Width: 1421
GlyphClass: 2
Flags: W
@@ -27725,7 +28217,7 @@ Validated: 1
EndChar
StartChar: diamond
-Encoding: 9830 9830 247
+Encoding: 247 9830 247
Width: 1179
GlyphClass: 2
Flags: W
@@ -27757,7 +28249,7 @@ Validated: 1
EndChar
StartChar: uni2702
-Encoding: 9986 9986 248
+Encoding: 248 9986 248
Width: 1968
GlyphClass: 2
Flags: W
@@ -27959,7 +28451,7 @@ Validated: 1
EndChar
StartChar: uni2708
-Encoding: 9992 9992 249
+Encoding: 249 9992 249
Width: 1619
GlyphClass: 2
Flags: W
@@ -28050,7 +28542,7 @@ Validated: 1
EndChar
StartChar: uni270D
-Encoding: 9997 9997 250
+Encoding: 250 9997 250
Width: 1376
GlyphClass: 2
Flags: W
@@ -28364,7 +28856,7 @@ Validated: 1
EndChar
StartChar: uni270E
-Encoding: 9998 9998 251
+Encoding: 251 9998 251
Width: 1515
GlyphClass: 2
Flags: W
@@ -28680,7 +29172,7 @@ Validated: 1
EndChar
StartChar: uni2713
-Encoding: 10003 10003 252
+Encoding: 252 10003 252
Width: 1613
GlyphClass: 2
Flags: W
@@ -28701,7 +29193,7 @@ Validated: 1
EndChar
StartChar: uni2714
-Encoding: 10004 10004 253
+Encoding: 253 10004 253
Width: 1343
GlyphClass: 2
Flags: W
@@ -28781,7 +29273,7 @@ Validated: 1
EndChar
StartChar: uni2717
-Encoding: 10007 10007 254
+Encoding: 254 10007 254
Width: 983
GlyphClass: 2
Flags: W
@@ -28818,7 +29310,7 @@ Validated: 1
EndChar
StartChar: uni2718
-Encoding: 10008 10008 255
+Encoding: 255 10008 255
Width: 1056
GlyphClass: 2
Flags: W
@@ -28861,7 +29353,7 @@ Validated: 1
EndChar
StartChar: uni2719
-Encoding: 10009 10009 256
+Encoding: 256 10009 256
Width: 1196
GlyphClass: 2
Flags: W
@@ -29086,7 +29578,7 @@ Validated: 1
EndChar
StartChar: uni271A
-Encoding: 10010 10010 257
+Encoding: 257 10010 257
Width: 1196
GlyphClass: 2
Flags: W
@@ -29184,7 +29676,7 @@ Validated: 1
EndChar
StartChar: uni271B
-Encoding: 10011 10011 258
+Encoding: 258 10011 258
Width: 1196
GlyphClass: 2
Flags: W
@@ -29274,7 +29766,7 @@ Validated: 1
EndChar
StartChar: uni271C
-Encoding: 10012 10012 259
+Encoding: 259 10012 259
Width: 1163
GlyphClass: 2
Flags: W
@@ -29386,7 +29878,7 @@ Validated: 1
EndChar
StartChar: uni2721
-Encoding: 10017 10017 260
+Encoding: 260 10017 260
Width: 1417
GlyphClass: 2
Flags: W
@@ -29504,7 +29996,7 @@ Validated: 1
EndChar
StartChar: uni2722
-Encoding: 10018 10018 261
+Encoding: 261 10018 261
Width: 1163
GlyphClass: 2
Flags: W
@@ -29648,7 +30140,7 @@ Validated: 1
EndChar
StartChar: uni2723
-Encoding: 10019 10019 262
+Encoding: 262 10019 262
Width: 1179
GlyphClass: 2
Flags: W
@@ -29828,7 +30320,7 @@ Validated: 1
EndChar
StartChar: uni2724
-Encoding: 10020 10020 263
+Encoding: 263 10020 263
Width: 1163
GlyphClass: 2
Flags: W
@@ -29963,7 +30455,7 @@ Validated: 1
EndChar
StartChar: uni2725
-Encoding: 10021 10021 264
+Encoding: 264 10021 264
Width: 1179
GlyphClass: 2
Flags: W
@@ -30321,7 +30813,7 @@ Validated: 33
EndChar
StartChar: uni272B
-Encoding: 10027 10027 265
+Encoding: 265 10027 265
Width: 1286
GlyphClass: 2
Flags: W
@@ -30354,7 +30846,7 @@ Validated: 1
EndChar
StartChar: uni272C
-Encoding: 10028 10028 266
+Encoding: 266 10028 266
Width: 1269
GlyphClass: 2
Flags: W
@@ -30399,7 +30891,7 @@ Validated: 1
EndChar
StartChar: uni272D
-Encoding: 10029 10029 267
+Encoding: 267 10029 267
Width: 1212
GlyphClass: 2
Flags: W
@@ -30452,7 +30944,7 @@ Validated: 1
EndChar
StartChar: uni272E
-Encoding: 10030 10030 268
+Encoding: 268 10030 268
Width: 1212
GlyphClass: 2
Flags: W
@@ -30620,7 +31112,7 @@ Validated: 1
EndChar
StartChar: uni272F
-Encoding: 10031 10031 269
+Encoding: 269 10031 269
Width: 1245
GlyphClass: 2
Flags: W
@@ -30695,7 +31187,7 @@ Validated: 1
EndChar
StartChar: uni2730
-Encoding: 10032 10032 270
+Encoding: 270 10032 270
Width: 1392
GlyphClass: 2
Flags: W
@@ -30768,7 +31260,7 @@ Validated: 1
EndChar
StartChar: uni2733
-Encoding: 10035 10035 271
+Encoding: 271 10035 271
Width: 1114
GlyphClass: 2
Flags: W
@@ -30880,7 +31372,7 @@ Validated: 1
EndChar
StartChar: uni2734
-Encoding: 10036 10036 272
+Encoding: 272 10036 272
Width: 1179
GlyphClass: 2
Flags: W
@@ -30956,7 +31448,7 @@ Validated: 1
EndChar
StartChar: uni2735
-Encoding: 10037 10037 273
+Encoding: 273 10037 273
Width: 1179
GlyphClass: 2
Flags: W
@@ -31161,7 +31653,7 @@ Validated: 1
EndChar
StartChar: uni2736
-Encoding: 10038 10038 274
+Encoding: 274 10038 274
Width: 1040
GlyphClass: 2
Flags: W
@@ -31198,7 +31690,7 @@ Validated: 1
EndChar
StartChar: uni2737
-Encoding: 10039 10039 275
+Encoding: 275 10039 275
Width: 1163
GlyphClass: 2
Flags: W
@@ -31242,7 +31734,7 @@ Validated: 1
EndChar
StartChar: uni2738
-Encoding: 10040 10040 276
+Encoding: 276 10040 276
Width: 1179
GlyphClass: 2
Flags: W
@@ -31286,7 +31778,7 @@ Validated: 1
EndChar
StartChar: uni2739
-Encoding: 10041 10041 277
+Encoding: 277 10041 277
Width: 1236
GlyphClass: 2
Flags: W
@@ -31323,7 +31815,7 @@ Validated: 1
EndChar
StartChar: uni273F
-Encoding: 10047 10047 278
+Encoding: 278 10047 278
Width: 1691
GlyphClass: 2
Flags: W
@@ -31507,7 +31999,7 @@ Validated: 1
EndChar
StartChar: uni2741
-Encoding: 10049 10049 279
+Encoding: 279 10049 279
Width: 1848
GlyphClass: 2
Flags: W
@@ -31997,7 +32489,7 @@ Validated: 33
EndChar
StartChar: uni2744
-Encoding: 10052 10052 280
+Encoding: 280 10052 280
Width: 1406
GlyphClass: 2
Flags: W
@@ -32267,7 +32759,7 @@ Validated: 1
EndChar
StartChar: uni274D
-Encoding: 10061 10061 281
+Encoding: 281 10061 281
Width: 1949
GlyphClass: 2
Flags: W
@@ -32363,7 +32855,7 @@ Validated: 1
EndChar
StartChar: uni274F
-Encoding: 10063 10063 282
+Encoding: 282 10063 282
Width: 1130
GlyphClass: 2
Flags: W
@@ -32464,7 +32956,7 @@ Validated: 1
EndChar
StartChar: uni2750
-Encoding: 10064 10064 283
+Encoding: 283 10064 283
Width: 1146
GlyphClass: 2
Flags: W
@@ -32562,7 +33054,7 @@ Validated: 1
EndChar
StartChar: uni2751
-Encoding: 10065 10065 284
+Encoding: 284 10065 284
Width: 1826
GlyphClass: 2
Flags: W
@@ -32660,7 +33152,7 @@ Validated: 1
EndChar
StartChar: uni2752
-Encoding: 10066 10066 285
+Encoding: 285 10066 285
Width: 1826
GlyphClass: 2
Flags: W
@@ -32758,7 +33250,7 @@ Validated: 1
EndChar
StartChar: uni2756
-Encoding: 10070 10070 286
+Encoding: 286 10070 286
Width: 1179
GlyphClass: 2
Flags: W
@@ -32790,7 +33282,7 @@ Validated: 1
EndChar
StartChar: uni2759
-Encoding: 10073 10073 287
+Encoding: 287 10073 287
Width: 567
GlyphClass: 2
Flags: W
@@ -32832,7 +33324,7 @@ Validated: 1
EndChar
StartChar: uni2762
-Encoding: 10082 10082 288
+Encoding: 288 10082 288
Width: 1114
GlyphClass: 2
Flags: W
@@ -32956,7 +33448,7 @@ Validated: 1
EndChar
StartChar: uni2780
-Encoding: 10112 10112 289
+Encoding: 289 10112 289
Width: 1826
GlyphClass: 2
Flags: W
@@ -33105,7 +33597,7 @@ Validated: 1
EndChar
StartChar: uni2781
-Encoding: 10113 10113 290
+Encoding: 290 10113 290
Width: 1826
GlyphClass: 2
Flags: W
@@ -33275,7 +33767,7 @@ Validated: 1
EndChar
StartChar: uni2782
-Encoding: 10114 10114 291
+Encoding: 291 10114 291
Width: 1826
GlyphClass: 2
Flags: W
@@ -33478,7 +33970,7 @@ Validated: 1
EndChar
StartChar: uni2783
-Encoding: 10115 10115 292
+Encoding: 292 10115 292
Width: 1826
GlyphClass: 2
Flags: W
@@ -33677,7 +34169,7 @@ Validated: 1
EndChar
StartChar: uni2784
-Encoding: 10116 10116 293
+Encoding: 293 10116 293
Width: 1826
GlyphClass: 2
Flags: W
@@ -33870,7 +34362,7 @@ Validated: 1
EndChar
StartChar: uni2785
-Encoding: 10117 10117 294
+Encoding: 294 10117 294
Width: 1826
GlyphClass: 2
Flags: W
@@ -34059,7 +34551,7 @@ Validated: 1
EndChar
StartChar: uni2786
-Encoding: 10118 10118 295
+Encoding: 295 10118 295
Width: 1826
GlyphClass: 2
Flags: W
@@ -34200,7 +34692,7 @@ Validated: 1
EndChar
StartChar: uni2787
-Encoding: 10119 10119 296
+Encoding: 296 10119 296
Width: 1826
GlyphClass: 2
Flags: W
@@ -34396,7 +34888,7 @@ Validated: 1
EndChar
StartChar: uni2788
-Encoding: 10120 10120 297
+Encoding: 297 10120 297
Width: 1826
GlyphClass: 2
Flags: W
@@ -34589,7 +35081,7 @@ Validated: 33
EndChar
StartChar: uni2789
-Encoding: 10121 10121 298
+Encoding: 298 10121 298
Width: 1826
GlyphClass: 2
Flags: W
@@ -34802,7 +35294,7 @@ Validated: 1
EndChar
StartChar: uni278A
-Encoding: 10122 10122 299
+Encoding: 299 10122 299
Width: 1826
GlyphClass: 2
Flags: W
@@ -34876,7 +35368,7 @@ Validated: 1
EndChar
StartChar: uni278B
-Encoding: 10123 10123 300
+Encoding: 300 10123 300
Width: 1826
GlyphClass: 2
Flags: W
@@ -34983,7 +35475,7 @@ Validated: 1
EndChar
StartChar: uni278C
-Encoding: 10124 10124 301
+Encoding: 301 10124 301
Width: 1826
GlyphClass: 2
Flags: W
@@ -35121,7 +35613,7 @@ Validated: 1
EndChar
StartChar: uni278D
-Encoding: 10125 10125 302
+Encoding: 302 10125 302
Width: 1826
GlyphClass: 2
Flags: W
@@ -35230,7 +35722,7 @@ Validated: 1
EndChar
StartChar: uni278E
-Encoding: 10126 10126 303
+Encoding: 303 10126 303
Width: 1826
GlyphClass: 2
Flags: W
@@ -35390,7 +35882,7 @@ Validated: 1
EndChar
StartChar: uni278F
-Encoding: 10127 10127 304
+Encoding: 304 10127 304
Width: 1826
GlyphClass: 2
Flags: W
@@ -35558,7 +36050,7 @@ Validated: 1
EndChar
StartChar: uni2790
-Encoding: 10128 10128 305
+Encoding: 305 10128 305
Width: 1826
GlyphClass: 2
Flags: W
@@ -35627,7 +36119,7 @@ Validated: 1
EndChar
StartChar: uni2791
-Encoding: 10129 10129 306
+Encoding: 306 10129 306
Width: 1826
GlyphClass: 2
Flags: W
@@ -35801,7 +36293,7 @@ Validated: 1
EndChar
StartChar: uni2792
-Encoding: 10130 10130 307
+Encoding: 307 10130 307
Width: 1826
GlyphClass: 2
Flags: W
@@ -35969,7 +36461,7 @@ Validated: 1
EndChar
StartChar: uni2793
-Encoding: 10131 10131 308
+Encoding: 308 10131 308
Width: 1826
GlyphClass: 2
Flags: W
@@ -36105,7 +36597,7 @@ Validated: 1
EndChar
StartChar: uni2794
-Encoding: 10132 10132 309
+Encoding: 309 10132 309
Width: 2187
GlyphClass: 2
Flags: W
@@ -36156,7 +36648,7 @@ Validated: 1
EndChar
StartChar: uni2798
-Encoding: 10136 10136 310
+Encoding: 310 10136 310
Width: 1531
GlyphClass: 2
Flags: W
@@ -36178,7 +36670,7 @@ Validated: 1
EndChar
StartChar: uni279A
-Encoding: 10138 10138 311
+Encoding: 311 10138 311
Width: 1531
GlyphClass: 2
Flags: W
@@ -36200,7 +36692,7 @@ Validated: 1
EndChar
StartChar: uni27A2
-Encoding: 10146 10146 312
+Encoding: 312 10146 312
Width: 1630
GlyphClass: 2
Flags: W
@@ -36221,7 +36713,7 @@ Validated: 1
EndChar
StartChar: uni27B2
-Encoding: 10162 10162 313
+Encoding: 313 10162 313
Width: 1826
GlyphClass: 2
Flags: W
@@ -36299,7 +36791,7 @@ Validated: 1
EndChar
StartChar: uni27B8
-Encoding: 10168 10168 314
+Encoding: 314 10168 314
Width: 1980
GlyphClass: 2
Flags: W
@@ -36387,7 +36879,7 @@ Validated: 1
EndChar
StartChar: uni301A
-Encoding: 12314 12314 315
+Encoding: 315 12314 315
Width: 770
GlyphClass: 2
Flags: W
@@ -36477,7 +36969,7 @@ Validated: 1
EndChar
StartChar: uni301B
-Encoding: 12315 12315 316
+Encoding: 316 12315 316
Width: 770
GlyphClass: 2
Flags: W
@@ -36567,7 +37059,7 @@ Validated: 1
EndChar
StartChar: uniE001
-Encoding: 57345 57345 317
+Encoding: 317 57345 317
Width: 942
GlyphClass: 2
Flags: W
@@ -36605,7 +37097,7 @@ Validated: 1
EndChar
StartChar: uniE002
-Encoding: 57346 57346 318
+Encoding: 318 57346 318
Width: 1531
GlyphClass: 2
Flags: W
@@ -36622,7 +37114,7 @@ Validated: 1
EndChar
StartChar: uniE003
-Encoding: 57347 57347 319
+Encoding: 319 57347 319
Width: 2023
GlyphClass: 2
Flags: W
@@ -36639,7 +37131,7 @@ Validated: 1
EndChar
StartChar: uniE004
-Encoding: 57348 57348 320
+Encoding: 320 57348 320
Width: 1187
GlyphClass: 2
Flags: W
@@ -36656,7 +37148,7 @@ Validated: 1
EndChar
StartChar: uniE005
-Encoding: 57349 57349 321
+Encoding: 321 57349 321
Width: 1949
GlyphClass: 2
Flags: W
@@ -36754,7 +37246,7 @@ Validated: 1
EndChar
StartChar: uniE006
-Encoding: 57350 57350 322
+Encoding: 322 57350 322
Width: 2007
GlyphClass: 2
Flags: W
@@ -36805,7 +37297,7 @@ Validated: 1
EndChar
StartChar: uniE007
-Encoding: 57351 57351 323
+Encoding: 323 57351 323
Width: 1196
GlyphClass: 2
Flags: W
@@ -36831,7 +37323,7 @@ Validated: 1
EndChar
StartChar: uniE008
-Encoding: 57352 57352 324
+Encoding: 324 57352 324
Width: 1548
GlyphClass: 2
Flags: W
@@ -36886,7 +37378,7 @@ Validated: 1
EndChar
StartChar: uniE009
-Encoding: 57353 57353 325
+Encoding: 325 57353 325
Width: 1302
GlyphClass: 2
Flags: W
@@ -36979,7 +37471,7 @@ Validated: 1
EndChar
StartChar: uniE00A
-Encoding: 57354 57354 326
+Encoding: 326 57354 326
Width: 1146
GlyphClass: 2
Flags: W
@@ -37037,7 +37529,7 @@ Validated: 1
EndChar
StartChar: uniE00B
-Encoding: 57355 57355 327
+Encoding: 327 57355 327
Width: 1130
GlyphClass: 2
Flags: W
@@ -37135,7 +37627,7 @@ Validated: 1
EndChar
StartChar: uniE00C
-Encoding: 57356 57356 328
+Encoding: 328 57356 328
Width: 1179
GlyphClass: 2
Flags: W
@@ -37167,7 +37659,7 @@ Validated: 1
EndChar
StartChar: uniE00D
-Encoding: 57357 57357 329
+Encoding: 329 57357 329
Width: 1179
GlyphClass: 2
Flags: W
@@ -37199,7 +37691,7 @@ Validated: 1
EndChar
StartChar: uniE00E
-Encoding: 57358 57358 330
+Encoding: 330 57358 330
Width: 868
GlyphClass: 2
Flags: W
@@ -37216,7 +37708,7 @@ Validated: 1
EndChar
StartChar: uniE00F
-Encoding: 57359 57359 331
+Encoding: 331 57359 331
Width: 1826
GlyphClass: 2
Flags: W
@@ -37340,7 +37832,7 @@ Validated: 1
EndChar
StartChar: uniE010
-Encoding: 57360 57360 332
+Encoding: 332 57360 332
Width: 1826
GlyphClass: 2
Flags: W
@@ -37493,7 +37985,7 @@ Validated: 1
EndChar
StartChar: uniE011
-Encoding: 57361 57361 333
+Encoding: 333 57361 333
Width: 2179
GlyphClass: 2
Flags: W
@@ -37643,12 +38135,12 @@ Validated: 1
EndChar
StartChar: uniE012
-Encoding: 57362 57362 334
+Encoding: 334 57362 334
Width: 2195
GlyphClass: 2
Flags: W
-HStem: 80 270<217 371 504 657 770 924 1108 1235> 80 117<1530 2030> 498 118<217 371 504 657 770 924> 764 119<217 371 504 657 770 924> 1030 117<348 371 504 657 770 924 1108 1235> 1464 76<1530 2030> 1782 45<348 1243>
-VStem: 92 125<350 498 616 764 883 1030> 313 35<1540 1782> 371 133<350 498 616 764 883 1030> 657 113<350 498 616 764 883 1030> 924 184<362 498 616 764 883 1024> 1235 295<362 1024 1147 1464> 1243 45<1540 1782> 1589 385<250 1401> 2030 67<197 1464>
+HStem: 2 270<217 371 504 657 770 924 1108 1235> 2 117<1530 2030> 420 118<217 371 504 657 770 924> 686 119<217 371 504 657 770 924> 952 117<348 371 504 657 770 924 1108 1235> 1386 76<1530 2030> 1597 45<348 1243>
+VStem: 92 125<272 420 538 686 805 952> 313 35<1462 1597> 371 133<272 420 538 686 805 952> 657 113<272 420 538 686 805 952> 924 184<284 420 538 686 805 946> 1235 295<284 946 1069 1386> 1243 45<1462 1597> 1589 385<172 1323> 2030 67<119 1386>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -37874,86 +38366,86 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1530 1464 m 1,0,-1
- 1530 197 l 1,1,-1
- 2030 197 l 1,2,-1
- 2030 1464 l 1,3,-1
- 1530 1464 l 1,0,-1
-313 1540 m 1,4,-1
- 313 1827 l 1,5,-1
- 1288 1827 l 1,6,-1
- 1288 1540 l 1,7,-1
- 2097 1540 l 1,8,-1
- 2097 80 l 1,9,-1
- 92 80 l 1,10,-1
- 92 1540 l 1,11,-1
- 313 1540 l 1,4,-1
-1243 1147 m 1,12,-1
- 1243 1782 l 1,13,-1
- 348 1782 l 1,14,-1
- 348 1147 l 1,15,-1
- 1243 1147 l 1,12,-1
-217 1030 m 1,16,-1
- 217 883 l 1,17,-1
- 371 883 l 1,18,-1
- 371 1030 l 1,19,-1
- 217 1030 l 1,16,-1
-1108 1024 m 1,20,-1
- 1108 362 l 1,21,-1
- 1235 362 l 1,22,-1
- 1235 1024 l 1,23,-1
- 1108 1024 l 1,20,-1
-1589 1401 m 1,24,-1
- 1974 1401 l 1,25,-1
- 1974 250 l 1,26,-1
- 1589 250 l 1,27,-1
- 1589 1401 l 1,24,-1
-770 1030 m 1,28,-1
- 770 883 l 1,29,-1
- 924 883 l 1,30,-1
- 924 1030 l 1,31,-1
- 770 1030 l 1,28,-1
-504 1030 m 1,32,-1
- 504 883 l 1,33,-1
- 657 883 l 1,34,-1
- 657 1030 l 1,35,-1
- 504 1030 l 1,32,-1
-217 764 m 1,36,-1
- 217 616 l 1,37,-1
- 371 616 l 1,38,-1
- 371 764 l 1,39,-1
- 217 764 l 1,36,-1
-770 764 m 1,40,-1
- 770 616 l 1,41,-1
- 924 616 l 1,42,-1
- 924 764 l 1,43,-1
- 770 764 l 1,40,-1
-504 764 m 1,44,-1
- 504 616 l 1,45,-1
- 657 616 l 1,46,-1
- 657 764 l 1,47,-1
- 504 764 l 1,44,-1
-217 498 m 1,48,-1
- 217 350 l 1,49,-1
- 371 350 l 1,50,-1
- 371 498 l 1,51,-1
- 217 498 l 1,48,-1
-770 498 m 1,52,-1
- 770 350 l 1,53,-1
- 924 350 l 1,54,-1
- 924 498 l 1,55,-1
- 770 498 l 1,52,-1
-504 498 m 1,56,-1
- 504 350 l 1,57,-1
- 657 350 l 1,58,-1
- 657 498 l 1,59,-1
- 504 498 l 1,56,-1
-EndSplineSet
-Validated: 1
+1530 1386 m 1,0,-1
+ 1530 119 l 1,1,-1
+ 2030 119 l 1,2,-1
+ 2030 1386 l 1,3,-1
+ 1530 1386 l 1,0,-1
+313 1462 m 1,4,-1
+ 313 1642 l 1,5,-1
+ 1288 1642 l 1,6,-1
+ 1288 1462 l 1,7,-1
+ 2097 1462 l 1,8,-1
+ 2097 2 l 1,9,-1
+ 92 2 l 1,10,-1
+ 92 1462 l 1,11,-1
+ 313 1462 l 1,4,-1
+1243 1069 m 1,12,-1
+ 1243 1597 l 1,13,-1
+ 348 1597 l 1,14,-1
+ 348 1069 l 1,15,-1
+ 1243 1069 l 1,12,-1
+217 952 m 1,16,-1
+ 217 805 l 1,17,-1
+ 371 805 l 1,18,-1
+ 371 952 l 1,19,-1
+ 217 952 l 1,16,-1
+1108 946 m 1,20,-1
+ 1108 284 l 1,21,-1
+ 1235 284 l 1,22,-1
+ 1235 946 l 1,23,-1
+ 1108 946 l 1,20,-1
+1589 1323 m 1,24,-1
+ 1974 1323 l 1,25,-1
+ 1974 172 l 1,26,-1
+ 1589 172 l 1,27,-1
+ 1589 1323 l 1,24,-1
+770 952 m 1,28,-1
+ 770 805 l 1,29,-1
+ 924 805 l 1,30,-1
+ 924 952 l 1,31,-1
+ 770 952 l 1,28,-1
+504 952 m 1,32,-1
+ 504 805 l 1,33,-1
+ 657 805 l 1,34,-1
+ 657 952 l 1,35,-1
+ 504 952 l 1,32,-1
+217 686 m 1,36,-1
+ 217 538 l 1,37,-1
+ 371 538 l 1,38,-1
+ 371 686 l 1,39,-1
+ 217 686 l 1,36,-1
+770 686 m 1,40,-1
+ 770 538 l 1,41,-1
+ 924 538 l 1,42,-1
+ 924 686 l 1,43,-1
+ 770 686 l 1,40,-1
+504 686 m 1,44,-1
+ 504 538 l 1,45,-1
+ 657 538 l 1,46,-1
+ 657 686 l 1,47,-1
+ 504 686 l 1,44,-1
+217 420 m 1,48,-1
+ 217 272 l 1,49,-1
+ 371 272 l 1,50,-1
+ 371 420 l 1,51,-1
+ 217 420 l 1,48,-1
+770 420 m 1,52,-1
+ 770 272 l 1,53,-1
+ 924 272 l 1,54,-1
+ 924 420 l 1,55,-1
+ 770 420 l 1,52,-1
+504 420 m 1,56,-1
+ 504 272 l 1,57,-1
+ 657 272 l 1,58,-1
+ 657 420 l 1,59,-1
+ 504 420 l 1,56,-1
+EndSplineSet
+Validated: 16385
EndChar
StartChar: uniE013
-Encoding: 57363 57363 335
+Encoding: 335 57363 335
Width: 1716
GlyphClass: 2
Flags: W
@@ -38147,7 +38639,7 @@ Validated: 1
EndChar
StartChar: uniE016
-Encoding: 57366 57366 336
+Encoding: 336 57366 336
Width: 1540
GlyphClass: 2
Flags: W
@@ -38340,17 +38832,19 @@ Validated: 1
EndChar
StartChar: uniE018
-Encoding: 57368 57368 337
+Encoding: 337 57368 337
Width: 1916
GlyphClass: 2
Flags: W
-HStem: -125 53<236 1673> 43 53<401 893> 74 80<1393.6 1512.4> 88 51<1282 1452.69 1455.24 1597> 117 26<401 893> 264 55<236 309 365 1542 1597 1673> 395 56<295 309 365 1542 1597 1614> 561 53<479.997 1428.75> 684 141<905 983> 829 21<997 999> 858 14<874 881> 895 16<952 954> 928 14<928 930> 942 33<919.752 943.281 1036 1042 1069 1087> 952 15<963 989> 963 22<1124.82 1168.29> 983 27<1040 1042> 1069 10<911 940> 1073 4<944 965> 1305 53<479.997 1428.75> 1464 54<295 1614>
-VStem: 182 54<-72 264> 242 53<451 1464> 309 56<319 395> 408 55<619.758 1299.7> 874 7<858 872> 881 6<817 850> 883 104<686.472 788> 905 78<809 825> 907 29<891.537 901.051 1165.26 1166.47> 924 6<928 942> 944 21<1073 1077 1182.24 1187.74> 948 6<895 911> 993 6<829 850> 1036 6<942 975 983 1010> 1446 55<619.696 1299.33> 1542 55<319 395> 1614 53<451 1464> 1673 53<-72 264>
+HStem: -1 53<236 1673> 163 53<401 893> 194 80<1393.6 1512.4> 208 51<1282 1452.69 1455.24 1597> 237 26<401 893> 384 55<236 309 365 1542 1597 1673> 515 56<295 309 365 1542 1597 1614> 681 53<479.997 1428.75> 804 141<905 983> 949 21<997 999> 978 14<874 881> 1015 16<952 954> 1048 14<928 930> 1062 33<919.752 943.281 1036 1042 1069 1087> 1072 15<963 989> 1083 22<1124.82 1168.29> 1103 27<1040 1042> 1189 10<911 940> 1193 4<944 965> 1425 53<479.997 1428.75> 1584 54<295 1614>
+VStem: 182 54<52 384> 242 53<571 1584> 309 56<439 515> 408 55<739.758 1419.7> 874 7<978 992> 881 6<937 970> 883 104<806.472 908> 905 78<929 945> 907 29<1011.54 1021.05 1285.26 1286.47> 924 6<1048 1062> 944 21<1193 1197 1302.24 1307.74> 948 6<1015 1031> 993 6<949 970> 1036 6<1062 1095 1103 1130> 1446 55<739.696 1419.33> 1542 55<439 515> 1614 53<571 1584> 1673 53<52 384>
TtInstrs:
SVTCA[y-axis]
-PUSHB_1
+PUSHB_3
1
-MDAP[rnd]
+ 0
+ 0
+CALL
PUSHB_1
23
MDRP[min,rnd,black]
@@ -39118,245 +39612,245 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1726 -125 m 1,0,-1
- 182 -125 l 1,1,-1
- 182 317 l 1,2,-1
- 309 319 l 1,3,-1
- 309 395 l 1,4,-1
- 242 397 l 1,5,-1
- 242 1518 l 1,6,-1
- 1667 1518 l 1,7,-1
- 1667 397 l 1,8,-1
- 1597 395 l 1,9,-1
- 1597 319 l 1,10,-1
- 1726 317 l 1,11,-1
- 1726 -125 l 1,0,-1
-1614 451 m 1,12,-1
- 1614 1464 l 1,13,-1
- 295 1464 l 1,14,-1
- 295 451 l 1,15,-1
- 1614 451 l 1,12,-1
-1542 319 m 1,16,-1
- 1542 395 l 1,17,-1
- 365 395 l 1,18,-1
- 365 319 l 1,19,-1
- 1542 319 l 1,16,-1
-1673 -72 m 1,20,-1
- 1673 264 l 1,21,-1
- 236 264 l 1,22,-1
- 236 -72 l 1,23,-1
- 1673 -72 l 1,20,-1
-1501 961 m 0,24,25
- 1501 807 1501 807 1477 561 c 1,26,-1
- 432 561 l 1,27,28
- 408 807 408 807 408 961 c 0,29,30
- 408 1116 408 1116 432 1358 c 1,31,-1
- 1477 1358 l 1,32,33
- 1501 1112 1501 1112 1501 961 c 0,24,25
-1446 961 m 0,34,35
- 1446 1167 1446 1167 1425 1305 c 1,36,-1
- 483 1305 l 1,37,38
- 463 1163 463 1163 463 961 c 0,39,40
- 463 756 463 756 483 614 c 1,41,-1
- 1425 614 l 1,42,43
- 1446 752 1446 752 1446 961 c 0,34,35
-1393 139 m 1,44,45
- 1412 154 1412 154 1454 154 c 0,46,47
- 1494 154 1494 154 1513 139 c 1,48,-1
- 1597 139 l 1,49,-1
- 1597 88 l 1,50,-1
- 1513 88 l 1,51,52
- 1493 74 1493 74 1454 74 c 0,53,54
- 1413 74 1413 74 1393 88 c 1,55,-1
- 1282 88 l 1,56,-1
- 1282 139 l 1,57,-1
- 1393 139 l 1,44,45
-367 143 m 1,58,-1
- 915 143 l 1,59,-1
- 915 43 l 1,60,-1
- 367 43 l 1,61,-1
- 367 143 l 1,58,-1
-401 117 m 1,62,-1
- 391 106 l 1,63,-1
- 401 96 l 1,64,-1
- 893 96 l 1,65,-1
- 903 106 l 1,66,-1
- 893 117 l 1,67,-1
- 401 117 l 1,62,-1
-1004 850 m 1,68,-1
- 999 829 l 1,69,-1
- 993 829 l 1,70,-1
- 997 850 l 1,71,-1
- 1004 850 l 1,68,-1
-1004 807 m 1,72,-1
- 993 788 l 1,73,-1
- 987 729 l 2,74,75
- 981 684 981 684 940 684 c 0,76,77
- 894 684 894 684 883 801 c 1,78,-1
- 901 805 l 1,79,-1
- 905 825 l 1,80,-1
- 983 825 l 1,81,-1
- 985 809 l 1,82,-1
- 1004 825 l 1,83,-1
- 1004 807 l 1,72,-1
-1130 1073 m 1,84,-1
- 1067 1008 l 1,85,-1
- 1044 1049 l 1,86,-1
- 1130 1073 l 1,84,-1
-961 1100 m 1,87,-1
- 913 1100 l 1,88,-1
- 940 1253 l 1,89,-1
- 961 1100 l 1,87,-1
-1032 1126 m 1,90,-1
- 1028 1067 l 1,91,-1
- 989 1094 l 1,92,-1
- 1032 1126 l 1,90,-1
-1188 963 m 1,93,-1
- 1069 936 l 1,94,-1
- 1069 985 l 1,95,-1
- 1087 985 l 2,96,97
- 1140 985 1140 985 1188 963 c 1,93,-1
-1026 1038 m 1,98,99
- 1010 1054 1010 1054 969 1069 c 1,100,-1
- 973 1079 l 1,101,102
- 992 1066 992 1066 1026 1038 c 1,98,99
-1036 1020 m 1,103,-1
- 1032 1016 l 1,104,-1
- 1022 1028 l 1,105,-1
- 1026 1032 l 1,106,-1
- 1036 1020 l 1,103,-1
-1044 983 m 1,107,-1
- 1040 983 l 1,108,-1
- 1036 1010 l 1,109,-1
- 1042 1010 l 1,110,-1
- 1044 983 l 1,107,-1
-965 1073 m 1,111,-1
- 944 1073 l 1,112,-1
- 944 1077 l 1,113,-1
- 965 1077 l 1,114,-1
- 965 1073 l 1,111,-1
-1042 942 m 1,115,-1
- 1036 942 l 1,116,-1
- 1036 975 l 1,117,-1
- 1042 975 l 1,118,-1
- 1042 942 l 1,115,-1
-940 1079 m 1,119,-1
- 907 1069 l 1,120,-1
- 911 1079 l 1,121,-1
- 940 1079 l 1,119,-1
-897 1094 m 1,122,123
- 884 1083 884 1083 860 1071 c 1,124,-1
- 850 1139 l 1,125,-1
- 897 1094 l 1,122,123
-1090 883 m 1,126,-1
- 1042 891 l 1,127,-1
- 1061 918 l 1,128,-1
- 1090 883 l 1,126,-1
-895 1065 m 1,129,-1
- 874 1051 l 1,130,-1
- 872 1055 l 1,131,-1
- 891 1069 l 1,132,-1
- 895 1065 l 1,129,-1
-1032 913 m 1,133,-1
- 1018 887 l 1,134,-1
- 1014 889 l 1,135,-1
- 1028 915 l 1,136,-1
- 1032 913 l 1,133,-1
-874 1047 m 1,137,-1
- 858 1036 l 1,138,-1
- 856 1040 l 1,139,-1
- 870 1051 l 1,140,-1
- 874 1047 l 1,137,-1
-995 952 m 1,141,-1
- 963 948 l 1,142,-1
- 944 958 l 1,143,144
- 921 948 921 948 895 948 c 1,145,146
- 901 973 901 973 940 973 c 2,147,-1
- 956 973 l 1,148,-1
- 989 967 l 1,149,-1
- 995 952 l 1,141,-1
-1016 881 m 1,150,-1
- 1001 854 l 1,151,-1
- 997 856 l 1,152,-1
- 1010 881 l 1,153,-1
- 1016 881 l 1,150,-1
-860 1030 m 1,154,-1
- 844 1004 l 1,155,-1
- 840 1006 l 1,156,-1
- 854 1032 l 1,157,-1
- 860 1030 l 1,154,-1
-932 928 m 1,158,-1
- 928 928 l 1,159,-1
- 924 942 l 1,160,-1
- 930 942 l 1,161,-1
- 932 928 l 1,158,-1
-956 911 m 1,162,-1
- 954 895 l 1,163,-1
- 948 895 l 1,164,-1
- 952 911 l 1,165,-1
- 956 911 l 1,162,-1
-840 1047 m 1,166,167
- 830 1023 830 1023 817 1008 c 1,168,-1
- 715 1106 l 1,169,-1
- 840 1047 l 1,166,167
-987 946 m 1,170,-1
- 956 856 l 1,171,-1
- 983 831 l 1,172,-1
- 936 842 l 1,173,-1
- 932 831 l 1,174,-1
- 907 831 l 1,175,-1
- 932 854 l 1,176,-1
- 907 942 l 1,177,178
- 913 921 913 921 936 885 c 1,179,-1
- 936 903 l 1,180,-1
- 946 881 l 1,181,-1
- 946 891 l 1,182,-1
- 961 885 l 1,183,184
- 968 910 968 910 987 946 c 1,170,-1
-842 969 m 1,185,-1
- 836 969 l 1,186,-1
- 834 999 l 1,187,-1
- 838 999 l 1,188,-1
- 842 969 l 1,185,-1
-842 946 m 1,189,-1
- 838 946 l 1,190,-1
- 834 961 l 1,191,-1
- 838 961 l 1,192,-1
- 842 946 l 1,189,-1
-854 913 m 1,193,-1
- 840 928 l 1,194,-1
- 846 940 l 1,195,-1
- 854 913 l 1,193,-1
-870 881 m 1,196,-1
- 866 879 l 1,197,-1
- 850 905 l 1,198,-1
- 856 905 l 1,199,-1
- 870 881 l 1,196,-1
-817 936 m 1,200,-1
- 766 969 l 1,201,-1
- 815 985 l 1,202,-1
- 817 961 l 1,203,-1
- 817 936 l 1,200,-1
-881 858 m 1,204,-1
- 874 858 l 1,205,-1
- 874 872 l 1,206,-1
- 881 872 l 1,207,-1
- 881 858 l 1,204,-1
-889 850 m 1,208,-1
- 887 817 l 1,209,-1
- 881 817 l 1,210,-1
- 885 850 l 1,211,-1
- 889 850 l 1,208,-1
-848 879 m 1,212,-1
- 764 864 l 1,213,-1
- 823 918 l 1,214,-1
- 848 879 l 1,212,-1
-EndSplineSet
-Validated: 5
+1726 -1 m 5,0,-1
+ 182 -1 l 5,1,-1
+ 182 437 l 1,2,-1
+ 309 439 l 1,3,-1
+ 309 515 l 1,4,-1
+ 242 517 l 1,5,-1
+ 242 1638 l 1,6,-1
+ 1667 1638 l 1,7,-1
+ 1667 517 l 1,8,-1
+ 1597 515 l 1,9,-1
+ 1597 439 l 1,10,-1
+ 1726 437 l 1,11,-1
+ 1726 -1 l 5,0,-1
+1614 571 m 1,12,-1
+ 1614 1584 l 1,13,-1
+ 295 1584 l 1,14,-1
+ 295 571 l 1,15,-1
+ 1614 571 l 1,12,-1
+1542 439 m 1,16,-1
+ 1542 515 l 1,17,-1
+ 365 515 l 1,18,-1
+ 365 439 l 1,19,-1
+ 1542 439 l 1,16,-1
+1673 52 m 5,20,-1
+ 1673 384 l 1,21,-1
+ 236 384 l 1,22,-1
+ 236 52 l 5,23,-1
+ 1673 52 l 5,20,-1
+1501 1081 m 0,24,25
+ 1501 927 1501 927 1477 681 c 1,26,-1
+ 432 681 l 1,27,28
+ 408 927 408 927 408 1081 c 0,29,30
+ 408 1236 408 1236 432 1478 c 1,31,-1
+ 1477 1478 l 1,32,33
+ 1501 1232 1501 1232 1501 1081 c 0,24,25
+1446 1081 m 0,34,35
+ 1446 1287 1446 1287 1425 1425 c 1,36,-1
+ 483 1425 l 1,37,38
+ 463 1283 463 1283 463 1081 c 0,39,40
+ 463 876 463 876 483 734 c 1,41,-1
+ 1425 734 l 1,42,43
+ 1446 872 1446 872 1446 1081 c 0,34,35
+1393 259 m 1,44,45
+ 1412 274 1412 274 1454 274 c 0,46,47
+ 1494 274 1494 274 1513 259 c 1,48,-1
+ 1597 259 l 1,49,-1
+ 1597 208 l 1,50,-1
+ 1513 208 l 1,51,52
+ 1493 194 1493 194 1454 194 c 0,53,54
+ 1413 194 1413 194 1393 208 c 1,55,-1
+ 1282 208 l 1,56,-1
+ 1282 259 l 1,57,-1
+ 1393 259 l 1,44,45
+367 263 m 1,58,-1
+ 915 263 l 1,59,-1
+ 915 163 l 1,60,-1
+ 367 163 l 1,61,-1
+ 367 263 l 1,58,-1
+401 237 m 1,62,-1
+ 391 226 l 1,63,-1
+ 401 216 l 1,64,-1
+ 893 216 l 1,65,-1
+ 903 226 l 1,66,-1
+ 893 237 l 1,67,-1
+ 401 237 l 1,62,-1
+1004 970 m 1,68,-1
+ 999 949 l 1,69,-1
+ 993 949 l 1,70,-1
+ 997 970 l 1,71,-1
+ 1004 970 l 1,68,-1
+1004 927 m 1,72,-1
+ 993 908 l 1,73,-1
+ 987 849 l 2,74,75
+ 981 804 981 804 940 804 c 0,76,77
+ 894 804 894 804 883 921 c 1,78,-1
+ 901 925 l 1,79,-1
+ 905 945 l 1,80,-1
+ 983 945 l 1,81,-1
+ 985 929 l 1,82,-1
+ 1004 945 l 1,83,-1
+ 1004 927 l 1,72,-1
+1130 1193 m 1,84,-1
+ 1067 1128 l 1,85,-1
+ 1044 1169 l 1,86,-1
+ 1130 1193 l 1,84,-1
+961 1220 m 1,87,-1
+ 913 1220 l 1,88,-1
+ 940 1373 l 1,89,-1
+ 961 1220 l 1,87,-1
+1032 1246 m 1,90,-1
+ 1028 1187 l 1,91,-1
+ 989 1214 l 1,92,-1
+ 1032 1246 l 1,90,-1
+1188 1083 m 1,93,-1
+ 1069 1056 l 1,94,-1
+ 1069 1105 l 1,95,-1
+ 1087 1105 l 2,96,97
+ 1140 1105 1140 1105 1188 1083 c 1,93,-1
+1026 1158 m 1,98,99
+ 1010 1174 1010 1174 969 1189 c 1,100,-1
+ 973 1199 l 1,101,102
+ 992 1186 992 1186 1026 1158 c 1,98,99
+1036 1140 m 1,103,-1
+ 1032 1136 l 1,104,-1
+ 1022 1148 l 1,105,-1
+ 1026 1152 l 1,106,-1
+ 1036 1140 l 1,103,-1
+1044 1103 m 1,107,-1
+ 1040 1103 l 1,108,-1
+ 1036 1130 l 1,109,-1
+ 1042 1130 l 1,110,-1
+ 1044 1103 l 1,107,-1
+965 1193 m 1,111,-1
+ 944 1193 l 1,112,-1
+ 944 1197 l 1,113,-1
+ 965 1197 l 1,114,-1
+ 965 1193 l 1,111,-1
+1042 1062 m 1,115,-1
+ 1036 1062 l 1,116,-1
+ 1036 1095 l 1,117,-1
+ 1042 1095 l 1,118,-1
+ 1042 1062 l 1,115,-1
+940 1199 m 1,119,-1
+ 907 1189 l 1,120,-1
+ 911 1199 l 1,121,-1
+ 940 1199 l 1,119,-1
+897 1214 m 1,122,123
+ 884 1203 884 1203 860 1191 c 1,124,-1
+ 850 1259 l 1,125,-1
+ 897 1214 l 1,122,123
+1090 1003 m 1,126,-1
+ 1042 1011 l 1,127,-1
+ 1061 1038 l 1,128,-1
+ 1090 1003 l 1,126,-1
+895 1185 m 1,129,-1
+ 874 1171 l 1,130,-1
+ 872 1175 l 1,131,-1
+ 891 1189 l 1,132,-1
+ 895 1185 l 1,129,-1
+1032 1033 m 1,133,-1
+ 1018 1007 l 1,134,-1
+ 1014 1009 l 1,135,-1
+ 1028 1035 l 1,136,-1
+ 1032 1033 l 1,133,-1
+874 1167 m 1,137,-1
+ 858 1156 l 1,138,-1
+ 856 1160 l 1,139,-1
+ 870 1171 l 1,140,-1
+ 874 1167 l 1,137,-1
+995 1072 m 1,141,-1
+ 963 1068 l 1,142,-1
+ 944 1078 l 1,143,144
+ 921 1068 921 1068 895 1068 c 1,145,146
+ 901 1093 901 1093 940 1093 c 2,147,-1
+ 956 1093 l 1,148,-1
+ 989 1087 l 1,149,-1
+ 995 1072 l 1,141,-1
+1016 1001 m 1,150,-1
+ 1001 974 l 1,151,-1
+ 997 976 l 1,152,-1
+ 1010 1001 l 1,153,-1
+ 1016 1001 l 1,150,-1
+860 1150 m 1,154,-1
+ 844 1124 l 1,155,-1
+ 840 1126 l 1,156,-1
+ 854 1152 l 1,157,-1
+ 860 1150 l 1,154,-1
+932 1048 m 1,158,-1
+ 928 1048 l 1,159,-1
+ 924 1062 l 1,160,-1
+ 930 1062 l 1,161,-1
+ 932 1048 l 1,158,-1
+956 1031 m 1,162,-1
+ 954 1015 l 1,163,-1
+ 948 1015 l 1,164,-1
+ 952 1031 l 1,165,-1
+ 956 1031 l 1,162,-1
+840 1167 m 1,166,167
+ 830 1143 830 1143 817 1128 c 1,168,-1
+ 715 1226 l 1,169,-1
+ 840 1167 l 1,166,167
+987 1066 m 1,170,-1
+ 956 976 l 1,171,-1
+ 983 951 l 1,172,-1
+ 936 962 l 1,173,-1
+ 932 951 l 1,174,-1
+ 907 951 l 1,175,-1
+ 932 974 l 1,176,-1
+ 907 1062 l 1,177,178
+ 913 1041 913 1041 936 1005 c 1,179,-1
+ 936 1023 l 1,180,-1
+ 946 1001 l 1,181,-1
+ 946 1011 l 1,182,-1
+ 961 1005 l 1,183,184
+ 968 1030 968 1030 987 1066 c 1,170,-1
+842 1089 m 1,185,-1
+ 836 1089 l 1,186,-1
+ 834 1119 l 1,187,-1
+ 838 1119 l 1,188,-1
+ 842 1089 l 1,185,-1
+842 1066 m 1,189,-1
+ 838 1066 l 1,190,-1
+ 834 1081 l 1,191,-1
+ 838 1081 l 1,192,-1
+ 842 1066 l 1,189,-1
+854 1033 m 1,193,-1
+ 840 1048 l 1,194,-1
+ 846 1060 l 1,195,-1
+ 854 1033 l 1,193,-1
+870 1001 m 1,196,-1
+ 866 999 l 1,197,-1
+ 850 1025 l 1,198,-1
+ 856 1025 l 1,199,-1
+ 870 1001 l 1,196,-1
+817 1056 m 1,200,-1
+ 766 1089 l 1,201,-1
+ 815 1105 l 1,202,-1
+ 817 1081 l 1,203,-1
+ 817 1056 l 1,200,-1
+881 978 m 1,204,-1
+ 874 978 l 1,205,-1
+ 874 992 l 1,206,-1
+ 881 992 l 1,207,-1
+ 881 978 l 1,204,-1
+889 970 m 1,208,-1
+ 887 937 l 1,209,-1
+ 881 937 l 1,210,-1
+ 885 970 l 1,211,-1
+ 889 970 l 1,208,-1
+848 999 m 1,212,-1
+ 764 984 l 1,213,-1
+ 823 1038 l 1,214,-1
+ 848 999 l 1,212,-1
+EndSplineSet
+Validated: 16389
EndChar
StartChar: uniE019
-Encoding: 57369 57369 338
+Encoding: 338 57369 338
Width: 1978
GlyphClass: 2
Flags: W
@@ -39466,7 +39960,7 @@ Validated: 1
EndChar
StartChar: uniE01A
-Encoding: 57370 57370 339
+Encoding: 339 57370 339
Width: 2002
GlyphClass: 2
Flags: W
@@ -39665,7 +40159,7 @@ Validated: 1
EndChar
StartChar: uniE01B
-Encoding: 57371 57371 340
+Encoding: 340 57371 340
Width: 1904
GlyphClass: 2
Flags: W
@@ -40067,7 +40561,7 @@ Validated: 1
EndChar
StartChar: uniE01C
-Encoding: 57372 57372 341
+Encoding: 341 57372 341
Width: 0
GlyphClass: 2
Flags: W
@@ -40119,7 +40613,7 @@ Validated: 1
EndChar
StartChar: uniE01D
-Encoding: 57373 57373 342
+Encoding: 342 57373 342
Width: 0
GlyphClass: 2
Flags: W
@@ -40187,7 +40681,7 @@ Validated: 1
EndChar
StartChar: uniE01E
-Encoding: 57374 57374 343
+Encoding: 343 57374 343
Width: 720
GlyphClass: 2
Flags: W
@@ -40242,7 +40736,7 @@ Validated: 1
EndChar
StartChar: uniE01F
-Encoding: 57375 57375 344
+Encoding: 344 57375 344
Width: 1531
GlyphClass: 2
Flags: W
@@ -40376,7 +40870,7 @@ Validated: 1
EndChar
StartChar: uniE020
-Encoding: 57376 57376 345
+Encoding: 345 57376 345
Width: 1531
GlyphClass: 2
Flags: W
@@ -40517,7 +41011,7 @@ Validated: 1
EndChar
StartChar: uniE021
-Encoding: 57377 57377 346
+Encoding: 346 57377 346
Width: 1507
GlyphClass: 2
Flags: W
@@ -40680,7 +41174,7 @@ Validated: 1
EndChar
StartChar: uniE022
-Encoding: 57378 57378 347
+Encoding: 347 57378 347
Width: 1531
GlyphClass: 2
Flags: W
@@ -40936,7 +41430,7 @@ Validated: 1
EndChar
StartChar: uniE023
-Encoding: 57379 57379 348
+Encoding: 348 57379 348
Width: 1728
GlyphClass: 2
Flags: W
@@ -41202,7 +41696,7 @@ Validated: 1
EndChar
StartChar: uniE024
-Encoding: 57380 57380 349
+Encoding: 349 57380 349
Width: 1507
GlyphClass: 2
Flags: W
@@ -41392,7 +41886,7 @@ Validated: 1
EndChar
StartChar: uniE025
-Encoding: 57381 57381 350
+Encoding: 350 57381 350
Width: 1751
GlyphClass: 2
Flags: W
@@ -41480,7 +41974,7 @@ Validated: 1
EndChar
StartChar: uniE026
-Encoding: 57382 57382 351
+Encoding: 351 57382 351
Width: 983
GlyphClass: 2
Flags: W
@@ -41568,7 +42062,7 @@ Validated: 1
EndChar
StartChar: uniE027
-Encoding: 57383 57383 352
+Encoding: 352 57383 352
Width: 1751
GlyphClass: 2
Flags: W
@@ -41656,7 +42150,7 @@ Validated: 1
EndChar
StartChar: uniE028
-Encoding: 57384 57384 353
+Encoding: 353 57384 353
Width: 983
GlyphClass: 2
Flags: W
@@ -41744,7 +42238,7 @@ Validated: 1
EndChar
StartChar: uniE029
-Encoding: 57385 57385 354
+Encoding: 354 57385 354
Width: 1822
GlyphClass: 2
Flags: W
@@ -41816,7 +42310,7 @@ Validated: 1
EndChar
StartChar: uniE02A
-Encoding: 57386 57386 355
+Encoding: 355 57386 355
Width: 1843
GlyphClass: 2
Flags: W
@@ -41910,7 +42404,7 @@ Validated: 1
EndChar
StartChar: uniE02B
-Encoding: 57387 57387 356
+Encoding: 356 57387 356
Width: 1751
GlyphClass: 2
Flags: W
@@ -41959,7 +42453,7 @@ Validated: 1
EndChar
StartChar: uniE02C
-Encoding: 57388 57388 357
+Encoding: 357 57388 357
Width: 983
GlyphClass: 2
Flags: W
@@ -42008,7 +42502,7 @@ Validated: 1
EndChar
StartChar: uniE02D
-Encoding: 57389 57389 358
+Encoding: 358 57389 358
Width: 1751
GlyphClass: 2
Flags: W
@@ -42057,7 +42551,7 @@ Validated: 1
EndChar
StartChar: uniE02E
-Encoding: 57390 57390 359
+Encoding: 359 57390 359
Width: 983
GlyphClass: 2
Flags: W
@@ -42106,7 +42600,7 @@ Validated: 1
EndChar
StartChar: uniE02F
-Encoding: 57391 57391 360
+Encoding: 360 57391 360
Width: 1751
GlyphClass: 2
Flags: W
@@ -42152,7 +42646,7 @@ Validated: 1
EndChar
StartChar: uniE030
-Encoding: 57392 57392 361
+Encoding: 361 57392 361
Width: 1392
GlyphClass: 2
Flags: W
@@ -42188,7 +42682,7 @@ Validated: 1
EndChar
StartChar: uniE031
-Encoding: 57393 57393 362
+Encoding: 362 57393 362
Width: 1751
GlyphClass: 2
Flags: W
@@ -42222,7 +42716,7 @@ Validated: 1
EndChar
StartChar: uniE032
-Encoding: 57394 57394 363
+Encoding: 363 57394 363
Width: 1751
GlyphClass: 2
Flags: W
@@ -42699,12 +43193,12 @@ Validated: 33
EndChar
StartChar: uniE033
-Encoding: 57395 57395 364
-Width: 1894
+Encoding: 364 57395 364
+Width: 1686
GlyphClass: 2
Flags: W
-HStem: 238 32<1012.93 1089.08> 467 158<1243.84 1426.25> 600 385<398.835 523.562> 807 104<1602 1705.11> 969 96<1122.54 1190>
-VStem: 184 78<707 827.959 1296 1321> 211 59<756 810.812> 246 143<1501.43 1682> 416 108<1546.91 1630> 543 131<1106.08 1167> 651 66<387.662 492.484> 983 129<831.449 884.156> 1589 117<807.997 908.003>
+HStem: 174.824 28.4004<864.542 930.413> 378.062 140.225<1061.84 1222.07> 679.812 92.2998<1374.09 1463.81> 823.587 85.2002<959.353 1017.71>
+VStem: 147.521 156.564<1029.37 1092.87> 147.521 67.4697<591.062 698.413 1113.8 1135.99> 170.875 51.0352<634.55 683.196> 201.15 123.694<1291.45 1456.38> 348.2 93.4199<1332.93 1410.22> 458.055 113.315<943.764 999.312> 551.475 57.0908<307.65 400.679> 838.655 111.585<701.511 748.288> 975.325 44.1152<252.037 267.125> 1362.84 101.205<680.697 769.452>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -42724,20 +43218,6 @@ PUSHB_2
93
SHP[rp2]
SHP[rp2]
-PUSHW_4
- 272
- 309
- 179
- 8
-CALL
-PUSHB_2
- 45
- 209
-SHP[rp1]
-SHP[rp1]
-PUSHB_1
- 87
-MDRP[min,rnd,black]
PUSHW_1
334
MDAP[rnd]
@@ -42751,6 +43231,9 @@ PUSHB_1
35
MDAP[rnd]
PUSHB_1
+ 13
+SHP[rp1]
+PUSHB_1
171
MDRP[min,rnd,black]
SVTCA[x-axis]
@@ -42766,8 +43249,10 @@ SHP[rp2]
PUSHB_1
28
MDRP[min,rnd,black]
-PUSHB_1
+PUSHW_2
82
+ 274
+SHP[rp2]
SHP[rp2]
PUSHB_4
246
@@ -42792,6 +43277,12 @@ MDRP[min,rnd,black]
PUSHB_1
146
SHP[rp2]
+PUSHW_1
+ 320
+MDRP[min,rnd,black]
+PUSHB_1
+ 81
+SHP[rp2]
PUSHB_1
246
SRP0
@@ -42872,6 +43363,16 @@ MDRP[min,rnd,black]
PUSHB_1
40
SRP0
+PUSHB_2
+ 122
+ 1
+CALL
+PUSHB_1
+ 185
+MDRP[min,rnd,black]
+PUSHB_1
+ 185
+SRP0
PUSHW_2
336
1
@@ -42883,6 +43384,26 @@ PUSHW_2
354
1
CALL
+PUSHW_2
+ 320
+ 246
+SRP1
+SRP2
+NPUSHW
+ 10
+ 85
+ 140
+ 142
+ 148
+ 150
+ 215
+ 236
+ 256
+ 257
+ 259
+DEPTH
+SLOOP
+IP
PUSHB_2
252
137
@@ -42900,68 +43421,57 @@ IP
PUSHB_1
28
SRP1
-NPUSHW
- 15
- 81
- 85
- 140
+PUSHW_3
143
- 148
- 150
- 215
- 236
238
- 245
- 256
- 257
260
- 319
- 320
-DEPTH
-SLOOP
+IP
+IP
IP
PUSHW_1
346
SRP2
-PUSHW_4
+PUSHW_3
87
211
- 274
318
-DEPTH
-SLOOP
+IP
+IP
IP
PUSHW_1
342
SRP1
NPUSHW
- 14
+ 15
26
25
50
55
30
89
- 64
262
272
275
- 277
322
324
329
+ 344
+ 349
+ 351
DEPTH
SLOOP
IP
PUSHW_1
327
SRP2
-PUSHW_3
+PUSHW_5
91
+ 114
+ 277
278
326
-IP
-IP
+DEPTH
+SLOOP
IP
PUSHB_1
73
@@ -43010,8 +43520,6 @@ NPUSHW
124
69
133
- 151
- 153
154
192
199
@@ -43021,7 +43529,9 @@ NPUSHW
281
283
287
- 292
+ 289
+ 290
+ 299
304
DEPTH
SLOOP
@@ -43030,8 +43540,9 @@ PUSHB_1
40
SRP2
NPUSHW
- 9
+ 11
117
+ 151
155
156
157
@@ -43039,32 +43550,51 @@ NPUSHW
167
169
191
+ 292
294
DEPTH
SLOOP
IP
+PUSHB_1
+ 122
+SRP1
+PUSHB_6
+ 37
+ 78
+ 79
+ 38
+ 123
+ 159
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 185
+SRP2
+PUSHB_4
+ 35
+ 43
+ 34
+ 76
+DEPTH
+SLOOP
+IP
PUSHW_1
336
SRP1
NPUSHW
- 19
+ 13
1
14
2
22
- 34
46
49
- 76
- 78
- 122
- 123
- 159
161
162
171
179
- 186
+ 183
307
314
DEPTH
@@ -43077,11 +43607,12 @@ PUSHB_2
SRP1
SRP2
NPUSHW
- 14
- 123
+ 15
+ 117
129
- 131
+ 123
133
+ 131
202
203
204
@@ -43099,91 +43630,97 @@ PUSHW_1
309
SRP1
NPUSHW
- 19
+ 23
+ 45
47
- 76
79
124
126
127
- 148
+ 76
149
177
+ 181
183
184
206
+ 209
215
223
225
+ 272
277
304
+ 148
313
314
DEPTH
SLOOP
IP
-PUSHW_2
- 87
- 272
-SRP1
+PUSHW_1
+ 334
SRP2
NPUSHW
- 25
+ 21
4
- 1
+ 5
8
- 13
- 19
- 40
98
99
- 104
- 108
- 111
- 136
+ 113
+ 114
137
- 141
+ 140
147
- 173
175
227
- 232
+ 230
289
292
- 296
+ 294
+ 299
301
302
305
+ 316
DEPTH
SLOOP
IP
-PUSHW_2
+PUSHW_1
339
- 334
SRP1
-SRP2
-NPUSHB
- 9
+NPUSHW
+ 16
2
0
17
38
+ 40
43
- 109
+ 108
+ 19
112
+ 111
+ 136
+ 141
144
174
+ 232
+ 296
DEPTH
SLOOP
IP
PUSHB_1
35
-SRP1
-PUSHB_4
+SRP2
+PUSHB_7
+ 1
14
22
34
37
+ 104
+ 173
DEPTH
SLOOP
IP
@@ -43193,269 +43730,269 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1757 909 m 1,0,-1
- 1577 936 l 1,1,-1
- 1550 807 l 1,2,3
- 1565 780 1565 780 1608 780 c 2,4,-1
- 1679 780 l 1,5,6
- 1712 802 1712 802 1757 909 c 1,0,-1
-1757 702 m 1,7,-1
- 1731 729 l 1,8,-1
- 1704 651 l 1,9,-1
- 1679 678 l 1,10,-1
- 1653 651 l 1,11,-1
- 1679 627 l 1,12,-1
- 1757 702 l 1,7,-1
-1319 961 m 1,13,-1
- 1292 936 l 1,14,-1
- 1292 913 l 2,15,16
- 1292 867 1292 867 1319 858 c 1,17,-1
- 1292 831 l 1,18,-1
- 1370 807 l 1,19,-1
- 1368 827 l 2,20,21
- 1368 858 1368 858 1395 936 c 1,22,-1
- 1319 961 l 1,13,-1
-571 1606 m 1,23,24
- 540 1712 540 1712 463 1712 c 1,25,-1
- 442 1708 l 1,26,27
- 389 1673 389 1673 389 1604 c 0,28,29
- 389 1518 389 1518 467 1477 c 1,30,31
- 505 1478 505 1478 535 1526 c 0,32,33
- 542 1538 542 1538 571 1606 c 1,23,24
-1190 961 m 1,34,-1
- 1163 969 l 1,35,36
- 1122 969 1122 969 1122 915 c 1,37,-1
- 1139 885 l 1,38,39
- 1112 858 1112 858 1112 831 c 1,40,-1
- 1118 831 l 2,41,42
- 1154 831 1154 831 1165 893 c 0,43,44
- 1175 954 1175 954 1190 961 c 1,34,-1
-1536 594 m 1,45,-1
- 1473 522 l 1,46,-1
- 1499 498 l 1,47,48
- 1520 512 1520 512 1556 549 c 1,49,-1
- 1536 594 l 1,45,-1
-498 1378 m 1,50,51
- 547 1418 547 1418 547 1436 c 1,52,-1
- 545 1450 l 1,53,54
- 494 1429 494 1429 494 1399 c 1,55,-1
- 498 1378 l 1,50,51
-776 1321 m 1,56,57
- 727 1376 727 1376 680 1376 c 0,58,59
- 658 1376 658 1376 621 1361 c 0,60,61
- 582 1346 582 1346 561 1346 c 0,62,63
- 532 1346 532 1346 504 1368 c 1,64,65
- 514 1348 514 1348 550 1318 c 0,66,67
- 585 1289 585 1289 596 1270 c 1,68,-1
- 776 1321 l 1,56,57
-803 1167 m 1,69,70
- 800 1219 800 1219 778 1219 c 1,71,-1
- 674 1167 l 1,72,-1
- 674 1147 l 2,73,74
- 674 1102 674 1102 700 1090 c 1,75,-1
- 803 1167 l 1,69,70
-1163 575 m 1,76,77
- 1139 563 1139 563 1139 514 c 2,78,-1
- 1139 498 l 1,79,-1
- 1163 575 l 1,76,77
-543 1020 m 1,80,-1
- 365 1065 l 1,81,-1
- 391 1038 l 1,82,83
- 365 1012 365 1012 344 1012 c 2,84,-1
- 340 1012 l 1,85,86
- 367 985 367 985 397 985 c 0,87,88
- 424 985 424 985 469 1004 c 0,89,90
- 511 1020 511 1020 538 1020 c 0,91,92
- 541 1020 541 1020 543 1020 c 1,80,-1
-627 631 m 1,93,94
- 651 703 651 703 651 705 c 0,95,96
- 651 726 651 726 627 733 c 1,97,98
- 657 766 657 766 678 760 c 1,99,100
- 678 796 678 796 735 877 c 2,101,-1
- 817 991 l 1,102,103
- 764 956 764 956 729 956 c 0,104,105
- 696 956 696 956 649 987 c 1,106,107
- 584 940 584 940 584 864 c 1,108,-1
- 594 862 l 1,109,110
- 626 862 626 862 649 885 c 1,111,-1
- 674 858 l 1,112,-1
- 524 655 l 1,113,-1
- 532 657 l 1,114,115
- 550 657 550 657 575 631 c 1,116,-1
- 627 631 l 1,93,94
-1010 272 m 1,117,-1
- 1030 270 l 2,118,119
- 1056 270 1056 270 1099 290 c 0,120,121
- 1141 310 1141 310 1141 334 c 1,122,-1
- 1139 342 l 1,123,-1
- 1010 272 l 1,117,-1
-725 471 m 1,124,125
- 706 490 706 490 686 500 c 1,126,-1
- 674 498 l 1,127,128
- 717 476 717 476 717 453 c 1,129,130
- 701 415 701 415 674 369 c 1,131,132
- 731 426 731 426 731 451 c 1,133,-1
- 725 471 l 1,124,125
-215 811 m 1,134,-1
- 211 807 l 1,135,-1
- 184 831 l 1,136,-1
- 211 756 l 1,137,-1
- 212 799 l 1,138,139
- 213 805 213 805 215 811 c 1,134,-1
-350 725 m 1,140,-1
- 293 852 l 1,141,-1
- 262 831 l 1,142,-1
- 252 834 l 1,143,-1
- 238 829 l 1,144,145
- 271 796 271 796 270 725 c 2,146,-1
- 270 707 l 1,147,-1
- 350 725 l 1,140,-1
-340 549 m 1,148,-1
- 340 575 l 1,149,-1
- 287 575 l 1,150,-1
- 340 549 l 1,148,-1
-983 1200 m 1,151,-1
- 987 1192 l 1,152,-1
- 983 1202 l 1,153,-1
- 983 1200 l 1,151,-1
-950 1493 m 1,154,-1
- 995 1180 l 1,155,-1
- 987 1192 l 1,156,-1
- 993 1178 l 1,157,158
- 1036 1163 1036 1163 1122 1163 c 0,159,160
- 1268 1163 1268 1163 1335 1235 c 1,161,162
- 1334 1186 1334 1186 1254 1174 c 0,163,164
- 1211 1167 1211 1167 1102 1151 c 0,165,166
- 1020 1130 1020 1130 1020 1075 c 0,167,168
- 1020 1043 1020 1043 1034 1012 c 1,169,170
- 1173 1065 1173 1065 1329 1065 c 0,171,172
- 1568 1065 1568 1065 1808 961 c 1,173,-1
- 1860 807 l 1,174,-1
- 1833 702 l 1,175,176
- 1759 684 1759 684 1634 569 c 0,177,178
- 1526 467 1526 467 1409 467 c 0,179,180
- 1363 467 1363 467 1214 522 c 1,181,-1
- 1241 549 l 1,182,-1
- 1204 575 l 1,183,-1
- 1190 575 l 1,184,-1
- 1192 426 l 1,185,-1
- 1189 367 l 1,186,-1
- 1181 325 l 2,187,188
- 1170 289 1170 289 1149 270 c 0,189,190
- 1117 241 1117 241 1034 238 c 0,191,192
- 918 230 918 230 879 217 c 0,193,194
- 817 199 817 199 770 117 c 2,195,-1
- 700 -18 l 1,196,-1
- 674 8 l 1,197,198
- 776 92 776 92 776 170 c 0,199,200
- 776 232 776 232 731 263 c 0,201,202
- 690 291 690 291 638 292 c 2,203,-1
- 623 291 l 1,204,205
- 651 425 651 425 651 485 c 0,206,207
- 651 491 651 491 651 496 c 2,208,-1
- 649 600 l 1,209,210
- 570 503 570 503 416 420 c 1,211,212
- 407 462 407 462 374 495 c 0,213,214
- 340 526 340 526 297 526 c 0,215,216
- 247 526 247 526 186 459 c 0,217,218
- 133 400 133 400 132 354 c 2,219,-1
- 133 342 l 1,220,-1
- 106 342 l 1,221,222
- 115 381 115 381 178 471 c 0,223,224
- 240 556 240 556 240 588 c 0,225,226
- 240 634 240 634 184 678 c 1,227,-1
- 186 733 l 2,228,229
- 186 752 186 752 180 788 c 0,230,231
- 174 826 174 826 174 844 c 0,232,233
- 174 899 174 899 236 967 c 0,234,235
- 250 985 250 985 340 1065 c 1,236,237
- 324 1101 324 1101 248 1186 c 0,238,239
- 184 1254 184 1254 184 1321 c 1,240,241
- 184 1294 184 1294 211 1270 c 1,242,-1
- 223 1270 l 2,243,244
- 244 1270 244 1270 262 1296 c 1,245,-1
- 262 1323 l 2,246,247
- 262 1383 262 1383 184 1374 c 1,248,249
- 188 1408 188 1408 219 1499 c 0,250,251
- 246 1577 246 1577 246 1624 c 0,252,253
- 246 1651 246 1651 236 1683 c 1,254,255
- 284 1683 284 1683 328 1753 c 1,256,-1
- 324 1753 l 1,257,-1
- 324 1761 l 1,258,-1
- 336 1792 l 1,259,-1
- 367 1765 l 1,260,261
- 390 1769 390 1769 442 1812 c 1,262,263
- 770 1565 770 1565 905 1090 c 1,264,265
- 940 1124 940 1124 952 1139 c 0,266,267
- 977 1168 977 1168 983 1200 c 1,268,269
- 946 1278 946 1278 946 1403 c 0,270,271
- 946 1405 946 1405 950 1493 c 1,154,-1
-479 600 m 0,272,273
- 456 600 456 600 397 555 c 1,274,-1
- 481 586 l 1,275,276
- 510 586 510 586 524 537 c 1,277,-1
- 528 553 l 1,278,279
- 528 600 528 600 479 600 c 0,272,273
-745 303 m 1,280,-1
- 745 330 l 1,281,-1
- 694 330 l 1,282,-1
- 745 303 l 1,280,-1
-842 365 m 1,283,284
- 842 347 842 347 883 309 c 1,285,-1
- 913 301 l 1,286,-1
- 965 389 l 1,287,-1
- 877 432 l 1,288,-1
- 842 365 l 1,283,284
-973 721 m 1,289,-1
- 969 694 l 1,290,291
- 969 653 969 653 983 637 c 1,292,293
- 1050 667 1050 667 1061 772 c 1,294,295
- 978 806 978 806 983 907 c 1,296,-1
- 926 788 l 2,297,298
- 887 712 887 712 850 684 c 1,299,-1
- 856 674 l 1,300,-1
- 834 657 l 1,301,-1
- 815 666 l 1,302,303
- 800 653 800 653 760 580 c 1,304,-1
- 973 721 l 1,289,-1
-1251 745 m 1,305,306
- 1220 726 1220 726 1219 694 c 0,307,308
- 1219 626 1219 626 1297 625 c 0,309,310
- 1311 625 1311 625 1327 627 c 1,311,312
- 1348 571 1348 571 1382 559 c 1,313,-1
- 1397 606 l 1,314,315
- 1397 622 1397 622 1324 673 c 0,316,317
- 1251 723 1251 723 1251 745 c 1,305,306
-397 1290 m 1,318,319
- 366 1271 366 1271 365 1239 c 0,320,321
- 365 1169 365 1169 447 1169 c 0,322,323
- 459 1169 459 1169 473 1171 c 1,324,325
- 494 1116 494 1116 528 1104 c 1,326,-1
- 543 1151 l 1,327,328
- 543 1166 543 1166 470 1218 c 0,329,330
- 397 1268 397 1268 397 1290 c 1,318,319
-1706 852 m 0,331,332
- 1706 807 1706 807 1679 807 c 2,333,-1
- 1602 807 l 1,334,335
- 1589 839 1589 839 1589 858 c 128,-1,336
- 1589 877 1589 877 1602 909 c 1,337,-1
- 1599 909 l 1,338,-1
- 1602 911 l 1,339,-1
- 1661 911 l 2,340,341
- 1706 911 1706 911 1706 852 c 0,331,332
-524 1597 m 0,342,343
- 524 1564 524 1564 442 1528 c 1,344,345
- 416 1540 416 1540 416 1575 c 2,346,-1
- 416 1630 l 1,347,348
- 429 1630 429 1630 454 1644 c 0,349,350
- 478 1657 478 1657 489 1657 c 0,351,352
- 524 1657 524 1657 524 1597 c 0,342,343
-EndSplineSet
-Validated: 37
+1508.17 770.337 m 1,0,-1
+ 1352.46 794.3 l 1,1,-1
+ 1329.11 679.812 l 1,2,3
+ 1342.08 655.85 1342.08 655.85 1379.28 655.85 c 2,4,-1
+ 1440.7 655.85 l 1,5,6
+ 1469.24 675.375 1469.24 675.375 1508.17 770.337 c 1,0,-1
+1508.17 586.625 m 1,7,-1
+ 1485.67 610.587 l 1,8,-1
+ 1462.32 541.362 l 1,9,-1
+ 1440.7 565.324 l 1,10,-1
+ 1418.21 541.362 l 1,11,-1
+ 1440.7 520.062 l 1,12,-1
+ 1508.17 586.625 l 1,7,-1
+1129.29 816.487 m 1,13,-1
+ 1105.94 794.3 l 1,14,-1
+ 1105.94 773.887 l 2,15,16
+ 1105.94 733.062 1105.94 733.062 1129.29 725.074 c 1,17,-1
+ 1105.94 701.112 l 1,18,-1
+ 1173.41 679.812 l 1,19,-1
+ 1171.68 697.562 l 2,20,21
+ 1171.68 725.074 1171.68 725.074 1195.04 794.3 c 1,22,-1
+ 1129.29 816.487 l 1,13,-1
+482.275 1388.92 m 1,23,24
+ 455.46 1483 455.46 1483 388.855 1483 c 1,25,-1
+ 370.69 1479.45 l 1,26,27
+ 324.845 1448.39 324.845 1448.39 324.845 1387.15 c 0,28,29
+ 324.845 1310.82 324.845 1310.82 392.315 1274.44 c 1,30,31
+ 425.186 1275.32 425.186 1275.32 451.135 1317.92 c 0,32,33
+ 457.19 1328.57 457.19 1328.57 482.275 1388.92 c 1,23,24
+1017.71 816.487 m 1,34,-1
+ 994.355 823.587 l 1,35,36
+ 958.891 823.587 958.891 823.587 958.891 775.662 c 1,37,-1
+ 973.595 749.037 l 1,38,39
+ 950.24 725.074 950.24 725.074 950.24 701.112 c 1,40,-1
+ 955.43 701.112 l 2,41,42
+ 986.57 701.112 986.57 701.112 996.085 756.137 c 0,43,44
+ 1004.74 810.274 1004.74 810.274 1017.71 816.487 c 1,34,-1
+1317 490.774 m 1,45,-1
+ 1262.5 426.875 l 1,46,-1
+ 1285 405.574 l 1,47,48
+ 1303.16 418 1303.16 418 1334.3 450.837 c 1,49,-1
+ 1317 490.774 l 1,45,-1
+419.13 1186.57 m 1,50,51
+ 461.515 1222.07 461.515 1222.07 461.515 1238.05 c 1,52,-1
+ 459.785 1250.47 l 1,53,54
+ 415.67 1231.84 415.67 1231.84 415.67 1205.21 c 1,55,-1
+ 419.13 1186.57 l 1,50,51
+659.6 1135.99 m 1,56,57
+ 617.215 1184.8 617.215 1184.8 576.561 1184.8 c 0,58,59
+ 557.53 1184.8 557.53 1184.8 525.525 1171.49 c 0,60,61
+ 491.79 1158.17 491.79 1158.17 473.625 1158.17 c 0,62,63
+ 448.54 1158.17 448.54 1158.17 424.32 1177.7 c 1,64,65
+ 432.97 1159.95 432.97 1159.95 464.11 1133.32 c 0,66,67
+ 494.385 1107.59 494.385 1107.59 503.9 1090.72 c 1,68,-1
+ 659.6 1135.99 l 1,56,57
+682.955 999.312 m 1,69,70
+ 680.36 1045.46 680.36 1045.46 661.33 1045.46 c 1,71,-1
+ 571.37 999.312 l 1,72,-1
+ 571.37 981.562 l 2,73,74
+ 571.37 941.625 571.37 941.625 593.86 930.975 c 1,75,-1
+ 682.955 999.312 l 1,69,70
+994.355 473.912 m 1,76,77
+ 973.595 463.262 973.595 463.262 973.595 419.774 c 2,78,-1
+ 973.595 405.574 l 1,79,-1
+ 994.355 473.912 l 1,76,77
+458.055 868.85 m 1,80,-1
+ 304.085 908.787 l 1,81,-1
+ 326.575 884.824 l 1,82,83
+ 304.085 861.75 304.085 861.75 285.92 861.75 c 2,84,-1
+ 282.46 861.75 l 1,85,86
+ 305.815 837.787 305.815 837.787 331.765 837.787 c 0,87,88
+ 355.12 837.787 355.12 837.787 394.045 854.649 c 0,89,90
+ 430.375 868.85 430.375 868.85 453.73 868.85 c 0,91,92
+ 456.325 868.85 456.325 868.85 458.055 868.85 c 1,80,-1
+530.715 523.612 m 1,93,94
+ 551.475 587.512 551.475 587.512 551.475 589.287 c 0,95,96
+ 551.475 607.925 551.475 607.925 530.715 614.137 c 1,97,98
+ 556.665 643.425 556.665 643.425 574.83 638.1 c 1,99,100
+ 574.83 670.05 574.83 670.05 624.135 741.938 c 2,101,-1
+ 695.065 843.112 l 1,102,103
+ 649.22 812.05 649.22 812.05 618.945 812.05 c 0,104,105
+ 590.4 812.05 590.4 812.05 549.745 839.562 c 1,106,107
+ 493.521 797.85 493.521 797.85 493.521 730.399 c 1,108,-1
+ 502.17 728.625 l 1,109,110
+ 529.85 728.625 529.85 728.625 549.745 749.037 c 1,111,-1
+ 571.37 725.074 l 1,112,-1
+ 441.62 544.912 l 1,113,-1
+ 448.54 546.688 l 1,114,115
+ 464.11 546.688 464.11 546.688 485.735 523.612 c 1,116,-1
+ 530.715 523.612 l 1,93,94
+862.01 205 m 1,117,-1
+ 879.311 203.225 l 2,118,119
+ 901.8 203.225 901.8 203.225 938.995 220.975 c 0,120,121
+ 975.325 238.725 975.325 238.725 975.325 260.024 c 1,122,-1
+ 973.595 267.125 l 1,123,-1
+ 862.01 205 l 1,117,-1
+615.485 381.612 m 1,124,125
+ 599.05 398.475 599.05 398.475 581.75 407.35 c 1,126,-1
+ 571.37 405.574 l 1,127,128
+ 608.565 386.05 608.565 386.05 608.565 365.637 c 1,129,130
+ 594.725 331.912 594.725 331.912 571.37 291.087 c 1,131,132
+ 620.675 341.675 620.675 341.675 620.675 363.862 c 1,133,-1
+ 615.485 381.612 l 1,124,125
+174.335 683.362 m 1,134,-1
+ 170.875 679.812 l 1,135,-1
+ 147.521 701.112 l 1,136,-1
+ 170.875 634.55 l 1,137,-1
+ 171.74 672.712 l 1,138,139
+ 172.605 678.037 172.605 678.037 174.335 683.362 c 1,134,-1
+291.11 607.037 m 1,140,-1
+ 241.805 719.75 l 1,141,-1
+ 214.99 701.112 l 1,142,-1
+ 206.34 703.774 l 1,143,-1
+ 194.23 699.337 l 1,144,145
+ 222.775 670.05 222.775 670.05 221.91 607.037 c 2,146,-1
+ 221.91 591.062 l 1,147,-1
+ 291.11 607.037 l 1,140,-1
+282.46 450.837 m 1,148,-1
+ 282.46 473.912 l 1,149,-1
+ 236.615 473.912 l 1,150,-1
+ 282.46 450.837 l 1,148,-1
+838.655 1028.6 m 1,151,-1
+ 842.115 1021.5 l 1,152,-1
+ 838.655 1030.38 l 1,153,-1
+ 838.655 1028.6 l 1,151,-1
+810.11 1288.64 m 1,154,-1
+ 849.035 1010.85 l 1,155,-1
+ 842.115 1021.5 l 1,156,-1
+ 847.305 1009.07 l 1,157,158
+ 884.5 995.762 884.5 995.762 958.891 995.762 c 0,159,160
+ 1085.18 995.762 1085.18 995.762 1143.13 1059.66 c 1,161,162
+ 1142.27 1016.17 1142.27 1016.17 1073.07 1005.52 c 0,163,164
+ 1035.88 999.312 1035.88 999.312 941.59 985.112 c 0,165,166
+ 870.66 966.475 870.66 966.475 870.66 917.662 c 0,167,168
+ 870.66 889.262 870.66 889.262 882.771 861.75 c 1,169,170
+ 1003 908.787 1003 908.787 1137.95 908.787 c 0,171,172
+ 1344.68 908.787 1344.68 908.787 1552.28 816.487 c 1,173,-1
+ 1597.26 679.812 l 1,174,-1
+ 1573.91 586.625 l 1,175,176
+ 1509.9 570.649 1509.9 570.649 1401.77 468.587 c 0,177,178
+ 1308.35 378.062 1308.35 378.062 1207.15 378.062 c 0,179,180
+ 1167.36 378.062 1167.36 378.062 1038.47 426.875 c 1,181,-1
+ 1061.83 450.837 l 1,182,-1
+ 1029.82 473.912 l 1,183,-1
+ 1017.71 473.912 l 1,184,-1
+ 1019.44 341.675 l 1,185,-1
+ 1016.84 289.312 l 1,186,-1
+ 1009.92 252.037 l 2,187,188
+ 1000.41 220.087 1000.41 220.087 982.245 203.225 c 0,189,190
+ 954.565 177.487 954.565 177.487 882.771 174.824 c 0,191,192
+ 782.43 167.725 782.43 167.725 748.695 156.188 c 0,193,194
+ 695.065 140.212 695.065 140.212 654.41 67.4375 c 2,195,-1
+ 593.86 -52.375 l 1,196,-1
+ 571.37 -29.3008 l 1,197,198
+ 659.6 45.25 659.6 45.25 659.6 114.475 c 0,199,200
+ 659.6 169.5 659.6 169.5 620.675 197.012 c 0,201,202
+ 585.21 221.862 585.21 221.862 540.23 222.75 c 2,203,-1
+ 527.255 221.862 l 1,204,205
+ 551.475 340.787 551.475 340.787 551.475 394.037 c 0,206,207
+ 551.475 399.362 551.475 399.362 551.475 403.8 c 2,208,-1
+ 549.745 496.1 l 1,209,210
+ 481.41 410.012 481.41 410.012 348.2 336.35 c 1,211,212
+ 340.415 373.625 340.415 373.625 311.87 402.912 c 0,213,214
+ 282.46 430.425 282.46 430.425 245.265 430.425 c 0,215,216
+ 202.015 430.425 202.015 430.425 149.25 370.962 c 0,217,218
+ 103.405 318.6 103.405 318.6 102.54 277.774 c 2,219,-1
+ 103.405 267.125 l 1,220,-1
+ 80.0498 267.125 l 1,221,222
+ 87.835 301.737 87.835 301.737 142.33 381.612 c 0,223,224
+ 195.96 457.05 195.96 457.05 195.96 485.449 c 0,225,226
+ 195.96 526.274 195.96 526.274 147.521 565.324 c 1,227,-1
+ 149.25 614.137 l 2,228,229
+ 149.25 631 149.25 631 144.061 662.949 c 0,230,231
+ 138.87 696.675 138.87 696.675 138.87 712.649 c 0,232,233
+ 138.87 761.462 138.87 761.462 192.5 821.812 c 0,234,235
+ 204.61 837.787 204.61 837.787 282.46 908.787 c 1,236,237
+ 268.62 940.737 268.62 940.737 202.88 1016.17 c 0,238,239
+ 147.521 1076.52 147.521 1076.52 147.521 1135.99 c 1,240,241
+ 147.521 1112.02 147.521 1112.02 170.875 1090.72 c 1,242,-1
+ 181.255 1090.72 l 2,243,244
+ 199.42 1090.72 199.42 1090.72 214.99 1113.8 c 1,245,-1
+ 214.99 1137.76 l 2,246,247
+ 214.99 1191.01 214.99 1191.01 147.521 1183.02 c 1,248,249
+ 150.98 1213.2 150.98 1213.2 177.795 1293.96 c 0,250,251
+ 201.15 1363.19 201.15 1363.19 201.15 1404.9 c 0,252,253
+ 201.15 1428.86 201.15 1428.86 192.5 1457.26 c 1,254,255
+ 234.021 1457.26 234.021 1457.26 272.08 1519.39 c 1,256,-1
+ 268.62 1519.39 l 1,257,-1
+ 268.62 1526.49 l 1,258,-1
+ 279 1554 l 1,259,-1
+ 305.815 1530.04 l 1,260,261
+ 325.71 1533.59 325.71 1533.59 370.69 1571.75 c 1,262,263
+ 654.41 1352.54 654.41 1352.54 771.186 930.975 c 1,264,265
+ 801.46 961.149 801.46 961.149 811.84 974.462 c 0,266,267
+ 833.465 1000.2 833.465 1000.2 838.655 1028.6 c 1,268,269
+ 806.65 1097.82 806.65 1097.82 806.65 1208.76 c 0,270,271
+ 806.65 1210.54 806.65 1210.54 810.11 1288.64 c 1,154,-1
+402.695 496.1 m 0,272,273
+ 382.8 496.1 382.8 496.1 331.765 456.162 c 1,274,-1
+ 404.425 483.675 l 1,275,276
+ 429.51 483.675 429.51 483.675 441.62 440.188 c 1,277,-1
+ 445.08 454.387 l 1,278,279
+ 445.08 496.1 445.08 496.1 402.695 496.1 c 0,272,273
+632.785 232.512 m 1,280,-1
+ 632.785 256.475 l 1,281,-1
+ 588.67 256.475 l 1,282,-1
+ 632.785 232.512 l 1,280,-1
+716.69 287.537 m 1,283,284
+ 716.69 271.562 716.69 271.562 752.155 237.837 c 1,285,-1
+ 778.105 230.737 l 1,286,-1
+ 823.085 308.837 l 1,287,-1
+ 746.965 347 l 1,288,-1
+ 716.69 287.537 l 1,283,284
+830.005 603.487 m 1,289,-1
+ 826.545 579.524 l 1,290,291
+ 826.545 543.137 826.545 543.137 838.655 528.938 c 1,292,293
+ 896.61 555.562 896.61 555.562 906.125 648.75 c 1,294,295
+ 834.33 678.925 834.33 678.925 838.655 768.562 c 1,296,-1
+ 789.35 662.949 l 2,297,298
+ 755.615 595.5 755.615 595.5 723.61 570.649 c 1,299,-1
+ 728.8 561.774 l 1,300,-1
+ 709.771 546.688 l 1,301,-1
+ 693.335 554.675 l 1,302,303
+ 680.36 543.137 680.36 543.137 645.76 478.35 c 1,304,-1
+ 830.005 603.487 l 1,289,-1
+1070.47 624.787 m 1,305,306
+ 1043.66 607.925 1043.66 607.925 1042.79 579.524 c 0,307,308
+ 1042.79 519.175 1042.79 519.175 1110.27 518.287 c 0,309,310
+ 1122.38 518.287 1122.38 518.287 1136.21 520.062 c 1,311,312
+ 1154.38 470.362 1154.38 470.362 1183.79 459.712 c 1,313,-1
+ 1196.77 501.425 l 1,314,315
+ 1196.77 515.625 1196.77 515.625 1133.62 560.887 c 0,316,317
+ 1070.47 605.262 1070.47 605.262 1070.47 624.787 c 1,305,306
+331.765 1108.47 m 1,318,319
+ 304.95 1091.61 304.95 1091.61 304.085 1063.21 c 0,320,321
+ 304.085 1001.09 304.085 1001.09 375.015 1001.09 c 0,322,323
+ 385.396 1001.09 385.396 1001.09 397.505 1002.86 c 1,324,325
+ 415.67 954.05 415.67 954.05 445.08 943.399 c 1,326,-1
+ 458.055 985.112 l 1,327,328
+ 458.055 998.425 458.055 998.425 394.91 1044.57 c 0,329,330
+ 331.765 1088.95 331.765 1088.95 331.765 1108.47 c 1,318,319
+1464.05 719.75 m 0,331,332
+ 1464.05 679.812 1464.05 679.812 1440.7 679.812 c 2,333,-1
+ 1374.09 679.812 l 1,334,335
+ 1362.84 708.212 1362.84 708.212 1362.84 725.074 c 128,-1,336
+ 1362.84 741.938 1362.84 741.938 1374.09 770.337 c 1,337,-1
+ 1371.5 770.337 l 1,338,-1
+ 1374.09 772.112 l 1,339,-1
+ 1425.12 772.112 l 2,340,341
+ 1464.05 772.112 1464.05 772.112 1464.05 719.75 c 0,331,332
+441.62 1380.94 m 0,342,343
+ 441.62 1351.65 441.62 1351.65 370.69 1319.7 c 1,344,345
+ 348.2 1330.35 348.2 1330.35 348.2 1361.41 c 2,346,-1
+ 348.2 1410.22 l 1,347,348
+ 359.445 1410.22 359.445 1410.22 381.07 1422.65 c 0,349,350
+ 401.83 1434.19 401.83 1434.19 411.345 1434.19 c 0,351,352
+ 441.62 1434.19 441.62 1434.19 441.62 1380.94 c 0,342,343
+EndSplineSet
+Validated: 16421
EndChar
StartChar: uniE034
-Encoding: 57396 57396 365
+Encoding: 365 57396 365
Width: 1429
GlyphClass: 2
Flags: W
@@ -44131,7 +44668,7 @@ Validated: 9
EndChar
StartChar: uniE036
-Encoding: 57398 57398 366
+Encoding: 366 57398 366
Width: 798
GlyphClass: 2
Flags: W
@@ -44196,7 +44733,7 @@ Validated: 1
EndChar
StartChar: uniE037
-Encoding: 57399 57399 367
+Encoding: 367 57399 367
Width: 798
GlyphClass: 2
Flags: W
@@ -44261,7 +44798,7 @@ Validated: 1
EndChar
StartChar: uniE038
-Encoding: 57400 57400 368
+Encoding: 368 57400 368
Width: 1183
GlyphClass: 2
Flags: W
@@ -44451,7 +44988,7 @@ Validated: 33
EndChar
StartChar: uniE03A
-Encoding: 57402 57402 369
+Encoding: 369 57402 369
Width: 1566
GlyphClass: 2
Flags: W
@@ -44587,7 +45124,7 @@ Validated: 1
EndChar
StartChar: uniE080
-Encoding: 57472 57472 370
+Encoding: 370 57472 370
Width: 2048
GlyphClass: 2
Flags: W
@@ -44833,7 +45370,7 @@ Validated: 1
EndChar
StartChar: uniE081
-Encoding: 57473 57473 371
+Encoding: 371 57473 371
Width: 2172
GlyphClass: 2
Flags: W
@@ -44967,7 +45504,7 @@ Validated: 1
EndChar
StartChar: uniE082
-Encoding: 57474 57474 372
+Encoding: 372 57474 372
Width: 2209
GlyphClass: 2
Flags: W
@@ -45101,7 +45638,7 @@ Validated: 1
EndChar
StartChar: uniE083
-Encoding: 57475 57475 373
+Encoding: 373 57475 373
Width: 1628
GlyphClass: 2
Flags: W
@@ -45199,7 +45736,7 @@ Validated: 1
EndChar
StartChar: uniE084
-Encoding: 57476 57476 374
+Encoding: 374 57476 374
Width: 1628
GlyphClass: 2
Flags: W
@@ -45218,7 +45755,7 @@ Validated: 1
EndChar
StartChar: uniE085
-Encoding: 57477 57477 375
+Encoding: 375 57477 375
Width: 1628
GlyphClass: 2
Flags: W
@@ -45237,7 +45774,7 @@ Validated: 1
EndChar
StartChar: uniE086
-Encoding: 57478 57478 376
+Encoding: 376 57478 376
Width: 1628
GlyphClass: 2
Flags: W
@@ -45276,7 +45813,7 @@ Validated: 1
EndChar
StartChar: uniE087
-Encoding: 57479 57479 377
+Encoding: 377 57479 377
Width: 1628
GlyphClass: 2
Flags: W
@@ -45315,7 +45852,7 @@ Validated: 1
EndChar
StartChar: uniE089
-Encoding: 57481 57481 378
+Encoding: 378 57481 378
Width: 1460
GlyphClass: 2
Flags: W
@@ -45389,7 +45926,7 @@ Validated: 1
EndChar
StartChar: uniE08A
-Encoding: 57482 57482 379
+Encoding: 379 57482 379
Width: 1024
GlyphClass: 2
Flags: W
@@ -45536,7 +46073,7 @@ Validated: 1
EndChar
StartChar: uniE08B
-Encoding: 57483 57483 380
+Encoding: 380 57483 380
Width: 1949
GlyphClass: 2
Flags: W
@@ -45635,7 +46172,7 @@ Validated: 1
EndChar
StartChar: uniE08C
-Encoding: 57484 57484 381
+Encoding: 381 57484 381
Width: 1726
GlyphClass: 2
Flags: W
@@ -45693,7 +46230,7 @@ Validated: 1
EndChar
StartChar: uniE08D
-Encoding: 57485 57485 382
+Encoding: 382 57485 382
Width: 1091
GlyphClass: 2
Flags: W
@@ -45775,7 +46312,7 @@ Validated: 1
EndChar
StartChar: uniE08E
-Encoding: 57486 57486 383
+Encoding: 383 57486 383
Width: 1054
GlyphClass: 2
Flags: W
@@ -45812,7 +46349,7 @@ Validated: 1
EndChar
StartChar: uniE08F
-Encoding: 57487 57487 384
+Encoding: 384 57487 384
Width: 833
GlyphClass: 2
Flags: W
@@ -45864,7 +46401,7 @@ Validated: 1
EndChar
StartChar: uniE090
-Encoding: 57488 57488 385
+Encoding: 385 57488 385
Width: 788
GlyphClass: 2
Flags: W
@@ -45917,7 +46454,7 @@ Validated: 1
EndChar
StartChar: uniE091
-Encoding: 57489 57489 386
+Encoding: 386 57489 386
Width: 681
GlyphClass: 2
Flags: W
@@ -45964,7 +46501,7 @@ Validated: 1
EndChar
StartChar: uniE092
-Encoding: 57490 57490 387
+Encoding: 387 57490 387
Width: 681
GlyphClass: 2
Flags: W
@@ -46011,7 +46548,7 @@ Validated: 1
EndChar
StartChar: uniE093
-Encoding: 57491 57491 388
+Encoding: 388 57491 388
Width: 942
GlyphClass: 2
Flags: W
@@ -46069,7 +46606,7 @@ Validated: 1
EndChar
StartChar: uniE094
-Encoding: 57492 57492 389
+Encoding: 389 57492 389
Width: 681
GlyphClass: 2
Flags: W
@@ -46122,7 +46659,7 @@ Validated: 1
EndChar
StartChar: uniE095
-Encoding: 57493 57493 390
+Encoding: 390 57493 390
Width: 681
GlyphClass: 2
Flags: W
@@ -46175,7 +46712,7 @@ Validated: 1
EndChar
StartChar: uniE096
-Encoding: 57494 57494 391
+Encoding: 391 57494 391
Width: 681
GlyphClass: 2
Flags: W
@@ -46258,7 +46795,7 @@ Validated: 1
EndChar
StartChar: uniE097
-Encoding: 57495 57495 392
+Encoding: 392 57495 392
Width: 1024
GlyphClass: 2
Flags: W
@@ -46299,7 +46836,7 @@ Validated: 1
EndChar
StartChar: uniE098
-Encoding: 57496 57496 393
+Encoding: 393 57496 393
Width: 1056
GlyphClass: 2
Flags: W
@@ -46348,7 +46885,7 @@ Validated: 1
EndChar
StartChar: uniE09B
-Encoding: 57499 57499 394
+Encoding: 394 57499 394
Width: 860
GlyphClass: 2
Flags: W
@@ -46458,7 +46995,7 @@ Validated: 1
EndChar
StartChar: uniE09E
-Encoding: 57502 57502 395
+Encoding: 395 57502 395
Width: 638
GlyphClass: 2
Flags: W
@@ -46516,7 +47053,7 @@ Validated: 1
EndChar
StartChar: uniE09F
-Encoding: 57503 57503 396
+Encoding: 396 57503 396
Width: 638
GlyphClass: 2
Flags: W
@@ -46574,7 +47111,7 @@ Validated: 1
EndChar
StartChar: uniE0A0
-Encoding: 57504 57504 397
+Encoding: 397 57504 397
Width: 1536
GlyphClass: 2
Flags: W
@@ -46631,7 +47168,7 @@ Validated: 1
EndChar
StartChar: uniE0A1
-Encoding: 57505 57505 398
+Encoding: 398 57505 398
Width: 1628
GlyphClass: 2
Flags: W
@@ -46676,7 +47213,7 @@ Validated: 1
EndChar
StartChar: uniE0A5
-Encoding: 57509 57509 399
+Encoding: 399 57509 399
Width: 569
GlyphClass: 2
Flags: W
@@ -46811,7 +47348,7 @@ Validated: 1
EndChar
StartChar: uniE0A6
-Encoding: 57510 57510 400
+Encoding: 400 57510 400
Width: 765
GlyphClass: 2
Flags: W
@@ -46852,7 +47389,7 @@ Validated: 1
EndChar
StartChar: uniE0A7
-Encoding: 57511 57511 401
+Encoding: 401 57511 401
Width: 741
GlyphClass: 2
Flags: W
@@ -46894,7 +47431,7 @@ Validated: 1
EndChar
StartChar: uniE0A8
-Encoding: 57512 57512 402
+Encoding: 402 57512 402
Width: 890
GlyphClass: 2
Flags: W
@@ -46911,7 +47448,7 @@ Validated: 1
EndChar
StartChar: uniE0A9
-Encoding: 57513 57513 403
+Encoding: 403 57513 403
Width: 890
GlyphClass: 2
Flags: W
@@ -46928,7 +47465,7 @@ Validated: 1
EndChar
StartChar: uniE0AA
-Encoding: 57514 57514 404
+Encoding: 404 57514 404
Width: 1824
GlyphClass: 2
Flags: W
@@ -47026,7 +47563,7 @@ Validated: 1
EndChar
StartChar: uniE0AB
-Encoding: 57515 57515 405
+Encoding: 405 57515 405
Width: 833
GlyphClass: 2
Flags: W
@@ -47068,22 +47605,24 @@ Validated: 1
EndChar
StartChar: uniE0AC
-Encoding: 57516 57516 406
-Width: 1267
+Encoding: 406 57516 406
+Width: 1253
GlyphClass: 2
Flags: W
-HStem: -14 57<51 157.953 461.935 608> 1303 75<674 1136.89> 1319 59<317 448.134>
-VStem: 1116 105<1133 1207.73>
+HStem: 0 57<148.289 248.771 552.615 715.289> 1317 75<525.29 995.324> 1333 59<153.711 301.963>
+VStem: 326.334 198.956<111.262 1314> 1000.33 105<1147 1305.74>
TtInstrs:
SVTCA[y-axis]
+PUSHB_3
+ 8
+ 0
+ 0
+CALL
PUSHB_1
- 9
-MDAP[rnd]
-PUSHB_1
- 10
+ 5
MDRP[min,rnd,black]
PUSHB_1
- 5
+ 10
SHP[rp2]
PUSHB_1
0
@@ -47113,112 +47652,73 @@ PUSHB_1
30
MDAP[rnd]
PUSHB_1
- 23
+ 15
MDRP[rp0,rnd,white]
PUSHB_1
- 22
+ 0
MDRP[min,rnd,black]
-PUSHB_2
- 31
- 1
-CALL
PUSHB_1
- 54
-SMD
+ 0
+SRP0
PUSHB_2
+ 23
1
- 0
-SDPVTL[orthog]
-PUSHB_1
- 0
-MDAP[no-rnd]
-SFVTPV
+CALL
PUSHB_1
- 1
-MDRP[grey]
+ 22
+MDRP[min,rnd,black]
PUSHB_2
- 15
- 18
-MIRP[rp0,min,black]
-PUSHB_1
- 14
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_3
- 1
- 14
- 15
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
- 0
+ 31
1
- 14
- 15
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
+CALL
PUSHB_2
- 22
23
-SRP1
-SRP2
-PUSHB_1
- 27
-IP
-SVTCA[y-axis]
-PUSHB_2
0
- 10
SRP1
SRP2
-PUSHB_1
- 17
+PUSHB_2
+ 8
+ 7
+IP
IP
+SVTCA[y-axis]
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-674 1303 m 1,0,-1
- 461 227 l 2,1,2
- 446 156 446 156 446 106 c 0,3,4
- 446 43 446 43 594 43 c 0,5,6
- 607 43 607 43 621 43 c 1,7,-1
- 608 -14 l 1,8,-1
- 41 -14 l 1,9,-1
- 51 43 l 1,10,11
- 155 58 155 58 200 96 c 0,12,13
- 246 136 246 136 264 227 c 2,14,-1
- 442 1133 l 2,15,16
- 459 1220 459 1220 459 1268 c 0,17,18
- 459 1315 459 1315 305 1319 c 1,19,-1
- 317 1378 l 1,20,-1
- 1268 1378 l 1,21,-1
- 1221 1133 l 1,22,-1
- 1116 1133 l 1,23,24
- 1116 1152 1116 1152 1127 1194 c 0,25,26
- 1139 1234 1139 1234 1139 1255 c 0,27,28
- 1139 1303 1139 1303 1004 1303 c 2,29,-1
- 674 1303 l 1,0,-1
+525.29 1317 m 5,0,-1
+ 521.443 241 l 6,1,2
+ 520.244 170 520.244 170 529.963 120 c 4,3,4
+ 542.209 57 542.209 57 690.209 57 c 4,5,6
+ 703.209 57 703.209 57 717.209 57 c 5,7,-1
+ 715.289 0 l 5,8,-1
+ 148.289 0 l 5,9,-1
+ 147.209 57 l 5,10,11
+ 248.293 72 248.293 72 285.907 110 c 4,12,13
+ 324.132 150 324.132 150 324.443 241 c 6,14,-1
+ 326.334 1147 l 6,15,16
+ 326.424 1234 326.424 1234 317.093 1282 c 4,17,18
+ 307.957 1329 307.957 1329 153.18 1333 c 5,19,-1
+ 153.711 1392 l 5,20,-1
+ 1104.71 1392 l 5,21,-1
+ 1105.33 1147 l 5,22,-1
+ 1000.33 1147 l 5,23,24
+ 996.642 1166 996.642 1166 999.478 1208 c 4,25,26
+ 1003.7 1248 1003.7 1248 999.62 1269 c 4,27,28
+ 990.29 1317 990.29 1317 855.29 1317 c 6,29,-1
+ 525.29 1317 l 5,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0AD
-Encoding: 57517 57517 407
-Width: 1568
+Encoding: 407 57517 407
+Width: 1407
GlyphClass: 2
Flags: W
-HStem: 4 127<195 1186>
+HStem: 4 127<145.866 1136.87>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -47227,9 +47727,6 @@ MDAP[rnd]
PUSHB_1
6
MDRP[min,rnd,black]
-PUSHB_1
- 7
-SHP[rp2]
SVTCA[x-axis]
PUSHB_1
9
@@ -47238,57 +47735,16 @@ PUSHB_2
10
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 8
- 7
-SDPVTL[orthog]
-PUSHB_1
- 7
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 8
-MDRP[grey]
-PUSHB_2
- 4
- 19
-MIRP[rp0,min,black]
-PUSHB_1
- 3
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_3
- 3
- 4
- 8
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
- 3
- 4
- 7
- 8
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
SVTCA[y-axis]
PUSHB_2
6
0
SRP1
SRP2
-PUSHB_1
+PUSHB_2
1
+ 4
+IP
IP
IUP[y]
IUP[x]
@@ -47296,28 +47752,28 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-90 4 m 1,0,-1
- 115 131 l 1,1,-1
- 965 1407 l 1,2,-1
- 1030 1409 l 1,3,-1
- 1391 131 l 1,4,-1
- 1366 4 l 1,5,-1
- 90 4 l 1,0,-1
-195 131 m 1,6,-1
- 1186 131 l 1,7,-1
- 889 1178 l 1,8,-1
- 195 131 l 1,6,-1
+65.5518 4 m 5,0,-1
+ 65.8662 131 l 5,1,-1
+ 667.837 1407 l 5,2,-1
+ 732.448 1409 l 5,3,-1
+ 1341.87 131 l 5,4,-1
+ 1341.55 4 l 5,5,-1
+ 65.5518 4 l 5,0,-1
+145.866 131 m 5,6,-1
+ 1136.87 131 l 5,7,-1
+ 636.35 1178 l 5,8,-1
+ 145.866 131 l 5,6,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uniE0AE
-Encoding: 57518 57518 408
-Width: 1619
+Encoding: 408 57518 408
+Width: 1597
GlyphClass: 2
Flags: W
-HStem: -25 68<547.591 866.51> 686 88<670.356 997.53> 1370 66<776.786 1095.39>
-VStem: 141 211<253.455 809.568> 524 72<508 579.68> 612 70<876.32 948> 1294 205<587.432 1158.28>
+HStem: -25 68<646.801 969.229> 686 88<630.045 979.242> 1370 66<634.881 948.79>
+VStem: 540.391 72<508 663.785 787.749 948> 995.391 70<508 669.863 796.247 948>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -47340,11 +47796,11 @@ CALL
PUSHB_4
64
38
- 32
+ 43
9
CALL
PUSHB_1
- 42
+ 32
SHP[rp2]
PUSHB_3
49
@@ -47371,157 +47827,112 @@ PUSHB_1
56
MDAP[rnd]
PUSHB_1
- 4
-MDRP[rp0,rnd,white]
-PUSHB_1
- 16
-MDRP[min,rnd,black]
-PUSHB_1
- 16
-SRP0
-PUSHB_2
43
- 1
-CALL
+MDRP[rp0,rnd,white]
PUSHB_1
42
MDRP[min,rnd,black]
PUSHB_1
- 42
-SRP0
-PUSHB_2
- 44
- 1
-CALL
-PUSHB_1
45
-MDRP[min,rnd,black]
+SHP[rp2]
PUSHB_1
- 45
+ 42
SRP0
PUSHB_2
- 24
+ 33
1
CALL
PUSHB_1
- 12
+ 54
+SHP[rp2]
+PUSHB_1
+ 32
MDRP[min,rnd,black]
PUSHB_2
57
1
CALL
PUSHB_2
- 45
- 44
+ 33
+ 42
SRP1
SRP2
-PUSHB_2
+PUSHB_4
0
- 47
-IP
-IP
-PUSHB_1
- 24
-SRP1
-PUSHB_7
- 20
8
28
- 33
- 35
- 54
- 55
+ 20
DEPTH
SLOOP
IP
SVTCA[y-axis]
-PUSHB_2
- 38
- 20
-SRP1
-SRP2
-PUSHB_2
- 4
- 16
-IP
-IP
-PUSHB_2
- 28
- 49
-SRP1
-SRP2
-PUSHB_2
- 24
- 12
-IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-649 -25 m 0,0,1
- 408 -25 408 -25 274 115 c 0,2,3
- 141 257 141 257 141 498 c 0,4,5
- 141 898 141 898 358 1159 c 0,6,7
- 593 1436 593 1436 985 1436 c 0,8,9
- 1232 1436 1232 1436 1366 1295 c 0,10,11
- 1499 1156 1499 1156 1499 907 c 0,12,13
- 1499 512 1499 512 1274 252 c 0,14,15
- 1035 -25 1035 -25 649 -25 c 0,0,1
-352 463 m 0,16,17
- 352 288 352 288 434 172 c 0,18,19
- 528 43 528 43 696 43 c 0,20,21
- 975 43 975 43 1149 346 c 0,22,23
- 1294 602 1294 602 1294 905 c 0,24,25
- 1294 1095 1294 1095 1219 1221 c 0,26,27
- 1126 1370 1126 1370 948 1370 c 0,28,29
- 654 1370 654 1370 487 1049 c 0,30,31
- 352 788 352 788 352 463 c 0,16,17
-1049 508 m 1,32,-1
- 979 508 l 1,33,34
- 999 625 999 625 999 635 c 0,35,36
- 999 686 999 686 885 686 c 2,37,-1
- 762 686 l 2,38,39
- 667 686 667 686 637 639 c 0,40,41
- 618 616 618 616 596 508 c 1,42,-1
- 524 508 l 1,43,-1
- 612 948 l 1,44,-1
- 682 948 l 1,45,46
- 670 842 670 842 670 813 c 0,47,48
- 670 774 670 774 764 774 c 2,49,-1
- 901 774 l 2,50,51
- 994 774 994 774 1024 819 c 0,52,53
- 1043 846 1043 846 1065 948 c 1,54,-1
- 1135 948 l 1,55,-1
- 1049 508 l 1,32,-1
+768.995 -25 m 4,0,1
+ 527.995 -25 527.995 -25 366.781 115 c 4,2,3
+ 206.18 257 206.18 257 159.334 498 c 4,4,5
+ 81.582 898 81.582 898 247.849 1159 c 4,6,7
+ 429.005 1436 429.005 1436 821.005 1436 c 4,8,9
+ 1068 1436 1068 1436 1229.41 1295 c 4,10,11
+ 1389.43 1156 1389.43 1156 1437.83 907 c 4,12,13
+ 1514.61 512 1514.61 512 1340.15 252 c 4,14,15
+ 1155 -25 1155 -25 768.995 -25 c 4,0,1
+377.138 463 m 4,16,17
+ 411.153 288 411.153 288 515.702 172 c 4,18,19
+ 634.777 43 634.777 43 802.777 43 c 4,20,21
+ 1081.78 43 1081.78 43 1196.88 346 c 4,22,23
+ 1292.12 602 1292.12 602 1233.22 905 c 4,24,25
+ 1196.29 1095 1196.29 1095 1096.8 1221 c 4,26,27
+ 974.834 1370 974.834 1370 796.834 1370 c 4,28,29
+ 502.834 1370 502.834 1370 398.23 1049 c 4,30,31
+ 313.964 788 313.964 788 377.138 463 c 4,16,17
+1065.39 508 m 5,32,-1
+ 995.391 508 l 5,33,34
+ 992.647 625 992.647 625 990.704 635 c 4,35,36
+ 980.79 686 980.79 686 866.79 686 c 6,37,-1
+ 743.79 686 l 6,38,39
+ 648.79 686 648.79 686 627.926 639 c 4,40,41
+ 613.397 616 613.397 616 612.391 508 c 5,42,-1
+ 540.391 508 l 5,43,-1
+ 542.863 948 l 5,44,-1
+ 612.863 948 l 5,45,46
+ 621.467 842 621.467 842 627.104 813 c 4,47,48
+ 634.685 774 634.685 774 728.685 774 c 6,49,-1
+ 865.685 774 l 6,50,51
+ 958.685 774 958.685 774 979.938 819 c 4,52,53
+ 993.689 846 993.689 846 995.863 948 c 5,54,-1
+ 1065.86 948 l 5,55,-1
+ 1065.39 508 l 5,32,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0AF
-Encoding: 57519 57519 409
-Width: 1605
+Encoding: 409 57519 409
+Width: 1453
GlyphClass: 2
Flags: W
-HStem: 2 59<37 146.547 373 397 949.57 1110.84 1374.84 1458>
+HStem: 2 59<10.667 114.618 345.695 381.667 927.135 1078.92 1342.8 1441.67>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
- 25
+ 11
MDAP[rnd]
PUSHB_1
- 10
+ 24
SHP[rp1]
PUSHB_1
- 26
+ 12
MDRP[min,rnd,black]
PUSHB_4
5
9
- 12
23
+ 26
DEPTH
SLOOP
SHP[rp2]
@@ -47533,55 +47944,10 @@ PUSHB_2
33
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 31
-SDPVTL[orthog]
-SFVTPV
-PUSHB_1
- 0
-SRP0
-PUSHB_1
- 31
-MDRP[grey]
-PUSHB_2
- 18
- 20
-MIRP[rp0,min,black]
-PUSHB_1
- 19
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_4
- 0
- 18
- 19
- 31
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
- 0
- 18
- 19
- 31
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
SVTCA[y-axis]
PUSHB_2
- 26
- 25
+ 12
+ 11
SRP1
SRP2
PUSHB_1
@@ -47593,42 +47959,42 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-901 1141 m 1,0,-1
- 551 592 l 2,1,2
- 265 138 265 138 264 94 c 0,3,4
- 264 61 264 61 317 61 c 1,5,-1
- 313 61 l 1,6,-1
- 317 63 l 1,7,-1
- 373 66 l 1,8,-1
- 408 61 l 1,9,-1
- 397 2 l 1,10,-1
- 25 2 l 1,11,-1
- 37 61 l 1,12,13
- 137 71 137 71 182 115 c 0,14,15
- 197 129 197 129 268 246 c 2,16,-1
- 989 1413 l 1,17,-1
- 1055 1413 l 1,18,-1
- 1309 240 l 2,19,20
- 1328 145 1328 145 1350 115 c 0,21,22
- 1381 70 1381 70 1468 61 c 1,23,-1
- 1458 2 l 1,24,-1
- 942 2 l 1,25,-1
- 952 61 l 1,26,-1
- 1024 57 l 1,27,28
- 1114 57 1114 57 1114 106 c 0,29,30
- 1114 178 1114 178 1100 246 c 2,31,-1
- 901 1141 l 1,0,-1
+664.736 1141 m 5,0,-1
+ 421.451 592 l 6,1,2
+ 223.699 138 223.699 138 231.252 94 c 4,3,4
+ 237.667 61 237.667 61 290.667 61 c 5,5,-1
+ 286.667 61 l 5,6,-1
+ 290.278 63 l 5,7,-1
+ 345.695 66 l 5,8,-1
+ 381.667 61 l 5,9,-1
+ 382.135 2 l 5,10,-1
+ 10.1357 2 l 5,11,-1
+ 10.667 61 l 5,12,13
+ 108.723 71 108.723 71 145.17 115 c 4,14,15
+ 157.449 129 157.449 129 205.706 246 c 6,16,-1
+ 699.864 1413 l 5,17,-1
+ 765.864 1413 l 5,18,-1
+ 1247.87 240 l 6,19,20
+ 1285.34 145 1285.34 145 1313.17 115 c 4,21,22
+ 1352.92 70 1352.92 70 1441.67 61 c 5,23,-1
+ 1443.13 2 l 5,24,-1
+ 927.135 2 l 5,25,-1
+ 925.667 61 l 5,26,-1
+ 998.444 57 l 5,27,28
+ 1088.44 57 1088.44 57 1078.92 106 c 4,29,30
+ 1064.92 178 1064.92 178 1037.71 246 c 6,31,-1
+ 664.736 1141 l 5,0,-1
EndSplineSet
-Validated: 5
+Validated: 16421
EndChar
StartChar: uniE0B0
-Encoding: 57520 57520 410
-Width: 1423
+Encoding: 410 57520 410
+Width: 1319
GlyphClass: 2
Flags: W
-HStem: 2 162<219.891 1094.68> 694 92<493.006 1049.32> 1255 140<503.201 1254.97>
-VStem: 133 98<252.272 326> 418 94<874.921 948> 1239 90<1092 1162.06>
+HStem: 2 324<101.406 202.859 1112.21 1215.39> 2 162<211.032 1086.1> 694 92<379.032 946.49> 1092 303<166.614 262.842 1055.72 1148.51> 1255 140<297.433 1050.64>
+VStem: 101.406 98<180.77 326> 165.512 92<1092 1219.89> 264.753 90<530 672.062 795.271 948> 962.753 92<530 680.441 799.547 948> 1058.51 90<1092 1245.43> 1117.41 100<210.105 326>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -47637,19 +48003,11 @@ MDAP[rnd]
PUSHB_1
45
MDRP[min,rnd,black]
-PUSHB_3
- 45
- 39
- 10
-CALL
-PUSHB_4
- 64
- 45
- 50
- 9
-CALL
PUSHB_1
40
+MDRP[min,rnd,black]
+PUSHB_1
+ 50
SHP[rp2]
PUSHB_1
20
@@ -47665,7 +48023,7 @@ CALL
PUSHB_4
64
20
- 24
+ 25
9
CALL
PUSHB_1
@@ -47691,17 +48049,12 @@ MDAP[rnd]
PUSHB_1
12
MDRP[min,rnd,black]
-PUSHB_3
- 6
+PUSHB_1
12
- 10
-CALL
-PUSHB_4
- 64
- 6
- 10
- 9
-CALL
+SRP0
+PUSHB_1
+ 11
+MDRP[min,rnd,black]
PUSHB_1
0
SHP[rp2]
@@ -47715,78 +48068,87 @@ MDRP[rp0,rnd,white]
PUSHB_1
41
MDRP[min,rnd,black]
+PUSHB_4
+ 11
+ 41
+ 40
+ 8
+CALL
+PUSHB_1
+ 10
+MDRP[min,rnd,black]
PUSHB_1
41
SRP0
PUSHB_2
- 26
+ 25
1
CALL
PUSHB_1
- 27
+ 24
MDRP[min,rnd,black]
PUSHB_1
27
+SHP[rp2]
+PUSHB_1
+ 24
SRP0
PUSHB_2
+ 15
1
+CALL
+PUSHB_1
+ 36
+SHP[rp2]
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 14
+SRP0
+PUSHB_2
1
+ 11
CALL
PUSHB_1
0
MDRP[min,rnd,black]
+PUSHB_4
+ 50
+ 0
+ 1
+ 8
+CALL
+PUSHB_1
+ 51
+MDRP[min,rnd,black]
PUSHB_2
53
1
CALL
PUSHB_2
- 41
- 40
+ 10
+ 11
SRP1
SRP2
PUSHB_1
- 43
+ 42
IP
-PUSHB_1
- 26
-SRP1
-PUSHB_3
- 12
- 11
+PUSHB_2
+ 24
25
-IP
-IP
-IP
-PUSHB_1
- 27
+SRP1
SRP2
-PUSHB_3
- 24
- 10
- 29
-IP
-IP
-IP
PUSHB_1
- 1
-SRP1
-PUSHB_6
- 15
- 17
- 36
- 37
- 38
- 50
-DEPTH
-SLOOP
+ 9
IP
-PUSHB_1
- 0
-SRP2
PUSHB_2
- 3
- 51
-IP
+ 14
+ 15
+SRP1
+SRP2
+PUSHB_1
+ 2
IP
SVTCA[y-axis]
IUP[y]
@@ -47795,55 +48157,56 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1329 1092 m 1,0,-1
- 1239 1092 l 1,1,2
- 1255 1213 1255 1213 1255 1219 c 0,3,4
- 1255 1255 1255 1255 1126 1255 c 2,5,-1
- 635 1255 l 2,6,7
- 540 1255 540 1255 502 1221 c 0,8,9
- 464 1186 464 1186 438 1092 c 1,10,-1
- 346 1092 l 1,11,-1
- 406 1395 l 1,12,-1
- 1391 1395 l 1,13,-1
- 1329 1092 l 1,0,-1
-1126 530 m 1,14,-1
- 1034 530 l 1,15,16
- 1051 640 1051 640 1051 643 c 0,17,18
- 1051 694 1051 694 920 694 c 2,19,-1
- 606 694 l 2,20,21
- 510 694 510 694 477 655 c 0,22,23
- 464 637 464 637 426 530 c 1,24,-1
- 336 530 l 1,25,-1
- 418 948 l 1,26,-1
- 512 948 l 1,27,28
- 492 831 492 831 492 817 c 0,29,30
- 492 786 492 786 633 786 c 2,31,-1
- 975 786 l 2,32,33
- 1050 786 1050 786 1079 834 c 0,34,35
- 1097 858 1097 858 1116 948 c 1,36,-1
- 1210 948 l 1,37,-1
- 1126 530 l 1,14,-1
-1184 2 m 1,38,-1
- 70 2 l 1,39,-1
- 133 326 l 1,40,-1
- 231 326 l 1,41,42
- 219 222 219 222 219 217 c 0,43,44
- 219 164 219 164 365 164 c 2,45,-1
- 977 164 l 2,46,47
- 1054 164 1054 164 1096 209 c 0,48,49
- 1127 244 1127 244 1149 326 c 1,50,-1
- 1249 326 l 1,51,-1
- 1184 2 l 1,38,-1
-EndSplineSet
-Validated: 1
+1148.51 1092 m 5,0,-1
+ 1058.51 1092 l 5,1,2
+ 1050.99 1213 1050.99 1213 1049.83 1219 c 4,3,4
+ 1042.83 1255 1042.83 1255 913.827 1255 c 6,5,-1
+ 422.827 1255 l 6,6,7
+ 327.827 1255 327.827 1255 296.437 1221 c 4,8,9
+ 265.239 1186 265.239 1186 257.512 1092 c 5,10,-1
+ 165.512 1092 l 5,11,-1
+ 166.614 1395 l 5,12,-1
+ 1151.61 1395 l 5,13,-1
+ 1148.51 1092 l 5,0,-1
+1054.75 530 m 5,14,-1
+ 962.753 530 l 5,15,16
+ 958.371 640 958.371 640 957.788 643 c 4,17,18
+ 947.875 694 947.875 694 816.875 694 c 6,19,-1
+ 502.875 694 l 6,20,21
+ 406.875 694 406.875 694 381.455 655 c 4,22,23
+ 371.954 637 371.954 637 354.753 530 c 5,24,-1
+ 264.753 530 l 5,25,-1
+ 265.502 948 l 5,26,-1
+ 359.502 948 l 5,27,28
+ 362.244 831 362.244 831 364.966 817 c 4,29,30
+ 370.992 786 370.992 786 511.992 786 c 6,31,-1
+ 853.992 786 l 6,32,33
+ 928.992 786 928.992 786 948.661 834 c 4,34,35
+ 961.996 858 961.996 858 963.502 948 c 5,36,-1
+ 1057.5 948 l 5,37,-1
+ 1054.75 530 l 5,14,-1
+1215.39 2 m 5,38,-1
+ 101.386 2 l 5,39,-1
+ 101.406 326 l 5,40,-1
+ 199.406 326 l 5,41,42
+ 207.622 222 207.622 222 208.594 217 c 4,43,44
+ 218.896 164 218.896 164 364.896 164 c 6,45,-1
+ 976.896 164 l 6,46,47
+ 1053.9 164 1053.9 164 1087.15 209 c 4,48,49
+ 1111.35 244 1111.35 244 1117.41 326 c 5,50,-1
+ 1217.41 326 l 5,51,-1
+ 1215.39 2 l 5,38,-1
+EndSplineSet
+Validated: 16385
EndChar
StartChar: uniE0B1
-Encoding: 57521 57521 411
-Width: 1755
+Encoding: 411 57521 411
+Width: 1728
GlyphClass: 2
Flags: W
-HStem: 2 57<61 165.688 465.857 596 922 1026.38 1327.94 1454> 1319 76<684 1346> 1335 60<328 459.375 1601.09 1720>
+HStem: 2 57<159.386 257.527 557.637 703.307 1019.31 1118.29 1419.79 1562.39> 1319 76<536.387 1198.39> 1335 60<165.614 314.301 1456.03 1568.61>
+VStem: 338.432 197.955<114.262 1317.47> 1193.96 196.389<113.14 1286.89>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -47866,9 +48229,6 @@ PUSHB_1
0
MDAP[rnd]
PUSHB_1
- 39
-SHP[rp1]
-PUSHB_1
20
MDRP[min,rnd,black]
PUSHB_1
@@ -47884,140 +48244,94 @@ SVTCA[x-axis]
PUSHB_1
40
MDAP[rnd]
-PUSHB_2
- 41
- 1
-CALL
PUSHB_1
- 54
-SMD
-PUSHB_2
- 1
- 0
-SDPVTL[orthog]
+ 15
+MDRP[rp0,rnd,white]
PUSHB_1
0
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 1
-MDRP[grey]
-PUSHB_2
+MDRP[min,rnd,black]
+PUSHB_3
+ 0
15
- 18
-MIRP[rp0,min,black]
+ 10
+CALL
+PUSHB_4
+ 64
+ 0
+ 8
+ 9
+CALL
PUSHB_1
- 14
-MDRP[grey]
+ 0
+SRP0
PUSHB_2
38
- 39
-SDPVTL[orthog]
-SFVTCA[x-axis]
-PUSHB_1
- 39
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 38
-MDRP[grey]
-PUSHB_2
- 26
- 18
-MIRP[rp0,min,black]
-PUSHB_1
- 27
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_6
1
- 14
- 15
- 26
+CALL
+PUSHB_1
27
+MDRP[min,rnd,black]
+PUSHB_3
38
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_8
- 0
- 1
- 14
- 15
- 26
27
- 38
- 39
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
+ 10
+CALL
+PUSHB_4
64
-SMD
-SVTCA[x-axis]
-SVTCA[y-axis]
+ 38
+ 33
+ 9
+CALL
PUSHB_2
- 0
- 10
-SRP1
-SRP2
-PUSHB_1
- 17
-IP
+ 41
+ 1
+CALL
+SVTCA[y-axis]
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-684 1319 m 1,0,-1
- 471 244 l 2,1,2
- 455 164 455 164 455 113 c 0,3,4
- 455 77 455 77 516 68 c 1,5,6
- 526 65 526 65 606 59 c 1,7,-1
- 596 2 l 1,8,-1
- 51 2 l 1,9,-1
- 61 59 l 1,10,11
- 161 74 161 74 209 113 c 0,12,13
- 256 153 256 153 274 244 c 2,14,-1
- 453 1149 l 2,15,16
- 469 1230 469 1230 469 1284 c 0,17,18
- 469 1334 469 1334 315 1335 c 1,19,-1
- 328 1395 l 1,20,-1
- 1731 1395 l 1,21,-1
- 1720 1335 l 1,22,23
- 1615 1323 1615 1323 1572 1288 c 0,24,25
- 1530 1253 1530 1253 1509 1149 c 2,26,-1
- 1329 244 l 2,27,28
- 1313 164 1313 164 1313 113 c 0,29,30
- 1313 65 1313 65 1466 59 c 1,31,-1
- 1454 2 l 1,32,-1
- 909 2 l 1,33,-1
- 922 59 l 1,34,35
- 1023 74 1023 74 1068 112 c 0,36,37
- 1113 148 1113 148 1133 246 c 2,38,-1
- 1346 1319 l 1,39,-1
- 684 1319 l 1,0,-1
+536.387 1319 m 5,0,-1
+ 532.346 244 l 6,1,2
+ 531.896 164 531.896 164 541.81 113 c 4,3,4
+ 548.808 77 548.808 77 611.557 68 c 5,5,6
+ 622.14 65 622.14 65 703.307 59 c 5,7,-1
+ 704.386 2 l 5,8,-1
+ 159.386 2 l 5,9,-1
+ 158.307 59 l 5,10,11
+ 255.391 74 255.391 74 295.81 113 c 4,12,13
+ 335.034 153 335.034 153 335.346 244 c 6,14,-1
+ 338.432 1149 l 6,15,16
+ 338.687 1230 338.687 1230 328.19 1284 c 4,17,18
+ 318.472 1334 318.472 1334 164.277 1335 c 5,19,-1
+ 165.614 1395 l 5,20,-1
+ 1568.61 1395 l 5,21,-1
+ 1569.28 1335 l 5,22,23
+ 1466.61 1323 1466.61 1323 1430.41 1288 c 4,24,25
+ 1395.22 1253 1395.22 1253 1394.43 1149 c 6,26,-1
+ 1390.35 244 l 6,27,28
+ 1389.9 164 1389.9 164 1399.81 113 c 4,29,30
+ 1409.14 65 1409.14 65 1563.31 59 c 5,31,-1
+ 1562.39 2 l 5,32,-1
+ 1017.39 2 l 5,33,-1
+ 1019.31 59 l 5,34,35
+ 1117.39 74 1117.39 74 1155 112 c 4,36,37
+ 1193.01 148 1193.01 148 1193.96 246 c 6,38,-1
+ 1198.39 1319 l 5,39,-1
+ 536.387 1319 l 5,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B2
-Encoding: 57522 57522 412
-Width: 1425
+Encoding: 412 57522 412
+Width: 1406
GlyphClass: 2
Flags: W
-HStem: 6 133<145 1059.89> 1323 76<588 1262.43>
-VStem: 1116 101<239.647 313> 1241 105<1153 1224.97>
+HStem: 6 133<235.533 1143.83> 1153 246<1134.43 1239.43> 1323 76<448.387 1130.07>
+VStem: 1134.43 105<1153 1312.67> 1172.71 101<175.141 313>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -48043,57 +48357,60 @@ MDAP[rnd]
PUSHB_1
4
MDRP[min,rnd,black]
-PUSHB_3
- 14
+PUSHB_1
4
- 10
-CALL
-PUSHB_4
- 64
- 14
+SRP0
+PUSHB_1
6
- 9
-CALL
+MDRP[min,rnd,black]
SVTCA[x-axis]
PUSHB_1
24
MDAP[rnd]
PUSHB_1
- 21
+ 7
MDRP[rp0,rnd,white]
PUSHB_1
- 22
+ 6
MDRP[min,rnd,black]
-PUSHB_1
- 22
-SRP0
-PUSHB_2
+PUSHB_3
7
- 1
+ 6
+ 10
+CALL
+PUSHB_4
+ 64
+ 7
+ 0
+ 9
+CALL
+PUSHB_4
+ 64
+ 7
+ 4
+ 9
CALL
PUSHB_1
6
+SRP0
+PUSHB_1
+ 22
+DUP
+MDRP[rp0,rnd,white]
+SRP1
+PUSHB_1
+ 21
+MDRP[min,rnd,black]
+PUSHB_1
+ 21
+MDAP[rnd]
+PUSHB_1
+ 22
MDRP[min,rnd,black]
PUSHB_2
25
1
CALL
-PUSHB_2
- 22
- 21
-SRP1
-SRP2
-PUSHB_1
- 23
-IP
-PUSHB_2
- 6
- 7
-SRP1
-SRP2
-PUSHB_1
- 11
-IP
SVTCA[y-axis]
PUSHB_2
16
@@ -48104,8 +48421,16 @@ PUSHB_1
1
IP
PUSHB_1
- 14
+ 6
SRP1
+PUSHB_2
+ 2
+ 15
+IP
+IP
+PUSHB_1
+ 14
+SRP2
PUSHB_1
3
IP
@@ -48115,47 +48440,47 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-16 6 m 1,0,-1
- 43 139 l 1,1,-1
- 776 662 l 1,2,-1
- 322 1311 l 1,3,-1
- 340 1399 l 1,4,-1
- 1395 1399 l 1,5,-1
- 1346 1153 l 1,6,-1
- 1241 1153 l 1,7,8
- 1241 1172 1241 1172 1252 1214 c 0,9,10
- 1264 1256 1264 1256 1264 1276 c 0,11,12
- 1264 1323 1264 1323 1133 1323 c 2,13,-1
- 588 1323 l 1,14,-1
- 987 741 l 1,15,-1
- 145 139 l 1,16,-1
- 924 139 l 2,17,18
- 1026 139 1026 139 1061 174 c 0,19,20
- 1096 210 1096 210 1116 313 c 1,21,-1
- 1217 313 l 1,22,-1
- 1157 6 l 1,23,-1
- 16 6 l 1,0,-1
+132.386 6 m 5,0,-1
+ 133.533 139 l 5,1,-1
+ 764.872 662 l 5,2,-1
+ 184.72 1311 l 5,3,-1
+ 185.614 1399 l 5,4,-1
+ 1240.61 1399 l 5,5,-1
+ 1239.43 1153 l 5,6,-1
+ 1134.43 1153 l 5,7,8
+ 1130.74 1172 1130.74 1172 1133.57 1214 c 4,9,10
+ 1137.41 1256 1137.41 1256 1133.52 1276 c 4,11,12
+ 1124.39 1323 1124.39 1323 993.387 1323 c 6,13,-1
+ 448.387 1323 l 5,14,-1
+ 960.517 741 l 5,15,-1
+ 235.533 139 l 5,16,-1
+ 1014.53 139 l 6,17,18
+ 1116.53 139 1116.53 139 1144.73 174 c 4,19,20
+ 1172.73 210 1172.73 210 1172.71 313 c 5,21,-1
+ 1273.71 313 l 5,22,-1
+ 1273.39 6 l 5,23,-1
+ 132.386 6 l 5,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B3
-Encoding: 57523 57523 413
-Width: 1265
+Encoding: 413 57523 413
+Width: 1206
GlyphClass: 2
Flags: W
-HStem: 4 57<164 317.233 568.549 698> 1333 64<115 175.922>
-VStem: 440 117<115 690>
+HStem: 4 57<277.307 425.004 676.433 822.386> 1333 64<-29.9453 49.1543>
+VStem: 458.659 192.895<84.4851 710.138>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
- 21
+ 20
MDAP[rnd]
PUSHB_1
- 22
+ 18
MDRP[min,rnd,black]
PUSHB_1
- 18
+ 22
SHP[rp2]
PUSHB_1
0
@@ -48171,75 +48496,97 @@ PUSHB_1
32
MDAP[rnd]
PUSHB_1
- 28
+ 26
MDRP[rp0,rnd,white]
PUSHB_1
- 16
+ 14
MDRP[min,rnd,black]
+PUSHB_3
+ 26
+ 14
+ 10
+CALL
+PUSHB_4
+ 64
+ 26
+ 21
+ 9
+CALL
PUSHB_2
33
1
CALL
+PUSHB_2
+ 14
+ 26
+SRP1
+SRP2
+PUSHB_4
+ 6
+ 7
+ 25
+ 15
+DEPTH
+SLOOP
+IP
SVTCA[y-axis]
PUSHB_2
0
- 22
+ 18
SRP1
SRP2
-PUSHB_3
- 5
+PUSHB_2
7
10
IP
IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-104 1333 m 1,0,-1
- 115 1397 l 1,1,2
- 366 1397 366 1397 500 1233 c 0,3,4
- 618 1087 618 1087 618 842 c 0,5,6
- 618 771 618 771 610 715 c 1,7,8
- 911 1304 911 1304 1311 1397 c 1,9,-1
- 1300 1333 l 1,10,11
- 1031 1238 1031 1238 850 987 c 0,12,13
- 692 769 692 769 616 461 c 0,14,15
- 557 219 557 219 557 115 c 0,16,17
- 557 61 557 61 703 61 c 2,18,-1
- 711 61 l 1,19,-1
- 698 4 l 1,20,-1
- 152 4 l 1,21,-1
- 164 61 l 1,22,23
- 272 64 272 64 326 94 c 0,24,25
- 364 116 364 116 406 373 c 0,26,27
- 440 593 440 593 440 690 c 0,28,29
- 440 906 440 906 371 1071 c 0,30,31
- 281 1282 281 1282 104 1333 c 1,0,-1
+-29.9453 1333 m 1,0,-1
+ -31.3857 1397 l 1,1,2
+ 219.614 1397 219.614 1397 385.492 1233 c 0,3,4
+ 531.872 1087 531.872 1087 579.495 842 c 0,5,6
+ 593.296 771 593.296 771 596.182 715 c 1,7,8
+ 782.691 1304 782.691 1304 1164.61 1397 c 1,9,-1
+ 1166.05 1333 l 1,10,11
+ 915.521 1238 915.521 1238 783.31 987 c 0,12,13
+ 667.685 769 667.685 769 651.554 461 c 0,14,15
+ 639.594 219 639.594 219 659.81 115 c 0,16,17
+ 670.307 61 670.307 61 816.307 61 c 2,18,-1
+ 824.307 61 l 1,19,-1
+ 822.386 4 l 1,20,-1
+ 276.386 4 l 1,21,-1
+ 277.307 61 l 1,22,23
+ 384.723 64 384.723 64 432.892 94 c 0,24,25
+ 466.615 116 466.615 116 458.659 373 c 0,26,27
+ 449.896 593 449.896 593 431.041 690 c 0,28,29
+ 389.055 906 389.055 906 287.982 1071 c 0,30,31
+ 156.968 1282 156.968 1282 -29.9453 1333 c 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B4
-Encoding: 57524 57524 414
-Width: 1443
+Encoding: 414 57524 414
+Width: 1411
GlyphClass: 2
Flags: W
-HStem: 4 59<338 461.906 738.125 870> 293 65<428.514 557 768 912.594> 1042 64<570.359 707 915 1030.62> 1339 58<602 732.346 1018.18 1137>
-VStem: 111 192<455.09 820.337> 1167 197<576.851 937.983>
+HStem: 4 59<429.917 548.266 824.357 973.386> 293 65<451.561 603.575 802.575 938.58> 1042 64<481.697 608.179 804.619 935.143> 1339 58<435.888 581.79 867.506 979.614>
+VStem: 608.619 196<102.119 293 358 1042 1106 1299.06>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
- 30
+ 29
MDAP[rnd]
PUSHB_1
- 31
+ 27
MDRP[min,rnd,black]
PUSHB_1
- 27
+ 31
SHP[rp2]
PUSHB_1
23
@@ -48279,164 +48626,96 @@ PUSHB_1
47
MDAP[rnd]
PUSHB_1
- 2
+ 36
MDRP[rp0,rnd,white]
-PUSHB_1
- 38
-MDRP[min,rnd,black]
-PUSHB_1
- 38
-SRP0
-PUSHB_2
- 45
- 1
-CALL
-PUSHB_1
- 19
-MDRP[min,rnd,black]
-PUSHB_2
- 48
- 1
-CALL
-PUSHB_1
- 54
-SMD
PUSHB_2
0
6
-SDPVTL[orthog]
-PUSHB_1
- 0
-MDAP[no-rnd]
-PUSHB_1
- 17
-MDAP[no-rnd]
-PUSHB_1
- 0
-SRP0
-PUSHB_2
- 23
- 18
-MIRP[rp0,min,black]
-PUSHB_1
- 17
-SRP0
-PUSHB_2
- 6
- 18
-MIRP[rp0,min,black]
-PUSHB_2
- 0
- 6
-SPVTL[orthog]
-PUSHB_2
- 35
- 0
-SRP0
-MDRP[grey]
+SHP[rp2]
+SHP[rp2]
PUSHB_1
- 36
-MDRP[grey]
-PUSHB_2
40
- 23
-SRP0
-MDRP[grey]
-PUSHB_1
- 41
-MDRP[grey]
-SPVTCA[x-axis]
-PUSHB_8
- 0
- 6
+MDRP[min,rnd,black]
+PUSHB_2
17
23
- 35
+SHP[rp2]
+SHP[rp2]
+PUSHB_3
36
40
- 41
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-PUSHB_2
- 45
- 38
-SRP1
-SRP2
-PUSHB_4
10
- 12
- 28
+CALL
+PUSHB_4
+ 64
+ 36
30
-DEPTH
-SLOOP
-IP
-SVTCA[y-axis]
+ 9
+CALL
+PUSHB_1
+ 10
+SHP[rp2]
PUSHB_2
+ 48
+ 1
+CALL
+PUSHB_2
+ 40
36
- 41
SRP1
SRP2
-PUSHB_2
- 19
- 2
-IP
+PUSHB_1
+ 24
IP
+SVTCA[y-axis]
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-557 293 m 1,0,1
- 111 293 111 293 111 637 c 0,2,3
- 111 860 111 860 309 991 c 0,4,5
- 482 1106 482 1106 719 1106 c 1,6,7
- 743 1214 743 1214 743 1286 c 0,8,9
- 743 1339 743 1339 592 1339 c 1,10,-1
- 602 1397 l 1,11,-1
- 1147 1397 l 1,12,-1
- 1137 1339 l 1,13,14
- 1012 1327 1012 1327 971 1276 c 0,15,16
- 941 1240 941 1240 915 1106 c 1,17,18
- 1364 1106 1364 1106 1364 766 c 0,19,20
- 1364 544 1364 544 1163 412 c 0,21,22
- 986 293 986 293 754 293 c 1,23,24
- 729 187 729 187 729 115 c 0,25,26
- 729 63 729 63 875 63 c 2,27,-1
- 883 63 l 1,28,-1
- 870 4 l 1,29,-1
- 326 4 l 1,30,-1
- 338 63 l 1,31,32
- 464 74 464 74 504 123 c 0,33,34
- 536 158 536 158 557 293 c 1,0,1
-569 358 m 1,35,-1
- 707 1042 l 1,36,37
- 303 988 303 988 303 604 c 0,38,39
- 303 369 303 369 569 358 c 1,35,-1
-903 1042 m 1,40,-1
- 768 358 l 1,41,42
- 949 372 949 372 1058 485 c 0,43,44
- 1167 600 1167 600 1167 780 c 0,45,46
- 1167 1018 1167 1018 903 1042 c 1,40,-1
+604.21 293 m 5,0,1
+ 158.21 293 158.21 293 91.3428 637 c 4,2,3
+ 47.9961 860 47.9961 860 220.532 991 c 4,4,5
+ 371.179 1106 371.179 1106 608.179 1106 c 5,6,7
+ 611.186 1214 611.186 1214 597.19 1286 c 4,8,9
+ 586.889 1339 586.889 1339 435.888 1339 c 5,10,-1
+ 434.614 1397 l 5,11,-1
+ 979.614 1397 l 5,12,-1
+ 980.888 1339 l 5,13,14
+ 858.221 1327 858.221 1327 827.134 1276 c 4,15,16
+ 804.132 1240 804.132 1240 804.179 1106 c 5,17,18
+ 1253.18 1106 1253.18 1106 1319.27 766 c 4,19,20
+ 1362.42 544 1362.42 544 1187.08 412 c 4,21,22
+ 1033.21 293 1033.21 293 801.21 293 c 5,23,24
+ 796.814 187 796.814 187 810.81 115 c 4,25,26
+ 820.917 63 820.917 63 966.917 63 c 6,27,-1
+ 974.917 63 l 5,28,-1
+ 973.386 4 l 5,29,-1
+ 429.386 4 l 5,30,-1
+ 429.917 63 l 5,31,32
+ 553.779 74 553.779 74 584.255 123 c 4,33,34
+ 609.451 158 609.451 158 604.21 293 c 5,0,1
+603.575 358 m 5,35,-1
+ 608.619 1042 l 5,36,37
+ 215.115 988 215.115 988 289.758 604 c 4,38,39
+ 335.438 369 335.438 369 603.575 358 c 5,35,-1
+804.619 1042 m 5,40,-1
+ 802.575 358 l 5,41,42
+ 980.854 372 980.854 372 1067.89 485 c 4,43,44
+ 1154.54 600 1154.54 600 1119.55 780 c 4,45,46
+ 1073.28 1018 1073.28 1018 804.619 1042 c 5,40,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B5
-Encoding: 57525 57525 415
-Width: 1607
+Encoding: 415 57525 415
+Width: 1439
GlyphClass: 2
Flags: W
-HStem: 2 59<315 433.616 716.438 850> 635 63<524.278 602 813 916.872> 1331 64<150 228.667 580 719.24 978.85 1114 1431.52 1542>
+HStem: 2 59<440.386 551.827 834.669 981.918> 635 63<521.369 614.343 813.343 911.076> 1331 64<16.0547 110.46 444.889 602.514 862.096 989.889 1311.62 1418.61>
+VStem: 614.343 199<111.171 635 698 827.594> 629.532 185.511<698 1288.92>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -48461,7 +48740,7 @@ PUSHB_1
30
SHP[rp2]
PUSHB_1
- 6
+ 7
MDAP[rnd]
PUSHB_3
22
@@ -48482,84 +48761,70 @@ SVTCA[x-axis]
PUSHB_1
60
MDAP[rnd]
-PUSHB_2
- 61
- 1
-CALL
PUSHB_1
- 54
-SMD
-PUSHB_2
- 59
18
-SDPVTL[orthog]
-SFVTPV
+MDRP[rp0,rnd,white]
PUSHB_1
- 59
-SRP0
+ 29
+MDRP[min,rnd,black]
PUSHB_1
+ 47
+SHP[rp2]
+PUSHB_3
+ 29
18
-MDRP[grey]
-PUSHB_2
- 48
- 21
-MIRP[rp0,min,black]
+ 10
+CALL
+PUSHB_4
+ 64
+ 29
+ 25
+ 9
+CALL
+PUSHB_1
+ 53
+SHP[rp2]
PUSHB_1
29
-MDRP[grey]
-PUSHB_2
- 59
- 18
-SPVTL[orthog]
-SFVTCA[x-axis]
-PUSHB_2
- 0
- 59
SRP0
-MDRP[grey]
PUSHB_1
- 17
-MDRP[grey]
-PUSHB_2
- 30
- 48
-SRP0
-MDRP[grey]
+ 0
+MDRP[min,rnd,black]
PUSHB_1
- 47
-MDRP[grey]
-SPVTCA[x-axis]
-SVTCA[y-axis]
-PUSHB_4
- 18
+ 0
+MDAP[rnd]
+PUSHB_3
+ 0
29
- 48
- 59
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_8
+ 10
+CALL
+PUSHB_4
+ 64
0
- 17
+ 22
+ 9
+CALL
+PUSHB_1
+ 54
+SHP[rp2]
+PUSHB_1
18
- 29
- 30
- 47
- 48
+SRP0
+PUSHB_1
59
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
+DUP
+MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
- 64
-SMD
+ 17
+SHP[rp1]
+PUSHB_1
+ 48
+MDRP[min,rnd,black]
+PUSHB_2
+ 61
+ 1
+CALL
SVTCA[y-axis]
PUSHB_2
17
@@ -48570,12 +48835,11 @@ PUSHB_1
1
IP
PUSHB_1
- 6
+ 7
SRP1
-PUSHB_5
+PUSHB_4
4
13
- 20
35
44
DEPTH
@@ -48587,55 +48851,55 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-602 635 m 1,0,1
- 360 647 360 647 303 827 c 0,2,3
- 297 853 297 853 279 1159 c 0,4,5
- 269 1331 269 1331 143 1331 c 2,6,-1
- 139 1331 l 1,7,-1
- 150 1395 l 1,8,-1
- 197 1395 l 2,9,10
- 378 1395 378 1395 428 1257 c 0,11,12
- 449 1197 449 1197 449 969 c 0,13,14
- 449 846 449 846 475 791 c 0,15,16
- 512 704 512 704 616 698 c 1,17,-1
- 686 989 l 2,18,19
- 723 1153 723 1153 723 1284 c 0,20,21
- 723 1336 723 1336 569 1337 c 1,22,-1
- 580 1395 l 1,23,-1
- 1126 1395 l 1,24,-1
- 1114 1337 l 1,25,26
- 1004 1324 1004 1324 967 1290 c 0,27,28
- 924 1256 924 1256 903 1151 c 2,29,-1
- 813 698 l 1,30,31
- 932 698 932 698 1016 836 c 0,32,33
- 1045 882 1045 882 1143 1114 c 0,34,35
- 1217 1289 1217 1289 1293 1341 c 0,36,37
- 1371 1395 1371 1395 1554 1395 c 1,38,-1
- 1542 1331 l 1,39,40
- 1437 1320 1437 1320 1393 1272 c 0,41,42
- 1376 1254 1376 1254 1321 1116 c 0,43,44
- 1227 882 1227 882 1139 780 c 0,45,46
- 1010 635 1010 635 801 635 c 1,47,-1
- 737 377 l 2,48,49
- 707 227 707 227 707 113 c 0,50,51
- 707 61 707 61 858 61 c 1,52,-1
- 850 2 l 1,53,-1
- 305 2 l 1,54,-1
- 315 61 l 1,55,56
- 418 71 418 71 464 110 c 0,57,58
- 510 147 510 147 528 246 c 2,59,-1
- 602 635 l 1,0,1
+614.343 635 m 1,0,1
+ 370.011 647 370.011 647 278.022 827 c 0,2,3
+ 266.969 853 266.969 853 189.488 1159 c 0,4,5
+ 146.055 1331 146.055 1331 20.0547 1331 c 2,6,-1
+ 16.0547 1331 l 1,7,-1
+ 14.6143 1395 l 1,8,-1
+ 61.6143 1395 l 2,9,10
+ 242.614 1395 242.614 1395 319.438 1257 c 0,11,12
+ 352.102 1197 352.102 1197 396.42 969 c 0,13,14
+ 420.329 846 420.329 846 457.02 791 c 0,15,16
+ 510.931 704 510.931 704 616.098 698 c 1,17,-1
+ 629.532 989 l 2,18,19
+ 634.654 1153 634.654 1153 609.19 1284 c 0,20,21
+ 599.082 1336 599.082 1336 444.889 1337 c 1,22,-1
+ 444.614 1395 l 1,23,-1
+ 990.614 1395 l 1,24,-1
+ 989.889 1337 l 1,25,26
+ 882.415 1324 882.415 1324 852.024 1290 c 0,27,28
+ 815.633 1256 815.633 1256 815.043 1151 c 2,29,-1
+ 813.098 698 l 1,30,31
+ 932.098 698 932.098 698 989.272 836 c 0,32,33
+ 1009.33 882 1009.33 882 1062.24 1114 c 0,34,35
+ 1102.22 1289 1102.22 1289 1168.11 1341 c 0,36,37
+ 1235.61 1395 1235.61 1395 1418.61 1395 c 1,38,-1
+ 1419.05 1331 l 1,39,40
+ 1316.19 1320 1316.19 1320 1281.52 1272 c 0,41,42
+ 1268.02 1254 1268.02 1254 1239.85 1116 c 0,43,44
+ 1191.33 882 1191.33 882 1123.16 780 c 0,45,46
+ 1022.34 635 1022.34 635 813.343 635 c 1,47,-1
+ 799.493 377 l 2,48,49
+ 798.65 227 798.65 227 820.81 113 c 0,50,51
+ 830.918 61 830.918 61 981.918 61 c 1,52,-1
+ 985.386 2 l 1,53,-1
+ 440.386 2 l 1,54,-1
+ 438.917 61 l 1,55,56
+ 539.974 71 539.974 71 578.393 110 c 0,57,58
+ 617.201 147 617.201 147 615.957 246 c 2,59,-1
+ 614.343 635 l 1,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B6
-Encoding: 57526 57526 416
-Width: 1763
+Encoding: 416 57526 416
+Width: 1655
GlyphClass: 2
Flags: W
-HStem: -2 297<158 246 1433.98 1495> -2 121<247.925 596 1047 1358.61> 1354 69<876.471 1232.56>
-VStem: 158 104<224.037 295> 279 204<490.217 923.099> 1430 202<701.109 1147.1>
+HStem: -2 121<246.26 602.976 1053.98 1380.41> 1354 69<650.885 1007.81>
+VStem: 130.765 104<139.214 295> 1422.76 104<160.328 295>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -48650,9 +48914,17 @@ MDRP[min,rnd,black]
PUSHB_1
0
SHP[rp2]
-PUSHB_1
+PUSHB_3
+ 31
+ 22
+ 10
+CALL
+PUSHB_4
+ 64
+ 31
24
-MDRP[min,rnd,black]
+ 9
+CALL
PUSHB_1
5
SHP[rp2]
@@ -48673,79 +48945,47 @@ PUSHB_1
25
MDRP[min,rnd,black]
PUSHB_3
- 24
25
+ 24
10
CALL
PUSHB_4
64
- 24
- 23
+ 25
+ 22
9
CALL
PUSHB_1
25
SRP0
PUSHB_2
- 33
- 1
-CALL
-PUSHB_1
- 19
-MDRP[min,rnd,black]
-PUSHB_1
- 19
-SRP0
-PUSHB_2
- 11
+ 5
1
CALL
PUSHB_1
- 41
+ 6
MDRP[min,rnd,black]
PUSHB_2
46
1
CALL
PUSHB_2
+ 5
25
- 24
SRP1
SRP2
-PUSHB_1
- 27
-IP
-PUSHB_2
- 19
- 33
-SRP1
-SRP2
-PUSHB_1
- 29
-IP
-PUSHB_1
- 11
-SRP1
-PUSHB_6
+PUSHB_8
0
- 8
+ 10
+ 18
21
- 22
+ 8
+ 29
31
37
DEPTH
SLOOP
IP
-PUSHB_1
- 41
-SRP2
-PUSHB_3
- 5
- 7
- 6
-IP
-IP
-IP
SVTCA[y-axis]
PUSHB_2
31
@@ -48757,76 +48997,77 @@ PUSHB_2
21
IP
IP
-PUSHB_1
- 24
-SRP1
-PUSHB_1
- 27
-IP
-PUSHB_1
- 15
-SRP2
-PUSHB_4
- 11
- 19
- 33
- 41
-DEPTH
-SLOOP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1047 119 m 1,0,-1
- 1196 119 l 2,1,2
- 1316 119 1316 119 1360 145 c 0,3,4
- 1412 178 1412 178 1450 295 c 1,5,-1
- 1554 295 l 1,6,-1
- 1495 -2 l 1,7,-1
- 938 -2 l 1,8,-1
- 963 119 l 1,9,10
- 1430 529 1430 529 1430 952 c 0,11,12
- 1430 1130 1430 1130 1339 1239 c 0,13,14
- 1241 1354 1241 1354 1067 1354 c 0,15,16
- 792 1354 792 1354 629 1126 c 0,17,18
- 483 923 483 923 483 639 c 0,19,20
- 483 394 483 394 678 119 c 1,21,-1
- 653 -2 l 1,22,-1
- 98 -2 l 1,23,-1
- 158 295 l 1,24,-1
- 262 295 l 1,25,26
- 246 219 246 219 246 174 c 0,27,28
- 246 115 246 115 465 115 c 0,29,30
- 517 115 517 115 596 119 c 1,31,32
- 279 437 279 437 279 686 c 0,33,34
- 279 1024 279 1024 514 1229 c 0,35,36
- 736 1423 736 1423 1079 1423 c 0,37,38
- 1326 1423 1326 1423 1475 1296 c 0,39,40
- 1632 1162 1632 1162 1632 920 c 0,41,42
- 1632 683 1632 683 1438 457 c 0,43,44
- 1312 310 1312 310 1047 119 c 1,0,-1
+1053.98 119 m 5,0,-1
+ 1202.98 119 l 6,1,2
+ 1322.98 119 1322.98 119 1361.92 145 c 4,3,4
+ 1407.51 178 1407.51 178 1422.76 295 c 5,5,-1
+ 1526.76 295 l 5,6,-1
+ 1525.5 -2 l 5,7,-1
+ 968.496 -2 l 5,8,-1
+ 969.976 119 l 5,9,10
+ 1357.28 529 1357.28 529 1275.06 952 c 4,11,12
+ 1240.46 1130 1240.46 1130 1128.27 1239 c 4,13,14
+ 1007.92 1354 1007.92 1354 833.916 1354 c 4,15,16
+ 558.916 1354 558.916 1354 440.235 1126 c 4,17,18
+ 333.694 923 333.694 923 388.898 639 c 4,19,20
+ 436.521 394 436.521 394 684.976 119 c 5,21,-1
+ 683.496 -2 l 5,22,-1
+ 128.496 -2 l 5,23,-1
+ 130.765 295 l 5,24,-1
+ 234.765 295 l 5,25,26
+ 233.538 219 233.538 219 242.285 174 c 4,27,28
+ 253.754 115 253.754 115 472.754 115 c 4,29,30
+ 524.754 115 524.754 115 602.976 119 c 5,31,32
+ 224.163 437 224.163 437 175.763 686 c 4,33,34
+ 110.062 1024 110.062 1024 305.214 1229 c 4,35,36
+ 489.504 1423 489.504 1423 832.504 1423 c 4,37,38
+ 1079.5 1423 1079.5 1423 1253.19 1296 c 4,39,40
+ 1436.24 1162 1436.24 1162 1483.28 920 c 4,41,42
+ 1529.35 683 1529.35 683 1379.28 457 c 4,43,44
+ 1281.85 310 1281.85 310 1053.98 119 c 5,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B7
-Encoding: 57527 57527 417
+Encoding: 417 57527 417
Width: 1232
GlyphClass: 2
Flags: W
-HStem: -18 98<237 465.576> 852 84<406.583 644>
-VStem: 82 178<121.059 548.659> 991 178<763.328 913>
+HStem: -19 98<367.165 549.647> 1 21G<996.418 1241.83> 851 84<333.845 501.503>
+VStem: 902.751 178<667.28 912>
TtInstrs:
SVTCA[y-axis]
+PUSHB_3
+ 34
+ 0
+ 0
+CALL
PUSHB_1
4
-MDAP[rnd]
-PUSHB_1
- 34
MDRP[min,rnd,black]
+PUSHB_3
+ 0
+ 0
+ 0
+CALL
+PUSHB_4
+ 0
+ 4
+ 34
+ 8
+CALL
+PUSHB_1
+ 4
+DUP
+MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
28
MDAP[rnd]
@@ -48838,18 +49079,8 @@ PUSHB_1
38
MDAP[rnd]
PUSHB_1
- 8
-MDRP[rp0,rnd,white]
-PUSHB_1
- 32
-MDRP[min,rnd,black]
-PUSHB_1
- 32
-SRP0
-PUSHB_2
18
- 1
-CALL
+MDRP[rp0,rnd,white]
PUSHB_1
19
MDRP[min,rnd,black]
@@ -48858,50 +49089,33 @@ PUSHB_2
1
CALL
PUSHB_2
+ 19
18
- 32
SRP1
SRP2
-PUSHB_5
+PUSHB_3
0
- 4
- 12
+ 17
21
- 24
-DEPTH
-SLOOP
IP
-PUSHB_1
- 19
-SRP1
-PUSHB_1
- 23
+IP
IP
SVTCA[y-axis]
PUSHB_2
+ 28
34
- 4
SRP1
SRP2
-PUSHB_2
- 0
- 23
-IP
-IP
-PUSHB_1
- 28
-SRP1
-PUSHB_4
- 8
+PUSHB_3
2
21
16
-DEPTH
-SLOOP
+IP
+IP
IP
PUSHB_1
12
-SRP2
+SRP1
PUSHB_2
18
19
@@ -48913,39 +49127,39 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-952 2 m 1,0,1
- 883 104 883 104 797 291 c 1,2,3
- 508 -18 508 -18 293 -18 c 0,4,5
- 181 -18 181 -18 125 86 c 0,6,7
- 82 168 82 168 82 291 c 0,8,9
- 82 525 82 525 215 719 c 0,10,11
- 365 936 365 936 588 936 c 0,12,13
- 700 936 700 936 780 784 c 0,14,15
- 814 719 814 719 872 532 c 1,16,17
- 990 778 990 778 991 913 c 1,18,-1
- 1169 913 l 1,19,20
- 1152 738 1152 738 918 432 c 1,21,22
- 1044 128 1044 128 1153 2 c 1,23,-1
- 952 2 l 1,0,1
-764 358 m 1,24,25
- 697 583 697 583 668 647 c 0,26,27
- 581 852 581 852 492 852 c 0,28,29
- 377 852 377 852 309 631 c 0,30,31
- 260 466 260 466 260 311 c 0,32,33
- 260 80 260 80 389 80 c 0,34,35
- 497 80 497 80 604 174 c 0,36,37
- 666 228 666 228 764 358 c 1,24,25
+1040.83 1 m 5,0,1
+ 952.005 103 952.005 103 829.656 290 c 5,2,3
+ 600.72 -19 600.72 -19 385.72 -19 c 4,4,5
+ 273.72 -19 273.72 -19 197.504 85 c 4,6,7
+ 138.564 167 138.564 167 114.656 290 c 4,8,9
+ 69.1709 524 69.1709 524 164.461 718 c 4,10,11
+ 272.28 935 272.28 935 495.28 935 c 4,12,13
+ 607.28 935 607.28 935 716.826 783 c 4,14,15
+ 763.461 718 763.461 718 857.811 531 c 5,16,17
+ 927.992 777 927.992 777 902.751 912 c 5,18,-1
+ 1080.75 912 l 5,19,20
+ 1097.77 737 1097.77 737 923.248 431 c 5,21,22
+ 1108.34 127 1108.34 127 1241.83 1 c 5,23,-1
+ 1040.83 1 l 5,0,1
+783.633 357 m 5,24,25
+ 672.896 582 672.896 582 631.457 646 c 4,26,27
+ 504.608 851 504.608 851 415.608 851 c 4,28,29
+ 300.608 851 300.608 851 275.566 630 c 4,30,31
+ 258.64 465 258.64 465 288.769 310 c 4,32,33
+ 333.67 79 333.67 79 462.67 79 c 4,34,35
+ 570.67 79 570.67 79 659.398 173 c 4,36,37
+ 710.902 227 710.902 227 783.633 357 c 5,24,25
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B8
-Encoding: 57528 57528 418
-Width: 1130
+Encoding: 418 57528 418
+Width: 1053
GlyphClass: 2
Flags: W
-HStem: -18 57<419.408 661.366> 682 84<498 668.282> 1292 68<595.087 794.28>
-VStem: 815 164<223.081 548.618> 850 168<969.5 1248.8>
+HStem: -18 57<429.894 671.847> 682 84<373.344 549.171> 1292 68<375.744 573.626>
+VStem: 132.445 169.531<-332 20 117.866 1105.89>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -48962,13 +49176,10 @@ CALL
PUSHB_4
64
13
- 0
+ 16
9
CALL
PUSHB_1
- 16
-SHP[rp2]
-PUSHB_1
27
MDAP[rnd]
PUSHB_1
@@ -48985,112 +49196,38 @@ PUSHB_1
39
MDAP[rnd]
PUSHB_1
- 23
+ 0
MDRP[rp0,rnd,white]
PUSHB_1
- 9
+ 17
MDRP[min,rnd,black]
PUSHB_1
- 32
-MDRP[rp0,rnd,white]
-PUSHB_1
- 5
-MDRP[min,rnd,black]
+ 15
+SHP[rp2]
PUSHB_2
40
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 1
-SDPVTL[orthog]
-PUSHB_1
- 0
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 1
-MDRP[grey]
-SFVTCA[x-axis]
-PUSHB_2
- 16
- 22
-MIRP[rp0,min,black]
-SFVTPV
-PUSHB_1
- 38
-MDRP[grey]
-PUSHB_2
- 16
- 38
-SPVTL[orthog]
-PUSHB_1
- 15
-MDRP[grey]
-PUSHB_3
- 15
- 38
- 16
-SRP1
-SRP2
-IP
-PUSHB_1
- 17
-MDRP[grey]
-PUSHB_1
- 17
-IP
-SVTCA[y-axis]
-PUSHB_4
- 1
- 15
- 17
- 38
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_6
- 0
- 1
- 15
- 16
- 17
- 38
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
SVTCA[y-axis]
PUSHB_2
- 27
19
+ 13
SRP1
SRP2
PUSHB_1
- 9
+ 15
IP
PUSHB_1
- 28
+ 27
SRP1
PUSHB_1
- 7
+ 17
IP
PUSHB_1
- 34
+ 28
SRP2
PUSHB_1
- 5
+ 7
IP
IUP[y]
IUP[x]
@@ -49098,48 +49235,47 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-45 -332 m 1,0,-1
- 281 846 l 2,1,2
- 383 1360 383 1360 770 1360 c 0,3,4
- 1018 1360 1018 1360 1018 1135 c 0,5,6
- 1018 892 1018 892 700 758 c 1,7,8
- 979 688 979 688 979 420 c 0,9,10
- 979 213 979 213 825 92 c 0,11,12
- 685 -18 685 -18 473 -18 c 0,13,14
- 390 -18 390 -18 281 20 c 1,15,-1
- 211 -332 l 1,16,-1
- 45 -332 l 1,0,-1
-309 154 m 1,17,18
- 405 39 405 39 547 39 c 0,19,20
- 674 39 674 39 750 147 c 0,21,22
- 815 245 815 245 815 377 c 0,23,24
- 815 525 815 525 721 606 c 0,25,26
- 633 682 633 682 483 682 c 1,27,-1
- 498 766 l 1,28,29
- 656 766 656 766 754 858 c 0,30,31
- 850 951 850 951 850 1108 c 0,32,33
- 850 1292 850 1292 688 1292 c 0,34,35
- 578 1292 578 1292 518 1147 c 0,36,37
- 500 1097 500 1097 461 905 c 2,38,-1
- 309 154 l 1,17,18
+132.445 -332 m 5,0,-1
+ 139.466 846 l 6,1,2
+ 141.555 1360 141.555 1360 528.555 1360 c 4,3,4
+ 776.555 1360 776.555 1360 820.29 1135 c 4,5,6
+ 867.524 892 867.524 892 575.571 758 c 5,7,8
+ 868.178 688 868.178 688 920.271 420 c 4,9,10
+ 960.509 213 960.509 213 830.028 92 c 4,11,12
+ 711.41 -18 711.41 -18 499.41 -18 c 4,13,14
+ 416.41 -18 416.41 -18 300.023 20 c 5,15,-1
+ 298.445 -332 l 5,16,-1
+ 132.445 -332 l 5,0,-1
+301.977 154 m 5,17,18
+ 420.331 39 420.331 39 562.331 39 c 4,19,20
+ 689.331 39 689.331 39 744.338 147 c 4,21,22
+ 790.288 245 790.288 245 764.63 377 c 4,23,24
+ 735.861 525 735.861 525 626.117 606 c 4,25,26
+ 523.344 682 523.344 682 373.344 682 c 5,27,-1
+ 372.017 766 l 5,28,29
+ 530.017 766 530.017 766 610.133 858 c 4,30,31
+ 688.056 951 688.056 951 657.538 1108 c 4,32,33
+ 621.772 1292 621.772 1292 459.772 1292 c 4,34,35
+ 349.772 1292 349.772 1292 317.957 1147 c 4,36,37
+ 309.677 1097 309.677 1097 307.997 905 c 6,38,-1
+ 301.977 154 l 5,17,18
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0B9
-Encoding: 57529 57529 419
-Width: 1247
+Encoding: 419 57529 419
+Width: 1156
GlyphClass: 2
Flags: W
-HStem: -487 90<162.884 351.444> 786 121<174 240.3>
-VStem: 76 80<-387.379 -221.356> 451 167<-245.854 -14> 973 184<736.194 905.89>
+HStem: -411 90<325.175 514.313> 838 121<91.5166 194.412>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
27
MDAP[rnd]
PUSHB_1
- 36
+ 37
MDRP[min,rnd,black]
PUSHB_1
6
@@ -49152,135 +49288,67 @@ PUSHB_1
SHP[rp2]
SVTCA[x-axis]
PUSHB_1
- 42
+ 43
MDAP[rnd]
-PUSHB_1
- 30
-MDRP[rp0,rnd,white]
-PUSHB_1
- 34
-MDRP[min,rnd,black]
-PUSHB_1
- 34
-SRP0
PUSHB_2
- 40
- 1
-CALL
-PUSHB_1
- 23
-MDRP[min,rnd,black]
-PUSHB_1
- 23
-SRP0
-PUSHB_2
- 13
- 1
-CALL
-PUSHB_1
- 18
-MDRP[min,rnd,black]
-PUSHB_2
- 43
+ 44
1
CALL
-PUSHB_2
- 40
- 34
-SRP1
-SRP2
-PUSHB_4
- 1
- 7
- 27
- 0
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 23
-SRP1
-PUSHB_1
- 11
-IP
-PUSHB_1
- 13
-SRP2
-PUSHB_1
- 15
-IP
-PUSHB_1
- 18
-SRP1
-PUSHB_1
- 16
-IP
SVTCA[y-axis]
PUSHB_2
6
- 36
+ 37
SRP1
SRP2
-PUSHB_6
+PUSHB_4
0
11
21
- 23
- 30
- 32
+ 33
DEPTH
SLOOP
IP
-PUSHB_1
- 7
-SRP1
-PUSHB_2
- 13
- 18
-IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-436 49 m 1,0,1
- 419 245 419 245 383 416 c 0,2,3
- 326 683 326 683 254 735 c 0,4,5
- 182 789 182 789 41 786 c 1,6,-1
- 174 907 l 1,7,8
- 420 907 420 907 520 649 c 0,9,10
- 572 512 572 512 602 182 c 1,11,12
- 973 601 973 601 973 805 c 0,13,14
- 973 861 973 861 944 907 c 1,15,-1
- 1153 907 l 1,16,17
- 1157 882 1157 882 1157 864 c 0,18,19
- 1157 756 1157 756 932 475 c 2,20,-1
- 614 109 l 1,21,22
- 618 48 618 48 618 -10 c 0,23,24
- 618 -196 618 -196 530 -330 c 0,25,26
- 428 -487 428 -487 254 -487 c 0,27,28
- 186 -487 186 -487 131 -445 c 128,-1,29
- 76 -403 76 -403 76 -338 c 0,30,31
- 76 -166 76 -166 436 49 c 1,0,1
-449 -14 m 1,32,33
- 156 -192 156 -192 156 -311 c 0,34,35
- 156 -397 156 -397 242 -397 c 0,36,37
- 344 -397 344 -397 401 -287 c 0,38,39
- 451 -196 451 -196 451 -86 c 0,40,41
- 451 -44 451 -44 449 -14 c 1,32,33
+520.295 101 m 1,0,1
+ 465.196 297 465.196 297 395.958 468 c 0,2,3
+ 288.03 732.618 288.03 732.618 204.95 787 c 0,4,5
+ 122.454 841 122.454 841 -17.9629 838 c 1,6,-1
+ 91.5166 959 l 1,7,8
+ 339.59 959 339.59 959 487.667 701 c 0,9,10
+ 566.297 564 566.297 564 660.442 234 c 1,11,12
+ 949.997 653 949.997 653 910.344 857 c 0,13,14
+ 899.458 913 899.458 913 861.517 959 c 1,15,-1
+ 1070.52 959 l 1,16,17
+ 1079.38 934 1079.38 934 1082.88 916 c 0,18,19
+ 1108.15 785.962 1108.15 785.962 933.489 527 c 2,20,-1
+ 686.633 161 l 1,21,22
+ 702.489 100 702.489 100 713.764 42 c 0,23,24
+ 744.504 -131.977 744.504 -131.977 687.966 -254 c 0,25,26
+ 616.483 -411 616.483 -411 442.483 -411 c 0,27,28
+ 374.483 -411 374.483 -411 311.319 -369 c 0,29,30
+ 246.943 -326.194 246.943 -326.194 235.521 -262 c 0,31,32
+ 206.02 -90 206.02 -90 520.295 101 c 1,0,1
+545.541 38 m 1,33,34
+ 291.298 -140 291.298 -140 310.272 -235 c 0,35,36
+ 326.989 -321 326.989 -321 412.989 -321 c 0,37,38
+ 515.766 -321 515.766 -321 550.607 -211 c 0,39,40
+ 578.741 -119.502 578.741 -119.502 561.536 -34 c 0,41,42
+ 553.373 8 553.373 8 545.541 38 c 1,33,34
EndSplineSet
-Validated: 33
+Validated: 16417
EndChar
StartChar: uniE0BA
-Encoding: 57530 57530 420
-Width: 1157
+Encoding: 420 57530 420
+Width: 1090
GlyphClass: 2
Flags: W
-HStem: -18 53<396.709 595.179> 780 51<523.316 657.883> 1272 78<564.852 855.704>
-VStem: 143 174<141.387 534.066> 444 88<1128.89 1258.68> 809 174<293.348 685.136>
+HStem: -18 53<448.145 646.239> 780 51<439.229 558.296> 1272 78<371.879 679.833>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -49305,85 +49373,19 @@ SVTCA[x-axis]
PUSHB_1
45
MDAP[rnd]
-PUSHB_1
- 19
-MDRP[rp0,rnd,white]
-PUSHB_1
- 33
-MDRP[min,rnd,black]
-PUSHB_1
- 33
-SRP0
-PUSHB_2
- 27
- 1
-CALL
-PUSHB_1
- 5
-MDRP[min,rnd,black]
-PUSHB_1
- 5
-SRP0
-PUSHB_2
- 39
- 1
-CALL
-PUSHB_1
- 11
-MDRP[min,rnd,black]
PUSHB_2
46
1
CALL
-PUSHB_2
- 5
- 27
-SRP1
-SRP2
-PUSHB_2
- 15
- 35
-IP
-IP
-PUSHB_1
- 39
-SRP1
-PUSHB_5
- 3
- 8
- 23
- 31
- 41
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 11
-SRP2
-PUSHB_1
- 1
-IP
SVTCA[y-axis]
PUSHB_2
- 41
- 35
-SRP1
-SRP2
-PUSHB_2
- 11
- 19
-IP
-IP
-PUSHB_2
3
23
SRP1
SRP2
-PUSHB_3
+PUSHB_2
1
8
- 27
-IP
IP
IP
PUSHB_1
@@ -49398,42 +49400,41 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1073 1280 m 1,0,-1
- 977 1159 l 1,1,2
- 846 1272 846 1272 657 1272 c 0,3,4
- 532 1272 532 1272 532 1196 c 0,5,6
- 532 1169 532 1169 649 1049 c 0,7,8
- 806 887 806 887 866 805 c 0,9,10
- 983 644 983 644 983 516 c 0,11,12
- 983 286 983 286 844 137 c 0,13,14
- 701 -18 701 -18 473 -18 c 0,15,16
- 330 -18 330 -18 237 76 c 0,17,18
- 143 170 143 170 143 313 c 0,19,20
- 143 545 143 545 286 688 c 0,21,22
- 428 831 428 831 659 831 c 1,23,24
- 554 933 554 933 522 975 c 0,25,26
- 444 1071 444 1071 444 1149 c 0,27,28
- 444 1255 444 1255 559 1309 c 0,29,30
- 646 1350 646 1350 766 1350 c 0,31,32
- 915 1350 915 1350 1073 1280 c 1,0,-1
-317 264 m 0,33,34
- 317 35 317 35 494 35 c 0,35,36
- 647 35 647 35 737 225 c 0,37,38
- 809 376 809 376 809 551 c 0,39,40
- 809 780 809 780 625 780 c 0,41,42
- 468 780 468 780 383 590 c 0,43,44
- 317 443 317 443 317 264 c 0,33,34
+886.65 1280 m 5,0,-1
+ 814.171 1159 l 5,1,2
+ 661.205 1272 661.205 1272 472.205 1272 c 4,3,4
+ 347.205 1272 347.205 1272 361.979 1196 c 4,5,6
+ 367.227 1169 367.227 1169 507.553 1049 c 4,7,8
+ 696.042 887 696.042 887 771.981 805 c 4,9,10
+ 920.276 644 920.276 644 945.157 516 c 4,11,12
+ 989.864 286 989.864 286 879.827 137 c 4,13,14
+ 766.956 -18 766.956 -18 538.956 -18 c 4,15,16
+ 395.956 -18 395.956 -18 284.685 76 c 4,17,18
+ 172.413 170 172.413 170 144.616 313 c 4,19,20
+ 99.5195 545 99.5195 545 214.724 688 c 4,21,22
+ 328.928 831 328.928 831 559.928 831 c 5,23,24
+ 435.101 933 435.101 933 394.937 975 c 4,25,26
+ 298.276 1071 298.276 1071 283.114 1149 c 4,27,28
+ 262.51 1255 262.51 1255 367.014 1309 c 4,29,30
+ 446.044 1350 446.044 1350 566.044 1350 c 4,31,32
+ 715.044 1350 715.044 1350 886.65 1280 c 5,0,-1
+328.141 264 m 4,33,34
+ 372.654 35 372.654 35 549.654 35 c 4,35,36
+ 702.654 35 702.654 35 755.722 225 c 4,37,38
+ 798.37 376 798.37 376 764.354 551 c 4,39,40
+ 719.841 780 719.841 780 535.841 780 c 4,41,42
+ 378.841 780 378.841 780 330.772 590 c 4,43,44
+ 293.347 443 293.347 443 328.141 264 c 4,33,34
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0BB
-Encoding: 57531 57531 421
-Width: 974
+Encoding: 421 57531 421
+Width: 959
GlyphClass: 2
Flags: W
-HStem: -4 102<369.354 751.887> 463 63<313 739> 858 92<494.202 869.126>
-VStem: 111 180<177.186 460.203>
+HStem: -4 102<417.942 809.106> 463 63<287.943 725.943> 858 92<414.939 776.47>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -49458,12 +49459,6 @@ SVTCA[x-axis]
PUSHB_1
27
MDAP[rnd]
-PUSHB_1
- 6
-MDRP[rp0,rnd,white]
-PUSHB_1
- 22
-MDRP[min,rnd,black]
PUSHB_2
28
1
@@ -49480,11 +49475,9 @@ IP
PUSHB_1
20
SRP1
-PUSHB_2
- 6
+PUSHB_1
26
IP
-IP
PUSHB_2
15
17
@@ -49505,34 +49498,33 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-768 45 m 1,0,1
- 608 -4 608 -4 473 -4 c 0,2,3
- 305 -4 305 -4 209 98 c 0,4,5
- 111 202 111 202 111 373 c 0,6,7
- 111 634 111 634 262 792 c 0,8,9
- 414 950 414 950 672 950 c 0,10,11
- 762 950 762 950 883 920 c 1,12,-1
- 862 823 l 1,13,14
- 767 858 767 858 651 858 c 0,15,16
- 407 858 407 858 313 526 c 1,17,-1
- 752 526 l 1,18,-1
- 739 463 l 1,19,-1
- 301 463 l 1,20,21
- 291 390 291 390 291 362 c 0,22,23
- 291 98 291 98 510 98 c 0,24,25
- 629 98 629 98 797 154 c 1,26,-1
- 768 45 l 1,0,1
+836.194 45 m 5,0,1
+ 685.72 -4 685.72 -4 550.72 -4 c 4,2,3
+ 382.72 -4 382.72 -4 266.893 98 c 4,4,5
+ 148.677 202 148.677 202 115.438 373 c 4,6,7
+ 64.7051 634 64.7051 634 184.993 792 c 4,8,9
+ 306.28 950 306.28 950 564.28 950 c 4,10,11
+ 654.28 950 654.28 950 781.112 920 c 5,12,-1
+ 778.967 823 l 5,13,14
+ 677.164 858 677.164 858 561.164 858 c 4,15,16
+ 317.164 858 317.164 858 287.698 526 c 5,17,-1
+ 726.698 526 l 5,18,-1
+ 725.943 463 l 5,19,-1
+ 287.943 463 l 5,20,21
+ 292.134 390 292.134 390 297.576 362 c 4,22,23
+ 348.893 98 348.893 98 567.893 98 c 4,24,25
+ 686.893 98 686.893 98 844.008 154 c 5,26,-1
+ 836.194 45 l 5,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0BC
-Encoding: 57532 57532 422
-Width: 1277
+Encoding: 422 57532 422
+Width: 1181
GlyphClass: 2
Flags: W
-HStem: -367 72<527.291 774.305> 1012 61<373.095 519.998> 1014 319<616 1122>
-VStem: 139 183<194.247 515.739> 885 108<-204.193 -55.1787>
+HStem: -367 72<672.639 932.468> 1012 61<252.584 414.91>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -49550,56 +49542,14 @@ SHP[rp1]
PUSHB_1
22
MDRP[min,rnd,black]
-PUSHB_1
- 26
-MDRP[min,rnd,black]
SVTCA[x-axis]
PUSHB_1
44
MDAP[rnd]
-PUSHB_1
- 13
-MDRP[rp0,rnd,white]
-PUSHB_1
- 33
-MDRP[min,rnd,black]
-PUSHB_1
- 33
-SRP0
-PUSHB_2
- 7
- 1
-CALL
-PUSHB_1
- 38
-MDRP[min,rnd,black]
PUSHB_2
45
1
CALL
-PUSHB_2
- 33
- 13
-SRP1
-SRP2
-PUSHB_1
- 20
-IP
-PUSHB_1
- 7
-SRP1
-PUSHB_8
- 0
- 10
- 15
- 17
- 22
- 31
- 36
- 42
-DEPTH
-SLOOP
-IP
SVTCA[y-axis]
PUSHB_2
3
@@ -49614,9 +49564,9 @@ PUSHB_1
SRP1
PUSHB_4
1
- 13
- 33
- 38
+ 10
+ 35
+ 37
DEPTH
SLOOP
IP
@@ -49628,59 +49578,54 @@ PUSHB_2
19
IP
IP
-PUSHB_1
- 26
-SRP1
-PUSHB_2
- 20
- 29
-IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-354 -324 m 1,0,-1
- 455 -211 l 1,1,2
- 548 -295 548 -295 690 -295 c 0,3,4
- 772 -295 772 -295 828 -251 c 0,5,6
- 885 -208 885 -208 885 -127 c 0,7,8
- 885 -30 885 -30 692 -14 c 0,9,10
- 367 15 367 15 332 27 c 0,11,12
- 139 81 139 81 139 272 c 0,13,14
- 139 635 139 635 522 1024 c 1,15,16
- 458 1012 458 1012 385 1012 c 0,17,18
- 241 1012 241 1012 129 1073 c 1,19,-1
- 168 1219 l 1,20,21
- 332 1073 332 1073 582 1073 c 1,22,23
- 683 1177 683 1177 831 1251 c 0,24,25
- 991 1333 991 1333 1122 1333 c 0,26,27
- 1148 1333 1148 1333 1182 1319 c 1,28,-1
- 1102 1161 l 1,29,30
- 890 1014 890 1014 616 1014 c 1,31,32
- 322 616 322 616 322 305 c 0,33,34
- 322 166 322 166 496 137 c 2,35,-1
- 819 113 l 2,36,37
- 993 84 993 84 993 -61 c 0,38,39
- 993 -204 993 -204 854 -291 c 0,40,41
- 731 -367 731 -367 582 -367 c 0,42,43
- 462 -367 462 -367 354 -324 c 1,0,-1
+510.865 -324 m 1,0,-1
+ 589.9 -211 l 1,1,2
+ 699.228 -295 699.228 -295 841.228 -295 c 0,3,4
+ 923.228 -295 923.228 -295 970.675 -251 c 0,5,6
+ 1019.32 -208 1019.32 -208 1003.57 -127 c 0,7,8
+ 984.717 -30 984.717 -30 788.607 -14 c 0,9,10
+ 457.97 15 457.97 15 420.638 27 c 0,11,12
+ 217.141 81 217.141 81 180.015 272 c 0,13,14
+ 109.454 635 109.454 635 416.84 1024 c 1,15,16
+ 355.173 1012 355.173 1012 282.173 1012 c 0,17,18
+ 138.173 1012 138.173 1012 14.3154 1073 c 1,19,-1
+ 24.9365 1219 l 1,20,21
+ 217.315 1073 217.315 1073 467.315 1073 c 1,22,23
+ 548.1 1177 548.1 1177 681.716 1251 c 0,24,25
+ 825.776 1333 825.776 1333 956.776 1333 c 0,26,27
+ 982.776 1333 982.776 1333 1019.5 1319 c 1,28,-1
+ 970.21 1161 l 1,29,30
+ 786.784 1014 786.784 1014 512.784 1014 c 1,31,32
+ 296.147 616 296.147 616 356.6 305 c 0,33,34
+ 383.618 166 383.618 166 563.256 137 c 2,35,-1
+ 890.921 113 l 2,36,37
+ 1070.56 84 1070.56 84 1098.74 -61 c 0,38,39
+ 1126.54 -204 1126.54 -204 1004.45 -291 c 0,40,41
+ 896.224 -367 896.224 -367 747.224 -367 c 0,42,43
+ 627.224 -367 627.224 -367 510.865 -324 c 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0BD
-Encoding: 57533 57533 423
-Width: 1155
+Encoding: 423 57533 423
+Width: 1014
GlyphClass: 2
Flags: W
-HStem: 0 21G<137 306.988> 809 123<627.164 833.51>
-VStem: 850 166<549.562 791.477>
+HStem: 0 21G<195.314 361.414> 809 123<511.929 743.841>
+VStem: 195.314 166<0 303.79> 212.114 152.436<52.2098 693.67> 773.849 168<-332 778.53>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
+ 0
+MDAP[rnd]
+PUSHB_1
23
MDAP[rnd]
PUSHB_1
@@ -49691,111 +49636,58 @@ PUSHB_1
27
MDAP[rnd]
PUSHB_1
- 21
+ 1
MDRP[rp0,rnd,white]
PUSHB_1
- 19
-SHP[rp2]
-PUSHB_1
- 14
+ 25
MDRP[min,rnd,black]
PUSHB_1
- 16
-SHP[rp2]
-PUSHB_2
- 28
- 1
-CALL
+ 25
+SRP0
PUSHB_1
- 54
-SMD
-PUSHB_2
0
- 1
-SDPVTL[orthog]
-SFVTPV
+MDRP[min,rnd,black]
PUSHB_1
0
-SRP0
-PUSHB_1
- 1
-MDRP[grey]
-PUSHB_2
- 26
- 23
-MIRP[rp0,min,black]
+MDAP[rnd]
PUSHB_1
25
-MDRP[grey]
+SRP0
PUSHB_2
18
- 19
-SDPVTL[orthog]
-SFVTCA[y-axis]
-PUSHB_1
- 19
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 18
-MDRP[grey]
-SFVTCA[y-axis]
-PUSHB_2
- 16
- 22
-MIRP[rp0,min,black]
-SFVTPV
+ 1
+CALL
PUSHB_1
17
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_8
- 0
+MDRP[min,rnd,black]
+PUSHB_2
+ 28
1
- 16
- 17
- 18
- 19
+CALL
+PUSHB_2
25
- 26
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_6
- 0
1
- 17
- 18
- 25
- 26
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
+SRP1
+SRP2
PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
+ 6
+IP
+PUSHB_1
+ 18
+SRP1
+PUSHB_2
+ 8
+ 10
+IP
+IP
SVTCA[y-axis]
PUSHB_2
23
0
SRP1
SRP2
-PUSHB_3
- 3
+PUSHB_1
8
- 14
-IP
-IP
IP
PUSHB_1
10
@@ -49811,35 +49703,34 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-137 0 m 1,0,-1
- 223 356 l 2,1,2
- 274 574 274 574 274 717 c 0,3,4
- 274 824 274 824 184 911 c 1,5,-1
- 377 911 l 1,6,7
- 436 854 436 854 449 739 c 1,8,9
- 609 932 609 932 801 932 c 0,10,11
- 898 932 898 932 956 871 c 0,12,13
- 1016 811 1016 811 1016 713 c 0,14,15
- 1016 674 1016 674 1006 616 c 2,16,-1
- 819 -332 l 1,17,-1
- 651 -332 l 1,18,-1
- 842 618 l 2,19,20
- 850 663 850 663 850 698 c 0,21,22
- 850 809 850 809 735 809 c 0,23,24
- 594 809 594 809 432 647 c 1,25,-1
- 303 0 l 1,26,-1
- 137 0 l 1,0,-1
+195.314 0 m 1,0,-1
+ 212.114 356 l 2,1,2
+ 220.74 574 220.74 574 192.943 717 c 0,3,4
+ 172.145 824 172.145 824 65.2334 911 c 1,5,-1
+ 258.233 911 l 1,6,7
+ 328.313 854 328.313 854 363.667 739 c 1,8,9
+ 486.151 932 486.151 932 678.151 932 c 0,10,11
+ 775.151 932 775.151 932 845.009 871 c 0,12,13
+ 916.672 811 916.672 811 935.721 713 c 0,14,15
+ 943.302 674 943.302 674 944.576 616 c 2,16,-1
+ 941.849 -332 l 1,17,-1
+ 773.849 -332 l 1,18,-1
+ 780.188 618 l 2,19,20
+ 779.439 663 779.439 663 772.637 698 c 0,21,22
+ 751.061 809 751.061 809 636.061 809 c 0,23,24
+ 495.061 809 495.061 809 364.55 647 c 1,25,-1
+ 361.314 0 l 1,26,-1
+ 195.314 0 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0BE
-Encoding: 57534 57534 424
-Width: 1099
+Encoding: 424 57534 424
+Width: 1075
GlyphClass: 2
Flags: W
-HStem: -16 88<337.086 538.344> 631 51<291 784> 1264 88<545.276 743.597>
-VStem: 88 176<151.517 664.72> 815 174<688.019 1182.77>
+HStem: -16 88<444.847 664.387> 631 51<292.192 790.278> 1264 88<419.408 635.712>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -49864,92 +49755,47 @@ SVTCA[x-axis]
PUSHB_1
30
MDAP[rnd]
-PUSHB_1
- 4
-MDRP[rp0,rnd,white]
-PUSHB_1
- 26
-MDRP[min,rnd,black]
-PUSHB_1
- 26
-SRP0
-PUSHB_2
- 19
- 1
-CALL
-PUSHB_1
- 12
-MDRP[min,rnd,black]
PUSHB_2
31
1
CALL
-PUSHB_2
- 19
- 26
-SRP1
-SRP2
-PUSHB_4
- 8
- 0
- 16
- 23
-DEPTH
-SLOOP
-IP
SVTCA[y-axis]
-PUSHB_2
- 24
- 28
-SRP1
-SRP2
-PUSHB_1
- 4
-IP
-PUSHB_2
- 21
- 16
-SRP1
-SRP2
-PUSHB_1
- 12
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-350 -16 m 0,0,1
- 211 -16 211 -16 141 121 c 0,2,3
- 88 229 88 229 88 383 c 0,4,5
- 88 696 88 696 252 997 c 0,6,7
- 444 1352 444 1352 731 1352 c 0,8,9
- 867 1352 867 1352 936 1214 c 0,10,11
- 989 1107 989 1107 989 956 c 0,12,13
- 989 636 989 636 829 338 c 0,14,15
- 642 -16 642 -16 350 -16 c 0,0,1
-291 682 m 1,16,-1
- 793 682 l 1,17,18
- 815 814 815 814 815 938 c 0,19,20
- 815 1264 815 1264 641 1264 c 0,21,22
- 411 1264 411 1264 291 682 c 1,16,-1
-784 631 m 1,23,-1
- 285 631 l 1,24,25
- 264 498 264 498 264 387 c 0,26,27
- 264 72 264 72 442 72 c 0,28,29
- 676 72 676 72 784 631 c 1,23,-1
+482.956 -16 m 0,0,1
+ 343.956 -16 343.956 -16 247.326 121 c 0,2,3
+ 173.333 229 173.333 229 143.398 383 c 0,4,5
+ 82.5576 696 82.5576 696 188.049 997 c 0,6,7
+ 311.044 1352 311.044 1352 598.044 1352 c 0,8,9
+ 734.044 1352 734.044 1352 829.868 1214 c 0,10,11
+ 903.667 1107 903.667 1107 933.019 956 c 0,12,13
+ 995.221 636 995.221 636 893.146 338 c 0,14,15
+ 774.956 -16 774.956 -16 482.956 -16 c 0,0,1
+288.278 682 m 1,16,-1
+ 790.278 682 l 1,17,18
+ 786.62 814 786.62 814 762.518 938 c 0,19,20
+ 699.149 1264 699.149 1264 525.149 1264 c 0,21,22
+ 295.149 1264 295.149 1264 288.278 682 c 1,16,-1
+791.192 631 m 1,23,-1
+ 292.192 631 l 1,24,25
+ 297.045 498 297.045 498 318.621 387 c 0,26,27
+ 379.851 72 379.851 72 557.851 72 c 0,28,29
+ 791.851 72 791.851 72 791.192 631 c 1,23,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0BF
-Encoding: 57535 57535 425
-Width: 690
+Encoding: 425 57535 425
+Width: 610
GlyphClass: 2
Flags: W
-HStem: -14 92<319.958 536.03>
-VStem: 156 155<89.7371 491.241>
+HStem: -14 92<305.379 539.311>
+VStem: 105.756 163.944<114.07 864.27> 128.871 158.499<95.2471 677.156 690.388 918>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -49966,57 +49812,35 @@ PUSHB_1
4
MDRP[rp0,rnd,white]
PUSHB_1
+ 7
+SHP[rp2]
+PUSHB_1
11
MDRP[min,rnd,black]
-PUSHB_2
- 17
- 1
-CALL
PUSHB_1
- 54
-SMD
-PUSHB_2
- 6
- 7
-SDPVTL[orthog]
-SFVTPV
+ 8
+SHP[rp2]
PUSHB_1
- 6
+ 11
SRP0
PUSHB_1
- 7
-MDRP[grey]
-PUSHB_2
9
- 6
-MIRP[rp0,min,black]
+DUP
+MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
- 8
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_4
6
- 7
- 8
- 9
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
+MDRP[min,rnd,black]
+PUSHB_1
6
- 7
- 8
- 9
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
+MDAP[rnd]
PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
+ 9
+MDRP[min,rnd,black]
+PUSHB_2
+ 17
+ 1
+CALL
SVTCA[y-axis]
PUSHB_2
13
@@ -50032,30 +49856,37 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-537 23 m 1,0,1
- 457 -14 457 -14 371 -14 c 0,2,3
- 156 -14 156 -14 156 180 c 0,4,5
- 156 334 156 334 205 551 c 2,6,-1
- 291 918 l 1,7,-1
- 457 918 l 1,8,-1
- 367 541 l 2,9,10
- 311 309 311 309 311 162 c 0,11,12
- 311 78 311 78 416 78 c 0,13,14
- 482 78 482 78 559 113 c 1,15,-1
- 537 23 l 1,0,1
+540.389 23 m 1,0,1
+ 467.581 -14 467.581 -14 381.581 -14 c 0,2,3
+ 166.581 -14 166.581 -14 128.871 180 c 0,4,5
+ 98.9365 334 98.9365 334 105.756 551 c 2,6,-1
+ 120.419 918 l 1,7,-1
+ 286.419 918 l 1,8,-1
+ 269.7 541 l 2,9,10
+ 258.797 309 258.797 309 287.37 162 c 0,11,12
+ 303.698 78 303.698 78 408.698 78 c 0,13,14
+ 474.698 78 474.698 78 544.895 113 c 1,15,-1
+ 540.389 23 l 1,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C0
-Encoding: 57536 57536 426
-Width: 1134
+Encoding: 426 57536 426
+Width: 1073
GlyphClass: 2
Flags: W
-HStem: 780 156<851.755 1005.38>
+HStem: 1 21G<142.581 308.834 751.503 947.581> 777 156<709.709 881.507>
+VStem: 142.581 166<1 228 323 912>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
+ 0
+MDAP[rnd]
+PUSHB_1
+ 15
+SHP[rp1]
+PUSHB_1
12
MDAP[rnd]
PUSHB_1
@@ -50065,125 +49896,74 @@ SVTCA[x-axis]
PUSHB_1
20
MDAP[rnd]
-PUSHB_2
- 21
- 1
-CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 1
-SDPVTL[orthog]
-SFVTPV
PUSHB_1
0
-SRP0
+MDRP[rp0,rnd,white]
PUSHB_1
- 1
-MDRP[grey]
-PUSHB_2
19
- 6
-MIRP[rp0,min,black]
+MDRP[min,rnd,black]
PUSHB_1
2
-MDRP[grey]
+SHP[rp2]
PUSHB_2
- 19
- 2
-SPVTL[orthog]
-PUSHB_1
- 3
-MDRP[grey]
-PUSHB_3
- 3
- 2
- 19
-SRP1
-SRP2
-IP
-PUSHB_1
- 18
-MDRP[grey]
-PUSHB_1
- 18
-IP
-SVTCA[y-axis]
-PUSHB_6
- 0
- 1
- 2
- 3
- 18
- 19
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_6
- 0
+ 21
1
- 2
- 3
- 18
- 19
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
+CALL
SVTCA[y-axis]
PUSHB_2
- 7
12
+ 0
SRP1
SRP2
+PUSHB_3
+ 3
+ 10
+ 17
+IP
+IP
+IP
PUSHB_1
+ 7
+SRP1
+PUSHB_3
+ 2
+ 1
9
IP
+IP
+IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-113 4 m 1,0,-1
- 295 915 l 1,1,-1
- 461 915 l 1,2,-1
- 342 326 l 1,3,4
- 562 614 562 614 629 688 c 0,5,6
- 850 936 850 936 973 936 c 0,7,8
- 1013 936 1013 936 1049 915 c 1,9,-1
- 995 760 l 1,10,11
- 964 780 964 780 936 780 c 0,12,13
- 824 780 824 780 612 543 c 1,14,-1
- 918 4 l 1,15,-1
- 737 4 l 1,16,-1
- 502 424 l 1,17,-1
- 326 231 l 1,18,-1
- 279 4 l 1,19,-1
- 113 4 l 1,0,-1
+142.581 1 m 5,0,-1
+ 147.501 912 l 5,1,-1
+ 313.501 912 l 5,2,-1
+ 308.991 323 l 5,3,4
+ 473.01 611 473.01 611 525.625 685 c 4,5,6
+ 698.419 933 698.419 933 821.419 933 c 4,7,8
+ 861.419 933 861.419 933 901.501 912 c 5,9,-1
+ 877.63 757 l 5,10,11
+ 842.742 777 842.742 777 814.742 777 c 4,12,13
+ 702.742 777 702.742 777 536.811 540 c 5,14,-1
+ 947.581 1 l 5,15,-1
+ 766.581 1 l 5,16,-1
+ 449.941 421 l 5,17,-1
+ 311.457 228 l 5,18,-1
+ 308.581 1 l 5,19,-1
+ 142.581 1 l 5,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uniE0C1
-Encoding: 57537 57537 427
-Width: 1161
+Encoding: 427 57537 427
+Width: 1099
GlyphClass: 2
Flags: W
-HStem: 1217 112<360 415.166>
-VStem: 106 156<15.9473 210.99>
+HStem: 1217 112<169.028 254.257>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -50196,93 +49976,10 @@ SVTCA[x-axis]
PUSHB_1
32
MDAP[rnd]
-PUSHB_1
- 2
-MDRP[rp0,rnd,white]
-PUSHB_1
- 29
-MDRP[min,rnd,black]
PUSHB_2
33
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 6
- 24
-SDPVTL[orthog]
-SFVTPV
-PUSHB_1
- 6
-SRP0
-PUSHB_1
- 24
-MDRP[grey]
-PUSHB_2
- 18
- 6
-MIRP[rp0,min,black]
-PUSHB_1
- 19
-MDRP[grey]
-PUSHB_2
- 6
- 24
-SPVTL[orthog]
-PUSHB_2
- 25
- 6
-SRP0
-MDRP[grey]
-PUSHB_3
- 25
- 24
- 6
-SRP1
-SRP2
-IP
-SVTCA[y-axis]
-PUSHB_5
- 6
- 18
- 19
- 24
- 25
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_5
- 6
- 18
- 19
- 24
- 25
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
-PUSHB_2
- 29
- 2
-SRP1
-SRP2
-PUSHB_3
- 0
- 10
- 12
-IP
-IP
-IP
SVTCA[y-axis]
IUP[y]
IUP[x]
@@ -50290,37 +49987,37 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-115 2 m 1,0,1
- 106 40 106 40 106 55 c 0,2,3
- 106 177 106 177 291 461 c 0,4,5
- 303 481 303 481 563 850 c 1,6,7
- 524 1043 524 1043 479 1110 c 0,8,9
- 406 1217 406 1217 245 1217 c 0,10,11
- 243 1217 243 1217 240 1217 c 1,12,-1
- 360 1329 l 1,13,-1
- 391 1329 l 2,14,15
- 530 1329 530 1329 598 1243 c 0,16,17
- 647 1182 647 1182 688 1028 c 2,18,-1
- 823 483 l 2,19,20
- 928 119 928 119 1055 2 c 1,21,-1
- 842 2 l 1,22,23
- 744 124 744 124 676 375 c 2,24,-1
- 582 780 l 1,25,26
- 405 538 405 538 373 481 c 0,27,28
- 262 294 262 294 262 143 c 0,29,30
- 262 58 262 58 319 2 c 1,31,-1
- 115 2 l 1,0,1
+181.972 2 m 5,0,1
+ 165.585 40 165.585 40 162.669 55 c 4,2,3
+ 138.955 177 138.955 177 268.751 461 c 4,4,5
+ 276.863 481 276.863 481 465.137 850 c 5,6,7
+ 388.621 1043 388.621 1043 330.598 1110 c 4,8,9
+ 236.799 1217 236.799 1217 75.7988 1217 c 4,10,11
+ 73.7988 1217 73.7988 1217 70.7988 1217 c 5,12,-1
+ 169.028 1329 l 5,13,-1
+ 200.028 1329 l 6,14,15
+ 339.028 1329 339.028 1329 423.745 1243 c 4,16,17
+ 484.603 1182 484.603 1182 555.537 1028 c 6,18,-1
+ 796.475 483 l 6,19,20
+ 972.229 119 972.229 119 1121.97 2 c 5,21,-1
+ 908.972 2 l 5,22,23
+ 787.257 124 787.257 124 670.468 375 c 6,24,-1
+ 497.743 780 l 5,25,26
+ 367.783 538 367.783 538 346.863 481 c 4,27,28
+ 272.212 294 272.212 294 301.563 143 c 4,29,30
+ 318.086 58 318.086 58 385.972 2 c 5,31,-1
+ 181.972 2 l 5,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C2
-Encoding: 57538 57538 428
-Width: 1230
+Encoding: 428 57538 428
+Width: 1099
GlyphClass: 2
Flags: W
-HStem: -18 120<411.428 624.862>
-VStem: 772 176<52.3525 174>
+HStem: -18 120<378.762 616.696>
+VStem: 149.808 166<-330 37 615.054 913> 156.192 150.729<176.302 892.601> 731.512 154.88<204.984 901.821> 735.84 171.141<91.8594 174 208.983 913>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -50329,135 +50026,91 @@ MDAP[rnd]
PUSHB_1
8
MDRP[min,rnd,black]
+PUSHB_3
+ 22
+ 8
+ 10
+CALL
+PUSHB_4
+ 64
+ 22
+ 0
+ 9
+CALL
+PUSHB_3
+ 8
+ 22
+ 10
+CALL
+PUSHB_4
+ 64
+ 8
+ 1
+ 9
+CALL
+PUSHB_1
+ 11
+SHP[rp2]
SVTCA[x-axis]
PUSHB_1
26
MDAP[rnd]
PUSHB_1
- 20
+ 1
MDRP[rp0,rnd,white]
PUSHB_1
- 15
+ 3
MDRP[min,rnd,black]
-PUSHB_2
- 27
- 1
-CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 1
-SDPVTL[orthog]
-SFVTPV
PUSHB_1
- 0
-SRP0
-PUSHB_1
- 1
-MDRP[grey]
-PUSHB_2
25
- 6
-MIRP[rp0,min,black]
+MDRP[min,rnd,black]
PUSHB_1
2
-MDRP[grey]
+SHP[rp2]
+PUSHB_1
+ 3
+SRP0
PUSHB_2
- 10
- 11
-SDPVTL[orthog]
+ 20
+ 1
+CALL
PUSHB_1
10
-SRP0
+SHP[rp2]
PUSHB_1
- 11
-MDRP[grey]
-PUSHB_2
- 13
- 24
-MIRP[rp0,min,black]
+ 15
+MDRP[min,rnd,black]
PUSHB_1
12
-MDRP[grey]
+SHP[rp2]
+PUSHB_1
+ 13
+MDRP[min,rnd,black]
PUSHB_2
- 25
- 2
-SPVTL[orthog]
+ 27
+ 1
+CALL
PUSHB_2
3
- 25
-SRP0
-MDRP[grey]
-PUSHB_3
- 3
- 2
- 25
+ 1
SRP1
SRP2
-IP
PUSHB_1
- 24
-MDRP[grey]
-PUSHB_1
- 24
+ 4
IP
-SVTCA[y-axis]
-NPUSHB
- 10
- 0
- 1
- 2
- 3
- 10
- 11
- 12
- 13
- 24
- 25
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-NPUSHB
- 10
- 0
- 1
- 2
- 3
- 10
- 11
- 12
- 13
- 24
- 25
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
PUSHB_2
- 15
20
+ 25
SRP1
SRP2
+PUSHB_2
+ 8
+ 22
+IP
+IP
+PUSHB_1
+ 13
+SRP1
PUSHB_1
18
IP
@@ -50467,9 +50120,11 @@ PUSHB_2
22
SRP1
SRP2
-PUSHB_2
+PUSHB_3
17
18
+ 24
+IP
IP
IP
IUP[y]
@@ -50478,39 +50133,41 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-88 -330 m 1,0,-1
- 336 913 l 1,1,-1
- 502 913 l 1,2,-1
- 422 580 l 2,3,4
- 373 377 373 377 373 242 c 0,5,6
- 373 182 373 182 413 142 c 128,-1,7
- 453 102 453 102 514 102 c 0,8,9
- 642 102 642 102 784 258 c 1,10,-1
- 915 913 l 1,11,-1
- 1081 913 l 1,12,-1
- 997 557 l 2,13,14
- 948 338 948 338 948 199 c 0,15,16
- 948 88 948 88 1034 2 c 1,17,-1
- 852 2 l 1,18,19
- 772 74 772 74 772 174 c 1,20,21
- 632 -18 632 -18 483 -18 c 0,22,23
- 402 -18 402 -18 328 37 c 1,24,-1
- 254 -330 l 1,25,-1
- 88 -330 l 1,0,-1
+149.808 -330 m 1,0,-1
+ 156.192 913 l 1,1,-1
+ 322.192 913 l 1,2,-1
+ 306.921 580 l 2,3,4
+ 297.381 377 297.381 377 323.622 242 c 0,5,6
+ 335.284 182 335.284 182 383.06 142 c 128,-1,7
+ 430.835 102 430.835 102 491.835 102 c 0,8,9
+ 619.835 102 619.835 102 731.512 258 c 1,10,-1
+ 735.192 913 l 1,11,-1
+ 901.192 913 l 1,12,-1
+ 886.392 557 l 2,13,14
+ 879.961 338 879.961 338 906.98 199 c 0,15,16
+ 928.557 88 928.557 88 1031.27 2 c 1,17,-1
+ 849.273 2 l 1,18,19
+ 755.277 74 755.277 74 735.84 174 c 1,20,21
+ 633.161 -18 633.161 -18 484.161 -18 c 0,22,23
+ 403.161 -18 403.161 -18 318.47 37 c 1,24,-1
+ 315.808 -330 l 1,25,-1
+ 149.808 -330 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C3
-Encoding: 57539 57539 429
-Width: 1210
+Encoding: 429 57539 429
+Width: 1072
GlyphClass: 2
Flags: W
-HStem: 805 110<197.491 246.6>
-VStem: 428 152<172 482.262> 938 158<707.979 900.218>
+HStem: -1 21G<505.558 609.874> 810 110<110.766 191.005>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
+ 0
+MDAP[rnd]
+PUSHB_1
6
MDAP[rnd]
PUSHB_1
@@ -50523,54 +50180,24 @@ SVTCA[x-axis]
PUSHB_1
22
MDAP[rnd]
-PUSHB_1
- 0
-MDRP[rp0,rnd,white]
-PUSHB_1
- 9
-MDRP[min,rnd,black]
-PUSHB_1
- 9
-SRP0
-PUSHB_2
- 13
- 1
-CALL
-PUSHB_1
- 18
-MDRP[min,rnd,black]
PUSHB_2
23
1
CALL
+SVTCA[y-axis]
PUSHB_2
- 9
+ 6
0
SRP1
SRP2
PUSHB_1
- 21
-IP
-PUSHB_1
- 13
-SRP1
-PUSHB_1
- 15
+ 9
IP
PUSHB_1
- 18
-SRP2
-PUSHB_1
- 16
-IP
-SVTCA[y-axis]
-PUSHB_2
7
- 6
SRP1
-SRP2
PUSHB_1
- 18
+ 8
IP
IUP[y]
IUP[x]
@@ -50578,31 +50205,30 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-428 -6 m 1,0,1
- 428 117 428 117 403 343 c 0,2,3
- 379 571 379 571 344 651 c 0,4,5
- 275 805 275 805 94 805 c 1,6,-1
- 213 915 l 1,7,8
- 580 895 580 895 580 172 c 1,9,10
- 746 365 746 365 807 453 c 0,11,12
- 938 644 938 644 938 772 c 0,13,14
- 938 854 938 854 881 915 c 1,15,-1
- 1077 915 l 1,16,17
- 1096 875 1096 875 1096 827 c 0,18,19
- 1096 734 1096 734 846 410 c 2,20,-1
- 508 -6 l 1,21,-1
- 428 -6 l 1,0,1
+517.512 -1 m 5,0,1
+ 493.604 122 493.604 122 424.674 348 c 4,2,3
+ 356.354 576 356.354 576 305.805 656 c 4,4,5
+ 206.87 810 206.87 810 25.8701 810 c 5,6,-1
+ 123.488 920 l 5,7,8
+ 494.375 900 494.375 900 634.912 177 c 5,9,10
+ 763.397 370 763.397 370 807.292 458 c 4,11,12
+ 901.165 649 901.165 649 876.284 777 c 4,13,14
+ 860.345 859 860.345 859 791.488 920 c 5,15,-1
+ 987.488 920 l 5,16,17
+ 1014.26 880 1014.26 880 1023.59 832 c 4,18,19
+ 1041.67 739 1041.67 739 854.65 415 c 6,20,-1
+ 597.512 -1 l 5,21,-1
+ 517.512 -1 l 5,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C4
-Encoding: 57540 57540 430
+Encoding: 430 57540 430
Width: 1095
GlyphClass: 2
Flags: W
-HStem: -358 71<423.958 673.459> 633 160<621.437 898.091> 1155 186<630.027 865.586>
-VStem: 117 178<191.155 429.148> 270 166<848.006 1076.92> 774 109<-203.432 -40.8196>
+HStem: -358 71<571.273 834.293> 633 160<572.96 866.777> 1155 186<475.194 729.671> 1219 139<-7.6015 43.3104>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -50626,35 +50252,21 @@ SHP[rp1]
PUSHB_1
26
MDRP[min,rnd,black]
-SVTCA[x-axis]
PUSHB_1
- 59
-MDAP[rnd]
+ 26
+SRP0
PUSHB_1
- 13
+ 22
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
- 48
-MDRP[min,rnd,black]
-PUSHB_4
- 17
- 48
- 13
- 8
-CALL
-PUSHB_1
- 35
+ 21
MDRP[min,rnd,black]
+SVTCA[x-axis]
PUSHB_1
- 48
-SRP0
-PUSHB_2
- 7
- 1
-CALL
-PUSHB_1
- 53
-MDRP[min,rnd,black]
+ 59
+MDAP[rnd]
PUSHB_2
60
1
@@ -50662,10 +50274,12 @@ CALL
PUSHB_1
54
SMD
-PUSHB_2
- 11
- 9
-SDPVTL[orthog]
+PUSHW_3
+ -1416
+ -16323
+ 21
+CALL
+SPVFS
SFVTPV
PUSHB_1
11
@@ -50675,7 +50289,7 @@ PUSHB_1
MDRP[grey]
PUSHB_2
50
- 25
+ 31
MIRP[rp0,min,black]
PUSHB_1
51
@@ -50704,73 +50318,18 @@ PUSHB_1
64
SMD
SVTCA[x-axis]
-PUSHB_2
- 17
- 13
-SRP1
-SRP2
-PUSHB_3
- 0
- 21
- 22
-IP
-IP
-IP
-PUSHB_2
- 35
- 48
-SRP1
-SRP2
-PUSHB_2
- 1
- 19
-IP
-IP
-PUSHB_1
- 7
-SRP1
-PUSHB_8
- 3
- 15
- 24
- 31
- 37
- 44
- 46
- 57
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 53
-SRP2
-PUSHB_2
- 26
- 39
-IP
-IP
SVTCA[y-axis]
PUSHB_2
+ 44
3
- 57
SRP1
SRP2
PUSHB_1
- 0
-IP
-PUSHB_1
- 44
-SRP1
-PUSHB_3
1
- 13
- 48
-IP
-IP
IP
PUSHB_1
39
-SRP2
+SRP1
PUSHB_3
15
37
@@ -50778,72 +50337,63 @@ PUSHB_3
IP
IP
IP
-PUSHB_1
- 31
-SRP1
PUSHB_2
- 17
- 35
-IP
-IP
-PUSHB_1
26
+ 31
+SRP1
SRP2
-PUSHB_2
- 21
+PUSHB_1
24
IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-248 -315 m 1,0,-1
- 346 -203 l 1,1,2
- 451 -287 451 -287 580 -287 c 0,3,4
- 658 -287 658 -287 713 -246 c 0,5,6
- 774 -198 774 -198 774 -123 c 0,7,8
- 774 -19 774 -19 604 -4 c 0,9,10
- 301 23 301 23 287 27 c 0,11,12
- 117 78 117 78 117 268 c 0,13,14
- 117 526 117 526 502 688 c 1,15,16
- 270 787 270 787 270 954 c 0,17,18
- 270 1058 270 1058 397 1161 c 1,19,20
- 257 1161 257 1161 125 1219 c 1,21,-1
- 160 1358 l 1,22,23
- 261 1239 261 1239 461 1208 c 1,24,25
- 655 1341 655 1341 879 1341 c 0,26,27
- 941 1341 941 1341 1001 1321 c 1,28,-1
- 948 1237 l 1,29,30
- 793 1155 793 1155 637 1155 c 0,31,32
- 596 1155 596 1155 555 1161 c 1,33,34
- 436 1075 436 1075 436 958 c 0,35,36
- 436 838 436 838 618 748 c 1,37,38
- 728 793 728 793 836 793 c 0,39,40
- 925 793 925 793 977 764 c 1,41,-1
- 901 662 l 1,42,43
- 808 633 808 633 705 633 c 0,44,45
- 626 633 626 633 571 651 c 1,46,47
- 295 502 295 502 295 297 c 0,48,49
- 295 171 295 171 446 143 c 2,50,-1
- 731 115 l 2,51,52
- 882 84 882 84 883 -53 c 0,53,54
- 883 -205 883 -205 745 -289 c 0,55,56
- 630 -358 630 -358 467 -358 c 0,57,58
- 349 -358 349 -358 248 -315 c 1,0,-1
-EndSplineSet
-Validated: 1
+406.42 -315 m 5,0,-1
+ 482.649 -203 l 5,1,2
+ 603.978 -287 603.978 -287 732.978 -287 c 4,3,4
+ 810.978 -287 810.978 -287 858.008 -246 c 4,5,6
+ 909.678 -198 909.678 -198 895.099 -123 c 4,7,8
+ 874.884 -19 874.884 -19 701.968 -4 c 4,9,10
+ 393.72 23 393.72 23 378.941 27 c 4,11,12
+ 199.028 78 199.028 78 162.097 268 c 4,13,14
+ 111.946 526 111.946 526 465.456 688 c 5,15,16
+ 214.213 787 214.213 787 181.751 954 c 4,17,18
+ 161.536 1058 161.536 1058 268.515 1161 c 5,19,20
+ 128.515 1161 128.515 1161 -14.7598 1219 c 5,21,-1
+ -6.77832 1358 l 5,22,23
+ 117.353 1239 117.353 1239 323.379 1208 c 5,24,25
+ 491.526 1341 491.526 1341 715.526 1341 c 4,26,27
+ 777.526 1341 777.526 1341 841.414 1321 c 5,28,-1
+ 804.742 1237 l 5,29,30
+ 665.681 1155 665.681 1155 509.681 1155 c 4,31,32
+ 468.681 1155 468.681 1155 426.515 1161 c 5,33,34
+ 324.231 1075 324.231 1075 346.974 958 c 4,35,36
+ 370.3 838 370.3 838 569.794 748 c 5,37,38
+ 671.047 793 671.047 793 779.047 793 c 4,39,40
+ 868.047 793 868.047 793 925.684 764 c 5,41,-1
+ 869.511 662 l 5,42,43
+ 782.147 633 782.147 633 679.147 633 c 4,44,45
+ 600.147 633 600.147 633 541.648 651 c 5,46,47
+ 294.611 502 294.611 502 334.459 297 c 4,48,49
+ 358.951 171 358.951 171 515.394 143 c 6,50,-1
+ 805.836 115 l 6,51,52
+ 962.862 84 962.862 84 990.492 -53 c 4,53,54
+ 1020.04 -205 1020.04 -205 898.366 -289 c 4,55,56
+ 796.778 -358 796.778 -358 633.778 -358 c 4,57,58
+ 515.778 -358 515.778 -358 406.42 -315 c 5,0,-1
+EndSplineSet
+Validated: 16417
EndChar
StartChar: uniE0C5
-Encoding: 57541 57541 431
-Width: 1132
+Encoding: 431 57541 431
+Width: 1125
GlyphClass: 2
Flags: W
-HStem: -8 51<389.921 592.069> 893 51<541.802 744.153>
-VStem: 121 172<162.011 596.099> 844 174<338.965 782.423>
+HStem: -8 51<460.567 662.46> 893 51<457.539 659.641>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -50862,92 +50412,59 @@ SVTCA[x-axis]
PUSHB_1
27
MDAP[rnd]
-PUSHB_1
- 4
-MDRP[rp0,rnd,white]
-PUSHB_1
- 25
-MDRP[min,rnd,black]
-PUSHB_1
- 25
-SRP0
-PUSHB_2
- 19
- 1
-CALL
-PUSHB_1
- 12
-MDRP[min,rnd,black]
PUSHB_2
28
1
CALL
-PUSHB_2
- 19
- 25
-SRP1
-SRP2
-PUSHB_2
- 0
- 8
-IP
-IP
SVTCA[y-axis]
-PUSHB_2
- 21
- 15
-SRP1
-SRP2
-PUSHB_2
- 12
- 4
-IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-463 -8 m 0,0,1
- 298 -8 298 -8 207 98 c 0,2,3
- 121 199 121 199 121 365 c 0,4,5
- 121 620 121 620 268 782 c 0,6,7
- 416 944 416 944 670 944 c 0,8,9
- 839 944 839 944 932 844 c 0,10,11
- 1018 744 1018 744 1018 573 c 0,12,13
- 1018 328 1018 328 862 160 c 128,-1,14
- 706 -8 706 -8 463 -8 c 0,0,1
-481 43 m 0,15,16
- 653 43 653 43 758 242 c 0,17,18
- 844 408 844 408 844 596 c 0,19,20
- 844 893 844 893 649 893 c 0,21,22
- 481 893 481 893 377 690 c 0,23,24
- 293 525 293 525 293 338 c 0,25,26
- 293 43 293 43 481 43 c 0,15,16
+548.525 -8 m 4,0,1
+ 383.525 -8 383.525 -8 271.921 98 c 4,2,3
+ 166.288 199 166.288 199 134.021 365 c 4,4,5
+ 84.4541 620 84.4541 620 199.965 782 c 4,6,7
+ 316.475 944 316.475 944 570.475 944 c 4,8,9
+ 739.475 944 739.475 944 851.913 844 c 4,10,11
+ 957.351 744 957.351 744 990.59 573 c 4,12,13
+ 1038.21 328 1038.21 328 914.869 160 c 132,-1,14
+ 791.525 -8 791.525 -8 548.525 -8 c 4,0,1
+556.611 43 m 4,15,16
+ 728.611 43 728.611 43 794.93 242 c 4,17,18
+ 848.663 408 848.663 408 812.119 596 c 4,19,20
+ 754.389 893 754.389 893 559.389 893 c 4,21,22
+ 391.389 893 391.389 893 326.848 690 c 4,23,24
+ 274.92 525 274.92 525 311.27 338 c 4,25,26
+ 368.611 43 368.611 43 556.611 43 c 4,15,16
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C6
-Encoding: 57542 57542 432
-Width: 1488
+Encoding: 432 57542 432
+Width: 1389
GlyphClass: 2
Flags: W
-HStem: 786 123<179.555 397 563 956 1112.52 1386>
-VStem: 858 164<70.4614 551.909>
+HStem: -1 21G<328.54 496.586 977.724 1210.54> 787 123<123.376 332.368 498.368 891.368 1055.26 1297.46>
+VStem: 328.54 168<-1 787> 881.572 161.279<161.378 779.182> 891.368 166<281.594 787>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
+ 0
+MDAP[rnd]
+PUSHB_1
+ 16
+SHP[rp1]
+PUSHB_1
2
MDAP[rnd]
-PUSHB_4
- 1
- 10
+PUSHB_2
+ 9
22
- 23
-DEPTH
-SLOOP
+SHP[rp1]
SHP[rp1]
PUSHB_1
7
@@ -50957,105 +50474,42 @@ PUSHB_1
25
MDAP[rnd]
PUSHB_1
- 19
+ 0
MDRP[rp0,rnd,white]
PUSHB_1
- 14
+ 24
MDRP[min,rnd,black]
-PUSHB_3
- 14
- 19
- 10
-CALL
-PUSHB_4
- 64
- 14
- 9
- 9
-CALL
+PUSHB_1
+ 24
+SRP0
PUSHB_2
- 26
+ 22
1
CALL
PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 1
-SDPVTL[orthog]
+ 19
+SHP[rp2]
PUSHB_1
- 1
-MDAP[no-rnd]
-SFVTPV
+ 10
+MDRP[min,rnd,black]
PUSHB_1
- 0
-MDRP[grey]
-SFVTCA[x-axis]
-PUSHB_2
- 23
- 6
-MIRP[rp0,min,black]
-SFVTPV
+ 14
+SHP[rp2]
PUSHB_1
- 24
-MDRP[grey]
-PUSHB_2
21
- 22
-SDPVTL[orthog]
-SFVTCA[x-axis]
-PUSHB_1
- 22
-MDAP[no-rnd]
-SFVTPV
+DUP
+MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
- 21
-MDRP[grey]
-SFVTCA[x-axis]
+ 12
+MDRP[min,rnd,black]
PUSHB_2
- 10
26
-MIRP[rp0,min,black]
-SFVTPV
-PUSHB_1
- 12
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_4
- 0
- 12
- 21
- 24
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_8
- 0
1
- 10
+CALL
+PUSHB_2
12
- 21
22
- 23
- 24
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
-PUSHB_2
- 14
- 19
SRP1
SRP2
PUSHB_1
@@ -51063,11 +50517,17 @@ PUSHB_1
IP
SVTCA[y-axis]
PUSHB_2
- 7
2
+ 0
SRP1
SRP2
PUSHB_1
+ 4
+IP
+PUSHB_1
+ 7
+SRP1
+PUSHB_1
5
IP
IUP[y]
@@ -51076,36 +50536,36 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-240 -2 m 1,0,-1
- 397 786 l 1,1,-1
- 362 786 l 2,2,3
- 219 786 219 786 106 694 c 1,4,-1
- 106 838 l 1,5,6
- 198 909 198 909 360 909 c 2,7,-1
- 1386 909 l 1,8,-1
- 1386 786 l 1,9,-1
- 1122 786 l 1,10,11
- 1059 534 1059 534 1055 516 c 0,12,13
- 1022 363 1022 363 1022 242 c 0,14,15
- 1022 98 1022 98 1122 -2 c 1,16,-1
- 940 -2 l 1,17,18
- 858 99 858 99 858 213 c 0,19,20
- 858 340 858 340 891 502 c 2,21,-1
- 956 786 l 1,22,-1
- 563 786 l 1,23,-1
- 408 -2 l 1,24,-1
- 240 -2 l 1,0,-1
+328.54 -1 m 5,0,-1
+ 332.368 787 l 5,1,-1
+ 297.368 787 l 6,2,3
+ 154.368 787 154.368 787 59.252 695 c 5,4,-1
+ 31.2607 839 l 5,5,6
+ 109.46 910 109.46 910 271.46 910 c 6,7,-1
+ 1297.46 910 l 5,8,-1
+ 1321.37 787 l 5,9,-1
+ 1057.37 787 l 5,10,11
+ 1043.35 535 1043.35 535 1042.85 517 c 4,12,13
+ 1039.59 364 1039.59 364 1063.11 243 c 4,14,15
+ 1091.1 99 1091.1 99 1210.54 -1 c 5,16,-1
+ 1028.54 -1 l 5,17,18
+ 926.908 100 926.908 100 904.748 214 c 4,19,20
+ 880.062 341 880.062 341 881.572 503 c 6,21,-1
+ 891.368 787 l 5,22,-1
+ 498.368 787 l 5,23,-1
+ 496.54 -1 l 5,24,-1
+ 328.54 -1 l 5,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C7
-Encoding: 57543 57543 433
+Encoding: 433 57543 433
Width: 1157
GlyphClass: 2
Flags: W
-HStem: -25 72<392.66 644.125> 850 57<598.64 792.151>
-VStem: 864 172<374.46 793.114>
+HStem: -25 72<429.565 682.449> 850 57<491.416 686.211>
+VStem: 181.751 166<-356 4 105.094 609.38>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -51122,13 +50582,10 @@ CALL
PUSHB_4
64
9
- 0
+ 12
9
CALL
PUSHB_1
- 12
-SHP[rp2]
-PUSHB_1
21
MDAP[rnd]
PUSHB_1
@@ -51139,84 +50596,26 @@ PUSHB_1
25
MDAP[rnd]
PUSHB_1
- 19
-MDRP[rp0,rnd,white]
-PUSHB_1
- 5
-MDRP[min,rnd,black]
-PUSHB_2
- 26
- 1
-CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 1
-SDPVTL[orthog]
-PUSHB_1
0
-MDAP[no-rnd]
-SFVTPV
+MDRP[rp0,rnd,white]
PUSHB_1
- 1
-MDRP[grey]
-SFVTCA[x-axis]
-PUSHB_2
12
- 22
-MIRP[rp0,min,black]
-SFVTPV
+MDRP[min,rnd,black]
PUSHB_1
13
-MDRP[grey]
+SHP[rp2]
PUSHB_2
- 12
- 13
-SPVTL[orthog]
-PUSHB_1
- 11
-MDRP[grey]
-PUSHB_3
- 11
- 13
- 12
-SRP1
-SRP2
-IP
-SVTCA[y-axis]
-PUSHB_3
- 1
- 11
- 13
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_5
- 0
+ 26
1
- 11
- 12
- 13
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
+CALL
SVTCA[y-axis]
PUSHB_2
- 21
15
+ 9
SRP1
SRP2
PUSHB_1
- 5
+ 11
IP
IUP[y]
IUP[x]
@@ -51224,33 +50623,32 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-59 -356 m 1,0,-1
- 190 305 l 2,1,2
- 310 907 310 907 739 907 c 0,3,4
- 1036 907 1036 907 1036 637 c 0,5,6
- 1036 368 1036 368 877 178 c 0,7,8
- 709 -25 709 -25 446 -25 c 0,9,10
- 381 -25 381 -25 297 4 c 1,11,-1
- 225 -356 l 1,12,-1
- 59 -356 l 1,0,-1
-324 135 m 1,13,14
- 413 47 413 47 518 47 c 0,15,16
- 688 47 688 47 786 250 c 0,17,18
- 864 412 864 412 864 602 c 0,19,20
- 864 850 864 850 705 850 c 0,21,22
- 518 850 518 850 418 571 c 0,23,24
- 377 459 377 459 324 135 c 1,13,14
+181.751 -356 m 5,0,-1
+ 184.266 305 l 6,1,2
+ 187.249 907 187.249 907 616.249 907 c 4,3,4
+ 913.249 907 913.249 907 965.731 637 c 4,5,6
+ 1018.02 368 1018.02 368 895.952 178 c 4,7,8
+ 767.411 -25 767.411 -25 504.411 -25 c 4,9,10
+ 439.411 -25 439.411 -25 349.774 4 c 5,11,-1
+ 347.751 -356 l 5,12,-1
+ 181.751 -356 l 5,0,-1
+351.311 135 m 5,13,14
+ 457.416 47 457.416 47 562.416 47 c 4,15,16
+ 732.416 47 732.416 47 790.957 250 c 4,17,18
+ 837.467 412 837.467 412 800.535 602 c 4,19,20
+ 752.328 850 752.328 850 593.328 850 c 4,21,22
+ 406.328 850 406.328 850 360.561 571 c 4,23,24
+ 341.331 459 341.331 459 351.311 135 c 5,13,14
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C8
-Encoding: 57544 57544 434
-Width: 1337
+Encoding: 434 57544 434
+Width: 1289
GlyphClass: 2
Flags: W
-HStem: -12 53<387.608 597.063> 799 123<963 1343> 891 51<540.434 744.739>
-VStem: 117 176<160.778 598.232> 844 176<334.778 770.903>
+HStem: -12 53<464.888 674.252> 799 123<898.077 1254.17> 891 51<463.03 666.567>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -51270,7 +50668,9 @@ PUSHB_1
SRP0
PUSHB_1
15
+DUP
MDRP[rp0,rnd,white]
+SRP1
PUSHB_1
27
MDRP[min,rnd,black]
@@ -51278,115 +50678,58 @@ SVTCA[x-axis]
PUSHB_1
33
MDAP[rnd]
-PUSHB_1
- 11
-MDRP[rp0,rnd,white]
-PUSHB_1
- 31
-MDRP[min,rnd,black]
-PUSHB_1
- 31
-SRP0
-PUSHB_2
- 25
- 1
-CALL
-PUSHB_1
- 3
-MDRP[min,rnd,black]
-PUSHB_3
- 3
- 25
- 10
-CALL
-PUSHB_4
- 64
- 3
- 0
- 9
-CALL
PUSHB_2
34
1
CALL
-PUSHB_2
- 25
- 31
-SRP1
-SRP2
-PUSHB_3
- 15
- 17
- 7
-IP
-IP
-IP
-PUSHB_1
- 3
-SRP1
-PUSHB_1
- 1
-IP
SVTCA[y-axis]
-PUSHB_2
- 1
- 21
-SRP1
-SRP2
-PUSHB_4
- 3
- 11
- 25
- 31
-DEPTH
-SLOOP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-1343 799 m 1,0,-1
- 963 799 l 1,1,2
- 1020 692 1020 692 1020 561 c 0,3,4
- 1020 311 1020 311 868 150 c 0,5,6
- 720 -12 720 -12 471 -12 c 0,7,8
- 306 -12 306 -12 211 89 c 0,9,10
- 117 190 117 190 117 358 c 0,11,12
- 117 618 117 618 265 779 c 0,13,14
- 413 942 413 942 670 942 c 0,15,16
- 695 942 695 942 735 932 c 0,17,18
- 776 922 776 922 801 922 c 2,19,-1
- 1343 922 l 1,20,-1
- 1343 799 l 1,0,-1
-483 41 m 0,21,22
- 655 41 655 41 760 242 c 0,23,24
- 844 406 844 406 844 596 c 0,25,26
- 844 891 844 891 649 891 c 0,27,28
- 478 891 478 891 377 690 c 0,29,30
- 293 528 293 528 293 338 c 0,31,32
- 293 41 293 41 483 41 c 0,21,22
+1278.08 799 m 1,0,-1
+ 898.077 799 l 1,1,2
+ 975.876 692 975.876 692 1001.34 561 c 0,3,4
+ 1049.93 311 1049.93 311 929.229 150 c 0,5,6
+ 812.72 -12 812.72 -12 563.72 -12 c 0,7,8
+ 398.72 -12 398.72 -12 284.087 89 c 0,9,10
+ 170.455 190 170.455 190 137.799 358 c 0,11,12
+ 87.2598 618 87.2598 618 203.965 779 c 0,13,14
+ 320.28 942 320.28 942 577.28 942 c 0,15,16
+ 602.28 942 602.28 942 644.225 932 c 0,17,18
+ 687.168 922 687.168 922 712.168 922 c 2,19,-1
+ 1254.17 922 l 1,20,-1
+ 1278.08 799 l 1,0,-1
+565.417 41 m 0,21,22
+ 737.417 41 737.417 41 803.347 242 c 0,23,24
+ 855.469 406 855.469 406 818.536 596 c 0,25,26
+ 761.194 891 761.194 891 566.194 891 c 0,27,28
+ 395.194 891 395.194 891 333.265 690 c 0,29,30
+ 280.754 528 280.754 528 317.687 338 c 0,31,32
+ 375.417 41 375.417 41 565.417 41 c 0,21,22
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0C9
-Encoding: 57545 57545 435
-Width: 1181
+Encoding: 435 57545 435
+Width: 1093
GlyphClass: 2
Flags: W
-HStem: 784 123<162.261 524 690 1071>
-VStem: 422 164<65.8564 543.031>
+HStem: 1 21G<532.321 778.54> 789 123<106.28 459.368 625.368 982.46>
+VStem: 447.961 162.834<151.326 781.332>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
+ 0
+MDAP[rnd]
+PUSHB_1
7
MDAP[rnd]
-PUSHB_2
- 6
- 15
-SHP[rp1]
+PUSHB_1
+ 14
SHP[rp1]
PUSHB_1
12
@@ -51396,84 +50739,38 @@ PUSHB_1
21
MDAP[rnd]
PUSHB_1
- 2
+ 4
MDRP[rp0,rnd,white]
PUSHB_1
- 18
+ 16
MDRP[min,rnd,black]
-PUSHB_3
- 18
- 2
- 10
-CALL
-PUSHB_4
- 64
- 18
- 14
- 9
-CALL
PUSHB_2
22
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 4
- 6
-SDPVTL[orthog]
-PUSHB_1
- 6
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 4
-MDRP[grey]
-SFVTCA[x-axis]
-PUSHB_2
- 15
- 6
-MIRP[rp0,min,black]
-SFVTPV
-PUSHB_1
- 16
-MDRP[grey]
-SVTCA[y-axis]
PUSHB_2
- 4
16
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
4
- 6
- 15
- 16
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
-PUSHB_2
- 18
- 2
SRP1
SRP2
-PUSHB_1
+PUSHB_2
0
+ 6
+IP
IP
SVTCA[y-axis]
PUSHB_2
- 12
7
+ 0
SRP1
SRP2
PUSHB_1
+ 9
+IP
+PUSHB_1
+ 12
+SRP1
+PUSHB_1
10
IP
IUP[y]
@@ -51482,32 +50779,32 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-485 -4 m 1,0,1
- 422 96 422 96 422 207 c 0,2,3
- 422 338 422 338 457 498 c 0,4,5
- 464 537 464 537 524 784 c 1,6,-1
- 377 784 l 2,7,8
- 191 784 191 784 90 692 c 1,9,-1
- 90 836 l 1,10,11
- 193 907 193 907 422 907 c 2,12,-1
- 1071 907 l 1,13,-1
- 1071 784 l 1,14,-1
- 690 784 l 1,15,-1
- 621 504 l 2,16,17
- 586 348 586 348 586 219 c 0,18,19
- 586 92 586 92 690 -4 c 1,20,-1
- 485 -4 l 1,0,1
+573.54 1 m 5,0,1
+ 491.103 101 491.103 101 469.526 212 c 4,2,3
+ 444.062 343 444.062 343 447.961 503 c 4,4,5
+ 447.381 542 447.381 542 459.368 789 c 5,6,-1
+ 312.368 789 l 6,7,8
+ 126.368 789 126.368 789 43.252 697 c 5,9,-1
+ 15.2607 841 l 5,10,11
+ 104.46 912 104.46 912 333.46 912 c 6,12,-1
+ 982.46 912 l 5,13,-1
+ 1006.37 789 l 5,14,-1
+ 625.368 789 l 5,15,-1
+ 610.795 509 l 6,16,17
+ 606.118 353 606.118 353 631.193 224 c 4,18,19
+ 655.88 97 655.88 97 778.54 1 c 5,20,-1
+ 573.54 1 l 5,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0CA
-Encoding: 57546 57546 436
-Width: 1024
+Encoding: 436 57546 436
+Width: 984
GlyphClass: 2
Flags: W
-HStem: -8 65<374.388 593.706>
-VStem: 115 164<134.199 593.621> 791 137<399.169 819.016>
+HStem: -10 65<436.132 668.24>
+VStem: 121.119 166.057<191.577 922>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -51521,85 +50818,22 @@ PUSHB_1
28
MDAP[rnd]
PUSHB_1
- 25
+ 27
MDRP[rp0,rnd,white]
PUSHB_1
- 4
-MDRP[min,rnd,black]
-PUSHB_1
- 4
-SRP0
-PUSHB_2
- 12
- 1
-CALL
-PUSHB_1
- 17
+ 2
MDRP[min,rnd,black]
PUSHB_2
29
1
CALL
-PUSHB_1
- 54
-SMD
PUSHB_2
- 27
- 0
-SDPVTL[orthog]
-SFVTPV
-PUSHB_1
- 27
-SRP0
-PUSHB_1
- 0
-MDRP[grey]
-PUSHB_2
- 2
- 27
-MIRP[rp0,min,black]
-PUSHB_1
- 1
-MDRP[grey]
-SVTCA[y-axis]
-PUSHB_4
- 0
- 1
- 2
- 27
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
- 0
- 1
2
27
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
-PUSHB_2
- 12
- 4
SRP1
SRP2
-PUSHB_2
- 14
- 21
-IP
-IP
PUSHB_1
- 17
-SRP1
-PUSHB_1
- 15
+ 3
IP
SVTCA[y-axis]
IUP[y]
@@ -51608,361 +50842,114 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-236 924 m 1,0,-1
- 401 924 l 1,1,-1
- 324 596 l 2,2,3
- 279 398 279 398 279 262 c 0,4,5
- 279 175 279 175 340 116 c 0,6,7
- 402 57 402 57 492 57 c 0,8,9
- 651 57 651 57 731 236 c 0,10,11
- 791 371 791 371 791 553 c 0,12,13
- 791 767 791 767 696 924 c 1,14,-1
- 903 924 l 1,15,16
- 928 837 928 837 928 733 c 0,17,18
- 928 447 928 447 821 244 c 0,19,20
- 689 -8 689 -8 426 -8 c 0,21,22
- 303 -8 303 -8 215 53 c 0,23,24
- 115 123 115 123 115 242 c 0,25,26
- 115 394 115 394 156 586 c 2,27,-1
- 236 924 l 1,0,-1
+135.419 922 m 1,0,-1
+ 300.419 922 l 1,1,-1
+ 287.176 594 l 2,2,3
+ 280.663 396 280.663 396 307.099 260 c 0,4,5
+ 324.01 173 324.01 173 396.479 114 c 0,6,7
+ 469.946 55 469.946 55 559.946 55 c 0,8,9
+ 718.946 55 718.946 55 764.152 234 c 0,10,11
+ 797.911 369 797.911 369 762.534 551 c 0,12,13
+ 720.937 765 720.937 765 595.419 922 c 1,14,-1
+ 802.419 922 l 1,15,16
+ 844.33 835 844.33 835 864.545 731 c 0,17,18
+ 920.139 445 920.139 445 852.598 242 c 0,19,20
+ 769.581 -10 769.581 -10 506.581 -10 c 0,21,22
+ 383.581 -10 383.581 -10 283.724 51 c 0,23,24
+ 170.117 121 170.117 121 146.986 240 c 0,25,26
+ 117.44 392 117.44 392 121.119 584 c 2,27,-1
+ 135.419 922 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0CB
-Encoding: 57547 57547 437
+Encoding: 437 57547 437
Width: 1474
GlyphClass: 2
Flags: W
-HStem: -2 51<504.833 573 748 888.481> 801 49<591.821 731 907 975.32>
-VStem: 119 166<209.315 567.502> 1198 168<281.959 637.133>
+HStem: -2 55<565.415 662.123 826.433 981.935> 795 55<504.625 664.512 830.512 930.526>
+VStem: 662.123 164<-383 -2 53 795 850 1296>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
- 1
-MDAP[rnd]
-PUSHB_1
18
-SHP[rp1]
-PUSHB_1
- 20
-MDRP[min,rnd,black]
-PUSHB_1
- 28
-SHP[rp2]
-PUSHB_1
- 27
MDAP[rnd]
PUSHB_1
- 21
+ 1
SHP[rp1]
PUSHB_1
- 10
+ 28
MDRP[min,rnd,black]
PUSHB_1
- 7
+ 20
SHP[rp2]
-SVTCA[x-axis]
-PUSHB_1
- 34
-MDAP[rnd]
-PUSHB_1
- 3
-MDRP[rp0,rnd,white]
-PUSHB_1
- 25
-MDRP[min,rnd,black]
-PUSHB_1
- 25
-SRP0
-PUSHB_2
- 32
- 1
-CALL
-PUSHB_1
- 14
-MDRP[min,rnd,black]
-PUSHB_2
- 35
- 1
+PUSHB_3
+ 18
+ 28
+ 10
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
+PUSHB_4
+ 64
+ 18
0
- 8
-SDPVTL[orthog]
-SFVTPV
+ 9
+CALL
PUSHB_1
- 0
-SRP0
+ 21
+MDAP[rnd]
PUSHB_1
- 8
-MDRP[grey]
-PUSHB_2
- 19
27
-MIRP[rp0,min,black]
-PUSHB_1
- 9
-MDRP[grey]
-PUSHB_2
- 0
- 8
-SPVTL[orthog]
-SFVTCA[x-axis]
-PUSHB_2
- 1
- 0
-SRP0
-MDRP[grey]
+SHP[rp1]
PUSHB_1
7
-MDRP[grey]
-PUSHB_2
- 10
- 19
-SRP0
-MDRP[grey]
-PUSHB_1
- 18
-MDRP[grey]
-PUSHB_2
- 20
- 0
-SRP0
-MDRP[grey]
+MDRP[min,rnd,black]
PUSHB_1
+ 10
+SHP[rp2]
+PUSHB_3
+ 7
21
-MDRP[grey]
-PUSHB_2
- 27
- 19
-SRP0
-MDRP[grey]
-PUSHB_1
- 28
-MDRP[grey]
-SPVTCA[x-axis]
-SVTCA[y-axis]
+ 10
+CALL
PUSHB_4
- 0
- 8
- 9
- 19
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-NPUSHB
- 12
- 0
- 1
+ 64
7
8
9
- 10
- 18
- 19
- 20
- 21
- 27
- 28
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[y-axis]
-PUSHB_2
- 27
- 20
-SRP1
-SRP2
-PUSHB_2
- 14
- 3
-IP
-IP
-PUSHB_1
- 10
-SRP1
-PUSHB_1
- 11
-IP
-IUP[y]
-IUP[x]
-EndTTInstrs
-LayerCount: 2
-Fore
-SplineSet
-496 -383 m 1,0,-1
- 573 -2 l 1,1,2
- 119 49 119 49 119 383 c 0,3,4
- 119 606 119 606 326 737 c 0,5,6
- 504 850 504 850 741 850 c 1,7,-1
- 831 1296 l 1,8,-1
- 995 1296 l 1,9,-1
- 907 850 l 1,10,11
- 1095 835 1095 835 1221 748 c 0,12,13
- 1366 643 1366 643 1366 467 c 0,14,15
- 1366 240 1366 240 1157 109 c 0,16,17
- 978 -2 978 -2 737 -2 c 1,18,-1
- 662 -383 l 1,19,-1
- 496 -383 l 1,0,-1
-584 49 m 1,20,-1
- 731 795 l 1,21,22
- 544 795 544 795 418 684 c 0,23,24
- 285 567 285 567 285 383 c 0,25,26
- 285 112 285 112 584 49 c 1,20,-1
-897 801 m 1,27,-1
- 748 53 l 1,28,29
- 928 53 928 53 1059 168 c 0,30,31
- 1198 286 1198 286 1198 465 c 0,32,33
- 1198 729 1198 729 897 801 c 1,27,-1
-EndSplineSet
-Validated: 1
-EndChar
-
-StartChar: uniE0CC
-Encoding: 57548 57548 438
-Width: 1271
-GlyphClass: 2
-Flags: W
-HStem: 1130 111<291 340.358>
-VStem: 104 181<-0.828735 196> 936 178<1072.84 1239.61>
-TtInstrs:
-SVTCA[y-axis]
-PUSHB_1
- 11
-MDAP[rnd]
-PUSHB_1
- 12
-MDRP[min,rnd,black]
-PUSHB_1
- 22
-SHP[rp2]
+CALL
SVTCA[x-axis]
PUSHB_1
- 40
+ 34
MDAP[rnd]
PUSHB_1
- 2
+ 1
MDRP[rp0,rnd,white]
-PUSHB_1
- 37
-MDRP[min,rnd,black]
-PUSHB_1
- 37
-SRP0
PUSHB_2
+ 7
20
- 1
-CALL
+SHP[rp2]
+SHP[rp2]
PUSHB_1
- 25
+ 18
MDRP[min,rnd,black]
PUSHB_2
- 41
+ 9
+ 27
+SHP[rp2]
+SHP[rp2]
+PUSHB_2
+ 35
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 7
- 6
-SDPVTL[orthog]
-SFVTPV
-PUSHB_1
- 7
-SRP0
-PUSHB_1
- 6
-MDRP[grey]
-PUSHB_2
- 17
- 28
-MIRP[rp0,min,black]
-PUSHB_1
- 18
-MDRP[grey]
SVTCA[y-axis]
-PUSHB_4
- 6
- 7
- 17
- 18
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_4
- 6
- 7
- 17
- 18
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-SVTCA[x-axis]
PUSHB_2
- 37
- 2
+ 7
+ 21
SRP1
SRP2
-PUSHB_2
- 0
- 11
-IP
-IP
PUSHB_1
- 20
-SRP1
-PUSHB_5
- 12
- 22
- 27
- 32
- 39
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 25
-SRP2
-PUSHB_2
- 23
- 31
-IP
-IP
-SVTCA[y-axis]
-PUSHB_2
- 12
11
-SRP1
-SRP2
-PUSHB_2
- 20
- 25
-IP
IP
IUP[y]
IUP[x]
@@ -51970,42 +50957,90 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-115 -2 m 1,0,1
- 104 34 104 34 104 63 c 0,2,3
- 104 174 104 174 281 375 c 0,4,5
- 342 444 342 444 551 645 c 1,6,-1
- 440 948 l 2,7,8
- 400 1057 400 1057 342 1094 c 0,9,10
- 290 1127 290 1127 170 1130 c 1,11,-1
- 291 1241 l 1,12,-1
- 307 1241 l 2,13,14
- 434 1241 434 1241 516 1153 c 0,15,16
- 579 1086 579 1086 623 954 c 2,17,-1
- 694 731 l 1,18,19
- 936 985 936 985 936 1139 c 0,20,21
- 936 1188 936 1188 907 1241 c 1,22,-1
- 1106 1241 l 1,23,24
- 1114 1205 1114 1205 1114 1190 c 0,25,26
- 1114 1051 1114 1051 715 676 c 1,27,28
- 804 416 804 416 844 324 c 0,29,30
- 925 128 925 128 1024 -2 c 1,31,-1
- 821 -2 l 1,32,33
- 744 118 744 118 678 287 c 2,34,-1
- 569 590 l 1,35,36
- 285 306 285 306 285 78 c 0,37,38
- 285 37 285 37 305 -2 c 1,39,-1
- 115 -2 l 1,0,1
+659.183 -383 m 1,0,-1
+ 662.123 -2 l 1,1,2
+ 198.21 49 198.21 49 133.287 383 c 0,3,4
+ 89.9404 606 89.9404 606 271.477 737 c 0,5,6
+ 427.512 850 427.512 850 664.512 850 c 1,7,-1
+ 667.817 1296 l 1,8,-1
+ 831.817 1296 l 1,9,-1
+ 830.512 850 l 1,10,11
+ 1021.43 835 1021.43 835 1164.34 748 c 0,12,13
+ 1329.75 643 1329.75 643 1363.96 467 c 0,14,15
+ 1408.08 240 1408.08 240 1224.55 109 c 0,16,17
+ 1067.12 -2 1067.12 -2 826.123 -2 c 1,18,-1
+ 825.183 -383 l 1,19,-1
+ 659.183 -383 l 1,0,-1
+663.21 49 m 1,20,-1
+ 665.202 795 l 1,21,22
+ 478.202 795 478.202 795 373.778 684 c 0,23,24
+ 263.521 567 263.521 567 299.287 383 c 0,25,26
+ 351.964 112 351.964 112 663.21 49 c 1,20,-1
+830.036 801 m 1,27,-1
+ 826.433 53 l 1,28,29
+ 1006.43 53 1006.43 53 1115.08 168 c 0,30,31
+ 1231.14 286 1231.14 286 1196.35 465 c 0,32,33
+ 1145.03 729 1145.03 729 830.036 801 c 1,27,-1
+EndSplineSet
+Validated: 16417
+EndChar
+
+StartChar: uniE0CC
+Encoding: 438 57548 438
+Width: 1124
+GlyphClass: 2
+Flags: W
+HStem: -414 160<836.677 1021.95> 792 168<97.0993 302.477>
+VStem: 25 42<638.104 737.494> 1053.86 43.1436<-199.481 -97>
+LayerCount: 2
+Fore
+SplineSet
+850.847 932 m 1,0,-1
+ 1044.18 932 l 1,1,-1
+ 621.417 226.41 l 1,2,-1
+ 724.381 -21.9131 l 2,3,4
+ 779.99 -156.029 779.99 -156.029 825.271 -204.871 c 0,5,6
+ 870.817 -254 870.817 -254 934 -254 c 0,7,8
+ 994.533 -254 994.533 -254 1022.84 -215.403 c 128,-1,9
+ 1051.14 -176.807 1051.14 -176.807 1053.86 -97 c 1,10,-1
+ 1093.44 -97 l 1,11,12
+ 1095.12 -115.573 1095.12 -115.573 1096.06 -134.848 c 128,-1,13
+ 1097 -154.121 1097 -154.121 1097 -184 c 0,14,15
+ 1097 -287.424 1097 -287.424 1052.7 -350.712 c 132,-1,16
+ 1008.4 -414 1008.4 -414 932 -414 c 4,17,18
+ 818.583 -414 818.583 -414 725.628 -186.107 c 2,19,-1
+ 694.623 -110.095 l 1,20,-1
+ 575.748 175.204 l 1,21,-1
+ 233.129 -412 l 1,22,-1
+ 39.7715 -412 l 1,23,-1
+ 499.567 364.59 l 1,24,-1
+ 416.628 567.894 l 2,25,26
+ 368.695 685.387 368.695 685.387 314.648 738.919 c 0,27,28
+ 261.057 792 261.057 792 188 792 c 0,29,30
+ 132.773 792 132.773 792 99.8867 755.459 c 128,-1,31
+ 67 718.919 67 718.919 67 658 c 0,32,33
+ 67 653.688 67 653.688 67.7744 647.495 c 128,-1,34
+ 68.5488 641.302 68.5488 641.302 68.791 638 c 1,35,-1
+ 29.2988 638 l 1,36,37
+ 26.8691 654.731 26.8691 654.731 25.9346 673.428 c 128,-1,38
+ 25 692.125 25 692.125 25 724 c 0,39,40
+ 25 833.396 25 833.396 70.2852 896.697 c 128,-1,41
+ 115.571 960 115.571 960 193 960 c 0,42,43
+ 264.74 960 264.74 960 315.211 902.67 c 128,-1,44
+ 365.682 845.339 365.682 845.339 454.369 625.114 c 1,45,-1
+ 542.189 411.836 l 1,46,-1
+ 850.847 932 l 1,0,-1
EndSplineSet
Validated: 1
EndChar
StartChar: uniE0CD
-Encoding: 57549 57549 439
-Width: 1581
+Encoding: 439 57549 439
+Width: 1440
GlyphClass: 2
Flags: W
-HStem: -6 59<474.203 571 750 869.723>
-VStem: 158 155<180.555 666.812>
+HStem: -6 59<531.924 643.406 810.938 926.703>
+VStem: 135.42 161.693<289.763 905> 642.941 168<-338 -1.8186 53 1071> 1149.75 160.578<409.25 905>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52020,101 +51055,75 @@ MDRP[min,rnd,black]
PUSHB_1
16
SHP[rp2]
+PUSHB_3
+ 1
+ 13
+ 10
+CALL
+PUSHB_4
+ 64
+ 1
+ 0
+ 9
+CALL
+PUSHB_3
+ 13
+ 1
+ 10
+CALL
+PUSHB_4
+ 64
+ 13
+ 14
+ 9
+CALL
SVTCA[x-axis]
PUSHB_1
28
MDAP[rnd]
PUSHB_1
- 3
+ 5
MDRP[rp0,rnd,white]
PUSHB_1
- 11
+ 9
MDRP[min,rnd,black]
-PUSHB_2
- 29
- 1
-CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 14
-SDPVTL[orthog]
-SFVTPV
PUSHB_1
- 0
+ 9
SRP0
-PUSHB_1
- 14
-MDRP[grey]
-PUSHB_2
- 27
- 6
-MIRP[rp0,min,black]
-PUSHB_1
- 15
-MDRP[grey]
PUSHB_2
0
- 14
-SPVTL[orthog]
-SFVTCA[x-axis]
-PUSHB_2
1
- 0
-SRP0
-MDRP[grey]
+CALL
PUSHB_1
13
-MDRP[grey]
-PUSHB_2
- 16
+SHP[rp2]
+PUSHB_1
27
-SRP0
-MDRP[grey]
+MDRP[min,rnd,black]
PUSHB_1
- 26
-MDRP[grey]
-SPVTCA[x-axis]
-SVTCA[y-axis]
-PUSHB_4
- 0
- 14
15
+SHP[rp2]
+PUSHB_1
27
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_8
- 0
+SRP0
+PUSHB_2
+ 20
1
- 13
- 14
- 15
- 16
- 26
- 27
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
+CALL
PUSHB_1
- 64
-SMD
+ 22
+MDRP[min,rnd,black]
PUSHB_2
- 11
- 3
+ 29
+ 1
+CALL
+PUSHB_2
+ 20
+ 27
SRP1
SRP2
PUSHB_1
- 7
+ 19
IP
SVTCA[y-axis]
IUP[y]
@@ -52123,37 +51132,36 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-506 -338 m 1,0,-1
- 571 -6 l 1,1,2
- 158 38 158 38 158 365 c 0,3,4
- 158 484 158 484 188 637 c 0,5,6
- 188 638 188 638 250 905 c 1,7,-1
- 416 905 l 1,8,-1
- 346 618 l 2,9,10
- 313 454 313 454 313 326 c 0,11,12
- 313 86 313 86 584 53 c 1,13,-1
- 786 1071 l 1,14,-1
- 952 1071 l 1,15,-1
- 750 53 l 1,16,17
- 940 72 940 72 1051 221 c 0,18,19
- 1136 338 1136 338 1186 553 c 2,20,-1
- 1251 905 l 1,21,-1
- 1415 905 l 1,22,23
- 1331 474 1331 474 1239 311 c 0,24,25
- 1083 33 1083 33 737 -6 c 1,26,-1
- 674 -338 l 1,27,-1
- 506 -338 l 1,0,-1
+642.941 -338 m 1,0,-1
+ 643.406 -6 l 1,1,2
+ 221.854 38 221.854 38 158.292 365 c 0,3,4
+ 135.16 484 135.16 484 135.42 637 c 0,5,6
+ 135.226 638 135.226 638 145.326 905 c 1,7,-1
+ 311.326 905 l 1,8,-1
+ 297.113 618 l 2,9,10
+ 295.992 454 295.992 454 320.872 326 c 0,11,12
+ 367.523 86 367.523 86 644.938 53 c 1,13,-1
+ 649.059 1071 l 1,14,-1
+ 815.059 1071 l 1,15,-1
+ 810.938 53 l 1,16,17
+ 997.245 72 997.245 72 1079.28 221 c 0,18,19
+ 1141.54 338 1141.54 338 1149.75 553 c 2,20,-1
+ 1146.33 905 l 1,21,-1
+ 1310.33 905 l 1,22,23
+ 1310.1 474 1310.1 474 1249.79 311 c 0,24,25
+ 1147.83 33 1147.83 33 809.406 -6 c 1,26,-1
+ 810.941 -338 l 1,27,-1
+ 642.941 -338 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0CE
-Encoding: 57550 57550 440
-Width: 1595
+Encoding: 440 57550 440
+Width: 1580
GlyphClass: 2
Flags: W
-HStem: -10 65<345.4 517.55 970.027 1187.31>
-VStem: 88 162<150.29 552.514> 682 160<366.995 512.087> 1362 127<321.608 688.006>
+HStem: -10 65<417.767 602.369 1041.62 1268.12>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52172,86 +51180,10 @@ SVTCA[x-axis]
PUSHB_1
47
MDAP[rnd]
-PUSHB_1
- 45
-MDRP[rp0,rnd,white]
-PUSHB_1
- 3
-MDRP[min,rnd,black]
-PUSHB_1
- 3
-SRP0
-PUSHB_2
- 11
- 1
-CALL
-PUSHB_1
- 18
-MDRP[min,rnd,black]
-PUSHB_3
- 18
- 11
- 10
-CALL
-PUSHB_4
- 64
- 18
- 16
- 9
-CALL
-PUSHB_1
- 18
-SRP0
-PUSHB_2
- 28
- 1
-CALL
-PUSHB_1
- 33
-MDRP[min,rnd,black]
PUSHB_2
48
1
CALL
-PUSHB_2
- 11
- 3
-SRP1
-SRP2
-PUSHB_4
- 0
- 1
- 7
- 41
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 18
-SRP1
-PUSHB_3
- 9
- 13
- 39
-IP
-IP
-IP
-PUSHB_1
- 28
-SRP2
-PUSHB_3
- 14
- 30
- 37
-IP
-IP
-IP
-PUSHB_1
- 33
-SRP1
-PUSHB_1
- 31
-IP
SVTCA[y-axis]
IUP[y]
IUP[x]
@@ -52259,44 +51191,44 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-336 922 m 1,0,-1
- 535 922 l 1,1,2
- 250 600 250 600 250 344 c 0,3,4
- 250 235 250 235 291 156 c 0,5,6
- 342 55 342 55 442 55 c 0,7,8
- 594 55 594 55 696 365 c 1,9,10
- 682 429 682 429 682 471 c 0,11,12
- 682 662 682 662 758 795 c 1,13,-1
- 920 842 l 1,14,15
- 938 797 938 797 938 741 c 0,16,17
- 938 612 938 612 842 416 c 1,18,-1
- 840 330 l 1,19,-1
- 842 282 l 2,20,21
- 853 206 853 206 905 143 c 0,22,23
- 977 57 977 57 1083 57 c 0,24,25
- 1225 57 1225 57 1300 203 c 0,26,27
- 1362 321 1362 321 1362 475 c 0,28,29
- 1362 705 1362 705 1163 922 c 1,30,-1
- 1380 922 l 1,31,32
- 1489 773 1489 773 1489 575 c 0,33,34
- 1489 351 1489 351 1372 180 c 0,35,36
- 1242 -10 1242 -10 1026 -10 c 0,37,38
- 823 -10 823 -10 723 225 c 1,39,40
- 578 -10 578 -10 381 -10 c 0,41,42
- 236 -10 236 -10 158 102 c 0,43,44
- 88 200 88 200 88 350 c 0,45,46
- 88 626 88 626 336 922 c 1,0,-1
+245.419 922 m 1,0,-1
+ 444.419 922 l 1,1,2
+ 222.009 600 222.009 600 271.771 344 c 0,3,4
+ 292.958 235 292.958 235 349.314 156 c 0,5,6
+ 419.946 55 419.946 55 519.946 55 c 0,7,8
+ 671.946 55 671.946 55 713.688 365 c 1,9,10
+ 687.248 429 687.248 429 679.084 471 c 0,11,12
+ 641.958 662 641.958 662 692.105 795 c 1,13,-1
+ 844.969 842 l 1,14,15
+ 871.717 797 871.717 797 882.602 741 c 0,16,17
+ 907.677 612 907.677 612 849.775 416 c 1,18,-1
+ 864.492 330 l 1,19,-1
+ 875.822 282 l 2,20,21
+ 901.595 206 901.595 206 965.841 143 c 0,22,23
+ 1054.56 57 1054.56 57 1160.56 57 c 0,24,25
+ 1302.56 57 1302.56 57 1349.18 203 c 0,26,27
+ 1388.24 321 1388.24 321 1358.31 475 c 0,28,29
+ 1313.6 705 1313.6 705 1072.42 922 c 1,30,-1
+ 1289.42 922 l 1,31,32
+ 1427.38 773 1427.38 773 1465.87 575 c 0,33,34
+ 1509.41 351 1509.41 351 1425.65 180 c 0,35,36
+ 1332.58 -10 1332.58 -10 1116.58 -10 c 0,37,38
+ 913.581 -10 913.581 -10 767.902 225 c 1,39,40
+ 668.581 -10 668.581 -10 471.581 -10 c 0,41,42
+ 326.581 -10 326.581 -10 226.811 102 c 0,43,44
+ 137.762 200 137.762 200 108.604 350 c 0,45,46
+ 54.9551 626 54.9551 626 245.419 922 c 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0CF
-Encoding: 57551 57551 441
-Width: 950
+Encoding: 441 57551 441
+Width: 846
GlyphClass: 2
Flags: W
-HStem: -8 98<305.486 661.444> 463 82<460.864 690> 809 98<587.404 793.926> 852 92<412.627 797.592>
-VStem: 82 164<142.636 364.001> 215 156<613.07 808.978>
+HStem: -8 98<364.768 739.592> 463 82<438.326 690.972> 852 92<346.927 721.543>
+VStem: 128.457 628.543
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52317,15 +51249,6 @@ MDAP[rnd]
PUSHB_1
14
MDRP[min,rnd,black]
-PUSHB_1
- 14
-SRP0
-PUSHB_1
- 16
-MDRP[rp0,rnd,white]
-PUSHB_1
- 17
-MDRP[min,rnd,black]
SVTCA[x-axis]
PUSHB_1
35
@@ -52334,45 +51257,57 @@ PUSHB_1
6
MDRP[rp0,rnd,white]
PUSHB_1
- 28
-MDRP[min,rnd,black]
-PUSHB_4
- 10
- 28
- 6
- 8
-CALL
-PUSHB_1
- 21
+ 34
MDRP[min,rnd,black]
PUSHB_2
36
1
CALL
+PUSHB_2
+ 34
+ 6
+SRP1
+SRP2
+PUSHB_4
+ 2
+ 0
+ 11
+ 8
+DEPTH
+SLOOP
+IP
SVTCA[y-axis]
PUSHB_2
- 24
32
+ 2
SRP1
SRP2
-PUSHB_2
- 6
- 34
+PUSHB_1
+ 0
IP
+PUSHB_1
+ 24
+SRP1
+PUSHB_1
+ 34
IP
PUSHB_1
23
-SRP1
+SRP2
PUSHB_1
8
IP
PUSHB_1
+ 19
+SRP1
+PUSHB_1
17
-SRP2
-PUSHB_2
- 10
- 21
IP
+PUSHB_1
+ 14
+SRP2
+PUSHB_1
+ 16
IP
IUP[y]
IUP[x]
@@ -52380,37 +51315,37 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-674 41 m 1,0,1
- 551 -8 551 -8 393 -8 c 0,2,3
- 270 -8 270 -8 182 47 c 0,4,5
- 82 113 82 113 82 229 c 0,6,7
- 82 440 82 440 412 514 c 1,8,9
- 215 582 215 582 215 711 c 0,10,11
- 215 836 215 836 336 897 c 0,12,13
- 432 944 432 944 567 944 c 0,14,15
- 691 944 691 944 811 907 c 1,16,-1
- 791 809 l 1,17,18
- 693 852 693 852 584 852 c 0,19,20
- 371 852 371 852 371 711 c 0,21,22
- 371 545 371 545 709 545 c 1,23,-1
- 690 463 l 1,24,25
- 496 463 496 463 412 438 c 0,26,27
- 246 392 246 392 246 250 c 0,28,29
- 246 174 246 174 307 129 c 0,30,31
- 362 90 362 90 442 90 c 0,32,33
- 576 90 576 90 694 143 c 1,34,-1
- 674 41 l 1,0,1
+757 41 m 1,0,1
+ 643.525 -8 643.525 -8 485.525 -8 c 0,2,3
+ 362.525 -8 362.525 -8 263.834 47 c 0,4,5
+ 151.005 113 151.005 113 128.457 229 c 0,6,7
+ 87.4424 440 87.4424 440 403.059 514 c 1,8,9
+ 192.841 582 192.841 582 167.766 711 c 0,10,11
+ 143.468 836 143.468 836 252.61 897 c 0,12,13
+ 339.475 944 339.475 944 474.475 944 c 0,14,15
+ 598.475 944 598.475 944 725.667 907 c 1,16,-1
+ 724.717 809 l 1,17,18
+ 618.357 852 618.357 852 509.358 852 c 0,19,20
+ 296.358 852 296.358 852 323.766 711 c 0,21,22
+ 356.033 545 356.033 545 694.033 545 c 1,23,-1
+ 690.972 463 l 1,24,25
+ 496.972 463 496.972 463 417.831 438 c 0,26,27
+ 260.772 392 260.772 392 288.375 250 c 0,28,29
+ 303.147 174 303.147 174 372.895 129 c 0,30,31
+ 435.476 90 435.476 90 515.476 90 c 0,32,33
+ 649.476 90 649.476 90 757.174 143 c 1,34,-1
+ 757 41 l 1,0,1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D0
-Encoding: 57552 57552 442
-Width: 1196
+Encoding: 442 57552 442
+Width: 1132
GlyphClass: 2
Flags: W
-HStem: -10 108<346 539.419> 623 145<417.432 766 961 1102> 1282 76<520.623 732.477>
-VStem: 240 139<807.447 1071.83> 805 176<771.142 1206.37>
+HStem: -10 108<414.956 599.348> 623 145<330.378 708.729 878.729 1019.73> 1282 76<340.1 554.726>
+VStem: 708.729 170<768 1056.14>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52442,65 +51377,29 @@ PUSHB_1
50
MDAP[rnd]
PUSHB_1
- 16
+ 37
MDRP[rp0,rnd,white]
PUSHB_1
- 45
-MDRP[min,rnd,black]
-PUSHB_1
- 45
-SRP0
-PUSHB_2
- 39
- 1
-CALL
+ 8
+SHP[rp2]
PUSHB_1
- 22
+ 24
MDRP[min,rnd,black]
-PUSHB_3
- 22
- 39
- 10
-CALL
-PUSHB_4
- 64
- 22
- 25
- 9
-CALL
+PUSHB_1
+ 27
+SHP[rp2]
PUSHB_2
51
1
CALL
PUSHB_2
- 45
- 16
-SRP1
-SRP2
-PUSHB_3
- 3
- 31
- 33
-IP
-IP
-IP
-PUSHB_1
- 39
+ 24
+ 37
SRP1
-PUSHB_4
- 4
- 14
- 20
- 10
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 22
SRP2
PUSHB_2
- 24
- 27
+ 10
+ 9
IP
IP
SVTCA[y-axis]
@@ -52520,64 +51419,53 @@ PUSHB_2
34
IP
IP
-PUSHB_2
- 41
- 37
-SRP1
-SRP2
-PUSHB_2
- 16
- 22
-IP
-IP
IUP[y]
IUP[x]
EndTTInstrs
LayerCount: 2
Fore
SplineSet
-72 268 m 1,0,-1
- 180 414 l 1,1,2
- 250 411 250 411 313 330 c 2,3,-1
- 408 176 l 2,4,5
- 456 98 456 98 500 98 c 0,6,7
- 618 98 618 98 698 309 c 0,8,9
- 757 467 757 467 766 623 c 1,10,11
- 756 623 756 623 670 621 c 0,12,13
- 604 618 604 618 569 618 c 0,14,15
- 240 618 240 618 240 858 c 0,16,17
- 240 1057 240 1057 372 1207 c 0,18,19
- 504 1358 504 1358 700 1358 c 0,20,21
- 981 1358 981 1358 981 965 c 0,22,23
- 981 883 981 883 961 768 c 1,24,-1
- 1102 768 l 1,25,-1
- 1102 623 l 1,26,-1
- 928 623 l 1,27,28
- 856 395 856 395 731 221 c 0,29,30
- 568 -10 568 -10 379 -10 c 0,31,32
- 313 -10 313 -10 268 66 c 2,33,-1
- 195 203 l 2,34,35
- 151 268 151 268 84 268 c 2,36,-1
- 72 268 l 1,0,-1
-791 768 m 1,37,38
- 805 854 805 854 805 987 c 0,39,40
- 805 1282 805 1282 633 1282 c 0,41,42
- 512 1282 512 1282 440 1157 c 0,43,44
- 379 1053 379 1053 379 924 c 0,45,46
- 379 822 379 822 449 791 c 0,47,48
- 495 768 495 768 606 768 c 2,49,-1
- 791 768 l 1,37,38
+86.918 268 m 5,0,-1
+ 166.539 414 l 5,1,2
+ 237.122 411 237.122 411 315.867 330 c 6,3,-1
+ 440.802 176 l 6,4,5
+ 503.963 98 503.963 98 547.963 98 c 4,6,7
+ 665.963 98 665.963 98 704.949 309 c 4,8,9
+ 733.236 467 733.236 467 711.913 623 c 5,10,11
+ 701.913 623 701.913 623 616.302 621 c 4,12,13
+ 550.885 618 550.885 618 515.885 618 c 4,14,15
+ 186.886 618 186.886 618 140.234 858 c 4,16,17
+ 101.553 1057 101.553 1057 204.396 1207 c 4,18,19
+ 307.044 1358 307.044 1358 503.044 1358 c 4,20,21
+ 784.044 1358 784.044 1358 860.436 965 c 4,22,23
+ 876.375 883 876.375 883 878.729 768 c 5,24,-1
+ 1019.73 768 l 5,25,-1
+ 1047.91 623 l 5,26,-1
+ 873.913 623 l 5,27,28
+ 846.232 395 846.232 395 755.055 221 c 4,29,30
+ 636.956 -10 636.956 -10 447.956 -10 c 4,31,32
+ 381.956 -10 381.956 -10 322.184 66 c 6,33,-1
+ 222.553 203 l 6,34,35
+ 165.918 268 165.918 268 98.918 268 c 6,36,-1
+ 86.918 268 l 5,0,-1
+708.729 768 m 5,37,38
+ 706.012 854 706.012 854 680.159 987 c 4,39,40
+ 622.816 1282 622.816 1282 450.816 1282 c 4,41,42
+ 329.816 1282 329.816 1282 282.114 1157 c 4,43,44
+ 241.33 1053 241.33 1053 266.405 924 c 4,45,46
+ 286.231 822 286.231 822 362.258 791 c 4,47,48
+ 412.729 768 412.729 768 523.729 768 c 6,49,-1
+ 708.729 768 l 5,37,38
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D1
-Encoding: 57553 57553 443
-Width: 1810
+Encoding: 443 57553 443
+Width: 1765
GlyphClass: 2
Flags: W
-HStem: -12 100<472.91 710.339> -12 84<1028.95 1274.04> 797 123<163.246 451 518.562 1357.58 1503 1698>
-VStem: 236 157<172.364 549.552> 776 258<382.792 530.654> 1427 125<319.297 698.89>
+HStem: -12 100<534.589 792.217> -12 84<1094.24 1356.7> 797 123<105.617 384.327 460.382 1299.45 1436.33 1607.42>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52607,100 +51495,21 @@ SVTCA[x-axis]
PUSHB_1
49
MDAP[rnd]
-PUSHB_1
- 23
-MDRP[rp0,rnd,white]
-PUSHB_1
- 40
-MDRP[min,rnd,black]
-PUSHB_1
- 40
-SRP0
-PUSHB_2
- 46
- 1
-CALL
-PUSHB_1
- 27
-MDRP[min,rnd,black]
-PUSHB_1
- 27
-SRP0
-PUSHB_2
- 35
- 1
-CALL
-PUSHB_1
- 11
-MDRP[min,rnd,black]
-PUSHB_3
- 11
- 35
- 10
-CALL
-PUSHB_4
- 64
- 11
- 8
- 9
-CALL
PUSHB_2
50
1
CALL
-PUSHB_2
- 46
- 40
-SRP1
-SRP2
-PUSHB_4
- 19
- 38
- 0
- 42
-DEPTH
-SLOOP
-IP
-PUSHB_1
- 27
-SRP1
-PUSHB_3
- 17
- 29
- 44
-IP
-IP
-IP
-PUSHB_1
- 35
-SRP2
-PUSHB_3
- 15
- 31
- 37
-IP
-IP
-IP
-PUSHB_1
- 11
-SRP1
-PUSHB_1
- 9
-IP
SVTCA[y-axis]
PUSHB_2
1
42
SRP1
SRP2
-PUSHB_7
+PUSHB_4
3
- 11
17
- 23
25
29
- 35
DEPTH
SLOOP
IP
@@ -52716,47 +51525,46 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-451 797 m 1,0,-1
- 322 797 l 2,1,2
- 213 797 213 797 100 711 c 1,3,-1
- 100 862 l 1,4,5
- 199 920 199 920 348 920 c 2,6,-1
- 1698 920 l 1,7,-1
- 1698 797 l 1,8,-1
- 1503 797 l 1,9,10
- 1552 699 1552 699 1552 575 c 0,11,12
- 1552 356 1552 356 1438 184 c 0,13,14
- 1309 -12 1309 -12 1100 -12 c 0,15,16
- 930 -12 930 -12 831 145 c 1,17,18
- 716 -12 716 -12 545 -12 c 0,19,20
- 402 -12 402 -12 315 88 c 0,21,22
- 236 182 236 182 236 330 c 0,23,24
- 236 579 236 579 451 797 c 1,0,-1
-1022 680 m 1,25,26
- 1034 647 1034 647 1034 596 c 0,27,28
- 1034 436 1034 436 926 256 c 1,29,30
- 996 72 996 72 1167 72 c 0,31,32
- 1301 72 1301 72 1370 211 c 0,33,34
- 1427 322 1427 322 1427 469 c 0,35,36
- 1427 642 1427 642 1333 797 c 1,37,-1
- 557 797 l 1,38,39
- 393 628 393 628 393 367 c 0,40,41
- 393 88 393 88 608 88 c 0,42,43
- 708 88 708 88 803 193 c 1,44,45
- 776 274 776 274 776 342 c 0,46,47
- 776 487 776 487 883 639 c 1,48,-1
- 1022 680 l 1,25,26
+384.327 797 m 1,0,-1
+ 255.327 797 l 2,1,2
+ 146.327 797 146.327 797 50.0439 711 c 1,3,-1
+ 20.6924 862 l 1,4,5
+ 108.419 920 108.419 920 257.419 920 c 2,6,-1
+ 1607.42 920 l 1,7,-1
+ 1631.33 797 l 1,8,-1
+ 1436.33 797 l 1,9,10
+ 1504.38 699 1504.38 699 1528.48 575 c 0,11,12
+ 1571.05 356 1571.05 356 1490.48 184 c 0,13,14
+ 1399.58 -12 1399.58 -12 1190.58 -12 c 0,15,16
+ 1020.58 -12 1020.58 -12 891.063 145 c 1,17,18
+ 806.581 -12 806.581 -12 635.581 -12 c 0,19,20
+ 492.581 -12 492.581 -12 386.144 88 c 0,21,22
+ 288.871 182 288.871 182 260.104 330 c 0,23,24
+ 211.702 579 211.702 579 384.327 797 c 1,0,-1
+978.07 680 m 1,25,26
+ 996.484 647 996.484 647 1006.4 596 c 0,27,28
+ 1037.5 436 1037.5 436 964.487 256 c 1,29,30
+ 1070.25 72 1070.25 72 1241.25 72 c 0,31,32
+ 1375.25 72 1375.25 72 1417.23 211 c 0,33,34
+ 1452.66 322 1452.66 322 1424.08 469 c 0,35,36
+ 1390.46 642 1390.46 642 1266.33 797 c 1,37,-1
+ 490.327 797 l 1,38,39
+ 359.178 628 359.178 628 409.911 367 c 0,40,41
+ 464.144 88 464.144 88 679.144 88 c 0,42,43
+ 779.144 88 779.144 88 853.733 193 c 1,44,45
+ 810.988 274 810.988 274 797.771 342 c 0,46,47
+ 769.586 487 769.586 487 847.04 639 c 1,48,-1
+ 978.07 680 l 1,25,26
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D3
-Encoding: 57555 57555 444
-Width: 1142
+Encoding: 444 57555 444
+Width: 1052
GlyphClass: 2
Flags: W
-HStem: -342 72<419.293 672.968> 850 94<577.189 955.371>
-VStem: 109 178<217.643 521.029> 774 107<-184.395 -30.7949>
+HStem: -342 72<522.476 790.978> 850 94<460.596 799.959>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52775,22 +51583,6 @@ SVTCA[x-axis]
PUSHB_1
37
MDAP[rnd]
-PUSHB_1
- 13
-MDRP[rp0,rnd,white]
-PUSHB_1
- 26
-MDRP[min,rnd,black]
-PUSHB_1
- 26
-SRP0
-PUSHB_2
- 7
- 1
-CALL
-PUSHB_1
- 31
-MDRP[min,rnd,black]
PUSHB_2
38
1
@@ -52798,10 +51590,12 @@ CALL
PUSHB_1
54
SMD
-PUSHB_2
- 11
- 9
-SDPVTL[orthog]
+PUSHW_3
+ -2949
+ -16116
+ 21
+CALL
+SPVFS
SFVTPV
PUSHB_1
11
@@ -52811,7 +51605,7 @@ PUSHB_1
MDRP[grey]
PUSHB_2
28
- 3
+ 32
MIRP[rp0,min,black]
PUSHB_1
29
@@ -52840,30 +51634,6 @@ PUSHB_1
64
SMD
SVTCA[x-axis]
-PUSHB_2
- 26
- 13
-SRP1
-SRP2
-PUSHB_1
- 0
-IP
-PUSHB_1
- 7
-SRP1
-PUSHB_3
- 1
- 22
- 35
-IP
-IP
-IP
-PUSHB_1
- 31
-SRP2
-PUSHB_1
- 17
-IP
SVTCA[y-axis]
PUSHB_2
3
@@ -52876,13 +51646,10 @@ IP
PUSHB_1
22
SRP1
-PUSHB_4
+PUSHB_2
1
- 13
20
- 31
-DEPTH
-SLOOP
+IP
IP
PUSHB_1
17
@@ -52896,38 +51663,38 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-244 -303 m 1,0,-1
- 342 -188 l 1,1,2
- 452 -270 452 -270 571 -270 c 0,3,4
- 649 -270 649 -270 712 -225 c 0,5,6
- 774 -180 774 -180 774 -104 c 0,7,8
- 774 -14 774 -14 602 8 c 0,9,10
- 315 46 315 46 281 57 c 0,11,12
- 109 115 109 115 109 289 c 0,13,14
- 109 576 109 576 340 766 c 0,15,16
- 558 944 558 944 852 944 c 0,17,18
- 953 944 953 944 1030 915 c 1,19,-1
- 934 788 l 1,20,21
- 818 850 818 850 707 850 c 0,22,23
- 513 850 513 850 395 684 c 0,24,25
- 287 532 287 532 287 334 c 0,26,27
- 287 194 287 194 440 166 c 2,28,-1
- 727 137 l 2,29,30
- 881 107 881 107 881 -35 c 0,31,32
- 881 -186 881 -186 745 -270 c 0,33,34
- 630 -342 630 -342 469 -342 c 0,35,36
- 346 -342 346 -342 244 -303 c 1,0,-1
+361.405 -303 m 1,0,-1
+ 437.052 -188 l 1,1,2
+ 562.991 -270 562.991 -270 681.991 -270 c 0,3,4
+ 759.991 -270 759.991 -270 814.244 -225 c 0,5,6
+ 867.497 -180 867.497 -180 852.724 -104 c 0,7,8
+ 835.229 -14 835.229 -14 658.953 8 c 0,9,10
+ 364.567 46 364.567 46 328.429 57 c 0,11,12
+ 145.154 115 145.154 115 111.333 289 c 0,13,14
+ 55.5459 576 55.5459 576 249.613 766 c 0,15,16
+ 433.014 944 433.014 944 727.014 944 c 0,17,18
+ 828.014 944 828.014 944 910.65 915 c 1,19,-1
+ 839.337 788 l 1,20,21
+ 711.285 850 711.285 850 600.285 850 c 0,22,23
+ 406.285 850 406.285 850 320.553 684 c 0,24,25
+ 242.099 532 242.099 532 280.586 334 c 0,26,27
+ 307.799 194 307.799 194 466.241 166 c 2,28,-1
+ 758.878 137 l 2,29,30
+ 918.71 107 918.71 107 946.312 -35 c 0,31,32
+ 975.663 -186 975.663 -186 855.991 -270 c 0,33,34
+ 754.986 -342 754.986 -342 593.986 -342 c 0,35,36
+ 470.986 -342 470.986 -342 361.405 -303 c 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D4
-Encoding: 57556 57556 445
-Width: 1593
+Encoding: 445 57556 445
+Width: 1527
GlyphClass: 2
Flags: W
-HStem: 2 72<500.219 586> 2 49<764 866.293> 850 133<943.651 1253.2> 895 61<446.682 563> 983 2<911 928>
-VStem: 106 156<292.321 662.772> 520 164<-330 -257.886> 1327 143<435.776 780.534>
+HStem: 2 72<546.608 647.275> 2 49<817.746 914.032> 850 121<850.619 1160.77> 895 61<344.827 452.689> 983 2<783.584 800.195>
+VStem: 644.889 149.729<201.167 792.408>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -52939,9 +51706,12 @@ SHP[rp1]
PUSHB_1
22
MDRP[min,rnd,black]
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
PUSHB_3
40
- 22
+ 0
10
CALL
PUSHB_4
@@ -52951,20 +51721,14 @@ PUSHB_4
9
CALL
PUSHB_1
- 40
-SRP0
-PUSHB_1
- 0
-MDRP[min,rnd,black]
-PUSHB_1
8
MDAP[rnd]
PUSHB_1
- 28
+ 29
MDRP[min,rnd,black]
PUSHB_4
15
- 28
+ 29
8
8
CALL
@@ -52982,131 +51746,37 @@ PUSHB_1
46
MDAP[rnd]
PUSHB_1
- 42
+ 23
MDRP[rp0,rnd,white]
PUSHB_1
- 20
-MDRP[min,rnd,black]
-PUSHB_1
- 20
-SRP0
-PUSHB_2
39
- 1
-CALL
+SHP[rp2]
PUSHB_1
- 38
+ 12
MDRP[min,rnd,black]
PUSHB_1
- 38
-SRP0
-PUSHB_2
- 4
- 1
-CALL
-PUSHB_1
- 33
-MDRP[min,rnd,black]
+ 27
+SHP[rp2]
PUSHB_2
47
1
CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 40
- 23
-SDPVTL[orthog]
-PUSHB_1
- 40
-MDAP[no-rnd]
-SFVTPV
-PUSHB_1
- 23
-MDRP[grey]
-SFVTCA[x-axis]
-PUSHB_2
- 37
- 29
-MIRP[rp0,min,black]
-SFVTPV
-PUSHB_1
- 14
-MDRP[grey]
-PUSHB_2
- 37
- 14
-SPVTL[orthog]
-SFVTCA[x-axis]
-PUSHB_1
- 0
-MDRP[grey]
PUSHB_2
- 22
- 40
-SRP0
-MDRP[grey]
-SPVTCA[x-axis]
-SVTCA[y-axis]
-PUSHB_2
- 14
- 23
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_6
- 0
- 14
- 22
+ 12
23
- 37
- 40
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
- 64
-SMD
-PUSHB_2
- 38
- 39
SRP1
SRP2
-PUSHB_2
- 16
- 15
-IP
-IP
PUSHB_1
- 4
-SRP1
-PUSHB_2
- 27
28
IP
-IP
SVTCA[y-axis]
PUSHB_2
- 16
- 40
-SRP1
-SRP2
-PUSHB_2
- 33
- 42
-IP
-IP
-PUSHB_2
- 28
- 15
+ 8
+ 22
SRP1
SRP2
PUSHB_1
- 26
+ 13
IP
IUP[y]
IUP[x]
@@ -53114,46 +51784,45 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-764 51 m 1,0,1
- 1007 89 1007 89 1166 257 c 0,2,3
- 1327 425 1327 425 1327 666 c 0,4,5
- 1327 757 1327 757 1253 807 c 0,6,7
- 1191 850 1191 850 1096 850 c 0,8,9
- 980 850 980 850 922 786 c 0,10,11
- 876 740 876 740 854 633 c 0,12,13
- 842 543 842 543 827 446 c 2,14,-1
- 764 51 l 1,0,1
-621 956 m 1,15,-1
- 563 895 l 1,16,17
- 433 895 433 895 344 770 c 0,18,19
- 262 658 262 658 262 522 c 0,20,21
- 262 152 262 152 598 74 c 1,22,-1
- 686 539 l 2,23,24
- 763 910 763 910 812 946 c 0,25,26
- 861 983 861 983 928 985 c 1,27,-1
- 911 983 l 1,28,-1
- 1176 971 l 2,29,30
- 1317 956 1317 956 1384 895 c 0,31,32
- 1470 819 1470 819 1470 649 c 0,33,34
- 1470 376 1470 376 1241 193 c 0,35,36
- 1033 26 1033 26 750 2 c 1,37,-1
- 684 -330 l 1,38,-1
- 520 -330 l 1,39,-1
- 586 2 l 1,40,41
- 106 65 106 65 106 440 c 0,42,43
- 106 664 106 664 251 811 c 0,44,45
- 395 956 395 956 621 956 c 1,15,-1
+817.746 51 m 1,0,1
+ 1053.36 89 1053.36 89 1179.7 257 c 0,2,3
+ 1308.05 425 1308.05 425 1261.2 666 c 0,4,5
+ 1243.51 757 1243.51 757 1159.79 807 c 0,6,7
+ 1089.44 850 1089.44 850 994.437 850 c 0,8,9
+ 878.437 850 878.437 850 832.877 786 c 0,10,11
+ 795.818 740 795.818 740 794.617 633 c 0,12,13
+ 800.111 543 800.111 543 803.966 446 c 2,14,-1
+ 817.746 51 l 1,0,1
+498.832 956 m 1,15,-1
+ 452.689 895 l 1,16,17
+ 322.689 895 322.689 895 257.986 770 c 0,18,19
+ 197.757 658 197.757 658 224.193 522 c 0,20,21
+ 296.113 152 296.113 152 647.275 74 c 1,22,-1
+ 644.889 539 l 2,23,24
+ 649.773 910 649.773 910 691.775 946 c 0,25,26
+ 733.584 983 733.584 983 800.195 985 c 1,27,-1
+ 783.584 983 l 1,28,-1
+ 1050.92 971 l 2,29,30
+ 1194.83 956 1194.83 956 1273.69 895 c 0,31,32
+ 1374.46 819 1374.46 819 1407.51 649 c 0,33,34
+ 1460.57 376 1460.57 376 1267.14 193 c 0,35,36
+ 1091.61 26 1091.61 26 813.271 2 c 1,37,-1
+ 811.805 -330 l 1,38,-1
+ 647.805 -330 l 1,39,-1
+ 649.271 2 l 1,40,41
+ 157.024 65 157.024 65 84.1318 440 c 0,42,43
+ 40.5908 664 40.5908 664 157.018 811 c 0,44,45
+ 272.832 956 272.832 956 498.832 956 c 1,15,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D5
-Encoding: 57557 57557 446
-Width: 995
+Encoding: 446 57557 446
+Width: 953
GlyphClass: 2
Flags: W
-HStem: -8 106<327.982 542.569> 813 49<471.535 671.76> 1214 146<333.048 626.875>
-VStem: 106 156<168.747 526.219> 809 51<717 934.438>
+HStem: -8 106<430.445 667.82> 813 49<449.135 642.895> 1214 146<208.97 531.128>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -53178,61 +51847,19 @@ SVTCA[x-axis]
PUSHB_1
38
MDAP[rnd]
-PUSHB_1
- 14
-MDRP[rp0,rnd,white]
-PUSHB_1
- 30
-MDRP[min,rnd,black]
-PUSHB_1
- 30
-SRP0
-PUSHB_2
- 20
- 1
-CALL
-PUSHB_1
- 24
-SHP[rp2]
-PUSHB_1
- 6
-MDRP[min,rnd,black]
PUSHB_2
39
1
CALL
-PUSHB_2
- 30
- 14
-SRP1
-SRP2
-PUSHB_1
- 0
-IP
-PUSHB_1
- 20
-SRP1
-PUSHB_4
- 10
- 2
- 18
- 22
-DEPTH
-SLOOP
-IP
SVTCA[y-axis]
PUSHB_2
26
34
SRP1
SRP2
-PUSHB_3
- 6
- 14
+PUSHB_1
20
IP
-IP
-IP
PUSHB_2
22
18
@@ -53247,58 +51874,52 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-145 1098 m 1,0,1
- 278 1360 278 1360 496 1360 c 0,2,3
- 696 1360 696 1360 791 1159 c 0,4,5
- 860 1008 860 1008 860 780 c 0,6,7
- 860 490 860 490 754 272 c 0,8,9
- 616 -8 616 -8 358 -8 c 0,10,11
- 239 -8 239 -8 170 80 c 0,12,13
- 106 162 106 162 106 285 c 0,14,15
- 106 495 106 495 227 670 c 0,16,17
- 362 862 362 862 565 862 c 0,18,19
- 709 862 709 862 809 717 c 1,20,21
- 809 1214 809 1214 442 1214 c 0,22,23
- 289 1214 289 1214 145 1098 c 1,0,1
-805 643 m 1,24,25
- 712 813 712 813 578 813 c 0,26,27
- 427 813 427 813 338 655 c 0,28,29
- 262 524 262 524 262 358 c 0,30,31
- 262 262 262 262 295 190 c 0,32,33
- 340 98 340 98 424 98 c 0,34,35
- 588 98 588 98 698 297 c 0,36,37
- 784 451 784 451 805 643 c 1,24,25
+62.9717 1098 m 1,0,1
+ 145.044 1360 145.044 1360 363.044 1360 c 0,2,3
+ 563.044 1360 563.044 1360 697.114 1159 c 0,4,5
+ 795.466 1008 795.466 1008 839.784 780 c 0,6,7
+ 896.154 490 896.154 490 832.529 272 c 0,8,9
+ 748.956 -8 748.956 -8 490.956 -8 c 0,10,11
+ 371.956 -8 371.956 -8 285.851 80 c 0,12,13
+ 205.911 162 205.911 162 182.003 285 c 0,14,15
+ 141.183 495 141.183 495 228.166 670 c 0,16,17
+ 325.846 862 325.846 862 528.846 862 c 0,18,19
+ 672.846 862 672.846 862 801.03 717 c 1,20,21
+ 704.424 1214 704.424 1214 337.424 1214 c 0,22,23
+ 184.424 1214 184.424 1214 62.9717 1098 c 1,0,1
+811.414 643 m 1,24,25
+ 685.37 813 685.37 813 551.37 813 c 0,26,27
+ 400.37 813 400.37 813 342.082 655 c 0,28,29
+ 291.546 524 291.546 524 323.812 358 c 0,30,31
+ 342.474 262 342.474 262 389.469 190 c 0,32,33
+ 452.352 98 452.352 98 536.352 98 c 0,34,35
+ 700.352 98 700.352 98 771.67 297 c 0,36,37
+ 827.735 451 827.735 451 811.414 643 c 1,24,25
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D6
-Encoding: 57558 57558 447
+Encoding: 447 57558 447
Width: 602
GlyphClass: 2
Flags: W
-HStem: 2 51<328.281 440> 862 51<145 261.604>
-VStem: 119 348
+HStem: 2 51<402.089 528.54> 862 51<56.46 187.904>
+VStem: 207.54 168.819<69.2529 850.25>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
14
MDAP[rnd]
PUSHB_1
- 0
-SHP[rp1]
-PUSHB_1
13
MDRP[min,rnd,black]
PUSHB_1
- 5
+ 6
MDAP[rnd]
PUSHB_1
7
MDRP[min,rnd,black]
-PUSHB_1
- 8
-SHP[rp2]
SVTCA[x-axis]
PUSHB_1
15
@@ -53307,60 +51928,34 @@ PUSHB_1
0
MDRP[rp0,rnd,white]
PUSHB_1
- 8
+ 9
MDRP[min,rnd,black]
-PUSHB_2
- 16
- 1
-CALL
-PUSHB_1
- 54
-SMD
-PUSHB_2
- 0
- 1
-SDPVTL[orthog]
-SFVTPV
-PUSHB_1
- 0
-SRP0
-PUSHB_1
- 1
-MDRP[grey]
-PUSHB_2
+PUSHB_3
9
- 6
-MIRP[rp0,min,black]
-PUSHB_2
0
- 1
-SPVTL[orthog]
-SVTCA[y-axis]
-PUSHB_2
- 1
+ 10
+CALL
+PUSHB_4
+ 64
9
-MDAP[no-rnd]
-MDAP[no-rnd]
-SVTCA[x-axis]
-PUSHB_2
- 1
+ 14
9
-MDAP[no-rnd]
-MDAP[no-rnd]
-PUSHB_1
+CALL
+PUSHB_3
+ 0
+ 9
+ 10
+CALL
+PUSHB_4
64
-SMD
-SVTCA[x-axis]
-PUSHB_2
- 8
0
-SRP1
-SRP2
-PUSHB_2
6
- 13
-IP
-IP
+ 9
+CALL
+PUSHB_2
+ 16
+ 1
+CALL
SVTCA[y-axis]
IUP[y]
IUP[x]
@@ -53368,24 +51963,24 @@ EndTTInstrs
LayerCount: 2
Fore
SplineSet
-119 2 m 1,0,-1
- 258 696 l 2,1,2
- 270 758 270 758 270 815 c 0,3,4
- 270 862 270 862 151 862 c 2,5,-1
- 135 862 l 1,6,-1
- 145 913 l 1,7,-1
- 467 913 l 1,8,-1
- 330 219 l 2,9,10
- 315 147 315 147 315 100 c 0,11,12
- 315 59 315 59 451 53 c 1,13,-1
- 440 2 l 1,14,-1
- 119 2 l 1,0,-1
+207.54 2 m 1,0,-1
+ 211.641 696 l 2,1,2
+ 211.589 758 211.589 758 200.509 815 c 0,3,4
+ 191.373 862 191.373 862 72.373 862 c 2,5,-1
+ 56.373 862 l 1,6,-1
+ 56.46 913 l 1,7,-1
+ 378.46 913 l 1,8,-1
+ 376.359 219 l 2,9,10
+ 375.355 147 375.355 147 384.491 100 c 0,11,12
+ 392.461 59 392.461 59 529.627 53 c 1,13,-1
+ 528.54 2 l 1,14,-1
+ 207.54 2 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16417
EndChar
StartChar: uniE0D9
-Encoding: 57561 57561 448
+Encoding: 448 57561 448
Width: 1400
GlyphClass: 2
Flags: W
@@ -53459,7 +52054,7 @@ Validated: 1
EndChar
StartChar: uniE0DB
-Encoding: 57563 57563 449
+Encoding: 449 57563 449
Width: 1662
GlyphClass: 2
Flags: W
@@ -53514,7 +52109,7 @@ Validated: 1
EndChar
StartChar: uniE0DC
-Encoding: 57564 57564 450
+Encoding: 450 57564 450
Width: 835
GlyphClass: 2
Flags: W
@@ -53572,7 +52167,7 @@ Validated: 1
EndChar
StartChar: uniE0DD
-Encoding: 57565 57565 451
+Encoding: 451 57565 451
Width: 823
GlyphClass: 2
Flags: W
@@ -53630,7 +52225,7 @@ Validated: 1
EndChar
StartChar: uniE100
-Encoding: 57600 57600 452
+Encoding: 452 57600 452
Width: 606
GlyphClass: 2
Flags: W
@@ -53709,7 +52304,7 @@ Validated: 1
EndChar
StartChar: uniE101
-Encoding: 57601 57601 453
+Encoding: 453 57601 453
Width: 1464
GlyphClass: 2
Flags: W
@@ -53755,7 +52350,7 @@ Validated: 1
EndChar
StartChar: uniE102
-Encoding: 57602 57602 454
+Encoding: 454 57602 454
Width: 1138
GlyphClass: 2
Flags: W
@@ -54069,7 +52664,7 @@ Validated: 1
EndChar
StartChar: uniE103
-Encoding: 57603 57603 455
+Encoding: 455 57603 455
Width: 1345
GlyphClass: 2
Flags: W
@@ -54157,7 +52752,7 @@ Validated: 1
EndChar
StartChar: uniE104
-Encoding: 57604 57604 456
+Encoding: 456 57604 456
Width: 1705
GlyphClass: 2
Flags: W
@@ -54335,7 +52930,7 @@ Validated: 1
EndChar
StartChar: uniE105
-Encoding: 57605 57605 457
+Encoding: 457 57605 457
Width: 899
GlyphClass: 2
Flags: W
@@ -54451,7 +53046,7 @@ Validated: 1
EndChar
StartChar: uniE106
-Encoding: 57606 57606 458
+Encoding: 458 57606 458
Width: 798
GlyphClass: 2
Flags: W
@@ -54516,7 +53111,7 @@ Validated: 1
EndChar
StartChar: uniE107
-Encoding: 57607 57607 459
+Encoding: 459 57607 459
Width: 798
GlyphClass: 2
Flags: W
@@ -54581,7 +53176,7 @@ Validated: 1
EndChar
StartChar: uniE108
-Encoding: 57608 57608 460
+Encoding: 460 57608 460
Width: 1040
GlyphClass: 2
Flags: W
@@ -54618,7 +53213,7 @@ Validated: 1
EndChar
StartChar: uniE109
-Encoding: 57609 57609 461
+Encoding: 461 57609 461
Width: 1196
GlyphClass: 2
Flags: W
@@ -54727,7 +53322,7 @@ Validated: 1
EndChar
StartChar: uniE10A
-Encoding: 57610 57610 462
+Encoding: 462 57610 462
Width: 512
GlyphClass: 2
Flags: W
@@ -54806,7 +53401,7 @@ Validated: 1
EndChar
StartChar: uniE10B
-Encoding: 57611 57611 463
+Encoding: 463 57611 463
Width: 681
GlyphClass: 2
Flags: W
@@ -54855,7 +53450,7 @@ Validated: 1
EndChar
StartChar: uniE10C
-Encoding: 57612 57612 464
+Encoding: 464 57612 464
Width: 512
GlyphClass: 2
Flags: W
@@ -54910,7 +53505,7 @@ Validated: 1
EndChar
StartChar: uniE10D
-Encoding: 57613 57613 465
+Encoding: 465 57613 465
Width: 569
GlyphClass: 2
Flags: W
@@ -54991,7 +53586,7 @@ Validated: 1
EndChar
StartChar: uniE10E
-Encoding: 57614 57614 466
+Encoding: 466 57614 466
Width: 569
GlyphClass: 2
Flags: W
@@ -55064,7 +53659,7 @@ Validated: 1
EndChar
StartChar: uniE10F
-Encoding: 57615 57615 467
+Encoding: 467 57615 467
Width: 569
GlyphClass: 2
Flags: W
@@ -55161,7 +53756,7 @@ Validated: 1
EndChar
StartChar: uniE110
-Encoding: 57616 57616 468
+Encoding: 468 57616 468
Width: 1196
GlyphClass: 2
Flags: W
@@ -55181,48 +53776,22 @@ Validated: 1
EndChar
StartChar: uniE111
-Encoding: 57617 57617 469
+Encoding: 469 57617 469
Width: 1628
GlyphClass: 2
Flags: W
-HStem: 358 99<221 1405> 791 98<221 1405>
-TtInstrs:
-SVTCA[y-axis]
-PUSHB_1
- 0
-MDAP[rnd]
-PUSHB_1
- 1
-MDRP[min,rnd,black]
-PUSHB_1
- 4
-MDAP[rnd]
-PUSHB_1
- 5
-MDRP[min,rnd,black]
-SVTCA[x-axis]
-PUSHB_1
- 8
-MDAP[rnd]
-PUSHB_2
- 9
- 1
-CALL
-SVTCA[y-axis]
-IUP[y]
-IUP[x]
-EndTTInstrs
+HStem: 293 127<221 1405> 791 129<221 1405>
LayerCount: 2
Fore
SplineSet
-221 358 m 1,0,-1
- 221 457 l 1,1,-1
- 1405 457 l 1,2,-1
- 1405 358 l 1,3,-1
- 221 358 l 1,0,-1
+221 293 m 1,0,-1
+ 221 420 l 5,1,-1
+ 1405 420 l 5,2,-1
+ 1405 293 l 1,3,-1
+ 221 293 l 1,0,-1
221 791 m 1,4,-1
- 221 889 l 1,5,-1
- 1405 889 l 1,6,-1
+ 221 920 l 1,5,-1
+ 1405 920 l 1,6,-1
1405 791 l 1,7,-1
221 791 l 1,4,-1
EndSplineSet
@@ -55230,7 +53799,7 @@ Validated: 1
EndChar
StartChar: uniE112
-Encoding: 57618 57618 470
+Encoding: 470 57618 470
Width: 1196
GlyphClass: 2
Flags: W
@@ -55250,7 +53819,7 @@ Validated: 1
EndChar
StartChar: uniE113
-Encoding: 57619 57619 471
+Encoding: 471 57619 471
Width: 1628
GlyphClass: 2
Flags: W
@@ -55390,12 +53959,12 @@ Validated: 1
EndChar
StartChar: uniE114
-Encoding: 57620 57620 472
+Encoding: 472 57620 472
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<248 504> 1581 41<248 504>
-VStem: 150 98<-360 1581>
+HStem: -403 70<248 504> 1552 70<248 504>
+VStem: 150 98<-333 1552>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -55448,23 +54017,23 @@ SplineSet
150 -403 m 1,0,-1
150 1622 l 1,1,-1
504 1622 l 1,2,-1
- 504 1581 l 1,3,-1
- 248 1581 l 1,4,-1
- 248 -360 l 1,5,-1
- 504 -360 l 1,6,-1
+ 504 1552 l 1,3,-1
+ 248 1552 l 1,4,-1
+ 248 -333 l 5,5,-1
+ 504 -333 l 5,6,-1
504 -403 l 1,7,-1
150 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uniE115
-Encoding: 57621 57621 473
+Encoding: 473 57621 473
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<74 330> 1581 41<74 330>
-VStem: 330 98<-360 1581>
+HStem: -403 74<74 330> 1552 70<74 330>
+VStem: 330 98<-329 1552>
TtInstrs:
SVTCA[y-axis]
PUSHB_1
@@ -55516,19 +54085,19 @@ Fore
SplineSet
428 -403 m 1,0,-1
74 -403 l 1,1,-1
- 74 -360 l 1,2,-1
- 330 -360 l 1,3,-1
- 330 1581 l 1,4,-1
- 74 1581 l 1,5,-1
+ 74 -329 l 5,2,-1
+ 330 -329 l 5,3,-1
+ 330 1552 l 1,4,-1
+ 74 1552 l 1,5,-1
74 1622 l 1,6,-1
428 1622 l 1,7,-1
428 -403 l 1,0,-1
EndSplineSet
-Validated: 1
+Validated: 16385
EndChar
StartChar: uniE116
-Encoding: 57622 57622 474
+Encoding: 474 57622 474
Width: 1431
GlyphClass: 2
Flags: W
@@ -55615,7 +54184,7 @@ Validated: 1
EndChar
StartChar: uniE117
-Encoding: 57623 57623 475
+Encoding: 475 57623 475
Width: 782
GlyphClass: 2
Flags: W
@@ -55744,7 +54313,7 @@ Validated: 1
EndChar
StartChar: uniE118
-Encoding: 57624 57624 476
+Encoding: 476 57624 476
Width: 782
GlyphClass: 2
Flags: W
@@ -55871,7 +54440,7 @@ Validated: 1
EndChar
StartChar: uniE119
-Encoding: 57625 57625 477
+Encoding: 477 57625 477
Width: 1628
GlyphClass: 2
Flags: W
@@ -55979,7 +54548,7 @@ Validated: 1
EndChar
StartChar: uniE11A
-Encoding: 57626 57626 478
+Encoding: 478 57626 478
Width: 1566
GlyphClass: 2
Flags: W
@@ -56115,7 +54684,7 @@ Validated: 1
EndChar
StartChar: uniE11B
-Encoding: 57627 57627 479
+Encoding: 479 57627 479
Width: 1628
GlyphClass: 2
Flags: W
@@ -56162,7 +54731,7 @@ Validated: 1
EndChar
StartChar: uniE11C
-Encoding: 57628 57628 480
+Encoding: 480 57628 480
Width: 1540
GlyphClass: 2
Flags: W
@@ -56297,7 +54866,7 @@ Validated: 1
EndChar
StartChar: uniE11D
-Encoding: 57629 57629 481
+Encoding: 481 57629 481
Width: 1024
GlyphClass: 2
Flags: W
@@ -56412,7 +54981,7 @@ Validated: 1
EndChar
StartChar: uniE11E
-Encoding: 57630 57630 482
+Encoding: 482 57630 482
Width: 1589
GlyphClass: 2
Flags: W
@@ -56547,7 +55116,7 @@ Validated: 1
EndChar
StartChar: uniE11F
-Encoding: 57631 57631 483
+Encoding: 483 57631 483
Width: 1421
GlyphClass: 2
Flags: W
@@ -56591,7 +55160,7 @@ Validated: 1
EndChar
StartChar: uniE120
-Encoding: 57632 57632 484
+Encoding: 484 57632 484
Width: 1282
GlyphClass: 2
Flags: W
@@ -56648,7 +55217,7 @@ Validated: 1
EndChar
StartChar: uniE121
-Encoding: 57633 57633 485
+Encoding: 485 57633 485
Width: 2080
GlyphClass: 2
Flags: W
@@ -56711,7 +55280,7 @@ Validated: 1
EndChar
StartChar: uniE122
-Encoding: 57634 57634 486
+Encoding: 486 57634 486
Width: 1662
GlyphClass: 2
Flags: W
@@ -56766,7 +55335,7 @@ Validated: 1
EndChar
StartChar: uniE123
-Encoding: 57635 57635 487
+Encoding: 487 57635 487
Width: 835
GlyphClass: 2
Flags: W
@@ -56824,7 +55393,7 @@ Validated: 1
EndChar
StartChar: uniE124
-Encoding: 57636 57636 488
+Encoding: 488 57636 488
Width: 1662
GlyphClass: 2
Flags: W
@@ -56879,7 +55448,7 @@ Validated: 9
EndChar
StartChar: uniE125
-Encoding: 57637 57637 489
+Encoding: 489 57637 489
Width: 823
GlyphClass: 2
Flags: W
@@ -56937,7 +55506,7 @@ Validated: 1
EndChar
StartChar: uniE126
-Encoding: 57638 57638 490
+Encoding: 490 57638 490
Width: 532
GlyphClass: 2
Flags: W
@@ -57031,7 +55600,7 @@ Validated: 1
EndChar
StartChar: uniE127
-Encoding: 57639 57639 491
+Encoding: 491 57639 491
Width: 1628
GlyphClass: 2
Flags: W
@@ -57159,7 +55728,7 @@ Validated: 1
EndChar
StartChar: uniE128
-Encoding: 57640 57640 492
+Encoding: 492 57640 492
Width: 1628
GlyphClass: 2
Flags: W
@@ -57206,7 +55775,7 @@ Validated: 1
EndChar
StartChar: uniE129
-Encoding: 57641 57641 493
+Encoding: 493 57641 493
Width: 1628
GlyphClass: 2
Flags: W
@@ -57246,7 +55815,7 @@ Validated: 1
EndChar
StartChar: uniE12A
-Encoding: 57642 57642 494
+Encoding: 494 57642 494
Width: 1460
GlyphClass: 2
Flags: W
@@ -57364,7 +55933,7 @@ Validated: 1
EndChar
StartChar: uniE12B
-Encoding: 57643 57643 495
+Encoding: 495 57643 495
Width: 1091
GlyphClass: 2
Flags: W
@@ -57497,7 +56066,7 @@ Validated: 1
EndChar
StartChar: uniE12C
-Encoding: 57644 57644 496
+Encoding: 496 57644 496
Width: 843
GlyphClass: 2
Flags: W
@@ -57552,7 +56121,7 @@ Validated: 1
EndChar
StartChar: uniE12D
-Encoding: 57645 57645 497
+Encoding: 497 57645 497
Width: 1628
GlyphClass: 2
Flags: W
@@ -57625,7 +56194,7 @@ Validated: 1
EndChar
StartChar: uniE12E
-Encoding: 57646 57646 498
+Encoding: 498 57646 498
Width: 1628
GlyphClass: 2
Flags: W
@@ -57697,7 +56266,7 @@ Validated: 1
EndChar
StartChar: uniE12F
-Encoding: 57647 57647 499
+Encoding: 499 57647 499
Width: 1628
GlyphClass: 2
Flags: W
@@ -57757,7 +56326,7 @@ Validated: 1
EndChar
StartChar: uniE130
-Encoding: 57648 57648 500
+Encoding: 500 57648 500
Width: 1628
GlyphClass: 2
Flags: W
@@ -57935,7 +56504,7 @@ Validated: 1
EndChar
StartChar: uniE131
-Encoding: 57649 57649 501
+Encoding: 501 57649 501
Width: 2048
GlyphClass: 2
Flags: W
@@ -58034,7 +56603,7 @@ Validated: 1
EndChar
StartChar: uniE132
-Encoding: 57650 57650 502
+Encoding: 502 57650 502
Width: 1685
GlyphClass: 2
Flags: W
@@ -58217,7 +56786,7 @@ Validated: 33
EndChar
StartChar: uniE133
-Encoding: 57651 57651 503
+Encoding: 503 57651 503
Width: 1404
GlyphClass: 2
Flags: W
@@ -58468,7 +57037,7 @@ Validated: 1
EndChar
StartChar: uniE134
-Encoding: 57652 57652 504
+Encoding: 504 57652 504
Width: 1628
GlyphClass: 2
Flags: W
@@ -58654,7 +57223,7 @@ Validated: 1
EndChar
StartChar: uniE135
-Encoding: 57653 57653 505
+Encoding: 505 57653 505
Width: 1710
GlyphClass: 2
Flags: W
@@ -58851,7 +57420,7 @@ Validated: 1
EndChar
StartChar: uniE136
-Encoding: 57654 57654 506
+Encoding: 506 57654 506
Width: 1628
GlyphClass: 2
Flags: W
@@ -58972,7 +57541,7 @@ Validated: 1
EndChar
StartChar: uniE137
-Encoding: 57655 57655 507
+Encoding: 507 57655 507
Width: 1628
GlyphClass: 2
Flags: W
@@ -59118,7 +57687,7 @@ Validated: 1
EndChar
StartChar: uniE138
-Encoding: 57656 57656 508
+Encoding: 508 57656 508
Width: 1628
GlyphClass: 2
Flags: W
@@ -59223,7 +57792,7 @@ Validated: 1
EndChar
StartChar: uniE139
-Encoding: 57657 57657 509
+Encoding: 509 57657 509
Width: 1628
GlyphClass: 2
Flags: W
@@ -59302,7 +57871,7 @@ Validated: 1
EndChar
StartChar: uniE13A
-Encoding: 57658 57658 510
+Encoding: 510 57658 510
Width: 1628
GlyphClass: 2
Flags: W
@@ -59383,7 +57952,7 @@ Validated: 1
EndChar
StartChar: uniE13B
-Encoding: 57659 57659 511
+Encoding: 511 57659 511
Width: 1628
GlyphClass: 2
Flags: W
@@ -59466,7 +58035,7 @@ Validated: 1
EndChar
StartChar: uniE13C
-Encoding: 57660 57660 512
+Encoding: 512 57660 512
Width: 1628
GlyphClass: 2
Flags: W
@@ -59567,7 +58136,7 @@ Validated: 1
EndChar
StartChar: uniE13D
-Encoding: 57661 57661 513
+Encoding: 513 57661 513
Width: 1628
GlyphClass: 2
Flags: W
@@ -59679,7 +58248,7 @@ Validated: 1
EndChar
StartChar: uniE13E
-Encoding: 57662 57662 514
+Encoding: 514 57662 514
Width: 1628
GlyphClass: 2
Flags: W
@@ -59762,7 +58331,7 @@ Validated: 1
EndChar
StartChar: uniE13F
-Encoding: 57663 57663 515
+Encoding: 515 57663 515
Width: 1628
GlyphClass: 2
Flags: W
@@ -59863,7 +58432,7 @@ Validated: 1
EndChar
StartChar: uniE140
-Encoding: 57664 57664 516
+Encoding: 516 57664 516
Width: 1460
GlyphClass: 2
Flags: W
@@ -59944,7 +58513,7 @@ Validated: 1
EndChar
StartChar: uniE141
-Encoding: 57665 57665 517
+Encoding: 517 57665 517
Width: 1460
GlyphClass: 2
Flags: W
@@ -60070,7 +58639,7 @@ Validated: 1
EndChar
StartChar: uniE142
-Encoding: 57666 57666 518
+Encoding: 518 57666 518
Width: 1679
GlyphClass: 2
Flags: W
@@ -60111,7 +58680,7 @@ Validated: 1
EndChar
StartChar: uniE143
-Encoding: 57667 57667 519
+Encoding: 519 57667 519
Width: 2048
GlyphClass: 2
Flags: W
@@ -60146,7 +58715,7 @@ Validated: 9
EndChar
StartChar: uniE144
-Encoding: 57668 57668 520
+Encoding: 520 57668 520
Width: 1804
GlyphClass: 2
Flags: W
@@ -60307,7 +58876,7 @@ Validated: 1
EndChar
StartChar: uniE145
-Encoding: 57669 57669 521
+Encoding: 521 57669 521
Width: 1091
GlyphClass: 2
Flags: W
@@ -60389,7 +58958,7 @@ Validated: 1
EndChar
StartChar: uniE146
-Encoding: 57670 57670 522
+Encoding: 522 57670 522
Width: 1183
GlyphClass: 2
Flags: W
@@ -60444,7 +59013,7 @@ Validated: 1
EndChar
StartChar: uniE147
-Encoding: 57671 57671 523
+Encoding: 523 57671 523
Width: 1329
GlyphClass: 2
Flags: W
@@ -60502,7 +59071,7 @@ Validated: 1
EndChar
StartChar: uniE148
-Encoding: 57672 57672 524
+Encoding: 524 57672 524
Width: 681
GlyphClass: 2
Flags: W
@@ -60542,7 +59111,7 @@ Validated: 1
EndChar
StartChar: uniE149
-Encoding: 57673 57673 525
+Encoding: 525 57673 525
Width: 681
GlyphClass: 2
Flags: W
@@ -60582,7 +59151,7 @@ Validated: 1
EndChar
StartChar: uniE14A
-Encoding: 57674 57674 526
+Encoding: 526 57674 526
Width: 1900
GlyphClass: 2
Flags: W
@@ -60687,7 +59256,7 @@ Validated: 1
EndChar
StartChar: uniE14B
-Encoding: 57675 57675 527
+Encoding: 527 57675 527
Width: 1658
GlyphClass: 2
Flags: W
@@ -60773,7 +59342,7 @@ Validated: 1
EndChar
StartChar: uniE14C
-Encoding: 57676 57676 528
+Encoding: 528 57676 528
Width: 1634
GlyphClass: 2
Flags: W
@@ -60859,7 +59428,7 @@ Validated: 1
EndChar
StartChar: uniE14D
-Encoding: 57677 57677 529
+Encoding: 529 57677 529
Width: 681
GlyphClass: 2
Flags: W
@@ -60909,7 +59478,7 @@ Validated: 1
EndChar
StartChar: uniE14E
-Encoding: 57678 57678 530
+Encoding: 530 57678 530
Width: 1507
GlyphClass: 2
Flags: W
@@ -61099,7 +59668,7 @@ Validated: 1
EndChar
StartChar: uniE14F
-Encoding: 57679 57679 531
+Encoding: 531 57679 531
Width: 1507
GlyphClass: 2
Flags: W
@@ -61262,7 +59831,7 @@ Validated: 1
EndChar
StartChar: uniE150
-Encoding: 57680 57680 532
+Encoding: 532 57680 532
Width: 2048
GlyphClass: 2
Flags: W
@@ -61297,7 +59866,7 @@ Validated: 9
EndChar
StartChar: uniE151
-Encoding: 57681 57681 533
+Encoding: 533 57681 533
Width: 1425
GlyphClass: 2
Flags: W
@@ -61425,7 +59994,7 @@ Validated: 1
EndChar
StartChar: uniE15D
-Encoding: 57693 57693 534
+Encoding: 534 57693 534
Width: 1183
GlyphClass: 2
Flags: W
@@ -61584,7 +60153,7 @@ Validated: 1
EndChar
StartChar: uniE16A
-Encoding: 57706 57706 535
+Encoding: 535 57706 535
Width: 1593
GlyphClass: 2
Flags: W
@@ -61787,7 +60356,7 @@ Validated: 1
EndChar
StartChar: uniE200
-Encoding: 57856 57856 536
+Encoding: 536 57856 536
Width: 1968
GlyphClass: 2
Flags: W
@@ -61989,7 +60558,7 @@ Validated: 1
EndChar
StartChar: uniE201
-Encoding: 57857 57857 537
+Encoding: 537 57857 537
Width: 2154
GlyphClass: 2
Flags: W
@@ -62565,7 +61134,7 @@ Validated: 5
EndChar
StartChar: uniE202
-Encoding: 57858 57858 538
+Encoding: 538 57858 538
Width: 2048
GlyphClass: 2
Flags: W
@@ -62573,7 +61142,7 @@ LayerCount: 2
EndChar
StartChar: uniE203
-Encoding: 57859 57859 539
+Encoding: 539 57859 539
Width: 1619
GlyphClass: 2
Flags: W
@@ -62664,7 +61233,7 @@ Validated: 1
EndChar
StartChar: uniE204
-Encoding: 57860 57860 540
+Encoding: 540 57860 540
Width: 1581
GlyphClass: 2
Flags: W
@@ -62753,7 +61322,7 @@ Validated: 1
EndChar
StartChar: uniE205
-Encoding: 57861 57861 541
+Encoding: 541 57861 541
Width: 2037
GlyphClass: 2
Flags: W
@@ -62920,7 +61489,7 @@ Validated: 1
EndChar
StartChar: uniE206
-Encoding: 57862 57862 542
+Encoding: 542 57862 542
Width: 1376
GlyphClass: 2
Flags: W
@@ -63234,7 +61803,7 @@ Validated: 1
EndChar
StartChar: uniE207
-Encoding: 57863 57863 543
+Encoding: 543 57863 543
Width: 1515
GlyphClass: 2
Flags: W
@@ -63550,7 +62119,7 @@ Validated: 1
EndChar
StartChar: uniE208
-Encoding: 57864 57864 544
+Encoding: 544 57864 544
Width: 1515
GlyphClass: 2
Flags: W
@@ -63866,7 +62435,7 @@ Validated: 1
EndChar
StartChar: uniE209
-Encoding: 57865 57865 545
+Encoding: 545 57865 545
Width: 1613
GlyphClass: 2
Flags: W
@@ -63887,7 +62456,7 @@ Validated: 1
EndChar
StartChar: uniE20A
-Encoding: 57866 57866 546
+Encoding: 546 57866 546
Width: 1343
GlyphClass: 2
Flags: W
@@ -63967,7 +62536,7 @@ Validated: 1
EndChar
StartChar: uniE20B
-Encoding: 57867 57867 547
+Encoding: 547 57867 547
Width: 983
GlyphClass: 2
Flags: W
@@ -64004,7 +62573,7 @@ Validated: 1
EndChar
StartChar: uniE20C
-Encoding: 57868 57868 548
+Encoding: 548 57868 548
Width: 1056
GlyphClass: 2
Flags: W
@@ -64047,7 +62616,7 @@ Validated: 1
EndChar
StartChar: uniE20D
-Encoding: 57869 57869 549
+Encoding: 549 57869 549
Width: 1196
GlyphClass: 2
Flags: W
@@ -64272,7 +62841,7 @@ Validated: 1
EndChar
StartChar: uniE20E
-Encoding: 57870 57870 550
+Encoding: 550 57870 550
Width: 1196
GlyphClass: 2
Flags: W
@@ -64370,7 +62939,7 @@ Validated: 1
EndChar
StartChar: uniE20F
-Encoding: 57871 57871 551
+Encoding: 551 57871 551
Width: 1196
GlyphClass: 2
Flags: W
@@ -64460,7 +63029,7 @@ Validated: 1
EndChar
StartChar: uniE210
-Encoding: 57872 57872 552
+Encoding: 552 57872 552
Width: 1163
GlyphClass: 2
Flags: W
@@ -64572,7 +63141,7 @@ Validated: 1
EndChar
StartChar: uniE211
-Encoding: 57873 57873 553
+Encoding: 553 57873 553
Width: 1417
GlyphClass: 2
Flags: W
@@ -64690,7 +63259,7 @@ Validated: 1
EndChar
StartChar: uniE212
-Encoding: 57874 57874 554
+Encoding: 554 57874 554
Width: 1163
GlyphClass: 2
Flags: W
@@ -64834,7 +63403,7 @@ Validated: 1
EndChar
StartChar: uniE213
-Encoding: 57875 57875 555
+Encoding: 555 57875 555
Width: 1179
GlyphClass: 2
Flags: W
@@ -65014,7 +63583,7 @@ Validated: 1
EndChar
StartChar: uniE214
-Encoding: 57876 57876 556
+Encoding: 556 57876 556
Width: 1163
GlyphClass: 2
Flags: W
@@ -65149,7 +63718,7 @@ Validated: 1
EndChar
StartChar: uniE215
-Encoding: 57877 57877 557
+Encoding: 557 57877 557
Width: 1179
GlyphClass: 2
Flags: W
@@ -65507,7 +64076,7 @@ Validated: 33
EndChar
StartChar: uniE216
-Encoding: 57878 57878 558
+Encoding: 558 57878 558
Width: 1286
GlyphClass: 2
Flags: W
@@ -65540,7 +64109,7 @@ Validated: 1
EndChar
StartChar: uniE217
-Encoding: 57879 57879 559
+Encoding: 559 57879 559
Width: 1269
GlyphClass: 2
Flags: W
@@ -65585,7 +64154,7 @@ Validated: 1
EndChar
StartChar: uniE218
-Encoding: 57880 57880 560
+Encoding: 560 57880 560
Width: 1212
GlyphClass: 2
Flags: W
@@ -65638,7 +64207,7 @@ Validated: 1
EndChar
StartChar: uniE219
-Encoding: 57881 57881 561
+Encoding: 561 57881 561
Width: 1212
GlyphClass: 2
Flags: W
@@ -65806,7 +64375,7 @@ Validated: 1
EndChar
StartChar: uniE21A
-Encoding: 57882 57882 562
+Encoding: 562 57882 562
Width: 1245
GlyphClass: 2
Flags: W
@@ -65881,7 +64450,7 @@ Validated: 1
EndChar
StartChar: uniE21B
-Encoding: 57883 57883 563
+Encoding: 563 57883 563
Width: 1392
GlyphClass: 2
Flags: W
@@ -65954,7 +64523,7 @@ Validated: 1
EndChar
StartChar: uniE21C
-Encoding: 57884 57884 564
+Encoding: 564 57884 564
Width: 1280
GlyphClass: 2
Flags: W
@@ -66072,7 +64641,7 @@ Validated: 1
EndChar
StartChar: uniE21D
-Encoding: 57885 57885 565
+Encoding: 565 57885 565
Width: 1114
GlyphClass: 2
Flags: W
@@ -66184,7 +64753,7 @@ Validated: 1
EndChar
StartChar: uniE21E
-Encoding: 57886 57886 566
+Encoding: 566 57886 566
Width: 1179
GlyphClass: 2
Flags: W
@@ -66260,7 +64829,7 @@ Validated: 1
EndChar
StartChar: uniE21F
-Encoding: 57887 57887 567
+Encoding: 567 57887 567
Width: 1179
GlyphClass: 2
Flags: W
@@ -66465,7 +65034,7 @@ Validated: 1
EndChar
StartChar: uniE220
-Encoding: 57888 57888 568
+Encoding: 568 57888 568
Width: 1040
GlyphClass: 2
Flags: W
@@ -66502,7 +65071,7 @@ Validated: 1
EndChar
StartChar: uniE221
-Encoding: 57889 57889 569
+Encoding: 569 57889 569
Width: 1163
GlyphClass: 2
Flags: W
@@ -66546,7 +65115,7 @@ Validated: 1
EndChar
StartChar: uniE222
-Encoding: 57890 57890 570
+Encoding: 570 57890 570
Width: 1179
GlyphClass: 2
Flags: W
@@ -66590,7 +65159,7 @@ Validated: 1
EndChar
StartChar: uniE223
-Encoding: 57891 57891 571
+Encoding: 571 57891 571
Width: 1236
GlyphClass: 2
Flags: W
@@ -66627,7 +65196,7 @@ Validated: 1
EndChar
StartChar: uniE224
-Encoding: 57892 57892 572
+Encoding: 572 57892 572
Width: 1691
GlyphClass: 2
Flags: W
@@ -66811,7 +65380,7 @@ Validated: 1
EndChar
StartChar: uniE225
-Encoding: 57893 57893 573
+Encoding: 573 57893 573
Width: 1406
GlyphClass: 2
Flags: W
@@ -67081,7 +65650,7 @@ Validated: 1
EndChar
StartChar: uniE226
-Encoding: 57894 57894 574
+Encoding: 574 57894 574
Width: 1548
GlyphClass: 2
Flags: W
@@ -67136,7 +65705,7 @@ Validated: 1
EndChar
StartChar: uniE227
-Encoding: 57895 57895 575
+Encoding: 575 57895 575
Width: 1949
GlyphClass: 2
Flags: W
@@ -67234,7 +65803,7 @@ Validated: 1
EndChar
StartChar: uniE228
-Encoding: 57896 57896 576
+Encoding: 576 57896 576
Width: 1318
GlyphClass: 2
Flags: W
@@ -67285,7 +65854,7 @@ Validated: 1
EndChar
StartChar: uniE229
-Encoding: 57897 57897 577
+Encoding: 577 57897 577
Width: 1130
GlyphClass: 2
Flags: W
@@ -67386,7 +65955,7 @@ Validated: 1
EndChar
StartChar: uniE22A
-Encoding: 57898 57898 578
+Encoding: 578 57898 578
Width: 1146
GlyphClass: 2
Flags: W
@@ -67484,7 +66053,7 @@ Validated: 1
EndChar
StartChar: uniE22B
-Encoding: 57899 57899 579
+Encoding: 579 57899 579
Width: 1826
GlyphClass: 2
Flags: W
@@ -67582,7 +66151,7 @@ Validated: 1
EndChar
StartChar: uniE22C
-Encoding: 57900 57900 580
+Encoding: 580 57900 580
Width: 1826
GlyphClass: 2
Flags: W
@@ -67680,7 +66249,7 @@ Validated: 1
EndChar
StartChar: uniE22D
-Encoding: 57901 57901 581
+Encoding: 581 57901 581
Width: 1179
GlyphClass: 2
Flags: W
@@ -67712,7 +66281,7 @@ Validated: 1
EndChar
StartChar: uniE22E
-Encoding: 57902 57902 582
+Encoding: 582 57902 582
Width: 1179
GlyphClass: 2
Flags: W
@@ -67744,7 +66313,7 @@ Validated: 1
EndChar
StartChar: uniE22F
-Encoding: 57903 57903 583
+Encoding: 583 57903 583
Width: 897
GlyphClass: 2
Flags: W
@@ -67786,7 +66355,7 @@ Validated: 1
EndChar
StartChar: uniE230
-Encoding: 57904 57904 584
+Encoding: 584 57904 584
Width: 567
GlyphClass: 2
Flags: W
@@ -67828,7 +66397,7 @@ Validated: 1
EndChar
StartChar: uniE231
-Encoding: 57905 57905 585
+Encoding: 585 57905 585
Width: 798
GlyphClass: 2
Flags: W
@@ -67893,7 +66462,7 @@ Validated: 1
EndChar
StartChar: uniE232
-Encoding: 57906 57906 586
+Encoding: 586 57906 586
Width: 798
GlyphClass: 2
Flags: W
@@ -67958,7 +66527,7 @@ Validated: 1
EndChar
StartChar: uniE233
-Encoding: 57907 57907 587
+Encoding: 587 57907 587
Width: 798
GlyphClass: 2
Flags: W
@@ -68023,7 +66592,7 @@ Validated: 1
EndChar
StartChar: uniE234
-Encoding: 57908 57908 588
+Encoding: 588 57908 588
Width: 798
GlyphClass: 2
Flags: W
@@ -68088,7 +66657,7 @@ Validated: 1
EndChar
StartChar: uniE235
-Encoding: 57909 57909 589
+Encoding: 589 57909 589
Width: 686
GlyphClass: 2
Flags: W
@@ -68128,7 +66697,7 @@ Validated: 1
EndChar
StartChar: uniE236
-Encoding: 57910 57910 590
+Encoding: 590 57910 590
Width: 686
GlyphClass: 2
Flags: W
@@ -68179,7 +66748,7 @@ Validated: 1
EndChar
StartChar: uniE237
-Encoding: 57911 57911 591
+Encoding: 591 57911 591
Width: 1628
GlyphClass: 2
Flags: W
@@ -68198,7 +66767,7 @@ Validated: 1
EndChar
StartChar: uniE238
-Encoding: 57912 57912 592
+Encoding: 592 57912 592
Width: 1628
GlyphClass: 2
Flags: W
@@ -68217,7 +66786,7 @@ Validated: 1
EndChar
StartChar: uniE239
-Encoding: 57913 57913 593
+Encoding: 593 57913 593
Width: 1628
GlyphClass: 2
Flags: W
@@ -68236,7 +66805,7 @@ Validated: 1
EndChar
StartChar: uniE23A
-Encoding: 57914 57914 594
+Encoding: 594 57914 594
Width: 1628
GlyphClass: 2
Flags: W
@@ -68255,68 +66824,22 @@ Validated: 1
EndChar
StartChar: uniE23B
-Encoding: 57915 57915 595
+Encoding: 595 57915 595
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<248 504> 1581 41<248 504>
-VStem: 150 98<-360 1581>
-TtInstrs:
-SVTCA[y-axis]
-PUSHB_1
- 0
-MDAP[rnd]
-PUSHB_1
- 5
-MDRP[min,rnd,black]
-PUSHB_1
- 4
-MDAP[rnd]
-PUSHB_1
- 1
-MDRP[min,rnd,black]
-SVTCA[x-axis]
-PUSHB_1
- 8
-MDAP[rnd]
-PUSHB_1
- 0
-MDRP[rp0,rnd,white]
-PUSHB_1
- 5
-MDRP[min,rnd,black]
-PUSHB_3
- 5
- 0
- 10
-CALL
-PUSHB_4
- 64
- 5
- 7
- 9
-CALL
-PUSHB_1
- 2
-SHP[rp2]
-PUSHB_2
- 9
- 1
-CALL
-SVTCA[y-axis]
-IUP[y]
-IUP[x]
-EndTTInstrs
+HStem: -403 70<248 504> 1552 70<248 504>
+VStem: 150 98<-333 1552>
LayerCount: 2
Fore
SplineSet
150 -403 m 1,0,-1
150 1622 l 1,1,-1
504 1622 l 1,2,-1
- 504 1581 l 1,3,-1
- 248 1581 l 1,4,-1
- 248 -360 l 1,5,-1
- 504 -360 l 1,6,-1
+ 504 1552 l 1,3,-1
+ 248 1552 l 1,4,-1
+ 248 -333 l 5,5,-1
+ 504 -333 l 5,6,-1
504 -403 l 1,7,-1
150 -403 l 1,0,-1
EndSplineSet
@@ -68324,67 +66847,21 @@ Validated: 1
EndChar
StartChar: uniE23C
-Encoding: 57916 57916 596
+Encoding: 596 57916 596
Width: 577
GlyphClass: 2
Flags: W
-HStem: -403 43<74 330> 1581 41<74 330>
-VStem: 330 98<-360 1581>
-TtInstrs:
-SVTCA[y-axis]
-PUSHB_1
- 1
-MDAP[rnd]
-PUSHB_1
- 2
-MDRP[min,rnd,black]
-PUSHB_1
- 5
-MDAP[rnd]
-PUSHB_1
- 6
-MDRP[min,rnd,black]
-SVTCA[x-axis]
-PUSHB_1
- 8
-MDAP[rnd]
-PUSHB_1
- 3
-MDRP[rp0,rnd,white]
-PUSHB_1
- 0
-MDRP[min,rnd,black]
-PUSHB_3
- 3
- 0
- 10
-CALL
-PUSHB_4
- 64
- 3
- 1
- 9
-CALL
-PUSHB_1
- 5
-SHP[rp2]
-PUSHB_2
- 9
- 1
-CALL
-SVTCA[y-axis]
-IUP[y]
-IUP[x]
-EndTTInstrs
+HStem: -403 74<74 330> 1552 70<74 330>
+VStem: 330 98<-329 1552>
LayerCount: 2
Fore
SplineSet
428 -403 m 1,0,-1
74 -403 l 1,1,-1
- 74 -360 l 1,2,-1
- 330 -360 l 1,3,-1
- 330 1581 l 1,4,-1
- 74 1581 l 1,5,-1
+ 74 -329 l 5,2,-1
+ 330 -329 l 5,3,-1
+ 330 1552 l 1,4,-1
+ 74 1552 l 1,5,-1
74 1622 l 1,6,-1
428 1622 l 1,7,-1
428 -403 l 1,0,-1
@@ -68393,7 +66870,7 @@ Validated: 1
EndChar
StartChar: uniE23D
-Encoding: 57917 57917 597
+Encoding: 597 57917 597
Width: 782
GlyphClass: 2
Flags: W
@@ -68522,7 +66999,7 @@ Validated: 1
EndChar
StartChar: uniE23E
-Encoding: 57918 57918 598
+Encoding: 598 57918 598
Width: 782
GlyphClass: 2
Flags: W
@@ -68649,7 +67126,7 @@ Validated: 1
EndChar
StartChar: uniE240
-Encoding: 57920 57920 599
+Encoding: 599 57920 599
Width: 606
GlyphClass: 2
Flags: W
@@ -68728,7 +67205,7 @@ Validated: 1
EndChar
StartChar: uniE241
-Encoding: 57921 57921 600
+Encoding: 600 57921 600
Width: 1589
GlyphClass: 2
Flags: W
@@ -68863,7 +67340,7 @@ Validated: 1
EndChar
StartChar: uniE242
-Encoding: 57922 57922 601
+Encoding: 601 57922 601
Width: 1179
GlyphClass: 2
Flags: W
@@ -68895,7 +67372,7 @@ Validated: 1
EndChar
StartChar: uniE243
-Encoding: 57923 57923 602
+Encoding: 602 57923 602
Width: 1421
GlyphClass: 2
Flags: W
@@ -68939,7 +67416,7 @@ Validated: 1
EndChar
StartChar: uniE244
-Encoding: 57924 57924 603
+Encoding: 603 57924 603
Width: 1282
GlyphClass: 2
Flags: W
@@ -68996,7 +67473,7 @@ Validated: 1
EndChar
StartChar: uniE245
-Encoding: 57925 57925 604
+Encoding: 604 57925 604
Width: 1826
GlyphClass: 2
Flags: W
@@ -69145,7 +67622,7 @@ Validated: 1
EndChar
StartChar: uniE246
-Encoding: 57926 57926 605
+Encoding: 605 57926 605
Width: 1826
GlyphClass: 2
Flags: W
@@ -69315,7 +67792,7 @@ Validated: 1
EndChar
StartChar: uniE247
-Encoding: 57927 57927 606
+Encoding: 606 57927 606
Width: 1826
GlyphClass: 2
Flags: W
@@ -69518,7 +67995,7 @@ Validated: 1
EndChar
StartChar: uniE248
-Encoding: 57928 57928 607
+Encoding: 607 57928 607
Width: 1826
GlyphClass: 2
Flags: W
@@ -69717,7 +68194,7 @@ Validated: 1
EndChar
StartChar: uniE249
-Encoding: 57929 57929 608
+Encoding: 608 57929 608
Width: 1826
GlyphClass: 2
Flags: W
@@ -69910,7 +68387,7 @@ Validated: 1
EndChar
StartChar: uniE24A
-Encoding: 57930 57930 609
+Encoding: 609 57930 609
Width: 1826
GlyphClass: 2
Flags: W
@@ -70099,7 +68576,7 @@ Validated: 1
EndChar
StartChar: uniE24B
-Encoding: 57931 57931 610
+Encoding: 610 57931 610
Width: 1826
GlyphClass: 2
Flags: W
@@ -70240,7 +68717,7 @@ Validated: 1
EndChar
StartChar: uniE24C
-Encoding: 57932 57932 611
+Encoding: 611 57932 611
Width: 1826
GlyphClass: 2
Flags: W
@@ -70436,7 +68913,7 @@ Validated: 1
EndChar
StartChar: uniE24D
-Encoding: 57933 57933 612
+Encoding: 612 57933 612
Width: 1826
GlyphClass: 2
Flags: W
@@ -70629,7 +69106,7 @@ Validated: 33
EndChar
StartChar: uniE24E
-Encoding: 57934 57934 613
+Encoding: 613 57934 613
Width: 1826
GlyphClass: 2
Flags: W
@@ -70842,7 +69319,7 @@ Validated: 1
EndChar
StartChar: uniE24F
-Encoding: 57935 57935 614
+Encoding: 614 57935 614
Width: 1826
GlyphClass: 2
Flags: W
@@ -70916,7 +69393,7 @@ Validated: 1
EndChar
StartChar: uniE250
-Encoding: 57936 57936 615
+Encoding: 615 57936 615
Width: 1826
GlyphClass: 2
Flags: W
@@ -71023,7 +69500,7 @@ Validated: 1
EndChar
StartChar: uniE251
-Encoding: 57937 57937 616
+Encoding: 616 57937 616
Width: 1826
GlyphClass: 2
Flags: W
@@ -71161,7 +69638,7 @@ Validated: 1
EndChar
StartChar: uniE252
-Encoding: 57938 57938 617
+Encoding: 617 57938 617
Width: 1826
GlyphClass: 2
Flags: W
@@ -71270,7 +69747,7 @@ Validated: 1
EndChar
StartChar: uniE253
-Encoding: 57939 57939 618
+Encoding: 618 57939 618
Width: 1826
GlyphClass: 2
Flags: W
@@ -71430,7 +69907,7 @@ Validated: 1
EndChar
StartChar: uniE254
-Encoding: 57940 57940 619
+Encoding: 619 57940 619
Width: 1826
GlyphClass: 2
Flags: W
@@ -71598,7 +70075,7 @@ Validated: 1
EndChar
StartChar: uniE255
-Encoding: 57941 57941 620
+Encoding: 620 57941 620
Width: 1826
GlyphClass: 2
Flags: W
@@ -71667,7 +70144,7 @@ Validated: 1
EndChar
StartChar: uniE256
-Encoding: 57942 57942 621
+Encoding: 621 57942 621
Width: 1826
GlyphClass: 2
Flags: W
@@ -71841,7 +70318,7 @@ Validated: 1
EndChar
StartChar: uniE257
-Encoding: 57943 57943 622
+Encoding: 622 57943 622
Width: 1826
GlyphClass: 2
Flags: W
@@ -72009,7 +70486,7 @@ Validated: 1
EndChar
StartChar: uniE258
-Encoding: 57944 57944 623
+Encoding: 623 57944 623
Width: 1826
GlyphClass: 2
Flags: W
@@ -72145,7 +70622,7 @@ Validated: 1
EndChar
StartChar: uniE259
-Encoding: 57945 57945 624
+Encoding: 624 57945 624
Width: 1617
GlyphClass: 2
Flags: W
@@ -72198,7 +70675,7 @@ Validated: 1
EndChar
StartChar: uniE25A
-Encoding: 57946 57946 625
+Encoding: 625 57946 625
Width: 1662
GlyphClass: 2
Flags: W
@@ -72253,7 +70730,7 @@ Validated: 9
EndChar
StartChar: uniE25B
-Encoding: 57947 57947 626
+Encoding: 626 57947 626
Width: 1662
GlyphClass: 2
Flags: W
@@ -72308,7 +70785,7 @@ Validated: 9
EndChar
StartChar: uniE25C
-Encoding: 57948 57948 627
+Encoding: 627 57948 627
Width: 2048
GlyphClass: 2
Flags: W
@@ -72316,7 +70793,7 @@ LayerCount: 2
EndChar
StartChar: uniE25D
-Encoding: 57949 57949 628
+Encoding: 628 57949 628
Width: 1531
GlyphClass: 2
Flags: W
@@ -72338,7 +70815,7 @@ Validated: 1
EndChar
StartChar: uniE25E
-Encoding: 57950 57950 629
+Encoding: 629 57950 629
Width: 1531
GlyphClass: 2
Flags: W
@@ -72360,7 +70837,7 @@ Validated: 1
EndChar
StartChar: uniE25F
-Encoding: 57951 57951 630
+Encoding: 630 57951 630
Width: 1630
GlyphClass: 2
Flags: W
@@ -72381,7 +70858,7 @@ Validated: 1
EndChar
StartChar: uniE260
-Encoding: 57952 57952 631
+Encoding: 631 57952 631
Width: 1826
GlyphClass: 2
Flags: W
@@ -72459,7 +70936,7 @@ Validated: 1
EndChar
StartChar: uniE261
-Encoding: 57953 57953 632
+Encoding: 632 57953 632
Width: 1980
GlyphClass: 2
Flags: W
@@ -72547,7 +71024,7 @@ Validated: 1
EndChar
StartChar: uniE30D
-Encoding: 58125 58125 633
+Encoding: 633 58125 633
Width: 1960
GlyphClass: 2
Flags: W
@@ -72615,7 +71092,7 @@ Validated: 5
EndChar
StartChar: uniE30E
-Encoding: 58126 58126 634
+Encoding: 634 58126 634
Width: 2227
GlyphClass: 2
Flags: W
@@ -72647,7 +71124,7 @@ Validated: 1
EndChar
StartChar: uniE30F
-Encoding: 58127 58127 635
+Encoding: 635 58127 635
Width: 2048
GlyphClass: 2
Flags: W
@@ -72688,7 +71165,7 @@ Validated: 1
EndChar
StartChar: uniE310
-Encoding: 58128 58128 636
+Encoding: 636 58128 636
Width: 2048
GlyphClass: 2
Flags: W
@@ -72754,7 +71231,7 @@ Validated: 1
EndChar
StartChar: uniE311
-Encoding: 58129 58129 637
+Encoding: 637 58129 637
Width: 2048
GlyphClass: 2
Flags: W
@@ -72869,7 +71346,7 @@ Validated: 1
EndChar
StartChar: uniE312
-Encoding: 58130 58130 638
+Encoding: 638 58130 638
Width: 1624
GlyphClass: 2
Flags: W
@@ -72914,7 +71391,7 @@ Validated: 1
EndChar
StartChar: uniE313
-Encoding: 58131 58131 639
+Encoding: 639 58131 639
Width: 1624
GlyphClass: 2
Flags: W
@@ -72930,7 +71407,7 @@ Validated: 9
EndChar
StartChar: uniE314
-Encoding: 58132 58132 640
+Encoding: 640 58132 640
Width: 1683
GlyphClass: 2
Flags: W
@@ -72967,7 +71444,7 @@ Validated: 1
EndChar
StartChar: uniE315
-Encoding: 58133 58133 641
+Encoding: 641 58133 641
Width: 1676
GlyphClass: 2
Flags: W
@@ -73004,7 +71481,7 @@ Validated: 1
EndChar
StartChar: uniE316
-Encoding: 58134 58134 642
+Encoding: 642 58134 642
Width: 1623
GlyphClass: 2
Flags: W
@@ -73024,7 +71501,7 @@ Validated: 1
EndChar
StartChar: uniE317
-Encoding: 58135 58135 643
+Encoding: 643 58135 643
Width: 1627
GlyphClass: 2
Flags: W
@@ -73044,7 +71521,7 @@ Validated: 1
EndChar
StartChar: uniE318
-Encoding: 58136 58136 644
+Encoding: 644 58136 644
Width: 1629
GlyphClass: 2
Flags: W
@@ -73090,7 +71567,7 @@ Validated: 1
EndChar
StartChar: uniE319
-Encoding: 58137 58137 645
+Encoding: 645 58137 645
Width: 1627
GlyphClass: 2
Flags: W
@@ -73136,7 +71613,7 @@ Validated: 1
EndChar
StartChar: uniE31A
-Encoding: 58138 58138 646
+Encoding: 646 58138 646
Width: 1624
GlyphClass: 2
Flags: W
@@ -73189,7 +71666,7 @@ Validated: 1
EndChar
StartChar: uniE31B
-Encoding: 58139 58139 647
+Encoding: 647 58139 647
Width: 1624
GlyphClass: 2
Flags: W
@@ -73240,7 +71717,7 @@ Validated: 1
EndChar
StartChar: uniE31C
-Encoding: 58140 58140 648
+Encoding: 648 58140 648
Width: 1626
GlyphClass: 2
Flags: W
@@ -73291,7 +71768,7 @@ Validated: 1
EndChar
StartChar: uniE330
-Encoding: 58160 58160 649
+Encoding: 649 58160 649
Width: 1613
GlyphClass: 2
Flags: W
@@ -73312,7 +71789,7 @@ Validated: 1
EndChar
StartChar: uniE346
-Encoding: 58182 58182 650
+Encoding: 650 58182 650
Width: 2040
GlyphClass: 2
Flags: W
@@ -73363,7 +71840,7 @@ Validated: 1
EndChar
StartChar: uniE34D
-Encoding: 58189 58189 651
+Encoding: 651 58189 651
Width: 1962
GlyphClass: 2
Flags: W
@@ -73414,7 +71891,7 @@ Validated: 1
EndChar
StartChar: uniE38D
-Encoding: 58253 58253 652
+Encoding: 652 58253 652
Width: 2048
GlyphClass: 2
Flags: W
@@ -73529,7 +72006,7 @@ Validated: 1
EndChar
StartChar: uniE39D
-Encoding: 58269 58269 653
+Encoding: 653 58269 653
Width: 1877
GlyphClass: 2
Flags: W
@@ -73850,7 +72327,7 @@ Validated: 1
EndChar
StartChar: uniE3A3
-Encoding: 58275 58275 654
+Encoding: 654 58275 654
Width: 1340
GlyphClass: 2
Flags: W
@@ -73873,7 +72350,7 @@ Validated: 1
EndChar
StartChar: uniE3A9
-Encoding: 58281 58281 655
+Encoding: 655 58281 655
Width: 1378
GlyphClass: 2
Flags: W
@@ -74139,7 +72616,7 @@ Validated: 1
EndChar
StartChar: uniE3AA
-Encoding: 58282 58282 656
+Encoding: 656 58282 656
Width: 2244
GlyphClass: 2
Flags: W
@@ -74174,7 +72651,7 @@ Validated: 1
EndChar
StartChar: uniE3AB
-Encoding: 58283 58283 657
+Encoding: 657 58283 657
Width: 1662
GlyphClass: 2
Flags: W
@@ -74367,7 +72844,7 @@ Validated: 1
EndChar
StartChar: uniE3D0
-Encoding: 58320 58320 658
+Encoding: 658 58320 658
Width: 1802
GlyphClass: 2
Flags: W
@@ -74460,7 +72937,7 @@ Validated: 37
EndChar
StartChar: uniE400
-Encoding: 58368 58368 659
+Encoding: 659 58368 659
Width: 2108
GlyphClass: 2
Flags: W
@@ -74492,7 +72969,7 @@ Validated: 9
EndChar
StartChar: uniE401
-Encoding: 58369 58369 660
+Encoding: 660 58369 660
Width: 1968
GlyphClass: 2
Flags: W
@@ -74666,7 +73143,7 @@ Validated: 9
EndChar
StartChar: uniE407
-Encoding: 58375 58375 661
+Encoding: 661 58375 661
Width: 2154
GlyphClass: 2
Flags: W
@@ -75242,7 +73719,7 @@ Validated: 5
EndChar
StartChar: uniE409
-Encoding: 58377 58377 662
+Encoding: 662 58377 662
Width: 1978
GlyphClass: 2
Flags: W
@@ -75352,7 +73829,7 @@ Validated: 1
EndChar
StartChar: uniE40A
-Encoding: 58378 58378 663
+Encoding: 663 58378 663
Width: 2002
GlyphClass: 2
Flags: W
@@ -75551,7 +74028,7 @@ Validated: 1
EndChar
StartChar: uniE41B
-Encoding: 58395 58395 664
+Encoding: 664 58395 664
Width: 1662
GlyphClass: 2
Flags: W
@@ -75744,7 +74221,7 @@ Validated: 1
EndChar
StartChar: uniE41C
-Encoding: 58396 58396 665
+Encoding: 665 58396 665
Width: 1662
GlyphClass: 2
Flags: W
@@ -75937,7 +74414,7 @@ Validated: 1
EndChar
StartChar: uniE41D
-Encoding: 58397 58397 666
+Encoding: 666 58397 666
Width: 1904
GlyphClass: 2
Flags: W
@@ -76339,7 +74816,7 @@ Validated: 1
EndChar
StartChar: uniE41E
-Encoding: 58398 58398 667
+Encoding: 667 58398 667
Width: 1904
GlyphClass: 2
Flags: W
@@ -76690,7 +75167,7 @@ Validated: 9
EndChar
StartChar: uniE425
-Encoding: 58405 58405 668
+Encoding: 668 58405 668
Width: 1728
GlyphClass: 2
Flags: W
@@ -76896,7 +75373,7 @@ Validated: 1
EndChar
StartChar: uniE426
-Encoding: 58406 58406 669
+Encoding: 669 58406 669
Width: 1728
GlyphClass: 2
Flags: W
@@ -77074,7 +75551,7 @@ Validated: 1
EndChar
StartChar: uniE427
-Encoding: 58407 58407 670
+Encoding: 670 58407 670
Width: 1728
GlyphClass: 2
Flags: W
@@ -77281,7 +75758,7 @@ Validated: 1
EndChar
StartChar: uniE429
-Encoding: 58409 58409 671
+Encoding: 671 58409 671
Width: 1328
GlyphClass: 2
Flags: W
@@ -77483,7 +75960,7 @@ Validated: 33
EndChar
StartChar: uniE42C
-Encoding: 58412 58412 672
+Encoding: 672 58412 672
Width: 1619
GlyphClass: 2
Flags: W
@@ -77574,7 +76051,7 @@ Validated: 1
EndChar
StartChar: uniE42E
-Encoding: 58414 58414 673
+Encoding: 673 58414 673
Width: 1674
GlyphClass: 2
Flags: W
@@ -77843,7 +76320,7 @@ Validated: 1
EndChar
StartChar: uniE42F
-Encoding: 58415 58415 674
+Encoding: 674 58415 674
Width: 1502
GlyphClass: 2
Flags: W
@@ -77983,7 +76460,7 @@ Validated: 1
EndChar
StartChar: uniE430
-Encoding: 58416 58416 675
+Encoding: 675 58416 675
Width: 1458
GlyphClass: 2
Flags: W
@@ -78206,7 +76683,7 @@ Validated: 1
EndChar
StartChar: uniE432
-Encoding: 58418 58418 676
+Encoding: 676 58418 676
Width: 1436
GlyphClass: 2
Flags: W
@@ -78429,7 +76906,7 @@ Validated: 1
EndChar
StartChar: uniE433
-Encoding: 58419 58419 677
+Encoding: 677 58419 677
Width: 1646
GlyphClass: 2
Flags: W
@@ -78547,7 +77024,7 @@ Validated: 1
EndChar
StartChar: uniE434
-Encoding: 58420 58420 678
+Encoding: 678 58420 678
Width: 1836
GlyphClass: 2
Flags: W
@@ -78740,7 +77217,7 @@ Validated: 1
EndChar
StartChar: uniE437
-Encoding: 58423 58423 679
+Encoding: 679 58423 679
Width: 2048
GlyphClass: 2
Flags: W
@@ -78795,7 +77272,7 @@ Validated: 1
EndChar
StartChar: uniE438
-Encoding: 58424 58424 680
+Encoding: 680 58424 680
Width: 1950
GlyphClass: 2
Flags: W
@@ -78891,7 +77368,7 @@ Validated: 1
EndChar
StartChar: uniE439
-Encoding: 58425 58425 681
+Encoding: 681 58425 681
Width: 1562
GlyphClass: 2
Flags: W
@@ -78942,7 +77419,7 @@ Validated: 1
EndChar
StartChar: uniE43A
-Encoding: 58426 58426 682
+Encoding: 682 58426 682
Width: 1850
GlyphClass: 2
Flags: W
@@ -79010,7 +77487,7 @@ Validated: 1
EndChar
StartChar: uniE43B
-Encoding: 58427 58427 683
+Encoding: 683 58427 683
Width: 1902
GlyphClass: 2
Flags: W
@@ -79078,7 +77555,7 @@ Validated: 1
EndChar
StartChar: uniE43C
-Encoding: 58428 58428 684
+Encoding: 684 58428 684
Width: 1844
GlyphClass: 2
Flags: W
@@ -79176,7 +77653,7 @@ Validated: 1
EndChar
StartChar: uniE43D
-Encoding: 58429 58429 685
+Encoding: 685 58429 685
Width: 1800
GlyphClass: 2
Flags: W
@@ -79272,7 +77749,7 @@ Validated: 1
EndChar
StartChar: uniE43E
-Encoding: 58430 58430 686
+Encoding: 686 58430 686
Width: 1006
GlyphClass: 2
Flags: W
@@ -79310,7 +77787,7 @@ Validated: 1
EndChar
StartChar: uniE43F
-Encoding: 58431 58431 687
+Encoding: 687 58431 687
Width: 2048
GlyphClass: 2
Flags: W
@@ -79327,7 +77804,7 @@ Validated: 1
EndChar
StartChar: uniE440
-Encoding: 58432 58432 688
+Encoding: 688 58432 688
Width: 2048
GlyphClass: 2
Flags: W
@@ -79344,7 +77821,7 @@ Validated: 1
EndChar
StartChar: uniE441
-Encoding: 58433 58433 689
+Encoding: 689 58433 689
Width: 1874
GlyphClass: 2
Flags: W
@@ -79391,7 +77868,7 @@ Validated: 1
EndChar
StartChar: uniE442
-Encoding: 58434 58434 690
+Encoding: 690 58434 690
Width: 1246
GlyphClass: 2
Flags: W
@@ -79408,7 +77885,7 @@ Validated: 1
EndChar
StartChar: uniE443
-Encoding: 58435 58435 691
+Encoding: 691 58435 691
Width: 1240
GlyphClass: 2
Flags: W
@@ -79560,7 +78037,7 @@ Validated: 1
EndChar
StartChar: uniE444
-Encoding: 58436 58436 692
+Encoding: 692 58436 692
Width: 1910
GlyphClass: 2
Flags: W
@@ -79731,7 +78208,7 @@ Validated: 1
EndChar
StartChar: uniE445
-Encoding: 58437 58437 693
+Encoding: 693 58437 693
Width: 1848
GlyphClass: 2
Flags: W
@@ -80221,7 +78698,7 @@ Validated: 33
EndChar
StartChar: uniE446
-Encoding: 58438 58438 694
+Encoding: 694 58438 694
Width: 1112
GlyphClass: 2
Flags: W
@@ -80355,7 +78832,7 @@ Validated: 5
EndChar
StartChar: uniE447
-Encoding: 58439 58439 695
+Encoding: 695 58439 695
Width: 1042
GlyphClass: 2
Flags: W
@@ -80504,7 +78981,7 @@ Validated: 5
EndChar
StartChar: uniE448
-Encoding: 58440 58440 696
+Encoding: 696 58440 696
Width: 1826
GlyphClass: 2
Flags: W
@@ -80660,7 +79137,7 @@ Validated: 1
EndChar
StartChar: uniE449
-Encoding: 58441 58441 697
+Encoding: 697 58441 697
Width: 1826
GlyphClass: 2
Flags: W
@@ -80809,7 +79286,7 @@ Validated: 1
EndChar
StartChar: uniE44A
-Encoding: 58442 58442 698
+Encoding: 698 58442 698
Width: 1812
GlyphClass: 2
Flags: W
@@ -80975,7 +79452,7 @@ Validated: 1
EndChar
StartChar: uniE44B
-Encoding: 58443 58443 699
+Encoding: 699 58443 699
Width: 1866
GlyphClass: 2
Flags: W
@@ -81174,7 +79651,7 @@ Validated: 1
EndChar
StartChar: uniE44C
-Encoding: 58444 58444 700
+Encoding: 700 58444 700
Width: 1850
GlyphClass: 2
Flags: W
@@ -81373,7 +79850,7 @@ Validated: 1
EndChar
StartChar: uniE44D
-Encoding: 58445 58445 701
+Encoding: 701 58445 701
Width: 1806
GlyphClass: 2
Flags: W
@@ -81566,7 +80043,7 @@ Validated: 1
EndChar
StartChar: uniE44E
-Encoding: 58446 58446 702
+Encoding: 702 58446 702
Width: 1840
GlyphClass: 2
Flags: W
@@ -81763,7 +80240,7 @@ Validated: 1
EndChar
StartChar: uniE44F
-Encoding: 58447 58447 703
+Encoding: 703 58447 703
Width: 1802
GlyphClass: 2
Flags: W
@@ -81904,7 +80381,7 @@ Validated: 1
EndChar
StartChar: uniE450
-Encoding: 58448 58448 704
+Encoding: 704 58448 704
Width: 1786
GlyphClass: 2
Flags: W
@@ -82101,7 +80578,7 @@ Validated: 1
EndChar
StartChar: uniE451
-Encoding: 58449 58449 705
+Encoding: 705 58449 705
Width: 1792
GlyphClass: 2
Flags: W
@@ -82298,7 +80775,7 @@ Validated: 1
EndChar
StartChar: uniE452
-Encoding: 58450 58450 706
+Encoding: 706 58450 706
Width: 1816
GlyphClass: 2
Flags: W
@@ -82515,7 +80992,7 @@ Validated: 1
EndChar
StartChar: uniE453
-Encoding: 58451 58451 707
+Encoding: 707 58451 707
Width: 1822
GlyphClass: 2
Flags: W
@@ -82638,7 +81115,7 @@ Validated: 1
EndChar
StartChar: uniE454
-Encoding: 58452 58452 708
+Encoding: 708 58452 708
Width: 1860
GlyphClass: 2
Flags: W
@@ -82712,7 +81189,7 @@ Validated: 1
EndChar
StartChar: uniE455
-Encoding: 58453 58453 709
+Encoding: 709 58453 709
Width: 1840
GlyphClass: 2
Flags: W
@@ -82821,7 +81298,7 @@ Validated: 1
EndChar
StartChar: uniE456
-Encoding: 58454 58454 710
+Encoding: 710 58454 710
Width: 1860
GlyphClass: 2
Flags: W
@@ -82962,7 +81439,7 @@ Validated: 1
EndChar
StartChar: uniE457
-Encoding: 58455 58455 711
+Encoding: 711 58455 711
Width: 1836
GlyphClass: 2
Flags: W
@@ -83071,7 +81548,7 @@ Validated: 1
EndChar
StartChar: uniE458
-Encoding: 58456 58456 712
+Encoding: 712 58456 712
Width: 1836
GlyphClass: 2
Flags: W
@@ -83230,7 +81707,7 @@ Validated: 1
EndChar
StartChar: uniE459
-Encoding: 58457 58457 713
+Encoding: 713 58457 713
Width: 1860
GlyphClass: 2
Flags: W
@@ -83402,7 +81879,7 @@ Validated: 1
EndChar
StartChar: uniE45A
-Encoding: 58458 58458 714
+Encoding: 714 58458 714
Width: 1846
GlyphClass: 2
Flags: W
@@ -83473,7 +81950,7 @@ Validated: 1
EndChar
StartChar: uniE45B
-Encoding: 58459 58459 715
+Encoding: 715 58459 715
Width: 1926
GlyphClass: 2
Flags: W
@@ -83643,7 +82120,7 @@ Validated: 1
EndChar
StartChar: uniE45C
-Encoding: 58460 58460 716
+Encoding: 716 58460 716
Width: 1812
GlyphClass: 2
Flags: W
@@ -83812,7 +82289,7 @@ Validated: 1
EndChar
StartChar: uniE45D
-Encoding: 58461 58461 717
+Encoding: 717 58461 717
Width: 1826
GlyphClass: 2
Flags: W
@@ -83948,7 +82425,7 @@ Validated: 1
EndChar
StartChar: uniE45E
-Encoding: 58462 58462 718
+Encoding: 718 58462 718
Width: 1114
GlyphClass: 2
Flags: W
@@ -84072,7 +82549,7 @@ Validated: 1
EndChar
StartChar: uniE466
-Encoding: 58470 58470 719
+Encoding: 719 58470 719
Width: 535
GlyphClass: 2
Flags: W
@@ -84127,7 +82604,7 @@ Validated: 1
EndChar
StartChar: uniE467
-Encoding: 58471 58471 720
+Encoding: 720 58471 720
Width: 729
GlyphClass: 2
Flags: W
@@ -84182,7 +82659,7 @@ Validated: 1
EndChar
StartChar: uniE468
-Encoding: 58472 58472 721
+Encoding: 721 58472 721
Width: 708
GlyphClass: 2
Flags: W
@@ -84233,7 +82710,7 @@ Validated: 1
EndChar
StartChar: uniE469
-Encoding: 58473 58473 722
+Encoding: 722 58473 722
Width: 1826
GlyphClass: 2
Flags: W
@@ -84329,7 +82806,7 @@ Validated: 1
EndChar
StartChar: uniE46A
-Encoding: 58474 58474 723
+Encoding: 723 58474 723
Width: 1826
GlyphClass: 2
Flags: W
@@ -84425,7 +82902,7 @@ Validated: 1
EndChar
StartChar: uniE46B
-Encoding: 58475 58475 724
+Encoding: 724 58475 724
Width: 1826
GlyphClass: 2
Flags: W
@@ -84521,7 +82998,7 @@ Validated: 1
EndChar
StartChar: uniE46E
-Encoding: 58478 58478 725
+Encoding: 725 58478 725
Width: 1950
GlyphClass: 2
Flags: W
@@ -84617,7 +83094,7 @@ Validated: 9
EndChar
StartChar: uniE46F
-Encoding: 58479 58479 726
+Encoding: 726 58479 726
Width: 946
GlyphClass: 2
Flags: W
@@ -84668,7 +83145,7 @@ Validated: 1
EndChar
StartChar: uniE470
-Encoding: 58480 58480 727
+Encoding: 727 58480 727
Width: 1824
GlyphClass: 2
Flags: W
@@ -84736,7 +83213,7 @@ Validated: 1
EndChar
StartChar: uniE471
-Encoding: 58481 58481 728
+Encoding: 728 58481 728
Width: 1832
GlyphClass: 2
Flags: W
@@ -84755,7 +83232,7 @@ Validated: 1
EndChar
StartChar: uniE472
-Encoding: 58482 58482 729
+Encoding: 729 58482 729
Width: 2048
GlyphClass: 2
Flags: W
@@ -84776,7 +83253,7 @@ Validated: 1
EndChar
StartChar: uniE473
-Encoding: 58483 58483 730
+Encoding: 730 58483 730
Width: 1846
GlyphClass: 2
Flags: W
@@ -84799,7 +83276,7 @@ Validated: 1
EndChar
StartChar: uniE474
-Encoding: 58484 58484 731
+Encoding: 731 58484 731
Width: 1780
GlyphClass: 2
Flags: W
@@ -84824,7 +83301,7 @@ Validated: 1
EndChar
StartChar: uniE475
-Encoding: 58485 58485 732
+Encoding: 732 58485 732
Width: 1866
GlyphClass: 2
Flags: W
@@ -84868,7 +83345,7 @@ Validated: 1
EndChar
StartChar: uniE476
-Encoding: 58486 58486 733
+Encoding: 733 58486 733
Width: 1840
GlyphClass: 2
Flags: W
@@ -84901,7 +83378,7 @@ Validated: 1
EndChar
StartChar: uniE477
-Encoding: 58487 58487 734
+Encoding: 734 58487 734
Width: 1866
GlyphClass: 2
Flags: W
@@ -84976,7 +83453,7 @@ Validated: 1
EndChar
StartChar: uniE478
-Encoding: 58488 58488 735
+Encoding: 735 58488 735
Width: 1866
GlyphClass: 2
Flags: W
@@ -85220,7 +83697,7 @@ Validated: 1
EndChar
StartChar: uniE479
-Encoding: 58489 58489 736
+Encoding: 736 58489 736
Width: 1886
GlyphClass: 2
Flags: W
@@ -85472,7 +83949,7 @@ Validated: 1
EndChar
StartChar: uniE47A
-Encoding: 58490 58490 737
+Encoding: 737 58490 737
Width: 1840
GlyphClass: 2
Flags: W
@@ -85494,7 +83971,7 @@ Validated: 1
EndChar
StartChar: uniE47B
-Encoding: 58491 58491 738
+Encoding: 738 58491 738
Width: 1840
GlyphClass: 2
Flags: W
@@ -85560,7 +84037,7 @@ Validated: 1
EndChar
StartChar: uniE47C
-Encoding: 58492 58492 739
+Encoding: 739 58492 739
Width: 1952
GlyphClass: 2
Flags: W
@@ -85674,7 +84151,7 @@ Validated: 9
EndChar
StartChar: uniE47D
-Encoding: 58493 58493 740
+Encoding: 740 58493 740
Width: 1874
GlyphClass: 2
Flags: W
@@ -85756,7 +84233,7 @@ Validated: 1
EndChar
StartChar: uniE47E
-Encoding: 58494 58494 741
+Encoding: 741 58494 741
Width: 1848
GlyphClass: 2
Flags: W
@@ -85794,7 +84271,7 @@ Validated: 9
EndChar
StartChar: uniE47F
-Encoding: 58495 58495 742
+Encoding: 742 58495 742
Width: 2048
GlyphClass: 2
Flags: W
@@ -85802,7 +84279,7 @@ LayerCount: 2
EndChar
StartChar: uniE48B
-Encoding: 58507 58507 743
+Encoding: 743 58507 743
Width: 2048
GlyphClass: 2
Flags: W
@@ -85877,7 +84354,7 @@ Validated: 1
EndChar
StartChar: uniE48C
-Encoding: 58508 58508 744
+Encoding: 744 58508 744
Width: 1806
GlyphClass: 2
Flags: W
@@ -85952,7 +84429,7 @@ Validated: 1
EndChar
StartChar: uniE48D
-Encoding: 58509 58509 745
+Encoding: 745 58509 745
Width: 2048
GlyphClass: 2
Flags: W
@@ -86027,7 +84504,7 @@ Validated: 1
EndChar
StartChar: uniE48E
-Encoding: 58510 58510 746
+Encoding: 746 58510 746
Width: 1860
GlyphClass: 2
Flags: W
@@ -86102,7 +84579,7 @@ Validated: 1
EndChar
StartChar: uniE48F
-Encoding: 58511 58511 747
+Encoding: 747 58511 747
Width: 1860
GlyphClass: 2
Flags: W
@@ -86173,7 +84650,7 @@ Validated: 1
EndChar
StartChar: uniE490
-Encoding: 58512 58512 748
+Encoding: 748 58512 748
Width: 1860
GlyphClass: 2
Flags: W
@@ -86230,7 +84707,7 @@ Validated: 9
EndChar
StartChar: uniE491
-Encoding: 58513 58513 749
+Encoding: 749 58513 749
Width: 1860
GlyphClass: 2
Flags: W
@@ -86287,7 +84764,7 @@ Validated: 9
EndChar
StartChar: uniE492
-Encoding: 58514 58514 750
+Encoding: 750 58514 750
Width: 1860
GlyphClass: 2
Flags: W
@@ -86358,7 +84835,7 @@ Validated: 1
EndChar
StartChar: uniE495
-Encoding: 58517 58517 751
+Encoding: 751 58517 751
Width: 1652
GlyphClass: 2
Flags: W
@@ -86508,7 +84985,7 @@ Validated: 1
EndChar
StartChar: uniE496
-Encoding: 58518 58518 752
+Encoding: 752 58518 752
Width: 1652
GlyphClass: 2
Flags: W
@@ -86647,7 +85124,7 @@ Validated: 9
EndChar
StartChar: uniE497
-Encoding: 58519 58519 753
+Encoding: 753 58519 753
Width: 1652
GlyphClass: 2
Flags: W
@@ -86789,7 +85266,7 @@ Validated: 9
EndChar
StartChar: uniE498
-Encoding: 58520 58520 754
+Encoding: 754 58520 754
Width: 1652
GlyphClass: 2
Flags: W
@@ -86922,7 +85399,7 @@ Validated: 1
EndChar
StartChar: uniE499
-Encoding: 58521 58521 755
+Encoding: 755 58521 755
Width: 1652
GlyphClass: 2
Flags: W
@@ -87061,7 +85538,7 @@ Validated: 9
EndChar
StartChar: uniE49A
-Encoding: 58522 58522 756
+Encoding: 756 58522 756
Width: 1652
GlyphClass: 2
Flags: W
@@ -87211,7 +85688,7 @@ Validated: 1
EndChar
StartChar: uniE49B
-Encoding: 58523 58523 757
+Encoding: 757 58523 757
Width: 1652
GlyphClass: 2
Flags: W
@@ -87344,7 +85821,7 @@ Validated: 1
EndChar
StartChar: uniE49C
-Encoding: 58524 58524 758
+Encoding: 758 58524 758
Width: 1652
GlyphClass: 2
Flags: W
@@ -87486,7 +85963,7 @@ Validated: 9
EndChar
StartChar: uniE49D
-Encoding: 58525 58525 759
+Encoding: 759 58525 759
Width: 1654
GlyphClass: 2
Flags: W
@@ -87522,7 +85999,7 @@ Validated: 9
EndChar
StartChar: uniE49E
-Encoding: 58526 58526 760
+Encoding: 760 58526 760
Width: 1632
GlyphClass: 2
Flags: W
@@ -87543,7 +86020,7 @@ Validated: 1
EndChar
StartChar: uniE49F
-Encoding: 58527 58527 761
+Encoding: 761 58527 761
Width: 1632
GlyphClass: 2
Flags: W
@@ -87564,7 +86041,7 @@ Validated: 1
EndChar
StartChar: uniE4A0
-Encoding: 58528 58528 762
+Encoding: 762 58528 762
Width: 1632
GlyphClass: 2
Flags: W
@@ -87585,7 +86062,7 @@ Validated: 9
EndChar
StartChar: uniE4A1
-Encoding: 58529 58529 763
+Encoding: 763 58529 763
Width: 1814
GlyphClass: 2
Flags: W
@@ -87663,7 +86140,7 @@ Validated: 1
EndChar
StartChar: uniE4A2
-Encoding: 58530 58530 764
+Encoding: 764 58530 764
Width: 1814
GlyphClass: 2
Flags: W
@@ -87741,7 +86218,7 @@ Validated: 1
EndChar
StartChar: uniE4A3
-Encoding: 58531 58531 765
+Encoding: 765 58531 765
Width: 1798
GlyphClass: 2
Flags: W
@@ -87821,7 +86298,7 @@ Validated: 1
EndChar
StartChar: uniE4A4
-Encoding: 58532 58532 766
+Encoding: 766 58532 766
Width: 1798
GlyphClass: 2
Flags: W
@@ -87901,7 +86378,7 @@ Validated: 1
EndChar
StartChar: uniE4A5
-Encoding: 58533 58533 767
+Encoding: 767 58533 767
Width: 2048
GlyphClass: 2
Flags: W
@@ -87952,7 +86429,7 @@ Validated: 1
EndChar
StartChar: uniE4A6
-Encoding: 58534 58534 768
+Encoding: 768 58534 768
Width: 2048
GlyphClass: 2
Flags: W
@@ -87974,7 +86451,7 @@ Validated: 9
EndChar
StartChar: uniE4A7
-Encoding: 58535 58535 769
+Encoding: 769 58535 769
Width: 1836
GlyphClass: 2
Flags: W
@@ -88025,7 +86502,7 @@ Validated: 1
EndChar
StartChar: uniE4A8
-Encoding: 58536 58536 770
+Encoding: 770 58536 770
Width: 1832
GlyphClass: 2
Flags: W
@@ -88077,7 +86554,7 @@ Validated: 1
EndChar
StartChar: uniE4A9
-Encoding: 58537 58537 771
+Encoding: 771 58537 771
Width: 1590
GlyphClass: 2
Flags: W
@@ -88127,7 +86604,7 @@ Validated: 1
EndChar
StartChar: uniE4AA
-Encoding: 58538 58538 772
+Encoding: 772 58538 772
Width: 1600
GlyphClass: 2
Flags: W
@@ -88149,7 +86626,7 @@ Validated: 9
EndChar
StartChar: uniE4AB
-Encoding: 58539 58539 773
+Encoding: 773 58539 773
Width: 1662
GlyphClass: 2
Flags: W
@@ -88199,7 +86676,7 @@ Validated: 1
EndChar
StartChar: uniE4AC
-Encoding: 58540 58540 774
+Encoding: 774 58540 774
Width: 1526
GlyphClass: 2
Flags: W
@@ -88221,7 +86698,7 @@ Validated: 9
EndChar
StartChar: uniE4AD
-Encoding: 58541 58541 775
+Encoding: 775 58541 775
Width: 2048
GlyphClass: 2
Flags: W
@@ -88272,7 +86749,7 @@ Validated: 1
EndChar
StartChar: uniE4AE
-Encoding: 58542 58542 776
+Encoding: 776 58542 776
Width: 2048
GlyphClass: 2
Flags: W
@@ -88294,7 +86771,7 @@ Validated: 9
EndChar
StartChar: uniE4AF
-Encoding: 58543 58543 777
+Encoding: 777 58543 777
Width: 2048
GlyphClass: 2
Flags: W
@@ -88345,7 +86822,7 @@ Validated: 1
EndChar
StartChar: uniE4B0
-Encoding: 58544 58544 778
+Encoding: 778 58544 778
Width: 2048
GlyphClass: 2
Flags: W
@@ -88397,7 +86874,7 @@ Validated: 1
EndChar
StartChar: uniE4B1
-Encoding: 58545 58545 779
+Encoding: 779 58545 779
Width: 2048
GlyphClass: 2
Flags: W
@@ -88447,7 +86924,7 @@ Validated: 1
EndChar
StartChar: uniE4B2
-Encoding: 58546 58546 780
+Encoding: 780 58546 780
Width: 2048
GlyphClass: 2
Flags: W
@@ -88469,7 +86946,7 @@ Validated: 9
EndChar
StartChar: uniE4B3
-Encoding: 58547 58547 781
+Encoding: 781 58547 781
Width: 2048
GlyphClass: 2
Flags: W
@@ -88519,7 +86996,7 @@ Validated: 1
EndChar
StartChar: uniE4B4
-Encoding: 58548 58548 782
+Encoding: 782 58548 782
Width: 2048
GlyphClass: 2
Flags: W
@@ -88541,7 +87018,7 @@ Validated: 9
EndChar
StartChar: uniE4B5
-Encoding: 58549 58549 783
+Encoding: 783 58549 783
Width: 2048
GlyphClass: 2
Flags: W
@@ -88629,7 +87106,7 @@ Validated: 1
EndChar
StartChar: uniE4B6
-Encoding: 58550 58550 784
+Encoding: 784 58550 784
Width: 2048
GlyphClass: 2
Flags: W
@@ -88657,7 +87134,7 @@ Validated: 9
EndChar
StartChar: uniE4B7
-Encoding: 58551 58551 785
+Encoding: 785 58551 785
Width: 2048
GlyphClass: 2
Flags: W
@@ -88747,7 +87224,7 @@ Validated: 1
EndChar
StartChar: uniE4B8
-Encoding: 58552 58552 786
+Encoding: 786 58552 786
Width: 2048
GlyphClass: 2
Flags: W
@@ -88835,7 +87312,7 @@ Validated: 1
EndChar
StartChar: uniE4B9
-Encoding: 58553 58553 787
+Encoding: 787 58553 787
Width: 2048
GlyphClass: 2
Flags: W
@@ -88938,7 +87415,7 @@ Validated: 1
EndChar
StartChar: uniE4BA
-Encoding: 58554 58554 788
+Encoding: 788 58554 788
Width: 1670
GlyphClass: 2
Flags: W
@@ -89041,7 +87518,7 @@ Validated: 1
EndChar
StartChar: uniE4BB
-Encoding: 58555 58555 789
+Encoding: 789 58555 789
Width: 1670
GlyphClass: 2
Flags: W
@@ -89097,7 +87574,7 @@ Validated: 1
EndChar
StartChar: uniE4BC
-Encoding: 58556 58556 790
+Encoding: 790 58556 790
Width: 1780
GlyphClass: 2
Flags: W
@@ -89125,7 +87602,7 @@ Validated: 9
EndChar
StartChar: uniE4BD
-Encoding: 58557 58557 791
+Encoding: 791 58557 791
Width: 1594
GlyphClass: 2
Flags: W
@@ -89183,7 +87660,7 @@ Validated: 1
EndChar
StartChar: uniE4BE
-Encoding: 58558 58558 792
+Encoding: 792 58558 792
Width: 1726
GlyphClass: 2
Flags: W
@@ -89211,7 +87688,7 @@ Validated: 9
EndChar
StartChar: uniE4BF
-Encoding: 58559 58559 793
+Encoding: 793 58559 793
Width: 976
GlyphClass: 2
Flags: W
@@ -89277,7 +87754,7 @@ Validated: 1
EndChar
StartChar: uniE4C0
-Encoding: 58560 58560 794
+Encoding: 794 58560 794
Width: 792
GlyphClass: 2
Flags: W
@@ -89343,7 +87820,7 @@ Validated: 1
EndChar
StartChar: uniE4C1
-Encoding: 58561 58561 795
+Encoding: 795 58561 795
Width: 1400
GlyphClass: 2
Flags: W
@@ -89386,7 +87863,7 @@ Validated: 1
EndChar
StartChar: uniE4C2
-Encoding: 58562 58562 796
+Encoding: 796 58562 796
Width: 1696
GlyphClass: 2
Flags: W
@@ -89407,7 +87884,7 @@ Validated: 1
EndChar
StartChar: uniE4C3
-Encoding: 58563 58563 797
+Encoding: 797 58563 797
Width: 1884
GlyphClass: 2
Flags: W
@@ -89526,7 +88003,7 @@ Validated: 1
EndChar
StartChar: uniE4C4
-Encoding: 58564 58564 798
+Encoding: 798 58564 798
Width: 1896
GlyphClass: 2
Flags: W
@@ -89619,7 +88096,7 @@ Validated: 1
EndChar
StartChar: uniE503
-Encoding: 58627 58627 799
+Encoding: 799 58627 799
Width: 2108
GlyphClass: 2
Flags: W
@@ -89651,7 +88128,7 @@ Validated: 9
EndChar
StartChar: uniE504
-Encoding: 58628 58628 800
+Encoding: 800 58628 800
Width: 1968
GlyphClass: 2
Flags: W
@@ -89825,7 +88302,7 @@ Validated: 9
EndChar
StartChar: uniE505
-Encoding: 58629 58629 801
+Encoding: 801 58629 801
Width: 1968
GlyphClass: 2
Flags: W
@@ -89999,7 +88476,7 @@ Validated: 9
EndChar
StartChar: uniE507
-Encoding: 58631 58631 802
+Encoding: 802 58631 802
Width: 872
GlyphClass: 2
Flags: W
@@ -90056,7 +88533,7 @@ Validated: 1
EndChar
StartChar: uniE51D
-Encoding: 58653 58653 803
+Encoding: 803 58653 803
Width: 2037
GlyphClass: 2
Flags: W
@@ -90206,7 +88683,7 @@ Validated: 9
EndChar
StartChar: uniE51E
-Encoding: 58654 58654 804
+Encoding: 804 58654 804
Width: 2037
GlyphClass: 2
Flags: W
@@ -90373,7 +88850,7 @@ Validated: 1
EndChar
StartChar: uniE51F
-Encoding: 58655 58655 805
+Encoding: 805 58655 805
Width: 1581
GlyphClass: 2
Flags: W
@@ -90462,7 +88939,7 @@ Validated: 9
EndChar
StartChar: uniE520
-Encoding: 58656 58656 806
+Encoding: 806 58656 806
Width: 1581
GlyphClass: 2
Flags: W
@@ -90551,7 +89028,7 @@ Validated: 1
EndChar
StartChar: uniE521
-Encoding: 58657 58657 807
+Encoding: 807 58657 807
Width: 2037
GlyphClass: 2
Flags: W
@@ -90701,7 +89178,7 @@ Validated: 9
EndChar
StartChar: uniE522
-Encoding: 58658 58658 808
+Encoding: 808 58658 808
Width: 2037
GlyphClass: 2
Flags: W
@@ -90868,7 +89345,7 @@ Validated: 1
EndChar
StartChar: uniE523
-Encoding: 58659 58659 809
+Encoding: 809 58659 809
Width: 1581
GlyphClass: 2
Flags: W
@@ -90957,7 +89434,7 @@ Validated: 9
EndChar
StartChar: uniE524
-Encoding: 58660 58660 810
+Encoding: 810 58660 810
Width: 1581
GlyphClass: 2
Flags: W
@@ -91046,7 +89523,7 @@ Validated: 1
EndChar
StartChar: uniE525
-Encoding: 58661 58661 811
+Encoding: 811 58661 811
Width: 2037
GlyphClass: 2
Flags: W
@@ -91209,7 +89686,7 @@ Validated: 9
EndChar
StartChar: uniE526
-Encoding: 58662 58662 812
+Encoding: 812 58662 812
Width: 2037
GlyphClass: 2
Flags: W
@@ -91363,7 +89840,7 @@ Validated: 9
EndChar
StartChar: uniE527
-Encoding: 58663 58663 813
+Encoding: 813 58663 813
Width: 1581
GlyphClass: 2
Flags: W
@@ -91456,7 +89933,7 @@ Validated: 9
EndChar
StartChar: uniE528
-Encoding: 58664 58664 814
+Encoding: 814 58664 814
Width: 1581
GlyphClass: 2
Flags: W
@@ -91549,7 +90026,7 @@ Validated: 9
EndChar
StartChar: uniE529
-Encoding: 58665 58665 815
+Encoding: 815 58665 815
Width: 2037
GlyphClass: 2
Flags: W
@@ -91715,7 +90192,7 @@ Validated: 1
EndChar
StartChar: uniE52A
-Encoding: 58666 58666 816
+Encoding: 816 58666 816
Width: 2037
GlyphClass: 2
Flags: W
@@ -91895,7 +90372,7 @@ Validated: 1
EndChar
StartChar: uniE52B
-Encoding: 58667 58667 817
+Encoding: 817 58667 817
Width: 1581
GlyphClass: 2
Flags: W
@@ -91988,7 +90465,7 @@ Validated: 1
EndChar
StartChar: uniE52C
-Encoding: 58668 58668 818
+Encoding: 818 58668 818
Width: 1581
GlyphClass: 2
Flags: W
@@ -92081,7 +90558,7 @@ Validated: 1
EndChar
StartChar: uniE52E
-Encoding: 58670 58670 819
+Encoding: 819 58670 819
Width: 983
GlyphClass: 2
Flags: W
@@ -92118,7 +90595,7 @@ Validated: 1
EndChar
StartChar: uniE52F
-Encoding: 58671 58671 820
+Encoding: 820 58671 820
Width: 1613
GlyphClass: 2
Flags: W
@@ -92139,7 +90616,7 @@ Validated: 1
EndChar
StartChar: uniE530
-Encoding: 58672 58672 821
+Encoding: 821 58672 821
Width: 1884
GlyphClass: 2
Flags: W
@@ -92258,7 +90735,7 @@ Validated: 1
EndChar
StartChar: uniE531
-Encoding: 58673 58673 822
+Encoding: 822 58673 822
Width: 1896
GlyphClass: 2
Flags: W
@@ -92351,7 +90828,7 @@ Validated: 1
EndChar
StartChar: uniE532
-Encoding: 58674 58674 823
+Encoding: 823 58674 823
Width: 1884
GlyphClass: 2
Flags: W
@@ -92470,7 +90947,7 @@ Validated: 1
EndChar
StartChar: uniE533
-Encoding: 58675 58675 824
+Encoding: 824 58675 824
Width: 1884
GlyphClass: 2
Flags: W
@@ -92589,7 +91066,7 @@ Validated: 1
EndChar
StartChar: uniE548
-Encoding: 58696 58696 825
+Encoding: 825 58696 825
Width: 1826
GlyphClass: 2
Flags: W
@@ -92738,7 +91215,7 @@ Validated: 1
EndChar
StartChar: uniE549
-Encoding: 58697 58697 826
+Encoding: 826 58697 826
Width: 1812
GlyphClass: 2
Flags: W
@@ -92904,7 +91381,7 @@ Validated: 1
EndChar
StartChar: uniE54A
-Encoding: 58698 58698 827
+Encoding: 827 58698 827
Width: 1866
GlyphClass: 2
Flags: W
@@ -93103,7 +91580,7 @@ Validated: 1
EndChar
StartChar: uniE54B
-Encoding: 58699 58699 828
+Encoding: 828 58699 828
Width: 1850
GlyphClass: 2
Flags: W
@@ -93302,7 +91779,7 @@ Validated: 1
EndChar
StartChar: uniE54C
-Encoding: 58700 58700 829
+Encoding: 829 58700 829
Width: 1806
GlyphClass: 2
Flags: W
@@ -93495,7 +91972,7 @@ Validated: 1
EndChar
StartChar: uniE54D
-Encoding: 58701 58701 830
+Encoding: 830 58701 830
Width: 1840
GlyphClass: 2
Flags: W
@@ -93692,7 +92169,7 @@ Validated: 1
EndChar
StartChar: uniE54E
-Encoding: 58702 58702 831
+Encoding: 831 58702 831
Width: 1802
GlyphClass: 2
Flags: W
@@ -93833,7 +92310,7 @@ Validated: 1
EndChar
StartChar: uniE54F
-Encoding: 58703 58703 832
+Encoding: 832 58703 832
Width: 1786
GlyphClass: 2
Flags: W
@@ -94030,7 +92507,7 @@ Validated: 1
EndChar
StartChar: uniE550
-Encoding: 58704 58704 833
+Encoding: 833 58704 833
Width: 1792
GlyphClass: 2
Flags: W
@@ -94227,7 +92704,7 @@ Validated: 1
EndChar
StartChar: uniE551
-Encoding: 58705 58705 834
+Encoding: 834 58705 834
Width: 1816
GlyphClass: 2
Flags: W
@@ -94444,7 +92921,7 @@ Validated: 1
EndChar
StartChar: uniE552
-Encoding: 58706 58706 835
+Encoding: 835 58706 835
Width: 1822
GlyphClass: 2
Flags: W
@@ -94567,7 +93044,7 @@ Validated: 1
EndChar
StartChar: uniE553
-Encoding: 58707 58707 836
+Encoding: 836 58707 836
Width: 1860
GlyphClass: 2
Flags: W
@@ -94641,7 +93118,7 @@ Validated: 1
EndChar
StartChar: uniE554
-Encoding: 58708 58708 837
+Encoding: 837 58708 837
Width: 1840
GlyphClass: 2
Flags: W
@@ -94750,7 +93227,7 @@ Validated: 1
EndChar
StartChar: uniE555
-Encoding: 58709 58709 838
+Encoding: 838 58709 838
Width: 1860
GlyphClass: 2
Flags: W
@@ -94891,7 +93368,7 @@ Validated: 1
EndChar
StartChar: uniE556
-Encoding: 58710 58710 839
+Encoding: 839 58710 839
Width: 1836
GlyphClass: 2
Flags: W
@@ -95000,7 +93477,7 @@ Validated: 1
EndChar
StartChar: uniE557
-Encoding: 58711 58711 840
+Encoding: 840 58711 840
Width: 1836
GlyphClass: 2
Flags: W
@@ -95159,7 +93636,7 @@ Validated: 1
EndChar
StartChar: uniE558
-Encoding: 58712 58712 841
+Encoding: 841 58712 841
Width: 1860
GlyphClass: 2
Flags: W
@@ -95331,7 +93808,7 @@ Validated: 1
EndChar
StartChar: uniE559
-Encoding: 58713 58713 842
+Encoding: 842 58713 842
Width: 1846
GlyphClass: 2
Flags: W
@@ -95402,7 +93879,7 @@ Validated: 1
EndChar
StartChar: uniE55A
-Encoding: 58714 58714 843
+Encoding: 843 58714 843
Width: 1926
GlyphClass: 2
Flags: W
@@ -95572,7 +94049,7 @@ Validated: 1
EndChar
StartChar: uniE55B
-Encoding: 58715 58715 844
+Encoding: 844 58715 844
Width: 1812
GlyphClass: 2
Flags: W
@@ -95741,7 +94218,7 @@ Validated: 1
EndChar
StartChar: uniE55C
-Encoding: 58716 58716 845
+Encoding: 845 58716 845
Width: 1826
GlyphClass: 2
Flags: W
@@ -95877,7 +94354,7 @@ Validated: 1
EndChar
StartChar: uniE55E
-Encoding: 58718 58718 846
+Encoding: 846 58718 846
Width: 1458
GlyphClass: 2
Flags: W
@@ -95986,7 +94463,7 @@ Validated: 1
EndChar
StartChar: uniE55F
-Encoding: 58719 58719 847
+Encoding: 847 58719 847
Width: 1458
GlyphClass: 2
Flags: W
@@ -96095,7 +94572,7 @@ Validated: 1
EndChar
StartChar: uniE570
-Encoding: 58736 58736 848
+Encoding: 848 58736 848
Width: 2048
GlyphClass: 2
Flags: W
@@ -96150,7 +94627,7 @@ Validated: 1
EndChar
StartChar: uniE571
-Encoding: 58737 58737 849
+Encoding: 849 58737 849
Width: 1962
GlyphClass: 2
Flags: W
@@ -96201,7 +94678,7 @@ Validated: 1
EndChar
StartChar: uniE572
-Encoding: 58738 58738 850
+Encoding: 850 58738 850
Width: 1826
GlyphClass: 2
Flags: W
@@ -96297,7 +94774,7 @@ Validated: 1
EndChar
StartChar: uniE573
-Encoding: 58739 58739 851
+Encoding: 851 58739 851
Width: 1826
GlyphClass: 2
Flags: W
@@ -96393,7 +94870,7 @@ Validated: 1
EndChar
StartChar: uniE574
-Encoding: 58740 58740 852
+Encoding: 852 58740 852
Width: 1826
GlyphClass: 2
Flags: W
@@ -96489,7 +94966,7 @@ Validated: 1
EndChar
StartChar: uniE575
-Encoding: 58741 58741 853
+Encoding: 853 58741 853
Width: 1826
GlyphClass: 2
Flags: W
@@ -96585,7 +95062,7 @@ Validated: 1
EndChar
StartChar: uniE578
-Encoding: 58744 58744 854
+Encoding: 854 58744 854
Width: 708
GlyphClass: 2
Flags: W
@@ -96636,7 +95113,7 @@ Validated: 1
EndChar
StartChar: uniE579
-Encoding: 58745 58745 855
+Encoding: 855 58745 855
Width: 946
GlyphClass: 2
Flags: W
@@ -96687,7 +95164,7 @@ Validated: 1
EndChar
StartChar: uniE57A
-Encoding: 58746 58746 856
+Encoding: 856 58746 856
Width: 1624
GlyphClass: 2
Flags: W
@@ -96738,7 +95215,7 @@ Validated: 1
EndChar
StartChar: uniE57B
-Encoding: 58747 58747 857
+Encoding: 857 58747 857
Width: 2040
GlyphClass: 2
Flags: W
@@ -96789,7 +95266,7 @@ Validated: 1
EndChar
StartChar: uniE57C
-Encoding: 58748 58748 858
+Encoding: 858 58748 858
Width: 1824
GlyphClass: 2
Flags: W
@@ -96857,7 +95334,7 @@ Validated: 1
EndChar
StartChar: uniE584
-Encoding: 58756 58756 859
+Encoding: 859 58756 859
Width: 787
GlyphClass: 2
Flags: W
@@ -96902,7 +95379,7 @@ Validated: 1
EndChar
StartChar: uniE585
-Encoding: 58757 58757 860
+Encoding: 860 58757 860
Width: 1147
GlyphClass: 2
Flags: W
@@ -96919,7 +95396,7 @@ Validated: 1
EndChar
StartChar: uniE586
-Encoding: 58758 58758 861
+Encoding: 861 58758 861
Width: 1344
GlyphClass: 2
Flags: W
@@ -96936,7 +95413,7 @@ Validated: 1
EndChar
StartChar: uniE587
-Encoding: 58759 58759 862
+Encoding: 862 58759 862
Width: 1573
GlyphClass: 2
Flags: W
@@ -96953,7 +95430,7 @@ Validated: 1
EndChar
StartChar: uniE58D
-Encoding: 58765 58765 863
+Encoding: 863 58765 863
Width: 958
GlyphClass: 2
Flags: W
@@ -96998,7 +95475,7 @@ Validated: 1
EndChar
StartChar: uniE58E
-Encoding: 58766 58766 864
+Encoding: 864 58766 864
Width: 1150
GlyphClass: 2
Flags: W
@@ -97043,7 +95520,7 @@ Validated: 1
EndChar
StartChar: uniE58F
-Encoding: 58767 58767 865
+Encoding: 865 58767 865
Width: 1342
GlyphClass: 2
Flags: W
@@ -97081,7 +95558,7 @@ Validated: 1
EndChar
StartChar: uniE590
-Encoding: 58768 58768 866
+Encoding: 866 58768 866
Width: 1855
GlyphClass: 2
Flags: W
@@ -97098,7 +95575,7 @@ Validated: 1
EndChar
StartChar: uniE593
-Encoding: 58771 58771 867
+Encoding: 867 58771 867
Width: 897
GlyphClass: 2
Flags: W
@@ -97138,7 +95615,7 @@ Validated: 9
EndChar
StartChar: uniE594
-Encoding: 58772 58772 868
+Encoding: 868 58772 868
Width: 897
GlyphClass: 2
Flags: W
@@ -97180,7 +95657,7 @@ Validated: 1
EndChar
StartChar: uniE595
-Encoding: 58773 58773 869
+Encoding: 869 58773 869
Width: 897
GlyphClass: 2
Flags: W
@@ -97219,7 +95696,7 @@ Validated: 9
EndChar
StartChar: uniE596
-Encoding: 58774 58774 870
+Encoding: 870 58774 870
Width: 897
GlyphClass: 2
Flags: W
@@ -97261,7 +95738,7 @@ Validated: 1
EndChar
StartChar: uniE597
-Encoding: 58775 58775 871
+Encoding: 871 58775 871
Width: 1624
GlyphClass: 2
Flags: W
@@ -97312,7 +95789,7 @@ Validated: 1
EndChar
StartChar: uniE5A5
-Encoding: 58789 58789 872
+Encoding: 872 58789 872
Width: 1196
GlyphClass: 2
Flags: W
@@ -97410,7 +95887,7 @@ Validated: 1
EndChar
StartChar: uniE680
-Encoding: 59008 59008 873
+Encoding: 873 59008 873
Width: 2048
GlyphClass: 2
Flags: W
@@ -97461,7 +95938,7 @@ Validated: 1
EndChar
StartChar: uniE681
-Encoding: 59009 59009 874
+Encoding: 874 59009 874
Width: 2048
GlyphClass: 2
Flags: W
@@ -97483,7 +95960,7 @@ Validated: 9
EndChar
StartChar: uniE682
-Encoding: 59010 59010 875
+Encoding: 875 59010 875
Width: 2048
GlyphClass: 2
Flags: W
@@ -97534,7 +96011,7 @@ Validated: 1
EndChar
StartChar: uniE683
-Encoding: 59011 59011 876
+Encoding: 876 59011 876
Width: 2048
GlyphClass: 2
Flags: W
@@ -97586,7 +96063,7 @@ Validated: 1
EndChar
StartChar: uniE684
-Encoding: 59012 59012 877
+Encoding: 877 59012 877
Width: 2048
GlyphClass: 2
Flags: W
@@ -97661,7 +96138,7 @@ Validated: 1
EndChar
StartChar: uniE685
-Encoding: 59013 59013 878
+Encoding: 878 59013 878
Width: 1806
GlyphClass: 2
Flags: W
@@ -97736,7 +96213,7 @@ Validated: 1
EndChar
StartChar: uniE686
-Encoding: 59014 59014 879
+Encoding: 879 59014 879
Width: 2048
GlyphClass: 2
Flags: W
@@ -97811,7 +96288,7 @@ Validated: 1
EndChar
StartChar: uniE687
-Encoding: 59015 59015 880
+Encoding: 880 59015 880
Width: 1860
GlyphClass: 2
Flags: W
@@ -97886,7 +96363,7 @@ Validated: 1
EndChar
StartChar: uniE688
-Encoding: 59016 59016 881
+Encoding: 881 59016 881
Width: 1860
GlyphClass: 2
Flags: W
@@ -97957,7 +96434,7 @@ Validated: 1
EndChar
StartChar: uniE689
-Encoding: 59017 59017 882
+Encoding: 882 59017 882
Width: 1860
GlyphClass: 2
Flags: W
@@ -98014,7 +96491,7 @@ Validated: 9
EndChar
StartChar: uniE68A
-Encoding: 59018 59018 883
+Encoding: 883 59018 883
Width: 1860
GlyphClass: 2
Flags: W
@@ -98071,7 +96548,7 @@ Validated: 9
EndChar
StartChar: uniE68B
-Encoding: 59019 59019 884
+Encoding: 884 59019 884
Width: 1860
GlyphClass: 2
Flags: W
@@ -98142,7 +96619,7 @@ Validated: 1
EndChar
StartChar: uniE68C
-Encoding: 59020 59020 885
+Encoding: 885 59020 885
Width: 2048
GlyphClass: 2
Flags: W
@@ -98193,7 +96670,7 @@ Validated: 1
EndChar
StartChar: uniE68D
-Encoding: 59021 59021 886
+Encoding: 886 59021 886
Width: 2048
GlyphClass: 2
Flags: W
@@ -98215,7 +96692,7 @@ Validated: 9
EndChar
StartChar: uniE68E
-Encoding: 59022 59022 887
+Encoding: 887 59022 887
Width: 1836
GlyphClass: 2
Flags: W
@@ -98266,7 +96743,7 @@ Validated: 1
EndChar
StartChar: uniE68F
-Encoding: 59023 59023 888
+Encoding: 888 59023 888
Width: 1832
GlyphClass: 2
Flags: W
@@ -98318,7 +96795,7 @@ Validated: 1
EndChar
StartChar: uniE690
-Encoding: 59024 59024 889
+Encoding: 889 59024 889
Width: 1590
GlyphClass: 2
Flags: W
@@ -98368,7 +96845,7 @@ Validated: 1
EndChar
StartChar: uniE691
-Encoding: 59025 59025 890
+Encoding: 890 59025 890
Width: 1600
GlyphClass: 2
Flags: W
@@ -98390,7 +96867,7 @@ Validated: 9
EndChar
StartChar: uniE692
-Encoding: 59026 59026 891
+Encoding: 891 59026 891
Width: 1662
GlyphClass: 2
Flags: W
@@ -98440,7 +96917,7 @@ Validated: 1
EndChar
StartChar: uniE693
-Encoding: 59027 59027 892
+Encoding: 892 59027 892
Width: 1526
GlyphClass: 2
Flags: W
@@ -98462,7 +96939,7 @@ Validated: 9
EndChar
StartChar: uniE694
-Encoding: 59028 59028 893
+Encoding: 893 59028 893
Width: 2048
GlyphClass: 2
Flags: W
@@ -98513,7 +96990,7 @@ Validated: 1
EndChar
StartChar: uniE695
-Encoding: 59029 59029 894
+Encoding: 894 59029 894
Width: 2048
GlyphClass: 2
Flags: W
@@ -98535,7 +97012,7 @@ Validated: 9
EndChar
StartChar: uniE696
-Encoding: 59030 59030 895
+Encoding: 895 59030 895
Width: 2048
GlyphClass: 2
Flags: W
@@ -98586,7 +97063,7 @@ Validated: 1
EndChar
StartChar: uniE697
-Encoding: 59031 59031 896
+Encoding: 896 59031 896
Width: 2048
GlyphClass: 2
Flags: W
@@ -98638,7 +97115,7 @@ Validated: 1
EndChar
StartChar: uniE698
-Encoding: 59032 59032 897
+Encoding: 897 59032 897
Width: 2048
GlyphClass: 2
Flags: W
@@ -98688,7 +97165,7 @@ Validated: 1
EndChar
StartChar: uniE699
-Encoding: 59033 59033 898
+Encoding: 898 59033 898
Width: 2048
GlyphClass: 2
Flags: W
@@ -98710,7 +97187,7 @@ Validated: 9
EndChar
StartChar: uniE69A
-Encoding: 59034 59034 899
+Encoding: 899 59034 899
Width: 2048
GlyphClass: 2
Flags: W
@@ -98760,7 +97237,7 @@ Validated: 1
EndChar
StartChar: uniE69B
-Encoding: 59035 59035 900
+Encoding: 900 59035 900
Width: 2048
GlyphClass: 2
Flags: W
@@ -98782,7 +97259,7 @@ Validated: 9
EndChar
StartChar: uniE69C
-Encoding: 59036 59036 901
+Encoding: 901 59036 901
Width: 2048
GlyphClass: 2
Flags: W
@@ -98924,7 +97401,7 @@ Validated: 1
EndChar
StartChar: uniE69D
-Encoding: 59037 59037 902
+Encoding: 902 59037 902
Width: 2048
GlyphClass: 2
Flags: W
@@ -99065,7 +97542,7 @@ Validated: 1
EndChar
StartChar: uniE69E
-Encoding: 59038 59038 903
+Encoding: 903 59038 903
Width: 2048
GlyphClass: 2
Flags: W
@@ -99217,7 +97694,7 @@ Validated: 1
EndChar
StartChar: uniE69F
-Encoding: 59039 59039 904
+Encoding: 904 59039 904
Width: 2048
GlyphClass: 2
Flags: W
@@ -99371,7 +97848,7 @@ Validated: 1
EndChar
StartChar: uniE6A0
-Encoding: 59040 59040 905
+Encoding: 905 59040 905
Width: 2048
GlyphClass: 2
Flags: W
@@ -99516,7 +97993,7 @@ Validated: 1
EndChar
StartChar: uniE6A1
-Encoding: 59041 59041 906
+Encoding: 906 59041 906
Width: 2048
GlyphClass: 2
Flags: W
@@ -99662,7 +98139,7 @@ Validated: 1
EndChar
StartChar: uniE6A2
-Encoding: 59042 59042 907
+Encoding: 907 59042 907
Width: 2048
GlyphClass: 2
Flags: W
@@ -99805,7 +98282,7 @@ Validated: 1
EndChar
StartChar: uniE6A3
-Encoding: 59043 59043 908
+Encoding: 908 59043 908
Width: 2048
GlyphClass: 2
Flags: W
@@ -99950,7 +98427,7 @@ Validated: 1
EndChar
StartChar: H18543
-Encoding: 9642 9642 909
+Encoding: 210 9642 909
Width: 1531
Flags: W
HStem: 378.311 658.569<426.225 1107.53>
@@ -100000,7 +98477,7 @@ Validated: 1
EndChar
StartChar: H18551
-Encoding: 9643 9643 910
+Encoding: 211 9643 910
Width: 1826
Flags: W
HStem: 384.82 90.619<660.62 1159.72> 975.46 91.54<660.62 1159.72>
@@ -100065,7 +98542,7 @@ Validated: 1
EndChar
StartChar: openbullet
-Encoding: 9702 9702 911
+Encoding: 235 9702 911
Width: 1628
Flags: W
HStem: 378.8 58.8<675.829 951.921> 1029.8 59.3999<675.724 952.066>
@@ -100162,5 +98639,8442 @@ SplineSet
EndSplineSet
Validated: 1
EndChar
+
+StartChar: Delta
+Encoding: 912 916 912
+Width: 1253
+Flags: W
+HStem: -1 82<180.563 959.422>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 4
+ 0
+ 0
+CALL
+PUSHB_1
+ 1
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 7
+MDAP[rnd]
+PUSHB_2
+ 8
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+571.012 1039.28 m 5,0,-1
+ 180.563 81 l 5,1,-1
+ 959.422 81 l 5,2,-1
+ 571.012 1039.28 l 5,0,-1
+1211.54 -1 m 5,3,-1
+ 50.458 -1 l 5,4,-1
+ 611.352 1365 l 5,5,-1
+ 649.65 1365 l 5,6,-1
+ 1211.54 -1 l 5,3,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Epsilon
+Encoding: 913 917 913
+Width: 1296
+Flags: W
+HStem: 1 74<456.773 1030.53> 1 31.1475<58 162.073> 673 68<450.273 914.222> 1275 68<456.553 999.266> 1313.76 29.2354<58 153.017>
+VStem: 238 201<99.4411 661.13 755.221 1258.57> 972.66 44.3398<476 587.817 819.47 931> 1083.21 43.5186<1056 1142.66> 1194.53 36.5439<302.6 331.139>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 43
+ 0
+ 0
+CALL
+PUSHB_1
+ 44
+MDRP[min,rnd,black]
+PUSHB_3
+ 43
+ 0
+ 0
+CALL
+PUSHB_1
+ 36
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+MDAP[rnd]
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_3
+ 29
+ 18
+ 10
+CALL
+PUSHB_4
+ 64
+ 29
+ 25
+ 9
+CALL
+PUSHB_3
+ 18
+ 29
+ 10
+CALL
+PUSHB_4
+ 64
+ 18
+ 22
+ 9
+CALL
+PUSHB_1
+ 11
+MDAP[rnd]
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_3
+ 11
+ 4
+ 10
+CALL
+PUSHB_4
+ 64
+ 11
+ 7
+ 9
+CALL
+PUSHB_1
+ 4
+SRP0
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 48
+MDAP[rnd]
+PUSHB_1
+ 47
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 33
+MDRP[min,rnd,black]
+PUSHB_1
+ 14
+SHP[rp2]
+PUSHB_3
+ 47
+ 33
+ 10
+CALL
+PUSHB_4
+ 64
+ 47
+ 4
+ 9
+CALL
+PUSHB_1
+ 43
+SHP[rp2]
+PUSHB_1
+ 33
+SRP0
+PUSHB_2
+ 25
+ 1
+CALL
+PUSHB_1
+ 22
+SHP[rp2]
+PUSHB_1
+ 24
+MDRP[min,rnd,black]
+PUSHB_1
+ 24
+SRP0
+PUSHB_2
+ 7
+ 1
+CALL
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_1
+ 6
+SRP0
+PUSHB_2
+ 40
+ 1
+CALL
+PUSHB_1
+ 41
+MDRP[min,rnd,black]
+PUSHB_2
+ 49
+ 1
+CALL
+PUSHB_2
+ 25
+ 33
+SRP1
+SRP2
+PUSHB_1
+ 26
+IP
+PUSHB_2
+ 40
+ 6
+SRP1
+SRP2
+PUSHB_1
+ 42
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 29
+ 36
+SRP1
+SRP2
+PUSHB_2
+ 40
+ 41
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+238 1126 m 2,0,1
+ 238 1237.07 238 1237.07 202.459 1272.61 c 128,-1,2
+ 166.919 1308.15 166.919 1308.15 58 1313.76 c 1,3,-1
+ 58 1343 l 1,4,-1
+ 1111.26 1343 l 1,5,-1
+ 1126.72 1056 l 1,6,-1
+ 1083.21 1056 l 1,7,8
+ 1059.91 1188.2 1059.91 1188.2 1012.43 1231.6 c 128,-1,9
+ 964.94 1275 964.94 1275 835 1275 c 2,10,-1
+ 524 1275 l 2,11,12
+ 473.025 1275 473.025 1275 456.013 1259.08 c 128,-1,13
+ 439 1243.17 439 1243.17 439 1174 c 2,14,-1
+ 439 811 l 2,15,16
+ 439 768.566 439 768.566 447.614 754.783 c 128,-1,17
+ 456.229 741 456.229 741 495 741 c 2,18,-1
+ 741 741 l 2,19,20
+ 882.979 741 882.979 741 924.508 779.966 c 128,-1,21
+ 966.037 818.932 966.037 818.932 972.728 931 c 1,22,-1
+ 1017 931 l 1,23,-1
+ 1017 476 l 1,24,-1
+ 972.66 476 l 1,25,26
+ 964.053 593.038 964.053 593.038 922.534 633.02 c 128,-1,27
+ 881.016 673 881.016 673 741 673 c 2,28,-1
+ 493 673 l 2,29,30
+ 460.854 673 460.854 673 449.927 661.498 c 128,-1,31
+ 439 649.996 439 649.996 439 604 c 2,32,-1
+ 439 201 l 2,33,34
+ 439 122.374 439 122.374 456.227 98.6875 c 128,-1,35
+ 473.454 75 473.454 75 524 75 c 2,36,-1
+ 811 75 l 2,37,38
+ 980.549 75 980.549 75 1052.77 124.491 c 128,-1,39
+ 1124.98 173.982 1124.98 173.982 1194.53 342.983 c 1,40,-1
+ 1231.08 323.493 l 1,41,-1
+ 1138.24 1 l 1,42,-1
+ 58 1 l 1,43,-1
+ 58 32.1475 l 1,44,45
+ 167.83 35.7793 167.83 35.7793 202.915 69.832 c 128,-1,46
+ 238 103.885 238 103.885 238 217 c 2,47,-1
+ 238 1126 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Zeta
+Encoding: 914 918 914
+Width: 1312
+Flags: W
+HStem: 1 74<349.77 1032.06> 1267 76<292.138 894.227>
+VStem: 139.35 43.3008<998 1098.46> 1198.96 43.1533<294.429 368>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 11
+ 0
+ 0
+CALL
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_1
+ 13
+MDAP[rnd]
+PUSHB_1
+ 2
+MDRP[min,rnd,black]
+PUSHB_3
+ 13
+ 2
+ 10
+CALL
+PUSHB_4
+ 64
+ 13
+ 0
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 16
+MDAP[rnd]
+PUSHB_1
+ 1
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SRP0
+PUSHB_2
+ 8
+ 1
+CALL
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_2
+ 17
+ 1
+CALL
+PUSHB_2
+ 8
+ 0
+SRP1
+SRP2
+PUSHB_4
+ 3
+ 4
+ 10
+ 12
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 13
+ 4
+SRP1
+SRP2
+PUSHB_2
+ 8
+ 9
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+182.65 998 m 1,0,-1
+ 139.35 998 l 1,1,-1
+ 162.674 1343 l 1,2,-1
+ 1176.77 1343 l 1,3,-1
+ 349.77 75 l 1,4,-1
+ 789 75 l 2,5,6
+ 995.681 75 995.681 75 1077.11 136.703 c 128,-1,7
+ 1158.54 198.405 1158.54 198.405 1198.96 368 c 1,8,-1
+ 1242.11 368 l 1,9,-1
+ 1181.75 1 l 1,10,-1
+ 69.2266 1 l 1,11,-1
+ 894.227 1267 l 1,12,-1
+ 517 1267 l 2,13,14
+ 329.092 1267 329.092 1267 267.113 1211.62 c 128,-1,15
+ 205.134 1156.25 205.134 1156.25 182.65 998 c 1,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Eta
+Encoding: 915 919 915
+Width: 1518
+Flags: W
+HStem: 1 31.1055<48 152.478 511.226 613 875 978.649 1336.46 1439> 654 68<443.179 1046.52> 1311.85 31.1504<48 149.774 514.896 613 875 974.28 1337.28 1439>
+VStem: 230 201<74.0909 638.922 736.063 1269.91> 1056 201<73.1238 640.365 738.872 1268.94>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 51
+ 0
+ 0
+CALL
+PUSHB_1
+ 32
+SHP[rp1]
+PUSHB_1
+ 52
+MDRP[min,rnd,black]
+PUSHB_3
+ 31
+ 34
+ 49
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 42
+MDAP[rnd]
+PUSHB_1
+ 13
+MDRP[min,rnd,black]
+PUSHB_1
+ 3
+MDAP[rnd]
+PUSHB_3
+ 6
+ 21
+ 24
+SHP[rp1]
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_1
+ 22
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 56
+MDAP[rnd]
+PUSHB_1
+ 55
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 46
+MDRP[min,rnd,black]
+PUSHB_1
+ 9
+SHP[rp2]
+PUSHB_3
+ 46
+ 55
+ 10
+CALL
+PUSHB_4
+ 64
+ 46
+ 6
+ 9
+CALL
+PUSHB_1
+ 49
+SHP[rp2]
+PUSHB_3
+ 55
+ 46
+ 10
+CALL
+PUSHB_4
+ 64
+ 55
+ 3
+ 9
+CALL
+PUSHB_1
+ 51
+SHP[rp2]
+PUSHB_1
+ 46
+SRP0
+PUSHB_2
+ 37
+ 1
+CALL
+PUSHB_1
+ 17
+SHP[rp2]
+PUSHB_1
+ 28
+MDRP[min,rnd,black]
+PUSHB_3
+ 28
+ 37
+ 10
+CALL
+PUSHB_4
+ 64
+ 28
+ 24
+ 9
+CALL
+PUSHB_1
+ 31
+SHP[rp2]
+PUSHB_3
+ 37
+ 28
+ 10
+CALL
+PUSHB_4
+ 64
+ 37
+ 21
+ 9
+CALL
+PUSHB_1
+ 33
+SHP[rp2]
+PUSHB_2
+ 57
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+230 1126 m 2,0,1
+ 230 1234.05 230 1234.05 193.48 1271.08 c 128,-1,2
+ 156.961 1308.12 156.961 1308.12 48 1311.85 c 1,3,-1
+ 48 1343 l 1,4,-1
+ 613 1343 l 1,5,-1
+ 613 1311.77 l 1,6,7
+ 503.119 1306.17 503.119 1306.17 467.06 1271.14 c 128,-1,8
+ 431 1236.11 431 1236.11 431 1126 c 2,9,-1
+ 431 789 l 2,10,11
+ 431 749.261 431 749.261 441.791 735.631 c 128,-1,12
+ 452.581 722 452.581 722 485 722 c 2,13,-1
+ 1012 722 l 2,14,15
+ 1037.95 722 1037.95 722 1046.98 738.355 c 128,-1,16
+ 1056 754.712 1056 754.712 1056 795 c 2,17,-1
+ 1056 1126 l 2,18,19
+ 1056 1234.01 1056 1234.01 1021.47 1270.09 c 128,-1,20
+ 986.936 1306.16 986.936 1306.16 875 1311.77 c 1,21,-1
+ 875 1343 l 1,22,-1
+ 1439 1343 l 1,23,-1
+ 1439 1311.85 l 1,24,25
+ 1330.12 1308.17 1330.12 1308.17 1293.56 1272.64 c 128,-1,26
+ 1257 1237.11 1257 1237.11 1257 1126 c 2,27,-1
+ 1257 219 l 2,28,29
+ 1257 109.949 1257 109.949 1294.52 71.918 c 128,-1,30
+ 1332.03 33.8867 1332.03 33.8867 1439 32.0654 c 1,31,-1
+ 1439 1 l 1,32,-1
+ 875 1 l 1,33,-1
+ 875 32.1064 l 1,34,35
+ 983.92 34.8398 983.92 34.8398 1019.96 71.3945 c 128,-1,36
+ 1056 107.95 1056 107.95 1056 217 c 2,37,-1
+ 1056 588 l 2,38,39
+ 1056 627.568 1056 627.568 1046.81 640.784 c 128,-1,40
+ 1037.61 654 1037.61 654 1012 654 c 2,41,-1
+ 483 654 l 2,42,43
+ 454.611 654 454.611 654 442.806 639.384 c 128,-1,44
+ 431 624.768 431 624.768 431 588 c 2,45,-1
+ 431 219 l 2,46,47
+ 431 109.949 431 109.949 467.52 72.916 c 128,-1,48
+ 504.039 35.8818 504.039 35.8818 613 32.1504 c 1,49,-1
+ 613 1 l 1,50,-1
+ 48 1 l 1,51,-1
+ 48 32.1055 l 1,52,53
+ 157.911 34.8311 157.911 34.8311 193.955 71.3906 c 128,-1,54
+ 230 107.949 230 107.949 230 219 c 2,55,-1
+ 230 1126 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Theta
+Encoding: 916 920 916
+Width: 1518
+Flags: W
+HStem: -16 64<604.118 917.396> 625 140<542.087 974.842> 1322 63<601.632 913.233>
+VStem: 93 221<401.434 960.39> 464 39.2637<488 571.653 818.347 902> 1014.68 39.3242<488 570.292 819.035 902> 1203 222<404.204 964.31>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 37
+MDAP[rnd]
+PUSHB_1
+ 30
+MDRP[min,rnd,black]
+PUSHB_1
+ 11
+MDAP[rnd]
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_3
+ 11
+ 0
+ 10
+CALL
+PUSHB_4
+ 64
+ 11
+ 7
+ 9
+CALL
+PUSHB_1
+ 14
+SHP[rp2]
+PUSHB_3
+ 0
+ 11
+ 10
+CALL
+PUSHB_4
+ 64
+ 0
+ 4
+ 9
+CALL
+PUSHB_1
+ 16
+SHP[rp2]
+PUSHB_1
+ 24
+MDAP[rnd]
+PUSHB_1
+ 31
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 53
+MDAP[rnd]
+PUSHB_1
+ 50
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 44
+SHP[rp2]
+PUSHB_1
+ 27
+MDRP[min,rnd,black]
+PUSHB_1
+ 27
+SRP0
+PUSHB_2
+ 15
+ 1
+CALL
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 17
+SHP[rp2]
+PUSHB_1
+ 14
+SRP0
+PUSHB_2
+ 7
+ 1
+CALL
+PUSHB_1
+ 4
+SHP[rp2]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_1
+ 6
+SRP0
+PUSHB_2
+ 22
+ 1
+CALL
+PUSHB_1
+ 34
+MDRP[min,rnd,black]
+PUSHB_2
+ 54
+ 1
+CALL
+PUSHB_2
+ 7
+ 14
+SRP1
+SRP2
+PUSHB_3
+ 30
+ 31
+ 37
+IP
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 11
+ 30
+SRP1
+SRP2
+PUSHB_3
+ 21
+ 44
+ 46
+IP
+IP
+IP
+PUSHB_1
+ 0
+SRP1
+PUSHB_3
+ 27
+ 34
+ 50
+IP
+IP
+IP
+PUSHB_1
+ 24
+SRP2
+PUSHB_1
+ 22
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+676 765 m 6,0,-1
+ 844 765 l 6,1,2
+ 942.854 765 942.854 765 975.891 793.392 c 132,-1,3
+ 1008.93 821.783 1008.93 821.783 1014.68 902 c 5,4,-1
+ 1054 902 l 5,5,-1
+ 1054 488 l 5,6,-1
+ 1014.68 488 l 5,7,8
+ 1008.92 567.207 1008.92 567.207 976.41 596.104 c 132,-1,9
+ 943.901 625 943.901 625 844 625 c 6,10,-1
+ 676 625 l 6,11,12
+ 574.121 625 574.121 625 541.035 596.051 c 132,-1,13
+ 507.95 567.101 507.95 567.101 503.264 488 c 5,14,-1
+ 464 488 l 5,15,-1
+ 464 902 l 5,16,-1
+ 503.264 902 l 5,17,18
+ 507.951 822.899 507.951 822.899 541.036 793.949 c 132,-1,19
+ 574.121 765 574.121 765 676 765 c 6,0,-1
+1082.81 220.716 m 132,-1,21
+ 1203 393.432 1203 393.432 1203 684 c 132,-1,22
+ 1203 974.562 1203 974.562 1082.81 1148.28 c 132,-1,23
+ 962.621 1322 962.621 1322 760 1322 c 4,24,25
+ 555.39 1322 555.39 1322 434.695 1148.79 c 132,-1,26
+ 314 975.57 314 975.57 314 684 c 4,27,28
+ 314 393.426 314 393.426 434.697 220.713 c 132,-1,29
+ 555.395 48 555.395 48 760 48 c 4,30,20
+ 962.612 48 962.612 48 1082.81 220.716 c 132,-1,21
+760 1385 m 4,31,32
+ 1057.86 1385 1057.86 1385 1241.43 1193 c 132,-1,33
+ 1425 1000.99 1425 1000.99 1425 684 c 4,34,35
+ 1425 368.006 1425 368.006 1241.43 176.003 c 132,-1,36
+ 1057.86 -16 1057.86 -16 760 -16 c 4,37,38
+ 460.134 -16 460.134 -16 344.99 104.123 c 132,-1,39
+ 229.846 224.246 229.846 224.246 194.354 283.835 c 132,-1,40
+ 158.863 343.424 158.863 343.424 141.598 390.541 c 132,-1,41
+ 124.332 437.657 124.332 437.657 113.752 483.491 c 132,-1,42
+ 103.172 529.325 103.172 529.325 101.073 548.571 c 132,-1,43
+ 98.9746 567.817 98.9746 567.817 98.9746 573.694 c 4,44,45
+ 98.9746 574.01 98.9746 574.01 98.3594 579.52 c 132,-1,46
+ 97.7441 585.029 97.7441 585.029 96.8652 594.81 c 132,-1,47
+ 95.9873 604.59 95.9873 604.59 95.1094 617.223 c 132,-1,48
+ 94.2314 629.856 94.2314 629.856 93.6152 647.733 c 132,-1,49
+ 93 665.61 93 665.61 93 684 c 4,50,51
+ 93 1000.99 93 1000.99 277.066 1193 c 132,-1,52
+ 461.133 1385 461.133 1385 760 1385 c 4,31,32
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Iota
+Encoding: 917 921 917
+Width: 682
+Flags: W
+HStem: 1 31.0645<62 167.284 522.096 620> 1311.85 31.1533<62 161.966 520.034 620>
+VStem: 241 200<74.632 1270.42>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 15
+ 0
+ 0
+CALL
+PUSHB_1
+ 16
+MDRP[min,rnd,black]
+PUSHB_1
+ 13
+SHP[rp2]
+PUSHB_1
+ 3
+MDAP[rnd]
+PUSHB_1
+ 6
+SHP[rp1]
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 20
+MDAP[rnd]
+PUSHB_1
+ 19
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 10
+MDRP[min,rnd,black]
+PUSHB_3
+ 10
+ 19
+ 10
+CALL
+PUSHB_4
+ 64
+ 10
+ 14
+ 9
+CALL
+PUSHB_1
+ 5
+SHP[rp2]
+PUSHB_3
+ 19
+ 10
+ 10
+CALL
+PUSHB_4
+ 64
+ 19
+ 15
+ 9
+CALL
+PUSHB_1
+ 3
+SHP[rp2]
+PUSHB_2
+ 21
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+241 1126 m 6,0,1
+ 241 1235.05 241 1235.05 204.982 1271.58 c 132,-1,2
+ 168.966 1308.11 168.966 1308.11 62 1311.85 c 5,3,-1
+ 62 1343 l 5,4,-1
+ 620 1343 l 5,5,-1
+ 620 1311.85 l 5,6,7
+ 513.034 1308.11 513.034 1308.11 477.018 1271.58 c 132,-1,8
+ 441 1235.05 441 1235.05 441 1126 c 6,9,-1
+ 441 219 l 6,10,11
+ 441 110.99 441 110.99 477.005 73.4414 c 132,-1,12
+ 513.01 35.8936 513.01 35.8936 620 32.1533 c 5,13,-1
+ 620 1 l 5,14,-1
+ 62 1 l 5,15,-1
+ 62 32.0645 l 5,16,17
+ 167.898 33.8447 167.898 33.8447 204.449 69.3652 c 132,-1,18
+ 241 104.887 241 104.887 241 219 c 6,19,-1
+ 241 1126 l 6,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Kappa
+Encoding: 918 922 918
+Width: 1557
+Flags: W
+HStem: 1 31<68 182.996 557.906 665 886 982.863 1438.53 1511> 1311.86 31.1396<71 178.332 563.185 671 875 972.649 1301.22 1406>
+VStem: 269 201<73.7062 646 692.644 1270.86>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 57
+ 0
+ 0
+CALL
+PUSHB_1
+ 38
+SHP[rp1]
+PUSHB_1
+ 58
+MDRP[min,rnd,black]
+PUSHB_3
+ 37
+ 40
+ 55
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 4
+MDAP[rnd]
+PUSHB_3
+ 7
+ 26
+ 29
+SHP[rp1]
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+PUSHB_1
+ 27
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 62
+MDAP[rnd]
+PUSHB_1
+ 0
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 52
+MDRP[min,rnd,black]
+PUSHB_1
+ 10
+SHP[rp2]
+PUSHB_3
+ 52
+ 0
+ 10
+CALL
+PUSHB_4
+ 64
+ 52
+ 56
+ 9
+CALL
+PUSHB_1
+ 6
+SHP[rp2]
+PUSHB_3
+ 0
+ 52
+ 10
+CALL
+PUSHB_4
+ 64
+ 0
+ 57
+ 9
+CALL
+PUSHB_1
+ 4
+SHP[rp2]
+PUSHB_2
+ 63
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 4
+ 58
+SRP1
+SRP2
+PUSHB_2
+ 11
+ 50
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+269 215 m 2,0,-1
+ 269 1110 l 2,1,2
+ 269 1231.15 269 1231.15 228.433 1269.66 c 128,-1,3
+ 187.865 1308.17 187.865 1308.17 71 1311.86 c 1,4,-1
+ 71 1343 l 1,5,-1
+ 671 1343 l 1,6,-1
+ 671 1311.86 l 1,7,8
+ 554.123 1308.16 554.123 1308.16 512.062 1268.66 c 128,-1,9
+ 470 1229.16 470 1229.16 470 1110 c 2,10,-1
+ 470 692.644 l 1,11,-1
+ 475.344 693.012 l 2,12,13
+ 506.03 695.128 506.03 695.128 540.301 725.244 c 2,14,-1
+ 540.63 725.533 l 2,15,16
+ 543.722 729.297 543.722 729.297 544.934 730.293 c 0,17,-1
+ 545.27 730.545 l 1,18,-1
+ 545.941 730.881 l 1,19,-1
+ 888.52 1067.45 l 2,20,21
+ 949.812 1128.74 949.812 1128.74 982.406 1173.56 c 128,-1,22
+ 1015 1218.37 1015 1218.37 1015 1243 c 0,23,24
+ 1015 1277.18 1015 1277.18 982.606 1292.33 c 128,-1,25
+ 950.213 1307.49 950.213 1307.49 875 1311.74 c 1,26,-1
+ 875 1343 l 1,27,-1
+ 1406 1343 l 1,28,-1
+ 1406 1311.83 l 1,29,30
+ 1311.92 1308.08 1311.92 1308.08 1237.51 1273.12 c 128,-1,31
+ 1163.11 1238.17 1163.11 1238.17 1063.5 1140.57 c 2,32,-1
+ 676.867 762.014 l 1,33,-1
+ 1284.49 162.44 l 2,34,35
+ 1356.96 90.9707 1356.96 90.9707 1408.11 62.1699 c 128,-1,36
+ 1459.26 33.3682 1459.26 33.3682 1511 32.0635 c 1,37,-1
+ 1511 1 l 1,38,-1
+ 886 1 l 1,39,-1
+ 886 32 l 1,40,-1
+ 891.212 32.0088 l 1,41,42
+ 1037 44.416 1037 44.416 1037 92 c 0,43,44
+ 1037 113.327 1037 113.327 1026.5 131.695 c 128,-1,45
+ 1016.01 150.062 1016.01 150.062 984.531 181.54 c 2,46,-1
+ 550.57 613.5 l 2,47,48
+ 527.895 637.206 527.895 637.206 517.452 641.604 c 128,-1,49
+ 507.01 646 507.01 646 489 646 c 2,50,-1
+ 470 646 l 1,51,-1
+ 470 209 l 2,52,53
+ 470 105.707 470 105.707 510.617 70.7461 c 128,-1,54
+ 551.233 35.7842 551.233 35.7842 665 32.1426 c 1,55,-1
+ 665 1 l 1,56,-1
+ 68 1 l 1,57,-1
+ 68 32 l 1,58,-1
+ 74 32 l 2,59,60
+ 183.998 32 183.998 32 226.499 72.4277 c 128,-1,61
+ 269 112.855 269 112.855 269 215 c 2,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Lambda
+Encoding: 919 923 919
+Width: 1432
+Flags: W
+HStem: 1 31.2822<34 87.4033 321.296 417 855 958.829 1323.68 1388>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 21
+ 0
+ 0
+CALL
+PUSHB_1
+ 4
+SHP[rp1]
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_3
+ 3
+ 6
+ 19
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 28
+MDAP[rnd]
+PUSHB_2
+ 29
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1171.37 277.108 m 2,0,1
+ 1230.72 131.256 1230.72 131.256 1276.41 82.5547 c 128,-1,2
+ 1322.1 33.8535 1322.1 33.8535 1388 32.0674 c 1,3,-1
+ 1388 1 l 1,4,-1
+ 855 1 l 1,5,-1
+ 855 32.2822 l 1,6,7
+ 941.091 37.4551 941.091 37.4551 972.545 53.1826 c 128,-1,8
+ 1004 68.9102 1004 68.9102 1004 107 c 0,9,10
+ 1004 180.021 1004 180.021 733.603 814.953 c 1,11,-1
+ 638.98 1038.89 l 1,12,-1
+ 308.394 249.944 l 2,13,14
+ 291.293 209.708 291.293 209.708 281.146 176.225 c 128,-1,15
+ 271 142.741 271 142.741 271 125 c 0,16,17
+ 271 76.2588 271 76.2588 301.309 56.9238 c 128,-1,18
+ 331.616 37.5898 331.616 37.5898 417 32.2881 c 1,19,-1
+ 417 1 l 1,20,-1
+ 34 1 l 1,21,-1
+ 34 32.2627 l 1,22,23
+ 84.8545 35.7988 84.8545 35.7988 119.561 72.5176 c 128,-1,24
+ 154.267 109.235 154.267 109.235 207.618 238.084 c 2,25,-1
+ 679.337 1373 l 1,26,-1
+ 721.647 1373 l 1,27,-1
+ 1171.37 277.108 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Mu
+Encoding: 920 924 920
+Width: 1851
+Flags: W
+HStem: 1 31.2705<68 159.312 422.227 523 1197 1294.5 1674.56 1764> 1311.55 31.4463<68 155.563 1657.84 1764>
+VStem: 247 90<75.4143 1126.35> 1381 199<69.6942 1127.54>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 32
+ 0
+ 0
+CALL
+PUSHB_2
+ 17
+ 24
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 33
+MDRP[min,rnd,black]
+PUSHB_3
+ 16
+ 19
+ 30
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 3
+MDAP[rnd]
+PUSHB_1
+ 9
+SHP[rp1]
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_1
+ 7
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 37
+MDAP[rnd]
+PUSHB_1
+ 36
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 27
+MDRP[min,rnd,black]
+PUSHB_3
+ 27
+ 36
+ 10
+CALL
+PUSHB_4
+ 64
+ 27
+ 31
+ 9
+CALL
+PUSHB_3
+ 36
+ 27
+ 10
+CALL
+PUSHB_4
+ 64
+ 36
+ 4
+ 9
+CALL
+PUSHB_1
+ 32
+SHP[rp2]
+PUSHB_1
+ 27
+SRP0
+PUSHB_2
+ 22
+ 1
+CALL
+PUSHB_1
+ 13
+MDRP[min,rnd,black]
+PUSHB_3
+ 13
+ 22
+ 10
+CALL
+PUSHB_4
+ 64
+ 13
+ 16
+ 9
+CALL
+PUSHB_1
+ 8
+SHP[rp2]
+PUSHB_3
+ 22
+ 13
+ 10
+CALL
+PUSHB_4
+ 64
+ 22
+ 18
+ 9
+CALL
+PUSHB_2
+ 38
+ 1
+CALL
+PUSHB_2
+ 22
+ 27
+SRP1
+SRP2
+PUSHB_2
+ 5
+ 7
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 3
+ 33
+SRP1
+SRP2
+PUSHB_2
+ 23
+ 26
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+247 1098 m 2,0,1
+ 247 1233.14 247 1233.14 211.457 1267.13 c 128,-1,2
+ 175.915 1301.13 175.915 1301.13 68 1311.55 c 1,3,-1
+ 68 1343 l 1,4,-1
+ 455.771 1343 l 1,5,-1
+ 922.035 309.768 l 1,6,-1
+ 1381.25 1343 l 1,7,-1
+ 1764 1343 l 1,8,-1
+ 1764 1311.85 l 1,9,10
+ 1655.2 1308.21 1655.2 1308.21 1617.6 1274.22 c 128,-1,11
+ 1580 1240.22 1580 1240.22 1580 1108 c 2,12,-1
+ 1580 236 l 2,13,14
+ 1580 110.885 1580 110.885 1615.06 76.8555 c 128,-1,15
+ 1650.12 42.8262 1650.12 42.8262 1764 32.4238 c 1,16,-1
+ 1764 1 l 1,17,-1
+ 1197 1 l 1,18,-1
+ 1197 32.2705 l 1,19,20
+ 1308.92 38.8477 1308.92 38.8477 1344.96 74.8887 c 128,-1,21
+ 1381 110.929 1381 110.929 1381 236 c 2,22,-1
+ 1381 1127.54 l 1,23,-1
+ 879.752 1 l 1,24,-1
+ 841.24 1 l 1,25,-1
+ 337 1127.41 l 1,26,-1
+ 337 260 l 2,27,28
+ 337 119.119 337 119.119 373.455 77.5293 c 128,-1,29
+ 409.909 35.9404 409.909 35.9404 523 32.1465 c 1,30,-1
+ 523 1 l 1,31,-1
+ 68 1 l 1,32,-1
+ 68 32.0732 l 1,33,34
+ 171.343 34.1543 171.343 34.1543 209.172 82.7188 c 128,-1,35
+ 247 131.282 247 131.282 247 272 c 2,36,-1
+ 247 1098 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Nu
+Encoding: 921 925 921
+Width: 1500
+Flags: W
+HStem: 1 31.3408<44 144.106 416.234 517> 1311.59 31.4102<44 108.72 980 1074.93 1354.31 1451>
+VStem: 234 93<66.9824 1093> 1170 91<380.969 1267.69>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 0
+ 0
+ 0
+CALL
+PUSHB_1
+ 23
+SHP[rp1]
+PUSHB_1
+ 1
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+SHP[rp2]
+PUSHB_1
+ 9
+MDAP[rnd]
+PUSHB_2
+ 16
+ 19
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 10
+MDRP[min,rnd,black]
+PUSHB_1
+ 17
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 31
+MDAP[rnd]
+PUSHB_1
+ 4
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_3
+ 26
+ 4
+ 10
+CALL
+PUSHB_4
+ 64
+ 26
+ 30
+ 9
+CALL
+PUSHB_3
+ 4
+ 26
+ 10
+CALL
+PUSHB_4
+ 64
+ 4
+ 0
+ 9
+CALL
+PUSHB_1
+ 9
+SHP[rp2]
+PUSHB_1
+ 26
+SRP0
+PUSHB_2
+ 12
+ 1
+CALL
+PUSHB_1
+ 23
+MDRP[min,rnd,black]
+PUSHB_3
+ 23
+ 12
+ 10
+CALL
+PUSHB_4
+ 64
+ 23
+ 19
+ 9
+CALL
+PUSHB_3
+ 12
+ 23
+ 10
+CALL
+PUSHB_4
+ 64
+ 12
+ 16
+ 9
+CALL
+PUSHB_2
+ 32
+ 1
+CALL
+PUSHB_2
+ 12
+ 26
+SRP1
+SRP2
+PUSHB_1
+ 11
+IP
+PUSHB_1
+ 23
+SRP1
+PUSHB_1
+ 24
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 9
+ 1
+SRP1
+SRP2
+PUSHB_3
+ 2
+ 25
+ 28
+IP
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+44 1 m 1,0,-1
+ 44 32.3408 l 1,1,2
+ 158.673 40.7246 158.673 40.7246 196.336 71.6816 c 128,-1,3
+ 234 102.638 234 102.638 234 221 c 2,4,-1
+ 234 1171.33 l 1,5,-1
+ 233.341 1172.48 l 2,6,7
+ 192.8 1243.43 192.8 1243.43 150.058 1274.1 c 128,-1,8
+ 107.315 1304.78 107.315 1304.78 44 1311.53 c 1,9,-1
+ 44 1343 l 1,10,-1
+ 384.627 1343 l 1,11,-1
+ 1170 380.969 l 1,12,-1
+ 1170 1122 l 2,13,14
+ 1170 1236.23 1170 1236.23 1133.89 1268.73 c 128,-1,15
+ 1097.77 1301.23 1097.77 1301.23 980 1311.59 c 1,16,-1
+ 980 1343 l 1,17,-1
+ 1451 1343 l 1,18,-1
+ 1451 1311.59 l 1,19,20
+ 1334.3 1301.26 1334.3 1301.26 1297.65 1270.8 c 128,-1,21
+ 1261 1240.35 1261 1240.35 1261 1122 c 2,22,-1
+ 1261 1 l 1,23,-1
+ 1221.37 1 l 1,24,-1
+ 327 1093 l 1,25,-1
+ 327 221 l 2,26,27
+ 327 103.683 327 103.683 364.146 72.2109 c 128,-1,28
+ 401.294 40.7393 401.294 40.7393 517 32.3389 c 1,29,-1
+ 517 1 l 1,30,-1
+ 44 1 l 1,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Xi
+Encoding: 922 926 922
+Width: 1321
+Flags: W
+HStem: 1 187<200.163 1126.84> 599 162<419.425 910.111> 1158 185<204.481 1122.41>
+VStem: 118 35.3457<272.492 364 982 1057.47> 339 37.2715<462 539.973 814.036 890> 952.729 35.2705<462 538.426 816.846 890> 1173.65 35.3457<272.492 364 982 1056.51>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 7
+ 0
+ 0
+CALL
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_3
+ 0
+ 7
+ 10
+CALL
+PUSHB_4
+ 64
+ 0
+ 8
+ 9
+CALL
+PUSHB_1
+ 4
+SHP[rp2]
+PUSHB_1
+ 23
+MDAP[rnd]
+PUSHB_1
+ 12
+MDRP[min,rnd,black]
+PUSHB_3
+ 23
+ 12
+ 10
+CALL
+PUSHB_4
+ 64
+ 23
+ 27
+ 9
+CALL
+PUSHB_1
+ 18
+SHP[rp2]
+PUSHB_3
+ 12
+ 23
+ 10
+CALL
+PUSHB_4
+ 64
+ 12
+ 28
+ 9
+CALL
+PUSHB_1
+ 16
+SHP[rp2]
+PUSHB_1
+ 37
+MDAP[rnd]
+PUSHB_1
+ 42
+MDRP[min,rnd,black]
+PUSHB_3
+ 37
+ 42
+ 10
+CALL
+PUSHB_4
+ 64
+ 37
+ 33
+ 9
+CALL
+PUSHB_1
+ 40
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 44
+MDAP[rnd]
+PUSHB_1
+ 8
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 41
+SHP[rp2]
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_1
+ 40
+SHP[rp2]
+PUSHB_1
+ 9
+SRP0
+PUSHB_2
+ 27
+ 1
+CALL
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+SHP[rp2]
+PUSHB_1
+ 26
+SRP0
+PUSHB_2
+ 19
+ 1
+CALL
+PUSHB_1
+ 16
+SHP[rp2]
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_1
+ 18
+SRP0
+PUSHB_2
+ 4
+ 1
+CALL
+PUSHB_1
+ 33
+SHP[rp2]
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+PUSHB_1
+ 32
+SHP[rp2]
+PUSHB_2
+ 45
+ 1
+CALL
+PUSHB_2
+ 27
+ 9
+SRP1
+SRP2
+PUSHB_2
+ 10
+ 39
+IP
+IP
+PUSHB_2
+ 4
+ 18
+SRP1
+SRP2
+PUSHB_2
+ 3
+ 34
+IP
+IP
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+342 188 m 6,0,-1
+ 987 188 l 6,1,2
+ 1090.05 188 1090.05 188 1128.04 225.477 c 132,-1,3
+ 1166.03 262.952 1166.03 262.952 1173.65 364 c 5,4,-1
+ 1209 364 l 5,5,-1
+ 1209 1 l 5,6,-1
+ 118 1 l 5,7,-1
+ 118 364 l 5,8,-1
+ 153.346 364 l 5,9,10
+ 160.97 262.952 160.97 262.952 198.959 225.477 c 132,-1,11
+ 236.949 188 236.949 188 342 188 c 6,0,-1
+563 761 m 6,12,-1
+ 766 761 l 6,13,14
+ 878.738 761 878.738 761 913.279 788.323 c 132,-1,15
+ 947.82 815.646 947.82 815.646 952.713 890 c 5,16,-1
+ 988 890 l 5,17,-1
+ 988 462 l 5,18,-1
+ 952.729 462 l 5,19,20
+ 947.807 541.365 947.807 541.365 911.271 570.183 c 132,-1,21
+ 874.734 599 874.734 599 766 599 c 6,22,-1
+ 563 599 l 6,23,24
+ 455.284 599 455.284 599 418.25 570.195 c 132,-1,25
+ 381.216 541.391 381.216 541.391 376.271 462 c 5,26,-1
+ 339 462 l 5,27,-1
+ 339 890 l 5,28,-1
+ 376.287 890 l 5,29,30
+ 381.18 815.646 381.18 815.646 415.721 788.323 c 132,-1,31
+ 450.262 761 450.262 761 563 761 c 6,12,-1
+1203 982 m 5,32,-1
+ 1167.66 982 l 5,33,34
+ 1160.04 1084.02 1160.04 1084.02 1123.57 1121.01 c 132,-1,35
+ 1087.09 1158 1087.09 1158 985 1158 c 6,36,-1
+ 346 1158 l 6,37,38
+ 240.909 1158 240.909 1158 203.289 1119.87 c 132,-1,39
+ 165.669 1081.73 165.669 1081.73 159.296 982 c 5,40,-1
+ 124 982 l 5,41,-1
+ 124 1343 l 5,42,-1
+ 1203 1343 l 5,43,-1
+ 1203 982 l 5,32,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Omicron
+Encoding: 923 927 923
+Width: 1479
+Flags: W
+HStem: -25 64<588.828 890.114> 1315 63<591.193 890.114>
+VStem: 91 217<394.808 959.84> 1170 220<392.949 961.623>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 21
+MDAP[rnd]
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_1
+ 2
+MDAP[rnd]
+PUSHB_1
+ 15
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 29
+MDAP[rnd]
+PUSHB_1
+ 25
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+PUSHB_1
+ 5
+SRP0
+PUSHB_2
+ 11
+ 1
+CALL
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_2
+ 30
+ 1
+CALL
+PUSHB_2
+ 11
+ 5
+SRP1
+SRP2
+PUSHB_2
+ 15
+ 21
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 2
+ 8
+SRP1
+SRP2
+PUSHB_3
+ 12
+ 18
+ 25
+IP
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1053.83 1141.76 m 132,-1,1
+ 937.667 1315 937.667 1315 741 1315 c 4,2,3
+ 543.348 1315 543.348 1315 425.674 1141.27 c 132,-1,4
+ 308 967.534 308 967.534 308 677 c 4,5,6
+ 308 387.47 308 387.47 425.672 213.234 c 132,-1,7
+ 543.344 39 543.344 39 741 39 c 4,8,9
+ 937.672 39 937.672 39 1053.84 212.741 c 132,-1,10
+ 1170 386.482 1170 386.482 1170 677 c 4,11,0
+ 1170 968.521 1170 968.521 1053.83 1141.76 c 132,-1,1
+91 677 m 4,12,13
+ 91 995.026 91 995.026 270.085 1186.51 c 132,-1,14
+ 449.17 1378 449.17 1378 741 1378 c 4,15,16
+ 1031.83 1378 1031.83 1378 1210.91 1186.02 c 132,-1,17
+ 1390 994.03 1390 994.03 1390 677 c 4,18,19
+ 1390 360.963 1390 360.963 1210.91 167.981 c 132,-1,20
+ 1031.82 -25 1031.82 -25 741 -25 c 4,21,22
+ 449.174 -25 449.174 -25 313.402 120.549 c 132,-1,23
+ 177.632 266.099 177.632 266.099 134.415 394.544 c 132,-1,24
+ 91.1982 522.989 91.1982 522.989 91.1982 655.96 c 4,25,26
+ 91.1982 656.544 91.1982 656.544 91.1484 659.248 c 132,-1,27
+ 91.0986 661.951 91.0986 661.951 91.0498 666.699 c 132,-1,28
+ 91 671.448 91 671.448 91 677 c 4,12,13
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Pi
+Encoding: 924 928 924
+Width: 1609
+Flags: W
+HStem: 1 31.1328<52 165.342 555.261 665 918 1027.09 1415.66 1529> 1277 66<516.726 1066.86> 1311.79 31.2139<52 159.355 1421.64 1529>
+VStem: 253 211<75.0232 1237.47> 1119 209<75.5404 1239.15>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 27
+ 0
+ 0
+CALL
+PUSHB_1
+ 8
+SHP[rp1]
+PUSHB_1
+ 28
+MDRP[min,rnd,black]
+PUSHB_3
+ 7
+ 10
+ 25
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 18
+MDAP[rnd]
+PUSHB_1
+ 36
+MDRP[min,rnd,black]
+PUSHB_1
+ 36
+SRP0
+PUSHB_1
+ 35
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 38
+MDAP[rnd]
+PUSHB_1
+ 31
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_3
+ 22
+ 31
+ 10
+CALL
+PUSHB_4
+ 64
+ 22
+ 26
+ 9
+CALL
+PUSHB_3
+ 31
+ 22
+ 10
+CALL
+PUSHB_4
+ 64
+ 31
+ 35
+ 9
+CALL
+PUSHB_1
+ 27
+SHP[rp2]
+PUSHB_1
+ 22
+SRP0
+PUSHB_2
+ 13
+ 1
+CALL
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_3
+ 4
+ 13
+ 10
+CALL
+PUSHB_4
+ 64
+ 4
+ 0
+ 9
+CALL
+PUSHB_1
+ 7
+SHP[rp2]
+PUSHB_3
+ 13
+ 4
+ 10
+CALL
+PUSHB_4
+ 64
+ 13
+ 9
+ 9
+CALL
+PUSHB_2
+ 39
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1529 1311.79 m 1,0,1
+ 1409.18 1306.2 1409.18 1306.2 1368.59 1269.2 c 128,-1,2
+ 1328 1232.21 1328 1232.21 1328 1126 c 2,3,-1
+ 1328 219 l 2,4,5
+ 1328 108.81 1328 108.81 1367.61 72.2832 c 128,-1,6
+ 1407.22 35.7578 1407.22 35.7578 1529 32.1328 c 1,7,-1
+ 1529 1 l 1,8,-1
+ 918 1 l 1,9,-1
+ 918 32.1367 l 1,10,11
+ 1036.84 35.8057 1036.84 35.8057 1077.92 74.3203 c 128,-1,12
+ 1119 112.834 1119 112.834 1119 219 c 2,13,-1
+ 1119 1090 l 2,14,15
+ 1119 1201.31 1119 1201.31 1074.42 1239.16 c 128,-1,16
+ 1029.84 1277 1029.84 1277 889 1277 c 2,17,-1
+ 696 1277 l 2,18,19
+ 554.18 1277 554.18 1277 509.09 1239.17 c 128,-1,20
+ 464 1201.33 464 1201.33 464 1090 c 2,21,-1
+ 464 219 l 2,22,23
+ 464 111.833 464 111.833 504.582 73.8184 c 128,-1,24
+ 545.165 35.8047 545.165 35.8047 665 32.1357 c 1,25,-1
+ 665 1 l 1,26,-1
+ 52 1 l 1,27,-1
+ 52 32.1328 l 1,28,29
+ 173.775 35.7578 173.775 35.7578 213.388 72.2832 c 128,-1,30
+ 253 108.81 253 108.81 253 219 c 2,31,-1
+ 253 1126 l 2,32,33
+ 253 1232.21 253 1232.21 212.408 1269.2 c 128,-1,34
+ 171.816 1306.2 171.816 1306.2 52 1311.79 c 1,35,-1
+ 52 1343 l 1,36,-1
+ 1529 1343 l 1,37,-1
+ 1529 1311.79 l 1,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Rho
+Encoding: 925 929 925
+Width: 1139
+Flags: W
+HStem: 1 31.0195<52 158.918 522.163 632> 619 60<455.838 692.593> 1281 62<465.26 717.529> 1311.77 31.2275<52 158.02>
+VStem: 236 205<65.9127 611.232 695.549 1258.39> 863 211<810.839 1163.08>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 37
+ 0
+ 0
+CALL
+PUSHB_1
+ 38
+MDRP[min,rnd,black]
+PUSHB_1
+ 35
+SHP[rp2]
+PUSHB_1
+ 28
+MDAP[rnd]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_1
+ 12
+MDAP[rnd]
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_1
+ 18
+SRP0
+PUSHB_1
+ 16
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 42
+MDAP[rnd]
+PUSHB_1
+ 41
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 32
+MDRP[min,rnd,black]
+PUSHB_1
+ 2
+SHP[rp2]
+PUSHB_3
+ 32
+ 41
+ 10
+CALL
+PUSHB_4
+ 64
+ 32
+ 36
+ 9
+CALL
+PUSHB_3
+ 41
+ 32
+ 10
+CALL
+PUSHB_4
+ 64
+ 41
+ 37
+ 9
+CALL
+PUSHB_1
+ 16
+SHP[rp2]
+PUSHB_1
+ 32
+SRP0
+PUSHB_2
+ 9
+ 1
+CALL
+PUSHB_1
+ 21
+MDRP[min,rnd,black]
+PUSHB_2
+ 43
+ 1
+CALL
+PUSHB_2
+ 9
+ 32
+SRP1
+SRP2
+PUSHB_1
+ 27
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 12
+ 37
+SRP1
+SRP2
+PUSHB_1
+ 21
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+464.516 1259.09 m 132,-1,1
+ 441 1237.17 441 1237.17 441 1161 c 6,2,-1
+ 441 748 l 6,3,4
+ 441 711.087 441 711.087 455.384 695.043 c 132,-1,5
+ 469.768 679 469.768 679 502 679 c 4,6,7
+ 682.834 679 682.834 679 772.917 755.342 c 132,-1,8
+ 863 831.684 863 831.684 863 985 c 4,9,10
+ 863 1131.15 863 1131.15 783.997 1206.07 c 132,-1,11
+ 704.994 1281 704.994 1281 551 1281 c 4,12,0
+ 488.031 1281 488.031 1281 464.516 1259.09 c 132,-1,1
+236 1135 m 6,13,14
+ 236 1244.3 236 1244.3 199.858 1275.28 c 132,-1,15
+ 163.717 1306.26 163.717 1306.26 52 1311.77 c 5,16,-1
+ 52 1343 l 5,17,-1
+ 618 1343 l 6,18,19
+ 843.307 1343 843.307 1343 958.653 1254.76 c 132,-1,20
+ 1074 1166.53 1074 1166.53 1074 997 c 4,21,22
+ 1074 869.608 1074 869.608 1008.87 778.814 c 132,-1,23
+ 943.73 688.021 943.73 688.021 825.465 649.759 c 4,24,25
+ 776.778 634.007 776.778 634.007 710.748 626.504 c 132,-1,26
+ 644.717 619 644.717 619 494 619 c 6,27,-1
+ 477 619 l 6,28,29
+ 454.801 619 454.801 619 447.9 611.473 c 132,-1,30
+ 441 603.945 441 603.945 441 576 c 6,31,-1
+ 441 258 l 6,32,33
+ 441 114.085 441 114.085 477.012 73.957 c 132,-1,34
+ 513.023 33.8301 513.023 33.8301 632 32.0576 c 5,35,-1
+ 632 1 l 5,36,-1
+ 52 1 l 5,37,-1
+ 52 32.0195 l 5,38,39
+ 165.079 32.9043 165.079 32.9043 200.539 74.5312 c 132,-1,40
+ 236 116.159 236 116.159 236 258 c 6,41,-1
+ 236 1135 l 6,13,14
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Sigma
+Encoding: 926 931 926
+Width: 1212
+Flags: W
+HStem: 1 187<278.592 1022.07> 1277 66<316.71 892.229>
+VStem: 1065.62 39.3809<265.181 364 982 1062.21>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 15
+ 0
+ 0
+CALL
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_3
+ 8
+ 15
+ 10
+CALL
+PUSHB_4
+ 64
+ 8
+ 12
+ 9
+CALL
+PUSHB_1
+ 5
+MDAP[rnd]
+PUSHB_1
+ 19
+MDRP[min,rnd,black]
+PUSHB_3
+ 5
+ 19
+ 10
+CALL
+PUSHB_4
+ 64
+ 5
+ 1
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 21
+MDAP[rnd]
+PUSHB_1
+ 12
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 1
+SHP[rp2]
+PUSHB_1
+ 13
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SHP[rp2]
+PUSHB_3
+ 12
+ 13
+ 10
+CALL
+PUSHB_4
+ 64
+ 12
+ 15
+ 9
+CALL
+PUSHB_2
+ 22
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 8
+ 15
+SRP1
+SRP2
+PUSHB_1
+ 16
+IP
+PUSHB_1
+ 5
+SRP1
+PUSHB_1
+ 17
+IP
+PUSHB_1
+ 19
+SRP2
+PUSHB_1
+ 18
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1101 982 m 5,0,-1
+ 1061.56 982 l 5,1,2
+ 1047.45 1127.63 1047.45 1127.63 960.654 1202.31 c 132,-1,3
+ 873.855 1277 873.855 1277 713 1277 c 6,4,-1
+ 316.71 1277 l 5,5,-1
+ 814 729.069 l 5,6,-1
+ 814 703.128 l 5,7,-1
+ 278.592 188 l 5,8,-1
+ 893 188 l 6,9,10
+ 989.179 188 989.179 188 1023.14 224.537 c 132,-1,11
+ 1057.11 261.075 1057.11 261.075 1065.62 364 c 5,12,-1
+ 1105 364 l 5,13,-1
+ 1105 1 l 5,14,-1
+ 23 1 l 5,15,-1
+ 23 50.873 l 5,16,-1
+ 643.966 648.767 l 5,17,-1
+ 50 1302.93 l 5,18,-1
+ 50 1343 l 5,19,-1
+ 1101 1343 l 5,20,-1
+ 1101 982 l 5,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Tau
+Encoding: 927 932 927
+Width: 1251
+Flags: W
+HStem: 1 31.0928<331 445.219 820.217 935> 1275 68<195.126 521.485 747.871 1076.76>
+VStem: 38.1455 37.4443<1005 1098.83> 529 207<67.1356 1263.72> 1188.49 41.5107<1005 1113.52>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 23
+ 0
+ 0
+CALL
+PUSHB_1
+ 24
+MDRP[min,rnd,black]
+PUSHB_1
+ 21
+SHP[rp2]
+PUSHB_1
+ 2
+MDAP[rnd]
+PUSHB_1
+ 13
+SHP[rp1]
+PUSHB_1
+ 7
+MDRP[min,rnd,black]
+PUSHB_3
+ 2
+ 7
+ 10
+CALL
+PUSHB_4
+ 64
+ 2
+ 10
+ 9
+CALL
+PUSHB_1
+ 5
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 28
+MDAP[rnd]
+PUSHB_1
+ 6
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+PUSHB_1
+ 5
+SRP0
+PUSHB_2
+ 27
+ 1
+CALL
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_3
+ 18
+ 27
+ 10
+CALL
+PUSHB_4
+ 64
+ 18
+ 22
+ 9
+CALL
+PUSHB_3
+ 27
+ 18
+ 10
+CALL
+PUSHB_4
+ 64
+ 27
+ 23
+ 9
+CALL
+PUSHB_1
+ 18
+SRP0
+PUSHB_2
+ 10
+ 1
+CALL
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_2
+ 29
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+529 1210 m 6,0,1
+ 529 1275 529 1275 434 1275 c 4,2,3
+ 224.15 1275 224.15 1275 160.145 1220.14 c 132,-1,4
+ 96.1387 1165.28 96.1387 1165.28 75.5898 1005 c 5,5,-1
+ 38.1455 1005 l 5,6,-1
+ 47.8584 1343 l 5,7,-1
+ 1230 1343 l 5,8,-1
+ 1230 1005 l 5,9,-1
+ 1188.49 1005 l 5,10,11
+ 1170.95 1164.16 1170.95 1164.16 1110.95 1219.58 c 132,-1,12
+ 1050.96 1275 1050.96 1275 825 1275 c 6,13,-1
+ 811 1275 l 6,14,15
+ 759.004 1275 759.004 1275 747.502 1264.07 c 132,-1,16
+ 736 1253.15 736 1253.15 736 1210 c 6,17,-1
+ 736 234 l 6,18,19
+ 736 100.592 736 100.592 776.689 68.1426 c 132,-1,20
+ 817.38 35.6943 817.38 35.6943 935 32.1357 c 5,21,-1
+ 935 1 l 5,22,-1
+ 331 1 l 5,23,-1
+ 331 32.0928 l 5,24,25
+ 454.881 34.7812 454.881 34.7812 491.94 73.3848 c 132,-1,26
+ 529 111.988 529 111.988 529 244 c 6,27,-1
+ 529 1210 l 6,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Upsilon
+Encoding: 928 933 928
+Width: 1413
+Flags: W
+HStem: 1 31<458 566.12 928.547 1033> 1311.76 31.2402<32 113.824 517.222 618 986 1073.93 1320.07 1384>
+VStem: 644 203<72.1866 583.53>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 27
+ 0
+ 0
+CALL
+PUSHB_1
+ 28
+MDRP[min,rnd,black]
+PUSHB_1
+ 25
+SHP[rp2]
+PUSHB_1
+ 37
+MDAP[rnd]
+PUSHB_3
+ 0
+ 14
+ 17
+SHP[rp1]
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 38
+MDRP[min,rnd,black]
+PUSHB_1
+ 15
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 40
+MDAP[rnd]
+PUSHB_1
+ 32
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_3
+ 22
+ 32
+ 10
+CALL
+PUSHB_4
+ 64
+ 22
+ 26
+ 9
+CALL
+PUSHB_3
+ 32
+ 22
+ 10
+CALL
+PUSHB_4
+ 64
+ 32
+ 27
+ 9
+CALL
+PUSHB_2
+ 41
+ 1
+CALL
+PUSHB_2
+ 22
+ 32
+SRP1
+SRP2
+PUSHB_1
+ 7
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 37
+ 28
+SRP1
+SRP2
+PUSHB_2
+ 3
+ 7
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+618 1311.58 m 5,0,1
+ 529.061 1303.61 529.061 1303.61 500.53 1290.4 c 132,-1,2
+ 472 1277.2 472 1277.2 472 1245 c 4,3,4
+ 472 1227.06 472 1227.06 479.271 1208.36 c 132,-1,5
+ 486.543 1189.67 486.543 1189.67 507.834 1158.24 c 6,6,-1
+ 807.133 697.618 l 5,7,-1
+ 1064 1118.59 l 5,8,-1
+ 1064 1120.59 l 5,9,10
+ 1121 1213.76 1121 1213.76 1121 1243 c 4,11,12
+ 1121 1275.03 1121 1275.03 1095.56 1288.28 c 132,-1,13
+ 1070.12 1301.53 1070.12 1301.53 986 1311.45 c 5,14,-1
+ 986 1343 l 5,15,-1
+ 1384 1343 l 5,16,-1
+ 1384 1313.43 l 5,17,18
+ 1324.61 1305.71 1324.61 1305.71 1283.94 1275.58 c 132,-1,19
+ 1243.27 1245.46 1243.27 1245.46 1181.76 1147.64 c 6,20,-1
+ 847 605.419 l 5,21,-1
+ 847 193 l 6,22,23
+ 847 103.739 847 103.739 885.6 69.7725 c 132,-1,24
+ 924.198 35.8057 924.198 35.8057 1033 32.1494 c 5,25,-1
+ 1033 1 l 5,26,-1
+ 458 1 l 5,27,-1
+ 458 32 l 5,28,-1
+ 463 32 l 6,29,30
+ 565.052 32 565.052 32 604.525 70.9551 c 132,-1,31
+ 644 109.909 644 109.909 644 207 c 6,32,-1
+ 644 583.53 l 5,33,-1
+ 227.157 1200.78 l 6,34,35
+ 189.496 1257.78 189.496 1257.78 144.233 1282.92 c 132,-1,36
+ 98.9707 1308.07 98.9707 1308.07 32 1311.76 c 5,37,-1
+ 32 1343 l 5,38,-1
+ 618 1343 l 5,39,-1
+ 618 1311.58 l 5,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Phi
+Encoding: 929 934 929
+Width: 1563
+Flags: W
+HStem: 1 31.0986<478 590.707 973.964 1085> 1080.51 40.4902<675.514 681 884 889.489> 1311.91 31.0928<478 596.891 970.038 1085>
+VStem: 75 229<498.481 864.219> 681 203<73.4436 229.658 271.628 1080.51 1121.17 1272.1> 1258 230<498.155 864.532>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 36
+ 0
+ 0
+CALL
+PUSHB_1
+ 37
+MDRP[min,rnd,black]
+PUSHB_1
+ 34
+SHP[rp2]
+PUSHB_1
+ 3
+MDAP[rnd]
+PUSHB_1
+ 10
+SHP[rp1]
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_1
+ 48
+SHP[rp2]
+PUSHB_1
+ 53
+MDAP[rnd]
+PUSHB_1
+ 18
+SHP[rp1]
+PUSHB_1
+ 54
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 56
+MDAP[rnd]
+PUSHB_1
+ 45
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 14
+SRP0
+PUSHB_2
+ 40
+ 1
+CALL
+PUSHB_2
+ 9
+ 49
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 31
+MDRP[min,rnd,black]
+PUSHB_2
+ 3
+ 21
+SHP[rp2]
+SHP[rp2]
+PUSHB_3
+ 31
+ 40
+ 10
+CALL
+PUSHB_4
+ 64
+ 31
+ 35
+ 9
+CALL
+PUSHB_1
+ 18
+SHP[rp2]
+PUSHB_3
+ 40
+ 31
+ 10
+CALL
+PUSHB_4
+ 64
+ 40
+ 36
+ 9
+CALL
+PUSHB_1
+ 53
+SHP[rp2]
+PUSHB_1
+ 31
+SRP0
+PUSHB_2
+ 8
+ 1
+CALL
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_2
+ 57
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 3
+ 37
+SRP1
+SRP2
+PUSHB_6
+ 5
+ 8
+ 9
+ 14
+ 26
+ 45
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 22
+SRP1
+PUSHB_2
+ 24
+ 47
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1166.21 960.357 m 132,-1,1
+ 1074.41 1061.79 1074.41 1061.79 889.489 1079.98 c 6,2,-1
+ 884 1080.52 l 5,3,-1
+ 884 271.628 l 5,4,-1
+ 889.358 272.013 l 6,5,6
+ 1072.34 285.155 1072.34 285.155 1165.17 386.606 c 132,-1,7
+ 1258 488.058 1258 488.058 1258 674 c 4,8,0
+ 1258 858.927 1258 858.927 1166.21 960.357 c 132,-1,1
+681 271.576 m 5,9,-1
+ 681 1080.51 l 5,10,-1
+ 675.514 1079.98 l 6,11,12
+ 489.605 1061.79 489.605 1061.79 396.803 960.366 c 132,-1,13
+ 304 858.942 304 858.942 304 674 c 4,14,15
+ 304 488.043 304 488.043 396.826 387.609 c 132,-1,16
+ 489.651 287.175 489.651 287.175 675.594 272.017 c 6,17,-1
+ 681 271.576 l 5,9,-1
+1085 1311.91 m 5,18,19
+ 964.258 1309.26 964.258 1309.26 924.129 1273.24 c 132,-1,20
+ 884 1237.23 884 1237.23 884 1137 c 6,21,-1
+ 884 1121.17 l 5,22,-1
+ 888.824 1121 l 6,23,24
+ 1172.26 1111.06 1172.26 1111.06 1330.13 993.275 c 132,-1,25
+ 1488 875.492 1488 875.492 1488 676 c 4,26,27
+ 1488 488.503 1488 488.503 1328.59 369.193 c 132,-1,28
+ 1169.18 249.884 1169.18 249.884 888.646 229.987 c 6,29,-1
+ 884 229.658 l 5,30,-1
+ 884 203 l 6,31,32
+ 884 107.68 884 107.68 927.109 71.2422 c 132,-1,33
+ 970.218 34.8047 970.218 34.8047 1085 32.1006 c 5,34,-1
+ 1085 1 l 5,35,-1
+ 478 1 l 5,36,-1
+ 478 32.0986 l 5,37,38
+ 594.783 34.7939 594.783 34.7939 637.892 72.2578 c 132,-1,39
+ 681 109.721 681 109.721 681 209 c 6,40,-1
+ 681 229.659 l 5,41,-1
+ 676.353 229.987 l 6,42,43
+ 394.815 249.884 394.815 249.884 234.908 369.195 c 132,-1,44
+ 75 488.508 75 488.508 75 676 c 4,45,46
+ 75 874.494 75 874.494 233.369 992.775 c 132,-1,47
+ 391.738 1111.06 391.738 1111.06 676.175 1121 c 6,48,-1
+ 681 1121.17 l 5,49,-1
+ 681 1137 l 6,50,51
+ 681 1238.25 681 1238.25 640.854 1273.77 c 132,-1,52
+ 600.707 1309.28 600.707 1309.28 478 1311.91 c 5,53,-1
+ 478 1343 l 5,54,-1
+ 1085 1343 l 5,55,-1
+ 1085 1311.91 l 5,18,19
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Chi
+Encoding: 930 935 930
+Width: 1479
+Flags: W
+HStem: 1 31<30 108.498 363.571 474 859 957.826 1398.37 1468> 1312 31<54 151.738 538.009 652 947 1054.48 1320.39 1433>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 54
+ 0
+ 0
+CALL
+PUSHB_1
+ 36
+SHP[rp1]
+PUSHB_1
+ 55
+MDRP[min,rnd,black]
+PUSHB_3
+ 35
+ 38
+ 52
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 5
+MDAP[rnd]
+PUSHB_3
+ 8
+ 23
+ 26
+SHP[rp1]
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_1
+ 24
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 59
+MDAP[rnd]
+PUSHB_2
+ 60
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 5
+ 55
+SRP1
+SRP2
+PUSHB_4
+ 16
+ 31
+ 41
+ 45
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+653.314 667.812 m 5,0,-1
+ 315.057 1133.92 l 6,1,2
+ 236.552 1243.63 236.552 1243.63 186.549 1277.81 c 132,-1,3
+ 136.546 1312 136.546 1312 68 1312 c 6,4,-1
+ 54 1312 l 5,5,-1
+ 54 1343 l 5,6,-1
+ 652 1343 l 5,7,-1
+ 652 1312 l 5,8,-1
+ 639 1312 l 6,9,10
+ 569 1312 569 1312 537 1298.67 c 132,-1,11
+ 505 1285.33 505 1285.33 505 1253 c 4,12,13
+ 505 1237.95 505 1237.95 512.317 1221.23 c 132,-1,14
+ 519.635 1204.5 519.635 1204.5 540.936 1175.09 c 6,15,-1
+ 785.742 829.718 l 5,16,-1
+ 1027.9 1129.88 l 6,17,18
+ 1055.25 1164.31 1055.25 1164.31 1071.62 1197.57 c 132,-1,19
+ 1088 1230.84 1088 1230.84 1088 1251 c 4,20,21
+ 1088 1283.38 1088 1283.38 1055.5 1296.48 c 132,-1,22
+ 1023.01 1309.58 1023.01 1309.58 947 1311.86 c 5,23,-1
+ 947 1343 l 5,24,-1
+ 1433 1343 l 5,25,-1
+ 1433 1312 l 5,26,-1
+ 1413 1312 l 6,27,28
+ 1340.7 1312 1340.7 1312 1286.72 1281.96 c 132,-1,29
+ 1232.74 1251.91 1232.74 1251.91 1157.15 1160.19 c 6,30,-1
+ 827.705 764.252 l 5,31,-1
+ 1230.9 192.133 l 6,32,33
+ 1288.45 109.348 1288.45 109.348 1342.05 74.2822 c 132,-1,34
+ 1395.65 39.2168 1395.65 39.2168 1468 32.4189 c 5,35,-1
+ 1468 1 l 5,36,-1
+ 859 1 l 5,37,-1
+ 859 32 l 5,38,-1
+ 864.194 32.0078 l 5,39,40
+ 1023 44.3818 1023 44.3818 1023 105 c 4,41,42
+ 1023 122.235 1023 122.235 1007.63 151.438 c 132,-1,43
+ 992.262 180.639 992.262 180.639 958.085 227.883 c 5,44,-1
+ 700.337 602.328 l 5,45,-1
+ 414.116 251.148 l 6,46,47
+ 363.819 188.779 363.819 188.779 346.41 156.521 c 132,-1,48
+ 329 124.263 329 124.263 329 98 c 4,49,50
+ 329 62.7666 329 62.7666 360.506 48.5889 c 132,-1,51
+ 392.013 34.4111 392.013 34.4111 474 32.127 c 5,52,-1
+ 474 1 l 5,53,-1
+ 30 1 l 5,54,-1
+ 30 32.0449 l 5,55,56
+ 85.1777 33.0439 85.1777 33.0439 127.711 56.5625 c 132,-1,57
+ 170.245 80.0811 170.245 80.0811 243.856 168.818 c 6,58,-1
+ 653.314 667.812 l 5,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Psi
+Encoding: 931 936 931
+Width: 1628
+Flags: W
+HStem: 1 31.1338<509 623.956 1012.64 1119.24> 426.84 48.8896<704.737 710 921 926.292> 1306 47<7 117.188 509 650.276 981.313 1121 1515.6 1623>
+VStem: 159 211<657.898 1255.52> 710 211<75.0415 426.839 475.729 1268.55> 1260 212<657.902 1256.14>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 38
+ 0
+ 0
+CALL
+PUSHB_1
+ 39
+MDRP[min,rnd,black]
+PUSHB_1
+ 36
+SHP[rp2]
+PUSHB_1
+ 43
+MDAP[rnd]
+PUSHB_1
+ 31
+SHP[rp1]
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_1
+ 11
+SHP[rp2]
+PUSHB_1
+ 51
+MDAP[rnd]
+PUSHB_3
+ 4
+ 7
+ 23
+SHP[rp1]
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 56
+MDRP[min,rnd,black]
+PUSHB_4
+ 5
+ 19
+ 22
+ 53
+DEPTH
+SLOOP
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 64
+MDAP[rnd]
+PUSHB_1
+ 47
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 60
+MDRP[min,rnd,black]
+PUSHB_3
+ 47
+ 60
+ 10
+CALL
+PUSHB_4
+ 64
+ 47
+ 53
+ 9
+CALL
+PUSHB_1
+ 60
+SRP0
+PUSHB_2
+ 42
+ 1
+CALL
+PUSHB_1
+ 0
+SHP[rp2]
+PUSHB_1
+ 33
+MDRP[min,rnd,black]
+PUSHB_1
+ 10
+SHP[rp2]
+PUSHB_3
+ 33
+ 42
+ 10
+CALL
+PUSHB_4
+ 64
+ 33
+ 7
+ 9
+CALL
+PUSHB_1
+ 36
+SHP[rp2]
+PUSHB_3
+ 42
+ 33
+ 10
+CALL
+PUSHB_4
+ 64
+ 42
+ 4
+ 9
+CALL
+PUSHB_1
+ 38
+SHP[rp2]
+PUSHB_1
+ 33
+SRP0
+PUSHB_2
+ 15
+ 1
+CALL
+PUSHB_1
+ 28
+MDRP[min,rnd,black]
+PUSHB_3
+ 28
+ 15
+ 10
+CALL
+PUSHB_4
+ 64
+ 28
+ 22
+ 9
+CALL
+PUSHB_2
+ 65
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 0
+ 43
+SRP1
+SRP2
+PUSHB_2
+ 30
+ 45
+IP
+IP
+PUSHB_1
+ 51
+SRP1
+PUSHB_4
+ 16
+ 28
+ 47
+ 59
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+710 475.729 m 5,0,-1
+ 710 1126 l 6,1,2
+ 710 1233.21 710 1233.21 669.897 1269.71 c 132,-1,3
+ 629.795 1306.22 629.795 1306.22 509 1311.79 c 5,4,-1
+ 509 1343 l 5,5,-1
+ 1121 1343 l 5,6,-1
+ 1121 1311.78 l 5,7,8
+ 1002.19 1306.2 1002.19 1306.2 961.594 1269.71 c 132,-1,9
+ 921 1233.23 921 1233.23 921 1126 c 6,10,-1
+ 921 475.699 l 5,11,-1
+ 926.292 476.009 l 6,12,13
+ 1116.26 487.124 1116.26 487.124 1188.13 562.562 c 132,-1,14
+ 1260 638 1260 638 1260 838 c 6,15,-1
+ 1260 1020 l 6,16,17
+ 1260 1205.24 1260 1205.24 1319.2 1279.12 c 132,-1,18
+ 1378.4 1353 1378.4 1353 1520 1353 c 4,19,20
+ 1549.81 1353 1549.81 1353 1575 1351.1 c 132,-1,21
+ 1600.2 1349.2 1600.2 1349.2 1623 1345.72 c 5,22,-1
+ 1623 1306 l 5,23,-1
+ 1591 1306 l 6,24,25
+ 1524.29 1306 1524.29 1306 1498.14 1265.74 c 132,-1,26
+ 1472 1225.48 1472 1225.48 1472 1086 c 6,27,-1
+ 1472 860 l 6,28,29
+ 1472 652.415 1472 652.415 1335.59 544.18 c 132,-1,30
+ 1199.19 435.943 1199.19 435.943 925.836 426.997 c 6,31,-1
+ 921 426.839 l 5,32,-1
+ 921 219 l 6,33,34
+ 921 111.813 921 111.813 962.055 73.8379 c 132,-1,35
+ 1003.11 35.8633 1003.11 35.8633 1120.76 32.1465 c 5,36,-1
+ 1119.24 1 l 5,37,-1
+ 509 1 l 5,38,-1
+ 509 32.1338 l 5,39,40
+ 629.732 35.7412 629.732 35.7412 669.866 71.2441 c 132,-1,41
+ 710 106.747 710 106.747 710 219 c 6,42,-1
+ 710 426.84 l 5,43,-1
+ 705.163 426.997 l 6,44,45
+ 430.819 435.943 430.819 435.943 294.91 544.177 c 132,-1,46
+ 159 652.41 159 652.41 159 860 c 6,47,-1
+ 159 1086 l 6,48,49
+ 159 1225.48 159 1225.48 132.857 1265.74 c 132,-1,50
+ 106.715 1306 106.715 1306 39 1306 c 6,51,-1
+ 7 1306 l 5,52,-1
+ 7 1345.77 l 5,53,54
+ 27.9932 1349.21 27.9932 1349.21 53.0898 1351.11 c 132,-1,55
+ 78.1875 1353 78.1875 1353 109 1353 c 4,56,57
+ 249.614 1353 249.614 1353 309.807 1278.62 c 132,-1,58
+ 370 1204.23 370 1204.23 370 1020 c 6,59,-1
+ 370 838 l 6,60,61
+ 370 636 370 636 441.375 561.056 c 132,-1,62
+ 512.751 486.111 512.751 486.111 704.737 476.007 c 6,63,-1
+ 710 475.729 l 5,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: Omega
+Encoding: 932 937 932
+Width: 1573
+Flags: W
+HStem: 1 350<136 178.06 616.242 683 890 956.034 1394.5 1437> 1 174<217.569 615 958 1354.42> 1310 63<606.963 965.645>
+VStem: 107 232<616.529 1044.91> 136 37.3037<254.102 351> 615 68<175 305.173> 890 68<175 305.17> 1234 231<617.086 1047.23> 1399.65 37.3457<255.432 351>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 21
+ 0
+ 0
+CALL
+PUSHB_1
+ 5
+SHP[rp1]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SHP[rp2]
+PUSHB_3
+ 21
+ 0
+ 0
+CALL
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_3
+ 3
+ 7
+ 19
+SHP[rp2]
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 13
+MDAP[rnd]
+PUSHB_1
+ 35
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 44
+MDAP[rnd]
+PUSHB_1
+ 32
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 16
+MDRP[min,rnd,black]
+PUSHB_4
+ 22
+ 16
+ 32
+ 8
+CALL
+PUSHB_1
+ 23
+MDRP[min,rnd,black]
+PUSHB_1
+ 16
+SRP0
+PUSHB_2
+ 27
+ 1
+CALL
+PUSHB_1
+ 20
+MDRP[min,rnd,black]
+PUSHB_1
+ 20
+SRP0
+PUSHB_2
+ 6
+ 1
+CALL
+PUSHB_1
+ 43
+MDRP[min,rnd,black]
+PUSHB_1
+ 43
+SRP0
+PUSHB_2
+ 10
+ 1
+CALL
+PUSHB_1
+ 38
+MDRP[min,rnd,black]
+PUSHB_4
+ 4
+ 38
+ 10
+ 8
+CALL
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_1
+ 3
+MDAP[rnd]
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_2
+ 45
+ 1
+CALL
+PUSHB_2
+ 6
+ 20
+SRP1
+SRP2
+PUSHB_2
+ 13
+ 35
+IP
+IP
+PUSHB_2
+ 3
+ 32
+SRP1
+SRP2
+PUSHB_1
+ 2
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 22
+ 26
+SRP1
+SRP2
+PUSHB_2
+ 28
+ 42
+IP
+IP
+PUSHB_1
+ 13
+SRP1
+PUSHB_2
+ 32
+ 38
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1214 175 m 6,0,1
+ 1319.11 175 1319.11 175 1355.58 212.492 c 132,-1,2
+ 1392.04 249.983 1392.04 249.983 1399.65 351 c 5,3,-1
+ 1437 351 l 5,4,-1
+ 1437 1 l 5,5,-1
+ 890 1 l 5,6,-1
+ 890 360.898 l 5,7,8
+ 1048.05 393.071 1048.05 393.071 1141.03 519.214 c 132,-1,9
+ 1234 645.356 1234 645.356 1234 832 c 4,10,11
+ 1234 1048.97 1234 1048.97 1112.59 1179.48 c 132,-1,12
+ 991.178 1310 991.178 1310 786 1310 c 4,13,14
+ 581.828 1310 581.828 1310 460.414 1179.99 c 132,-1,15
+ 339 1049.97 339 1049.97 339 832 c 4,16,17
+ 339 644.36 339 644.36 430.983 519.203 c 132,-1,18
+ 522.967 394.045 522.967 394.045 683 360.912 c 5,19,-1
+ 683 1 l 5,20,-1
+ 136 1 l 5,21,-1
+ 136 351 l 5,22,-1
+ 173.304 351 l 5,23,24
+ 179.958 250.991 179.958 250.991 216.413 212.996 c 132,-1,25
+ 252.868 175 252.868 175 358 175 c 6,26,-1
+ 615 175 l 5,27,-1
+ 615 305.173 l 5,28,-1
+ 610.895 305.919 l 6,29,30
+ 370.491 349.629 370.491 349.629 238.746 487.318 c 132,-1,31
+ 107 625.007 107 625.007 107 832 c 4,32,33
+ 107 1075.59 107 1075.59 293.375 1224.3 c 132,-1,34
+ 479.75 1373 479.75 1373 786 1373 c 4,35,36
+ 1093.25 1373 1093.25 1373 1279.12 1224.3 c 132,-1,37
+ 1465 1075.6 1465 1075.6 1465 832 c 4,38,39
+ 1465 626.002 1465 626.002 1333.25 487.814 c 132,-1,40
+ 1201.5 349.627 1201.5 349.627 962.102 305.919 c 6,41,-1
+ 958 305.17 l 5,42,-1
+ 958 175 l 5,43,-1
+ 1214 175 l 6,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: alpha
+Encoding: 933 945 933
+Width: 1292
+Flags: W
+HStem: -15 143<1029.27 1185.07> -15 45<447.052 649.441> 888 53<445.861 659.788>
+VStem: 75 205<250.149 671.947> 1202.3 29.6963<177.756 222>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 39
+MDAP[rnd]
+PUSHB_1
+ 31
+SHP[rp1]
+PUSHB_1
+ 13
+MDRP[min,rnd,black]
+PUSHB_1
+ 23
+MDRP[min,rnd,black]
+PUSHB_1
+ 7
+MDAP[rnd]
+PUSHB_1
+ 45
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 51
+MDAP[rnd]
+PUSHB_1
+ 42
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 10
+MDRP[min,rnd,black]
+PUSHB_1
+ 10
+SRP0
+PUSHB_2
+ 26
+ 1
+CALL
+PUSHB_1
+ 27
+MDRP[min,rnd,black]
+PUSHB_2
+ 52
+ 1
+CALL
+PUSHB_1
+ 54
+SMD
+PUSHW_3
+ 15905
+ -3934
+ 21
+CALL
+SPVFS
+SFVTPV
+PUSHB_1
+ 1
+SRP0
+PUSHB_1
+ 50
+MDRP[grey]
+PUSHB_2
+ 15
+ 29
+MIRP[rp0,min,black]
+PUSHB_1
+ 14
+MDRP[grey]
+PUSHB_1
+ 1
+SRP0
+PUSHB_4
+ 2
+ 1
+ 50
+ 19
+CALL
+PUSHB_4
+ 49
+ 1
+ 50
+ 19
+CALL
+PUSHB_3
+ 2
+ 1
+ 50
+DUP
+ROLL
+DUP
+ROLL
+SWAP
+SPVTL[parallel]
+SFVTPV
+SRP1
+SRP2
+IP
+PUSHB_1
+ 49
+IP
+SVTCA[y-axis]
+PUSHB_5
+ 2
+ 14
+ 15
+ 49
+ 50
+MDAP[no-rnd]
+MDAP[no-rnd]
+MDAP[no-rnd]
+MDAP[no-rnd]
+MDAP[no-rnd]
+SVTCA[x-axis]
+PUSHB_5
+ 2
+ 14
+ 15
+ 49
+ 50
+MDAP[no-rnd]
+MDAP[no-rnd]
+MDAP[no-rnd]
+MDAP[no-rnd]
+MDAP[no-rnd]
+PUSHB_1
+ 64
+SMD
+SVTCA[x-axis]
+PUSHB_2
+ 26
+ 10
+SRP1
+SRP2
+PUSHB_4
+ 18
+ 31
+ 39
+ 45
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 7
+ 23
+SRP1
+SRP2
+PUSHB_5
+ 10
+ 26
+ 27
+ 35
+ 42
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+736.656 128 m 132,-1,1
+ 804.698 226 804.698 226 856.902 486.016 c 6,2,-1
+ 857.105 487.03 l 5,3,-1
+ 856.89 488.043 l 6,4,5
+ 811.654 700.148 811.654 700.148 739.561 794.074 c 132,-1,6
+ 667.466 888 667.466 888 551 888 c 4,7,8
+ 425.254 888 425.254 888 352.627 773.727 c 132,-1,9
+ 280 659.454 280 659.454 280 465 c 4,10,11
+ 280 254.594 280 254.594 348.598 142.297 c 132,-1,12
+ 417.195 30 417.195 30 549 30 c 4,13,0
+ 668.615 30 668.615 30 736.656 128 c 132,-1,1
+1136.57 913 m 5,14,-1
+ 1060.16 613.252 l 6,15,16
+ 1039.22 533.473 1039.22 533.473 1012.29 457.676 c 132,-1,17
+ 985.361 381.88 985.361 381.88 953.464 313.104 c 6,18,-1
+ 952.576 311.188 l 5,19,-1
+ 953.329 309.216 l 6,20,21
+ 987.648 219.379 987.648 219.379 1027.69 173.689 c 132,-1,22
+ 1067.73 128 1067.73 128 1114 128 c 4,23,24
+ 1149.26 128 1149.26 128 1172.42 154.256 c 132,-1,25
+ 1195.59 180.513 1195.59 180.513 1202.3 222 c 5,26,-1
+ 1232 222 l 5,27,-1
+ 1232 205 l 6,28,29
+ 1232 92.3379 1232 92.3379 1201.06 38.6689 c 132,-1,30
+ 1170.11 -15 1170.11 -15 1108 -15 c 4,31,32
+ 1041.52 -15 1041.52 -15 1002.57 37.582 c 132,-1,33
+ 963.619 90.1641 963.619 90.1641 926.858 241.183 c 6,34,-1
+ 923.951 253.125 l 5,35,-1
+ 917.696 242.545 l 6,36,37
+ 837.292 106.553 837.292 106.553 743.904 45.7764 c 132,-1,38
+ 650.517 -15 650.517 -15 524 -15 c 4,39,40
+ 331.17 -15 331.17 -15 203.085 121.986 c 132,-1,41
+ 75 258.974 75 258.974 75 469 c 4,42,43
+ 75 658.034 75 658.034 206.589 799.518 c 132,-1,44
+ 338.178 941 338.178 941 518 941 c 4,45,46
+ 659.037 941 659.037 941 748.245 858.199 c 132,-1,47
+ 837.453 775.398 837.453 775.398 874.117 608.925 c 6,48,-1
+ 878.821 587.565 l 5,49,-1
+ 955.953 913 l 5,50,-1
+ 1136.57 913 l 5,14,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: beta
+Encoding: 934 946 934
+Width: 1124
+Flags: W
+HStem: -15 43<509 693.47> 746 115<422.895 598.057> 1357 49<428.239 625.44>
+VStem: 142 170<-412 1101.26> 742 179<962.504 1261.34> 836 187<204.278 591.532>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 55
+MDAP[rnd]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_3
+ 3
+ 55
+ 10
+CALL
+PUSHB_4
+ 64
+ 3
+ 58
+ 9
+CALL
+PUSHB_1
+ 16
+MDAP[rnd]
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_1
+ 32
+MDAP[rnd]
+PUSHB_1
+ 41
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 59
+MDAP[rnd]
+PUSHB_1
+ 37
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 36
+MDRP[min,rnd,black]
+PUSHB_1
+ 36
+SRP0
+PUSHB_2
+ 6
+ 1
+CALL
+PUSHB_1
+ 52
+MDRP[min,rnd,black]
+PUSHB_4
+ 44
+ 52
+ 6
+ 8
+CALL
+PUSHB_1
+ 29
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+MDAP[rnd]
+PUSHB_1
+ 44
+MDRP[min,rnd,black]
+PUSHB_2
+ 60
+ 1
+CALL
+PUSHB_2
+ 29
+ 36
+SRP1
+SRP2
+PUSHB_7
+ 3
+ 14
+ 19
+ 41
+ 48
+ 55
+ 58
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 16
+ 3
+SRP1
+SRP2
+PUSHB_2
+ 6
+ 52
+IP
+IP
+PUSHB_1
+ 22
+SRP1
+PUSHB_4
+ 9
+ 25
+ 26
+ 48
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 32
+SRP2
+PUSHB_2
+ 29
+ 44
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+412.128 159 m 1,0,1
+ 427.392 102.724 427.392 102.724 480.91 65.3618 c 128,-1,2
+ 534.428 28 534.428 28 604 28 c 0,3,4
+ 711.708 28 711.708 28 773.854 123.256 c 128,-1,5
+ 836 218.513 836 218.513 836 381 c 0,6,7
+ 836 544.344 836 544.344 776.68 646.76 c 128,-1,8
+ 717.351 749.192 717.351 749.192 599.52 786.764 c 2,9,10
+ 598.08 787.223 l 1,11,-1
+ 596.626 786.808 l 2,12,13
+ 591.25 785.273 591.25 785.273 575.957 778.563 c 0,14,15
+ 501.744 746 501.744 746 463 746 c 0,16,17
+ 436.207 746 436.207 746 422.104 761.469 c 128,-1,18
+ 408 776.938 408 776.938 408 807 c 0,19,20
+ 408 835.731 408 835.731 422.439 848.366 c 128,-1,21
+ 436.879 861 436.879 861 469 861 c 0,22,23
+ 495.116 861 495.116 861 576.227 831.325 c 1,24,-1
+ 606.072 819.6 l 1,25,-1
+ 607.953 820.397 l 2,26,27
+ 675.596 849.091 675.596 849.091 708.799 912.432 c 128,-1,28
+ 742 975.769 742 975.769 742 1075 c 0,29,30
+ 742 1204.67 742 1204.67 684.749 1280.83 c 128,-1,31
+ 627.497 1357 627.497 1357 530 1357 c 0,32,33
+ 414.082 1357 414.082 1357 363.041 1266.66 c 128,-1,34
+ 312 1176.31 312 1176.31 312 965 c 2,35,-1
+ 312 -412 l 5,36,-1
+ 142 -412 l 5,37,-1
+ 142 774 l 2,38,39
+ 142 1077.49 142 1077.49 251.339 1241.74 c 128,-1,40
+ 360.678 1406 360.678 1406 561 1406 c 0,41,42
+ 722.176 1406 722.176 1406 821.588 1322.34 c 128,-1,43
+ 921 1238.67 921 1238.67 921 1102 c 0,44,45
+ 921 1005.96 921 1005.96 851.6 931.148 c 128,-1,46
+ 782.205 856.34 782.205 856.34 649.408 811.74 c 2,47,-1
+ 633.084 806.258 l 1,48,-1
+ 649.806 802.145 l 2,49,50
+ 835.383 756.495 835.383 756.495 929.192 657.749 c 128,-1,51
+ 1023 559.004 1023 559.004 1023 412 c 0,52,53
+ 1023 224.972 1023 224.972 910.914 104.986 c 128,-1,54
+ 798.828 -15 798.828 -15 631 -15 c 0,55,56
+ 521.552 -15 521.552 -15 450.858 33.5718 c 128,-1,57
+ 380.165 82.1436 380.165 82.1436 367.786 159 c 1,58,-1
+ 412.128 159 l 1,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: gamma
+Encoding: 935 947 935
+Width: 1156
+Flags: W
+HStem: -411 90<325.175 514.313> 838 121<91.5166 194.412>
+LayerCount: 2
+Fore
+SplineSet
+520.295 101 m 1,0,1
+ 465.196 297 465.196 297 395.958 468 c 0,2,3
+ 288.03 732.618 288.03 732.618 204.95 787 c 0,4,5
+ 122.454 841 122.454 841 -17.9629 838 c 1,6,-1
+ 91.5166 959 l 1,7,8
+ 339.59 959 339.59 959 487.667 701 c 0,9,10
+ 566.297 564 566.297 564 660.442 234 c 1,11,12
+ 949.997 653 949.997 653 910.344 857 c 0,13,14
+ 899.458 913 899.458 913 861.517 959 c 1,15,-1
+ 1070.52 959 l 1,16,17
+ 1079.38 934 1079.38 934 1082.88 916 c 0,18,19
+ 1108.15 785.962 1108.15 785.962 933.489 527 c 2,20,-1
+ 686.633 161 l 1,21,22
+ 702.489 100 702.489 100 713.764 42 c 0,23,24
+ 744.504 -131.977 744.504 -131.977 687.966 -254 c 0,25,26
+ 616.483 -411 616.483 -411 442.483 -411 c 0,27,28
+ 374.483 -411 374.483 -411 311.319 -369 c 0,29,30
+ 246.943 -326.194 246.943 -326.194 235.521 -262 c 0,31,32
+ 206.02 -90 206.02 -90 520.295 101 c 1,0,1
+545.541 38 m 1,33,34
+ 291.298 -140 291.298 -140 310.272 -235 c 0,35,36
+ 326.989 -321 326.989 -321 412.989 -321 c 0,37,38
+ 515.766 -321 515.766 -321 550.607 -211 c 0,39,40
+ 578.741 -119.502 578.741 -119.502 561.536 -34 c 0,41,42
+ 553.373 8 553.373 8 545.541 38 c 1,33,34
+EndSplineSet
+Validated: 33
+EndChar
+
+StartChar: delta
+Encoding: 936 948 936
+Width: 1012
+Flags: W
+HStem: -18 58<424.937 644.116> 832 48<390.622 552.878> 1391 48<351.022 543.948>
+VStem: 77 178<230.198 642.954> 216 103<1206.85 1365.63> 763 178<222.136 641.893>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 38
+MDAP[rnd]
+PUSHB_1
+ 11
+MDRP[min,rnd,black]
+PUSHB_1
+ 5
+MDAP[rnd]
+PUSHB_1
+ 44
+MDRP[min,rnd,black]
+PUSHB_1
+ 25
+MDAP[rnd]
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_3
+ 25
+ 18
+ 10
+CALL
+PUSHB_4
+ 64
+ 25
+ 22
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 50
+MDAP[rnd]
+PUSHB_1
+ 41
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_4
+ 15
+ 8
+ 41
+ 8
+CALL
+PUSHB_1
+ 28
+MDRP[min,rnd,black]
+PUSHB_1
+ 8
+SRP0
+PUSHB_2
+ 2
+ 1
+CALL
+PUSHB_1
+ 35
+MDRP[min,rnd,black]
+PUSHB_2
+ 51
+ 1
+CALL
+PUSHB_2
+ 2
+ 28
+SRP1
+SRP2
+NPUSHB
+ 9
+ 5
+ 11
+ 49
+ 13
+ 18
+ 21
+ 30
+ 38
+ 44
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 5
+ 11
+SRP1
+SRP2
+PUSHB_2
+ 35
+ 41
+IP
+IP
+PUSHB_1
+ 44
+SRP1
+PUSHB_2
+ 49
+ 48
+IP
+IP
+PUSHB_1
+ 25
+SRP2
+PUSHB_3
+ 12
+ 15
+ 30
+IP
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+704.798 122.708 m 128,-1,1
+ 763 205.417 763 205.417 763 371 c 0,2,3
+ 763 578.385 763 578.385 686.916 705.192 c 128,-1,4
+ 610.831 832 610.831 832 487 832 c 0,5,6
+ 377.341 832 377.341 832 316.17 741.264 c 128,-1,7
+ 255 650.528 255 650.528 255 489 c 0,8,9
+ 255 291.605 255 291.605 331.09 165.803 c 128,-1,10
+ 407.181 40 407.181 40 528 40 c 0,11,0
+ 646.596 40 646.596 40 704.798 122.708 c 128,-1,1
+551.855 881.104 m 2,12,-1
+ 528.806 897.139 l 1,13,14
+ 216 1103.69 216 1103.69 216 1243 c 0,15,16
+ 216 1327.77 216 1327.77 277.958 1383.38 c 128,-1,17
+ 339.915 1439 339.915 1439 436 1439 c 0,18,19
+ 547.267 1439 547.267 1439 636.577 1368.62 c 128,-1,20
+ 725.887 1298.24 725.887 1298.24 749.748 1197 c 1,21,-1
+ 703.376 1197 l 1,22,23
+ 667.804 1284.14 667.804 1284.14 594.718 1337.57 c 128,-1,24
+ 521.633 1391 521.633 1391 436 1391 c 0,25,26
+ 381.281 1391 381.281 1391 350.141 1366.72 c 128,-1,27
+ 319 1342.44 319 1342.44 319 1298 c 0,28,29
+ 319 1212.26 319 1212.26 489.298 1103.79 c 1,30,31
+ 577.216 1046.85 l 1,32,33
+ 762.277 918.499 762.277 918.499 851.639 771.549 c 128,-1,34
+ 941 624.599 941 624.599 941 449 c 0,35,36
+ 941 236.99 941 236.99 820.423 109.495 c 128,-1,37
+ 699.847 -18 699.847 -18 498 -18 c 0,38,39
+ 312.144 -18 312.144 -18 194.572 105.5 c 128,-1,40
+ 77 228.999 77 228.999 77 422 c 0,41,42
+ 77 625.059 77 625.059 193.602 752.529 c 128,-1,43
+ 310.203 880 310.203 880 496 880 c 0,44,45
+ 510.603 880 510.603 880 522.733 878.059 c 128,-1,46
+ 534.864 876.118 534.864 876.118 547.529 872.221 c 0,47,48
+ 551.621 870.962 551.621 870.962 553.495 874.811 c 128,-1,49
+ 555.37 878.66 555.37 878.66 551.855 881.104 c 2,12,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: epsilon
+Encoding: 937 949 937
+Width: 887
+Flags: W
+HStem: -18 72<377.63 611.188> 433 117<434.848 616.988> 470 53<356.114 525.177> 890 53<353.837 527.995>
+VStem: 114 178<130.125 392.938 600.994 821.32>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 48
+MDAP[rnd]
+PUSHB_1
+ 41
+MDRP[min,rnd,black]
+PUSHB_1
+ 32
+MDAP[rnd]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_4
+ 23
+ 26
+ 32
+ 8
+CALL
+PUSHB_1
+ 35
+MDRP[min,rnd,black]
+PUSHB_1
+ 18
+MDAP[rnd]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_3
+ 18
+ 6
+ 10
+CALL
+PUSHB_4
+ 0
+ 18
+ 12
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 56
+MDAP[rnd]
+PUSHB_1
+ 51
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 3
+SHP[rp2]
+PUSHB_1
+ 38
+MDRP[min,rnd,black]
+PUSHB_1
+ 20
+SHP[rp2]
+PUSHB_3
+ 38
+ 51
+ 10
+CALL
+PUSHB_4
+ 0
+ 38
+ 9
+ 9
+CALL
+PUSHB_2
+ 57
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 32
+ 41
+SRP1
+SRP2
+PUSHB_4
+ 38
+ 44
+ 45
+ 51
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 26
+SRP1
+PUSHB_1
+ 55
+IP
+PUSHB_2
+ 23
+ 35
+SRP1
+SRP2
+PUSHB_1
+ 29
+IP
+PUSHB_1
+ 18
+SRP1
+PUSHB_1
+ 3
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+308.437 500.789 m 2,0,1
+ 219.842 527.367 219.842 527.367 172.921 582.108 c 128,-1,2
+ 126 636.85 126 636.85 126 711 c 0,3,4
+ 126 812.478 126 812.478 214.323 877.739 c 128,-1,5
+ 302.646 943 302.646 943 446 943 c 0,6,7
+ 571.777 943 571.777 943 657.389 898.482 c 128,-1,8
+ 743 853.965 743 853.965 743 791 c 0,9,10
+ 743 760.145 743 760.145 724.001 742.072 c 128,-1,11
+ 705.002 724 705.002 724 674 724 c 0,12,13
+ 643.667 724 643.667 724 622.672 739.746 c 128,-1,14
+ 601.677 755.492 601.677 755.492 579.414 797.349 c 0,15,16
+ 551.615 849.613 551.615 849.613 520.549 869.807 c 128,-1,17
+ 489.482 890 489.482 890 436 890 c 0,18,19
+ 368.521 890 368.521 890 332.261 842.343 c 128,-1,20
+ 296 794.686 296 794.686 296 709 c 128,-1,21
+ 296 623.365 296 623.365 332.732 573.183 c 128,-1,22
+ 369.464 523 369.464 523 432 523 c 0,23,24
+ 457.711 523 457.711 523 504.211 536.5 c 128,-1,25
+ 550.711 550 550.711 550 573 550 c 0,26,27
+ 601.012 550 601.012 550 617.506 534.422 c 128,-1,28
+ 634 518.845 634 518.845 634 494 c 0,29,30
+ 634 464.071 634 464.071 618.464 448.536 c 128,-1,31
+ 602.929 433 602.929 433 573 433 c 0,32,33
+ 549.998 433 549.998 433 505.498 451.5 c 128,-1,34
+ 460.998 470 460.998 470 434 470 c 0,35,36
+ 367.444 470 367.444 470 329.722 417.809 c 128,-1,37
+ 292 365.618 292 365.618 292 276 c 0,38,39
+ 292 177.068 292 177.068 347.894 115.534 c 128,-1,40
+ 403.787 54 403.787 54 496 54 c 0,41,42
+ 578.722 54 578.722 54 638.672 100.852 c 128,-1,43
+ 698.623 147.704 698.623 147.704 743.4 243.292 c 1,44,-1
+ 790.566 220.551 l 1,45,46
+ 740.388 101.204 740.388 101.204 653.916 41.6021 c 128,-1,47
+ 567.443 -18 567.443 -18 438 -18 c 0,48,49
+ 292.813 -18 292.813 -18 203.407 56.6694 c 128,-1,50
+ 114 131.339 114 131.339 114 252 c 0,51,52
+ 114 339.219 114 339.219 163.962 400.447 c 128,-1,53
+ 213.925 461.676 213.925 461.676 308.491 491.228 c 2,54,-1
+ 324.075 496.098 l 1,55,-1
+ 308.437 500.789 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: zeta
+Encoding: 938 950 938
+Width: 1012
+Flags: W
+HStem: -349 129<433.193 717.287> 5 166<317.066 886.506> 1045 193<562.356 833.402> 1400 49<242.861 415>
+VStem: 44 141<1187.57 1367.55> 107 89<292.678 710.013> 939 57<-162.573 22.2796>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 30
+MDAP[rnd]
+PUSHB_1
+ 36
+MDRP[min,rnd,black]
+PUSHB_1
+ 48
+MDAP[rnd]
+PUSHB_1
+ 21
+MDRP[min,rnd,black]
+PUSHB_1
+ 24
+SHP[rp2]
+PUSHB_1
+ 9
+MDAP[rnd]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_1
+ 67
+MDAP[rnd]
+PUSHB_1
+ 62
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 75
+MDAP[rnd]
+PUSHB_1
+ 51
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_1
+ 70
+SHP[rp2]
+PUSHB_1
+ 18
+SRP0
+PUSHB_1
+ 59
+MDRP[min,rnd,black]
+PUSHB_1
+ 59
+MDAP[rnd]
+PUSHB_1
+ 18
+SRP0
+PUSHB_2
+ 42
+ 1
+CALL
+PUSHB_1
+ 27
+MDRP[min,rnd,black]
+PUSHB_3
+ 42
+ 27
+ 10
+CALL
+PUSHB_4
+ 0
+ 42
+ 33
+ 9
+CALL
+PUSHB_2
+ 76
+ 1
+CALL
+PUSHB_2
+ 42
+ 18
+SRP1
+SRP2
+PUSHB_6
+ 6
+ 24
+ 48
+ 55
+ 62
+ 65
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 48
+ 36
+SRP1
+SRP2
+PUSHB_2
+ 27
+ 42
+IP
+IP
+PUSHB_2
+ 9
+ 21
+SRP1
+SRP2
+PUSHB_2
+ 18
+ 51
+IP
+IP
+PUSHB_1
+ 3
+SRP1
+PUSHB_4
+ 12
+ 14
+ 55
+ 73
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 67
+SRP2
+PUSHB_2
+ 59
+ 70
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+412.946 1103.96 m 2,0,1
+ 508.421 1173.58 508.421 1173.58 591.18 1205.79 c 128,-1,2
+ 673.938 1238 673.938 1238 756 1238 c 0,3,4
+ 823.701 1238 823.701 1238 856.851 1219.53 c 128,-1,5
+ 890 1201.06 890 1201.06 890 1165 c 0,6,7
+ 890 1111.33 890 1111.33 810.5 1078.17 c 128,-1,8
+ 730.999 1045 730.999 1045 592 1045 c 0,9,10
+ 546.156 1045 546.156 1045 506.347 1047.49 c 128,-1,11
+ 466.537 1049.98 466.537 1049.98 428.78 1055.94 c 2,12,13
+ 426.45 1056.31 l 1,14,-1
+ 424.685 1054.74 l 2,15,16
+ 318.812 960.97 318.812 960.97 257.406 810.475 c 128,-1,17
+ 196 659.98 196 659.98 196 494 c 0,18,19
+ 196 322.881 196 322.881 274.489 246.94 c 128,-1,20
+ 352.978 171 352.978 171 530 171 c 0,21,22
+ 559.17 171 559.17 171 618.169 175 c 128,-1,23
+ 677.169 179 677.169 179 707 179 c 0,24,25
+ 857.353 179 857.353 179 926.676 127.739 c 128,-1,26
+ 996 76.4785 996 76.4785 996 -33 c 0,27,28
+ 996 -183.366 996 -183.366 875.225 -266.183 c 128,-1,29
+ 754.45 -349 754.45 -349 532 -349 c 0,30,31
+ 466.238 -349 466.238 -349 432.119 -330.993 c 128,-1,32
+ 398 -312.985 398 -312.985 398 -281 c 0,33,34
+ 398 -251.554 398 -251.554 419.81 -235.777 c 128,-1,35
+ 441.619 -220 441.619 -220 485 -220 c 0,36,37
+ 514.329 -220 514.329 -220 589.329 -240.5 c 128,-1,38
+ 664.329 -261 664.329 -261 719 -261 c 0,39,40
+ 811.608 -261 811.608 -261 875.304 -215.283 c 128,-1,41
+ 939 -169.565 939 -169.565 939 -102 c 0,42,43
+ 939 -41.9658 939 -41.9658 888.111 -15.4829 c 128,-1,44
+ 837.223 11 837.223 11 723 11 c 0,45,46
+ 682.898 11 682.898 11 609.398 8 c 128,-1,47
+ 535.898 5 535.898 5 504 5 c 0,48,49
+ 299.181 5 299.181 5 203.09 108.482 c 128,-1,50
+ 107 211.964 107 211.964 107 432 c 0,51,52
+ 107 613.993 107 613.993 172.119 769.085 c 128,-1,53
+ 237.238 924.177 237.238 924.177 368.562 1057.49 c 2,54,-1
+ 374.968 1063.99 l 1,55,-1
+ 366.039 1065.89 l 2,56,57
+ 207.032 1099.68 207.032 1099.68 125.516 1156.64 c 128,-1,58
+ 44 1213.61 44 1213.61 44 1286 c 0,59,60
+ 44 1363.06 44 1363.06 121.149 1406.03 c 128,-1,61
+ 198.299 1449 198.299 1449 340 1449 c 0,62,63
+ 369.708 1449 369.708 1449 385.4 1447.15 c 128,-1,64
+ 401.092 1445.31 401.092 1445.31 415 1442.06 c 1,65,-1
+ 415 1400 l 1,66,-1
+ 367 1400 l 2,67,68
+ 276.458 1400 276.458 1400 230.729 1368.82 c 128,-1,69
+ 185 1337.64 185 1337.64 185 1276 c 0,70,71
+ 185 1212.54 185 1212.54 242.445 1168.43 c 128,-1,72
+ 299.89 1124.32 299.89 1124.32 409.046 1103.09 c 2,73,-1
+ 411.185 1102.68 l 1,74,-1
+ 412.946 1103.96 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: eta
+Encoding: 939 951 939
+Width: 1235
+Flags: W
+HStem: 1 21G<249 431> 851 80<93.4205 224.206 633.118 833.88>
+VStem: 23 33<656 787.27> 249 182<1 804.663> 877 181<-411 795.593>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 9
+MDAP[rnd]
+PUSHB_1
+ 13
+MDAP[rnd]
+PUSHB_1
+ 4
+SHP[rp1]
+PUSHB_1
+ 24
+MDRP[min,rnd,black]
+PUSHB_1
+ 33
+SHP[rp2]
+PUSHB_3
+ 13
+ 24
+ 10
+CALL
+PUSHB_4
+ 64
+ 13
+ 0
+ 9
+CALL
+PUSHB_4
+ 64
+ 13
+ 18
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 38
+MDAP[rnd]
+PUSHB_1
+ 21
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 16
+MDRP[min,rnd,black]
+PUSHB_1
+ 16
+SRP0
+PUSHB_2
+ 9
+ 1
+CALL
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_1
+ 27
+SHP[rp2]
+PUSHB_1
+ 8
+SRP0
+PUSHB_2
+ 0
+ 1
+CALL
+PUSHB_1
+ 37
+MDRP[min,rnd,black]
+PUSHB_2
+ 39
+ 1
+CALL
+PUSHB_2
+ 9
+ 16
+SRP1
+SRP2
+PUSHB_1
+ 24
+IP
+PUSHB_2
+ 0
+ 8
+SRP1
+SRP2
+PUSHB_2
+ 30
+ 33
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 13
+ 9
+SRP1
+SRP2
+PUSHB_4
+ 21
+ 27
+ 29
+ 31
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+877 -411 m 5,0,-1
+ 877 602 l 2,1,2
+ 877 744.408 877 744.408 844.401 797.704 c 128,-1,3
+ 811.803 851 811.803 851 729 851 c 0,4,5
+ 598.927 851 598.927 851 514.963 685.097 c 128,-1,6
+ 431 519.193 431 519.193 431 264 c 2,7,-1
+ 431 1 l 1,8,-1
+ 249 1 l 1,9,-1
+ 249 668 l 2,10,11
+ 249 761.155 249 761.155 227.062 806.078 c 128,-1,12
+ 205.123 851 205.123 851 158 851 c 0,13,14
+ 107.128 851 107.128 851 81.5645 807.176 c 128,-1,15
+ 56 763.352 56 763.352 56 680 c 2,16,-1
+ 56 656 l 1,17,-1
+ 24.46 656 l 1,18,19
+ 23.8477 661.877 23.8477 661.877 23.4238 669.508 c 128,-1,20
+ 23 677.139 23 677.139 23 694 c 0,21,22
+ 23 809.232 23 809.232 72.1943 870.116 c 128,-1,23
+ 121.389 931 121.389 931 211 931 c 0,24,25
+ 318.188 931 318.188 931 372.098 842.294 c 128,-1,26
+ 426.008 753.588 426.008 753.588 427 568.973 c 0,27,28
+ 427.023 564.593 427.023 564.593 431.368 564.04 c 128,-1,29
+ 435.713 563.487 435.713 563.487 436.834 567.722 c 0,30,31
+ 486.501 755.463 486.501 755.463 571.311 843.231 c 128,-1,32
+ 656.121 931 656.121 931 786 931 c 0,33,34
+ 931.282 931 931.282 931 994.641 833.261 c 128,-1,35
+ 1058 735.521 1058 735.521 1058 500 c 2,36,-1
+ 1058 -411 l 5,37,-1
+ 877 -411 l 5,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: theta
+Encoding: 940 952 940
+Width: 1067
+Flags: W
+HStem: -20 42<440.095 626.086> 693 62<284 777> 1334 39<449.871 624.132>
+VStem: 99 185<313.593 693 755 1028.98> 777 191<328.151 693 755 1049.22>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 27
+MDAP[rnd]
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+PUSHB_1
+ 1
+MDAP[rnd]
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_1
+ 17
+MDAP[rnd]
+PUSHB_1
+ 21
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 40
+MDAP[rnd]
+PUSHB_1
+ 33
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 2
+MDRP[min,rnd,black]
+PUSHB_1
+ 9
+SHP[rp2]
+PUSHB_1
+ 2
+SRP0
+PUSHB_2
+ 8
+ 1
+CALL
+PUSHB_1
+ 10
+SHP[rp2]
+PUSHB_1
+ 24
+MDRP[min,rnd,black]
+PUSHB_2
+ 41
+ 1
+CALL
+PUSHB_2
+ 2
+ 33
+SRP1
+SRP2
+PUSHB_1
+ 31
+IP
+PUSHB_1
+ 8
+SRP1
+PUSHB_3
+ 17
+ 21
+ 27
+IP
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 1
+ 5
+SRP1
+SRP2
+PUSHB_2
+ 33
+ 37
+IP
+IP
+PUSHB_1
+ 9
+SRP1
+PUSHB_1
+ 24
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+777 693 m 1,0,-1
+ 284 693 l 1,1,-1
+ 284 641 l 2,2,3
+ 284 299.022 284 299.022 340.318 160.511 c 128,-1,4
+ 396.636 22 396.636 22 532 22 c 0,5,6
+ 670.406 22 670.406 22 723.703 157.526 c 128,-1,7
+ 777 293.052 777 293.052 777 688 c 2,8,-1
+ 777 693 l 1,0,-1
+283.95 755 m 1,9,-1
+ 777 755 l 1,10,-1
+ 777 760 l 2,11,12
+ 777 773.899 777 773.899 778 798.398 c 128,-1,13
+ 779 822.896 779 822.896 779 834 c 0,14,15
+ 779 1092.14 779 1092.14 721.075 1213.07 c 128,-1,16
+ 663.149 1334 663.149 1334 537 1334 c 0,17,18
+ 405.728 1334 405.728 1334 346.369 1198.03 c 128,-1,19
+ 287.011 1062.07 287.011 1062.07 284 760.05 c 2,20,-1
+ 283.95 755 l 1,9,-1
+537 1373 m 0,21,22
+ 744.281 1373 744.281 1373 856.141 1200.26 c 128,-1,23
+ 968 1027.52 968 1027.52 968 702 c 0,24,25
+ 968 351.38 968 351.38 857.081 165.69 c 128,-1,26
+ 746.162 -20 746.162 -20 539 -20 c 0,27,28
+ 319.772 -20 319.772 -20 247.91 95.0444 c 128,-1,29
+ 176.047 210.089 176.047 210.089 152.307 281.59 c 128,-1,30
+ 128.566 353.092 128.566 353.092 118.245 421.705 c 128,-1,31
+ 107.924 490.319 107.924 490.319 103.909 538.541 c 128,-1,32
+ 99.8945 586.763 99.8945 586.763 99.8945 624.062 c 0,33,34
+ 99.8945 625.782 99.8945 625.782 99.6709 633.739 c 128,-1,35
+ 99.4473 641.696 99.4473 641.696 99.2236 655.676 c 128,-1,36
+ 99 669.655 99 669.655 99 686 c 0,37,38
+ 99 1011.54 99 1011.54 214.867 1192.27 c 128,-1,39
+ 330.733 1373 330.733 1373 537 1373 c 0,21,22
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: iota
+Encoding: 941 953 941
+Width: 674
+Flags: W
+HStem: -11 69<371.169 526.183>
+VStem: 161 180<101.7 915> 585 39<146.266 304>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 12
+MDAP[rnd]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_3
+ 3
+ 12
+ 10
+CALL
+PUSHB_4
+ 64
+ 3
+ 8
+ 9
+CALL
+PUSHB_4
+ 64
+ 3
+ 17
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 18
+MDAP[rnd]
+PUSHB_1
+ 15
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SRP0
+PUSHB_2
+ 6
+ 1
+CALL
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_2
+ 19
+ 1
+CALL
+PUSHB_2
+ 6
+ 0
+SRP1
+SRP2
+PUSHB_1
+ 12
+IP
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+341 285 m 2,0,1
+ 341 142.704 341 142.704 364.529 100.352 c 128,-1,2
+ 388.058 58 388.058 58 449 58 c 0,3,4
+ 518.849 58 518.849 58 551.924 113.815 c 128,-1,5
+ 585 169.63 585 169.63 585 287 c 2,6,-1
+ 585 304 l 1,7,-1
+ 624 304 l 1,8,-1
+ 624 276 l 2,9,10
+ 624 125.826 624 125.826 566.337 57.4131 c 128,-1,11
+ 508.675 -11 508.675 -11 383 -11 c 0,12,13
+ 266.458 -11 266.458 -11 213.729 57.3521 c 128,-1,14
+ 161 125.704 161 125.704 161 281 c 2,15,-1
+ 161 915 l 1,16,-1
+ 341 915 l 1,17,-1
+ 341 285 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: kappa
+Encoding: 942 954 942
+Width: 1124
+Flags: W
+HStem: 1 29.2061<591 674.038 973.558 1037> 493 53<340.498 388.989> 843 115.667<908.698 1009.47> 853.416 29.6602<19 36.6421> 875 107<763.193 975.213>
+VStem: 167 170<1 485.307 546 828.128>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 39
+ 0
+ 0
+CALL
+PUSHB_1
+ 54
+SHP[rp1]
+PUSHB_1
+ 40
+MDRP[min,rnd,black]
+PUSHB_2
+ 37
+ 62
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 50
+MDAP[rnd]
+PUSHB_1
+ 12
+MDRP[min,rnd,black]
+PUSHB_1
+ 28
+MDAP[rnd]
+PUSHB_1
+ 19
+MDRP[min,rnd,black]
+PUSHB_1
+ 4
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 67
+MDAP[rnd]
+PUSHB_1
+ 55
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 54
+MDRP[min,rnd,black]
+PUSHB_1
+ 4
+SHP[rp2]
+PUSHB_3
+ 55
+ 54
+ 10
+CALL
+PUSHB_4
+ 64
+ 55
+ 1
+ 9
+CALL
+PUSHB_2
+ 68
+ 1
+CALL
+SVTCA[y-axis]
+PUSHB_2
+ 50
+ 40
+SRP1
+SRP2
+PUSHB_1
+ 66
+IP
+PUSHB_1
+ 12
+SRP1
+PUSHB_1
+ 10
+IP
+PUSHB_1
+ 28
+SRP2
+PUSHB_5
+ 0
+ 17
+ 25
+ 32
+ 59
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+19 853.416 m 5,0,-1
+ 19 883.076 l 5,1,2
+ 102.844 903.635 102.844 903.635 181.979 927.424 c 132,-1,3
+ 261.115 951.213 261.115 951.213 337 979.765 c 5,4,-1
+ 337 578 l 6,5,6
+ 337.154 559.284 337.154 559.284 340.351 553.531 c 4,7,8
+ 340.627 553.034 340.627 553.034 342.502 550.33 c 132,-1,9
+ 344.377 547.628 344.377 547.628 350.14 546.393 c 4,10,11
+ 351.97 546 351.97 546 354 546 c 4,12,13
+ 360.367 546 360.367 546 372.311 553.059 c 132,-1,14
+ 384.255 560.116 384.255 560.116 390.759 567.703 c 6,15,-1
+ 495.721 684.659 l 6,16,17
+ 663.304 871.194 663.304 871.194 745.912 926.598 c 132,-1,18
+ 828.521 982 828.521 982 907 982 c 4,19,20
+ 961.478 982 961.478 982 996.238 958.667 c 132,-1,21
+ 1031 935.334 1031 935.334 1031 901 c 4,22,23
+ 1031 876.403 1031 876.403 1010.12 859.701 c 132,-1,24
+ 989.246 843 989.246 843 956 843 c 4,25,26
+ 933.022 843 933.022 843 895.521 859 c 132,-1,27
+ 858.021 875 858.021 875 836 875 c 4,28,29
+ 785.333 875 785.333 875 726.454 830.841 c 132,-1,30
+ 667.575 786.682 667.575 786.682 567.21 671.261 c 5,31,-1
+ 501.544 594.13 l 5,32,-1
+ 838.047 164.938 l 5,33,34
+ 890.531 96.3057 890.531 96.3057 940.006 63.1523 c 4,35,36
+ 988.97 30.3418 988.97 30.3418 1037 30.0039 c 5,37,-1
+ 1037 1 l 5,38,-1
+ 591 1 l 5,39,-1
+ 591 30.2061 l 5,40,41
+ 638.93 32.3643 638.93 32.3643 662.965 39.8418 c 132,-1,42
+ 687 47.3193 687 47.3193 687 66 c 4,43,44
+ 687 81.2383 687 81.2383 677.129 99.9424 c 132,-1,45
+ 667.257 118.646 667.257 118.646 644.968 149.04 c 5,46,-1
+ 384.926 474.097 l 6,47,48
+ 377.339 483.851 377.339 483.851 369.334 488.426 c 132,-1,49
+ 361.328 493 361.328 493 352 493 c 4,50,51
+ 343.78 493 343.78 493 340.391 485.541 c 132,-1,52
+ 337 478.083 337 478.083 337 465 c 6,53,-1
+ 337 1 l 5,54,-1
+ 167 1 l 5,55,-1
+ 167 713 l 6,56,57
+ 167 802.915 167 802.915 143.615 828.957 c 132,-1,58
+ 120.23 855 120.23 855 57 855 c 4,59,60
+ 45.875 855 45.875 855 36.9219 854.553 c 132,-1,61
+ 27.9697 854.104 27.9697 854.104 19 853.416 c 5,0,-1
+1037 30.0039 m 6,62,63
+ 1037.17 30.0039 1037.17 30.0039 1037.5 30.002 c 4,64,-1
+ 1042 30 l 5,65,-1
+ 1037 35 l 5,66,-1
+ 1037 30.0039 l 6,62,63
+EndSplineSet
+Validated: 16389
+EndChar
+
+StartChar: lambda
+Encoding: 943 955 943
+Width: 1124
+Flags: W
+HStem: -11 168<839.766 1031.55> 1279 150<156.906 371.183>
+VStem: 88.8955 29.6826<1172 1199.85> 1063.53 39.5518<219.586 274>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 34
+ 0
+ 0
+CALL
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+PUSHB_3
+ 11
+ 0
+ 0
+CALL
+PUSHB_2
+ 12
+ 5
+SRP0
+DUP
+MDRP[grey]
+MDAP[rnd]
+PUSHB_1
+ 17
+MDAP[rnd]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 42
+MDAP[rnd]
+PUSHB_1
+ 20
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 19
+MDRP[min,rnd,black]
+PUSHB_1
+ 19
+SRP0
+PUSHB_2
+ 37
+ 1
+CALL
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_1
+ 40
+SHP[rp2]
+PUSHB_2
+ 43
+ 1
+CALL
+PUSHB_2
+ 37
+ 19
+SRP1
+SRP2
+PUSHB_4
+ 5
+ 11
+ 13
+ 26
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 0
+SRP1
+PUSHB_1
+ 38
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 17
+ 34
+SRP1
+SRP2
+NPUSHB
+ 9
+ 2
+ 0
+ 13
+ 10
+ 19
+ 23
+ 29
+ 38
+ 40
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1103.08 274 m 5,0,1
+ 1107 237.611 1107 237.611 1107 219 c 4,2,3
+ 1107 114.67 1107 114.67 1059.75 51.835 c 132,-1,4
+ 1012.5 -11 1012.5 -11 938 -11 c 4,5,6
+ 873.015 -11 873.015 -11 834.684 25.875 c 4,7,8
+ 797.533 61.6143 797.533 61.6143 764.737 157.599 c 6,9,-1
+ 569.605 728.693 l 5,10,-1
+ 246.748 1 l 5,11,-1
+ 42.6592 1 l 5,12,-1
+ 480.37 996.791 l 5,13,-1
+ 436.718 1121.66 l 6,14,15
+ 405.282 1210.89 405.282 1210.89 366.584 1244.95 c 132,-1,16
+ 327.887 1279 327.887 1279 262 1279 c 132,-1,17
+ 196.302 1279 196.302 1279 161.006 1251.89 c 132,-1,18
+ 125.71 1224.78 125.71 1224.78 118.578 1172 c 5,19,-1
+ 88.8955 1172 l 5,20,21
+ 88.6748 1177.65 88.6748 1177.65 87.8379 1186.45 c 132,-1,22
+ 87 1195.24 87 1195.24 87 1200 c 4,23,24
+ 87 1304.28 87 1304.28 135.719 1366.64 c 132,-1,25
+ 184.438 1429 184.438 1429 264 1429 c 4,26,27
+ 340.791 1429 340.791 1429 385.699 1379.7 c 132,-1,28
+ 430.606 1330.4 430.606 1330.4 489.269 1159.38 c 6,29,-1
+ 761.264 361.397 l 6,30,31
+ 804.565 234.357 804.565 234.357 841.244 196.172 c 4,32,33
+ 878.87 157 878.87 157 942 157 c 4,34,35
+ 995.071 157 995.071 157 1026.31 188.243 c 132,-1,36
+ 1057.56 219.486 1057.56 219.486 1063.53 274 c 5,37,-1
+ 1103.08 274 l 5,0,1
+1103.08 274 m 5,38,-1
+ 1108 274 l 5,39,-1
+ 1103 279 l 5,40,-1
+ 1103 275 l 5,41,-1
+ 1103.08 274 l 5,38,-1
+EndSplineSet
+Validated: 16389
+EndChar
+
+StartChar: mu
+Encoding: 944 956 944
+Width: 1180
+Flags: W
+HStem: -16 78<373.863 565.79 950.954 1069.96>
+VStem: 155 33<-3.48975 194.984> 157 178<182.11 912> 748 179<108.39 912> 1103 35<121.288 258>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 32
+MDAP[rnd]
+PUSHB_1
+ 23
+SHP[rp1]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_1
+ 12
+SHP[rp2]
+PUSHB_3
+ 3
+ 32
+ 10
+CALL
+PUSHB_4
+ 64
+ 3
+ 7
+ 9
+CALL
+PUSHB_1
+ 56
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 58
+MDAP[rnd]
+PUSHB_1
+ 55
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 49
+SHP[rp2]
+PUSHB_1
+ 0
+MDRP[min,rnd,black]
+PUSHB_1
+ 40
+MDRP[min,rnd,black]
+PUSHB_3
+ 40
+ 55
+ 10
+CALL
+PUSHB_4
+ 64
+ 40
+ 43
+ 9
+CALL
+PUSHB_1
+ 0
+SRP0
+PUSHB_2
+ 6
+ 1
+CALL
+PUSHB_1
+ 26
+SHP[rp2]
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_1
+ 8
+SRP0
+PUSHB_2
+ 15
+ 1
+CALL
+PUSHB_1
+ 20
+MDRP[min,rnd,black]
+PUSHB_2
+ 59
+ 1
+CALL
+PUSHB_2
+ 0
+ 40
+SRP1
+SRP2
+PUSHB_2
+ 35
+ 46
+IP
+IP
+PUSHB_2
+ 8
+ 55
+SRP1
+SRP2
+PUSHB_1
+ 25
+IP
+PUSHB_1
+ 15
+SRP1
+PUSHB_1
+ 23
+IP
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+335 310 m 2,0,1
+ 335 164.663 335 164.663 364.555 113.332 c 128,-1,2
+ 394.109 62 394.109 62 471 62 c 0,3,4
+ 592.181 62 592.181 62 670.09 228.443 c 128,-1,5
+ 748 394.888 748 394.888 748 650 c 2,6,-1
+ 748 912 l 1,7,-1
+ 927 912 l 1,8,-1
+ 927 245 l 2,9,10
+ 927 151.944 927 151.944 946.871 106.973 c 128,-1,11
+ 966.743 62 966.743 62 1010 62 c 0,12,13
+ 1056.01 62 1056.01 62 1079.51 106.379 c 128,-1,14
+ 1103 150.758 1103 150.758 1103 235 c 2,15,-1
+ 1103 258 l 1,16,-1
+ 1136.54 258 l 1,17,18
+ 1137.15 252.009 1137.15 252.009 1137.58 243.941 c 128,-1,19
+ 1138 235.873 1138 235.873 1138 218 c 0,20,21
+ 1138 105.712 1138 105.712 1090.78 44.8555 c 128,-1,22
+ 1043.55 -16 1043.55 -16 958 -16 c 0,23,24
+ 857.845 -16 857.845 -16 806.918 69.6934 c 128,-1,25
+ 755.992 155.387 755.992 155.387 755 331.028 c 0,26,27
+ 754.976 335.421 754.976 335.421 750.616 335.962 c 128,-1,28
+ 746.257 336.503 746.257 336.503 745.159 332.25 c 0,29,30
+ 698.474 151.468 698.474 151.468 621.143 67.7344 c 128,-1,31
+ 543.812 -16 543.812 -16 426 -16 c 0,32,33
+ 337.93 -16 337.93 -16 280.234 36.3174 c 128,-1,34
+ 222.538 88.6348 222.538 88.6348 199.882 191.08 c 0,35,36
+ 198.964 195.232 198.964 195.232 194.718 194.992 c 128,-1,37
+ 190.473 194.753 190.473 194.753 190.027 190.523 c 0,38,39
+ 188 171.263 188 171.263 188 132 c 0,40,41
+ 188 2.01367 188 2.01367 253.5 -149.986 c 128,-1,42
+ 319 -301.986 319 -301.986 319 -330 c 4,43,44
+ 319 -367.929 319 -367.929 297.465 -389.465 c 132,-1,45
+ 275.929 -411 275.929 -411 238 -411 c 4,46,47
+ 193.802 -411 193.802 -411 174.4 -379.296 c 132,-1,48
+ 155 -347.592 155 -347.592 155 -273 c 4,49,50
+ 155 -255.1 155 -255.1 159 -162.109 c 128,-1,51
+ 162.999 -69.1182 162.999 -69.1182 163 13 c 0,52,53
+ 163 87.0986 163 87.0986 160 221.091 c 128,-1,54
+ 157 355.083 157 355.083 157 415 c 2,55,-1
+ 157 912 l 1,56,-1
+ 335 912 l 1,57,-1
+ 335 310 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: nu
+Encoding: 945 957 945
+Width: 1067
+Flags: W
+HStem: 850 104<64.1244 215.55>
+VStem: 5 37<684 812.941> 783 211<744.483 913.97>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 3
+MDAP[rnd]
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 26
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 34
+MDAP[rnd]
+PUSHB_1
+ 11
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_1
+ 6
+SRP0
+PUSHB_2
+ 22
+ 1
+CALL
+PUSHB_1
+ 29
+MDRP[min,rnd,black]
+PUSHB_2
+ 35
+ 1
+CALL
+PUSHB_2
+ 22
+ 6
+SRP1
+SRP2
+PUSHB_2
+ 14
+ 31
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 14
+ 3
+SRP1
+SRP2
+PUSHB_1
+ 29
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+190.663 776.802 m 5,0,1
+ 176.31 815.761 176.31 815.761 159.19 832.881 c 132,-1,2
+ 142.071 850 142.071 850 119 850 c 4,3,4
+ 76.8691 850 76.8691 850 59.4346 814.074 c 132,-1,5
+ 42 778.149 42 778.149 42 697 c 6,6,-1
+ 42 684 l 5,7,-1
+ 6.88086 684 l 5,8,9
+ 6.65527 689.349 6.65527 689.349 5.82812 699.278 c 132,-1,10
+ 5 709.208 5 709.208 5 716 c 4,11,12
+ 5 831.369 5 831.369 49.7695 892.685 c 132,-1,13
+ 94.54 954 94.54 954 178 954 c 4,14,15
+ 253.039 954 253.039 954 299.897 910.559 c 132,-1,16
+ 346.756 867.116 346.756 867.116 398.342 734.184 c 6,17,-1
+ 600.898 217.104 l 5,18,-1
+ 606.196 225.281 l 6,19,20
+ 698.523 367.786 698.523 367.786 740.762 488.97 c 132,-1,21
+ 783 610.153 783 610.153 783 730 c 6,22,-1
+ 783 779 l 6,23,24
+ 783 876.395 783 876.395 810.785 915.197 c 132,-1,25
+ 838.569 954 838.569 954 905 954 c 4,26,27
+ 946.109 954 946.109 954 970.055 932.872 c 132,-1,28
+ 994 911.744 994 911.744 994 875 c 4,29,30
+ 994 807.311 994 807.311 827.32 511.268 c 132,-1,31
+ 660.64 215.224 660.64 215.224 555.805 -11 c 5,32,-1
+ 509.371 -11 l 5,33,-1
+ 190.663 776.802 l 5,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: xi
+Encoding: 946 958 946
+Width: 1010
+Flags: W
+HStem: -368 82<448.53 742.409> 11 170<241.77 814.11> 572 175<376.645 838.938> 1074 170<489.991 817.175> 1404.22 40.5107<319.296 402.642> 1408 41<213.34 401.557>
+VStem: 38 121<1210.45 1380.89> 81 70<269.098 485.892> 175 64<785.074 993.784> 865 74<-191.849 -23.7494>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 54
+MDAP[rnd]
+PUSHB_1
+ 63
+MDRP[min,rnd,black]
+PUSHB_3
+ 63
+ 54
+ 10
+CALL
+PUSHB_4
+ 0
+ 63
+ 60
+ 9
+CALL
+PUSHB_1
+ 72
+MDAP[rnd]
+PUSHB_1
+ 45
+MDRP[min,rnd,black]
+PUSHB_1
+ 34
+MDAP[rnd]
+PUSHB_1
+ 28
+MDRP[min,rnd,black]
+PUSHB_1
+ 9
+MDAP[rnd]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_1
+ 101
+MDAP[rnd]
+PUSHB_1
+ 94
+MDRP[min,rnd,black]
+PUSHB_1
+ 94
+MDRP[min,rnd,black]
+PUSHB_1
+ 96
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 109
+MDAP[rnd]
+PUSHB_1
+ 75
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 42
+MDRP[min,rnd,black]
+PUSHB_1
+ 104
+SHP[rp2]
+PUSHB_1
+ 42
+SRP0
+PUSHB_1
+ 91
+MDRP[min,rnd,black]
+PUSHB_1
+ 91
+MDAP[rnd]
+PUSHB_1
+ 42
+SRP0
+PUSHB_2
+ 83
+ 1
+CALL
+PUSHB_1
+ 19
+MDRP[min,rnd,black]
+PUSHB_1
+ 19
+SRP0
+PUSHB_2
+ 66
+ 1
+CALL
+PUSHB_1
+ 51
+MDRP[min,rnd,black]
+PUSHB_2
+ 110
+ 1
+CALL
+PUSHB_2
+ 66
+ 19
+SRP1
+SRP2
+NPUSHB
+ 15
+ 6
+ 28
+ 34
+ 40
+ 45
+ 48
+ 54
+ 57
+ 72
+ 79
+ 87
+ 94
+ 97
+ 101
+ 107
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 51
+SRP1
+PUSHB_1
+ 31
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 72
+ 63
+SRP1
+SRP2
+PUSHB_2
+ 51
+ 66
+IP
+IP
+PUSHB_2
+ 34
+ 45
+SRP1
+SRP2
+PUSHB_1
+ 42
+IP
+PUSHB_1
+ 28
+SRP1
+PUSHB_4
+ 23
+ 37
+ 40
+ 79
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 9
+SRP2
+PUSHB_2
+ 19
+ 83
+IP
+IP
+PUSHB_1
+ 3
+SRP1
+PUSHB_5
+ 0
+ 14
+ 15
+ 87
+ 107
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 101
+SRP2
+PUSHB_2
+ 91
+ 104
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+354.162 1140.49 m 2,0,1
+ 476.781 1199.31 476.781 1199.31 554.742 1221.65 c 128,-1,2
+ 632.703 1244 632.703 1244 705 1244 c 0,3,4
+ 779.781 1244 779.781 1244 818.391 1223.98 c 128,-1,5
+ 857 1203.96 857 1203.96 857 1167 c 0,6,7
+ 857 1122.41 857 1122.41 795.525 1098.2 c 128,-1,8
+ 734.051 1074 734.051 1074 612 1074 c 0,9,10
+ 528.526 1074 528.526 1074 377.732 1102.94 c 0,11,12
+ 374.089 1103.64 374.089 1103.64 369.109 1104.16 c 128,-1,13
+ 364.123 1104.67 364.123 1104.67 362.98 1104.9 c 2,14,-1
+ 360.518 1105.4 l 1,15,-1
+ 358.651 1103.71 l 2,16,17
+ 297.046 1048.17 297.046 1048.17 268.023 996.741 c 128,-1,18
+ 239 945.313 239 945.313 239 893 c 0,19,20
+ 239 831.463 239 831.463 267.28 789.813 c 128,-1,21
+ 295.561 748.164 295.561 748.164 362.657 712.583 c 2,22,-1
+ 364.193 711.769 l 1,23,-1
+ 365.903 712.082 l 2,24,25
+ 464.18 730.098 464.18 730.098 541.996 738.524 c 0,26,27
+ 620.27 747 620.27 747 684 747 c 0,28,29
+ 790.998 747 790.998 747 840.499 726.334 c 128,-1,30
+ 890 705.669 890 705.669 890 664 c 0,31,32
+ 890 619.349 890 619.349 832.505 595.674 c 128,-1,33
+ 775.011 572 775.011 572 657 572 c 0,34,35
+ 571.459 572 571.459 572 490.913 586.916 c 128,-1,36
+ 410.366 601.832 410.366 601.832 327.799 633.665 c 2,37,-1
+ 325.854 634.415 l 1,38,-1
+ 323.953 633.562 l 2,39,40
+ 244.704 597.987 244.704 597.987 197.849 531.29 c 128,-1,41
+ 151 464.58 151 464.58 151 387 c 0,42,43
+ 151 282.37 151 282.37 224.724 231.685 c 128,-1,44
+ 298.447 181 298.447 181 449 181 c 0,45,46
+ 469.054 181 469.054 181 515.554 182 c 128,-1,47
+ 562.054 183 562.054 183 588 183 c 0,48,49
+ 774.464 183 774.464 183 856.732 127.175 c 128,-1,50
+ 939 71.3506 939 71.3506 939 -51 c 0,51,52
+ 939 -190.551 939 -190.551 824.644 -279.275 c 128,-1,53
+ 710.288 -368 710.288 -368 522 -368 c 0,54,55
+ 430.192 -368 430.192 -368 388.596 -346.963 c 128,-1,56
+ 347 -325.926 347 -325.926 347 -283 c 0,57,58
+ 347 -264.351 347 -264.351 362.901 -251.175 c 128,-1,59
+ 378.803 -238 378.803 -238 403 -238 c 0,60,61
+ 429.271 -238 429.271 -238 509.771 -262 c 128,-1,62
+ 590.271 -286 590.271 -286 651 -286 c 0,63,64
+ 751.77 -286 751.77 -286 808.385 -240.193 c 128,-1,65
+ 865 -194.386 865 -194.386 865 -115 c 0,66,67
+ 865 -42.1172 865 -42.1172 815.671 -13.5586 c 128,-1,68
+ 766.343 15 766.343 15 635 15 c 0,69,70
+ 583.902 15 583.902 15 522.91 13 c 128,-1,71
+ 461.918 11 461.918 11 453 11 c 0,72,73
+ 278.863 11 278.863 11 179.932 96.6426 c 128,-1,74
+ 81 182.285 81 182.285 81 332 c 0,75,76
+ 81 432.604 81 432.604 130.323 513.987 c 128,-1,77
+ 179.646 595.37 179.646 595.37 276.61 654.735 c 2,78,-1
+ 282.731 658.483 l 1,79,-1
+ 277.096 662.927 l 2,80,81
+ 225.957 703.248 225.957 703.248 200.479 753.225 c 128,-1,82
+ 175 803.201 175 803.201 175 864 c 0,83,84
+ 175 934.739 175 934.739 205.965 992.246 c 128,-1,85
+ 236.93 1049.75 236.93 1049.75 306.157 1106.12 c 2,86,-1
+ 314.235 1112.7 l 1,87,-1
+ 304.05 1114.89 l 2,88,89
+ 170.096 1143.67 170.096 1143.67 104.047 1192.1 c 128,-1,90
+ 38 1240.53 38 1240.53 38 1307 c 0,91,92
+ 38 1374.14 38 1374.14 101.681 1411.57 c 128,-1,93
+ 165.361 1449 165.361 1449 283 1449 c 0,94,95
+ 321.645 1449 321.645 1449 351.505 1444.73 c 128,-1,96
+ 381.365 1440.47 381.365 1440.47 406.145 1432.64 c 1,97,-1
+ 399.077 1400.45 l 1,98,-1
+ 363.67 1404.22 l 2,99,100
+ 328.264 1408 328.264 1408 319 1408 c 0,101,102
+ 240.462 1408 240.462 1408 199.731 1380.32 c 128,-1,103
+ 159 1352.65 159 1352.65 159 1298 c 0,104,105
+ 159 1241.63 159 1241.63 206.859 1202.52 c 128,-1,106
+ 254.67 1163.45 254.67 1163.45 350.823 1140.14 c 2,107,-1
+ 352.556 1139.72 l 1,108,-1
+ 354.162 1140.49 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: omicron
+Encoding: 947 959 947
+Width: 1124
+Flags: W
+HStem: -18 50<469.517 702.312> 900 45<420.192 632.8>
+VStem: 71 188<259.789 673.951> 853 184<244.665 668.212>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 18
+MDAP[rnd]
+PUSHB_1
+ 11
+MDRP[min,rnd,black]
+PUSHB_1
+ 5
+MDAP[rnd]
+PUSHB_1
+ 12
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 24
+MDAP[rnd]
+PUSHB_1
+ 21
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_1
+ 8
+SRP0
+PUSHB_2
+ 2
+ 1
+CALL
+PUSHB_1
+ 15
+MDRP[min,rnd,black]
+PUSHB_2
+ 25
+ 1
+CALL
+PUSHB_2
+ 2
+ 8
+SRP1
+SRP2
+PUSHB_2
+ 12
+ 18
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 5
+ 11
+SRP1
+SRP2
+PUSHB_2
+ 15
+ 21
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+785.24 121.158 m 128,-1,1
+ 853 210.315 853 210.315 853 391 c 0,2,3
+ 853 620.466 853 620.466 763.367 760.233 c 128,-1,4
+ 673.733 900 673.733 900 528 900 c 0,5,6
+ 400.424 900 400.424 900 329.712 800.8 c 128,-1,7
+ 259 701.6 259 701.6 259 524 c 0,8,9
+ 259 307.517 259 307.517 348.644 169.758 c 128,-1,10
+ 438.288 32 438.288 32 580 32 c 0,11,0
+ 717.48 32 717.48 32 785.24 121.158 c 128,-1,1
+567 945 m 0,12,13
+ 782.923 945 782.923 945 909.961 817.467 c 128,-1,14
+ 1037 689.935 1037 689.935 1037 471 c 0,15,16
+ 1037 248.071 1037 248.071 903.964 115.036 c 128,-1,17
+ 770.929 -18 770.929 -18 545 -18 c 0,18,19
+ 336.071 -18 336.071 -18 203.536 114.536 c 128,-1,20
+ 71 247.071 71 247.071 71 457 c 0,21,22
+ 71 672.908 71 672.908 209.025 808.954 c 128,-1,23
+ 347.05 945 347.05 945 567 945 c 0,12,13
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: pi
+Encoding: 948 960 948
+Width: 1124
+Flags: W
+HStem: -15 157<96.1773 243.402> -15 78<838 974.929> 781 134<151.375 324.067 384 654.112 822 1024.52>
+VStem: 40 39.208<173.38 249> 324 60<381.317 781> 646 168<111.023 769.525> 1022.79 41.2061<161.952 304 918.764 962>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 32
+MDAP[rnd]
+PUSHB_1
+ 17
+SHP[rp1]
+PUSHB_1
+ 40
+MDRP[min,rnd,black]
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_3
+ 9
+ 32
+ 10
+CALL
+PUSHB_4
+ 64
+ 9
+ 13
+ 9
+CALL
+PUSHB_1
+ 45
+MDAP[rnd]
+PUSHB_3
+ 23
+ 64
+ 68
+SHP[rp1]
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 52
+MDRP[min,rnd,black]
+PUSHB_1
+ 55
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 74
+MDAP[rnd]
+PUSHB_1
+ 35
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 37
+MDRP[min,rnd,black]
+PUSHB_1
+ 37
+SRP0
+PUSHB_2
+ 43
+ 1
+CALL
+PUSHB_1
+ 29
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+SRP0
+PUSHB_2
+ 20
+ 1
+CALL
+PUSHB_1
+ 22
+SHP[rp2]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_2
+ 0
+ 3
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 6
+SRP0
+PUSHB_2
+ 12
+ 1
+CALL
+PUSHB_1
+ 59
+SHP[rp2]
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 60
+SHP[rp2]
+PUSHB_2
+ 75
+ 1
+CALL
+PUSHB_2
+ 43
+ 37
+SRP1
+SRP2
+PUSHB_2
+ 32
+ 48
+IP
+IP
+PUSHB_1
+ 29
+SRP1
+PUSHB_1
+ 52
+IP
+PUSHB_2
+ 12
+ 6
+SRP1
+SRP2
+PUSHB_2
+ 17
+ 64
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 45
+ 40
+SRP1
+SRP2
+PUSHB_4
+ 20
+ 36
+ 48
+ 49
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+822 764 m 2,0,1
+ 822 758.021 822 758.021 821.156 741.4 c 128,-1,2
+ 820.312 724.779 820.312 724.779 820.006 715.225 c 0,3,4
+ 814 527.478 814 527.478 814 408 c 2,5,-1
+ 814 326 l 2,6,7
+ 814 156.077 814 156.077 831.779 109.539 c 128,-1,8
+ 849.558 63 849.558 63 899 63 c 0,9,10
+ 959.114 63 959.114 63 988.26 122.314 c 128,-1,11
+ 1017.41 181.629 1017.41 181.629 1022.79 304 c 1,12,-1
+ 1064 304 l 1,13,-1
+ 1064 299 l 2,14,15
+ 1064 136.534 1064 136.534 1012.67 60.7671 c 128,-1,16
+ 961.348 -15 961.348 -15 852 -15 c 0,17,18
+ 737.87 -15 737.87 -15 691.935 63.6763 c 128,-1,19
+ 646 142.353 646 142.353 646 397 c 0,20,21
+ 646 427.942 646 427.942 647.5 492.663 c 2,22,-1
+ 654.112 774.73 l 1,23,-1
+ 649.27 774.993 l 2,24,25
+ 612.192 776.997 612.192 776.997 547.142 778.498 c 128,-1,26
+ 482.092 779.999 482.092 779.999 389.054 781 c 2,27,-1
+ 384 781.054 l 1,28,-1
+ 384 776 l 2,29,30
+ 384 302.707 384 302.707 338.12 143.854 c 128,-1,31
+ 292.24 -15 292.24 -15 178 -15 c 0,32,33
+ 108.814 -15 108.814 -15 74.4072 41.6992 c 128,-1,34
+ 40 98.3984 40 98.3984 40 215 c 2,35,-1
+ 40 249 l 1,36,-1
+ 79.208 249 l 1,37,38
+ 81.8672 195.186 81.8672 195.186 100.638 168.593 c 128,-1,39
+ 119.409 142 119.409 142 160 142 c 0,40,41
+ 247.812 142 247.812 142 283.402 271.647 c 128,-1,42
+ 318.991 401.294 318.991 401.294 324 775.934 c 2,43,-1
+ 324.067 781 l 1,44,-1
+ 274 781 l 2,45,46
+ 195.615 781 195.615 781 149.94 753.595 c 128,-1,47
+ 104.265 726.189 104.265 726.189 91.9707 673 c 1,48,-1
+ 54.2803 673 l 1,49,50
+ 62.208 806.529 62.208 806.529 130.971 860.765 c 128,-1,51
+ 199.734 915 199.734 915 375 915 c 0,52,53
+ 409.905 915 409.905 915 583.396 908.5 c 128,-1,54
+ 756.888 902.001 756.888 902.001 895 902 c 0,55,56
+ 964.036 902 964.036 902 999.518 917.358 c 0,57,58
+ 1033.33 931.993 1033.33 931.993 1034.92 962 c 1,59,-1
+ 1072 962 l 1,60,-1
+ 1072 961 l 2,61,62
+ 1072 858.087 1072 858.087 1025.97 812.543 c 128,-1,63
+ 979.944 767 979.944 767 877 767 c 0,64,65
+ 858.12 767 858.12 767 847.741 767.494 c 128,-1,66
+ 837.379 767.988 837.379 767.988 827.498 768.976 c 2,67,-1
+ 822 769.525 l 1,68,-1
+ 822 764 l 2,0,1
+1034.92 962 m 1,69,70
+ 1035 963.481 1035 963.481 1035 965 c 2,71,-1
+ 1035 967 l 1,72,-1
+ 1030 962 l 1,73,-1
+ 1034.92 962 l 1,69,70
+EndSplineSet
+Validated: 16389
+EndChar
+
+StartChar: rho
+Encoding: 949 961 949
+Width: 1124
+Flags: W
+HStem: -20 52<493.829 705.928> 941 47<450.638 644.649>
+VStem: 130 164<-412 124.68 280.993 726.527> 843 174<251.569 712.613>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 9
+MDAP[rnd]
+PUSHB_1
+ 24
+MDRP[min,rnd,black]
+PUSHB_1
+ 18
+MDAP[rnd]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 28
+MDAP[rnd]
+PUSHB_1
+ 15
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 21
+SHP[rp2]
+PUSHB_1
+ 14
+SRP0
+PUSHB_2
+ 27
+ 1
+CALL
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_2
+ 29
+ 1
+CALL
+PUSHB_2
+ 27
+ 14
+SRP1
+SRP2
+PUSHB_2
+ 9
+ 3
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 18
+ 24
+SRP1
+SRP2
+PUSHB_2
+ 6
+ 13
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+130 481 m 2,0,1
+ 130 718.074 130 718.074 252.109 853.037 c 128,-1,2
+ 374.219 988 374.219 988 586 988 c 0,3,4
+ 780.743 988 780.743 988 898.872 854.055 c 128,-1,5
+ 1017 720.11 1017 720.11 1017 496 c 0,6,7
+ 1017 268.819 1017 268.819 895.834 124.41 c 128,-1,8
+ 774.668 -20 774.668 -20 592 -20 c 0,9,10
+ 510.099 -20 510.099 -20 433.102 15.5371 c 128,-1,11
+ 356.103 51.0751 356.103 51.0751 302.821 114.225 c 2,12,-1
+ 294 124.68 l 1,13,-1
+ 294 -412 l 5,14,-1
+ 130 -412 l 5,15,-1
+ 130 481 l 2,0,1
+761.971 795.148 m 128,-1,17
+ 680.942 941 680.942 941 549 941 c 0,18,19
+ 431.245 941 431.245 941 366.623 838.724 c 128,-1,20
+ 302 736.447 302 736.447 302 551 c 0,21,22
+ 302 321.689 302 321.689 383.539 176.845 c 128,-1,23
+ 465.077 32 465.077 32 594 32 c 0,24,25
+ 719.704 32 719.704 32 781.352 126.255 c 128,-1,26
+ 843 220.51 843 220.51 843 410 c 0,27,16
+ 843 649.296 843 649.296 761.971 795.148 c 128,-1,17
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: sigma1
+Encoding: 950 962 950
+Width: 899
+Flags: W
+HStem: -386 78<336.61 607.112> 763 152<286.55 777.037>
+VStem: 89 47<329.058 582.344> 740 64<-200.201 -52.7513> 792.673 38.2051<928.137 956>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 20
+MDAP[rnd]
+PUSHB_1
+ 29
+MDRP[min,rnd,black]
+PUSHB_3
+ 29
+ 20
+ 10
+CALL
+PUSHB_4
+ 0
+ 29
+ 26
+ 9
+CALL
+PUSHB_1
+ 8
+MDAP[rnd]
+PUSHB_1
+ 44
+MDRP[min,rnd,black]
+PUSHB_1
+ 47
+SHP[rp2]
+PUSHB_3
+ 44
+ 8
+ 10
+CALL
+PUSHB_4
+ 64
+ 44
+ 0
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 50
+MDAP[rnd]
+PUSHB_1
+ 41
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 11
+MDRP[min,rnd,black]
+PUSHB_1
+ 11
+SRP0
+PUSHB_2
+ 32
+ 1
+CALL
+PUSHB_1
+ 17
+MDRP[min,rnd,black]
+PUSHB_3
+ 32
+ 17
+ 10
+CALL
+PUSHB_4
+ 0
+ 32
+ 23
+ 9
+CALL
+PUSHB_4
+ 0
+ 17
+ 32
+ 8
+CALL
+PUSHB_1
+ 1
+MDRP[min,rnd,black]
+PUSHB_2
+ 51
+ 1
+CALL
+PUSHB_2
+ 32
+ 11
+SRP1
+SRP2
+PUSHB_5
+ 8
+ 15
+ 37
+ 44
+ 47
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 8
+ 29
+SRP1
+SRP2
+PUSHB_2
+ 17
+ 41
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+792.673 956 m 1,0,-1
+ 830.878 956 l 1,1,2
+ 827.772 853.071 827.772 853.071 775.413 805.036 c 128,-1,3
+ 723.054 757 723.054 757 608 757 c 2,4,-1
+ 600 757 l 2,5,6
+ 585.148 757 585.148 757 534.648 760 c 128,-1,7
+ 484.148 763 484.148 763 451 763 c 0,8,9
+ 310.963 763 310.963 763 223.481 677.553 c 128,-1,10
+ 136 592.105 136 592.105 136 459 c 0,11,12
+ 136 311.59 136 311.59 220.651 244.173 c 128,-1,13
+ 305.303 176.756 305.303 176.756 550.634 159.014 c 0,14,15
+ 691.132 148.853 691.132 148.853 747.566 97.8164 c 128,-1,16
+ 804 46.7803 804 46.7803 804 -61 c 0,17,18
+ 804 -206.606 804 -206.606 692.619 -296.303 c 128,-1,19
+ 581.237 -386 581.237 -386 395 -386 c 0,20,21
+ 292.923 -386 292.923 -386 250.461 -369.779 c 128,-1,22
+ 208 -353.558 208 -353.558 208 -317 c 0,23,24
+ 208 -289.466 208 -289.466 227.849 -274.233 c 128,-1,25
+ 247.697 -259 247.697 -259 285 -259 c 0,26,27
+ 308.209 -259 308.209 -259 383.709 -283.5 c 128,-1,28
+ 459.209 -308 459.209 -308 512 -308 c 0,29,30
+ 602.646 -308 602.646 -308 671.323 -257.261 c 128,-1,31
+ 740 -206.522 740 -206.522 740 -139 c 0,32,33
+ 740 -83.0928 740 -83.0928 713.625 -53.5527 c 128,-1,34
+ 687.25 -24.0127 687.25 -24.0127 622.106 -9.12402 c 0,35,36
+ 583.049 -0.197266 583.049 -0.197266 491.935 6.05029 c 128,-1,37
+ 400.82 12.2979 400.82 12.2979 362.841 18.9287 c 0,38,39
+ 225.376 42.9268 225.376 42.9268 157.188 143.233 c 128,-1,40
+ 89 243.539 89 243.539 89 426 c 0,41,42
+ 89 661.257 89 661.257 189.708 788.128 c 128,-1,43
+ 290.415 915 290.415 915 477 915 c 0,44,45
+ 521.797 915 521.797 915 589.297 909.5 c 128,-1,46
+ 656.797 904 656.797 904 678 904 c 0,47,48
+ 729.146 904 729.146 904 759.395 918.62 c 128,-1,49
+ 789.644 933.24 789.644 933.24 792.673 956 c 1,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: sigma
+Encoding: 951 963 951
+Width: 1235
+Flags: W
+HStem: -18 50<505.133 759.986> 818 113<892.246 1191.89> 900 45<456.158 686.727>
+VStem: 77 197<266.446 669.071> 925 194<250.169 653.775>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 18
+MDAP[rnd]
+PUSHB_1
+ 11
+MDRP[min,rnd,black]
+PUSHB_1
+ 34
+MDAP[rnd]
+PUSHB_1
+ 27
+MDRP[min,rnd,black]
+PUSHB_1
+ 27
+SRP0
+PUSHB_1
+ 5
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 40
+MDAP[rnd]
+PUSHB_1
+ 21
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_1
+ 8
+SRP0
+PUSHB_2
+ 2
+ 1
+CALL
+PUSHB_1
+ 15
+MDRP[min,rnd,black]
+PUSHB_2
+ 41
+ 1
+CALL
+PUSHB_2
+ 2
+ 8
+SRP1
+SRP2
+PUSHB_5
+ 39
+ 12
+ 18
+ 24
+ 37
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 15
+SRP1
+PUSHB_3
+ 13
+ 27
+ 34
+IP
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 34
+ 11
+SRP1
+SRP2
+PUSHB_5
+ 2
+ 8
+ 13
+ 15
+ 21
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 5
+SRP1
+PUSHB_2
+ 12
+ 37
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+850.165 121.089 m 128,-1,1
+ 925 210.179 925 210.179 925 389 c 0,2,3
+ 925 621.566 925 621.566 828.308 760.783 c 128,-1,4
+ 731.615 900 731.615 900 571 900 c 0,5,6
+ 430.585 900 430.585 900 352.292 801.372 c 128,-1,7
+ 274 702.743 274 702.743 274 524 c 0,8,9
+ 274 306.408 274 306.408 371.208 169.204 c 128,-1,10
+ 468.415 32 468.415 32 625 32 c 0,11,0
+ 775.33 32 775.33 32 850.165 121.089 c 128,-1,1
+894.732 822.544 m 0,12,13
+ 1007.47 765.186 1007.47 765.186 1063.24 673.89 c 128,-1,14
+ 1119 582.594 1119 582.594 1119 457 c 0,15,16
+ 1119 247.218 1119 247.218 972.536 114.609 c 128,-1,17
+ 826.072 -18 826.072 -18 588 -18 c 0,18,19
+ 363.957 -18 363.957 -18 220.479 114.594 c 128,-1,20
+ 77 247.188 77 247.188 77 451 c 0,21,22
+ 77 673.795 77 673.795 225.47 809.397 c 128,-1,23
+ 373.939 945 373.939 945 621 945 c 0,24,25
+ 670.87 945 670.87 945 806.371 938 c 128,-1,26
+ 941.871 931 941.871 931 1026 931 c 0,27,28
+ 1108.78 931 1108.78 931 1149.54 944.083 c 128,-1,29
+ 1190.3 957.166 1190.3 957.166 1196.24 984 c 1,30,-1
+ 1231.82 984 l 1,31,32
+ 1228.12 890.126 1228.12 890.126 1193 854.063 c 128,-1,33
+ 1157.89 818 1157.89 818 1063 818 c 0,34,35
+ 1043.2 818 1043.2 818 1011.83 820.489 c 128,-1,36
+ 980.469 822.979 980.469 822.979 897.539 831.971 c 0,37,38
+ 893.396 832.42 893.396 832.42 892.208 828.427 c 128,-1,39
+ 891.019 824.434 891.019 824.434 894.732 822.544 c 0,12,13
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: tau
+Encoding: 952 964 952
+Width: 899
+Flags: W
+HStem: -11 72<531.012 688.438> 765 137<507.189 806.976> 773 142<60.3562 322.125 507 609.088>
+VStem: 314 185<110.487 769> 752.795 39.2051<172.493 304> 831.895 31.0767<936.073 962>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 17
+MDAP[rnd]
+PUSHB_1
+ 9
+MDRP[min,rnd,black]
+PUSHB_3
+ 9
+ 17
+ 10
+CALL
+PUSHB_4
+ 64
+ 9
+ 13
+ 9
+CALL
+PUSHB_1
+ 24
+MDAP[rnd]
+PUSHB_1
+ 29
+SHP[rp1]
+PUSHB_1
+ 36
+MDRP[min,rnd,black]
+PUSHB_3
+ 36
+ 24
+ 10
+CALL
+PUSHB_4
+ 64
+ 36
+ 43
+ 9
+CALL
+PUSHB_1
+ 51
+SHP[rp2]
+PUSHB_1
+ 36
+SRP0
+PUSHB_1
+ 47
+MDRP[min,rnd,black]
+PUSHB_2
+ 27
+ 49
+SHP[rp2]
+SHP[rp2]
+PUSHB_3
+ 47
+ 36
+ 10
+CALL
+PUSHB_4
+ 64
+ 47
+ 33
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 56
+MDAP[rnd]
+PUSHB_1
+ 20
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 22
+SHP[rp2]
+PUSHB_1
+ 6
+MDRP[min,rnd,black]
+PUSHB_2
+ 0
+ 3
+SHP[rp2]
+SHP[rp2]
+PUSHB_1
+ 6
+SRP0
+PUSHB_2
+ 12
+ 1
+CALL
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 14
+SRP0
+PUSHB_2
+ 43
+ 1
+CALL
+PUSHB_1
+ 53
+SHP[rp2]
+PUSHB_1
+ 44
+MDRP[min,rnd,black]
+PUSHB_2
+ 57
+ 1
+CALL
+PUSHB_2
+ 12
+ 6
+SRP1
+SRP2
+PUSHB_3
+ 17
+ 39
+ 47
+IP
+IP
+IP
+PUSHB_2
+ 44
+ 43
+SRP1
+SRP2
+PUSHB_1
+ 51
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 47
+ 9
+SRP1
+SRP2
+PUSHB_1
+ 20
+IP
+PUSHB_2
+ 36
+ 24
+SRP1
+SRP2
+PUSHB_1
+ 26
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+507 764 m 2,0,1
+ 507 758.498 507 758.498 506.157 742.689 c 128,-1,2
+ 505.314 726.881 505.314 726.881 505.006 717.229 c 0,3,4
+ 499 528.72 499 528.72 499 401 c 2,5,-1
+ 499 334 l 2,6,7
+ 499 156.913 499 156.913 520.893 108.957 c 128,-1,8
+ 542.786 61 542.786 61 602 61 c 0,9,10
+ 675.822 61 675.822 61 711.547 120.202 c 128,-1,11
+ 747.272 179.403 747.272 179.403 752.795 304 c 1,12,-1
+ 792 304 l 1,13,-1
+ 792 301 l 2,14,15
+ 792 139.74 792 139.74 732.291 64.3701 c 128,-1,16
+ 672.582 -11 672.582 -11 547 -11 c 0,17,18
+ 416.623 -11 416.623 -11 365.312 63.2793 c 128,-1,19
+ 314 137.559 314 137.559 314 406 c 0,20,21
+ 314 445.57 314 445.57 315.249 495.905 c 2,22,-1
+ 322.125 773 l 1,23,-1
+ 317 773 l 2,24,25
+ 313.495 773 313.495 773 303.98 774.903 c 2,26,-1
+ 303.398 774.984 l 1,27,28
+ 228.199 781 228.199 781 199 781 c 0,29,30
+ 110.761 781 110.761 781 57.2095 752.709 c 128,-1,31
+ 3.6582 724.418 3.6582 724.418 -9.91406 673 c 1,32,-1
+ -43.7109 673 l 1,33,34
+ -35.6084 804.414 -35.6084 804.414 41.9951 859.707 c 128,-1,35
+ 119.599 915 119.599 915 313 915 c 0,36,37
+ 362.85 915 362.85 915 471.35 908.5 c 128,-1,38
+ 579.851 902 579.851 902 639 902 c 0,39,40
+ 734.762 902 734.762 902 783.381 917.161 c 0,41,42
+ 829.74 931.617 829.74 931.617 831.895 962 c 1,43,-1
+ 862.972 962 l 1,44,45
+ 861.756 854.358 861.756 854.358 806.987 809.679 c 128,-1,46
+ 752.219 765 752.219 765 610 765 c 0,47,48
+ 581.078 765 581.078 765 518.158 768.995 c 1,49,-1
+ 507 769 l 1,50,-1
+ 507 764 l 2,0,1
+831.895 962 m 1,51,52
+ 832 963.481 832 963.481 832 965 c 2,53,-1
+ 832 967 l 1,54,-1
+ 827 962 l 1,55,-1
+ 831.895 962 l 1,51,52
+EndSplineSet
+Validated: 16389
+EndChar
+
+StartChar: upsilon
+Encoding: 953 965 953
+Width: 1180
+Flags: W
+HStem: -13 63<502.006 743.155> 867 72<81.5406 229.038>
+VStem: -3 35<660 793.972> 226 183<148.231 718.479> 253 178<356.319 835.407> 941 103<314.42 709.952>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 30
+MDAP[rnd]
+PUSHB_1
+ 16
+MDRP[min,rnd,black]
+PUSHB_1
+ 39
+MDAP[rnd]
+PUSHB_1
+ 7
+MDRP[min,rnd,black]
+PUSHB_1
+ 24
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 45
+MDAP[rnd]
+PUSHB_1
+ 4
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 42
+MDRP[min,rnd,black]
+PUSHB_1
+ 42
+SRP0
+PUSHB_2
+ 33
+ 1
+CALL
+PUSHB_1
+ 13
+MDRP[min,rnd,black]
+PUSHB_1
+ 13
+SRP0
+PUSHB_1
+ 10
+DUP
+MDRP[rp0,rnd,white]
+SRP1
+PUSHB_1
+ 36
+MDRP[min,rnd,black]
+PUSHB_1
+ 36
+MDAP[rnd]
+PUSHB_1
+ 10
+MDRP[min,rnd,black]
+PUSHB_1
+ 13
+SRP0
+PUSHB_2
+ 19
+ 1
+CALL
+PUSHB_1
+ 27
+MDRP[min,rnd,black]
+PUSHB_3
+ 19
+ 27
+ 10
+CALL
+PUSHB_4
+ 0
+ 19
+ 22
+ 9
+CALL
+PUSHB_2
+ 46
+ 1
+CALL
+PUSHB_2
+ 33
+ 42
+SRP1
+SRP2
+PUSHB_2
+ 7
+ 39
+IP
+IP
+PUSHB_2
+ 19
+ 10
+SRP1
+SRP2
+PUSHB_2
+ 16
+ 30
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 39
+ 16
+SRP1
+SRP2
+PUSHB_6
+ 4
+ 10
+ 0
+ 21
+ 27
+ 33
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 7
+SRP1
+PUSHB_1
+ 22
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+33.8887 660 m 1,0,-1
+ -1.54004 660 l 1,1,2
+ -2.15234 665.877 -2.15234 665.877 -2.57617 673.508 c 128,-1,3
+ -3 681.139 -3 681.139 -3 698 c 0,4,5
+ -3 817.062 -3 817.062 52.6035 878.031 c 128,-1,6
+ 108.207 939 108.207 939 217 939 c 0,7,8
+ 323.716 939 323.716 939 377.358 877.068 c 128,-1,9
+ 431 815.136 431 815.136 431 692 c 0,10,11
+ 431 652.214 431 652.214 420 523.714 c 128,-1,12
+ 409 395.214 409 395.214 409 307 c 0,13,14
+ 409 176.143 409 176.143 463.354 113.071 c 128,-1,15
+ 517.708 50 517.708 50 631 50 c 0,16,17
+ 767.219 50 767.219 50 854.109 146.037 c 128,-1,18
+ 941 242.074 941 242.074 941 395 c 0,19,20
+ 941 506.097 941 506.097 873.5 652.596 c 128,-1,21
+ 806 799.096 806 799.096 806 846 c 128,-1,22
+ 806 892.842 806 892.842 830.492 915.921 c 128,-1,23
+ 854.984 939 854.984 939 905 939 c 0,24,25
+ 975.798 939 975.798 939 1009.9 864.952 c 128,-1,26
+ 1044 790.904 1044 790.904 1044 629 c 0,27,28
+ 1044 324.647 1044 324.647 919.239 155.824 c 128,-1,29
+ 794.478 -13 794.478 -13 571 -13 c 0,30,31
+ 408.156 -13 408.156 -13 317.078 83.4937 c 128,-1,32
+ 226 179.987 226 179.987 226 354 c 0,33,34
+ 226 427.745 226 427.745 239.5 559.745 c 128,-1,35
+ 253 691.745 253 691.745 253 748 c 0,36,37
+ 253 805.742 253 805.742 228.708 836.371 c 128,-1,38
+ 204.416 867 204.416 867 158 867 c 0,39,40
+ 95.416 867 95.416 867 63.708 822.296 c 128,-1,41
+ 32 777.593 32 777.593 32 690 c 0,42,43
+ 32 683.773 32 683.773 32.834 674.599 c 128,-1,44
+ 33.668 665.424 33.668 665.424 33.8887 660 c 1,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: phi
+Encoding: 954 966 954
+Width: 1067
+Flags: W
+HStem: 892.524 48.4775<480.52 486.132 580.854 586.484>
+VStem: 56 164<236.552 690.056> 466 137<-412 -15.3887 37.0488 584.775> 486.132 94.7227<824.805 892.519 941.149 1338> 847 162<234.252 690.057>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 10
+MDAP[rnd]
+PUSHB_1
+ 3
+SHP[rp1]
+PUSHB_1
+ 35
+MDRP[min,rnd,black]
+PUSHB_1
+ 18
+SHP[rp2]
+PUSHB_3
+ 10
+ 35
+ 10
+CALL
+PUSHB_4
+ 64
+ 10
+ 26
+ 9
+CALL
+PUSHB_3
+ 35
+ 10
+ 10
+CALL
+PUSHB_4
+ 64
+ 35
+ 37
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 40
+MDAP[rnd]
+PUSHB_1
+ 32
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 14
+SRP0
+PUSHB_2
+ 27
+ 1
+CALL
+PUSHB_1
+ 9
+SHP[rp2]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_1
+ 4
+SHP[rp2]
+PUSHB_4
+ 10
+ 26
+ 27
+ 8
+CALL
+PUSHB_1
+ 36
+SHP[rp1]
+PUSHB_1
+ 3
+MDRP[min,rnd,black]
+PUSHB_1
+ 38
+SHP[rp2]
+PUSHB_1
+ 26
+SRP0
+PUSHB_2
+ 8
+ 1
+CALL
+PUSHB_1
+ 21
+MDRP[min,rnd,black]
+PUSHB_2
+ 41
+ 1
+CALL
+SVTCA[y-axis]
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+774.483 762.071 m 128,-1,1
+ 701.966 880.735 701.966 880.735 586.484 891.977 c 2,2,-1
+ 580.854 892.524 l 1,3,-1
+ 603.156 36.9541 l 1,4,-1
+ 608.963 38.0938 l 2,5,6
+ 718.233 59.5391 718.233 59.5391 782.617 174.618 c 128,-1,7
+ 847 289.696 847 289.696 847 463 c 0,8,0
+ 847 643.407 847 643.407 774.483 762.071 c 128,-1,1
+465.86 37.0488 m 1,9,-1
+ 486.132 892.519 l 1,10,-1
+ 480.52 891.977 l 2,11,12
+ 364.031 880.736 364.031 880.736 292.016 762.57 c 128,-1,13
+ 220 644.403 220 644.403 220 463 c 0,14,15
+ 220 290.685 220 290.685 285.902 174.089 c 128,-1,16
+ 351.804 57.4932 351.804 57.4932 460.118 38.0781 c 2,17,-1
+ 465.86 37.0488 l 1,9,-1
+583.845 941.002 m 2,18,19
+ 774.71 935.06 774.71 935.06 891.851 804.08 c 128,-1,20
+ 1009 673.091 1009 673.091 1009 463 c 0,21,22
+ 1009 259.821 1009 259.821 899.757 129.818 c 128,-1,23
+ 790.495 -0.208993 790.495 -0.208993 607.596 -15.0166 c 2,24,-1
+ 603 -15.3887 l 1,25,-1
+ 603 -412 l 5,26,-1
+ 466 -412 l 5,27,-1
+ 466 -15.3389 l 1,28,-1
+ 461.351 -15.0127 l 2,29,30
+ 278.469 -2.18291 278.469 -2.18291 167.225 128.838 c 128,-1,31
+ 56 259.836 56 259.836 56 463 c 0,32,33
+ 56 672.09 56 672.09 173.648 803.579 c 128,-1,34
+ 291.27 935.038 291.27 935.038 483.154 941.002 c 2,35,-1
+ 487.867 941.148 l 1,36,-1
+ 498.863 1338 l 1,37,-1
+ 570.112 1338 l 1,38,-1
+ 579.108 941.149 l 1,39,-1
+ 583.845 941.002 l 2,18,19
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: chi
+Encoding: 955 967 955
+Width: 1124
+Flags: W
+HStem: -414 160<836.677 1021.95> 792 168<97.0993 302.477>
+VStem: 25 42<638.104 737.494> 1053.86 43.1436<-199.481 -97>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 17
+MDAP[rnd]
+PUSHB_1
+ 22
+SHP[rp1]
+PUSHB_1
+ 7
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+MDAP[rnd]
+PUSHB_1
+ 42
+MDRP[min,rnd,black]
+SVTCA[x-axis]
+PUSHB_1
+ 47
+MDAP[rnd]
+PUSHB_1
+ 39
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 32
+MDRP[min,rnd,black]
+PUSHB_1
+ 32
+SRP0
+PUSHB_2
+ 10
+ 1
+CALL
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_2
+ 48
+ 1
+CALL
+PUSHB_2
+ 32
+ 39
+SRP1
+SRP2
+PUSHB_1
+ 23
+IP
+PUSHB_1
+ 10
+SRP1
+PUSHB_4
+ 21
+ 22
+ 24
+ 42
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 29
+ 7
+SRP1
+SRP2
+PUSHB_8
+ 2
+ 10
+ 14
+ 21
+ 24
+ 35
+ 39
+ 46
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 42
+SRP1
+PUSHB_2
+ 1
+ 0
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+850.847 932 m 1,0,-1
+ 1044.18 932 l 1,1,-1
+ 621.417 226.41 l 1,2,-1
+ 724.381 -21.9131 l 2,3,4
+ 779.99 -156.029 779.99 -156.029 825.271 -204.871 c 0,5,6
+ 870.817 -254 870.817 -254 934 -254 c 0,7,8
+ 994.533 -254 994.533 -254 1022.84 -215.403 c 128,-1,9
+ 1051.14 -176.807 1051.14 -176.807 1053.86 -97 c 1,10,-1
+ 1093.44 -97 l 1,11,12
+ 1095.12 -115.573 1095.12 -115.573 1096.06 -134.848 c 128,-1,13
+ 1097 -154.121 1097 -154.121 1097 -184 c 0,14,15
+ 1097 -287.424 1097 -287.424 1052.7 -350.712 c 132,-1,16
+ 1008.4 -414 1008.4 -414 932 -414 c 4,17,18
+ 818.583 -414 818.583 -414 725.628 -186.107 c 2,19,-1
+ 694.623 -110.095 l 1,20,-1
+ 575.748 175.204 l 1,21,-1
+ 233.129 -412 l 1,22,-1
+ 39.7715 -412 l 1,23,-1
+ 499.567 364.59 l 1,24,-1
+ 416.628 567.894 l 2,25,26
+ 368.695 685.387 368.695 685.387 314.648 738.919 c 0,27,28
+ 261.057 792 261.057 792 188 792 c 0,29,30
+ 132.773 792 132.773 792 99.8867 755.459 c 128,-1,31
+ 67 718.919 67 718.919 67 658 c 0,32,33
+ 67 653.688 67 653.688 67.7744 647.495 c 128,-1,34
+ 68.5488 641.302 68.5488 641.302 68.791 638 c 1,35,-1
+ 29.2988 638 l 1,36,37
+ 26.8691 654.731 26.8691 654.731 25.9346 673.428 c 128,-1,38
+ 25 692.125 25 692.125 25 724 c 0,39,40
+ 25 833.396 25 833.396 70.2852 896.697 c 128,-1,41
+ 115.571 960 115.571 960 193 960 c 0,42,43
+ 264.74 960 264.74 960 315.211 902.67 c 128,-1,44
+ 365.682 845.339 365.682 845.339 454.369 625.114 c 1,45,-1
+ 542.189 411.836 l 1,46,-1
+ 850.847 932 l 1,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: psi
+Encoding: 956 968 956
+Width: 1405
+Flags: W
+HStem: -13.0098 49.0303<552.857 677.22> 867 72<77.0897 210.32>
+VStem: -3 41<660 805.855> 208 176<185.687 694.959> 230 171<395.197 846.137> 658.233 200.47<-412 -173.682> 733.772 43.4756<891.471 1173> 1164 123<334.124 670.599>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 20
+MDAP[rnd]
+PUSHB_1
+ 15
+SHP[rp1]
+PUSHB_1
+ 49
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SHP[rp2]
+PUSHB_3
+ 20
+ 49
+ 10
+CALL
+PUSHB_4
+ 64
+ 20
+ 18
+ 9
+CALL
+PUSHB_3
+ 49
+ 20
+ 10
+CALL
+PUSHB_4
+ 64
+ 49
+ 51
+ 9
+CALL
+PUSHB_1
+ 29
+MDAP[rnd]
+PUSHB_1
+ 40
+MDRP[min,rnd,black]
+PUSHB_1
+ 9
+SHP[rp2]
+PUSHB_3
+ 29
+ 40
+ 10
+CALL
+PUSHB_4
+ 64
+ 29
+ 34
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 54
+MDAP[rnd]
+PUSHB_1
+ 37
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 32
+MDRP[min,rnd,black]
+PUSHB_1
+ 32
+SRP0
+PUSHB_2
+ 23
+ 1
+CALL
+PUSHB_1
+ 46
+MDRP[min,rnd,black]
+PUSHB_1
+ 46
+SRP0
+PUSHB_1
+ 43
+DUP
+MDRP[rp0,rnd,white]
+SRP1
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_1
+ 26
+MDAP[rnd]
+PUSHB_1
+ 43
+MDRP[min,rnd,black]
+PUSHB_1
+ 46
+SRP0
+PUSHB_2
+ 51
+ 1
+CALL
+PUSHB_1
+ 52
+MDRP[min,rnd,black]
+PUSHB_1
+ 18
+DUP
+MDRP[rp0,rnd,white]
+SRP1
+PUSHB_1
+ 17
+MDRP[min,rnd,black]
+PUSHB_1
+ 52
+SRP0
+PUSHB_2
+ 3
+ 1
+CALL
+PUSHB_1
+ 12
+MDRP[min,rnd,black]
+PUSHB_3
+ 3
+ 12
+ 10
+CALL
+PUSHB_4
+ 0
+ 3
+ 6
+ 9
+CALL
+PUSHB_2
+ 55
+ 1
+CALL
+PUSHB_2
+ 23
+ 32
+SRP1
+SRP2
+PUSHB_2
+ 29
+ 40
+IP
+IP
+PUSHB_2
+ 17
+ 18
+SRP1
+SRP2
+PUSHB_4
+ 19
+ 50
+ 16
+ 53
+DEPTH
+SLOOP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 49
+ 20
+SRP1
+SRP2
+PUSHB_1
+ 21
+IP
+PUSHB_1
+ 29
+SRP1
+PUSHB_7
+ 6
+ 12
+ 23
+ 3
+ 37
+ 43
+ 46
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+840.895 34.0811 m 2,0,1
+ 996.717 62.4297 996.717 62.4297 1080.35 164.31 c 128,-1,2
+ 1164 266.211 1164 266.211 1164 428 c 0,3,4
+ 1164 551.904 1164 551.904 1115 682.905 c 128,-1,5
+ 1066 813.905 1066 813.905 1066 844 c 0,6,7
+ 1066 890.987 1066 890.987 1089.06 914.994 c 128,-1,8
+ 1112.13 939 1112.13 939 1159 939 c 0,9,10
+ 1225.69 939 1225.69 939 1256.35 866.99 c 128,-1,11
+ 1287 794.979 1287 794.979 1287 631 c 0,12,13
+ 1287 356.574 1287 356.574 1168.57 187.105 c 128,-1,14
+ 1050.14 17.6352 1050.14 17.6352 839.28 -13.0518 c 2,15,-1
+ 834.744 -13.7119 l 1,16,-1
+ 858.703 -412 l 5,17,-1
+ 658.233 -412 l 5,18,-1
+ 677.22 -13.3115 l 1,19,-1
+ 672.307 -13.0098 l 2,20,21
+ 430.027 1.87087 430.027 1.87087 319.005 99.0767 c 128,-1,22
+ 208 196.268 208 196.268 208 391 c 0,23,24
+ 208 464.77 208 464.77 219 583.77 c 128,-1,25
+ 230 702.77 230 702.77 230 748 c 0,26,27
+ 230 805.524 230 805.524 209.332 836.262 c 128,-1,28
+ 188.663 867 188.663 867 147 867 c 0,29,30
+ 92.1465 867 92.1465 867 65.0732 821.184 c 128,-1,31
+ 38 775.367 38 775.367 38 686 c 2,32,-1
+ 38 660 l 1,33,-1
+ -1.53613 660 l 1,34,35
+ -2.15039 665.988 -2.15039 665.988 -2.5752 674.06 c 128,-1,36
+ -3 682.132 -3 682.132 -3 700 c 0,37,38
+ -3 817.139 -3 817.139 49.644 878.069 c 128,-1,39
+ 102.288 939 102.288 939 203 939 c 0,40,41
+ 299.644 939 299.644 939 350.322 877.602 c 128,-1,42
+ 401 816.203 401 816.203 401 696 c 0,43,44
+ 401 663.21 401 663.21 392.5 562.21 c 128,-1,45
+ 384 461.21 384 461.21 384 395 c 0,46,47
+ 384 194.115 384 194.115 446.78 122.659 c 128,-1,48
+ 509.577 51.1821 509.577 51.1821 675.545 36.0205 c 2,49,-1
+ 680.751 35.5449 l 1,50,-1
+ 733.772 1173 l 1,51,-1
+ 777.248 1173 l 1,52,-1
+ 835.296 33.0625 l 1,53,-1
+ 840.895 34.0811 l 2,0,1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: omega
+Encoding: 957 969 957
+Width: 1405
+Flags: W
+HStem: -15 53<368.792 550.457 857.468 1036.26> 897.695 44.9023<399.189 487 920 1007.37>
+VStem: 75 184<214.434 699.459> 611 183<340.243 753.22> 652 103<258.96 680.59> 1146 184<215.567 699.312>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 16
+MDAP[rnd]
+PUSHB_1
+ 7
+SHP[rp1]
+PUSHB_1
+ 29
+MDRP[min,rnd,black]
+PUSHB_1
+ 47
+SHP[rp2]
+PUSHB_1
+ 23
+MDAP[rnd]
+PUSHB_1
+ 0
+SHP[rp1]
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_1
+ 1
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 53
+MDAP[rnd]
+PUSHB_1
+ 19
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_3
+ 26
+ 19
+ 10
+CALL
+PUSHB_4
+ 64
+ 26
+ 23
+ 9
+CALL
+PUSHB_1
+ 26
+SRP0
+PUSHB_2
+ 32
+ 1
+CALL
+PUSHB_1
+ 44
+MDRP[min,rnd,black]
+PUSHB_1
+ 44
+SRP0
+PUSHB_1
+ 41
+DUP
+MDRP[rp0,rnd,white]
+SRP1
+PUSHB_1
+ 35
+MDRP[min,rnd,black]
+PUSHB_1
+ 35
+MDAP[rnd]
+PUSHB_1
+ 41
+MDRP[min,rnd,black]
+PUSHB_1
+ 44
+SRP0
+PUSHB_2
+ 50
+ 1
+CALL
+PUSHB_1
+ 4
+MDRP[min,rnd,black]
+PUSHB_3
+ 50
+ 4
+ 10
+CALL
+PUSHB_4
+ 64
+ 50
+ 0
+ 9
+CALL
+PUSHB_2
+ 54
+ 1
+CALL
+PUSHB_2
+ 35
+ 26
+SRP1
+SRP2
+PUSHB_2
+ 16
+ 29
+IP
+IP
+PUSHB_1
+ 41
+SRP1
+PUSHB_1
+ 12
+IP
+PUSHB_2
+ 44
+ 32
+SRP1
+SRP2
+PUSHB_1
+ 38
+IP
+PUSHB_1
+ 50
+SRP1
+PUSHB_1
+ 7
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 23
+ 29
+SRP1
+SRP2
+PUSHB_7
+ 52
+ 10
+ 4
+ 19
+ 24
+ 12
+ 38
+DEPTH
+SLOOP
+IP
+PUSHB_1
+ 22
+SRP1
+PUSHB_2
+ 2
+ 21
+IP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+920 897.694 m 1,0,-1
+ 920 942.596 l 1,1,2
+ 1116.98 926.494 1116.98 926.494 1223.49 801.825 c 128,-1,3
+ 1330 677.155 1330 677.155 1330 457 c 0,4,5
+ 1330 246.734 1330 246.734 1226.79 115.867 c 128,-1,6
+ 1123.58 -15 1123.58 -15 963 -15 c 0,7,8
+ 868.036 -15 868.036 -15 805.25 46.3154 c 128,-1,9
+ 742.463 107.631 742.463 107.631 706.821 237.325 c 2,10,11
+ 701.881 255.304 l 1,12,-1
+ 697.163 237.266 l 2,13,14
+ 663.512 108.598 663.512 108.598 600.732 46.7988 c 128,-1,15
+ 537.952 -15 537.952 -15 442 -15 c 0,16,17
+ 280.42 -15 280.42 -15 177.71 114.869 c 128,-1,18
+ 75 244.738 75 244.738 75 457 c 0,19,20
+ 75 677.148 75 677.148 182.003 801.822 c 128,-1,21
+ 289.006 926.495 289.006 926.495 487 942.598 c 1,22,-1
+ 487 897.695 l 1,23,24
+ 364.051 889.146 364.051 889.146 311.525 800.256 c 128,-1,25
+ 259 711.367 259 711.367 259 500 c 0,26,27
+ 259 249.943 259 249.943 305.872 143.972 c 128,-1,28
+ 352.744 38 352.744 38 461 38 c 0,29,30
+ 550.749 38 550.749 38 601.375 117.774 c 128,-1,31
+ 652 197.548 652 197.548 652 338 c 0,32,33
+ 652 409.44 652 409.44 631.5 524.94 c 128,-1,34
+ 611 640.44 611 640.44 611 682 c 0,35,36
+ 611 729.014 611 729.014 634.579 754.007 c 128,-1,37
+ 658.157 779 658.157 779 702 779 c 0,38,39
+ 746.843 779 746.843 779 770.421 754.007 c 128,-1,40
+ 794 729.014 794 729.014 794 682 c 0,41,42
+ 794 637.419 794 637.419 774.5 521.919 c 128,-1,43
+ 755 406.42 755 406.42 755 336 c 0,44,45
+ 755 197.535 755 197.535 806.133 117.768 c 128,-1,46
+ 857.266 38 857.266 38 946 38 c 0,47,48
+ 1052.24 38 1052.24 38 1099.12 142.465 c 128,-1,49
+ 1146 246.93 1146 246.93 1146 481 c 0,50,51
+ 1146 709.331 1146 709.331 1094.49 799.226 c 128,-1,52
+ 1042.97 889.121 1042.97 889.121 920 897.694 c 1,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: theta1
+Encoding: 958 977 958
+Width: 1132
+Flags: W
+HStem: -10 108<414.956 599.348> 623 145<330.378 708.729 878.729 1019.73> 1282 76<340.1 554.726>
+VStem: 708.729 170<768 1056.14>
+LayerCount: 2
+Fore
+SplineSet
+86.918 268 m 5,0,-1
+ 166.539 414 l 5,1,2
+ 237.122 411 237.122 411 315.867 330 c 6,3,-1
+ 440.802 176 l 6,4,5
+ 503.963 98 503.963 98 547.963 98 c 4,6,7
+ 665.963 98 665.963 98 704.949 309 c 4,8,9
+ 733.236 467 733.236 467 711.913 623 c 5,10,11
+ 701.913 623 701.913 623 616.302 621 c 4,12,13
+ 550.885 618 550.885 618 515.885 618 c 4,14,15
+ 186.886 618 186.886 618 140.234 858 c 4,16,17
+ 101.553 1057 101.553 1057 204.396 1207 c 4,18,19
+ 307.044 1358 307.044 1358 503.044 1358 c 4,20,21
+ 784.044 1358 784.044 1358 860.436 965 c 4,22,23
+ 876.375 883 876.375 883 878.729 768 c 5,24,-1
+ 1019.73 768 l 5,25,-1
+ 1047.91 623 l 5,26,-1
+ 873.913 623 l 5,27,28
+ 846.232 395 846.232 395 755.055 221 c 4,29,30
+ 636.956 -10 636.956 -10 447.956 -10 c 4,31,32
+ 381.956 -10 381.956 -10 322.184 66 c 6,33,-1
+ 222.553 203 l 6,34,35
+ 165.918 268 165.918 268 98.918 268 c 6,36,-1
+ 86.918 268 l 5,0,-1
+708.729 768 m 5,37,38
+ 706.012 854 706.012 854 680.159 987 c 4,39,40
+ 622.816 1282 622.816 1282 450.816 1282 c 4,41,42
+ 329.816 1282 329.816 1282 282.114 1157 c 4,43,44
+ 241.33 1053 241.33 1053 266.405 924 c 4,45,46
+ 286.231 822 286.231 822 362.258 791 c 4,47,48
+ 412.729 768 412.729 768 523.729 768 c 6,49,-1
+ 708.729 768 l 5,37,38
+EndSplineSet
+Validated: 33
+EndChar
+
+StartChar: Upsilon1
+Encoding: 959 978 959
+Width: 1270
+Flags: W
+HStem: 1 29.2383<378 461.149 753.363 837> 1348.63 123.367<8.07404 171.5> 1381 85<1019.78 1144.46>
+VStem: 525 170<64.7859 639.853> 1156 152<1236.28 1368.85>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_3
+ 44
+ 0
+ 0
+CALL
+PUSHB_1
+ 45
+MDRP[min,rnd,black]
+PUSHB_1
+ 42
+SHP[rp2]
+PUSHB_1
+ 19
+MDAP[rnd]
+PUSHB_1
+ 10
+SHP[rp1]
+PUSHB_1
+ 34
+MDRP[min,rnd,black]
+PUSHB_3
+ 34
+ 19
+ 10
+CALL
+PUSHB_4
+ 64
+ 34
+ 25
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 48
+MDAP[rnd]
+PUSHB_1
+ 0
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 39
+MDRP[min,rnd,black]
+PUSHB_3
+ 39
+ 0
+ 10
+CALL
+PUSHB_4
+ 64
+ 39
+ 43
+ 9
+CALL
+PUSHB_3
+ 0
+ 39
+ 10
+CALL
+PUSHB_4
+ 64
+ 0
+ 44
+ 9
+CALL
+PUSHB_1
+ 39
+SRP0
+PUSHB_2
+ 31
+ 1
+CALL
+PUSHB_1
+ 22
+MDRP[min,rnd,black]
+PUSHB_2
+ 49
+ 1
+CALL
+PUSHB_2
+ 39
+ 0
+SRP1
+SRP2
+PUSHB_2
+ 15
+ 37
+IP
+IP
+PUSHB_1
+ 31
+SRP1
+PUSHB_1
+ 19
+IP
+PUSHB_1
+ 22
+SRP2
+PUSHB_1
+ 25
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 34
+ 45
+SRP1
+SRP2
+PUSHB_3
+ 13
+ 22
+ 15
+IP
+IP
+IP
+PUSHB_1
+ 19
+SRP1
+PUSHB_1
+ 7
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+525 195 m 6,0,-1
+ 525 649.623 l 5,1,2
+ 465.719 883.735 465.719 883.735 390.385 1036.92 c 132,-1,3
+ 315.05 1190.1 315.05 1190.1 220.218 1269.83 c 4,4,5
+ 156.356 1323.52 156.356 1323.52 70.6777 1348.63 c 132,-1,6
+ -15 1373.75 -15 1373.75 -15 1401 c 4,7,8
+ -15 1436.58 -15 1436.58 7.36914 1454.29 c 132,-1,9
+ 29.7393 1472 29.7393 1472 76 1472 c 4,10,11
+ 252.44 1472 252.44 1472 399.908 1267.43 c 132,-1,12
+ 547.377 1062.86 547.377 1062.86 640.145 684.809 c 6,13,14
+ 644.182 668.356 l 5,15,-1
+ 649.725 684.364 l 6,16,17
+ 827.502 1197.72 827.502 1197.72 920.063 1331.86 c 132,-1,18
+ 1012.62 1466 1012.62 1466 1137 1466 c 4,19,20
+ 1212.05 1466 1212.05 1466 1260.03 1421.9 c 132,-1,21
+ 1308 1377.8 1308 1377.8 1308 1309 c 4,22,23
+ 1308 1263.78 1308 1263.78 1284.81 1235.39 c 132,-1,24
+ 1261.63 1207 1261.63 1207 1227 1207 c 4,25,26
+ 1194.2 1207 1194.2 1207 1174.1 1228.97 c 132,-1,27
+ 1154 1250.94 1154 1250.94 1154 1286 c 4,28,29
+ 1154 1291.62 1154 1291.62 1155 1298.12 c 132,-1,30
+ 1156 1304.62 1156 1304.62 1156 1307 c 4,31,32
+ 1156 1341.9 1156 1341.9 1138.62 1361.45 c 132,-1,33
+ 1121.25 1381 1121.25 1381 1090 1381 c 4,34,35
+ 1020.99 1381 1020.99 1381 923.197 1196 c 132,-1,36
+ 825.406 1011.01 825.406 1011.01 695.283 640.657 c 6,37,-1
+ 695 639.853 l 5,38,-1
+ 695 186 l 6,39,40
+ 695 93.9785 695 93.9785 725.063 62.8789 c 132,-1,41
+ 755.127 31.7783 755.127 31.7783 837 30.0801 c 5,42,-1
+ 837 1 l 5,43,-1
+ 378 1 l 5,44,-1
+ 378 30.2383 l 5,45,46
+ 464.896 34.8447 464.896 34.8447 494.947 63.8613 c 132,-1,47
+ 525 92.877 525 92.877 525 195 c 6,0,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: phi1
+Encoding: 960 981 960
+Width: 1235
+Flags: W
+HStem: -18.1895 52.1895<714 854.086> 869 62<321.383 492.494 803.829 998.555>
+VStem: 66 175<258.561 740.56> 568 146<-412 -18.3428 35.2031 642.959> 1113 62<324.244 720.184>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 25
+MDAP[rnd]
+PUSHB_1
+ 1
+MDRP[min,rnd,black]
+PUSHB_1
+ 11
+SHP[rp2]
+PUSHB_3
+ 25
+ 1
+ 10
+CALL
+PUSHB_4
+ 64
+ 25
+ 26
+ 9
+CALL
+PUSHB_1
+ 8
+MDAP[rnd]
+PUSHB_1
+ 42
+SHP[rp1]
+PUSHB_1
+ 18
+MDRP[min,rnd,black]
+PUSHB_1
+ 35
+SHP[rp2]
+SVTCA[x-axis]
+PUSHB_1
+ 49
+MDAP[rnd]
+PUSHB_1
+ 32
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 45
+MDRP[min,rnd,black]
+PUSHB_1
+ 45
+SRP0
+PUSHB_2
+ 27
+ 1
+CALL
+PUSHB_1
+ 11
+SHP[rp2]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_1
+ 0
+SHP[rp2]
+PUSHB_1
+ 26
+SRP0
+PUSHB_2
+ 5
+ 1
+CALL
+PUSHB_1
+ 21
+MDRP[min,rnd,black]
+PUSHB_2
+ 50
+ 1
+CALL
+PUSHB_2
+ 27
+ 45
+SRP1
+SRP2
+PUSHB_2
+ 35
+ 39
+IP
+IP
+PUSHB_1
+ 26
+SRP1
+PUSHB_1
+ 38
+IP
+PUSHB_1
+ 5
+SRP2
+PUSHB_1
+ 18
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 1
+ 25
+SRP1
+SRP2
+PUSHB_3
+ 23
+ 28
+ 30
+IP
+IP
+IP
+PUSHB_1
+ 8
+SRP1
+PUSHB_4
+ 21
+ 32
+ 38
+ 39
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+714 442 m 2,0,-1
+ 714 34 l 1,1,-1
+ 719 34 l 2,2,3
+ 892.417 34 892.417 34 1002.71 173.129 c 128,-1,4
+ 1113 312.259 1113 312.259 1113 532 c 0,5,6
+ 1113 684.454 1113 684.454 1054.37 776.727 c 128,-1,7
+ 995.747 869 995.747 869 901 869 c 0,8,9
+ 796.752 869 796.752 869 755.376 776.031 c 128,-1,10
+ 714 683.062 714 683.062 714 442 c 2,0,-1
+568 35.2031 m 1,11,-1
+ 568 156 l 2,12,13
+ 568 396.765 568 396.765 577.6 498.32 c 128,-1,14
+ 587.199 599.876 587.199 599.876 608.784 670.547 c 0,15,16
+ 647.55 797.473 647.55 797.473 719.753 864.236 c 128,-1,17
+ 791.957 931 791.957 931 891 931 c 0,18,19
+ 1011.48 931 1011.48 931 1093.24 820.675 c 128,-1,20
+ 1175 710.35 1175 710.35 1175 535 c 0,21,22
+ 1175 292.805 1175 292.805 1049.29 141.357 c 128,-1,23
+ 923.57 -10.0996 923.57 -10.0996 718.807 -18.0039 c 2,24,-1
+ 714 -18.1895 l 1,25,-1
+ 714 -412 l 1,26,-1
+ 568 -412 l 1,27,-1
+ 568 -18.3428 l 1,28,-1
+ 563.354 -18.0127 l 2,29,30
+ 326.257 -1.16614 326.257 -1.16614 196.119 130.951 c 128,-1,31
+ 66 263.049 66 263.049 66 487 c 0,32,33
+ 66 695.396 66 695.396 150.285 813.198 c 128,-1,34
+ 234.57 931 234.57 931 379 931 c 0,35,36
+ 448.515 931 448.515 931 502.593 895.752 c 128,-1,37
+ 556.672 860.505 556.672 860.505 597.267 789.74 c 1,38,-1
+ 556.797 764.963 l 1,39,40
+ 528.12 814.596 528.12 814.596 490.317 839.798 c 128,-1,41
+ 452.514 865 452.514 865 403 865 c 0,42,43
+ 314.727 865 314.727 865 277.863 780.521 c 128,-1,44
+ 241 696.043 241 696.043 241 494 c 0,45,46
+ 241 294.427 241 294.427 323.067 176.898 c 128,-1,47
+ 405.142 59.3601 405.142 59.3601 562.266 36.0537 c 2,48,-1
+ 568 35.2031 l 1,11,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: omega1
+Encoding: 961 982 961
+Width: 1460
+Flags: W
+HStem: -15 53<453.148 601.524 889.633 1031.56> 781 134<84.5494 313.887 393.447 1090.53 1180.76 1427>
+VStem: 161 184<214.03 654.263> 667 151<288.085 601.877> 691 103<237.958 522.659> 1138 182<206.016 663.563>
+TtInstrs:
+SVTCA[y-axis]
+PUSHB_1
+ 59
+MDAP[rnd]
+PUSHB_1
+ 51
+SHP[rp1]
+PUSHB_1
+ 11
+MDRP[min,rnd,black]
+PUSHB_1
+ 29
+SHP[rp2]
+PUSHB_1
+ 34
+MDAP[rnd]
+PUSHB_2
+ 3
+ 43
+SHP[rp1]
+SHP[rp1]
+PUSHB_1
+ 41
+MDRP[min,rnd,black]
+PUSHB_3
+ 34
+ 41
+ 10
+CALL
+PUSHB_4
+ 64
+ 34
+ 38
+ 9
+CALL
+SVTCA[x-axis]
+PUSHB_1
+ 66
+MDAP[rnd]
+PUSHB_1
+ 62
+MDRP[rp0,rnd,white]
+PUSHB_1
+ 8
+MDRP[min,rnd,black]
+PUSHB_1
+ 8
+SRP0
+PUSHB_2
+ 17
+ 1
+CALL
+PUSHB_1
+ 23
+MDRP[min,rnd,black]
+PUSHB_4
+ 26
+ 23
+ 17
+ 8
+CALL
+PUSHB_1
+ 14
+MDRP[min,rnd,black]
+PUSHB_1
+ 14
+MDAP[rnd]
+PUSHB_1
+ 26
+MDRP[min,rnd,black]
+PUSHB_1
+ 23
+SRP0
+PUSHB_2
+ 32
+ 1
+CALL
+PUSHB_1
+ 48
+MDRP[min,rnd,black]
+PUSHB_2
+ 67
+ 1
+CALL
+PUSHB_2
+ 17
+ 8
+SRP1
+SRP2
+PUSHB_3
+ 4
+ 11
+ 59
+IP
+IP
+IP
+PUSHB_1
+ 23
+SRP1
+PUSHB_1
+ 55
+IP
+PUSHB_2
+ 26
+ 14
+SRP1
+SRP2
+PUSHB_1
+ 20
+IP
+PUSHB_1
+ 32
+SRP1
+PUSHB_2
+ 3
+ 51
+IP
+IP
+SVTCA[y-axis]
+PUSHB_2
+ 34
+ 11
+SRP1
+SRP2
+PUSHB_4
+ 20
+ 48
+ 55
+ 62
+DEPTH
+SLOOP
+IP
+IUP[y]
+IUP[x]
+EndTTInstrs
+LayerCount: 2
+Fore
+SplineSet
+1126.44 630.775 m 128,-1,1
+ 1114.88 712.197 1114.88 712.197 1091.71 777.668 c 2,2,-1
+ 1090.53 781 l 1,3,-1
+ 393.447 781 l 1,4,-1
+ 392.278 777.646 l 2,5,6
+ 369.126 711.209 369.126 711.209 357.063 631.793 c 128,-1,7
+ 345 552.378 345 552.378 345 459 c 0,8,9
+ 345 259.968 345 259.968 392.855 148.984 c 128,-1,10
+ 440.711 38 440.711 38 528 38 c 0,11,12
+ 595.713 38 595.713 38 643.356 111.259 c 128,-1,13
+ 691 184.518 691 184.518 691 287 c 0,14,15
+ 691 317.366 691 317.366 679 398.866 c 128,-1,16
+ 667 480.366 667 480.366 667 530 c 0,17,18
+ 667 579.3 667 579.3 685.731 603.65 c 128,-1,19
+ 704.462 628 704.462 628 741 628 c 0,20,21
+ 780.481 628 780.481 628 799.241 602.675 c 128,-1,22
+ 818 577.35 818 577.35 818 524 c 0,23,24
+ 818 481.373 818 481.373 806 401.373 c 128,-1,25
+ 794 321.373 794 321.373 794 287 c 0,26,27
+ 794 185.435 794 185.435 845.192 111.717 c 128,-1,28
+ 896.385 38 896.385 38 963 38 c 0,29,30
+ 1043.31 38 1043.31 38 1090.66 149.993 c 128,-1,31
+ 1138 261.986 1138 261.986 1138 449 c 0,32,0
+ 1138 549.353 1138 549.353 1126.44 630.775 c 128,-1,1
+313.887 781 m 1,33,-1
+ 195 781 l 2,34,35
+ 116.39 781 116.39 781 83.5107 757.369 c 128,-1,36
+ 50.6318 733.737 50.6318 733.737 31.3232 673 c 1,37,-1
+ -4.74219 673 l 1,38,39
+ 2.11523 798.044 2.11523 798.044 60.5933 856.522 c 128,-1,40
+ 119.071 915 119.071 915 242 915 c 2,41,-1
+ 1427 915 l 1,42,-1
+ 1427 781 l 1,43,-1
+ 1180.76 781 l 1,44,-1
+ 1190.7 772.248 l 2,45,46
+ 1256.8 714.036 1256.8 714.036 1288.4 635.037 c 128,-1,47
+ 1320 556.037 1320 556.037 1320 449 c 0,48,49
+ 1320 240.713 1320 240.713 1220.78 112.856 c 128,-1,50
+ 1121.55 -15 1121.55 -15 971 -15 c 0,51,52
+ 887.109 -15 887.109 -15 831.807 41.7705 c 128,-1,53
+ 776.505 98.541 776.505 98.541 745.839 216.261 c 2,54,-1
+ 740.858 235.376 l 1,55,-1
+ 736.145 216.193 l 2,56,57
+ 707.47 99.5146 707.47 99.5146 651.68 42.2573 c 128,-1,58
+ 595.891 -15 595.891 -15 512 -15 c 0,59,60
+ 363.453 -15 363.453 -15 262.227 115.854 c 128,-1,61
+ 161 246.708 161 246.708 161 446 c 0,62,63
+ 161 553.961 161 553.961 197.032 636.883 c 128,-1,64
+ 233.063 719.805 233.063 719.805 302.019 772.014 c 2,65,-1
+ 313.887 781 l 1,33,-1
+EndSplineSet
+Validated: 16385
+EndChar
+
+StartChar: epsilon1
+Encoding: 962 1013 962
+Width: 959
+Flags: W
+HStem: -4 102<417.942 809.106> 463 63<287.943 725.943> 858 92<414.939 776.47>
+LayerCount: 2
+Fore
+SplineSet
+836.194 45 m 5,0,1
+ 685.72 -4 685.72 -4 550.72 -4 c 4,2,3
+ 382.72 -4 382.72 -4 266.893 98 c 4,4,5
+ 148.677 202 148.677 202 115.438 373 c 4,6,7
+ 64.7051 634 64.7051 634 184.993 792 c 4,8,9
+ 306.28 950 306.28 950 564.28 950 c 4,10,11
+ 654.28 950 654.28 950 781.112 920 c 5,12,-1
+ 778.967 823 l 5,13,14
+ 677.164 858 677.164 858 561.164 858 c 4,15,16
+ 317.164 858 317.164 858 287.698 526 c 5,17,-1
+ 726.698 526 l 5,18,-1
+ 725.943 463 l 5,19,-1
+ 287.943 463 l 5,20,21
+ 292.134 390 292.134 390 297.576 362 c 4,22,23
+ 348.893 98 348.893 98 567.893 98 c 4,24,25
+ 686.893 98 686.893 98 844.008 154 c 5,26,-1
+ 836.194 45 l 5,0,1
+EndSplineSet
+Validated: 33
+EndChar
+
+StartChar: similar
+Encoding: 963 8764 963
+Width: 1628
+Flags: W
+HStem: 504 102<1010.88 1279.77> 743 103<346.246 637.547>
+VStem: 221 62<526 650.688> 1343 62<699.454 823>
+LayerCount: 2
+Fore
+SplineSet
+283 526 m 1,0,-1
+ 221 526 l 1,1,2
+ 236 846 236 846 485 846 c 0,3,4
+ 600 846 600 846 843 726 c 128,-1,5
+ 1086 606 1086 606 1176 606 c 0,6,7
+ 1320 606 1320 606 1343 823 c 1,8,-1
+ 1405 823 l 1,9,10
+ 1387 504 1387 504 1141 504 c 0,11,12
+ 1014 504 1014 504 795 624 c 0,13,14
+ 575 743 575 743 449 743 c 0,15,16
+ 370 743 370 743 324 672 c 0,17,18
+ 283 609 283 609 283 526 c 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: DDOT
+Encoding: 964 776 964
+Width: 542
+Flags: W
+HStem: 1278 199<53.9087 192.09 347.909 499.688>
+VStem: 25 196<1307.91 1445.03> 319 197<1309.94 1461.56>
+LayerCount: 2
+Fore
+SplineSet
+25 1376 m 0,0,1
+ 25 1415 25 1415 53 1446 c 0,2,3
+ 82 1477 82 1477 121 1477 c 0,4,5
+ 162 1477 162 1477 191 1447 c 0,6,7
+ 221 1417 221 1417 221 1376 c 0,8,9
+ 221 1333 221 1333 193 1306 c 0,10,11
+ 164 1278 164 1278 121 1278 c 0,12,13
+ 81 1278 81 1278 52 1307 c 0,14,15
+ 25 1336 25 1336 25 1376 c 0,0,1
+319 1378 m 0,16,17
+ 319 1416 319 1416 348 1448 c 0,18,19
+ 377 1479 377 1479 416 1479 c 0,20,21
+ 458 1479 458 1479 486 1449 c 0,22,23
+ 516 1419 516 1419 516 1378 c 0,24,25
+ 516 1334 516 1334 487 1308 c 0,26,27
+ 459 1280 459 1280 416 1280 c 0,28,29
+ 376 1280 376 1280 347 1309 c 0,30,31
+ 319 1339 319 1339 319 1378 c 0,16,17
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni2218
+Encoding: 965 8728 965
+Width: 872
+Flags: W
+HStem: 297 49<312.727 541.49> 840 49<314.55 538.22>
+VStem: 131 49<477.995 706.05> 674 49<478.504 704.464>
+LayerCount: 2
+Fore
+SplineSet
+426 297 m 128,-1,1
+ 295 297 295 297 213 379 c 0,2,3
+ 131 460 131 460 131 592 c 128,-1,4
+ 131 724 131 724 213 806 c 0,5,6
+ 296 889 296 889 426 889 c 0,7,8
+ 557 889 557 889 640 806 c 128,-1,9
+ 723 723 723 723 723 592 c 0,10,11
+ 723 463 723 463 640 380 c 128,-1,0
+ 557 297 557 297 426 297 c 128,-1,1
+426 346 m 0,12,13
+ 535 346 535 346 604 415 c 0,14,15
+ 674 482 674 482 674 592 c 0,16,17
+ 674 701 674 701 604 770 c 0,18,19
+ 534 840 534 840 426 840 c 0,20,21
+ 319 840 319 840 249 770 c 0,22,23
+ 180 701 180 701 180 592 c 0,24,25
+ 180 482 180 482 249 415 c 0,26,27
+ 318 346 318 346 426 346 c 0,12,13
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni27C2
+Encoding: 966 10178 966
+Width: 1431
+Flags: W
+HStem: 0 96<82 674 770 1356>
+VStem: 674 96<96 1356>
+LayerCount: 2
+Fore
+SplineSet
+770 1356 m 1,0,-1
+ 770 96 l 1,1,-1
+ 1356 96 l 1,2,-1
+ 1356 0 l 1,3,-1
+ 82 0 l 1,4,-1
+ 82 96 l 1,5,-1
+ 674 96 l 1,6,-1
+ 674 1356 l 1,7,-1
+ 770 1356 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni27E8
+Encoding: 967 10216 967
+Width: 686
+Flags: W
+VStem: 86 539
+LayerCount: 2
+Fore
+SplineSet
+86 592 m 1,0,-1
+ 578 1606 l 1,1,-1
+ 625 1581 l 1,2,-1
+ 145 592 l 1,3,-1
+ 625 -397 l 1,4,-1
+ 578 -422 l 1,5,-1
+ 86 592 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni27E9
+Encoding: 968 10217 968
+Width: 686
+Flags: W
+VStem: 59 541
+LayerCount: 2
+Fore
+SplineSet
+600 592 m 1,0,-1
+ 109 -422 l 1,1,-1
+ 59 -397 l 1,2,-1
+ 539 592 l 1,3,-1
+ 59 1581 l 1,4,-1
+ 109 1606 l 1,5,-1
+ 600 592 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni27E6
+Encoding: 969 10214 969
+Width: 770
+Flags: W
+HStem: -403 43<248 369 440 647> 1581 41<248 369 440 647>
+VStem: 150 98<-360 1581> 369 71<-360 1581>
+LayerCount: 2
+Fore
+SplineSet
+369 1581 m 1,0,-1
+ 248 1581 l 1,1,-1
+ 248 -360 l 1,2,-1
+ 369 -360 l 1,3,-1
+ 369 1581 l 1,0,-1
+150 -403 m 1,4,-1
+ 150 1622 l 1,5,-1
+ 647 1622 l 1,6,-1
+ 647 1581 l 1,7,-1
+ 440 1581 l 1,8,-1
+ 440 -360 l 1,9,-1
+ 647 -360 l 1,10,-1
+ 647 -403 l 1,11,-1
+ 150 -403 l 1,4,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni27E7
+Encoding: 970 10215 970
+Width: 770
+Flags: W
+HStem: -403 43<150 336 408 549> 1581 41<150 336 408 549>
+VStem: 336 72<-360 1581> 549 98<-360 1581>
+LayerCount: 2
+Fore
+SplineSet
+408 1581 m 1,0,-1
+ 408 -360 l 1,1,-1
+ 549 -360 l 1,2,-1
+ 549 1581 l 1,3,-1
+ 408 1581 l 1,0,-1
+647 -403 m 1,4,-1
+ 150 -403 l 1,5,-1
+ 150 -360 l 1,6,-1
+ 336 -360 l 1,7,-1
+ 336 1581 l 1,8,-1
+ 150 1581 l 1,9,-1
+ 150 1622 l 1,10,-1
+ 647 1622 l 1,11,-1
+ 647 -403 l 1,4,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: UNDERBRACE
+Encoding: 971 9183 971
+Width: 2172
+Flags: W
+HStem: -348 80<160.317 994.049 1171.8 2012.08>
+VStem: 29 32<-154.375 -68> 1067 33<-471 -407.798> 2107 33<-154.375 -68>
+LayerCount: 2
+Fore
+SplineSet
+2140 -68 m 1,0,-1
+ 2140 -78 l 2,1,2
+ 2140 -211 2140 -211 2055 -280 c 0,3,4
+ 1970 -348 1970 -348 1833 -348 c 2,5,-1
+ 1229 -346 l 2,6,7
+ 1100 -346 1100 -346 1100 -471 c 1,8,-1
+ 1067 -471 l 1,9,10
+ 1067 -398 1067 -398 1037 -373 c 0,11,12
+ 1008 -346 1008 -346 936 -346 c 2,13,-1
+ 332 -348 l 2,14,15
+ 192 -348 192 -348 111 -276 c 0,16,17
+ 29 -206 29 -206 29 -68 c 1,18,-1
+ 61 -68 l 1,19,20
+ 61 -265 61 -265 303 -268 c 2,21,-1
+ 879 -276 l 2,22,23
+ 1020 -279 1020 -279 1083 -408 c 1,24,25
+ 1144 -279 1144 -279 1290 -276 c 2,26,-1
+ 1864 -268 l 2,27,28
+ 2107 -265 2107 -265 2107 -68 c 1,29,-1
+ 2140 -68 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: OVERBRACE
+Encoding: 972 9182 972
+Width: 2209
+Flags: W
+HStem: 1540 80<174.818 1013.2 1191.23 2024.68>
+VStem: 45 33<1339 1425.44> 1085 33<1679.8 1743> 2124 33<1339 1425.06>
+LayerCount: 2
+Fore
+SplineSet
+45 1339 m 1,0,-1
+ 45 1350 l 2,1,2
+ 45 1484 45 1484 133 1554 c 0,3,4
+ 216 1620 216 1620 352 1620 c 2,5,-1
+ 956 1618 l 2,6,7
+ 1085 1618 1085 1618 1085 1743 c 1,8,-1
+ 1118 1743 l 1,9,10
+ 1118 1670 1118 1670 1148 1645 c 0,11,12
+ 1178 1618 1178 1618 1249 1618 c 2,13,-1
+ 1853 1620 l 2,14,15
+ 1992 1620 1992 1620 2075 1548 c 0,16,17
+ 2157 1477 2157 1477 2157 1339 c 1,18,-1
+ 2124 1339 l 1,19,20
+ 2124 1535 2124 1535 1882 1540 c 2,21,-1
+ 1307 1548 l 2,22,23
+ 1165 1551 1165 1551 1102 1679 c 1,24,25
+ 1041 1551 1041 1551 895 1548 c 2,26,-1
+ 322 1540 l 2,27,28
+ 78 1536 78 1536 78 1339 c 1,29,-1
+ 45 1339 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni2A7D
+Encoding: 973 10877 973
+Width: 1628
+Flags: W
+HStem: 0 21G<1354.94 1405>
+LayerCount: 2
+Fore
+SplineSet
+221 473 m 1,0,-1
+ 221 580 l 1,1,-1
+ 1405 106 l 1,2,-1
+ 1405 0 l 1,3,-1
+ 221 473 l 1,0,-1
+1405 1266 m 1,4,-1
+ 1405 1159 l 1,5,-1
+ 489 793 l 1,6,-1
+ 1405 426 l 1,7,-1
+ 1405 319 l 1,8,-1
+ 221 793 l 1,9,-1
+ 1405 1266 l 1,4,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni2A7E
+Encoding: 974 10878 974
+Width: 1628
+Flags: W
+HStem: 0 21G<221 271.063>
+LayerCount: 2
+Fore
+SplineSet
+1405 473 m 1,0,-1
+ 221 0 l 1,1,-1
+ 221 106 l 1,2,-1
+ 1405 580 l 1,3,-1
+ 1405 473 l 1,0,-1
+221 1266 m 1,4,-1
+ 1405 793 l 1,5,-1
+ 221 319 l 1,6,-1
+ 221 426 l 1,7,-1
+ 1139 795 l 1,8,-1
+ 221 1159 l 1,9,-1
+ 221 1266 l 1,4,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni0302
+Encoding: 975 770 975
+Width: 681
+Flags: W
+HStem: 1102 389
+VStem: 33 633
+LayerCount: 2
+Fore
+SplineSet
+666 1112 m 1,0,-1
+ 631 1110 l 1,1,-1
+ 360 1321 l 1,2,-1
+ 76 1102 l 1,3,-1
+ 33 1112 l 1,4,-1
+ 362 1491 l 1,5,-1
+ 666 1112 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: asciicircum
+Encoding: 976 94 976
+Width: 681
+Flags: W
+HStem: 1102 389
+VStem: 33 633
+LayerCount: 2
+Fore
+SplineSet
+666 1112 m 1,0,-1
+ 631 1110 l 1,1,-1
+ 360 1321 l 1,2,-1
+ 76 1102 l 1,3,-1
+ 33 1112 l 1,4,-1
+ 362 1491 l 1,5,-1
+ 666 1112 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni030C
+Encoding: 977 780 977
+Width: 681
+Flags: W
+HStem: 1102 389
+VStem: 33 633
+LayerCount: 2
+Fore
+SplineSet
+666 1481 m 1,0,-1
+ 362 1102 l 1,1,-1
+ 33 1481 l 1,2,-1
+ 76 1491 l 1,3,-1
+ 360 1272 l 1,4,-1
+ 631 1483 l 1,5,-1
+ 666 1481 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni0306
+Encoding: 978 774 978
+Width: 942
+Flags: W
+HStem: 1110 90<311.278 621.725>
+LayerCount: 2
+Fore
+SplineSet
+467 1200 m 0,0,1
+ 592 1200 592 1200 670 1286 c 0,2,3
+ 727 1352 727 1352 770 1489 c 1,4,-1
+ 846 1487 l 1,5,6
+ 781 1288 781 1288 727 1221 c 0,7,8
+ 637 1110 637 1110 467 1110 c 0,9,10
+ 299 1110 299 1110 209 1221 c 0,11,12
+ 149 1296 149 1296 92 1487 c 1,13,-1
+ 176 1487 l 1,14,15
+ 220 1346 220 1346 268 1284 c 0,16,17
+ 338 1200 338 1200 467 1200 c 0,0,1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: acutecomb
+Encoding: 979 769 979
+Width: 681
+Flags: W
+HStem: 1110 346
+VStem: 236 329
+LayerCount: 2
+Fore
+SplineSet
+565 1456 m 1,0,-1
+ 270 1110 l 1,1,-1
+ 236 1110 l 1,2,-1
+ 342 1456 l 1,3,-1
+ 565 1456 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: gravecomb
+Encoding: 980 768 980
+Width: 681
+Flags: W
+HStem: 1130 347
+VStem: 117 329
+LayerCount: 2
+Fore
+SplineSet
+117 1477 m 1,0,-1
+ 342 1477 l 1,1,-1
+ 446 1130 l 1,2,-1
+ 412 1130 l 1,3,-1
+ 117 1477 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: tildecomb
+Encoding: 981 771 981
+Width: 681
+Flags: W
+HStem: 1212 123<445.722 584.768> 1354 121<93.6191 230.512>
+VStem: 23 30<1217 1270.35> 631 31<1420.45 1475>
+LayerCount: 2
+Fore
+SplineSet
+53 1217 m 1,0,-1
+ 23 1217 l 1,1,2
+ 32 1475 32 1475 211 1475 c 0,3,4
+ 255 1475 255 1475 535 1335 c 1,5,6
+ 602 1335 602 1335 631 1475 c 1,7,-1
+ 662 1475 l 1,8,-1
+ 662 1462 l 2,9,10
+ 662 1366 662 1366 616 1294 c 0,11,12
+ 563 1212 563 1212 471 1212 c 0,13,14
+ 411 1212 411 1212 147 1354 c 1,15,16
+ 82 1354 82 1354 53 1217 c 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni0304
+Encoding: 982 772 982
+Width: 1024
+Flags: W
+HStem: 1331 76<102 934>
+LayerCount: 2
+Fore
+SplineSet
+102 1407 m 1,0,-1
+ 934 1407 l 1,1,-1
+ 934 1331 l 1,2,-1
+ 102 1331 l 1,3,-1
+ 102 1407 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni20D7
+Encoding: 983 8407 983
+Width: 1056
+Flags: W
+HStem: 1313 112<98 686>
+LayerCount: 2
+Fore
+SplineSet
+98 1313 m 1,0,-1
+ 98 1425 l 1,1,-1
+ 686 1425 l 1,2,-1
+ 645 1575 l 1,3,-1
+ 1026 1368 l 1,4,-1
+ 645 1163 l 1,5,-1
+ 686 1313 l 1,6,-1
+ 98 1313 l 1,0,-1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: DDDOT
+Encoding: 984 8411 984
+Width: 860
+Flags: W
+HStem: 1280 199<53.9087 192.09 347.909 498.3 640.847 779.121>
+VStem: 25 196<1307.91 1445.03> 319 197<1309.94 1461.56> 612 197<1309.94 1461.41>
+LayerCount: 2
+Fore
+SplineSet
+25 1376 m 0,0,1
+ 25 1415 25 1415 53 1446 c 0,2,3
+ 82 1477 82 1477 121 1477 c 0,4,5
+ 162 1477 162 1477 191 1447 c 0,6,7
+ 221 1417 221 1417 221 1376 c 0,8,9
+ 221 1333 221 1333 193 1306 c 0,10,11
+ 164 1278 164 1278 121 1278 c 0,12,13
+ 81 1278 81 1278 52 1307 c 0,14,15
+ 25 1336 25 1336 25 1376 c 0,0,1
+319 1378 m 0,16,17
+ 319 1416 319 1416 348 1448 c 0,18,19
+ 377 1479 377 1479 416 1479 c 0,20,21
+ 458 1479 458 1479 486 1449 c 0,22,23
+ 516 1419 516 1419 516 1378 c 0,24,25
+ 516 1334 516 1334 487 1308 c 0,26,27
+ 459 1280 459 1280 416 1280 c 0,28,29
+ 376 1280 376 1280 347 1309 c 0,30,31
+ 319 1339 319 1339 319 1378 c 0,16,17
+612 1378 m 0,32,33
+ 612 1416 612 1416 641 1448 c 0,34,35
+ 670 1479 670 1479 709 1479 c 0,36,37
+ 749 1479 749 1479 779 1449 c 128,-1,38
+ 809 1419 809 1419 809 1378 c 0,39,40
+ 809 1335 809 1335 780 1308 c 0,41,42
+ 752 1280 752 1280 709 1280 c 0,43,44
+ 667 1280 667 1280 640 1309 c 0,45,46
+ 612 1339 612 1339 612 1378 c 0,32,33
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: varrho
+Encoding: 985 1009 985
+Width: 1042
+Flags: W
+LayerCount: 2
+Fore
+SplineSet
+988 -411 m 1,0,-1
+ 949 -411 l 1,1,2
+ 913 -370 913 -370 834 -362 c 1,3,4
+ 732.411 -392.381 732.411 -392.381 703 -393 c 0,5,6
+ 532 -391 532 -391 455 -369 c 0,7,8
+ 338 -335 338 -335 258 -228 c 0,9,10
+ 78 11 78 11 78 333 c 0,11,12
+ 78 588.888 78 588.888 174 741 c 0,13,14
+ 315.389 963 315.389 963 502 963 c 0,15,16
+ 690.386 963 690.386 963 834 811 c 0,17,18
+ 972 666 972 666 972 442 c 0,19,20
+ 972 264 972 264 852 127 c 1,21,22
+ 726 -15 726 -15 538 -15 c 0,23,24
+ 259.827 -15 259.827 -15 150 261 c 1,25,26
+ 166 34 166 34 287 -114 c 0,27,28
+ 351.476 -193.828 351.476 -193.828 432 -213 c 0,29,30
+ 486.151 -225.893 486.151 -225.893 614 -227 c 0,31,32
+ 729.5 -227.5 729.5 -227.5 845 -228 c 1,33,34
+ 941 -271 941 -271 988 -411 c 1,0,-1
+784 510 m 0,35,36
+ 784 893 784 893 547 893 c 0,37,38
+ 406.508 893 406.508 893 321 692 c 0,39,40
+ 265 559 265 559 265 384 c 0,41,42
+ 265 53 265 53 504 53 c 0,43,44
+ 650 53 650 53 726 225 c 0,45,46
+ 784 357 784 357 784 510 c 0,35,36
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni0307
+Encoding: 986 775 986
+Width: 542
+Flags: W
+HStem: 1264 198<202.847 340.029>
+VStem: 174 197<1292.88 1432.06>
+LayerCount: 2
+Fore
+SplineSet
+174 1362 m 128,-1,1
+ 174 1404 174 1404 202 1433 c 0,2,3
+ 229 1462 229 1462 270 1462 c 0,4,5
+ 310 1462 310 1462 341 1433 c 0,6,7
+ 371 1403 371 1403 371 1362 c 0,8,9
+ 371 1320 371 1320 342 1291 c 0,10,11
+ 314 1264 314 1264 270 1264 c 0,12,13
+ 229 1264 229 1264 202 1292 c 0,14,0
+ 174 1320 174 1320 174 1362 c 128,-1,1
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: uni030A
+Encoding: 987 778 987
+Width: 532
+Flags: W
+HStem: 1126 78<183.934 384.968> 1503 82<180.956 386.175>
+VStem: 53 82<1249.56 1457.3> 434 78<1253 1452.88>
+LayerCount: 2
+Fore
+SplineSet
+53 1356 m 0,0,1
+ 53 1452 53 1452 120 1519 c 0,2,3
+ 186 1585 186 1585 283 1585 c 0,4,5
+ 379 1585 379 1585 445 1519 c 0,6,7
+ 512 1452 512 1452 512 1356 c 0,8,9
+ 512 1262 512 1262 444 1194 c 128,-1,10
+ 376 1126 376 1126 283 1126 c 0,11,12
+ 187 1126 187 1126 120 1193 c 0,13,14
+ 53 1259 53 1259 53 1356 c 0,0,1
+135 1354 m 0,15,16
+ 135 1292 135 1292 178 1247 c 0,17,18
+ 223 1204 223 1204 285 1204 c 0,19,20
+ 346 1204 346 1204 391 1247 c 0,21,22
+ 434 1290 434 1290 434 1354 c 0,23,24
+ 434 1415 434 1415 390 1459 c 0,25,26
+ 347 1503 347 1503 285 1503 c 0,27,28
+ 221 1503 221 1503 178 1460 c 128,-1,29
+ 135 1417 135 1417 135 1354 c 0,15,16
+EndSplineSet
+Validated: 1
+EndChar
+
+StartChar: caron
+Encoding: 988 711 988
+Width: 681
+Flags: W
+HStem: 1102 389
+VStem: 33 633
+LayerCount: 2
+Fore
+SplineSet
+666 1481 m 1,0,-1
+ 362 1102 l 1,1,-1
+ 33 1481 l 1,2,-1
+ 76 1491 l 1,3,-1
+ 360 1272 l 1,4,-1
+ 631 1483 l 1,5,-1
+ 666 1481 l 1,0,-1
+EndSplineSet
+EndChar
+
+StartChar: breve
+Encoding: 989 728 989
+Width: 942
+Flags: W
+HStem: 1110 90<311.278 621.725>
+LayerCount: 2
+Fore
+SplineSet
+467 1200 m 0,0,1
+ 592 1200 592 1200 670 1286 c 0,2,3
+ 727 1352 727 1352 770 1489 c 1,4,-1
+ 846 1487 l 1,5,6
+ 781 1288 781 1288 727 1221 c 0,7,8
+ 637 1110 637 1110 467 1110 c 0,9,10
+ 299 1110 299 1110 209 1221 c 0,11,12
+ 149 1296 149 1296 92 1487 c 1,13,-1
+ 176 1487 l 1,14,15
+ 220 1346 220 1346 268 1284 c 0,16,17
+ 338 1200 338 1200 467 1200 c 0,0,1
+EndSplineSet
+EndChar
+
+StartChar: ACUTE
+Encoding: 990 714 990
+Width: 681
+Flags: W
+HStem: 1110 346
+VStem: 236 329
+LayerCount: 2
+Fore
+SplineSet
+565 1456 m 1,0,-1
+ 270 1110 l 1,1,-1
+ 236 1110 l 1,2,-1
+ 342 1456 l 1,3,-1
+ 565 1456 l 1,0,-1
+EndSplineSet
+EndChar
+
+StartChar: GRAVE
+Encoding: 991 715 991
+Width: 681
+Flags: W
+HStem: 1130 347
+VStem: 117 329
+LayerCount: 2
+Fore
+SplineSet
+117 1477 m 1,0,-1
+ 342 1477 l 1,1,-1
+ 446 1130 l 1,2,-1
+ 412 1130 l 1,3,-1
+ 117 1477 l 1,0,-1
+EndSplineSet
+EndChar
EndChars
EndSplineFont
diff --git a/extras/source/truetype/symbol/opens___.ttf b/extras/source/truetype/symbol/opens___.ttf
index b4f169ff7c9e..3123f3f33f85 100644
--- a/extras/source/truetype/symbol/opens___.ttf
+++ b/extras/source/truetype/symbol/opens___.ttf
Binary files differ
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 4037ba0560a8..8f1044cb38b3 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -33,15 +33,27 @@
#include "impdialog.hxx"
#include "impdialog.hrc"
-#include <vcl/svapp.hxx>
-#include <vcl/msgbox.hxx>
-#include <sfx2/passwd.hxx>
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include "vcl/svapp.hxx"
+#include "vcl/msgbox.hxx"
+#include "sfx2/passwd.hxx"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/drawing/XShapes.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/frame/XController.hpp"
+#include "com/sun/star/view/XSelectionSupplier.hpp"
+
+#include <boost/shared_ptr.hpp>
+
+static ResMgr& getPDFFilterResMgr()
+{
+ static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILocale());
+ return *pRes;
+}
+
+PDFFilterResId::PDFFilterResId( sal_uInt32 nId ) : ResId( nId, getPDFFilterResMgr() )
+{
+}
// ----------------
// - ImpPDFDialog -
@@ -55,12 +67,11 @@ using namespace ::com::sun::star;
// they should be the same in PDFFilter::implExport and in PDFExport::PDFExport
// -----------------------------------------------------------------------------
ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
- ResMgr& rResMgr,
Sequence< PropertyValue >& rFilterData,
const Reference< XComponent >& rxDoc,
const Reference< lang::XMultiServiceFactory >& xFact
) :
- SfxTabDialog( pParent, ResId( RID_PDF_EXPORT_DLG, rResMgr ), 0, FALSE, 0 ),
+ SfxTabDialog( pParent, PDFFilterResId( RID_PDF_EXPORT_DLG ), 0, FALSE, 0 ),
mxMSF( xFact ),
maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/PDF/Export/" ) ), &rFilterData ),
maConfigI18N( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/I18N/CTL/" ) ) ),
@@ -114,7 +125,6 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbExportBmkToPDFDestination( sal_False )
{
FreeResource();
- mprResMgr = &rResMgr;
// check for selection
try
{
@@ -242,7 +252,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
//change text on the Ok button: get the relevant string from resources, update it on the button
//according to the exported pdf file destination: send as e-mail or write to file?
GetOKButton().SetText( ( sOkButtonText.getLength() > 0 ) ?
- sOkButtonText : OUString( String( ResId( STR_PDF_EXPORT, rResMgr ) ) ));
+ sOkButtonText : OUString( String( PDFFilterResId( STR_PDF_EXPORT ) ) ));
//remove the reset button, not needed in this tabbed dialog
RemoveResetButton();
@@ -407,45 +417,44 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
// -----------------------------------------------------------------------------
ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr* paResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_GENER, *paResMgr ), rCoreSet ),
-
- maFlPages( this, ResId( FL_PAGES, *paResMgr ) ),
- maRbAll( this, ResId( RB_ALL, *paResMgr) ),
- maRbRange( this, ResId( RB_RANGE, *paResMgr ) ),
- maRbSelection( this, ResId( RB_SELECTION, *paResMgr ) ),
- maEdPages( this, ResId( ED_PAGES, *paResMgr ) ),
-
- maFlCompression( this, ResId( FL_IMAGES, *paResMgr ) ),
- maRbLosslessCompression( this, ResId( RB_LOSSLESSCOMPRESSION, *paResMgr ) ),
- maRbJPEGCompression( this, ResId( RB_JPEGCOMPRESSION, *paResMgr ) ),
- maFtQuality( this, ResId( FT_QUALITY, *paResMgr ) ),
- maNfQuality( this, ResId( NF_QUALITY, *paResMgr ) ),
- maCbReduceImageResolution( this, ResId( CB_REDUCEIMAGERESOLUTION, *paResMgr ) ),
- maCoReduceImageResolution( this, ResId( CO_REDUCEIMAGERESOLUTION, *paResMgr ) ),
-
- maFlGeneral( this, ResId( FL_GENERAL, *paResMgr ) ),
- maCbPDFA1b( this, ResId( CB_PDFA_1B_SELECT, *paResMgr ) ),
-
- maCbTaggedPDF( this, ResId( CB_TAGGEDPDF, *paResMgr ) ),
+ const SfxItemSet& rCoreSet
+ ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_GENER ), rCoreSet ),
+
+ maFlPages( this, PDFFilterResId( FL_PAGES ) ),
+ maRbAll( this, PDFFilterResId( RB_ALL ) ),
+ maRbRange( this, PDFFilterResId( RB_RANGE ) ),
+ maRbSelection( this, PDFFilterResId( RB_SELECTION ) ),
+ maEdPages( this, PDFFilterResId( ED_PAGES ) ),
+
+ maFlCompression( this, PDFFilterResId( FL_IMAGES ) ),
+ maRbLosslessCompression( this, PDFFilterResId( RB_LOSSLESSCOMPRESSION ) ),
+ maRbJPEGCompression( this, PDFFilterResId( RB_JPEGCOMPRESSION ) ),
+ maFtQuality( this, PDFFilterResId( FT_QUALITY ) ),
+ maNfQuality( this, PDFFilterResId( NF_QUALITY ) ),
+ maCbReduceImageResolution( this, PDFFilterResId( CB_REDUCEIMAGERESOLUTION ) ),
+ maCoReduceImageResolution( this, PDFFilterResId( CO_REDUCEIMAGERESOLUTION ) ),
+
+ maFlGeneral( this, PDFFilterResId( FL_GENERAL ) ),
+ maCbPDFA1b( this, PDFFilterResId( CB_PDFA_1B_SELECT ) ),
+
+ maCbTaggedPDF( this, PDFFilterResId( CB_TAGGEDPDF ) ),
mbTaggedPDFUserSelection( sal_False ),
- maCbExportFormFields( this, ResId( CB_EXPORTFORMFIELDS, *paResMgr ) ),
+ maCbExportFormFields( this, PDFFilterResId( CB_EXPORTFORMFIELDS ) ),
mbExportFormFieldsUserSelection( sal_False ),
- maFtFormsFormat( this, ResId( FT_FORMSFORMAT, *paResMgr ) ),
- maLbFormsFormat( this, ResId( LB_FORMSFORMAT, *paResMgr ) ),
- maCbAllowDuplicateFieldNames( this, ResId( CB_ALLOWDUPLICATEFIELDNAMES, *paResMgr ) ),
-
- maCbExportBookmarks( this, ResId( CB_EXPORTBOOKMARKS, *paResMgr ) ),
- maCbExportNotes( this, ResId( CB_EXPORTNOTES, *paResMgr ) ),
- maCbExportEmptyPages( this, ResId( CB_EXPORTEMPTYPAGES, *paResMgr ) ),
- maCbAddStream( this, ResId( CB_ADDSTREAM, *paResMgr ) ),
+ maFtFormsFormat( this, PDFFilterResId( FT_FORMSFORMAT ) ),
+ maLbFormsFormat( this, PDFFilterResId( LB_FORMSFORMAT ) ),
+ maCbAllowDuplicateFieldNames( this, PDFFilterResId( CB_ALLOWDUPLICATEFIELDNAMES ) ),
+
+ maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
+ maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
+ maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
+ maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
mbIsPresentation( sal_False ),
mbIsWriter( sal_False),
mpaParent( 0 )
{
- mpaResMgr = paResMgr;
FreeResource();
// pb: #i91991# maCbExportEmptyPages double-spaced if necessary
@@ -465,7 +474,6 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabGeneralPage::~ImpPDFTabGeneralPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
@@ -618,9 +626,7 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
SfxTabPage* ImpPDFTabGeneralPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabGeneralPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabGeneralPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -719,34 +725,32 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleExportPDFAHdl, void*, EMPTYARG )
// the option features tab page
// -----------------------------------------------------------------------------
ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr* paResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_OPNFTR, *paResMgr ), rCoreSet ),
-
- maFlInitialView( this, ResId( FL_INITVIEW, *paResMgr ) ),
- maRbOpnPageOnly( this, ResId( RB_OPNMODE_PAGEONLY, *paResMgr ) ),
- maRbOpnOutline( this, ResId( RB_OPNMODE_OUTLINE, *paResMgr ) ),
- maRbOpnThumbs( this, ResId( RB_OPNMODE_THUMBS, *paResMgr ) ),
- maFtInitialPage( this, ResId( FT_MAGNF_INITIAL_PAGE, *paResMgr ) ),
- maNumInitialPage( this, ResId( NUM_MAGNF_INITIAL_PAGE, *paResMgr ) ),
-
- maFlMagnification( this, ResId( FL_MAGNIFICATION, *paResMgr ) ),
- maRbMagnDefault( this, ResId( RB_MAGNF_DEFAULT, *paResMgr ) ),
- maRbMagnFitWin( this, ResId( RB_MAGNF_WIND, *paResMgr ) ),
- maRbMagnFitWidth( this, ResId( RB_MAGNF_WIDTH, *paResMgr ) ),
- maRbMagnFitVisible( this, ResId( RB_MAGNF_VISIBLE, *paResMgr ) ),
- maRbMagnZoom( this, ResId( RB_MAGNF_ZOOM, *paResMgr ) ),
- maNumZoom( this, ResId( NUM_MAGNF_ZOOM, *paResMgr ) ),
-
- maFlPageLayout( this, ResId( FL_PAGE_LAYOUT, *paResMgr ) ),
- maRbPgLyDefault( this, ResId( RB_PGLY_DEFAULT, *paResMgr ) ),
- maRbPgLySinglePage( this, ResId( RB_PGLY_SINGPG, *paResMgr ) ),
- maRbPgLyContinue( this, ResId( RB_PGLY_CONT, *paResMgr ) ),
- maRbPgLyContinueFacing( this, ResId( RB_PGLY_CONTFAC, *paResMgr ) ),
- maCbPgLyFirstOnLeft( this, ResId( CB_PGLY_FIRSTLEFT, *paResMgr ) ),
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_OPNFTR ), rCoreSet ),
+
+ maFlInitialView( this, PDFFilterResId( FL_INITVIEW ) ),
+ maRbOpnPageOnly( this, PDFFilterResId( RB_OPNMODE_PAGEONLY ) ),
+ maRbOpnOutline( this, PDFFilterResId( RB_OPNMODE_OUTLINE ) ),
+ maRbOpnThumbs( this, PDFFilterResId( RB_OPNMODE_THUMBS ) ),
+ maFtInitialPage( this, PDFFilterResId( FT_MAGNF_INITIAL_PAGE ) ),
+ maNumInitialPage( this, PDFFilterResId( NUM_MAGNF_INITIAL_PAGE ) ),
+
+ maFlMagnification( this, PDFFilterResId( FL_MAGNIFICATION ) ),
+ maRbMagnDefault( this, PDFFilterResId( RB_MAGNF_DEFAULT ) ),
+ maRbMagnFitWin( this, PDFFilterResId( RB_MAGNF_WIND ) ),
+ maRbMagnFitWidth( this, PDFFilterResId( RB_MAGNF_WIDTH ) ),
+ maRbMagnFitVisible( this, PDFFilterResId( RB_MAGNF_VISIBLE ) ),
+ maRbMagnZoom( this, PDFFilterResId( RB_MAGNF_ZOOM ) ),
+ maNumZoom( this, PDFFilterResId( NUM_MAGNF_ZOOM ) ),
+
+ maFlPageLayout( this, PDFFilterResId( FL_PAGE_LAYOUT ) ),
+ maRbPgLyDefault( this, PDFFilterResId( RB_PGLY_DEFAULT ) ),
+ maRbPgLySinglePage( this, PDFFilterResId( RB_PGLY_SINGPG ) ),
+ maRbPgLyContinue( this, PDFFilterResId( RB_PGLY_CONT ) ),
+ maRbPgLyContinueFacing( this, PDFFilterResId( RB_PGLY_CONTFAC ) ),
+ maCbPgLyFirstOnLeft( this, PDFFilterResId( CB_PGLY_FIRSTLEFT ) ),
mbUseCTLFont( sal_False )
{
- mpaResMgr = paResMgr;
FreeResource();
maRbMagnDefault.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
@@ -759,16 +763,13 @@ ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabOpnFtrPage::~ImpPDFTabOpnFtrPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
SfxTabPage* ImpPDFTabOpnFtrPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabOpnFtrPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabOpnFtrPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -896,29 +897,27 @@ IMPL_LINK( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, void*, )
// The Viewer preferences tab page
// -----------------------------------------------------------------------------
ImpPDFTabViewerPage::ImpPDFTabViewerPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr* paResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_VPREFER, *paResMgr ), rCoreSet ),
-
- maFlWindowOptions( this, ResId( FL_WINOPT, *paResMgr ) ),
- maCbResWinInit( this, ResId( CB_WNDOPT_RESINIT, *paResMgr ) ),
- maCbCenterWindow( this, ResId( CB_WNDOPT_CNTRWIN, *paResMgr ) ),
- maCbOpenFullScreen( this, ResId( CB_WNDOPT_OPNFULL, *paResMgr ) ),
- maCbDispDocTitle( this, ResId( CB_DISPDOCTITLE, *paResMgr ) ),
-
- maFlUIOptions( this, ResId( FL_USRIFOPT, *paResMgr ) ),
- maCbHideViewerMenubar( this, ResId( CB_UOP_HIDEVMENUBAR, *paResMgr ) ),
- maCbHideViewerToolbar( this, ResId( CB_UOP_HIDEVTOOLBAR, *paResMgr ) ),
- maCbHideViewerWindowControls( this, ResId( CB_UOP_HIDEVWINCTRL, *paResMgr ) ),
- maFlTransitions( this, ResId( FL_TRANSITIONS, *paResMgr ) ),
- maCbTransitionEffects( this, ResId( CB_TRANSITIONEFFECTS, *paResMgr ) ),
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_VPREFER ), rCoreSet ),
+
+ maFlWindowOptions( this, PDFFilterResId( FL_WINOPT ) ),
+ maCbResWinInit( this, PDFFilterResId( CB_WNDOPT_RESINIT ) ),
+ maCbCenterWindow( this, PDFFilterResId( CB_WNDOPT_CNTRWIN ) ),
+ maCbOpenFullScreen( this, PDFFilterResId( CB_WNDOPT_OPNFULL ) ),
+ maCbDispDocTitle( this, PDFFilterResId( CB_DISPDOCTITLE ) ),
+
+ maFlUIOptions( this, PDFFilterResId( FL_USRIFOPT ) ),
+ maCbHideViewerMenubar( this, PDFFilterResId( CB_UOP_HIDEVMENUBAR ) ),
+ maCbHideViewerToolbar( this, PDFFilterResId( CB_UOP_HIDEVTOOLBAR ) ),
+ maCbHideViewerWindowControls( this, PDFFilterResId( CB_UOP_HIDEVWINCTRL ) ),
+ maFlTransitions( this, PDFFilterResId( FL_TRANSITIONS ) ),
+ maCbTransitionEffects( this, PDFFilterResId( CB_TRANSITIONEFFECTS ) ),
mbIsPresentation( sal_True ),
- maFlBookmarks( this, ResId( FL_BOOKMARKS, *paResMgr ) ),
- maRbAllBookmarkLevels( this, ResId( RB_ALLBOOKMARKLEVELS, *paResMgr ) ),
- maRbVisibleBookmarkLevels( this, ResId( RB_VISIBLEBOOKMARKLEVELS, *paResMgr ) ),
- maNumBookmarkLevels( this, ResId( NUM_BOOKMARKLEVELS, *paResMgr ) )
+ maFlBookmarks( this, PDFFilterResId( FL_BOOKMARKS ) ),
+ maRbAllBookmarkLevels( this, PDFFilterResId( RB_ALLBOOKMARKLEVELS ) ),
+ maRbVisibleBookmarkLevels( this, PDFFilterResId( RB_VISIBLEBOOKMARKLEVELS ) ),
+ maNumBookmarkLevels( this, PDFFilterResId( NUM_BOOKMARKLEVELS ) )
{
- mpaResMgr = paResMgr;
FreeResource();
maRbAllBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) );
maRbVisibleBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) );
@@ -927,7 +926,6 @@ ImpPDFTabViewerPage::ImpPDFTabViewerPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabViewerPage::~ImpPDFTabViewerPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
@@ -940,9 +938,7 @@ IMPL_LINK( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, void*, )
SfxTabPage* ImpPDFTabViewerPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabViewerPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabViewerPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -991,51 +987,48 @@ void ImpPDFTabViewerPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
// The Security preferences tab page
// -----------------------------------------------------------------------------
ImpPDFTabSecurityPage::ImpPDFTabSecurityPage( Window* i_pParent,
- const SfxItemSet& i_rCoreSet,
- ResMgr* i_pResMgr ) :
- SfxTabPage( i_pParent, ResId( RID_PDF_TAB_SECURITY, *i_pResMgr ), i_rCoreSet ),
- maPbUserPwd( this, ResId( BTN_USER_PWD, *i_pResMgr ) ),
- maFtUserPwd( this, ResId( FT_USER_PWD, *i_pResMgr ) ),
- maUserPwdSet( ResId( STR_USER_PWD_SET, *i_pResMgr ) ),
- maUserPwdUnset( ResId( STR_USER_PWD_UNSET, *i_pResMgr ) ),
-
- maPbOwnerPwd( this, ResId( BTN_OWNER_PWD, *i_pResMgr ) ),
- maFtOwnerPwd( this, ResId( FT_OWNER_PWD, *i_pResMgr ) ),
- maOwnerPwdSet( ResId( STR_OWNER_PWD_SET, *i_pResMgr ) ),
- maOwnerPwdUnset( ResId( STR_OWNER_PWD_UNSET, *i_pResMgr ) ),
-
- maFlPrintPermissions( this, ResId( FL_PRINT_PERMISSIONS , *i_pResMgr ) ),
- maRbPrintNone( this, ResId( RB_PRINT_NONE, *i_pResMgr ) ),
- maRbPrintLowRes( this, ResId( RB_PRINT_LOWRES , *i_pResMgr ) ),
- maRbPrintHighRes( this, ResId( RB_PRINT_HIGHRES , *i_pResMgr ) ),
-
- maFlChangesAllowed( this, ResId( FL_CHANGES_ALLOWED , *i_pResMgr ) ),
- maRbChangesNone( this, ResId( RB_CHANGES_NONE , *i_pResMgr ) ),
- maRbChangesInsDel( this, ResId( RB_CHANGES_INSDEL , *i_pResMgr ) ),
- maRbChangesFillForm( this, ResId( RB_CHANGES_FILLFORM , *i_pResMgr ) ),
- maRbChangesComment( this, ResId( RB_CHANGES_COMMENT , *i_pResMgr ) ),
- maRbChangesAnyNoCopy( this, ResId( RB_CHANGES_ANY_NOCOPY , *i_pResMgr ) ),
-
- maCbEnableCopy( this, ResId( CB_ENDAB_COPY , *i_pResMgr ) ),
- maCbEnableAccessibility( this, ResId( CB_ENAB_ACCESS , *i_pResMgr ) ),
-
- msUserPwdTitle( ResId( STR_PDF_EXPORT_UDPWD, *i_pResMgr ) ),
-
- msOwnerPwdTitle( ResId( STR_PDF_EXPORT_ODPWD, *i_pResMgr ) )
+ const SfxItemSet& i_rCoreSet ) :
+ SfxTabPage( i_pParent, PDFFilterResId( RID_PDF_TAB_SECURITY ), i_rCoreSet ),
+ maPbUserPwd( this, PDFFilterResId( BTN_USER_PWD ) ),
+ maFtUserPwd( this, PDFFilterResId( FT_USER_PWD ) ),
+ maUserPwdSet( PDFFilterResId( STR_USER_PWD_SET ) ),
+ maUserPwdUnset( PDFFilterResId( STR_USER_PWD_UNSET ) ),
+
+ maPbOwnerPwd( this, PDFFilterResId( BTN_OWNER_PWD ) ),
+ maFtOwnerPwd( this, PDFFilterResId( FT_OWNER_PWD ) ),
+ maOwnerPwdSet( PDFFilterResId( STR_OWNER_PWD_SET ) ),
+ maOwnerPwdUnset( PDFFilterResId( STR_OWNER_PWD_UNSET ) ),
+
+ maFlPrintPermissions( this, PDFFilterResId( FL_PRINT_PERMISSIONS ) ),
+ maRbPrintNone( this, PDFFilterResId( RB_PRINT_NONE ) ),
+ maRbPrintLowRes( this, PDFFilterResId( RB_PRINT_LOWRES ) ),
+ maRbPrintHighRes( this, PDFFilterResId( RB_PRINT_HIGHRES ) ),
+
+ maFlChangesAllowed( this, PDFFilterResId( FL_CHANGES_ALLOWED ) ),
+ maRbChangesNone( this, PDFFilterResId( RB_CHANGES_NONE ) ),
+ maRbChangesInsDel( this, PDFFilterResId( RB_CHANGES_INSDEL ) ),
+ maRbChangesFillForm( this, PDFFilterResId( RB_CHANGES_FILLFORM ) ),
+ maRbChangesComment( this, PDFFilterResId( RB_CHANGES_COMMENT ) ),
+ maRbChangesAnyNoCopy( this, PDFFilterResId( RB_CHANGES_ANY_NOCOPY ) ),
+
+ maCbEnableCopy( this, PDFFilterResId( CB_ENDAB_COPY ) ),
+ maCbEnableAccessibility( this, PDFFilterResId( CB_ENAB_ACCESS ) ),
+
+ msUserPwdTitle( PDFFilterResId( STR_PDF_EXPORT_UDPWD ) ),
+
+ msOwnerPwdTitle( PDFFilterResId( STR_PDF_EXPORT_ODPWD ) )
{
- mpaResMgr = i_pResMgr;
-
maUserPwdSet.Append( sal_Unicode( '\n' ) );
- maUserPwdSet.Append( String( ResId( STR_USER_PWD_ENC, *i_pResMgr ) ) );
+ maUserPwdSet.Append( String( PDFFilterResId( STR_USER_PWD_ENC ) ) );
maUserPwdUnset.Append( sal_Unicode( '\n' ) );
- maUserPwdUnset.Append( String( ResId( STR_USER_PWD_UNENC, *i_pResMgr ) ) );
+ maUserPwdUnset.Append( String( PDFFilterResId( STR_USER_PWD_UNENC ) ) );
maOwnerPwdSet.Append( sal_Unicode( '\n' ) );
- maOwnerPwdSet.Append( String( ResId( STR_OWNER_PWD_REST, *i_pResMgr ) ) );
+ maOwnerPwdSet.Append( String( PDFFilterResId( STR_OWNER_PWD_REST ) ) );
maOwnerPwdUnset.Append( sal_Unicode( '\n' ) );
- maOwnerPwdUnset.Append( String( ResId( STR_OWNER_PWD_UNREST, *i_pResMgr ) ) );
+ maOwnerPwdUnset.Append( String( PDFFilterResId( STR_OWNER_PWD_UNREST ) ) );
FreeResource();
@@ -1065,16 +1058,13 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage( Window* i_pParent,
// -----------------------------------------------------------------------------
ImpPDFTabSecurityPage::~ImpPDFTabSecurityPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
SfxTabPage* ImpPDFTabSecurityPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabSecurityPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabSecurityPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -1238,23 +1228,21 @@ void ImpPDFTabSecurityPage::ImplPDFASecurityControl( sal_Bool bEnableSecurity
// The link preferences tab page (relative and other stuff)
// -----------------------------------------------------------------------------
ImpPDFTabLinksPage::ImpPDFTabLinksPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr& rResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_LINKS, rResMgr ), rCoreSet ),
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_LINKS ), rCoreSet ),
- maCbExprtBmkrToNmDst( this, ResId( CB_EXP_BMRK_TO_DEST , rResMgr ) ),
- maCbOOoToPDFTargets( this, ResId( CB_CNV_OOO_DOCTOPDF , rResMgr ) ),
- maCbExportRelativeFsysLinks( this, ResId( CB_ENAB_RELLINKFSYS , rResMgr ) ),
+ maCbExprtBmkrToNmDst( this, PDFFilterResId( CB_EXP_BMRK_TO_DEST ) ),
+ maCbOOoToPDFTargets( this, PDFFilterResId( CB_CNV_OOO_DOCTOPDF ) ),
+ maCbExportRelativeFsysLinks( this, PDFFilterResId( CB_ENAB_RELLINKFSYS ) ),
- maFlDefaultTitle( this, ResId( FL_DEFAULT_LINK_ACTION , rResMgr ) ),
- maRbOpnLnksDefault( this, ResId( CB_VIEW_PDF_DEFAULT , rResMgr ) ),
+ maFlDefaultTitle( this, PDFFilterResId( FL_DEFAULT_LINK_ACTION ) ),
+ maRbOpnLnksDefault( this, PDFFilterResId( CB_VIEW_PDF_DEFAULT ) ),
mbOpnLnksDefaultUserState( sal_False ),
- maRbOpnLnksLaunch( this, ResId( CB_VIEW_PDF_APPLICATION , rResMgr ) ),
+ maRbOpnLnksLaunch( this, PDFFilterResId( CB_VIEW_PDF_APPLICATION ) ),
mbOpnLnksLaunchUserState( sal_False ),
- maRbOpnLnksBrowser( this, ResId( CB_VIEW_PDF_BROWSER , rResMgr ) ),
+ maRbOpnLnksBrowser( this, PDFFilterResId( CB_VIEW_PDF_BROWSER ) ),
mbOpnLnksBrowserUserState( sal_False )
{
- mpaResMgr = &rResMgr;
FreeResource();
// pb: #i91991# checkboxes only double-spaced if necessary
@@ -1311,16 +1299,13 @@ ImpPDFTabLinksPage::ImpPDFTabLinksPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabLinksPage::~ImpPDFTabLinksPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
SfxTabPage* ImpPDFTabLinksPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr * paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabLinksPage( pParent, rAttrSet, *paResMgr ) );
+ return ( new ImpPDFTabLinksPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -1436,18 +1421,18 @@ IMPL_LINK( ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, void*, EMPTYARG )
return 0;
}
-ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& rErrors, ResMgr& rResMgr ) :
- ModalDialog( NULL, ResId( RID_PDF_ERROR_DLG, rResMgr ) ),
+ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& rErrors ) :
+ ModalDialog( NULL, PDFFilterResId( RID_PDF_ERROR_DLG ) ),
maFI( this, 0 ),
- maProcessText( this, ResId( FT_PROCESS, rResMgr ) ),
+ maProcessText( this, PDFFilterResId( FT_PROCESS ) ),
maErrors( this, WB_BORDER | WB_AUTOVSCROLL ),
maExplanation( this, WB_WORDBREAK ),
maButton( this, WB_DEFBUTTON )
{
// load images
- Image aWarnImg = Image ( BitmapEx( ResId( IMG_WARN, rResMgr ) ) );
- Image aErrImg= Image ( BitmapEx( ResId( IMG_ERR, rResMgr ) ) );
+ Image aWarnImg( BitmapEx( PDFFilterResId( IMG_WARN ) ) );
+ Image aErrImg( BitmapEx( PDFFilterResId( IMG_ERR ) ) );
for( std::set<vcl::PDFWriter::ErrorCode>::const_iterator it = rErrors.begin();
it != rErrors.end(); ++it )
@@ -1456,30 +1441,30 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
{
case vcl::PDFWriter::Warning_Transparency_Omitted_PDFA:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_TRANSP_PDFA_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_TRANSP_PDFA, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) );
}
break;
case vcl::PDFWriter::Warning_Transparency_Omitted_PDF13:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_TRANSP_VERSION_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_TRANSP_VERSION, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) );
}
break;
case vcl::PDFWriter::Warning_FormAction_Omitted_PDFA:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_FORMACTION_PDFA_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_FORMACTION_PDFA, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) );
}
break;
case vcl::PDFWriter::Warning_Transparency_Converted:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_TRANSP_CONVERTED_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_TRANSP_CONVERTED, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) );
}
break;
default:
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index e1cb794cf4a3..62fe73850254 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -57,6 +57,12 @@ class ImpPDFTabViewerPage;
class ImpPDFTabOpnFtrPage;
class ImpPDFTabLinksPage;
+class PDFFilterResId : public ResId
+{
+public:
+ PDFFilterResId( sal_uInt32 nId );
+};
+
class ImplErrorDialog : public ModalDialog
{
FixedImage maFI;
@@ -68,7 +74,7 @@ class ImplErrorDialog : public ModalDialog
DECL_LINK( SelectHdl, ListBox* );
public:
- ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >&, ResMgr& rResMgr );
+ ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& );
~ImplErrorDialog();
};
@@ -84,8 +90,6 @@ private:
Any maSelection;
protected:
-
- ResMgr* mprResMgr;
//the following data are the configuration used throughout the dialog and pages
sal_Bool mbIsPresentation;
sal_Bool mbIsWriter;
@@ -149,7 +153,7 @@ public:
friend class ImpPDFTabSecurityPage;
friend class ImpPDFTabLinksPage;
- ImpPDFTabDialog( Window* pParent, ResMgr& rResMgr,
+ ImpPDFTabDialog( Window* pParent,
Sequence< PropertyValue >& rFilterData,
const Reference< XComponent >& rDoc,
const Reference< lang::XMultiServiceFactory >& xFact
@@ -204,8 +208,6 @@ class ImpPDFTabGeneralPage : public SfxTabPage
sal_Bool mbIsPresentation;
sal_Bool mbIsWriter;
- ResMgr* mpaResMgr;
-
const ImpPDFTabDialog* mpaParent;
DECL_LINK( TogglePagesHdl, void* );
@@ -218,8 +220,7 @@ public:
DECL_LINK( ToggleExportPDFAHdl, void* );
ImpPDFTabGeneralPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabGeneralPage();
static SfxTabPage* Create( Window* pParent,
@@ -256,15 +257,13 @@ class ImpPDFTabOpnFtrPage : public SfxTabPage
CheckBox maCbPgLyFirstOnLeft;
sal_Bool mbUseCTLFont;
- ResMgr* mpaResMgr;
DECL_LINK( ToggleRbPgLyContinueFacingHdl, void* );
DECL_LINK( ToggleRbMagnHdl, void* );
public:
ImpPDFTabOpnFtrPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabOpnFtrPage();
static SfxTabPage* Create( Window* pParent,
@@ -297,13 +296,10 @@ class ImpPDFTabViewerPage : public SfxTabPage
RadioButton maRbVisibleBookmarkLevels;
NumericField maNumBookmarkLevels;
- ResMgr* mpaResMgr;
-
DECL_LINK( ToggleRbBookmarksHdl, void* );
public:
ImpPDFTabViewerPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabViewerPage();
static SfxTabPage* Create( Window* pParent,
@@ -347,8 +343,6 @@ class ImpPDFTabSecurityPage : public SfxTabPage
String msOwnerPassword;
String msOwnerPwdTitle;
- ResMgr* mpaResMgr;
-
long nWidth;
DECL_LINK( ClickmaPbUserPwdHdl, void* );
@@ -360,8 +354,7 @@ class ImpPDFTabSecurityPage : public SfxTabPage
public:
ImpPDFTabSecurityPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabSecurityPage();
static SfxTabPage* Create( Window* pParent,
@@ -387,8 +380,6 @@ class ImpPDFTabLinksPage : public SfxTabPage
RadioButton maRbOpnLnksBrowser;
sal_Bool mbOpnLnksBrowserUserState;
- ResMgr* mpaResMgr;
-
long nWidth;
DECL_LINK( ClickRbOpnLnksDefaultHdl, void* );
@@ -396,8 +387,7 @@ class ImpPDFTabLinksPage : public SfxTabPage
public:
ImpPDFTabLinksPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr& rResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabLinksPage();
static SfxTabPage* Create( Window* pParent,
diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx
index 765741630ea9..a1c829de745a 100644
--- a/filter/source/pdf/pdfdialog.cxx
+++ b/filter/source/pdf/pdfdialog.cxx
@@ -45,8 +45,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
-//uncomment this to use the Tabbed PDF dialog (under development !)
-
// -----------------------
// - PDFDialog functions -
// -----------------------
@@ -100,16 +98,12 @@ Reference< XInterface > SAL_CALL PDFDialog_createInstance( const Reference< XMul
PDFDialog::PDFDialog( const Reference< XMultiServiceFactory > &rxMSF )
: PDFDialog_Base( rxMSF )
{
- ByteString aResMgrName( "pdffilter" );
-
- mpResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
}
// -----------------------------------------------------------------------------
PDFDialog::~PDFDialog()
{
- delete mpResMgr;
}
// -----------------------------------------------------------------------------
@@ -142,9 +136,9 @@ Dialog* PDFDialog::createDialog( Window* pParent )
{
Dialog* pRet = NULL;
- if( mpResMgr && mxSrcDoc.is() )
+ if( mxSrcDoc.is() )
{
- ImpPDFTabDialog* pDlg = new ImpPDFTabDialog( pParent, *mpResMgr, maFilterData, mxSrcDoc, m_aContext.getLegacyServiceFactory() );
+ ImpPDFTabDialog* pDlg = new ImpPDFTabDialog( pParent, maFilterData, mxSrcDoc, m_aContext.getLegacyServiceFactory() );
pRet = pDlg;
}
diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx
index 682e7974c11f..69bec8f7d7a2 100644
--- a/filter/source/pdf/pdfdialog.hxx
+++ b/filter/source/pdf/pdfdialog.hxx
@@ -34,7 +34,7 @@
#include "pdffilter.hxx"
#include <svtools/genericunodialog.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase2.hxx>
// -------------
// - PDFDialog -
@@ -43,19 +43,17 @@
class Window;
class ResMgr;
-typedef ::svt::OGenericUnoDialog PDFDialog_DialogBase;
-typedef ::cppu::ImplInheritanceHelper2 <
- PDFDialog_DialogBase,
- XPropertyAccess,
- XExporter
- > PDFDialog_Base;
-
-class PDFDialog : public PDFDialog_Base,
- public ::comphelper::OPropertyArrayUsageHelper< PDFDialog >
+typedef ::svt::OGenericUnoDialog PDFDialog_DialogBase;
+typedef ::cppu::ImplInheritanceHelper2 <
+ PDFDialog_DialogBase,
+ XPropertyAccess,
+ XExporter
+ > PDFDialog_Base;
+
+class PDFDialog : public PDFDialog_Base,
+ public ::comphelper::OPropertyArrayUsageHelper< PDFDialog >
{
private:
-
- ResMgr* mpResMgr;
Sequence< PropertyValue > maMediaDescriptor;
Sequence< PropertyValue > maFilterData;
Reference< XComponent > mxSrcDoc;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index ab746ff725e8..8ad3f7caad4f 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -895,7 +895,10 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
}
}
- bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aMultiSelection, aRenderOptions, nPageCount );
+ if( nPageCount > 0 )
+ bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aMultiSelection, aRenderOptions, nPageCount );
+ else
+ bRet = FALSE;
if ( bRet && bSecondPassForImpressNotes )
{
@@ -944,14 +947,8 @@ void PDFExport::showErrors( const std::set< PDFWriter::ErrorCode >& rErrors )
{
if( ! rErrors.empty() )
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- if ( pResMgr )
- {
- ImplErrorDialog aDlg( rErrors, *pResMgr );
- aDlg.Execute();
- delete pResMgr;
- }
+ ImplErrorDialog aDlg( rErrors );
+ aDlg.Execute();
}
}
diff --git a/forms/qa/forms_all.sce b/forms/qa/forms_all.sce
index 6b5344f60f6a..3aef2c95ecc1 100644
--- a/forms/qa/forms_all.sce
+++ b/forms/qa/forms_all.sce
@@ -5,3 +5,4 @@
-o integration.forms.ListSelection
-o integration.forms.MasterDetailForms
-o integration.forms.XMLFormSettings
+-o integration.forms.ListBox
diff --git a/forms/qa/integration/forms/DocumentViewHelper.java b/forms/qa/integration/forms/DocumentViewHelper.java
index f106ba070f8c..9f46e006609a 100644
--- a/forms/qa/integration/forms/DocumentViewHelper.java
+++ b/forms/qa/integration/forms/DocumentViewHelper.java
@@ -39,7 +39,7 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexContainer;
import com.sun.star.form.FormComponentType;
import com.sun.star.form.XForm;
-import com.sun.star.form.XFormController;
+import com.sun.star.form.runtime.XFormController;
import com.sun.star.frame.XController;
import com.sun.star.frame.XDispatch;
import com.sun.star.frame.XDispatchProvider;
@@ -190,10 +190,9 @@ public class DocumentViewHelper
/* ------------------------------------------------------------------ */
/** retrieves the form controller for a given logical form
*/
- public XFormController getFormController( XPropertySet _form )
+ public XFormController getFormController( Object _form )
{
- XFormLayerAccess formLayerAccess = (XFormLayerAccess)query( XFormLayerAccess.class );
- return formLayerAccess.getFormController( (XForm)UnoRuntime.queryInterface( XForm.class, _form ) );
+ return getFormController( UnoRuntime.queryInterface( XForm.class, _form ));
}
/* ------------------------------------------------------------------ */
diff --git a/forms/qa/integration/forms/FormControlTest.java b/forms/qa/integration/forms/FormControlTest.java
index 91193ff479e5..d561ac28ef2c 100644
--- a/forms/qa/integration/forms/FormControlTest.java
+++ b/forms/qa/integration/forms/FormControlTest.java
@@ -33,7 +33,7 @@ import com.sun.star.awt.XImageProducer;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
-import com.sun.star.form.XFormController;
+import com.sun.star.form.runtime.XFormController;
import com.sun.star.form.XImageProducerSupplier;
import com.sun.star.frame.XDispatch;
import com.sun.star.lang.EventObject;
@@ -52,6 +52,7 @@ import com.sun.star.util.URL;
import com.sun.star.util.XCloseable;
import com.sun.star.util.XURLTransformer;
import connectivity.tools.HsqlDatabase;
+import connectivity.tools.sdb.Connection;
import java.io.FileOutputStream;
@@ -609,8 +610,8 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
/* ------------------------------------------------------------------ */
private boolean ensureTables() throws com.sun.star.uno.Exception, java.lang.Exception
{
- XConnection xConn = m_dataSource.getConnection( "", "" );
- assure( "could not connect to the data source", xConn != null );
+ Connection connection = new Connection( m_dataSource.getConnection( "", "" ) );
+ assure( "could not connect to the data source", connection != null );
// drop the table, if it already exists
if ( !implExecuteStatement( "DROP TABLE \"" + s_tableName + "\" IF EXISTS" )
@@ -630,10 +631,10 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
return false;
}
- m_databaseDocument.getDataSource().refreshTables( xConn );
+ connection.refreshTables();
// do not need the connection anymore
- dbfTools.disposeComponent( xConn );
+ connection.close();
return true;
}
diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java
index 032ca5e7331a..8d31542fe191 100644
--- a/forms/qa/integration/forms/FormLayer.java
+++ b/forms/qa/integration/forms/FormLayer.java
@@ -31,7 +31,6 @@ package integration.forms;
import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleEditableText;
-import com.sun.star.container.XNameAccess;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.beans.XPropertySet;
@@ -42,7 +41,9 @@ import com.sun.star.drawing.XControlShape;
import com.sun.star.drawing.XShapes;
import com.sun.star.awt.Size;
import com.sun.star.awt.Point;
+import com.sun.star.awt.VisualEffect;
import com.sun.star.awt.XControlModel;
+import com.sun.star.container.XNameAccess;
import com.sun.star.text.TextContentAnchorType;
import com.sun.star.drawing.XDrawPage;
@@ -95,12 +96,12 @@ public class FormLayer
the property access to the control's model
*/
public XPropertySet createControlAndShape( String sFormComponentService, int nXPos,
- int nYPos, int nWidth, int nHeight, XIndexContainer xParentForm ) throws java.lang.Exception
+ int nYPos, int nWidth, int nHeight, Object _parentForm ) throws java.lang.Exception
{
// let the document create a shape
- XMultiServiceFactory xDocAsFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
+ XMultiServiceFactory xDocAsFactory = UnoRuntime.queryInterface(
XMultiServiceFactory.class, m_document.getDocument() );
- XControlShape xShape = (XControlShape)UnoRuntime.queryInterface( XControlShape.class,
+ XControlShape xShape = UnoRuntime.queryInterface( XControlShape.class,
xDocAsFactory.createInstance( "com.sun.star.drawing.ControlShape" ) );
// position and size of the shape
@@ -114,13 +115,18 @@ public class FormLayer
// create the form component (the model of a form control)
String sQualifiedComponentName = "com.sun.star.form.component." + sFormComponentService;
- XControlModel xModel = (XControlModel)UnoRuntime.queryInterface( XControlModel.class,
+ XControlModel xModel = UnoRuntime.queryInterface( XControlModel.class,
m_document.getOrb().createInstance( sQualifiedComponentName ) );
// insert the model into the form component hierarchy, if the caller gave us a location
- if ( null != xParentForm )
+ if ( null != _parentForm )
{
- xParentForm.insertByIndex( xParentForm.getCount(), xModel );
+ XIndexContainer parentForm = null;
+ if ( _parentForm instanceof XIndexContainer )
+ parentForm = (XIndexContainer)_parentForm;
+ else
+ parentForm = UnoRuntime.queryInterface( XIndexContainer.class, _parentForm );
+ parentForm.insertByIndex( parentForm.getCount(), xModel );
}
// knitt them
@@ -129,7 +135,7 @@ public class FormLayer
// add the shape to the shapes collection of the document
XDrawPage pageWhereToInsert = ( m_page != null ) ? m_page : m_document.getMainDrawPage();
- XShapes xDocShapes = (XShapes)UnoRuntime.queryInterface( XShapes.class, pageWhereToInsert );
+ XShapes xDocShapes = UnoRuntime.queryInterface( XShapes.class, pageWhereToInsert );
xDocShapes.add( xShape );
// and outta here with the XPropertySet interface of the model
@@ -220,7 +226,7 @@ public class FormLayer
@return
the control model of the created data input field
*/
- public XPropertySet insertControlLine( String sControlType, String sFieldName, String sControlNamePostfix,
+ public XPropertySet insertControlLine( String sControlType, String sFieldName, String _controlNamePostfix,
int nXPos, int nYPos, int nHeight )
throws java.lang.Exception
{
@@ -231,12 +237,20 @@ public class FormLayer
// insert the text field control
XPropertySet xFieldModel = createControlAndShape( sControlType, nXPos + 26, nYPos, 40, nHeight );
xFieldModel.setPropertyValue( "DataField", sFieldName );
+ if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "Border" ) )
+ {
+ xFieldModel.setPropertyValue( "Border", new Short( VisualEffect.FLAT ) );
+ if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "BorderColor" ) )
+ xFieldModel.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) );
+ }
// knit it to it's label component
xFieldModel.setPropertyValue( "LabelControl", xLabelModel );
// some names, so later on we can find them
- xLabelModel.setPropertyValue( "Name", sFieldName + sControlNamePostfix + "_Label" );
- xFieldModel.setPropertyValue( "Name", sFieldName + sControlNamePostfix );
+ if ( _controlNamePostfix == null )
+ _controlNamePostfix = "";
+ xLabelModel.setPropertyValue( "Name", sFieldName + _controlNamePostfix + "_Label" );
+ xFieldModel.setPropertyValue( "Name", sFieldName + _controlNamePostfix );
return xFieldModel;
}
@@ -256,7 +270,7 @@ public class FormLayer
public XPropertySet insertControlLine( String sControlType, String sFieldName, String sControlNamePostfix, int nYPos )
throws java.lang.Exception
{
- return insertControlLine( sControlType, sFieldName, sControlNamePostfix, 2, nYPos, 6 );
+ return insertControlLine( sControlType, sFieldName, sControlNamePostfix, 10, nYPos, 6 );
}
/* ------------------------------------------------------------------ */
@@ -270,8 +284,7 @@ public class FormLayer
*/
public XPropertySet getRadioModelByRefValue( XPropertySet form, String name, String refValue ) throws com.sun.star.uno.Exception, java.lang.Exception
{
- XIndexAccess indexAccess = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class,
- form );
+ XIndexAccess indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, form );
for ( int i=0; i<indexAccess.getCount(); ++i )
{
@@ -295,8 +308,7 @@ public class FormLayer
*/
public XPropertySet getRadioModelByTag( XPropertySet form, String name, String tag ) throws com.sun.star.uno.Exception, java.lang.Exception
{
- XIndexAccess indexAccess = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class,
- form );
+ XIndexAccess indexAccess = UnoRuntime.queryInterface( XIndexAccess.class, form );
for ( int i=0; i<indexAccess.getCount(); ++i )
{
@@ -357,10 +369,10 @@ public class FormLayer
// doing a user input, as the latter will trigger a lot of notifications, which the forms runtime environment
// (namely the FormController) relies on to notice that the control changed.
// Instead, we use the Accessibility interfaces of the control to simulate text input
- XAccessible formattedAccessible = (XAccessible)UnoRuntime.queryInterface( XAccessible.class,
+ XAccessible formattedAccessible = UnoRuntime.queryInterface( XAccessible.class,
m_document.getCurrentView().getControl( controlModel )
);
- XAccessibleEditableText textAccess = (XAccessibleEditableText)UnoRuntime.queryInterface( XAccessibleEditableText.class,
+ XAccessibleEditableText textAccess = UnoRuntime.queryInterface( XAccessibleEditableText.class,
formattedAccessible.getAccessibleContext() );
textAccess.setText( text );
}
diff --git a/forms/qa/integration/forms/FormPropertyBags.java b/forms/qa/integration/forms/FormPropertyBags.java
index 4adb04796030..9558464f5b20 100644
--- a/forms/qa/integration/forms/FormPropertyBags.java
+++ b/forms/qa/integration/forms/FormPropertyBags.java
@@ -47,8 +47,6 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.util.XCloseable;
-import integration.forms.DocumentHelper;
-
public class FormPropertyBags extends complexlib.ComplexTestCase implements XPropertyChangeListener
{
private DocumentHelper m_document;
@@ -90,8 +88,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
{
if ( m_document != null )
{
- XCloseable closeDoc = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,
- m_document.getDocument() );
+ XCloseable closeDoc = UnoRuntime.queryInterface( XCloseable.class, m_document.getDocument() );
closeDoc.close( true );
}
}
@@ -108,7 +105,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
XPropertySet textFieldModel = m_formLayer.createControlAndShape( "DatabaseTextField", 10, 10, 25, 6 );
// check whether adding new properties is successful
- XPropertyContainer propContainer = (XPropertyContainer)UnoRuntime.queryInterface(
+ XPropertyContainer propContainer = UnoRuntime.queryInterface(
XPropertyContainer.class, textFieldModel );
assure("XPropertyContainer not supported!", propContainer != null );
@@ -166,8 +163,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
private void impl_checkPropertyPersistence() throws com.sun.star.uno.Exception
{
// store the document
- XStorable store = (XStorable)UnoRuntime.queryInterface( XStorable.class,
- m_document.getDocument() );
+ XStorable store = UnoRuntime.queryInterface( XStorable.class, m_document.getDocument() );
String documentURL = util.utils.getOfficeTemp( m_orb ) + "document.odt";
PropertyValue[] storeArguments = new PropertyValue[] { new PropertyValue() };
storeArguments[0].Name = "FilterName";
diff --git a/forms/qa/integration/forms/ListBox.java b/forms/qa/integration/forms/ListBox.java
new file mode 100644
index 000000000000..8fcec383c656
--- /dev/null
+++ b/forms/qa/integration/forms/ListBox.java
@@ -0,0 +1,290 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package integration.forms;
+
+import com.sun.star.awt.XListBox;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.XChild;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.form.ListSourceType;
+import com.sun.star.form.runtime.FormFeature;
+import com.sun.star.form.runtime.XFormController;
+import com.sun.star.form.runtime.XFormOperations;
+import com.sun.star.sdb.CommandType;
+import com.sun.star.sdbc.SQLException;
+import com.sun.star.sdbc.XParameters;
+import com.sun.star.sdbc.XPreparedStatement;
+import com.sun.star.uno.Exception;
+import com.sun.star.uno.UnoRuntime;
+import connectivity.tools.HsqlColumnDescriptor;
+import connectivity.tools.HsqlDatabase;
+import connectivity.tools.HsqlTableDescriptor;
+import connectivity.tools.sdb.Connection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+public class ListBox extends TestCase
+{
+ HsqlDatabase m_database = null;
+ private final String m_foreignKeyTableName = "foreign_keys";
+
+ public ListBox()
+ {
+ super( DocumentType.WRITER );
+ }
+
+ /* ------------------------------------------------------------------ */
+ public String[] getTestMethodNames()
+ {
+ return new String[] {
+ "checkForeignKeys"
+ };
+ }
+
+ /* ------------------------------------------------------------------ */
+ public void checkForeignKeys() throws com.sun.star.uno.Exception, java.lang.Exception
+ {
+ try
+ {
+ // create the form document
+ prepareDocument();
+
+ final XIndexAccess formsCollection = UnoRuntime.queryInterface( XIndexAccess.class,
+ m_document.getFormComponentTreeRoot() );
+ final XNameAccess form = UnoRuntime.queryInterface( XNameAccess.class, formsCollection.getByIndex(0) );
+
+ final DocumentViewHelper view = m_document.getCurrentView();
+ final XFormController formController = view.getFormController( form );
+ final XFormOperations formOperations = formController.getFormOperations();
+
+ // move through all records, and check that the display values in the list boxes are as expected
+ final String[][] fieldTypesDefinitions = impl_getFieldTypeDefinitions();
+ final String[] fieldTypes = fieldTypesDefinitions[0];
+
+ final String[] displayValues = impl_getDisplayValues();
+
+ formOperations.execute( FormFeature.MoveToFirst );
+ for ( int row=0; row<2; ++row )
+ {
+ StringBuffer failedFieldTypes = new StringBuffer();
+ for ( int i=0; i<fieldTypes.length; ++i )
+ {
+ final String columnFKName = fieldTypes[i] + "_fk";
+ Object listBoxModel = form.getByName( columnFKName );
+ XListBox listBoxControl = UnoRuntime.queryInterface( XListBox.class,
+ view.getControl( listBoxModel ) );
+ if ( !listBoxControl.getSelectedItem().equals( displayValues[row] ) )
+ {
+ if ( failedFieldTypes.length() > 0 )
+ failedFieldTypes.append( ", " );
+ failedFieldTypes.append( fieldTypes[i] );
+ }
+ }
+ /*assure( "The following field types do not work when used as bound list box fields: " + failedFieldTypes.toString() +
+ " (row " + row + ")", failedFieldTypes.length() == 0 );*/
+
+ formOperations.execute( FormFeature.MoveToNext );
+ }
+
+ }
+ finally
+ {
+ closeDocument();
+ }
+ }
+
+ /* ------------------------------------------------------------------ */
+ public void before() throws Exception, java.lang.Exception
+ {
+ super.before();
+ impl_createDatabase();
+ }
+
+ /* ------------------------------------------------------------------ */
+ protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
+ {
+ super.prepareDocument();
+ impl_createForm();
+ }
+
+ /* ------------------------------------------------------------------ */
+ private String[][] impl_getFieldTypeDefinitions()
+ {
+ return new String[][] {
+ new String[] {
+ "bigint", "boolean", "date", "decimal", "double", "float", "numeric", "time", "timestamp", "tinyint", "varchar"
+ },
+ new String[] {
+ null, null, null, "(10,2)", null, null, "(10,2)", null, null, null, "(50)"
+ }
+ };
+ }
+
+ /* ------------------------------------------------------------------ */
+ private String[] impl_getTypedValue( final String _asType, final int _rowNum ) throws SQLException
+ {
+ Map< String, String[] > valueMap = new HashMap< String, String[] >();
+ valueMap.put( "bigint", new String[] { "1111111111", "222222222" } );
+ valueMap.put( "boolean", new String[] { "false", "true" } );
+ valueMap.put( "date", new String[] { "2001-01-01", "2002-02-02" } );
+ valueMap.put( "decimal", new String[] { "1.11", "2.22" } );
+ valueMap.put( "double", new String[] { "1.11", "2.22" } );
+ valueMap.put( "float", new String[] { "1.11", "2.22" } );
+ valueMap.put( "numeric", new String[] { "1.11", "2.22" } );
+ valueMap.put( "time", new String[] { "01:01:01", "02:02:02" } );
+ valueMap.put( "timestamp", new String[] { "2001-01-01 01:01:01", "2002-02-02 02:02:02" } );
+ valueMap.put( "tinyint", new String[] { "1", "2" } );
+ valueMap.put( "varchar", new String[] { "first", "second" } );
+
+ return valueMap.get( _asType );
+ }
+
+ /* ------------------------------------------------------------------ */
+ private String[] impl_getDisplayValues()
+ {
+ return new String[] { "one", "two" };
+ }
+
+ /* ------------------------------------------------------------------ */
+ private void impl_createDatabase() throws java.lang.Exception
+ {
+ try
+ {
+ m_database = new HsqlDatabase( m_orb );
+ Connection connection = m_database.defaultConnection();
+ System.out.println( m_database.getDocumentURL() );
+
+ final String[][] fieldDefinitions = impl_getFieldTypeDefinitions();
+ final String[] keyTypes = fieldDefinitions[0];
+ final String[] keyCreationArgs = fieldDefinitions[1];
+
+ Vector< HsqlColumnDescriptor > foreignKeyColumns = new Vector< HsqlColumnDescriptor >();
+ foreignKeyColumns.add( new HsqlColumnDescriptor( "ID", "integer", HsqlColumnDescriptor.PRIMARY ) );
+
+ Vector< String[] > foreignKeyValues = new Vector< String[] >();
+
+ StringBuffer foreignKeyInsertSQL = new StringBuffer();
+ foreignKeyInsertSQL.append( "INSERT INTO \"" + m_foreignKeyTableName + "\" VALUES (?" );
+
+ final String[] displayValues = impl_getDisplayValues();
+
+ for ( int i=0; i<keyTypes.length; ++i )
+ {
+ final String tableName = keyTypes[i] + "_pk";
+ final String columnPKName = keyTypes[i] + "_pk";
+ final String columnFKName = keyTypes[i] + "_fk";
+ final String columnType = keyTypes[i] + ( keyCreationArgs[i] != null ? keyCreationArgs[i] : "" );
+ m_database.createTable( new HsqlTableDescriptor( tableName,
+ new HsqlColumnDescriptor[] {
+ new HsqlColumnDescriptor( columnPKName, columnType, HsqlColumnDescriptor.PRIMARY ),
+ new HsqlColumnDescriptor( "content", "varchar(50)" )
+ }
+ ) );
+
+ // insert a few rows
+ StringBuffer sql = new StringBuffer();
+ sql.append( "INSERT INTO \"" );
+ sql.append( tableName );
+ sql.append( "\" VALUES (?, ?)");
+ XPreparedStatement statement = connection.prepareStatement( sql.toString() );
+ XParameters statementParameters = UnoRuntime.queryInterface( XParameters.class, statement );
+
+ final String[] keyValues = impl_getTypedValue( keyTypes[i], 0 );
+
+ for ( int row=0; row<displayValues.length; ++row )
+ {
+ statementParameters.setString( 1, keyValues[row] );
+ statementParameters.setString( 2, displayValues[row] );
+ statement.execute();
+ }
+
+ // remember a column descriptor for later creation of the table with the foreign keys
+ foreignKeyColumns.add( new HsqlColumnDescriptor( columnFKName, columnType, HsqlColumnDescriptor.REQUIRED,
+ tableName, columnPKName ) );
+
+ // remember the data to fill into this table
+ foreignKeyValues.add( keyValues );
+ foreignKeyInsertSQL.append( ", ?" );
+ }
+
+ // create the table taking all those foreign keys
+ m_database.createTable( new HsqlTableDescriptor( m_foreignKeyTableName, foreignKeyColumns.toArray( new HsqlColumnDescriptor[0] ) ) );
+ // fill in some data
+ foreignKeyInsertSQL.append( ")" );
+ XPreparedStatement statement = connection.prepareStatement( foreignKeyInsertSQL.toString() );
+ XParameters statementParameters = UnoRuntime.queryInterface( XParameters.class, statement );
+ for ( int row=0; row<2; ++row )
+ {
+ statementParameters.setInt( 1, row );
+ for ( int i=0; i<keyTypes.length; ++i )
+ {
+ statementParameters.setString( i+2, foreignKeyValues.get(i)[row] );
+ }
+ statement.execute();
+ }
+
+ m_database.defaultConnection().refreshTables();
+ }
+ finally
+ {
+ if ( m_database != null )
+ m_database.store();
+ }
+ }
+
+ /* ------------------------------------------------------------------ */
+ private void impl_createForm() throws java.lang.Exception
+ {
+ // a single control for the ID field
+ XPropertySet controlModel = m_formLayer.insertControlLine( "DatabaseNumericField", "ID", null, 10, 10, 6 );
+ // bind the form to the foreign_keys table
+ XPropertySet form = dbfTools.queryPropertySet( dbfTools.getParent( controlModel, XChild.class ) );
+ form.setPropertyValue( "Command", m_foreignKeyTableName );
+ form.setPropertyValue( "CommandType", CommandType.TABLE );
+ form.setPropertyValue( "DataSourceName", m_database.getDocumentURL() );
+
+ // create list boxes for the different foreign keys
+ final String[][] fieldDefinitions = impl_getFieldTypeDefinitions();
+ final String[] fieldTypes = fieldDefinitions[0];
+ for ( int i=0; i<fieldTypes.length; ++i )
+ {
+ final String tableName = fieldTypes[i] + "_pk";
+ final String columnFKName = fieldTypes[i] + "_fk";
+ final String columnPKName = fieldTypes[i] + "_pk";
+ XPropertySet listBoxModel = m_formLayer.insertControlLine( "DatabaseListBox", columnFKName, null, 10, 20 + 10*i, 6 );
+ listBoxModel.setPropertyValue( "Dropdown", new Boolean( true ) );
+ listBoxModel.setPropertyValue( "ListSourceType", ListSourceType.SQL );
+ listBoxModel.setPropertyValue( "ListSource", new String[] { "SELECT \"content\", \"" + columnPKName +
+ "\" FROM \"" + tableName + "\"" } );
+ listBoxModel.setPropertyValue( "BoundColumn", new Short( (short)1 ) );
+ }
+
+ m_document.getCurrentView().toggleFormDesignMode();
+ }
+ }
diff --git a/forms/qa/integration/forms/ListSelection.java b/forms/qa/integration/forms/ListSelection.java
index 110380cc660f..818fc262e51c 100644
--- a/forms/qa/integration/forms/ListSelection.java
+++ b/forms/qa/integration/forms/ListSelection.java
@@ -30,7 +30,6 @@
package integration.forms;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.beans.XPropertySet;
import com.sun.star.sheet.XSpreadsheet;
import com.sun.star.sheet.XSpreadsheets;
@@ -48,15 +47,10 @@ import com.sun.star.script.ScriptEventDescriptor;
import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.accessibility.XAccessibleSelection;
-import com.sun.star.accessibility.XAccessibleAction;
import com.sun.star.frame.XStorable;
-import integration.forms.DocumentHelper;
-
-public class ListSelection extends integration.forms.TestCase implements com.sun.star.awt.XItemListener
+public class ListSelection extends integration.forms.TestCase
{
- private final static boolean m_useJavaCallbacks = false;
-
/** Creates a new instance of ListSelection */
public ListSelection()
{
@@ -98,7 +92,7 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
{
log.println( "Round " + ( i + 1 ) + " of " + runs );
prepareDocument();
- clickTheListBox();
+ impl_clickListBox();
synchronized( this ) { this.wait( 1000 ); }
closeDocument();
}
@@ -106,7 +100,7 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
}
/* ------------------------------------------------------------------ */
- final protected void clickTheListBox()
+ final private void impl_clickListBox()
{
try
{
@@ -123,13 +117,6 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
XAccessible.class, getListBoxControl( activeSheet ) );
XAccessibleContext context = accessibleListBox.getAccessibleContext();
- // open the popup of the list box (not really necessary, but to better
- // simlate user action ...)
-/* XAccessibleAction listBoxActions = (XAccessibleAction)UnoRuntime.queryInterface(
- XAccessibleAction.class, context );
- listBoxActions.doAccessibleAction( 0 );
-*/
-
// the first "accessible child" of a list box is its list
XAccessibleSelection accessibleList = (XAccessibleSelection)UnoRuntime.queryInterface(
XAccessibleSelection.class, context.getAccessibleChild( 1 ) );
@@ -158,7 +145,7 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
}
/* ------------------------------------------------------------------ */
- final protected void createListenerScript()
+ final private void impl_setupListenerScript()
{
try
{
@@ -203,7 +190,7 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
}
/* ------------------------------------------------------------------ */
- final protected void assignCallbackScript( XPropertySet controlModel, String interfaceName, String interfaceMethod, String scriptCode )
+ final private void impl_assignStarBasicScript( XPropertySet controlModel, String interfaceName, String interfaceMethod, String scriptCode )
{
try
{
@@ -240,8 +227,7 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
{
super.prepareDocument();
- if ( !m_useJavaCallbacks )
- createListenerScript();
+ impl_setupListenerScript();
SpreadsheetDocument document = (SpreadsheetDocument)m_document;
XSpreadsheets sheets = document.getSheets();
@@ -264,7 +250,7 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
for ( int i = 0; i < 4; ++i )
{
XPropertySet buttonModel = m_formLayer.createControlAndShape( "CommandButton", 10, 10 + i * 10, 30, 8 );
- assignCallbackScript( buttonModel, "XActionListener", "actionPerformed", "document:default.callbacks.onButtonClicked" );
+ impl_assignStarBasicScript( buttonModel, "XActionListener", "actionPerformed", "document:default.callbacks.onButtonClicked" );
}
// and a list box
@@ -273,25 +259,15 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
listBox.setPropertyValue( "StringItemList", newSheetNames );
listBox.setPropertyValue( "Name", "ListBox" );
- if ( !m_useJavaCallbacks )
- assignCallbackScript( listBox, "XItemListener", "itemStateChanged", "document:default.callbacks.onListBoxSelected" );
+ impl_assignStarBasicScript( listBox, "XItemListener", "itemStateChanged", "document:default.callbacks.onListBoxSelected" );
// clone this sheet
for ( short i = 1; i < newSheetNames.length; ++i )
- sheets.copyByName( newSheetNames[0], newSheetNames[i], (short)i );
+ sheets.copyByName( newSheetNames[0], newSheetNames[i], i );
// switch the thing to alive mode
m_document.getCurrentView().toggleFormDesignMode();
- // add to the list box control as item listener
- if ( m_useJavaCallbacks )
- {
- XControl control = m_document.getCurrentView().getControl( listBox );
- XListBox listBoxControl = (XListBox)UnoRuntime.queryInterface(
- XListBox.class, control );
- listBoxControl.addItemListener( this );
- }
-
try
{
XStorable storable = (XStorable)m_document.query( XStorable.class );
@@ -322,48 +298,4 @@ public class ListSelection extends integration.forms.TestCase implements com.sun
return (XListBox)UnoRuntime.queryInterface(
XListBox.class, m_document.getCurrentView().getControl( getListBoxModel( sheet ) ) );
}
-
- /* ------------------------------------------------------------------ */
- public void itemStateChanged( com.sun.star.awt.ItemEvent event ) throws com.sun.star.uno.RuntimeException
- {
- try
- {
- // get the selected string
- XControl control = (XControl)UnoRuntime.queryInterface( XControl.class,
- event.Source );
- XPropertySet model = dbfTools.queryPropertySet( control.getModel() );
- String[] entries = (String[])model.getPropertyValue( "StringItemList" );
- String selectedEntry = entries[ event.Selected ];
-
- // activate this sheet
- SpreadsheetDocument document = (SpreadsheetDocument)m_document;
- XSpreadsheet sheet = (XSpreadsheet)UnoRuntime.queryInterface(
- XSpreadsheet.class, document.getSheets().getByName( selectedEntry ) );
- XSpreadsheetView view = (XSpreadsheetView)m_document.getCurrentView().query( XSpreadsheetView.class );
- view.setActiveSheet( sheet );
-
- if ( m_useJavaCallbacks )
- {
- // after we switched to another sheet, we need to register at its list box
- // control, again. The reason is that controls exist as long as their sheet is active.
- XListBox listBoxControl = getListBoxControl( sheet );
- listBoxControl.addItemListener( this );
-
- // in the list box of this new sheet, select its name. Everything else
- // is way too confusing
- listBoxControl.selectItem( selectedEntry, true );
- // don't do it. It deadlocks :(
- }
- }
- catch( com.sun.star.uno.Exception e )
- {
- e.printStackTrace( System.err );
- }
- }
-
- /* ------------------------------------------------------------------ */
- public void disposing( com.sun.star.lang.EventObject rEvent ) throws com.sun.star.uno.RuntimeException
- {
- // not interested in by now
- }
}
diff --git a/forms/qa/integration/forms/MasterDetailForms.java b/forms/qa/integration/forms/MasterDetailForms.java
index 2b83a11dd223..3bf14aae70cd 100644
--- a/forms/qa/integration/forms/MasterDetailForms.java
+++ b/forms/qa/integration/forms/MasterDetailForms.java
@@ -30,67 +30,77 @@
package integration.forms;
+import com.sun.star.beans.NamedValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.XIndexContainer;
import java.lang.reflect.Method;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.beans.*;
import com.sun.star.container.XNameContainer;
+import com.sun.star.embed.XComponentSupplier;
+import com.sun.star.form.XGridColumnFactory;
+import com.sun.star.form.XGridFieldDataSupplier;
import com.sun.star.form.XLoadable;
-import com.sun.star.sdbc.*;
-
-import connectivity.tools.*;
+import com.sun.star.lang.XComponent;
+import com.sun.star.sdb.CommandType;
+import com.sun.star.sdb.XFormDocumentsSupplier;
+import com.sun.star.sdbc.SQLException;
+import com.sun.star.sdbc.XColumnLocate;
+import com.sun.star.ucb.Command;
+import com.sun.star.ucb.OpenMode;
+import com.sun.star.ucb.XCommandProcessor;
+import com.sun.star.uno.Type;
+import com.sun.star.util.XModifiable;
+import connectivity.tools.CRMDatabase;
+import connectivity.tools.HsqlColumnDescriptor;
+import connectivity.tools.HsqlDatabase;
+import connectivity.tools.HsqlTableDescriptor;
+import org.openoffice.complex.forms.tools.ResultSet;
public class MasterDetailForms extends complexlib.ComplexTestCase implements com.sun.star.form.XLoadListener
{
private XMultiServiceFactory m_orb;
- private HsqlDatabase m_databaseDocument;
private XPropertySet m_masterForm;
private XPropertySet m_detailForm;
- private XResultSet m_masterSet;
- private XResultSet m_detailSet;
- private XRow m_masterRow;
- private XRow m_detailRow;
+ private ResultSet m_masterResult;
+ private ResultSet m_detailResult;
- private Object m_waitForLoad;
- private boolean m_loaded;
+ final private Object m_waitForLoad = new Object();
+ private boolean m_loaded = false;
- /** Creates a new instance of ValueBinding */
+ /** Creates a new instance of MasterDetailForms */
public MasterDetailForms()
{
- m_loaded = false;
- m_waitForLoad = new Object();
}
/* ------------------------------------------------------------------ */
public String[] getTestMethodNames()
{
return new String[] {
- "checkMultipleKeys"
+ "checkMultipleKeys",
+ "checkDetailFormDefaults"
};
}
/* ------------------------------------------------------------------ */
- public String getTestObjectName()
+ public void before()
{
- return "Form Control Spreadsheet Cell Binding Test";
+ m_orb = (XMultiServiceFactory)param.getMSF();
}
/* ------------------------------------------------------------------ */
- public void before() throws java.lang.Exception
+ public String getTestObjectName()
{
- m_orb = (XMultiServiceFactory)param.getMSF();
- m_databaseDocument = new HsqlDatabase( m_orb );
- createTableStructure();
- createForms();
+ return "Form Control Spreadsheet Cell Binding Test";
}
/* ------------------------------------------------------------------ */
/** creates the table structure needed for the test
*/
- private void createTableStructure() throws SQLException
+ private void impl_createTableStructure( final HsqlDatabase _databaseDocument ) throws SQLException
{
HsqlColumnDescriptor[] masterColumns = {
new HsqlColumnDescriptor( "ID1", "INTEGER", HsqlColumnDescriptor.PRIMARY ),
@@ -103,46 +113,37 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
new HsqlColumnDescriptor( "FK_ID2", "INTEGER", HsqlColumnDescriptor.REQUIRED, "master", "ID2" ),
new HsqlColumnDescriptor( "name", "VARCHAR(50)" ),
};
- m_databaseDocument.createTable( new HsqlTableDescriptor( "master", masterColumns ) );
- m_databaseDocument.createTable( new HsqlTableDescriptor( "detail", detailColumns ) );
+ _databaseDocument.createTable( new HsqlTableDescriptor( "master", masterColumns ) );
+ _databaseDocument.createTable( new HsqlTableDescriptor( "detail", detailColumns ) );
- m_databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 1, 'First Record' )" );
- m_databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 2, 'Second Record' )" );
- m_databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 1, 1, 1, 'record 1.1 (1)')");
- m_databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 2, 1, 1, 'record 1.1 (2)')");
- m_databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 3, 1, 2, 'record 1.2 (1)')");
+ _databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 1, 'First Record' )" );
+ _databaseDocument.executeSQL( "INSERT INTO \"master\" VALUES ( 1, 2, 'Second Record' )" );
+ _databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 1, 1, 1, 'record 1.1 (1)')");
+ _databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 2, 1, 1, 'record 1.1 (2)')");
+ _databaseDocument.executeSQL( "INSERT INTO \"detail\" VALUES ( 3, 1, 2, 'record 1.2 (1)')");
- m_databaseDocument.getDataSource().refreshTables( m_databaseDocument.defaultConnection() );
+ _databaseDocument.defaultConnection().refreshTables();
}
/* ------------------------------------------------------------------ */
- public void createForms() throws com.sun.star.uno.Exception
+ private void impl_createForms( final HsqlDatabase _databaseDocument ) throws com.sun.star.uno.Exception
{
m_masterForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) );
- m_masterRow = (XRow)UnoRuntime.queryInterface( XRow.class, m_masterForm );
- m_masterSet = (XResultSet)UnoRuntime.queryInterface( XResultSet.class, m_masterForm );
- m_masterForm.setPropertyValue( "ActiveConnection", m_databaseDocument.defaultConnection() );
+ m_masterForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection().getXConnection() );
m_masterForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) );
m_masterForm.setPropertyValue( "Command", "master" );
+ m_masterResult = new ResultSet( m_masterForm );
+
m_detailForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) );
- m_detailRow = (XRow)UnoRuntime.queryInterface( XRow.class, m_detailForm );
- m_detailSet = (XResultSet)UnoRuntime.queryInterface( XResultSet.class, m_detailForm );
- m_detailForm.setPropertyValue( "ActiveConnection", m_databaseDocument.defaultConnection() );
+ m_detailForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection().getXConnection() );
m_detailForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) );
m_detailForm.setPropertyValue( "Command", "detail" );
- XNameContainer masterContainer = (XNameContainer)UnoRuntime.queryInterface( XNameContainer.class,
- m_masterForm );
- masterContainer.insertByName( "slave", m_detailForm );
- }
+ m_detailResult = new ResultSet( m_detailForm );
- /* ------------------------------------------------------------------ */
- public void after() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- m_databaseDocument.closeAndDelete();
- dbfTools.disposeComponent( m_masterForm );
- dbfTools.disposeComponent( m_detailForm );
+ XNameContainer masterContainer = UnoRuntime.queryInterface( XNameContainer.class, m_masterForm );
+ masterContainer.insertByName( "slave", m_detailForm );
}
/* ------------------------------------------------------------------ */
@@ -150,47 +151,211 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
*/
public void checkMultipleKeys() throws com.sun.star.uno.Exception, java.lang.Exception
{
- m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID1", "ID2" } );
- m_detailForm.setPropertyValue( "DetailFields", new String[] { "FK_ID1", "FK_ID2" } );
+ HsqlDatabase databaseDocument = null;
+ try
+ {
+ databaseDocument = new HsqlDatabase( m_orb );
+ impl_createTableStructure( databaseDocument );
+ impl_createForms( databaseDocument );
+
+ m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID1", "ID2" } );
+ m_detailForm.setPropertyValue( "DetailFields", new String[] { "FK_ID1", "FK_ID2" } );
- XLoadable loadMaster = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_masterForm );
- XLoadable loadDetail = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
- loadDetail.addLoadListener( this );
+ XLoadable loadMaster = UnoRuntime.queryInterface( XLoadable.class, m_masterForm );
+ XLoadable loadDetail = UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
+ loadDetail.addLoadListener( this );
- // wait until the detail form is loaded
- operateMasterAndWaitForDetailForm( loadMaster.getClass().getMethod( "load", new Class[] {} ), loadMaster, new Object[] { } );
+ // wait until the detail form is loaded
+ operateMasterAndWaitForDetailForm( loadMaster.getClass().getMethod( "load", new Class[] {} ), loadMaster, new Object[] { } );
- // okay, now the master form should be on the first record
- assure( "wrong form state after loading (ID1)", m_masterRow.getInt(1) == 1 );
- assure( "wrong form state after loading (ID2)", m_masterRow.getInt(2) == 1 );
- assure( "wrong form state after loading (value)", m_masterRow.getString(3).equals( "First Record" ) );
+ // okay, now the master form should be on the first record
+ assure( "wrong form state after loading (ID1)", m_masterResult.getInt(1) == 1 );
+ assure( "wrong form state after loading (ID2)", m_masterResult.getInt(2) == 1 );
+ assure( "wrong form state after loading (value)", m_masterResult.getString(3).equals( "First Record" ) );
- // the "XResultSet.next" method
- Method methodNext = m_masterSet.getClass().getMethod( "next" , new Class[] {} );
+ // the "XResultSet.next" method
+ Method methodNext = m_masterResult.getClass().getMethod( "next" , new Class[] {} );
+
+ // the values in the linked fields should be identical
+ int expectedDetailRowCounts[] = { 2, 1 };
+ do
+ {
+ verifyColumnValueIdentity( "ID1", "FK_ID1" );
+ verifyColumnValueIdentity( "ID2", "FK_ID2" );
+
+ m_detailResult.last();
+ int masterPos = m_masterResult.getRow();
+ assure( "wrong number of records in detail form, for master form at pos " + masterPos,
+ ((Integer)m_detailForm.getPropertyValue( "RowCount" )).intValue() == expectedDetailRowCounts[ masterPos - 1 ] );
+
+ operateMasterAndWaitForDetailForm( methodNext, m_masterResult, new Object[] {} );
+ }
+ while ( !m_masterResult.isAfterLast() );
+ assure( "wrong number of records in master form", 2 == ((Integer)m_masterForm.getPropertyValue( "RowCount" )).intValue() );
+ }
+ finally
+ {
+ if ( databaseDocument != null )
+ databaseDocument.closeAndDelete();
+ impl_cleanUpStep();
+ }
+ }
+
+ /* ------------------------------------------------------------------ */
+ private final void impl_cleanUpStep()
+ {
+ if ( m_masterForm != null )
+ dbfTools.disposeComponent( m_masterForm );
+ if ( m_detailForm != null )
+ dbfTools.disposeComponent( m_detailForm );
+ m_masterForm = m_detailForm = null;
+ }
- // the values in the linked fields should be identical
- int expectedDetailRowCounts[] = { 2, 1 };
- do
+ /* ------------------------------------------------------------------ */
+ /** checks whether default values in detail forms work as expected.
+ *
+ * Effectively, this test case verifies the issues #i106574# and #i105235# did not creep back in.
+ */
+ public void checkDetailFormDefaults() throws Exception
+ {
+ CRMDatabase database = null;
+ XCommandProcessor subComponentCommands = null;
+ try
+ {
+ // create our standard CRM database document
+ database = new CRMDatabase( m_orb, true );
+
+ // create a form document therein
+ XFormDocumentsSupplier formDocSupp = UnoRuntime.queryInterface( XFormDocumentsSupplier.class, database.getDatabase().getModel() );
+ XMultiServiceFactory formFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class, formDocSupp.getFormDocuments() );
+ NamedValue[] loadArgs = new NamedValue[] {
+ new NamedValue( "ActiveConnection", database.getConnection().getXConnection() ),
+ new NamedValue( "MediaType", "application/vnd.oasis.opendocument.text" )
+ };
+
+ subComponentCommands = UnoRuntime.queryInterface(
+ XCommandProcessor.class,
+ formFactory.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", loadArgs ) );
+ Command command = new Command();
+ command.Name = "openDesign";
+ command.Argument = new Short( OpenMode.DOCUMENT );
+
+ DocumentHelper subDocument = new DocumentHelper( m_orb,
+ UnoRuntime.queryInterface( XComponent.class,
+ subComponentCommands.execute( command, subComponentCommands.createCommandIdentifier(), null )
+ )
+ );
+ FormLayer formLayer = new FormLayer( subDocument );
+ XPropertySet controlModel = formLayer.insertControlLine( "DatabaseNumericField", "ID", "", 10 );
+ formLayer.insertControlLine( "DatabaseTextField", "Name", "", 20 );
+ formLayer.insertControlLine( "DatabaseTextField", "Description", "", 30 );
+
+ m_masterForm = (XPropertySet)dbfTools.getParent( controlModel, XPropertySet.class );
+ m_masterForm.setPropertyValue( "Command", "categories" );
+ m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
+
+ // create a detail form
+ m_detailForm = UnoRuntime.queryInterface( XPropertySet.class, subDocument.createSubForm( m_masterForm, "products" ) );
+ m_detailForm.setPropertyValue( "Command", "SELECT \"ID\", \"Name\", \"CategoryID\" FROM \"products\"" );
+ m_detailForm.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) );
+ m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID" } );
+ m_detailForm.setPropertyValue( "DetailFields", new String[] { "CategoryID" } );
+
+ // create a grid control in the detail form, with some columns
+ XPropertySet gridControlModel = formLayer.createControlAndShape( "GridControl", 20, 40, 130, 50, m_detailForm );
+ gridControlModel.setPropertyValue( "Name", "product list" );
+ XIndexContainer gridColumns = UnoRuntime.queryInterface( XIndexContainer.class, gridControlModel );
+ impl_createGridColumn( gridColumns, "TextField", "ID" );
+ XPropertySet nameColumn = impl_createGridColumn( gridColumns, "TextField", "Name" );
+ nameColumn.setPropertyValue( "Width", new Integer( 600 ) ); // 6 cm
+ nameColumn.setPropertyValue( "DefaultText", "default text" );
+
+ // go live
+ m_masterResult = new ResultSet( m_masterForm );
+ m_detailResult = new ResultSet( m_detailForm );
+
+ XLoadable loadDetail = UnoRuntime.queryInterface( XLoadable.class, m_detailForm );
+ loadDetail.addLoadListener( this );
+
+ subDocument.getCurrentView().toggleFormDesignMode();
+ impl_waitForLoadedEvent();
+
+ // now that we set up this, do the actual tests
+ // First, http://www.openoffice.org/issues/show_bug.cgi?id=105235 described the problem
+ // that default values in the sub form didn't work when the master form was navigated to a row
+ // for which no detail records were present, and the default of the column/control is the same
+ // as the last known value.
+
+ // so, take the current value of the "Name" column, and set it as default value ...
+ String defaultValue = m_detailResult.getString( 2 );
+ nameColumn.setPropertyValue( "DefaultText", defaultValue );
+ // ... then move to the second main form row ...
+ m_masterResult.absolute( 2 );
+ impl_waitForLoadedEvent();
+ // ... which should result in an empty sub form ...
+ assure( "test precondition not met: The second master form record is expected to have no detail records, " +
+ "else the test becomes meaningless", impl_isNewRecord( m_detailForm ) );
+ // ... and in the "Name" column having the proper text
+ String actualValue = (String)nameColumn.getPropertyValue( "Text" );
+ assureEquals( "#i105235#: default value in sub form not working (not propagated to column model)", defaultValue, actualValue );
+ // However, checking the column model's value alone is not enough - we need to ensure it is properly
+ // propagated to the control.
+ XGridFieldDataSupplier gridData = (XGridFieldDataSupplier)subDocument.getCurrentView().getControl(
+ gridControlModel, XGridFieldDataSupplier.class );
+ actualValue = (String)(gridData.queryFieldData( 0, Type.STRING )[1]);
+ assureEquals( "#i105235#: default value in sub form not working (not propagated to column)", defaultValue, actualValue );
+ }
+ finally
{
- verifyColumnValueIdentity( "ID1", "FK_ID1" );
- verifyColumnValueIdentity( "ID2", "FK_ID2" );
+ if ( subComponentCommands != null )
+ {
+ XComponentSupplier componentSupplier = UnoRuntime.queryInterface( XComponentSupplier.class, subComponentCommands );
+ XModifiable modifySubComponent = UnoRuntime.queryInterface( XModifiable.class, componentSupplier.getComponent() );
+ modifySubComponent.setModified( false );
+ Command command = new Command();
+ command.Name = "close";
+ subComponentCommands.execute( command, subComponentCommands.createCommandIdentifier(), null );
+ }
- m_detailSet.last();
- int masterPos = m_masterSet.getRow();
- assure( "wrong number of records in detail form, for master form at pos " + masterPos,
- ((Integer)m_detailForm.getPropertyValue( "RowCount" )).intValue() == expectedDetailRowCounts[ masterPos - 1 ] );
+ if ( database != null )
+ database.saveAndClose();
- operateMasterAndWaitForDetailForm( methodNext, m_masterSet, new Object[] {} );
+ impl_cleanUpStep();
}
- while ( !m_masterSet.isAfterLast() );
- assure( "wrong number of records in master form", 2 == ((Integer)m_masterForm.getPropertyValue( "RowCount" )).intValue() );
}
+ /* ------------------------------------------------------------------ */
+ private boolean impl_isNewRecord( final XPropertySet _rowSet )
+ {
+ boolean isNew = false;
+ try
+ {
+ isNew = ((Boolean)_rowSet.getPropertyValue( "IsNew" )).booleanValue();
+ }
+ catch ( Exception ex )
+ {
+ failed( "obtaining the IsNew property failed" );
+ }
+ return isNew;
+ }
+
+ /* ------------------------------------------------------------------ */
+ private XPropertySet impl_createGridColumn( final XIndexContainer _gridModel, final String _columnType, final String _boundField ) throws Exception
+ {
+ final XGridColumnFactory columnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, _gridModel );
+ XPropertySet column = columnFactory.createColumn( _columnType );
+ column.setPropertyValue( "DataField", _boundField );
+ column.setPropertyValue( "Name", _boundField );
+ column.setPropertyValue( "Label", _boundField );
+ _gridModel.insertByIndex( _gridModel.getCount(), column );
+ return column;
+ }
+
+ /* ------------------------------------------------------------------ */
/** executes an operation on the master, and waits until the detail form has been (re)loaded aferwards
*/
private void operateMasterAndWaitForDetailForm( Method _masterMethod, Object _masterInterface, Object[] _methodParameters ) throws SQLException
{
- m_loaded = false;
Object result;
try
{
@@ -205,28 +370,35 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
if ( !((Boolean)result).booleanValue() )
return;
+ impl_waitForLoadedEvent();
+ }
+
+ private void impl_waitForLoadedEvent()
+ {
synchronized( m_waitForLoad )
{
- if ( !m_loaded )
+ while ( !m_loaded )
{
try { m_waitForLoad.wait(); }
catch( java.lang.InterruptedException e ) { }
}
+ // reset the flag for the next time
+ m_loaded = false;
}
}
/** assures that the (integer) values in the given columns of our master and detail forms are identical
*/
- public void verifyColumnValueIdentity( String masterColName, String detailColName ) throws SQLException
+ private void verifyColumnValueIdentity( final String masterColName, final String detailColName ) throws SQLException
{
- XColumnLocate locateMasterCols = (XColumnLocate)UnoRuntime.queryInterface( XColumnLocate.class, m_masterForm );
- XColumnLocate locateDetailCols = (XColumnLocate)UnoRuntime.queryInterface( XColumnLocate.class, m_detailForm );
+ XColumnLocate locateMasterCols = UnoRuntime.queryInterface( XColumnLocate.class, m_masterForm );
+ XColumnLocate locateDetailCols = UnoRuntime.queryInterface( XColumnLocate.class, m_detailForm );
- int masterValue = m_masterRow.getInt( locateMasterCols.findColumn( masterColName ) );
- int detailValue = m_detailRow.getInt( locateDetailCols.findColumn( detailColName ) );
+ int masterValue = m_masterResult.getInt( locateMasterCols.findColumn( masterColName ) );
+ int detailValue = m_detailResult.getInt( locateDetailCols.findColumn( detailColName ) );
assure( "values in linked column pair " + detailColName + "->" + masterColName + " (" +
- detailValue + "->" + masterValue + ") do not match (master position: " + m_masterSet.getRow() + ")!",
+ detailValue + "->" + masterValue + ") do not match (master position: " + m_masterResult.getRow() + ")!",
masterValue == detailValue );
}
diff --git a/forms/qa/integration/forms/TestCase.java b/forms/qa/integration/forms/TestCase.java
index 1f019d6fa278..7ebcb56a54bd 100644
--- a/forms/qa/integration/forms/TestCase.java
+++ b/forms/qa/integration/forms/TestCase.java
@@ -30,11 +30,9 @@
package integration.forms;
-import com.sun.star.uno.*;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.util.XCloseable;
import com.sun.star.util.XModifiable;
-import integration.forms.DocumentType;
public abstract class TestCase extends complexlib.ComplexTestCase implements com.sun.star.lang.XEventListener
{
@@ -50,12 +48,23 @@ public abstract class TestCase extends complexlib.ComplexTestCase implements com
}
/* ------------------------------------------------------------------ */
+ public String getTestObjectName()
+ {
+ return this.getClass().getName();
+ }
+
+ /* ------------------------------------------------------------------ */
public void before() throws com.sun.star.uno.Exception, java.lang.Exception
{
m_orb = (XMultiServiceFactory)param.getMSF();
}
/* ------------------------------------------------------------------ */
+ public void after() throws com.sun.star.uno.Exception, java.lang.Exception
+ {
+ }
+
+ /* ------------------------------------------------------------------ */
/** closes our document, if we have an open one, via (simulated) user input
*/
protected void closeDocumentByUI()
diff --git a/forms/qa/integration/forms/dbfTools.java b/forms/qa/integration/forms/dbfTools.java
index 2f100a2c2128..8588cf8a0f55 100644
--- a/forms/qa/integration/forms/dbfTools.java
+++ b/forms/qa/integration/forms/dbfTools.java
@@ -24,7 +24,7 @@ class dbfTools
*/
static public XPropertySet queryPropertySet( Object aComp )
{
- return (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, aComp );
+ return UnoRuntime.queryInterface( XPropertySet.class, aComp );
}
/* ------------------------------------------------------------------ */
@@ -32,7 +32,7 @@ class dbfTools
*/
static public XIndexContainer queryIndexContainer( Object aComp )
{
- return (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, aComp );
+ return UnoRuntime.queryInterface( XIndexContainer.class, aComp );
}
/* ------------------------------------------------------------------ */
@@ -40,15 +40,16 @@ class dbfTools
*/
static public XComponent queryComponent( Object aComp )
{
- return (XComponent)UnoRuntime.queryInterface( XComponent.class, aComp );
+ return UnoRuntime.queryInterface( XComponent.class, aComp );
}
/* ------------------------------------------------------------------ */
/** retrieves the parent of the given object
*/
+ @SuppressWarnings("unchecked")
static Object getParent( Object aComponent, Class aInterfaceClass )
{
- XChild xAsChild = (XChild)UnoRuntime.queryInterface( XChild.class, aComponent );
+ XChild xAsChild = UnoRuntime.queryInterface( XChild.class, aComponent );
return UnoRuntime.queryInterface( aInterfaceClass, xAsChild.getParent() );
}
};
diff --git a/forms/qa/org/openoffice/complex/forms/tools/ResultSet.java b/forms/qa/org/openoffice/complex/forms/tools/ResultSet.java
new file mode 100644
index 000000000000..7763afe6b262
--- /dev/null
+++ b/forms/qa/org/openoffice/complex/forms/tools/ResultSet.java
@@ -0,0 +1,264 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.openoffice.complex.forms.tools;
+
+import com.sun.star.container.XNameAccess;
+import com.sun.star.io.XInputStream;
+import com.sun.star.sdbc.SQLException;
+import com.sun.star.sdbc.XArray;
+import com.sun.star.sdbc.XBlob;
+import com.sun.star.sdbc.XClob;
+import com.sun.star.sdbc.XRef;
+import com.sun.star.sdbc.XResultSet;
+import com.sun.star.sdbc.XRow;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.Date;
+import com.sun.star.util.DateTime;
+import com.sun.star.util.Time;
+
+/**
+ *
+ * @author frank.schoenheit@sun.com
+ */
+public class ResultSet implements XResultSet, XRow
+{
+ private final XResultSet m_resultSet;
+ private final XRow m_row;
+
+ public ResultSet( final Object _resultSet )
+ {
+ m_resultSet = (XResultSet)UnoRuntime.queryInterface( XResultSet.class, _resultSet );
+ m_row = (XRow)UnoRuntime.queryInterface( XRow.class, _resultSet );
+ }
+
+ public
+ boolean next() throws SQLException
+ {
+ return m_resultSet.next();
+ }
+
+ public
+ boolean isBeforeFirst() throws SQLException
+ {
+ return m_resultSet.isBeforeFirst();
+ }
+
+ public
+ boolean isAfterLast() throws SQLException
+ {
+ return m_resultSet.isAfterLast();
+ }
+
+ public
+ boolean isFirst() throws SQLException
+ {
+ return m_resultSet.isFirst();
+ }
+
+ public
+ boolean isLast() throws SQLException
+ {
+ return m_resultSet.isLast();
+ }
+
+ public
+ void beforeFirst() throws SQLException
+ {
+ m_resultSet.beforeFirst();
+ }
+
+ public
+ void afterLast() throws SQLException
+ {
+ m_resultSet.afterLast();
+ }
+
+ public
+ boolean first() throws SQLException
+ {
+ return m_resultSet.first();
+ }
+
+ public
+ boolean last() throws SQLException
+ {
+ return m_resultSet.last();
+ }
+
+ public
+ int getRow() throws SQLException
+ {
+ return m_resultSet.getRow();
+ }
+
+ public
+ boolean absolute( int _row ) throws SQLException
+ {
+ return m_resultSet.absolute( _row );
+ }
+
+ public
+ boolean relative( int _offset ) throws SQLException
+ {
+ return m_resultSet.relative( _offset );
+ }
+
+ public
+ boolean previous() throws SQLException
+ {
+ return m_resultSet.previous();
+ }
+
+ public
+ void refreshRow() throws SQLException
+ {
+ m_resultSet.refreshRow();
+ }
+
+ public
+ boolean rowUpdated() throws SQLException
+ {
+ return m_resultSet.rowUpdated();
+ }
+
+ public
+ boolean rowInserted() throws SQLException
+ {
+ return m_resultSet.rowInserted();
+ }
+
+ public
+ boolean rowDeleted() throws SQLException
+ {
+ return m_resultSet.rowDeleted();
+ }
+
+ public
+ Object getStatement() throws SQLException
+ {
+ return m_resultSet.getStatement();
+ }
+
+ public
+ boolean wasNull() throws SQLException
+ {
+ return m_row.wasNull();
+ }
+
+ public
+ String getString( int _colIndex ) throws SQLException
+ {
+ return m_row.getString( _colIndex );
+ }
+
+ public
+ boolean getBoolean( int _colIndex ) throws SQLException
+ {
+ return m_row.getBoolean( _colIndex );
+ }
+
+ public
+ byte getByte( int _colIndex ) throws SQLException
+ {
+ return m_row.getByte( _colIndex );
+ }
+
+ public
+ short getShort( int _colIndex ) throws SQLException
+ {
+ return m_row.getShort( _colIndex );
+ }
+
+ public
+ int getInt( int _colIndex ) throws SQLException
+ {
+ return m_row.getInt( _colIndex );
+ }
+
+ public
+ long getLong( int _colIndex ) throws SQLException
+ {
+ return m_row.getLong( _colIndex );
+ }
+
+ public
+ float getFloat( int _colIndex ) throws SQLException
+ {
+ return m_row.getFloat( _colIndex );
+ }
+
+ public
+ double getDouble( int _colIndex ) throws SQLException
+ {
+ return m_row.getDouble( _colIndex );
+ }
+
+ public
+ byte[] getBytes( int _colIndex ) throws SQLException
+ {
+ return m_row.getBytes( _colIndex );
+ }
+
+ public
+ Date getDate( int _colIndex ) throws SQLException
+ {
+ return m_row.getDate( _colIndex );
+ }
+
+ public
+ Time getTime( int _colIndex ) throws SQLException
+ {
+ return m_row.getTime( _colIndex );
+ }
+
+ public
+ DateTime getTimestamp( int _colIndex ) throws SQLException
+ {
+ return m_row.getTimestamp( _colIndex );
+ }
+
+ public
+ XInputStream getBinaryStream( int _colIndex ) throws SQLException
+ {
+ return m_row.getBinaryStream( _colIndex );
+ }
+
+ public
+ XInputStream getCharacterStream( int _colIndex ) throws SQLException
+ {
+ return m_row.getCharacterStream( _colIndex );
+ }
+
+ public
+ Object getObject( int _colIndex, XNameAccess _typeMap ) throws SQLException
+ {
+ return m_row.getObject( _colIndex, _typeMap );
+ }
+
+ public
+ XRef getRef( int _colIndex ) throws SQLException
+ {
+ return m_row.getRef( _colIndex );
+ }
+
+ public
+ XBlob getBlob( int _colIndex ) throws SQLException
+ {
+ return m_row.getBlob( _colIndex );
+ }
+
+ public
+ XClob getClob( int _colIndex ) throws SQLException
+ {
+ return m_row.getClob( _colIndex );
+ }
+
+ public
+ XArray getArray( int _colIndex ) throws SQLException
+ {
+ return m_row.getArray( _colIndex );
+ }
+}
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 8907dcd82712..575f842da4d0 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -509,7 +509,7 @@ IMPL_LINK( OButtonControl, OnClick, void*, EMPTYARG )
void OButtonControl::actionPerformed_Impl( sal_Bool _bNotifyListener, const ::com::sun::star::awt::MouseEvent& _rEvt )
{
{
- sal_Int32 nFeatureId = -1;
+ sal_Int16 nFeatureId = -1;
{
::osl::MutexGuard aGuard( m_aMutex );
nFeatureId = m_nTargetUrlFeatureId;
@@ -636,7 +636,7 @@ sal_Bool SAL_CALL OButtonControl::setModel( const Reference< XControlModel >& _r
//------------------------------------------------------------------------------
void OButtonControl::modelFeatureUrlPotentiallyChanged( )
{
- sal_Int32 nOldUrlFeatureId = m_nTargetUrlFeatureId;
+ sal_Int16 nOldUrlFeatureId = m_nTargetUrlFeatureId;
// doe we have another TargetURL now? If so, we need to update our dispatches
m_nTargetUrlFeatureId = getModelUrlFeatureId( );
@@ -675,9 +675,9 @@ namespace
}
//------------------------------------------------------------------------------
-sal_Int32 OButtonControl::getModelUrlFeatureId( ) const
+sal_Int16 OButtonControl::getModelUrlFeatureId( ) const
{
- sal_Int32 nFeatureId = -1;
+ sal_Int16 nFeatureId = -1;
// some URL related properties of the model
::rtl::OUString sUrl;
@@ -717,14 +717,14 @@ void SAL_CALL OButtonControl::setDesignMode( sal_Bool _bOn ) throw( RuntimeExcep
}
//------------------------------------------------------------------------------
-void OButtonControl::getSupportedFeatures( ::std::vector< sal_Int32 >& /* [out] */ _rFeatureIds )
+void OButtonControl::getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds )
{
if ( -1 != m_nTargetUrlFeatureId )
_rFeatureIds.push_back( m_nTargetUrlFeatureId );
}
//------------------------------------------------------------------
-void OButtonControl::featureStateChanged( sal_Int32 _nFeatureId, sal_Bool _bEnabled )
+void OButtonControl::featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled )
{
if ( _nFeatureId == m_nTargetUrlFeatureId )
{
@@ -754,7 +754,7 @@ void OButtonControl::allFeatureStatesChanged( )
}
//------------------------------------------------------------------
-bool OButtonControl::isEnabled( sal_Int32 _nFeatureId ) const
+bool OButtonControl::isEnabled( sal_Int16 _nFeatureId ) const
{
if ( const_cast< OButtonControl* >( this )->isDesignMode() )
// TODO: the model property?
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index 5bbb7f387f85..3ca5154a9279 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -131,7 +131,7 @@ class OButtonControl :public OButtonControl_BASE
{
private:
sal_uInt32 m_nClickEvent;
- sal_Int32 m_nTargetUrlFeatureId;
+ sal_Int16 m_nTargetUrlFeatureId;
/// caches the value of the "Enabled" property of our model
sal_Bool m_bEnabledByPropertyValue;
@@ -176,10 +176,10 @@ public:
protected:
// OFormNavigationHelper overriables
- virtual void getSupportedFeatures( ::std::vector< sal_Int32 >& /* [out] */ _rFeatureIds );
- virtual void featureStateChanged( sal_Int32 _nFeatureId, sal_Bool _bEnabled );
+ virtual void getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds );
+ virtual void featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled );
virtual void allFeatureStatesChanged( );
- virtual bool isEnabled( sal_Int32 _nFeatureId ) const;
+ virtual bool isEnabled( sal_Int16 _nFeatureId ) const;
// XDispatchProviderInterception disambiguaiton
virtual void SAL_CALL registerDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
@@ -198,7 +198,7 @@ private:
/** retrieves the feature id (see OFormNavigationHelper) of the TargetURL of
the model.
*/
- sal_Int32 getModelUrlFeatureId( ) const;
+ sal_Int16 getModelUrlFeatureId( ) const;
/** starts or stops listening for changes in model properties we're interested in
*/
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index c307783f179b..29d6f1130509 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -342,7 +342,7 @@ void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, sal_B
aForbiddenProperties.insert( PROPERTY_VSCROLL );
aForbiddenProperties.insert( PROPERTY_CONTROLLABEL );
aForbiddenProperties.insert( PROPERTY_RICH_TEXT );
- aForbiddenProperties.insert( PROPERTY_VERTICALALIGN );
+ aForbiddenProperties.insert( PROPERTY_VERTICAL_ALIGN );
aForbiddenProperties.insert( PROPERTY_IMAGE_URL );
aForbiddenProperties.insert( PROPERTY_IMAGE_POSITION );
aForbiddenProperties.insert( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ) );
@@ -416,14 +416,14 @@ sal_Bool OGridColumn::convertFastPropertyValue( Any& rConvertedValue, Any& rOldV
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aWidth, ::getCppuType((const sal_Int32*)NULL));
break;
case PROPERTY_ID_ALIGN:
- try
+ bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aAlign, ::getCppuType( (const sal_Int32*)NULL ) );
+ // strange enough, css.awt.TextAlign is a 32-bit integer, while the Align property (both here for grid controls
+ // and for ordinary toolkit controls) is a 16-bit integer. So, allow for 32 bit, but normalize it to 16 bit
+ if ( bModified )
{
- bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aAlign, ::getCppuType((const sal_Int16*)NULL));
- }
- catch(starlang::IllegalArgumentException&)
- {
- OSL_ENSURE(0,"OGridColumn::convertFastPropertyValue: TextAlign must be casted to sal_Int16!");
- throw;
+ sal_Int32 nAlign( 0 );
+ if ( rConvertedValue >>= nAlign )
+ rConvertedValue <<= (sal_Int16)nAlign;
}
break;
case PROPERTY_ID_HIDDEN:
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 081b971fcceb..54225d6095a6 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -31,72 +31,71 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_forms.hxx"
-#include "componenttools.hxx"
-#include "DatabaseForm.hxx"
-#include "EventThread.hxx"
-#include "frm_module.hxx"
-#include "frm_resource.hrc"
-#include "frm_resource.hxx"
-#include "GroupManager.hxx"
-#include "property.hrc"
-#include "property.hxx"
-#include "services.hxx"
-
-#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/awt/XTextComponent.hpp>
-#include <com/sun/star/form/DataSelectionType.hpp>
-#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/form/TabulatorCycle.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#include <com/sun/star/sdb/CommandType.hpp>
-#include <com/sun/star/sdb/RowSetVetoException.hpp>
-#include <com/sun/star/sdb/SQLContext.hpp>
-#include <com/sun/star/sdb/XColumnUpdate.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
-#include <com/sun/star/sdbc/ResultSetType.hpp>
-#include <com/sun/star/sdbc/XRowSet.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
+#include "componenttools.hxx"
+#include "DatabaseForm.hxx"
+#include "EventThread.hxx"
+#include "frm_module.hxx"
+#include "frm_resource.hrc"
+#include "frm_resource.hxx"
+#include "GroupManager.hxx"
+#include "property.hrc"
+#include "property.hxx"
+#include "services.hxx"
+
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/form/DataSelectionType.hpp>
+#include <com/sun/star/form/FormComponentType.hpp>
+#include <com/sun/star/form/TabulatorCycle.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdb/RowSetVetoException.hpp>
+#include <com/sun/star/sdb/SQLContext.hpp>
+#include <com/sun/star/sdb/XColumnUpdate.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
+#include <com/sun/star/sdbc/ResultSetType.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/sdbcx/Privilege.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/util/XCancellable.hpp>
+#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/util/XModifiable2.hpp>
-
-#include <comphelper/basicio.hxx>
-#include <comphelper/container.hxx>
-#include <comphelper/enumhelper.hxx>
-#include <comphelper/extract.hxx>
-#include <comphelper/seqstream.hxx>
-#include <comphelper/sequence.hxx>
-#include <comphelper/stl_types.hxx>
-#include <comphelper/uno3.hxx>
-#include <connectivity/dbtools.hxx>
-#include <cppuhelper/exc_hlp.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <osl/mutex.hxx>
-#include <rtl/math.hxx>
-#include <rtl/tencinfo.h>
-#include <svl/inetstrm.hxx>
-#include <svl/inettype.hxx>
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <tools/fsys.hxx>
-#include <tools/inetmsg.hxx>
-#include <tools/urlobj.hxx>
-#include <unotools/ucblockbytes.hxx>
-#include <unotools/ucbstreamhelper.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/timer.hxx>
-#include <vos/mutex.hxx>
-
-#include <ctype.h>
-#include <hash_map>
-//#include <stdio.h>
+
+#include <comphelper/basicio.hxx>
+#include <comphelper/container.hxx>
+#include <comphelper/enumhelper.hxx>
+#include <comphelper/extract.hxx>
+#include <comphelper/seqstream.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/stl_types.hxx>
+#include <comphelper/uno3.hxx>
+#include <connectivity/dbtools.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <osl/mutex.hxx>
+#include <rtl/math.hxx>
+#include <rtl/tencinfo.h>
+#include <svl/inetstrm.hxx>
+#include <svl/inettype.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/fsys.hxx>
+#include <tools/inetmsg.hxx>
+#include <tools/urlobj.hxx>
+#include <unotools/ucblockbytes.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/timer.hxx>
+#include <vos/mutex.hxx>
+
+#include <ctype.h>
+#include <hash_map>
// compatiblity: DatabaseCursorType is dead, but for compatiblity reasons we still have to write it ...
namespace com {
@@ -2629,16 +2628,15 @@ void ODatabaseForm::impl_createLoadTimer()
//------------------------------------------------------------------------------
void SAL_CALL ODatabaseForm::loaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
- // now start the rowset listening to recover cursor events
- load_impl(sal_True);
{
- ::osl::MutexGuard aGuard(m_aMutex);
- Reference<XRowSet> xParentRowSet(m_xParent, UNO_QUERY);
- if (xParentRowSet.is())
- xParentRowSet->addRowSetListener(this);
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
+ xParentRowSet->addRowSetListener( this );
impl_createLoadTimer();
}
+
+ load_impl( sal_True );
}
//------------------------------------------------------------------------------
@@ -2646,12 +2644,14 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/) throw( Run
{
{
// now stop the rowset listening if we are a subform
- ::osl::MutexGuard aGuard(m_aMutex);
- DELETEZ(m_pLoadTimer);
+ ::osl::MutexGuard aGuard( m_aMutex );
- Reference<XRowSet> xParentRowSet(m_xParent, UNO_QUERY);
- if (xParentRowSet.is())
- xParentRowSet->removeRowSetListener(this);
+ if ( m_pLoadTimer && m_pLoadTimer->IsActive() )
+ m_pLoadTimer->Stop();
+ DELETEZ( m_pLoadTimer );
+
+ Reference< XRowSet > xParentRowSet( m_xParent, UNO_QUERY_THROW );
+ xParentRowSet->removeRowSetListener( this );
}
unload();
@@ -2879,7 +2879,7 @@ sal_Bool ODatabaseForm::implEnsureConnection()
}
catch( Exception )
{
- DBG_ERROR( "ODatabaseForm::implEnsureConnection: caught an exception which I cannot handle!" );
+ DBG_UNHANDLED_EXCEPTION();
}
return sal_False;
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 2e46fa0c00f3..4a612642bbff 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2216,7 +2216,7 @@ sal_Bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType)
|| (_nColumnType == DataType::LONGVARBINARY) || (_nColumnType == DataType::OTHER)
|| (_nColumnType == DataType::OBJECT) || (_nColumnType == DataType::DISTINCT)
|| (_nColumnType == DataType::STRUCT) || (_nColumnType == DataType::ARRAY)
- || (_nColumnType == DataType::BLOB) || (_nColumnType == DataType::CLOB)
+ || (_nColumnType == DataType::BLOB) /*|| (_nColumnType == DataType::CLOB)*/
|| (_nColumnType == DataType::REF) || (_nColumnType == DataType::SQLNULL))
return sal_False;
@@ -2551,10 +2551,11 @@ void OBoundControlModel::reset() throw (RuntimeException)
|| ( nFieldType == DataType::VARBINARY )
|| ( nFieldType == DataType::LONGVARBINARY )
|| ( nFieldType == DataType::OBJECT )
- || ( nFieldType == DataType::BLOB )
- || ( nFieldType == DataType::CLOB )
+ /*|| ( nFieldType == DataType::CLOB )*/
)
m_xColumn->getBinaryStream();
+ else if ( nFieldType == DataType::BLOB )
+ m_xColumn->getBlob();
else
m_xColumn->getString();
@@ -2803,7 +2804,14 @@ void SAL_CALL OBoundControlModel::modified( const EventObject& _rEvent ) throw (
//--------------------------------------------------------------------
void OBoundControlModel::transferDbValueToControl( )
{
- setControlValue( translateDbColumnToControlValue(), eDbColumnBinding );
+ try
+ {
+ setControlValue( translateDbColumnToControlValue(), eDbColumnBinding );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 47391b390958..fbcc59271e00 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -115,6 +115,7 @@ namespace
|| ( _nFieldType == DataType::OBJECT )
|| ( _nFieldType == DataType::BLOB )
|| ( _nFieldType == DataType::LONGVARCHAR )
+ || ( _nFieldType == DataType::CLOB )
)
return ImageStoreBinary;
diff --git a/forms/source/cppugen/makefile.mk b/forms/source/cppugen/makefile.mk
deleted file mode 100644
index aa65a7122a33..000000000000
--- a/forms/source/cppugen/makefile.mk
+++ /dev/null
@@ -1,68 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJINC=$(PRJ)$/source$/inc
-PRJNAME=forms
-TARGET=fm_cppugen
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE: $(PRJ)$/makefile.pmk
-
-# --- Types -------------------------------------
-
-
-
-# --- Types -------------------------------------
-
-UNOTYPES+= \
- com.sun.star.form.binding.XBindableValue \
- com.sun.star.form.binding.XValueBinding \
- com.sun.star.form.binding.XListEntrySink \
- com.sun.star.form.binding.XListEntrySource \
- com.sun.star.form.binding.XListEntryListener \
- com.sun.star.form.validation.XValidator \
- com.sun.star.form.validation.XValidatable \
- com.sun.star.form.validation.XValidityConstraintListener \
- com.sun.star.form.validation.XValidatableFormComponent \
- com.sun.star.form.submission.XSubmissionSupplier \
- com.sun.star.xforms.XModel \
- com.sun.star.xforms.XFormsSupplier \
- com.sun.star.xforms.XSubmission \
- com.sun.star.xsd.WhiteSpaceTreatment \
- com.sun.star.xsd.XDataType \
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/forms/source/helper/commanddescriptionprovider.cxx b/forms/source/helper/commanddescriptionprovider.cxx
new file mode 100644
index 000000000000..87692c5b5b82
--- /dev/null
+++ b/forms/source/helper/commanddescriptionprovider.cxx
@@ -0,0 +1,139 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_forms.hxx"
+
+#include "commanddescriptionprovider.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/namedvaluecollection.hxx>
+#include <tools/diagnose_ex.h>
+
+//........................................................................
+namespace frm
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::frame::XModel;
+ using ::com::sun::star::container::XNameAccess;
+ using ::com::sun::star::frame::XModuleManager;
+ using ::com::sun::star::beans::PropertyValue;
+ /** === end UNO using === **/
+
+ //====================================================================
+ //= DefaultCommandDescriptionProvider
+ //====================================================================
+ class DefaultCommandDescriptionProvider : public ICommandDescriptionProvider
+ {
+ public:
+ DefaultCommandDescriptionProvider( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
+ {
+ impl_init_nothrow( _rContext, _rxDocument );
+ }
+
+ ~DefaultCommandDescriptionProvider()
+ {
+ }
+
+ // ICommandDescriptionProvider
+ virtual ::rtl::OUString getCommandDescription( const ::rtl::OUString& _rCommandURL ) const;
+
+ private:
+ void impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument );
+
+ private:
+ Reference< XNameAccess > m_xCommandAccess;
+ };
+
+
+ //--------------------------------------------------------------------
+ void DefaultCommandDescriptionProvider::impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
+ {
+ OSL_ENSURE( _rxDocument.is(), "DefaultCommandDescriptionProvider::impl_init_nothrow: no document => no command descriptions!" );
+ if ( !_rxDocument.is() )
+ return;
+
+ try
+ {
+ Reference< XModuleManager > xModuleManager( _rContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+ ::rtl::OUString sModuleID = xModuleManager->identify( _rxDocument );
+
+ Reference< XNameAccess > xUICommandDescriptions( _rContext.createComponent( "com.sun.star.frame.UICommandDescription" ), UNO_QUERY_THROW );
+ m_xCommandAccess.set( xUICommandDescriptions->getByName( sModuleID ), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString DefaultCommandDescriptionProvider::getCommandDescription( const ::rtl::OUString& _rCommandURL ) const
+ {
+ if ( !m_xCommandAccess.is() )
+ return ::rtl::OUString();
+
+ try
+ {
+ ::comphelper::NamedValueCollection aCommandProperties( m_xCommandAccess->getByName( _rCommandURL ) );
+ return aCommandProperties.getOrDefault( "Name", ::rtl::OUString() );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return ::rtl::OUString();
+ }
+
+ //--------------------------------------------------------------------
+ PCommandDescriptionProvider createDocumentCommandDescriptionProvider(
+ const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
+ {
+ PCommandDescriptionProvider pDescriptionProvider( new DefaultCommandDescriptionProvider( _rContext, _rxDocument ) );
+ return pDescriptionProvider;
+ }
+
+//........................................................................
+} // namespace frm
+//........................................................................
diff --git a/forms/source/helper/commandimageprovider.cxx b/forms/source/helper/commandimageprovider.cxx
new file mode 100644
index 000000000000..7240a7073943
--- /dev/null
+++ b/forms/source/helper/commandimageprovider.cxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_forms.hxx"
+
+#include "commandimageprovider.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/XImageManager.hpp>
+#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/ui/ImageType.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+
+//........................................................................
+namespace frm
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::frame::XModel;
+ using ::com::sun::star::ui::XImageManager;
+ using ::com::sun::star::ui::XUIConfigurationManagerSupplier;
+ using ::com::sun::star::ui::XUIConfigurationManager;
+ using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
+ using ::com::sun::star::frame::XModuleManager;
+ using ::com::sun::star::graphic::XGraphic;
+ /** === end UNO using === **/
+ namespace ImageType = ::com::sun::star::ui::ImageType;
+
+ //====================================================================
+ //= DocumentCommandImageProvider
+ //====================================================================
+ class DocumentCommandImageProvider : public ICommandImageProvider
+ {
+ public:
+ DocumentCommandImageProvider( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
+ {
+ impl_init_nothrow( _rContext, _rxDocument );
+ }
+ virtual ~DocumentCommandImageProvider()
+ {
+ }
+
+ // ICommandImageProvider
+ virtual CommandImages getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge, const bool _bHiContrast ) const;
+
+ private:
+ void impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument );
+
+ private:
+ Reference< XImageManager > m_xDocumentImageManager;
+ Reference< XImageManager > m_xModuleImageManager;
+ };
+
+ //--------------------------------------------------------------------
+ void DocumentCommandImageProvider::impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
+ {
+ OSL_ENSURE( _rxDocument.is(), "DocumentCommandImageProvider::impl_init_nothrow: no document => no images!" );
+ if ( !_rxDocument.is() )
+ return;
+
+ // obtain the image manager of the document
+ try
+ {
+ Reference< XUIConfigurationManagerSupplier > xSuppUIConfig( _rxDocument, UNO_QUERY_THROW );
+ Reference< XUIConfigurationManager > xUIConfig( xSuppUIConfig->getUIConfigurationManager(), UNO_QUERY );
+ m_xDocumentImageManager.set( xUIConfig->getImageManager(), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ // obtain the image manager or the module
+ try
+ {
+ Reference< XModuleManager > xModuleManager( _rContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW );
+ ::rtl::OUString sModuleID = xModuleManager->identify( _rxDocument );
+
+ Reference< XModuleUIConfigurationManagerSupplier > xSuppUIConfig(
+ _rContext.createComponent( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ), UNO_QUERY_THROW );
+ Reference< XUIConfigurationManager > xUIConfig(
+ xSuppUIConfig->getUIConfigurationManager( sModuleID ), UNO_SET_THROW );
+ m_xModuleImageManager.set( xUIConfig->getImageManager(), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ CommandImages DocumentCommandImageProvider::getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge, const bool _bHiContrast ) const
+ {
+ const size_t nCommandCount = _rCommandURLs.getLength();
+ CommandImages aImages( nCommandCount );
+ try
+ {
+ const sal_Int16 nImageType =
+ ( _bLarge ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT )
+ + ( _bHiContrast ? ImageType::COLOR_HIGHCONTRAST : ImageType::COLOR_NORMAL );
+
+ Sequence< Reference< XGraphic > > aDocImages( nCommandCount );
+ Sequence< Reference< XGraphic > > aModImages( nCommandCount );
+
+ // first try the document image manager
+ if ( m_xDocumentImageManager.is() )
+ aDocImages = m_xDocumentImageManager->getImages( nImageType, _rCommandURLs );
+
+ // then the module's image manager
+ if ( m_xModuleImageManager.is() )
+ aModImages = m_xModuleImageManager->getImages( nImageType, _rCommandURLs );
+
+ ENSURE_OR_THROW( (size_t)aDocImages.getLength() == nCommandCount, "illegal array size returned by getImages (document image manager)" );
+ ENSURE_OR_THROW( (size_t)aModImages.getLength() == nCommandCount, "illegal array size returned by getImages (module image manager)" );
+
+ for ( size_t i=0; i<nCommandCount; ++i )
+ {
+ if ( aDocImages[i].is() )
+ aImages[i] = Image( aDocImages[i] );
+ else
+ aImages[i] = Image( aModImages[i] );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return aImages;
+ }
+
+ //--------------------------------------------------------------------
+ PCommandImageProvider createDocumentCommandImageProvider(
+ const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
+ {
+ PCommandImageProvider pImageProvider( new DocumentCommandImageProvider( _rContext, _rxDocument ) );
+ return pImageProvider;
+ }
+
+//........................................................................
+} // namespace frm
+//........................................................................
diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx
index 895b48a563f8..8f3d14df4657 100644
--- a/forms/source/helper/formnavigation.cxx
+++ b/forms/source/helper/formnavigation.cxx
@@ -33,12 +33,13 @@
#include "formnavigation.hxx"
#include "urltransformer.hxx"
#include "controlfeatureinterception.hxx"
-#include <tools/debug.hxx>
-#ifndef _SVX_SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
#include "frm_strings.hxx"
+#include <com/sun/star/form/runtime/FormFeature.hpp>
+
+#include <tools/debug.hxx>
+
+
//.........................................................................
namespace frm
{
@@ -49,6 +50,7 @@ namespace frm
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::frame;
+ namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
//==================================================================
//= OFormNavigationHelper
@@ -83,7 +85,7 @@ namespace frm
}
//------------------------------------------------------------------
- void OFormNavigationHelper::featureStateChanged( sal_Int32 /*_nFeatureId*/, sal_Bool /*_bEnabled*/ )
+ void OFormNavigationHelper::featureStateChanged( sal_Int16 /*_nFeatureId*/, sal_Bool /*_bEnabled*/ )
{
// not interested in
}
@@ -270,12 +272,12 @@ namespace frm
if ( m_aSupportedFeatures.empty() )
{
// ask the derivee which feature ids it wants us to support
- ::std::vector< sal_Int32 > aFeatureIds;
+ ::std::vector< sal_Int16 > aFeatureIds;
getSupportedFeatures( aFeatureIds );
OFormNavigationMapper aUrlMapper( m_xORB );
- for ( ::std::vector< sal_Int32 >::const_iterator aLoop = aFeatureIds.begin();
+ for ( ::std::vector< sal_Int16 >::const_iterator aLoop = aFeatureIds.begin();
aLoop != aFeatureIds.end();
++aLoop
)
@@ -300,7 +302,7 @@ namespace frm
}
//------------------------------------------------------------------
- void OFormNavigationHelper::dispatchWithArgument( sal_Int32 _nFeatureId, const sal_Char* _pParamAsciiName,
+ void OFormNavigationHelper::dispatchWithArgument( sal_Int16 _nFeatureId, const sal_Char* _pParamAsciiName,
const Any& _rParamValue ) const
{
FeatureMap::const_iterator aInfo = m_aSupportedFeatures.find( _nFeatureId );
@@ -318,7 +320,7 @@ namespace frm
}
//------------------------------------------------------------------
- void OFormNavigationHelper::dispatch( sal_Int32 _nFeatureId ) const
+ void OFormNavigationHelper::dispatch( sal_Int16 _nFeatureId ) const
{
FeatureMap::const_iterator aInfo = m_aSupportedFeatures.find( _nFeatureId );
if ( m_aSupportedFeatures.end() != aInfo )
@@ -332,7 +334,7 @@ namespace frm
}
//------------------------------------------------------------------
- bool OFormNavigationHelper::isEnabled( sal_Int32 _nFeatureId ) const
+ bool OFormNavigationHelper::isEnabled( sal_Int16 _nFeatureId ) const
{
FeatureMap::const_iterator aInfo = m_aSupportedFeatures.find( _nFeatureId );
if ( m_aSupportedFeatures.end() != aInfo )
@@ -342,7 +344,7 @@ namespace frm
}
//------------------------------------------------------------------
- bool OFormNavigationHelper::getBooleanState( sal_Int32 _nFeatureId ) const
+ bool OFormNavigationHelper::getBooleanState( sal_Int16 _nFeatureId ) const
{
sal_Bool bState = sal_False;
@@ -354,7 +356,7 @@ namespace frm
}
//------------------------------------------------------------------
- ::rtl::OUString OFormNavigationHelper::getStringState( sal_Int32 _nFeatureId ) const
+ ::rtl::OUString OFormNavigationHelper::getStringState( sal_Int16 _nFeatureId ) const
{
::rtl::OUString sState;
@@ -366,7 +368,7 @@ namespace frm
}
//------------------------------------------------------------------
- sal_Int32 OFormNavigationHelper::getIntegerState( sal_Int32 _nFeatureId ) const
+ sal_Int32 OFormNavigationHelper::getIntegerState( sal_Int16 _nFeatureId ) const
{
sal_Int32 nState = 0;
@@ -382,7 +384,7 @@ namespace frm
{
disconnectDispatchers( );
// no supported features anymore:
- FeatureMap aEmpty;
+ FeatureMap aEmpty;
m_aSupportedFeatures.swap( aEmpty );
}
@@ -401,7 +403,7 @@ namespace frm
}
//------------------------------------------------------------------
- bool OFormNavigationMapper::getFeatureURL( sal_Int32 _nFeatureId, URL& /* [out] */ _rURL )
+ bool OFormNavigationMapper::getFeatureURL( sal_Int16 _nFeatureId, URL& /* [out] */ _rURL )
{
// get the ascii version of the URL
const char* pAsciiURL = getFeatureURLAscii( _nFeatureId );
@@ -412,84 +414,72 @@ namespace frm
}
//------------------------------------------------------------------
- const char* OFormNavigationMapper::getFeatureURLAscii( sal_Int32 _nFeatureId )
+ namespace
{
- const char* pAsciiURL = NULL;
-
- switch ( _nFeatureId )
+ struct FeatureURL
{
- case SID_FM_RECORD_ABSOLUTE : pAsciiURL = URL_FORM_POSITION; break;
- case SID_FM_RECORD_TOTAL : pAsciiURL = URL_FORM_RECORDCOUNT; break;
- case SID_FM_RECORD_FIRST : pAsciiURL = URL_RECORD_FIRST; break;
- case SID_FM_RECORD_PREV : pAsciiURL = URL_RECORD_PREV; break;
- case SID_FM_RECORD_NEXT : pAsciiURL = URL_RECORD_NEXT; break;
- case SID_FM_RECORD_LAST : pAsciiURL = URL_RECORD_LAST; break;
- case SID_FM_RECORD_SAVE : pAsciiURL = URL_RECORD_SAVE; break;
- case SID_FM_RECORD_UNDO : pAsciiURL = URL_RECORD_UNDO; break;
- case SID_FM_RECORD_NEW : pAsciiURL = URL_RECORD_NEW; break;
- case SID_FM_RECORD_DELETE : pAsciiURL = URL_RECORD_DELETE; break;
- case SID_FM_REFRESH : pAsciiURL = URL_FORM_REFRESH; break;
- case SID_FM_REFRESH_FORM_CONTROL: pAsciiURL = URL_FORM_REFRESH_CURRENT_CONTROL; break;
-
- case SID_FM_SORTUP : pAsciiURL = URL_FORM_SORT_UP; break;
- case SID_FM_SORTDOWN : pAsciiURL = URL_FORM_SORT_DOWN; break;
- case SID_FM_ORDERCRIT : pAsciiURL = URL_FORM_SORT; break;
- case SID_FM_AUTOFILTER : pAsciiURL = URL_FORM_AUTO_FILTER; break;
- case SID_FM_FILTERCRIT : pAsciiURL = URL_FORM_FILTER; break;
- case SID_FM_FORM_FILTERED : pAsciiURL = URL_FORM_APPLY_FILTER; break;
- case SID_FM_REMOVE_FILTER_SORT : pAsciiURL = URL_FORM_REMOVE_FILTER; break;
+ const sal_Int16 nFormFeature;
+ const sal_Char* pAsciiURL;
+
+ FeatureURL( const sal_Int16 _nFormFeature, const sal_Char* _pAsciiURL )
+ :nFormFeature( _nFormFeature )
+ ,pAsciiURL( _pAsciiURL )
+ {
+ }
};
- return pAsciiURL;
+ const FeatureURL* lcl_getFeatureTable()
+ {
+ static const FeatureURL s_aFeatureURLs[] =
+ {
+ FeatureURL( FormFeature::MoveAbsolute, URL_FORM_POSITION ),
+ FeatureURL( FormFeature::TotalRecords, URL_FORM_RECORDCOUNT ),
+ FeatureURL( FormFeature::MoveToFirst, URL_RECORD_FIRST ),
+ FeatureURL( FormFeature::MoveToPrevious, URL_RECORD_PREV ),
+ FeatureURL( FormFeature::MoveToNext, URL_RECORD_NEXT ),
+ FeatureURL( FormFeature::MoveToLast, URL_RECORD_LAST ),
+ FeatureURL( FormFeature::SaveRecordChanges, URL_RECORD_SAVE ),
+ FeatureURL( FormFeature::UndoRecordChanges, URL_RECORD_UNDO ),
+ FeatureURL( FormFeature::MoveToInsertRow, URL_RECORD_NEW ),
+ FeatureURL( FormFeature::DeleteRecord, URL_RECORD_DELETE ),
+ FeatureURL( FormFeature::ReloadForm, URL_FORM_REFRESH ),
+ FeatureURL( FormFeature::RefreshCurrentControl, URL_FORM_REFRESH_CURRENT_CONTROL ),
+ FeatureURL( FormFeature::SortAscending, URL_FORM_SORT_UP ),
+ FeatureURL( FormFeature::SortDescending, URL_FORM_SORT_DOWN ),
+ FeatureURL( FormFeature::InteractiveSort, URL_FORM_SORT ),
+ FeatureURL( FormFeature::AutoFilter, URL_FORM_AUTO_FILTER ),
+ FeatureURL( FormFeature::InteractiveFilter, URL_FORM_FILTER ),
+ FeatureURL( FormFeature::ToggleApplyFilter, URL_FORM_APPLY_FILTER ),
+ FeatureURL( FormFeature::RemoveFilterAndSort, URL_FORM_REMOVE_FILTER ),
+ FeatureURL( 0, NULL )
+ };
+ return s_aFeatureURLs;
+ }
+ }
+
+ //------------------------------------------------------------------
+ const char* OFormNavigationMapper::getFeatureURLAscii( sal_Int16 _nFeatureId )
+ {
+ const FeatureURL* pFeatures = lcl_getFeatureTable();
+ while ( pFeatures->pAsciiURL )
+ {
+ if ( pFeatures->nFormFeature == _nFeatureId )
+ return pFeatures->pAsciiURL;
+ ++pFeatures;
+ }
+ return NULL;
}
//------------------------------------------------------------------
- sal_Int32 OFormNavigationMapper::getFeatureId( const ::rtl::OUString& _rCompleteURL )
+ sal_Int16 OFormNavigationMapper::getFeatureId( const ::rtl::OUString& _rCompleteURL )
{
- sal_Int32 nFeatureId = -1;
-
- if ( _rCompleteURL == URL_FORM_POSITION )
- nFeatureId = SID_FM_RECORD_ABSOLUTE;
- else if ( _rCompleteURL == URL_FORM_RECORDCOUNT )
- nFeatureId = SID_FM_RECORD_TOTAL;
- else if ( _rCompleteURL == URL_RECORD_FIRST )
- nFeatureId = SID_FM_RECORD_FIRST;
- else if ( _rCompleteURL == URL_RECORD_PREV )
- nFeatureId = SID_FM_RECORD_PREV;
- else if ( _rCompleteURL == URL_RECORD_NEXT )
- nFeatureId = SID_FM_RECORD_NEXT;
- else if ( _rCompleteURL == URL_RECORD_LAST )
- nFeatureId = SID_FM_RECORD_LAST;
- else if ( _rCompleteURL == URL_RECORD_SAVE )
- nFeatureId = SID_FM_RECORD_SAVE;
- else if ( _rCompleteURL == URL_RECORD_UNDO )
- nFeatureId = SID_FM_RECORD_UNDO;
- else if ( _rCompleteURL == URL_RECORD_NEW )
- nFeatureId = SID_FM_RECORD_NEW;
- else if ( _rCompleteURL == URL_RECORD_DELETE )
- nFeatureId = SID_FM_RECORD_DELETE;
- else if ( _rCompleteURL == URL_FORM_REFRESH )
- nFeatureId = SID_FM_REFRESH;
- else if ( _rCompleteURL == URL_FORM_REFRESH_CURRENT_CONTROL )
- nFeatureId = SID_FM_REFRESH_FORM_CONTROL;
- else if ( _rCompleteURL == URL_FORM_SORT_UP )
- nFeatureId = SID_FM_SORTUP;
- else if ( _rCompleteURL == URL_FORM_SORT_DOWN )
- nFeatureId = SID_FM_SORTDOWN;
- else if ( _rCompleteURL == URL_FORM_SORT )
- nFeatureId = SID_FM_ORDERCRIT;
- else if ( _rCompleteURL == URL_FORM_AUTO_FILTER )
- nFeatureId = SID_FM_AUTOFILTER;
- else if ( _rCompleteURL == URL_FORM_FILTER )
- nFeatureId = SID_FM_FILTERCRIT;
- else if ( _rCompleteURL == URL_FORM_APPLY_FILTER )
- nFeatureId = SID_FM_FORM_FILTERED;
- else if ( _rCompleteURL == URL_FORM_REMOVE_FILTER )
- nFeatureId = SID_FM_REMOVE_FILTER_SORT;
-
- DBG_ASSERT( ( -1 == nFeatureId ) || _rCompleteURL.equalsAscii( getFeatureURLAscii( nFeatureId ) ),
- "OFormNavigationMapper::getFeatureId: inconsistent maps!" );
-
- return nFeatureId;
+ const FeatureURL* pFeatures = lcl_getFeatureTable();
+ while ( pFeatures->pAsciiURL )
+ {
+ if ( _rCompleteURL.compareToAscii( pFeatures->pAsciiURL ) == 0 )
+ return pFeatures->nFormFeature;
+ ++pFeatures;
+ }
+ return -1;
}
//.........................................................................
diff --git a/forms/source/helper/makefile.mk b/forms/source/helper/makefile.mk
index 5739d1fcb6d0..e451048dd0de 100644
--- a/forms/source/helper/makefile.mk
+++ b/forms/source/helper/makefile.mk
@@ -53,6 +53,8 @@ SLOFILES= $(SLO)$/formnavigation.obj \
$(SLO)$/urltransformer.obj \
$(SLO)$/windowstateguard.obj \
$(SLO)$/resettable.obj \
+ $(SLO)$/commandimageprovider.obj \
+ $(SLO)$/commanddescriptionprovider.obj \
# --- Targets ----------------------------------
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index 05c8ad587902..2cc91945ae3d 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -31,61 +31,61 @@
#ifndef _FORMS_FORMCOMPONENT_HXX_
#define _FORMS_FORMCOMPONENT_HXX_
-#include "cloneable.hxx"
-#include "ids.hxx"
-#include "property.hrc"
-#include "property.hxx"
-#include "propertybaghelper.hxx"
+#include "cloneable.hxx"
+#include "ids.hxx"
+#include "property.hrc"
+#include "property.hxx"
+#include "propertybaghelper.hxx"
#include "resettable.hxx"
-#include "services.hxx"
-#include "windowstateguard.hxx"
-
-/** === begin UNO includes === **/
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/beans/XPropertyAccess.hpp>
-#include <com/sun/star/beans/XPropertyContainer.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/form/binding/XBindableValue.hpp>
-#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/form/validation/XValidatableFormComponent.hpp>
-#include <com/sun/star/form/validation/XValidityConstraintListener.hpp>
-#include <com/sun/star/form/XBoundComponent.hpp>
-#include <com/sun/star/form/XBoundControl.hpp>
-#include <com/sun/star/form/XFormComponent.hpp>
-#include <com/sun/star/form/XLoadListener.hpp>
-#include <com/sun/star/form/XReset.hpp>
-#include <com/sun/star/io/XMarkableStream.hpp>
-#include <com/sun/star/io/XPersistObject.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/sdb/XColumn.hpp>
-#include <com/sun/star/sdb/XColumnUpdate.hpp>
-#include <com/sun/star/sdb/XRowSetChangeListener.hpp>
-#include <com/sun/star/sdbc/XRowSet.hpp>
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/uno/XAggregation.hpp>
-#include <com/sun/star/util/XCloneable.hpp>
+#include "services.hxx"
+#include "windowstateguard.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/form/binding/XBindableValue.hpp>
+#include <com/sun/star/form/FormComponentType.hpp>
+#include <com/sun/star/form/validation/XValidatableFormComponent.hpp>
+#include <com/sun/star/form/validation/XValidityConstraintListener.hpp>
+#include <com/sun/star/form/XBoundComponent.hpp>
+#include <com/sun/star/form/XBoundControl.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/form/XLoadListener.hpp>
+#include <com/sun/star/form/XReset.hpp>
+#include <com/sun/star/io/XMarkableStream.hpp>
+#include <com/sun/star/io/XPersistObject.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/sdb/XColumn.hpp>
+#include <com/sun/star/sdb/XColumnUpdate.hpp>
+#include <com/sun/star/sdb/XRowSetChangeListener.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/uno/XAggregation.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/form/XLoadable.hpp>
-/** === end UNO includes === **/
-
-#include <comphelper/componentcontext.hxx>
-#include <comphelper/propagg.hxx>
-#include <comphelper/propertybag.hxx>
-#include <comphelper/propmultiplex.hxx>
-#include <comphelper/sequence.hxx>
-#include <comphelper/uno3.hxx>
-#include <cppuhelper/component.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/implbase7.hxx>
-#include <osl/mutex.hxx>
-#include <rtl/ustring.hxx>
+#include <com/sun/star/form/XLoadable.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/propagg.hxx>
+#include <comphelper/propertybag.hxx>
+#include <comphelper/propmultiplex.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/component.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <osl/mutex.hxx>
+#include <rtl/ustring.hxx>
#include <memory>
diff --git a/forms/source/inc/commanddescriptionprovider.hxx b/forms/source/inc/commanddescriptionprovider.hxx
new file mode 100644
index 000000000000..64d28e2aabdc
--- /dev/null
+++ b/forms/source/inc/commanddescriptionprovider.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef COMMANDDESCRIPTIONPROVIDER_HXX
+#define COMMANDDESCRIPTIONPROVIDER_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XModel.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+
+#include <boost/shared_ptr.hpp>
+
+//........................................................................
+namespace frm
+{
+//........................................................................
+
+ //====================================================================
+ //= ICommandDescriptionProvider
+ //====================================================================
+ class SAL_NO_VTABLE ICommandDescriptionProvider
+ {
+ public:
+ virtual ::rtl::OUString getCommandDescription( const ::rtl::OUString& _rCommandURL ) const = 0;
+
+ virtual ~ICommandDescriptionProvider() { }
+ };
+
+ typedef ::boost::shared_ptr< const ICommandDescriptionProvider > PCommandDescriptionProvider;
+
+ //=====================================================================
+ //= factory
+ //=====================================================================
+ PCommandDescriptionProvider
+ createDocumentCommandDescriptionProvider(
+ const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument
+ );
+
+//........................................................................
+} // namespace frm
+//........................................................................
+
+#endif // COMMANDDESCRIPTIONPROVIDER_HXX
diff --git a/forms/source/inc/commandimageprovider.hxx b/forms/source/inc/commandimageprovider.hxx
new file mode 100644
index 000000000000..7bbb719e410d
--- /dev/null
+++ b/forms/source/inc/commandimageprovider.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef COMMANDIMAGEPROVIDER_HXX
+#define COMMANDIMAGEPROVIDER_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XModel.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <vcl/image.hxx>
+
+#include <boost/shared_ptr.hpp>
+
+//........................................................................
+namespace frm
+{
+//........................................................................
+
+ //=====================================================================
+ //= ICommandImageProvider
+ //=====================================================================
+ typedef ::rtl::OUString CommandURL;
+ typedef ::com::sun::star::uno::Sequence< CommandURL > CommandURLs;
+ typedef ::std::vector< Image > CommandImages;
+
+ class SAL_NO_VTABLE ICommandImageProvider
+ {
+ public:
+ virtual CommandImages getCommandImages(
+ const CommandURLs& _rCommandURLs,
+ const bool _bLarge,
+ const bool _bHiContrast
+ ) const = 0;
+
+ virtual ~ICommandImageProvider() { }
+ };
+
+ typedef ::boost::shared_ptr< const ICommandImageProvider > PCommandImageProvider;
+
+ //=====================================================================
+ //= factory
+ //=====================================================================
+ PCommandImageProvider
+ createDocumentCommandImageProvider(
+ const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument
+ );
+
+//........................................................................
+} // namespace frm
+//........................................................................
+
+#endif // COMMANDIMAGEPROVIDER_HXX
diff --git a/forms/source/inc/featuredispatcher.hxx b/forms/source/inc/featuredispatcher.hxx
index 27fe022cd0b7..daf6a33eb5ba 100644
--- a/forms/source/inc/featuredispatcher.hxx
+++ b/forms/source/inc/featuredispatcher.hxx
@@ -49,7 +49,7 @@ namespace frm
@param _nFeatureId
the id of the feature to dispatch
*/
- virtual void dispatch( sal_Int32 _nFeatureId ) const = 0;
+ virtual void dispatch( sal_Int16 _nFeatureId ) const = 0;
/** dispatches a feature, with an additional named parameter
@@ -63,14 +63,14 @@ namespace frm
the value of the parameter of the dispatch call
*/
virtual void dispatchWithArgument(
- sal_Int32 _nFeatureId,
+ sal_Int16 _nFeatureId,
const sal_Char* _pParamName,
const ::com::sun::star::uno::Any& _rParamValue
) const = 0;
/** checks whether a given feature is enabled
*/
- virtual bool isEnabled( sal_Int32 _nFeatureId ) const = 0;
+ virtual bool isEnabled( sal_Int16 _nFeatureId ) const = 0;
/** returns the boolean state of a feature
@@ -81,7 +81,7 @@ namespace frm
This method allows retrieving status information about features which have an additional
boolean information associated with it.
*/
- virtual bool getBooleanState( sal_Int32 _nFeatureId ) const = 0;
+ virtual bool getBooleanState( sal_Int16 _nFeatureId ) const = 0;
/** returns the string state of a feature
@@ -92,7 +92,7 @@ namespace frm
This method allows retrieving status information about features which have an additional
string information associated with it.
*/
- virtual ::rtl::OUString getStringState( sal_Int32 _nFeatureId ) const = 0;
+ virtual ::rtl::OUString getStringState( sal_Int16 _nFeatureId ) const = 0;
/** returns the integer state of a feature
@@ -103,7 +103,7 @@ namespace frm
This method allows retrieving status information about features which have an additional
integer information associated with it.
*/
- virtual sal_Int32 getIntegerState( sal_Int32 _nFeatureId ) const = 0;
+ virtual sal_Int32 getIntegerState( sal_Int16 _nFeatureId ) const = 0;
};
//.........................................................................
diff --git a/forms/source/inc/formnavigation.hxx b/forms/source/inc/formnavigation.hxx
index be0512eb0583..05c976dac11a 100644
--- a/forms/source/inc/formnavigation.hxx
+++ b/forms/source/inc/formnavigation.hxx
@@ -71,7 +71,7 @@ namespace frm
FeatureInfo() : bCachedState( sal_False ) { }
};
- typedef ::std::map< sal_Int32, FeatureInfo > FeatureMap;
+ typedef ::std::map< sal_Int16, FeatureInfo > FeatureMap;
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
@@ -106,12 +106,12 @@ namespace frm
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
// IFeatureDispatcher
- virtual void dispatch( sal_Int32 _nFeatureId ) const;
- virtual void dispatchWithArgument( sal_Int32 _nFeatureId, const sal_Char* _pParamName, const ::com::sun::star::uno::Any& _rParamValue ) const;
- virtual bool isEnabled( sal_Int32 _nFeatureId ) const;
- virtual bool getBooleanState( sal_Int32 _nFeatureId ) const;
- virtual ::rtl::OUString getStringState( sal_Int32 _nFeatureId ) const;
- virtual sal_Int32 getIntegerState( sal_Int32 _nFeatureId ) const;
+ virtual void dispatch( sal_Int16 _nFeatureId ) const;
+ virtual void dispatchWithArgument( sal_Int16 _nFeatureId, const sal_Char* _pParamName, const ::com::sun::star::uno::Any& _rParamValue ) const;
+ virtual bool isEnabled( sal_Int16 _nFeatureId ) const;
+ virtual bool getBooleanState( sal_Int16 _nFeatureId ) const;
+ virtual ::rtl::OUString getStringState( sal_Int16 _nFeatureId ) const;
+ virtual sal_Int32 getIntegerState( sal_Int16 _nFeatureId ) const;
// own overridables
/** is called when the interceptors have.
@@ -134,7 +134,7 @@ namespace frm
determines if the features is enabled or disabled
@see getBooleanState
*/
- virtual void featureStateChanged( sal_Int32 _nFeatureId, sal_Bool _bEnabled );
+ virtual void featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled );
/** notification for (potential) changes in the state of all features
<p>The base class implementation does nothing. Derived classes could force
@@ -149,7 +149,7 @@ namespace frm
the array of features to support. Out parameter to fill by the derivee's implementation
@pure
*/
- virtual void getSupportedFeatures( ::std::vector< sal_Int32 >& /* [out] */ _rFeatureIds ) = 0;
+ virtual void getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds ) = 0;
protected:
/** update all our dispatches which are controlled by our dispatch interceptors
@@ -205,7 +205,7 @@ namespace frm
@complexity O(log n)
@return NULL if the given id is not a known feature id (which is a valid usage)
*/
- const char* getFeatureURLAscii( sal_Int32 _nFeatureId );
+ const char* getFeatureURLAscii( sal_Int16 _nFeatureId );
/** retrieves the feature URL belonging to an feature id
@@ -214,7 +214,7 @@ namespace frm
<TRUE/> if and only if the given id is a known feature id
(which is a valid usage)
*/
- bool getFeatureURL( sal_Int32 _nFeatureId, ::com::sun::star::util::URL& /* [out] */ _rURL );
+ bool getFeatureURL( sal_Int16 _nFeatureId, ::com::sun::star::util::URL& /* [out] */ _rURL );
/** retrieves the feature id belonging to an feature URL
@@ -223,7 +223,7 @@ namespace frm
the id of the feature URL, or -1 if the URl is not known
(which is a valid usage)
*/
- sal_Int32 getFeatureId( const ::rtl::OUString& _rCompleteURL );
+ sal_Int16 getFeatureId( const ::rtl::OUString& _rCompleteURL );
private:
OFormNavigationMapper( ); // never implemented
diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx
index bf2d5d4d7446..8dd23dacb77f 100644
--- a/forms/source/inc/frm_strings.hxx
+++ b/forms/source/inc/frm_strings.hxx
@@ -153,7 +153,7 @@ namespace frm
FORMS_CONSTASCII_STRING( PROPERTY_DEFAULT_SELECT_SEQ, "DefaultSelection" );
FORMS_CONSTASCII_STRING( PROPERTY_MULTISELECTION, "MultiSelection" );
FORMS_CONSTASCII_STRING( PROPERTY_ALIGN, "Align" );
- FORMS_CONSTASCII_STRING( PROPERTY_VERTICALALIGN, "VerticalAlign" );
+ FORMS_CONSTASCII_STRING( PROPERTY_VERTICAL_ALIGN, "VerticalAlign" );
FORMS_CONSTASCII_STRING( PROPERTY_DEFAULT_DATE, "DefaultDate" );
FORMS_CONSTASCII_STRING( PROPERTY_DEFAULT_TIME, "DefaultTime" );
FORMS_CONSTASCII_STRING( PROPERTY_DEFAULT_VALUE, "DefaultValue" );
diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc
index df94d1575a5a..624e4c2f1ce0 100644
--- a/forms/source/inc/property.hrc
+++ b/forms/source/inc/property.hrc
@@ -63,7 +63,7 @@ namespace frm
#define PROPERTY_ID_INPUT_REQUIRED (PROPERTY_ID_START + 19)
#define PROPERTY_ID_WRITING_MODE (PROPERTY_ID_START + 20)
#define PROPERTY_ID_CONTEXT_WRITING_MODE (PROPERTY_ID_START + 21)
- // free
+#define PROPERTY_ID_VERTICAL_ALIGN (PROPERTY_ID_START + 22)
// free
// free
// free
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index d38b350ada32..067512d3c659 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -40,7 +40,9 @@
/** === begin UNO includes === **/
#include <com/sun/star/awt/LineEndFormat.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/style/VerticalAlignment.hpp>
/** === end UNO includes === **/
+
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/guarding.hxx>
#include <toolkit/awt/vclxdevice.hxx>
@@ -67,6 +69,7 @@ namespace frm
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::util;
+ using namespace ::com::sun::star::style;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
@@ -120,6 +123,7 @@ namespace frm
m_aTabStop = _pOriginal->m_aTabStop;
m_aBackgroundColor = _pOriginal->m_aBackgroundColor;
m_aBorderColor = _pOriginal->m_aBorderColor;
+ m_aVerticalAlignment = _pOriginal->m_aVerticalAlignment;
m_sDefaultControl = _pOriginal->m_sDefaultControl;
m_sHelpText = _pOriginal->m_sHelpText;
m_sHelpURL = _pOriginal->m_sHelpURL;
@@ -201,9 +205,10 @@ namespace frm
REGISTER_PROP_2( RICH_TEXT, m_bReallyActAsRichText, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( HIDEINACTIVESELECTION, m_bHideInactiveSelection, BOUND, MAYBEDEFAULT );
- REGISTER_VOID_PROP_2( TABSTOP, m_aTabStop, sal_Bool, BOUND, MAYBEDEFAULT );
- REGISTER_VOID_PROP_2( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32, BOUND, MAYBEDEFAULT );
- REGISTER_VOID_PROP_2( BORDERCOLOR, m_aBorderColor, sal_Int32, BOUND, MAYBEDEFAULT );
+ REGISTER_VOID_PROP_2( TABSTOP, m_aTabStop, sal_Bool, BOUND, MAYBEDEFAULT );
+ REGISTER_VOID_PROP_2( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32, BOUND, MAYBEDEFAULT );
+ REGISTER_VOID_PROP_2( BORDERCOLOR, m_aBorderColor, sal_Int32, BOUND, MAYBEDEFAULT );
+ REGISTER_VOID_PROP_2( VERTICAL_ALIGN, m_aVerticalAlignment, VerticalAlignment, BOUND, MAYBEDEFAULT );
// properties which exist only for compatibility with the css.swt.UnoControlEditModel,
// since we replace the default implementation for this service
@@ -455,6 +460,7 @@ namespace frm
case PROPERTY_ID_TABSTOP:
case PROPERTY_ID_BACKGROUNDCOLOR:
case PROPERTY_ID_BORDERCOLOR:
+ case PROPERTY_ID_VERTICAL_ALIGN:
/* void */
break;
diff --git a/forms/source/richtext/richtextmodel.hxx b/forms/source/richtext/richtextmodel.hxx
index 5e905e2873ad..5cdfe56f0dea 100644
--- a/forms/source/richtext/richtextmodel.hxx
+++ b/forms/source/richtext/richtextmodel.hxx
@@ -74,6 +74,7 @@ namespace frm
::com::sun::star::uno::Any m_aTabStop;
::com::sun::star::uno::Any m_aBackgroundColor;
::com::sun::star::uno::Any m_aBorderColor;
+ ::com::sun::star::uno::Any m_aVerticalAlignment;
::rtl::OUString m_sDefaultControl;
::rtl::OUString m_sHelpText;
::rtl::OUString m_sHelpURL;
@@ -115,7 +116,7 @@ namespace frm
DECLARE_DEFAULT_LEAF_XTOR( ORichTextModel );
// UNO
- DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarModel, OControlModel );
+ DECLARE_UNO3_AGG_DEFAULTS( ORichTextModel, OControlModel );
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 5416e5d567e9..6b63d4b8a756 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -92,7 +92,7 @@ namespace frm
using ::com::sun::star::uno::XInterface;
using ::com::sun::star::sdbc::XRowSet;
using ::com::sun::star::sdbc::XResultSetUpdate;
- using ::com::sun::star::form::XFormController;
+ using ::com::sun::star::form::runtime::XFormController;
using ::com::sun::star::form::runtime::XFeatureInvalidation;
using ::com::sun::star::form::runtime::FeatureState;
using ::com::sun::star::lang::IllegalArgumentException;
diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx
index 211d0be60fd4..3d5eb8fa17ce 100644
--- a/forms/source/runtime/formoperations.hxx
+++ b/forms/source/runtime/formoperations.hxx
@@ -71,16 +71,16 @@ namespace frm
class MethodGuard;
private:
- ::comphelper::ComponentContext m_aContext;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xController;
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xCursor;
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xUpdateCursor;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xCursorProperties;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xLoadableForm;
+ ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xCursor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xUpdateCursor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xCursorProperties;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xLoadableForm;
::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFeatureInvalidation >
- m_xFeatureInvalidation;
+ m_xFeatureInvalidation;
mutable ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >
- m_xParser;
+ m_xParser;
bool m_bInitializedParser;
bool m_bActiveControlModified;
@@ -132,7 +132,7 @@ namespace frm
// XFormOperations
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > SAL_CALL getCursor() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > SAL_CALL getUpdateCursor() throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL getController() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getController() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFeatureInvalidation > SAL_CALL getFeatureInvalidation() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFeatureInvalidation(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFeatureInvalidation > & the_value) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::form::runtime::FeatureState SAL_CALL getState(::sal_Int16 Feature) throw (::com::sun::star::uno::RuntimeException);
@@ -163,7 +163,7 @@ namespace frm
private:
// service constructors
- void createWithFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController );
+ void createWithFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController );
void createWithForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm );
/** determines whether or not we're already disposed
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 88995b49f4a8..eb975910a5da 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -34,17 +34,23 @@
#include "navbarcontrol.hxx"
#include "frm_strings.hxx"
#include "frm_module.hxx"
-#include "navtoolbar.hxx"
#include "FormComponent.hxx"
+#include "componenttools.hxx"
+#include "navtoolbar.hxx"
+#include "commandimageprovider.hxx"
+#include "commanddescriptionprovider.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/awt/XView.hpp>
#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/form/runtime/FormFeature.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
/** === end UNO includes === **/
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
-#include <svx/svxids.hrc>
//--------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_ONavigationBarControl()
@@ -62,6 +68,8 @@ namespace frm
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
+ using namespace ::com::sun::star::graphic;
+ namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
#define FORWARD_TO_PEER_1( unoInterface, method, param1 ) \
Reference< unoInterface > xTypedPeer( getPeer(), UNO_QUERY ); \
@@ -129,7 +137,8 @@ namespace frm
//------------------------------------------------------------------
namespace
{
- static WinBits getWinBits( const Reference< XControlModel >& _rxModel )
+ //..............................................................
+ static WinBits lcl_getWinBits_nothrow( const Reference< XControlModel >& _rxModel )
{
WinBits nBits = 0;
try
@@ -149,7 +158,7 @@ namespace frm
}
catch( const Exception& )
{
- DBG_ERROR( "::getWinBits: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
return nBits;
}
@@ -175,7 +184,7 @@ namespace frm
}
// create the peer
- ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xORB, pParentWin, getWinBits( getModel() ) );
+ ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xORB, pParentWin, getModel() );
DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" );
if ( pPeer )
// by definition, the returned component is aquired once
@@ -267,7 +276,7 @@ namespace frm
DBG_NAME( ONavigationBarPeer )
//------------------------------------------------------------------
ONavigationBarPeer* ONavigationBarPeer::Create( const Reference< XMultiServiceFactory >& _rxORB,
- Window* _pParentWindow, WinBits _nStyle )
+ Window* _pParentWindow, const Reference< XControlModel >& _rxModel )
{
DBG_TESTSOLARMUTEX();
@@ -276,7 +285,13 @@ namespace frm
pPeer->acquire(); // by definition, the returned object is aquired once
// the VCL control for the peer
- NavigationToolBar* pNavBar = new NavigationToolBar( _pParentWindow, _nStyle );
+ Reference< XModel > xContextDocument( getXModel( _rxModel ) );
+ NavigationToolBar* pNavBar = new NavigationToolBar(
+ _pParentWindow,
+ lcl_getWinBits_nothrow( _rxModel ),
+ createDocumentCommandImageProvider( _rxORB, xContextDocument ),
+ createDocumentCommandDescriptionProvider( _rxORB, xContextDocument )
+ );
// some knittings
pNavBar->setDispatcher( pPeer );
@@ -456,7 +471,7 @@ namespace frm
}
//------------------------------------------------------------------
- void ONavigationBarPeer::featureStateChanged( sal_Int32 _nFeatureId, sal_Bool _bEnabled )
+ void ONavigationBarPeer::featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled )
{
// enable this button on the toolbox
NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() );
@@ -465,15 +480,15 @@ namespace frm
pNavBar->enableFeature( _nFeatureId, _bEnabled );
// is it a feature with additional state information?
- if ( _nFeatureId == SID_FM_FORM_FILTERED )
+ if ( _nFeatureId == FormFeature::ToggleApplyFilter )
{ // additional boolean state
pNavBar->checkFeature( _nFeatureId, getBooleanState( _nFeatureId ) );
}
- else if ( _nFeatureId == SID_FM_RECORD_TOTAL )
+ else if ( _nFeatureId == FormFeature::TotalRecords )
{
pNavBar->setFeatureText( _nFeatureId, getStringState( _nFeatureId ) );
}
- else if ( _nFeatureId == SID_FM_RECORD_ABSOLUTE )
+ else if ( _nFeatureId == FormFeature::MoveAbsolute )
{
pNavBar->setFeatureText( _nFeatureId, String::CreateFromInt32( getIntegerState( _nFeatureId ) ) );
}
@@ -496,7 +511,7 @@ namespace frm
}
//------------------------------------------------------------------
- bool ONavigationBarPeer::isEnabled( sal_Int32 _nFeatureId ) const
+ bool ONavigationBarPeer::isEnabled( sal_Int16 _nFeatureId ) const
{
if ( const_cast< ONavigationBarPeer* >( this )->isDesignMode() )
return false;
@@ -524,27 +539,27 @@ namespace frm
}
//------------------------------------------------------------------
- void ONavigationBarPeer::getSupportedFeatures( ::std::vector< sal_Int32 >& _rFeatureIds )
+ void ONavigationBarPeer::getSupportedFeatures( ::std::vector< sal_Int16 >& _rFeatureIds )
{
- _rFeatureIds.push_back( SID_FM_RECORD_ABSOLUTE );
- _rFeatureIds.push_back( SID_FM_RECORD_TOTAL );
- _rFeatureIds.push_back( SID_FM_RECORD_FIRST );
- _rFeatureIds.push_back( SID_FM_RECORD_PREV );
- _rFeatureIds.push_back( SID_FM_RECORD_NEXT );
- _rFeatureIds.push_back( SID_FM_RECORD_LAST );
- _rFeatureIds.push_back( SID_FM_RECORD_SAVE );
- _rFeatureIds.push_back( SID_FM_RECORD_UNDO );
- _rFeatureIds.push_back( SID_FM_RECORD_NEW );
- _rFeatureIds.push_back( SID_FM_RECORD_DELETE );
- _rFeatureIds.push_back( SID_FM_REFRESH );
- _rFeatureIds.push_back( SID_FM_REFRESH_FORM_CONTROL );
- _rFeatureIds.push_back( SID_FM_SORTUP );
- _rFeatureIds.push_back( SID_FM_SORTDOWN );
- _rFeatureIds.push_back( SID_FM_ORDERCRIT );
- _rFeatureIds.push_back( SID_FM_AUTOFILTER );
- _rFeatureIds.push_back( SID_FM_FILTERCRIT );
- _rFeatureIds.push_back( SID_FM_FORM_FILTERED );
- _rFeatureIds.push_back( SID_FM_REMOVE_FILTER_SORT );
+ _rFeatureIds.push_back( FormFeature::MoveAbsolute );
+ _rFeatureIds.push_back( FormFeature::TotalRecords );
+ _rFeatureIds.push_back( FormFeature::MoveToFirst );
+ _rFeatureIds.push_back( FormFeature::MoveToPrevious );
+ _rFeatureIds.push_back( FormFeature::MoveToNext );
+ _rFeatureIds.push_back( FormFeature::MoveToLast );
+ _rFeatureIds.push_back( FormFeature::SaveRecordChanges );
+ _rFeatureIds.push_back( FormFeature::UndoRecordChanges );
+ _rFeatureIds.push_back( FormFeature::MoveToInsertRow );
+ _rFeatureIds.push_back( FormFeature::DeleteRecord );
+ _rFeatureIds.push_back( FormFeature::ReloadForm );
+ _rFeatureIds.push_back( FormFeature::RefreshCurrentControl );
+ _rFeatureIds.push_back( FormFeature::SortAscending );
+ _rFeatureIds.push_back( FormFeature::SortDescending );
+ _rFeatureIds.push_back( FormFeature::InteractiveSort );
+ _rFeatureIds.push_back( FormFeature::AutoFilter );
+ _rFeatureIds.push_back( FormFeature::InteractiveFilter );
+ _rFeatureIds.push_back( FormFeature::ToggleApplyFilter );
+ _rFeatureIds.push_back( FormFeature::RemoveFilterAndSort );
}
//.........................................................................
diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx
index 0c3f76f315ed..62d44774d0b3 100644
--- a/forms/source/solar/component/navbarcontrol.hxx
+++ b/forms/source/solar/component/navbarcontrol.hxx
@@ -31,14 +31,18 @@
#ifndef FORMS_NAVBARCONTROL_HXX
#define FORMS_NAVBARCONTROL_HXX
+#include "formnavigation.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+/** === end UNO includes === **/
+
#include <toolkit/controls/unocontrol.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase1.hxx>
#include <vcl/wintypes.hxx>
-#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
-#include "formnavigation.hxx"
//.........................................................................
namespace frm
@@ -111,11 +115,13 @@ namespace frm
static ONavigationBarPeer* Create(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
Window* _pParentWindow,
- WinBits _nStyle
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel
);
protected:
- ONavigationBarPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
+ ONavigationBarPeer(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ );
~ONavigationBarPeer();
public:
@@ -144,12 +150,12 @@ namespace frm
// OFormNavigationHelper overriables
virtual void interceptorsChanged( );
- virtual void featureStateChanged( sal_Int32 _nFeatureId, sal_Bool _bEnabled );
+ virtual void featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled );
virtual void allFeatureStatesChanged( );
- virtual void getSupportedFeatures( ::std::vector< sal_Int32 >& /* [out] */ _rFeatureIds );
+ virtual void getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds );
// IFeatureDispatcher overriables
- virtual bool isEnabled( sal_Int32 _nFeatureId ) const;
+ virtual bool isEnabled( sal_Int16 _nFeatureId ) const;
};
//.........................................................................
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index c5114fe4ea15..58f22f0c95e4 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -30,39 +30,41 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_forms.hxx"
+
#include "navtoolbar.hxx"
#include "frm_resource.hxx"
-#ifndef _FRM_RESOURCE_HRC_
-#include "frm_resource.hrc"
-#endif
-#include <vcl/fixed.hxx>
-#ifndef _SVX_SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
-#include <sfx2/msgpool.hxx>
-#include <sfx2/imgmgr.hxx>
#include "featuredispatcher.hxx"
+#include "frm_resource.hrc"
+#include "commandimageprovider.hxx"
+#include "commanddescriptionprovider.hxx"
+
#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/form/runtime/FormFeature.hpp>
+
+#include <sfx2/imgmgr.hxx>
+#include <vcl/fixed.hxx>
#include <memory>
-#define LID_RECORD_LABEL 1
-#define LID_RECORD_FILLER 2
+#define LID_RECORD_LABEL 1000
+#define LID_RECORD_FILLER 1001
//.........................................................................
namespace frm
{
//.........................................................................
+ using ::com::sun::star::uno::makeAny;
+ namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
+
//=====================================================================
//.....................................................................
namespace
{
- static bool isSfxSlot( sal_Int32 _nFeatureId )
+ static bool isArtificialItem( sal_Int16 _nFeatureId )
{
- // everything we use in this class is an SFX-slot - except the LID_* ids
- return ( _nFeatureId != LID_RECORD_LABEL )
- && ( _nFeatureId != LID_RECORD_FILLER );
+ return ( _nFeatureId == LID_RECORD_LABEL )
+ || ( _nFeatureId == LID_RECORD_FILLER );
}
static String getLabelString( USHORT _nResId )
@@ -72,6 +74,38 @@ namespace frm
sLabel += String::CreateFromAscii( " " );
return sLabel;
}
+
+ ::rtl::OUString lcl_getCommandURL( const sal_Int16 _nFormFeature )
+ {
+ const sal_Char* pAsciiCommandName = NULL;
+ switch ( _nFormFeature )
+ {
+ case FormFeature::MoveAbsolute : pAsciiCommandName = "AbsoluteRecord"; break;
+ case FormFeature::TotalRecords : pAsciiCommandName = "RecTotal"; break;
+ case FormFeature::MoveToFirst : pAsciiCommandName = "FirstRecord"; break;
+ case FormFeature::MoveToPrevious : pAsciiCommandName = "PrevRecord"; break;
+ case FormFeature::MoveToNext : pAsciiCommandName = "NextRecord"; break;
+ case FormFeature::MoveToLast : pAsciiCommandName = "LastRecord"; break;
+ case FormFeature::SaveRecordChanges : pAsciiCommandName = "RecSave"; break;
+ case FormFeature::UndoRecordChanges : pAsciiCommandName = "RecUndo"; break;
+ case FormFeature::MoveToInsertRow : pAsciiCommandName = "NewRecord"; break;
+ case FormFeature::DeleteRecord : pAsciiCommandName = "DeleteRecord"; break;
+ case FormFeature::ReloadForm : pAsciiCommandName = "Refresh"; break;
+ case FormFeature::RefreshCurrentControl : pAsciiCommandName = "RefreshFormControl"; break;
+ case FormFeature::SortAscending : pAsciiCommandName = "Sortup"; break;
+ case FormFeature::SortDescending : pAsciiCommandName = "SortDown"; break;
+ case FormFeature::InteractiveSort : pAsciiCommandName = "OrderCrit"; break;
+ case FormFeature::AutoFilter : pAsciiCommandName = "AutoFilter"; break;
+ case FormFeature::InteractiveFilter : pAsciiCommandName = "FilterCrit"; break;
+ case FormFeature::ToggleApplyFilter : pAsciiCommandName = "FormFiltered"; break;
+ case FormFeature::RemoveFilterAndSort : pAsciiCommandName = "RemoveFilterSort"; break;
+ }
+ if ( pAsciiCommandName != NULL )
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) ) + ::rtl::OUString::createFromAscii( pAsciiCommandName );
+
+ OSL_ENSURE( false, "lcl_getCommandURL: unknown FormFeature!" );
+ return ::rtl::OUString();
+ }
}
//=====================================================================
@@ -119,9 +153,12 @@ namespace frm
//=====================================================================
DBG_NAME( NavigationToolBar )
//---------------------------------------------------------------------
- NavigationToolBar::NavigationToolBar( Window* _pParent, WinBits _nStyle )
+ NavigationToolBar::NavigationToolBar( Window* _pParent, WinBits _nStyle, const PCommandImageProvider& _pImageProvider,
+ const PCommandDescriptionProvider& _pDescriptionProvider )
:Window( _pParent, _nStyle )
,m_pDispatcher( NULL )
+ ,m_pImageProvider( _pImageProvider )
+ ,m_pDescriptionProvider( _pDescriptionProvider )
,m_eImageSize( eSmall )
,m_pToolbar( NULL )
{
@@ -150,7 +187,7 @@ namespace frm
m_pToolbar->setDispatcher( _pDispatcher );
- RecordPositionInput* pPositionWindow = static_cast< RecordPositionInput* >( m_pToolbar->GetItemWindow( SID_FM_RECORD_ABSOLUTE ) );
+ RecordPositionInput* pPositionWindow = static_cast< RecordPositionInput* >( m_pToolbar->GetItemWindow( FormFeature::MoveAbsolute ) );
OSL_ENSURE( pPositionWindow, "NavigationToolBar::setDispatcher: can't forward the dispatcher to the position window!" );
if ( pPositionWindow )
pPositionWindow->setDispatcher( _pDispatcher );
@@ -179,15 +216,15 @@ namespace frm
{
m_pToolbar->EnableItem( _nItemId, _bEnabled );
- if ( _nItemId == SID_FM_RECORD_ABSOLUTE )
+ if ( _nItemId == FormFeature::MoveAbsolute )
m_pToolbar->EnableItem( LID_RECORD_LABEL, _bEnabled );
- if ( _nItemId == SID_FM_RECORD_TOTAL )
+ if ( _nItemId == FormFeature::TotalRecords )
m_pToolbar->EnableItem( LID_RECORD_FILLER, _bEnabled );
}
//---------------------------------------------------------------------
- void NavigationToolBar::enableFeature( sal_Int32 _nFeatureId, bool _bEnabled )
+ void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled )
{
DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
"NavigationToolBar::enableFeature: invalid id!" );
@@ -196,7 +233,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::checkFeature( sal_Int32 _nFeatureId, bool _bEnabled )
+ void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled )
{
DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
"NavigationToolBar::checkFeature: invalid id!" );
@@ -205,7 +242,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::setFeatureText( sal_Int32 _nFeatureId, const ::rtl::OUString& _rText )
+ void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const ::rtl::OUString& _rText )
{
DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
"NavigationToolBar::checkFeature: invalid id!" );
@@ -228,71 +265,67 @@ namespace frm
// items. We could duplicate all the information here in our lib
// (such as the item text and the image), but why should we?
- struct SlotDescription
+ struct FeatureDescription
{
USHORT nId;
bool bRepeat;
bool bItemWindow;
- } aSupportedSlots[] =
+ } aSupportedFeatures[] =
{
- { LID_RECORD_LABEL, false, true },
- { SID_FM_RECORD_ABSOLUTE, false, true },
- { LID_RECORD_FILLER, false, true },
- { SID_FM_RECORD_TOTAL, false, true },
-
- { SID_FM_RECORD_FIRST, true, false },
- { SID_FM_RECORD_PREV, true, false },
- { SID_FM_RECORD_NEXT, true, false },
- { SID_FM_RECORD_LAST, true, false },
+ { LID_RECORD_LABEL, false, true },
+ { FormFeature::MoveAbsolute, false, true },
+ { LID_RECORD_FILLER, false, true },
+ { FormFeature::TotalRecords, false, true },
+ { FormFeature::MoveToFirst, true, false },
+ { FormFeature::MoveToPrevious, true, false },
+ { FormFeature::MoveToNext, true, false },
+ { FormFeature::MoveToLast, true, false },
+ { FormFeature::MoveToInsertRow, false, false },
{ 0, false, false },
- { SID_FM_RECORD_SAVE, false, false },
- { SID_FM_RECORD_UNDO, false, false },
- { SID_FM_RECORD_NEW, false, false },
- { SID_FM_RECORD_DELETE, false, false },
- { SID_FM_REFRESH, false, false },
- { SID_FM_REFRESH_FORM_CONTROL, false, false },
+ { FormFeature::SaveRecordChanges, false, false },
+ { FormFeature::UndoRecordChanges, false, false },
+ { FormFeature::DeleteRecord, false, false },
+ { FormFeature::ReloadForm, false, false },
+ { FormFeature::RefreshCurrentControl, false, false },
{ 0, false, false },
- { SID_FM_SORTUP, false, false },
- { SID_FM_SORTDOWN, false, false },
- { SID_FM_ORDERCRIT, false, false },
- { SID_FM_AUTOFILTER, false, false },
- { SID_FM_FILTERCRIT, false, false },
- { SID_FM_FORM_FILTERED, false, false },
- { SID_FM_REMOVE_FILTER_SORT, false, false },
+ { FormFeature::SortAscending, false, false },
+ { FormFeature::SortDescending, false, false },
+ { FormFeature::InteractiveSort, false, false },
+ { FormFeature::AutoFilter, false, false },
+ { FormFeature::InteractiveFilter, false, false },
+ { FormFeature::ToggleApplyFilter, false, false },
+ { FormFeature::RemoveFilterAndSort, false, false },
};
- size_t nSupportedSlots = sizeof( aSupportedSlots ) / sizeof( aSupportedSlots[0] );
- SlotDescription* pSupportedSlots = aSupportedSlots;
- SlotDescription* pSupportedSlotsEnd = aSupportedSlots + nSupportedSlots;
- for ( ; pSupportedSlots < pSupportedSlotsEnd; ++pSupportedSlots )
+ size_t nSupportedFeatures = sizeof( aSupportedFeatures ) / sizeof( aSupportedFeatures[0] );
+ FeatureDescription* pSupportedFeatures = aSupportedFeatures;
+ FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + nSupportedFeatures;
+ for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures )
{
- if ( pSupportedSlots->nId )
+ if ( pSupportedFeatures->nId )
{ // it's _not_ a separator
- // the text(s) of the item
- String sItemText;
- String sItemHelpText;
-
- // TODO/CLEANUP: this code does nothing(!) nowadays
- //SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( NULL );
- //sItemText = rSlotPool.GetSlotName( pSupportedSlots->nId, &sItemHelpText );
-
// insert the entry
- m_pToolbar->InsertItem( pSupportedSlots->nId, sItemText, pSupportedSlots->bRepeat ? TIB_REPEAT : 0 );
- m_pToolbar->SetQuickHelpText( pSupportedSlots->nId, sItemHelpText );
- if ( isSfxSlot( pSupportedSlots->nId ) )
- m_pToolbar->SetHelpId( pSupportedSlots->nId, pSupportedSlots->nId );
+ m_pToolbar->InsertItem( pSupportedFeatures->nId, String(), pSupportedFeatures->bRepeat ? TIB_REPEAT : 0 );
+ m_pToolbar->SetQuickHelpText( pSupportedFeatures->nId, String() ); // TODO
+ if ( !isArtificialItem( pSupportedFeatures->nId ) )
+ {
+ ::rtl::OUString sCommandURL( lcl_getCommandURL( pSupportedFeatures->nId ) );
+ m_pToolbar->SetItemCommand( pSupportedFeatures->nId, sCommandURL );
+ if ( m_pDescriptionProvider )
+ m_pToolbar->SetQuickHelpText( pSupportedFeatures->nId, m_pDescriptionProvider->getCommandDescription( sCommandURL ) );
+ }
- if ( pSupportedSlots->bItemWindow )
+ if ( pSupportedFeatures->bItemWindow )
{
Window* pItemWindow = NULL;
- if ( SID_FM_RECORD_ABSOLUTE == pSupportedSlots->nId )
+ if ( FormFeature::MoveAbsolute == pSupportedFeatures->nId )
{
pItemWindow = new RecordPositionInput( m_pToolbar );
static_cast< RecordPositionInput* >( pItemWindow )->setDispatcher( m_pDispatcher );
}
- else if ( LID_RECORD_FILLER == pSupportedSlots->nId )
+ else if ( LID_RECORD_FILLER == pSupportedFeatures->nId )
{
pItemWindow = new FixedText( m_pToolbar, WB_CENTER | WB_VCENTER );
pItemWindow->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
@@ -305,7 +338,7 @@ namespace frm
}
m_aChildWins.push_back( pItemWindow );
- switch ( pSupportedSlots->nId )
+ switch ( pSupportedFeatures->nId )
{
case LID_RECORD_LABEL:
pItemWindow->SetText( getLabelString( RID_STR_LABEL_RECORD ) );
@@ -316,7 +349,7 @@ namespace frm
break;
}
- m_pToolbar->SetItemWindow( pSupportedSlots->nId, pItemWindow );
+ m_pToolbar->SetItemWindow( pSupportedFeatures->nId, pItemWindow );
}
}
else
@@ -327,25 +360,66 @@ namespace frm
forEachItemWindow( &NavigationToolBar::adjustItemWindowWidth, NULL );
- // the image of the item
- ::std::auto_ptr< SfxImageManager > pImageManager( new SfxImageManager( NULL ) );
- pImageManager->SetImagesForceSize( *m_pToolbar, FALSE, m_eImageSize == eLarge );
+ implUpdateImages();
+ }
+
+ //---------------------------------------------------------------------
+ void NavigationToolBar::implUpdateImages()
+ {
+ OSL_ENSURE( m_pImageProvider, "NavigationToolBar::implUpdateImages: no image provider => no images!" );
+ if ( !m_pImageProvider )
+ return;
+
+ const bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ const USHORT nItemCount = m_pToolbar->GetItemCount();
+
+ // collect the FormFeatures in the toolbar
+ typedef ::std::vector< sal_Int16 > FormFeatures;
+ FormFeatures aFormFeatures;
+ aFormFeatures.reserve( nItemCount );
+
+ for ( USHORT i=0; i<nItemCount; ++i )
+ {
+ USHORT nId = m_pToolbar->GetItemId( i );
+ if ( ( TOOLBOXITEM_BUTTON == m_pToolbar->GetItemType( i ) ) && !isArtificialItem( nId ) )
+ aFormFeatures.push_back( nId );
+ }
+
+ // translate them into command URLs
+ CommandURLs aCommandURLs( aFormFeatures.size() );
+ for ( FormFeatures::const_iterator formFeature = aFormFeatures.begin();
+ formFeature != aFormFeatures.end();
+ ++formFeature
+ )
+ {
+ aCommandURLs[ formFeature - aFormFeatures.begin() ] = lcl_getCommandURL( *formFeature );
+ }
+
+ // retrieve the images for the command URLs
+ CommandImages aCommandImages = m_pImageProvider->getCommandImages( aCommandURLs, m_eImageSize == eLarge, bIsHighContrast );
+
+ // and set them at the toolbar
+ CommandImages::const_iterator commandImage = aCommandImages.begin();
+ for ( FormFeatures::const_iterator formFeature = aFormFeatures.begin();
+ formFeature != aFormFeatures.end();
+ ++formFeature, ++commandImage
+ )
+ {
+ m_pToolbar->SetItemImage( *formFeature, *commandImage );
+ }
// parts of our layout is dependent on the size of our icons
Resize();
}
//---------------------------------------------------------------------
- void NavigationToolBar::implSetImageSize( ImageSize _eSize, bool _bForce )
+ void NavigationToolBar::implSetImageSize( ImageSize _eSize )
{
- if ( ( _eSize != m_eImageSize ) || _bForce )
+ if ( _eSize != m_eImageSize )
{
m_eImageSize = _eSize;
- ::std::auto_ptr< SfxImageManager > pImageManager( new SfxImageManager( NULL ) );
- pImageManager->SetImagesForceSize( *m_pToolbar, GetSettings().GetStyleSettings().GetHighContrastMode(), m_eImageSize == eLarge );
-
- // parts of our layout is dependent on the size of our icons
- Resize();
+ implUpdateImages();
}
}
@@ -365,7 +439,7 @@ namespace frm
case ePosition:
{
static const USHORT aPositionIds[] = {
- LID_RECORD_LABEL, SID_FM_RECORD_ABSOLUTE, LID_RECORD_FILLER, SID_FM_RECORD_TOTAL, 0
+ LID_RECORD_LABEL, FormFeature::MoveAbsolute, LID_RECORD_FILLER, FormFeature::TotalRecords, 0
};
pGroupIds = aPositionIds;
}
@@ -373,7 +447,7 @@ namespace frm
case eNavigation:
{
static const USHORT aNavigationIds[] = {
- SID_FM_RECORD_FIRST, SID_FM_RECORD_PREV, SID_FM_RECORD_NEXT, SID_FM_RECORD_LAST, 0
+ FormFeature::MoveToFirst, FormFeature::MoveToPrevious, FormFeature::MoveToNext, FormFeature::MoveToLast, FormFeature::MoveToInsertRow, 0
};
pGroupIds = aNavigationIds;
}
@@ -381,7 +455,7 @@ namespace frm
case eRecordActions:
{
static const USHORT aActionIds[] = {
- SID_FM_RECORD_SAVE, SID_FM_RECORD_UNDO, SID_FM_RECORD_NEW, SID_FM_RECORD_DELETE, SID_FM_REFRESH, SID_FM_REFRESH_FORM_CONTROL, 0
+ FormFeature::SaveRecordChanges, FormFeature::UndoRecordChanges, FormFeature::DeleteRecord, FormFeature::ReloadForm, FormFeature::RefreshCurrentControl, 0
};
pGroupIds = aActionIds;
}
@@ -389,7 +463,7 @@ namespace frm
case eFilterSort:
{
static const USHORT aFilterSortIds[] = {
- SID_FM_SORTUP, SID_FM_SORTDOWN, SID_FM_ORDERCRIT, SID_FM_AUTOFILTER, SID_FM_FILTERCRIT, SID_FM_FORM_FILTERED, SID_FM_REMOVE_FILTER_SORT, 0
+ FormFeature::SortAscending, FormFeature::SortDescending, FormFeature::InteractiveSort, FormFeature::AutoFilter, FormFeature::InteractiveFilter, FormFeature::ToggleApplyFilter, FormFeature::RemoveFilterAndSort, 0
};
pGroupIds = aFilterSortIds;
}
@@ -410,9 +484,9 @@ namespace frm
switch ( _eGroup )
{
case ePosition : nIndicatorItem = LID_RECORD_LABEL; break;
- case eNavigation : nIndicatorItem = SID_FM_RECORD_FIRST; break;
- case eRecordActions : nIndicatorItem = SID_FM_RECORD_SAVE; break;
- case eFilterSort : nIndicatorItem = SID_FM_SORTUP; break;
+ case eNavigation : nIndicatorItem = FormFeature::MoveToFirst; break;
+ case eRecordActions : nIndicatorItem = FormFeature::SaveRecordChanges; break;
+ case eFilterSort : nIndicatorItem = FormFeature::SortAscending; break;
default:
OSL_ENSURE( sal_False, "NavigationToolBar::IsFunctionGroupVisible: invalid group id!" );
}
@@ -477,7 +551,7 @@ namespace frm
// the contrast of the background color may have changed, so force
// the images to be rebuild (high contrast requires a possibly different
// image set)
- implSetImageSize( m_eImageSize, true );
+ implUpdateImages();
}
//---------------------------------------------------------------------
@@ -490,7 +564,7 @@ namespace frm
// the contrast of the background color may have changed, so force
// the images to be rebuild (high contrast requires a possibly different
// image set)
- implSetImageSize( m_eImageSize, true );
+ implUpdateImages();
}
//---------------------------------------------------------------------
@@ -579,11 +653,11 @@ namespace frm
sItemText = getLabelString( RID_STR_LABEL_OF );
break;
- case SID_FM_RECORD_ABSOLUTE:
+ case FormFeature::MoveAbsolute:
sItemText = String::CreateFromAscii( "12345678" );
break;
- case SID_FM_RECORD_TOTAL:
+ case FormFeature::TotalRecords:
sItemText = String::CreateFromAscii( "123456" );
break;
}
@@ -638,7 +712,7 @@ namespace frm
return;
if ( m_pDispatcher )
- m_pDispatcher->dispatchWithArgument( SID_FM_RECORD_ABSOLUTE, "Position", ::com::sun::star::uno::makeAny( (sal_Int32)nRecord ) );
+ m_pDispatcher->dispatchWithArgument( FormFeature::MoveAbsolute, "Position", makeAny( (sal_Int32)nRecord ) );
SaveValue();
}
diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx
index b19c57431706..eaa3717bc4d2 100644
--- a/forms/source/solar/inc/navtoolbar.hxx
+++ b/forms/source/solar/inc/navtoolbar.hxx
@@ -34,14 +34,19 @@
#include <vcl/toolbox.hxx>
#include <vcl/field.hxx>
+#include <boost/shared_ptr.hpp>
+
//.........................................................................
namespace frm
{
//.........................................................................
class IFeatureDispatcher;
+ class ICommandImageProvider;
+ class ICommandDescriptionProvider;
class ImplNavToolBar;
+
//=====================================================================
//= NavigationToolBar
//=====================================================================
@@ -63,13 +68,22 @@ namespace frm
};
private:
- const IFeatureDispatcher* m_pDispatcher;
- ImageSize m_eImageSize;
- ImplNavToolBar* m_pToolbar;
- ::std::vector< Window* > m_aChildWins;
+ const IFeatureDispatcher* m_pDispatcher;
+ const ::boost::shared_ptr< const ICommandImageProvider >
+ m_pImageProvider;
+ const ::boost::shared_ptr< const ICommandDescriptionProvider >
+ m_pDescriptionProvider;
+ ImageSize m_eImageSize;
+ ImplNavToolBar* m_pToolbar;
+ ::std::vector< Window* > m_aChildWins;
public:
- NavigationToolBar( Window* _pParent, WinBits _nStyle );
+ NavigationToolBar(
+ Window* _pParent,
+ WinBits _nStyle,
+ const ::boost::shared_ptr< const ICommandImageProvider >& _pImageProvider,
+ const ::boost::shared_ptr< const ICommandDescriptionProvider >& _pDescriptionProvider
+ );
~NavigationToolBar( );
/** sets the dispatcher which is to be used for the features
@@ -82,19 +96,16 @@ namespace frm
ensuring the life time of the object does exceed the life time
of the tool bar instance.
*/
- void setDispatcher( const IFeatureDispatcher* _pDispatcher );
+ void setDispatcher( const IFeatureDispatcher* _pDispatcher );
- /** enables or disables a given feature
- */
- void enableFeature( sal_Int32 _nFeatureId, bool _bEnabled );
+ /// enables or disables a given feature
+ void enableFeature( sal_Int16 _nFeatureId, bool _bEnabled );
- /** checks or unchecks a given feature
- */
- void checkFeature( sal_Int32 _nFeatureId, bool _bEnabled );
+ /// checks or unchecks a given feature
+ void checkFeature( sal_Int16 _nFeatureId, bool _bEnabled );
- /** sets the text of a given feature
- */
- void setFeatureText( sal_Int32 _nFeatureId, const ::rtl::OUString& _rText );
+ /// sets the text of a given feature
+ void setFeatureText( sal_Int16 _nFeatureId, const ::rtl::OUString& _rText );
/** retrieves the current image size
*/
@@ -127,7 +138,10 @@ namespace frm
void implInit( );
/// impl version of SetImageSize
- void implSetImageSize( ImageSize _eSize, bool _bForce = false );
+ void implSetImageSize( ImageSize _eSize );
+
+ /// updates the images of our items
+ void implUpdateImages();
/// enables or disables an item, plus possible dependent items
void implEnableItem( USHORT _nItemId, bool _bEnabled );
diff --git a/framework/inc/uielement/generictoolbarcontroller.hxx b/framework/inc/uielement/generictoolbarcontroller.hxx
index f1f014fb7707..109e4f9bf69b 100644
--- a/framework/inc/uielement/generictoolbarcontroller.hxx
+++ b/framework/inc/uielement/generictoolbarcontroller.hxx
@@ -37,6 +37,9 @@
#include <svtools/toolboxcontroller.hxx>
#include <vcl/toolbox.hxx>
+#include <memory>
+
+class PopupMenu;
namespace framework
{
@@ -64,7 +67,7 @@ class GenericToolbarController : public svt::ToolboxController
DECL_STATIC_LINK( GenericToolbarController, ExecuteHdl_Impl, ExecuteInfo* );
- private:
+ protected:
ToolBox* m_pToolbar;
sal_uInt16 m_nID;
sal_Bool m_bEnumCommand : 1,
@@ -72,6 +75,28 @@ class GenericToolbarController : public svt::ToolboxController
rtl::OUString m_aEnumCommand;
};
+class MenuToolbarController : public GenericToolbarController
+{
+ com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > m_xMenuDesc;
+ PopupMenu* pMenu;
+ com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xMenuManager;
+ rtl::OUString m_aModuleIdentifier;
+ public:
+ MenuToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame,
+ ToolBox* pToolBar,
+ USHORT nID,
+ const rtl::OUString& aCommand,
+ const rtl::OUString& aModuleIdentifier,
+ const com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess >& xMenuDesc );
+
+ ~MenuToolbarController();
+ // XToolbarController
+ virtual void SAL_CALL click() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
+
+};
+
}
#endif // __FRAMEWORK_UIELEMENT_GENERICTOOLBARCONTROLLER_HXX_
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 553da978b8ce..5a835c1f1cf5 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -50,10 +50,12 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XSubToolbarController.hpp>
#include <com/sun/star/frame/XToolbarController.hpp>
@@ -200,6 +202,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XSubToolbarController > > SubToolBarControllerVector;
typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap;
+ typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > > MenuDescriptionMap;
sal_Bool m_bDisposed : 1,
m_bIsHiContrast : 1,
m_bSmallSymbols : 1,
@@ -225,10 +228,14 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
::com::sun::star::uno::Reference< ::com::sun::star::ui::XImageManager > m_xModuleImageManager;
::com::sun::star::uno::Reference< ::com::sun::star::ui::XImageManager > m_xDocImageManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xImageOrientationListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xUICfgMgr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocUICfgMgr;
+
CommandToInfoMap m_aCommandMap;
SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap;
Timer m_aAsyncUpdateControllersTimer;
sal_Int16 m_nSymbolsStyle;
+ MenuDescriptionMap m_aMenuMap;
};
}
diff --git a/framework/inc/xml/menuconfiguration.hxx b/framework/inc/xml/menuconfiguration.hxx
index 954fc2ae5e3e..1ce511618112 100644
--- a/framework/inc/xml/menuconfiguration.hxx
+++ b/framework/inc/xml/menuconfiguration.hxx
@@ -85,6 +85,7 @@ class MenuConfiguration
::rtl::OUString aTargetFrame;
::rtl::OUString aImageId;
::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProvider > xDispatchProvider;
+ sal_Int16 nStyle;
};
MenuConfiguration(
diff --git a/framework/inc/xml/menudocumenthandler.hxx b/framework/inc/xml/menudocumenthandler.hxx
index a85a4c200086..cd73d4b8df66 100644
--- a/framework/inc/xml/menudocumenthandler.hxx
+++ b/framework/inc/xml/menudocumenthandler.hxx
@@ -109,13 +109,14 @@ class ReadMenuDocumentHandlerBase : public ThreadHelpBase, // Struct for right
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler> m_xReader;
void initPropertyCommon( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > &rProps,
const rtl::OUString &rCommandURL, const rtl::OUString &rHelpId,
- const rtl::OUString &rLabel);
+ const rtl::OUString &rLabel, sal_Int16 nItemStyleBits );
private:
rtl::OUString m_aType;
rtl::OUString m_aLabel;
rtl::OUString m_aContainer;
rtl::OUString m_aHelpURL;
rtl::OUString m_aCommandURL;
+ rtl::OUString m_aStyle;
::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > m_aItemProp;
};
@@ -306,7 +307,7 @@ class OWriteMenuDocumentHandler
virtual void WriteMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rSubMenuContainer ) throw
( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
- virtual void WriteMenuItem( const rtl::OUString& aCommandURL, const rtl::OUString& aLabel, const rtl::OUString& aHelpURL );
+ virtual void WriteMenuItem( const rtl::OUString& aCommandURL, const rtl::OUString& aLabel, const rtl::OUString& aHelpURL, sal_Int16 nStyle = 0 );
virtual void WriteMenuSeparator();
com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xMenuBarContainer;
diff --git a/framework/inc/xml/toolboxconfigurationdefines.hxx b/framework/inc/xml/toolboxconfigurationdefines.hxx
index be8292ada8de..c3cd030f6213 100644
--- a/framework/inc/xml/toolboxconfigurationdefines.hxx
+++ b/framework/inc/xml/toolboxconfigurationdefines.hxx
@@ -29,6 +29,7 @@
#define ATTRIBUTE_WIDTH "width"
#define ATTRIBUTE_USER "userdefined"
#define ATTRIBUTE_HELPID "helpid"
+#define ATTRIBUTE_TOOLTIP "tooltip"
#define ATTRIBUTE_ITEMSTYLE "style"
#define ATTRIBUTE_ID "id"
@@ -78,6 +79,8 @@
#define ATTRIBUTE_ITEMSTYLE_AUTOSIZE "autosize"
#define ATTRIBUTE_ITEMSTYLE_DROPDOWN "dropdown"
#define ATTRIBUTE_ITEMSTYLE_REPEAT "repeat"
+#define ATTRIBUTE_ITEMSTYLE_TEXT "text"
#define ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY "dropdownonly"
+#define ATTRIBUTE_ITEMSTYLE_IMAGE "image"
#endif // __FRAMEWORK_XML_TOOLBOXCONFIGURATIONDEFINES_HXX_
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index ccf64e6d0033..ae5231ed8b24 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -77,6 +77,7 @@ class OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right
TB_ATTRIBUTE_HELPID,
TB_ATTRIBUTE_STYLE,
TB_ATTRIBUTE_UINAME,
+ TB_ATTRIBUTE_TOOLTIP,
TB_XML_ENTRY_COUNT
};
@@ -159,10 +160,13 @@ class OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right
sal_Int32 m_nHashCode_Style_DropDown;
sal_Int32 m_nHashCode_Style_Repeat;
sal_Int32 m_nHashCode_Style_DropDownOnly;
+ sal_Int32 m_nHashCode_Style_Text;
+ sal_Int32 m_nHashCode_Style_Image;
rtl::OUString m_aType;
rtl::OUString m_aLabel;
rtl::OUString m_aStyle;
rtl::OUString m_aHelpURL;
+ rtl::OUString m_aTooltip;
rtl::OUString m_aIsVisible;
rtl::OUString m_aCommandURL;
};
@@ -181,7 +185,7 @@ class OWriteToolBoxDocumentHandler : private ThreadHelpBase // Struct for right
::com::sun::star::uno::RuntimeException );
protected:
- virtual void WriteToolBoxItem( const rtl::OUString& aCommandURL, const rtl::OUString& aLabel, const rtl::OUString& aHelpURL,
+ virtual void WriteToolBoxItem( const rtl::OUString& aCommandURL, const rtl::OUString& aLabel, const rtl::OUString& aHelpURL, const rtl::OUString& aTooltip, sal_Int16 nStyle,
sal_Int16 nWidth, sal_Bool bVisible ) throw
( ::com::sun::star::xml::sax::SAXException,
::com::sun::star::uno::RuntimeException );
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 588c59d8f323..3a8bbe8a66c1 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -171,6 +171,12 @@ MenuManager::MenuManager(
for ( USHORT i = 0; i < nItemCount; i++ )
{
USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i );
+ bool bShowMenuImages( m_bShowMenuImages );
+ MenuItemBits nBits = pMenu->GetItemBits( nItemId );
+ // overwrite the default?
+ if ( nBits )
+ bShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+
PopupMenu* pPopupMenu = pMenu->GetPopupMenu( nItemId );
if ( pPopupMenu )
@@ -217,7 +223,7 @@ MenuManager::MenuManager(
aQueryLabelItemIdVector.push_back( nItemId );
#endif
// Set image for the addon popup menu item
- if ( m_bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST ))
+ if ( bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST ))
{
Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast );
if ( !!aImage )
@@ -249,7 +255,7 @@ MenuManager::MenuManager(
aQueryLabelItemIdVector.push_back( nItemId );
#endif
- if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId ))
+ if ( bShowMenuImages && !pMenu->GetItemImage( nItemId ))
{
Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast );
if ( !!aImage )
@@ -274,7 +280,7 @@ MenuManager::MenuManager(
aQueryLabelItemIdVector.push_back( nItemId );
#endif
- if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId ))
+ if ( bShowMenuImages && !pMenu->GetItemImage( nItemId ))
{
Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast );
if ( !!aImage )
@@ -283,7 +289,7 @@ MenuManager::MenuManager(
}
else if ( pMenu->GetItemType( i ) != MENUITEM_SEPARATOR )
{
- if ( m_bShowMenuImages )
+ if ( bShowMenuImages )
{
if ( AddonMenuManager::IsAddonMenuId( nItemId ))
{
@@ -1131,7 +1137,13 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B
USHORT nId = _pMenu->GetItemId( nPos );
if ( _pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
{
- if ( bShowMenuImages )
+ bool bTmpShowMenuImages( bShowMenuImages );
+ MenuItemBits nBits = _pMenu->GetItemBits( nId );
+ // overwrite the default?
+ if ( nBits )
+ bTmpShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+
+ if ( bTmpShowMenuImages )
{
sal_Bool bImageSet = sal_False;
::rtl::OUString aImageId;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 01934dfb47df..121436998efa 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -245,6 +245,7 @@ bool LayoutManager::UIElement::operator< ( const LayoutManager::UIElement& aUIEl
LayoutManager::UIElement& LayoutManager::UIElement::operator= ( const LayoutManager::UIElement& rUIElement )
{
+ if (this == &rUIElement) { return *this; }
m_aType = rUIElement.m_aType;
m_aName = rUIElement.m_aName;
m_aUIName = rUIElement.m_aUIName;
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index a354b01d3c32..3e9071052011 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -49,6 +49,7 @@
#include "comphelper/processfactory.hxx"
#include "comphelper/sequenceashashmap.hxx"
+#include "comphelper/configurationhelper.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/ustrbuf.hxx"
@@ -745,6 +746,41 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
Any value( xNameAccess->getByName(rtl::OUString::createFromAscii(pNode)) );
sURL = value.get<rtl::OUString> ();
+ // extend the URLs with Office locale argument
+ INetURLObject aURLObj( sURL );
+
+ rtl::OUString sParam = aURLObj.GetParam();
+ rtl::OUStringBuffer aURLBuf( sParam );
+ if ( sParam.getLength() > 0 )
+ aURLBuf.appendAscii( "&" );
+ aURLBuf.appendAscii( "lang=" );
+
+ // read locale from configuration
+ ::rtl::OUString sLocale;
+ ::rtl::OUString sPackage = ::rtl::OUString::createFromAscii("org.openoffice.Setup");
+ ::rtl::OUString sRelPath = ::rtl::OUString::createFromAscii("L10N");
+ ::rtl::OUString sKey = ::rtl::OUString::createFromAscii("ooLocale");
+
+ try
+ {
+ ::comphelper::ConfigurationHelper::readDirectKey(comphelper::getProcessServiceFactory(),
+ sPackage,
+ sRelPath,
+ sKey,
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= sLocale;
+ }
+ catch(const com::sun::star::uno::RuntimeException& exRun)
+ { throw exRun; }
+ catch(const com::sun::star::uno::Exception&)
+ { sLocale = ::rtl::OUString::createFromAscii("en-US"); }
+
+ aURLBuf.append(sLocale);
+
+ sParam = aURLBuf.makeStringAndClear();
+
+ aURLObj.SetParam( sParam );
+ sURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
+
Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
comphelper::getProcessServiceFactory()->createInstance(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 311776c1bdaf..d1c4d9d6c2da 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -68,6 +68,9 @@
#include <classes/fwkresid.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <xml/menuconfiguration.hxx>
+#include <uielement/menubarmanager.hxx>
+
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -75,6 +78,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::frame::status;
using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::container;
namespace framework
{
@@ -326,5 +330,67 @@ IMPL_STATIC_LINK_NOINSTANCE( GenericToolbarController, ExecuteHdl_Impl, ExecuteI
return 0;
}
+MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, USHORT nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier )
+{
+}
+
+MenuToolbarController::~MenuToolbarController()
+{
+ try
+ {
+ if ( m_xMenuManager.is() )
+ m_xMenuManager->dispose();
+ }
+ catch( Exception& ) {}
+ if ( pMenu )
+ {
+ delete pMenu;
+ pMenu = NULL;
+ }
+
+}
+
+class Toolbarmenu : public PopupMenu
+{
+ public:
+ Toolbarmenu();
+ ~Toolbarmenu();
+};
+
+Toolbarmenu::Toolbarmenu()
+{
+ OSL_TRACE("**** contstructing Toolbarmenu 0x%x", this );
+}
+
+Toolbarmenu::~Toolbarmenu()
+{
+ OSL_TRACE("**** destructing Toolbarmenu 0x%x", this );
+}
+
+void SAL_CALL MenuToolbarController::click() throw (RuntimeException)
+{
+ createPopupWindow();
+}
+
+Reference< XWindow > SAL_CALL
+MenuToolbarController::createPopupWindow() throw (::com::sun::star::uno::RuntimeException)
+{
+ if ( !pMenu )
+ {
+ Reference< XDispatchProvider > xDispatch;
+ Reference< XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), UNO_QUERY );
+ pMenu = new Toolbarmenu();
+ m_xMenuManager.set( new MenuBarManager( m_xServiceManager, m_xFrame, xURLTransformer, xDispatch, m_aModuleIdentifier, pMenu, sal_True, sal_True ) );
+ if ( m_xMenuManager.is() )
+ {
+ MenuBarManager* pMgr = dynamic_cast< MenuBarManager* >( m_xMenuManager.get() );
+ pMgr->SetItemContainer( m_xMenuDesc );
+ }
+ }
+
+ ::Rectangle aRect( m_pToolbar->GetItemRect( m_nID ) );
+ pMenu->Execute( m_pToolbar, aRect, POPUPMENU_EXECUTE_DOWN );
+ return NULL;
+}
} // namespace
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 0b26f96829d2..fd42de48ae84 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -74,6 +74,7 @@
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
//_________________________________________________________________________________________________________________
@@ -136,6 +137,7 @@ static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
static const char ITEM_DESCRIPTOR_MODULEIDENTIFIER[] = "ModuleIdentifier";
static const char ITEM_DESCRIPTOR_DISPATCHPROVIDER[] = "DispatchProvider";
+static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
const sal_Int32 LEN_DESCRIPTOR_COMMANDURL = 10;
const sal_Int32 LEN_DESCRIPTOR_HELPURL = 7;
@@ -144,6 +146,7 @@ const sal_Int32 LEN_DESCRIPTOR_LABEL = 5;
const sal_Int32 LEN_DESCRIPTOR_TYPE = 4;
const sal_Int32 LEN_DESCRIPTOR_MODULEIDENTIFIER = 16;
const sal_Int32 LEN_DESCRIPTOR_DISPATCHPROVIDER = 16;
+static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = 5;
const sal_uInt16 ADDONMENU_MERGE_ITEMID_START = 1500;
@@ -1327,6 +1330,11 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
Reference< XDispatch > xDispatch;
Reference< XStatusListener > xStatusListener;
PopupMenu* pPopup = pMenu->GetPopupMenu( nItemId );
+ bool bItemShowMenuImages = m_bShowMenuImages;
+ MenuItemBits nBits = pMenu->GetItemBits( nItemId );
+ // overwrite the show icons on menu option?
+ if ( nBits )
+ bItemShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
if ( pPopup )
{
// Retrieve module identifier from Help Command entry
@@ -1422,7 +1430,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
pSubMenuManager->m_aMenuItemCommand = ::rtl::OUString();
// Set image for the addon popup menu item
- if ( m_bShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST ))
+ if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST ))
{
Reference< XFrame > xTemp( rFrame );
Image aImage = GetImageFromURL( xTemp, aItemCommand, FALSE, m_bWasHiContrast );
@@ -1441,7 +1449,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
}
else if ( pMenu->GetItemType( i ) != MENUITEM_SEPARATOR )
{
- if ( m_bShowMenuImages )
+ if ( bItemShowMenuImages )
{
if ( AddonMenuManager::IsAddonMenuId( nItemId ))
{
@@ -1752,7 +1760,7 @@ void MenuBarManager::FillMenu(
sal_uInt16 nType = 0;
Reference< XIndexAccess > xIndexContainer;
Reference< XDispatchProvider > xDispatchProvider( rDispatchProvider );
-
+ sal_Int16 nStyle = 0;
try
{
if ( rItemContainer->getByIndex( n ) >>= aProp )
@@ -1781,6 +1789,8 @@ void MenuBarManager::FillMenu(
else if ( aPropName.equalsAsciiL( ITEM_DESCRIPTOR_DISPATCHPROVIDER,
LEN_DESCRIPTOR_DISPATCHPROVIDER ))
aProp[i].Value >>= xDispatchProvider;
+ else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_STYLE, ITEM_DESCRIPTOR_STYLE_LEN ))
+ aProp[i].Value >>= nStyle;
}
if ( nType == ::com::sun::star::ui::ItemType::DEFAULT )
@@ -1791,7 +1801,15 @@ void MenuBarManager::FillMenu(
sal_Int32 nHelpId = aHelpURL.toInt32();
if ( nHelpId > 0 )
pMenu->SetHelpId( nId, (USHORT)nHelpId );
-
+ if ( nStyle )
+ {
+ MenuItemBits nBits = pMenu->GetItemBits( nId );
+ if ( nStyle & ::com::sun::star::ui::ItemStyle::ICON )
+ nBits |= MIB_ICON;
+ if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT )
+ nBits |= MIB_TEXT;
+ pMenu->SetItemBits( nId, nBits );
+ }
if ( xIndexContainer.is() )
{
PopupMenu* pNewPopupMenu = new PopupMenu;
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 6463dd634c20..0d53206fc1c1 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -71,7 +71,6 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
-#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
@@ -122,6 +121,7 @@ namespace framework
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
+static const char ITEM_DESCRIPTOR_TOOLTIP[] = "Tooltip";
static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
@@ -131,6 +131,7 @@ static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
static const sal_Int32 ITEM_DESCRIPTOR_COMMANDURL_LEN = 10;
static const sal_Int32 ITEM_DESCRIPTOR_HELPURL_LEN = 7;
+static const sal_Int32 ITEM_DESCRIPTOR_TOOLTIP_LEN = 7;
static const sal_Int32 ITEM_DESCRIPTOR_CONTAINER_LEN = 23;
static const sal_Int32 ITEM_DESCRIPTOR_LABEL_LEN = 5;
static const sal_Int32 ITEM_DESCRIPTOR_TYPE_LEN = 4;
@@ -143,6 +144,7 @@ static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:";
//static sal_Int32 HELPID_PREFIX_LENGTH = 7;
static const USHORT STARTID_CUSTOMIZE_POPUPMENU = 1000;
+#define MENUPREFIX "private:resource/menubar/"
class ImageOrientationListener : public svt::FrameStatusListener
{
@@ -968,8 +970,13 @@ void ToolBarManager::CreateControllers()
}
else
{
+ MenuDescriptionMap::iterator it = m_aMenuMap.find( nId );
+ if ( it == m_aMenuMap.end() )
xController = Reference< XStatusListener >(
new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL ));
+ else
+ xController = Reference< XStatusListener >(
+ new MenuToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL, m_aModuleIdentifier, m_aMenuMap[ nId ] ));
}
}
else if ( pController )
@@ -1101,6 +1108,10 @@ sal_uInt16 ToolBarManager::ConvertStyleToToolboxItemBits( sal_Int32 nStyle )
nItemBits |= TIB_REPEAT;
if ( nStyle & ::com::sun::star::ui::ItemStyle::DROPDOWN_ONLY )
nItemBits |= TIB_DROPDOWNONLY;
+ if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT )
+ nItemBits |= TIB_TEXT_ONLY;
+ if ( nStyle & ::com::sun::star::ui::ItemStyle::ICON )
+ nItemBits |= TIB_ICON_ONLY;
return nItemBits;
}
@@ -1130,8 +1141,8 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
Reference< XUIConfigurationManagerSupplier > xSupplier( xModel, UNO_QUERY );
if ( xSupplier.is() )
{
- Reference< XUIConfigurationManager > xDocUICfgMgr( xSupplier->getUIConfigurationManager(), UNO_QUERY );
- m_xDocImageManager = Reference< XImageManager >( xDocUICfgMgr->getImageManager(), UNO_QUERY );
+ m_xDocUICfgMgr.set( xSupplier->getUIConfigurationManager(), UNO_QUERY );
+ m_xDocImageManager = Reference< XImageManager >( m_xDocUICfgMgr->getImageManager(), UNO_QUERY );
m_xDocImageManager->addConfigurationListener(
Reference< XUIConfigurationListener >(
static_cast< OWeakObject* >( this ), UNO_QUERY ));
@@ -1153,8 +1164,8 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance(
SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
UNO_QUERY );
- Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
- m_xModuleImageManager = Reference< XImageManager >( xUICfgMgr->getImageManager(), UNO_QUERY );
+ m_xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
+ m_xModuleImageManager = Reference< XImageManager >( m_xUICfgMgr->getImageManager(), UNO_QUERY );
m_xModuleImageManager->addConfigurationListener( Reference< XUIConfigurationListener >(
static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
@@ -1166,6 +1177,8 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
m_aControllerMap.clear();
m_aCommandMap.clear();
+ m_aMenuMap.clear();
+
CommandInfo aCmdInfo;
for ( sal_Int32 n = 0; n < rItemContainer->getCount(); n++ )
{
@@ -1173,11 +1186,13 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
rtl::OUString aCommandURL;
rtl::OUString aLabel;
rtl::OUString aHelpURL;
+ rtl::OUString aTooltip;
sal_uInt16 nType( ::com::sun::star::ui::ItemType::DEFAULT );
sal_uInt16 nWidth( 0 );
sal_Bool bIsVisible( sal_True );
sal_uInt32 nStyle( 0 );
+ Reference< XIndexAccess > aMenuDesc;
try
{
if ( rItemContainer->getByIndex( n ) >>= aProp )
@@ -1185,9 +1200,44 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
for ( int i = 0; i < aProp.getLength(); i++ )
{
if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_COMMANDURL, ITEM_DESCRIPTOR_COMMANDURL_LEN ))
+ {
aProp[i].Value >>= aCommandURL;
+ if ( aCommandURL.compareToAscii(MENUPREFIX, RTL_CONSTASCII_LENGTH(MENUPREFIX) ) == 0 )
+ {
+ try
+ {
+ Reference< XIndexAccess > xMenuContainer;
+ if ( m_xDocUICfgMgr.is() )
+ xMenuContainer = m_xDocUICfgMgr->getSettings( aCommandURL, sal_False );
+ if ( !xMenuContainer.is() && m_xUICfgMgr.is() )
+ xMenuContainer = m_xUICfgMgr->getSettings( aCommandURL, sal_False );
+ if ( xMenuContainer.is() && xMenuContainer->getCount() )
+ {
+ Sequence< PropertyValue > aProps;
+ // drop down menu info is currently
+ // the first ( and only ) menu
+ // in the menusettings container
+ xMenuContainer->getByIndex(0) >>= aProps;
+ for ( sal_Int32 index=0; index<aProps.getLength(); ++index )
+ {
+ if ( aProps[ index ].Name.equalsAsciiL( ITEM_DESCRIPTOR_CONTAINER, ITEM_DESCRIPTOR_CONTAINER_LEN ))
+
+ {
+ aProps[ index ].Value >>= aMenuDesc;
+ break;
+ }
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ }
+ }
+ }
else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_HELPURL, ITEM_DESCRIPTOR_HELPURL_LEN ))
aProp[i].Value >>= aHelpURL;
+ else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_TOOLTIP, ITEM_DESCRIPTOR_TOOLTIP_LEN ))
+ aProp[i].Value >>= aTooltip;
else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_LABEL, ITEM_DESCRIPTOR_LABEL_LEN ))
aProp[i].Value >>= aLabel;
else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_TYPE, ITEM_DESCRIPTOR_TYPE_LEN ))
@@ -1205,8 +1255,13 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
::rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL ));
sal_uInt16 nItemBits = ConvertStyleToToolboxItemBits( nStyle );
+ if ( aMenuDesc.is() )
+ m_aMenuMap[ nId ] = aMenuDesc;
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
+ if ( aTooltip.getLength() )
+ m_pToolBar->SetQuickHelpText( nId, aTooltip );
+ else
m_pToolBar->SetQuickHelpText( nId, aString );
if ( aLabel.getLength() > 0 )
m_pToolBar->SetItemText( nId, aLabel );
diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx
index 2422d516d0ac..47d8c93f71e0 100644
--- a/framework/source/xml/menudocumenthandler.cxx
+++ b/framework/source/xml/menudocumenthandler.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/ui/ItemType.hpp>
+#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -80,11 +81,13 @@
#define ATTRIBUTE_LABEL "http://openoffice.org/2001/menu^label"
#define ATTRIBUTE_HELPID "http://openoffice.org/2001/menu^helpid"
#define ATTRIBUTE_LINEBREAK "http://openoffice.org/2001/menu^linebreak"
+#define ATTRIBUTE_STYLE "http://openoffice.org/2001/menu^style"
#define ATTRIBUTE_NS_ID "menu:id"
#define ATTRIBUTE_NS_LABEL "menu:label"
#define ATTRIBUTE_NS_HELPID "menu:helpid"
#define ATTRIBUTE_NS_LINEBREAK "menu:linebreak"
+#define ATTRIBUTE_NS_STYLE "menu:style"
#define ATTRIBUTE_XMLNS_MENU "xmlns:menu"
@@ -92,12 +95,16 @@
#define MENUBAR_DOCTYPE "<!DOCTYPE menu:menubar PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"menubar.dtd\">"
+#define ATTRIBUTE_ITEMSTYLE_TEXT "text"
+#define ATTRIBUTE_ITEMSTYLE_IMAGE "image"
+
// Property names of a menu/menu item ItemDescriptor
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
+static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
// special popup menus (filled during runtime) must be saved as an empty popup menu or menuitem!!!
static const sal_Int32 CMD_PROTOCOL_SIZE = 5;
@@ -121,12 +128,27 @@ using namespace ::com::sun::star::ui;
namespace framework
{
+struct MenuStyleItem
+{
+ sal_Int16 nBit;
+ const char* attrName;
+};
+
+MenuStyleItem MenuItemStyles[ ] = {
+ { ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE },
+ { ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT },
+};
+
+
+sal_Int32 nMenuStyleItemEntries = sizeof( MenuItemStyles ) / sizeof( MenuItemStyles[ 0 ] );
+
static void ExtractMenuParameters( const Sequence< PropertyValue > rProp,
::rtl::OUString& rCommandURL,
::rtl::OUString& rLabel,
::rtl::OUString& rHelpURL,
Reference< XIndexAccess >& rSubMenu,
- sal_Int16& rType )
+ sal_Int16& rType,
+ sal_Int16& rStyle )
{
for ( sal_Int32 i = 0; i < rProp.getLength(); i++ )
{
@@ -151,6 +173,10 @@ static void ExtractMenuParameters( const Sequence< PropertyValue > rProp,
{
rProp[i].Value >>= rType;
}
+ else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE ))
+ {
+ rProp[i].Value >>= rStyle;
+ }
}
}
@@ -165,7 +191,8 @@ ReadMenuDocumentHandlerBase::ReadMenuDocumentHandlerBase() :
m_aLabel( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL )),
m_aContainer( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_CONTAINER )),
m_aHelpURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL )),
- m_aCommandURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ))
+ m_aCommandURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL )),
+ m_aStyle( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_STYLE ))
{
}
@@ -207,20 +234,22 @@ throw( SAXException, RuntimeException )
void ReadMenuDocumentHandlerBase::initPropertyCommon(
Sequence< PropertyValue > &rProps, const rtl::OUString &rCommandURL,
- const rtl::OUString &rHelpId, const rtl::OUString &rLabel)
+ const rtl::OUString &rHelpId, const rtl::OUString &rLabel, sal_Int16 nItemStyleBits )
{
rProps[0].Name = m_aCommandURL;
rProps[1].Name = m_aHelpURL;
rProps[2].Name = m_aContainer;
rProps[3].Name = m_aLabel;
- rProps[4].Name = m_aType;
+ rProps[4].Name = m_aStyle;
+ rProps[5].Name = m_aType;
// Common values
rProps[0].Value <<= rCommandURL.intern();
rProps[1].Value <<= rHelpId;
rProps[2].Value <<= Reference< XIndexContainer >();
rProps[3].Value <<= rLabel;
- rProps[4].Value <<= ::com::sun::star::ui::ItemType::DEFAULT;
+ rProps[4].Value <<= nItemStyleBits;
+ rProps[5].Value <<= ::com::sun::star::ui::ItemType::DEFAULT;
}
// -----------------------------------------------------------------------------
@@ -373,6 +402,7 @@ throw( SAXException, RuntimeException )
::rtl::OUString aHelpId;
::rtl::OUString aCommandId;
::rtl::OUString aLabel;
+ sal_Int16 nItemBits(0);
m_bMenuMode = sal_True;
@@ -399,12 +429,29 @@ throw( SAXException, RuntimeException )
aLabel = aValue;
else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID )))
aHelpId = aValue;
+ else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE )))
+ {
+ ::rtl::OUString aTemp( aValue );
+ sal_Int32 nIndex = 0;
+ do
+ {
+ ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex );
+ if ( aToken.getLength() > 0 )
+ {
+ if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
+ if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ }
+ }
+ while ( nIndex >= 0 );
+ }
}
if ( aCommandId.getLength() > 0 )
{
- Sequence< PropertyValue > aSubMenuProp( 5 );
- initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel );
+ Sequence< PropertyValue > aSubMenuProp( 6 );
+ initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel, nItemBits );
aSubMenuProp[2].Value <<= xSubItemContainer;
m_xMenuBarContainer->insertByIndex( m_xMenuBarContainer->getCount(), makeAny( aSubMenuProp ) );
@@ -589,6 +636,7 @@ throw( SAXException, RuntimeException )
::rtl::OUString aHelpId;
::rtl::OUString aCommandId;
::rtl::OUString aLabel;
+ sal_Int16 nItemBits(0);
m_bMenuMode = sal_True;
@@ -614,12 +662,30 @@ throw( SAXException, RuntimeException )
aLabel = aValue;
else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID )))
aHelpId = aValue;
+ else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE )))
+ {
+ ::rtl::OUString aTemp( aValue );
+ sal_Int32 nIndex = 0;
+ do
+ {
+ ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex );
+ if ( aToken.getLength() > 0 )
+ {
+ if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
+ if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ }
+ }
+ while ( nIndex >= 0 );
+ }
+
}
if ( aCommandId.getLength() > 0 )
{
- Sequence< PropertyValue > aSubMenuProp( 5 );
- initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel );
+ Sequence< PropertyValue > aSubMenuProp( 6 );
+ initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel, nItemBits );
aSubMenuProp[2].Value <<= xSubItemContainer;
m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), makeAny( aSubMenuProp ) );
@@ -639,7 +705,7 @@ throw( SAXException, RuntimeException )
::rtl::OUString aHelpId;
::rtl::OUString aCommandId;
::rtl::OUString aLabel;
-
+ sal_Int16 nItemBits(0);
// read attributes for menu item
for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ )
{
@@ -651,12 +717,30 @@ throw( SAXException, RuntimeException )
aLabel = aValue;
else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID )))
aHelpId = aValue;
+ else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE )))
+ {
+ ::rtl::OUString aTemp( aValue );
+ sal_Int32 nIndex = 0;
+ do
+ {
+ ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex );
+ if ( aToken.getLength() > 0 )
+ {
+ if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
+ if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ }
+ }
+ while ( nIndex >= 0 );
+ }
+
}
if ( aCommandId.getLength() > 0 )
{
- Sequence< PropertyValue > aMenuItem( 5 );
- initPropertyCommon( aMenuItem, aCommandId, aHelpId, aLabel );
+ Sequence< PropertyValue > aMenuItem( 6 );
+ initPropertyCommon( aMenuItem, aCommandId, aHelpId, aLabel, nItemBits );
aMenuItem[2].Value <<= Reference< XIndexContainer >();
m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), makeAny( aMenuItem ) );
@@ -809,15 +893,16 @@ throw ( SAXException, RuntimeException )
::rtl::OUString aLabel;
::rtl::OUString aHelpURL;
sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT );
+ sal_Int16 nItemBits( 0 );
Reference< XIndexAccess > xSubMenu;
- ExtractMenuParameters( aProps, aCommandURL, aLabel, aHelpURL, xSubMenu, nType );
+ ExtractMenuParameters( aProps, aCommandURL, aLabel, aHelpURL, xSubMenu, nType, nItemBits );
if ( xSubMenu.is() )
{
if ( aCommandURL.equalsAscii( ADDDIRECT_CMD ) ||
aCommandURL.equalsAscii( AUTOPILOTMENU_CMD ))
{
- WriteMenuItem( aCommandURL, aLabel, aHelpURL );
+ WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits );
bSeparator = sal_False;
}
else if (( aCommandURL.getLength() > 0 ) && !AddonPopupMenu::IsCommandURLPrefix ( aCommandURL ))
@@ -857,7 +942,7 @@ throw ( SAXException, RuntimeException )
if ( aCommandURL.getLength() > 0 )
{
bSeparator = FALSE;
- WriteMenuItem( aCommandURL, aLabel, aHelpURL );
+ WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits );
}
}
else if ( !bSeparator )
@@ -872,7 +957,7 @@ throw ( SAXException, RuntimeException )
}
-void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandURL, const ::rtl::OUString& aLabel, const ::rtl::OUString& aHelpURL)
+void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandURL, const ::rtl::OUString& aLabel, const ::rtl::OUString& aHelpURL, sal_Int16 nStyle )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
@@ -894,6 +979,24 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandUR
m_aAttributeType,
aLabel );
}
+ if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAscii( CMD_PROTOCOL )))
+ {
+ rtl::OUString aValue;
+ MenuStyleItem* pStyle = MenuItemStyles;
+
+ for ( sal_Int32 nIndex = 0; nIndex < nMenuStyleItemEntries; ++nIndex, ++pStyle )
+ {
+ if ( nStyle & pStyle->nBit )
+ {
+ if ( aValue.getLength() )
+ aValue = aValue.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("+") ) );
+ aValue += rtl::OUString::createFromAscii( pStyle->attrName );
+ }
+ }
+ pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_STYLE )),
+ m_aAttributeType,
+ aValue );
+ }
m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() );
m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUITEM )), xList );
diff --git a/framework/source/xml/toolboxdocumenthandler.cxx b/framework/source/xml/toolboxdocumenthandler.cxx
index 78d6f8158413..ba01284accdb 100644
--- a/framework/source/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/xml/toolboxdocumenthandler.cxx
@@ -79,6 +79,7 @@ namespace framework
// Property names of a menu/menu item ItemDescriptor
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
+static const char ITEM_DESCRIPTOR_TOOLTIP[] = "Tooltip";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
@@ -89,6 +90,8 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue > rProp,
::rtl::OUString& rCommandURL,
::rtl::OUString& rLabel,
::rtl::OUString& rHelpURL,
+ ::rtl::OUString& rTooltip,
+ sal_Int16& rStyle,
sal_Int16& rWidth,
sal_Bool& rVisible,
sal_Int16& rType )
@@ -102,6 +105,8 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue > rProp,
}
else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_HELPURL ))
rProp[i].Value >>= rHelpURL;
+ else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_TOOLTIP ))
+ rProp[i].Value >>= rTooltip;
else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ))
rProp[i].Value >>= rLabel;
else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE ))
@@ -110,9 +115,30 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue > rProp,
rProp[i].Value >>= rVisible;
else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_WIDTH ))
rProp[i].Value >>= rWidth;
+ else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE ))
+ rProp[i].Value >>= rStyle;
}
}
+struct ToolboxStyleItem
+{
+ sal_Int16 nBit;
+ const char* attrName;
+};
+
+ToolboxStyleItem Styles[ ] = {
+ { ::com::sun::star::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO },
+ { ::com::sun::star::ui::ItemStyle::ALIGN_LEFT, ATTRIBUTE_ITEMSTYLE_LEFT },
+ { ::com::sun::star::ui::ItemStyle::AUTO_SIZE, ATTRIBUTE_ITEMSTYLE_AUTO },
+ { ::com::sun::star::ui::ItemStyle::REPEAT, ATTRIBUTE_ITEMSTYLE_REPEAT },
+ { ::com::sun::star::ui::ItemStyle::DROPDOWN_ONLY, ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY },
+ { ::com::sun::star::ui::ItemStyle::DROP_DOWN, ATTRIBUTE_ITEMSTYLE_DROPDOWN },
+ { ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE },
+ { ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT },
+};
+
+sal_Int32 nStyleItemEntries = sizeof( Styles ) / sizeof( Styles[ 0 ] );
+
struct ToolBarEntryProperty
{
OReadToolBoxDocumentHandler::ToolBox_XML_Namespace nNamespace;
@@ -135,7 +161,8 @@ ToolBarEntryProperty ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_CO
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_USER },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_HELPID },
{ OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_ITEMSTYLE },
- { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_UINAME }
+ { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_UINAME },
+ { OReadToolBoxDocumentHandler::TB_NS_TOOLBAR, ATTRIBUTE_TOOLTIP },
};
OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XIndexContainer >& rItemContainer ) :
@@ -145,6 +172,7 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde
m_aLabel( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL )),
m_aStyle( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_STYLE )),
m_aHelpURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL )),
+ m_aTooltip( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TOOLTIP )),
m_aIsVisible( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_VISIBLE )),
m_aCommandURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ))
{
@@ -179,6 +207,8 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde
m_nHashCode_Style_DropDown = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_DROPDOWN ).hashCode();
m_nHashCode_Style_Repeat = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_REPEAT ).hashCode();
m_nHashCode_Style_DropDownOnly = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY ).hashCode();
+ m_nHashCode_Style_Text = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_TEXT ).hashCode();
+ m_nHashCode_Style_Image = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_IMAGE ).hashCode();
m_bToolBarStartFound = sal_False;
m_bToolBarEndFound = sal_False;
@@ -298,6 +328,7 @@ throw( SAXException, RuntimeException )
::rtl::OUString aLabel;
::rtl::OUString aCommandURL;
::rtl::OUString aHelpURL;
+ ::rtl::OUString aTooltip;
::rtl::OUString aBitmapName;
sal_uInt16 nItemBits( 0 );
sal_uInt16 nWidth( 0 );
@@ -369,6 +400,12 @@ throw( SAXException, RuntimeException )
}
break;
+ case TB_ATTRIBUTE_TOOLTIP:
+ {
+ aTooltip = xAttribs->getValueByIndex( n );
+ }
+ break;
+
case TB_ATTRIBUTE_STYLE:
{
// read space seperated item style list
@@ -393,6 +430,12 @@ throw( SAXException, RuntimeException )
nItemBits |= ::com::sun::star::ui::ItemStyle::REPEAT;
else if ( nHashCode == m_nHashCode_Style_DropDownOnly )
nItemBits |= ::com::sun::star::ui::ItemStyle::DROPDOWN_ONLY;
+ else if ( nHashCode == m_nHashCode_Style_DropDown )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::DROP_DOWN;
+ else if ( nHashCode == m_nHashCode_Style_Text )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
+ else if ( nHashCode == m_nHashCode_Style_Image )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
}
}
while ( nIndex >= 0 );
@@ -414,13 +457,14 @@ throw( SAXException, RuntimeException )
if ( aCommandURL.getLength() > 0 )
{
- Sequence< PropertyValue > aToolbarItemProp( 6 );
+ Sequence< PropertyValue > aToolbarItemProp( 7 );
aToolbarItemProp[0].Name = m_aCommandURL;
aToolbarItemProp[1].Name = m_aHelpURL;
aToolbarItemProp[2].Name = m_aLabel;
aToolbarItemProp[3].Name = m_aType;
aToolbarItemProp[4].Name = m_aStyle;
aToolbarItemProp[5].Name = m_aIsVisible;
+ aToolbarItemProp[6].Name = m_aTooltip;
aToolbarItemProp[0].Value <<= aCommandURL;
aToolbarItemProp[1].Value <<= aHelpURL;
@@ -428,6 +472,7 @@ throw( SAXException, RuntimeException )
aToolbarItemProp[3].Value = makeAny( ::com::sun::star::ui::ItemType::DEFAULT );
aToolbarItemProp[4].Value <<= nItemBits;
aToolbarItemProp[5].Value <<= bVisible;
+ aToolbarItemProp[6].Value <<= aTooltip;
m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), makeAny( aToolbarItemProp ) );
}
@@ -718,13 +763,15 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
::rtl::OUString aCommandURL;
::rtl::OUString aLabel;
::rtl::OUString aHelpURL;
+ ::rtl::OUString aTooltip;
sal_Bool bVisible( sal_True );
sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT );
sal_Int16 nWidth( 0 );
+ sal_Int16 nStyle( 0 );
- ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, nWidth, bVisible, nType );
+ ExtractToolbarParameters( aProps, aCommandURL, aLabel, aHelpURL, aTooltip, nStyle, nWidth, bVisible, nType );
if ( nType == ::com::sun::star::ui::ItemType::DEFAULT )
- WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, nWidth, bVisible );
+ WriteToolBoxItem( aCommandURL, aLabel, aHelpURL, aTooltip, nStyle, nWidth, bVisible );
else if ( nType == ::com::sun::star::ui::ItemType::SEPARATOR_SPACE )
WriteToolBoxSpace();
else if ( nType == ::com::sun::star::ui::ItemType::SEPARATOR_LINE )
@@ -748,6 +795,8 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
const ::rtl::OUString& rCommandURL,
const ::rtl::OUString& rLabel,
const ::rtl::OUString& rHelpURL,
+ const ::rtl::OUString& rTooltip,
+ sal_Int16 nStyle,
sal_Int16 nWidth,
sal_Bool bVisible )
throw ( SAXException, RuntimeException )
@@ -785,6 +834,32 @@ throw ( SAXException, RuntimeException )
rHelpURL );
}
+ if ( rTooltip.getLength() > 0 )
+ {
+ pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TOOLTIP )),
+ m_aAttributeType,
+ rTooltip );
+ }
+
+ if ( nStyle > 0 )
+ {
+ rtl::OUString aValue;
+ ToolboxStyleItem* pStyle = Styles;
+
+ for ( sal_Int32 nIndex = 0; nIndex < nStyleItemEntries; ++nIndex, ++pStyle )
+ {
+ if ( nStyle & pStyle->nBit )
+ {
+ if ( aValue.getLength() )
+ aValue = aValue.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(" ") ) );
+ aValue += rtl::OUString::createFromAscii( pStyle->attrName );
+ }
+ }
+ pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE )),
+ m_aAttributeType,
+ aValue );
+ }
+
if ( nWidth > 0 )
{
pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )),
diff --git a/goodies/source/filter.vcl/ieps/ieps.cxx b/goodies/source/filter.vcl/ieps/ieps.cxx
index f315ee864310..7f1ecfc65bd0 100644
--- a/goodies/source/filter.vcl/ieps/ieps.cxx
+++ b/goodies/source/filter.vcl/ieps/ieps.cxx
@@ -164,12 +164,54 @@ static void MakeAsMeta(Graphic &rGraphic)
rGraphic = aMtf;
}
+static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName,
+ rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess,
+ oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr)
+{
+#ifdef WNT
+ /*
+ * ooo#72096
+ * On Window the underlying SearchPath searches in order of...
+ * The directory from which the application loaded.
+ * The current directory.
+ * The Windows system directory.
+ * The Windows directory.
+ * The directories that are listed in the PATH environment variable.
+ *
+ * Because one of our programs is called "convert" and there is a convert
+ * in the windows system directory, we want to explicitly search the PATH
+ * to avoid picking up on that one if ImageMagick's convert preceeds it in
+ * PATH.
+ *
+ */
+ rtl::OUString url;
+ rtl::OUString path(_wgetenv(L"PATH"));
+
+ oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData);
+ if (err != osl_File_E_None)
+ return osl_Process_E_NotFound;
+ return osl_executeProcess_WithRedirectedIO(url.pData,
+ pArgs, nArgs, osl_Process_HIDDEN,
+ osl_getCurrentSecurity(), 0, 0, 0, pProcess, pIn, pOut, pErr);
+#else
+ return osl_executeProcess_WithRedirectedIO(rProgName.pData,
+ pArgs, nArgs, osl_Process_SEARCHPATH | osl_Process_HIDDEN,
+ osl_getCurrentSecurity(), 0, 0, 0, pProcess, pIn, pOut, pErr);
+#endif
+}
+
+#if defined(WNT) || defined(OS2)
+# define EXESUFFIX ".exe"
+#else
+# define EXESUFFIX ""
+#endif
+
static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic)
{
TempFile aTemp;
aTemp.EnableKillingFile();
rtl::OUString fileName =
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pstoedit"));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pstoedit"EXESUFFIX));
rtl::OUString arg1 =
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-f"));
rtl::OUString arg2 =
@@ -186,10 +228,10 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
oslFileHandle pIn = NULL;
oslFileHandle pOut = NULL;
oslFileHandle pErr = NULL;
- oslProcessError eErr = osl_executeProcess_WithRedirectedIO(fileName.pData,
- args, sizeof(args)/sizeof(rtl_uString *),
- osl_Process_SEARCHPATH | osl_Process_HIDDEN,
- osl_getCurrentSecurity(), 0, 0, 0, &aProcess, &pIn, &pOut, &pErr);
+ oslProcessError eErr = runProcessWithPathSearch(fileName,
+ args, sizeof(args)/sizeof(rtl_uString *),
+ &aProcess, &pIn, &pOut, &pErr);
+
if (eErr!=osl_Process_E_None)
return false;
@@ -222,15 +264,15 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
}
static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
- Graphic &rGraphic, rtl::OUString &rProgName, rtl_uString **pArgs, size_t nArgs)
+ Graphic &rGraphic, rtl::OUString &rProgName, rtl_uString *pArgs[], size_t nArgs)
{
oslProcess aProcess;
oslFileHandle pIn = NULL;
oslFileHandle pOut = NULL;
oslFileHandle pErr = NULL;
- oslProcessError eErr = osl_executeProcess_WithRedirectedIO(rProgName.pData,
- pArgs, nArgs, osl_Process_SEARCHPATH | osl_Process_HIDDEN,
- osl_getCurrentSecurity(), 0, 0, 0, &aProcess, &pIn, &pOut, &pErr);
+ oslProcessError eErr = runProcessWithPathSearch(rProgName,
+ pArgs, nArgs,
+ &aProcess, &pIn, &pOut, &pErr);
if (eErr!=osl_Process_E_None)
return false;
@@ -251,7 +293,7 @@ static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea
aMemStm.Seek(0);
if (
- eFileErr == osl_File_E_None &&
+ aMemStm.GetEndOfData() &&
GraphicConverter::Import(aMemStm, rGraphic, CVT_PNG) == ERRCODE_NONE
)
{
@@ -270,7 +312,7 @@ static bool RenderAsPNGThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRe
Graphic &rGraphic)
{
rtl::OUString fileName =
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("convert"));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("convert"EXESUFFIX));
// density in pixel/inch
rtl::OUString arg1 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-density"));
// since the preview is also used for PDF-Export & printing on non-PS-printers,
@@ -293,10 +335,10 @@ static bool RenderAsPNGThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
{
#ifdef WNT
rtl::OUString fileName =
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gswin32c"));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gswin32c"EXESUFFIX));
#else
rtl::OUString fileName =
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gs"));
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gs"EXESUFFIX));
#endif
rtl::OUString arg1 =
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-q"));
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_languages/CustomAc.ulf b/instsetoo_native/inc_ooolangpack/windows/msi_languages/CustomAc.ulf
deleted file mode 100644
index 284aee68eebf..000000000000
--- a/instsetoo_native/inc_ooolangpack/windows/msi_languages/CustomAc.ulf
+++ /dev/null
@@ -1,12 +0,0 @@
-[OOO_CUSTOMACTION_1]
-en-US = "A newer version of [ProductName] was found. To install an older version, the newer version needs to be removed first."
-
-[OOO_CUSTOMACTION_2]
-en-US = "The same version of this product is already installed."
-
-[OOO_CUSTOMACTION_3]
-en-US = "An older version of [ProductName] was found. To install a newer version, the older version needs to be removed first."
-
-[OOO_CUSTOMACTION_4]
-en-US = "Please exit [DEFINEDPRODUCT] [DEFINEDVERSION] and the [DEFINEDPRODUCT] [DEFINEDVERSION] Quickstarter before you continue. If you are using a multi-user system, also make sure that no other user has [DEFINEDPRODUCT] [DEFINEDVERSION] open."
-
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index e6ba698fae7f..f316b44d3b4d 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -89,9 +89,9 @@ OpenOffice
DOWNLOADBITMAP ooobitmap.bmp
DOWNLOADSETUPICO ooosetup.ico
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
REGISTRATION_PRODUCT OpenOffice.org
REGISTRATION_CID 926117
}
@@ -153,9 +153,9 @@ OpenOffice_wJRE
DOWNLOADBITMAP ooobitmap.bmp
DOWNLOADSETUPICO ooosetup.ico
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
REGISTRATION_PRODUCT OpenOffice.org
REGISTRATION_CID 926117
}
@@ -224,9 +224,9 @@ OpenOffice_Dev
DOWNLOADSETUPICO ooosetup.ico
LOCALUSERDIR $ORIGIN/..
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
REGISTRATION_PRODUCT OpenOffice.org
REGISTRATION_CID 926117
}
@@ -267,9 +267,9 @@ URE
DONTUSESTARTMENUFOLDER 1
SERVICESPROJEKT 1
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk
PACKAGEMAP package_names_ext.txt
}
@@ -312,9 +312,9 @@ OpenOffice_SDK
DOWNLOADSETUPICO ooosetup.ico
DONTUSESTARTMENUFOLDER 1
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
}
active 1
compression 5
@@ -361,9 +361,9 @@ OpenOffice_Dev_SDK
DOWNLOADSETUPICO ooosetup.ico
DONTUSESTARTMENUFOLDER 1
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/OpenOffice.org/templates.jsp?cid=926383
}
active 1
compression 5
@@ -424,9 +424,9 @@ BrOffice
DOWNLOADBITMAP brobitmap.bmp
DOWNLOADSETUPICO ooosetup.ico
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/BrOffice/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/BrOffice/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/BrOffice/templates.jsp?cid=926383
REGISTRATION_PRODUCT OpenOffice.org
REGISTRATION_CID 926117
}
@@ -492,9 +492,9 @@ BrOffice_wJRE
DOWNLOADBITMAP brobitmap.bmp
DOWNLOADSETUPICO ooosetup.ico
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/BrOffice/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/BrOffice/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/BrOffice/templates.jsp?cid=926383
REGISTRATION_PRODUCT OpenOffice.org
REGISTRATION_CID 926117
}
@@ -566,9 +566,9 @@ BrOffice_Dev
DOWNLOADSETUPICO ooosetup.ico
LOCALUSERDIR $ORIGIN/..
RELATIVE_PATHES_IN_DDF 1
- STARTCENTER_ADDFEATURE_URL http://extensions.services.openoffice.org/getmore?cid=920794
- STARTCENTER_INFO_URL http://www.openoffice.org
- STARTCENTER_TEMPLREP_URL http://extensions.services.openoffice.org/templates?cid=926383
+ STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/BrOffice/extensions.jsp?cid=920794
+ STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/BrOffice/homepage.jsp
+ STARTCENTER_TEMPLREP_URL http://tools.services.openoffice.org/forward/BrOffice/templates.jsp?cid=926383
REGISTRATION_PRODUCT OpenOffice.org
REGISTRATION_CID 926117
}
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 2697d5880b80..49975ad6e626 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -578,7 +578,8 @@ void GrammarCheckingIterator::DequeueAndCheck()
sal_Int32 nStartPos = aFPEntryItem.m_nStartIndex;
sal_Int32 nSuggestedEnd = GetSuggestedEndOfSentence( aCurTxt, nStartPos, aCurLocale );
- DBG_ASSERT( nSuggestedEnd > nStartPos, "nSuggestedEndOfSentencePos calculation failed?" );
+ DBG_ASSERT( (nSuggestedEnd == 0 && aCurTxt.getLength() == 0) || nSuggestedEnd > nStartPos,
+ "nSuggestedEndOfSentencePos calculation failed?" );
linguistic2::ProofreadingResult aRes;
diff --git a/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl b/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl
index 17f72a2be100..6a7a49b826df 100644
--- a/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -262,6 +265,14 @@ published service UnoControlCurrencyFieldModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl b/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl
index d14f602e817a..e5f8207e1ae9 100644
--- a/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -274,6 +277,14 @@ published service UnoControlDateFieldModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlEditModel.idl b/offapi/com/sun/star/awt/UnoControlEditModel.idl
index 705c9f206030..708af3edaaca 100644
--- a/offapi/com/sun/star/awt/UnoControlEditModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlEditModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -274,6 +277,14 @@ published service UnoControlEditModel
@since OOo 3.1
*/
[optional, property] short WritingMode;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlFileControlModel.idl b/offapi/com/sun/star/awt/UnoControlFileControlModel.idl
index eafde096fd73..aba49c351400 100644
--- a/offapi/com/sun/star/awt/UnoControlFileControlModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlFileControlModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -169,6 +172,13 @@ published service UnoControlFileControlModel
*/
[property] com::sun::star::util::Color TextLineColor;
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl b/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl
index 1575e1f6d6a6..a4c8bff2db3f 100644
--- a/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl
@@ -46,6 +46,9 @@
#include <com/sun/star/util/XNumberFormatsSupplier.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -307,6 +310,14 @@ published service UnoControlFormattedFieldModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl b/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl
index 4846980a974c..8db4dec74d4b 100644
--- a/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -250,6 +253,14 @@ published service UnoControlNumericFieldModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl b/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl
index b3bb7691e333..a155588191ca 100644
--- a/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -209,6 +212,14 @@ published service UnoControlPatternFieldModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl b/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl
index 79bed704660f..0412ebc8c129 100644
--- a/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl
@@ -42,6 +42,9 @@
#include <com/sun/star/util/Color.idl>
#endif
+#ifndef __com_sun_star_style_VerticalAlignment_idl__
+#include <com/sun/star/style/VerticalAlignment.idl>
+#endif
//=============================================================================
@@ -254,6 +257,14 @@ published service UnoControlTimeFieldModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ //-------------------------------------------------------------------------
+
+ /** specifies the vertical alignment of the text in the control.
+
+ @since OpenOffice.org 3.3
+ */
+ [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
};
//=============================================================================
diff --git a/offapi/com/sun/star/form/FormController.idl b/offapi/com/sun/star/form/FormController.idl
index 03e4bffc2074..4bd94946f1c1 100644
--- a/offapi/com/sun/star/form/FormController.idl
+++ b/offapi/com/sun/star/form/FormController.idl
@@ -84,127 +84,26 @@ module runtime {
//=============================================================================
-/** specifies a component controlling the interaction between the user and form functionality.
-
- <p>As soon as a form (containing controls) is to be presented to the user,
- there is a need for an instance controlling the user interaction.<br/>
- Such a <type>FormController</type> is responsible for dialog processing,
- like controlling the tab order and the grouping of controls.</p>
-
- <p>As a form may contain one or many subforms, a <type>FormController</type> may
- contain one or more other <type>FormController</type>s, so the form model structure or hierarchy
- is reflected in the structure of <type>FormController</type>s.</p>
-
- <h3>Responsibilities</h3>
- <p>A <type>FormController</type> is responsible for a <type scope="com::sun::star::awt">UnoControlContainer</type>,
- and all controls therein.</p>
-
- <p>Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form
- contains controls bound to a database, or to an external validator, then the form controller will
- check their current value when the current record is to be saved to the database.</p>
-
- <p>First, it will check whether any controls with an external validator exist. If so, those validators
- will be asked to validate the current control content. If this fails, the message provided by the validator
- is displayed to the user, the control is focused, and the update of the record is vetoed.</p>
-
- <p>Second, the controls are examined for NULL values. If a control is bound to a database field which
- is declared to be <code>NOT NULL</code>, no auto-increment field, but still <NULL/>, then an error
- message is shown to the user saying that input is required, the respective control is focused, and
- the update of the record is vetoed.</p>
-
- <p>Note that you can precent the second check - for database fields containing <NULL/> values - on
- a per-form and a per-database basis.<br/>
- For the former, you need to add a boolean property <code>FormsCheckRequiredFields</code> to the form
- (aka the <code>FormController</code>'s model), using its
- <member scope="com::sun::star::beans">XPropertyContainer::addProperty</member> method, with a value
- of <FALSE/>.<br/>
- For the latter, you need to set the respective property of the data source's <code>Settings</code>
- (also named <code>FormsCheckRequiredFields</code>) to <FALSE/>.</p>
-
- <p>Alternatively, you can prevent the check on a per-control basis, using the
- <member>DataAwareControlModel::InputRequired</member> property of a single control model.</p>
-
- @see com::sun::star::form::component:Form
- @see com::sun::star::awt::XTabController
- @see com::sun::star::form::binding::BindableControlModel
- @see com::sun::star::sdb::DataSource::Settings
+/** is superseded by <type scope="com::sun::star::form::runtime">FormController</type>.
+ @deprecated
*/
published service FormController
{
- /** allows delegating form controller functionality to the component
-
- <p>If a control which the controller is responsible for supports the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
- interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its
- functionality to the controller by querying the dispatch interceptor for it.</p>
- */
[optional] service FormControllerDispatcher;
-
- /** denotes the instance which is used to implement operations on the form which the controller
- works for.
-
- <p>This instance can be used, for instance, to determine the current state of certain form features.</p>
- */
[optional, property] ::com::sun::star::form::runtime::XFormOperations FormOperations;
/** is used for notifying the (de)activation of the controller.
*/
interface com::sun::star::form::XFormController;
-
- /** is used for tab controlling and grouping of the controls.
- */
interface com::sun::star::awt::XTabController;
-
-
- /** A FormController may have a parent controller, such as when the related form is a subform.
- */
interface com::sun::star::container::XChild;
-
-
- /** A FormController must be disposable.
- */
interface com::sun::star::lang::XComponent;
-
-
- /** A FormController must provide access to its sub controllers.
- */
interface com::sun::star::container::XEnumerationAccess;
-
-
- /** A FormController must communicate if any of its children (means sub controllers) or contained
- controls have been modified.
- */
interface com::sun::star::util::XModifyBroadcaster;
-
- /** used to notify deletions of data in the form before they happen.
-
- <p>A form controller listens for deletion events at the form it is responsible for.<br/>
- If and only if no <type>XConfirmDeleteListener</type> is registered at
- the controller, it uses an own dialog to ask the user for confirmation.</p>
-
- <p>You may use this interface to integrate your own confirmation dialogs.</p>
- */
interface com::sun::star::form::XConfirmDeleteBroadcaster;
-
- /** used to notify errors which happen in the form the controller is responsible for.
-
- <p>A form controller listens for error events at the form it is responsible for.<br/>
- If and only if no <type scope="com::sun::star::sdb">XSQLErrorListener</type> is registered at the controller, it
- uses an own dialog to notify the user of the error.</p>
-
- */
interface com::sun::star::sdb::XSQLErrorBroadcaster;
-
- /** is used for multiplexing row set events happening on the form which the controller is responsible for.
- */
interface com::sun::star::sdb::XRowSetApproveBroadcaster;
-
- /** is used broadcasting parameter events in the form.
-
- <p>A form controller listens for parameter events at the form it is responsible for.<br/>
- If and only if no <type>XDatabaseParameterListener</type> is registered at the controller, it
- uses an own dialog to ask the user for parameter values.</p>
- */
interface com::sun::star::form::XDatabaseParameterBroadcaster;
};
diff --git a/offapi/com/sun/star/form/FormControllerDispatcher.idl b/offapi/com/sun/star/form/FormControllerDispatcher.idl
index 96cab9ee73f1..8e2513b62102 100644
--- a/offapi/com/sun/star/form/FormControllerDispatcher.idl
+++ b/offapi/com/sun/star/form/FormControllerDispatcher.idl
@@ -40,177 +40,13 @@ module com { module sun { module star { module form {
//=============================================================================
-/** specifies a component which can be used to dispatch form controller functionality.
+/** is not used anymore, and superseded by <type scope="com::sun::star::form::runtime">FormController</type> and
+ <type scope="com::sun::star::form::runtime">FormOperations</type>.
- <p>A form controller dispatcher is an instance which provides access to dispatchers
- (<type scope="com::sun::star::frame">XDispatch</type>) for certain form controller
- functionality.</p>
-
- <p>The way how access to these dispatchers is provided is not defined. It may either
- be directly via an <type scope="com::sun::star::frame">XDispatchProvider</type> interface,
- or indirectly, e.g. by registering dispatch interceptors (<type scope="com::sun::star::frame">XDispatchProviderInterceptor</type>)
- at another instance which supports this (by exposing the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
- interface).</p>
-
- <p>In any scenario, foreign components have a (implicit or explicit) possibility to request a dispatcher
- for a given URL.</p>
-
- <p>Below, there's a list of URLs which have a defined meaning - if a <type>FormControllerDispatcher</type>
- implementation supports one of them, there must be a guaranteed semantices. However, concrete implementations
- may support an arbitrary sub or super set of these URLs.</p>
-
- <p>In general, all URLs start with the same prefix, namely <em>.uno:FormController/</em>. To this, a suffix is
- appended which describes the requested functionality.<br/>
- Example: The URL suffix for deleting the current record is <em>deleteRecord</em>, so the complete URL for
- requesting a dispatcher for this functionality is <em>.uno:FormController/deleteRecord</em>.</p>
-
- <p>Some URLs may require parameters. For this, the sequence of <type scope="com::sun::star::beans">PropertyValue</type>s
- passed to the <member scope="com::sun::star::frame">XDispatch::dispatch</member> call is used - every property value is
- used as one named parameter.</p>
-
- <p>For all URLs, interested parties can register as status listeners (<type scope="com::sun::star::frame">XStatusListener</type>)
- at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or
- disabled.<br/>
- For instance, the URL with the suffix <em>moveToFirst</em> is associated with moving the form to the first
- record, and it will be disabled in case the form is already positioned on the first record.</p>
-
- <p>Nearly all of the functionality offered by a <type>FormControllerDispatcher</type> can also be
- reached by other means. E.g., moving a form to its first record can be achieved by calling the
- method <member scope="com::sun::star::sdbc">XResultSet::first</member> of the form.<br/>
- However, the advantage of using a <type>FormControllerDispatcher</type> is that it's usually implemented
- by a component which has additional knowledge about the form. For instance, in a document which
- displays a form, there might be a control which contains uncommitted changes, plus a control
- whose changes were already committed to the current record, but <em>not</em> to the database. Simply
- calling <member scope="com::sun::star::sdbc">XResultSet::first</member> on the form would lose
- both the content in the uncommitted control, and the changes in the current record.<br/>
- An <type>FormControllerDispatcher</type> is expected to care for both of these.</p>
-
- <table style="width:100%;" border="0" cellpadding="2" cellspacing="2"><tbody>
-
- <tr style="vertical-align: top;">
- <td><b>URL suffix</b></td>
- <td><b>functionality</b></td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>positionForm</em></td>
- <td>positions the form on a record given by absolute number.<br/>
- There's one parameter for this functionality, named <em>Position</em>, which must be a long
- value specifying the absolute position to which the form should be moved</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>RecordCount</em></td>
- <td>This is a passive functionality: It cannot be dispatched, instead, interested parties may
- use the dispatcher to add as <type scope="com::sun::star::frame">XStatusListener</type>, and be
- notified when the record count changes.<br/>
- The status value which is being notified (<member scope="com::sun::star::frame">FeatureStateEvent::State</member>)
- is a string which can be used to display the record count. In particular, if the record count is not yet known
- (<member scope="com::sun::star::sdb">RowSet::IsRowCountFinal</member> is <FALSE/>), this is indicated in the
- string, too.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>moveToFirst</em></td>
- <td>moves the form to the first record</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>moveToPrev</em></td>
- <td>moves the form to the record preceding the current one</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>moveToNext</em></td>
- <td>moves the form to the record after the current one</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>moveToLast</em></td>
- <td>moves the form to the last record</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>moveToNew</em></td>
- <td>moves the form to the virtual "insert row", where new records can be inserted</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>saveRecord</em></td>
- <td>Commits any potentially pending changes in the current control, and saves the current record to
- the database, or inserts a new record if the form is currently positioned on the virtual insertion row.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>undoRecord</em></td>
- <td>reverts the changes done to the current record. Basically, this means refreshing the
- current row from the database, and updating all controls with the new content.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>deleteRecord</em></td>
- <td>deletes the current record, after asking the user for confirmation.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>refreshForm</em></td>
- <td>reloads the complete form. After this, the form is positioned on the first record</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>sortUp</em></td>
- <td>Adds an order clause to the form, to sort it ascending by the field which the current control is bound to,
- and then reloads the form.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>sortDown</em></td>
- <td>Adds an order clause to the form, to sort it descending by the field which the current control is bound to,
- and then reloads the form.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>sort</em></td>
- <td>opens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog
- is closed with OK, the form is reloaded after setting the new sorting order.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>autoFilter</em></td>
- <td>creates, from the current control, a filter for the form. This is, if the current control is bound to
- the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'"
- is created and set at the form. After this, the form is reloaded.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>filter</em></td>
- <td>opens an dialog, which allows the user to manipulate the current filter of the form. If the dialog
- is closed with OK, the form is reloaded after setting the new filter.</td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>applyFilter</em></td>
- <td><p>Toggles the <member scope="com::sun::star::sdb">RowSet::ApplyFilter</member> property
- of the form.</p>
- <p>Additionally, status listeners will be provided with the current (boolean) state of this property
- in the <member scope="com::sun::star::frame">FeatureStateEvent::State</member> member of the event
- notified by the dispatcher.</p></td>
- </tr>
-
- <tr style="vertical-align: top;">
- <td><em>removeFilterOrder</em></td>
- <td>completely removes any filter and sorting order from the form, and reloads it.</td>
- </tr>
-
- </tbody></table>
-
- @see FormController
+ @deprecated
*/
published service FormControllerDispatcher
{
- //-------------------------------------------------------------------------
- /** allows direct access to the dispatchers provided by the component.
- */
[optional] interface com::sun::star::frame::XDispatchProvider;
};
diff --git a/offapi/com/sun/star/form/XFormController.idl b/offapi/com/sun/star/form/XFormController.idl
index 832ec077b264..e1ca56c0b276 100644
--- a/offapi/com/sun/star/form/XFormController.idl
+++ b/offapi/com/sun/star/form/XFormController.idl
@@ -49,57 +49,14 @@
//=============================================================================
-/** provides functionality to control the activation of forms controls.
-
- <p>There is a duality of forms (<type scope="com::sun::star::form::component">DataForm</type>)
- and form controllers. In a document view, for every loaded form there is a form controller which is
- responsible for exactly the controls which's models are direct children of the form.<br/>
-
- In some sense, a form controller is the view representation of a form, like a <em>form control</em> is the
- view representation of a <em>form control model</em>.<br/>
-
- This is also reflected in this interface: If you call
- <method scope="com::sun::star::awt">XTabController::getModel</method> on a form controller, the form which
- the controller is responsible for will be returned.<br/>
-
- As always in the model-view-paradigm, there is no way from a model to its controller, mostly, because for
- <em>one</em> given form, there is one controller for <em>every</em> view of the document.</p>
-
- <p>A controller is called <em>active</em> if one of the controls it is responsible for has the focus,
- else inactive. To be notified whenever this activation state of a given controller changes, you can
- add listeners.</p>
-
- @see com::sun::star::form::component::Form
+/** is superseded by <type scope="com::sun::star::form::runtime">XFormController</type>.
+ @deprecated
*/
published interface XFormController: com::sun::star::awt::XTabController
{
- //-------------------------------------------------------------------------
-
- /** access to the currently active control
-
- @returns
- the currently active control, or <NULL/> if there is no such control
- */
- com::sun::star::awt::XControl getCurrentControl();
-
- //-------------------------------------------------------------------------
-
- /** adds the specified listener to receive notifications whenever the activation state of
- the controller changes.
-
- @param l
- the listener to add.
- */
- [oneway] void addActivateListener( [in] com::sun::star::form::XFormControllerListener l );
-
- //-------------------------------------------------------------------------
-
- /** removes the specified listener
-
- @param l
- the listener to remove.
- */
- [oneway] void removeActivateListener( [in] com::sun::star::form::XFormControllerListener l );
+ ::com::sun::star::awt::XControl getCurrentControl();
+ [oneway] void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener l );
+ [oneway] void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener l );
};
diff --git a/offapi/com/sun/star/form/runtime/FilterEvent.idl b/offapi/com/sun/star/form/runtime/FilterEvent.idl
new file mode 100644
index 000000000000..8ec7b202e175
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/FilterEvent.idl
@@ -0,0 +1,64 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __com_sun_star_form_runtime_FilterEvent_idl__
+#define __com_sun_star_form_runtime_FilterEvent_idl__
+
+#include <com/sun/star/lang/EventObject.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module form { module runtime {
+
+//=============================================================================
+
+/** is an event fired by a filter controller, when the filter managed by the controller changes.
+
+ @see XFilterController
+
+ @since OpenOffice.org 3.3
+ */
+struct FilterEvent : ::com::sun::star::lang::EventObject
+{
+ /** denotes the index of the <em>disjunctive term</em> to which the event applies, if any.
+ */
+ long DisjunctiveTerm;
+
+ /** denotes the index of the <em>filter component</em> to which the event applies, if any.
+ */
+ long FilterComponent;
+
+ /** denotes the <em>predicate expression</em> associated with the event.
+ */
+ string PredicateExpression;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/form/runtime/FormController.idl b/offapi/com/sun/star/form/runtime/FormController.idl
new file mode 100644
index 000000000000..17501ffa162c
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/FormController.idl
@@ -0,0 +1,51 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __offapi_com_sun_star_form_runtime_FormController_idl__
+#define __offapi_com_sun_star_form_runtime_FormController_idl__
+
+#include <com/sun/star/form/runtime/XFormController.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module form { module runtime {
+
+//=============================================================================
+
+/** specifies a component controlling the interaction between the user and multiple
+ form controls belonging to a single form.
+ */
+service FormController
+{
+ interface XFormController;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/form/runtime/FormOperations.idl b/offapi/com/sun/star/form/runtime/FormOperations.idl
index c9390ac25918..984a09e0d7c4 100644
--- a/offapi/com/sun/star/form/runtime/FormOperations.idl
+++ b/offapi/com/sun/star/form/runtime/FormOperations.idl
@@ -34,8 +34,8 @@
#ifndef __com_sun_star_form_runtime_XFormOperations_idl__
#include <com/sun/star/form/runtime/XFormOperations.idl>
#endif
-#ifndef __com_sun_star_form_XFormController_idl__
-#include <com/sun/star/form/XFormController.idl>
+#ifndef __com_sun_star_form_runtime_XFormController_idl__
+#include <com/sun/star/form/runtime/XFormController.idl>
#endif
#ifndef __com_sun_star_form_XForm_idl__
#include <com/sun/star/form/XForm.idl>
diff --git a/offapi/com/sun/star/form/runtime/XFilterController.idl b/offapi/com/sun/star/form/runtime/XFilterController.idl
new file mode 100644
index 000000000000..5ee9bab57540
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/XFilterController.idl
@@ -0,0 +1,180 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __offapi_com_sun_star_form_runtime_XFilterController_idl__
+#define __offapi_com_sun_star_form_runtime_XFilterController_idl__
+
+#include <com/sun/star/awt/XControl.idl>
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module form { module runtime {
+
+//=============================================================================
+
+interface XFilterControllerListener;
+
+/** provides access to a form based filter for a database form
+
+ <p>In a form based filter, form controls bound to a searchable database field are replaced with a control
+ which allows entering a search expression. This so-called <em>predicate expression</em> is basically a part of an
+ SQL <code>WHERE</code> clause, but without the the part denoting the database column. For instance, if you
+ have a form control bound to a table column named <code>Name</code>, then entering the string
+ <q>LIKE '%Smith%'</q> effectively consitutes a SQL <code>WHERE</code> clause <code>"Name" LIKE '%Smith%'</code>.</p>
+
+ <p>In the actual document view, there are usually some relaxations to this. For instance, keywords such as
+ <code>LIKE</code> might be localized, according to OpenOffice.org's UI locale. Also, for an equality criterion,
+ the equality sign <code>=</code> is usually omitted. However, this interface here provides programmatic access
+ to the form based filter, so those relaxations are not considered here.</p>
+
+ <p>The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL <code>WHERE</code>
+ class. That is, it is a disjunction of <em>m</em> terms, where each term is a conjunction of <em>n</em> clauses
+ of the form <code>&lt;column&gt; &lt;predicate&gt; &lt;literal&gt;</code> or of the form <code><em>&lt;column&gt;
+ IS [NOT] NULL</em></code>.</p>
+
+ <p><em>n</em> equals the number of filter controls which the filter controller is responsible for. This number
+ doesn't change during one session of the form based filter. On the other hand, <em>m</em>, the number of disjunctive
+ terms, is dynamic.</p>
+
+ <a name="active_term"></a>
+ <p>With the above, there are potentially <em>m * n</em> <em>predicate expressions</em> (though usually only a fraction
+ of those will actually exist). Since in a form based filter, there are only <em>n</em> filter controls, and each
+ filter control displays exactly one <em>predicate expression</em>, this means that only a part of the complete
+ filter can be displayed, in particular, only one <em>disjunctive term</em> can be displayed at a time. Thus,
+ the filter controller knows the concept of an <em>active term</em>, denoted by the <member>ActiveTerm</member>
+ attribute, controls which of the terms is currently displayed in the form controls.</p>
+
+ @see XFormController
+ @see com::sun::star::sdbc::XResultSetMetaData::isSearchable
+ @see com::sun::star::sdb::XSingleSelectQueryAnalyzer::getStructuredFilter
+ @see com::sun::star::sdb::SQLFilterOperator
+
+ @since OpenOffice.org 3.3
+ */
+interface XFilterController
+{
+ /** registers a listener to be notified of certain changes in the form based filter.
+
+ <p>Registering the same listener multiple times results in multiple notifications of the same event,
+ and also requires multiple revocations of the listener.
+ */
+ void addFilterControllerListener( [in] XFilterControllerListener _Listener );
+
+ /** revokes a listener which was previously registered to be notified of certain changes in the form based filter.
+ */
+ void removeFilterControllerListener( [in] XFilterControllerListener _Listener );
+
+ /** is the number of <em>filter components</em>, or filter controls, which the filter controller is responsible
+ for.
+
+ <p>This number is constant during one session of the form based filter.</p>
+ */
+ [attribute, readonly] long FilterComponents;
+
+ /** is the number of <em>disjunctive terms</em> of the filter expression represented by the form based filter.
+ */
+ [attribute, readonly] long DisjunctiveTerms;
+
+ /** denotes the <a href="#active_term"><em>active term</em></a> of the filter controller.
+ */
+ [attribute] long ActiveTerm
+ {
+ set raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ };
+
+ /** sets a given <em>predicate expression</em>
+
+ @param _Component
+ denotes the filter component whose expression is to be set. Must be greater than or equal to 0, and smaller than
+ <member>FilterComponents</member>.
+
+ @param _Term
+ denotes the <em>disjunctive term</em> in which the expression is to be set. Must be greater than or equal to 0,
+ and smaller than <member>DisjunctiveTerms</member>.
+
+ @param _PredicateExpression
+ denotes the <em>predicate expression</em> to set for the given filter component in the given term.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if one of the indexes is out of the allowed range
+ */
+ void
+ setPredicateExpression( [in] long _Component, [in] long _Term, [in] string _PredicateExpression )
+ raises( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves the filter component with the given index.
+
+ <p>The filter control has the same control model as the control which it stands in for. Consequently, you can use this method
+ to obtain the database column which the filter control works on, by examining the control model's <code>BoundField</code>
+ property.</p>
+
+ @param _Component
+ denotes the index of the filter component whose control should be obtained. Must be greater than or equal to 0,
+ and smaller than <member>FilterComponents</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <arg>_Component</arg> is out of the allowed range.
+
+ @see ::com::sun::star::form::component::DataAwareControlModel::BoundField
+ */
+ ::com::sun::star::awt::XControl
+ getFilterComponent( [in] long _Component )
+ raises( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves the entirety of the <em>predicate expressions</em> represented by the filter controller.
+
+ <p>Each element of the returned sequence is a <em>disjunctive term</em>, having exactly <member>FilterComponents</member>
+ elements, which denote the single <em>predicate expressions</em> of this term.</p>
+ */
+ sequence< sequence< string > >
+ getPredicateExpressions();
+
+ /** removes a given <em>disjunctive term</em>
+
+ @param _Term
+ the index of the term to remove. Must be greater than or equal to 0, and smaller than
+ <member>DisjunctiveTerms</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <arg>_Term</arg> is out of the allowed range.
+ */
+ void
+ removeDisjunctiveTerm( [in] long _Term )
+ raises( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** appends an empty disjunctive term to the list of terms.
+ */
+ void
+ appendEmptyDisjunctiveTerm();
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl
new file mode 100644
index 000000000000..230ba9656d81
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl
@@ -0,0 +1,84 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __com_sun_star_form_runtime_XFilterControllerListener_idl__
+#define __com_sun_star_form_runtime_XFilterControllerListener_idl__
+
+#include <com/sun/star/lang/XEventListener.idl>
+#include <com/sun/star/form/runtime/FilterEvent.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module form { module runtime {
+
+//=============================================================================
+
+/** is implemented by components listening for events fired by an <type>XFilterController</type>.
+
+ @since OpenOffice.org 3.3
+*/
+interface XFilterControllerListener : ::com::sun::star::lang::XEventListener
+{
+ /** is fired when a single <em>predicate expression</em> of the filter represented by the filter
+ controller changed.
+
+ <p><member>FilterEvent::DisjunctiveTerm</member> is the index of the <em>disjunctive term</em> in which the
+ expression changed. This usually equals <member>XFilterController::ActiveTerm</member>.</p>
+
+ <p><member>FilterEvent::FilterComponent</member> denotes the index of the filter component whose
+ <em>predicate expression</em> changed.</p>
+
+ <p><member>FilterEvent::PredicateExpression</member> is the new <em>predicate expressions</em>.</p>
+ */
+ void predicateExpressionChanged( [in] FilterEvent _Event );
+
+ /** is fired when a <em>disjunctive term</em> was removed from the filter of the filter controller.
+
+ <p><member>FilterEvent::DisjunctiveTerm</member> is the index of the <em>disjunctive term</em> which was
+ removed.</p>
+
+ <p><member>FilterEvent::FilterComponent</member> and <member>FilterEvent::PredicateExpression</member> are not
+ used for this event type.</p>
+ */
+ void disjunctiveTermRemoved( [in] FilterEvent _Event );
+
+ /** is fired when a <em>disjunctive term</em> was added to the filter of the filter controller.
+
+ <p><member>FilterEvent::DisjunctiveTerm</member> is the index of the <em>disjunctive term</em> which was
+ added.</p>
+
+ <p><member>FilterEvent::FilterComponent</member> and <member>FilterEvent::PredicateExpression</member> are not
+ used for this event type.</p>
+ */
+ void disjunctiveTermAdded( [in] FilterEvent _Event );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/form/runtime/XFormController.idl b/offapi/com/sun/star/form/runtime/XFormController.idl
new file mode 100644
index 000000000000..f0573383860a
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/XFormController.idl
@@ -0,0 +1,373 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __offapi_com_sun_star_form_runtime_XFormController_idl__
+#define __offapi_com_sun_star_form_runtime_XFormController_idl__
+
+#include <com/sun/star/awt/XTabController.idl>
+#include <com/sun/star/container/XChild.idl>
+#include <com/sun/star/lang/XComponent.idl>
+#include <com/sun/star/container/XIndexAccess.idl>
+#include <com/sun/star/container/XEnumerationAccess.idl>
+#include <com/sun/star/util/XModifyBroadcaster.idl>
+#include <com/sun/star/util/XModeSelector.idl>
+#include <com/sun/star/form/XConfirmDeleteBroadcaster.idl>
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.idl>
+#include <com/sun/star/sdb/XRowSetApproveBroadcaster.idl>
+#include <com/sun/star/form/XDatabaseParameterBroadcaster2.idl>
+#include <com/sun/star/form/XFormControllerListener.idl>
+#include <com/sun/star/task/XInteractionHandler.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#include <com/sun/star/form/runtime/XFilterController.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module form { module runtime {
+
+interface XFormOperations;
+interface XFormControllerContext;
+
+//=============================================================================
+
+/** specifies a component controlling the interaction between the user and form functionality.
+
+ <p>As soon as a form (containing controls) is to be presented to the user,
+ there is a need for an instance controlling the user interaction.<br/>
+ Such a <code>FormController</code> is responsible for dialog processing,
+ like controlling the tab order and the grouping of controls.</p>
+
+ <p>As a form may contain one or many subforms, a <type>FormController</type> may
+ contain one or more other <type>FormController</type>s, so the form model structure or hierarchy
+ is reflected in the structure of <type>FormController</type>s. That is, retrieving the parent of
+ the model of a controller will give you the same object as retrieving the model of the parent of
+ the controller. Similarly, retrieving the model of the <code>n</code><sup>th</sup> child of
+ a controller gives you the same object as retrieving the <code>n</code><sup>th</sup> child of
+ the model of the controller.</p>
+
+ <p>A controller is called <em>active</em> if one of the controls it is responsible for has the focus,
+ else inactive. To be notified whenever this activation state of a given controller changes, you can
+ add listeners.</p>
+
+ <p>This interface supersedes the <type scope="com::sun::star::form">FormController</type>.</p>
+
+ <h3>Responsibilities</h3>
+ <p>A <type>FormController</type> is responsible for a <type scope="com::sun::star::awt">UnoControlContainer</type>,
+ and all controls therein.</p>
+
+ <p>Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form
+ contains controls bound to a database, or to an external validator, then the form controller will
+ check their current value when the current record is to be saved to the database.</p>
+
+ <p>First, it will check whether any controls with an external validator exist. If so, those validators
+ will be asked to validate the current control content. If this fails, the message provided by the validator
+ is displayed to the user, the control is focused, and the update of the record is vetoed.</p>
+
+ <p>Second, the controls are examined for NULL values. If a control is bound to a database field which
+ is declared to be <code>NOT NULL</code>, no auto-increment field, but still <NULL/>, then an error
+ message is shown to the user saying that input is required, the respective control is focused, and
+ the update of the record is vetoed.</p>
+
+ <p>Note that you can precent the second check - for database fields containing <NULL/> values - on
+ a per-form and a per-database basis.<br/>
+ For the former, you need to add a boolean property <code>FormsCheckRequiredFields</code> to the form
+ (aka the <code>FormController</code>'s model), using its
+ <member scope="com::sun::star::beans">XPropertyContainer::addProperty</member> method, with a value
+ of <FALSE/>.<br/>
+ For the latter, you need to set the respective property of the data source's <code>Settings</code>
+ (also named <code>FormsCheckRequiredFields</code>) to <FALSE/>.</p>
+
+ <p>Alternatively, you can prevent the check on a per-control basis, using the
+ <member>DataAwareControlModel::InputRequired</member> property of a single control model.</p>
+
+ <p>If a control which the controller is responsible for supports the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
+ interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its
+ functionality to the controller by querying the dispatch interceptor for it.</p>
+
+ <p>Below, there's a list of URLs which have a defined meaning - if an implementation supports one of them,
+ there must be a guaranteed semantices. However, concrete implementations may support an arbitrary sub or super
+ set of these URLs.</p>
+
+ <p>In general, all URLs start with the same prefix, namely <em>.uno:FormController/</em>. To this, a suffix is
+ appended which describes the requested functionality.<br/>
+ Example: The URL suffix for deleting the current record is <em>deleteRecord</em>, so the complete URL for
+ requesting a dispatcher for this functionality is <em>.uno:FormController/deleteRecord</em>.</p>
+
+ <p>Some URLs may require parameters. For this, the sequence of <type scope="com::sun::star::beans">PropertyValue</type>s
+ passed to the <member scope="com::sun::star::frame">XDispatch::dispatch</member> call is used - every property value is
+ used as one named parameter.</p>
+
+ <p>For all URLs, interested parties can register as status listeners (<type scope="com::sun::star::frame">XStatusListener</type>)
+ at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or
+ disabled.<br/>
+ For instance, the URL with the suffix <em>moveToFirst</em> is associated with moving the form to the first
+ record, and it will be disabled in case the form is already positioned on the first record.</p>
+
+ <table style="width:100%;" border="0" cellpadding="2" cellspacing="2"><tbody>
+
+ <tr style="vertical-align: top;">
+ <td><b>URL suffix</b></td>
+ <td><b>functionality</b></td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>positionForm</em></td>
+ <td>positions the form on a record given by absolute number.<br/>
+ There's one parameter for this functionality, named <em>Position</em>, which must be a long
+ value specifying the absolute position to which the form should be moved</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>RecordCount</em></td>
+ <td>This is a passive functionality: It cannot be dispatched, instead, interested parties may
+ use the dispatcher to add as <type scope="com::sun::star::frame">XStatusListener</type>, and be
+ notified when the record count changes.<br/>
+ The status value which is being notified (<member scope="com::sun::star::frame">FeatureStateEvent::State</member>)
+ is a string which can be used to display the record count. In particular, if the record count is not yet known
+ (<member scope="com::sun::star::sdb">RowSet::IsRowCountFinal</member> is <FALSE/>), this is indicated in the
+ string, too.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>moveToFirst</em></td>
+ <td>moves the form to the first record</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>moveToPrev</em></td>
+ <td>moves the form to the record preceding the current one</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>moveToNext</em></td>
+ <td>moves the form to the record after the current one</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>moveToLast</em></td>
+ <td>moves the form to the last record</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>moveToNew</em></td>
+ <td>moves the form to the virtual "insert row", where new records can be inserted</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>saveRecord</em></td>
+ <td>Commits any potentially pending changes in the current control, and saves the current record to
+ the database, or inserts a new record if the form is currently positioned on the virtual insertion row.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>undoRecord</em></td>
+ <td>reverts the changes done to the current record. Basically, this means refreshing the
+ current row from the database, and updating all controls with the new content.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>deleteRecord</em></td>
+ <td>deletes the current record, after asking the user for confirmation.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>refreshForm</em></td>
+ <td>reloads the complete form. After this, the form is positioned on the first record</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>sortUp</em></td>
+ <td>Adds an order clause to the form, to sort it ascending by the field which the current control is bound to,
+ and then reloads the form.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>sortDown</em></td>
+ <td>Adds an order clause to the form, to sort it descending by the field which the current control is bound to,
+ and then reloads the form.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>sort</em></td>
+ <td>opens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog
+ is closed with OK, the form is reloaded after setting the new sorting order.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>autoFilter</em></td>
+ <td>creates, from the current control, a filter for the form. This is, if the current control is bound to
+ the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'"
+ is created and set at the form. After this, the form is reloaded.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>filter</em></td>
+ <td>opens an dialog, which allows the user to manipulate the current filter of the form. If the dialog
+ is closed with OK, the form is reloaded after setting the new filter.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>applyFilter</em></td>
+ <td><p>Toggles the <member scope="com::sun::star::sdb">RowSet::ApplyFilter</member> property
+ of the form.</p>
+ <p>Additionally, status listeners will be provided with the current (boolean) state of this property
+ in the <member scope="com::sun::star::frame">FeatureStateEvent::State</member> member of the event
+ notified by the dispatcher.</p></td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>removeFilterOrder</em></td>
+ <td>completely removes any filter and sorting order from the form, and reloads it.</td>
+ </tr>
+
+ </tbody></table>
+
+ @see ::com::sun::star::form::component:Form
+ @see ::com::sun::star::form::binding::BindableControlModel
+ @see ::com::sun::star::sdb::DataSource::Settings
+
+ @since OpenOffice.org 3.3
+ */
+interface XFormController
+{
+ /** is used for tab controlling and grouping of the controls.
+
+ <p>The model obtained via <member scope="com::sun::star::awt">XTabController::getModel</member> is the form for which the
+ controller is responsible.</p>
+ */
+ interface ::com::sun::star::awt::XTabController;
+
+ /** allows access to the parent controller.
+ */
+ interface ::com::sun::star::container::XChild;
+
+ /** allows access to the sub controllers.
+ */
+ interface ::com::sun::star::container::XIndexAccess;
+
+ /** allows enumerating sub controllers
+ */
+ interface ::com::sun::star::container::XEnumerationAccess;
+
+ /** allows life time control of the controller.
+ */
+ interface ::com::sun::star::lang::XComponent;
+
+ /** allows to register as listener for modifications in the controls which the controller is responsible
+ for.
+ */
+ interface ::com::sun::star::util::XModifyBroadcaster;
+
+ /** used to notify deletions of data in the form before they happen.
+
+ <p>A form controller listens for deletion events at the form it is responsible for. If and only if no
+ <type scope="com::sun::star::form">XConfirmDeleteListener</type> is registered at
+ the controller, it uses an own dialog to ask the user for confirmation.</p>
+ */
+ interface ::com::sun::star::form::XConfirmDeleteBroadcaster;
+
+ /** is used to notify errors which happen in the form the controller is responsible for.
+
+ <p>A form controller listens for error events at the form it is responsible for. If and only if no
+ <type scope="com::sun::star::sdb">XSQLErrorListener</type> is registered at the controller, it
+ uses an own dialog to notify the user of the error.</p>
+
+ */
+ interface ::com::sun::star::sdb::XSQLErrorBroadcaster;
+
+ /** is used for multiplexing row set events happening on the form which the controller is responsible for.
+ */
+ interface ::com::sun::star::sdb::XRowSetApproveBroadcaster;
+
+ /** is used broadcasting parameter events in the form.
+
+ <p>A form controller listens for parameter events at the form it is responsible for. If and only if no
+ <type scope="com::sun::star::form">XDatabaseParameterListener</type> is registered at the controller, it
+ uses an own dialog to ask the user for parameter values.</p>
+ */
+ interface ::com::sun::star::form::XDatabaseParameterBroadcaster2;
+
+ /** allows switching the form controller to different operation modes.
+
+ <a name="mode_selector"></a>
+ <p>The two modes usually (but not necessarily) supported by a form controller are the <code>DataMode</code>
+ and the <code>FilterMode</code>, where the former is the usual modus operandi for displaying and modifying
+ data, and the latter is a special mode to enter a filter for the database form which the controller is
+ responsible for.</p>
+ */
+ interface ::com::sun::star::util::XModeSelector;
+
+ /** allows controlling the filter mode.
+
+ <p>If the form controller supports a <a href="#mode_selector">form based filter mode</a>, then it shall also
+ support the <type>XFilterController</type> interface, which allows controlling this mode.</p>
+ */
+ [optional] interface XFilterController;
+
+ /** denotes the instance which is used to implement operations on the form which the controller
+ works for.
+
+ <p>This instance can be used, for instance, to determine the current state of certain form features.</p>
+ */
+ [attribute, readonly] XFormOperations FormOperations;
+
+ /** provicdes access to the currently active control
+ */
+ [attribute, readonly] ::com::sun::star::awt::XControl CurrentControl;
+
+ /** allows to delegate certain tasks to the context of the form controller
+ */
+ [attribute] XFormControllerContext Context;
+
+ /** used (if not <NULL/>) for user interactions triggered by the form controller.
+ */
+ [attribute] ::com::sun::star::task::XInteractionHandler InteractionHandler;
+
+ /** adds the specified listener to receive notifications whenever the activation state of
+ the controller changes.
+ */
+ void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener _Listener );
+
+ /** removes the specified listener from the list of components to receive notifications whenever the activation
+ state of the controller changes.
+ */
+ void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener _Listener );
+
+ /** adds a controller to the list of child controllers
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given controller is <NULL/>, or cannot rightfully be a child controller. Since controllers
+ mirror the hierarchy of the forms the are responsible for, this means that the form of the given
+ child controller must be a child of the controller at which the method is invoked.
+ */
+ void addChildController( [in] XFormController _ChildController )
+ raises ( ::com::sun::star::lang::IllegalArgumentException );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/form/runtime/XFormControllerContext.idl b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl
new file mode 100644
index 000000000000..da0999ee17a7
--- /dev/null
+++ b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl
@@ -0,0 +1,57 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __offapi_com_sun_star_form_runtime_XFormControllerContext_idl__
+#define __offapi_com_sun_star_form_runtime_XFormControllerContext_idl__
+
+#include <com/sun/star/awt/XControl.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module form { module runtime {
+
+//=============================================================================
+
+/** provides a context for a <type>FormController</type>
+
+<p>A <type>FormController</type> knows about the controls it is responsible
+ for, and about the control container which those controls live in. However, it doesn't know
+ about a possible larger context, like a scrollable view which the controls are embedded into.
+ To compensate this, it can be provided a <code>XFormControllerContext</code>.</p>
+ */
+interface XFormControllerContext
+{
+ /** ensures the given control is visible, by scrolling the view if necessary.
+ */
+ void makeVisible( [in] ::com::sun::star::awt::XControl _Control );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/form/runtime/XFormOperations.idl b/offapi/com/sun/star/form/runtime/XFormOperations.idl
index 24552584aa29..10b568923ec5 100644
--- a/offapi/com/sun/star/form/runtime/XFormOperations.idl
+++ b/offapi/com/sun/star/form/runtime/XFormOperations.idl
@@ -44,8 +44,8 @@
#ifndef __com_sun_star_sdbc_XResultSetUpdate_idl__
#include <com/sun/star/sdbc/XResultSetUpdate.idl>
#endif
-#ifndef __com_sun_star_form_XFormController_idl__
-#include <com/sun/star/form/XFormController.idl>
+#ifndef __com_sun_star_form_runtime_XFormController_idl__
+#include <com/sun/star/form/runtime/XFormController.idl>
#endif
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
@@ -115,7 +115,7 @@ interface XFormOperations : ::com::sun::star::lang::XComponent
case some functionality will not be available. In particular, every feature
which relies on the active control of the controller might be of limited use.</p>
*/
- [attribute, readonly] ::com::sun::star::form::XFormController Controller;
+ [attribute, readonly] ::com::sun::star::form::runtime::XFormController Controller;
/** retrieves the current state of the given feature
diff --git a/offapi/com/sun/star/form/runtime/makefile.mk b/offapi/com/sun/star/form/runtime/makefile.mk
index 81c66826793b..97c4451edf40 100644
--- a/offapi/com/sun/star/form/runtime/makefile.mk
+++ b/offapi/com/sun/star/form/runtime/makefile.mk
@@ -42,10 +42,16 @@ PACKAGE=com$/sun$/star$/form$/runtime
# ------------------------------------------------------------------------
IDLFILES=\
- FeatureState.idl\
+ FeatureState.idl \
+ FilterEvent.idl \
FormFeature.idl \
FormOperations.idl \
+ FormController.idl \
XFeatureInvalidation.idl \
+ XFilterController.idl \
+ XFilterControllerListener.idl \
+ XFormController.idl \
+ XFormControllerContext.idl \
XFormOperations.idl \
# ------------------------------------------------------------------
diff --git a/offapi/com/sun/star/sdb/DataSourceBrowser.idl b/offapi/com/sun/star/sdb/DataSourceBrowser.idl
index 36c73ae9da2c..0690321608a4 100644
--- a/offapi/com/sun/star/sdb/DataSourceBrowser.idl
+++ b/offapi/com/sun/star/sdb/DataSourceBrowser.idl
@@ -168,13 +168,11 @@ published service DataSourceBrowser
<p>
With a data source browser implementing this interface, external components have access to
<ul><li>the grid control which is used to display the currently selected table/query
- (see
- <method scope="com.sun.star.form">XFormController::getControls()</method>
- )
+ (see <method scope="com::sun::star::awt">XTabController::getControls</method>)
</li>
<li>the data form used for displaying objects. As always for components implementing this service,
the object returned by
- <method scope="com.sun.star.awt">XTabController::getModel()</method>isadataform.
+ <method scope="com::sun::star::awt">XTabController::getModel</method>is a dataform.
</li>
</ul>
</p>
diff --git a/offapi/com/sun/star/sdb/DatabaseContext.idl b/offapi/com/sun/star/sdb/DatabaseContext.idl
index e82cce64de3d..623b28c887b8 100644
--- a/offapi/com/sun/star/sdb/DatabaseContext.idl
+++ b/offapi/com/sun/star/sdb/DatabaseContext.idl
@@ -52,6 +52,8 @@
module com { module sun { module star { module sdb {
+published interface XDatabaseRegistrations;
+
/** is the context for accessing datasource.
<p>
@@ -65,12 +67,10 @@
*/
published service DatabaseContext
{
-
/** Enumeration on all registered data sources.
*/
interface com::sun::star::container::XEnumerationAccess;
-
/** NameAccess on all registered data sources.
<p>One exception is the <method "com.sun.star.container.XNameAccess">getByName</method>, this method also allows to ask
for a <member "DataAccessDescriptor">DatabaseLocation</member>.
@@ -89,6 +89,19 @@ published service DatabaseContext
/** Interface for creation of new datasources.
*/
interface com::sun::star::lang::XSingleServiceFactory;
+
+ /** allows to access and modify the configuration data for registered data source.
+
+ <p>The main purpose of this interface is to allow you to register data sources which you know
+ by URL only, and have not yet loaded.</p>
+
+ <p>Also, it hides the details of the configuration data where the data source registrations
+ are maintained, so if possible at all, you should use this interface, instead of modifying or
+ querying the configuration data directly.</p>
+
+ @since OpenOffice.org 3.3
+ */
+ [optional] interface XDatabaseRegistrations;
};
//=============================================================================
diff --git a/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
new file mode 100644
index 000000000000..3f2a82aa13cb
--- /dev/null
+++ b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
@@ -0,0 +1,60 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __com_sun_star_sdb_DatabaseRegistrationEvent_idl__
+#define __com_sun_star_sdb_DatabaseRegistrationEvent_idl__
+
+#include <com/sun/star/lang/EventObject.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module sdb {
+
+//=============================================================================
+
+/** describes a change in a database registration
+
+ @see XDatabaseRegistrations
+ @see XDatabaseRegistrationsListener
+
+ @since OpenOffice.org 3.3
+ */
+struct DatabaseRegistrationEvent : ::com::sun::star::lang::EventObject
+{
+ /// is the name of the database registration affected by the event
+ string Name;
+ /// is the old location of the database which is affected by the event
+ string OldLocation;
+ /// is the new location of the database which is affected by the event
+ string NewLocation;
+};
+
+//=============================================================================
+
+}; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/XDatabaseAccess.idl b/offapi/com/sun/star/sdb/XDatabaseAccess.idl
index a9091be56ce5..61667e73a1af 100644
--- a/offapi/com/sun/star/sdb/XDatabaseAccess.idl
+++ b/offapi/com/sun/star/sdb/XDatabaseAccess.idl
@@ -54,60 +54,17 @@
//=============================================================================
-/** is used to connect to a data access bean. A data access bean represents a
- database connection and provides additional information related to the connection
- such as forms, reports, or queries.
+/** is not to be used anymore
+ @deprecated
*/
published interface XDatabaseAccess: com::sun::star::sdbc::XDataSource
{
-
- /** indicates that connections already exist.
- @returns
- <TRUE/> if so
- */
boolean hasConnections();
- //-------------------------------------------------------------------------
-
- /** attempts to establish a database connection, that can not be shared with
- other components. This should be used for transaction processing.
- @param user
- the user name
- @param password
- the password
- @returns
- an isolated connection object
- @throws com::sun::star::sdbc::SQLException
- if a database access error occurs.
- @see com::sun::star::sdbc::XConnection
- */
com::sun::star::sdbc::XConnection getIsolatedConnection([in]string user, [in]string password)
raises (com::sun::star::sdbc::SQLException);
- //-------------------------------------------------------------------------
-
- /** closes the all connections to database. This request could be aborted by
- listeners of the component.
- @throws com::sun::star::sdbc::SQLException
- if a database access error occurs.
- */
boolean suspendConnections() raises (com::sun::star::sdbc::SQLException);
- //-------------------------------------------------------------------------
-
- /** adds the specified listener to receive the events "connectionChanged",
- "approveConnectionClose", and "connectionClosing".
- @param listener
- the listener to append
- @see com::sun::star::sdb::XDatabaseAccessListener
- */
[oneway] void addDatabaseAccessListener([in]XDatabaseAccessListener listener);
- //-------------------------------------------------------------------------
-
- /** removes the specified listener.
- @param listener
- the listener to append
- @see com::sun::star::sdb::XDatabaseAccessListener
- */
- [oneway] void removeDatabaseAccessListener(
- [in]XDatabaseAccessListener listener);
+ [oneway] void removeDatabaseAccessListener([in]XDatabaseAccessListener listener);
};
//=============================================================================
diff --git a/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl b/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl
index 1c9361f9da09..2a502f632d86 100644
--- a/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl
+++ b/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl
@@ -37,44 +37,13 @@
module com { module sun { module star { module sdb {
-/** is used for receiving "connectionChanged", "approveConnectionClose", and
- "connectionClosing" events posted by a database access bean.
-
-
- <p>
- A database access bean setting may be changed to connect to a different database.
- In that case, the connection of the bean must be closed and a new connection must
- be established. The could affect the current data processing on the bean, as it
- could be shared by a number of components. To prevent the bean from closing it's
- connection, a DatabaseAccessListener could abort the closing.
- </p>
+/** is not to be used anymore
+ @deprecated
*/
published interface XDatabaseAccessListener: com::sun::star::lang::XEventListener
{
-
- /** indicates that a new connection for the bean has been established.
- @param evenet
- the event happend
- */
[oneway] void connectionChanged([in]com::sun::star::lang::EventObject event);
- //-------------------------------------------------------------------------
-
- /** indicates that the connection of the bean will be closed. If there are pending
- actions on the connection of the bean, "approveConnectionClosing" should return
- <FALSE/>.
-
- @param evenet
- the event happend
- @returns
- <TRUE/> when approved, otherwise <FALSE/>
- */
boolean approveConnectionClosing([in]com::sun::star::lang::EventObject event);
- //-------------------------------------------------------------------------
-
- /** indicates that the connection will definitely be closed.
- @param evenet
- the event happend
- */
[oneway] void connectionClosing([in]com::sun::star::lang::EventObject event);
};
diff --git a/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl b/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl
index 2e7f9b46200c..5cb3aa4832fd 100644
--- a/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl
+++ b/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl
@@ -54,39 +54,14 @@
//=============================================================================
-/** specifies the root of the data access beans. It provides the possiblity
- to open a data access bean, which contains tables, queries, forms, and
- report documents, or to open a connection to a database.
+/** is not to be used anymore.
@deprecated
*/
published interface XDatabaseEnvironment: com::sun::star::sdbc::XDriverManager
{
- //-------------------------------------------------------------------------
-
- /** returns an existing DatabaseAccess bean specified by it's URL.
-
-
- <p>Database Access beans are always shared, so if there's a second request
- for the same bean, the same instance of the bean will be returned, if it is still alive.
- </p>
- @param URL
- a database url of the form sdbc:subprotocol:subname
- @returns
- the database access object for this url
- */
XDatabaseAccess getDatabaseAccess([in]string URL)
raises (com::sun::star::sdbc::SQLException);
- //-------------------------------------------------------------------------
-
- /** creates a new DatabaseAccess bean specified by it's URL.
- @param URL
- a database url of the form sdbc:subprotocol:subname
- @param title
- the title of the database access
- @returns
- the new created database access object for this url
- */
XDatabaseAccess createDatabaseAccess([in]string URL, [in]string title)
raises (com::sun::star::sdbc::SQLException);
};
diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
new file mode 100644
index 000000000000..ce8e54b8d359
--- /dev/null
+++ b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
@@ -0,0 +1,158 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __com_sun_star_sdb_XDatabaseRegistrations_idl__
+#define __com_sun_star_sdb_XDatabaseRegistrations_idl__
+
+#include <com/sun/star/container/NoSuchElementException.idl>
+#include <com/sun/star/container/ElementExistException.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#include <com/sun/star/lang/IllegalAccessException.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module sdb {
+
+interface XDatabaseRegistrationsListener;
+
+//=============================================================================
+
+/** provides access to the application-wide registered databases.
+
+ <p>This interface provides a mere wrapper around the respective configuration data,
+ this way hiding the concrete configuration structure from its clients. You should,
+ if possible at all, use this interface, instead of modifying or querying the configuration
+ data directly.</p>
+
+ @since OpenOffice.org 3.3
+ */
+interface XDatabaseRegistrations
+{
+ /** determines whether a database is registered under the given name.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given name is empty
+ */
+ boolean hasRegisteredDatabase( [in] string Name )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ );
+
+ /** returns the names of all registered databases
+ */
+ sequence< string >
+ getRegistrationNames();
+
+ /** returns the location of the database registered under the given name
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given name is empty
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if there is no database registered under this name
+ */
+ string getDatabaseLocation( [in] string Name )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::container::NoSuchElementException
+ );
+
+ /** registers a database, given by location, under a given name
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given name is empty, or the given location is invalid.
+
+ @throws ::com::sun::star::container::ElementExistException
+ if there already is a databases registered under the given name.
+ */
+ void registerDatabaseLocation( [in] string Name, [in] string Location )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::container::ElementExistException
+ );
+
+ /** revokes the registration of a database, given by name
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given name is empty
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if there is no database registered under this name
+
+ @throws ::com::sun::star::lang::IllegalAccessException
+ if the registration data for this database is read-only
+ */
+ void revokeDatabaseLocation( [in] string Name )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::container::NoSuchElementException
+ , ::com::sun::star::lang::IllegalAccessException
+ );
+
+ /** changes the location of a given database registration
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given name is empty, or the given location is invalid.
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if there is no database registered under this name
+
+ @throws ::com::sun::star::lang::IllegalAccessException
+ if the registration data for this database is read-only
+ */
+ void changeDatabaseLocation( [in] string Name, [in] string NewLocation )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::container::NoSuchElementException
+ , ::com::sun::star::lang::IllegalAccessException
+ );
+
+ /** determines whether the registration data for a database given by name is
+ read-only.
+
+ <p>In this case, attempts to revoke this registration will fail.</p>
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given name is empty
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if there is no database registered under this name
+ */
+ boolean isDatabaseRegistrationReadOnly( [in] string Name )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::container::NoSuchElementException
+ );
+
+ /** registers a listener which is notified of changes in the registered databases
+ */
+ void addDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener );
+
+ /** revokes a previously registered listener
+ */
+ void removeDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener );
+};
+
+//=============================================================================
+
+}; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
new file mode 100644
index 000000000000..f5fc65513d6e
--- /dev/null
+++ b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
@@ -0,0 +1,70 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__
+#define __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__
+
+#include <com/sun/star/lang/XEventListener.idl>
+#include <com/sun/star/sdb/DatabaseRegistrationEvent.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module sdb {
+
+//=============================================================================
+
+/** implemented by components which want to be notified of changes in the application-wide registered
+ databases.
+
+ @see XDatabaseRegistrations
+
+ @since OpenOffice.org 3.3
+ */
+interface XDatabaseRegistrationsListener : ::com::sun::star::lang::XEventListener
+{
+ /** called when a database has been registered
+ */
+ void registeredDatabaseLocation( [in] DatabaseRegistrationEvent Event );
+
+ /** called when a database registration has been revoked
+ */
+ void revokedDatabaseLocation( [in] DatabaseRegistrationEvent Event );
+
+ /** called when a the location of a registered database changed
+
+ <p>Note that this talks about registration data only. That is, if the actual file denoted by the database
+ registration is moved, this is in no way monitored or reported. Only (successful) calls to
+ <member>XDatabaseRegistrations::changeDatabaseLocation</member> are reported here.</p>
+ */
+ void changedDatabaseLocation( [in] DatabaseRegistrationEvent Event );
+};
+
+//=============================================================================
+
+}; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/makefile.mk b/offapi/com/sun/star/sdb/makefile.mk
index b535584fc4b8..3e76283ecf18 100644
--- a/offapi/com/sun/star/sdb/makefile.mk
+++ b/offapi/com/sun/star/sdb/makefile.mk
@@ -62,6 +62,7 @@ IDLFILES=\
DatabaseContext.idl \
DatabaseDocument.idl \
DatabaseEnvironment.idl \
+ DatabaseRegistrationEvent.idl \
DataColumn.idl \
DataSettings.idl \
DataSource.idl \
@@ -113,6 +114,8 @@ IDLFILES=\
XDataAccessDescriptorFactory.idl \
XDatabaseAccess.idl \
XDatabaseAccessListener.idl \
+ XDatabaseRegistrations.idl \
+ XDatabaseRegistrationsListener.idl \
XDatabaseEnvironment.idl \
XDocumentDataSource.idl \
XFormDocumentsSupplier.idl \
diff --git a/offapi/com/sun/star/ui/ItemStyle.idl b/offapi/com/sun/star/ui/ItemStyle.idl
index 6c20d06e9a56..6646c5ec5c72 100644
--- a/offapi/com/sun/star/ui/ItemStyle.idl
+++ b/offapi/com/sun/star/ui/ItemStyle.idl
@@ -127,6 +127,7 @@ constants ItemStyle
/** specifies if an icon is placed on left side of the text, like an entry in a taskbar.
<p>This style is only valid if the item describes a toolbar item and visible if
style of the toolbar is set to symboltext.</p>
+ <p> This style can also be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="::com::sun::star::ui::ItemStyle">TEXT</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
*/
const short ICON = 128;
@@ -149,6 +150,10 @@ constants ItemStyle
<p>This style is only valid if the item describes a toolbar item.</p>
*/
const short DROPDOWN_ONLY = 1024;
+ /** indicates if icon, text or text+icon is displayed for the item.
+ <p> This style can be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="com::sun::star::ui::ItemStyle">ICON</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
+ */
+ const short TEXT = 2048;
};
}; }; }; };
diff --git a/offapi/com/sun/star/view/DuplexMode.idl b/offapi/com/sun/star/view/DuplexMode.idl
new file mode 100644
index 000000000000..6d5d84ff4abc
--- /dev/null
+++ b/offapi/com/sun/star/view/DuplexMode.idl
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PaperFormat.idl,v $
+ * $Revision: 1.7 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_view_DuplexMode_idl__
+#define __com_sun_star_view_DuplexMode_idl__
+
+
+//=============================================================================
+
+module com { module sun { module star { module view {
+
+//=============================================================================
+
+/** These constants specify available duplex modes
+ */
+constants DuplexMode
+{
+ //-------------------------------------------------------------------------
+ /** specifies an unknown duplex mode.
+ */
+ const short UNKNOWN = 0;
+
+ //-------------------------------------------------------------------------
+ /** specifies that there is no duplex mode enabled
+ */
+ const short OFF = 1;
+
+ //-------------------------------------------------------------------------
+ /** specifies a long edge duplex mode
+ */
+ const short LONGEDGE = 2;
+
+ //-------------------------------------------------------------------------
+ /** specifies a short edge duplex mode
+ */
+ const short SHORTEDGE = 3;
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/view/PrintOptions.idl b/offapi/com/sun/star/view/PrintOptions.idl
index 6bd67e0f52bd..df65229a0854 100644
--- a/offapi/com/sun/star/view/PrintOptions.idl
+++ b/offapi/com/sun/star/view/PrintOptions.idl
@@ -85,6 +85,13 @@ published service PrintOptions
Otherwhise following actions (as e.g. closing the corresponding model) can fail.
*/
[optional, property] boolean Wait;
+
+ //-------------------------------------------------------------------------
+ /** determines the duplex mode for the print job.
+
+ @see <type>DuplexMode</type> for more information about supported values
+ */
+ [optional, property] short DuplexMode;
};
//=============================================================================
diff --git a/offapi/com/sun/star/view/XFormLayerAccess.idl b/offapi/com/sun/star/view/XFormLayerAccess.idl
index a5a96dd31e5d..16d8fb5137c3 100644
--- a/offapi/com/sun/star/view/XFormLayerAccess.idl
+++ b/offapi/com/sun/star/view/XFormLayerAccess.idl
@@ -37,8 +37,8 @@
#ifndef __com_sun_star_form_XForm_idl__
#include <com/sun/star/form/XForm.idl>
#endif
-#ifndef __com_sun_star_form_XFormController_idl__
-#include <com/sun/star/form/XFormController.idl>
+#ifndef __com_sun_star_form_runtime_XFormController_idl__
+#include <com/sun/star/form/runtime/XFormController.idl>
#endif
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
@@ -73,10 +73,10 @@ interface XFormLayerAccess
@see isDesignMode
@see setDesignMode
- @see ::com::sun::star::form::FormController
+ @see ::com::sun::star::form::runtime::FormController
@see ::com::sun::star::form::runtime::FormOperations
*/
- ::com::sun::star::form::XFormController
+ ::com::sun::star::form::runtime::XFormController
getFormController(
[in] ::com::sun::star::form::XForm Form
);
diff --git a/offapi/com/sun/star/view/makefile.mk b/offapi/com/sun/star/view/makefile.mk
index 04dbdc77abac..1db50d0ece89 100644
--- a/offapi/com/sun/star/view/makefile.mk
+++ b/offapi/com/sun/star/view/makefile.mk
@@ -73,7 +73,8 @@ IDLFILES=\
XPrintJobBroadcaster.idl\
XPrintJobListener.idl\
XMultiSelectionSupplier.idl\
- SelectionType.idl
+ SelectionType.idl\
+ DuplexMode.idl
# ------------------------------------------------------------------
diff --git a/offapi/util/makefile.mk b/offapi/util/makefile.mk
index d3157dac31df..34fde4014a5b 100644
--- a/offapi/util/makefile.mk
+++ b/offapi/util/makefile.mk
@@ -180,12 +180,12 @@ $(OUT)$/ucrdoc$/types_doc.db : $(OUT)$/ucrdoc$/offapi_doc.db $(SOLARBINDIR)$/udk
#JSC: i have removed the doc rdb because all type information is already in the
# types.rdb, even the service and singleton type info. IDL docu isn't checked.
$(REGISTRYCHECKFLAG) : $(UCR)$/types.db $(OUT)$/ucrdoc$/types_doc.db
- $(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \
+ $(COMMAND_ECHO)$(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \
&& echo > $(REGISTRYCHECKFLAG)
#JSC: new target to prepare some UNO type statistics, the ouput will be later used
# for versioning of UNO cli type libraries
$(UNOTYPE_STATISTICS) : $(REGISTRYCHECKFLAG)
- $(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@
+ $(COMMAND_ECHO)$(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@
.INCLUDE : target.mk
diff --git a/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu b/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu
index 871ef6282299..7aa68980534d 100644
--- a/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu
@@ -156,7 +156,7 @@
</node>
</node>
<node oor:name="RegisteredNames">
- <node oor:name="Bibliography" oor:op="replace">
+ <node oor:name="org.openoffice.Bibliography" oor:op="replace">
<prop oor:name="Location" oor:type="xs:string">
<value>$(userurl)/database/biblio.odb</value>
</prop>
diff --git a/officecfg/registry/data/org/openoffice/Office/Math.xcu b/officecfg/registry/data/org/openoffice/Office/Math.xcu
index 62867f50a6ee..c0fa17f767aa 100644
--- a/officecfg/registry/data/org/openoffice/Office/Math.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Math.xcu
@@ -33,7 +33,7 @@
<node oor:name="FontFormatList">
<node oor:name="Id1" oor:op="replace">
<prop oor:name="Name">
- <value>StarSymbol</value>
+ <value>OpenSymbol</value>
</prop>
<prop oor:name="CharSet">
<value>-1</value>
@@ -53,10 +53,10 @@
</node>
<node oor:name="Id2" oor:op="replace">
<prop oor:name="Name">
- <value>Times New Roman</value>
+ <value>OpenSymbol</value>
</prop>
<prop oor:name="CharSet">
- <value>0</value>
+ <value>-1</value>
</prop>
<prop oor:name="Family">
<value>0</value>
@@ -75,7 +75,7 @@
<node oor:name="SymbolList">
<node oor:name="alpha" oor:op="replace">
<prop oor:name="Char">
- <value>57527</value>
+ <value>945</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -84,12 +84,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="ALPHA" oor:op="replace">
<prop oor:name="Char">
- <value>65</value>
+ <value>913</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -103,7 +103,7 @@
</node>
<node oor:name="beta" oor:op="replace">
<prop oor:name="Char">
- <value>57528</value>
+ <value>946</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -112,12 +112,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="BETA" oor:op="replace">
<prop oor:name="Char">
- <value>66</value>
+ <value>914</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -131,7 +131,7 @@
</node>
<node oor:name="gamma" oor:op="replace">
<prop oor:name="Char">
- <value>57529</value>
+ <value>947</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -140,12 +140,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="GAMMA" oor:op="replace">
<prop oor:name="Char">
- <value>57516</value>
+ <value>915</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -154,12 +154,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="delta" oor:op="replace">
<prop oor:name="Char">
- <value>57530</value>
+ <value>948</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -168,12 +168,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="DELTA" oor:op="replace">
<prop oor:name="Char">
- <value>57517</value>
+ <value>916</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -182,12 +182,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="epsilon" oor:op="replace">
<prop oor:name="Char">
- <value>57531</value>
+ <value>1013</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -196,12 +196,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="EPSILON" oor:op="replace">
<prop oor:name="Char">
- <value>69</value>
+ <value>917</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -215,7 +215,7 @@
</node>
<node oor:name="zeta" oor:op="replace">
<prop oor:name="Char">
- <value>57532</value>
+ <value>950</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -224,12 +224,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="ZETA" oor:op="replace">
<prop oor:name="Char">
- <value>90</value>
+ <value>918</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -243,7 +243,7 @@
</node>
<node oor:name="eta" oor:op="replace">
<prop oor:name="Char">
- <value>57533</value>
+ <value>951</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -252,12 +252,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="ETA" oor:op="replace">
<prop oor:name="Char">
- <value>72</value>
+ <value>919</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -271,7 +271,7 @@
</node>
<node oor:name="theta" oor:op="replace">
<prop oor:name="Char">
- <value>57534</value>
+ <value>952</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -280,12 +280,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="THETA" oor:op="replace">
<prop oor:name="Char">
- <value>57518</value>
+ <value>920</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -294,12 +294,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="iota" oor:op="replace">
<prop oor:name="Char">
- <value>57535</value>
+ <value>953</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -308,12 +308,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="IOTA" oor:op="replace">
<prop oor:name="Char">
- <value>73</value>
+ <value>921</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -327,7 +327,7 @@
</node>
<node oor:name="kappa" oor:op="replace">
<prop oor:name="Char">
- <value>57536</value>
+ <value>954</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -336,12 +336,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="KAPPA" oor:op="replace">
<prop oor:name="Char">
- <value>75</value>
+ <value>922</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -355,7 +355,7 @@
</node>
<node oor:name="lambda" oor:op="replace">
<prop oor:name="Char">
- <value>57537</value>
+ <value>955</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -364,12 +364,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="LAMBDA" oor:op="replace">
<prop oor:name="Char">
- <value>57519</value>
+ <value>923</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -378,12 +378,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="mu" oor:op="replace">
<prop oor:name="Char">
- <value>57538</value>
+ <value>956</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -392,12 +392,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="MU" oor:op="replace">
<prop oor:name="Char">
- <value>77</value>
+ <value>924</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -411,7 +411,7 @@
</node>
<node oor:name="nu" oor:op="replace">
<prop oor:name="Char">
- <value>57539</value>
+ <value>957</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -420,12 +420,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="NU" oor:op="replace">
<prop oor:name="Char">
- <value>78</value>
+ <value>925</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -439,7 +439,7 @@
</node>
<node oor:name="xi" oor:op="replace">
<prop oor:name="Char">
- <value>57540</value>
+ <value>958</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -448,12 +448,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="XI" oor:op="replace">
<prop oor:name="Char">
- <value>57520</value>
+ <value>926</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -462,12 +462,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="omicron" oor:op="replace">
<prop oor:name="Char">
- <value>57541</value>
+ <value>959</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -476,12 +476,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="OMICRON" oor:op="replace">
<prop oor:name="Char">
- <value>79</value>
+ <value>927</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -495,7 +495,7 @@
</node>
<node oor:name="pi" oor:op="replace">
<prop oor:name="Char">
- <value>57542</value>
+ <value>960</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -504,12 +504,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="PI" oor:op="replace">
<prop oor:name="Char">
- <value>57521</value>
+ <value>928</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -518,12 +518,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="rho" oor:op="replace">
<prop oor:name="Char">
- <value>57543</value>
+ <value>961</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -532,12 +532,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="RHO" oor:op="replace">
<prop oor:name="Char">
- <value>80</value>
+ <value>929</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -551,7 +551,7 @@
</node>
<node oor:name="sigma" oor:op="replace">
<prop oor:name="Char">
- <value>57544</value>
+ <value>963</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -560,12 +560,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="SIGMA" oor:op="replace">
<prop oor:name="Char">
- <value>57522</value>
+ <value>931</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -574,12 +574,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="tau" oor:op="replace">
<prop oor:name="Char">
- <value>57545</value>
+ <value>964</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -588,12 +588,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="TAU" oor:op="replace">
<prop oor:name="Char">
- <value>84</value>
+ <value>932</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -607,7 +607,7 @@
</node>
<node oor:name="upsilon" oor:op="replace">
<prop oor:name="Char">
- <value>57546</value>
+ <value>965</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -616,12 +616,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="UPSILON" oor:op="replace">
<prop oor:name="Char">
- <value>57523</value>
+ <value>933</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -630,12 +630,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="phi" oor:op="replace">
<prop oor:name="Char">
- <value>57547</value>
+ <value>981</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -644,12 +644,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="PHI" oor:op="replace">
<prop oor:name="Char">
- <value>57524</value>
+ <value>934</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -658,12 +658,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="chi" oor:op="replace">
<prop oor:name="Char">
- <value>57548</value>
+ <value>967</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -672,12 +672,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="CHI" oor:op="replace">
<prop oor:name="Char">
- <value>88</value>
+ <value>935</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -691,7 +691,7 @@
</node>
<node oor:name="psi" oor:op="replace">
<prop oor:name="Char">
- <value>57549</value>
+ <value>968</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -700,12 +700,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="PSI" oor:op="replace">
<prop oor:name="Char">
- <value>57525</value>
+ <value>936</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -714,12 +714,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="omega" oor:op="replace">
<prop oor:name="Char">
- <value>57550</value>
+ <value>969</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -728,12 +728,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="OMEGA" oor:op="replace">
<prop oor:name="Char">
- <value>57526</value>
+ <value>937</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -742,12 +742,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="varepsilon" oor:op="replace">
<prop oor:name="Char">
- <value>57551</value>
+ <value>949</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -756,12 +756,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="vartheta" oor:op="replace">
<prop oor:name="Char">
- <value>57552</value>
+ <value>977</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -770,12 +770,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="varpi" oor:op="replace">
<prop oor:name="Char">
- <value>57553</value>
+ <value>982</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -784,7 +784,7 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="varrho" oor:op="replace">
@@ -798,12 +798,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="varsigma" oor:op="replace">
<prop oor:name="Char">
- <value>57555</value>
+ <value>962</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -812,12 +812,12 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="varphi" oor:op="replace">
<prop oor:name="Char">
- <value>57556</value>
+ <value>966</value>
</prop>
<prop oor:name="Set">
<value>Greek</value>
@@ -826,7 +826,7 @@
<value>true</value>
</prop>
<prop oor:name="FontFormatId">
- <value>Id1</value>
+ <value>Id2</value>
</prop>
</node>
<node oor:name="element" oor:op="replace">
@@ -915,7 +915,7 @@
</node>
<node oor:name="tendto" oor:op="replace">
<prop oor:name="Char">
- <value>57484</value>
+ <value>8594</value>
</prop>
<prop oor:name="Set">
<value>Special</value>
@@ -985,7 +985,7 @@
</node>
<node oor:name="perthousand" oor:op="replace">
<prop oor:name="Char">
- <value>57472</value>
+ <value>8240</value>
</prop>
<prop oor:name="Set">
<value>Special</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 0ba86ef6b1aa..fa0611e07041 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -77,14 +77,6 @@
<value xml:lang="en-US">Foote~r</value>
</prop>
</node>
- <node oor:name=".uno:PreviewPrintOptions" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Print options page view</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:PreviewZoom" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Preview Zoom</value>
@@ -911,7 +903,7 @@
</node>
<node oor:name=".uno:PrintPagePreView" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Print page view</value>
+ <value xml:lang="en-US">Print document</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu
index 2a17b4ecdd55..10dced44e44e 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -48,6 +48,14 @@
<value>false</value>
</prop>
</node>
+ <node oor:name="PrintDialog" oor:op="replace">
+ <prop oor:name="Collate" oor:op="replace" oor:type="xs:string">
+ <value>true</value>
+ </prop>
+ <prop oor:name="CollateBox" oor:op="replace" oor:type="xs:string">
+ <value>Default</value>
+ </prop>
+ </node>
</node>
<node oor:name="DefaultFonts">
<node oor:name="en" oor:op="replace">
diff --git a/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs b/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs
index cb684017c7c3..3755945df3f6 100644
--- a/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs
@@ -38,9 +38,9 @@
<info>
<author>OJ</author>
</info>
- <group oor:name="DatabaseNameSetting">
+ <group oor:name="DatabaseDocumentRegistration">
<info>
- <desc>Describes how to establish a database connection and how to filter and layout the database data.</desc>
+ <desc>describes a single database document registration.</desc>
</info>
<prop oor:name="Name" oor:type="xs:string">
<info>
@@ -310,9 +310,9 @@
</set>
</group>
- <set oor:name="RegisteredNames" oor:node-type="DatabaseNameSetting">
+ <set oor:name="RegisteredNames" oor:node-type="DatabaseDocumentRegistration">
<info>
- <desc>Specifies all names which are registered.</desc>
+ <desc>Specifies the database documents registered within OpenOffice.org, for quick access by a programmatic name.</desc>
</info>
</set>
diff --git a/ooo_custom_images/industrial/res/lc10713.png b/ooo_custom_images/industrial/lc10713.png
index 415f6609b3cc..415f6609b3cc 100644
--- a/ooo_custom_images/industrial/res/lc10713.png
+++ b/ooo_custom_images/industrial/lc10713.png
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10616.png b/ooo_custom_images/industrial/res/lc10616.png
deleted file mode 100644
index 41fc82eb8d8c..000000000000
--- a/ooo_custom_images/industrial/res/lc10616.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10617.png b/ooo_custom_images/industrial/res/lc10617.png
deleted file mode 100644
index d301b68eeeaa..000000000000
--- a/ooo_custom_images/industrial/res/lc10617.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10618.png b/ooo_custom_images/industrial/res/lc10618.png
deleted file mode 100644
index 9a3a52fdcdd9..000000000000
--- a/ooo_custom_images/industrial/res/lc10618.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10619.png b/ooo_custom_images/industrial/res/lc10619.png
deleted file mode 100644
index 3c46d3a5e046..000000000000
--- a/ooo_custom_images/industrial/res/lc10619.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10620.png b/ooo_custom_images/industrial/res/lc10620.png
deleted file mode 100644
index 57f243c52c12..000000000000
--- a/ooo_custom_images/industrial/res/lc10620.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10621.png b/ooo_custom_images/industrial/res/lc10621.png
deleted file mode 100644
index 42c7853176e7..000000000000
--- a/ooo_custom_images/industrial/res/lc10621.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10627.png b/ooo_custom_images/industrial/res/lc10627.png
deleted file mode 100644
index 621e05a5f628..000000000000
--- a/ooo_custom_images/industrial/res/lc10627.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10630.png b/ooo_custom_images/industrial/res/lc10630.png
deleted file mode 100644
index 4896523df16f..000000000000
--- a/ooo_custom_images/industrial/res/lc10630.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10712.png b/ooo_custom_images/industrial/res/lc10712.png
deleted file mode 100644
index 66af218675a8..000000000000
--- a/ooo_custom_images/industrial/res/lc10712.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10714.png b/ooo_custom_images/industrial/res/lc10714.png
deleted file mode 100644
index aba330f0180b..000000000000
--- a/ooo_custom_images/industrial/res/lc10714.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10723.png b/ooo_custom_images/industrial/res/lc10723.png
deleted file mode 100644
index 14ce6034e5e4..000000000000
--- a/ooo_custom_images/industrial/res/lc10723.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/lc10724.png b/ooo_custom_images/industrial/res/lc10724.png
deleted file mode 100644
index 814d0c4c1636..000000000000
--- a/ooo_custom_images/industrial/res/lc10724.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10616.png b/ooo_custom_images/industrial/res/sc10616.png
deleted file mode 100644
index c8fc0a22012c..000000000000
--- a/ooo_custom_images/industrial/res/sc10616.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10617.png b/ooo_custom_images/industrial/res/sc10617.png
deleted file mode 100644
index f31445e09c02..000000000000
--- a/ooo_custom_images/industrial/res/sc10617.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10618.png b/ooo_custom_images/industrial/res/sc10618.png
deleted file mode 100644
index 4876bd4193e1..000000000000
--- a/ooo_custom_images/industrial/res/sc10618.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10619.png b/ooo_custom_images/industrial/res/sc10619.png
deleted file mode 100644
index 28a6db3f4292..000000000000
--- a/ooo_custom_images/industrial/res/sc10619.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10620.png b/ooo_custom_images/industrial/res/sc10620.png
deleted file mode 100644
index 1cb5a75cb7b8..000000000000
--- a/ooo_custom_images/industrial/res/sc10620.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10621.png b/ooo_custom_images/industrial/res/sc10621.png
deleted file mode 100644
index 08923da25fe5..000000000000
--- a/ooo_custom_images/industrial/res/sc10621.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10627.png b/ooo_custom_images/industrial/res/sc10627.png
deleted file mode 100644
index c939992c76b2..000000000000
--- a/ooo_custom_images/industrial/res/sc10627.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10630.png b/ooo_custom_images/industrial/res/sc10630.png
deleted file mode 100644
index ec4407222430..000000000000
--- a/ooo_custom_images/industrial/res/sc10630.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10712.png b/ooo_custom_images/industrial/res/sc10712.png
deleted file mode 100644
index dda7cd8c98e3..000000000000
--- a/ooo_custom_images/industrial/res/sc10712.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10714.png b/ooo_custom_images/industrial/res/sc10714.png
deleted file mode 100644
index 8df4f8517b9e..000000000000
--- a/ooo_custom_images/industrial/res/sc10714.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10723.png b/ooo_custom_images/industrial/res/sc10723.png
deleted file mode 100644
index e8dbea9bef2f..000000000000
--- a/ooo_custom_images/industrial/res/sc10723.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10724.png b/ooo_custom_images/industrial/res/sc10724.png
deleted file mode 100644
index 5b46013f9f20..000000000000
--- a/ooo_custom_images/industrial/res/sc10724.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/industrial/res/sc10713.png b/ooo_custom_images/industrial/sc10713.png
index 5da3e8120884..5da3e8120884 100644
--- a/ooo_custom_images/industrial/res/sc10713.png
+++ b/ooo_custom_images/industrial/sc10713.png
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10713.png b/ooo_custom_images/tango/lc10713.png
index c18733cf1528..c18733cf1528 100644
--- a/ooo_custom_images/tango/res/lc10713.png
+++ b/ooo_custom_images/tango/lc10713.png
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10616.png b/ooo_custom_images/tango/res/lc10616.png
deleted file mode 100644
index 27e7b1d4ce0c..000000000000
--- a/ooo_custom_images/tango/res/lc10616.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10617.png b/ooo_custom_images/tango/res/lc10617.png
deleted file mode 100644
index 1fadca11b55c..000000000000
--- a/ooo_custom_images/tango/res/lc10617.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10618.png b/ooo_custom_images/tango/res/lc10618.png
deleted file mode 100644
index a473e22187c6..000000000000
--- a/ooo_custom_images/tango/res/lc10618.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10619.png b/ooo_custom_images/tango/res/lc10619.png
deleted file mode 100644
index 682aa48ae7c5..000000000000
--- a/ooo_custom_images/tango/res/lc10619.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10620.png b/ooo_custom_images/tango/res/lc10620.png
deleted file mode 100644
index 57f243c52c12..000000000000
--- a/ooo_custom_images/tango/res/lc10620.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10621.png b/ooo_custom_images/tango/res/lc10621.png
deleted file mode 100644
index 42c7853176e7..000000000000
--- a/ooo_custom_images/tango/res/lc10621.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10627.png b/ooo_custom_images/tango/res/lc10627.png
deleted file mode 100644
index 0dcb0361bb74..000000000000
--- a/ooo_custom_images/tango/res/lc10627.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10630.png b/ooo_custom_images/tango/res/lc10630.png
deleted file mode 100644
index 4916fc905af4..000000000000
--- a/ooo_custom_images/tango/res/lc10630.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10712.png b/ooo_custom_images/tango/res/lc10712.png
deleted file mode 100644
index 8246d5fc8e9a..000000000000
--- a/ooo_custom_images/tango/res/lc10712.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10714.png b/ooo_custom_images/tango/res/lc10714.png
deleted file mode 100644
index 6be9c0ad117f..000000000000
--- a/ooo_custom_images/tango/res/lc10714.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10723.png b/ooo_custom_images/tango/res/lc10723.png
deleted file mode 100644
index 380fd0cdc651..000000000000
--- a/ooo_custom_images/tango/res/lc10723.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10724.png b/ooo_custom_images/tango/res/lc10724.png
deleted file mode 100644
index bce9f4d6bc29..000000000000
--- a/ooo_custom_images/tango/res/lc10724.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/lc10724.xcf.bz2 b/ooo_custom_images/tango/res/lc10724.xcf.bz2
deleted file mode 100644
index 658b4d4c984c..000000000000
--- a/ooo_custom_images/tango/res/lc10724.xcf.bz2
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10616.png b/ooo_custom_images/tango/res/sc10616.png
deleted file mode 100644
index c8fc0a22012c..000000000000
--- a/ooo_custom_images/tango/res/sc10616.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10617.png b/ooo_custom_images/tango/res/sc10617.png
deleted file mode 100644
index f31445e09c02..000000000000
--- a/ooo_custom_images/tango/res/sc10617.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10618.png b/ooo_custom_images/tango/res/sc10618.png
deleted file mode 100644
index 4876bd4193e1..000000000000
--- a/ooo_custom_images/tango/res/sc10618.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10619.png b/ooo_custom_images/tango/res/sc10619.png
deleted file mode 100644
index 28a6db3f4292..000000000000
--- a/ooo_custom_images/tango/res/sc10619.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10620.png b/ooo_custom_images/tango/res/sc10620.png
deleted file mode 100644
index 1cb5a75cb7b8..000000000000
--- a/ooo_custom_images/tango/res/sc10620.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10621.png b/ooo_custom_images/tango/res/sc10621.png
deleted file mode 100644
index 8cb6739ff95b..000000000000
--- a/ooo_custom_images/tango/res/sc10621.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10627.png b/ooo_custom_images/tango/res/sc10627.png
deleted file mode 100644
index d901a6d137f6..000000000000
--- a/ooo_custom_images/tango/res/sc10627.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10630.png b/ooo_custom_images/tango/res/sc10630.png
deleted file mode 100644
index bacdfb377577..000000000000
--- a/ooo_custom_images/tango/res/sc10630.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10712.png b/ooo_custom_images/tango/res/sc10712.png
deleted file mode 100644
index db6cb6b9f952..000000000000
--- a/ooo_custom_images/tango/res/sc10712.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10714.png b/ooo_custom_images/tango/res/sc10714.png
deleted file mode 100644
index b3115b6e6269..000000000000
--- a/ooo_custom_images/tango/res/sc10714.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10723.png b/ooo_custom_images/tango/res/sc10723.png
deleted file mode 100644
index 5bd5f0e422ef..000000000000
--- a/ooo_custom_images/tango/res/sc10723.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10724.png b/ooo_custom_images/tango/res/sc10724.png
deleted file mode 100644
index c7a16f532c5d..000000000000
--- a/ooo_custom_images/tango/res/sc10724.png
+++ /dev/null
Binary files differ
diff --git a/ooo_custom_images/tango/res/sc10713.png b/ooo_custom_images/tango/sc10713.png
index 2650d6e13277..2650d6e13277 100644
--- a/ooo_custom_images/tango/res/sc10713.png
+++ b/ooo_custom_images/tango/sc10713.png
Binary files differ
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index f73427526be6..5a6a1d0e319e 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -60,11 +60,16 @@
#include "unotools/localedatawrapper.hxx"
#include "unotools/configitem.hxx"
#include "unotools/configmgr.hxx"
+
+#include "com/sun/star/awt/Size.hpp"
+
using namespace psp;
using namespace rtl;
using namespace padmin;
using namespace osl;
+using namespace com::sun::star;
using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
PADialog* PADialog::Create( Window* pParent, BOOL bAdmin )
{
@@ -96,7 +101,6 @@ PADialog::PADialog( Window* pParent, BOOL /*bAdmin*/ ) :
m_aCancelButton( this, PaResId( RID_PA_BTN_CANCEL ) ),
m_aDefPrt( PaResId( RID_PA_STR_DEFPRT ) ),
m_aRenameStr( PaResId( RID_PA_STR_RENAME ) ),
- m_pPrinter( 0 ),
m_rPIManager( PrinterInfoManager::get() )
{
FreeResource();
@@ -248,18 +252,6 @@ IMPL_LINK( PADialog, SelectHdl, ListBox*, pListBox )
return 0;
}
-IMPL_LINK( PADialog, EndPrintHdl, void*, EMPTYARG )
-{
- String aInfoString( PaResId( RID_PA_TXT_TESTPAGE_PRINTED ) );
- InfoBox aInfoBox( this, aInfoString );
- aInfoBox.SetText( String( PaResId( RID_BXT_TESTPAGE ) ) );
- aInfoBox.Execute();
-
- delete m_pPrinter;
- m_pPrinter = NULL;
- return 0;
-}
-
void PADialog::UpdateDefPrt()
{
m_rPIManager.setDefaultPrinter( getSelectedDevice() );
@@ -369,66 +361,77 @@ static Color approachColor( const Color& rFrom, const Color& rTo )
return aColor;
}
-#define DELTA 5.0
-void PADialog::PrintTestPage()
+class SpaPrinterController : public vcl::PrinterController
{
- if( m_pPrinter ) // already printing; user pressed button twice
- return;
+public:
+ SpaPrinterController( const boost::shared_ptr<Printer>& i_pPrinter )
+ : vcl::PrinterController( i_pPrinter )
+ {}
+ virtual ~SpaPrinterController()
+ {}
+
+ virtual int getPageCount() const { return 1; }
+ virtual Sequence< PropertyValue > getPageParameters( int i_nPage ) const;
+ virtual void printPage( int i_nPage ) const;
+ virtual void jobFinished( com::sun::star::view::PrintableState );
+};
+
+Sequence< PropertyValue > SpaPrinterController::getPageParameters( int ) const
+{
+ Sequence< PropertyValue > aRet( 1 );
- String sPrinter( getSelectedDevice() );
+ Size aPageSize( getPrinter()->GetPaperSizePixel() );
+ aPageSize = getPrinter()->PixelToLogic( aPageSize, MapMode( MAP_100TH_MM ) );
+
+ awt::Size aSize;
+ aSize.Width = aPageSize.Width();
+ aSize.Height = aPageSize.Height();
+ aRet[0].Value = makeAny(aSize);
- m_pPrinter = new Printer( sPrinter );
+ return aRet;
+}
- PrinterInfo aInfo( m_rPIManager.getPrinterInfo( sPrinter ) );
+void SpaPrinterController::printPage( int ) const
+{
+ const double DELTA = 5.0;
+
+ boost::shared_ptr<Printer> pPrinter( getPrinter() );
+
+ PrinterInfo aInfo( psp::PrinterInfoManager::get().getPrinterInfo( pPrinter->GetName() ) );
const PPDParser* pPrintParser = aInfo.m_pParser;
MapMode aMapMode( MAP_100TH_MM );
Bitmap aButterfly( PaResId( RID_BUTTERFLY ) );
- m_pPrinter->SetMapMode( aMapMode );
- m_pPrinter->SetEndPrintHdl( LINK( this, PADialog, EndPrintHdl ) );
+ pPrinter->SetMapMode( aMapMode );
Any aRet = utl::ConfigManager::GetDirectConfigProperty( utl::ConfigManager::PRODUCTNAME );
OUString aJobName;
aRet >>= aJobName;
aJobName = aJobName + OUString( RTL_CONSTASCII_USTRINGPARAM( " Testpage" ) );
- if( m_pPrinter->GetName() != sPrinter || ! m_pPrinter->StartJob( aJobName ) )
- {
- String aString( PaResId( RID_ERR_NOPRINTER ) );
- aString.SearchAndReplaceAscii( "%s", sPrinter );
- ErrorBox aErrorBox( this, WB_OK | WB_DEF_OK, aString );
- aErrorBox.SetText( String( PaResId( RID_BXT_ENVIRONMENT ) ) );
- aErrorBox.Execute();
- delete m_pPrinter;
- m_pPrinter = 0;
- return;
- }
- m_pPrinter->StartPage();
-
- Size aPaperSize=m_pPrinter->GetOutputSize();
+ Size aPaperSize=pPrinter->GetOutputSize();
Point aCenter( aPaperSize.Width()/2-300,
aPaperSize.Height() - aPaperSize.Width()/2 );
Point aP1( aPaperSize.Width()/48, 0), aP2( aPaperSize.Width()/40, 0 ), aPoint;
- m_pPrinter->DrawRect( Rectangle( Point( 0,0 ), aPaperSize ) );
- m_pPrinter->DrawRect( Rectangle( Point( 100,100 ),
+ pPrinter->DrawRect( Rectangle( Point( 0,0 ), aPaperSize ) );
+ pPrinter->DrawRect( Rectangle( Point( 100,100 ),
Size( aPaperSize.Width()-200,
aPaperSize.Height()-200 ) ) );
- m_pPrinter->DrawRect( Rectangle( Point( 200,200 ),
+ pPrinter->DrawRect( Rectangle( Point( 200,200 ),
Size( aPaperSize.Width()-400,
aPaperSize.Height()-400 ) ) );
- m_pPrinter->DrawRect( Rectangle( Point( 300,300 ),
+ pPrinter->DrawRect( Rectangle( Point( 300,300 ),
Size( aPaperSize.Width()-600,
aPaperSize.Height()-600 ) ) );
- Font aFont( m_pPrinter->GetFont() );
- aFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ) );
+ Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ), Size( 0, 400 ) );
aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetItalic( ITALIC_NONE );
- m_pPrinter->SetFont( aFont );
+ pPrinter->SetFont( aFont );
OUStringBuffer aPrintText(1024);
long nWidth = 0, nMaxWidth = 0;
@@ -455,12 +458,12 @@ void PADialog::PrintTestPage()
aToken = String::CreateFromAscii( aResIds[i].pDirect );
else
aToken = String( PaResId( aResIds[i].nResId ) );
- nMaxWidth = ( nWidth = m_pPrinter->GetTextWidth( aToken ) ) > nMaxWidth ? nWidth : nMaxWidth;
+ nMaxWidth = ( nWidth = pPrinter->GetTextWidth( aToken ) ) > nMaxWidth ? nWidth : nMaxWidth;
aPrintText.append( aToken );
aPrintText.append( (sal_Unicode)'\n' );
};
- m_pPrinter->DrawText( Rectangle( Point( 1000, 2000 ),
+ pPrinter->DrawText( Rectangle( Point( 1000, 1000 ),
Size( aPaperSize.Width() - 2000,
aPaperSize.Height() - 4000 ) ),
aPrintText.makeStringAndClear(),
@@ -470,7 +473,7 @@ void PADialog::PrintTestPage()
const LocaleDataWrapper& rLocaleWrapper( aSettings.GetLocaleDataWrapper() );
aPrintText.appendAscii( ": " );
- aPrintText.append( sPrinter );
+ aPrintText.append( pPrinter->GetName() );
aPrintText.appendAscii( "\n: " );
if( pPrintParser )
aPrintText.append( pPrintParser->getPrinterName() );
@@ -487,17 +490,17 @@ void PADialog::PrintTestPage()
aPrintText.appendAscii( "\n: " );
aPrintText.append( rLocaleWrapper.getTime( Time() ) );
- m_pPrinter->DrawText( Rectangle( Point( 1100 + nMaxWidth, 2000 ),
+ pPrinter->DrawText( Rectangle( Point( 1100 + nMaxWidth, 1000 ),
Size( aPaperSize.Width() - 2100 - nMaxWidth,
aPaperSize.Height() - 4000 ) ),
aPrintText.makeStringAndClear(),
TEXT_DRAW_MULTILINE );
- m_pPrinter->DrawBitmap( Point( aPaperSize.Width() - 4000, 1000 ),
+ pPrinter->DrawBitmap( Point( aPaperSize.Width() - 4000, 1000 ),
Size( 3000,3000 ),
aButterfly );
- m_pPrinter->SetFillColor();
- m_pPrinter->DrawRect( Rectangle( Point( aPaperSize.Width() - 4000, 1000 ),
+ pPrinter->SetFillColor();
+ pPrinter->DrawRect( Rectangle( Point( aPaperSize.Width() - 4000, 1000 ),
Size( 3000,3000 ) ) );
Color aWhite( 0xff, 0xff, 0xff );
@@ -511,22 +514,22 @@ void PADialog::PrintTestPage()
Gradient aGradient( GRADIENT_LINEAR, aBlack, aWhite );
aGradient.SetAngle( 900 );
- m_pPrinter->DrawGradient( Rectangle( Point( 1000, 5500 ),
+ pPrinter->DrawGradient( Rectangle( Point( 1000, 5500 ),
Size( aPaperSize.Width() - 2000,
500 ) ), aGradient );
aGradient.SetStartColor( aDarkRed );
aGradient.SetEndColor( aLightBlue );
- m_pPrinter->DrawGradient( Rectangle( Point( 1000, 6300 ),
+ pPrinter->DrawGradient( Rectangle( Point( 1000, 6300 ),
Size( aPaperSize.Width() - 2000,
500 ) ), aGradient );
aGradient.SetStartColor( aDarkBlue );
aGradient.SetEndColor( aLightGreen );
- m_pPrinter->DrawGradient( Rectangle( Point( 1000, 7100 ),
+ pPrinter->DrawGradient( Rectangle( Point( 1000, 7100 ),
Size( aPaperSize.Width() - 2000,
500 ) ), aGradient );
aGradient.SetStartColor( aDarkGreen );
aGradient.SetEndColor( aLightRed );
- m_pPrinter->DrawGradient( Rectangle( Point( 1000, 7900 ),
+ pPrinter->DrawGradient( Rectangle( Point( 1000, 7900 ),
Size( aPaperSize.Width() - 2000,
500 ) ), aGradient );
@@ -543,7 +546,7 @@ void PADialog::PrintTestPage()
{
aLineInfo.SetWidth( n/3 );
aLineColor = approachColor( aLineColor, aApproachColor );
- m_pPrinter->SetLineColor( aLineColor );
+ pPrinter->SetLineColor( aLineColor );
// switch aproach color
if( aApproachColor.IsRGBEqual( aLineColor ) )
@@ -556,7 +559,7 @@ void PADialog::PrintTestPage()
aApproachColor = Color( 0, 200, 0 );
}
- m_pPrinter->DrawLine( project( aP1 ) + aCenter,
+ pPrinter->DrawLine( project( aP1 ) + aCenter,
project( aP2 ) + aCenter,
aLineInfo );
aPoint.X() = (int)((((double)aP1.X())*cosd - ((double)aP1.Y())*sind)*factor);
@@ -569,8 +572,38 @@ void PADialog::PrintTestPage()
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
fprintf( stderr, "%d lines\n",n );
#endif
- m_pPrinter->EndPage();
- m_pPrinter->EndJob();
+}
+
+void SpaPrinterController::jobFinished( com::sun::star::view::PrintableState )
+{
+ String aInfoString( PaResId( RID_PA_TXT_TESTPAGE_PRINTED ) );
+ InfoBox aInfoBox( NULL, aInfoString );
+ aInfoBox.SetText( String( PaResId( RID_BXT_TESTPAGE ) ) );
+ aInfoBox.Execute();
+}
+
+void PADialog::PrintTestPage()
+{
+ String sPrinter( getSelectedDevice() );
+
+ boost::shared_ptr<Printer> pPrinter( new Printer( sPrinter ) );
+
+ if( pPrinter->GetName() != sPrinter )
+ {
+ String aString( PaResId( RID_ERR_NOPRINTER ) );
+ aString.SearchAndReplaceAscii( "%s", sPrinter );
+
+ ErrorBox aErrorBox( this, WB_OK | WB_DEF_OK, aString );
+ aErrorBox.SetText( String( PaResId( RID_BXT_ENVIRONMENT ) ) );
+ aErrorBox.Execute();
+ return;
+ }
+
+ boost::shared_ptr<vcl::PrinterController> pController( new SpaPrinterController( pPrinter ) );
+ JobSetup aJobSetup( pPrinter->GetJobSetup() );
+ aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
+ String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
+ Printer::PrintJob( pController, aJobSetup );
}
void PADialog::AddDevice()
diff --git a/padmin/source/padialog.hxx b/padmin/source/padialog.hxx
index ac6ee8f4279f..0350f66a2905 100644
--- a/padmin/source/padialog.hxx
+++ b/padmin/source/padialog.hxx
@@ -83,7 +83,6 @@ namespace padmin {
String m_aDefPrt;
String m_aRenameStr;
- Printer* m_pPrinter;
::psp::PrinterInfoManager& m_rPIManager;
::std::list< ::rtl::OUString > m_aPrinters;
@@ -94,7 +93,6 @@ namespace padmin {
DECL_LINK( ClickBtnHdl, PushButton* );
DECL_LINK( DoubleClickHdl, ListBox* );
DECL_LINK( SelectHdl, ListBox* );
- DECL_LINK( EndPrintHdl, void* );
DECL_LINK( DelPressedHdl, ListBox* );
PADialog( Window*, BOOL );
diff --git a/qadevOOo/tests/java/ifc/view/_XFormLayerAccess.java b/qadevOOo/tests/java/ifc/view/_XFormLayerAccess.java
index befc9a84f966..e875fe3bb3aa 100644
--- a/qadevOOo/tests/java/ifc/view/_XFormLayerAccess.java
+++ b/qadevOOo/tests/java/ifc/view/_XFormLayerAccess.java
@@ -31,7 +31,7 @@
package ifc.view;
import com.sun.star.form.XForm;
-import com.sun.star.form.XFormController;
+import com.sun.star.form.runtime.XFormController;
import lib.MultiMethodTest;
import com.sun.star.view.XFormLayerAccess;
diff --git a/reportbuilder/registry/data/org/openoffice/Office/Accelerators.xcu b/reportbuilder/registry/data/org/openoffice/Office/Accelerators.xcu
index 2a3ded2ef55a..921fbe8c21b0 100644
--- a/reportbuilder/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/reportbuilder/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -62,6 +62,13 @@
</prop>
</node>
+ <node oor:name="F8_MOD2" oor:op="replace">
+ <prop oor:name="Command">
+ <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+ <value xml:lang="en-US">.uno:AddField</value>
+ </prop>
+ </node>
+
<node oor:name="ESCAPE" oor:op="replace">
<prop oor:name="Command">
<value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
diff --git a/reportbuilder/registry/data/org/openoffice/Office/UI/ReportCommands.xcu b/reportbuilder/registry/data/org/openoffice/Office/UI/ReportCommands.xcu
index 67eb82dd6729..0f8f3eead344 100644
--- a/reportbuilder/registry/data/org/openoffice/Office/UI/ReportCommands.xcu
+++ b/reportbuilder/registry/data/org/openoffice/Office/UI/ReportCommands.xcu
@@ -54,6 +54,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:AddField" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~Add Field</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:ConditionalFormatting" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Conditional Formatting...</value>
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 31ac92345a2f..b0012e731c81 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -293,6 +293,16 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
{
_GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
}
+ // RDFa: needed for content and header/footer styles
+ if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
+ {
+ _GetNamespaceMap().Add( GetXMLToken(XML_NP_XHTML),GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
+ }
+ // GRDDL: to convert RDFa and meta.xml to RDF
+ if( (getExportFlags() & (EXPORT_META|EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
+ {
+ _GetNamespaceMap().Add( GetXMLToken(XML_NP_GRDDL),GetXMLToken(XML_N_GRDDL), XML_NAMESPACE_GRDDL );
+ }
_GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
_GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
@@ -948,9 +958,9 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
AddAttribute(XML_NAMESPACE_FORM, XML_IMAGE_DATA,sTargetLocation);
}
bExportData = sal_True;
- ::rtl::OUStringBuffer sValue;
- const SvXMLEnumMapEntry* aXML_ImageScaleEnumMap = OXMLHelper::GetImageScaleOptions();
- if ( SvXMLUnitConverter::convertEnum( sValue, xImage->getScaleMode(),aXML_ImageScaleEnumMap ) )
+ ::rtl::OUStringBuffer sValue;
+ const SvXMLEnumMapEntry* aXML_ImageScaleEnumMap = OXMLHelper::GetImageScaleOptions();
+ if ( SvXMLUnitConverter::convertEnum( sValue, xImage->getScaleMode(),aXML_ImageScaleEnumMap ) )
AddAttribute(XML_NAMESPACE_REPORT, XML_SCALE, sValue.makeStringAndClear() );
}
else if ( xReportDefinition.is() )
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 4cf7c9c5abc9..930c7cb8ad12 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/reflection/XProxyFactory.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <comphelper/sequence.hxx>
@@ -59,7 +60,6 @@ using namespace ::xmloff::token;
ImportDocumentHandler::ImportDocumentHandler(uno::Reference< uno::XComponentContext > const & context) :
m_xContext(context)
- ,m_bOnlyOnce(true)
{
}
// -----------------------------------------------------------------------------
@@ -124,7 +124,24 @@ void SAL_CALL ImportDocumentHandler::endDocument() throw (uno::RuntimeException,
m_xDelegatee->endDocument();
uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xModel,uno::UNO_QUERY_THROW);
if ( xReceiver.is() )
+ {
xReceiver->attachDataProvider(m_xDatabaseDataProvider.get());
+ // this fills the chart again
+ uno::Sequence< beans::PropertyValue > aArgs( 4 );
+ aArgs[0] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
+ uno::makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ), beans::PropertyState_DIRECT_VALUE );
+ aArgs[1] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("HasCategories"), -1,
+ uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE );
+ aArgs[2] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
+ uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE );
+ aArgs[3] = beans::PropertyValue(
+ ::rtl::OUString::createFromAscii("DataRowSource"), -1,
+ uno::makeAny( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE );
+ xReceiver->setArguments( aArgs );
+ }
}
void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & _xAttrList) throw (uno::RuntimeException, xml::sax::SAXException)
@@ -257,16 +274,6 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
}
} // for(;pArgIter != pArgEnd;++pArgIter)
- if ( m_bOnlyOnce )
- {
- try
- {
- m_xDatabaseDataProvider->createDataSource(m_aArguments);
- m_bOnlyOnce = false;
- }
- catch(uno::Exception)
- {}
- } // if ( m_bOnlyOnce )
SvXMLAttributeList* pList = new SvXMLAttributeList();
xNewAttribs = pList;
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
index 068fac8cb5f9..69772a71674d 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx
@@ -100,7 +100,6 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDatabaseDataProvider > m_xDatabaseDataProvider;
::std::auto_ptr<SvXMLTokenMap> m_pReportElemTokenMap;
- bool m_bOnlyOnce;
};
// -----------------------------------------------------------------------------
} // namespace rptxml
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 9d5c6352ef0b..817f88adf3cb 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1731,7 +1731,9 @@ void OReportController::impl_initialize( )
m_xReportDefinition->setCommand(aNames[0]);
m_xReportDefinition->setCommandType(sdb::CommandType::TABLE);
}
- }
+ } // if ( !sHierarchicalDocumentName.getLength() && getConnection().is() )
+
+ m_aVisualAreaSize = m_xReportDefinition->getVisualAreaSize(0);
} // if ( m_xReportDefinition.is() )
diff --git a/reportdesign/uiconfig/dbreport/accelerator/de-DE/default.xml b/reportdesign/uiconfig/dbreport/accelerator/de-DE/default.xml
index 6aaa305ae7a1..76c197f06174 100644
--- a/reportdesign/uiconfig/dbreport/accelerator/de-DE/default.xml
+++ b/reportdesign/uiconfig/dbreport/accelerator/de-DE/default.xml
@@ -4,6 +4,7 @@
<accel:item accel:code="KEY_RETURN" accel:mod2="true" xlink:href=".uno:ControlProperties"/>
<accel:item accel:code="KEY_F4" xlink:href=".uno:ControlProperties"/>
<accel:item accel:code="KEY_F5" xlink:href=".uno:ReportNavigator"/>
+ <accel:item accel:code="KEY_F8" accel:mod2="true" xlink:href=".uno:AddField"/>
<accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
<accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:DbSortingAndGrouping"/>
<accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:ExecuteReport"/>
diff --git a/reportdesign/uiconfig/dbreport/accelerator/en-GB/default.xml b/reportdesign/uiconfig/dbreport/accelerator/en-GB/default.xml
index 6aaa305ae7a1..76c197f06174 100644
--- a/reportdesign/uiconfig/dbreport/accelerator/en-GB/default.xml
+++ b/reportdesign/uiconfig/dbreport/accelerator/en-GB/default.xml
@@ -4,6 +4,7 @@
<accel:item accel:code="KEY_RETURN" accel:mod2="true" xlink:href=".uno:ControlProperties"/>
<accel:item accel:code="KEY_F4" xlink:href=".uno:ControlProperties"/>
<accel:item accel:code="KEY_F5" xlink:href=".uno:ReportNavigator"/>
+ <accel:item accel:code="KEY_F8" accel:mod2="true" xlink:href=".uno:AddField"/>
<accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
<accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:DbSortingAndGrouping"/>
<accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:ExecuteReport"/>
diff --git a/reportdesign/uiconfig/dbreport/accelerator/en-US/default.xml b/reportdesign/uiconfig/dbreport/accelerator/en-US/default.xml
index 6aaa305ae7a1..76c197f06174 100644
--- a/reportdesign/uiconfig/dbreport/accelerator/en-US/default.xml
+++ b/reportdesign/uiconfig/dbreport/accelerator/en-US/default.xml
@@ -4,6 +4,7 @@
<accel:item accel:code="KEY_RETURN" accel:mod2="true" xlink:href=".uno:ControlProperties"/>
<accel:item accel:code="KEY_F4" xlink:href=".uno:ControlProperties"/>
<accel:item accel:code="KEY_F5" xlink:href=".uno:ReportNavigator"/>
+ <accel:item accel:code="KEY_F8" accel:mod2="true" xlink:href=".uno:AddField"/>
<accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
<accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:DbSortingAndGrouping"/>
<accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:ExecuteReport"/>
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 9ae58087a335..e59a1e056f4b 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -2281,6 +2281,7 @@ RscTop * RscTypCont::InitClassTabControl( RscTop * pSuper,
RSC_TABCONTROL_ITEMLIST );
INS_WINBIT( pClassTabControl, SingleLine );
+ INS_WINBIT( pClassTabControl, DropDown );
}
return pClassTabControl;
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index b9b2b6a23c7d..0bde1616f6ae 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -1013,6 +1013,15 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
return nRet;
}
+ /* HACK: because memory mapping fails on various
+ platforms if the size of the source file is 0 byte */
+ if (0 == nSourceSize)
+ {
+ close(SourceFileFD);
+ close(DestFileFD);
+ return 0;
+ }
+
// read and lseek are used to check the possibility to access the data
// not a nice solution, but it allows to avoid a crash in case it is an opened samba file
// generally, reading of one byte should not affect the performance
@@ -1034,15 +1043,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
return nRet;
}
- /* HACK: because memory mapping fails on various
- platforms if the size of the source file is 0 byte */
- if (0 == nSourceSize)
- {
- close(SourceFileFD);
- close(DestFileFD);
- return 0;
- }
-
size_t nWritten = 0;
size_t nRemains = nSourceSize;
diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk
index a43f09e2e0e0..3247be8774de 100644
--- a/sal/util/makefile.mk
+++ b/sal/util/makefile.mk
@@ -160,6 +160,12 @@ SHL1STDLIBS+=-lcrypt
.ENDIF
.ENDIF
+# #i105898# required for LD_PRELOAD libsalalloc_malloc.so
+# if sal is linked with -Bsymbolic-functions
+.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
+SHL1LINKFLAGS+=-Wl,--dynamic-list=salalloc.list
+.ENDIF # .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
+
SHL1LIBS+=$(SLB)$/$(TARGET).lib
.IF "$(linkinc)" != ""
diff --git a/sal/util/salalloc.list b/sal/util/salalloc.list
new file mode 100644
index 000000000000..303d225dda7f
--- /dev/null
+++ b/sal/util/salalloc.list
@@ -0,0 +1,7 @@
+{
+ rtl_allocateMemory;
+ rtl_reallocateMemory;
+ rtl_freeMemory;
+ rtl_allocateZeroMemory;
+ rtl_freeZeroMemory;
+};
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 0228cddc50af..95d9ebc35a7c 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -75,6 +75,7 @@ class ScTableSheetObj;
class SvxFmDrawPage;
class SvxDrawPage;
class ScRangeList;
+class ScPrintUIOptions;
class ScSheetSaveData;
class SC_DLLPUBLIC ScModelObj : public SfxBaseModel,
@@ -98,6 +99,7 @@ private:
SfxItemPropertySet aPropSet;
ScDocShell* pDocShell;
ScPrintFuncCache* pPrintFuncCache;
+ ScPrintUIOptions* pPrinterOptions;
com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> xNumberAgg;
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawGradTab;
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawHatchTab;
@@ -110,7 +112,8 @@ private:
::cppu::OInterfaceContainerHelper maChangesListeners;
BOOL FillRenderMarkData( const com::sun::star::uno::Any& aSelection,
- ScMarkData& rMark, ScPrintSelectionStatus& rStatus ) const;
+ const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rOptions,
+ ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const;
com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> GetFormatter();
rtl::OUString maBuildId;
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 461a3eb970c2..8d3304867f78 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1377,6 +1377,8 @@
#define SCSTR_RENAMEOBJECT (STR_START + 215)
+#define SCSTR_PRINT_OPTIONS (STR_START+216)
+
// Navigator - in der Reihenfolge wie SC_CONTENT_...
#define SCSTR_CONTENT_ROOT (STR_START + 250)
#define SCSTR_CONTENT_TABLE (STR_START + 251)
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index bb322424a9a6..045ca7aac598 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -96,13 +96,14 @@ private:
USHORT nPane; // ScSplitPos oder SC_VIEWPANE_ACTIVE
protected:
- ScTabViewShell* GetViewShell() const { return pViewShell; }
::com::sun::star::awt::Rectangle GetVisArea() const;
public:
ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP);
virtual ~ScViewPaneBase();
+ ScTabViewShell* GetViewShell() const { return pViewShell; }
+
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
const ::com::sun::star::uno::Type & rType )
throw(::com::sun::star::uno::RuntimeException);
@@ -124,7 +125,7 @@ public:
getReferredCells() throw(::com::sun::star::uno::RuntimeException);
// XFormLayerAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL
getFormController( const ::com::sun::star::uno::Reference<
::com::sun::star::form::XForm >& Form )
throw (::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index b47f55124041..ae79fae7e8d3 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -76,9 +76,13 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
CellType eFType, eVType;
GetCellType(nFCol, nFRow, nFTab, eFType);
GetCellType(nVCol, nVRow, nVTab, eVType);
- // CELLTYPE_NOTE: kein Value aber von Formel referiert
- if (eFType == CELLTYPE_FORMULA && (eVType == CELLTYPE_VALUE
- || eVType == CELLTYPE_NOTE) )
+ // CELLTYPE_NOTE: no value, but referenced by formula
+ // #i108005# convert target value to number using default format,
+ // as previously done in ScInterpreter::GetDouble
+ double nTargetVal = 0.0;
+ sal_uInt32 nFIndex = 0;
+ if (eFType == CELLTYPE_FORMULA && (eVType == CELLTYPE_VALUE || eVType == CELLTYPE_NOTE) &&
+ GetFormatTable()->IsNumberFormat(sValStr, nFIndex, nTargetVal))
{
ScSingleRefData aRefData;
aRefData.InitFlags();
@@ -98,7 +102,7 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
aArr.AddSingleReference( aRefData );
aArr.AddOpCode( ocSep );
- aArr.AddString( sValStr.GetBuffer() );
+ aArr.AddDouble( nTargetVal );
aArr.AddOpCode( ocClose );
aArr.AddOpCode( ocStop );
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 157375f32c91..87a64874f651 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -77,13 +77,13 @@ const ScPrintOptions& ScPrintOptions::operator=( const ScPrintOptions& rCpy )
return *this;
}
-inline int ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const
+int ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const
{
return bSkipEmpty == rOpt.bSkipEmpty
&& bAllSheets == rOpt.bAllSheets;
}
-inline int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const
+int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const
{
return !(operator==(rOpt));
}
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 517759524c92..ce1d91c28744 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -81,7 +81,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
ScMultipleReadHeader::~ScMultipleReadHeader()
{
- if ( pMemStream && pMemStream->Tell() != pMemStream->GetSize() )
+ if ( pMemStream && pMemStream->Tell() != pMemStream->GetEndOfData() )
{
DBG_ERRORFILE( "Sizes nicht vollstaendig gelesen" );
if ( rStream.GetError() == SVSTREAM_OK )
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 4827366d3924..3ab36ce131ad 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2145,15 +2145,20 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
}
}
- if ( n+1 < nCollateCopies && pPrinter->GetDuplexMode() == DUPLEX_ON && ( nPrinted % 2 ) == 1 )
+ if ( n+1 < nCollateCopies &&
+ (pPrinter->GetDuplexMode() == DUPLEX_SHORTEDGE || pPrinter->GetDuplexMode() == DUPLEX_LONGEDGE) &&
+ ( nPrinted % 2 ) == 1 )
{
// #105584# when several collated copies are printed in duplex mode, and there is
// an odd number of pages, print an empty page between copies, so the first page of
// the second copy isn't printed on the back of the last page of the first copy.
// (same as in Writer ViewShell::Prt)
+ // FIXME: needs to be adapted to XRenderable interface
+ #if 0
pPrinter->StartPage();
pPrinter->EndPage();
+ #endif
}
}
}
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx
index 93ff22fad0a8..a35084d453d6 100644
--- a/sc/source/ui/inc/pfuncache.hxx
+++ b/sc/source/ui/inc/pfuncache.hxx
@@ -34,6 +34,7 @@
#include <vector>
#include <tools/gen.hxx>
#include "rangelst.hxx"
+#include "printopt.hxx"
class ScDocShell;
class ScMarkData;
@@ -58,6 +59,7 @@ class ScPrintSelectionStatus
{
ScPrintSelectionMode eMode;
ScRangeList aRanges;
+ ScPrintOptions aOptions;
public:
ScPrintSelectionStatus() : eMode(SC_PRINTSEL_INVALID) {}
@@ -65,11 +67,13 @@ public:
void SetMode(ScPrintSelectionMode eNew) { eMode = eNew; }
void SetRanges(const ScRangeList& rNew) { aRanges = rNew; }
+ void SetOptions(const ScPrintOptions& rNew) { aOptions = rNew; }
BOOL operator==(const ScPrintSelectionStatus& rOther) const
- { return eMode == rOther.eMode && aRanges == rOther.aRanges; }
+ { return eMode == rOther.eMode && aRanges == rOther.aRanges && aOptions == rOther.aOptions; }
ScPrintSelectionMode GetMode() const { return eMode; }
+ const ScPrintOptions& GetOptions() const { return aOptions; }
};
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index efe9a0312b02..2dfcd84a4726 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -738,3 +738,29 @@ String SCSTR_MOREBTN_FEWEROPTIONS
Text [ en-US ] = "Fewer ~Options";
};
+StringArray SCSTR_PRINT_OPTIONS
+{
+ ItemList [en-US] =
+ {
+ < "Pages"; >;
+ < "~Include output of empty pages"; >;
+ < "If checked empty pages that have no cell contents or draw objects are not printed."; >;
+ < "Sheets"; >;
+ < "Print ~only selected sheets"; >;
+ < "If checked only contents from selected sheets are printed, even if you specify a wider range in the Format - Print Ranges dialog. Content from sheets that are not selected will not be printed."; >;
+ < "Print content"; >;
+ < "~All sheets"; >;
+ < "The printout will be created from all sheets in the document."; >;
+ < "~Selected sheets"; >;
+ < "The printout will be created only from the currently selected sheets."; >;
+ < "Selected cells"; >;
+ < "The printout will be created only from the currently selected cells."; >;
+ < "Thereof print"; >;
+ < "All ~pages"; >;
+ < "Print all pages of the printable content."; >;
+ < "Pa~ges"; >;
+ < "Print only some pages of the printable content."; >;
+ < "%PRODUCTNAME %s"; >;
+ };
+};
+
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 5f4f1a7aa93f..71f4706085d8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -43,12 +43,14 @@
#include <svl/numuno.hxx>
#include <svl/smplhint.hxx>
#include <unotools/undoopt.hxx>
+#include <unotools/moduleoptions.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/pdfextoutdevdata.hxx>
#include <vcl/waitobj.hxx>
#include <unotools/charclass.hxx>
#include <tools/multisel.hxx>
+#include <tools/resary.hxx>
#include <toolkit/awt/vclxdevice.hxx>
#include <ctype.h>
#include <float.h> // DBL_MAX
@@ -90,11 +92,15 @@
#include "unoguard.hxx"
#include "unonames.hxx"
#include "shapeuno.hxx"
+#include "viewuno.hxx"
+#include "tabvwsh.hxx"
#include "printfun.hxx"
#include "pfuncache.hxx"
#include "scmod.hxx"
#include "rangeutl.hxx"
#include "ViewSettingsSequenceDefines.hxx"
+#include "sc.hrc"
+#include "scresid.hxx"
#ifndef _SVX_UNOSHAPE_HXX
#include <svx/unoshape.hxx>
@@ -209,6 +215,147 @@ SC_SIMPLE_SERVICE_INFO( ScTableSheetsObj, "ScTableSheetsObj", "com.sun.star.shee
//------------------------------------------------------------------------
+class ScPrintUIOptions : public vcl::PrinterOptionsHelper
+{
+public:
+ ScPrintUIOptions();
+ void SetDefaults();
+};
+
+ScPrintUIOptions::ScPrintUIOptions()
+{
+ const ScPrintOptions& rPrintOpt = SC_MOD()->GetPrintOptions();
+ sal_Int32 nContent = rPrintOpt.GetAllSheets() ? 0 : 1;
+ sal_Bool bSuppress = rPrintOpt.GetSkipEmpty();
+
+ ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) );
+ DBG_ASSERT( aStrings.Count() >= 19, "resource incomplete" );
+ if( aStrings.Count() < 19 ) // bad resource ?
+ return;
+
+ m_aUIProperties.realloc( 8 );
+
+ // create Section for spreadsheet (results in an extra tab page in dialog)
+ SvtModuleOptions aOpt;
+ String aAppGroupname( aStrings.GetString( 18 ) );
+ aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
+ aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) );
+ m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+
+ // create subgroup for pages
+ m_aUIProperties[1].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ), rtl::OUString() );
+
+ // create a bool option for empty pages
+ m_aUIProperties[2].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 1 ) ),
+ rtl::OUString( aStrings.GetString( 2 ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsIncludeEmptyPages" ) ),
+ ! bSuppress
+ );
+ // create Subgroup for print content
+ vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
+ aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
+ rtl::OUString(),
+ aPrintRangeOpt
+ );
+
+ // create a choice for the content to create
+ uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpTexts( 3 );
+ aChoices[0] = aStrings.GetString( 7 );
+ aHelpTexts[0] = aStrings.GetString( 8 );
+ aChoices[1] = aStrings.GetString( 9 );
+ aHelpTexts[1] = aStrings.GetString( 10 );
+ aChoices[2] = aStrings.GetString( 11 );
+ aHelpTexts[2] = aStrings.GetString( 12 );
+ m_aUIProperties[4].Value = getChoiceControlOpt( rtl::OUString(),
+ aHelpTexts,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ),
+ aChoices,
+ nContent );
+
+ // create Subgroup for print range
+ aPrintRangeOpt.mbInternalOnly = sal_True;
+ m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 13 ) ),
+ rtl::OUString(),
+ aPrintRangeOpt
+ );
+
+ // create a choice for the range to print
+ rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ aChoices.realloc( 2 );
+ aHelpTexts.realloc( 2 );
+ aChoices[0] = aStrings.GetString( 14 );
+ aHelpTexts[0] = aStrings.GetString( 15 );
+ aChoices[1] = aStrings.GetString( 16 );
+ aHelpTexts[1] = aStrings.GetString( 17 );
+ m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
+ aHelpTexts,
+ aPrintRangeName,
+ aChoices,
+ 0 );
+
+ // create a an Edit dependent on "Pages" selected
+ vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
+ m_aUIProperties[7].Value = getEditControlOpt( rtl::OUString(),
+ rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
+ rtl::OUString(),
+ aPageRangeOpt
+ );
+
+ // "Print only selected sheets" isn't needed because of the "Selected Sheets" choice in "Print content"
+#if 0
+ // create subgroup for sheets
+ m_aUIProperties[8].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 3 ) ), rtl::OUString() );
+
+ // create a bool option for selected pages only
+ m_aUIProperties[9].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 4 ) ),
+ rtl::OUString( aStrings.GetString( 5 ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsOnlySelectedSheets" ) ),
+ i_bSelectedOnly
+ );
+#endif
+}
+
+void ScPrintUIOptions::SetDefaults()
+{
+ // re-initialize the default values from print options
+
+ const ScPrintOptions& rPrintOpt = SC_MOD()->GetPrintOptions();
+ sal_Int32 nContent = rPrintOpt.GetAllSheets() ? 0 : 1;
+ sal_Bool bSuppress = rPrintOpt.GetSkipEmpty();
+
+ for (sal_Int32 nUIPos=0; nUIPos<m_aUIProperties.getLength(); ++nUIPos)
+ {
+ uno::Sequence<beans::PropertyValue> aUIProp;
+ if ( m_aUIProperties[nUIPos].Value >>= aUIProp )
+ {
+ for (sal_Int32 nPropPos=0; nPropPos<aUIProp.getLength(); ++nPropPos)
+ {
+ rtl::OUString aName = aUIProp[nPropPos].Name;
+ if ( aName.equalsAscii("Property") )
+ {
+ beans::PropertyValue aPropertyValue;
+ if ( aUIProp[nPropPos].Value >>= aPropertyValue )
+ {
+ if ( aPropertyValue.Name.equalsAscii( "PrintContent" ) )
+ {
+ aPropertyValue.Value <<= nContent;
+ aUIProp[nPropPos].Value <<= aPropertyValue;
+ }
+ else if ( aPropertyValue.Name.equalsAscii( "IsIncludeEmptyPages" ) )
+ {
+ ScUnoHelpFunctions::SetBoolInAny( aPropertyValue.Value, ! bSuppress );
+ aUIProp[nPropPos].Value <<= aPropertyValue;
+ }
+ }
+ }
+ }
+ m_aUIProperties[nUIPos].Value <<= aUIProp;
+ }
+ }
+}
+
// static
void ScModelObj::CreateAndSet(ScDocShell* pDocSh)
{
@@ -221,6 +368,7 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
aPropSet( lcl_GetDocOptPropertyMap() ),
pDocShell( pDocSh ),
pPrintFuncCache( NULL ),
+ pPrinterOptions( NULL ),
maChangesListeners( m_aMutex ),
mnXlsWriteProtPass( 0 )
{
@@ -240,6 +388,7 @@ ScModelObj::~ScModelObj()
xNumberAgg->setDelegator(uno::Reference<uno::XInterface>());
delete pPrintFuncCache;
+ delete pPrinterOptions;
}
uno::Reference< uno::XAggregation> ScModelObj::GetFormatter()
@@ -599,20 +748,65 @@ bool lcl_ParseTarget( const String& rTarget, ScRange& rTargetRange, Rectangle& r
return bRangeValid;
}
-BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, ScMarkData& rMark,
- ScPrintSelectionStatus& rStatus ) const
+BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
+ const uno::Sequence< beans::PropertyValue >& rOptions,
+ ScMarkData& rMark,
+ ScPrintSelectionStatus& rStatus, String& rPagesStr ) const
{
DBG_ASSERT( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" );
DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" );
BOOL bDone = FALSE;
+ uno::Reference<frame::XController> xView;
+
+ // defaults when no options are passed: all sheets, include empty pages
+ sal_Bool bSelectedSheetsOnly = sal_False;
+ sal_Bool bIncludeEmptyPages = sal_True;
+
+ bool bHasPrintContent = false;
+ sal_Int32 nPrintContent = 0; // all sheets / selected sheets / selected cells
+ sal_Int32 nPrintRange = 0; // all pages / pages
+ rtl::OUString aPageRange; // "pages" edit value
+
+ for( sal_Int32 i = 0, nLen = rOptions.getLength(); i < nLen; i++ )
+ {
+ if( rOptions[i].Name.equalsAscii( "IsOnlySelectedSheets" ) )
+ {
+ rOptions[i].Value >>= bSelectedSheetsOnly;
+ }
+ else if( rOptions[i].Name.equalsAscii( "IsIncludeEmptyPages" ) )
+ {
+ rOptions[i].Value >>= bIncludeEmptyPages;
+ }
+ else if( rOptions[i].Name.equalsAscii( "PageRange" ) )
+ {
+ rOptions[i].Value >>= aPageRange;
+ }
+ else if( rOptions[i].Name.equalsAscii( "PrintRange" ) )
+ {
+ rOptions[i].Value >>= nPrintRange;
+ }
+ else if( rOptions[i].Name.equalsAscii( "PrintContent" ) )
+ {
+ bHasPrintContent = true;
+ rOptions[i].Value >>= nPrintContent;
+ }
+ else if( rOptions[i].Name.equalsAscii( "View" ) )
+ {
+ rOptions[i].Value >>= xView;
+ }
+ }
+
+ // "Print Content" selection wins over "Selected Sheets" option
+ if ( bHasPrintContent )
+ bSelectedSheetsOnly = ( nPrintContent != 0 );
+
uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY);
if ( xInterface.is() )
{
ScCellRangesBase* pSelObj = ScCellRangesBase::getImplementation( xInterface );
uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
-
if ( pSelObj && pSelObj->GetDocShell() == pDocShell )
{
BOOL bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
@@ -685,12 +879,41 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, ScMarkData& rMa
// other selection types aren't supported
}
+ // restrict to selected sheets if a view is available
+ if ( bSelectedSheetsOnly && xView.is() )
+ {
+ ScTabViewObj* pViewObj = ScTabViewObj::getImplementation( xView );
+ if (pViewObj)
+ {
+ ScTabViewShell* pViewSh = pViewObj->GetViewShell();
+ if (pViewSh)
+ {
+ const ScMarkData& rViewMark = pViewSh->GetViewData()->GetMarkData();
+ SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
+ for (SCTAB nTab = 0; nTab < nTabCount; nTab++)
+ if (!rViewMark.GetTableSelect(nTab))
+ rMark.SelectTable( nTab, FALSE );
+ }
+ }
+ }
+
+ ScPrintOptions aNewOptions;
+ aNewOptions.SetSkipEmpty( !bIncludeEmptyPages );
+ aNewOptions.SetAllSheets( !bSelectedSheetsOnly );
+ rStatus.SetOptions( aNewOptions );
+
+ // "PrintRange" enables (1) or disables (0) the "PageRange" edit
+ if ( nPrintRange == 1 )
+ rPagesStr = aPageRange;
+ else
+ rPagesStr.Erase();
+
return bDone;
}
sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
- const uno::Sequence<beans::PropertyValue>& /* xOptions */ )
+ const uno::Sequence<beans::PropertyValue>& rOptions )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
ScUnoGuard aGuard;
@@ -699,7 +922,8 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
ScMarkData aMark;
ScPrintSelectionStatus aStatus;
- if ( !FillRenderMarkData( aSelection, aMark, aStatus ) )
+ String aPagesStr;
+ if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr ) )
return 0;
// The same ScPrintFuncCache object in pPrintFuncCache is used as long as
@@ -711,11 +935,37 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
delete pPrintFuncCache;
pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark, aStatus );
}
- return pPrintFuncCache->GetPageCount();
+ sal_Int32 nPages = pPrintFuncCache->GetPageCount();
+
+ sal_Int32 nSelectCount = nPages;
+ if ( aPagesStr.Len() )
+ {
+ MultiSelection aPageRanges( aPagesStr );
+ aPageRanges.SetTotalRange( Range( 1, nPages ) );
+ nSelectCount = aPageRanges.GetSelectCount();
+ }
+ return nSelectCount;
}
-uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 nRenderer,
- const uno::Any& aSelection, const uno::Sequence<beans::PropertyValue>& /* xOptions */ )
+sal_Int32 lcl_GetRendererNum( sal_Int32 nSelRenderer, const String& rPagesStr, sal_Int32 nTotalPages )
+{
+ if ( !rPagesStr.Len() )
+ return nSelRenderer;
+
+ MultiSelection aPageRanges( rPagesStr );
+ aPageRanges.SetTotalRange( Range( 1, nTotalPages ) );
+
+ sal_Int32 nSelected = aPageRanges.FirstSelected();
+ while ( nSelRenderer > 0 )
+ {
+ nSelected = aPageRanges.NextSelected();
+ --nSelRenderer;
+ }
+ return nSelected - 1; // selection is 1-based
+}
+
+uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 nSelRenderer,
+ const uno::Any& aSelection, const uno::Sequence<beans::PropertyValue>& rOptions )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
ScUnoGuard aGuard;
@@ -724,7 +974,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
ScMarkData aMark;
ScPrintSelectionStatus aStatus;
- if ( !FillRenderMarkData( aSelection, aMark, aStatus ) )
+ String aPagesStr;
+ if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr ) )
throw lang::IllegalArgumentException();
if ( !pPrintFuncCache || !pPrintFuncCache->IsSameSelection( aStatus ) )
@@ -733,8 +984,33 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark, aStatus );
}
long nTotalPages = pPrintFuncCache->GetPageCount();
+ sal_Int32 nRenderer = lcl_GetRendererNum( nSelRenderer, aPagesStr, nTotalPages );
if ( nRenderer >= nTotalPages )
- throw lang::IllegalArgumentException();
+ {
+ if ( nSelRenderer == 0 )
+ {
+ // getRenderer(0) is used to query the settings, so it must always return something
+
+ SCTAB nCurTab = 0; //! use current sheet from view?
+ ScPrintFunc aDefaultFunc( pDocShell, pDocShell->GetPrinter(), nCurTab );
+ Size aTwips = aDefaultFunc.GetPageSize();
+ awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM( aTwips.Height() ) );
+
+ uno::Sequence<beans::PropertyValue> aSequence(1);
+ beans::PropertyValue* pArray = aSequence.getArray();
+ pArray[0].Name = rtl::OUString::createFromAscii( SC_UNONAME_PAGESIZE );
+ pArray[0].Value <<= aPageSize;
+
+ if( ! pPrinterOptions )
+ pPrinterOptions = new ScPrintUIOptions;
+ else
+ pPrinterOptions->SetDefaults();
+ pPrinterOptions->appendPrintUIOptions( aSequence );
+ return aSequence;
+ }
+ else
+ throw lang::IllegalArgumentException();
+ }
// printer is used as device (just for page layout), draw view is not needed
@@ -748,7 +1024,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
pSelRange = &aRange;
}
ScPrintFunc aFunc( pDocShell, pDocShell->GetPrinter(), nTab,
- pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange );
+ pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() );
aFunc.SetRenderFlag( TRUE );
Range aPageRange( nRenderer+1, nRenderer+1 );
@@ -779,10 +1055,21 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
pArray[1].Name = rtl::OUString::createFromAscii( SC_UNONAME_SOURCERANGE );
pArray[1].Value <<= aRangeAddress;
}
+
+ #if 0
+ const ScPrintOptions& rPrintOpt =
+ #endif
+ // FIXME: is this for side effects ?
+ SC_MOD()->GetPrintOptions();
+ if( ! pPrinterOptions )
+ pPrinterOptions = new ScPrintUIOptions;
+ else
+ pPrinterOptions->SetDefaults();
+ pPrinterOptions->appendPrintUIOptions( aSequence );
return aSequence;
}
-void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelection,
+void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelection,
const uno::Sequence<beans::PropertyValue>& rOptions )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
@@ -792,7 +1079,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelectio
ScMarkData aMark;
ScPrintSelectionStatus aStatus;
- if ( !FillRenderMarkData( aSelection, aMark, aStatus ) )
+ String aPagesStr;
+ if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr ) )
throw lang::IllegalArgumentException();
if ( !pPrintFuncCache || !pPrintFuncCache->IsSameSelection( aStatus ) )
@@ -801,6 +1089,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelectio
pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark, aStatus );
}
long nTotalPages = pPrintFuncCache->GetPageCount();
+ sal_Int32 nRenderer = lcl_GetRendererNum( nSelRenderer, aPagesStr, nTotalPages );
if ( nRenderer >= nTotalPages )
throw lang::IllegalArgumentException();
@@ -835,7 +1124,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelectio
// to increase performance, ScPrintState might be used here for subsequent
// pages of the same sheet
- ScPrintFunc aFunc( pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange );
+ ScPrintFunc aFunc( pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() );
aFunc.SetDrawView( pDrawView );
aFunc.SetRenderFlag( TRUE );
if( aStatus.GetMode() == SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS )
@@ -849,11 +1138,11 @@ void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelectio
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
+ vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
if ( nRenderer == nTabStart )
{
// first page of a sheet: add outline item for the sheet name
- vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
if ( pPDFData && pPDFData->GetIsExportBookmarks() )
{
// the sheet starts at the top of the page
@@ -866,7 +1155,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelectio
}
//--->i56629
// add the named destination stuff
- if( pPDFData->GetIsExportNamedDestinations() )
+ if( pPDFData && pPDFData->GetIsExportNamedDestinations() )
{
Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) );
String aTabName;
@@ -881,7 +1170,6 @@ void SAL_CALL ScModelObj::render( sal_Int32 nRenderer, const uno::Any& aSelectio
// resolve the hyperlinks for PDF export
- vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
if ( pPDFData )
{
// iterate over the hyperlinks that were output for this page
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index c1af5ac9bb99..0883c24a14f0 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -337,11 +337,11 @@ namespace
}
// XFormLayerAccess
-uno::Reference< form::XFormController > SAL_CALL ScViewPaneBase::getFormController( const uno::Reference< form::XForm >& _Form ) throw (uno::RuntimeException)
+uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFormController( const uno::Reference< form::XForm >& _Form ) throw (uno::RuntimeException)
{
ScUnoGuard aGuard;
- uno::Reference< form::XFormController > xController;
+ uno::Reference< form::runtime::XFormController > xController;
Window* pWindow( NULL );
SdrView* pSdrView( NULL );
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 6683a75e777b..fbff54b1408f 100644..100755
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -215,6 +215,7 @@ void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, UL
pDrView->setHideOle(!bDrawOle);
pDrView->setHideChart(!bDrawChart);
pDrView->setHideDraw(!bDrawDraw);
+ pDrView->setHideFormControl(!bDrawDraw);
}
if(SC_UPDATE_CHANGED == eMode)
diff --git a/sc/source/ui/view/olkact.cxx b/sc/source/ui/view/olkact.cxx
index 31f5297e92fe..3feb69044f43 100644
--- a/sc/source/ui/view/olkact.cxx
+++ b/sc/source/ui/view/olkact.cxx
@@ -229,7 +229,7 @@
//#define _SVDLAYER_HXX
//#define _SVDRAG_HXX
#define _SVINCVW_HXX
-#define _SV_MULTISEL_HXX
+//#define _SV_MULTISEL_HXX
#define _SVRTV_HXX
#define _SVTABBX_HXX
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index c4c51fb3f02a..ffc1112667f2 100644..100755
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -166,7 +166,8 @@ void ScOutputData::PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOf
if(pLocalDrawView)
{
- bHideAllDrawingLayer = pLocalDrawView->getHideOle() && pLocalDrawView->getHideChart() && pLocalDrawView->getHideDraw();
+ bHideAllDrawingLayer = pLocalDrawView->getHideOle() && pLocalDrawView->getHideChart()
+ && pLocalDrawView->getHideDraw() && pLocalDrawView->getHideFormControl();
}
}
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 4712b6a3cf85..ef014bd90f79 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -75,7 +75,7 @@ ScPrintFuncCache::ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark,
long nThisTab = 0;
if ( rMark.GetTableSelect( nTab ) )
{
- ScPrintFunc aFunc( pDocSh, pPrinter, nTab, nAttrPage, 0, pSelRange );
+ ScPrintFunc aFunc( pDocSh, pPrinter, nTab, nAttrPage, 0, pSelRange, &aSelection.GetOptions() );
nThisTab = aFunc.GetTotalPages();
nFirstAttr[nTab] = aFunc.GetFirstPageNo(); // from page style or previous sheet
}
@@ -113,7 +113,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
{
if ( rMark.GetTableSelect( nTab ) )
{
- ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange );
+ ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange, &aSelection.GetOptions() );
aFunc.SetRenderFlag( TRUE );
long nDisplayStart = GetDisplayStart( nTab );
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index 58dc2d913c58..d37d0c85046d 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -67,7 +67,7 @@
//#define _FSYS_HXX
//#define _STREAM_HXX
#define _CACHESTR_HXX
-#define _SV_MULTISEL_HXX
+//#define _SV_MULTISEL_HXX
//SV
//#define _CLIP_HXX ***
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index b7b8b9fbadf6..9c8b1f1d4ce6 100644..100755
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1648,7 +1648,8 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
// test if all paint parts are hidden, then a paint is not necessary at all
const Point aMMOffset(aOutputData.PrePrintDrawingLayer(nLogStX, nLogStY));
- const bool bHideAllDrawingLayer(pDrawView && pDrawView->getHideOle() && pDrawView->getHideChart() && pDrawView->getHideDraw());
+ const bool bHideAllDrawingLayer( pDrawView && pDrawView->getHideOle() && pDrawView->getHideChart()
+ && pDrawView->getHideDraw() && pDrawView->getHideFormControl() );
if(!bHideAllDrawingLayer)
{
@@ -2043,7 +2044,10 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr
}
if ( pPrinter && bDoPrint )
- pPrinter->StartPage();
+ {
+ DBG_ERROR( "StartPage does not exist anymore" );
+ // pPrinter->StartPage();
+ }
if ( bDoPrint || pLocationData )
{
@@ -2064,7 +2068,10 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr
long nCount = DoNotes( nNoteStart, bDoPrint, pLocationData );
if ( pPrinter && bDoPrint )
- pPrinter->EndPage();
+ {
+ DBG_ERROR( "EndPage does not exist anymore" );
+ // pPrinter->EndPage();
+ }
return nCount;
}
@@ -2123,10 +2130,14 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
pDrawView->setHideOle(!aTableParam.bObjects);
pDrawView->setHideChart(!aTableParam.bCharts);
pDrawView->setHideDraw(!aTableParam.bDrawings);
+ pDrawView->setHideFormControl(!aTableParam.bDrawings);
}
if ( pPrinter && bDoPrint )
- pPrinter->StartPage();
+ {
+ DBG_ERROR( "StartPage does not exist anymore" );
+ // pPrinter->StartPage();
+ }
// Kopf- und Fusszeilen (ohne Zentrierung)
@@ -2408,7 +2419,10 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
}
if ( pPrinter && bDoPrint )
- pPrinter->EndPage();
+ {
+ DBG_ERROR( "EndPage does not exist anymore" );
+ // pPrinter->EndPage();
+ }
aLastSourceRange = ScRange( nX1, nY1, nPrintTab, nX2, nY2, nPrintTab );
bSourceRangeValid = TRUE;
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 3327ea3fe88d..6c0408c8c33f 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -142,7 +142,7 @@
#define _SVDRAG_HXX
#define _SVINCVW_HXX
-#define _SV_MULTISEL_HXX
+//#define _SV_MULTISEL_HXX
#define _SVRTV_HXX
#define _SVTABBX_HXX
#define _SVTREEBOX_HXX
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index 5e571e0b2e03..5a280328e66a 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -2960,6 +2960,15 @@ End
#endif
#ifndef WITHOUT_MYSPELL_DICTS
+File gid_File_Extension_Dictionary_Ca
+ Dir = gid_Brand_Dir_Share_Extension_Install;
+ Name = "dict-ca.oxt";
+ Styles = (PACKED, FORCELANGUAGEPACK);
+ UnixRights = 444;
+End
+#endif
+
+#ifndef WITHOUT_MYSPELL_DICTS
File gid_File_Extension_Dictionary_Cs
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-cs.oxt";
@@ -2978,15 +2987,33 @@ End
#endif
#ifndef WITHOUT_MYSPELL_DICTS
-File gid_File_Extension_Dictionary_De
+File gid_File_Extension_Dictionary_De_AT
Dir = gid_Brand_Dir_Share_Extension_Install;
- Name = "dict-de.oxt";
+ Name = "dict-de-AT.oxt";
Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
#ifndef WITHOUT_MYSPELL_DICTS
+File gid_File_Extension_Dictionary_De_CH
+ Dir = gid_Brand_Dir_Share_Extension_Install;
+ Name = "dict-de-CH.oxt";
+ Styles = (PACKED, FORCELANGUAGEPACK);
+ UnixRights = 444;
+End
+#endif
+
+#ifndef WITHOUT_MYSPELL_DICTS
+File gid_File_Extension_Dictionary_De_DE
+ Dir = gid_Brand_Dir_Share_Extension_Install;
+ Name = "dict-de-DE.oxt";
+ Styles = (PACKED, FORCELANGUAGEPACK);
+ UnixRights = 444;
+End
+#endif
+
+#ifndef WITHOUT_MYSPELL_DICTS
File gid_File_Extension_Dictionary_En
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-en.oxt";
@@ -3086,6 +3113,15 @@ End
#endif
#ifndef WITHOUT_MYSPELL_DICTS
+File gid_File_Extension_Dictionary_No
+ Dir = gid_Brand_Dir_Share_Extension_Install;
+ Name = "dict-no.oxt";
+ Styles = (PACKED, FORCELANGUAGEPACK);
+ UnixRights = 444;
+End
+#endif
+
+#ifndef WITHOUT_MYSPELL_DICTS
File gid_File_Extension_Dictionary_Pl
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-pl.oxt";
@@ -3104,6 +3140,15 @@ End
#endif
#ifndef WITHOUT_MYSPELL_DICTS
+File gid_File_Extension_Dictionary_Ro
+ Dir = gid_Brand_Dir_Share_Extension_Install;
+ Name = "dict-ro.oxt";
+ Styles = (PACKED, FORCELANGUAGEPACK);
+ UnixRights = 444;
+End
+#endif
+
+#ifndef WITHOUT_MYSPELL_DICTS
File gid_File_Extension_Dictionary_Ru
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-ru.oxt";
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 4b293e0a6126..f1c647a5bb91 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -972,6 +972,17 @@ Module gid_Module_Root_Extension_Dictionary_Af
Styles = (HIDDEN_ROOT);
End
+Module gid_Module_Root_Extension_Dictionary_Ca
+ Name = "gid_Module_Root_Extension_Dictionary_Ca";
+ Description = "gid_Module_Root_Extension_Dictionary_Ca";
+ Files = (gid_File_Extension_Dictionary_Ca);
+ InstallOrder = "2000";
+ Spellcheckerlanguage = "ca";
+ PackageInfo = "packinfo_office.txt";
+ ParentID = gid_Module_Root;
+ Styles = (HIDDEN_ROOT);
+End
+
Module gid_Module_Root_Extension_Dictionary_Cs
Name = "gid_Module_Root_Extension_Dictionary_Cs";
Description = "gid_Module_Root_Extension_Dictionary_Cs";
@@ -994,17 +1005,39 @@ Module gid_Module_Root_Extension_Dictionary_Da
Styles = (HIDDEN_ROOT);
End
-Module gid_Module_Root_Extension_Dictionary_De
- Name = "gid_Module_Root_Extension_Dictionary_De";
- Description = "gid_Module_Root_Extension_Dictionary_De";
- Files = (gid_File_Extension_Dictionary_De);
+Module gid_Module_Root_Extension_Dictionary_De_AT
+ Name = "gid_Module_Root_Extension_Dictionary_De_AT";
+ Description = "gid_Module_Root_Extension_Dictionary_De_AT";
+ Files = (gid_File_Extension_Dictionary_De_AT);
InstallOrder = "2000";
- Spellcheckerlanguage = "de";
+ Spellcheckerlanguage = "de-AT";
PackageInfo = "packinfo_office.txt";
ParentID = gid_Module_Root;
Styles = (HIDDEN_ROOT);
End
+Module gid_Module_Root_Extension_Dictionary_De_CH
+ Name = "gid_Module_Root_Extension_Dictionary_De_CH";
+ Description = "gid_Module_Root_Extension_Dictionary_De_CH";
+ Files = (gid_File_Extension_Dictionary_De_CH);
+ InstallOrder = "2000";
+ Spellcheckerlanguage = "de-CH";
+ PackageInfo = "packinfo_office.txt";
+ ParentID = gid_Module_Root;
+ Styles = (HIDDEN_ROOT);
+End
+
+Module gid_Module_Root_Extension_Dictionary_De_DE
+ Name = "gid_Module_Root_Extension_Dictionary_De_DE";
+ Description = "gid_Module_Root_Extension_Dictionary_De_DE";
+ Files = (gid_File_Extension_Dictionary_De_DE);
+ InstallOrder = "2000";
+ Spellcheckerlanguage = "de-DE";
+ PackageInfo = "packinfo_office.txt";
+ ParentID = gid_Module_Root;
+ Styles = (HIDDEN_ROOT);
+End
+
Module gid_Module_Root_Extension_Dictionary_En
Name = "gid_Module_Root_Extension_Dictionary_En";
Description = "gid_Module_Root_Extension_Dictionary_En";
@@ -1126,6 +1159,17 @@ Module gid_Module_Root_Extension_Dictionary_Nl
Styles = (HIDDEN_ROOT);
End
+Module gid_Module_Root_Extension_Dictionary_No
+ Name = "gid_Module_Root_Extension_Dictionary_No";
+ Description = "gid_Module_Root_Extension_Dictionary_No";
+ Files = (gid_File_Extension_Dictionary_No);
+ InstallOrder = "2000";
+ Spellcheckerlanguage = "no";
+ PackageInfo = "packinfo_office.txt";
+ ParentID = gid_Module_Root;
+ Styles = (HIDDEN_ROOT);
+End
+
Module gid_Module_Root_Extension_Dictionary_Pl
Name = "gid_Module_Root_Extension_Dictionary_Pl";
Description = "gid_Module_Root_Extension_Dictionary_Pl";
@@ -1148,6 +1192,17 @@ Module gid_Module_Root_Extension_Dictionary_Pt
Styles = (HIDDEN_ROOT);
End
+Module gid_Module_Root_Extension_Dictionary_Ro
+ Name = "gid_Module_Root_Extension_Dictionary_Ro";
+ Description = "gid_Module_Root_Extension_Dictionary_Ro";
+ Files = (gid_File_Extension_Dictionary_Ro);
+ InstallOrder = "2000";
+ Spellcheckerlanguage = "ro";
+ PackageInfo = "packinfo_office.txt";
+ ParentID = gid_Module_Root;
+ Styles = (HIDDEN_ROOT);
+End
+
Module gid_Module_Root_Extension_Dictionary_Ru
Name = "gid_Module_Root_Extension_Dictionary_Ru";
Description = "gid_Module_Root_Extension_Dictionary_Ru";
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 6a6b6dbbbb4a..097525bd372e 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -32,14 +32,13 @@
#include "precompiled_scripting.hxx"
#include "dlgevtatt.hxx"
-#ifndef SCRIPTING_DLGPROV_HXX
#include "dlgprov.hxx"
-#endif
+
#include <sfx2/sfx.hrc>
#include <sfx2/app.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
+#include <tools/diagnose_ex.h>
+
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XDialogEventHandler.hpp>
#include <com/sun/star/awt/XContainerWindowEventHandler.hpp>
@@ -53,6 +52,7 @@
#include <com/sun/star/reflection/XIdlMethod.hpp>
#include <com/sun/star/beans/MethodConcept.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
+
#ifdef FAKE_VBA_EVENT_SUPPORT
#include <ooo/vba/XVBAToOOEventDescGen.hpp>
#endif
@@ -134,7 +134,10 @@ namespace dlgprov
{
xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= msDialogCodeName;
}
- catch ( Exception& ) {}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
}
@@ -149,7 +152,10 @@ namespace dlgprov
{
mxListener->firing( aScriptEventCopy );
}
- catch( Exception& ) {}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
}
#endif
@@ -248,17 +254,9 @@ namespace dlgprov
if ( xListener_.is() )
bSuccess = true;
}
- catch ( IllegalArgumentException& )
- {
- }
- catch ( IntrospectionException& )
- {
- }
- catch ( CannotCreateAdapterException& )
- {
- }
- catch ( ServiceNotRegisteredException& )
+ catch ( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
try
@@ -271,17 +269,9 @@ namespace dlgprov
aDesc.AddListenerParam, aDesc.EventMethod );
}
}
- catch( IllegalArgumentException& )
- {
- }
- catch( IntrospectionException& )
- {
- }
- catch( CannotCreateAdapterException& )
- {
- }
- catch( ServiceNotRegisteredException& )
+ catch ( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
@@ -495,15 +485,9 @@ namespace dlgprov
}
}
}
- catch ( RuntimeException& e )
- {
- OSL_TRACE( "DialogScriptListenerImpl::firing_impl: caught RuntimeException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- }
- catch ( Exception& e )
+ catch ( const Exception& )
{
- OSL_TRACE( "DialogScriptListenerImpl::firing_impl: caught Exception reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -512,21 +496,21 @@ namespace dlgprov
::rtl::OUString sScriptURL;
::rtl::OUString sScriptCode( aScriptEvent.ScriptCode );
- if ( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
- {
- // StarBasic script: convert ScriptCode to scriptURL
- sal_Int32 nIndex = sScriptCode.indexOf( ':' );
- if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
+ if ( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
{
- sScriptURL = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
- sScriptURL += sScriptCode.copy( nIndex + 1 );
- sScriptURL += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
- sScriptURL += sScriptCode.copy( 0, nIndex );
+ // StarBasic script: convert ScriptCode to scriptURL
+ sal_Int32 nIndex = sScriptCode.indexOf( ':' );
+ if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
+ {
+ sScriptURL = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
+ sScriptURL += sScriptCode.copy( nIndex + 1 );
+ sScriptURL += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
+ sScriptURL += sScriptCode.copy( 0, nIndex );
+ }
+ ScriptEvent aSFScriptEvent( aScriptEvent );
+ aSFScriptEvent.ScriptCode = sScriptURL;
+ DialogSFScriptListenerImpl::firing_impl( aSFScriptEvent, pRet );
}
- ScriptEvent aSFScriptEvent( aScriptEvent );
- aSFScriptEvent.ScriptCode = sScriptURL;
- DialogSFScriptListenerImpl::firing_impl( aSFScriptEvent, pRet );
- }
}
void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
@@ -603,12 +587,10 @@ namespace dlgprov
bHandled = true;
}
}
- catch( com::sun::star::lang::IllegalArgumentException& )
- {}
- catch( com::sun::star::lang::NoSuchMethodException& )
- {}
- catch( com::sun::star::reflection::InvocationTargetException& )
- {}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
if( bHandled )
diff --git a/sd/source/ui/inc/DocumentRenderer.hxx b/sd/source/ui/inc/DocumentRenderer.hxx
new file mode 100644
index 000000000000..946ddccbac37
--- /dev/null
+++ b/sd/source/ui/inc/DocumentRenderer.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: BezierObjectBar.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef SD_DOCUMENT_RENDERER_HXX
+#define SD_DOCUMENT_RENDERER_HXX
+
+#include "ViewShellBase.hxx"
+
+#include <com/sun/star/view/XRenderable.hpp>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <boost/scoped_ptr.hpp>
+
+namespace css = ::com::sun::star;
+
+namespace sd {
+
+namespace {
+ typedef ::cppu::WeakComponentImplHelper1 <
+ ::com::sun::star::view::XRenderable
+ > DocumentRendererInterfaceBase;
+}
+
+
+class DocumentRenderer
+ : protected ::cppu::BaseMutex,
+ public DocumentRendererInterfaceBase
+{
+public:
+ DocumentRenderer (ViewShellBase& rBase);
+ virtual ~DocumentRenderer (void);
+
+ // XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount (
+ const css::uno::Any& aSelection,
+ const css::uno::Sequence<css::beans::PropertyValue >& xOptions)
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ virtual css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getRenderer (
+ sal_Int32 nRenderer,
+ const css::uno::Any& rSelection,
+ const css::uno::Sequence<css::beans::PropertyValue>& rxOptions)
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL render (
+ sal_Int32 nRenderer,
+ const css::uno::Any& rSelection,
+ const css::uno::Sequence<css::beans::PropertyValue>& rxOptions)
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+private:
+ class Implementation;
+ ::boost::scoped_ptr<Implementation> mpImpl;
+};
+
+} // end of namespace sd
+
+#endif
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index 8cd9451fa26e..957616e083a9 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -194,7 +194,7 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
// XFormLayerAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isFormDesignMode( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFormDesignMode( ::sal_Bool DesignMode ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/sd/source/ui/inc/PrintManager.hxx b/sd/source/ui/inc/PrintManager.hxx
deleted file mode 100644
index 649057653249..000000000000
--- a/sd/source/ui/inc/PrintManager.hxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: PrintManager.hxx,v $
- * $Revision: 1.10 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef SD_PRINT_MANAGER_HXX
-#define SD_PRINT_MANAGER_HXX
-
-#include "pres.hxx"
-#include <tools/solar.h>
-#include <tools/errcode.hxx>
-#include <sfx2/viewsh.hxx>
-
-class Font;
-class MultiSelection;
-class PrintDialog;
-class SdOptionsPrintItem;
-class SdPage;
-class String;
-class SfxItemSet;
-class SfxPrinter;
-class SfxProgress;
-class SfxTabPage;
-class Window;
-
-namespace sd {
-
-class DrawView;
-class View;
-class ViewShell;
-class ViewShellBase;
-
-/** Manage the printing of documents.
- This includes functions about asking the user for specific
- information what to print as well as high to medium level printing.
-*/
-class PrintManager
-{
-public:
- /* Create a new print manager for the given view shell.
- @param rViewShell
- The life time of that view shell has to exceed that of the
- print manager.
- */
- PrintManager (ViewShellBase& rViewShell);
- virtual ~PrintManager (void);
-
- /// Forwarded to the document shell.
- virtual SfxPrinter* GetPrinter (BOOL bCreate = FALSE);
- /// Forwarded to the main sub-shell.
- virtual USHORT SetPrinter (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
- /// Forwarded to the main sub-shell.
- virtual PrintDialog* CreatePrintDialog (::Window *pParent);
-
- /** Create an options tab page for the curren document.
- */
- virtual SfxTabPage* CreatePrintOptionsPage (
- ::Window *pParent,
- const SfxItemSet &rOptions);
-
- /** Print the document.
- @param pDialog
- The dialog specifies what to print.
- */
- virtual USHORT Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pDialog);
-
- /** Show a dialog that allows the user to select the print range
- (among other things) before starting the actual printing.
- */
- virtual ErrCode DoPrint (
- SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
-
- /** When called with <TRUE/> then printing is restricted to the
- selected pages. Otherwise all pages are printed. Note that
- you have to set the page range with a call to
- SetPrintingPageRange().
- */
- void RestrictPrintingToSelection (bool bFlag);
-
- /** Set the range of the pages to print. This is taken into
- account only after a previous call to
- RestrictPrintingToSelection() with <TRUE/> as argument.
- */
- void SetPrintingPageRange (const String& rsPageRange);
-
- USHORT SetPrinterOptDlg (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL,
- BOOL _bShowDialog = TRUE);
-
- void PreparePrint (PrintDialog* pPrintDialog = 0);
-
-private:
- ViewShellBase& mrBase;
-
- bool mbPrintDirectSelected;
-
- String msPageRange;
-
- /// Copy constructor not supported.
- PrintManager (const PrintManager&);
-
- /// Assignment operator not supported.
- PrintManager& operator= (const PrintManager&);
-
- /** Make sure that the pages that are to be printed do fit to the
- printer pages. When the internal pages are larger then the printer
- pages and no method of resolution has yet been provided then a
- dialog is opened that asks for one. These methods are
- a) scale internal page down to the printer page,
- b) crop internal page
- c) print internal page on several printer pages.
- @param pPrinter
- The printer to print the pages on that are specified by the
- msPageRange member.
- @param bSilent
- This flag, when set, tells the method not to wait for user
- input, i.e. show a dialog.
- @return
- The returned flag indicates whether the method was successfull (<TRUE/>)
- or whether the printing has to be aborted (<FALSE/>). The later
- one is the case only when the dialog is shown and the user
- selects 'Cancel'.
- */
- bool FitPageToPrinterWithDialog (
- SfxPrinter *pPrinter,
- bool bSilent);
-
- class PrintInfo;
-
- /** Print outline pages.
- */
- void PrintOutline (
- PrintInfo& rInfo,
- USHORT nPage);
-
- /** Print handout pages.
- */
- void PrintHandout (
- PrintInfo& rInfo,
- USHORT nPage);
-
- /** Print slides or notes pages.
- */
- void PrintStdOrNotes (
- PrintInfo& rInfo,
- USHORT nPage,
- PageKind ePageKind,
- BOOL bPrintMarkedOnly);
-
- /** Print a part of the given page that is specified by the given page
- origin and the size of the printable area. This method is used
- primarily when the page to print is larger than the printable area
- and the page is printed in several parts.
- */
- void PrintPagePart (
- PrintInfo& rInfo,
- SdPage* pPage,
- DrawView& rPrintView,
- const Point& rPageOrigin,
- BOOL bPrintMarkedOnly,
- const String& rsPageString,
- const Point& rStringOffset);
-
- /** This method is similar to PrintPagePart() and should be unified with
- that.
- */
- void PrintPage(
- PrintInfo& rInfo,
- ::sd::View* pPrintView,
- SdPage* pPage,
- BOOL bPrintMarkedOnly);
-
- /** Return <TRUE/> when the document pages have the 'Screen' size. Only
- the first page of the document is used to determine the size.
- */
- bool IsScreenFormat (void);
-
- /** creates the needed shapes on the handout page for the given layout */
- void InitHandoutTemplate( PrintInfo& rInfo, USHORT nSlidesPerHandout, BOOL bHandoutHorizontal );
-};
-
-} // end of namespace sd
-
-#endif
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 383bd12fcdb5..b316a1c014a3 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -136,6 +136,11 @@ public:
*/
virtual ErrCode DoVerb (long nVerb);
+ /** Return a new renderer that can be used for example for printing the
+ document.
+ */
+ virtual com::sun::star::uno::Reference<com::sun::star::view::XRenderable> GetRenderable (void);
+
/// Forwarded to the print manager.
virtual SfxPrinter* GetPrinter (BOOL bCreate = FALSE);
@@ -261,7 +266,7 @@ public:
/** returns the ui descriptive name for the given uno slot. The result is taken from the configuration
and not cached, so do not use it excessive (f.e. in status updates) */
- ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const;
+ ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const;
protected:
osl::Mutex maMutex;
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 51caedee6f6f..65fa2dbf0206 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -737,7 +737,7 @@ Reference < beans::XPropertySetInfo > DrawController::getPropertySetInfo()
}
-uno::Reference< form::XFormController > SAL_CALL DrawController::getFormController( const uno::Reference< form::XForm >& Form ) throw (uno::RuntimeException)
+uno::Reference< form::runtime::XFormController > SAL_CALL DrawController::getFormController( const uno::Reference< form::XForm >& Form ) throw (uno::RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -746,7 +746,7 @@ uno::Reference< form::XFormController > SAL_CALL DrawController::getFormControll
::boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell();
::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : NULL;
- uno::Reference< form::XFormController > xController( NULL );
+ uno::Reference< form::runtime::XFormController > xController( NULL );
if ( pFormShell && pSdrView && pWindow )
xController = pFormShell->GetFormController( Form, *pSdrView, *pWindow );
return xController;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 8906059e57cf..2e753fd859d1 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -122,8 +122,6 @@ using namespace ::com::sun::star;
extern uno::Reference< uno::XInterface > SdUnoCreatePool( SdDrawDocument* pDrawModel );
-///////////////////////////////////////////////////////////////////////
-
class SdUnoForbiddenCharsTable : public SvxUnoForbiddenCharsTable,
public SfxListener
{
@@ -1516,7 +1514,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer(
sal_Bool bExportNotesPages = sal_False;
for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty )
{
- if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ) )
+ if( rxOptions[ nProperty ].Name.equalsAscii( "ExportNotesPages" ) )
rxOptions[ nProperty].Value >>= bExportNotesPages;
}
uno::Sequence< beans::PropertyValue > aRenderer;
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
new file mode 100644
index 000000000000..6c0b7491bb5f
--- /dev/null
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -0,0 +1,2363 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: BezierObjectBar.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "DocumentRenderer.hxx"
+#include "DocumentRenderer.hrc"
+
+#include "drawdoc.hxx"
+#include "optsitem.hxx"
+#include "sdresid.hxx"
+#include "strings.hrc"
+#include "sdattr.hxx"
+#include "Window.hxx"
+#include "drawview.hxx"
+#include "DrawViewShell.hxx"
+#include "FrameView.hxx"
+#include "Outliner.hxx"
+#include "OutlineViewShell.hxx"
+
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <sfx2/printer.hxx>
+#include <svx/editstat.hxx>
+#include <svx/outlobj.hxx>
+#include <svx/svdetc.hxx>
+#include <svx/svditer.hxx>
+#include <svx/svdopage.hxx>
+#include <svx/svdopath.hxx>
+#include <svx/xlnclit.hxx>
+#include <toolkit/awt/vclxdevice.hxx>
+#include <tools/resary.hxx>
+#include <unotools/localedatawrapper.hxx>
+#include <vcl/msgbox.hxx>
+#include <unotools/moduleoptions.hxx>
+
+#include <vector>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
+
+
+namespace sd {
+
+namespace {
+ OUString A2S (const char* pString)
+ {
+ return OUString::createFromAscii(pString);
+ }
+
+
+
+ /** Convenience class to extract values from the sequence of properties
+ given to one of the XRenderable methods.
+ */
+ class PrintOptions
+ {
+ public:
+ PrintOptions (
+ const vcl::PrinterOptionsHelper& rHelper,
+ const ::std::vector<sal_Int32>& rSlidesPerPage)
+ : mrProperties(rHelper),
+ maSlidesPerPage(rSlidesPerPage)
+ {
+ }
+
+ bool IsWarningOrientation (void) const
+ {
+ return GetBoolValue(NULL, true);
+ }
+
+ bool IsPrintPageName (void) const
+ {
+ return GetBoolValue("IsPrintName");
+ }
+
+ bool IsDate (void) const
+ {
+ return GetBoolValue("IsPrintDateTime");
+ }
+
+ bool IsTime (void) const
+ {
+ return GetBoolValue("IsPrintDateTime");
+ }
+
+ bool IsHiddenPages (void) const
+ {
+ return GetBoolValue("IsPrintHidden");
+ }
+
+ bool IsHandoutHorizontal (void) const
+ {
+ return GetBoolValue("SlidesPerPageOrder", sal_Int32(0), true);
+ }
+
+ sal_Int32 GetHandoutPageCount (void) const
+ {
+ sal_uInt32 nIndex = static_cast<sal_Int32>(mrProperties.getIntValue("SlidesPerPage", sal_Int32(4)));
+ if (nIndex<maSlidesPerPage.size())
+ return maSlidesPerPage[nIndex];
+ else if ( ! maSlidesPerPage.empty())
+ return maSlidesPerPage[0];
+ else
+ return 0;
+ }
+
+ bool IsDraw (void) const
+ {
+ return GetBoolValue("PageContentType", sal_Int32(0));
+ }
+
+ bool IsHandout (void) const
+ {
+ return GetBoolValue("PageContentType", sal_Int32(1));
+ }
+
+ bool IsNotes (void) const
+ {
+ return GetBoolValue("PageContentType", sal_Int32(2));
+ }
+
+ bool IsOutline (void) const
+ {
+ return GetBoolValue("PageContentType", sal_Int32(3));
+ }
+
+ ULONG GetOutputQuality (void) const
+ {
+ sal_Int32 nQuality = static_cast<sal_Int32>(mrProperties.getIntValue( "Quality", sal_Int32(0) ));
+ return nQuality;
+ }
+
+ bool IsPageSize (void) const
+ {
+ return GetBoolValue("PageOptions", sal_Int32(1));
+ }
+
+ bool IsTilePage (void) const
+ {
+ return GetBoolValue("PageOptions", sal_Int32(2)) || GetBoolValue("PageOptions", sal_Int32(3));
+ }
+
+ bool IsCutPage (void) const
+ {
+ return GetBoolValue("PageOptions", sal_Int32(0));
+ }
+
+ bool IsBooklet (void) const
+ {
+ return GetBoolValue("PrintProspect", false);
+ }
+
+ bool IsPrintExcluded (void) const
+ {
+ return (IsNotes() || IsDraw() || IsHandout()) && IsHiddenPages();
+ }
+
+ bool IsPrintFrontPage (void) const
+ {
+ sal_Int32 nInclude = static_cast<sal_Int32>(mrProperties.getIntValue( "PrintProspectInclude", 0 ));
+ return nInclude == 0 || nInclude == 1;
+ }
+
+ bool IsPrintBackPage (void) const
+ {
+ sal_Int32 nInclude = static_cast<sal_Int32>(mrProperties.getIntValue( "PrintProspectInclude", 0 ));
+ return nInclude == 0 || nInclude == 2;
+ }
+
+ bool IsPaperBin (void) const
+ {
+ return GetBoolValue("PrintPaperFromSetup", false);
+ }
+
+ OUString GetPrinterSelection (void) const
+ {
+ sal_Int32 nContent = static_cast<sal_Int32>(mrProperties.getIntValue( "PrintContent", 0 ));
+ OUString sValue( A2S("all") );
+ if( nContent == 1 )
+ sValue = mrProperties.getStringValue( "PageRange", A2S( "all" ) );
+ else if( nContent == 2 )
+ sValue = A2S( "selection" );
+ return sValue;
+ }
+
+ private:
+ const vcl::PrinterOptionsHelper& mrProperties;
+ const ::std::vector<sal_Int32> maSlidesPerPage;
+
+ /** When the value of the property with name pName is a boolean then
+ return its value. When the property is unknown then
+ bDefaultValue is returned. Otherwise <FALSE/> is returned.
+ */
+ bool GetBoolValue (
+ const sal_Char* pName,
+ const bool bDefaultValue = false) const
+ {
+ sal_Bool bValue = mrProperties.getBoolValue( pName, bDefaultValue );
+ return bValue;
+ }
+
+ /** Return <TRUE/> when the value of the property with name pName is
+ a string and its value equals pValue. When the property is
+ unknown then bDefaultValue is returned. Otherwise <FALSE/> is
+ returned.
+ */
+ bool GetBoolValue (
+ const sal_Char* pName,
+ const sal_Char* pValue,
+ const bool bDefaultValue = false) const
+ {
+ OUString sValue( mrProperties.getStringValue( pName ) );
+ if (sValue.getLength())
+ return sValue.equalsAscii(pValue);
+ else
+ return bDefaultValue;
+ }
+
+ /** Return <TRUE/> when the value of the property with name pName is
+ an integer and its value is nTriggerValue. Otherwise <FALSE/> is
+ returned.
+ */
+ bool GetBoolValue (
+ const sal_Char* pName,
+ const sal_Int32 nTriggerValue) const
+ {
+ sal_Int32 nValue = static_cast<sal_Int32>(mrProperties.getIntValue( pName ));
+ return nValue == nTriggerValue;
+ }
+ };
+
+
+
+ /** This class is like MultiSelection but understands two special values.
+ "all" indicates that all pages are selected. "selection" indicates that no
+ pages but a set of shapes is selected.
+ */
+ class Selection
+ {
+ public:
+ Selection (const OUString& rsSelection, const SdPage* pCurrentPage)
+ : mbAreAllPagesSelected(rsSelection.equalsAscii("all")),
+ mbIsShapeSelection(rsSelection.equalsAscii("selection")),
+ mnCurrentPageIndex(pCurrentPage!=NULL ? (pCurrentPage->GetPageNum()-1)/2 : -1),
+ mpSelectedPages()
+ {
+ if ( ! (mbAreAllPagesSelected || mbIsShapeSelection))
+ mpSelectedPages.reset(new MultiSelection(rsSelection));
+ }
+
+ bool IsMarkedOnly (void) const
+ {
+ return mbIsShapeSelection;
+ }
+
+ /** Call with a 0 based page index.
+ */
+ bool IsSelected (const sal_Int32 nIndex) const
+ {
+ if (mbAreAllPagesSelected)
+ return true;
+ else if (mpSelectedPages)
+ return mpSelectedPages->IsSelected(nIndex+1);
+ else if (mbIsShapeSelection && nIndex==mnCurrentPageIndex)
+ return true;
+ else
+ return false;
+ }
+
+ private:
+ const bool mbAreAllPagesSelected;
+ const bool mbIsShapeSelection;
+ const sal_Int32 mnCurrentPageIndex;
+ ::boost::scoped_ptr<MultiSelection> mpSelectedPages;
+ };
+
+ /** A collection of values that helps to reduce the number of arguments
+ given to some functions. Note that not all values are set at the
+ same time.
+ */
+ class PrintInfo
+ {
+ public:
+ PrintInfo (
+ const Printer* pPrinter,
+ const OUString& rsPrinterSelection,
+ const ::boost::shared_ptr<ViewShell> pView)
+ : mpPrinter(pPrinter),
+ mnDrawMode(DRAWMODE_DEFAULT),
+ msTimeDate(),
+ msPageString(),
+ maPrintSize(0,0),
+ maPageSize(0,0),
+ meOrientation(ORIENTATION_PORTRAIT),
+ maMap(),
+ maSelection(rsPrinterSelection, pView ? pView->getCurrentPage() : NULL),
+ mbPrintMarkedOnly(maSelection.IsMarkedOnly())
+ {}
+
+ const Printer* mpPrinter;
+ ULONG mnDrawMode;
+ ::rtl::OUString msTimeDate;
+ ::rtl::OUString msPageString;
+ Size maPrintSize;
+ Size maPageSize;
+ Orientation meOrientation;
+ MapMode maMap;
+ const Selection maSelection;
+ bool mbPrintMarkedOnly;
+ };
+
+
+
+ /** Output one page of the document to the given printer. Note that
+ more than one document page may be output to one printer page.
+ */
+ void PrintPage (
+ Printer& rPrinter,
+ ::sd::View& rPrintView,
+ SdPage& rPage,
+ View* pView,
+ const bool bPrintMarkedOnly,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers)
+ {
+ rPrintView.ShowSdrPage(&rPage);
+
+ const MapMode aOriginalMapMode (rPrinter.GetMapMode());
+
+ // Set the visible layers
+ SdrPageView* pPageView = rPrintView.GetSdrPageView();
+ OSL_ASSERT(pPageView!=NULL);
+ pPageView->SetVisibleLayers(rVisibleLayers);
+ pPageView->SetPrintableLayers(rPrintableLayers);
+
+ if (pView!=NULL && bPrintMarkedOnly)
+ pView->DrawMarkedObj(rPrinter);
+ else
+ rPrintView.CompleteRedraw(&rPrinter, Rectangle(Point(0,0), rPage.GetSize()));
+
+ rPrinter.SetMapMode(aOriginalMapMode);
+
+ rPrintView.HideSdrPage();
+ }
+
+
+
+
+ /** Output a string (that typically is not part of a document page) to
+ the given printer.
+ */
+ void PrintMessage (
+ Printer& rPrinter,
+ const ::rtl::OUString& rsPageString,
+ const Point& rPageStringOffset)
+ {
+ const Font aOriginalFont (rPrinter.OutputDevice::GetFont());
+ rPrinter.SetFont(Font(FAMILY_SWISS, Size(0, 423)));
+ rPrinter.DrawText(rPageStringOffset, rsPageString);
+ rPrinter.SetFont(aOriginalFont);
+ }
+
+
+
+
+ /** Read the resource file and process it into a sequence of properties
+ that can be passed to the printing dialog.
+ */
+ class DialogCreator : Resource
+ {
+ public:
+ DialogCreator (bool bImpress)
+ : Resource(SdResId(_STR_IMPRESS_PRINT_UI_OPTIONS))
+ , mbImpress(bImpress)
+ {
+ ProcessResource();
+ }
+
+ Sequence< beans::PropertyValue > GetDialogControls(void) const
+ {
+ if (maProperties.empty())
+ return Sequence< beans::PropertyValue >();
+ else
+ {
+ return Sequence<beans::PropertyValue>(
+ &maProperties.front(),
+ maProperties.size());
+ }
+ }
+
+ ::std::vector<sal_Int32> GetSlidesPerPage (void) const
+ {
+ return maSlidesPerPage;
+ }
+
+ private:
+ Any maDialog;
+ ::std::vector<beans::PropertyValue> maProperties;
+ ::std::vector<sal_Int32> maSlidesPerPage;
+ bool mbImpress;
+
+ void ProcessResource (void)
+ {
+ SvtModuleOptions aOpt;
+ String aAppGroupname( String( SdResId( _STR_IMPRESS_PRINT_UI_GROUP_NAME ) ) );
+ aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
+ aOpt.GetModuleName( mbImpress ? SvtModuleOptions::E_SIMPRESS : SvtModuleOptions::E_SDRAW ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getGroupControlOpt(
+ aAppGroupname,
+ rtl::OUString()
+ ) );
+
+ if( mbImpress )
+ {
+ vcl::PrinterOptionsHelper::UIControlOptions aPrintOpt;
+ aPrintOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_PRINT_GROUP) ),
+ rtl::OUString(),
+ aPrintOpt )
+ );
+
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ String( SdResId( _STR_IMPRESS_PRINT_UI_CONTENT ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_CONTENT_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "PageContentType" ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_CONTENT_CHOICES),
+ 0,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) )
+ )
+ );
+
+ vcl::PrinterOptionsHelper::UIControlOptions
+ aContentOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PageContentType" ) ), 1 );
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ String( SdResId( _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPage" ) ),
+ GetSlidesPerPageSequence(),
+ 4,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ aContentOpt
+ )
+ );
+
+ vcl::PrinterOptionsHelper::UIControlOptions
+ aSlidesPerPageOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPage" ) ), -1, sal_True );
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ String( SdResId( _STR_IMPRESS_PRINT_UI_ORDER ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_ORDER_CHOICES_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPageOrder" ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_ORDER_CHOICES),
+ 0,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ aSlidesPerPageOpt )
+ );
+ }
+
+ AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT) ), rtl::OUString() ) );
+
+
+ if( mbImpress )
+ {
+ AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_NAME) ),
+ String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_NAME_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintName" ) ),
+ sal_False
+ )
+ );
+ }
+ else
+ {
+ AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ String( SdResId(_STR_DRAW_PRINT_UI_IS_PRINT_NAME) ),
+ String( SdResId(_STR_DRAW_PRINT_UI_IS_PRINT_NAME_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintName" ) ),
+ sal_False
+ )
+ );
+ }
+
+ AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_DATE) ),
+ String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_DATE_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintDateTime" ) ),
+ sal_False
+ )
+ );
+
+ if( mbImpress )
+ {
+ AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN) ),
+ String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintHidden" ) ),
+ sal_False
+ )
+ );
+ }
+
+ AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_QUALITY) ), rtl::OUString() ) );
+
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ rtl::OUString(),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_QUALITY_CHOICES),
+ 0
+ )
+ );
+
+ AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS) ), rtl::OUString() ) );
+
+ if( mbImpress )
+ {
+ // FIXME: additional dependency on PrintProspect = false
+ vcl::PrinterOptionsHelper::UIControlOptions
+ aPageOptionsOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PageContentType" ) ), 0 );
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ rtl::OUString(),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "PageOptions" ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES),
+ 0,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ aPageOptionsOpt
+ )
+ );
+ }
+ else
+ {
+ vcl::PrinterOptionsHelper::UIControlOptions
+ aPageOptionsOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), sal_False );
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ rtl::OUString(),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "PageOptions" ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW),
+ 0,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ aPageOptionsOpt
+ )
+ );
+ }
+
+ vcl::PrinterOptionsHelper::UIControlOptions aBrochureOpt;
+ aBrochureOpt.maGroupHint = OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_PAGE_SIDES) ), rtl::OUString(),
+ aBrochureOpt ) );
+
+ // brochure printing
+ AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE) ),
+ String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ),
+ sal_False,
+ aBrochureOpt
+ )
+ );
+
+ vcl::PrinterOptionsHelper::UIControlOptions
+ aIncludeOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), -1, sal_False );
+ aIncludeOpt.maGroupHint = OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST_HELP),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectInclude" ) ),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST),
+ 0,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ aIncludeOpt
+ )
+ );
+
+ // paper tray (on options page)
+ vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt;
+ aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ String( SdResId(_STR_IMPRESS_PRINT_UI_PAPER_TRAY) ),
+ String( SdResId(_STR_IMPRESS_PRINT_UI_PAPER_TRAY_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
+ sal_False,
+ aPaperTrayOpt
+ )
+ );
+ // print range selection
+ vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
+ aPrintRangeOpt.mbInternalOnly = sal_True;
+ aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ String( SdResId( _STR_IMPRESS_PRINT_UI_PAGE_RANGE ) ),
+ rtl::OUString(),
+ aPrintRangeOpt )
+ );
+
+ // create a choice for the content to create
+ rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
+ AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt( rtl::OUString(),
+ CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE_HELP),
+ aPrintRangeName,
+ CreateChoice(mbImpress
+ ? _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE
+ : _STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE),
+ 0 )
+ );
+ // create a an Edit dependent on "Pages" selected
+ vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
+ AddDialogControl( vcl::PrinterOptionsHelper::getEditControlOpt( rtl::OUString(),
+ rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
+ rtl::OUString(),
+ aPageRangeOpt )
+ );
+
+ FreeResource();
+ }
+
+ void AddDialogControl( const Any& i_rCtrl )
+ {
+ beans::PropertyValue aVal;
+ aVal.Value = i_rCtrl;
+ maProperties.push_back( aVal );
+ }
+
+ Sequence<rtl::OUString> CreateChoice (const USHORT nResourceId) const
+ {
+ SdResId aResourceId (nResourceId);
+ ResStringArray aChoiceStrings (aResourceId);
+
+ const sal_uInt32 nCount (aChoiceStrings.Count());
+ Sequence<rtl::OUString> aChoices (nCount);
+ for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex)
+ aChoices[nIndex] = aChoiceStrings.GetString(nIndex);
+
+ return aChoices;
+ }
+
+ Sequence<rtl::OUString> GetSlidesPerPageSequence (void)
+ {
+ const Sequence<rtl::OUString> aChoice (
+ CreateChoice(_STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES));
+ maSlidesPerPage.clear();
+ for (sal_Int32 nIndex=0,nCount=aChoice.getLength(); nIndex<nCount; ++nIndex)
+ maSlidesPerPage.push_back(aChoice[nIndex].toInt32());
+ return aChoice;
+ }
+ };
+
+
+
+
+ /** The Prepare... methods of the DocumentRenderer::Implementation class
+ create a set of PrinterPage objects that contain all necessary
+ information to do the actual printing. There is one PrinterPage
+ object per printed page. Derived classes implement the actual, mode
+ specific printing.
+
+ This and all derived classes support the asynchronous printing
+ process by not storing pointers to any data with lifetime shorter
+ than the PrinterPage objects, i.e. slides, shapes, (one of) the
+ outliner (of the document).
+ */
+ class PrinterPage
+ {
+ public:
+ PrinterPage (
+ const PageKind ePageKind,
+ const MapMode& rMapMode,
+ const bool bPrintMarkedOnly,
+ const ::rtl::OUString& rsPageString,
+ const Point& rPageStringOffset,
+ const ULONG nDrawMode,
+ const Orientation eOrientation,
+ const USHORT nPaperTray)
+ : mePageKind(ePageKind),
+ maMap(rMapMode),
+ mbPrintMarkedOnly(bPrintMarkedOnly),
+ msPageString(rsPageString),
+ maPageStringOffset(rPageStringOffset),
+ mnDrawMode(nDrawMode),
+ meOrientation(eOrientation),
+ mnPaperTray(nPaperTray)
+ {
+ }
+
+ virtual ~PrinterPage (void) {}
+
+ virtual void Print (
+ Printer& rPrinter,
+ SdDrawDocument& rDocument,
+ ViewShell& rViewShell,
+ View* pView,
+ DrawView& rPrintView,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers) const = 0;
+
+ ULONG GetDrawMode (void) const { return mnDrawMode; }
+ Orientation GetOrientation (void) const { return meOrientation; }
+ USHORT GetPaperTray (void) const { return mnPaperTray; }
+
+ protected:
+ const PageKind mePageKind;
+ const MapMode maMap;
+ const bool mbPrintMarkedOnly;
+ const ::rtl::OUString msPageString;
+ const Point maPageStringOffset;
+ const ULONG mnDrawMode;
+ const Orientation meOrientation;
+ const USHORT mnPaperTray;
+ };
+
+
+
+
+ /** The RegularPrinterPage is used for printing one regular slide (no
+ notes, handout, or outline) to one printer page.
+ */
+ class RegularPrinterPage : public PrinterPage
+ {
+ public:
+ RegularPrinterPage (
+ const USHORT nPageIndex,
+ const PageKind ePageKind,
+ const MapMode& rMapMode,
+ const bool bPrintMarkedOnly,
+ const ::rtl::OUString& rsPageString,
+ const Point& rPageStringOffset,
+ const ULONG nDrawMode,
+ const Orientation eOrientation,
+ const USHORT nPaperTray)
+ : PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, rsPageString,
+ rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
+ mnPageIndex(nPageIndex)
+ {
+ }
+
+ virtual ~RegularPrinterPage (void) {}
+
+ virtual void Print (
+ Printer& rPrinter,
+ SdDrawDocument& rDocument,
+ ViewShell& rViewShell,
+ View* pView,
+ DrawView& rPrintView,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers) const
+ {
+ (void)rViewShell;
+ SdPage* pPageToPrint = rDocument.GetSdPage(mnPageIndex, mePageKind);
+ rPrinter.SetMapMode(maMap);
+ PrintPage(
+ rPrinter,
+ rPrintView,
+ *pPageToPrint,
+ pView,
+ mbPrintMarkedOnly,
+ rVisibleLayers,
+ rPrintableLayers);
+ PrintMessage(
+ rPrinter,
+ msPageString,
+ maPageStringOffset);
+ }
+
+ private:
+ const USHORT mnPageIndex;
+ };
+
+
+
+
+ /** Print one slide multiple times on a printer page so that the whole
+ printer page is covered.
+ */
+ class TiledPrinterPage : public PrinterPage
+ {
+ public:
+ TiledPrinterPage (
+ const USHORT nPageIndex,
+ const PageKind ePageKind,
+ const sal_Int32 nGap,
+ const bool bPrintMarkedOnly,
+ const ::rtl::OUString& rsPageString,
+ const Point& rPageStringOffset,
+ const ULONG nDrawMode,
+ const Orientation eOrientation,
+ const USHORT nPaperTray)
+ : PrinterPage(ePageKind, MapMode(), bPrintMarkedOnly, rsPageString,
+ rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
+ mnPageIndex(nPageIndex),
+ mnGap(nGap)
+ {
+ }
+
+ virtual ~TiledPrinterPage (void) {}
+
+ virtual void Print (
+ Printer& rPrinter,
+ SdDrawDocument& rDocument,
+ ViewShell& rViewShell,
+ View* pView,
+ DrawView& rPrintView,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers) const
+ {
+ (void)rViewShell;
+ SdPage* pPageToPrint = rDocument.GetSdPage(mnPageIndex, mePageKind);
+ if (pPageToPrint==NULL)
+ return;
+ MapMode aMap (rPrinter.GetMapMode());
+
+ const Size aPageSize (pPageToPrint->GetSize());
+ const Size aPrintSize (rPrinter.GetOutputSize());
+
+ const sal_Int32 nPageWidth (aPageSize.Width() + mnGap
+ - pPageToPrint->GetLftBorder() - pPageToPrint->GetRgtBorder());
+ const sal_Int32 nPageHeight (aPageSize.Height() + mnGap
+ - pPageToPrint->GetUppBorder() - pPageToPrint->GetLwrBorder());
+ if (nPageWidth<=0 || nPageHeight<=0)
+ return;
+
+ // Print at least two rows and columns. More if the document
+ // page fits completely onto the printer page.
+ const sal_Int32 nColumnCount (::std::max(sal_Int32(2),
+ sal_Int32(aPrintSize.Width() / nPageWidth)));
+ const sal_Int32 nRowCount (::std::max(sal_Int32(2),
+ sal_Int32(aPrintSize.Height() / nPageHeight)));
+ Point aPrintOrigin;
+ for (sal_Int32 nRow=0; nRow<nRowCount; ++nRow)
+ for (sal_Int32 nColumn=0; nColumn<nColumnCount; ++nColumn)
+ {
+ aMap.SetOrigin(Point(nColumn*nPageWidth,nRow*nPageHeight));
+ rPrinter.SetMapMode(aMap);
+ PrintPage(
+ rPrinter,
+ rPrintView,
+ *pPageToPrint,
+ pView,
+ mbPrintMarkedOnly,
+ rVisibleLayers,
+ rPrintableLayers);
+ }
+
+ PrintMessage(
+ rPrinter,
+ msPageString,
+ maPageStringOffset);
+ }
+
+ private:
+ const USHORT mnPageIndex;
+ const sal_Int32 mnGap;
+ };
+
+ /** Print two slides to one printer page so that the resulting pages
+ form a booklet.
+ */
+ class BookletPrinterPage : public PrinterPage
+ {
+ public:
+ BookletPrinterPage (
+ const USHORT nFirstPageIndex,
+ const USHORT nSecondPageIndex,
+ const Point& rFirstOffset,
+ const Point& rSecondOffset,
+ const PageKind ePageKind,
+ const MapMode& rMapMode,
+ const bool bPrintMarkedOnly,
+ const ULONG nDrawMode,
+ const Orientation eOrientation,
+ const USHORT nPaperTray)
+ : PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, ::rtl::OUString(),
+ Point(), nDrawMode, eOrientation, nPaperTray),
+ mnFirstPageIndex(nFirstPageIndex),
+ mnSecondPageIndex(nSecondPageIndex),
+ maFirstOffset(rFirstOffset),
+ maSecondOffset(rSecondOffset)
+ {
+ }
+
+ virtual ~BookletPrinterPage (void) {}
+
+ virtual void Print (
+ Printer& rPrinter,
+ SdDrawDocument& rDocument,
+ ViewShell& rViewShell,
+ View* pView,
+ DrawView& rPrintView,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers) const
+ {
+ (void)rViewShell;
+ MapMode aMap (maMap);
+ SdPage* pPageToPrint = rDocument.GetSdPage(mnFirstPageIndex, mePageKind);
+ if (pPageToPrint)
+ {
+ aMap.SetOrigin(maFirstOffset);
+ rPrinter.SetMapMode(aMap);
+ PrintPage(
+ rPrinter,
+ rPrintView,
+ *pPageToPrint,
+ pView,
+ mbPrintMarkedOnly,
+ rVisibleLayers,
+ rPrintableLayers);
+ }
+
+ pPageToPrint = rDocument.GetSdPage(mnSecondPageIndex, mePageKind);
+ if( pPageToPrint )
+ {
+ aMap.SetOrigin(maSecondOffset);
+ rPrinter.SetMapMode(aMap);
+ PrintPage(
+ rPrinter,
+ rPrintView,
+ *pPageToPrint,
+ pView,
+ mbPrintMarkedOnly,
+ rVisibleLayers,
+ rPrintableLayers);
+ }
+ }
+
+ private:
+ const USHORT mnFirstPageIndex;
+ const USHORT mnSecondPageIndex;
+ const Point maFirstOffset;
+ const Point maSecondOffset;
+ };
+
+
+
+
+ /** One handout page displays one to nine slides.
+ */
+ class HandoutPrinterPage : public PrinterPage
+ {
+ public:
+ HandoutPrinterPage (
+ const USHORT nHandoutPageIndex,
+ const ::std::vector<USHORT>& rPageIndices,
+ const MapMode& rMapMode,
+ const ::rtl::OUString& rsPageString,
+ const Point& rPageStringOffset,
+ const ULONG nDrawMode,
+ const Orientation eOrientation,
+ const USHORT nPaperTray)
+ : PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString,
+ rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
+ mnHandoutPageIndex(nHandoutPageIndex),
+ maPageIndices(rPageIndices)
+ {
+ }
+
+ virtual void Print (
+ Printer& rPrinter,
+ SdDrawDocument& rDocument,
+ ViewShell& rViewShell,
+ View* pView,
+ DrawView& rPrintView,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers) const
+ {
+ SdPage& rHandoutPage (*rDocument.GetSdPage(0, PK_HANDOUT));
+
+ // Collect the page objects of the handout master.
+ std::vector<SdrPageObj*> aHandoutPageObjects;
+ SdrObjListIter aShapeIter (rHandoutPage);
+ while (aShapeIter.IsMore())
+ {
+ SdrPageObj* pPageObj = dynamic_cast<SdrPageObj*>(aShapeIter.Next());
+ if (pPageObj)
+ aHandoutPageObjects.push_back(pPageObj);
+ }
+ if (aHandoutPageObjects.empty())
+ return;
+
+ // Connect page objects with pages.
+ std::vector<SdrPageObj*>::iterator aPageObjIter (aHandoutPageObjects.begin());
+ for (std::vector<USHORT>::const_iterator
+ iPageIndex(maPageIndices.begin()),
+ iEnd(maPageIndices.end());
+ iPageIndex!=iEnd && aPageObjIter!=aHandoutPageObjects.end();
+ ++iPageIndex)
+ {
+ // Check if the page still exists.
+ if (*iPageIndex >= rDocument.GetSdPageCount(PK_STANDARD))
+ continue;
+
+ SdrPageObj* pPageObj = (*aPageObjIter++);
+ pPageObj->SetReferencedPage(rDocument.GetSdPage(*iPageIndex, PK_STANDARD));
+ }
+
+ // if there are more page objects than pages left, set the rest to invisible
+ int nHangoverCount = 0;
+ while (aPageObjIter != aHandoutPageObjects.end())
+ {
+ (*aPageObjIter++)->SetReferencedPage(0L);
+ nHangoverCount++;
+ }
+
+ // Hide outlines for objects that have pages attached.
+ if (nHangoverCount > 0)
+ {
+ int nSkip = aHandoutPageObjects.size() - nHangoverCount;
+ aShapeIter.Reset();
+ while (aShapeIter.IsMore())
+ {
+ SdrPathObj* pPathObj = dynamic_cast<SdrPathObj*>(aShapeIter.Next());
+ if (pPathObj)
+ {
+ if (nSkip > 0)
+ --nSkip;
+ else
+ pPathObj->SetMergedItem(XLineStyleItem(XLINE_NONE));
+ }
+ }
+ }
+
+ rViewShell.SetPrintedHandoutPageNum(mnHandoutPageIndex + 1);
+ MapMode aMap (rPrinter.GetMapMode());
+ rPrinter.SetMapMode(maMap);
+
+ PrintPage(
+ rPrinter,
+ rPrintView,
+ rHandoutPage,
+ pView,
+ false,
+ rVisibleLayers,
+ rPrintableLayers);
+ PrintMessage(
+ rPrinter,
+ msPageString,
+ maPageStringOffset);
+
+ rViewShell.SetPrintedHandoutPageNum(1);
+
+ // Restore outlines.
+ if (nHangoverCount > 0)
+ {
+ aShapeIter.Reset();
+ while (aShapeIter.IsMore())
+ {
+ SdrPathObj* pPathObj = dynamic_cast<SdrPathObj*>(aShapeIter.Next());
+ if (pPathObj != NULL)
+ pPathObj->SetMergedItem(XLineStyleItem(XLINE_SOLID));
+ }
+ }
+ }
+
+ private:
+ const USHORT mnHandoutPageIndex;
+ const ::std::vector<USHORT> maPageIndices;
+ };
+
+
+
+
+ /** The outline information (title, subtitle, outline objects) of the
+ document. There is no fixed mapping of slides to printer pages.
+ */
+ class OutlinerPrinterPage : public PrinterPage
+ {
+ public:
+ OutlinerPrinterPage (
+ OutlinerParaObject* pParaObject,
+ const MapMode& rMapMode,
+ const ::rtl::OUString& rsPageString,
+ const Point& rPageStringOffset,
+ const ULONG nDrawMode,
+ const Orientation eOrientation,
+ const USHORT nPaperTray)
+ : PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString,
+ rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
+ mpParaObject(pParaObject)
+ {
+ }
+
+ ~OutlinerPrinterPage (void)
+ {
+ mpParaObject.reset();
+ }
+
+ virtual void Print (
+ Printer& rPrinter,
+ SdDrawDocument& rDocument,
+ ViewShell& rViewShell,
+ View* pView,
+ DrawView& rPrintView,
+ const SetOfByte& rVisibleLayers,
+ const SetOfByte& rPrintableLayers) const
+ {
+ (void)rViewShell;
+ (void)pView;
+ (void)rPrintView;
+ (void)rVisibleLayers;
+ (void)rPrintableLayers;
+
+ // Set up the printer.
+ rPrinter.SetMapMode(maMap);
+
+ // Get and set up the outliner.
+ const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize());
+ Outliner* pOutliner = rDocument.GetInternalOutliner();
+ const USHORT nSavedOutlMode (pOutliner->GetMode());
+ const BOOL bSavedUpdateMode (pOutliner->GetUpdateMode());
+ const Size aSavedPaperSize (pOutliner->GetPaperSize());
+
+ pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
+ pOutliner->SetPaperSize(aOutRect.GetSize());
+ pOutliner->SetUpdateMode(TRUE);
+ pOutliner->Clear();
+ pOutliner->SetText(*mpParaObject);
+
+ pOutliner->Draw(&rPrinter, aOutRect);
+
+ PrintMessage(
+ rPrinter,
+ msPageString,
+ maPageStringOffset);
+
+ // Restore outliner and printer.
+ pOutliner->Clear();
+ pOutliner->SetUpdateMode(bSavedUpdateMode);
+ pOutliner->SetPaperSize(aSavedPaperSize);
+ pOutliner->Init(nSavedOutlMode);
+ }
+
+ private:
+ ::boost::scoped_ptr<OutlinerParaObject> mpParaObject;
+ };
+}
+
+
+//===== DocumentRenderer::Implementation ======================================
+
+class DocumentRenderer::Implementation
+ : public SfxListener,
+ public vcl::PrinterOptionsHelper
+{
+public:
+ Implementation (ViewShellBase& rBase)
+ : mrBase(rBase),
+ mbIsDisposed(false),
+ mpPrinter(NULL),
+ mpOptions(),
+ maPrinterPages(),
+ mpPrintView(),
+ mbHasOrientationWarningBeenShown(false)
+ {
+ DialogCreator aCreator( mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS );
+ m_aUIProperties = aCreator.GetDialogControls();
+ maSlidesPerPage = aCreator.GetSlidesPerPage();
+
+ StartListening(mrBase);
+ }
+
+
+
+
+ virtual ~Implementation (void)
+ {
+ EndListening(mrBase);
+ }
+
+
+
+
+ virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
+ {
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pSimpleHint != NULL
+ && pSimpleHint->GetId() == SFX_HINT_DYING
+ && &rBroadcaster == &static_cast<SfxBroadcaster&>(mrBase))
+ {
+ Dispose();
+ }
+ }
+
+
+
+ /** Process the sequence of properties given to one of the XRenderable
+ methods.
+ */
+ void ProcessProperties (const css::uno::Sequence<css::beans::PropertyValue >& rOptions)
+ {
+ OSL_ASSERT(!mbIsDisposed);
+ if (mbIsDisposed)
+ return;
+
+ bool bIsValueChanged = processProperties( rOptions );
+
+ // The RenderDevice property is handled specially: its value is
+ // stored in mpPrinter instead of being retrieved on demand.
+ Any aDev( getValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) );
+ Reference<awt::XDevice> xRenderDevice;
+
+ if (aDev >>= xRenderDevice)
+ {
+ VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
+ OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
+ mpPrinter = dynamic_cast<Printer*>(pOut);
+ }
+
+ if (bIsValueChanged)
+ {
+ if ( ! mpOptions )
+ mpOptions.reset(new PrintOptions(*this, maSlidesPerPage));
+ PreparePages();
+ }
+ }
+
+
+
+ /** Return the number of pages that are to be printed.
+ */
+ sal_Int32 GetPrintPageCount (void)
+ {
+ OSL_ASSERT(!mbIsDisposed);
+ if (mbIsDisposed)
+ return 0;
+ else
+ return maPrinterPages.size();
+ }
+
+
+
+ /** Return a sequence of properties that can be returned by the
+ XRenderable::getRenderer() method.
+ */
+ css::uno::Sequence<css::beans::PropertyValue> GetProperties (
+ const css::uno::Sequence<css::beans::PropertyValue>& rOptions)
+ {
+ (void)rOptions;
+
+ css::uno::Sequence<css::beans::PropertyValue> aProperties (3);
+
+ aProperties[0].Name = A2S("ExtraPrintUIOptions");
+ aProperties[0].Value <<= m_aUIProperties;
+
+ aProperties[1].Name = A2S("PageSize");
+ aProperties[1].Value <<= maPrintSize;
+
+ // FIXME: is this always true ?
+ aProperties[2].Name = A2S("PageIncludesNonprintableArea");
+ aProperties[2].Value = makeAny( sal_True );
+
+ return aProperties;
+ }
+
+
+
+
+ /** Print one of the prepared pages.
+ */
+ void PrintPage (const sal_Int32 nIndex)
+ {
+ OSL_ASSERT(!mbIsDisposed);
+ if (mbIsDisposed)
+ return;
+
+ Printer& rPrinter (*mpPrinter);
+
+ ::boost::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell());
+ if ( ! pViewShell)
+ return;
+
+ SdDrawDocument* pDocument = pViewShell->GetDoc();
+ OSL_ASSERT(pDocument!=NULL);
+
+ ::boost::shared_ptr<DrawViewShell> pDrawViewShell(
+ ::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell()));
+
+ if ( ! mpPrintView)
+ mpPrintView.reset(new DrawView(mrBase.GetDocShell(), &rPrinter, pDrawViewShell.get()));
+
+ if (nIndex<0 || sal::static_int_cast<sal_uInt32>(nIndex)>=maPrinterPages.size())
+ return;
+
+ const ::boost::shared_ptr<PrinterPage> pPage (maPrinterPages[nIndex]);
+ OSL_ASSERT(pPage);
+ if ( ! pPage)
+ return;
+
+ const Orientation eSavedOrientation (rPrinter.GetOrientation());
+ const ULONG nSavedDrawMode (rPrinter.GetDrawMode());
+ const MapMode aSavedMapMode (rPrinter.GetMapMode());
+ const USHORT nSavedPaperBin (rPrinter.GetPaperBin());
+
+
+ // Set page orientation.
+ if ( ! rPrinter.SetOrientation(pPage->GetOrientation()))
+ {
+ if ( ! mbHasOrientationWarningBeenShown
+ && mpOptions->IsWarningOrientation())
+ {
+ mbHasOrientationWarningBeenShown = true;
+ // Show warning that the orientation could not be set.
+ if (pViewShell)
+ {
+ WarningBox aWarnBox(
+ pViewShell->GetActiveWindow(),
+ (WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL),
+ String(SdResId(STR_WARN_PRINTFORMAT_FAILURE)));
+ if (aWarnBox.Execute() != RET_OK)
+ return;
+ }
+ }
+ }
+
+ // Set the draw mode.
+ rPrinter.SetDrawMode(pPage->GetDrawMode());
+
+ // Set paper tray.
+ rPrinter.SetPaperBin(pPage->GetPaperTray());
+
+ // Print the actual page.
+ pPage->Print(
+ rPrinter,
+ *pDocument,
+ *pViewShell,
+ pDrawViewShell ? pDrawViewShell->GetView() : NULL,
+ *mpPrintView,
+ pViewShell->GetFrameView()->GetVisibleLayers(),
+ pViewShell->GetFrameView()->GetPrintableLayers());
+
+ rPrinter.SetOrientation(eSavedOrientation);
+ rPrinter.SetDrawMode(nSavedDrawMode);
+ rPrinter.SetMapMode(aSavedMapMode);
+ rPrinter.SetPaperBin(nSavedPaperBin);
+ }
+
+
+
+
+private:
+ ViewShellBase& mrBase;
+ bool mbIsDisposed;
+ Printer* mpPrinter;
+ ::boost::scoped_ptr<PrintOptions> mpOptions;
+ ::std::vector< ::boost::shared_ptr< ::sd::PrinterPage> > maPrinterPages;
+ ::boost::scoped_ptr<DrawView> mpPrintView;
+ bool mbHasOrientationWarningBeenShown;
+ ::std::vector<sal_Int32> maSlidesPerPage;
+ awt::Size maPrintSize;
+
+ void Dispose (void)
+ {
+ mbIsDisposed = true;
+ }
+
+
+
+ /** Determine and set the paper orientation.
+ */
+ bool SetupPaperOrientation (
+ const PageKind ePageKind,
+ PrintInfo& rInfo)
+ {
+ SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc();
+ rInfo.meOrientation = ORIENTATION_PORTRAIT;
+
+ if( ! mpOptions->IsBooklet())
+ {
+ rInfo.meOrientation = pDocument->GetSdPage(0, ePageKind)->GetOrientation();
+ }
+ else if (rInfo.maPageSize.Width() < rInfo.maPageSize.Height())
+ rInfo.meOrientation = ORIENTATION_LANDSCAPE;
+
+ const Size aPaperSize (rInfo.mpPrinter->GetPaperSize());
+ if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE &&
+ (aPaperSize.Width() < aPaperSize.Height()))
+ ||
+ (rInfo.meOrientation == ORIENTATION_PORTRAIT &&
+ (aPaperSize.Width() > aPaperSize.Height()))
+ )
+ {
+ maPrintSize = awt::Size(aPaperSize.Height(), aPaperSize.Width());
+ // rInfo.maPrintSize = Size(rInfo.maPrintSize.Height(), rInfo.maPrintSize.Width());
+ }
+ else
+ {
+ maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height());
+ }
+
+ return true;
+ }
+
+
+
+ /** Top most method for preparing printer pages. In this and the other
+ Prepare... methods the various special cases are detected and
+ handled.
+ For every page that is to be printed (that may contain several
+ slides) one PrinterPage object is created and inserted into
+ maPrinterPages.
+ */
+ void PreparePages (void)
+ {
+ mpPrintView.reset();
+ maPrinterPages.clear();
+ mbHasOrientationWarningBeenShown = false;
+
+ ViewShell* pShell = mrBase.GetMainViewShell().get();
+
+ PrintInfo aInfo (mpPrinter, mpOptions->GetPrinterSelection(), mrBase.GetMainViewShell());
+
+ if (aInfo.mpPrinter!=NULL && pShell!=NULL)
+ {
+
+ MapMode aMap (aInfo.mpPrinter->GetMapMode());
+ aMap.SetMapUnit(MAP_100TH_MM);
+ aInfo.maMap = aMap;
+ mpPrinter->SetMapMode(aMap);
+
+ ::Outliner& rOutliner = mrBase.GetDocument()->GetDrawOutliner();
+ const ULONG nSavedControlWord (rOutliner.GetControlWord());
+ ULONG nCntrl = nSavedControlWord;
+ nCntrl &= ~EE_CNTRL_MARKFIELDS;
+ nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ rOutliner.SetControlWord( nCntrl );
+
+ // When in outline view then apply all pending changes to the model.
+ if (pShell->ISA(OutlineViewShell))
+ static_cast<OutlineViewShell*>(pShell)->PrepareClose (FALSE, FALSE);
+
+ // Collect some frequently used data.
+ if (mpOptions->IsDate())
+ {
+ aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getDate( Date() );
+ aInfo.msTimeDate += ::rtl::OUString((sal_Unicode)' ');
+ }
+
+ if (mpOptions->IsTime())
+ aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time(), FALSE, FALSE );
+ aInfo.maPrintSize = aInfo.mpPrinter->GetOutputSize();
+ maPrintSize = awt::Size(
+ aInfo.mpPrinter->GetPaperSize().Width(),
+ aInfo.mpPrinter->GetPaperSize().Height());
+
+ switch (mpOptions->GetOutputQuality())
+ {
+ case 1:
+ aInfo.mnDrawMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL
+ | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP
+ | DRAWMODE_GRAYGRADIENT;
+ break;
+
+ case 2:
+ aInfo.mnDrawMode = DRAWMODE_BLACKLINE | DRAWMODE_BLACKTEXT
+ | DRAWMODE_WHITEFILL | DRAWMODE_GRAYBITMAP
+ | DRAWMODE_WHITEGRADIENT;
+ break;
+
+ default:
+ aInfo.mnDrawMode = DRAWMODE_DEFAULT;
+ }
+
+ // check if selected range of pages contains transparent objects
+ /*
+ const bool bPrintPages (bPrintNotes || bPrintDraw || bPrintHandout);
+ const bool bContainsTransparency (bPrintPages && ContainsTransparency());
+ if (pPrinter->InitJob (mrBase.GetWindow(), !bIsAPI && bContainsTransparency))
+ */
+
+ if (mpOptions->IsDraw())
+ PrepareStdOrNotes(PK_STANDARD, aInfo);
+ if (mpOptions->IsNotes())
+ PrepareStdOrNotes(PK_NOTES, aInfo);
+ if (mpOptions->IsHandout())
+ {
+ InitHandoutTemplate();
+ PrepareHandout(aInfo);
+ }
+ if (mpOptions->IsOutline())
+ PrepareOutline(aInfo);
+
+ rOutliner.SetControlWord(nSavedControlWord);
+ }
+ }
+
+
+
+
+ /** Create the page objects of the handout template. When the actual
+ printing takes place then the page objects are assigned different
+ sets of slides for each printed page (see HandoutPrinterPage::Print).
+ */
+ void InitHandoutTemplate (void)
+ {
+ const sal_Int32 nSlidesPerHandout (mpOptions->GetHandoutPageCount());
+ const bool bHandoutHorizontal (mpOptions->IsHandoutHorizontal());
+
+ AutoLayout eLayout = AUTOLAYOUT_HANDOUT6;
+ switch (nSlidesPerHandout)
+ {
+ case 1: eLayout = AUTOLAYOUT_HANDOUT1; break;
+ case 2: eLayout = AUTOLAYOUT_HANDOUT2; break;
+ case 3: eLayout = AUTOLAYOUT_HANDOUT3; break;
+ case 4: eLayout = AUTOLAYOUT_HANDOUT4; break;
+ default:
+ case 6: eLayout = AUTOLAYOUT_HANDOUT6; break;
+ case 9: eLayout = AUTOLAYOUT_HANDOUT9; break;
+ }
+
+ if( !mrBase.GetDocument() )
+ return;
+
+ SdDrawDocument& rModel = *mrBase.GetDocument();
+
+ // first, prepare handout page (not handout master)
+
+ SdPage* pHandout = rModel.GetSdPage(0, PK_HANDOUT);
+ if( !pHandout )
+ return;
+
+ // delete all previous shapes from handout page
+ while( pHandout->GetObjCount() )
+ {
+ SdrObject* pObj = pHandout->NbcRemoveObject(0);
+ if( pObj )
+ SdrObject::Free( pObj );
+ }
+
+ const bool bDrawLines (eLayout == AUTOLAYOUT_HANDOUT3);
+
+ std::vector< Rectangle > aAreas;
+ SdPage::CalculateHandoutAreas( rModel, eLayout, bHandoutHorizontal, aAreas );
+
+ std::vector< Rectangle >::iterator iter( aAreas.begin() );
+ while( iter != aAreas.end() )
+ {
+ pHandout->NbcInsertObject( new SdrPageObj((*iter++)) );
+
+ if( bDrawLines && (iter != aAreas.end()) )
+ {
+ Rectangle aRect( (*iter++) );
+
+ basegfx::B2DPolygon aPoly;
+ aPoly.insert(0, basegfx::B2DPoint( aRect.Left(), aRect.Top() ) );
+ aPoly.insert(1, basegfx::B2DPoint( aRect.Right(), aRect.Top() ) );
+
+ basegfx::B2DHomMatrix aMatrix;
+ aMatrix.translate( 0.0, static_cast< double >( aRect.GetHeight() / 7 ) );
+
+ basegfx::B2DPolyPolygon aPathPoly;
+ for( sal_uInt16 nLine = 0; nLine < 7; nLine++ )
+ {
+ aPoly.transform( aMatrix );
+ aPathPoly.append( aPoly );
+ }
+
+ SdrPathObj* pPathObj = new SdrPathObj(OBJ_PATHLINE, aPathPoly );
+ pPathObj->SetMergedItem(XLineStyleItem(XLINE_SOLID));
+ pPathObj->SetMergedItem(XLineColorItem(String(), Color(COL_BLACK)));
+
+ pHandout->NbcInsertObject( pPathObj );
+ }
+ }
+ }
+
+
+
+
+ /** Detect whether any of the slides that are to be printed contains
+ partially transparent or translucent shapes.
+ */
+ bool ContainsTransparency (const PrintInfo& rInfo) const
+ {
+ // const bool bPrintExcluded (mpOptions->IsPrintExcluded());
+ bool bContainsTransparency = false;
+
+ for (USHORT
+ nIndex=0,
+ nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
+ nIndex < nCount && !bContainsTransparency;
+ ++nIndex)
+ {
+ SdPage* pPage = GetFilteredPage(nIndex, PK_STANDARD, rInfo);
+ if (pPage == NULL)
+ continue;
+
+ bContainsTransparency = pPage->HasTransparentObjects();
+ if ( ! bContainsTransparency && pPage->TRG_HasMasterPage())
+ bContainsTransparency = pPage->TRG_GetMasterPage().HasTransparentObjects();
+ }
+
+ return bContainsTransparency;
+ }
+
+
+
+
+ /** Detect whether the specified slide is to be printed.
+ @return
+ When the slide is not to be printed then <NULL/> is returned.
+ Otherwise a pointer to the slide is returned.
+ */
+ SdPage* GetFilteredPage (
+ const sal_Int32 nPageIndex,
+ const PageKind ePageKind,
+ const PrintInfo& rInfo) const
+ {
+ OSL_ASSERT(mrBase.GetDocument() != NULL);
+ OSL_ASSERT(nPageIndex>=0);
+ if ( ! rInfo.maSelection.IsSelected(nPageIndex))
+ return NULL;
+ SdPage* pPage = mrBase.GetDocument()->GetSdPage(
+ sal::static_int_cast<USHORT>(nPageIndex),
+ ePageKind);
+ if (pPage == NULL)
+ return NULL;
+ if ( ! pPage->IsExcluded() || mpOptions->IsPrintExcluded())
+ return pPage;
+ else
+ return NULL;
+ }
+
+
+
+
+ /** Prepare the outline of the document for printing. There is no fixed
+ number of slides whose outline data is put onto one printer page.
+ If the current printer page has enough room for the outline of the
+ current slide then that is added. Otherwise a new printer page is
+ started.
+ */
+ void PrepareOutline (PrintInfo& rInfo)
+ {
+ MapMode aMap (rInfo.maMap);
+ Point aPageOfs (rInfo.mpPrinter->GetPageOffset() );
+ // aMap.SetOrigin(Point() - aPageOfs);
+ aMap.SetScaleX(Fraction(1,2));
+ aMap.SetScaleY(Fraction(1,2));
+ mpPrinter->SetMapMode(aMap);
+
+ Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize());
+ if( aOutRect.GetWidth() > aOutRect.GetHeight() )
+ {
+ Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ maPrintSize.Width = aPaperSize.Height();
+ maPrintSize.Height = aPaperSize.Width();
+ aOutRect = Rectangle( Point( aPageOfs.Y(), aPageOfs.X() ),
+ Size( aOutRect.GetHeight(), aOutRect.GetWidth() ) );
+ }
+
+ Link aOldLink;
+ Outliner* pOutliner = mrBase.GetDocument()->GetInternalOutliner();
+ pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
+ const USHORT nSavedOutlMode (pOutliner->GetMode());
+ const BOOL bSavedUpdateMode (pOutliner->GetUpdateMode());
+ const Size aSavedPaperSize (pOutliner->GetPaperSize());
+ const MapMode aSavedMapMode (pOutliner->GetRefMapMode());
+ pOutliner->SetPaperSize(aOutRect.GetSize());
+ pOutliner->SetUpdateMode(TRUE);
+
+ long nPageH = aOutRect.GetHeight();
+
+ for (USHORT
+ nIndex=0,
+ nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
+ nIndex < nCount;
+ )
+ {
+ pOutliner->Clear();
+ pOutliner->SetFirstPageNumber(nIndex+1);
+
+ Paragraph* pPara = NULL;
+ sal_Int32 nH (0);
+ while (nH < nPageH && nIndex<nCount)
+ {
+ SdPage* pPage = GetFilteredPage(nIndex, PK_STANDARD, rInfo);
+ ++nIndex;
+ if (pPage == NULL)
+ continue;
+
+ SdrTextObj* pTextObj = NULL;
+ sal_uInt32 nObj (0);
+
+ while (pTextObj==NULL && nObj < pPage->GetObjCount())
+ {
+ SdrObject* pObj = pPage->GetObj(nObj++);
+ if (pObj->GetObjInventor() == SdrInventor
+ && pObj->GetObjIdentifier() == OBJ_TITLETEXT)
+ {
+ pTextObj = dynamic_cast<SdrTextObj*>(pObj);
+ }
+ }
+
+ pPara = pOutliner->GetParagraph(pOutliner->GetParagraphCount() - 1);
+
+ if (pTextObj!=NULL
+ && !pTextObj->IsEmptyPresObj()
+ && pTextObj->GetOutlinerParaObject())
+ {
+ pOutliner->AddText(*(pTextObj->GetOutlinerParaObject()));
+ }
+ else
+ pOutliner->Insert(String());
+
+ pTextObj = NULL;
+ nObj = 0;
+
+ while (pTextObj==NULL && nObj<pPage->GetObjCount())
+ {
+ SdrObject* pObj = pPage->GetObj(nObj++);
+ if (pObj->GetObjInventor() == SdrInventor
+ && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT)
+ {
+ pTextObj = dynamic_cast<SdrTextObj*>(pObj);
+ }
+ }
+
+ bool bSubTitle (false);
+ if (!pTextObj)
+ {
+ bSubTitle = true;
+ pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT)); // Untertitel vorhanden?
+ }
+
+ ULONG nParaCount1 = pOutliner->GetParagraphCount();
+
+ if (pTextObj!=NULL
+ && !pTextObj->IsEmptyPresObj()
+ && pTextObj->GetOutlinerParaObject())
+ {
+ pOutliner->AddText(*(pTextObj->GetOutlinerParaObject()));
+ }
+
+ if (bSubTitle )
+ {
+ const sal_Int32 nParaCount2 (pOutliner->GetParagraphCount());
+ for (sal_Int32 nPara=nParaCount1; nPara<nParaCount2; ++nPara)
+ {
+ Paragraph* pP = pOutliner->GetParagraph(nPara);
+ if (pP!=NULL && pOutliner->GetDepth((USHORT)nPara) > 0)
+ pOutliner->SetDepth(pP, 0);
+ }
+ }
+
+ nH = pOutliner->GetTextHeight();
+ }
+
+ // Remove the last paragraph when that does not fit completely on
+ // the current page.
+ if (nH > nPageH && pPara!=NULL)
+ {
+ ULONG nCnt = pOutliner->GetAbsPos(
+ pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 ) );
+ ULONG nParaPos = pOutliner->GetAbsPos( pPara );
+ nCnt -= nParaPos;
+ pPara = pOutliner->GetParagraph( ++nParaPos );
+ if ( nCnt && pPara )
+ {
+ pOutliner->Remove(pPara, nCnt);
+ --nIndex;
+ }
+ }
+
+ maPrinterPages.push_back(
+ ::boost::shared_ptr<PrinterPage>(
+ new OutlinerPrinterPage(
+ pOutliner->CreateParaObject(),
+ aMap,
+ rInfo.msTimeDate,
+ aPageOfs,
+ rInfo.mnDrawMode,
+ rInfo.meOrientation,
+ rInfo.mpPrinter->GetPaperBin())));
+ }
+
+ pOutliner->SetRefMapMode(aSavedMapMode);
+ pOutliner->SetUpdateMode(bSavedUpdateMode);
+ pOutliner->SetPaperSize(aSavedPaperSize);
+ pOutliner->Init(nSavedOutlMode);
+ }
+
+
+
+
+ /** Prepare handout pages for slides that are to be printed.
+ */
+ void PrepareHandout (PrintInfo& rInfo)
+ {
+ SdDrawDocument* pDocument = mrBase.GetDocument();
+ OSL_ASSERT(pDocument != NULL);
+ SdPage& rHandoutPage (*pDocument->GetSdPage(0, PK_HANDOUT));
+
+ const bool bScalePage (mpOptions->IsPageSize());
+
+ USHORT nPaperBin;
+ if ( ! mpOptions->IsPaperBin())
+ nPaperBin = rHandoutPage.GetPaperBin();
+ else
+ nPaperBin = rInfo.mpPrinter->GetPaperBin();
+
+ // Change orientation?
+ SdPage& rMaster (dynamic_cast<SdPage&>(rHandoutPage.TRG_GetMasterPage()));
+ rInfo.meOrientation = rMaster.GetOrientation();
+
+ const Size aPaperSize (rInfo.mpPrinter->GetPaperSize());
+ if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE &&
+ (aPaperSize.Width() < aPaperSize.Height()))
+ ||
+ (rInfo.meOrientation == ORIENTATION_PORTRAIT &&
+ (aPaperSize.Width() > aPaperSize.Height()))
+ )
+ {
+ maPrintSize = awt::Size(aPaperSize.Height(), aPaperSize.Width());
+ }
+ else
+ {
+ maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height());
+ }
+
+ MapMode aMap (rInfo.maMap);
+ const Point aPageOfs (rInfo.mpPrinter->GetPageOffset());
+ //DrawView* pPrintView;
+
+ // aMap.SetOrigin(Point() - aPageOfs);
+
+ if ( bScalePage )
+ {
+ const Size aPageSize (rHandoutPage.GetSize());
+ const Size aPrintSize (rInfo.mpPrinter->GetOutputSize());
+
+ const double fHorz = (double) aPrintSize.Width() / aPageSize.Width();
+ const double fVert = (double) aPrintSize.Height() / aPageSize.Height();
+
+ Fraction aFract;
+ if ( fHorz < fVert )
+ aFract = Fraction(aPrintSize.Width(), aPageSize.Width());
+ else
+ aFract = Fraction(aPrintSize.Height(), aPageSize.Height());
+
+ aMap.SetScaleX(aFract);
+ aMap.SetScaleY(aFract);
+ aMap.SetOrigin(Point());
+ }
+
+ ::boost::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell());
+ pViewShell->WriteFrameViewData();
+
+ // Count page shapes.
+ sal_uInt32 nShapeCount (0);
+ SdrObjListIter aShapeIter (rHandoutPage);
+ while (aShapeIter.IsMore())
+ {
+ SdrPageObj* pPageObj = dynamic_cast<SdrPageObj*>(aShapeIter.Next());
+ if (pPageObj)
+ ++nShapeCount;
+ }
+
+ // Distribute pages to handout pages.
+ ::std::vector<USHORT> aPageIndices;
+ std::vector<SdPage*> aPagesVector;
+ for (USHORT
+ nIndex=0,
+ nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD),
+ nHandoutPageIndex=0;
+ nIndex <= nCount;
+ ++nIndex)
+ {
+ if (nIndex < nCount)
+ {
+ if (GetFilteredPage(nIndex, PK_STANDARD, rInfo) == NULL)
+ continue;
+ aPageIndices.push_back(nIndex);
+ }
+
+ // Create a printer page when we have found one page for each
+ // placeholder or when this is the last (and special) loop.
+ if (aPageIndices.size() == nShapeCount
+ || nIndex==nCount)
+ {
+ maPrinterPages.push_back(
+ ::boost::shared_ptr<PrinterPage>(
+ new HandoutPrinterPage(
+ nHandoutPageIndex++,
+ aPageIndices,
+ aMap,
+ rInfo.msTimeDate,
+ aPageOfs,
+ rInfo.mnDrawMode,
+ rInfo.meOrientation,
+ nPaperBin)));
+ aPageIndices.clear();
+ }
+ }
+ }
+
+
+
+
+ /** Prepare the notes pages or regular slides.
+ */
+ void PrepareStdOrNotes (
+ const PageKind ePageKind,
+ PrintInfo& rInfo)
+ {
+ OSL_ASSERT(rInfo.mpPrinter != NULL);
+
+ // Fill in page kind specific data.
+ SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc();
+ if (pDocument->GetSdPageCount(ePageKind) == 0)
+ return;
+ SdPage* pRefPage = pDocument->GetSdPage(0, ePageKind);
+ rInfo.maPageSize = pRefPage->GetSize();
+
+ if ( ! SetupPaperOrientation(ePageKind, rInfo))
+ return;
+
+ MapMode aMap (rInfo.maMap);
+ // aMap.SetOrigin(Point() - rInfo.mpPrinter->GetPageOffset());
+ rInfo.maMap = aMap;
+
+ if (mpOptions->IsBooklet())
+ PrepareBooklet(ePageKind, rInfo);
+ else
+ PrepareRegularPages(ePageKind, rInfo);
+ }
+
+
+
+
+ /** Prepare slides in a non-booklet way: one slide per one to many
+ printer pages.
+ */
+ void PrepareRegularPages (
+ const PageKind ePageKind,
+ PrintInfo& rInfo)
+ {
+ ::boost::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell());
+ pViewShell->WriteFrameViewData();
+ Point aPtZero;
+
+ for (USHORT
+ nIndex=0,
+ nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
+ nIndex < nCount;
+ ++nIndex)
+ {
+ SdPage* pPage = GetFilteredPage(nIndex, ePageKind, rInfo);
+ if (pPage == NULL)
+ continue;
+
+ MapMode aMap (rInfo.maMap);
+ // Kann sich die Seitengroesse geaendert haben?
+ const Size aPageSize = pPage->GetSize();
+
+ if (mpOptions->IsPageSize())
+ {
+ const double fHorz ((double) rInfo.maPrintSize.Width() / aPageSize.Width());
+ const double fVert ((double) rInfo.maPrintSize.Height() / aPageSize.Height());
+
+ Fraction aFract;
+ if (fHorz < fVert)
+ aFract = Fraction(rInfo.maPrintSize.Width(), aPageSize.Width());
+ else
+ aFract = Fraction(rInfo.maPrintSize.Height(), aPageSize.Height());
+
+ aMap.SetScaleX(aFract);
+ aMap.SetScaleY(aFract);
+ aMap.SetOrigin(Point());
+ }
+
+ if (mpOptions->IsPrintPageName())
+ {
+ rInfo.msPageString = pPage->GetName();
+ rInfo.msPageString += ::rtl::OUString(sal_Unicode(' '));
+ }
+ else
+ rInfo.msPageString = ::rtl::OUString();
+ rInfo.msPageString += rInfo.msTimeDate;
+
+ long aPageWidth = aPageSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder();
+ long aPageHeight = aPageSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder();
+ // Bugfix zu 44530:
+ // Falls implizit umgestellt wurde (Landscape/Portrait)
+ // wird dies beim Kacheln, bzw. aufteilen (Poster) beruecksichtigt
+ BOOL bSwitchPageSize = FALSE;
+ if( ( rInfo.maPrintSize.Width() > rInfo.maPrintSize.Height()
+ && aPageWidth < aPageHeight )
+ || ( rInfo.maPrintSize.Width() < rInfo.maPrintSize.Height()
+ && aPageWidth > aPageHeight ) )
+ {
+ bSwitchPageSize = TRUE;
+ const sal_Int32 nTmp (rInfo.maPrintSize.Width());
+ rInfo.maPrintSize.Width() = rInfo.maPrintSize.Height();
+ rInfo.maPrintSize.Height() = nTmp;
+ }
+
+ if (mpOptions->IsTilePage()
+ && aPageWidth < rInfo.maPrintSize.Width()
+ && aPageHeight < rInfo.maPrintSize.Height())
+ {
+ // Put multiple slides on one printer page.
+ PrepareTiledPage(nIndex, *pPage, ePageKind, rInfo);
+ }
+ else
+ {
+ rInfo.maMap = aMap;
+ PrepareScaledPage(nIndex, *pPage, ePageKind, rInfo);
+ }
+ }
+ }
+
+
+
+
+ /** Put two slides on one printer page.
+ */
+ void PrepareBooklet (
+ const PageKind ePageKind,
+ const PrintInfo& rInfo)
+ {
+ MapMode aStdMap (rInfo.maMap);
+ Point aOffset;
+ Size aPrintSize_2 (rInfo.maPrintSize);
+ Size aPageSize_2 (rInfo.maPageSize);
+
+ if (rInfo.meOrientation == ORIENTATION_LANDSCAPE)
+ aPrintSize_2.Width() >>= 1;
+ else
+ aPrintSize_2.Height() >>= 1;
+
+ const double fPageWH = (double) aPageSize_2.Width() / aPageSize_2.Height();
+ const double fPrintWH = (double) aPrintSize_2.Width() / aPrintSize_2.Height();
+
+ if( fPageWH < fPrintWH )
+ {
+ aPageSize_2.Width() = (long) ( aPrintSize_2.Height() * fPageWH );
+ aPageSize_2.Height()= aPrintSize_2.Height();
+ }
+ else
+ {
+ aPageSize_2.Width() = aPrintSize_2.Width();
+ aPageSize_2.Height() = (long) ( aPrintSize_2.Width() / fPageWH );
+ }
+
+ MapMode aMap (rInfo.maMap);
+ aMap.SetScaleX( Fraction( aPageSize_2.Width(), rInfo.maPageSize.Width() ) );
+ aMap.SetScaleY( Fraction( aPageSize_2.Height(), rInfo.maPageSize.Height() ) );
+
+ // calculate adjusted print size
+ const Size aAdjustedPrintSize (OutputDevice::LogicToLogic(
+ rInfo.maPrintSize,
+ aStdMap,
+ aMap));
+
+ if (rInfo.meOrientation == ORIENTATION_LANDSCAPE)
+ {
+ aOffset.X() = ( ( aAdjustedPrintSize.Width() >> 1 ) - rInfo.maPageSize.Width() ) >> 1;
+ aOffset.Y() = ( aAdjustedPrintSize.Height() - rInfo.maPageSize.Height() ) >> 1;
+ }
+ else
+ {
+ aOffset.X() = ( aAdjustedPrintSize.Width() - rInfo.maPageSize.Width() ) >> 1;
+ aOffset.Y() = ( ( aAdjustedPrintSize.Height() >> 1 ) - rInfo.maPageSize.Height() ) >> 1;
+ }
+
+ // create vector of pages to print
+ ::std::vector< USHORT > aPageVector;
+ for (USHORT
+ nIndex=0,
+ nCount=mrBase.GetDocument()->GetSdPageCount(ePageKind);
+ nIndex < nCount;
+ ++nIndex)
+ {
+ SdPage* pPage = GetFilteredPage(nIndex, ePageKind, rInfo);
+ if (pPage != NULL)
+ aPageVector.push_back(nIndex);
+ }
+
+ // create pairs of pages to print on each page
+ typedef ::std::vector< ::std::pair< USHORT, USHORT > > PairVector;
+ PairVector aPairVector;
+ if ( ! aPageVector.empty())
+ {
+ sal_uInt32 nFirstIndex = 0, nLastIndex = aPageVector.size() - 1;
+
+ if( aPageVector.size() & 1 )
+ aPairVector.push_back( ::std::make_pair( (USHORT) 65535, aPageVector[ nFirstIndex++ ] ) );
+ else
+ aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
+
+ while( nFirstIndex < nLastIndex )
+ {
+ if( nFirstIndex & 1 )
+ aPairVector.push_back( ::std::make_pair( aPageVector[ nFirstIndex++ ], aPageVector[ nLastIndex-- ] ) );
+ else
+ aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
+ }
+ }
+
+ for (sal_uInt32
+ nIndex=0,
+ nCount=aPairVector.size();
+ nIndex < nCount;
+ ++nIndex)
+ {
+ const bool bIsIndexOdd (nIndex & 1);
+ if ((!bIsIndexOdd && mpOptions->IsPrintFrontPage())
+ || (bIsIndexOdd && mpOptions->IsPrintBackPage()))
+ {
+ const ::std::pair<USHORT, USHORT> aPair (aPairVector[nIndex]);
+ Point aSecondOffset (aOffset);
+ if (rInfo.meOrientation == ORIENTATION_LANDSCAPE)
+ aSecondOffset.X() += aAdjustedPrintSize.Width() / 2;
+ else
+ aSecondOffset.Y() += aAdjustedPrintSize.Height() / 2;
+ maPrinterPages.push_back(
+ ::boost::shared_ptr<PrinterPage>(
+ new BookletPrinterPage(
+ aPair.first,
+ aPair.second,
+ aOffset,
+ aSecondOffset,
+ ePageKind,
+ aMap,
+ rInfo.mbPrintMarkedOnly,
+ rInfo.mnDrawMode,
+ rInfo.meOrientation,
+ rInfo.mpPrinter->GetPaperBin())));
+
+ }
+ }
+ }
+
+
+
+
+ /** Print one slide multiple times on one printer page so that the whole
+ printer page is covered.
+ */
+ void PrepareTiledPage (
+ const sal_Int32 nPageIndex,
+ const SdPage& rPage,
+ const PageKind ePageKind,
+ const PrintInfo& rInfo)
+ {
+ USHORT nPaperBin;
+ if ( ! mpOptions->IsPaperBin())
+ nPaperBin = rPage.GetPaperBin();
+ else
+ nPaperBin = rInfo.mpPrinter->GetPaperBin();
+
+ maPrinterPages.push_back(
+ ::boost::shared_ptr<PrinterPage>(
+ new TiledPrinterPage(
+ sal::static_int_cast<USHORT>(nPageIndex),
+ ePageKind,
+ 500,
+ rInfo.mbPrintMarkedOnly,
+ rInfo.msPageString,
+ rInfo.mpPrinter->GetPageOffset(),
+ rInfo.mnDrawMode,
+ rInfo.meOrientation,
+ nPaperBin)));
+ }
+
+
+
+ /** Print one standard slide or notes page on one to many printer
+ pages. More than on printer page is used when the slide is larger
+ than the printable area.
+ */
+ void PrepareScaledPage (
+ const sal_Int32 nPageIndex,
+ const SdPage& rPage,
+ const PageKind ePageKind,
+ const PrintInfo& rInfo)
+ {
+ const Point aPageOffset (rInfo.mpPrinter->GetPageOffset());
+
+ USHORT nPaperBin;
+ if ( ! mpOptions->IsPaperBin())
+ nPaperBin = rPage.GetPaperBin();
+ else
+ nPaperBin = rInfo.mpPrinter->GetPaperBin();
+
+ // For pages larger then the printable area there
+ // are three options:
+ // 1. Scale down to the page to the printable area.
+ // 2. Print only the upper left part of the page
+ // (without the unprintable borders).
+ // 3. Split the page into parts of the size of the
+ // printable area.
+ const bool bScalePage (mpOptions->IsPageSize());
+ const bool bCutPage (mpOptions->IsCutPage());
+ MapMode aMap (rInfo.maMap);
+ if (bScalePage || bCutPage)
+ {
+ // Handle 1 and 2.
+
+ // if CutPage is set then do not move it, otherwise move the
+ // scaled page to printable area
+ #if 0
+ if (bCutPage)
+ aMap.SetOrigin(Point(-aPageOffset.X(), -aPageOffset.Y()));
+ else
+ aMap.SetOrigin(Point(0,0));
+ #endif
+ maPrinterPages.push_back(
+ ::boost::shared_ptr<PrinterPage>(
+ new RegularPrinterPage(
+ sal::static_int_cast<USHORT>(nPageIndex),
+ ePageKind,
+ aMap,
+ rInfo.mbPrintMarkedOnly,
+ rInfo.msPageString,
+ aPageOffset,
+ rInfo.mnDrawMode,
+ rInfo.meOrientation,
+ nPaperBin)));
+ }
+ else
+ {
+ // Handle 3. Print parts of the page in the size of the
+ // printable area until the whole page is covered.
+
+ // keep the page content at its position if it fits, otherwise
+ // move it to the printable area
+ const long nPageWidth (
+ rInfo.maPageSize.Width() - rPage.GetLftBorder() - rPage.GetRgtBorder());
+ const long nPageHeight (
+ rInfo.maPageSize.Height() - rPage.GetUppBorder() - rPage.GetLwrBorder());
+ #if 0
+ Point aOrigin (
+ nPageWidth < rInfo.maPrintSize.Width() ? -aPageOffset.X() : 0,
+ nPageHeight < rInfo.maPrintSize.Height() ? -aPageOffset.Y() : 0);
+ #else
+ Point aOrigin ( 0, 0 );
+ #endif
+ for (Point aPageOrigin = aOrigin;
+ -aPageOrigin.Y()<nPageHeight;
+ aPageOrigin.Y() -= rInfo.maPrintSize.Height())
+ {
+ for (aPageOrigin.X()=aOrigin.X();
+ -aPageOrigin.X()<nPageWidth;
+ aPageOrigin.X() -= rInfo.maPrintSize.Width())
+ {
+ aMap.SetOrigin(aPageOrigin);
+ maPrinterPages.push_back(
+ ::boost::shared_ptr<PrinterPage>(
+ new RegularPrinterPage(
+ sal::static_int_cast<USHORT>(nPageIndex),
+ ePageKind,
+ aMap,
+ rInfo.mbPrintMarkedOnly,
+ rInfo.msPageString,
+ aPageOffset,
+ rInfo.mnDrawMode,
+ rInfo.meOrientation,
+ nPaperBin)));
+ }
+ }
+ }
+ }
+};
+
+
+
+
+//===== DocumentRenderer ======================================================
+
+DocumentRenderer::DocumentRenderer (ViewShellBase& rBase)
+ : DocumentRendererInterfaceBase(m_aMutex),
+ mpImpl(new Implementation(rBase))
+{
+}
+
+
+
+
+DocumentRenderer::~DocumentRenderer (void)
+{
+}
+
+
+
+
+//----- XRenderable -----------------------------------------------------------
+
+sal_Int32 SAL_CALL DocumentRenderer::getRendererCount (
+ const css::uno::Any& aSelection,
+ const css::uno::Sequence<css::beans::PropertyValue >& rOptions)
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException)
+{
+ (void)aSelection;
+ mpImpl->ProcessProperties(rOptions);
+ return mpImpl->GetPrintPageCount();
+}
+
+
+
+
+Sequence<beans::PropertyValue> SAL_CALL DocumentRenderer::getRenderer (
+ sal_Int32 nRenderer,
+ const css::uno::Any& rSelection,
+ const css::uno::Sequence<css::beans::PropertyValue>& rOptions)
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException)
+{
+ (void)nRenderer;
+ (void)rSelection;
+ mpImpl->ProcessProperties(rOptions);
+ return mpImpl->GetProperties(rOptions);
+}
+
+
+
+
+void SAL_CALL DocumentRenderer::render (
+ sal_Int32 nRenderer,
+ const css::uno::Any& rSelection,
+ const css::uno::Sequence<css::beans::PropertyValue>& rOptions)
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException)
+{
+ (void)rSelection;
+ mpImpl->ProcessProperties(rOptions);
+ mpImpl->PrintPage(nRenderer);
+}
+
+
+
+} // end of namespace sd
diff --git a/sd/source/ui/view/DocumentRenderer.hrc b/sd/source/ui/view/DocumentRenderer.hrc
new file mode 100644
index 000000000000..64a1509d6926
--- /dev/null
+++ b/sd/source/ui/view/DocumentRenderer.hrc
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: printdialog.hrc,v $
+ * $Revision: 1.3 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#define _STR_IMPRESS_PRINT_UI_OPTIONS 32001
+#define _STR_IMPRESS_PRINT_UI_GROUP_NAME 1
+#define _STR_IMPRESS_PRINT_UI_PRINT_CONTENT 2
+#define _STR_IMPRESS_PRINT_UI_PRINT_GROUP 3
+#define _STR_IMPRESS_PRINT_UI_CONTENT 4
+#define _STR_IMPRESS_PRINT_UI_CONTENT_HELP 5
+#define _STR_IMPRESS_PRINT_UI_CONTENT_CHOICES 6
+#define _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE 7
+#define _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES 8
+#define _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP 9
+#define _STR_IMPRESS_PRINT_UI_ORDER 10
+#define _STR_IMPRESS_PRINT_UI_ORDER_CHOICES 11
+#define _STR_IMPRESS_PRINT_UI_ORDER_CHOICES_HELP 12
+#define _STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT 13
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME 14
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME_HELP 15
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE 16
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE_HELP 17
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_TIME 18
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_TIME_HELP 19
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN 20
+#define _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN_HELP 21
+
+#define _STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP 22
+#define _STR_IMPRESS_PRINT_UI_QUALITY 23
+#define _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES 24
+#define _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP 25
+#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS 26
+#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES 27
+#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW 28
+#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP 29
+#define _STR_IMPRESS_PRINT_UI_BROCHURE 30
+#define _STR_IMPRESS_PRINT_UI_BROCHURE_HELP 31
+#define _STR_IMPRESS_PRINT_UI_PAGE_SIDES 32
+#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE 33
+#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_HELP 34
+#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST 35
+#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST_HELP 36
+#define _STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP 37
+#define _STR_IMPRESS_PRINT_UI_PAPER_TRAY 38
+#define _STR_IMPRESS_PRINT_UI_PAPER_TRAY_HELP 39
+
+#define _STR_IMPRESS_PRINT_UI_PAGE_RANGE 40
+#define _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE 41
+#define _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE_HELP 42
+#define _STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE 43
+
+#define _STR_DRAW_PRINT_UI_IS_PRINT_NAME 44
+#define _STR_DRAW_PRINT_UI_IS_PRINT_NAME_HELP 45
+
diff --git a/sd/source/ui/view/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src
new file mode 100644
index 000000000000..c69a6ffe6469
--- /dev/null
+++ b/sd/source/ui/view/DocumentRenderer.src
@@ -0,0 +1,298 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: printdialog.src,v $
+ * $Revision: 1.3 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "app.hrc"
+#include "DocumentRenderer.hrc"
+
+Resource _STR_IMPRESS_PRINT_UI_OPTIONS
+{
+ String _STR_IMPRESS_PRINT_UI_GROUP_NAME
+ {
+ Text [en-US] = "%PRODUCTNAME %s";
+ };
+ String _STR_IMPRESS_PRINT_UI_PRINT_CONTENT
+ {
+ Text [ en-US ] = "Print content";
+ };
+ String _STR_IMPRESS_PRINT_UI_PRINT_GROUP
+ {
+ Text [ en-US ] = "Print";
+ };
+ String _STR_IMPRESS_PRINT_UI_CONTENT
+ {
+ Text [ en-US ] = "Document";
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_CONTENT_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Select which parts of the document should be printed"; >;
+ < "Select which parts of the document should be printed"; >;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_CONTENT_CHOICES
+ {
+ ItemList [ en-US ] =
+ {
+ < "Slides" ; > ;
+ < "Handouts" ; > ;
+ < "Notes" ; > ;
+ < "Outline" ; > ;
+ };
+ };
+ String _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE
+ {
+ Text [ en-US ] = "Slides per page" ;
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES
+ {
+ ItemList [ en-US ] =
+ {
+ < "1" ; > ;
+ < "2" ; > ;
+ < "3" ; > ;
+ < "4" ; > ;
+ < "6" ; > ;
+ < "9" ; > ;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Select how many slides to print per page." ; >;
+ < "Select how many slides to print per page." ; >;
+ };
+ };
+ String _STR_IMPRESS_PRINT_UI_ORDER
+ {
+ Text [ en-US ] = "Order" ;
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_ORDER_CHOICES
+ {
+ ItemList [ en-US ] =
+ {
+ < "Left to right, then down" ; > ;
+ < "Top to bottom, then right" ; > ;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_ORDER_CHOICES_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Specify how to arrange slides on the printed page." ; > ;
+ < "Arrange slides horizontally" ; > ;
+ < "Arrange slides vertically" ; > ;
+ };
+ };
+ String _STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT
+ {
+ Text [ en-US ] = "~Contents";
+ };
+ String _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME
+ {
+ Text [ en-US ] = "~Slide name";
+ };
+ String _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME_HELP
+ {
+ Text [ en-US ] = "Specifies whether to print the page name of a document.";
+ };
+ String _STR_DRAW_PRINT_UI_IS_PRINT_NAME
+ {
+ Text [ en-US ] = "P~age name";
+ };
+ String _STR_DRAW_PRINT_UI_IS_PRINT_NAME_HELP
+ {
+ Text [ en-US ] = "Specifies whether to print the page name of a document.";
+ };
+ String _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE
+ {
+ Text [ en-US ] = "~Date and time";
+ };
+ String _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE_HELP
+ {
+ Text [ en-US ] = "Specifies whether to print the current date and time.";
+ };
+ String _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN
+ {
+ Text [ en-US ] = "Hidden pages";
+ };
+ String _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN_HELP
+ {
+ Text [ en-US ] = "Specifies whether to print the pages that are currently hidden from the application.";
+ };
+
+ String _STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP
+ {
+ Text [ en-US ] = "Output options";
+ };
+ String _STR_IMPRESS_PRINT_UI_QUALITY
+ {
+ Text [ en-US ] = "Color";
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES
+ {
+ ItemList [ en-US ] =
+ {
+ < "Original colors" ; > ;
+ < "Grayscale" ; > ;
+ < "Black & White" ; > ;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Specify how to treat colors in the printout."; >;
+ < "Specifies that you want to print in original colors." ; > ;
+ < "Specifies that you want to print colors as grayscale." ; > ;
+ < "Specifies that you want to print in black and white." ; > ;
+ };
+ };
+
+ String _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS
+ {
+ Text [ en-US ] = "~Size";
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES
+ {
+ ItemList [ en-US ] =
+ {
+ < "Original size" ; > ;
+ < "Fit to printable page" ; > ;
+ < "Distribute on multiple paper sheets" ; > ;
+ < "Tile paper sheet with repeated slides" ; > ;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW
+ {
+ ItemList [ en-US ] =
+ {
+ < "Original size" ; > ;
+ < "Fit to printable page" ; > ;
+ < "Distribute on multiple paper sheets" ; > ;
+ < "Tile paper sheet with repeated pages" ; > ;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Specify how to scale slides in the printout."; >;
+ < "Specifies that you do not want to further scale pages when printing." ; > ;
+ < "Specifies whether to scale down objects that are beyond the margins of the current printer so they fit on the paper in the printer." ; > ;
+ < "Specifies that pages are to be printed in tiled format. If the pages or slides are smaller than the paper, several pages or slides will be printed on one page of paper." ; > ;
+ };
+ };
+ String _STR_IMPRESS_PRINT_UI_BROCHURE
+ {
+ Text [en-US] = "Brochure";
+ };
+ String _STR_IMPRESS_PRINT_UI_BROCHURE_HELP
+ {
+ Text [en-US] = "Select the \"Brochure\" option to print the document in brochure format.";
+ };
+ String _STR_IMPRESS_PRINT_UI_PAGE_SIDES
+ {
+ Text [ en-US ] = "Page sides";
+ };
+ String _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE
+ {
+ Text [ en-US ] = "Include";
+ };
+ String _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_HELP
+ {
+ Text [ en-US ] = "Select which pages of a brochure to print.";
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST
+ {
+ ItemList [ en-US ] =
+ {
+ < "All pages" ; > ;
+ < "Front sides / right pages" ; > ;
+ < "Back sides / left pages" ; > ;
+ };
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Print all pages of a brochure." ; > ;
+ < "Print only front pages of a brochure." ; > ;
+ < "Print only back pages of a brochure." ; > ;
+ };
+ };
+
+ String _STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP
+ {
+ Text [ en-US ] = "Paper tray";
+ };
+ String _STR_IMPRESS_PRINT_UI_PAPER_TRAY
+ {
+ Text [ en-US ] = "~Use only paper tray from printer preferences";
+ };
+ String _STR_IMPRESS_PRINT_UI_PAPER_TRAY_HELP
+ {
+ Text [ en-US ] = "Determines that the paper tray to be used is the one defined in the printer setup.";
+ };
+ String _STR_IMPRESS_PRINT_UI_PAGE_RANGE
+ {
+ Text [en-US] = "Print range";
+ };
+ StringArray _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE
+ {
+ ItemList [ en-US ] =
+ {
+ < "~All slides"; >;
+ < "~Slides"; >;
+ < "Se~lection"; >;
+ };
+ };
+
+ StringArray _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE_HELP
+ {
+ ItemList [ en-US ] =
+ {
+ < "Print the whole document."; >;
+ < "Print a specified range of the document."; >;
+ < "Print only the currently selected content."; >;
+ };
+ };
+
+ StringArray _STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE
+ {
+ ItemList [ en-US ] =
+ {
+ < "~All pages"; >;
+ < "Pa~ges"; >;
+ < "Se~lection"; >;
+ };
+ };
+};
diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx
deleted file mode 100644
index 6d24fdf98e79..000000000000
--- a/sd/source/ui/view/PrintManager.cxx
+++ /dev/null
@@ -1,1802 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: PrintManager.cxx,v $
- * $Revision: 1.24.8.1 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-
-#include "PrintManager.hxx"
-
-#include <svx/editstat.hxx>
-#include "optsitem.hxx"
-#include "sdattr.hxx"
-#include "sdpage.hxx"
-#include "drawdoc.hxx"
-#include "drawview.hxx"
-#include "ViewShellBase.hxx"
-#include "DrawViewShell.hxx"
-#include "OutlineViewShell.hxx"
-#include "Outliner.hxx"
-#include "Window.hxx"
-#include "FrameView.hxx"
-#include <sfx2/progress.hxx>
-#include <svtools/printdlg.hxx>
-#include <tools/multisel.hxx>
-#include <unotools/misccfg.hxx>
-#include <unotools/localedatawrapper.hxx>
-#include <svx/prtqry.hxx>
-#include "WindowUpdater.hxx"
-#include <sfx2/printer.hxx>
-#include <svx/svdoutl.hxx>
-#include "sdresid.hxx"
-#include <svx/svdetc.hxx>
-#include <svx/svdopage.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/svditer.hxx>
-
-#include "strings.hrc"
-
-#include <svx/svdopath.hxx>
-#include "sdabstdlg.hxx"
-#include "printdlg.hrc"
-#include "prntopts.hrc"
-#include "app.hrc"
-#include <svl/intitem.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/xlnclit.hxx>
-#include "printdialog.hxx"
-
-namespace sd {
-
-/** This simple container reduces the number of arguments that have to be
- passed around and makes it easier to modify the set of arguments.
-*/
-class PrintManager::PrintInfo
-{
-public:
- PrintInfo (
- ViewShell& rViewShell,
- SfxPrinter& rPrinter,
- SfxProgress& rProgress,
- const MultiSelection& rSelPages,
- const String& rTimeDateStr,
- const Font& rTimeDateFont,
- const SdOptionsPrintItem* pPrintOpts,
- USHORT nPageMax,
- USHORT nCopies,
- USHORT nProgressOffset,
- USHORT nTotal)
- : mrViewShell(rViewShell),
- mrPrinter(rPrinter),
- mrProgress(rProgress),
- mrSelPages(rSelPages),
- mrTimeDateStr(rTimeDateStr),
- mrTimeDateFont(rTimeDateFont),
- mpPrintOpts(pPrintOpts),
- mnPageMax(nPageMax),
- mnCopies(nCopies),
- mnProgressOffset(nProgressOffset),
- mnTotal(nTotal)
- {}
-
- ViewShell& mrViewShell;
- SfxPrinter& mrPrinter;
- SfxProgress& mrProgress;
- const MultiSelection& mrSelPages;
- const String& mrTimeDateStr;
- const Font& mrTimeDateFont;
- const SdOptionsPrintItem* mpPrintOpts;
- USHORT mnPageMax;
- USHORT mnCopies;
- USHORT mnProgressOffset;
- USHORT mnTotal;
-};
-
-
-PrintManager::PrintManager (ViewShellBase& rBase)
- : mrBase (rBase)
-{
-}
-
-
-
-
-PrintManager::~PrintManager (void)
-{
-}
-
-
-
-
-SfxPrinter* PrintManager::GetPrinter (BOOL bCreate)
-{
- return mrBase.GetDocShell()->GetPrinter (bCreate);
-}
-
-
-
-
-USHORT PrintManager::SetPrinter (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags,bool bIsAPI)
-{
- return SetPrinterOptDlg (pNewPrinter,nDiffFlags,!bIsAPI);
-}
-
-
-
-
-USHORT PrintManager::SetPrinterOptDlg (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags,
- BOOL _bShowDialog)
-{
- SfxPrinter* pOld = mrBase.GetDocShell()->GetPrinter( FALSE );
- if ( pOld && pOld->IsPrinting() )
- return SFX_PRINTERROR_BUSY;
-
- mrBase.GetDocShell()->SetPrinter(pNewPrinter);
-
- if ( (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ||
- nDiffFlags & SFX_PRINTER_CHG_SIZE) && pNewPrinter )
- {
- MapMode aMap = pNewPrinter->GetMapMode();
- aMap.SetMapUnit(MAP_100TH_MM);
- MapMode aOldMap = pNewPrinter->GetMapMode();
- pNewPrinter->SetMapMode(aMap);
- Size aNewSize = pNewPrinter->GetOutputSize();
-
- BOOL bScaleAll = FALSE;
- if ( _bShowDialog )
- {
- WarningBox aWarnBox (
- mrBase.GetWindow(),
- (WinBits)(WB_YES_NO | WB_DEF_YES),
- String(SdResId(STR_SCALE_OBJS_TO_PAGE)));
- bScaleAll = (aWarnBox.Execute() == RET_YES);
- }
-
- ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell != NULL && pShell->ISA(DrawViewShell))
- {
- SdPage* pPage = mrBase.GetDocument()->GetSdPage(
- 0, PK_STANDARD );
- pShell->SetPageSizeAndBorder (
- static_cast<DrawViewShell*>(pShell)->GetPageKind(),
- aNewSize,
- -1,-1,-1,-1,
- bScaleAll,
- pNewPrinter->GetOrientation(),
- pPage->GetPaperBin(),
- pPage->IsBackgroundFullSize());
- }
-
- pNewPrinter->SetMapMode(aOldMap);
- }
-
- return 0;
-}
-
-
-
-
-PrintDialog* PrintManager::CreatePrintDialog (::Window *pParent)
-{
- const bool bImpress = mrBase.GetDocument()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
-
- SdPrintDialog* pDlg = SdPrintDialog::Create(pParent,bImpress);
-
- ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell!=NULL && ! pShell->ISA(OutlineViewShell))
- {
-
- if (pShell->ISA(DrawViewShell))
- {
- pDlg->SetRangeText(UniString::CreateFromInt32(
- static_cast<DrawViewShell*>(pShell)->GetCurPageId()));
- }
- /* else if(pShell->ISA(::sd::slidesorter::SlideSorterViewShell))
- {
- String aStrRange(
- dynamic_cast<sd::slidesorter::SlideSorterViewShell*>(pShell)->GetPageRangeString());
- if( aStrRange.Len() )
- {
- pDlg->SetRangeText( aStrRange );
- // According #79749 always check PRINTDIALOG_ALL
- // pDlg->CheckRange( PRINTDIALOG_RANGE );
- }
- }
- */
- }
- else
- {
- String aStrRange(
- static_cast<OutlineViewShell*>(pShell)->GetPageRangeString());
- if( aStrRange.Len() )
- {
- pDlg->SetRangeText( aStrRange );
- // According #79749 always check PRINTDIALOG_ALL
- // pDlg->CheckRange( PRINTDIALOG_RANGE );
- }
- }
- pDlg->EnableRange( PRINTDIALOG_RANGE );
- pDlg->EnableRange( PRINTDIALOG_ALL );
- pDlg->EnableCollate();
-
- if (pShell->ISA(DrawViewShell) && pShell->GetView()->AreObjectsMarked())
- {
- pDlg->EnableRange( PRINTDIALOG_SELECTION );
- // According #79749 always check PRINTDIALOG_ALL
- // pDlg->CheckRange( PRINTDIALOG_SELECTION );
- }
-
- if( bImpress )
- {
- const SdOptionsPrintItem* pPrintOpts = 0;
-
- SfxPrinter* pPrinter = mrBase.GetPrinter(FALSE);
- if( pPrinter )
- {
- const SfxPoolItem* pPoolItem = 0;
- if(pPrinter->GetOptions().GetItemState(ATTR_OPTIONS_PRINT, FALSE, &pPoolItem ) == SFX_ITEM_SET )
- pPrintOpts = dynamic_cast< const SdOptionsPrintItem* >( pPoolItem );
- }
- pDlg->Init( pPrintOpts );
- }
-
- return pDlg;
-}
-
-SfxTabPage* PrintManager::CreatePrintOptionsPage( ::Window *pParent, const SfxItemSet &rOptions)
-{
- SfxTabPage* pPage = 0;
- DocumentType eDocType = mrBase.GetDocument()->GetDocumentType();
- SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- ::CreateTabPage fnCreatePage = pFact ? pFact->GetSdPrintOptionsTabPageCreatorFunc() : 0;
- if( fnCreatePage )
- {
- pPage = (*fnCreatePage)( pParent, rOptions );
- if( eDocType == DOCUMENT_TYPE_DRAW )
- {
- SfxAllItemSet aSet(*(rOptions.GetPool()));
- aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
- pPage->PageCreated(aSet);
- }
- }
- return pPage;
-}
-
-
-
-
-USHORT PrintManager::Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pDlg)
-{
- SfxPrinter* pPrinter = mrBase.GetPrinter(TRUE);
- ViewShell* pShell = mrBase.GetMainViewShell().get();
-
- if (pPrinter!=NULL && pShell!=NULL)
- {
- const PrinterOptions aOldPrinterOptions( pPrinter->GetPrinterOptions() );
- MapMode aMap( pPrinter->GetMapMode() );
- const MapMode aOldMap( aMap );
- USHORT nOldPaperBin = pPrinter->GetPaperBin();
-
- aMap.SetMapUnit(MAP_100TH_MM);
- pPrinter->SetMapMode(aMap);
-
- ::Outliner& rOutliner = mrBase.GetDocument()->GetDrawOutliner();
- ULONG nOldCntrl = rOutliner.GetControlWord();
- ULONG nCntrl = nOldCntrl;
- nCntrl &= ~EE_CNTRL_MARKFIELDS;
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
- rOutliner.SetControlWord( nCntrl );
-
- // old place of FitPageToPrinterWithDialog().
- SdOptionsPrintItem* pPrintOpts = 0;
-
- const SfxPoolItem* pPoolItem = 0;
- if (pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, FALSE, &pPoolItem ) == SFX_ITEM_SET )
- pPrintOpts = dynamic_cast< SdOptionsPrintItem* >( const_cast< SfxPoolItem* >( pPoolItem ) ) ;
-
- if( dynamic_cast<SdPrintDialog*>(pDlg) && static_cast<SdPrintDialog*>(pDlg)->Fill( pPrintOpts ) )
- {
- SfxItemSet aNewOptions( pPrinter->GetOptions() );
- aNewOptions.Put( *pPrintOpts );
- pPrinter->SetOptions( aNewOptions );
- pPrintOpts = dynamic_cast< SdOptionsPrintItem* >( const_cast< SfxPoolItem* >( pPrinter->GetOptions().GetItem( ATTR_OPTIONS_PRINT ) ) );
- }
-
- // Wenn wir im Gliederungsmodus sind, muss das Model auf Stand gebracht werden
- if (pShell->ISA(OutlineViewShell))
- static_cast<OutlineViewShell*>(pShell)->PrepareClose (FALSE, FALSE);
-
- // Basisklasse rufen, um Basic anzusprechen
- mrBase.SfxViewShell::Print( rProgress, bIsAPI, pDlg );
-
- // Setzen des Textes des Druckmonitors
- rProgress.SetText( String( SdResId( STR_STATSTR_PRINT ) ) );
-
- PrintDialogRange eOption;
- MultiSelection aPrintSelection;
- String aTimeDateStr;
- Font aTimeDateFont(FAMILY_SWISS, Size(0, 423));
- PageKind ePageKind = PK_STANDARD;
- USHORT nPage, nPageMax;
- USHORT nTotal, nCopies;
- USHORT nPrintCount = 0;
- USHORT nProgressOffset = 0;
- USHORT nCollateCopies = 1;
- BOOL bPrintMarkedOnly = FALSE;
- BOOL bPrintOutline = FALSE;
- BOOL bPrintHandout = FALSE;
- BOOL bPrintDraw = FALSE;
- BOOL bPrintNotes = FALSE;
- BOOL bHandoutHorizontal = TRUE;
- USHORT nSlidesPerHandout = 6;
-
- Orientation eOldOrientation = pPrinter->GetOrientation();
-
- if( pPrintOpts )
- {
- ::utl::MiscCfg aMisc;
-
- if( pPrintOpts->GetOptionsPrint().IsDate() )
- {
- aTimeDateStr += GetSdrGlobalData().GetLocaleData()->getDate( Date() );
- aTimeDateStr += (sal_Unicode)' ';
- }
-
- if( pPrintOpts->GetOptionsPrint().IsTime() )
- aTimeDateStr += GetSdrGlobalData().GetLocaleData()->getTime( Time(), FALSE, FALSE );
-
- if( pPrintOpts->GetOptionsPrint().IsOutline() )
- bPrintOutline = TRUE;
-
- if( pPrintOpts->GetOptionsPrint().IsHandout() )
- {
- bPrintHandout = TRUE;
- bHandoutHorizontal = pPrintOpts->GetOptionsPrint().IsHandoutHorizontal();
- nSlidesPerHandout = pPrintOpts->GetOptionsPrint().GetHandoutPages();
- }
-
- if( pPrintOpts->GetOptionsPrint().IsDraw() )
- bPrintDraw = TRUE;
-
- if( pPrintOpts->GetOptionsPrint().IsNotes() )
- {
- bPrintNotes = TRUE;
- ePageKind = PK_NOTES;
- }
-
- pPrintOpts->GetOptionsPrint().SetWarningPrinter( aMisc.IsNotFoundWarning() );
- pPrintOpts->GetOptionsPrint().SetWarningSize( aMisc.IsPaperSizeWarning() );
- pPrintOpts->GetOptionsPrint().SetWarningOrientation( aMisc.IsPaperOrientationWarning() );
-
- UINT16 nQuality = pPrintOpts->GetOptionsPrint().GetOutputQuality();
- ULONG nMode = DRAWMODE_DEFAULT;
-
- if( nQuality == 1 )
- nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT;
- else if( nQuality == 2 )
- nMode = DRAWMODE_BLACKLINE | DRAWMODE_BLACKTEXT | DRAWMODE_WHITEFILL | DRAWMODE_GRAYBITMAP | DRAWMODE_WHITEGRADIENT;
-
- pPrinter->SetDrawMode( nMode );
- }
- else
- bPrintDraw = TRUE;
-
- if( pDlg )
- {
- eOption = pDlg->GetCheckedRange();
-
- if( eOption == PRINTDIALOG_SELECTION )
- bPrintMarkedOnly = TRUE;
- }
- else
- // Bei PrintDirect wird gesamtes Dokument gedruckt
- eOption = PRINTDIALOG_ALL;
-
- // #72527 If we are in PrintDirect and any objects
- // are selected, then a dialog (see ViewShell::DoPrint)
- // ask whether the total document should be printed
- // or only the selected objects. If only the selected
- // object, then the flag bPrintDirectSelected is TRUE
- if (mbPrintDirectSelected)
- {
- eOption = PRINTDIALOG_SELECTION;
- bPrintMarkedOnly = TRUE;
- }
-
- nPageMax = mrBase.GetDocument()->GetSdPageCount( ePageKind );
- aPrintSelection.SetTotalRange( Range( 1, nPageMax ) );
-
- switch( eOption )
- {
- case PRINTDIALOG_ALL:
- aPrintSelection.Select(Range(1, nPageMax));
- break;
-
- case PRINTDIALOG_RANGE:
- aPrintSelection = MultiSelection(pDlg->GetRangeText());
- break;
-
- default:
- {
- if (pShell->ISA(DrawViewShell))
- aPrintSelection.Select (
- static_cast<DrawViewShell*>(pShell)->GetCurPageId());
- else
- {
- if( msPageRange.Len() )
- aPrintSelection = MultiSelection( msPageRange );
- else
- aPrintSelection.Select(Range(1, nPageMax));
- }
- }
- break;
- }
-
- nPage = Min(nPageMax, (USHORT) aPrintSelection.FirstSelected());
-
- if ( nPage > 0 )
- nPage--;
-
- nPageMax = Min(nPageMax, (USHORT) aPrintSelection.LastSelected());
-
- if( bPrintOutline )
- nPrintCount++;
-
- if( bPrintHandout )
- nPrintCount++;
-
- if( bPrintDraw )
- nPrintCount++;
-
- if( bPrintNotes )
- nPrintCount++;
-
- nCopies = (pDlg ? pDlg->GetCopyCount() : 1);
-
- USHORT nSelectCount = (USHORT) aPrintSelection.GetSelectCount();
- nTotal = nSelectCount * nCopies * nPrintCount;
-
- if( pDlg && pDlg->IsCollateEnabled() && pDlg->IsCollateChecked() )
- nCollateCopies = nCopies;
-
- // check if selected range of pages contains transparent objects
- BOOL bContainsTransparency = FALSE;
- BOOL bPrintExcluded = TRUE;
-
- if( bPrintNotes || bPrintDraw || bPrintHandout )
- {
- if( pPrintOpts )
- bPrintExcluded = pPrintOpts->GetOptionsPrint().IsHiddenPages();
-
- for( USHORT j = nPage; ( j < nPageMax && !bContainsTransparency ); j++ )
- {
- if( aPrintSelection.IsSelected( j + 1 ) )
- {
- SdPage* pPage = mrBase.GetDocument()->GetSdPage(
- j, PK_STANDARD );
-
- if( pPage && ( !pPage->IsExcluded() || bPrintExcluded ) )
- {
- bContainsTransparency = (BOOL)pPage->HasTransparentObjects();
- if( !bContainsTransparency )
- {
- if(pPage->TRG_HasMasterPage())
- {
- bContainsTransparency = (BOOL)pPage->TRG_GetMasterPage().HasTransparentObjects();
- }
- }
- }
- }
- }
- }
-
- if (pPrinter->InitJob (mrBase.GetWindow(), !bIsAPI && bContainsTransparency))
- {
- PrintInfo aInfo(
- *pShell,
- *pPrinter,
- rProgress,
- aPrintSelection,
- aTimeDateStr,
- aTimeDateFont,
- pPrintOpts,
- nPageMax,
- nCollateCopies > 1 ? 1 : nCopies,
- nProgressOffset,
- nTotal);
-
- if( bPrintHandout )
- InitHandoutTemplate( aInfo, nSlidesPerHandout, bHandoutHorizontal );
-
- for( USHORT n = 1; n <= nCollateCopies; n++ )
- {
- if ( bPrintOutline )
- {
- // siehe unten in PrintOutline()
- pPrinter->SetPaperBin( nOldPaperBin );
-
- PrintOutline(aInfo, nPage);
- aInfo.mnProgressOffset += (nSelectCount * ( nCollateCopies > 1 ? 1 : nCopies));
- }
-
- if ( bPrintHandout )
- {
- PrintHandout(aInfo, nPage );
- aInfo.mnProgressOffset += (nSelectCount * ( nCollateCopies > 1 ? 1 : nCopies));
- }
- if( bPrintDraw )
- {
- PrintStdOrNotes(aInfo, nPage, PK_STANDARD, bPrintMarkedOnly);
- aInfo.mnProgressOffset += (nSelectCount * ( nCollateCopies > 1 ? 1 : nCopies));
- }
- if( bPrintNotes )
- {
- PrintStdOrNotes(aInfo, nPage, PK_NOTES, FALSE);
- aInfo.mnProgressOffset += (nSelectCount * ( nCollateCopies > 1 ? 1 : nCopies));
- }
-
- // When in duplex mode then add an empty page after printing
- // an odd number of pages. This is to avoid the first page
- // of the next run being printed on the backside of the
- // current page.
- if (nCollateCopies > 1
- && n<nCollateCopies
- && (pPrinter->GetCurPage()%2)==0
- && (pPrinter->GetDuplexMode()==DUPLEX_ON))
- {
- pPrinter->StartPage();
- pPrinter->EndPage();
- }
- }
- }
-
- pPrinter->SetOrientation( eOldOrientation );
- pPrinter->SetPrinterOptions( aOldPrinterOptions );
- pPrinter->SetMapMode( aOldMap );
-
- rOutliner.SetControlWord(nOldCntrl);
-
- // Druckerschach wieder zuruecksetzen
- pPrinter->SetPaperBin( nOldPaperBin );
- }
-
- return 0;
-
-}
-
-
-
-
-ErrCode PrintManager::DoPrint (
- SfxPrinter* pPrinter,
- PrintDialog* pPrintDialog,
- BOOL bSilent, BOOL bIsAPI )
-{
- ErrCode nResult = ERRCODE_NONE;
-
- do
- {
- ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell == NULL)
- break;
-
- if ( ! FitPageToPrinterWithDialog(pPrinter, bSilent))
- break;
-
- const SdrMarkList& rMarkList = pShell->GetView()->GetMarkedObjectList();
-
- // Retrieve the range of marked pages.
- String sNewPageRange (msPageRange);
-
- RestrictPrintingToSelection (FALSE);
-
- // #105477# Don't show query dialog if print dialog has been shown
- if ( !pPrintDialog
- && !bSilent && !bIsAPI
- && (rMarkList.GetMarkCount() || sNewPageRange.Len()) )
- {
- SvxPrtQryBox aQuery (mrBase.GetWindow());
-
- switch (aQuery.Execute())
- {
- case RET_CANCEL:
- nResult = ERRCODE_IO_ABORT;
- break;
-
- case RET_OK:
- RestrictPrintingToSelection (TRUE);
- SetPrintingPageRange (sNewPageRange);
- break;
- }
- }
-
- if (nResult == ERRCODE_NONE)
- {
- // Tell the printer which digit language to use.
- WindowUpdater* pWindowUpdater = pShell->GetWindowUpdater();
- if (pWindowUpdater != NULL)
- pWindowUpdater->Update (pPrinter, mrBase.GetDocument());
-
- // Forward the call to SfxViewShell::DoPrint() which
- // eventually calls Print() (after StartJob etc.)
- nResult = mrBase.SfxViewShell::DoPrint (
- pPrinter, pPrintDialog, bSilent, bIsAPI );
-
- RestrictPrintingToSelection (FALSE);
- }
- }
- while(false);
-
- return nResult;
-}
-
-
-
-
-void PrintManager::PreparePrint (PrintDialog* )
-{
- SfxPrinter* pPrinter = GetPrinter(TRUE);
-
- if (!pPrinter)
- return;
-
- const SfxItemSet& rOptions = pPrinter->GetOptions();
- SdOptionsPrintItem* pPrintOpts = NULL;
-
- if (rOptions.GetItemState( ATTR_OPTIONS_PRINT, FALSE,
- (const SfxPoolItem**) &pPrintOpts) != SFX_ITEM_SET)
- {
- pPrintOpts = NULL;
- }
-
- // Einstellungen der ersten zu druckenden Seite setzen
-
- if (pPrintOpts)
- {
- if ( pPrintOpts->GetOptionsPrint().IsHandout() )
- {
- // Handzettel
- SdPage* pPage = mrBase.GetDocument()->GetSdPage(0, PK_HANDOUT);
-
- // Papierschacht
- if (!pPrintOpts->GetOptionsPrint().IsPaperbin()) // Drucken NICHT aus Druckereinstellung
- {
- pPrinter->SetPaperBin(pPage->GetPaperBin());
- }
-
- pPrinter->SetOrientation(pPage->TRG_GetMasterPage().GetOrientation());
- }
- else if ( pPrintOpts->GetOptionsPrint().IsDraw() || pPrintOpts->GetOptionsPrint().IsNotes() )
- {
- // Standard- oder Notizseiten
- if( !pPrintOpts->GetOptionsPrint().IsPaperbin() ) // Drucken NICHT aus Druckereinstellung
- {
- PageKind ePageKind = PK_NOTES;
-
- if (pPrintOpts->GetOptionsPrint().IsDraw())
- {
- ePageKind = PK_STANDARD;
- }
-
- SdPage* pPage = mrBase.GetDocument()->GetSdPage(0, ePageKind);
- pPrinter->SetPaperBin(pPage->GetPaperBin());
-
- Orientation eOrientation = ORIENTATION_PORTRAIT;
-
- if ( !pPrintOpts->GetOptionsPrint().IsBooklet() )
- {
- eOrientation = pPage->GetOrientation();
- }
- else
- {
- Size aPageSize(pPage->GetSize());
-
- if( aPageSize.Width() < aPageSize.Height() )
- eOrientation = ORIENTATION_LANDSCAPE;
- }
-
- pPrinter->SetOrientation(eOrientation);
- }
- }
- }
-}
-
-
-
-
-void PrintManager::RestrictPrintingToSelection (bool bFlag)
-{
- mbPrintDirectSelected = bFlag ? TRUE : FALSE;
-}
-
-
-
-
-void PrintManager::SetPrintingPageRange (const String& rsPageRange)
-{
- msPageRange = rsPageRange;
-}
-
-
-
-
-bool PrintManager::FitPageToPrinterWithDialog (
- SfxPrinter* pPrinter,
- bool bSilent)
-{
- bool bContinuePrinting = true;
-
- if (pPrinter != NULL)
- {
- // Remember old printer values so that they can be restored when
- // printing is aborted by the user.
- const PrinterOptions aOldPrinterOptions (pPrinter->GetPrinterOptions());
- const MapMode aOldMap (pPrinter->GetMapMode());
-
- // Get values from the priner in order to decide whether to show a
- // dialog.
- const SfxItemSet& rOptions = pPrinter->GetOptions();
- SdOptionsPrintItem* pPrintOpts = NULL;
- BOOL bScalePage = TRUE;
- BOOL bTilePage = FALSE;
- BOOL bPrintBooklet = FALSE;
-
- if( rOptions.GetItemState( ATTR_OPTIONS_PRINT, FALSE, (const SfxPoolItem**) &pPrintOpts ) == SFX_ITEM_SET )
- {
- bScalePage = pPrintOpts->GetOptionsPrint().IsPagesize();
- bPrintBooklet = pPrintOpts->GetOptionsPrint().IsBooklet();
- pPrintOpts->GetOptionsPrint().SetCutPage( FALSE );
- }
- else
- pPrintOpts = NULL;
-
- SdPage* pPage = mrBase.GetDocument()->GetSdPage( 0, PK_STANDARD );
- Size aPageSize( pPage->GetSize() );
- Size aPrintSize( pPrinter->GetOutputSize() );
- long nPageWidth = aPageSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder();
- long nPageHeight = aPageSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder();
- long nPrintWidth = aPrintSize.Width();
- long nPrintHeight = aPrintSize.Height();
- USHORT nRet = RET_OK;
-
- // When necessary then show a dialog that asks the user how to fit
- // the pages to be printed to the (smaller) printer pages.
- if ( !bScalePage
- && !bTilePage
- && !bPrintBooklet
- && ( ( nPageWidth > nPrintWidth || nPageHeight > nPrintHeight )
- && ( nPageWidth > nPrintHeight || nPageHeight > nPrintWidth )
- )
- )
- {
- if (IsScreenFormat())
- {
- // For the screen format the page content is always scaled
- // to the printable area of the printer pages.
- pPrintOpts->GetOptionsPrint().SetPagesize();
- }
- else
- {
-
- SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- AbstractSdPrintDlg* pDlg = pFact ? pFact->CreateSdPrintDlg(mrBase.GetWindow() ) : 0;
- // Do not show the dialog when the bSilent flag is set. We
- // do create the dialog anyway so that we can extract the
- // default method of mapping internal pages to printer pages
- // from it.
- if( ! bSilent && pDlg )
- nRet = pDlg->Execute();
- if( nRet == RET_OK )
- {
- switch (pDlg->GetAttr())
- {
- case 1:
- pPrintOpts->GetOptionsPrint().SetPagesize();
- break;
-
- case 2:
- // Tiling is the default behaviour in
- // ViewShell::PrintStdOrNotes(). The poperty of
- // pPrintOpts is ignored there so setting it
- // here may only lead to unwanted side effects.
- break;
-
- case 3:
- pPrintOpts->GetOptionsPrint().SetCutPage();
- break;
- }
- bContinuePrinting = true;
- }
- delete pDlg;
- }
- }
-
- // The user has pressed the 'Cancel' button. Restore the old values and
- // return a flag to tell the caller to abort printing.
- if( nRet == RET_CANCEL )
- {
- pPrinter->SetPrinterOptions( aOldPrinterOptions );
- pPrinter->SetMapMode( aOldMap );
- bContinuePrinting = false;
- }
- }
-
- return bContinuePrinting;
-}
-
-
-
-
-void PrintManager::PrintOutline (
- PrintInfo& rInfo,
- USHORT nPage)
-{
- // Papierschacht
- // Seiteneinstellungen koennen nicht fuer die Gliederung gemacht werden
- // (also auch nicht der Druckerschacht), deswegen wird der Druckerschacht
- // von der Seite PK_STANDARD genommen.
- /*
- if( pPrintOpts && !pPrintOpts->GetOptionsPrint().IsPaperbin() ) // Drucken NICHT aus Druckereinstellung
- {
- USHORT nPaperBin = GetDoc()->GetSdPage(nPage, PK_STANDARD)->GetPaperBin();
- rPrinter.SetPaperBin( nPaperBin );
- } */
- // Es wird jetzt (vorlaeufig ?) der Druckerschacht vom Drucker genommen
-
- const MapMode aOldMap( rInfo.mrPrinter.GetMapMode() );
- MapMode aMap( aOldMap );
- const Orientation eOldOrient = rInfo.mrPrinter.GetOrientation();
- Point aPageOfs( rInfo.mrPrinter.GetPageOffset() );
- Fraction aScale(1, 2);
- BOOL bPrintExcluded = TRUE;
-
- aMap.SetOrigin(Point() - aPageOfs);
- aMap.SetScaleX(aScale);
- aMap.SetScaleY(aScale);
- rInfo.mrPrinter.SetMapMode(aMap);
- rInfo.mrPrinter.SetOrientation(ORIENTATION_PORTRAIT);
-
- if ( rInfo.mpPrintOpts )
- bPrintExcluded = rInfo.mpPrintOpts->GetOptionsPrint().IsHiddenPages();
-
- Rectangle aOutRect(aPageOfs, rInfo.mrPrinter.GetOutputSize());
-
- Link aOldLink;
- Outliner* pOutliner = rInfo.mrViewShell.GetDoc()->GetInternalOutliner();
- pOutliner->Init( OUTLINERMODE_OUTLINEVIEW );
- USHORT nOutlMode = pOutliner->GetMode();
- BOOL bOldUpdateMode = pOutliner->GetUpdateMode();
-
- Size aPaperSize = pOutliner->GetPaperSize();
- pOutliner->SetPaperSize(aOutRect.GetSize());
- pOutliner->SetUpdateMode(TRUE);
-
- long nPageH = aOutRect.GetHeight();
-
- USHORT nPageCount = rInfo.mnProgressOffset;
-
- while ( nPage < rInfo.mnPageMax )
- {
- Paragraph* pPara = NULL;
- long nH = 0;
-
- pOutliner->Clear();
- pOutliner->SetFirstPageNumber(nPage+1);
-
- while ( nH < nPageH && nPage < rInfo.mnPageMax )
- {
- if ( rInfo.mrSelPages.IsSelected(nPage+1) )
- {
- //rProgress.SetState( nPageCount, nTotal );
- //rProgress.SetStateText( nPageCount, nPage+1, nTotal );
-
- String aTmp = UniString::CreateFromInt32( nPage+1 );
- aTmp += String( SdResId( STR_PRINT_OUTLINE ) );
- rInfo.mrProgress.SetStateText(nPageCount, aTmp, rInfo.mnTotal );
-
- nPageCount = nPageCount + rInfo.mnCopies;
-
- SdPage* pPage = (SdPage*)rInfo.mrViewShell.GetDoc()->GetSdPage(nPage, PK_STANDARD);
- SdrTextObj* pTextObj = NULL;
- ULONG nObj = 0;
-
- if ( !pPage->IsExcluded() || bPrintExcluded )
- {
- while ( !pTextObj && nObj < pPage->GetObjCount() )
- {
- SdrObject* pObj = pPage->GetObj(nObj++);
- if ( pObj->GetObjInventor() == SdrInventor &&
- pObj->GetObjIdentifier() == OBJ_TITLETEXT )
- pTextObj = (SdrTextObj*) pObj;
- }
-
- pPara = pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 );
-
- if ( pTextObj && !pTextObj->IsEmptyPresObj() &&
- pTextObj->GetOutlinerParaObject() )
- pOutliner->AddText( *(pTextObj->GetOutlinerParaObject()) );
- else
- pOutliner->Insert(String());
-
- pTextObj = NULL;
- nObj = 0;
-
- while ( !pTextObj && nObj < pPage->GetObjCount() )
- {
- SdrObject* pObj = pPage->GetObj(nObj++);
- if ( pObj->GetObjInventor() == SdrInventor &&
- pObj->GetObjIdentifier() == OBJ_OUTLINETEXT )
- pTextObj = (SdrTextObj*) pObj;
- }
-
- BOOL bSubTitle = FALSE;
- if (!pTextObj)
- {
- bSubTitle = TRUE;
- pTextObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_TEXT); // Untertitel vorhanden?
- }
-
- ULONG nParaCount1 = pOutliner->GetParagraphCount();
-
- if ( pTextObj && !pTextObj->IsEmptyPresObj() &&
- pTextObj->GetOutlinerParaObject() )
- pOutliner->AddText( *(pTextObj->GetOutlinerParaObject()) );
-
- if ( bSubTitle )
- {
- ULONG nParaCount2 = pOutliner->GetParagraphCount();
- for (ULONG nPara = nParaCount1; nPara < nParaCount2; nPara++)
- {
- Paragraph* pP = pOutliner->GetParagraph(nPara);
- if(pP && pOutliner->GetDepth( (USHORT) nPara ) > 0 )
- pOutliner->SetDepth(pP, 0);
- }
- }
-
- nH = pOutliner->GetTextHeight();
- }
- }
- nPage++;
- }
-
- if ( nH > nPageH && pPara )
- {
- ULONG nCnt = pOutliner->GetAbsPos( pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 ) );
- ULONG nParaPos = pOutliner->GetAbsPos( pPara );
- nCnt -= nParaPos;
- pPara = pOutliner->GetParagraph( ++nParaPos );
- if ( nCnt && pPara )
- {
- pOutliner->Remove(pPara, nCnt);
- nPage--;
- }
- }
-
- rInfo.mrPrinter.StartPage();
- pOutliner->Draw(&rInfo.mrPrinter, aOutRect);
-
- if ( rInfo.mrTimeDateStr.Len() )
- {
- Font aOldFont = rInfo.mrPrinter.OutputDevice::GetFont();
- rInfo.mrPrinter.SetFont(rInfo.mrTimeDateFont);
- rInfo.mrPrinter.DrawText(aPageOfs, rInfo.mrTimeDateStr);
- rInfo.mrPrinter.SetFont(aOldFont);
- }
- rInfo.mrPrinter.EndPage();
- }
- pOutliner->SetUpdateMode(bOldUpdateMode);
- pOutliner->SetPaperSize(aPaperSize);
- pOutliner->Init( nOutlMode );
-
- rInfo.mrPrinter.SetOrientation(eOldOrient);
- rInfo.mrPrinter.SetMapMode( aOldMap );
-}
-
-
-
-
-void PrintManager::PrintHandout( PrintInfo& rInfo, USHORT nPage )
-{
- SdPage* pPage = rInfo.mrViewShell.GetDoc()->GetSdPage(0, PK_HANDOUT);
- SdPage& rMaster = (SdPage&)pPage->TRG_GetMasterPage();
- SdDrawDocument* pDocument = rInfo.mrViewShell.GetDoc();
-
- BOOL bScalePage = TRUE;
- if ( rInfo.mpPrintOpts )
- {
- bScalePage = rInfo.mpPrintOpts->GetOptionsPrint().IsPagesize();
- }
-
- // Papierschacht
- if( rInfo.mpPrintOpts && !rInfo.mpPrintOpts->GetOptionsPrint().IsPaperbin() ) // Drucken NICHT aus Druckereinstellung
- {
- USHORT nPaperBin = pPage->GetPaperBin();
- rInfo.mrPrinter.SetPaperBin( nPaperBin );
- }
-
- // Hoch/Querformat aendern?
- Orientation eOrientation = rMaster.GetOrientation();
-
- short nDlgResult = RET_OK;
-
- if ( !rInfo.mrPrinter.SetOrientation(eOrientation) &&
- (!rInfo.mpPrintOpts || rInfo.mpPrintOpts->GetOptionsPrint().IsWarningOrientation()) )
- {
- // eine Warnung anzeigen
- WarningBox aWarnBox(rInfo.mrViewShell.GetActiveWindow(),(WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL),
- String(SdResId(STR_WARN_PRINTFORMAT_FAILURE)));
- nDlgResult = aWarnBox.Execute();
- }
-
- if ( nDlgResult == RET_OK )
- {
- const MapMode aOldMap( rInfo.mrPrinter.GetMapMode() );
- MapMode aMap( aOldMap );
- Point aPageOfs( rInfo.mrPrinter.GetPageOffset() );
- DrawView* pPrintView;
- BOOL bPrintExcluded = TRUE;
-
- aMap.SetOrigin(Point() - aPageOfs);
-
- if ( bScalePage )
- {
- Size aPageSize(pPage->GetSize());
- Size aPrintSize( rInfo.mrPrinter.GetOutputSize() );
-
- double fHorz = (double) aPrintSize.Width() / aPageSize.Width();
- double fVert = (double) aPrintSize.Height() / aPageSize.Height();
-
- Fraction aFract;
- if ( fHorz < fVert )
- aFract = Fraction(aPrintSize.Width(), aPageSize.Width());
- else
- aFract = Fraction(aPrintSize.Height(), aPageSize.Height());
-
- aMap.SetScaleX(aFract);
- aMap.SetScaleY(aFract);
- aMap.SetOrigin(Point());
- }
-
- rInfo.mrPrinter.SetMapMode(aMap);
-
- if (rInfo.mrViewShell.ISA(DrawViewShell))
- pPrintView = new DrawView (rInfo.mrViewShell.GetDocSh(), &rInfo.mrPrinter,
- static_cast<DrawViewShell*>(&rInfo.mrViewShell));
- else
- pPrintView = new DrawView (rInfo.mrViewShell.GetDocSh(), &rInfo.mrPrinter, NULL);
-
- USHORT nPageCount = rInfo.mnProgressOffset;
-
- rInfo.mrViewShell.WriteFrameViewData();
-
- rInfo.mrViewShell.SetPrintedHandoutPageNum(0);
-
- if ( rInfo.mpPrintOpts )
- bPrintExcluded = rInfo.mpPrintOpts->GetOptionsPrint().IsHiddenPages();
-
- std::vector< SdPage* > aPagesVector;
- while ( nPage < rInfo.mnPageMax )
- {
- nPage++;
- if( rInfo.mrSelPages.IsSelected(nPage) )
- {
- SdPage* pTemp = pDocument->GetSdPage(nPage-1, PK_STANDARD);
- if( !pTemp->IsExcluded() || bPrintExcluded )
- aPagesVector.push_back( pTemp );
- }
- }
-
- std::vector< SdrPageObj* > aPageObjVector;
- SdrObjListIter aShapeIter( *pPage );
- while( aShapeIter.IsMore() )
- {
- SdrPageObj* pPageObj = dynamic_cast< SdrPageObj* >(aShapeIter.Next());
- if( pPageObj )
- aPageObjVector.push_back( pPageObj );
- }
-
- if( aPageObjVector.empty() )
- return;
-
- rInfo.mrViewShell.SetPrintedHandoutPageCount( (USHORT)((aPagesVector.size() + aPageObjVector.size() - 1) / aPageObjVector.size()) );
-
-/*
- sal_Int32 nHandoutPageCount = aPagesVector.size() / aPageObjVector.size();
- sal_Int32 nHandoutPage = 0;
-*/
- std::vector< SdPage* >::iterator aPageIter( aPagesVector.begin() );
- while( aPageIter != aPagesVector.end() )
- {
- std::vector< SdrPageObj* >::iterator aPageObjIter( aPageObjVector.begin() );
-
- while( (aPageObjIter != aPageObjVector.end()) && (aPageIter != aPagesVector.end()) )
- {
- SdrPageObj* pPageObj = (*aPageObjIter++);
- pPageObj->SetReferencedPage( (*aPageIter++) );
- }
-
- // if there are more page objects than pages left, set the rest to invisible
- int nHangoverCount = 0;
- while(aPageObjIter != aPageObjVector.end())
- {
- (*aPageObjIter++)->SetReferencedPage(0L);
- nHangoverCount++;
- }
-
- if( nHangoverCount )
- {
- int nSkip = aPageObjVector.size() - nHangoverCount;
- aShapeIter.Reset();
- while( aShapeIter.IsMore() )
- {
- SdrPathObj* pPathObj = dynamic_cast< SdrPathObj* >( aShapeIter.Next() );
- if( pPathObj )
- {
- if( nSkip )
- {
- nSkip--;
- }
- else
- {
- pPathObj->SetMergedItem( XLineStyleItem(XLINE_NONE) );
- }
- }
- }
- }
-
- // todo progress
- String aTmp = UniString::CreateFromInt32( nPage );
- aTmp += String( SdResId( STR_PRINT_HANDOUT ) );
- rInfo.mrProgress.SetStateText( nPageCount, aTmp, rInfo.mnTotal );
-
- rInfo.mrViewShell.SetPrintedHandoutPageNum(rInfo.mrViewShell.GetPrintedHandoutPageNum() + 1);
-
- rInfo.mrPrinter.StartPage();
- pPrintView->ShowSdrPage(pPage); // , Point());
-
- SdrPageView* pPageView = pPrintView->GetSdrPageView(); // pPage);
- pPageView->SetVisibleLayers(rInfo.mrViewShell.GetFrameView()->GetVisibleLayers() );
- pPageView->SetPrintableLayers(rInfo.mrViewShell.GetFrameView()->GetPrintableLayers() );
-
- pPrintView->CompleteRedraw(&rInfo.mrPrinter, Rectangle(Point(0,0), pPage->GetSize()));
-
- if ( rInfo.mrTimeDateStr.Len() )
- {
- Font aOldFont = rInfo.mrPrinter.OutputDevice::GetFont();
- rInfo.mrPrinter.SetFont(rInfo.mrTimeDateFont);
- rInfo.mrPrinter.DrawText(aPageOfs, rInfo.mrTimeDateStr);
- rInfo.mrPrinter.SetFont(aOldFont);
- }
- rInfo.mrPrinter.EndPage();
- pPrintView->HideSdrPage(); // pPrintView->GetPageView(pPage));
-
- if( nHangoverCount )
- {
- aShapeIter.Reset();
- while( aShapeIter.IsMore() )
- {
- SdrPathObj* pPathObj = dynamic_cast< SdrPathObj* >( aShapeIter.Next() );
- if( pPathObj )
- pPathObj->SetMergedItem( XLineStyleItem(XLINE_SOLID) );
- }
- }
-
- }
-
- rInfo.mrViewShell.SetPrintedHandoutPageNum(1);
- rInfo.mrViewShell.SetPrintedHandoutPageCount(0);
- delete pPrintView;
- rInfo.mrPrinter.SetMapMode(aOldMap);
- }
-}
-
-
-
-
-void PrintManager::PrintStdOrNotes (
- PrintInfo& rInfo,
- USHORT nPage,
- PageKind ePageKind,
- BOOL bPrintMarkedOnly)
-{
- Fraction aFract;
- BOOL bScalePage = TRUE;
- BOOL bTilePage = FALSE;
- BOOL bPrintExcluded = TRUE;
- BOOL bPrintPageName = TRUE;
- BOOL bPrintBooklet = FALSE;
- BOOL bPrintFrontPage = FALSE;
- BOOL bPrintBackPage = FALSE;
- SdDrawDocument* pDocument = rInfo.mrViewShell.GetDoc();
-
- SdPage* pRefPage = pDocument->GetSdPage(nPage, ePageKind);
-
- if ( rInfo.mpPrintOpts )
- {
- bScalePage = rInfo.mpPrintOpts->GetOptionsPrint().IsPagesize();
- bTilePage = rInfo.mpPrintOpts->GetOptionsPrint().IsPagetile();
- bPrintPageName = rInfo.mpPrintOpts->GetOptionsPrint().IsPagename();
- bPrintExcluded = rInfo.mpPrintOpts->GetOptionsPrint().IsHiddenPages();
- bPrintBooklet = rInfo.mpPrintOpts->GetOptionsPrint().IsBooklet();
- bPrintFrontPage = rInfo.mpPrintOpts->GetOptionsPrint().IsFrontPage();
- bPrintBackPage = rInfo.mpPrintOpts->GetOptionsPrint().IsBackPage();
-
- // Papierschacht
- if( !rInfo.mpPrintOpts->GetOptionsPrint().IsPaperbin() ) // Drucken NICHT aus Druckereinstellung
- {
- USHORT nPaperBin = pDocument->GetSdPage(nPage, ePageKind)->GetPaperBin();
- rInfo.mrPrinter.SetPaperBin( nPaperBin );
- }
-
- }
-
- // Hoch/Querformat aendern?
- Size aPageSize(pRefPage->GetSize());
- Orientation eOrientation = ORIENTATION_PORTRAIT;
-
- short nDlgResult = RET_OK;
-
- if( !bPrintBooklet )
- {
- eOrientation = pRefPage->GetOrientation();
- }
- else if( aPageSize.Width() < aPageSize.Height() )
- eOrientation = ORIENTATION_LANDSCAPE;
-
- if ( !rInfo.mrPrinter.SetOrientation(eOrientation) &&
- (!rInfo.mpPrintOpts || rInfo.mpPrintOpts->GetOptionsPrint().IsWarningOrientation()) )
- {
- // eine Warnung anzeigen
- WarningBox aWarnBox(
- rInfo.mrViewShell.GetActiveWindow(),
- (WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL),
- String(SdResId(STR_WARN_PRINTFORMAT_FAILURE)));
- nDlgResult = aWarnBox.Execute();
- }
-
- if ( nDlgResult == RET_OK )
- {
- const MapMode aOldMap( rInfo.mrPrinter.GetMapMode() );
- MapMode aMap( aOldMap );
- Point aPageOfs( rInfo.mrPrinter.GetPageOffset() );
- DrawView* pPrintView;
-
- aMap.SetOrigin(Point() - aPageOfs);
- rInfo.mrPrinter.SetMapMode(aMap);
- Size aPrintSize( rInfo.mrPrinter.GetOutputSize() );
-
- if (rInfo.mrViewShell.ISA(DrawViewShell))
- pPrintView = new DrawView (rInfo.mrViewShell.GetDocSh(), &rInfo.mrPrinter,
- static_cast<DrawViewShell*>(&rInfo.mrViewShell));
- else
- pPrintView = new DrawView (rInfo.mrViewShell.GetDocSh(), &rInfo.mrPrinter, NULL);
-
- USHORT nPageCount = rInfo.mnProgressOffset;
-
- // Als Broschuere drucken ?
- if( bPrintBooklet )
- {
- MapMode aStdMap( rInfo.mrPrinter.GetMapMode() );
- ::std::vector< USHORT > aPageVector;
- ::std::vector< ::std::pair< USHORT, USHORT > > aPairVector;
- Point aOffset;
- Size aPrintSize_2( aPrintSize );
- Size aPageSize_2( aPageSize );
-
- if( eOrientation == ORIENTATION_LANDSCAPE )
- aPrintSize_2.Width() >>= 1;
- else
- aPrintSize_2.Height() >>= 1;
-
- const double fPageWH = (double) aPageSize_2.Width() / aPageSize_2.Height();
- const double fPrintWH = (double) aPrintSize_2.Width() / aPrintSize_2.Height();
-
- if( fPageWH < fPrintWH )
- {
- aPageSize_2.Width() = (long) ( aPrintSize_2.Height() * fPageWH );
- aPageSize_2.Height()= aPrintSize_2.Height();
- }
- else
- {
- aPageSize_2.Width() = aPrintSize_2.Width();
- aPageSize_2.Height() = (long) ( aPrintSize_2.Width() / fPageWH );
- }
-
- aMap.SetScaleX( Fraction( aPageSize_2.Width(), aPageSize.Width() ) );
- aMap.SetScaleY( Fraction( aPageSize_2.Height(), aPageSize.Height() ) );
-
- // calculate adjusted print size
- aPrintSize = OutputDevice::LogicToLogic( aPrintSize, aStdMap, aMap );
-
- if( eOrientation == ORIENTATION_LANDSCAPE )
- {
- aOffset.X() = ( ( aPrintSize.Width() >> 1 ) - aPageSize.Width() ) >> 1;
- aOffset.Y() = ( aPrintSize.Height() - aPageSize.Height() ) >> 1;
- }
- else
- {
- aOffset.X() = ( aPrintSize.Width() - aPageSize.Width() ) >> 1;
- aOffset.Y() = ( ( aPrintSize.Height() >> 1 ) - aPageSize.Height() ) >> 1;
- }
-
- // create vector of pages to print
- while( nPage < rInfo.mnPageMax )
- {
- if( rInfo.mrSelPages.IsSelected( nPage + 1 ) )
- {
- SdPage* pP = pDocument->GetSdPage( nPage, ePageKind );
-
- if( pP && ( !pP->IsExcluded() || bPrintExcluded ) )
- aPageVector.push_back( nPage );
- }
-
- nPage++;
- }
-
- // create pairs of pages to print on each page
- if( aPageVector.size() )
- {
- sal_uInt32 nFirstIndex = 0, nLastIndex = aPageVector.size() - 1;
-
- if( aPageVector.size() & 1 )
- aPairVector.push_back( ::std::make_pair( (USHORT) 65535, aPageVector[ nFirstIndex++ ] ) );
- else
- aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
-
- while( nFirstIndex < nLastIndex )
- {
- if( nFirstIndex & 1 )
- aPairVector.push_back( ::std::make_pair( aPageVector[ nFirstIndex++ ], aPageVector[ nLastIndex-- ] ) );
- else
- aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
- }
- }
-
- for( sal_uInt32 i = 0; i < aPairVector.size(); i++ )
- {
- if( ( !( i & 1 ) && bPrintFrontPage ) || ( ( i & 1 ) && bPrintBackPage ) )
- {
- const ::std::pair< USHORT, USHORT > aPair( aPairVector[ i ] );
-
- rInfo.mrPrinter.StartPage();
-
- SdPage* pPageToPrint = pDocument->GetSdPage( aPair.first, ePageKind );
-
- if( pPageToPrint )
- {
- aMap.SetOrigin( aOffset );
- rInfo.mrPrinter.SetMapMode( aMap );
- PrintPage(rInfo, pPrintView, pPageToPrint, bPrintMarkedOnly );
- }
-
- pPageToPrint = pDocument->GetSdPage( aPair.second, ePageKind );
-
- if( pPageToPrint )
- {
- Point aSecondOffset( aOffset );
-
- if( eOrientation == ORIENTATION_LANDSCAPE )
- aSecondOffset.X() += ( aPrintSize.Width() >> 1 );
- else
- aSecondOffset.Y() += ( aPrintSize.Height() >> 1 );
-
- aMap.SetOrigin( aSecondOffset );
- rInfo.mrPrinter.SetMapMode( aMap );
- PrintPage(rInfo, pPrintView, pPageToPrint, bPrintMarkedOnly );
- }
-
- rInfo.mrPrinter.EndPage();
- }
- }
-
- rInfo.mrPrinter.SetMapMode( aStdMap );
- }
- else
- {
- rInfo.mrViewShell.WriteFrameViewData();
- Point aPtZero;
-
- while ( nPage < rInfo.mnPageMax )
- {
- if (rInfo.mrSelPages.IsSelected(nPage+1) )
- {
- SdPage* pPage = pDocument->GetSdPage(nPage, ePageKind);
- // Kann sich die Seitengroesse geaendert haben?
- aPageSize = pPage->GetSize();
-
- rInfo.mrProgress.SetState( nPageCount, rInfo.mnTotal );
- nPageCount = nPageCount + rInfo.mnCopies;
-
- if ( bScalePage )
- {
- double fHorz = (double) aPrintSize.Width() / aPageSize.Width();
- double fVert = (double) aPrintSize.Height() / aPageSize.Height();
-
- if ( fHorz < fVert )
- aFract = Fraction(aPrintSize.Width(), aPageSize.Width());
- else
- aFract = Fraction(aPrintSize.Height(), aPageSize.Height());
-
- aMap.SetScaleX(aFract);
- aMap.SetScaleY(aFract);
- aMap.SetOrigin(Point());
- }
-
- if ( !pPage->IsExcluded() || bPrintExcluded )
- {
- String aTmp = UniString::CreateFromInt32( nPage+1 );
-
- if(ePageKind == PK_NOTES)
- aTmp += String( SdResId( STR_PRINT_NOTES ) );
- else
- aTmp += String( SdResId( STR_PRINT_DRAWING ) );
- rInfo.mrProgress.SetStateText( nPageCount, aTmp, rInfo.mnTotal );
-
- String aPageStr;
- if ( bPrintPageName )
- {
- aPageStr = pPage->GetName();
- aPageStr += (sal_Unicode)' ';
- }
- aPageStr += rInfo.mrTimeDateStr;
-
- MapMode aStdMap = rInfo.mrPrinter.GetMapMode();
- rInfo.mrPrinter.SetMapMode(aMap);
-
- //
- BOOL bPrint = TRUE;
- Point aPageOrigin;
- long aPageWidth = aPageSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder();
- long aPageHeight = aPageSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder();
- long aPrintWidth = aPrintSize.Width();
- long aPrintHeight = aPrintSize.Height();
-
- // Bugfix zu 44530:
- // Falls implizit umgestellt wurde (Landscape/Portrait)
- // wird dies beim Kacheln, bzw. aufteilen (Poster) beruecksichtigt
- BOOL bSwitchPageSize = FALSE;
- if( ( aPrintWidth > aPrintHeight && aPageWidth < aPageHeight ) ||
- ( aPrintWidth < aPrintHeight && aPageWidth > aPageHeight ) )
- {
- bSwitchPageSize = TRUE;
- aPrintWidth = aPrintSize.Height();
- aPrintHeight = aPrintSize.Width();
- }
-
- // Eine (kleine) Seite, die gekachelt ausgegeben werden soll
- if( bTilePage &&
- aPageWidth < aPrintWidth &&
- aPageHeight < aPrintHeight )
- {
- aPageWidth += 500;
- aPageHeight += 500;
- Point aPrintOrigin;
-
- rInfo.mrPrinter.StartPage();
- pPrintView->ShowSdrPage( pPage );
-
- SdrPageView* pPageView = pPrintView->GetSdrPageView(); // pPage);
- pPageView->SetVisibleLayers(rInfo.mrViewShell.GetFrameView()->GetVisibleLayers() );
- pPageView->SetPrintableLayers(rInfo.mrViewShell.GetFrameView()->GetPrintableLayers() );
-
- long nPagesPrinted = 0; // Fuer Bedingung s.u.
- BOOL bPrintPage; // Fuer Bedingung s.u.
-
- while( bPrint )
- {
- BOOL bWidth = aPageWidth < aPrintWidth;
- BOOL bHeight = aPageHeight < aPrintHeight;
- if( !bWidth && !bHeight )
- bPrint = FALSE;
-
- // Etwas umstaendliche Abfrage, die ausdrueckt, ob eine Seite
- // beim Kacheln abgeschnitten oder gar nicht dargestellt werden
- // soll. Die Bedingung ist, dass eine 2. Seite (horz. oder vert.)
- // immer gedruck wird, waehrend eine dritte Seite (oder hoeher)
- // nur noch gedruckt wird, wenn diese auch noch vollstaendig
- // aufs Papier passt.
- if( nPagesPrinted < 4 && !( !bWidth && nPagesPrinted == 2 ) )
- bPrintPage = TRUE;
- else
- bPrintPage = FALSE;
- nPagesPrinted++;
-
- if( ( bWidth && bHeight ) || bPrintPage )
- {
- aStdMap.SetOrigin( aPrintOrigin );
- rInfo.mrPrinter.SetMapMode( aStdMap );
-
- if (rInfo.mrViewShell.ISA(DrawViewShell) && bPrintMarkedOnly )
- {
- rInfo.mrViewShell.GetView()->DrawMarkedObj(rInfo.mrPrinter);
- }
- else
- pPrintView->CompleteRedraw( &rInfo.mrPrinter, Rectangle( aPtZero, aPageSize ) );
- }
- if( bWidth )
- {
- aPrintOrigin.X() += aPageWidth;
- aPrintWidth -= aPageWidth;
- }
- else if( bHeight )
- {
- aPrintOrigin.X() = 0;
- aPrintWidth = bSwitchPageSize ? aPrintSize.Height() : aPrintSize.Width();
- aPrintOrigin.Y() += aPageHeight;
- aPrintHeight -= aPageHeight;
- }
- }
-
- if ( aPageStr.Len() )
- {
- Font aOldFont = rInfo.mrPrinter.OutputDevice::GetFont();
- rInfo.mrPrinter.SetFont(rInfo.mrTimeDateFont);
- rInfo.mrPrinter.DrawText(aPageOfs, aPageStr);
- rInfo.mrPrinter.SetFont(aOldFont);
- }
- rInfo.mrPrinter.EndPage();
- pPrintView->HideSdrPage(); // pPrintView->GetPageView(pPage));
-
- bPrint = FALSE;
- }
-
- // For pages larger then the printable area there
- // are three options:
- // 1. Scale down to the page to the printable area.
- // 2. Print only the upper left part of the page
- // (without the unprintable borders).
- // 3. Split the page into parts of the size of the
- // printable area.
- if (bPrint)
- {
- const bool bCutPage (rInfo.mpPrintOpts && rInfo.mpPrintOpts->GetOptionsPrint().IsCutPage());
- if (bScalePage || bCutPage)
- {
- // Handle 1 and 2.
-
- // if CutPage is set then do not move
- // it, otherwise move the scaled page
- // to printable area
-
- PrintPagePart(
- rInfo,
- pPage,
- *pPrintView,
- bCutPage ? Point(-aPageOfs.X(), -aPageOfs.Y()) : Point(0,0),
- bPrintMarkedOnly,
- aPageStr,
- aPageOfs);
- }
- else
- {
- // Handle 3. Print parts of the page in the
- // size of the printable area until the
- // whole page is covered.
-
- // keep the page content at its
- // position if it fits, otherwise move
- // it to the printable area
- Point aOrigin (aPageWidth < aPrintWidth ? -aPageOfs.X() : 0, aPageHeight < aPrintHeight ? -aPageOfs.Y() : 0);
-
- for (aPageOrigin = aOrigin;
- -aPageOrigin.Y()<aPageHeight;
- aPageOrigin.Y() -= aPrintHeight)
- {
- for (aPageOrigin.X()=aOrigin.X();
- -aPageOrigin.X()<aPageWidth;
- aPageOrigin.X() -= aPrintWidth)
- {
- PrintPagePart(
- rInfo,
- pPage,
- *pPrintView,
- aPageOrigin,
- bPrintMarkedOnly,
- aPageStr,
- aPageOfs);
- }
- }
- }
- }
- }
- }
- nPage++;
- }
- }
-
- delete pPrintView;
- rInfo.mrPrinter.SetMapMode( aOldMap );
- }
-}
-
-
-
-
-void PrintManager::PrintPagePart (
- PrintInfo& rInfo,
- SdPage* pPage,
- DrawView& rPrintView,
- const Point& rPageOrigin,
- BOOL bPrintMarkedOnly,
- const String& rsPageString,
- const Point& rStringOffset)
-{
- rInfo.mrPrinter.StartPage();
- rPrintView.ShowSdrPage(pPage); // , Point(0,0));
-
- // Set origin of the map mode so that the next part of the page is
- // printed.
- MapMode aOriginalMapMode = rInfo.mrPrinter.GetMapMode();
- MapMode aMapMode = rInfo.mrPrinter.GetMapMode();
- aMapMode.SetOrigin(rPageOrigin);
- rInfo.mrPrinter.SetMapMode(aMapMode);
-
- SdrPageView* pPageView = rPrintView.GetSdrPageView(); // pPage);
- pPageView->SetVisibleLayers(rInfo.mrViewShell.GetFrameView()->GetVisibleLayers() );
- pPageView->SetPrintableLayers(rInfo.mrViewShell.GetFrameView()->GetPrintableLayers() );
-
- if (rInfo.mrViewShell.ISA(DrawViewShell) && bPrintMarkedOnly)
- rInfo.mrViewShell.GetView()->DrawMarkedObj(rInfo.mrPrinter);
- else
- rPrintView.CompleteRedraw(&rInfo.mrPrinter, Rectangle(Point(0,0), pPage->GetSize()));
- rInfo.mrPrinter.SetMapMode(aOriginalMapMode);
-
- if (rsPageString.Len())
- {
- Font aOldFont = rInfo.mrPrinter.OutputDevice::GetFont();
- rInfo.mrPrinter.SetFont(rInfo.mrTimeDateFont);
- rInfo.mrPrinter.DrawText(rStringOffset, rsPageString);
- rInfo.mrPrinter.SetFont(aOldFont);
- }
- rInfo.mrPrinter.EndPage();
- rPrintView.HideSdrPage(); // rPrintView.GetPageView(pPage));
-}
-
-
-
-
-
-void PrintManager::PrintPage (
- PrintInfo& rInfo,
- ::sd::View* pPrintView,
- SdPage* pPage,
- BOOL bPrintMarkedOnly)
-{
- Point aPtZero;
- pPrintView->ShowSdrPage( pPage ); // , aPtZero );
-
- SdrPageView* pPageView = pPrintView->GetSdrPageView(); // pPage );
- pPageView->SetVisibleLayers(rInfo.mrViewShell.GetFrameView()->GetVisibleLayers() );
- pPageView->SetPrintableLayers(rInfo.mrViewShell.GetFrameView()->GetPrintableLayers() );
-
- if (rInfo.mrViewShell.ISA(DrawViewShell) && bPrintMarkedOnly)
- rInfo.mrViewShell.GetView()->DrawMarkedObj(rInfo.mrPrinter);
- else
- pPrintView->CompleteRedraw(&rInfo.mrPrinter, Rectangle(Point(0,0), pPage->GetSize()));
-
- pPrintView->HideSdrPage(); // pPrintView->GetPageView( pPage ) );
-}
-
-
-
-
-bool PrintManager::IsScreenFormat (void)
-{
- // Determine the page size.
- SdPage* pPage = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD);
- Size aPaperSize (pPage->GetSize());
-
- // Take Orientation into account.
- if (pPage->GetOrientation() == ORIENTATION_LANDSCAPE)
- Swap(aPaperSize);
-
- // Check whether paper size is 'Screen'
- Paper ePaper(SvxPaperInfo::GetSvxPaper(aPaperSize, MAP_100TH_MM, TRUE));
- return (ePaper == PAPER_SCREEN);
-}
-
-
-void PrintManager::InitHandoutTemplate( PrintInfo& /*rInfo*/, USHORT nSlidesPerHandout, BOOL bHandoutHorizontal )
-{
- AutoLayout eLayout = AUTOLAYOUT_HANDOUT6;
- switch( nSlidesPerHandout )
- {
- case 1: eLayout = AUTOLAYOUT_HANDOUT1; break;
- case 2: eLayout = AUTOLAYOUT_HANDOUT2; break;
- case 3: eLayout = AUTOLAYOUT_HANDOUT3; break;
- case 4: eLayout = AUTOLAYOUT_HANDOUT4; break;
- case 9: eLayout = AUTOLAYOUT_HANDOUT9; break;
- }
-
- if( !mrBase.GetDocument() )
- return;
-
- SdDrawDocument& rModel = *mrBase.GetDocument();
-
- // first, prepare handout page (not handout master)
-
- SdPage* pHandout = rModel.GetSdPage(0, PK_HANDOUT);
- if( !pHandout )
- return;
-
- // delete all previous shapes from handout page
- while( pHandout->GetObjCount() )
- {
- SdrObject* pObj = pHandout->NbcRemoveObject(0);
- if( pObj )
- SdrObject::Free( pObj );
- }
-
- const bool bDrawLines = eLayout == AUTOLAYOUT_HANDOUT3;
-
- std::vector< Rectangle > aAreas;
- SdPage::CalculateHandoutAreas( rModel, eLayout, bHandoutHorizontal, aAreas );
-
- std::vector< Rectangle >::iterator iter( aAreas.begin() );
- while( iter != aAreas.end() )
- {
- pHandout->NbcInsertObject( new SdrPageObj((*iter++)) );
-
- if( bDrawLines && (iter != aAreas.end()) )
- {
- Rectangle aRect( (*iter++) );
-
- basegfx::B2DPolygon aPoly;
- aPoly.insert(0, basegfx::B2DPoint( aRect.Left(), aRect.Top() ) );
- aPoly.insert(1, basegfx::B2DPoint( aRect.Right(), aRect.Top() ) );
-
- const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix(
- 0.0, static_cast< double >( aRect.GetHeight() / 7 )));
- basegfx::B2DPolyPolygon aPathPoly;
-
- for( sal_uInt16 nLine = 0; nLine < 7; nLine++ )
- {
- aPoly.transform( aMatrix );
- aPathPoly.append( aPoly );
- }
-
- SdrPathObj* pPathObj = new SdrPathObj(OBJ_PATHLINE, aPathPoly );
- pPathObj->SetMergedItem( XLineStyleItem(XLINE_SOLID) );
- pPathObj->SetMergedItem( XLineColorItem(String(), Color(COL_BLACK)));
-
- pHandout->NbcInsertObject( pPathObj );
- }
- }
-}
-
-} // end of namespace sd
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 3e0f6297f8d6..431add66bc2b 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -33,8 +33,8 @@
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/frame/UnknownModuleException.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/UnknownModuleException.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -54,7 +54,6 @@
#include "NotesChildWindow.hxx"
#include "ViewShellManager.hxx"
#include "DrawController.hxx"
-#include "PrintManager.hxx"
#include "UpdateLockManager.hxx"
#include "FrameView.hxx"
#include "ViewTabBar.hxx"
@@ -62,6 +61,7 @@
#include "drawdoc.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
+#include <sfx2/printer.hxx>
#include "DrawViewShell.hxx"
#include "GraphicViewShell.hxx"
#include "OutlineViewShell.hxx"
@@ -72,6 +72,7 @@
#include "ToolBarManager.hxx"
#include "Window.hxx"
#include "framework/ConfigurationController.hxx"
+#include "DocumentRenderer.hxx"
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/awt/XWindow.hpp>
@@ -92,6 +93,7 @@
#include <sfx2/viewfrm.hxx>
#include <svl/whiter.hxx>
#include <comphelper/processfactory.hxx>
+#include <vcl/msgbox.hxx>
#include "fubullet.hxx"
@@ -162,9 +164,6 @@ public:
::boost::shared_ptr<UpdateLockManager> mpUpdateLockManager;
- /// The print manager is responsible for printing documents.
- ::boost::shared_ptr<PrintManager> mpPrintManager;
-
::boost::shared_ptr<FormShellManager> mpFormShellManager;
::boost::shared_ptr<CustomHandleManager> mpCustomHandleManager;
@@ -299,7 +298,6 @@ ViewShellBase::ViewShellBase (
mpImpl->mpViewWindow.reset(new FocusForwardingWindow(_pFrame->GetWindow(),*this));
mpImpl->mpViewWindow->SetBackground(Wallpaper());
mpImpl->mpUpdateLockManager.reset(new UpdateLockManager(*this));
- mpImpl->mpPrintManager.reset(new PrintManager(*this));
_pFrame->GetWindow().SetBackground(Wallpaper());
@@ -598,12 +596,21 @@ ErrCode ViewShellBase::DoVerb (long nVerb)
+Reference<view::XRenderable> ViewShellBase::GetRenderable (void)
+{
+ // Create a new DocumentRenderer on every call. It observes the life
+ // time of this ViewShellBase object.
+ return Reference<view::XRenderable>(new DocumentRenderer(*this));
+}
+
+
+
+
SfxPrinter* ViewShellBase::GetPrinter (BOOL bCreate)
{
OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
- return mpImpl->mpPrintManager->GetPrinter(bCreate);
+ return GetDocShell()->GetPrinter (bCreate);
}
@@ -615,9 +622,48 @@ USHORT ViewShellBase::SetPrinter (
bool bIsAPI)
{
OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
- return mpImpl->mpPrintManager->SetPrinter (pNewPrinter, nDiffFlags, bIsAPI);
+ GetDocShell()->SetPrinter(pNewPrinter);
+
+ if ( (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ||
+ nDiffFlags & SFX_PRINTER_CHG_SIZE) && pNewPrinter )
+ {
+ MapMode aMap = pNewPrinter->GetMapMode();
+ aMap.SetMapUnit(MAP_100TH_MM);
+ MapMode aOldMap = pNewPrinter->GetMapMode();
+ pNewPrinter->SetMapMode(aMap);
+ Size aNewSize = pNewPrinter->GetOutputSize();
+
+ BOOL bScaleAll = FALSE;
+ if ( bIsAPI )
+ {
+ WarningBox aWarnBox (
+ GetWindow(),
+ (WinBits)(WB_YES_NO | WB_DEF_YES),
+ String(SdResId(STR_SCALE_OBJS_TO_PAGE)));
+ bScaleAll = (aWarnBox.Execute() == RET_YES);
+ }
+
+ ::boost::shared_ptr<DrawViewShell> pDrawViewShell (
+ ::boost::dynamic_pointer_cast<DrawViewShell>(GetMainViewShell()));
+ if (pDrawViewShell)
+ {
+ SdPage* pPage = GetDocument()->GetSdPage(
+ 0, PK_STANDARD );
+ pDrawViewShell->SetPageSizeAndBorder (
+ pDrawViewShell->GetPageKind(),
+ aNewSize,
+ -1,-1,-1,-1,
+ bScaleAll,
+ pNewPrinter->GetOrientation(),
+ pPage->GetPaperBin(),
+ pPage->IsBackgroundFullSize());
+ }
+
+ pNewPrinter->SetMapMode(aOldMap);
+ }
+
+ return 0;
}
@@ -625,10 +671,9 @@ USHORT ViewShellBase::SetPrinter (
PrintDialog* ViewShellBase::CreatePrintDialog (::Window *pParent)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
-
- return mpImpl->mpPrintManager->CreatePrintDialog (pParent);
+ (void)pParent;
+ return NULL;
+ // return mpImpl->mpPrintManager->CreatePrintDialog (pParent);
}
@@ -638,21 +683,21 @@ SfxTabPage* ViewShellBase::CreatePrintOptionsPage(
::Window *pParent,
const SfxItemSet &rOptions)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
-
- return mpImpl->mpPrintManager->CreatePrintOptionsPage (pParent, rOptions);
+ (void)pParent;
+ (void)rOptions;
+ return NULL;
+ // return mpImpl->mpPrintManager->CreatePrintOptionsPage (pParent, rOptions);
}
-USHORT ViewShellBase::Print(SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pDlg)
+USHORT ViewShellBase::Print(SfxProgress&, BOOL bIsAPI, PrintDialog* pDlg)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
-
- return mpImpl->mpPrintManager->Print (rProgress, bIsAPI, pDlg);
+ (void)bIsAPI;
+ (void)pDlg;
+ return 0;
+ // return mpImpl->mpPrintManager->Print (rProgress, bIsAPI, pDlg);
}
@@ -663,10 +708,12 @@ ErrCode ViewShellBase::DoPrint (
PrintDialog* pPrintDialog,
BOOL bSilent, BOOL bIsAPI )
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
-
- return mpImpl->mpPrintManager->DoPrint (pPrinter, pPrintDialog, bSilent, bIsAPI );
+ (void)pPrinter;
+ (void)pPrintDialog;
+ (void)bSilent;
+ (void)bIsAPI;
+ return 0;
+ //return mpImpl->mpPrintManager->DoPrint (pPrinter, pPrintDialog, bSilent, bIsAPI );
}
@@ -677,13 +724,11 @@ USHORT ViewShellBase::SetPrinterOptDlg (
USHORT nDiffFlags,
BOOL bShowDialog)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
-
- return mpImpl->mpPrintManager->SetPrinterOptDlg (
- pNewPrinter,
- nDiffFlags,
- bShowDialog);
+ (void)pNewPrinter;
+ (void)nDiffFlags;
+ (void)bShowDialog;
+ return 0;
+ // return mpImpl->mpPrintManager->SetPrinterOptDlg ( pNewPrinter, nDiffFlags, bShowDialog);
}
@@ -691,11 +736,8 @@ USHORT ViewShellBase::SetPrinterOptDlg (
void ViewShellBase::PreparePrint (PrintDialog* pPrintDialog)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpPrintManager.get()!=NULL);
-
SfxViewShell::PreparePrint (pPrintDialog);
- return mpImpl->mpPrintManager->PreparePrint (pPrintDialog);
+ //mpImpl->mpPrintManager->PreparePrint (pPrintDialog);
}
@@ -1222,46 +1264,46 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
return *mpImpl->mpCustomHandleManager.get();
}
-::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
-{
- ::rtl::OUString aLabel;
+::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
+{
+ ::rtl::OUString aLabel;
- if ( aCmdURL.getLength() > 0 ) try
- {
+ if ( aCmdURL.getLength() > 0 ) try
+ {
Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
-
+
Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW );
Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY_THROW );
-
- ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
-
- if( aModuleIdentifier.getLength() > 0 )
- {
- Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY );
- if( xNameAccess.is() )
- {
- Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
- Sequence< PropertyValue > aPropSeq;
- if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
- {
- for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
- {
- if( aPropSeq[i].Name.equalsAscii( "Name" ))
- {
- aPropSeq[i].Value >>= aLabel;
- break;
- }
- }
- }
- }
- }
- }
- catch ( Exception& )
- {
- }
-
- return aLabel;
-}
+
+ ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
+
+ if( aModuleIdentifier.getLength() > 0 )
+ {
+ Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY );
+ if( xNameAccess.is() )
+ {
+ Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
+ Sequence< PropertyValue > aPropSeq;
+ if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
+ {
+ for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if( aPropSeq[i].Name.equalsAscii( "Name" ))
+ {
+ aPropSeq[i].Value >>= aLabel;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+
+ return aLabel;
+}
@@ -1277,7 +1319,6 @@ ViewShellBase::Implementation::Implementation (ViewShellBase& rBase)
mpViewShellManager(),
mpEventMultiplexer(),
mpUpdateLockManager(),
- mpPrintManager(),
mpFormShellManager(),
mrBase(rBase),
mpPageCacheManager(slidesorter::cache::PageCacheManager::Instance())
diff --git a/sd/source/ui/view/makefile.mk b/sd/source/ui/view/makefile.mk
index a65f3fd7c87f..fede66ea2d13 100644
--- a/sd/source/ui/view/makefile.mk
+++ b/sd/source/ui/view/makefile.mk
@@ -29,6 +29,7 @@
#
#*************************************************************************
+
PRJ=..$/..$/..
PROJECTPCH=sd
@@ -47,6 +48,10 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
+SRS1NAME=$(TARGET)
+SRC1FILES = \
+ DocumentRenderer.src
+
SLOFILES = \
$(SLO)$/sdview.obj \
$(SLO)$/sdview2.obj \
@@ -94,6 +99,7 @@ SLOFILES = \
$(SLO)$/clview.obj \
$(SLO)$/zoomlist.obj \
$(SLO)$/unmodpg.obj \
+ $(SLO)$/DocumentRenderer.obj \
$(SLO)$/FormShellManager.obj \
$(SLO)$/GraphicObjectBar.obj \
$(SLO)$/GraphicViewShellBase.obj \
@@ -104,7 +110,6 @@ SLOFILES = \
$(SLO)$/OutlineViewShellBase.obj \
$(SLO)$/SlideSorterViewShellBase.obj \
$(SLO)$/PresentationViewShellBase.obj \
- $(SLO)$/PrintManager.obj \
$(SLO)$/ToolBarManager.obj \
$(SLO)$/UpdateLockManager.obj \
$(SLO)$/ViewClipboard.obj \
@@ -116,7 +121,6 @@ SLOFILES = \
$(SLO)$/WindowUpdater.obj
-
# --- Tagets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index 6b1e6ebf1676..d74700307291 100644
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -55,6 +55,7 @@ RESLIB1SRSFILES=\
$(SRS)$/animui.srs \
$(SRS)$/slideshow.srs \
$(SRS)$/uitable.srs \
+ $(SRS)$/view.srs \
$(SRS)$/uiannotations.srs \
$(SOLARCOMMONRESDIR)$/sfx.srs
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index b3e68ac17bff..d4ba6e1be452 100755
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -508,6 +508,22 @@ packageversion = "%PACKAGEVERSION"
End
Start
+module = "gid_Module_Root_Extension_Dictionary_Ca"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ca"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ca"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "Ca dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
module = "gid_Module_Root_Extension_Dictionary_Cs"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-cs"
@@ -540,17 +556,49 @@ packageversion = "%PACKAGEVERSION"
End
Start
-module = "gid_Module_Root_Extension_Dictionary_De"
+module = "gid_Module_Root_Extension_Dictionary_De_AT"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-AT"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-AT"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "De-AT dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
+module = "gid_Module_Root_Extension_Dictionary_De_CH"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-CH"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-CH"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "De-CH dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
+module = "gid_Module_Root_Extension_Dictionary_De_DE"
script = "shellscripts_extensions.txt"
-solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-DE"
solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
-packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-de-DE"
requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
linuxpatchrequires = ""
copyright = "1999-2009 by Sun Microsystems"
solariscopyright = "solariscopyrightfile"
vendor = "Sun Microsystems, Inc."
-description = "De dictionary for %PRODUCTNAME %PRODUCTVERSION"
+description = "De-DE dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
End
@@ -732,6 +780,22 @@ packageversion = "%PACKAGEVERSION"
End
Start
+module = "gid_Module_Root_Extension_Dictionary_No"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-no"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-no"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "No dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
module = "gid_Module_Root_Extension_Dictionary_Pl"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-pl"
@@ -764,6 +828,22 @@ packageversion = "%PACKAGEVERSION"
End
Start
+module = "gid_Module_Root_Extension_Dictionary_Ro"
+script = "shellscripts_extensions.txt"
+solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ro"
+solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ro"
+requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION"
+linuxpatchrequires = ""
+copyright = "1999-2009 by Sun Microsystems"
+solariscopyright = "solariscopyrightfile"
+vendor = "Sun Microsystems, Inc."
+description = "Ro dictionary for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
+
+Start
module = "gid_Module_Root_Extension_Dictionary_Ru"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ru"
diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt
index 2abcc10db890..03d741b0afbb 100644
--- a/setup_native/source/packinfo/spellchecker_selection.txt
+++ b/setup_native/source/packinfo/spellchecker_selection.txt
@@ -4,34 +4,38 @@
# Second column: Assigned spellchecker languages. Comma separated list.
af = "af,en-US"
-ca = "ca,es,en,fr"
+ar = "en-US"
+ca = "ca,es,en-US,fr"
cs = "cs,en-US"
-da = "da,de,en-US"
-de = "de,en-US,fr,it"
+da = "da,de-DE,en-US"
+de = "de-AT,de-CH,de-DE,en-US,fr,it"
en-US = "en-US,es,fr"
+en-GB = "en-US,es,fr"
es = "en-US,es,fr,pt"
et = "en-US,et"
fr = "en-US,es,fr"
gl = "en-US,pt,es,gl"
he = "en-US,he"
-hu = "de,en-US,hu"
-it = "de,en-US,fr,it"
+hu = "de-DE,en-US,hu"
+it = "de-DE,en-US,fr,it"
ja = "en-US"
ko = "en-US"
lt = "en-US,lt"
-nb = "no,en,fr,de,es"
+nb = "no,en-US,fr,de-DE,es"
ne = "en-US,ne"
-nl = "en-US,fr,de,nl"
-nn = "no,en,fr,de,es"
-pl = "de,en-US,pl,ru"
+nl = "en-US,fr,de-DE,nl"
+nn = "no,en-US,fr,de-DE,es"
+pl = "de-DE,en-US,pl,ru"
pt-BR = "en-US,es,pt"
-ro = "ro,en,de,hu"
-ru = "de,en-US,ru"
+pt = "en-US,es,pt"
+ro = "ro,en-US,de-DE,hu"
+ru = "de-DE,en-US,ru"
sk = "en-US,sk"
sl = "en-US,sl"
-sv = "de,en-US,sv"
+sv = "de-DE,en-US,sv"
sr = "sr,en-US"
-sh = "sh,en-US"
+# ! Note the package 'sr' also holds the dictionaries for 'sh' !
+sh = "sr,en-US"
sw = "en-US,sw"
th = "en-US,th"
vi = "en-US,fr,vi"
diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
index 10e586030f52..79f1d34ee82c 100644
--- a/sfx2/inc/sfx2/event.hxx
+++ b/sfx2/inc/sfx2/event.hxx
@@ -102,30 +102,21 @@ class PrintDialog;
class Printer;
class SfxPrintingHint : public SfxHint
{
- PrintDialog* pDialog;
- Printer* pPrinter;
sal_Int32 nWhich;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aOpts;
public:
TYPEINFO();
- SfxPrintingHint( sal_Int32 nEvent, PrintDialog* pDlg, Printer* pPrt, const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
- : pDialog( pDlg )
- , pPrinter( pPrt )
- , nWhich( nEvent )
+ SfxPrintingHint( sal_Int32 nEvent, const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
+ : nWhich( nEvent )
, aOpts( rOpts )
{}
- SfxPrintingHint( sal_Int32 nEvent, PrintDialog* pDlg, Printer* pPrt )
- : pDialog( pDlg )
- , pPrinter( pPrt )
- , nWhich( nEvent )
+ SfxPrintingHint( sal_Int32 nEvent )
+ : nWhich( nEvent )
{}
-
- Printer* GetPrinter() const { return pPrinter; }
- PrintDialog* GetPrintDialog() const { return pDialog; }
sal_Int32 GetWhich() const { return nWhich; }
- const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& GetAdditionalOptions() { return aOpts; }
+ const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& GetOptions() { return aOpts; }
};
#endif
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index cc525f4acd7d..f81be0aa7bba 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -593,7 +593,7 @@ public:
sal_uInt16 nIdx2 = INDEX_IGNORE,
sal_uInt16 nIdx3 = INDEX_IGNORE);
- virtual sal_Bool Print( Printer &rPrt,
+ sal_Bool Print( Printer &rPrt,
sal_uInt16 nIdx1,
sal_uInt16 nIdx2 = INDEX_IGNORE,
sal_uInt16 nIdx3 = INDEX_IGNORE,
diff --git a/sfx2/inc/sfx2/prnmon.hxx b/sfx2/inc/sfx2/prnmon.hxx
index ad47f6ce2633..376a599edef4 100644
--- a/sfx2/inc/sfx2/prnmon.hxx
+++ b/sfx2/inc/sfx2/prnmon.hxx
@@ -33,17 +33,13 @@
#include "sal/config.h"
#include "sfx2/dllapi.h"
-#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
#include <sfx2/printer.hxx>
-#include <sfx2/progress.hxx>
+//#include <sfx2/progress.hxx>
class SfxViewShell;
-class SfxProgress;
+//class SfxProgress;
struct SfxPrintProgress_Impl;
// ------------------------------------------------------------------------
@@ -51,7 +47,7 @@ struct SfxPrintProgress_Impl;
#define PAGE_MAX 9999 //max. Anzahl der Seiten die gedruckt werden
//--------------------------------------------------------------------
-
+/*
class SFX2_DLLPUBLIC SfxPrintProgress: public SfxProgress
{
SfxPrintProgress_Impl* pImp;
@@ -78,7 +74,7 @@ public:
void SetCancelHdl( const Link& aCancelHdl );
BOOL IsAborted() const;
};
-
+*/
// ------------------------------------------------------------------------
struct SfxPrintOptDlg_Impl;
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
index c952e550996e..3debe10f001d 100644
--- a/sfx2/inc/sfx2/sfxbasecontroller.hxx
+++ b/sfx2/inc/sfx2/sfxbasecontroller.hxx
@@ -493,7 +493,9 @@ public:
virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE SfxViewShell* GetViewShell_Impl() const;
+ // FIXME: TL needs this in sw/source/ui/uno/unotxdoc.cxx now;
+ // either the _Impl name should vanish or there should be an "official" API
+ SfxViewShell* GetViewShell_Impl() const;
SAL_DLLPRIVATE BOOL HandleEvent_Impl( NotifyEvent& rEvent );
SAL_DLLPRIVATE BOOL HasKeyListeners_Impl();
SAL_DLLPRIVATE BOOL HasMouseClickListeners_Impl();
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 32e31e782675..bcbb39c96638 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -873,7 +873,7 @@
#define SID_HELP_PI (SID_SFX_START + 962)
#define SID_BASIC_ENABLED (SID_SFX_START + 964)
#define SID_EXPORT_DIALOG (SID_SFX_START + 965)
-#define SID_IMPORT_DIALOG (SID_SFX_START + 966)
+#define SID_IMPORT_DIALOG (SID_SFX_START + 966)
#define SID_BASICBREAK (SID_SFX_START +1521)
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index 0fa9b92de7fc..396a948a03cc 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -212,7 +212,7 @@ public:
const Point &rPos, const Size &rSize );
void Hide();
void Show();
- BOOL IsVisible_Impl() const;
+ BOOL IsVisible() const;
void ToTop();
void Enable( BOOL bEnable );
virtual BOOL Close();
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 83ac73dbdd80..e3a5ae5adb8e 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -35,6 +35,7 @@
#include "sal/types.h"
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/view/XRenderable.hpp>
#include <com/sun/star/uno/Reference.h>
#include <svl/lstner.hxx>
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
@@ -43,6 +44,7 @@
#include "shell.hxx"
#include <tools/gen.hxx>
#include <tools/errcode.hxx>
+#include <vcl/jobset.hxx>
class SfxBaseController;
class Size;
class Fraction;
@@ -269,6 +271,7 @@ public:
virtual PrintDialog* CreatePrintDialog( Window *pParent );
void LockPrinter( BOOL bLock = TRUE );
BOOL IsPrinterLocked() const;
+ virtual JobSetup GetJobSetup() const;
// Workingset
virtual void WriteUserData( String&, BOOL bBrowse = FALSE );
@@ -289,6 +292,11 @@ public:
*/
void SetCurrentDocument() const;
+ /** get an XRenderable instance that can render this docuement
+ */
+ virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable();
+
+
virtual void MarginChanged();
const Size& GetMargin() const;
void SetMargin( const Size& );
@@ -305,6 +313,7 @@ public:
BOOL TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ::com::sun::star::ui::ContextMenuExecuteEvent aEvent );
void SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
+ void ExecPrint( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool, sal_Bool );
void AddRemoveClipboardListener( const com::sun::star::uno::Reference < com::sun::star::datatransfer::clipboard::XClipboardListener>&, BOOL );
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index bf3cb633cf6a..469a198db64e 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -216,7 +216,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
SfxTopViewFrame *pFrame;
for( pFrame = (SfxTopViewFrame*)
SfxViewFrame::GetFirst( xDoc, TYPE(SfxTopViewFrame) );
- pFrame && !pFrame->IsVisible_Impl();
+ pFrame && !pFrame->IsVisible();
pFrame = (SfxTopViewFrame*)
SfxViewFrame::GetNext( *pFrame, xDoc, TYPE(SfxTopViewFrame) ) ) ;
if ( pFrame )
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 7c88c4bef24a..aee76353f1f3 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -1260,7 +1260,7 @@ long DispatcherUpdate_Impl( void*, void* pArg )
void SfxShell::UIFeatureChanged()
{
SfxViewFrame *pFrame = GetFrame();
- if ( pFrame && pFrame->IsVisible_Impl() )
+ if ( pFrame && pFrame->IsVisible() )
{
// Auch dann Update erzwingen, wenn Dispatcher schon geupdated ist,
// sonst bleibt evtl. irgendwas in den gebunkerten Tools stecken.
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 683aedcbf32f..f8a77e721533 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -801,7 +801,9 @@ IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG )
aData << aBmp;
- Sequence < sal_Int8 > aBuffer( (sal_Int8*) aData.GetData(), aData.GetSize() );
+ const Sequence < sal_Int8 > aBuffer(
+ static_cast< const sal_Int8* >(aData.GetData()),
+ aData.GetEndOfData() );
aAny <<= aBuffer;
}
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 6883f0976566..8514ca9a917a 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -62,6 +62,7 @@
#include <unotools/useroptions.hxx>
#include <unotools/localfilehelper.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <sfx2/app.hxx>
#include "sfxresid.hxx"
@@ -1031,26 +1032,18 @@ BOOL SfxObjectShell::Print
if ( !pStyle )
return TRUE;
- if ( !rPrt.StartJob(String(SfxResId(STR_STYLES))) )
- {
- delete pIter;
- return FALSE;
- }
- if ( !rPrt.StartPage() )
- {
- delete pIter;
- return FALSE;
- }
- Reference< task::XStatusIndicator > xStatusIndicator;
- xStatusIndicator = SFX_APP()->GetStatusIndicator();
- if ( xStatusIndicator.is() )
- xStatusIndicator->start( String(SfxResId(STR_PRINT_STYLES)), nStyles );
+ // pepare adaptor for old style StartPage/EndPage printing
+ boost::shared_ptr< Printer > pPrinter( new Printer( rPrt.GetJobSetup() ) );
+ vcl::OldStylePrintAdaptor* pAdaptor = new vcl::OldStylePrintAdaptor( pPrinter );
+ boost::shared_ptr< vcl::PrinterController > pController( pAdaptor );
- rPrt.SetMapMode(MapMode(MAP_10TH_MM));
+ pAdaptor->StartPage();
+
+ pPrinter->SetMapMode(MapMode(MAP_10TH_MM));
Font aFont( DEFINE_CONST_UNICODE( "Arial" ), Size(0, 64)); // 18pt
aFont.SetWeight(WEIGHT_BOLD);
- rPrt.SetFont(aFont);
- const Size aPageSize(rPrt.GetOutputSize());
+ pPrinter->SetFont(aFont);
+ const Size aPageSize(pPrinter->GetOutputSize());
const USHORT nXIndent = 200;
USHORT nYIndent = 200;
Point aOutPos(nXIndent, nYIndent);
@@ -1059,68 +1052,66 @@ BOOL SfxObjectShell::Print
aHeader += *pObjectName;
else
aHeader += GetTitle();
- long nTextHeight( rPrt.GetTextHeight() );
- rPrt.DrawText(aOutPos, aHeader);
+ long nTextHeight( pPrinter->GetTextHeight() );
+ pPrinter->DrawText(aOutPos, aHeader);
aOutPos.Y() += nTextHeight;
aOutPos.Y() += nTextHeight/2;
aFont.SetSize(Size(0, 35)); // 10pt
nStyles = 1;
while(pStyle)
{
- if ( xStatusIndicator.is() )
- xStatusIndicator->setValue( nStyles++ );
- // Ausgabe des Vorlagennamens
+ // print template name
String aStr(pStyle->GetName());
aFont.SetWeight(WEIGHT_BOLD);
- rPrt.SetFont(aFont);
- nTextHeight = rPrt.GetTextHeight();
- // Seitenwechsel
+ pPrinter->SetFont(aFont);
+ nTextHeight = pPrinter->GetTextHeight();
+ // check for new page
if ( aOutPos.Y() + nTextHeight*2 >
aPageSize.Height() - (long) nYIndent )
{
- rPrt.EndPage();
- rPrt.StartPage();
+ pAdaptor->EndPage();
+ pAdaptor->StartPage();
aOutPos.Y() = nYIndent;
}
- rPrt.DrawText(aOutPos, aStr);
+ pPrinter->DrawText(aOutPos, aStr);
aOutPos.Y() += nTextHeight;
- // Ausgabe der Vorlagenbeschreibung
+ // print template description
aFont.SetWeight(WEIGHT_NORMAL);
- rPrt.SetFont(aFont);
+ pPrinter->SetFont(aFont);
aStr = pStyle->GetDescription();
const char cDelim = ' ';
USHORT nStart = 0, nIdx = 0;
- nTextHeight = rPrt.GetTextHeight();
- // wie viele Worte passen auf eine Zeile
+ nTextHeight = pPrinter->GetTextHeight();
+ // break text into lines
while(nIdx < aStr.Len())
{
USHORT nOld = nIdx;
long nTextWidth;
nIdx = aStr.Search(cDelim, nStart);
- nTextWidth = rPrt.GetTextWidth(aStr, nStart, nIdx-nStart);
+ nTextWidth = pPrinter->GetTextWidth(aStr, nStart, nIdx-nStart);
while(nIdx != STRING_NOTFOUND &&
aOutPos.X() + nTextWidth <
aPageSize.Width() - (long) nXIndent)
{
nOld = nIdx;
nIdx = aStr.Search(cDelim, nIdx+1);
- nTextWidth = rPrt.GetTextWidth(aStr, nStart, nIdx-nStart);
+ nTextWidth = pPrinter->GetTextWidth(aStr, nStart, nIdx-nStart);
}
String aTmp(aStr, nStart, nIdx == STRING_NOTFOUND?
STRING_LEN :
nOld-nStart);
if ( aTmp.Len() )
{
- nStart = nOld+1; // wegen trailing space
+ nStart = nOld+1; // trailing space
}
else
{
USHORT nChar = 1;
while(
nStart + nChar < aStr.Len() &&
- aOutPos.X() + rPrt.GetTextWidth(
+ aOutPos.X() + pPrinter->GetTextWidth(
aStr, nStart, nChar) <
aPageSize.Width() - nXIndent)
++nChar;
@@ -1131,19 +1122,19 @@ BOOL SfxObjectShell::Print
if ( aOutPos.Y() + nTextHeight*2 >
aPageSize.Height() - nYIndent )
{
- rPrt.EndPage();
- rPrt.StartPage();
+ pAdaptor->EndPage();
+ pAdaptor->StartPage();
aOutPos.Y() = nYIndent;
}
- rPrt.DrawText(aOutPos, aTmp);
- aOutPos.Y() += rPrt.GetTextHeight();
+ pPrinter->DrawText(aOutPos, aTmp);
+ aOutPos.Y() += pPrinter->GetTextHeight();
}
pStyle = pIter->Next();
}
- rPrt.EndPage();
- rPrt.EndJob();
- if ( xStatusIndicator.is() )
- xStatusIndicator->end();
+ pAdaptor->EndPage();
+
+ Printer::PrintJob( pController, rPrt.GetJobSetup() );
+
delete pIter;
break;
}
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index d61bd4701e1b..103dcf505846 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/view/DuplexMode.hpp>
#include <svl/lstner.hxx>
#include <svl/stritem.hxx>
@@ -148,8 +149,9 @@ Reference< ::com::sun::star::view::XPrintable > SAL_CALL SfxPrintJob_Impl::getPr
void SAL_CALL SfxPrintJob_Impl::cancelJob() throw (RuntimeException)
{
+ // FIXME: how to cancel PrintJob via API?!
if( m_pData->m_pObjectShell.Is() )
- m_pData->m_pObjectShell->Broadcast( SfxPrintingHint( -2, NULL, NULL ) );
+ m_pData->m_pObjectShell->Broadcast( SfxPrintingHint( -2 ) );
}
SfxPrintHelper::SfxPrintHelper()
@@ -590,7 +592,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
if ( !pView )
return;
- SfxAllItemSet aArgs( pView->GetPool() );
+// SfxAllItemSet aArgs( pView->GetPool() );
sal_Bool bMonitor = sal_False;
// We need this information at the end of this method, if we start the vcl printer
// by executing the slot. Because if it is a ucb relevant URL we must wait for
@@ -601,7 +603,10 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
String sUcbUrl;
::utl::TempFile* pUCBPrintTempFile = NULL;
- sal_Bool bWaitUntilEnd = sal_False;
+ uno::Sequence < beans::PropertyValue > aCheckedArgs( rOptions.getLength() );
+ sal_Int32 nProps = 0;
+ sal_Bool bWaitUntilEnd = sal_False;
+ sal_Int16 nDuplexMode = ::com::sun::star::view::DuplexMode::UNKNOWN;
for ( int n = 0; n < rOptions.getLength(); ++n )
{
// get Property-Value from options
@@ -634,10 +639,15 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// converted its not an URL nor a system path. Then we can't accept
// this parameter and have to throw an exception.
::rtl::OUString sSystemPath(sTemp);
- ::rtl::OUString sFileURL ;
+ ::rtl::OUString sFileURL;
if (::osl::FileBase::getFileURLFromSystemPath(sSystemPath,sFileURL)!=::osl::FileBase::E_None)
throw ::com::sun::star::lang::IllegalArgumentException();
- aArgs.Put( SfxStringItem(SID_FILE_NAME,sTemp) );
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= sFileURL;
+ // and append the local filename
+ aCheckedArgs.realloc( aCheckedArgs.getLength()+1 );
+ aCheckedArgs[nProps].Name = rtl::OUString::createFromAscii("LocalFileName");
+ aCheckedArgs[nProps++].Value <<= ::rtl::OUString( sTemp );
}
else
// It's a valid URL. but now we must know, if it is a local one or not.
@@ -648,7 +658,12 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// And we have to use the system notation of the incoming URL.
// But it into the descriptor and let the slot be executed at
// the end of this method.
- aArgs.Put( SfxStringItem(SID_FILE_NAME,sPath) );
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= sTemp;
+ // and append the local filename
+ aCheckedArgs.realloc( aCheckedArgs.getLength()+1 );
+ aCheckedArgs[nProps].Name = rtl::OUString::createFromAscii("LocalFileName");
+ aCheckedArgs[nProps++].Value <<= ::rtl::OUString( sPath );
}
else
{
@@ -663,7 +678,10 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// a slot ...
pUCBPrintTempFile = new ::utl::TempFile();
pUCBPrintTempFile->EnableKillingFile();
- aArgs.Put( SfxStringItem(SID_FILE_NAME,pUCBPrintTempFile->GetFileName()) );
+
+ //FIXME: does it work?
+ aCheckedArgs[nProps].Name = rtl::OUString::createFromAscii("LocalFileName");
+ aCheckedArgs[nProps++].Value <<= ::rtl::OUString( pUCBPrintTempFile->GetFileName() );
sUcbUrl = sURL;
}
}
@@ -674,25 +692,22 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
sal_Int32 nCopies = 0;
if ( ( rProp.Value >>= nCopies ) == sal_False )
throw ::com::sun::star::lang::IllegalArgumentException();
- aArgs.Put( SfxInt16Item( SID_PRINT_COPIES, (USHORT) nCopies ) );
+
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= nCopies;
}
// Collate-Property
- else if ( rProp.Name.compareToAscii( "Collate" ) == 0 )
+ // Sort-Property (deprecated)
+ else if ( rProp.Name.compareToAscii( "Collate" ) == 0 ||
+ ( rProp.Name.compareToAscii( "Sort" ) == 0 ) )
{
sal_Bool bTemp = sal_Bool();
if ( rProp.Value >>= bTemp )
- aArgs.Put( SfxBoolItem( SID_PRINT_COLLATE, bTemp ) );
- else
- throw ::com::sun::star::lang::IllegalArgumentException();
- }
-
- // Sort-Property
- else if ( rProp.Name.compareToAscii( "Sort" ) == 0 )
- {
- sal_Bool bTemp = sal_Bool();
- if( rProp.Value >>= bTemp )
- aArgs.Put( SfxBoolItem( SID_PRINT_SORT, bTemp ) );
+ {
+ aCheckedArgs[nProps].Name = rtl::OUString::createFromAscii("Collate");
+ aCheckedArgs[nProps++].Value <<= bTemp;
+ }
else
throw ::com::sun::star::lang::IllegalArgumentException();
}
@@ -702,7 +717,10 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
{
OUSTRING sTemp;
if( rProp.Value >>= sTemp )
- aArgs.Put( SfxStringItem( SID_PRINT_PAGES, String( sTemp ) ) );
+ {
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= sTemp;
+ }
else
throw ::com::sun::star::lang::IllegalArgumentException();
}
@@ -712,26 +730,36 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
{
if( !(rProp.Value >>= bMonitor) )
throw ::com::sun::star::lang::IllegalArgumentException();
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= bMonitor;
}
- // MonitorVisible
+ // Wait
else if ( rProp.Name.compareToAscii( "Wait" ) == 0 )
{
if ( !(rProp.Value >>= bWaitUntilEnd) )
throw ::com::sun::star::lang::IllegalArgumentException();
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= bWaitUntilEnd;
+ }
+
+ else if ( rProp.Name.compareToAscii( "DuplexMode" ) == 0 )
+ {
+ if ( !(rProp.Value >>= nDuplexMode ) )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= nDuplexMode;
}
}
+ if ( nProps != aCheckedArgs.getLength() )
+ aCheckedArgs.realloc(nProps);
+
// Execute the print request every time.
// It doesn'tmatter if it is a real printer used or we print to a local file
// nor if we print to a temp file and move it afterwards by using the ucb.
// That will be handled later. see pUCBPrintFile below!
- aArgs.Put( SfxBoolItem( SID_SILENT, !bMonitor ) );
- if ( bWaitUntilEnd )
- aArgs.Put( SfxBoolItem( SID_ASYNCHRON, sal_False ) );
- SfxRequest aReq( SID_PRINTDOC, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_API, pView->GetPool() );
- aReq.SetArgs( aArgs );
- pView->ExecuteSlot( aReq );
+ pView->ExecPrint( aCheckedArgs, sal_True, sal_False );
// Ok - may be execution before has finished (or started!) printing.
// And may it was a printing to a file.
@@ -764,11 +792,11 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
if ( pPrintHint )
{
- if ( pPrintHint->GetWhich() == -1 ) // -1 : Initialisation of PrintOptions
+ if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED )
{
if ( !m_xPrintJob.is() )
m_xPrintJob = new SfxPrintJob_Impl( this );
-
+/*
PrintDialog* pDlg = pPrintHint->GetPrintDialog();
Printer* pPrinter = pPrintHint->GetPrinter();
::rtl::OUString aPrintFile ( ( pPrinter && pPrinter->IsPrintFileEnabled() ) ? pPrinter->GetPrintFile() : String() );
@@ -805,7 +833,10 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
m_aPrintOptions[nArgs-1].Name = DEFINE_CONST_UNICODE("FileName");
m_aPrintOptions[nArgs-1].Value <<= aPrintFile;
}
+*/
+ m_aPrintOptions = pPrintHint->GetOptions();
}
+/*
else if ( pPrintHint->GetWhich() == -3 ) // -3 : AdditionalPrintOptions
{
uno::Sequence < beans::PropertyValue >& lOldOpts = m_aPrintOptions;
@@ -839,6 +870,7 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
// at least one new options has overwritten an old one, so we allocated too much
lOldOpts.realloc( nTotal );
}
+*/
else if ( pPrintHint->GetWhich() != -2 ) // -2 : CancelPrintJob
{
view::PrintJobEvent aEvent;
diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk
index 98d34215e097..cad12052720c 100644
--- a/sfx2/source/view/makefile.mk
+++ b/sfx2/source/view/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,6 @@ SLOFILES = \
$(SLO)$/frmload.obj \
$(SLO)$/frame.obj \
$(SLO)$/printer.obj \
- $(SLO)$/prnmon.obj \
$(SLO)$/viewprn.obj \
$(SLO)$/viewfac.obj \
$(SLO)$/orgmgr.obj \
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 1ea49ecd879b..2b7f89eac7c4 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -546,14 +546,17 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
// TabPage einh"angen
pPage = pViewSh->CreatePrintOptionsPage( this, *pOptions );
DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" );
- pPage->Reset( *pOptions );
- SetHelpId( pPage->GetHelpId() );
- pPage->Show();
+ if( pPage )
+ {
+ pPage->Reset( *pOptions );
+ SetHelpId( pPage->GetHelpId() );
+ pPage->Show();
+ }
// Dialoggr"o\se bestimmen
Size a6Sz = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
Size aBtnSz = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
- Size aOutSz( pPage->GetSizePixel() );
+ Size aOutSz( pPage ? pPage->GetSizePixel() : Size() );
aOutSz.Height() += 6;
long nWidth = aBtnSz.Width();
nWidth += a6Sz.Width();
@@ -589,6 +592,9 @@ SfxPrintOptionsDialog::~SfxPrintOptionsDialog()
short SfxPrintOptionsDialog::Execute()
{
+ if( ! pPage )
+ return RET_CANCEL;
+
short nRet = ModalDialog::Execute();
if ( nRet == RET_OK )
pPage->FillItemSet( *pOptions );
diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx
index f875143bfab0..de075647ab48 100644
--- a/sfx2/source/view/prnmon.cxx
+++ b/sfx2/source/view/prnmon.cxx
@@ -274,10 +274,12 @@ SfxPrintProgress::SfxPrintProgress( SfxViewShell* pViewSh, FASTBOOL bShow )
String(SfxResId(STR_PRINTING)), 1, FALSE ),
pImp( new SfxPrintProgress_Impl( pViewSh, pViewSh->GetPrinter() ) )
{
+ #if 0
pImp->pPrinter->SetEndPrintHdl( LINK( this, SfxPrintProgress, EndPrintNotify ) );
pImp->pPrinter->SetErrorHdl( LINK( this, SfxPrintProgress, PrintErrorNotify ) );
pImp->pPrinter->SetStartPrintHdl( LINK( this, SfxPrintProgress, StartPrintNotify ) );
pImp->bCallbacks = TRUE;
+ #endif
SfxObjectShell* pDoc = pViewSh->GetObjectShell();
SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_HIDDEN, FALSE );
@@ -307,7 +309,7 @@ SfxPrintProgress::~SfxPrintProgress()
// ggf. Callbacks entfermen
if ( pImp->bCallbacks )
{
- pImp->pPrinter->SetEndPrintHdl( Link() );
+ // pImp->pPrinter->SetEndPrintHdl( Link() );
pImp->pPrinter->SetErrorHdl( Link() );
pImp->bCallbacks = FALSE;
}
@@ -410,7 +412,7 @@ IMPL_LINK( SfxPrintProgress, EndPrintNotify, void *, EMPTYARG )
//! if( pMDI->IsPrinterChanged() ) pMDI->Changed( 0L );
// Callbacks rausnehmen
- pImp->pPrinter->SetEndPrintHdl( Link() );
+ // pImp->pPrinter->SetEndPrintHdl( Link() );
pImp->pPrinter->SetErrorHdl( Link() );
pImp->bCallbacks = FALSE;
diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx
index f3596de6b1c2..6f5c2ffcc3eb 100644
--- a/sfx2/source/view/topfrm.cxx
+++ b/sfx2/source/view/topfrm.cxx
@@ -370,7 +370,7 @@ void SfxTopViewWin_Impl::StateChanged( StateChangedType nStateChange )
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
SfxObjectShell* pDoc = pFrame->GetObjectShell();
- if ( pDoc && !pFrame->IsVisible_Impl() )
+ if ( pDoc && !pFrame->IsVisible() )
pFrame->Show();
pFrame->Resize();
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 945419189b78..ba87f0fc33ca 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1331,7 +1331,7 @@ String SfxViewFrame::UpdateTitle()
// Name des SbxObjects
String aSbxName = pObjSh->SfxShell::GetName();
- if ( IsVisible_Impl() )
+ if ( IsVisible() )
{
aSbxName += ':';
aSbxName += String::CreateFromInt32(pImp->nDocViewNo);
@@ -1801,7 +1801,7 @@ sal_uInt16 SfxViewFrame::Count(TypeId aType)
{
SfxViewFrame *pFrame = rFrames[i];
if ( ( !aType || pFrame->IsA(aType) ) &&
- pFrame->IsVisible_Impl() )
+ pFrame->IsVisible() )
++nFound;
}
return nFound;
@@ -1825,7 +1825,7 @@ SfxViewFrame* SfxViewFrame::GetFirst
SfxViewFrame *pFrame = rFrames.GetObject(nPos);
if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) &&
( !aType || pFrame->IsA(aType) ) &&
- ( !bOnlyIfVisible || pFrame->IsVisible_Impl()) )
+ ( !bOnlyIfVisible || pFrame->IsVisible()) )
return pFrame;
}
@@ -1857,7 +1857,7 @@ SfxViewFrame* SfxViewFrame::GetNext
SfxViewFrame *pFrame = rFrames.GetObject(nPos);
if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) &&
( !aType || pFrame->IsA(aType) ) &&
- ( !bOnlyIfVisible || pFrame->IsVisible_Impl()) )
+ ( !bOnlyIfVisible || pFrame->IsVisible()) )
return pFrame;
}
return 0;
@@ -1870,7 +1870,7 @@ void SfxViewFrame::CloseHiddenFrames_Impl()
for ( sal_uInt16 nPos=0; nPos<rFrames.Count(); )
{
SfxViewFrame *pFrame = rFrames.GetObject(nPos);
- if ( !pFrame->IsVisible_Impl() )
+ if ( !pFrame->IsVisible() )
pFrame->DoClose();
else
nPos++;
@@ -2142,7 +2142,7 @@ void SfxViewFrame::Show()
}
//--------------------------------------------------------------------
-sal_Bool SfxViewFrame::IsVisible_Impl() const
+sal_Bool SfxViewFrame::IsVisible() const
{
//Window *pWin = pImp->bInCtor ? 0 : &GetWindow();
//return GetFrame()->HasComponent() || pImp->bObjLocked || ( pWin && pWin->IsVisible() );
@@ -2172,7 +2172,7 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
if ( GetViewShell() && !GetFrame()->IsClosing_Impl() )
{
- if ( IsVisible_Impl() )
+ if ( IsVisible() )
{
if ( GetViewShell() )
{
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 97f86ee1f395..9e3791340daa 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -58,6 +58,7 @@ typedef SfxShell* SfxShellPtr_Impl;
SV_DECL_PTRARR( SfxShellArr_Impl, SfxShellPtr_Impl, 4, 4 )
// struct SfxViewShell_Impl ----------------------------------------------
+#if 0
class SfxAsyncPrintExec_Impl : public SfxListener
{
SfxViewShell* pView;
@@ -72,6 +73,7 @@ public:
void AddRequest( SfxRequest& rReq );
};
+#endif
class SfxClipboardChangeListener;
@@ -98,7 +100,7 @@ struct SfxViewShell_Impl
USHORT nFamily;
SfxBaseController* pController;
::svt::AcceleratorExecute* pAccExec;
- SfxAsyncPrintExec_Impl* pPrinterCommandQueue;
+// SfxAsyncPrintExec_Impl* pPrinterCommandQueue;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index e4a53a8a6e7a..24d31337a662 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -33,16 +33,12 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/view/PrintableState.hpp>
+#include "com/sun/star/view/XRenderable.hpp"
+
#include <svl/itempool.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _SV_PRINTDLG_HXX //autogen
#include <svtools/printdlg.hxx>
-#endif
-#ifndef _SV_PRNSETUP_HXX //autogen
#include <svtools/prnsetup.hxx>
-#endif
#include <svl/flagitem.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
@@ -51,9 +47,9 @@
#include <unotools/useroptions.hxx>
#include <unotools/printwarningoptions.hxx>
#include <tools/datetime.hxx>
-
+#include <sfx2/bindings.hxx>
+#include <sfx2/objface.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/dispatch.hxx>
#include "viewimp.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/prnmon.hxx>
@@ -65,50 +61,282 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
+#include "toolkit/awt/vclxdevice.hxx"
+
#include "view.hrc"
#include "helpid.hrc"
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+
TYPEINIT1(SfxPrintingHint, SfxHint);
// -----------------------------------------------------------------------
+class SfxPrinterController : public vcl::PrinterController, public SfxListener
+{
+ Any maCompleteSelection;
+ Any maSelection;
+ Reference< view::XRenderable > mxRenderable;
+ mutable Printer* mpLastPrinter;
+ mutable Reference<awt::XDevice> mxDevice;
+ SfxViewShell* mpViewShell;
+ SfxObjectShell* mpObjectShell;
+ sal_Bool m_bOrigStatus;
+ sal_Bool m_bNeedsChange;
+ sal_Bool m_bApi;
+ util::DateTime m_aLastPrinted;
+ ::rtl::OUString m_aLastPrintedBy;
-void SfxAsyncPrintExec_Impl::AddRequest( SfxRequest& rReq )
+ Sequence< beans::PropertyValue > getMergedOptions() const;
+ const Any& getSelectionObject() const;
+public:
+ SfxPrinterController( const Any& i_rComplete,
+ const Any& i_rSelection,
+ const Any& i_rViewProp,
+ const Reference< view::XRenderable >& i_xRender,
+ sal_Bool i_bApi, sal_Bool i_bDirect,
+ SfxViewShell* pView,
+ const uno::Sequence< beans::PropertyValue >& rProps
+ );
+
+ virtual ~SfxPrinterController();
+ virtual void Notify( SfxBroadcaster&, const SfxHint& );
+
+ virtual int getPageCount() const;
+ virtual Sequence< beans::PropertyValue > getPageParameters( int i_nPage ) const;
+ virtual void printPage( int i_nPage ) const;
+ virtual void jobStarted();
+ virtual void jobFinished( com::sun::star::view::PrintableState );
+};
+
+SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
+ const Any& i_rSelection,
+ const Any& i_rViewProp,
+ const Reference< view::XRenderable >& i_xRender,
+ sal_Bool i_bApi, sal_Bool i_bDirect,
+ SfxViewShell* pView,
+ const uno::Sequence< beans::PropertyValue >& rProps
+ )
+ : maCompleteSelection( i_rComplete )
+ , maSelection( i_rSelection )
+ , mxRenderable( i_xRender )
+ , mpLastPrinter( NULL )
+ , mpViewShell( pView )
+ , mpObjectShell(0)
+ , m_bOrigStatus( sal_False )
+ , m_bNeedsChange( sal_False )
+ , m_bApi(i_bApi)
{
- if ( rReq.GetArgs() )
+ if ( mpViewShell )
{
- // only queue API requests
- if ( aReqs.empty() )
- StartListening( *pView->GetObjectShell() );
+ StartListening( *mpViewShell );
+ mpObjectShell = mpViewShell->GetObjectShell();
+ StartListening( *mpObjectShell );
+ m_bOrigStatus = mpObjectShell->IsEnableSetModified();
+
+ // check configuration: shall update of printing information in DocInfo set the document to "modified"?
+ if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
+ {
+ mpObjectShell->EnableSetModified( sal_False );
+ m_bNeedsChange = sal_True;
+ }
+
+ // refresh document info
+ uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
+ m_aLastPrintedBy = xDocProps->getPrintedBy();
+ m_aLastPrinted = xDocProps->getPrintDate();
+
+ xDocProps->setPrintedBy( mpObjectShell->IsUseUserData()
+ ? ::rtl::OUString( SvtUserOptions().GetFullName() )
+ : ::rtl::OUString() );
+ ::DateTime now;
+
+ xDocProps->setPrintDate( util::DateTime(
+ now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
+ now.GetDay(), now.GetMonth(), now.GetYear() ) );
+ }
- aReqs.push( new SfxRequest( rReq ) );
+ // initialize extra ui options
+ if( mxRenderable.is() )
+ {
+ for (sal_Int32 nProp=0; nProp<rProps.getLength(); nProp++)
+ setValue( rProps[nProp].Name, rProps[nProp].Value );
+
+ Sequence< beans::PropertyValue > aRenderOptions( 3 );
+ aRenderOptions[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ExtraPrintUIOptions" ) );
+ aRenderOptions[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "View" ) );
+ aRenderOptions[1].Value = i_rViewProp;
+ aRenderOptions[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrinter" ) );
+ aRenderOptions[2].Value <<= sal_True;
+ Sequence< beans::PropertyValue > aRenderParms( mxRenderable->getRenderer( 0 , getSelectionObject(), aRenderOptions ) );
+ int nProps = aRenderParms.getLength();
+ for( int i = 0; i < nProps; i++ )
+ {
+ if( aRenderParms[i].Name.equalsAscii( "ExtraPrintUIOptions" ) )
+ {
+ Sequence< beans::PropertyValue > aUIProps;
+ aRenderParms[i].Value >>= aUIProps;
+ setUIOptions( aUIProps );
+ break;
+ }
+ }
}
+
+ // set some job parameters
+ setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsApi" ) ), makeAny( i_bApi ) );
+ setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ), makeAny( i_bDirect ) );
+ setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrinter" ) ), makeAny( sal_True ) );
+ setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "View" ) ), i_rViewProp );
}
-void SfxAsyncPrintExec_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+void SfxPrinterController::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
- if ( &rBC == pView->GetObjectShell() )
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
{
- SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
- if ( pPrintHint && pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_COMPLETED )
+ if ( ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING )
{
- while ( aReqs.front() )
+ EndListening(*mpViewShell);
+ EndListening(*mpObjectShell);
+ mpViewShell = 0;
+ mpObjectShell = 0;
+ }
+ }
+}
+
+SfxPrinterController::~SfxPrinterController()
+{
+}
+
+const Any& SfxPrinterController::getSelectionObject() const
+{
+ sal_Int32 nChoice = 0;
+ sal_Bool bSel = sal_False;
+ const beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ) );
+ if( pVal )
+ pVal->Value >>= nChoice;
+ pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) ) );
+ if( pVal )
+ pVal->Value >>= bSel;
+ return (nChoice > 1 || bSel) ? maSelection : maCompleteSelection;
+}
+
+Sequence< beans::PropertyValue > SfxPrinterController::getMergedOptions() const
+{
+ boost::shared_ptr<Printer> pPrinter( getPrinter() );
+ if( pPrinter.get() != mpLastPrinter )
+ {
+ mpLastPrinter = pPrinter.get();
+ VCLXDevice* pXDevice = new VCLXDevice();
+ pXDevice->SetOutputDevice( mpLastPrinter );
+ mxDevice = Reference< awt::XDevice >( pXDevice );
+ }
+
+ Sequence< beans::PropertyValue > aRenderOptions( 1 );
+ aRenderOptions[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) );
+ aRenderOptions[ 0 ].Value <<= mxDevice;
+
+ aRenderOptions = getJobProperties( aRenderOptions );
+ return aRenderOptions;
+}
+
+int SfxPrinterController::getPageCount() const
+{
+ int nPages = 0;
+ boost::shared_ptr<Printer> pPrinter( getPrinter() );
+ if( mxRenderable.is() && pPrinter )
+ {
+ Sequence< beans::PropertyValue > aJobOptions( getMergedOptions() );
+ nPages = mxRenderable->getRendererCount( getSelectionObject(), aJobOptions );
+ }
+ return nPages;
+}
+
+Sequence< beans::PropertyValue > SfxPrinterController::getPageParameters( int i_nPage ) const
+{
+ boost::shared_ptr<Printer> pPrinter( getPrinter() );
+ Sequence< beans::PropertyValue > aResult;
+
+ if( mxRenderable.is() && pPrinter )
+ {
+ Sequence< beans::PropertyValue > aJobOptions( getMergedOptions() );
+ aResult = mxRenderable->getRenderer( i_nPage, getSelectionObject(), aJobOptions );
+ }
+ return aResult;
+}
+
+void SfxPrinterController::printPage( int i_nPage ) const
+{
+ boost::shared_ptr<Printer> pPrinter( getPrinter() );
+ if( mxRenderable.is() && pPrinter )
+ {
+ Sequence< beans::PropertyValue > aJobOptions( getMergedOptions() );
+ try
+ {
+ mxRenderable->render( i_nPage, getSelectionObject(), aJobOptions );
+ }
+ catch( lang::IllegalArgumentException& )
+ {
+ // don't care enough about nonexistant page here
+ // to provoke a crash
+ }
+ }
+}
+
+void SfxPrinterController::jobStarted()
+{
+ if ( mpObjectShell )
+ {
+ // FIXME: how to get all print options incl. AdditionalOptions easily?
+ uno::Sequence < beans::PropertyValue > aOpts;
+ mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) );
+ }
+}
+
+void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nState )
+{
+ if ( mpObjectShell )
+ {
+ mpObjectShell->Broadcast( SfxPrintingHint( nState ) );
+ switch ( nState )
+ {
+ case view::PrintableState_JOB_FAILED :
{
- SfxRequest* pReq = aReqs.front();
- aReqs.pop();
- pView->GetViewFrame()->GetDispatcher()->Execute( pReq->GetSlot(), SFX_CALLMODE_ASYNCHRON, *pReq->GetArgs() );
- USHORT nSlot = pReq->GetSlot();
- delete pReq;
- if ( nSlot == SID_PRINTDOC || nSlot == SID_PRINTDOCDIRECT )
- // print jobs must be executed before the next command can be dispatched
- break;
+ // "real" problem (not simply printing cancelled by user)
+ String aMsg( SfxResId( STR_NOSTARTPRINTER ) );
+ if ( !m_bApi )
+ ErrorBox( mpViewShell->GetWindow(), WB_OK | WB_DEF_OK, aMsg ).Execute();
+ // intentionally no break
+ }
+ case view::PrintableState_JOB_ABORTED :
+ {
+ // printing not succesful, reset DocInfo
+ uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
+ xDocProps->setPrintedBy(m_aLastPrintedBy);
+ xDocProps->setPrintDate(m_aLastPrinted);
+ break;
}
- if ( aReqs.empty() )
- EndListening( *pView->GetObjectShell() );
+ case view::PrintableState_JOB_SPOOLED :
+ case view::PrintableState_JOB_COMPLETED :
+ {
+ SfxBindings& rBind = mpViewShell->GetViewFrame()->GetBindings();
+ rBind.Invalidate( SID_PRINTDOC );
+ rBind.Invalidate( SID_PRINTDOCDIRECT );
+ rBind.Invalidate( SID_SETUPPRINTER );
+ break;
+ }
+
+ default:
+ break;
}
+
+ if ( m_bNeedsChange )
+ mpObjectShell->EnableSetModified( m_bOrigStatus );
}
}
+// -----------------------------------------------------------------------
+
void DisableRanges( PrintDialog& rDlg, SfxPrinter* pPrinter )
/* [Beschreibung]
@@ -391,68 +619,137 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
#pragma optimize ( "", off )
#endif
-class SfxPrintGuard_Impl
+void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rProps, sal_Bool bIsAPI, sal_Bool bIsDirect )
{
- SfxObjectShell* m_pObjectShell;
- sal_Bool m_bOrigStatus;
- sal_Bool m_bNeedsChange;
-
-public:
- SfxPrintGuard_Impl( SfxObjectShell* pObjectShell )
- : m_pObjectShell( pObjectShell )
- , m_bOrigStatus( sal_False )
- , m_bNeedsChange( sal_False )
- {
- if ( m_pObjectShell )
- {
- m_bOrigStatus = m_pObjectShell->IsEnableSetModified();
+ // get the current selection; our controller should know it
+ Reference< frame::XController > xController( GetController() );
+ Reference< view::XSelectionSupplier > xSupplier( xController, UNO_QUERY );
- // check configuration: shall update of printing information in DocInfo set the document to "modified"?
- if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
- {
- m_pObjectShell->EnableSetModified( sal_False );
- m_bNeedsChange = sal_True;
- }
- }
- }
-
- ~SfxPrintGuard_Impl()
- {
- if ( m_pObjectShell && m_bNeedsChange )
- m_pObjectShell->EnableSetModified( m_bOrigStatus );
- }
-};
+ Any aSelection;
+ if( xSupplier.is() )
+ aSelection = xSupplier->getSelection();
+ else
+ aSelection <<= GetObjectShell()->GetModel();
+ Any aComplete( makeAny( GetObjectShell()->GetModel() ) );
+ Any aViewProp( makeAny( xController ) );
+
+ boost::shared_ptr<vcl::PrinterController> pController( new SfxPrinterController( aComplete,
+ aSelection,
+ aViewProp,
+ GetRenderable(),
+ bIsAPI,
+ bIsDirect,
+ this,
+ rProps
+ ) );
+ SfxObjectShell *pObjShell = GetObjectShell();
+ pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ),
+ makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) );
+
+ // FIXME: job setup
+ SfxPrinter* pDocPrt = GetPrinter(FALSE);
+ JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : GetJobSetup();
+ if( bIsDirect )
+ aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
+ String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
+
+ Printer::PrintJob( pController, aJobSetup );
+}
void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
- USHORT nCopies=1;
+ // USHORT nCopies=1;
USHORT nDialogRet = RET_CANCEL;
- BOOL bCollate=TRUE;
+ // BOOL bCollate=FALSE;
SfxPrinter* pPrinter = 0;
PrintDialog* pPrintDlg = 0;
SfxDialogExecutor_Impl* pExecutor = 0;
bool bSilent = false;
BOOL bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
-
- if ( bIsAPI && GetPrinter( FALSE ) && GetPrinter( FALSE )->IsPrinting() )
+ if ( bIsAPI )
{
- pImp->pPrinterCommandQueue->AddRequest( rReq );
- return;
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
+ bSilent = pSilentItem && pSilentItem->GetValue();
}
+ //FIXME: how to transport "bPrintOnHelp"?
+
+ // no help button in dialogs if called from the help window
+ // (pressing help button would exchange the current page inside the help document that is going to be printed!)
+ String aHelpFilterName( DEFINE_CONST_UNICODE("writer_web_HTML_help") );
+ SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium();
+ const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
+ sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName );
+
const USHORT nId = rReq.GetSlot();
switch( nId )
{
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
case SID_PRINTDOC:
- case SID_SETUPPRINTER:
- case SID_PRINTER_NAME :
+ case SID_PRINTDOCDIRECT:
{
- // quiet mode (AppEvent, API call)
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
- bSilent = pSilentItem && pSilentItem->GetValue();
+ SfxObjectShell* pDoc = GetObjectShell();
+ bool bDetectHidden = ( !bSilent && pDoc );
+ if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
+ break;
+
+ SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE);
+ sal_Bool bSelection = pSelectItem && pSelectItem->GetValue();
+ if( pSelectItem && rReq.GetArgs()->Count() == 1 )
+ bIsAPI = FALSE;
+
+ uno::Sequence < beans::PropertyValue > aProps;
+ if ( bIsAPI )
+ {
+ // supported properties:
+ // String PrinterName
+ // String FileName
+ // Int16 From
+ // Int16 To
+ // In16 Copies
+ // String RangeText
+ // bool Selection
+ // bool Asynchron
+ // bool Collate
+ // bool Silent
+ TransformItems( nId, *rReq.GetArgs(), aProps, GetInterface()->GetSlot(nId) );
+ for ( sal_Int32 nProp=0; nProp<aProps.getLength(); nProp++ )
+ {
+ if ( aProps[nProp].Name.equalsAscii("Copies") )
+ aProps[nProp]. Name = rtl::OUString::createFromAscii("CopyCount");
+ else if ( aProps[nProp].Name.equalsAscii("RangeText") )
+ aProps[nProp]. Name = rtl::OUString::createFromAscii("Pages");
+ if ( aProps[nProp].Name.equalsAscii("Asynchron") )
+ {
+ aProps[nProp]. Name = rtl::OUString::createFromAscii("Wait");
+ sal_Bool bAsynchron = sal_False;
+ aProps[nProp].Value >>= bAsynchron;
+ aProps[nProp].Value <<= (sal_Bool) (!bAsynchron);
+ }
+ if ( aProps[nProp].Name.equalsAscii("Silent") )
+ {
+ aProps[nProp]. Name = rtl::OUString::createFromAscii("MonitorVisible");
+ sal_Bool bPrintSilent = sal_False;
+ aProps[nProp].Value >>= bPrintSilent;
+ aProps[nProp].Value <<= (sal_Bool) (!bPrintSilent);
+ }
+ }
+ }
+ sal_Int32 nLen = aProps.getLength();
+ aProps.realloc( nLen + 1 );
+ aProps[nLen].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintSelectionOnly" ) );
+ aProps[nLen].Value = makeAny( bSelection );
+
+ ExecPrint( aProps, bIsAPI, (nId == SID_PRINTDOCDIRECT) );
+
+ // FIXME: Recording
+ rReq.Done();
+ break;
+ }
+ case SID_SETUPPRINTER :
+ case SID_PRINTER_NAME : // only for recorded macros
+ {
// get printer and printer settings from the document
SfxPrinter *pDocPrinter = GetPrinter(TRUE);
@@ -473,7 +770,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// just set a recorded printer name
if ( pPrinter )
SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- return;
+ break;
}
// no PrinterName parameter in ItemSet or the PrinterName points to an unknown printer
@@ -487,7 +784,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if ( bSilent )
{
rReq.SetReturnValue(SfxBoolItem(0,FALSE));
- return;
+ break;
}
else
ErrorBox( NULL, WB_OK | WB_DEF_OK, String( SfxResId( STR_NODEFPRINTER ) ) ).Execute();
@@ -497,112 +794,57 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
// printer is not available, but standard printer should not be used
rReq.SetReturnValue(SfxBoolItem(0,FALSE));
- return;
+ break;
}
+ // FIXME: printer isn't used for printing anymore!
if( pPrinter->IsPrinting() )
{
// if printer is busy, abort printing
if ( !bSilent )
InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute();
rReq.SetReturnValue(SfxBoolItem(0,FALSE));
- return;
+ break;
}
- // the print dialog shouldn't use a help button if it is called from the help window
- // (pressing help button would exchange the current page inside the help document that is going to be printed!)
- String aHelpFilterName( DEFINE_CONST_UNICODE("writer_web_HTML_help") );
- SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium();
- const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
- sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName );
-
- SfxObjectShell* pDoc = NULL;
- if ( SID_PRINTDOC == nId )
- pDoc = GetObjectShell();
-
- // Let the document stay nonmodified during the printing if the configuration says to do so
- SfxPrintGuard_Impl aGuard( pDoc );
-
// if no arguments are given, retrieve them from a dialog
if ( !bIsAPI )
{
// PrinterDialog needs a temporary printer
SfxPrinter* pDlgPrinter = pPrinter->Clone();
nDialogRet = 0;
- if ( SID_PRINTDOC == nId )
+
+ // execute PrinterSetupDialog
+ PrinterSetupDialog* pPrintSetupDlg = new PrinterSetupDialog( GetWindow() );
+
+ if ( pImp->bHasPrintOptions )
{
- bool bDetectHidden = ( !bSilent && !bPrintOnHelp && pDoc );
- if ( !bDetectHidden
- || pDoc->QueryHiddenInformation( WhenPrinting, NULL ) == RET_YES )
- {
- // execute PrintDialog
- pPrintDlg = CreatePrintDialog( NULL );
- if ( bPrintOnHelp )
- pPrintDlg->DisableHelp();
-
- if ( pImp->bHasPrintOptions )
- {
- // additional controls for dialog
- pExecutor = new SfxDialogExecutor_Impl( this, pPrintDlg );
- if ( bPrintOnHelp )
- pExecutor->DisableHelp();
- pPrintDlg->SetOptionsHdl( pExecutor->GetLink() );
- pPrintDlg->ShowOptionsButton();
- }
-
- // set printer on dialog and execute
- pPrintDlg->SetPrinter( pDlgPrinter );
- ::DisableRanges( *pPrintDlg, pDlgPrinter );
- nDialogRet = pPrintDlg->Execute();
- if ( pExecutor && pExecutor->GetOptions() )
- {
- if ( nDialogRet == RET_OK )
- // remark: have to be recorded if possible!
- pDlgPrinter->SetOptions( *pExecutor->GetOptions() );
- else
- {
- pPrinter->SetOptions( *pExecutor->GetOptions() );
- SetPrinter( pPrinter, SFX_PRINTER_OPTIONS );
- }
- }
-
- DELETEZ( pExecutor );
- }
+ // additional controls for dialog
+ pExecutor = new SfxDialogExecutor_Impl( this, pPrintSetupDlg );
+ if ( bPrintOnHelp )
+ pExecutor->DisableHelp();
+ pPrintSetupDlg->SetOptionsHdl( pExecutor->GetLink() );
}
- else
- {
- // execute PrinterSetupDialog
- PrinterSetupDialog* pPrintSetupDlg = new PrinterSetupDialog( GetWindow() );
-
- if ( pImp->bHasPrintOptions )
- {
- // additional controls for dialog
- pExecutor = new SfxDialogExecutor_Impl( this, pPrintSetupDlg );
- if ( bPrintOnHelp )
- pExecutor->DisableHelp();
- pPrintSetupDlg->SetOptionsHdl( pExecutor->GetLink() );
- }
- pPrintSetupDlg->SetPrinter( pDlgPrinter );
- nDialogRet = pPrintSetupDlg->Execute();
+ pPrintSetupDlg->SetPrinter( pDlgPrinter );
+ nDialogRet = pPrintSetupDlg->Execute();
- if ( pExecutor && pExecutor->GetOptions() )
+ if ( pExecutor && pExecutor->GetOptions() )
+ {
+ if ( nDialogRet == RET_OK )
+ // remark: have to be recorded if possible!
+ pDlgPrinter->SetOptions( *pExecutor->GetOptions() );
+ else
{
- if ( nDialogRet == RET_OK )
- // remark: have to be recorded if possible!
- pDlgPrinter->SetOptions( *pExecutor->GetOptions() );
- else
- {
- pPrinter->SetOptions( *pExecutor->GetOptions() );
- SetPrinter( pPrinter, SFX_PRINTER_OPTIONS );
- }
+ pPrinter->SetOptions( *pExecutor->GetOptions() );
+ SetPrinter( pPrinter, SFX_PRINTER_OPTIONS );
}
+ }
- DELETEZ( pPrintSetupDlg );
+ DELETEZ( pPrintSetupDlg );
- // no recording of PrinterSetup except printer name (is printer dependent)
- rReq.Ignore();
- }
+ // no recording of PrinterSetup except printer name (is printer dependent)
+ rReq.Ignore();
if ( nDialogRet == RET_OK )
{
@@ -623,14 +865,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
/* Now lets reset the Dialog printer, since its freed */
if (pPrintDlg)
pPrintDlg->SetPrinter (pPrinter);
-
- if ( SID_PRINTDOC == nId )
- {
- nCopies = pPrintDlg->GetCopyCount();
- bCollate = pPrintDlg->IsCollateChecked();
- }
- else
- break;
}
else
{
@@ -641,226 +875,11 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
rReq.Ignore();
if ( SID_PRINTDOC == nId )
rReq.SetReturnValue(SfxBoolItem(0,FALSE));
- break;
- }
-
- // recording
- rReq.AppendItem( SfxBoolItem( SID_PRINT_COLLATE, bCollate ) );
- rReq.AppendItem( SfxInt16Item( SID_PRINT_COPIES, (INT16) pPrintDlg->GetCopyCount() ) );
- if ( pPrinter->IsPrintFileEnabled() )
- rReq.AppendItem( SfxStringItem( SID_FILE_NAME, pPrinter->GetPrintFile() ) );
- if ( pPrintDlg->IsRangeChecked(PRINTDIALOG_SELECTION) )
- rReq.AppendItem( SfxBoolItem( SID_SELECTION, TRUE ) );
- else if ( pPrintDlg->IsRangeChecked(PRINTDIALOG_RANGE) )
- rReq.AppendItem( SfxStringItem( SID_PRINT_PAGES, pPrintDlg->GetRangeText() ) );
- else if ( pPrintDlg->IsRangeChecked(PRINTDIALOG_FROMTO) )
- {
- // currently this doesn't seem to work -> return values of dialog are always 0
- // seems to be encoded as range string like "1-3"
- rReq.AppendItem( SfxInt16Item( SID_PRINT_FIRST_PAGE, (INT16) pPrintDlg->GetFirstPage() ) );
- rReq.AppendItem( SfxInt16Item( SID_PRINT_LAST_PAGE, (INT16) pPrintDlg->GetLastPage() ) );
}
}
- else if ( rReq.GetArgs() )
- {
- if ( SID_PRINTDOC != nId )
- {
- DBG_ERROR("Wrong slotid!");
- break;
- }
-
- // PrinterDialog is used to transfer information on printing
- pPrintDlg = CreatePrintDialog( GetWindow() );
- if ( bPrintOnHelp )
- pPrintDlg->DisableHelp();
- pPrintDlg->SetPrinter( pPrinter );
- ::DisableRanges( *pPrintDlg, pPrinter );
-
- // PrintToFile requested?
- SFX_REQUEST_ARG(rReq, pFileItem, SfxStringItem, SID_FILE_NAME, FALSE);
- if ( pFileItem )
- {
- pPrinter->EnablePrintFile(TRUE);
- pPrinter->SetPrintFile( pFileItem->GetValue() );
- }
-
- // Collate
- SFX_REQUEST_ARG(rReq, pCollateItem, SfxBoolItem, SID_PRINT_COLLATE, FALSE);
- if ( pCollateItem )
- {
- bCollate = pCollateItem->GetValue();
- pPrintDlg->CheckCollate( bCollate );
- }
-
- // Selection
- SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE);
-
- // Pages (as String)
- SFX_REQUEST_ARG(rReq, pPagesItem, SfxStringItem, SID_PRINT_PAGES, FALSE);
-
- // FirstPage
- SFX_REQUEST_ARG(rReq, pFirstPgItem, SfxInt16Item, SID_PRINT_FIRST_PAGE, FALSE);
- USHORT nFrom = 1;
- if ( pFirstPgItem )
- nFrom = pFirstPgItem->GetValue();
-
- // LastPage
- SFX_REQUEST_ARG(rReq, pLastPgItem, SfxInt16Item, SID_PRINT_LAST_PAGE, FALSE);
- USHORT nTo = 9999;
- if ( pLastPgItem )
- nTo = pLastPgItem->GetValue();
-
- // CopyCount
- SFX_REQUEST_ARG(rReq, pCopyItem, SfxInt16Item, SID_PRINT_COPIES, FALSE);
- if ( pCopyItem )
- {
- nCopies = pCopyItem->GetValue();
- pPrintDlg->SetCopyCount( nCopies );
- }
-
- // does the view support ranges?
- if ( pSelectItem && pSelectItem->GetValue() )
- {
- // print selection only
- pPrintDlg->CheckRange(PRINTDIALOG_SELECTION);
- }
- else if ( pPagesItem )
- {
- // get range text from parameter
- // enable ranges
- pPrintDlg->CheckRange(PRINTDIALOG_RANGE);
- pPrintDlg->SetRangeText( pPagesItem->GetValue() );
- }
- else if ( pPrintDlg->IsRangeEnabled(PRINTDIALOG_RANGE) )
- {
- // enable ranges
- // construct range text from page range
- pPrintDlg->CheckRange(PRINTDIALOG_RANGE);
- String aRange = String::CreateFromInt32( nFrom );
- aRange += '-';
- aRange += String::CreateFromInt32( nTo );
- pPrintDlg->SetRangeText( aRange );
- }
- else
- {
- // print page rage
- pPrintDlg->CheckRange(PRINTDIALOG_FROMTO);
- pPrintDlg->SetFirstPage( nFrom );
- pPrintDlg->SetLastPage( nTo );
- }
- }
-
- // intentionally no break for SID_PRINTDOC
- // printing now proceeds like SID_PRINTDOCDIRECT
}
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- case SID_PRINTDOCDIRECT:
- {
- if ( SID_PRINTDOCDIRECT == nId )
- {
- SfxObjectShell* pDoc = GetObjectShell();
- bool bDetectHidden = ( !bSilent && pDoc );
- if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
- return;
-
- // if no printer was selected before
- if ( !pPrinter )
- pPrinter = GetPrinter(TRUE);
-
- if( !pPrinter->IsValid() )
- {
- // redirect slot to call the print dialog if the document's printer is not valid!
- rReq.SetSlot( SID_PRINTDOC );
- ExecPrint_Impl( rReq );
- return;
- }
-
- if( pPrinter->IsOriginal() && pPrinter->GetName() != Printer::GetDefaultPrinterName() )
- {
- // redirect slot to call the print dialog
- // if the document's printer is available but not system default
- rReq.SetSlot( SID_PRINTDOC );
- ExecPrint_Impl( rReq );
- return;
- }
-
- pPrinter->SetNextJobIsQuick();
- }
-
- // if "Collate" was checked, the SfxPrinter must handle the CopyCount itself,
- // usually this is handled by the printer driver
- if( bCollate )
- // set printer to default, handle multiple copies explicitly
- pPrinter->SetCopyCount( 1 );
- else
- pPrinter->SetCopyCount( nCopies );
-
- // enable background printing
- pPrinter->SetPageQueueSize( 1 );
-
- // refresh document info
- using namespace ::com::sun::star;
- SfxObjectShell *pObjSh = GetObjectShell();
- uno::Reference<document::XDocumentProperties> xDocProps(
- pObjSh->getDocProperties());
- ::rtl::OUString aLastPrintedBy = xDocProps->getPrintedBy();
- util::DateTime aLastPrinted = xDocProps->getPrintDate();
-
- // Let the document stay nonmodified during the printing if the configuration says to do so
- SfxPrintGuard_Impl aGuard( pObjSh );
-
- xDocProps->setPrintedBy( GetObjectShell()->IsUseUserData()
- ? ::rtl::OUString( SvtUserOptions().GetFullName() )
- : ::rtl::OUString() );
- ::DateTime now;
- xDocProps->setPrintDate( util::DateTime(
- now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
- now.GetDay(), now.GetMonth(), now.GetYear() ) );
-
- GetObjectShell()->Broadcast( SfxPrintingHint( -1, pPrintDlg, pPrinter ) );
- ErrCode nError = DoPrint( pPrinter, pPrintDlg, bSilent, bIsAPI );
- if ( nError == PRINTER_OK )
- {
- Invalidate( SID_PRINTDOC );
- Invalidate( SID_PRINTDOCDIRECT );
- Invalidate( SID_SETUPPRINTER );
- rReq.SetReturnValue(SfxBoolItem(0,TRUE));
-
- SFX_REQUEST_ARG(rReq, pAsyncItem, SfxBoolItem, SID_ASYNCHRON, FALSE);
- if ( pAsyncItem && !pAsyncItem->GetValue() )
- {
- // synchronous execution wanted - wait for end of printing
- while ( pPrinter->IsPrinting())
- Application::Yield();
- }
-
- rReq.Done();
- }
- else
- {
- // printing not succesful, reset DocInfo
- xDocProps->setPrintedBy(aLastPrintedBy);
- xDocProps->setPrintDate(aLastPrinted);
-
- if ( nError != PRINTER_ABORT )
- {
- // "real" problem (not simply printing cancelled by user)
- String aMsg( SfxResId( STR_NOSTARTPRINTER ) );
- if ( !bIsAPI )
- ErrorBox( NULL, WB_OK | WB_DEF_OK, aMsg ).Execute();
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
- }
-
- rReq.Ignore();
- }
-
- pPrinter->SetNextJobIsQuick( false );
-
- delete pPrintDlg;
- break;
- }
+ break;
}
}
@@ -871,7 +890,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
//--------------------------------------------------------------------
-PrintDialog* SfxViewShell::CreatePrintDialog( Window* pParent )
+PrintDialog* SfxViewShell::CreatePrintDialog( Window* /*pParent*/ )
/* [Beschreibung]
@@ -881,11 +900,15 @@ PrintDialog* SfxViewShell::CreatePrintDialog( Window* pParent )
*/
{
+ #if 0
PrintDialog *pDlg = new PrintDialog( pParent, false );
pDlg->SetFirstPage( 1 );
pDlg->SetLastPage( 9999 );
pDlg->EnableCollate();
return pDlg;
+ #else
+ return NULL;
+ #endif
}
//--------------------------------------------------------------------
@@ -897,10 +920,11 @@ void SfxViewShell::PreparePrint( PrintDialog * )
//--------------------------------------------------------------------
-ErrCode SfxViewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDlg,
- BOOL bSilent, BOOL bIsAPI )
+ErrCode SfxViewShell::DoPrint( SfxPrinter* /*pPrinter*/,
+ PrintDialog* /*pPrintDlg*/,
+ BOOL /*bSilent*/, BOOL /*bIsAPI*/ )
{
+ #if 0
// Printer-Dialogbox waehrend des Ausdrucks mu\s schon vor
// StartJob erzeugt werden, da SV bei einem Quit-Event h"angt
SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
@@ -910,11 +934,8 @@ ErrCode SfxViewShell::DoPrint( SfxPrinter *pPrinter,
else if ( pDocPrinter != pPrinter )
{
pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
- USHORT nError = SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- if ( nError != SFX_PRINTERROR_NONE )
- return PRINTER_ACCESSDENIED;
+ SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
}
-
pProgress->SetWaitMode(FALSE);
// Drucker starten
@@ -935,6 +956,10 @@ ErrCode SfxViewShell::DoPrint( SfxPrinter *pPrinter,
}
return pPrinter->GetError();
+ #else
+ DBG_ERROR( "DoPrint called, dead code !" );
+ return ERRCODE_IO_NOTSUPPORTED;
+ #endif
}
//--------------------------------------------------------------------
@@ -990,23 +1015,12 @@ SfxTabPage* SfxViewShell::CreatePrintOptionsPage
Window* /*pParent*/,
const SfxItemSet& /*rOptions*/
)
-
-/* [Beschreibung]
-
- Diese Factory-Methode wird vom SFx verwendet, um die TabPage mit den
- Print-Optionen, welche "uber das <SfxItemSet> am <SfxPrinter>
- transportiert werden, zu erzeugen.
-
- Abgeleitete Klassen k"onnen diese Methode also "uberladen um die zu
- ihren SfxPrinter passenden Einstellungen vorzunehmen. Dieses sollte
- genau die <SfxTabPage> sein, die auch unter Extras/Einstellungen
- verwendet wird.
-
- Die Basisimplementierung liefert einen 0-Pointer.
-*/
-
{
return 0;
}
+JobSetup SfxViewShell::GetJobSetup() const
+{
+ return JobSetup();
+}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 86c9ba0bb70e..4ee90289347e 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1261,7 +1261,7 @@ SfxViewShell::SfxViewShell
{
DBG_CTOR(SfxViewShell, 0);
- pImp->pPrinterCommandQueue = new SfxAsyncPrintExec_Impl( this );
+ //pImp->pPrinterCommandQueue = new SfxAsyncPrintExec_Impl( this );
pImp->pController = 0;
pImp->bIsShowView =
!(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW));
@@ -1322,7 +1322,7 @@ SfxViewShell::~SfxViewShell()
DELETEZ( pImp->pAccExec );
}
- DELETEZ( pImp->pPrinterCommandQueue );
+ //DELETEZ( pImp->pPrinterCommandQueue );
DELETEZ( pImp );
DELETEZ( pIPClientList );
}
@@ -1578,7 +1578,7 @@ SfxViewShell* SfxViewShell::GetFirst
if ( pFrame == pShell->GetViewFrame() )
{
// only ViewShells with a valid ViewFrame will be returned
- if ( ( !bOnlyVisible || pFrame->IsVisible_Impl() ) && ( !pType || pShell->IsA(*pType) ) )
+ if ( ( !bOnlyVisible || pFrame->IsVisible() ) && ( !pType || pShell->IsA(*pType) ) )
return pShell;
break;
}
@@ -1620,7 +1620,7 @@ SfxViewShell* SfxViewShell::GetNext
if ( pFrame == pShell->GetViewFrame() )
{
// only ViewShells with a valid ViewFrame will be returned
- if ( ( !bOnlyVisible || pFrame->IsVisible_Impl() ) && ( !pType || pShell->IsA(*pType) ) )
+ if ( ( !bOnlyVisible || pFrame->IsVisible() ) && ( !pType || pShell->IsA(*pType) ) )
return pShell;
break;
}
@@ -2211,7 +2211,7 @@ BOOL SfxViewShell::HasMouseClickListeners_Impl()
void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
{
pImp->aPrintOpts = rOpts;
- GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) );
+// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) );
}
BOOL SfxViewShell::Escape()
@@ -2219,6 +2219,19 @@ BOOL SfxViewShell::Escape()
return GetViewFrame()->GetBindings().Execute( SID_TERMINATE_INPLACEACTIVATION );
}
+Reference< view::XRenderable > SfxViewShell::GetRenderable()
+{
+ Reference< view::XRenderable >xRender;
+ SfxObjectShell* pObj = GetObjectShell();
+ if( pObj )
+ {
+ Reference< frame::XModel > xModel( pObj->GetModel() );
+ if( xModel.is() )
+ xRender = Reference< view::XRenderable >( xModel, UNO_QUERY );
+ }
+ return xRender;
+}
+
void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd )
{
try
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index c3b6f91c9dd7..c3b6f91c9dd7 100755..100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 74248a6e8cd7..c81283b50ebb 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m69(Build:9475)
-BUILD=9475
-LAST_MINOR=m69
+RSCREVISION=300m70(Build:9478)
+BUILD=9478
+LAST_MINOR=m70
SOURCEVERSION=DEV300
diff --git a/solenv/inc/postset.mk b/solenv/inc/postset.mk
index 30bb91599903..4a7f6aeae28c 100644
--- a/solenv/inc/postset.mk
+++ b/solenv/inc/postset.mk
@@ -114,6 +114,7 @@ pl \
ps \
pt \
pt-BR \
+ro \
ru \
rw \
sat \
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 46ae3529439c..0e20af6118af 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -1104,7 +1104,7 @@ StgTmpStrm::~StgTmpStrm()
}
}
-ULONG StgTmpStrm::GetSize()
+ULONG StgTmpStrm::GetSize() const
{
ULONG n;
if( pStrm )
diff --git a/sot/source/sdstor/stgstrms.hxx b/sot/source/sdstor/stgstrms.hxx
index 806d562af6d0..fd7971da3aba 100644
--- a/sot/source/sdstor/stgstrms.hxx
+++ b/sot/source/sdstor/stgstrms.hxx
@@ -167,8 +167,7 @@ public:
~StgTmpStrm();
BOOL Copy( StgTmpStrm& );
void SetSize( ULONG );
- using SvMemoryStream::GetSize;
- ULONG GetSize();
+ ULONG GetSize() const;
};
#endif
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 94bffbaad48d..210f2022b760 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -38,11 +38,10 @@
#include <svl/lstner.hxx>
#include <sfx2/docfac.hxx>
#include <vcl/virdev.hxx>
+
#include "format.hxx"
#include "parse.hxx"
-#ifndef SMMOD_HXX
#include "smmod.hxx"
-#endif
#include <vcl/jobset.hxx>
@@ -84,6 +83,8 @@ class Printer;
class SmDocShell;
class EditEngine;
+////////////////////////////////////////////////////////////
+
class SmPrinterAccess
{
Printer* pPrinter;
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 0f93e6551cc9..96f405ed7e8e 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -103,6 +103,8 @@
#define RID_SYMBOLDIALOG (RID_APP_START + 8)
#define RID_SYMDEFINEDIALOG (RID_APP_START + 9)
#define RID_EXTRAOPTIONPAGE (RID_APP_START + 10)
+#define RID_PRINTUIOPTIONS (RID_APP_START + 11)
+
#define RID_MATH_TOOLBOX (RID_APP_START + 50)
// wegen #58705# entfernt
//#define RID_DRAW_OBJECTBAR (RID_APP_START + 51)
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index 3cf63b076391..be3db98dbd94 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -31,9 +31,9 @@
#define TYPES_HXX
#include <sal/types.h>
+#include <tools/debug.hxx>
-#define FONTNAME_MATH "StarSymbol"
-#define FONTNAME_MATH2 "OpenSymbol"
+#define FONTNAME_MATH "OpenSymbol"
/////////////////////////////////////////////////////////////////
@@ -54,19 +54,8 @@ inline sal_Bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar
inline sal_Bool IsGreekChar( sal_Unicode cChar ) { return 0x0370 <= cChar && cChar <= 0x03FF; }
sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar );
-#ifdef TL_NOT_YET_USED
-sal_Unicode ConvertUnicodeToMathPrivateUseArea( sal_Unicode cChar );
-
-sal_Unicode ConvertMathToMathType( sal_Unicode cChar );
-sal_Unicode ConvertMathTypeToMath( sal_Unicode cChar );
-#endif //TL_NOT_YET_USED
sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
-#ifdef TL_NOT_YET_USED
-sal_Unicode ConvertMathMLToMath( sal_Unicode cChar );
-
-sal_Unicode GetTokenChar( sal_Unicode cChar, sal_Bool bConvertForExport );
-#endif //TL_NOT_YET_USED
/////////////////////////////////////////////////////////////////
// enum definitions for characters from the 'StarSymbol' font
@@ -84,14 +73,14 @@ enum MathSymbol
MS_DRARROW = (sal_Unicode) 0x21D2,
MS_DLARROW = (sal_Unicode) 0x21D0,
MS_DLRARROW = (sal_Unicode) 0x21D4,
- MS_UNDERBRACE = (sal_Unicode) 0xE081,
- MS_OVERBRACE = (sal_Unicode) 0xE082,
- MS_CIRC = (sal_Unicode) 0x00B0,
+ MS_OVERBRACE = (sal_Unicode) 0x23DE,
+ MS_UNDERBRACE = (sal_Unicode) 0x23DF,
+ MS_CIRC = (sal_Unicode) 0x2218,
MS_ASSIGN = (sal_Unicode) 0x003D,
MS_ERROR = (sal_Unicode) 0x00BF,
MS_NEQ = (sal_Unicode) 0x2260,
- MS_PLUS = (sal_Unicode) 0xE083,
+ MS_PLUS = (sal_Unicode) 0x002B,
MS_MINUS = (sal_Unicode) 0x2212,
MS_MULTIPLY = (sal_Unicode) 0x2217,
MS_TIMES = (sal_Unicode) 0x00D7,
@@ -107,23 +96,23 @@ enum MathSymbol
MS_UNION = (sal_Unicode) 0x222A,
MS_INTERSECT = (sal_Unicode) 0x2229,
- MS_LT = (sal_Unicode) 0xE084,
- MS_GT = (sal_Unicode) 0xE085,
+ MS_LT = (sal_Unicode) 0x003C,
+ MS_GT = (sal_Unicode) 0x003E,
MS_LE = (sal_Unicode) 0x2264,
MS_GE = (sal_Unicode) 0x2265,
- MS_LESLANT = (sal_Unicode) 0xE086,
- MS_GESLANT = (sal_Unicode) 0xE087,
+ MS_LESLANT = (sal_Unicode) 0x2A7D,
+ MS_GESLANT = (sal_Unicode) 0x2A7E,
MS_LL = (sal_Unicode) 0x226A,
MS_GG = (sal_Unicode) 0x226B,
- MS_SIM = (sal_Unicode) 0x007E,
+ MS_SIM = (sal_Unicode) 0x223C,
MS_SIMEQ = (sal_Unicode) 0x2243,
MS_APPROX = (sal_Unicode) 0x2248,
MS_DEF = (sal_Unicode) 0x225D,
MS_EQUIV = (sal_Unicode) 0x2261,
MS_PROP = (sal_Unicode) 0x221D,
MS_PARTIAL = (sal_Unicode) 0x2202,
- MS_SUBSET = (sal_Unicode) 0x2282,
+ MS_SUBSET = (sal_Unicode) 0x2282,
MS_SUPSET = (sal_Unicode) 0x2283,
MS_SUBSETEQ = (sal_Unicode) 0x2286,
MS_SUPSETEQ = (sal_Unicode) 0x2287,
@@ -143,70 +132,69 @@ enum MathSymbol
MS_LINE = (sal_Unicode) 0x2223,
MS_DLINE = (sal_Unicode) 0x2225,
MS_ORTHO = (sal_Unicode) 0x22A5,
- MS_DOTSLOW = (sal_Unicode) 0xE08B,
+ MS_DOTSLOW = (sal_Unicode) 0x2026,
MS_DOTSAXIS = (sal_Unicode) 0x22EF,
MS_DOTSVERT = (sal_Unicode) 0x22EE,
MS_DOTSUP = (sal_Unicode) 0x22F0,
MS_DOTSDOWN = (sal_Unicode) 0x22F1,
MS_TRANSR = (sal_Unicode) 0x22B6,
MS_TRANSL = (sal_Unicode) 0x22B7,
- MS_RIGHTARROW = (sal_Unicode) 0xE08C,
MS_BACKSLASH = (sal_Unicode) 0x2216,
MS_NEG = (sal_Unicode) 0x00AC,
+ MS_FORALL = (sal_Unicode) 0x2200,
+ MS_NABLA = (sal_Unicode) 0x2207,
+ MS_PROD = (sal_Unicode) 0x220F,
+ MS_COPROD = (sal_Unicode) 0x2210,
+ MS_SUM = (sal_Unicode) 0x2211,
+ MS_SQRT = (sal_Unicode) 0x221A,
MS_INT = (sal_Unicode) 0x222B,
MS_IINT = (sal_Unicode) 0x222C,
MS_IIINT = (sal_Unicode) 0x222D,
MS_LINT = (sal_Unicode) 0x222E,
MS_LLINT = (sal_Unicode) 0x222F,
MS_LLLINT = (sal_Unicode) 0x2230,
- MS_SQRT = (sal_Unicode) 0xE08D,
- MS_COPROD = (sal_Unicode) 0x2210,
- MS_PROD = (sal_Unicode) 0x220F,
- MS_SUM = (sal_Unicode) 0x2211,
- MS_NABLA = (sal_Unicode) 0x2207,
- MS_FORALL = (sal_Unicode) 0x2200,
- MS_HAT = (sal_Unicode) 0xE091,
- MS_CHECK = (sal_Unicode) 0xE092,
- MS_BREVE = (sal_Unicode) 0xE093,
- MS_ACUTE = (sal_Unicode) 0xE094,
- MS_GRAVE = (sal_Unicode) 0xE095,
- MS_TILDE = (sal_Unicode) 0xE096,
- MS_BAR = (sal_Unicode) 0xE097,
- MS_VEC = (sal_Unicode) 0xE098,
+ MS_GRAVE = (sal_Unicode) 0x0300,
+ MS_ACUTE = (sal_Unicode) 0x0301,
+ MS_HAT = (sal_Unicode) 0x0302,
+ MS_TILDE = (sal_Unicode) 0x0303,
+ MS_BAR = (sal_Unicode) 0x0304,
+ MS_BREVE = (sal_Unicode) 0x0306,
+ MS_CIRCLE = (sal_Unicode) 0x030A,
+ MS_CHECK = (sal_Unicode) 0x030C,
+ MS_VEC = (sal_Unicode) 0x20D7,
MS_DOT = (sal_Unicode) 0x02D9,
MS_DDOT = (sal_Unicode) 0x00A8,
- MS_DDDOT = (sal_Unicode) 0xE09B,
- MS_CIRCLE = (sal_Unicode) 0x02DA,
+ MS_DDDOT = (sal_Unicode) 0x20DB,
MS_AND = (sal_Unicode) 0x2227,
MS_OR = (sal_Unicode) 0x2228,
MS_NI = (sal_Unicode) 0x220B,
MS_EMPTYSET = (sal_Unicode) 0x2205,
- MS_LBRACE = (sal_Unicode) 0x007B,
- MS_RBRACE = (sal_Unicode) 0x007D,
- MS_LPARENT = (sal_Unicode) 0xE09E,
- MS_RPARENT = (sal_Unicode) 0xE09F,
- MS_LANGLE = (sal_Unicode) 0x2329,
- MS_RANGLE = (sal_Unicode) 0x232A,
+ MS_LPARENT = (sal_Unicode) 0x0028,
+ MS_RPARENT = (sal_Unicode) 0x0029,
MS_LBRACKET = (sal_Unicode) 0x005B,
MS_RBRACKET = (sal_Unicode) 0x005D,
-
- MS_LDBRACKET = (sal_Unicode) 0x301A,
- MS_RDBRACKET = (sal_Unicode) 0x301B,
- MS_PLACE = (sal_Unicode) 0xE0AA,
-
+ MS_LBRACE = (sal_Unicode) 0x007B,
+ MS_RBRACE = (sal_Unicode) 0x007D,
MS_LCEIL = (sal_Unicode) 0x2308,
- MS_LFLOOR = (sal_Unicode) 0x230A,
MS_RCEIL = (sal_Unicode) 0x2309,
+ MS_LFLOOR = (sal_Unicode) 0x230A,
MS_RFLOOR = (sal_Unicode) 0x230B,
+ MS_LANGLE = (sal_Unicode) 0x2329,
+ MS_RANGLE = (sal_Unicode) 0x232A,
+ MS_LDBRACKET = (sal_Unicode) 0x27E6,
+ MS_RDBRACKET = (sal_Unicode) 0x27E7,
+
+ MS_PLACE = (sal_Unicode) 0x2751,
- MS_HBAR = (sal_Unicode) 0x210F,
MS_LAMBDABAR = (sal_Unicode) 0x019B,
- MS_LEFTARROW = (sal_Unicode) 0xE0DB,
- MS_UPARROW = (sal_Unicode) 0xE0DC,
- MS_DOWNARROW = (sal_Unicode) 0xE0DD,
+ MS_HBAR = (sal_Unicode) 0x210F,
+ MS_LEFTARROW = (sal_Unicode) 0x2190,
+ MS_UPARROW = (sal_Unicode) 0x2191,
+ MS_RIGHTARROW = (sal_Unicode) 0x2192,
+ MS_DOWNARROW = (sal_Unicode) 0x2193,
MS_SETN = (sal_Unicode) 0x2115,
MS_SETZ = (sal_Unicode) 0x2124,
MS_SETQ = (sal_Unicode) 0x211A,
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index 50cdc372d593..f05c4beec7ae 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -35,11 +35,30 @@
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/view/XRenderable.hpp>
+
#include <sfx2/sfxbasemodel.hxx>
#include <comphelper/propertysethelper.hxx>
+#include <vcl/print.hxx>
class SmFormat;
+////////////////////////////////////////////////////////////
+
+#define PRTUIOPT_TITLE_ROW "TitleRow"
+#define PRTUIOPT_FORMULA_TEXT "FormulaText"
+#define PRTUIOPT_BORDER "Border"
+#define PRTUIOPT_PRINT_FORMAT "PrintFormat"
+#define PRTUIOPT_PRINT_SCALE "PrintScale"
+
+class SmPrintUIOptions : public vcl::PrinterOptionsHelper
+{
+public:
+ SmPrintUIOptions();
+};
+
+
+////////////////////////////////////////////////////////////
+
#define A2OU(pText) rtl::OUString::createFromAscii(pText)
//-----------------------------------------------------------------------------
@@ -48,6 +67,7 @@ class SmModel : public SfxBaseModel,
public com::sun::star::lang::XServiceInfo,
public com::sun::star::view::XRenderable
{
+ SmPrintUIOptions* m_pPrintUIOptions;
protected:
virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues )
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
@@ -86,4 +106,7 @@ public:
static ::rtl::OUString getImplementationName_Static();
};
+////////////////////////////////////////////////////////////
+
#endif
+
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 8c89d9517898..3aaa9455baf6 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -47,6 +47,7 @@ class DataChangedEvent;
class SmClipboardChangeListener;
class SmDocShell;
class SmViewShell;
+class SmPrintUIOptions;
/**************************************************************************/
@@ -292,8 +293,8 @@ public:
virtual void Execute( SfxRequest& rReq );
virtual void GetState(SfxItemSet &);
- void Impl_Print( OutputDevice &rOutDev, const SmPrintSize ePrintSize,
- Rectangle aOutRect, Point aZeroPoint );
+ void Impl_Print( OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions,
+ Rectangle aOutRect, Point aZeroPoint );
};
#endif
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index b9064a78a5f5..81d137fa122f 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -111,17 +111,12 @@ using namespace ::com::sun::star::uno;
static const char __FAR_DATA pStarMathDoc[] = "StarMathDocument";
-
-/**************************************************************************/
-/*
-**
-** CLASS IMPLEMENTATION
-**
-**/
-
#define SmDocShell
#include "smslots.hxx"
+////////////////////////////////////////////////////////////
+
+
TYPEINIT1( SmDocShell, SfxObjectShell );
SFX_IMPL_INTERFACE(SmDocShell, SfxObjectShell, SmResId(0))
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 9ecfd1720b1e..d859f208161a 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -49,7 +49,7 @@ static const USHORT aLatinDefFnts[FNT_END] =
DEFAULTFONT_SERIF, // FNT_SERIF
DEFAULTFONT_SANS, // FNT_SANS
DEFAULTFONT_FIXED // FNT_FIXED
- //StarSymbol, // FNT_MATH
+ //OpenSymbol, // FNT_MATH
};
// CJK default-fonts
@@ -65,7 +65,7 @@ static const USHORT aCJKDefFnts[FNT_END] =
DEFAULTFONT_CJK_TEXT, // FNT_SERIF
DEFAULTFONT_CJK_DISPLAY, // FNT_SANS
DEFAULTFONT_CJK_TEXT // FNT_FIXED
- //StarSymbol, // FNT_MATH
+ //OpenSymbol, // FNT_MATH
};
// CTL default-fonts
@@ -78,7 +78,7 @@ static const USHORT aCTLDefFnts[FNT_END] =
DEFAULTFONT_CTL_TEXT, // FNT_SERIF
DEFAULTFONT_CTL_TEXT, // FNT_SANS
DEFAULTFONT_CTL_TEXT // FNT_FIXED
- //StarSymbol, // FNT_MATH
+ //OpenSymbol, // FNT_MATH
};
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index bdbb7de5e8a9..56b35a96c6ff 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1,3189 +1,3190 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: x $
- * $Revision: 1.00 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_starmath.hxx"
-
-/*todo: Change characters and tcharacters to accumulate the characters together
-into one string, xml parser hands them to us line by line rather than all in
-one go*/
-
-#include <com/sun/star/xml/sax/XErrorHandler.hpp>
-#include <com/sun/star/xml/sax/XEntityResolver.hpp>
-#include <com/sun/star/xml/sax/InputSource.hpp>
-#include <com/sun/star/xml/sax/XDTDHandler.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/io/XActiveDataControl.hpp>
-#include <com/sun/star/document/XDocumentProperties.hpp>
-#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <com/sun/star/packages/zip/ZipIOException.hpp>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/uno/Any.h>
-
-#include <rtl/math.hxx>
-#include <sfx2/frame.hxx>
-#include <sfx2/docfile.hxx>
-#include <tools/debug.hxx>
-#include <tools/urlobj.hxx>
-#include <svtools/sfxecode.hxx>
-#include <unotools/saveopt.hxx>
-#include <svl/stritem.hxx>
-#include <svl/itemprop.hxx>
-#include <unotools/processfactory.hxx>
-#include <unotools/streamwrap.hxx>
-#include <xmloff/xmlnmspe.hxx>
-#include <xmloff/xmltoken.hxx>
-#include <xmloff/nmspmap.hxx>
-#include <xmloff/attrlist.hxx>
-#include <xmloff/xmluconv.hxx>
-#include <xmloff/xmlmetai.hxx>
-#include <osl/mutex.hxx>
-#include <comphelper/genericpropertyset.hxx>
-
-#include <memory>
-
-#include "mathmlimport.hxx"
-#include "mathtype.hxx"
-#include <starmath.hrc>
-#include <unomodel.hxx>
-#include <document.hxx>
-#include <utility.hxx>
-
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::document;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star;
-using namespace ::xmloff::token;
-
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-#define IMPORT_SVC_NAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLImportFilter")
-
-#undef WANTEXCEPT
-
-////////////////////////////////////////////////////////////
-
-ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
-{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
-
- uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
- utl::getProcessServiceFactory());
- DBG_ASSERT(xServiceFactory.is(), "XMLReader::Read: got no service manager");
- if ( !xServiceFactory.is() )
- return nError;
-
- //Make a model component from our SmModel
- uno::Reference< lang::XComponent > xModelComp( xModel, uno::UNO_QUERY );
- DBG_ASSERT( xModelComp.is(), "XMLReader::Read: got no model" );
-
- // try to get an XStatusIndicator from the Medium
- uno::Reference<task::XStatusIndicator> xStatusIndicator;
-
- sal_Bool bEmbedded = sal_False;
- uno::Reference <lang::XUnoTunnel> xTunnel;
- xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY);
- SmModel *pModel = reinterpret_cast<SmModel *>
- (xTunnel->getSomething(SmModel::getUnoTunnelId()));
-
- SmDocShell *pDocShell = pModel ?
- static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
- if (pDocShell)
- {
-// if (pDocShell->GetMedium())
- {
- DBG_ASSERT( pDocShell->GetMedium() == &rMedium,
- "different SfxMedium found" );
-
- SfxItemSet* pSet = rMedium.GetItemSet();
- if (pSet)
- {
- const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>(
- pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
- if (pItem)
- pItem->GetValue() >>= xStatusIndicator;
- }
- }
-
- if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
- bEmbedded = sal_True;
- }
-
- comphelper::PropertyMapEntry aInfoMap[] =
- {
- { "PrivateData", sizeof("PrivateData")-1, 0,
- &::getCppuType( (Reference<XInterface> *)0 ),
- beans::PropertyAttribute::MAYBEVOID, 0 },
- { "BaseURI", sizeof("BaseURI")-1, 0,
- &::getCppuType( (OUString *)0 ),
- beans::PropertyAttribute::MAYBEVOID, 0 },
- { "StreamRelPath", sizeof("StreamRelPath")-1, 0,
- &::getCppuType( (OUString *)0 ),
- beans::PropertyAttribute::MAYBEVOID, 0 },
- { "StreamName", sizeof("StreamName")-1, 0,
- &::getCppuType( (OUString *)0 ),
- beans::PropertyAttribute::MAYBEVOID, 0 },
- { NULL, 0, 0, NULL, 0, 0 }
- };
- uno::Reference< beans::XPropertySet > xInfoSet(
- comphelper::GenericPropertySet_CreateInstance(
- new comphelper::PropertySetInfo( aInfoMap ) ) );
-
- // Set base URI
- OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") );
- xInfoSet->setPropertyValue( sPropName, makeAny( rMedium.GetBaseURL() ) );
-
- sal_Int32 nSteps=3;
- if ( !(rMedium.IsStorage()))
- nSteps = 1;
-
- sal_Int32 nProgressRange(nSteps);
- if (xStatusIndicator.is())
- {
- xStatusIndicator->start(String(SmResId(STR_STATSTR_READING)),
- nProgressRange);
- }
-
- nSteps=0;
- if (xStatusIndicator.is())
- xStatusIndicator->setValue(nSteps++);
-
- if ( rMedium.IsStorage())
- {
- // TODO/LATER: handle the case of embedded links gracefully
- if ( bEmbedded ) // && !rMedium.GetStorage()->IsRoot() )
- {
- OUString aName( RTL_CONSTASCII_USTRINGPARAM( "dummyObjName" ) );
- if ( rMedium.GetItemSet() )
- {
- const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>(
- rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME) );
- if ( pDocHierarchItem )
- aName = pDocHierarchItem->GetValue();
- }
-
- if ( aName.getLength() )
- {
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
- xInfoSet->setPropertyValue( sPropName, makeAny( aName ) );
- }
- }
-
- sal_Bool bOASIS = ( SotStorage::GetVersion( rMedium.GetStorage() ) > SOFFICE_FILEFORMAT_60 );
- if (xStatusIndicator.is())
- xStatusIndicator->setValue(nSteps++);
-
- ULONG nWarn = ReadThroughComponent(
- rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
- xServiceFactory, xInfoSet,
- (bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
- : "com.sun.star.comp.Math.XMLMetaImporter") );
-
- if ( nWarn != ERRCODE_IO_BROKENPACKAGE )
- {
- if (xStatusIndicator.is())
- xStatusIndicator->setValue(nSteps++);
-
- nWarn = ReadThroughComponent(
- rMedium.GetStorage(), xModelComp, "settings.xml", 0,
- xServiceFactory, xInfoSet,
- (bOASIS ? "com.sun.star.comp.Math.XMLOasisSettingsImporter"
- : "com.sun.star.comp.Math.XMLSettingsImporter" ) );
-
- if ( nWarn != ERRCODE_IO_BROKENPACKAGE )
- {
- if (xStatusIndicator.is())
- xStatusIndicator->setValue(nSteps++);
-
- nError = ReadThroughComponent(
- rMedium.GetStorage(), xModelComp, "content.xml", "Content.xml",
- xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter" );
- }
- else
- nError = ERRCODE_IO_BROKENPACKAGE;
- }
- else
- nError = ERRCODE_IO_BROKENPACKAGE;
- }
- else
- {
- Reference<io::XInputStream> xInputStream =
- new utl::OInputStreamWrapper(rMedium.GetInStream());
-
- if (xStatusIndicator.is())
- xStatusIndicator->setValue(nSteps++);
-
- nError = ReadThroughComponent( xInputStream, xModelComp,
- xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter", FALSE );
- }
-
- if (xStatusIndicator.is())
- xStatusIndicator->end();
- return nError;
-}
-
-
-/// read a component (file + filter version)
-ULONG SmXMLImportWrapper::ReadThroughComponent(
- Reference<io::XInputStream> xInputStream,
- Reference<XComponent> xModelComponent,
- Reference<lang::XMultiServiceFactory> & rFactory,
- Reference<beans::XPropertySet> & rPropSet,
- const sal_Char* pFilterName,
- sal_Bool bEncrypted )
-{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
- DBG_ASSERT(xInputStream.is(), "input stream missing");
- DBG_ASSERT(xModelComponent.is(), "document missing");
- DBG_ASSERT(rFactory.is(), "factory missing");
- DBG_ASSERT(NULL != pFilterName,"I need a service name for the component!");
-
- // prepare ParserInputSrouce
- xml::sax::InputSource aParserInput;
- aParserInput.aInputStream = xInputStream;
-
- // get parser
- Reference< xml::sax::XParser > xParser(
- rFactory->createInstance(
- OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
- UNO_QUERY );
- DBG_ASSERT( xParser.is(), "Can't create parser" );
- if ( !xParser.is() )
- return nError;
-
- Sequence<Any> aArgs( 1 );
- aArgs[0] <<= rPropSet;
-
- // get filter
- Reference< xml::sax::XDocumentHandler > xFilter(
- rFactory->createInstanceWithArguments(
- OUString::createFromAscii(pFilterName), aArgs ),
- UNO_QUERY );
- DBG_ASSERT( xFilter.is(), "Can't instantiate filter component." );
- if ( !xFilter.is() )
- return nError;
-
- // connect parser and filter
- xParser->setDocumentHandler( xFilter );
-
- // connect model and filter
- Reference < XImporter > xImporter( xFilter, UNO_QUERY );
- xImporter->setTargetDocument( xModelComponent );
-
- // finally, parser the stream
- try
- {
- xParser->parseStream( aParserInput );
-
- uno::Reference<lang::XUnoTunnel> xFilterTunnel;
- xFilterTunnel = uno::Reference<lang::XUnoTunnel>
- ( xFilter, uno::UNO_QUERY );
- SmXMLImport *pFilter = reinterpret_cast< SmXMLImport * >(
- sal::static_int_cast< sal_uIntPtr >(
- xFilterTunnel->getSomething( SmXMLImport::getUnoTunnelId() )));
- if ( pFilter && pFilter->GetSuccess() )
- nError = 0;
- }
- catch( xml::sax::SAXParseException& r )
- {
- // sax parser sends wrapped exceptions,
- // try to find the original one
- xml::sax::SAXException aSaxEx = *(xml::sax::SAXException*)(&r);
- sal_Bool bTryChild = sal_True;
-
- while( bTryChild )
- {
- xml::sax::SAXException aTmp;
- if ( aSaxEx.WrappedException >>= aTmp )
- aSaxEx = aTmp;
- else
- bTryChild = sal_False;
- }
-
- packages::zip::ZipIOException aBrokenPackage;
- if ( aSaxEx.WrappedException >>= aBrokenPackage )
- return ERRCODE_IO_BROKENPACKAGE;
-
- if ( bEncrypted )
- nError = ERRCODE_SFX_WRONGPASSWORD;
- }
- catch( xml::sax::SAXException& r )
- {
- packages::zip::ZipIOException aBrokenPackage;
- if ( r.WrappedException >>= aBrokenPackage )
- return ERRCODE_IO_BROKENPACKAGE;
-
- if ( bEncrypted )
- nError = ERRCODE_SFX_WRONGPASSWORD;
- }
- catch( packages::zip::ZipIOException& )
- {
- nError = ERRCODE_IO_BROKENPACKAGE;
- }
- catch( io::IOException& )
- {
- }
-
- return nError;
-}
-
-
-ULONG SmXMLImportWrapper::ReadThroughComponent(
- const uno::Reference< embed::XStorage >& xStorage,
- Reference<XComponent> xModelComponent,
- const sal_Char* pStreamName,
- const sal_Char* pCompatibilityStreamName,
- Reference<lang::XMultiServiceFactory> & rFactory,
- Reference<beans::XPropertySet> & rPropSet,
- const sal_Char* pFilterName )
-{
- DBG_ASSERT(xStorage.is(), "Need storage!");
- DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
-
- // open stream (and set parser input)
- OUString sStreamName = OUString::createFromAscii(pStreamName);
- uno::Reference < container::XNameAccess > xAccess( xStorage, uno::UNO_QUERY );
- if ( !xAccess->hasByName(sStreamName) || !xStorage->isStreamElement(sStreamName) )
- {
- // stream name not found! Then try the compatibility name.
- // do we even have an alternative name?
- if ( pCompatibilityStreamName )
- sStreamName = OUString::createFromAscii(pCompatibilityStreamName);
- }
-
- // get input stream
- try
- {
- uno::Reference < io::XStream > xEventsStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ );
-
- // determine if stream is encrypted or not
- uno::Reference < beans::XPropertySet > xProps( xEventsStream, uno::UNO_QUERY );
- Any aAny = xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) );
- sal_Bool bEncrypted = sal_False;
- if ( aAny.getValueType() == ::getBooleanCppuType() )
- aAny >>= bEncrypted;
-
- // set Base URL
- if ( rPropSet.is() )
- {
- OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") );
- rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) );
- }
-
-
- Reference < io::XInputStream > xStream = xEventsStream->getInputStream();
- return ReadThroughComponent( xStream, xModelComponent, rFactory, rPropSet, pFilterName, bEncrypted );
- }
- catch ( packages::WrongPasswordException& )
- {
- return ERRCODE_SFX_WRONGPASSWORD;
- }
- catch( packages::zip::ZipIOException& )
- {
- return ERRCODE_IO_BROKENPACKAGE;
- }
- catch ( uno::Exception& )
- {
- }
-
- return ERRCODE_SFX_DOLOADFAILED;
-}
-
-////////////////////////////////////////////////////////////
-
-SmXMLImport::SmXMLImport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
- sal_uInt16 nImportFlags)
-: SvXMLImport( xServiceFactory, nImportFlags ),
- pPresLayoutElemTokenMap(0),
- pPresLayoutAttrTokenMap(0),
- pFencedAttrTokenMap(0),
- pOperatorAttrTokenMap(0),
- pAnnotationAttrTokenMap(0),
- pPresElemTokenMap(0),
- pPresScriptEmptyElemTokenMap(0),
- pPresTableElemTokenMap(0),
- pColorTokenMap(0),
- bSuccess(sal_False)
-{
-}
-
-const uno::Sequence< sal_Int8 > & SmXMLImport::getUnoTunnelId() throw()
-{
- static uno::Sequence< sal_Int8 > * pSeq = 0;
- if ( !pSeq )
- {
- osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
- if ( !pSeq )
- {
- static uno::Sequence< sal_Int8 > aSeq( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
- pSeq = &aSeq;
- }
- }
- return *pSeq;
-}
-
-OUString SAL_CALL SmXMLImport_getImplementationName() throw()
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLImporter" ) );
-}
-
-uno::Sequence< OUString > SAL_CALL SmXMLImport_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( IMPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLImport(IMPORT_ALL);
- return (cppu::OWeakObject*)new SmXMLImport(rSMgr, IMPORT_ALL);
-}
-
-////////////////////////////////////////////////////////////
-
-OUString SAL_CALL SmXMLImportMeta_getImplementationName() throw()
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisMetaImporter" ) );
-}
-
-uno::Sequence< OUString > SAL_CALL SmXMLImportMeta_getSupportedServiceNames()
-throw()
-{
- const OUString aServiceName( IMPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SmXMLImportMeta_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
-throw( uno::Exception )
-{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_META );
- return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_META );
-}
-
-////////////////////////////////////////////////////////////
-
-OUString SAL_CALL SmXMLImportSettings_getImplementationName() throw()
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisSettingsImporter" ) );
-}
-
-uno::Sequence< OUString > SAL_CALL SmXMLImportSettings_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( IMPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SmXMLImportSettings_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- // #110680#
- // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_SETTINGS );
- return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_SETTINGS );
-}
-
-////////////////////////////////////////////////////////////
-
-// XServiceInfo
-// override empty method from parent class
-rtl::OUString SAL_CALL SmXMLImport::getImplementationName()
- throw(uno::RuntimeException)
-{
- OUString aTxt;
- switch( getImportFlags() )
- {
- case IMPORT_META:
- aTxt = SmXMLImportMeta_getImplementationName();
- break;
- case IMPORT_SETTINGS:
- aTxt = SmXMLImportSettings_getImplementationName();
- break;
- case IMPORT_ALL:
- default:
- aTxt = SmXMLImport_getImplementationName();
- break;
- }
- return aTxt;
-}
-
-
-sal_Int64 SAL_CALL SmXMLImport::getSomething(
- const uno::Sequence< sal_Int8 >&rId )
-throw(uno::RuntimeException)
-{
- if ( rId.getLength() == 16 &&
- 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
- return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this));
-
- return SvXMLImport::getSomething( rId );
-}
-
-void SmXMLImport::endDocument(void)
- throw(xml::sax::SAXException, uno::RuntimeException)
-{
- //Set the resulted tree into the SmDocShell where it belongs
- SmNode *pTree;
- if (NULL != (pTree = GetTree()))
- {
- uno::Reference <frame::XModel> xModel = GetModel();
- uno::Reference <lang::XUnoTunnel> xTunnel;
- xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY);
- SmModel *pModel = reinterpret_cast<SmModel *>
- (xTunnel->getSomething(SmModel::getUnoTunnelId()));
-
- if (pModel)
- {
- SmDocShell *pDocShell =
- static_cast<SmDocShell*>(pModel->GetObjectShell());
- pDocShell->SetFormulaTree(pTree);
- if (0 == aText.Len()) //If we picked up no annotation text
- {
- //Make up some editable text
- aText = pDocShell->GetText();
- pTree->CreateTextFromNode(aText);
- aText.EraseTrailingChars();
- if ((aText.GetChar(0) == '{') &&
- (aText.GetChar(aText.Len()-1) == '}'))
- {
- aText.Erase(0,1);
- aText.Erase(aText.Len()-1,1);
- }
- }
- pDocShell->SetText( String() );
-
- // Convert symbol names
- SmParser &rParser = pDocShell->GetParser();
- BOOL bVal = rParser.IsImportSymbolNames();
- rParser.SetImportSymbolNames( TRUE );
- SmNode *pTmpTree = rParser.Parse( aText );
- aText = rParser.GetText();
- delete pTmpTree;
- rParser.SetImportSymbolNames( bVal );
-
- pDocShell->SetText( aText );
- }
- DBG_ASSERT(pModel,"So there *was* a uno problem after all");
-
- bSuccess = sal_True;
- }
-
- SvXMLImport::endDocument();
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLImportContext: public SvXMLImportContext
-{
-public:
- SmXMLImportContext( SmXMLImport &rImport, sal_uInt16 nPrfx,
- const OUString& rLName)
- : SvXMLImportContext(rImport, nPrfx, rLName) {}
-
- const SmXMLImport& GetSmImport() const
- {
- return (const SmXMLImport&)GetImport();
- }
-
- SmXMLImport& GetSmImport()
- {
- return (SmXMLImport&)GetImport();
- }
-
- virtual void TCharacters(const OUString & /*rChars*/);
- virtual void Characters(const OUString &rChars);
- virtual SvXMLImportContext *CreateChildContext(sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/);
-};
-
-void SmXMLImportContext::TCharacters(const OUString & /*rChars*/)
-{
-}
-
-void SmXMLImportContext::Characters(const OUString &rChars)
-{
- /*
- Whitespace occurring within the content of token elements is "trimmed"
- from the ends (i.e. all whitespace at the beginning and end of the
- content is removed), and "collapsed" internally (i.e. each sequence of
- 1 or more whitespace characters is replaced with one blank character).
- */
- //collapsing not done yet!
- const OUString &rChars2 = rChars.trim();
- if (rChars2.getLength())
- TCharacters(rChars2/*.collapse()*/);
-}
-
-SvXMLImportContext * SmXMLImportContext::CreateChildContext(sal_uInt16 /*nPrefix*/,
- const OUString& /*rLocalName*/,
- const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/)
-{
- return 0;
-}
-
-////////////////////////////////////////////////////////////
-
-struct SmXMLContext_Helper
-{
- sal_Int8 nIsBold;
- sal_Int8 nIsItalic;
- double nFontSize;
- sal_Bool bFontNodeNeeded;
- OUString sFontFamily;
- OUString sColor;
-
- SmXMLImportContext rContext;
-
- SmXMLContext_Helper(SmXMLImportContext &rImport) :
- nIsBold(-1), nIsItalic(-1), nFontSize(0.0), rContext(rImport) {}
-
- void RetrieveAttrs(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
- void ApplyAttrs();
-};
-
-void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
- sal_Int8 nOldIsBold=nIsBold;
- sal_Int8 nOldIsItalic=nIsItalic;
- double nOldFontSize=nFontSize;
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- OUString sOldFontFamily = sFontFamily;
- for (sal_Int16 i=0;i<nAttrCount;i++)
- {
- OUString sAttrName = xAttrList->getNameByIndex(i);
- OUString aLocalName;
- sal_uInt16 nPrefix = rContext.GetSmImport().GetNamespaceMap().
- GetKeyByAttrName(sAttrName,&aLocalName);
- OUString sValue = xAttrList->getValueByIndex(i);
- const SvXMLTokenMap &rAttrTokenMap =
- rContext.GetSmImport().GetPresLayoutAttrTokenMap();
- switch(rAttrTokenMap.Get(nPrefix,aLocalName))
- {
- case XML_TOK_FONTWEIGHT:
- nIsBold = sValue.equals(GetXMLToken(XML_BOLD));
- break;
- case XML_TOK_FONTSTYLE:
- nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC));
- break;
- case XML_TOK_FONTSIZE:
- SvXMLUnitConverter::convertDouble(nFontSize,sValue);
- rContext.GetSmImport().GetMM100UnitConverter().
- setXMLMeasureUnit(MAP_POINT);
- if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT)))
- {
- if (-1 == sValue.indexOf('%'))
- nFontSize=0.0;
- else
- {
- rContext.GetSmImport().GetMM100UnitConverter().
- setXMLMeasureUnit(MAP_RELATIVE);
- }
- }
- break;
- case XML_TOK_FONTFAMILY:
- sFontFamily = sValue;
- break;
- case XML_TOK_COLOR:
- sColor = sValue;
- break;
- default:
- break;
- }
- }
-
- if ((nOldIsBold!=nIsBold) || (nOldIsItalic!=nIsItalic) ||
- (nOldFontSize!=nFontSize) || (sOldFontFamily!=sFontFamily)
- || sColor.getLength())
- bFontNodeNeeded=sal_True;
- else
- bFontNodeNeeded=sal_False;
-}
-
-void SmXMLContext_Helper::ApplyAttrs()
-{
- SmNodeStack &rNodeStack = rContext.GetSmImport().GetNodeStack();
-
- if (bFontNodeNeeded)
- {
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
-
- if (nIsBold != -1)
- {
- if (nIsBold)
- aToken.eType = TBOLD;
- else
- aToken.eType = TNBOLD;
- SmStructureNode *pFontNode = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (nIsItalic != -1)
- {
- if (nIsItalic)
- aToken.eType = TITALIC;
- else
- aToken.eType = TNITALIC;
- SmStructureNode *pFontNode = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (nFontSize != 0.0)
- {
- aToken.eType = TSIZE;
- SmFontNode *pFontNode = new SmFontNode(aToken);
-
- if (MAP_RELATIVE == rContext.GetSmImport().GetMM100UnitConverter().
- getXMLMeasureUnit())
- {
- if (nFontSize < 100.00)
- pFontNode->SetSizeParameter(Fraction(100.00/nFontSize),
- FNTSIZ_DIVIDE);
- else
- pFontNode->SetSizeParameter(Fraction(nFontSize/100.00),
- FNTSIZ_MULTIPLY);
- }
- else
- pFontNode->SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT);
-
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (sFontFamily.getLength())
- {
- if (sFontFamily.equalsIgnoreAsciiCase(GetXMLToken(XML_FIXED)))
- aToken.eType = TFIXED;
- else if (sFontFamily.equalsIgnoreAsciiCase(OUString(
- RTL_CONSTASCII_USTRINGPARAM("sans"))))
- aToken.eType = TSANS;
- else if (sFontFamily.equalsIgnoreAsciiCase(OUString(
- RTL_CONSTASCII_USTRINGPARAM("serif"))))
- aToken.eType = TSERIF;
- else //Just give up, we need to extend our font mechanism to be
- //more general
- return;
-
- aToken.aText = sFontFamily;
- SmFontNode *pFontNode = new SmFontNode(aToken);
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (sColor.getLength())
- {
- //Again we can only handle a small set of colours in
- //StarMath for now.
- const SvXMLTokenMap& rTokenMap =
- rContext.GetSmImport().GetColorTokenMap();
- aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
- XML_NAMESPACE_MATH, sColor));
- if (aToken.eType != -1)
- {
- SmFontNode *pFontNode = new SmFontNode(aToken);
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- }
-
- }
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLDocContext_Impl : public SmXMLImportContext
-{
-public:
- SmXMLDocContext_Impl( SmXMLImport &rImport, sal_uInt16 nPrfx,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrfx,rLName) {}
-
- virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-
- void EndElement();
-};
-
-////////////////////////////////////////////////////////////
-
-/*avert thy gaze from the proginator*/
-class SmXMLRowContext_Impl : public SmXMLDocContext_Impl
-{
-protected:
- ULONG nElementCount;
-
-public:
- SmXMLRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLDocContext_Impl(rImport,nPrefix,rLName)
- { nElementCount = GetSmImport().GetNodeStack().Count(); }
-
- virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-
- SvXMLImportContext *StrictCreateChildContext(sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-
- void EndElement();
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLFracContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLFracContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLSqrtContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLSqrtContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLRootContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLRootContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLStyleContext_Impl : public SmXMLRowContext_Impl
-{
-protected:
- SmXMLContext_Helper aStyleHelper;
-
-public:
- /*Right now the style tag is completely ignored*/
- SmXMLStyleContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) : SmXMLRowContext_Impl(rImport,nPrefix,rLName),
- aStyleHelper(*this) {}
-
- void EndElement();
- void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
-};
-
-void SmXMLStyleContext_Impl::StartElement(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
-#if 1
- aStyleHelper.RetrieveAttrs(xAttrList);
-#else
- sal_Int8 nOldIsBold=nIsBold;
- sal_Int8 nOldIsItalic=nIsItalic;
- double nOldFontSize=nFontSize;
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- OUString sOldFontFamily = sFontFamily;
- for (sal_Int16 i=0;i<nAttrCount;i++)
- {
- OUString sAttrName = xAttrList->getNameByIndex(i);
- OUString aLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
- GetKeyByAttrName(sAttrName,&aLocalName);
- OUString sValue = xAttrList->getValueByIndex(i);
- const SvXMLTokenMap &rAttrTokenMap =
- GetSmImport().GetPresLayoutAttrTokenMap();
- switch(rAttrTokenMap.Get(nPrefix,aLocalName))
- {
- case XML_TOK_FONTWEIGHT:
- nIsBold = sValue.equals(GetXMLToken(XML_BOLD));
- break;
- case XML_TOK_FONTSTYLE:
- nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC));
- break;
- case XML_TOK_FONTSIZE:
- SvXMLUnitConverter::convertDouble(nFontSize,sValue);
- GetSmImport().GetMM100UnitConverter().
- setXMLMeasureUnit(MAP_POINT);
- if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT)))
- if (-1 == sValue.indexOf('%'))
- nFontSize=0.0;
- else
- {
- GetSmImport().GetMM100UnitConverter().
- setXMLMeasureUnit(MAP_RELATIVE);
- }
- break;
- case XML_TOK_FONTFAMILY:
- sFontFamily = sValue;
- break;
- case XML_TOK_COLOR:
- sColor = sValue;
- break;
- default:
- break;
- }
- }
-
- if ((nOldIsBold!=nIsBold) || (nOldIsItalic!=nIsItalic) ||
- (nOldFontSize!=nFontSize) || (sOldFontFamily!=sFontFamily)
- || sColor.getLength())
- bFontNodeNeeded=sal_True;
- else
- bFontNodeNeeded=sal_False;
-#endif
-}
-
-
-void SmXMLStyleContext_Impl::EndElement()
-{
- /*
- <mstyle> accepts any number of arguments; if this number is not 1, its
- contents are treated as a single "inferred <mrow>" containing its
- arguments
- */
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- if (rNodeStack.Count() - nElementCount > 1)
- SmXMLRowContext_Impl::EndElement();
-#if 1
- aStyleHelper.ApplyAttrs();
-#else
- if (bFontNodeNeeded)
- {
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
-
- if (nIsBold != -1)
- {
- if (nIsBold)
- aToken.eType = TBOLD;
- else
- aToken.eType = TNBOLD;
- SmStructureNode *pFontNode = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (nIsItalic != -1)
- {
- if (nIsItalic)
- aToken.eType = TITALIC;
- else
- aToken.eType = TNITALIC;
- SmStructureNode *pFontNode = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (nFontSize != 0.0)
- {
- aToken.eType = TSIZE;
- SmFontNode *pFontNode = new SmFontNode(aToken);
-
- if (MAP_RELATIVE == GetSmImport().GetMM100UnitConverter().
- getXMLMeasureUnit())
- {
- if (nFontSize < 100.00)
- pFontNode->SetSizeParameter(Fraction(100.00/nFontSize),
- FNTSIZ_DIVIDE);
- else
- pFontNode->SetSizeParameter(Fraction(nFontSize/100.00),
- FNTSIZ_MULTIPLY);
- }
- else
- pFontNode->SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT);
-
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (sFontFamily.getLength())
- {
- if (sFontFamily.equalsIgnoreCase(GetXMLToken(XML_FIXED)))
- aToken.eType = TFIXED;
- else if (sFontFamily.equalsIgnoreCase(OUString(
- RTL_CONSTASCII_USTRINGPARAM("sans"))))
- aToken.eType = TSANS;
- else if (sFontFamily.equalsIgnoreCase(OUString(
- RTL_CONSTASCII_USTRINGPARAM("serif"))))
- aToken.eType = TSERIF;
- else //Just give up, we need to extend our font mechanism to be
- //more general
- return;
-
- aToken.aText = sFontFamily;
- SmFontNode *pFontNode = new SmFontNode(aToken);
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- if (sColor.getLength())
- {
- //Again we can only handle a small set of colours in
- //StarMath for now.
- const SvXMLTokenMap& rTokenMap =
- GetSmImport().GetColorTokenMap();
- aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
- XML_NAMESPACE_MATH, sColor));
- if (aToken.eType != -1)
- {
- SmFontNode *pFontNode = new SmFontNode(aToken);
- pFontNode->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pFontNode);
- }
- }
-
- }
-#endif
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLPaddedContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- /*Right now the style tag is completely ignored*/
- SmXMLPaddedContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-void SmXMLPaddedContext_Impl::EndElement()
-{
- /*
- <mpadded> accepts any number of arguments; if this number is not 1, its
- contents are treated as a single "inferred <mrow>" containing its
- arguments
- */
- if (GetSmImport().GetNodeStack().Count() - nElementCount > 1)
- SmXMLRowContext_Impl::EndElement();
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLPhantomContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- /*Right now the style tag is completely ignored*/
- SmXMLPhantomContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-void SmXMLPhantomContext_Impl::EndElement()
-{
- /*
- <mphantom> accepts any number of arguments; if this number is not 1, its
- contents are treated as a single "inferred <mrow>" containing its
- arguments
- */
- if (GetSmImport().GetNodeStack().Count() - nElementCount > 1)
- SmXMLRowContext_Impl::EndElement();
-
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
- aToken.eType = TPHANTOM;
-
- SmStructureNode *pPhantom = static_cast<SmStructureNode *>
- (new SmFontNode(aToken));
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- pPhantom->SetSubNodes(0,rNodeStack.Pop());
- rNodeStack.Push(pPhantom);
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLFencedContext_Impl : public SmXMLRowContext_Impl
-{
-protected:
- sal_Unicode cBegin;
- sal_Unicode cEnd;
-
-public:
- SmXMLFencedContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName),
- cBegin('('), cEnd(')') {}
-
- void StartElement(const uno::Reference< xml::sax::XAttributeList > & xAttrList );
- void EndElement();
-};
-
-
-void SmXMLFencedContext_Impl::StartElement(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- for (sal_Int16 i=0;i<nAttrCount;i++)
- {
- OUString sAttrName = xAttrList->getNameByIndex(i);
- OUString aLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
- GetKeyByAttrName(sAttrName,&aLocalName);
- OUString sValue = xAttrList->getValueByIndex(i);
- const SvXMLTokenMap &rAttrTokenMap =
- GetSmImport().GetFencedAttrTokenMap();
- switch(rAttrTokenMap.Get(nPrefix,aLocalName))
- {
- //temp, starmath cannot handle multichar brackets (I think)
- case XML_TOK_OPEN:
- cBegin = sValue[0];
- break;
- case XML_TOK_CLOSE:
- cEnd = sValue[0];
- break;
- default:
- /*Go to superclass*/
- break;
- }
- }
-}
-
-
-void SmXMLFencedContext_Impl::EndElement()
-{
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.aText = ',';
- aToken.eType = TLEFT;
- aToken.nLevel = 5;
-
- aToken.eType = TLPARENT;
- aToken.cMathChar = cBegin;
- SmStructureNode *pSNode = new SmBraceNode(aToken);
- SmNode *pLeft = new SmMathSymbolNode(aToken);
-
- aToken.cMathChar = cEnd;
- aToken.eType = TRPARENT;
- SmNode *pRight = new SmMathSymbolNode(aToken);
-
- SmNodeArray aRelationArray;
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
-
- aToken.cMathChar = '\0';
- aToken.aText = ',';
- aToken.eType = TIDENT;
-
- ULONG i = rNodeStack.Count() - nElementCount;
- if (rNodeStack.Count() - nElementCount > 1)
- i += rNodeStack.Count() - 1 - nElementCount;
- aRelationArray.resize(i);
- while (rNodeStack.Count() > nElementCount)
- {
- aRelationArray[--i] = rNodeStack.Pop();
- if (i > 1 && rNodeStack.Count() > 1)
- aRelationArray[--i] = new SmGlyphSpecialNode(aToken);
- }
-
- SmToken aDummy;
- SmStructureNode *pBody = new SmExpressionNode(aDummy);
- pBody->SetSubNodes(aRelationArray);
-
-
- pSNode->SetSubNodes(pLeft,pBody,pRight);
- pSNode->SetScaleMode(SCALE_HEIGHT);
- GetSmImport().GetNodeStack().Push(pSNode);
-}
-
-
-////////////////////////////////////////////////////////////
-
-class SmXMLErrorContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLErrorContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-void SmXMLErrorContext_Impl::EndElement()
-{
- /*Right now the error tag is completely ignored, what
- can I do with it in starmath, ?, maybe we need a
- report window ourselves, do a test for validity of
- the xml input, use merrors, and then generate
- the markup inside the merror with a big red colour
- of something. For now just throw them all away.
- */
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- while (rNodeStack.Count() > nElementCount)
- {
- SmNode *pNode = rNodeStack.Pop();
- delete pNode;
- }
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLNumberContext_Impl : public SmXMLImportContext
-{
-protected:
- SmToken aToken;
-
-public:
- SmXMLNumberContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName)
- {
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
- aToken.eType = TNUMBER;
- }
-
- virtual void TCharacters(const OUString &rChars);
-
- void EndElement();
-};
-
-void SmXMLNumberContext_Impl::TCharacters(const OUString &rChars)
-{
- aToken.aText = rChars;
-}
-
-void SmXMLNumberContext_Impl::EndElement()
-{
- GetSmImport().GetNodeStack().Push(new SmTextNode(aToken,FNT_NUMBER));
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLAnnotationContext_Impl : public SmXMLImportContext
-{
- sal_Bool bIsStarMath;
-
-public:
- SmXMLAnnotationContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName), bIsStarMath(sal_False) {}
-
- virtual void Characters(const OUString &rChars);
-
- void StartElement(const uno::Reference<xml::sax::XAttributeList > & xAttrList );
-};
-
-void SmXMLAnnotationContext_Impl::StartElement(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- for (sal_Int16 i=0;i<nAttrCount;i++)
- {
- OUString sAttrName = xAttrList->getNameByIndex(i);
- OUString aLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
- GetKeyByAttrName(sAttrName,&aLocalName);
-
- OUString sValue = xAttrList->getValueByIndex(i);
- const SvXMLTokenMap &rAttrTokenMap =
- GetSmImport().GetAnnotationAttrTokenMap();
- switch(rAttrTokenMap.Get(nPrefix,aLocalName))
- {
- case XML_TOK_ENCODING:
- bIsStarMath= sValue.equals(
- OUString(RTL_CONSTASCII_USTRINGPARAM("StarMath 5.0")));
- break;
- default:
- break;
- }
- }
-}
-
-void SmXMLAnnotationContext_Impl::Characters(const OUString &rChars)
-{
- if (bIsStarMath)
- GetSmImport().GetText().Append(String(rChars));
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLTextContext_Impl : public SmXMLImportContext
-{
-protected:
- SmToken aToken;
-
-public:
- SmXMLTextContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName)
- {
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
- aToken.eType = TTEXT;
- }
-
- virtual void TCharacters(const OUString &rChars);
-
- void EndElement();
-};
-
-void SmXMLTextContext_Impl::TCharacters(const OUString &rChars)
-{
- aToken.aText = rChars;
-}
-
-void SmXMLTextContext_Impl::EndElement()
-{
- GetSmImport().GetNodeStack().Push(new SmTextNode(aToken,FNT_TEXT));
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLStringContext_Impl : public SmXMLImportContext
-{
-protected:
- SmToken aToken;
-
-public:
- SmXMLStringContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName)
- {
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
- aToken.eType = TTEXT;
- }
-
- virtual void TCharacters(const OUString &rChars);
-
- void EndElement();
-};
-
-void SmXMLStringContext_Impl::TCharacters(const OUString &rChars)
-{
- /*
- The content of <ms> elements should be rendered with visible "escaping" of
- certain characters in the content, including at least "double quote"
- itself, and preferably whitespace other than individual blanks. The intent
- is for the viewer to see that the expression is a string literal, and to
- see exactly which characters form its content. For example, <ms>double
- quote is "</ms> might be rendered as "double quote is \"".
-
- Obviously this isn't fully done here.
- */
- aToken.aText.Erase();
- aToken.aText += '\"';
- aToken.aText += String(rChars);
- aToken.aText += '\"';
-}
-
-void SmXMLStringContext_Impl::EndElement()
-{
- GetSmImport().GetNodeStack().Push(new SmTextNode(aToken,FNT_FIXED));
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLIdentifierContext_Impl : public SmXMLImportContext
-{
-protected:
- SmXMLContext_Helper aStyleHelper;
- SmToken aToken;
-
-public:
- SmXMLIdentifierContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName),aStyleHelper(*this)
- {
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
- aToken.eType = TIDENT;
- }
-
- void TCharacters(const OUString &rChars);
- void StartElement(const uno::Reference< xml::sax::XAttributeList > & xAttrList )
- {
- aStyleHelper.RetrieveAttrs(xAttrList);
- };
- void EndElement();
-};
-
-void SmXMLIdentifierContext_Impl::EndElement()
-{
- SmTextNode *pNode = 0;
- //we will handle identifier italic/normal here instead of with a standalone
- //font node
- if (((aStyleHelper.nIsItalic == -1) && (aToken.aText.Len() > 1))
- || ((aStyleHelper.nIsItalic == 0) && (aToken.aText.Len() == 1)))
- {
- pNode = new SmTextNode(aToken,FNT_FUNCTION);
- pNode->GetFont().SetItalic(ITALIC_NONE);
- aStyleHelper.nIsItalic = -1;
- }
- else
- pNode = new SmTextNode(aToken,FNT_VARIABLE);
- if (aStyleHelper.bFontNodeNeeded && aStyleHelper.nIsItalic != -1)
- {
- if (aStyleHelper.nIsItalic)
- pNode->GetFont().SetItalic(ITALIC_NORMAL);
- else
- pNode->GetFont().SetItalic(ITALIC_NONE);
- }
-
- if ((-1!=aStyleHelper.nIsBold) || (0.0!=aStyleHelper.nFontSize) ||
- (aStyleHelper.sFontFamily.getLength()) ||
- aStyleHelper.sColor.getLength())
- aStyleHelper.bFontNodeNeeded=sal_True;
- else
- aStyleHelper.bFontNodeNeeded=sal_False;
- if (aStyleHelper.bFontNodeNeeded)
- aStyleHelper.ApplyAttrs();
- GetSmImport().GetNodeStack().Push(pNode);
-}
-
-void SmXMLIdentifierContext_Impl::TCharacters(const OUString &rChars)
-{
- aToken.aText = rChars;
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLOperatorContext_Impl : public SmXMLImportContext
-{
- sal_Bool bIsStretchy;
-
-protected:
- SmToken aToken;
-
-public:
- SmXMLOperatorContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName), bIsStretchy(sal_False)
- {
- aToken.nGroup = 0;
- aToken.eType = TSPECIAL;
- aToken.nLevel = 5;
- }
-
- void TCharacters(const OUString &rChars);
- void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
- void EndElement();
-};
-
-void SmXMLOperatorContext_Impl::TCharacters(const OUString &rChars)
-{
- aToken.cMathChar = rChars[0];
-}
-
-void SmXMLOperatorContext_Impl::EndElement()
-{
- SmMathSymbolNode *pNode = new SmMathSymbolNode(aToken);
- //For stretchy scaling the scaling must be retrieved from this node
- //and applied to the expression itself so as to get the expression
- //to scale the operator to the height of the expression itself
- if (bIsStretchy)
- pNode->SetScaleMode(SCALE_HEIGHT);
- GetSmImport().GetNodeStack().Push(pNode);
-}
-
-
-
-void SmXMLOperatorContext_Impl::StartElement(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- for (sal_Int16 i=0;i<nAttrCount;i++)
- {
- OUString sAttrName = xAttrList->getNameByIndex(i);
- OUString aLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
- GetKeyByAttrName(sAttrName,&aLocalName);
-
- OUString sValue = xAttrList->getValueByIndex(i);
- const SvXMLTokenMap &rAttrTokenMap =
- GetSmImport().GetOperatorAttrTokenMap();
- switch(rAttrTokenMap.Get(nPrefix,aLocalName))
- {
- case XML_TOK_STRETCHY:
- bIsStretchy = sValue.equals(
- GetXMLToken(XML_TRUE));
- break;
- default:
- break;
- }
- }
-}
-
-
-////////////////////////////////////////////////////////////
-
-class SmXMLSpaceContext_Impl : public SmXMLImportContext
-{
-public:
- SmXMLSpaceContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName) {}
-
- void StartElement(const uno::Reference< xml::sax::XAttributeList >& xAttrList );
-};
-
-void SmXMLSpaceContext_Impl::StartElement(
- const uno::Reference<xml::sax::XAttributeList > & /*xAttrList*/ )
-{
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.eType = TBLANK;
- aToken.nLevel = 5;
- SmBlankNode *pBlank = new SmBlankNode(aToken);
- pBlank->IncreaseBy(aToken);
- GetSmImport().GetNodeStack().Push(pBlank);
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLSubContext_Impl : public SmXMLRowContext_Impl
-{
-protected:
- void GenericEndElement(SmTokenType eType,SmSubSup aSubSup);
-
-public:
- SmXMLSubContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement()
- {
- GenericEndElement(TRSUB,RSUB);
- }
-};
-
-
-void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup)
-{
- /*The <msub> element requires exactly 2 arguments.*/
- DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = eType;
- SmSubSupNode *pNode = new SmSubSupNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
-
- // initialize subnodes array
- SmNodeArray aSubNodes;
- aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
- aSubNodes[i] = NULL;
-
- aSubNodes[eSubSup+1] = rNodeStack.Pop();
- aSubNodes[0] = rNodeStack.Pop();
- pNode->SetSubNodes(aSubNodes);
- rNodeStack.Push(pNode);
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLSupContext_Impl : public SmXMLSubContext_Impl
-{
-public:
- SmXMLSupContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLSubContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement()
- {
- GenericEndElement(TRSUP,RSUP);
- }
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLSubSupContext_Impl : public SmXMLRowContext_Impl
-{
-protected:
- void GenericEndElement(SmTokenType eType, SmSubSup aSub,SmSubSup aSup);
-
-public:
- SmXMLSubSupContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement()
- {
- GenericEndElement(TRSUB,RSUB,RSUP);
- }
-};
-
-void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
- SmSubSup aSub,SmSubSup aSup)
-{
- /*The <msub> element requires exactly 3 arguments.*/
- DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 3,
- "SubSup has not three arguments");
-
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = eType;
- SmSubSupNode *pNode = new SmSubSupNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
-
- // initialize subnodes array
- SmNodeArray aSubNodes;
- aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
- aSubNodes[i] = NULL;
-
- aSubNodes[aSup+1] = rNodeStack.Pop();
- aSubNodes[aSub+1] = rNodeStack.Pop();
- aSubNodes[0] = rNodeStack.Pop();
- pNode->SetSubNodes(aSubNodes);
- rNodeStack.Push(pNode);
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLUnderContext_Impl : public SmXMLSubContext_Impl
-{
-protected:
- sal_Int16 nAttrCount;
-
-public:
- SmXMLUnderContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLSubContext_Impl(rImport,nPrefix,rLName) {}
-
- void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
- void EndElement();
- void HandleAccent();
-};
-
-void SmXMLUnderContext_Impl::StartElement(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
- nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
-}
-
-void SmXMLUnderContext_Impl::HandleAccent()
-{
- DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
-
- /*Just one special case for the underline thing*/
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- SmNode *pTest = rNodeStack.Pop();
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TUNDERLINE;
-
-
- SmNodeArray aSubNodes;
- aSubNodes.resize(2);
-
- SmStructureNode *pNode = new SmAttributNode(aToken);
- if ((pTest->GetToken().cMathChar & 0x0FFF) == 0x0332)
- {
- aSubNodes[0] = new SmRectangleNode(aToken);
- delete pTest;
- }
- else
- aSubNodes[0] = pTest;
-
- aSubNodes[1] = rNodeStack.Pop();
- pNode->SetSubNodes(aSubNodes);
- pNode->SetScaleMode(SCALE_WIDTH);
- rNodeStack.Push(pNode);
-}
-
-
-void SmXMLUnderContext_Impl::EndElement()
-{
- if (!nAttrCount)
- GenericEndElement(TCSUB,CSUB);
- else
- HandleAccent();
-#if 0
- //UnderBrace trick
- SmStructureNode *pNode = rNodeStack.Pop();
- if (pNode->GetSubNode(1)->GetToken().cMathChar == (0x0332|0xf000))
- if (pNode->GetSubNode(0)->GetToken().cMathChar == (0x0332|0xf000))
-#endif
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLOverContext_Impl : public SmXMLSubContext_Impl
-{
-protected:
- sal_Int16 nAttrCount;
-
-public:
- SmXMLOverContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLSubContext_Impl(rImport,nPrefix,rLName), nAttrCount(0) {}
-
- void EndElement();
- void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
- void HandleAccent();
-};
-
-
-void SmXMLOverContext_Impl::StartElement(const uno::Reference<
- xml::sax::XAttributeList > & xAttrList )
-{
- nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
-}
-
-
-void SmXMLOverContext_Impl::EndElement()
-{
- if (!nAttrCount)
- GenericEndElement(TCSUP,CSUP);
- else
- HandleAccent();
-}
-
-
-void SmXMLOverContext_Impl::HandleAccent()
-{
- DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TACUTE;
-
- SmAttributNode *pNode = new SmAttributNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
-
- SmNodeArray aSubNodes;
- aSubNodes.resize(2);
- aSubNodes[0] = rNodeStack.Pop();
- aSubNodes[1] = rNodeStack.Pop();
- pNode->SetSubNodes(aSubNodes);
- pNode->SetScaleMode(SCALE_WIDTH);
- rNodeStack.Push(pNode);
-
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLUnderOverContext_Impl : public SmXMLSubSupContext_Impl
-{
-public:
- SmXMLUnderOverContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLSubSupContext_Impl(rImport,nPrefix,rLName) {}
-
- void EndElement()
- {
- GenericEndElement(TCSUB,CSUB,CSUP);
- }
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLMultiScriptsContext_Impl : public SmXMLSubSupContext_Impl
-{
- sal_Bool bHasPrescripts;
-
-public:
- SmXMLMultiScriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) :
- SmXMLSubSupContext_Impl(rImport,nPrefix,rLName),
- bHasPrescripts(FALSE) {}
-
- void EndElement();
- void MiddleElement();
- SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLNoneContext_Impl : public SmXMLImportContext
-{
-public:
- SmXMLNoneContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName) {}
-
- void EndElement();
-};
-
-
-void SmXMLNoneContext_Impl::EndElement(void)
-{
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.aText.Erase();
- aToken.nLevel = 5;
- aToken.eType = TIDENT;
- GetSmImport().GetNodeStack().Push(
- new SmTextNode(aToken,FNT_VARIABLE));
-}
-
-////////////////////////////////////////////////////////////
-
-class SmXMLPrescriptsContext_Impl : public SmXMLImportContext
-{
-public:
- SmXMLPrescriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName)
- : SmXMLImportContext(rImport,nPrefix,rLName) {}
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLTableRowContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLTableRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) :
- SmXMLRowContext_Impl(rImport,nPrefix,rLName)
- {}
-
- SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-};
-
-
-////////////////////////////////////////////////////////////
-
-class SmXMLTableContext_Impl : public SmXMLTableRowContext_Impl
-{
-public:
- SmXMLTableContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) :
- SmXMLTableRowContext_Impl(rImport,nPrefix,rLName)
- {}
-
- void EndElement();
- SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-};
-
-
-////////////////////////////////////////////////////////////
-
-class SmXMLTableCellContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLTableCellContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) :
- SmXMLRowContext_Impl(rImport,nPrefix,rLName)
- {}
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLAlignGroupContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLAlignGroupContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) :
- SmXMLRowContext_Impl(rImport,nPrefix,rLName)
- {}
-
- /*Don't do anything with alignment for now*/
- void EndElement()
- {
- }
-};
-
-////////////////////////////////////////////////////////////
-
-class SmXMLActionContext_Impl : public SmXMLRowContext_Impl
-{
-public:
- SmXMLActionContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
- const OUString& rLName) :
- SmXMLRowContext_Impl(rImport,nPrefix,rLName)
- {}
-
- void EndElement();
-};
-
-////////////////////////////////////////////////////////////
-
-// NB: virtually inherit so we can multiply inherit properly
-// in SmXMLFlatDocContext_Impl
-class SmXMLOfficeContext_Impl : public virtual SvXMLImportContext
-{
-public:
- SmXMLOfficeContext_Impl( SmXMLImport &rImport, sal_uInt16 nPrfx,
- const OUString& rLName)
- : SvXMLImportContext(rImport,nPrfx,rLName) {}
-
- virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList);
-};
-
-SvXMLImportContext *SmXMLOfficeContext_Impl::CreateChildContext(sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList > &xAttrList)
-{
- SvXMLImportContext *pContext = 0;
- if ( XML_NAMESPACE_OFFICE == nPrefix &&
- rLocalName == GetXMLToken(XML_META) )
- {
- DBG_WARNING("XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
- }
- else if ( XML_NAMESPACE_OFFICE == nPrefix &&
- rLocalName == GetXMLToken(XML_SETTINGS) )
- {
- pContext = new XMLDocumentSettingsContext( GetImport(),
- XML_NAMESPACE_OFFICE, rLocalName,
- xAttrList );
- }
- else
- pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
-
- return pContext;
-}
-
-////////////////////////////////////////////////////////////
-
-// context for flat file xml format
-class SmXMLFlatDocContext_Impl
- : public SmXMLOfficeContext_Impl, public SvXMLMetaDocumentContext
-{
-public:
- SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
- const uno::Reference<document::XDocumentProperties>& i_xDocProps,
- const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
-
- virtual ~SmXMLFlatDocContext_Impl();
-
- virtual SvXMLImportContext *CreateChildContext(USHORT i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
-};
-
-SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
- const uno::Reference<document::XDocumentProperties>& i_xDocProps,
- const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
- SvXMLImportContext(i_rImport, i_nPrefix, i_rLName),
- SmXMLOfficeContext_Impl(i_rImport, i_nPrefix, i_rLName),
- SvXMLMetaDocumentContext(i_rImport, i_nPrefix, i_rLName,
- i_xDocProps, i_xDocBuilder)
-{
-}
-
-SmXMLFlatDocContext_Impl::~SmXMLFlatDocContext_Impl()
-{
-}
-
-SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
-{
- // behave like meta base class iff we encounter office:meta
- if ( XML_NAMESPACE_OFFICE == i_nPrefix &&
- i_rLocalName == GetXMLToken(XML_META) )
- {
- return SvXMLMetaDocumentContext::CreateChildContext(
- i_nPrefix, i_rLocalName, i_xAttrList );
- }
- else
- {
- return SmXMLOfficeContext_Impl::CreateChildContext(
- i_nPrefix, i_rLocalName, i_xAttrList );
- }
-}
-
-////////////////////////////////////////////////////////////
-
-static __FAR_DATA SvXMLTokenMapEntry aPresLayoutElemTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_SEMANTICS, XML_TOK_SEMANTICS },
- { XML_NAMESPACE_MATH, XML_MATH, XML_TOK_MATH },
- { XML_NAMESPACE_MATH, XML_MSTYLE, XML_TOK_MSTYLE },
- { XML_NAMESPACE_MATH, XML_MERROR, XML_TOK_MERROR },
- { XML_NAMESPACE_MATH, XML_MPHANTOM, XML_TOK_MPHANTOM },
- { XML_NAMESPACE_MATH, XML_MROW, XML_TOK_MROW },
- { XML_NAMESPACE_MATH, XML_MFRAC, XML_TOK_MFRAC },
- { XML_NAMESPACE_MATH, XML_MSQRT, XML_TOK_MSQRT },
- { XML_NAMESPACE_MATH, XML_MROOT, XML_TOK_MROOT },
- { XML_NAMESPACE_MATH, XML_MSUB, XML_TOK_MSUB },
- { XML_NAMESPACE_MATH, XML_MSUP, XML_TOK_MSUP },
- { XML_NAMESPACE_MATH, XML_MSUBSUP, XML_TOK_MSUBSUP },
- { XML_NAMESPACE_MATH, XML_MUNDER, XML_TOK_MUNDER },
- { XML_NAMESPACE_MATH, XML_MOVER, XML_TOK_MOVER },
- { XML_NAMESPACE_MATH, XML_MUNDEROVER, XML_TOK_MUNDEROVER },
- { XML_NAMESPACE_MATH, XML_MMULTISCRIPTS, XML_TOK_MMULTISCRIPTS },
- { XML_NAMESPACE_MATH, XML_MTABLE, XML_TOK_MTABLE },
- { XML_NAMESPACE_MATH, XML_MACTION, XML_TOK_MACTION },
- { XML_NAMESPACE_MATH, XML_MFENCED, XML_TOK_MFENCED },
- { XML_NAMESPACE_MATH, XML_MPADDED, XML_TOK_MPADDED },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aPresLayoutAttrTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_FONTWEIGHT, XML_TOK_FONTWEIGHT },
- { XML_NAMESPACE_MATH, XML_FONTSTYLE, XML_TOK_FONTSTYLE },
- { XML_NAMESPACE_MATH, XML_FONTSIZE, XML_TOK_FONTSIZE },
- { XML_NAMESPACE_MATH, XML_FONTFAMILY, XML_TOK_FONTFAMILY },
- { XML_NAMESPACE_MATH, XML_COLOR, XML_TOK_COLOR },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aFencedAttrTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_OPEN, XML_TOK_OPEN },
- { XML_NAMESPACE_MATH, XML_CLOSE, XML_TOK_CLOSE },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aOperatorAttrTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_STRETCHY, XML_TOK_STRETCHY },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aAnnotationAttrTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_ENCODING, XML_TOK_ENCODING },
- XML_TOKEN_MAP_END
-};
-
-
-static __FAR_DATA SvXMLTokenMapEntry aPresElemTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_ANNOTATION, XML_TOK_ANNOTATION },
- { XML_NAMESPACE_MATH, XML_MI, XML_TOK_MI },
- { XML_NAMESPACE_MATH, XML_MN, XML_TOK_MN },
- { XML_NAMESPACE_MATH, XML_MO, XML_TOK_MO },
- { XML_NAMESPACE_MATH, XML_MTEXT, XML_TOK_MTEXT },
- { XML_NAMESPACE_MATH, XML_MSPACE,XML_TOK_MSPACE },
- { XML_NAMESPACE_MATH, XML_MS, XML_TOK_MS },
- { XML_NAMESPACE_MATH, XML_MALIGNGROUP, XML_TOK_MALIGNGROUP },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aPresScriptEmptyElemTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_MPRESCRIPTS, XML_TOK_MPRESCRIPTS },
- { XML_NAMESPACE_MATH, XML_NONE, XML_TOK_NONE },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aPresTableElemTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_MTR, XML_TOK_MTR },
- { XML_NAMESPACE_MATH, XML_MTD, XML_TOK_MTD },
- XML_TOKEN_MAP_END
-};
-
-static __FAR_DATA SvXMLTokenMapEntry aColorTokenMap[] =
-{
- { XML_NAMESPACE_MATH, XML_BLACK, TBLACK},
- { XML_NAMESPACE_MATH, XML_WHITE, TWHITE},
- { XML_NAMESPACE_MATH, XML_RED, TRED},
- { XML_NAMESPACE_MATH, XML_GREEN, TGREEN},
- { XML_NAMESPACE_MATH, XML_BLUE, TBLUE},
- { XML_NAMESPACE_MATH, XML_AQUA, TCYAN},
- { XML_NAMESPACE_MATH, XML_FUCHSIA, TMAGENTA},
- { XML_NAMESPACE_MATH, XML_YELLOW, TYELLOW},
- XML_TOKEN_MAP_END
-};
-
-
-////////////////////////////////////////////////////////////
-
-const SvXMLTokenMap& SmXMLImport::GetPresLayoutElemTokenMap()
-{
- if (!pPresLayoutElemTokenMap)
- pPresLayoutElemTokenMap = new SvXMLTokenMap(aPresLayoutElemTokenMap);
- return *pPresLayoutElemTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetPresLayoutAttrTokenMap()
-{
- if (!pPresLayoutAttrTokenMap)
- pPresLayoutAttrTokenMap = new SvXMLTokenMap(aPresLayoutAttrTokenMap);
- return *pPresLayoutAttrTokenMap;
-}
-
-
-const SvXMLTokenMap& SmXMLImport::GetFencedAttrTokenMap()
-{
- if (!pFencedAttrTokenMap)
- pFencedAttrTokenMap = new SvXMLTokenMap(aFencedAttrTokenMap);
- return *pFencedAttrTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetOperatorAttrTokenMap()
-{
- if (!pOperatorAttrTokenMap)
- pOperatorAttrTokenMap = new SvXMLTokenMap(aOperatorAttrTokenMap);
- return *pOperatorAttrTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetAnnotationAttrTokenMap()
-{
- if (!pAnnotationAttrTokenMap)
- pAnnotationAttrTokenMap = new SvXMLTokenMap(aAnnotationAttrTokenMap);
- return *pAnnotationAttrTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetPresElemTokenMap()
-{
- if (!pPresElemTokenMap)
- pPresElemTokenMap = new SvXMLTokenMap(aPresElemTokenMap);
- return *pPresElemTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetPresScriptEmptyElemTokenMap()
-{
- if (!pPresScriptEmptyElemTokenMap)
- pPresScriptEmptyElemTokenMap = new
- SvXMLTokenMap(aPresScriptEmptyElemTokenMap);
- return *pPresScriptEmptyElemTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetPresTableElemTokenMap()
-{
- if (!pPresTableElemTokenMap)
- pPresTableElemTokenMap = new SvXMLTokenMap(aPresTableElemTokenMap);
- return *pPresTableElemTokenMap;
-}
-
-const SvXMLTokenMap& SmXMLImport::GetColorTokenMap()
-{
- if (!pColorTokenMap)
- pColorTokenMap = new SvXMLTokenMap(aColorTokenMap);
- return *pColorTokenMap;
-}
-
-////////////////////////////////////////////////////////////
-
-SvXMLImportContext *SmXMLDocContext_Impl::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList)
-{
- SvXMLImportContext* pContext = 0L;
-
- const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresLayoutElemTokenMap();
-
- //UINT32 nTest = rTokenMap.Get(nPrefix, rLocalName);
-
- switch(rTokenMap.Get(nPrefix, rLocalName))
- {
- //Consider semantics a dummy except for any starmath annotations
- case XML_TOK_SEMANTICS:
- pContext = GetSmImport().CreateRowContext(nPrefix,rLocalName,
- xAttrList);
- break;
- /*General Layout Schemata*/
- case XML_TOK_MROW:
- pContext = GetSmImport().CreateRowContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MFRAC:
- pContext = GetSmImport().CreateFracContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MSQRT:
- pContext = GetSmImport().CreateSqrtContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MROOT:
- pContext = GetSmImport().CreateRootContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MSTYLE:
- pContext = GetSmImport().CreateStyleContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MERROR:
- pContext = GetSmImport().CreateErrorContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MPADDED:
- pContext = GetSmImport().CreatePaddedContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MPHANTOM:
- pContext = GetSmImport().CreatePhantomContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MFENCED:
- pContext = GetSmImport().CreateFencedContext(nPrefix,rLocalName,
- xAttrList);
- break;
- /*Script and Limit Schemata*/
- case XML_TOK_MSUB:
- pContext = GetSmImport().CreateSubContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MSUP:
- pContext = GetSmImport().CreateSupContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MSUBSUP:
- pContext = GetSmImport().CreateSubSupContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MUNDER:
- pContext = GetSmImport().CreateUnderContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MOVER:
- pContext = GetSmImport().CreateOverContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MUNDEROVER:
- pContext = GetSmImport().CreateUnderOverContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MMULTISCRIPTS:
- pContext = GetSmImport().CreateMultiScriptsContext(nPrefix,
- rLocalName, xAttrList);
- break;
- case XML_TOK_MTABLE:
- pContext = GetSmImport().CreateTableContext(nPrefix,
- rLocalName, xAttrList);
- break;
- case XML_TOK_MACTION:
- pContext = GetSmImport().CreateActionContext(nPrefix,
- rLocalName, xAttrList);
- break;
- default:
- /*Basically theres an implicit mrow around certain bare
- *elements, use a RowContext to see if this is one of
- *those ones*/
- SmXMLRowContext_Impl aTempContext(GetSmImport(),nPrefix,
- GetXMLToken(XML_MROW));
-
- pContext = aTempContext.StrictCreateChildContext(nPrefix,
- rLocalName, xAttrList);
- break;
- }
- return pContext;
-}
-
-void SmXMLDocContext_Impl::EndElement()
-{
- SmNodeArray ContextArray;
- ContextArray.resize(1);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
-
- for (ULONG i=0;i< 1;i++)
- ContextArray[i] = rNodeStack.Pop();
-
- SmToken aDummy;
- SmStructureNode *pSNode = new SmLineNode(aDummy);
- pSNode->SetSubNodes(ContextArray);
- rNodeStack.Push(pSNode);
-
- SmNodeArray LineArray;
- ULONG n = rNodeStack.Count();
- LineArray.resize(n);
- for (ULONG j = 0; j < n; j++)
- LineArray[n - (j + 1)] = rNodeStack.Pop();
- SmStructureNode *pSNode2 = new SmTableNode(aDummy);
- pSNode2->SetSubNodes(LineArray);
- rNodeStack.Push(pSNode2);
-}
-
-void SmXMLFracContext_Impl::EndElement()
-{
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TOVER;
- SmStructureNode *pSNode = new SmBinVerNode(aToken);
- SmNode *pOper = new SmRectangleNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- DBG_ASSERT(rNodeStack.Count() - nElementCount == 2,
- "Fraction (mfrac) tag is missing component");
- if (rNodeStack.Count() - nElementCount == 2)
- {
- SmNode *pSecond = rNodeStack.Pop();
- SmNode *pFirst = rNodeStack.Pop();
- pSNode->SetSubNodes(pFirst,pOper,pSecond);
- rNodeStack.Push(pSNode);
- }
-}
-
-void SmXMLRootContext_Impl::EndElement()
-{
- /*The <mroot> element requires exactly 2 arguments.*/
- DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Root tag is missing component");
-
- SmToken aToken;
- aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TNROOT;
- SmStructureNode *pSNode = new SmRootNode(aToken);
- SmNode *pOper = new SmRootSymbolNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- SmNode *pIndex = rNodeStack.Pop();
- SmNode *pBase = rNodeStack.Pop();
- pSNode->SetSubNodes(pIndex,pOper,pBase);
- rNodeStack.Push(pSNode);
-}
-
-void SmXMLSqrtContext_Impl::EndElement()
-{
- /*
- <msqrt> accepts any number of arguments; if this number is not 1, its
- contents are treated as a single "inferred <mrow>" containing its
- arguments
- */
- if (GetSmImport().GetNodeStack().Count() - nElementCount > 1)
- SmXMLRowContext_Impl::EndElement();
-
- SmToken aToken;
- aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TSQRT;
- SmStructureNode *pSNode = new SmRootNode(aToken);
- SmNode *pOper = new SmRootSymbolNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- pSNode->SetSubNodes(0,pOper,rNodeStack.Pop());
- rNodeStack.Push(pSNode);
-}
-
-void SmXMLRowContext_Impl::EndElement()
-{
- SmNodeArray aRelationArray;
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- ULONG nSize = rNodeStack.Count()-nElementCount;
-
- if (nSize > 0)
- {
- aRelationArray.resize(nSize);
- for (ULONG j=rNodeStack.Count()-nElementCount;j > 0;j--)
- aRelationArray[j-1] = rNodeStack.Pop();
-
-
- //If the first or last element is an operator with stretchyness
- //set then we must create a brace node here from those elements,
- //removing the stretchness from the operators and applying it to
- //ourselves, and creating the appropiate dummy StarMath none bracket
- //to balance the arrangement
- if (((aRelationArray[0]->GetScaleMode() == SCALE_HEIGHT)
- && (aRelationArray[0]->GetType() == NMATH))
- || ((aRelationArray[nSize-1]->GetScaleMode() == SCALE_HEIGHT)
- && (aRelationArray[nSize-1]->GetType() == NMATH)))
- {
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
-
- int nLeft=0,nRight=0;
- if ((aRelationArray[0]->GetScaleMode() == SCALE_HEIGHT)
- && (aRelationArray[0]->GetType() == NMATH))
- {
- aToken = aRelationArray[0]->GetToken();
- nLeft=1;
- }
- else
- aToken.cMathChar = '\0';
-
- aToken.eType = TLPARENT;
- SmNode *pLeft = new SmMathSymbolNode(aToken);
-
- if ((aRelationArray[nSize-1]->GetScaleMode() == SCALE_HEIGHT)
- && (aRelationArray[nSize-1]->GetType() == NMATH))
- {
- aToken = aRelationArray[nSize-1]->GetToken();
- nRight=1;
- }
- else
- aToken.cMathChar = '\0';
-
- aToken.eType = TRPARENT;
- SmNode *pRight = new SmMathSymbolNode(aToken);
-
- SmNodeArray aRelationArray2;
-
- //!! nSize-nLeft-nRight may be < 0 !!
- int nRelArrSize = nSize-nLeft-nRight;
- if (nRelArrSize > 0)
- {
- aRelationArray2.resize(nRelArrSize);
- for (int i=0;i < nRelArrSize;i++)
- aRelationArray2[i] = aRelationArray[i+nLeft];
- }
-
- SmToken aDummy;
- SmStructureNode *pSNode = new SmBraceNode(aToken);
- SmStructureNode *pBody = new SmExpressionNode(aDummy);
- pBody->SetSubNodes(aRelationArray2);
-
- pSNode->SetSubNodes(pLeft,pBody,pRight);
- pSNode->SetScaleMode(SCALE_HEIGHT);
- rNodeStack.Push(pSNode);
- return;
- }
- }
- else //Multiple newlines result in empty row elements
- {
- aRelationArray.resize(1);
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 5;
- aToken.eType = TNEWLINE;
- aRelationArray[0] = new SmLineNode(aToken);
- }
-
- SmToken aDummy;
- SmStructureNode *pSNode = new SmExpressionNode(aDummy);
- pSNode->SetSubNodes(aRelationArray);
- rNodeStack.Push(pSNode);
-}
-
-
-SvXMLImportContext *SmXMLRowContext_Impl::StrictCreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList)
-{
- SvXMLImportContext* pContext = 0L;
-
- const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresElemTokenMap();
- switch(rTokenMap.Get(nPrefix, rLocalName))
- {
- /*Note that these should accept malignmark subelements, but do not*/
- case XML_TOK_MN:
- pContext = GetSmImport().CreateNumberContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MI:
- pContext = GetSmImport().CreateIdentifierContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MO:
- pContext = GetSmImport().CreateOperatorContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MTEXT:
- pContext = GetSmImport().CreateTextContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MSPACE:
- pContext = GetSmImport().CreateSpaceContext(nPrefix,rLocalName,
- xAttrList);
- break;
- case XML_TOK_MS:
- pContext = GetSmImport().CreateStringContext(nPrefix,rLocalName,
- xAttrList);
- break;
-
- /*Note: The maligngroup should only be seen when the row
- * (or decendants) are in a table*/
- case XML_TOK_MALIGNGROUP:
- pContext = GetSmImport().CreateAlignGroupContext(nPrefix,rLocalName,
- xAttrList);
- break;
-
- case XML_TOK_ANNOTATION:
- pContext = GetSmImport().CreateAnnotationContext(nPrefix,rLocalName,
- xAttrList);
- break;
-
- default:
- break;
- }
- return pContext;
-}
-
-
-SvXMLImportContext *SmXMLRowContext_Impl::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList)
-{
- SvXMLImportContext* pContext = StrictCreateChildContext(nPrefix,
- rLocalName, xAttrList);
-
- if (!pContext)
- {
- //Hmm, unrecognized for this level, check to see if its
- //an element that can have an implicit schema around it
- pContext = SmXMLDocContext_Impl::CreateChildContext(nPrefix,
- rLocalName,xAttrList);
- }
- return pContext;
-}
-
-
-SvXMLImportContext *SmXMLMultiScriptsContext_Impl::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList)
-{
- SvXMLImportContext* pContext = 0L;
-
- const SvXMLTokenMap& rTokenMap = GetSmImport().
- GetPresScriptEmptyElemTokenMap();
- switch(rTokenMap.Get(nPrefix, rLocalName))
- {
- case XML_TOK_MPRESCRIPTS:
- MiddleElement();
- pContext = GetSmImport().CreatePrescriptsContext(nPrefix,
- rLocalName, xAttrList);
- break;
- case XML_TOK_NONE:
- pContext = GetSmImport().CreateNoneContext(nPrefix,rLocalName,
- xAttrList);
- break;
- default:
- pContext = SmXMLRowContext_Impl::CreateChildContext(nPrefix,
- rLocalName,xAttrList);
- break;
- }
- return pContext;
-}
-
-void SmXMLMultiScriptsContext_Impl::MiddleElement()
-{
- bHasPrescripts=sal_True;
-
- DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount > 0,
- "Sub has no arguments");
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- if (rNodeStack.Count()-nElementCount > 1)
- {
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TRSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
-
- SmNodeStack aReverseStack;
- while (rNodeStack.Count()-nElementCount)
- {
- SmNode *pThing = rNodeStack.Pop();
- aReverseStack.Push(pThing);
- }
-
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
- {
- SmSubSupNode *pNode = new SmSubSupNode(aToken);
-
- // initialize subnodes array
- SmNodeArray aSubNodes;
- aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
- aSubNodes[i] = NULL;
-
- /*On each loop the base and its sub sup pair becomes the
- base for the next loop to which the next sub sup pair is
- attached, i.e. wheels within wheels*/
- //if (nCount == 0)
- aSubNodes[0] = aReverseStack.Pop();
-
- SmNode *pScriptNode = aReverseStack.Pop();
-
- if (pScriptNode && ((pScriptNode->GetToken().eType != TIDENT) ||
- (pScriptNode->GetToken().aText.Len())))
- aSubNodes[RSUB+1] = pScriptNode;
- pScriptNode = aReverseStack.Pop();
- if (pScriptNode && ((pScriptNode->GetToken().eType != TIDENT) ||
- (pScriptNode->GetToken().aText.Len())))
- aSubNodes[RSUP+1] = pScriptNode;
-
- pNode->SetSubNodes(aSubNodes);
- aReverseStack.Push(pNode);
- }
- rNodeStack.Push(aReverseStack.Pop());
- }
-}
-
-
-void SmXMLTableContext_Impl::EndElement()
-{
- SmNodeArray aExpressionArray;
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- SmNodeStack aReverseStack;
- aExpressionArray.resize(rNodeStack.Count()-nElementCount);
-
- ULONG nRows = rNodeStack.Count()-nElementCount;
- USHORT nCols = 0;
-
- SmStructureNode *pArray;
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 0;i--)
- {
- pArray = (SmStructureNode *)rNodeStack.Pop();
- if (pArray->GetNumSubNodes() == 0)
- {
- //This is a little tricky, it is possible that there was
- //be elements that were not inside a <mtd> pair, in which
- //case they will not be in a row, i.e. they will not have
- //SubNodes, so we have to wait until here before we can
- //resolve the situation. Implicitsurrounding tags are
- //surprisingly difficult to get right within this
- //architecture
-
- SmNodeArray aRelationArray;
- aRelationArray.resize(1);
- aRelationArray[0] = pArray;
- SmToken aDummy;
- pArray = new SmExpressionNode(aDummy);
- pArray->SetSubNodes(aRelationArray);
- }
-
- if (pArray->GetNumSubNodes() > nCols)
- nCols = pArray->GetNumSubNodes();
- aReverseStack.Push(pArray);
- }
- aExpressionArray.resize(nCols*nRows);
- ULONG j=0;
- while (aReverseStack.Count())
- {
- pArray = (SmStructureNode *)aReverseStack.Pop();
- for (USHORT i=0;i<pArray->GetNumSubNodes();i++)
- aExpressionArray[j++] = pArray->GetSubNode(i);
- }
-
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = TRGROUP;
- aToken.nLevel = 0;
- aToken.eType = TMATRIX;
- SmMatrixNode *pSNode = new SmMatrixNode(aToken);
- pSNode->SetSubNodes(aExpressionArray);
- pSNode->SetRowCol(static_cast<USHORT>(nRows),nCols);
- rNodeStack.Push(pSNode);
-}
-
-SvXMLImportContext *SmXMLTableRowContext_Impl::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList)
-{
- SvXMLImportContext* pContext = 0L;
-
- const SvXMLTokenMap& rTokenMap = GetSmImport().
- GetPresTableElemTokenMap();
- switch(rTokenMap.Get(nPrefix, rLocalName))
- {
- case XML_TOK_MTD:
- pContext = GetSmImport().CreateTableCellContext(nPrefix,
- rLocalName, xAttrList);
- break;
- default:
- pContext = SmXMLRowContext_Impl::CreateChildContext(nPrefix,
- rLocalName,xAttrList);
- break;
- }
- return pContext;
-}
-
-SvXMLImportContext *SmXMLTableContext_Impl::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference<xml::sax::XAttributeList>& xAttrList)
-{
- SvXMLImportContext* pContext = 0L;
-
- const SvXMLTokenMap& rTokenMap = GetSmImport().
- GetPresTableElemTokenMap();
- switch(rTokenMap.Get(nPrefix, rLocalName))
- {
- case XML_TOK_MTR:
- pContext = GetSmImport().CreateTableRowContext(nPrefix,rLocalName,
- xAttrList);
- break;
- default:
- pContext = SmXMLTableRowContext_Impl::CreateChildContext(nPrefix,
- rLocalName,xAttrList);
- break;
- }
- return pContext;
-}
-
-void SmXMLMultiScriptsContext_Impl::EndElement()
-{
- if (!bHasPrescripts)
- MiddleElement();
-
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- if (rNodeStack.Count()-nElementCount > 1)
- {
- SmToken aToken;
- aToken.cMathChar = '\0';
- aToken.nGroup = 0;
- aToken.nLevel = 0;
- aToken.eType = TLSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
-
- SmNodeStack aReverseStack;
- while (rNodeStack.Count()-nElementCount)
- aReverseStack.Push(rNodeStack.Pop());
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
- {
- SmSubSupNode *pNode = new SmSubSupNode(aToken);
-
- // initialize subnodes array
- SmNodeArray aSubNodes;
- aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
- aSubNodes[i] = NULL;
-
- /*On each loop the base and its sub sup pair becomes the
- base for the next loop to which the next sub sup pair is
- attached, i.e. wheels within wheels*/
- //if (nCount == 0)
- aSubNodes[0] = aReverseStack.Pop();
-
- SmNode *pScriptNode = aReverseStack.Pop();
- if (pScriptNode->GetToken().aText.Len())
- aSubNodes[LSUB+1] = pScriptNode;
- pScriptNode = aReverseStack.Pop();
- if (pScriptNode->GetToken().aText.Len())
- aSubNodes[LSUP+1] = pScriptNode;
-
- pNode->SetSubNodes(aSubNodes);
- aReverseStack.Push(pNode);
- }
- rNodeStack.Push(aReverseStack.Pop());
- }
-
-}
-void SmXMLActionContext_Impl::EndElement()
-{
- /*For now we will just assume that the
- selected attribute is one, and then just display
- that expression alone, i.e. remove all expect the
- first pushed one*/
-
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 1;i--)
- {
- delete rNodeStack.Pop();
- }
-}
-
-SvXMLImportContext *SmXMLImport::CreateContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- if ( XML_NAMESPACE_OFFICE == nPrefix )
- {
- if ( (IsXMLToken(rLocalName, XML_DOCUMENT) ||
- IsXMLToken(rLocalName, XML_DOCUMENT_META)))
- {
- uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
- mxServiceFactory->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.xml.dom.SAXDocumentBuilder")),
- uno::UNO_QUERY_THROW);
- uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
- GetModel(), uno::UNO_QUERY_THROW);
- return IsXMLToken(rLocalName, XML_DOCUMENT_META)
- ? new SvXMLMetaDocumentContext(*this,
- XML_NAMESPACE_OFFICE, rLocalName,
- xDPS->getDocumentProperties(), xDocBuilder)
- // flat OpenDocument file format -- this has not been tested...
- : new SmXMLFlatDocContext_Impl( *this, nPrefix, rLocalName,
- xDPS->getDocumentProperties(), xDocBuilder);
- }
- else
- {
- return new SmXMLOfficeContext_Impl( *this,nPrefix,rLocalName);
- }
- }
- else
- return new SmXMLDocContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateRowContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLRowContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateTextContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLTextContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateAnnotationContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLAnnotationContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateStringContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLStringContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateNumberContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLNumberContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateIdentifierContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLIdentifierContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateOperatorContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLOperatorContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateSpaceContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLSpaceContext_Impl(*this,nPrefix,rLocalName);
-}
-
-
-SvXMLImportContext *SmXMLImport::CreateFracContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLFracContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateSqrtContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLSqrtContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateRootContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLRootContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateStyleContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLStyleContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreatePaddedContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLPaddedContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreatePhantomContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLPhantomContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateFencedContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLFencedContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateErrorContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLErrorContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateSubContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLSubContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateSubSupContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLSubSupContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateSupContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLSupContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateUnderContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLUnderContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateOverContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLOverContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateUnderOverContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLUnderOverContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateMultiScriptsContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLMultiScriptsContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateTableContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLTableContext_Impl(*this,nPrefix,rLocalName);
-}
-SvXMLImportContext *SmXMLImport::CreateTableRowContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLTableRowContext_Impl(*this,nPrefix,rLocalName);
-}
-SvXMLImportContext *SmXMLImport::CreateTableCellContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLTableCellContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateNoneContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLNoneContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreatePrescriptsContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLPrescriptsContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateAlignGroupContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLAlignGroupContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SvXMLImportContext *SmXMLImport::CreateActionContext(sal_uInt16 nPrefix,
- const OUString &rLocalName,
- const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
-{
- return new SmXMLActionContext_Impl(*this,nPrefix,rLocalName);
-}
-
-SmXMLImport::~SmXMLImport() throw ()
-{
- delete pPresLayoutElemTokenMap;
- delete pPresElemTokenMap;
- delete pPresScriptEmptyElemTokenMap;
- delete pPresTableElemTokenMap;
- delete pPresLayoutAttrTokenMap;
- delete pFencedAttrTokenMap;
- delete pColorTokenMap;
- delete pOperatorAttrTokenMap;
- delete pAnnotationAttrTokenMap;
-}
-
-void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps)
-{
- uno::Reference <frame::XModel> xModel = GetModel();
- if ( !xModel.is() )
- return;
-
- uno::Reference <lang::XUnoTunnel> xTunnel;
- xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY);
- SmModel *pModel = reinterpret_cast<SmModel *>
- (xTunnel->getSomething(SmModel::getUnoTunnelId()));
-
- if ( !pModel )
- return;
-
- SmDocShell *pDocShell =
- static_cast<SmDocShell*>(pModel->GetObjectShell());
- if ( !pDocShell )
- return;
-
- Rectangle aRect( pDocShell->GetVisArea() );
-
- sal_Int32 nCount = aViewProps.getLength();
- const PropertyValue *pValue = aViewProps.getConstArray();
-
- long nTmp = 0;
- //sal_Bool bShowDeletes = sal_False, bShowInserts = sal_False, bShowFooter = sal_False, bShowHeader = sal_False;
-
- for (sal_Int32 i = 0; i < nCount ; i++)
- {
- if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaTop" ) ) )
- {
- pValue->Value >>= nTmp;
- aRect.setY( nTmp );
- }
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaLeft" ) ) )
- {
- pValue->Value >>= nTmp;
- aRect.setX( nTmp );
- }
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaWidth" ) ) )
- {
- pValue->Value >>= nTmp;
- Size aSize( aRect.GetSize() );
- aSize.Width() = nTmp;
- aRect.SetSize( aSize );
- }
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaHeight" ) ) )
- {
- pValue->Value >>= nTmp;
- Size aSize( aRect.GetSize() );
- aSize.Height() = nTmp;
- aRect.SetSize( aSize );
- }
- pValue++;
- }
-
- pDocShell->SetVisArea ( aRect );
-}
-
-void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfProps)
-{
- uno::Reference < XPropertySet > xProps ( GetModel(), UNO_QUERY );
- if ( xProps.is() )
- {
- Reference < XPropertySetInfo > xInfo ( xProps->getPropertySetInfo() );
- if (xInfo.is() )
- {
- sal_Int32 nCount = aConfProps.getLength();
- const PropertyValue* pValues = aConfProps.getConstArray();
-
- const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
- const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
- const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
- while ( nCount-- )
- {
- if (pValues->Name != sFormula &&
- pValues->Name != sBasicLibraries &&
- pValues->Name != sDialogLibraries)
- {
- try
- {
- if ( xInfo->hasPropertyByName( pValues->Name ) )
- xProps->setPropertyValue( pValues->Name, pValues->Value );
- }
- catch( Exception& )
- {
- DBG_ERROR( "SmXMLImport::SetConfigurationSettings: Exception!" );
- }
- }
-
- pValues++;
- }
- }
- }
-}
-
-
-////////////////////////////////////////////////////////////
-
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: x $
+ * $Revision: 1.00 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_starmath.hxx"
+
+/*todo: Change characters and tcharacters to accumulate the characters together
+into one string, xml parser hands them to us line by line rather than all in
+one go*/
+
+#include <com/sun/star/xml/sax/XErrorHandler.hpp>
+#include <com/sun/star/xml/sax/XEntityResolver.hpp>
+#include <com/sun/star/xml/sax/InputSource.hpp>
+#include <com/sun/star/xml/sax/XDTDHandler.hpp>
+#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/io/XActiveDataControl.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/packages/zip/ZipIOException.hpp>
+#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/uno/Any.h>
+
+#include <rtl/math.hxx>
+#include <sfx2/frame.hxx>
+#include <sfx2/docfile.hxx>
+#include <tools/debug.hxx>
+#include <tools/urlobj.hxx>
+#include <svtools/sfxecode.hxx>
+#include <unotools/saveopt.hxx>
+#include <svl/stritem.hxx>
+#include <svl/itemprop.hxx>
+#include <unotools/processfactory.hxx>
+#include <unotools/streamwrap.hxx>
+#include <xmloff/xmlnmspe.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <xmloff/nmspmap.hxx>
+#include <xmloff/attrlist.hxx>
+#include <xmloff/xmluconv.hxx>
+#include <xmloff/xmlmetai.hxx>
+#include <osl/mutex.hxx>
+#include <comphelper/genericpropertyset.hxx>
+
+#include <memory>
+
+#include "mathmlimport.hxx"
+#include "mathtype.hxx"
+#include <starmath.hrc>
+#include <unomodel.hxx>
+#include <document.hxx>
+#include <utility.hxx>
+
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
+using namespace ::xmloff::token;
+
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+
+#define IMPORT_SVC_NAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLImportFilter")
+
+#undef WANTEXCEPT
+
+////////////////////////////////////////////////////////////
+
+ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
+{
+ ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+
+ uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
+ utl::getProcessServiceFactory());
+ DBG_ASSERT(xServiceFactory.is(), "XMLReader::Read: got no service manager");
+ if ( !xServiceFactory.is() )
+ return nError;
+
+ //Make a model component from our SmModel
+ uno::Reference< lang::XComponent > xModelComp( xModel, uno::UNO_QUERY );
+ DBG_ASSERT( xModelComp.is(), "XMLReader::Read: got no model" );
+
+ // try to get an XStatusIndicator from the Medium
+ uno::Reference<task::XStatusIndicator> xStatusIndicator;
+
+ sal_Bool bEmbedded = sal_False;
+ uno::Reference <lang::XUnoTunnel> xTunnel;
+ xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY);
+ SmModel *pModel = reinterpret_cast<SmModel *>
+ (xTunnel->getSomething(SmModel::getUnoTunnelId()));
+
+ SmDocShell *pDocShell = pModel ?
+ static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
+ if (pDocShell)
+ {
+// if (pDocShell->GetMedium())
+ {
+ DBG_ASSERT( pDocShell->GetMedium() == &rMedium,
+ "different SfxMedium found" );
+
+ SfxItemSet* pSet = rMedium.GetItemSet();
+ if (pSet)
+ {
+ const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>(
+ pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL) );
+ if (pItem)
+ pItem->GetValue() >>= xStatusIndicator;
+ }
+ }
+
+ if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ bEmbedded = sal_True;
+ }
+
+ comphelper::PropertyMapEntry aInfoMap[] =
+ {
+ { "PrivateData", sizeof("PrivateData")-1, 0,
+ &::getCppuType( (Reference<XInterface> *)0 ),
+ beans::PropertyAttribute::MAYBEVOID, 0 },
+ { "BaseURI", sizeof("BaseURI")-1, 0,
+ &::getCppuType( (OUString *)0 ),
+ beans::PropertyAttribute::MAYBEVOID, 0 },
+ { "StreamRelPath", sizeof("StreamRelPath")-1, 0,
+ &::getCppuType( (OUString *)0 ),
+ beans::PropertyAttribute::MAYBEVOID, 0 },
+ { "StreamName", sizeof("StreamName")-1, 0,
+ &::getCppuType( (OUString *)0 ),
+ beans::PropertyAttribute::MAYBEVOID, 0 },
+ { NULL, 0, 0, NULL, 0, 0 }
+ };
+ uno::Reference< beans::XPropertySet > xInfoSet(
+ comphelper::GenericPropertySet_CreateInstance(
+ new comphelper::PropertySetInfo( aInfoMap ) ) );
+
+ // Set base URI
+ OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") );
+ xInfoSet->setPropertyValue( sPropName, makeAny( rMedium.GetBaseURL() ) );
+
+ sal_Int32 nSteps=3;
+ if ( !(rMedium.IsStorage()))
+ nSteps = 1;
+
+ sal_Int32 nProgressRange(nSteps);
+ if (xStatusIndicator.is())
+ {
+ xStatusIndicator->start(String(SmResId(STR_STATSTR_READING)),
+ nProgressRange);
+ }
+
+ nSteps=0;
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(nSteps++);
+
+ if ( rMedium.IsStorage())
+ {
+ // TODO/LATER: handle the case of embedded links gracefully
+ if ( bEmbedded ) // && !rMedium.GetStorage()->IsRoot() )
+ {
+ OUString aName( RTL_CONSTASCII_USTRINGPARAM( "dummyObjName" ) );
+ if ( rMedium.GetItemSet() )
+ {
+ const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>(
+ rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME) );
+ if ( pDocHierarchItem )
+ aName = pDocHierarchItem->GetValue();
+ }
+
+ if ( aName.getLength() )
+ {
+ sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
+ xInfoSet->setPropertyValue( sPropName, makeAny( aName ) );
+ }
+ }
+
+ sal_Bool bOASIS = ( SotStorage::GetVersion( rMedium.GetStorage() ) > SOFFICE_FILEFORMAT_60 );
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(nSteps++);
+
+ ULONG nWarn = ReadThroughComponent(
+ rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
+ xServiceFactory, xInfoSet,
+ (bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
+ : "com.sun.star.comp.Math.XMLMetaImporter") );
+
+ if ( nWarn != ERRCODE_IO_BROKENPACKAGE )
+ {
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(nSteps++);
+
+ nWarn = ReadThroughComponent(
+ rMedium.GetStorage(), xModelComp, "settings.xml", 0,
+ xServiceFactory, xInfoSet,
+ (bOASIS ? "com.sun.star.comp.Math.XMLOasisSettingsImporter"
+ : "com.sun.star.comp.Math.XMLSettingsImporter" ) );
+
+ if ( nWarn != ERRCODE_IO_BROKENPACKAGE )
+ {
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(nSteps++);
+
+ nError = ReadThroughComponent(
+ rMedium.GetStorage(), xModelComp, "content.xml", "Content.xml",
+ xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter" );
+ }
+ else
+ nError = ERRCODE_IO_BROKENPACKAGE;
+ }
+ else
+ nError = ERRCODE_IO_BROKENPACKAGE;
+ }
+ else
+ {
+ Reference<io::XInputStream> xInputStream =
+ new utl::OInputStreamWrapper(rMedium.GetInStream());
+
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(nSteps++);
+
+ nError = ReadThroughComponent( xInputStream, xModelComp,
+ xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter", FALSE );
+ }
+
+ if (xStatusIndicator.is())
+ xStatusIndicator->end();
+ return nError;
+}
+
+
+/// read a component (file + filter version)
+ULONG SmXMLImportWrapper::ReadThroughComponent(
+ Reference<io::XInputStream> xInputStream,
+ Reference<XComponent> xModelComponent,
+ Reference<lang::XMultiServiceFactory> & rFactory,
+ Reference<beans::XPropertySet> & rPropSet,
+ const sal_Char* pFilterName,
+ sal_Bool bEncrypted )
+{
+ ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ DBG_ASSERT(xInputStream.is(), "input stream missing");
+ DBG_ASSERT(xModelComponent.is(), "document missing");
+ DBG_ASSERT(rFactory.is(), "factory missing");
+ DBG_ASSERT(NULL != pFilterName,"I need a service name for the component!");
+
+ // prepare ParserInputSrouce
+ xml::sax::InputSource aParserInput;
+ aParserInput.aInputStream = xInputStream;
+
+ // get parser
+ Reference< xml::sax::XParser > xParser(
+ rFactory->createInstance(
+ OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
+ UNO_QUERY );
+ DBG_ASSERT( xParser.is(), "Can't create parser" );
+ if ( !xParser.is() )
+ return nError;
+
+ Sequence<Any> aArgs( 1 );
+ aArgs[0] <<= rPropSet;
+
+ // get filter
+ Reference< xml::sax::XDocumentHandler > xFilter(
+ rFactory->createInstanceWithArguments(
+ OUString::createFromAscii(pFilterName), aArgs ),
+ UNO_QUERY );
+ DBG_ASSERT( xFilter.is(), "Can't instantiate filter component." );
+ if ( !xFilter.is() )
+ return nError;
+
+ // connect parser and filter
+ xParser->setDocumentHandler( xFilter );
+
+ // connect model and filter
+ Reference < XImporter > xImporter( xFilter, UNO_QUERY );
+ xImporter->setTargetDocument( xModelComponent );
+
+ // finally, parser the stream
+ try
+ {
+ xParser->parseStream( aParserInput );
+
+ uno::Reference<lang::XUnoTunnel> xFilterTunnel;
+ xFilterTunnel = uno::Reference<lang::XUnoTunnel>
+ ( xFilter, uno::UNO_QUERY );
+ SmXMLImport *pFilter = reinterpret_cast< SmXMLImport * >(
+ sal::static_int_cast< sal_uIntPtr >(
+ xFilterTunnel->getSomething( SmXMLImport::getUnoTunnelId() )));
+ if ( pFilter && pFilter->GetSuccess() )
+ nError = 0;
+ }
+ catch( xml::sax::SAXParseException& r )
+ {
+ // sax parser sends wrapped exceptions,
+ // try to find the original one
+ xml::sax::SAXException aSaxEx = *(xml::sax::SAXException*)(&r);
+ sal_Bool bTryChild = sal_True;
+
+ while( bTryChild )
+ {
+ xml::sax::SAXException aTmp;
+ if ( aSaxEx.WrappedException >>= aTmp )
+ aSaxEx = aTmp;
+ else
+ bTryChild = sal_False;
+ }
+
+ packages::zip::ZipIOException aBrokenPackage;
+ if ( aSaxEx.WrappedException >>= aBrokenPackage )
+ return ERRCODE_IO_BROKENPACKAGE;
+
+ if ( bEncrypted )
+ nError = ERRCODE_SFX_WRONGPASSWORD;
+ }
+ catch( xml::sax::SAXException& r )
+ {
+ packages::zip::ZipIOException aBrokenPackage;
+ if ( r.WrappedException >>= aBrokenPackage )
+ return ERRCODE_IO_BROKENPACKAGE;
+
+ if ( bEncrypted )
+ nError = ERRCODE_SFX_WRONGPASSWORD;
+ }
+ catch( packages::zip::ZipIOException& )
+ {
+ nError = ERRCODE_IO_BROKENPACKAGE;
+ }
+ catch( io::IOException& )
+ {
+ }
+
+ return nError;
+}
+
+
+ULONG SmXMLImportWrapper::ReadThroughComponent(
+ const uno::Reference< embed::XStorage >& xStorage,
+ Reference<XComponent> xModelComponent,
+ const sal_Char* pStreamName,
+ const sal_Char* pCompatibilityStreamName,
+ Reference<lang::XMultiServiceFactory> & rFactory,
+ Reference<beans::XPropertySet> & rPropSet,
+ const sal_Char* pFilterName )
+{
+ DBG_ASSERT(xStorage.is(), "Need storage!");
+ DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
+
+ // open stream (and set parser input)
+ OUString sStreamName = OUString::createFromAscii(pStreamName);
+ uno::Reference < container::XNameAccess > xAccess( xStorage, uno::UNO_QUERY );
+ if ( !xAccess->hasByName(sStreamName) || !xStorage->isStreamElement(sStreamName) )
+ {
+ // stream name not found! Then try the compatibility name.
+ // do we even have an alternative name?
+ if ( pCompatibilityStreamName )
+ sStreamName = OUString::createFromAscii(pCompatibilityStreamName);
+ }
+
+ // get input stream
+ try
+ {
+ uno::Reference < io::XStream > xEventsStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ );
+
+ // determine if stream is encrypted or not
+ uno::Reference < beans::XPropertySet > xProps( xEventsStream, uno::UNO_QUERY );
+ Any aAny = xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) );
+ sal_Bool bEncrypted = sal_False;
+ if ( aAny.getValueType() == ::getBooleanCppuType() )
+ aAny >>= bEncrypted;
+
+ // set Base URL
+ if ( rPropSet.is() )
+ {
+ OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") );
+ rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) );
+ }
+
+
+ Reference < io::XInputStream > xStream = xEventsStream->getInputStream();
+ return ReadThroughComponent( xStream, xModelComponent, rFactory, rPropSet, pFilterName, bEncrypted );
+ }
+ catch ( packages::WrongPasswordException& )
+ {
+ return ERRCODE_SFX_WRONGPASSWORD;
+ }
+ catch( packages::zip::ZipIOException& )
+ {
+ return ERRCODE_IO_BROKENPACKAGE;
+ }
+ catch ( uno::Exception& )
+ {
+ }
+
+ return ERRCODE_SFX_DOLOADFAILED;
+}
+
+////////////////////////////////////////////////////////////
+
+SmXMLImport::SmXMLImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ sal_uInt16 nImportFlags)
+: SvXMLImport( xServiceFactory, nImportFlags ),
+ pPresLayoutElemTokenMap(0),
+ pPresLayoutAttrTokenMap(0),
+ pFencedAttrTokenMap(0),
+ pOperatorAttrTokenMap(0),
+ pAnnotationAttrTokenMap(0),
+ pPresElemTokenMap(0),
+ pPresScriptEmptyElemTokenMap(0),
+ pPresTableElemTokenMap(0),
+ pColorTokenMap(0),
+ bSuccess(sal_False)
+{
+}
+
+const uno::Sequence< sal_Int8 > & SmXMLImport::getUnoTunnelId() throw()
+{
+ static uno::Sequence< sal_Int8 > * pSeq = 0;
+ if ( !pSeq )
+ {
+ osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
+ if ( !pSeq )
+ {
+ static uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+OUString SAL_CALL SmXMLImport_getImplementationName() throw()
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLImporter" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SmXMLImport_getSupportedServiceNames()
+ throw()
+{
+ const OUString aServiceName( IMPORT_SVC_NAME );
+ const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+}
+
+uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(
+ const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
+ throw( uno::Exception )
+{
+ // #110680#
+ // return (cppu::OWeakObject*)new SmXMLImport(IMPORT_ALL);
+ return (cppu::OWeakObject*)new SmXMLImport(rSMgr, IMPORT_ALL);
+}
+
+////////////////////////////////////////////////////////////
+
+OUString SAL_CALL SmXMLImportMeta_getImplementationName() throw()
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisMetaImporter" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SmXMLImportMeta_getSupportedServiceNames()
+throw()
+{
+ const OUString aServiceName( IMPORT_SVC_NAME );
+ const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+}
+
+uno::Reference< uno::XInterface > SAL_CALL SmXMLImportMeta_createInstance(
+ const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
+throw( uno::Exception )
+{
+ // #110680#
+ // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_META );
+ return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_META );
+}
+
+////////////////////////////////////////////////////////////
+
+OUString SAL_CALL SmXMLImportSettings_getImplementationName() throw()
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisSettingsImporter" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SmXMLImportSettings_getSupportedServiceNames()
+ throw()
+{
+ const OUString aServiceName( IMPORT_SVC_NAME );
+ const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+}
+
+uno::Reference< uno::XInterface > SAL_CALL SmXMLImportSettings_createInstance(
+ const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
+ throw( uno::Exception )
+{
+ // #110680#
+ // return (cppu::OWeakObject*)new SmXMLImport( IMPORT_SETTINGS );
+ return (cppu::OWeakObject*)new SmXMLImport( rSMgr, IMPORT_SETTINGS );
+}
+
+////////////////////////////////////////////////////////////
+
+// XServiceInfo
+// override empty method from parent class
+rtl::OUString SAL_CALL SmXMLImport::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ OUString aTxt;
+ switch( getImportFlags() )
+ {
+ case IMPORT_META:
+ aTxt = SmXMLImportMeta_getImplementationName();
+ break;
+ case IMPORT_SETTINGS:
+ aTxt = SmXMLImportSettings_getImplementationName();
+ break;
+ case IMPORT_ALL:
+ default:
+ aTxt = SmXMLImport_getImplementationName();
+ break;
+ }
+ return aTxt;
+}
+
+
+sal_Int64 SAL_CALL SmXMLImport::getSomething(
+ const uno::Sequence< sal_Int8 >&rId )
+throw(uno::RuntimeException)
+{
+ if ( rId.getLength() == 16 &&
+ 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this));
+
+ return SvXMLImport::getSomething( rId );
+}
+
+void SmXMLImport::endDocument(void)
+ throw(xml::sax::SAXException, uno::RuntimeException)
+{
+ //Set the resulted tree into the SmDocShell where it belongs
+ SmNode *pTree;
+ if (NULL != (pTree = GetTree()))
+ {
+ uno::Reference <frame::XModel> xModel = GetModel();
+ uno::Reference <lang::XUnoTunnel> xTunnel;
+ xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY);
+ SmModel *pModel = reinterpret_cast<SmModel *>
+ (xTunnel->getSomething(SmModel::getUnoTunnelId()));
+
+ if (pModel)
+ {
+ SmDocShell *pDocShell =
+ static_cast<SmDocShell*>(pModel->GetObjectShell());
+ pDocShell->SetFormulaTree(pTree);
+ if (0 == aText.Len()) //If we picked up no annotation text
+ {
+ //Make up some editable text
+ aText = pDocShell->GetText();
+ pTree->CreateTextFromNode(aText);
+ aText.EraseTrailingChars();
+ if ((aText.GetChar(0) == '{') &&
+ (aText.GetChar(aText.Len()-1) == '}'))
+ {
+ aText.Erase(0,1);
+ aText.Erase(aText.Len()-1,1);
+ }
+ }
+ pDocShell->SetText( String() );
+
+ // Convert symbol names
+ SmParser &rParser = pDocShell->GetParser();
+ BOOL bVal = rParser.IsImportSymbolNames();
+ rParser.SetImportSymbolNames( TRUE );
+ SmNode *pTmpTree = rParser.Parse( aText );
+ aText = rParser.GetText();
+ delete pTmpTree;
+ rParser.SetImportSymbolNames( bVal );
+
+ pDocShell->SetText( aText );
+ }
+ DBG_ASSERT(pModel,"So there *was* a uno problem after all");
+
+ bSuccess = sal_True;
+ }
+
+ SvXMLImport::endDocument();
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLImportContext: public SvXMLImportContext
+{
+public:
+ SmXMLImportContext( SmXMLImport &rImport, sal_uInt16 nPrfx,
+ const OUString& rLName)
+ : SvXMLImportContext(rImport, nPrfx, rLName) {}
+
+ const SmXMLImport& GetSmImport() const
+ {
+ return (const SmXMLImport&)GetImport();
+ }
+
+ SmXMLImport& GetSmImport()
+ {
+ return (SmXMLImport&)GetImport();
+ }
+
+ virtual void TCharacters(const OUString & /*rChars*/);
+ virtual void Characters(const OUString &rChars);
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/);
+};
+
+void SmXMLImportContext::TCharacters(const OUString & /*rChars*/)
+{
+}
+
+void SmXMLImportContext::Characters(const OUString &rChars)
+{
+ /*
+ Whitespace occurring within the content of token elements is "trimmed"
+ from the ends (i.e. all whitespace at the beginning and end of the
+ content is removed), and "collapsed" internally (i.e. each sequence of
+ 1 or more whitespace characters is replaced with one blank character).
+ */
+ //collapsing not done yet!
+ const OUString &rChars2 = rChars.trim();
+ if (rChars2.getLength())
+ TCharacters(rChars2/*.collapse()*/);
+}
+
+SvXMLImportContext * SmXMLImportContext::CreateChildContext(sal_uInt16 /*nPrefix*/,
+ const OUString& /*rLocalName*/,
+ const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/)
+{
+ return 0;
+}
+
+////////////////////////////////////////////////////////////
+
+struct SmXMLContext_Helper
+{
+ sal_Int8 nIsBold;
+ sal_Int8 nIsItalic;
+ double nFontSize;
+ sal_Bool bFontNodeNeeded;
+ OUString sFontFamily;
+ OUString sColor;
+
+ SmXMLImportContext rContext;
+
+ SmXMLContext_Helper(SmXMLImportContext &rImport) :
+ nIsBold(-1), nIsItalic(-1), nFontSize(0.0), rContext(rImport) {}
+
+ void RetrieveAttrs(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
+ void ApplyAttrs();
+};
+
+void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+ sal_Int8 nOldIsBold=nIsBold;
+ sal_Int8 nOldIsItalic=nIsItalic;
+ double nOldFontSize=nFontSize;
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ OUString sOldFontFamily = sFontFamily;
+ for (sal_Int16 i=0;i<nAttrCount;i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = rContext.GetSmImport().GetNamespaceMap().
+ GetKeyByAttrName(sAttrName,&aLocalName);
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap &rAttrTokenMap =
+ rContext.GetSmImport().GetPresLayoutAttrTokenMap();
+ switch(rAttrTokenMap.Get(nPrefix,aLocalName))
+ {
+ case XML_TOK_FONTWEIGHT:
+ nIsBold = sValue.equals(GetXMLToken(XML_BOLD));
+ break;
+ case XML_TOK_FONTSTYLE:
+ nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC));
+ break;
+ case XML_TOK_FONTSIZE:
+ SvXMLUnitConverter::convertDouble(nFontSize,sValue);
+ rContext.GetSmImport().GetMM100UnitConverter().
+ setXMLMeasureUnit(MAP_POINT);
+ if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT)))
+ {
+ if (-1 == sValue.indexOf('%'))
+ nFontSize=0.0;
+ else
+ {
+ rContext.GetSmImport().GetMM100UnitConverter().
+ setXMLMeasureUnit(MAP_RELATIVE);
+ }
+ }
+ break;
+ case XML_TOK_FONTFAMILY:
+ sFontFamily = sValue;
+ break;
+ case XML_TOK_COLOR:
+ sColor = sValue;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ((nOldIsBold!=nIsBold) || (nOldIsItalic!=nIsItalic) ||
+ (nOldFontSize!=nFontSize) || (sOldFontFamily!=sFontFamily)
+ || sColor.getLength())
+ bFontNodeNeeded=sal_True;
+ else
+ bFontNodeNeeded=sal_False;
+}
+
+void SmXMLContext_Helper::ApplyAttrs()
+{
+ SmNodeStack &rNodeStack = rContext.GetSmImport().GetNodeStack();
+
+ if (bFontNodeNeeded)
+ {
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+
+ if (nIsBold != -1)
+ {
+ if (nIsBold)
+ aToken.eType = TBOLD;
+ else
+ aToken.eType = TNBOLD;
+ SmStructureNode *pFontNode = static_cast<SmStructureNode *>
+ (new SmFontNode(aToken));
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (nIsItalic != -1)
+ {
+ if (nIsItalic)
+ aToken.eType = TITALIC;
+ else
+ aToken.eType = TNITALIC;
+ SmStructureNode *pFontNode = static_cast<SmStructureNode *>
+ (new SmFontNode(aToken));
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (nFontSize != 0.0)
+ {
+ aToken.eType = TSIZE;
+ SmFontNode *pFontNode = new SmFontNode(aToken);
+
+ if (MAP_RELATIVE == rContext.GetSmImport().GetMM100UnitConverter().
+ getXMLMeasureUnit())
+ {
+ if (nFontSize < 100.00)
+ pFontNode->SetSizeParameter(Fraction(100.00/nFontSize),
+ FNTSIZ_DIVIDE);
+ else
+ pFontNode->SetSizeParameter(Fraction(nFontSize/100.00),
+ FNTSIZ_MULTIPLY);
+ }
+ else
+ pFontNode->SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT);
+
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (sFontFamily.getLength())
+ {
+ if (sFontFamily.equalsIgnoreAsciiCase(GetXMLToken(XML_FIXED)))
+ aToken.eType = TFIXED;
+ else if (sFontFamily.equalsIgnoreAsciiCase(OUString(
+ RTL_CONSTASCII_USTRINGPARAM("sans"))))
+ aToken.eType = TSANS;
+ else if (sFontFamily.equalsIgnoreAsciiCase(OUString(
+ RTL_CONSTASCII_USTRINGPARAM("serif"))))
+ aToken.eType = TSERIF;
+ else //Just give up, we need to extend our font mechanism to be
+ //more general
+ return;
+
+ aToken.aText = sFontFamily;
+ SmFontNode *pFontNode = new SmFontNode(aToken);
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (sColor.getLength())
+ {
+ //Again we can only handle a small set of colours in
+ //StarMath for now.
+ const SvXMLTokenMap& rTokenMap =
+ rContext.GetSmImport().GetColorTokenMap();
+ aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
+ XML_NAMESPACE_MATH, sColor));
+ if (aToken.eType != -1)
+ {
+ SmFontNode *pFontNode = new SmFontNode(aToken);
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ }
+
+ }
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLDocContext_Impl : public SmXMLImportContext
+{
+public:
+ SmXMLDocContext_Impl( SmXMLImport &rImport, sal_uInt16 nPrfx,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrfx,rLName) {}
+
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+
+ void EndElement();
+};
+
+////////////////////////////////////////////////////////////
+
+/*avert thy gaze from the proginator*/
+class SmXMLRowContext_Impl : public SmXMLDocContext_Impl
+{
+protected:
+ ULONG nElementCount;
+
+public:
+ SmXMLRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLDocContext_Impl(rImport,nPrefix,rLName)
+ { nElementCount = GetSmImport().GetNodeStack().Count(); }
+
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+
+ SvXMLImportContext *StrictCreateChildContext(sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+
+ void EndElement();
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLFracContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLFracContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLSqrtContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLSqrtContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLRootContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLRootContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLStyleContext_Impl : public SmXMLRowContext_Impl
+{
+protected:
+ SmXMLContext_Helper aStyleHelper;
+
+public:
+ /*Right now the style tag is completely ignored*/
+ SmXMLStyleContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) : SmXMLRowContext_Impl(rImport,nPrefix,rLName),
+ aStyleHelper(*this) {}
+
+ void EndElement();
+ void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
+};
+
+void SmXMLStyleContext_Impl::StartElement(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+#if 1
+ aStyleHelper.RetrieveAttrs(xAttrList);
+#else
+ sal_Int8 nOldIsBold=nIsBold;
+ sal_Int8 nOldIsItalic=nIsItalic;
+ double nOldFontSize=nFontSize;
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ OUString sOldFontFamily = sFontFamily;
+ for (sal_Int16 i=0;i<nAttrCount;i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName(sAttrName,&aLocalName);
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap &rAttrTokenMap =
+ GetSmImport().GetPresLayoutAttrTokenMap();
+ switch(rAttrTokenMap.Get(nPrefix,aLocalName))
+ {
+ case XML_TOK_FONTWEIGHT:
+ nIsBold = sValue.equals(GetXMLToken(XML_BOLD));
+ break;
+ case XML_TOK_FONTSTYLE:
+ nIsItalic = sValue.equals(GetXMLToken(XML_ITALIC));
+ break;
+ case XML_TOK_FONTSIZE:
+ SvXMLUnitConverter::convertDouble(nFontSize,sValue);
+ GetSmImport().GetMM100UnitConverter().
+ setXMLMeasureUnit(MAP_POINT);
+ if (-1 == sValue.indexOf(GetXMLToken(XML_UNIT_PT)))
+ if (-1 == sValue.indexOf('%'))
+ nFontSize=0.0;
+ else
+ {
+ GetSmImport().GetMM100UnitConverter().
+ setXMLMeasureUnit(MAP_RELATIVE);
+ }
+ break;
+ case XML_TOK_FONTFAMILY:
+ sFontFamily = sValue;
+ break;
+ case XML_TOK_COLOR:
+ sColor = sValue;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ((nOldIsBold!=nIsBold) || (nOldIsItalic!=nIsItalic) ||
+ (nOldFontSize!=nFontSize) || (sOldFontFamily!=sFontFamily)
+ || sColor.getLength())
+ bFontNodeNeeded=sal_True;
+ else
+ bFontNodeNeeded=sal_False;
+#endif
+}
+
+
+void SmXMLStyleContext_Impl::EndElement()
+{
+ /*
+ <mstyle> accepts any number of arguments; if this number is not 1, its
+ contents are treated as a single "inferred <mrow>" containing its
+ arguments
+ */
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ if (rNodeStack.Count() - nElementCount > 1)
+ SmXMLRowContext_Impl::EndElement();
+#if 1
+ aStyleHelper.ApplyAttrs();
+#else
+ if (bFontNodeNeeded)
+ {
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+
+ if (nIsBold != -1)
+ {
+ if (nIsBold)
+ aToken.eType = TBOLD;
+ else
+ aToken.eType = TNBOLD;
+ SmStructureNode *pFontNode = static_cast<SmStructureNode *>
+ (new SmFontNode(aToken));
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (nIsItalic != -1)
+ {
+ if (nIsItalic)
+ aToken.eType = TITALIC;
+ else
+ aToken.eType = TNITALIC;
+ SmStructureNode *pFontNode = static_cast<SmStructureNode *>
+ (new SmFontNode(aToken));
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (nFontSize != 0.0)
+ {
+ aToken.eType = TSIZE;
+ SmFontNode *pFontNode = new SmFontNode(aToken);
+
+ if (MAP_RELATIVE == GetSmImport().GetMM100UnitConverter().
+ getXMLMeasureUnit())
+ {
+ if (nFontSize < 100.00)
+ pFontNode->SetSizeParameter(Fraction(100.00/nFontSize),
+ FNTSIZ_DIVIDE);
+ else
+ pFontNode->SetSizeParameter(Fraction(nFontSize/100.00),
+ FNTSIZ_MULTIPLY);
+ }
+ else
+ pFontNode->SetSizeParameter(Fraction(nFontSize),FNTSIZ_ABSOLUT);
+
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (sFontFamily.getLength())
+ {
+ if (sFontFamily.equalsIgnoreCase(GetXMLToken(XML_FIXED)))
+ aToken.eType = TFIXED;
+ else if (sFontFamily.equalsIgnoreCase(OUString(
+ RTL_CONSTASCII_USTRINGPARAM("sans"))))
+ aToken.eType = TSANS;
+ else if (sFontFamily.equalsIgnoreCase(OUString(
+ RTL_CONSTASCII_USTRINGPARAM("serif"))))
+ aToken.eType = TSERIF;
+ else //Just give up, we need to extend our font mechanism to be
+ //more general
+ return;
+
+ aToken.aText = sFontFamily;
+ SmFontNode *pFontNode = new SmFontNode(aToken);
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ if (sColor.getLength())
+ {
+ //Again we can only handle a small set of colours in
+ //StarMath for now.
+ const SvXMLTokenMap& rTokenMap =
+ GetSmImport().GetColorTokenMap();
+ aToken.eType = static_cast<SmTokenType>(rTokenMap.Get(
+ XML_NAMESPACE_MATH, sColor));
+ if (aToken.eType != -1)
+ {
+ SmFontNode *pFontNode = new SmFontNode(aToken);
+ pFontNode->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pFontNode);
+ }
+ }
+
+ }
+#endif
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLPaddedContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ /*Right now the style tag is completely ignored*/
+ SmXMLPaddedContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+void SmXMLPaddedContext_Impl::EndElement()
+{
+ /*
+ <mpadded> accepts any number of arguments; if this number is not 1, its
+ contents are treated as a single "inferred <mrow>" containing its
+ arguments
+ */
+ if (GetSmImport().GetNodeStack().Count() - nElementCount > 1)
+ SmXMLRowContext_Impl::EndElement();
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLPhantomContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ /*Right now the style tag is completely ignored*/
+ SmXMLPhantomContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+void SmXMLPhantomContext_Impl::EndElement()
+{
+ /*
+ <mphantom> accepts any number of arguments; if this number is not 1, its
+ contents are treated as a single "inferred <mrow>" containing its
+ arguments
+ */
+ if (GetSmImport().GetNodeStack().Count() - nElementCount > 1)
+ SmXMLRowContext_Impl::EndElement();
+
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+ aToken.eType = TPHANTOM;
+
+ SmStructureNode *pPhantom = static_cast<SmStructureNode *>
+ (new SmFontNode(aToken));
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ pPhantom->SetSubNodes(0,rNodeStack.Pop());
+ rNodeStack.Push(pPhantom);
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLFencedContext_Impl : public SmXMLRowContext_Impl
+{
+protected:
+ sal_Unicode cBegin;
+ sal_Unicode cEnd;
+
+public:
+ SmXMLFencedContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName),
+ cBegin('('), cEnd(')') {}
+
+ void StartElement(const uno::Reference< xml::sax::XAttributeList > & xAttrList );
+ void EndElement();
+};
+
+
+void SmXMLFencedContext_Impl::StartElement(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for (sal_Int16 i=0;i<nAttrCount;i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName(sAttrName,&aLocalName);
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap &rAttrTokenMap =
+ GetSmImport().GetFencedAttrTokenMap();
+ switch(rAttrTokenMap.Get(nPrefix,aLocalName))
+ {
+ //temp, starmath cannot handle multichar brackets (I think)
+ case XML_TOK_OPEN:
+ cBegin = sValue[0];
+ break;
+ case XML_TOK_CLOSE:
+ cEnd = sValue[0];
+ break;
+ default:
+ /*Go to superclass*/
+ break;
+ }
+ }
+}
+
+
+void SmXMLFencedContext_Impl::EndElement()
+{
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.aText = ',';
+ aToken.eType = TLEFT;
+ aToken.nLevel = 5;
+
+ aToken.eType = TLPARENT;
+ aToken.cMathChar = cBegin;
+ SmStructureNode *pSNode = new SmBraceNode(aToken);
+ SmNode *pLeft = new SmMathSymbolNode(aToken);
+
+ aToken.cMathChar = cEnd;
+ aToken.eType = TRPARENT;
+ SmNode *pRight = new SmMathSymbolNode(aToken);
+
+ SmNodeArray aRelationArray;
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+
+ aToken.cMathChar = '\0';
+ aToken.aText = ',';
+ aToken.eType = TIDENT;
+
+ ULONG i = rNodeStack.Count() - nElementCount;
+ if (rNodeStack.Count() - nElementCount > 1)
+ i += rNodeStack.Count() - 1 - nElementCount;
+ aRelationArray.resize(i);
+ while (rNodeStack.Count() > nElementCount)
+ {
+ aRelationArray[--i] = rNodeStack.Pop();
+ if (i > 1 && rNodeStack.Count() > 1)
+ aRelationArray[--i] = new SmGlyphSpecialNode(aToken);
+ }
+
+ SmToken aDummy;
+ SmStructureNode *pBody = new SmExpressionNode(aDummy);
+ pBody->SetSubNodes(aRelationArray);
+
+
+ pSNode->SetSubNodes(pLeft,pBody,pRight);
+ pSNode->SetScaleMode(SCALE_HEIGHT);
+ GetSmImport().GetNodeStack().Push(pSNode);
+}
+
+
+////////////////////////////////////////////////////////////
+
+class SmXMLErrorContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLErrorContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+void SmXMLErrorContext_Impl::EndElement()
+{
+ /*Right now the error tag is completely ignored, what
+ can I do with it in starmath, ?, maybe we need a
+ report window ourselves, do a test for validity of
+ the xml input, use merrors, and then generate
+ the markup inside the merror with a big red colour
+ of something. For now just throw them all away.
+ */
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ while (rNodeStack.Count() > nElementCount)
+ {
+ SmNode *pNode = rNodeStack.Pop();
+ delete pNode;
+ }
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLNumberContext_Impl : public SmXMLImportContext
+{
+protected:
+ SmToken aToken;
+
+public:
+ SmXMLNumberContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName)
+ {
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+ aToken.eType = TNUMBER;
+ }
+
+ virtual void TCharacters(const OUString &rChars);
+
+ void EndElement();
+};
+
+void SmXMLNumberContext_Impl::TCharacters(const OUString &rChars)
+{
+ aToken.aText = rChars;
+}
+
+void SmXMLNumberContext_Impl::EndElement()
+{
+ GetSmImport().GetNodeStack().Push(new SmTextNode(aToken,FNT_NUMBER));
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLAnnotationContext_Impl : public SmXMLImportContext
+{
+ sal_Bool bIsStarMath;
+
+public:
+ SmXMLAnnotationContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName), bIsStarMath(sal_False) {}
+
+ virtual void Characters(const OUString &rChars);
+
+ void StartElement(const uno::Reference<xml::sax::XAttributeList > & xAttrList );
+};
+
+void SmXMLAnnotationContext_Impl::StartElement(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for (sal_Int16 i=0;i<nAttrCount;i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName(sAttrName,&aLocalName);
+
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap &rAttrTokenMap =
+ GetSmImport().GetAnnotationAttrTokenMap();
+ switch(rAttrTokenMap.Get(nPrefix,aLocalName))
+ {
+ case XML_TOK_ENCODING:
+ bIsStarMath= sValue.equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("StarMath 5.0")));
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void SmXMLAnnotationContext_Impl::Characters(const OUString &rChars)
+{
+ if (bIsStarMath)
+ GetSmImport().GetText().Append(String(rChars));
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLTextContext_Impl : public SmXMLImportContext
+{
+protected:
+ SmToken aToken;
+
+public:
+ SmXMLTextContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName)
+ {
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+ aToken.eType = TTEXT;
+ }
+
+ virtual void TCharacters(const OUString &rChars);
+
+ void EndElement();
+};
+
+void SmXMLTextContext_Impl::TCharacters(const OUString &rChars)
+{
+ aToken.aText = rChars;
+}
+
+void SmXMLTextContext_Impl::EndElement()
+{
+ GetSmImport().GetNodeStack().Push(new SmTextNode(aToken,FNT_TEXT));
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLStringContext_Impl : public SmXMLImportContext
+{
+protected:
+ SmToken aToken;
+
+public:
+ SmXMLStringContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName)
+ {
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+ aToken.eType = TTEXT;
+ }
+
+ virtual void TCharacters(const OUString &rChars);
+
+ void EndElement();
+};
+
+void SmXMLStringContext_Impl::TCharacters(const OUString &rChars)
+{
+ /*
+ The content of <ms> elements should be rendered with visible "escaping" of
+ certain characters in the content, including at least "double quote"
+ itself, and preferably whitespace other than individual blanks. The intent
+ is for the viewer to see that the expression is a string literal, and to
+ see exactly which characters form its content. For example, <ms>double
+ quote is "</ms> might be rendered as "double quote is \"".
+
+ Obviously this isn't fully done here.
+ */
+ aToken.aText.Erase();
+ aToken.aText += '\"';
+ aToken.aText += String(rChars);
+ aToken.aText += '\"';
+}
+
+void SmXMLStringContext_Impl::EndElement()
+{
+ GetSmImport().GetNodeStack().Push(new SmTextNode(aToken,FNT_FIXED));
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLIdentifierContext_Impl : public SmXMLImportContext
+{
+protected:
+ SmXMLContext_Helper aStyleHelper;
+ SmToken aToken;
+
+public:
+ SmXMLIdentifierContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName),aStyleHelper(*this)
+ {
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+ aToken.eType = TIDENT;
+ }
+
+ void TCharacters(const OUString &rChars);
+ void StartElement(const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+ {
+ aStyleHelper.RetrieveAttrs(xAttrList);
+ };
+ void EndElement();
+};
+
+void SmXMLIdentifierContext_Impl::EndElement()
+{
+ SmTextNode *pNode = 0;
+ //we will handle identifier italic/normal here instead of with a standalone
+ //font node
+ if (((aStyleHelper.nIsItalic == -1) && (aToken.aText.Len() > 1))
+ || ((aStyleHelper.nIsItalic == 0) && (aToken.aText.Len() == 1)))
+ {
+ pNode = new SmTextNode(aToken,FNT_FUNCTION);
+ pNode->GetFont().SetItalic(ITALIC_NONE);
+ aStyleHelper.nIsItalic = -1;
+ }
+ else
+ pNode = new SmTextNode(aToken,FNT_VARIABLE);
+ if (aStyleHelper.bFontNodeNeeded && aStyleHelper.nIsItalic != -1)
+ {
+ if (aStyleHelper.nIsItalic)
+ pNode->GetFont().SetItalic(ITALIC_NORMAL);
+ else
+ pNode->GetFont().SetItalic(ITALIC_NONE);
+ }
+
+ if ((-1!=aStyleHelper.nIsBold) || (0.0!=aStyleHelper.nFontSize) ||
+ (aStyleHelper.sFontFamily.getLength()) ||
+ aStyleHelper.sColor.getLength())
+ aStyleHelper.bFontNodeNeeded=sal_True;
+ else
+ aStyleHelper.bFontNodeNeeded=sal_False;
+ if (aStyleHelper.bFontNodeNeeded)
+ aStyleHelper.ApplyAttrs();
+ GetSmImport().GetNodeStack().Push(pNode);
+}
+
+void SmXMLIdentifierContext_Impl::TCharacters(const OUString &rChars)
+{
+ aToken.aText = rChars;
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLOperatorContext_Impl : public SmXMLImportContext
+{
+ sal_Bool bIsStretchy;
+
+protected:
+ SmToken aToken;
+
+public:
+ SmXMLOperatorContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName), bIsStretchy(sal_False)
+ {
+ aToken.nGroup = 0;
+ aToken.eType = TSPECIAL;
+ aToken.nLevel = 5;
+ }
+
+ void TCharacters(const OUString &rChars);
+ void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
+ void EndElement();
+};
+
+void SmXMLOperatorContext_Impl::TCharacters(const OUString &rChars)
+{
+ aToken.cMathChar = rChars[0];
+}
+
+void SmXMLOperatorContext_Impl::EndElement()
+{
+ SmMathSymbolNode *pNode = new SmMathSymbolNode(aToken);
+ //For stretchy scaling the scaling must be retrieved from this node
+ //and applied to the expression itself so as to get the expression
+ //to scale the operator to the height of the expression itself
+ if (bIsStretchy)
+ pNode->SetScaleMode(SCALE_HEIGHT);
+ GetSmImport().GetNodeStack().Push(pNode);
+}
+
+
+
+void SmXMLOperatorContext_Impl::StartElement(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for (sal_Int16 i=0;i<nAttrCount;i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName(sAttrName,&aLocalName);
+
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap &rAttrTokenMap =
+ GetSmImport().GetOperatorAttrTokenMap();
+ switch(rAttrTokenMap.Get(nPrefix,aLocalName))
+ {
+ case XML_TOK_STRETCHY:
+ bIsStretchy = sValue.equals(
+ GetXMLToken(XML_TRUE));
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+
+////////////////////////////////////////////////////////////
+
+class SmXMLSpaceContext_Impl : public SmXMLImportContext
+{
+public:
+ SmXMLSpaceContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName) {}
+
+ void StartElement(const uno::Reference< xml::sax::XAttributeList >& xAttrList );
+};
+
+void SmXMLSpaceContext_Impl::StartElement(
+ const uno::Reference<xml::sax::XAttributeList > & /*xAttrList*/ )
+{
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.eType = TBLANK;
+ aToken.nLevel = 5;
+ SmBlankNode *pBlank = new SmBlankNode(aToken);
+ pBlank->IncreaseBy(aToken);
+ GetSmImport().GetNodeStack().Push(pBlank);
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLSubContext_Impl : public SmXMLRowContext_Impl
+{
+protected:
+ void GenericEndElement(SmTokenType eType,SmSubSup aSubSup);
+
+public:
+ SmXMLSubContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement()
+ {
+ GenericEndElement(TRSUB,RSUB);
+ }
+};
+
+
+void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup)
+{
+ /*The <msub> element requires exactly 2 arguments.*/
+ DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
+ "Sub has not two arguments");
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = eType;
+ SmSubSupNode *pNode = new SmSubSupNode(aToken);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+
+ // initialize subnodes array
+ SmNodeArray aSubNodes;
+ aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
+ for (ULONG i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[i] = NULL;
+
+ aSubNodes[eSubSup+1] = rNodeStack.Pop();
+ aSubNodes[0] = rNodeStack.Pop();
+ pNode->SetSubNodes(aSubNodes);
+ rNodeStack.Push(pNode);
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLSupContext_Impl : public SmXMLSubContext_Impl
+{
+public:
+ SmXMLSupContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLSubContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement()
+ {
+ GenericEndElement(TRSUP,RSUP);
+ }
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLSubSupContext_Impl : public SmXMLRowContext_Impl
+{
+protected:
+ void GenericEndElement(SmTokenType eType, SmSubSup aSub,SmSubSup aSup);
+
+public:
+ SmXMLSubSupContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLRowContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement()
+ {
+ GenericEndElement(TRSUB,RSUB,RSUP);
+ }
+};
+
+void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
+ SmSubSup aSub,SmSubSup aSup)
+{
+ /*The <msub> element requires exactly 3 arguments.*/
+ DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 3,
+ "SubSup has not three arguments");
+
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = eType;
+ SmSubSupNode *pNode = new SmSubSupNode(aToken);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+
+ // initialize subnodes array
+ SmNodeArray aSubNodes;
+ aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
+ for (ULONG i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[i] = NULL;
+
+ aSubNodes[aSup+1] = rNodeStack.Pop();
+ aSubNodes[aSub+1] = rNodeStack.Pop();
+ aSubNodes[0] = rNodeStack.Pop();
+ pNode->SetSubNodes(aSubNodes);
+ rNodeStack.Push(pNode);
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLUnderContext_Impl : public SmXMLSubContext_Impl
+{
+protected:
+ sal_Int16 nAttrCount;
+
+public:
+ SmXMLUnderContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLSubContext_Impl(rImport,nPrefix,rLName) {}
+
+ void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
+ void EndElement();
+ void HandleAccent();
+};
+
+void SmXMLUnderContext_Impl::StartElement(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+ nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+}
+
+void SmXMLUnderContext_Impl::HandleAccent()
+{
+ DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
+ "Sub has not two arguments");
+
+ /*Just one special case for the underline thing*/
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ SmNode *pTest = rNodeStack.Pop();
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TUNDERLINE;
+
+
+ SmNodeArray aSubNodes;
+ aSubNodes.resize(2);
+
+ SmStructureNode *pNode = new SmAttributNode(aToken);
+ if ((pTest->GetToken().cMathChar & 0x0FFF) == 0x0332)
+ {
+ aSubNodes[0] = new SmRectangleNode(aToken);
+ delete pTest;
+ }
+ else
+ aSubNodes[0] = pTest;
+
+ aSubNodes[1] = rNodeStack.Pop();
+ pNode->SetSubNodes(aSubNodes);
+ pNode->SetScaleMode(SCALE_WIDTH);
+ rNodeStack.Push(pNode);
+}
+
+
+void SmXMLUnderContext_Impl::EndElement()
+{
+ if (!nAttrCount)
+ GenericEndElement(TCSUB,CSUB);
+ else
+ HandleAccent();
+#if 0
+ //UnderBrace trick
+ SmStructureNode *pNode = rNodeStack.Pop();
+ if (pNode->GetSubNode(1)->GetToken().cMathChar == (0x0332|0xf000))
+ if (pNode->GetSubNode(0)->GetToken().cMathChar == (0x0332|0xf000))
+#endif
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLOverContext_Impl : public SmXMLSubContext_Impl
+{
+protected:
+ sal_Int16 nAttrCount;
+
+public:
+ SmXMLOverContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLSubContext_Impl(rImport,nPrefix,rLName), nAttrCount(0) {}
+
+ void EndElement();
+ void StartElement(const uno::Reference< xml::sax::XAttributeList > &xAttrList );
+ void HandleAccent();
+};
+
+
+void SmXMLOverContext_Impl::StartElement(const uno::Reference<
+ xml::sax::XAttributeList > & xAttrList )
+{
+ nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+}
+
+
+void SmXMLOverContext_Impl::EndElement()
+{
+ if (!nAttrCount)
+ GenericEndElement(TCSUP,CSUP);
+ else
+ HandleAccent();
+}
+
+
+void SmXMLOverContext_Impl::HandleAccent()
+{
+ DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
+ "Sub has not two arguments");
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TACUTE;
+
+ SmAttributNode *pNode = new SmAttributNode(aToken);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+
+ SmNodeArray aSubNodes;
+ aSubNodes.resize(2);
+ aSubNodes[0] = rNodeStack.Pop();
+ aSubNodes[1] = rNodeStack.Pop();
+ pNode->SetSubNodes(aSubNodes);
+ pNode->SetScaleMode(SCALE_WIDTH);
+ rNodeStack.Push(pNode);
+
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLUnderOverContext_Impl : public SmXMLSubSupContext_Impl
+{
+public:
+ SmXMLUnderOverContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLSubSupContext_Impl(rImport,nPrefix,rLName) {}
+
+ void EndElement()
+ {
+ GenericEndElement(TCSUB,CSUB,CSUP);
+ }
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLMultiScriptsContext_Impl : public SmXMLSubSupContext_Impl
+{
+ sal_Bool bHasPrescripts;
+
+public:
+ SmXMLMultiScriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) :
+ SmXMLSubSupContext_Impl(rImport,nPrefix,rLName),
+ bHasPrescripts(FALSE) {}
+
+ void EndElement();
+ void MiddleElement();
+ SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLNoneContext_Impl : public SmXMLImportContext
+{
+public:
+ SmXMLNoneContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName) {}
+
+ void EndElement();
+};
+
+
+void SmXMLNoneContext_Impl::EndElement(void)
+{
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.aText.Erase();
+ aToken.nLevel = 5;
+ aToken.eType = TIDENT;
+ GetSmImport().GetNodeStack().Push(
+ new SmTextNode(aToken,FNT_VARIABLE));
+}
+
+////////////////////////////////////////////////////////////
+
+class SmXMLPrescriptsContext_Impl : public SmXMLImportContext
+{
+public:
+ SmXMLPrescriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName)
+ : SmXMLImportContext(rImport,nPrefix,rLName) {}
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLTableRowContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLTableRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) :
+ SmXMLRowContext_Impl(rImport,nPrefix,rLName)
+ {}
+
+ SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+};
+
+
+////////////////////////////////////////////////////////////
+
+class SmXMLTableContext_Impl : public SmXMLTableRowContext_Impl
+{
+public:
+ SmXMLTableContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) :
+ SmXMLTableRowContext_Impl(rImport,nPrefix,rLName)
+ {}
+
+ void EndElement();
+ SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+};
+
+
+////////////////////////////////////////////////////////////
+
+class SmXMLTableCellContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLTableCellContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) :
+ SmXMLRowContext_Impl(rImport,nPrefix,rLName)
+ {}
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLAlignGroupContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLAlignGroupContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) :
+ SmXMLRowContext_Impl(rImport,nPrefix,rLName)
+ {}
+
+ /*Don't do anything with alignment for now*/
+ void EndElement()
+ {
+ }
+};
+
+////////////////////////////////////////////////////////////
+
+class SmXMLActionContext_Impl : public SmXMLRowContext_Impl
+{
+public:
+ SmXMLActionContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
+ const OUString& rLName) :
+ SmXMLRowContext_Impl(rImport,nPrefix,rLName)
+ {}
+
+ void EndElement();
+};
+
+////////////////////////////////////////////////////////////
+
+// NB: virtually inherit so we can multiply inherit properly
+// in SmXMLFlatDocContext_Impl
+class SmXMLOfficeContext_Impl : public virtual SvXMLImportContext
+{
+public:
+ SmXMLOfficeContext_Impl( SmXMLImport &rImport, sal_uInt16 nPrfx,
+ const OUString& rLName)
+ : SvXMLImportContext(rImport,nPrfx,rLName) {}
+
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList);
+};
+
+SvXMLImportContext *SmXMLOfficeContext_Impl::CreateChildContext(sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > &xAttrList)
+{
+ SvXMLImportContext *pContext = 0;
+ if ( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLocalName == GetXMLToken(XML_META) )
+ {
+ DBG_WARNING("XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
+ }
+ else if ( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLocalName == GetXMLToken(XML_SETTINGS) )
+ {
+ pContext = new XMLDocumentSettingsContext( GetImport(),
+ XML_NAMESPACE_OFFICE, rLocalName,
+ xAttrList );
+ }
+ else
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+////////////////////////////////////////////////////////////
+
+// context for flat file xml format
+class SmXMLFlatDocContext_Impl
+ : public SmXMLOfficeContext_Impl, public SvXMLMetaDocumentContext
+{
+public:
+ SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
+ USHORT i_nPrefix, const OUString & i_rLName,
+ const uno::Reference<document::XDocumentProperties>& i_xDocProps,
+ const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
+
+ virtual ~SmXMLFlatDocContext_Impl();
+
+ virtual SvXMLImportContext *CreateChildContext(USHORT i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
+};
+
+SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
+ USHORT i_nPrefix, const OUString & i_rLName,
+ const uno::Reference<document::XDocumentProperties>& i_xDocProps,
+ const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
+ SvXMLImportContext(i_rImport, i_nPrefix, i_rLName),
+ SmXMLOfficeContext_Impl(i_rImport, i_nPrefix, i_rLName),
+ SvXMLMetaDocumentContext(i_rImport, i_nPrefix, i_rLName,
+ i_xDocProps, i_xDocBuilder)
+{
+}
+
+SmXMLFlatDocContext_Impl::~SmXMLFlatDocContext_Impl()
+{
+}
+
+SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
+ USHORT i_nPrefix, const OUString& i_rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
+{
+ // behave like meta base class iff we encounter office:meta
+ if ( XML_NAMESPACE_OFFICE == i_nPrefix &&
+ i_rLocalName == GetXMLToken(XML_META) )
+ {
+ return SvXMLMetaDocumentContext::CreateChildContext(
+ i_nPrefix, i_rLocalName, i_xAttrList );
+ }
+ else
+ {
+ return SmXMLOfficeContext_Impl::CreateChildContext(
+ i_nPrefix, i_rLocalName, i_xAttrList );
+ }
+}
+
+////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aPresLayoutElemTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_SEMANTICS, XML_TOK_SEMANTICS },
+ { XML_NAMESPACE_MATH, XML_MATH, XML_TOK_MATH },
+ { XML_NAMESPACE_MATH, XML_MSTYLE, XML_TOK_MSTYLE },
+ { XML_NAMESPACE_MATH, XML_MERROR, XML_TOK_MERROR },
+ { XML_NAMESPACE_MATH, XML_MPHANTOM, XML_TOK_MPHANTOM },
+ { XML_NAMESPACE_MATH, XML_MROW, XML_TOK_MROW },
+ { XML_NAMESPACE_MATH, XML_MFRAC, XML_TOK_MFRAC },
+ { XML_NAMESPACE_MATH, XML_MSQRT, XML_TOK_MSQRT },
+ { XML_NAMESPACE_MATH, XML_MROOT, XML_TOK_MROOT },
+ { XML_NAMESPACE_MATH, XML_MSUB, XML_TOK_MSUB },
+ { XML_NAMESPACE_MATH, XML_MSUP, XML_TOK_MSUP },
+ { XML_NAMESPACE_MATH, XML_MSUBSUP, XML_TOK_MSUBSUP },
+ { XML_NAMESPACE_MATH, XML_MUNDER, XML_TOK_MUNDER },
+ { XML_NAMESPACE_MATH, XML_MOVER, XML_TOK_MOVER },
+ { XML_NAMESPACE_MATH, XML_MUNDEROVER, XML_TOK_MUNDEROVER },
+ { XML_NAMESPACE_MATH, XML_MMULTISCRIPTS, XML_TOK_MMULTISCRIPTS },
+ { XML_NAMESPACE_MATH, XML_MTABLE, XML_TOK_MTABLE },
+ { XML_NAMESPACE_MATH, XML_MACTION, XML_TOK_MACTION },
+ { XML_NAMESPACE_MATH, XML_MFENCED, XML_TOK_MFENCED },
+ { XML_NAMESPACE_MATH, XML_MPADDED, XML_TOK_MPADDED },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPresLayoutAttrTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_FONTWEIGHT, XML_TOK_FONTWEIGHT },
+ { XML_NAMESPACE_MATH, XML_FONTSTYLE, XML_TOK_FONTSTYLE },
+ { XML_NAMESPACE_MATH, XML_FONTSIZE, XML_TOK_FONTSIZE },
+ { XML_NAMESPACE_MATH, XML_FONTFAMILY, XML_TOK_FONTFAMILY },
+ { XML_NAMESPACE_MATH, XML_COLOR, XML_TOK_COLOR },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aFencedAttrTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_OPEN, XML_TOK_OPEN },
+ { XML_NAMESPACE_MATH, XML_CLOSE, XML_TOK_CLOSE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aOperatorAttrTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_STRETCHY, XML_TOK_STRETCHY },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aAnnotationAttrTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_ENCODING, XML_TOK_ENCODING },
+ XML_TOKEN_MAP_END
+};
+
+
+static __FAR_DATA SvXMLTokenMapEntry aPresElemTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_ANNOTATION, XML_TOK_ANNOTATION },
+ { XML_NAMESPACE_MATH, XML_MI, XML_TOK_MI },
+ { XML_NAMESPACE_MATH, XML_MN, XML_TOK_MN },
+ { XML_NAMESPACE_MATH, XML_MO, XML_TOK_MO },
+ { XML_NAMESPACE_MATH, XML_MTEXT, XML_TOK_MTEXT },
+ { XML_NAMESPACE_MATH, XML_MSPACE,XML_TOK_MSPACE },
+ { XML_NAMESPACE_MATH, XML_MS, XML_TOK_MS },
+ { XML_NAMESPACE_MATH, XML_MALIGNGROUP, XML_TOK_MALIGNGROUP },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPresScriptEmptyElemTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_MPRESCRIPTS, XML_TOK_MPRESCRIPTS },
+ { XML_NAMESPACE_MATH, XML_NONE, XML_TOK_NONE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPresTableElemTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_MTR, XML_TOK_MTR },
+ { XML_NAMESPACE_MATH, XML_MTD, XML_TOK_MTD },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aColorTokenMap[] =
+{
+ { XML_NAMESPACE_MATH, XML_BLACK, TBLACK},
+ { XML_NAMESPACE_MATH, XML_WHITE, TWHITE},
+ { XML_NAMESPACE_MATH, XML_RED, TRED},
+ { XML_NAMESPACE_MATH, XML_GREEN, TGREEN},
+ { XML_NAMESPACE_MATH, XML_BLUE, TBLUE},
+ { XML_NAMESPACE_MATH, XML_AQUA, TCYAN},
+ { XML_NAMESPACE_MATH, XML_FUCHSIA, TMAGENTA},
+ { XML_NAMESPACE_MATH, XML_YELLOW, TYELLOW},
+ XML_TOKEN_MAP_END
+};
+
+
+////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SmXMLImport::GetPresLayoutElemTokenMap()
+{
+ if (!pPresLayoutElemTokenMap)
+ pPresLayoutElemTokenMap = new SvXMLTokenMap(aPresLayoutElemTokenMap);
+ return *pPresLayoutElemTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetPresLayoutAttrTokenMap()
+{
+ if (!pPresLayoutAttrTokenMap)
+ pPresLayoutAttrTokenMap = new SvXMLTokenMap(aPresLayoutAttrTokenMap);
+ return *pPresLayoutAttrTokenMap;
+}
+
+
+const SvXMLTokenMap& SmXMLImport::GetFencedAttrTokenMap()
+{
+ if (!pFencedAttrTokenMap)
+ pFencedAttrTokenMap = new SvXMLTokenMap(aFencedAttrTokenMap);
+ return *pFencedAttrTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetOperatorAttrTokenMap()
+{
+ if (!pOperatorAttrTokenMap)
+ pOperatorAttrTokenMap = new SvXMLTokenMap(aOperatorAttrTokenMap);
+ return *pOperatorAttrTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetAnnotationAttrTokenMap()
+{
+ if (!pAnnotationAttrTokenMap)
+ pAnnotationAttrTokenMap = new SvXMLTokenMap(aAnnotationAttrTokenMap);
+ return *pAnnotationAttrTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetPresElemTokenMap()
+{
+ if (!pPresElemTokenMap)
+ pPresElemTokenMap = new SvXMLTokenMap(aPresElemTokenMap);
+ return *pPresElemTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetPresScriptEmptyElemTokenMap()
+{
+ if (!pPresScriptEmptyElemTokenMap)
+ pPresScriptEmptyElemTokenMap = new
+ SvXMLTokenMap(aPresScriptEmptyElemTokenMap);
+ return *pPresScriptEmptyElemTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetPresTableElemTokenMap()
+{
+ if (!pPresTableElemTokenMap)
+ pPresTableElemTokenMap = new SvXMLTokenMap(aPresTableElemTokenMap);
+ return *pPresTableElemTokenMap;
+}
+
+const SvXMLTokenMap& SmXMLImport::GetColorTokenMap()
+{
+ if (!pColorTokenMap)
+ pColorTokenMap = new SvXMLTokenMap(aColorTokenMap);
+ return *pColorTokenMap;
+}
+
+////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SmXMLDocContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresLayoutElemTokenMap();
+
+ //UINT32 nTest = rTokenMap.Get(nPrefix, rLocalName);
+
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ //Consider semantics a dummy except for any starmath annotations
+ case XML_TOK_SEMANTICS:
+ pContext = GetSmImport().CreateRowContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ /*General Layout Schemata*/
+ case XML_TOK_MROW:
+ pContext = GetSmImport().CreateRowContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MFRAC:
+ pContext = GetSmImport().CreateFracContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MSQRT:
+ pContext = GetSmImport().CreateSqrtContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MROOT:
+ pContext = GetSmImport().CreateRootContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MSTYLE:
+ pContext = GetSmImport().CreateStyleContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MERROR:
+ pContext = GetSmImport().CreateErrorContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MPADDED:
+ pContext = GetSmImport().CreatePaddedContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MPHANTOM:
+ pContext = GetSmImport().CreatePhantomContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MFENCED:
+ pContext = GetSmImport().CreateFencedContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ /*Script and Limit Schemata*/
+ case XML_TOK_MSUB:
+ pContext = GetSmImport().CreateSubContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MSUP:
+ pContext = GetSmImport().CreateSupContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MSUBSUP:
+ pContext = GetSmImport().CreateSubSupContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MUNDER:
+ pContext = GetSmImport().CreateUnderContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MOVER:
+ pContext = GetSmImport().CreateOverContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MUNDEROVER:
+ pContext = GetSmImport().CreateUnderOverContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MMULTISCRIPTS:
+ pContext = GetSmImport().CreateMultiScriptsContext(nPrefix,
+ rLocalName, xAttrList);
+ break;
+ case XML_TOK_MTABLE:
+ pContext = GetSmImport().CreateTableContext(nPrefix,
+ rLocalName, xAttrList);
+ break;
+ case XML_TOK_MACTION:
+ pContext = GetSmImport().CreateActionContext(nPrefix,
+ rLocalName, xAttrList);
+ break;
+ default:
+ /*Basically theres an implicit mrow around certain bare
+ *elements, use a RowContext to see if this is one of
+ *those ones*/
+ SmXMLRowContext_Impl aTempContext(GetSmImport(),nPrefix,
+ GetXMLToken(XML_MROW));
+
+ pContext = aTempContext.StrictCreateChildContext(nPrefix,
+ rLocalName, xAttrList);
+ break;
+ }
+ return pContext;
+}
+
+void SmXMLDocContext_Impl::EndElement()
+{
+ SmNodeArray ContextArray;
+ ContextArray.resize(1);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+
+ for (ULONG i=0;i< 1;i++)
+ ContextArray[i] = rNodeStack.Pop();
+
+ SmToken aDummy;
+ SmStructureNode *pSNode = new SmLineNode(aDummy);
+ pSNode->SetSubNodes(ContextArray);
+ rNodeStack.Push(pSNode);
+
+ SmNodeArray LineArray;
+ ULONG n = rNodeStack.Count();
+ LineArray.resize(n);
+ for (ULONG j = 0; j < n; j++)
+ LineArray[n - (j + 1)] = rNodeStack.Pop();
+ SmStructureNode *pSNode2 = new SmTableNode(aDummy);
+ pSNode2->SetSubNodes(LineArray);
+ rNodeStack.Push(pSNode2);
+}
+
+void SmXMLFracContext_Impl::EndElement()
+{
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TOVER;
+ SmStructureNode *pSNode = new SmBinVerNode(aToken);
+ SmNode *pOper = new SmRectangleNode(aToken);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ DBG_ASSERT(rNodeStack.Count() - nElementCount == 2,
+ "Fraction (mfrac) tag is missing component");
+ if (rNodeStack.Count() - nElementCount == 2)
+ {
+ SmNode *pSecond = rNodeStack.Pop();
+ SmNode *pFirst = rNodeStack.Pop();
+ pSNode->SetSubNodes(pFirst,pOper,pSecond);
+ rNodeStack.Push(pSNode);
+ }
+}
+
+void SmXMLRootContext_Impl::EndElement()
+{
+ /*The <mroot> element requires exactly 2 arguments.*/
+ DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
+ "Root tag is missing component");
+
+ SmToken aToken;
+ aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TNROOT;
+ SmStructureNode *pSNode = new SmRootNode(aToken);
+ SmNode *pOper = new SmRootSymbolNode(aToken);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ SmNode *pIndex = rNodeStack.Pop();
+ SmNode *pBase = rNodeStack.Pop();
+ pSNode->SetSubNodes(pIndex,pOper,pBase);
+ rNodeStack.Push(pSNode);
+}
+
+void SmXMLSqrtContext_Impl::EndElement()
+{
+ /*
+ <msqrt> accepts any number of arguments; if this number is not 1, its
+ contents are treated as a single "inferred <mrow>" containing its
+ arguments
+ */
+ if (GetSmImport().GetNodeStack().Count() - nElementCount > 1)
+ SmXMLRowContext_Impl::EndElement();
+
+ SmToken aToken;
+ aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TSQRT;
+ SmStructureNode *pSNode = new SmRootNode(aToken);
+ SmNode *pOper = new SmRootSymbolNode(aToken);
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ pSNode->SetSubNodes(0,pOper,rNodeStack.Pop());
+ rNodeStack.Push(pSNode);
+}
+
+void SmXMLRowContext_Impl::EndElement()
+{
+ SmNodeArray aRelationArray;
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ ULONG nSize = rNodeStack.Count()-nElementCount;
+
+ if (nSize > 0)
+ {
+ aRelationArray.resize(nSize);
+ for (ULONG j=rNodeStack.Count()-nElementCount;j > 0;j--)
+ aRelationArray[j-1] = rNodeStack.Pop();
+
+
+ //If the first or last element is an operator with stretchyness
+ //set then we must create a brace node here from those elements,
+ //removing the stretchness from the operators and applying it to
+ //ourselves, and creating the appropiate dummy StarMath none bracket
+ //to balance the arrangement
+ if (((aRelationArray[0]->GetScaleMode() == SCALE_HEIGHT)
+ && (aRelationArray[0]->GetType() == NMATH))
+ || ((aRelationArray[nSize-1]->GetScaleMode() == SCALE_HEIGHT)
+ && (aRelationArray[nSize-1]->GetType() == NMATH)))
+ {
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+
+ int nLeft=0,nRight=0;
+ if ((aRelationArray[0]->GetScaleMode() == SCALE_HEIGHT)
+ && (aRelationArray[0]->GetType() == NMATH))
+ {
+ aToken = aRelationArray[0]->GetToken();
+ nLeft=1;
+ }
+ else
+ aToken.cMathChar = '\0';
+
+ aToken.eType = TLPARENT;
+ SmNode *pLeft = new SmMathSymbolNode(aToken);
+
+ if ((aRelationArray[nSize-1]->GetScaleMode() == SCALE_HEIGHT)
+ && (aRelationArray[nSize-1]->GetType() == NMATH))
+ {
+ aToken = aRelationArray[nSize-1]->GetToken();
+ nRight=1;
+ }
+ else
+ aToken.cMathChar = '\0';
+
+ aToken.eType = TRPARENT;
+ SmNode *pRight = new SmMathSymbolNode(aToken);
+
+ SmNodeArray aRelationArray2;
+
+ //!! nSize-nLeft-nRight may be < 0 !!
+ int nRelArrSize = nSize-nLeft-nRight;
+ if (nRelArrSize > 0)
+ {
+ aRelationArray2.resize(nRelArrSize);
+ for (int i=0;i < nRelArrSize;i++)
+ aRelationArray2[i] = aRelationArray[i+nLeft];
+ }
+
+ SmToken aDummy;
+ SmStructureNode *pSNode = new SmBraceNode(aToken);
+ SmStructureNode *pBody = new SmExpressionNode(aDummy);
+ pBody->SetSubNodes(aRelationArray2);
+
+ pSNode->SetSubNodes(pLeft,pBody,pRight);
+ pSNode->SetScaleMode(SCALE_HEIGHT);
+ rNodeStack.Push(pSNode);
+ return;
+ }
+ }
+ else //Multiple newlines result in empty row elements
+ {
+ aRelationArray.resize(1);
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 5;
+ aToken.eType = TNEWLINE;
+ aRelationArray[0] = new SmLineNode(aToken);
+ }
+
+ SmToken aDummy;
+ SmStructureNode *pSNode = new SmExpressionNode(aDummy);
+ pSNode->SetSubNodes(aRelationArray);
+ rNodeStack.Push(pSNode);
+}
+
+
+SvXMLImportContext *SmXMLRowContext_Impl::StrictCreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresElemTokenMap();
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ /*Note that these should accept malignmark subelements, but do not*/
+ case XML_TOK_MN:
+ pContext = GetSmImport().CreateNumberContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MI:
+ pContext = GetSmImport().CreateIdentifierContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MO:
+ pContext = GetSmImport().CreateOperatorContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MTEXT:
+ pContext = GetSmImport().CreateTextContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MSPACE:
+ pContext = GetSmImport().CreateSpaceContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ case XML_TOK_MS:
+ pContext = GetSmImport().CreateStringContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+
+ /*Note: The maligngroup should only be seen when the row
+ * (or decendants) are in a table*/
+ case XML_TOK_MALIGNGROUP:
+ pContext = GetSmImport().CreateAlignGroupContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+
+ case XML_TOK_ANNOTATION:
+ pContext = GetSmImport().CreateAnnotationContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+
+ default:
+ break;
+ }
+ return pContext;
+}
+
+
+SvXMLImportContext *SmXMLRowContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = StrictCreateChildContext(nPrefix,
+ rLocalName, xAttrList);
+
+ if (!pContext)
+ {
+ //Hmm, unrecognized for this level, check to see if its
+ //an element that can have an implicit schema around it
+ pContext = SmXMLDocContext_Impl::CreateChildContext(nPrefix,
+ rLocalName,xAttrList);
+ }
+ return pContext;
+}
+
+
+SvXMLImportContext *SmXMLMultiScriptsContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ const SvXMLTokenMap& rTokenMap = GetSmImport().
+ GetPresScriptEmptyElemTokenMap();
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_MPRESCRIPTS:
+ MiddleElement();
+ pContext = GetSmImport().CreatePrescriptsContext(nPrefix,
+ rLocalName, xAttrList);
+ break;
+ case XML_TOK_NONE:
+ pContext = GetSmImport().CreateNoneContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ default:
+ pContext = SmXMLRowContext_Impl::CreateChildContext(nPrefix,
+ rLocalName,xAttrList);
+ break;
+ }
+ return pContext;
+}
+
+void SmXMLMultiScriptsContext_Impl::MiddleElement()
+{
+ bHasPrescripts=sal_True;
+
+ DBG_ASSERT(GetSmImport().GetNodeStack().Count() - nElementCount > 0,
+ "Sub has no arguments");
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ if (rNodeStack.Count()-nElementCount > 1)
+ {
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TRSUB;
+ ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+
+ SmNodeStack aReverseStack;
+ while (rNodeStack.Count()-nElementCount)
+ {
+ SmNode *pThing = rNodeStack.Pop();
+ aReverseStack.Push(pThing);
+ }
+
+ for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ {
+ SmSubSupNode *pNode = new SmSubSupNode(aToken);
+
+ // initialize subnodes array
+ SmNodeArray aSubNodes;
+ aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
+ for (ULONG i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[i] = NULL;
+
+ /*On each loop the base and its sub sup pair becomes the
+ base for the next loop to which the next sub sup pair is
+ attached, i.e. wheels within wheels*/
+ //if (nCount == 0)
+ aSubNodes[0] = aReverseStack.Pop();
+
+ SmNode *pScriptNode = aReverseStack.Pop();
+
+ if (pScriptNode && ((pScriptNode->GetToken().eType != TIDENT) ||
+ (pScriptNode->GetToken().aText.Len())))
+ aSubNodes[RSUB+1] = pScriptNode;
+ pScriptNode = aReverseStack.Pop();
+ if (pScriptNode && ((pScriptNode->GetToken().eType != TIDENT) ||
+ (pScriptNode->GetToken().aText.Len())))
+ aSubNodes[RSUP+1] = pScriptNode;
+
+ pNode->SetSubNodes(aSubNodes);
+ aReverseStack.Push(pNode);
+ }
+ rNodeStack.Push(aReverseStack.Pop());
+ }
+}
+
+
+void SmXMLTableContext_Impl::EndElement()
+{
+ SmNodeArray aExpressionArray;
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ SmNodeStack aReverseStack;
+ aExpressionArray.resize(rNodeStack.Count()-nElementCount);
+
+ ULONG nRows = rNodeStack.Count()-nElementCount;
+ USHORT nCols = 0;
+
+ SmStructureNode *pArray;
+ for (ULONG i=rNodeStack.Count()-nElementCount;i > 0;i--)
+ {
+ pArray = (SmStructureNode *)rNodeStack.Pop();
+ if (pArray->GetNumSubNodes() == 0)
+ {
+ //This is a little tricky, it is possible that there was
+ //be elements that were not inside a <mtd> pair, in which
+ //case they will not be in a row, i.e. they will not have
+ //SubNodes, so we have to wait until here before we can
+ //resolve the situation. Implicitsurrounding tags are
+ //surprisingly difficult to get right within this
+ //architecture
+
+ SmNodeArray aRelationArray;
+ aRelationArray.resize(1);
+ aRelationArray[0] = pArray;
+ SmToken aDummy;
+ pArray = new SmExpressionNode(aDummy);
+ pArray->SetSubNodes(aRelationArray);
+ }
+
+ if (pArray->GetNumSubNodes() > nCols)
+ nCols = pArray->GetNumSubNodes();
+ aReverseStack.Push(pArray);
+ }
+ aExpressionArray.resize(nCols*nRows);
+ ULONG j=0;
+ while (aReverseStack.Count())
+ {
+ pArray = (SmStructureNode *)aReverseStack.Pop();
+ for (USHORT i=0;i<pArray->GetNumSubNodes();i++)
+ aExpressionArray[j++] = pArray->GetSubNode(i);
+ }
+
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = TRGROUP;
+ aToken.nLevel = 0;
+ aToken.eType = TMATRIX;
+ SmMatrixNode *pSNode = new SmMatrixNode(aToken);
+ pSNode->SetSubNodes(aExpressionArray);
+ pSNode->SetRowCol(static_cast<USHORT>(nRows),nCols);
+ rNodeStack.Push(pSNode);
+}
+
+SvXMLImportContext *SmXMLTableRowContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ const SvXMLTokenMap& rTokenMap = GetSmImport().
+ GetPresTableElemTokenMap();
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_MTD:
+ pContext = GetSmImport().CreateTableCellContext(nPrefix,
+ rLocalName, xAttrList);
+ break;
+ default:
+ pContext = SmXMLRowContext_Impl::CreateChildContext(nPrefix,
+ rLocalName,xAttrList);
+ break;
+ }
+ return pContext;
+}
+
+SvXMLImportContext *SmXMLTableContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ const SvXMLTokenMap& rTokenMap = GetSmImport().
+ GetPresTableElemTokenMap();
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_MTR:
+ pContext = GetSmImport().CreateTableRowContext(nPrefix,rLocalName,
+ xAttrList);
+ break;
+ default:
+ pContext = SmXMLTableRowContext_Impl::CreateChildContext(nPrefix,
+ rLocalName,xAttrList);
+ break;
+ }
+ return pContext;
+}
+
+void SmXMLMultiScriptsContext_Impl::EndElement()
+{
+ if (!bHasPrescripts)
+ MiddleElement();
+
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ if (rNodeStack.Count()-nElementCount > 1)
+ {
+ SmToken aToken;
+ aToken.cMathChar = '\0';
+ aToken.nGroup = 0;
+ aToken.nLevel = 0;
+ aToken.eType = TLSUB;
+ ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+
+ SmNodeStack aReverseStack;
+ while (rNodeStack.Count()-nElementCount)
+ aReverseStack.Push(rNodeStack.Pop());
+ for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ {
+ SmSubSupNode *pNode = new SmSubSupNode(aToken);
+
+ // initialize subnodes array
+ SmNodeArray aSubNodes;
+ aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
+ for (ULONG i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[i] = NULL;
+
+ /*On each loop the base and its sub sup pair becomes the
+ base for the next loop to which the next sub sup pair is
+ attached, i.e. wheels within wheels*/
+ //if (nCount == 0)
+ aSubNodes[0] = aReverseStack.Pop();
+
+ SmNode *pScriptNode = aReverseStack.Pop();
+ if (pScriptNode->GetToken().aText.Len())
+ aSubNodes[LSUB+1] = pScriptNode;
+ pScriptNode = aReverseStack.Pop();
+ if (pScriptNode->GetToken().aText.Len())
+ aSubNodes[LSUP+1] = pScriptNode;
+
+ pNode->SetSubNodes(aSubNodes);
+ aReverseStack.Push(pNode);
+ }
+ rNodeStack.Push(aReverseStack.Pop());
+ }
+
+}
+void SmXMLActionContext_Impl::EndElement()
+{
+ /*For now we will just assume that the
+ selected attribute is one, and then just display
+ that expression alone, i.e. remove all expect the
+ first pushed one*/
+
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ for (ULONG i=rNodeStack.Count()-nElementCount;i > 1;i--)
+ {
+ delete rNodeStack.Pop();
+ }
+}
+
+SvXMLImportContext *SmXMLImport::CreateContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ if ( XML_NAMESPACE_OFFICE == nPrefix )
+ {
+ if ( (IsXMLToken(rLocalName, XML_DOCUMENT) ||
+ IsXMLToken(rLocalName, XML_DOCUMENT_META)))
+ {
+ uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
+ mxServiceFactory->createInstance(
+ ::rtl::OUString::createFromAscii(
+ "com.sun.star.xml.dom.SAXDocumentBuilder")),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
+ GetModel(), uno::UNO_QUERY_THROW);
+ return IsXMLToken(rLocalName, XML_DOCUMENT_META)
+ ? new SvXMLMetaDocumentContext(*this,
+ XML_NAMESPACE_OFFICE, rLocalName,
+ xDPS->getDocumentProperties(), xDocBuilder)
+ // flat OpenDocument file format -- this has not been tested...
+ : new SmXMLFlatDocContext_Impl( *this, nPrefix, rLocalName,
+ xDPS->getDocumentProperties(), xDocBuilder);
+ }
+ else
+ {
+ return new SmXMLOfficeContext_Impl( *this,nPrefix,rLocalName);
+ }
+ }
+ else
+ return new SmXMLDocContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateRowContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLRowContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateTextContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLTextContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateAnnotationContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLAnnotationContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateStringContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLStringContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateNumberContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLNumberContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateIdentifierContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLIdentifierContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateOperatorContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLOperatorContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateSpaceContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLSpaceContext_Impl(*this,nPrefix,rLocalName);
+}
+
+
+SvXMLImportContext *SmXMLImport::CreateFracContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLFracContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateSqrtContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLSqrtContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateRootContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLRootContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateStyleContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLStyleContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreatePaddedContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLPaddedContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreatePhantomContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLPhantomContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateFencedContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLFencedContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateErrorContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLErrorContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateSubContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLSubContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateSubSupContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLSubSupContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateSupContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLSupContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateUnderContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLUnderContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateOverContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLOverContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateUnderOverContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLUnderOverContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateMultiScriptsContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLMultiScriptsContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateTableContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLTableContext_Impl(*this,nPrefix,rLocalName);
+}
+SvXMLImportContext *SmXMLImport::CreateTableRowContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLTableRowContext_Impl(*this,nPrefix,rLocalName);
+}
+SvXMLImportContext *SmXMLImport::CreateTableCellContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLTableCellContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateNoneContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLNoneContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreatePrescriptsContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLPrescriptsContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateAlignGroupContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLAlignGroupContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SvXMLImportContext *SmXMLImport::CreateActionContext(sal_uInt16 nPrefix,
+ const OUString &rLocalName,
+ const uno::Reference <xml::sax::XAttributeList> & /*xAttrList*/)
+{
+ return new SmXMLActionContext_Impl(*this,nPrefix,rLocalName);
+}
+
+SmXMLImport::~SmXMLImport() throw ()
+{
+ delete pPresLayoutElemTokenMap;
+ delete pPresElemTokenMap;
+ delete pPresScriptEmptyElemTokenMap;
+ delete pPresTableElemTokenMap;
+ delete pPresLayoutAttrTokenMap;
+ delete pFencedAttrTokenMap;
+ delete pColorTokenMap;
+ delete pOperatorAttrTokenMap;
+ delete pAnnotationAttrTokenMap;
+}
+
+void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps)
+{
+ uno::Reference <frame::XModel> xModel = GetModel();
+ if ( !xModel.is() )
+ return;
+
+ uno::Reference <lang::XUnoTunnel> xTunnel;
+ xTunnel = uno::Reference <lang::XUnoTunnel> (xModel,uno::UNO_QUERY);
+ SmModel *pModel = reinterpret_cast<SmModel *>
+ (xTunnel->getSomething(SmModel::getUnoTunnelId()));
+
+ if ( !pModel )
+ return;
+
+ SmDocShell *pDocShell =
+ static_cast<SmDocShell*>(pModel->GetObjectShell());
+ if ( !pDocShell )
+ return;
+
+ Rectangle aRect( pDocShell->GetVisArea() );
+
+ sal_Int32 nCount = aViewProps.getLength();
+ const PropertyValue *pValue = aViewProps.getConstArray();
+
+ long nTmp = 0;
+ //sal_Bool bShowDeletes = sal_False, bShowInserts = sal_False, bShowFooter = sal_False, bShowHeader = sal_False;
+
+ for (sal_Int32 i = 0; i < nCount ; i++)
+ {
+ if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaTop" ) ) )
+ {
+ pValue->Value >>= nTmp;
+ aRect.setY( nTmp );
+ }
+ else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaLeft" ) ) )
+ {
+ pValue->Value >>= nTmp;
+ aRect.setX( nTmp );
+ }
+ else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaWidth" ) ) )
+ {
+ pValue->Value >>= nTmp;
+ Size aSize( aRect.GetSize() );
+ aSize.Width() = nTmp;
+ aRect.SetSize( aSize );
+ }
+ else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaHeight" ) ) )
+ {
+ pValue->Value >>= nTmp;
+ Size aSize( aRect.GetSize() );
+ aSize.Height() = nTmp;
+ aRect.SetSize( aSize );
+ }
+ pValue++;
+ }
+
+ pDocShell->SetVisArea ( aRect );
+}
+
+void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfProps)
+{
+ uno::Reference < XPropertySet > xProps ( GetModel(), UNO_QUERY );
+ if ( xProps.is() )
+ {
+ Reference < XPropertySetInfo > xInfo ( xProps->getPropertySetInfo() );
+ if (xInfo.is() )
+ {
+ sal_Int32 nCount = aConfProps.getLength();
+ const PropertyValue* pValues = aConfProps.getConstArray();
+
+ const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
+ const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
+ const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
+ while ( nCount-- )
+ {
+ if (pValues->Name != sFormula &&
+ pValues->Name != sBasicLibraries &&
+ pValues->Name != sDialogLibraries)
+ {
+ try
+ {
+ if ( xInfo->hasPropertyByName( pValues->Name ) )
+ xProps->setPropertyValue( pValues->Name, pValues->Value );
+ }
+ catch( Exception& )
+ {
+ DBG_ERROR( "SmXMLImport::SetConfigurationSettings: Exception!" );
+ }
+ }
+
+ pValues++;
+ }
+ }
+ }
+}
+
+
+////////////////////////////////////////////////////////////
+
+
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index ad3987549c0f..8159acd64362 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1651,7 +1651,7 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
"Sm : unterschiedliche Fontgroessen");
aTmpSize.Width() = Min((long) nBraceHeight * 60L / 100L,
rFormat.GetBaseSize().Height() * 3L / 2L);
- // correction factor since change from StarMath to StarSymbol font
+ // correction factor since change from StarMath to OpenSymbol font
// because of the different font width in the FontMetric
aTmpSize.Width() *= 182;
aTmpSize.Width() /= 267;
@@ -2694,7 +2694,7 @@ void SmMathSymbolNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocSh
DBG_ASSERT(GetFont().GetCharSet() == RTL_TEXTENCODING_SYMBOL ||
GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE,
- "incorrect charset for character from StarMath/StarSymbol font");
+ "incorrect charset for character from StarMath/OpenSymbol font");
Flags() |= FLG_FONT | FLG_ITALIC;
};
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 0718be8ffd37..94d0761d7fce 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -150,8 +150,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight());
const FontMetric aFM (rDev.GetFontMetric());
- BOOL bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH ) ||
- aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH2 );
+ BOOL bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
BOOL bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
const long nFontHeight = rDev.GetFont().GetSize().Height();
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index eee43aace130..47f51fe18c04 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -114,14 +114,14 @@ ModalDialog RID_FONTSIZEDIALOG
SVLook = TRUE ;
HelpID = SID_FONTSIZE ;
Size = MAP_APPFONT ( 171 , 120 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Schriftgrößen : Schriftgrößen */
+ /* ### ACHTUNG: Neuer Text in Resource? Schriftgr��en : Schriftgr��en */
Text [ en-US ] = "Font Sizes" ;
FixedText 1
{
Left = TRUE ;
Pos = MAP_APPFONT ( 12 , 7 ) ;
Size = MAP_APPFONT ( 40 , 10 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? ~Basisgröße: : ~Basisgröße: */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Basisgr��e: : ~Basisgr��e: */
Text [ en-US ] = "Base ~size";
};
MetricField 1
@@ -246,7 +246,7 @@ ModalDialog RID_FONTSIZEDIALOG
{
Pos = MAP_APPFONT ( 6 , 24 ) ;
Size = MAP_APPFONT ( 99 , 8 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? relative Größen : relative Größen */
+ /* ### ACHTUNG: Neuer Text in Resource? relative Gr��en : relative Gr��en */
Text [ en-US ] = "Relative sizes" ;
};
OKButton 1
@@ -433,7 +433,7 @@ ModalDialog RID_DISTANCEDIALOG
SVLook = TRUE ;
HelpID = SID_DISTANCE ;
Size = MAP_APPFONT ( 240 , 90 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Abstände : Abstände */
+ /* ### ACHTUNG: Neuer Text in Resource? Abst�nde : Abst�nde */
Text [ en-US ] = "Spacing" ;
FixedText 1
{
@@ -564,7 +564,7 @@ ModalDialog RID_DISTANCEDIALOG
{
String 1
{
- /* ### ACHTUNG: Neuer Text in Resource? Abstände : Abstände */
+ /* ### ACHTUNG: Neuer Text in Resource? Abst�nde : Abst�nde */
Text [ en-US ] = "Spacing" ;
};
String 2
@@ -639,12 +639,12 @@ ModalDialog RID_DISTANCEDIALOG
{
String 1
{
- /* ### ACHTUNG: Neuer Text in Resource? Brüche : Br³che */
+ /* ### ACHTUNG: Neuer Text in Resource? Br�che : Br�che */
Text [ en-US ] = "Fractions" ;
};
String 2
{
- /* ### ACHTUNG: Neuer Text in Resource? ~Zählerhöhe: : ~Zählerhöhe: */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Z�hlerh�he: : ~Z�hlerh�he: */
Text [ en-US ] = "~Numerator";
};
Bitmap 20
@@ -676,7 +676,7 @@ ModalDialog RID_DISTANCEDIALOG
};
String 2
{
- /* ### ACHTUNG: Neuer Text in Resource? ~Überlänge: : ~šberlänge: */
+ /* ### ACHTUNG: Neuer Text in Resource? ~�berl�nge: : ~�berl�nge: */
Text [ en-US ] = "~Excess length";
};
Bitmap 20
@@ -689,7 +689,7 @@ ModalDialog RID_DISTANCEDIALOG
};
String 3
{
- /* ### ACHTUNG: Neuer Text in Resource? ~Strichstärke: : ~Strichstärke: */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Strichst�rke: : ~Strichst�rke: */
Text [ en-US ] = "~Weight";
};
Bitmap 30
@@ -709,7 +709,7 @@ ModalDialog RID_DISTANCEDIALOG
};
String 2
{
- /* ### ACHTUNG: Neuer Text in Resource? Grenz~höhe: : Grenz~höhe: */
+ /* ### ACHTUNG: Neuer Text in Resource? Grenz~h�he: : Grenz~h�he: */
Text [ en-US ] = "~Upper limit";
};
Bitmap 20
@@ -815,7 +815,7 @@ ModalDialog RID_DISTANCEDIALOG
};
String 2
{
- /* ### ACHTUNG: Neuer Text in Resource? ~Primärhöhe: : ~Primärhöhe: */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Prim�rh�he: : ~Prim�rh�he: */
Text [ en-US ] = "~Primary height";
};
Bitmap 20
@@ -847,7 +847,7 @@ ModalDialog RID_DISTANCEDIALOG
};
String 2
{
- /* ### ACHTUNG: Neuer Text in Resource? ~Übergröße: : ~šbergröße: */
+ /* ### ACHTUNG: Neuer Text in Resource? ~�bergr��e: : ~�bergr��e: */
Text [ en-US ] = "~Excess size";
};
Bitmap 20
@@ -1127,7 +1127,7 @@ ModalDialog RID_SYMBOLDIALOG
Pos = MAP_APPFONT ( 177 , 6 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
DefButton = TRUE ;
- /* ### ACHTUNG: Neuer Text in Resource? ~Übernehmen : ~šbernehmen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~�bernehmen : ~�bernehmen */
Text [ en-US ] = "~Insert" ;
};
PushButton 3
@@ -1372,7 +1372,7 @@ QueryBox RID_DEFAULTSAVEQUERY
{
Buttons = WB_YES_NO ;
DefButton = WB_DEF_YES ;
- /* ### ACHTUNG: Neuer Text in Resource? Sollen die Änderungen als Standard gespeichert werden ?\n\nDiese Änderungen wirken sich auf alle neuen Formeln aus. : Sollen die Žnderungen als Standard gespeichert werden ?\n\nDiese Žnderungen wirken sich auf alle neuen Formeln aus. */
+ /* ### ACHTUNG: Neuer Text in Resource? Sollen die �nderungen als Standard gespeichert werden ?\n\nDiese �nderungen wirken sich auf alle neuen Formeln aus. : Sollen die �nderungen als Standard gespeichert werden ?\n\nDiese �nderungen wirken sich auf alle neuen Formeln aus. */
Message [ en-US ] = "Should the changes be saved as defaults?\n\nThese changes will apply for all new formulas." ;
};
@@ -1438,7 +1438,7 @@ Menu RID_VIEWMENU
{
Identifier = SID_ZOOMIN ;
HelpID = SID_ZOOMIN ;
- /* ### ACHTUNG: Neuer Text in Resource? Vergrößern : Vergrößern */
+ /* ### ACHTUNG: Neuer Text in Resource? Vergr��ern : Vergr��ern */
Text [ en-US ] = "~Zoom In" ;
};
MenuItem
@@ -1759,7 +1759,7 @@ FloatingWindow RID_TOOLBOXWINDOW
{
Identifier = RID_XSIMEQY ;
HelpId = HID_SMA_XSIMEQY ;
- /* ### ACHTUNG: Neuer Text in Resource? ist ähnlich oder gleich : ist ähnlich oder glech */
+ /* ### ACHTUNG: Neuer Text in Resource? ist �hnlich oder gleich : ist �hnlich oder glech */
Text [ en-US ] = "Is Similar Or Equal" ;
};
ToolBoxItem
@@ -1782,7 +1782,7 @@ FloatingWindow RID_TOOLBOXWINDOW
{
Identifier = RID_XLESLANTY ;
HelpId = HID_SMA_XLESLANTY ;
- /* ### ACHTUNG: Neuer Text in Resource? ist kleiner gleich (schräg) : ist keiner gleich */
+ /* ### ACHTUNG: Neuer Text in Resource? ist kleiner gleich (schr�g) : ist keiner gleich */
Text [ en-US ] = "Is Less Than Or Equal To" ;
};
ToolBoxItem
@@ -2051,7 +2051,7 @@ FloatingWindow RID_TOOLBOXWINDOW
{
Identifier = RID_EX ;
HelpId = HID_SMA_EX ;
- /* ### ACHTUNG: Neuer Text in Resource? Exponentialfunktion : natürliche Exponentialfunktion */
+ /* ### ACHTUNG: Neuer Text in Resource? Exponentialfunktion : nat�rliche Exponentialfunktion */
Text [ en-US ] = "Exponential Function" ;
};
ToolBoxItem
@@ -3456,13 +3456,13 @@ String RID_ERR_FUNCEXPECTED
String RID_ERR_UNOPEREXPECTED
{
- /* ### ACHTUNG: Neuer Text in Resource? Unärer Operator erwartet : Un§rer Operator erwartet */
+ /* ### ACHTUNG: Neuer Text in Resource? Un�rer Operator erwartet : Un�rer Operator erwartet */
Text [ en-US ] = "Unary operator expected" ;
};
String RID_ERR_BINOPEREXPECTED
{
- /* ### ACHTUNG: Neuer Text in Resource? Binärer Operator erwartet : Bin§rer Operator erwartet */
+ /* ### ACHTUNG: Neuer Text in Resource? Bin�rer Operator erwartet : Bin�rer Operator erwartet */
Text [ en-US ] = "Binary operator expected" ;
};
@@ -3526,9 +3526,9 @@ ToolBox RID_MATH_TOOLBOX
{
Identifier = SID_ZOOMIN ;
HelpID = SID_ZOOMIN ;
- /* ### ACHTUNG: Neuer Text in Resource? Größer : Größer */
+ /* ### ACHTUNG: Neuer Text in Resource? Gr��er : Gr��er */
Text [ en-US ] = "Zoom In" ;
- /* ### ACHTUNG: Neuer Text in Resource? Stellt den Ausschnitt vergrößert dar : Stellt den Ausschnitt vergrößert dar */
+ /* ### ACHTUNG: Neuer Text in Resource? Stellt den Ausschnitt vergr��ert dar : Stellt den Ausschnitt vergr��ert dar */
};
ToolBoxItem
{
@@ -3541,7 +3541,7 @@ ToolBox RID_MATH_TOOLBOX
Identifier = SID_VIEW100 ;
HelpID = SID_VIEW100 ;
Text [ en-US ] = "Zoom 100%" ;
- /* ### ACHTUNG: Neuer Text in Resource? Stellt den Ausschnitt in tatsächlicher Größe dar : Stellt den Ausschnitt in tatsächlicher GröÃe dar */
+ /* ### ACHTUNG: Neuer Text in Resource? Stellt den Ausschnitt in tats�chlicher Gr��e dar : Stellt den Ausschnitt in tats�chlicher Gr��e dar */
};
ToolBoxItem
{
@@ -3570,7 +3570,7 @@ ToolBox RID_MATH_TOOLBOX
Identifier = SID_SYMBOLS_CATALOGUE ;
HelpID = SID_SYMBOLS_CATALOGUE ;
Text [ en-US ] = "Symbols" ;
- /* ### ACHTUNG: Neuer Text in Resource? Symbole einfügen und bearbeiten : Symbole einf³gen und bearbeiten */
+ /* ### ACHTUNG: Neuer Text in Resource? Symbole einf�gen und bearbeiten : Symbole einf�gen und bearbeiten */
};
};
};
@@ -3580,189 +3580,28 @@ String RID_MATH_TOOLBOX
Text [ en-US ] = "Main Toolbar" ;
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+StringArray RID_PRINTUIOPTIONS
+{
+ ItemList [en-US] =
+ {
+ < "%PRODUCTNAME %s"; >;
+ < "Contents"; >;
+ < "~Title row"; >;
+ < "Specifies whether you want the name of the document to be included in the printout"; >;
+ < "~Formula text"; >;
+ < "Specifies whether to include the contents of the \"Commands\" window at the bottom of the printout."; >;
+ < "B~orders"; >;
+ < "Applies a thin border to the formula area in the printout."; >;
+ < "Size"; >;
+ < "O~riginal size"; >;
+ < "Prints the formula without adjusting the current font size."; >;
+ < "Fit to ~page"; >;
+ < "Adjusts the formula to the page format used in the printout."; >;
+ < "~Scaling"; >;
+ < "Reduces or enlarges the size of the printed formula by a specified enlargement factor."; >;
+ < "Miscellaneous options"; >;
+ < "Ig~nore ~~ and ` at the end of the line"; >;
+ < "Specfies that these space wildcards will be removed if they are at the end of a line."; >;
+ };
+};
diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx
index 6a4fe919ae95..9f02e27876b6 100644
--- a/starmath/source/types.cxx
+++ b/starmath/source/types.cxx
@@ -35,227 +35,21 @@
#include <types.hxx>
-//!! no official unicode code point for these in non-private-area
-//!! (even MathMl uses the code points listed on the right which are
-//!! from the private-use-area as well)
-// MS_UNDERBRACE = (xub_Unicode) 0xE081, 0xF613 ?
-// MS_OVERBRACE = (xub_Unicode) 0xE082, 0xF612 ?
-
-struct MathConversionEntry
-{
- sal_Unicode cMath; // code point of the character from the
- // StarSymbol/OpenSymbol private-use-area
- sal_Unicode cUnicode; // 'official' Unicode code point the above
- // character should be matched to and vice versa.
- // See http://www.w3.org/TR/2000/WD-MathML2-20000211/bycodes.html
- // for most of them.
-// const sal_Unicode *pFontName;
- sal_Unicode cMathType; // 0 if the same value of cUnicode is to be used
-};
-
-static MathConversionEntry aMathConvTbl[] =
-{
-// MS_UNDERBRACE, 0xF613, // only Math-ML code-point available !
-// MS_OVERBRACE, 0xF612, // only Math-ML code-point available !
- { MS_PLUS, 0x002B, 0 },
- { MS_LT, 0x003C, 0 },
- { MS_GT, 0x003E, 0 },
- { MS_LESLANT, 0x2264, 0 },
- { MS_GESLANT, 0x2265, 0 },
- { MS_DOTSLOW, 0x2026, 0 },
- { MS_RIGHTARROW, 0x2192, 0 },
- { MS_SQRT, 0x221A, 0 },
- { MS_HAT, 0x02C6, 0 },
- { MS_CHECK, 0x02C7, 0 },
- { MS_BREVE, 0x02D8, 0 },
- { MS_ACUTE, 0x00B4, 0 },
- { MS_GRAVE, 0x0060, 0 },
- { MS_TILDE, 0x02DC, 0 },
- { MS_BAR, 0x02C9, 0 },
- { MS_VEC, 0x2192, 0 },
- { MS_DDDOT, 0x22EF, 0 },
- { MS_LPARENT, 0x0028, 0 },
- { MS_RPARENT, 0x0029, 0 },
- { MS_PLACE, 0x25A1, 0 },
- { MS_LEFTARROW, 0x2190, 0 },
- { MS_UPARROW, 0x2191, 0 },
- { MS_DOWNARROW, 0x2193, 0 },
- { MS_PLACE, 0x2751, 0 },
-
- // predefined-user-defined symbols
- // (code-points on the left as defined in 'officecfg' for SO8,
- // non-private-use-area characters uncommented):
-
-// 0x0041, 0x0391, 0, // %ALPHA
-// 0x0042, 0x0392, 0, // %BETA
- { 0xE0AC, 0x0393, 0 }, // %GAMMA
- { 0xE0AD, 0x0394, 0 }, // %DELTA
-// 0x0045, 0x0395, 0, // %EPSILON
-// 0x005A, 0x0396, 0, // %ZETA
-// 0x0048, 0x0397, 0, // %ETA
- { 0xE0AE, 0x0398, 0 }, // %THETA
-// 0x0049, 0x0399, 0, // %IOTA
-// 0x004B, 0x039A, 0, // %KAPPA
- { 0xE0AF, 0x039B, 0 }, // %LAMBDA
-// 0x004D, 0x039C, 0, // %MU
-// 0x004E, 0x039D, 0, // %NU
- { 0xE0B0, 0x039E, 0 }, // %XI
-// 0x004F, 0x039F, 0, // %OMICRON
- { 0xE0B1, 0x03A0, 0 }, // %PI
-// 0x0050, 0x03A1, 0, // %RHO
- { 0xE0B2, 0x03A3, 0 }, // %SIGMA
-// 0x0054, 0x03A4, 0, // %TAU
- { 0xE0B3, 0x03A5, 0 }, // %UPSILON
- { 0xE0B4, 0x03A6, 0 }, // %PHI
-// 0x0058, 0x03A7, 0, // %CHI
- { 0xE0B5, 0x03A8, 0 }, // %PSI
- { 0xE0B6, 0x03A9, 0 }, // %OMEGA
-
- { 0xE0B7, 0x03B1, 0 }, // %alpha
- { 0xE0B8, 0x03B2, 0 }, // %beta
- { 0xE0B9, 0x03B3, 0 }, // %gamma
- { 0xE0BA, 0x03B4, 0 }, // %delta
- { 0xE0BB, 0x03B5, 0 }, // %epsilon
- { 0xE0BC, 0x03B6, 0 }, // %zeta
- { 0xE0BD, 0x03B7, 0 }, // %eta
- { 0xE0BE, 0x03B8, 0 }, // %theta
- { 0xE0BF, 0x03B9, 0 }, // %iota
- { 0xE0C0, 0x03BA, 0 }, // %kappa
- { 0xE0C1, 0x03BB, 0 }, // %lambda
- { 0xE0C2, 0x03BC, 0 }, // %mu
- { 0xE0C3, 0x03BD, 0 }, // %nu
- { 0xE0C4, 0x03BE, 0 }, // %xi
- { 0xE0C5, 0x03BF, 0 }, // %omicron
- { 0xE0C6, 0x03C0, 0 }, // %pi
- { 0xE0C7, 0x03C1, 0 }, // %rho
- { 0xE0C8, 0x03C3, 0 }, // %sigma
- { 0xE0C9, 0x03C4, 0 }, // %tau
- { 0xE0CA, 0x03C5, 0 }, // %upsilon
- { 0xE0CB, 0x03C6, 0 }, // %phi
- { 0xE0CC, 0x03C7, 0 }, // %chi
- { 0xE0CD, 0x03C8, 0 }, // %psi
- { 0xE0CE, 0x03C9, 0 }, // %omega
-
- { 0xE0CF, 0x025B, 0,/*x03B5*/}, // %varepsilon
- { 0xE0D0, 0x03D1, 0 }, // %vartheta
- { 0xE0D4, 0x03D5, 0 }, // %varphi
- { 0xE0D1, 0x03D6, 0 }, // %varpi
-// 0x03F1, 0x03F1, 0/*x03C1*/, // %varrho
- { 0xE0D3, 0x03C2, 0 }, // %varsigma
-
-// 0x2227, 0x2227, 0, // %and
-// 0x2228, 0x2228, 0, // %or
-// 0x2208, 0x2208, 0, // %element
-// 0x2209, 0x2209, 0, // %noelement
-// 0x226B, 0x226B, 0, // %strictlygreaterthan
-// 0x226A, 0x226A, 0, // %strictlylessthan
-// 0x2261, 0x2261, 0, // %identical
-// 0x221E, 0x221E, 0, // %infinite
-// 0x2260, 0x2260, 0, // %notequal
- { 0xE080, 0x2030, 0 }, // %perthousand
-// 0x2222, 0x2222, 0, // %angle
- { 0xE08C, 0x2192, 0 } // %tendto
-};
-
-
-static int nMathToUnicodeLen = sizeof(aMathConvTbl) / sizeof(aMathConvTbl[0]);
-
sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar )
{
- sal_Unicode cRes = 0;
+ sal_Unicode cRes = cChar;
if (IsInPrivateUseArea( cChar ))
{
- for (int i = 0; i < nMathToUnicodeLen && cRes == 0; ++i)
- {
- if (aMathConvTbl[i].cMath == cChar)
- cRes = aMathConvTbl[i].cUnicode;
- }
- }
- return cRes;
-}
-
-#ifdef TL_NOT_YET_USED
-sal_Unicode ConvertUnicodeToMathPrivateUseArea( sal_Unicode cChar )
-{
- sal_Unicode cRes = 0;
- for (int i = 0; i < nMathToUnicodeLen && cRes == 0; ++i)
- {
- if (aMathConvTbl[i].cUnicode == cChar)
- cRes = aMathConvTbl[i].cMath;
- }
- return cRes;
-}
-
-
-sal_Unicode ConvertMathToMathType( sal_Unicode cChar )
-{
- sal_Unicode cRes = 0;
- for (int i = 0; i < nMathToUnicodeLen && cRes == 0; ++i)
- {
- const MathConversionEntry &rEntry = aMathConvTbl[i];
- if (rEntry.cMath == cChar)
- {
- cRes = rEntry.cMathType;
- if (cRes == 0)
- cRes = rEntry.cUnicode;
- }
+ DBG_ASSERT( 0, "Error: private use area characters should no longer be in use!" );
+ cRes = (sal_Unicode) '&'; // just some character that should easily be notice as odd in the context
}
return cRes;
}
-sal_Unicode ConvertMathTypeToMath( sal_Unicode cChar )
-{
- sal_Unicode cRes = 0;
- for (int i = 0; i < nMathToUnicodeLen && cRes == 0; ++i)
- {
- const MathConversionEntry &rEntry = aMathConvTbl[i];
- sal_Unicode cTmp = rEntry.cMathType;
- if (cTmp == 0)
- cTmp = rEntry.cUnicode;
- if (cTmp == cChar)
- cRes = rEntry.cMath;
- }
- return cRes;
-}
-#endif //TL_NOT_YET_USED
sal_Unicode ConvertMathToMathML( sal_Unicode cChar )
{
- sal_Unicode cRes = 0;
- if (cChar == MS_OVERBRACE)
- cRes = 0xF612; // Math-ML code-point (there is no official unicode-point)
- else if (cChar == MS_UNDERBRACE)
- cRes = 0xF613; // Math-ML code-point (there is no official unicode-point)
- else
- cRes = ConvertMathPrivateUseAreaToUnicode( cChar );
- return cRes;
-}
-
-#ifdef TL_NOT_YET_USED
-sal_Unicode ConvertMathMLToMath( sal_Unicode cChar )
-{
- sal_Unicode cRes = 0;
- if (cChar == 0xF612)
- cRes = MS_OVERBRACE; // Math-ML code-point (there is no official unicode-point)
- else if (cChar == 0xF613)
- cRes = MS_UNDERBRACE; // Math-ML code-point (there is no official unicode-point)
- else
- cRes = ConvertUnicodeToMathPrivateUseArea( cChar );
+ sal_Unicode cRes = ConvertMathPrivateUseAreaToUnicode( cChar );
return cRes;
}
-
-sal_Unicode GetTokenChar( sal_Unicode cChar, sal_Bool bConvertForExport )
-{
- sal_Unicode cRes = cChar;
- if (bConvertForExport)
- {
- sal_Unicode cTmp = ConvertMathPrivateUseAreaToUnicode( cChar );
- if (cTmp != 0)
- cRes = cTmp;
- }
- return cRes;
-}
-#endif //TL_NOT_YET_USED
-
-
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 6a4a65b7e228..6694d42ad913 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -42,6 +42,7 @@
#include <unotools/processfactory.hxx>
#include <svx/paperinf.hxx>
#include <vcl/settings.hxx>
+#include <vcl/print.hxx>
#include <toolkit/awt/vclxdevice.hxx>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -51,15 +52,14 @@
#include <xmloff/xmluconv.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <unotools/moduleoptions.hxx>
+
#include <unomodel.hxx>
#include <document.hxx>
#include <view.hxx>
#include <symbol.hxx>
-#ifndef STARMATH_HRC
#include <starmath.hrc>
-#endif
#include <config.hxx>
-
#include <smdll.hxx>
using namespace ::vos;
@@ -75,11 +75,102 @@ using namespace ::com::sun::star::formula;
using namespace ::com::sun::star::view;
using namespace ::com::sun::star::script;
+
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+////////////////////////////////////////////////////////////
-////////////////////////////////////////
+SmPrintUIOptions::SmPrintUIOptions()
+{
+ ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) );
+ DBG_ASSERT( aLocalizedStrings.Count() >= 18, "resource incomplete" );
+ if( aLocalizedStrings.Count() < 18 ) // bad resource ?
+ return;
+
+ SmModule *pp = SM_MOD1();
+ SmConfig *pConfig = pp->GetConfig();
+ DBG_ASSERT( pConfig, "SmConfig not found" );
+ if (!pConfig)
+ return;
+
+ // create sequence of print UI options
+ // (Actually IsIgnoreSpacesRight is a parser option. Without it we need only 8 properties here.)
+ m_aUIProperties.realloc( 9 );
+
+ // create Section for formula (results in an extra tab page in dialog)
+ SvtModuleOptions aOpt;
+ String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
+ aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
+ aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) );
+ m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+
+ // create subgroup for print options
+ m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
+
+ // create a bool option for title row (matches to SID_PRINTTITLE)
+ m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
+ aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_TITLE_ROW ) ),
+ pConfig->IsPrintTitle() );
+ // create a bool option for formula text (matches to SID_PRINTTEXT)
+ m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ aLocalizedStrings.GetString( 5 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_FORMULA_TEXT ) ),
+ pConfig->IsPrintFormulaText() );
+ // create a bool option for border (matches to SID_PRINTFRAME)
+ m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
+ aLocalizedStrings.GetString( 7 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_BORDER ) ),
+ pConfig->IsPrintFrame() );
+
+ // create subgroup for print format
+ m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 8 ), rtl::OUString() );
+
+ // create a radio button group for print format (matches to SID_PRINTSIZE)
+ Sequence< rtl::OUString > aChoices( 3 );
+ aChoices[0] = aLocalizedStrings.GetString( 9 );
+ aChoices[1] = aLocalizedStrings.GetString( 11 );
+ aChoices[2] = aLocalizedStrings.GetString( 13 );
+ Sequence< rtl::OUString > aHelpTexts( 3 );
+ aHelpTexts[0] = aLocalizedStrings.GetString( 10 );
+ aHelpTexts[1] = aLocalizedStrings.GetString( 12 );
+ aHelpTexts[2] = aLocalizedStrings.GetString( 14 );
+ OUString aPrintFormatProp( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_FORMAT ) );
+ m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
+ aHelpTexts,
+ aPrintFormatProp,
+ aChoices, static_cast< sal_Int32 >(pConfig->GetPrintSize())
+ );
+
+ // create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
+ vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True );
+ m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(),
+ aLocalizedStrings.GetString( 14 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_SCALE ) ),
+ pConfig->GetPrintZoomFactor(), // initial value
+ 10, // min value
+ 1000, // max value
+ aRangeOpt );
+
+ Sequence< PropertyValue > aHintNoLayoutPage( 1 );
+ aHintNoLayoutPage[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HintNoLayoutPage" ) );
+ aHintNoLayoutPage[0].Value = makeAny( sal_True );
+ m_aUIProperties[8].Value <<= aHintNoLayoutPage;
+
+// IsIgnoreSpacesRight is a parser option! Thus we don't add it to the printer UI.
+//
+// // create subgroup for misc options
+// m_aUIProperties[8].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 9 ) );
+//
+// // create a bool option for ignore spacing (matches to SID_NO_RIGHT_SPACES)
+// m_aUIProperties[9].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
+// rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_NO_RIGHT_SPACE ) ),
+// pConfig->IsIgnoreSpacesRight() );
+}
+
+
+////////////////////////////////////////////////////////////
//
// class SmModel
//
@@ -229,11 +320,14 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
SmModel::SmModel( SfxObjectShell *pObjSh )
: SfxBaseModel(pObjSh)
, PropertySetHelper ( lcl_createModelPropertyInfo () )
+, m_pPrintUIOptions( NULL )
+
{
}
//-----------------------------------------------------------------------
SmModel::~SmModel() throw ()
{
+ delete m_pPrintUIOptions;
}
/*-- 28.03.00 14:18:17---------------------------------------------------
@@ -862,10 +956,33 @@ sal_Int32 SAL_CALL SmModel::getRendererCount(
return 1;
}
+
+static Size lcl_GuessPaperSize()
+{
+ Size aRes;
+ Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
+ LocaleDataWrapper aLocWrp( xMgr, AllSettings().GetLocale() );
+ if( MEASURE_METRIC == aLocWrp.getMeasurementSystemEnum() )
+ {
+ // in 100th mm
+ PaperInfo aInfo( PAPER_A4 );
+ aRes.Width() = aInfo.getWidth();
+ aRes.Height() = aInfo.getHeight();
+ }
+ else
+ {
+ // in 100th mm
+ PaperInfo aInfo( PAPER_LETTER );
+ aRes.Width() = aInfo.getWidth();
+ aRes.Height() = aInfo.getHeight();
+ }
+ return aRes;
+}
+
uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(
sal_Int32 nRenderer,
const uno::Any& /*rSelection*/,
- const uno::Sequence< beans::PropertyValue >& /*xOptions*/ )
+ const uno::Sequence< beans::PropertyValue >& /*rxOptions*/ )
throw (IllegalArgumentException, RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
@@ -885,7 +1002,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(
// if paper size is 0 (usually if no 'real' printer is found),
// guess the paper size
if (aPrtPaperSize.Height() == 0 || aPrtPaperSize.Width() == 0)
- aPrtPaperSize = SvxPaperInfo::GetDefaultPaperSize(MAP_100TH_MM);
+ aPrtPaperSize = lcl_GuessPaperSize();
awt::Size aPageSize( aPrtPaperSize.Width(), aPrtPaperSize.Height() );
uno::Sequence< beans::PropertyValue > aRenderer(1);
@@ -893,6 +1010,10 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(
rValue.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
rValue.Value <<= aPageSize;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = new SmPrintUIOptions();
+ m_pPrintUIOptions->appendPrintUIOptions( aRenderer );
+
return aRenderer;
}
@@ -954,7 +1075,7 @@ void SAL_CALL SmModel::render(
// no real printer ??
if (aPrtPaperSize.Height() == 0 || aPrtPaperSize.Width() == 0)
{
- aPrtPaperSize = SvxPaperInfo::GetDefaultPaperSize(MAP_100TH_MM);
+ aPrtPaperSize = lcl_GuessPaperSize();
// factors from Windows DIN A4
aOutputSize = Size( (long)(aPrtPaperSize.Width() * 0.941),
(long)(aPrtPaperSize.Height() * 0.961));
@@ -979,8 +1100,18 @@ void SAL_CALL SmModel::render(
OutputRect.Right() -= 1500 - (aPrtPaperSize.Width() -
(aPrtPageOffset.X() + OutputRect.Right()));
- pView->Impl_Print( *pOut, PRINT_SIZE_NORMAL,
- Rectangle( OutputRect ), Point() );
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = new SmPrintUIOptions();
+ m_pPrintUIOptions->processProperties( rxOptions );
+
+ pView->Impl_Print( *pOut, *m_pPrintUIOptions, Rectangle( OutputRect ), Point() );
+
+ // release SmPrintUIOptions when everything is done.
+ // That way, when SmPrintUIOptions is needed again it will read the latest configuration settings in its c-tor.
+ if (m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False ))
+ {
+ delete m_pPrintUIOptions; m_pPrintUIOptions = 0;
+ }
}
}
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 855831fc9e9f..288018596643 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -69,6 +69,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx>
+#include "unomodel.hxx"
#include "view.hxx"
#include "config.hxx"
#include "dialog.hxx"
@@ -89,8 +90,6 @@
#define SmViewShell
#include "smslots.hxx"
-
-
using namespace com::sun::star;
using namespace com::sun::star::accessibility;
using namespace com::sun::star::uno;
@@ -1010,18 +1009,25 @@ void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const
}
void SmViewShell::Impl_Print(
- OutputDevice &rOutDev, const SmPrintSize ePrintSize,
+ OutputDevice &rOutDev,
+ const SmPrintUIOptions &rPrintUIOptions,
Rectangle aOutRect, Point aZeroPoint )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Impl_Print" );
- SmModule *pp = SM_MOD1();
+ const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, sal_True );
+ const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
+ const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
+ SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
+ const USHORT nZoomFactor = static_cast< USHORT >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
+// IsIgnoreSpacesRight is a parser option! Thus it does not get evaluated here anymore (too late).
+// const bool bNoRightSpaces = rPrintUIOptions.getBoolValue( PRTUIOPT_NO_RIGHT_SPACE, sal_True );
rOutDev.Push();
rOutDev.SetLineColor( Color(COL_BLACK) );
// output text on top
- if (pp->GetConfig()->IsPrintTitle())
+ if (bIsPrintTitle)
{
Size aSize600 (0, 600);
Size aSize650 (0, 650);
@@ -1041,7 +1047,7 @@ void SmViewShell::Impl_Print(
Size aDescSize (GetTextSize(rOutDev, GetDoc()->GetComment(), aOutRect.GetWidth() - 200));
- if (pp->GetConfig()->IsPrintFrame())
+ if (bIsPrintFrame)
rOutDev.DrawRect(Rectangle(aOutRect.TopLeft(),
Size(aOutRect.GetWidth(), 100 + aTitleSize.Height() + 200 + aDescSize.Height() + 100)));
aOutRect.Top() += 200;
@@ -1068,11 +1074,9 @@ void SmViewShell::Impl_Print(
}
// output text on bottom
- if (pp->GetConfig()->IsPrintFormulaText())
+ if (bIsPrintFormulaText)
{
-// Font aFont(FAMILY_DONTKNOW, Size(0, 600));
- Font aFont;
-
+ Font aFont(FAMILY_DONTKNOW, Size(0, 600));
aFont.SetAlign(ALIGN_TOP);
aFont.SetColor( Color(COL_BLACK) );
@@ -1083,7 +1087,7 @@ void SmViewShell::Impl_Print(
aOutRect.Bottom() -= aSize.Height() + 600;
- if (pp->GetConfig()->IsPrintFrame())
+ if (bIsPrintFrame)
rOutDev.DrawRect(Rectangle(aOutRect.BottomLeft(),
Size(aOutRect.GetWidth(), 200 + aSize.Height() + 200)));
@@ -1094,7 +1098,7 @@ void SmViewShell::Impl_Print(
aOutRect.Bottom() -= 200;
}
- if (pp->GetConfig()->IsPrintFrame())
+ if (bIsPrintFrame)
rOutDev.DrawRect(aOutRect);
aOutRect.Top() += 100;
@@ -1105,6 +1109,9 @@ void SmViewShell::Impl_Print(
Size aSize (GetDoc()->GetSize());
MapMode OutputMapMode;
+ // PDF export should always use PRINT_SIZE_NORMAL ...
+ if (!rPrintUIOptions.getBoolValue( "IsPrinter", sal_False ) )
+ ePrintSize = PRINT_SIZE_NORMAL;
switch (ePrintSize)
{
case PRINT_SIZE_NORMAL:
@@ -1129,7 +1136,7 @@ void SmViewShell::Impl_Print(
case PRINT_SIZE_ZOOMED:
{
- Fraction aFraction (pp->GetConfig()->GetPrintZoomFactor(), 100);
+ Fraction aFraction( nZoomFactor, 100 );
OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction);
break;
@@ -1155,44 +1162,10 @@ void SmViewShell::Impl_Print(
rOutDev.Pop();
}
-USHORT SmViewShell::Print(SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog)
+USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
-
- SmPrinterAccess aPrinterAccess( *GetDoc() );
- Printer *pPrinter = aPrinterAccess.GetPrinter();
- //OutputDevice *pOutDev = pPrinter;
-
- SfxViewShell::Print (rProgress, bIsAPI, pPrintDialog);
-
- pPrinter->StartPage();
-
- Point aZeroPoint;
- Rectangle OutputRect( aZeroPoint, pPrinter->GetOutputSize() );
-
- Point aPrtPageOffset( pPrinter->GetPageOffset() );
- Size aPrtPaperSize ( pPrinter->GetPaperSize() );
-
- // set minimum top and bottom border
- if (aPrtPageOffset.Y() < 2000)
- OutputRect.Top() += 2000 - aPrtPageOffset.Y();
- if ((aPrtPaperSize.Height() - (aPrtPageOffset.Y() + OutputRect.Bottom())) < 2000)
- OutputRect.Bottom() -= 2000 - (aPrtPaperSize.Height() -
- (aPrtPageOffset.Y() + OutputRect.Bottom()));
-
- // set minimum left and right border
- if (aPrtPageOffset.X() < 2500)
- OutputRect.Left() += 2500 - aPrtPageOffset.X();
- if ((aPrtPaperSize.Width() - (aPrtPageOffset.X() + OutputRect.Right())) < 1500)
- OutputRect.Right() -= 1500 - (aPrtPaperSize.Width() -
- (aPrtPageOffset.X() + OutputRect.Right()));
-
- SmModule *pp = SM_MOD1();
- Impl_Print( *pPrinter, pp->GetConfig()->GetPrintSize(),
- OutputRect, aZeroPoint );
-
- pPrinter->EndPage();
-
+ DBG_ASSERT( 0, "SmViewShell::Print: no longer usewd with new UI print dialog. Should be removed!!" );
return 0;
}
diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk
index 978cb6cff40c..0e11dc46aa24 100644
--- a/starmath/util/makefile.mk
+++ b/starmath/util/makefile.mk
@@ -65,6 +65,7 @@ SHL1STDLIBS= \
$(TKLIB) \
$(VCLLIB) \
$(SVLLIB) \
+ $(I18NPAPERLIB) \
$(SOTLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
diff --git a/svl/inc/svl/solar.hrc b/svl/inc/svl/solar.hrc
index 96149b89131c..26ab8a959c5e 100644
--- a/svl/inc/svl/solar.hrc
+++ b/svl/inc/svl/solar.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2009 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: solar.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -171,6 +168,9 @@
#define HID_START 32768
+#define HID_VCL_START (HID_START+100)
+#define HID_VCL_END (HID_START+150)
+
#define HID_SVTOOLS_START (HID_START+200)
#define HID_SVTOOLS_END (HID_START+299)
@@ -207,8 +207,10 @@
#define HID_GOODIES_START (HID_LIB_START+2100)
#define HID_GOODIES_END (HID_LIB_START+2199)
+#if 0 // currently unused range
#define HID_SCHEDULE_START (HID_LIB_START+2200)
#define HID_SCHEDULE_END (HID_LIB_START+3399)
+#endif
#define HID_CHANNEL_START (HID_LIB_START+3400)
#define HID_CHANNEL_END (HID_LIB_START+3499)
@@ -300,6 +302,5 @@
#define HID_EXTENSIONS_START (HID_OBJ_START+2281)
#define HID_EXTENSIONS_END (HID_OBJ_START+2800)
-
#endif
diff --git a/svl/source/numbers/numhead.cxx b/svl/source/numbers/numhead.cxx
index 99ff33433de3..3bb650b0c9ae 100644
--- a/svl/source/numbers/numhead.cxx
+++ b/svl/source/numbers/numhead.cxx
@@ -139,7 +139,7 @@ ImpSvNumMultipleReadHeader::ImpSvNumMultipleReadHeader(SvStream& rNewStream) :
ImpSvNumMultipleReadHeader::~ImpSvNumMultipleReadHeader()
{
- DBG_ASSERT( pMemStream->Tell() == pMemStream->GetSize(),
+ DBG_ASSERT( pMemStream->Tell() == pMemStream->GetEndOfData(),
"Sizes nicht vollstaendig gelesen" );
delete pMemStream;
delete [] pBuf;
diff --git a/svtools/inc/svtools/imapobj.hxx b/svtools/inc/svtools/imapobj.hxx
index b8da0e5c3ee8..46b73ee95f2c 100644
--- a/svtools/inc/svtools/imapobj.hxx
+++ b/svtools/inc/svtools/imapobj.hxx
@@ -96,7 +96,7 @@ public:
static rtl_TextEncoding nActualTextEncoding;
- IMapObject() {};
+ IMapObject();
IMapObject( const String& rURL,
const String& rAltText,
const String& rDesc,
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index d820dce097ed..f00cf45be0e6 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -78,6 +78,9 @@ WinBits FileControl::ImplInitStyle( WinBits nStyle )
maButton.SetStyle( (maButton.GetStyle()|WB_NOTABSTOP)&(~WB_TABSTOP) );
}
+ const WinBits nAlignmentStyle = ( WB_TOP | WB_VCENTER | WB_BOTTOM );
+ maEdit.SetStyle( ( maEdit.GetStyle() & ~nAlignmentStyle ) | ( nStyle & nAlignmentStyle ) );
+
if ( !(nStyle & WB_NOGROUP) )
nStyle |= WB_GROUP;
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index dedb5b2d7143..74cfe7b1286a 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -59,7 +59,7 @@ void ImplFillPrnDlgListBox( const Printer* pPrinter,
}
pBox->Enable( nCount != 0 );
- pPropBtn->Enable( pPrinter->HasSupport( SUPPORT_SETUPDIALOG ) );
+ pPropBtn->Show( pPrinter->HasSupport( SUPPORT_SETUPDIALOG ) );
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx
index d570dd34e50f..9e0e3ba43d54 100644
--- a/svtools/source/filter.vcl/filter/filter2.cxx
+++ b/svtools/source/filter.vcl/filter/filter2.cxx
@@ -471,7 +471,8 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
// Groesse des verbleibenden Puffers ermitteln
if ( bLinked )
- nMax = ( (SvMemoryStream&) rStm ).GetSize() - 16;
+ nMax = static_cast< SvMemoryStream& >(rStm).GetEndOfData()
+ - 16;
else
nMax = DATA_SIZE - 16;
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index df7760f7931b..b0aaee113c20 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -64,6 +64,12 @@ UINT16 IMapObject::nActualTextEncoding = (UINT16) RTL_TEXTENCODING_DONTKNOW;
#pragma optimize ( "", off )
#endif
+IMapObject::IMapObject()
+ : bActive( false )
+ , nReadVersion( 0 )
+{
+}
+
IMapObject::IMapObject( const String& rURL, const String& rAltText, const String& rDesc,
const String& rTarget, const String& rName, BOOL bURLActive )
: aURL( rURL )
@@ -72,6 +78,7 @@ IMapObject::IMapObject( const String& rURL, const String& rAltText, const String
, aTarget( rTarget )
, aName( rName )
, bActive( bURLActive )
+, nReadVersion( 0 )
{
}
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index a1ff1ad2ac3e..9c7c3eec33d1 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -549,86 +549,6 @@ void VCLXMultiLineEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
}
// ----------------------------------------------------
-// class VCLXFileDialog
-// ----------------------------------------------------
-/*
-VCLXFileDialog::VCLXFileDialog()
-{
-}
-
-VCLXFileDialog::~VCLXFileDialog()
-{
-}
-
-::com::sun::star::uno::Any VCLXFileDialog::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
-{
- ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
- SAL_STATIC_CAST( ::com::sun::star::awt::XXX*, this ) );
- return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXFileDialog )
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XXX>* ) NULL )
-IMPL_XTYPEPROVIDER_END
-
-void VCLXFileDialog::setPath( const ::rtl::OUString& rPath )
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- FileDialog* pDlg = (FileDialog*)GetWindow();
- if ( pDlg )
- pDlg->SetPath( ::rtl::OUStringToOString( rPath, CHARSET_SYSTEM ) );
-}
-
-::rtl::OUString VCLXFileDialog::getPath()
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- ::rtl::OUString aPath;
- FileDialog* pDlg = (FileDialog*)GetWindow();
- if ( pDlg )
- aPath = StringToOUString( pDlg->GetPath(), CHARSET_SYSTEM );
- return aPath;
-}
-
-void VCLXFileDialog::setFilters( const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rFilterNames, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rMasks )
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- FileDialog* pDlg = (FileDialog*)GetWindow();
- if ( pDlg )
- {
- sal_uInt32 nFlts = rFilterNames.getLength();
- for ( sal_uInt32 n = 0; n < nFlts; n++ )
- pDlg->AddFilter(
- ::rtl::OUStringToOString( rFilterNames.getConstArray()[n], CHARSET_SYSTEM ),
- ::rtl::OUStringToOString( rMasks.getConstArray()[n], CHARSET_SYSTEM ) );
- }
-}
-
-void VCLXFileDialog::setCurrentFilter( const ::rtl::OUString& rFilterName )
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- FileDialog* pDlg = (FileDialog*)GetWindow();
- if ( pDlg )
- pDlg->SetCurFilter( ::rtl::OUStringToOString( rFilterName, CHARSET_SYSTEM ) );
-}
-
-::rtl::OUString VCLXFileDialog::getCurrentFilter()
-{
- ::vos::OGuard aGuard( GetMutex() );
-
- ::rtl::OUString aFilter;
- FileDialog* pDlg = (FileDialog*)GetWindow();
- if ( pDlg )
- aFilter = StringToOUString( pDlg->GetCurFilter(), CHARSET_SYSTEM );
- return aFilter;
-}
-*/
-
-// ----------------------------------------------------
// class VCLXFileControl
// ----------------------------------------------------
VCLXFileControl::VCLXFileControl() : maTextListeners( *this )
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
index 5c3acad950e6..ef445ab11f82 100644
--- a/svx/inc/fmhelp.hrc
+++ b/svx/inc/fmhelp.hrc
@@ -33,6 +33,10 @@
// include -----------------------------------------------------------
#include <svl/solar.hrc>
+// in solar.hrc
+//#define HID_FORMS_START (HID_LIB_START+4000)
+//#define HID_FORMS_END (HID_LIB_START+4999)
+
// Help-Ids --------------------------------------------------------------
#define HID_DLG_DBMSG ( HID_FORMS_START + 1)
#define HID_FORM_NAVIGATOR ( HID_FORMS_START + 2)
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 4c05d1922247..fe961050250e 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -57,7 +57,7 @@
#include "basic/sbxvar.hxx"
#include "boost/scoped_ptr.hpp"
#include "boost/shared_ptr.hpp"
-#include "boost/spirit/core.hpp"
+#include "boost/spirit/include/classic_core.hpp"
#include "bootstrp/sstring.hxx"
#include "com/sun/star/accessibility/AccessibleEventId.hpp"
#include "com/sun/star/accessibility/AccessibleEventObject.hpp"
@@ -263,7 +263,7 @@
#include "com/sun/star/form/XDatabaseParameterListener.hpp"
#include "com/sun/star/form/XForm.hpp"
#include "com/sun/star/form/XFormComponent.hpp"
-#include "com/sun/star/form/XFormController.hpp"
+#include "com/sun/star/form/runtime/XFormController.hpp"
#include "com/sun/star/form/XFormControllerListener.hpp"
#include "com/sun/star/form/XFormsSupplier.hpp"
#include "com/sun/star/form/XFormsSupplier2.hpp"
diff --git a/svx/inc/svx/fmdpage.hxx b/svx/inc/svx/fmdpage.hxx
index f71cc4751a63..a9f2783d643a 100644
--- a/svx/inc/svx/fmdpage.hxx
+++ b/svx/inc/svx/fmdpage.hxx
@@ -31,11 +31,6 @@
#define _SVX_FMDPAGE_HXX
#include <com/sun/star/form/XFormsSupplier2.hpp>
-#include <com/sun/star/form/XForm.hpp>
-#include <com/sun/star/form/XImageProducerSupplier.hpp>
-#include <com/sun/star/form/XFormController.hpp>
-#include <com/sun/star/form/XFormComponent.hpp>
-#include <com/sun/star/form/XFormControllerListener.hpp>
#include <svx/unopage.hxx>
#include <comphelper/uno3.hxx>
#include "svx/svxdllapi.h"
diff --git a/svx/inc/svx/fmgridcl.hxx b/svx/inc/svx/fmgridcl.hxx
index f6b533513784..f8e04c4c405c 100644
--- a/svx/inc/svx/fmgridcl.hxx
+++ b/svx/inc/svx/fmgridcl.hxx
@@ -31,13 +31,8 @@
#define _SVX_FMGRIDCL_HXX
#include <com/sun/star/container/XIndexContainer.hpp>
-
-#ifndef _COM_SUN_STAR_FORM_XINDEXCONTAINER_HPP_
-#include <com/sun/star/container/XIndexContainer.hpp>
-#endif
#include <com/sun/star/container/XNameContainer.hpp>
-// alles nur fuer stl
#include <svx/gridctrl.hxx>
#include <svtools/transfer.hxx>
#include "svx/svxdllapi.h"
diff --git a/svx/inc/svx/fmshell.hxx b/svx/inc/svx/fmshell.hxx
index f5d1c7b0c615..9f180156367f 100644
--- a/svx/inc/svx/fmshell.hxx
+++ b/svx/inc/svx/fmshell.hxx
@@ -58,7 +58,9 @@ class SdrUnoObj;
namespace com { namespace sun { namespace star { namespace form {
class XForm;
- class XFormController;
+ namespace runtime {
+ class XFormController;
+ }
} } } }
//========================================================================
@@ -147,7 +149,7 @@ public:
const OutputDevice& _rDevice,
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _out_rxControl
) const;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > GetFormController(
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController(
const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
const SdrView& _rView,
const OutputDevice& _rDevice
diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx
index 02e063e0314d..b74f00aa236c 100644
--- a/svx/inc/svx/fmtools.hxx
+++ b/svx/inc/svx/fmtools.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmtools.hxx,v $
- * $Revision: 1.27 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,6 +27,8 @@
#ifndef _SVX_FMTOOLS_HXX
#define _SVX_FMTOOLS_HXX
+#include "svx/svxdllapi.h"
+
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
@@ -48,7 +47,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
-#include <com/sun/star/frame/XInterceptorInfo.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
@@ -66,38 +64,18 @@
#include <com/sun/star/awt/FontStrikeout.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <vcl/wintypes.hxx>
-#include <vos/mutex.hxx>
-
-#ifndef _SVSTDARR_ULONGS
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
-#endif
-#include <sfx2/ctrlitem.hxx>
-#include <tools/link.hxx>
-#include <tools/date.hxx>
-#include <tools/time.hxx>
-#include <tools/datetime.hxx>
-
-//#include "fmprop.hrc"
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XObjectOutputStream.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
-#include <cppuhelper/interfacecontainer.h>
-#include <cppuhelper/compbase2.hxx>
-#include <cppuhelper/compbase3.hxx>
+
+#include <vcl/wintypes.hxx>
#include <cppuhelper/weakref.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/component.hxx>
-
-#include <svx/svxdllapi.h>
#include <set>
@@ -114,24 +92,7 @@ SVX_DLLPUBLIC void displayException(const ::com::sun::star::sdb::SQLContext&, Wi
void displayException(const ::com::sun::star::sdb::SQLErrorEvent&, Window* _pParent = NULL);
void displayException(const ::com::sun::star::uno::Any&, Window* _pParent = NULL);
-#define DATA_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) )
-#define FILTER_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) )
-
-// Kopieren von Persistenten Objecten
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> cloneUsingProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj);
-
-sal_Int32 findPos(const ::rtl::OUString& aStr, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList);
-
-// Suchen in einer Indexliste nach einem Element
-sal_Bool searchElement(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement);
-
sal_Int32 getElementPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement);
-String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement);
-String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rTopLevelElement);
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> getElementFromAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xParent, const String& _rRelativePath);
-
-
-::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> getXModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xIface);
SVX_DLLPUBLIC ::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel);
@@ -236,10 +197,8 @@ protected:
void setAdapter(FmXDisposeMultiplexer* pAdapter);
};
-typedef ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener> FmXDisposeMultiplexer_x;
//==============================================================================
-
class FmXDisposeMultiplexer :public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener>
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xObject;
@@ -258,119 +217,10 @@ public:
// ==================================================================
-//========================================================================
-//= dispatch interception helper classes
-//========================================================================
-
-//------------------------------------------------------------------------
-//- FmDispatchInterceptor
-//------------------------------------------------------------------------
-class FmDispatchInterceptor
-{
-public:
- FmDispatchInterceptor() { }
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> interceptedQueryDispatch(sal_uInt16 _nId,
- const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException ) = 0;
-
- virtual ::osl::Mutex* getInterceptorMutex() = 0;
-};
-
-//------------------------------------------------------------------------
-//- FmXDispatchInterceptorImpl
-//------------------------------------------------------------------------
-typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::frame::XDispatchProviderInterceptor
- , ::com::sun::star::lang::XEventListener
- , ::com::sun::star::frame::XInterceptorInfo
- > FmXDispatchInterceptorImpl_BASE;
-
-class FmXDispatchInterceptorImpl : public FmXDispatchInterceptorImpl_BASE
-{
- ::osl::Mutex m_aFallback;
-
- // the component which's dispatches we're intercepting
- ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProviderInterception>
- m_xIntercepted;
- sal_Bool m_bListening;
-
- // the real interceptor
- FmDispatchInterceptor* m_pMaster;
-
- // chaining
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xSlaveDispatcher;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xMasterDispatcher;
-
- // our id
- sal_Int16 m_nId;
-
- ::com::sun::star::uno::Sequence< ::rtl::OUString >
- m_aInterceptedURLSchemes;
-
- virtual ~FmXDispatchInterceptorImpl();
-
-public:
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> getIntercepted() const { return m_xIntercepted; }
-
-public:
- FmXDispatchInterceptorImpl(
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _rToIntercept,
- FmDispatchInterceptor* _pMaster,
- sal_Int16 _nId,
- ::com::sun::star::uno::Sequence< ::rtl::OUString > _rInterceptedSchemes /// if not empty, this will be used for getInterceptedURLs
- );
-
- // StarOne
- DECLARE_UNO3_DEFAULTS(FmXDispatchInterceptorImpl, FmXDispatchInterceptorImpl_BASE);
- // virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
-
-
- // ::com::sun::star::frame::XDispatchProvider
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::frame::XDispatchProviderInterceptor
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setSlaveDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewDispatchProvider ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setMasterDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewSupplier ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::frame::XInterceptorInfo
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getInterceptedURLs( ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::lang::XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
-
- // OComponentHelper
- virtual void SAL_CALL disposing();
-
-protected:
- void ImplDetach();
-
- ::osl::Mutex& getAccessSafety()
- {
- if (m_pMaster && m_pMaster->getInterceptorMutex())
- return *m_pMaster->getInterceptorMutex();
- return m_aFallback;
- }
-};
-
-//==================================================================
-// ...
-//==================================================================
-::rtl::OUString getServiceNameByControlType(sal_Int16 nType);
- // get a service name to create a model of the given type (OBJ_FM_...)
sal_Int16 getControlTypeByObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>& _rxObject);
// get the object type (OBJ_FM_...) from the services the object supports
-void TransferEventScripts(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor>& rTransferIfAvailable);
-
-sal_Int16 GridView2ModelPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nViewPos);
-
//==================================================================
-sal_Bool isLoadable(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xLoad);
sal_Bool isRowSetAlive(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxRowSet);
// checks if the ::com::sun::star::sdbcx::XColumnsSupplier provided by _rxRowSet supllies any columns
diff --git a/svx/inc/svx/fmview.hxx b/svx/inc/svx/fmview.hxx
index c79748ddb94f..3b965967ed42 100644
--- a/svx/inc/svx/fmview.hxx
+++ b/svx/inc/svx/fmview.hxx
@@ -54,7 +54,9 @@ namespace svx {
class SdrUnoObj;
namespace com { namespace sun { namespace star { namespace form {
class XForm;
- class XFormController;
+ namespace runtime {
+ class XFormController;
+ }
} } } }
class SVX_DLLPUBLIC FmFormView : public E3dView
@@ -125,7 +127,7 @@ public:
/** returns the form controller for a given form and a given device
*/
- SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >
+ SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >
GetFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;
// SdrView
diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx
index 632ca6ea0805..834ea17eaa1f 100644
--- a/svx/inc/svx/gridctrl.hxx
+++ b/svx/inc/svx/gridctrl.hxx
@@ -584,9 +584,10 @@ protected:
sal_Int32 GetSeekPos() const {return m_nSeekPos;}
sal_Int32 GetTotalCount() const {return m_nTotalCount;}
- const DbGridRowRef& GetEmptyRow() const {return m_xEmptyRow;}
- const DbGridRowRef& GetSeekRow() const {return m_xSeekRow;}
- CursorWrapper* GetSeekCursor() const {return m_pSeekCursor;}
+ const DbGridRowRef& GetEmptyRow() const { return m_xEmptyRow; }
+ const DbGridRowRef& GetSeekRow() const { return m_xSeekRow; }
+ const DbGridRowRef& GetPaintRow() const { return m_xPaintRow; }
+ CursorWrapper* GetSeekCursor() const { return m_pSeekCursor; }
void ConnectToFields();
void DisconnectFromFields();
diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
index f6cc2abf32f6..109f86fe458b 100644
--- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -99,6 +99,11 @@ namespace sdr { namespace contact {
*/
virtual void ActionChanged();
+ /** to be called when any aspect of the control which requires view updates changed
+ */
+ struct ImplAccess { friend class ViewObjectContactOfUnoControl_Impl; friend class ViewObjectContactOfUnoControl; private: ImplAccess() { } };
+ void onControlChangedOrModified( ImplAccess ) { impl_onControlChangedOrModified(); }
+
protected:
~ViewObjectContactOfUnoControl();
@@ -107,6 +112,8 @@ namespace sdr { namespace contact {
// visibility check
virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const;
+ /// to be called when any aspect of the control which requires view updates changed
+ void impl_onControlChangedOrModified();
private:
ViewObjectContactOfUnoControl(); // never implemented
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx
index 4f00da997361..238f6953af7a 100644
--- a/svx/inc/svx/svdograf.hxx
+++ b/svx/inc/svx/svdograf.hxx
@@ -144,6 +144,7 @@ public:
void SetGraphicObject( const GraphicObject& rGrfObj );
const GraphicObject& GetGraphicObject( bool bForceSwapIn = false) const;
+ void NbcSetGraphic(const Graphic& rGrf);
void SetGraphic(const Graphic& rGrf);
const Graphic& GetGraphic() const;
diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx
index 940133da5568..014afacb0706 100644..100755
--- a/svx/inc/svx/svdpntv.hxx
+++ b/svx/inc/svx/svdpntv.hxx
@@ -215,10 +215,11 @@ protected:
// is this a preview renderer?
unsigned mbPreviewRenderer : 1;
- // flags for calc for suppressing OLE, CHART or DRAW objects
+ // flags for calc and sw for suppressing OLE, CHART or DRAW objects
unsigned mbHideOle : 1;
unsigned mbHideChart : 1;
- unsigned mbHideDraw : 1;
+ unsigned mbHideDraw : 1; // hide draw objects other than form controls
+ unsigned mbHideFormControl : 1; // hide form controls only
public:
// #114898#
@@ -433,13 +434,15 @@ public:
sal_Bool IsPreviewRenderer() const { return (sal_Bool )mbPreviewRenderer; }
void SetPreviewRenderer(bool bOn) { if((unsigned)bOn != mbPreviewRenderer) { mbPreviewRenderer=bOn; }}
- // access methods for calc hide object modes
+ // access methods for calc and sw hide object modes
bool getHideOle() const { return mbHideOle; }
bool getHideChart() const { return mbHideChart; }
bool getHideDraw() const { return mbHideDraw; }
+ bool getHideFormControl() const { return mbHideFormControl; }
void setHideOle(bool bNew) { if(bNew != (bool)mbHideOle) mbHideOle = bNew; }
void setHideChart(bool bNew) { if(bNew != (bool)mbHideChart) mbHideChart = bNew; }
void setHideDraw(bool bNew) { if(bNew != (bool)mbHideDraw) mbHideDraw = bNew; }
+ void setHideFormControl(bool bNew) { if(bNew != (bool)mbHideFormControl) mbHideFormControl = bNew; }
void SetGridCoarse(const Size& rSiz) { aGridBig=rSiz; }
void SetGridFine(const Size& rSiz) { aGridFin=rSiz; if (aGridFin.Height()==0) aGridFin.Height()=aGridFin.Width(); if (bGridVisible) InvalidateAllWin(); } // #40479#
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 58455f48589e..513a3aa57a80 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -33,7 +33,7 @@
// include ---------------------------------------------------------------
#include <sfx2/viewsh.hxx> // SfxViewShell
-#include <sfx2/printer.hxx> // SfxPrinter
+#include <sfx2/printer.hxx> // Printer
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
#include <unicode/uchar.h>
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 7a710c19cbad..35506d7d5ef4 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -35,6 +35,7 @@
#include "fmgridif.hxx"
#include "fmitems.hxx"
#include "fmprop.hrc"
+#include "svx/fmtools.hxx"
#include "fmresids.hrc"
#include "fmservs.hxx"
#include "fmurl.hxx"
@@ -435,6 +436,7 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ )
// diese Datentypen koennen im Gridcontrol nicht verarbeitet werden
switch (nDataType)
{
+ case DataType::BLOB:
case DataType::LONGVARBINARY:
case DataType::BINARY:
case DataType::VARBINARY:
@@ -1724,6 +1726,7 @@ void FmGridControl::InitColumnByField(
sal_Bool bIllegalType = sal_False;
switch ( nDataType )
{
+ case DataType::BLOB:
case DataType::LONGVARBINARY:
case DataType::BINARY:
case DataType::VARBINARY:
@@ -1768,14 +1771,18 @@ void FmGridControl::InitColumnsByFields(const Reference< ::com::sun::star::conta
Reference< XIndexContainer > xColumns( GetPeer()->getColumns() );
Reference< XNameAccess > xFieldsAsNames( _rxFields, UNO_QUERY );
- // Einfuegen mu� sich an den Column Positionen orientieren
+ // Einfuegen muss sich an den Column Positionen orientieren
for (sal_Int32 i = 0; i < xColumns->getCount(); i++)
{
DbGridColumn* pCol = GetColumns().GetObject(i);
- Reference< XPropertySet > xColumnModel;
- ::cppu::extractInterface( xColumnModel, xColumns->getByIndex( i ) );
+ OSL_ENSURE(pCol,"No grid column!");
+ if ( pCol )
+ {
+ Reference< XPropertySet > xColumnModel;
+ ::cppu::extractInterface( xColumnModel, xColumns->getByIndex( i ) );
- InitColumnByField( pCol, xColumnModel, xFieldsAsNames, _rxFields );
+ InitColumnByField( pCol, xColumnModel, xFieldsAsNames, _rxFields );
+ }
}
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 7a0c7c0378bb..ba35a289b893 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -42,6 +42,7 @@
#include "svx/fmgridcl.hxx"
#include "svx/svxids.hrc"
+/** === begin UNO includes === **/
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
@@ -52,6 +53,8 @@
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+/** === end UNO includes === **/
#include <comphelper/container.hxx>
#include <comphelper/enumhelper.hxx>
@@ -66,6 +69,7 @@
using namespace ::svxform;
using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::view;
@@ -1118,7 +1122,7 @@ namespace fmgridif
{
const ::rtl::OUString getDataModeIdentifier()
{
- static ::rtl::OUString s_sDataModeIdentifier = DATA_MODE;
+ static ::rtl::OUString s_sDataModeIdentifier = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) );
return s_sDataModeIdentifier;
}
}
@@ -1390,8 +1394,8 @@ Sequence< Any > SAL_CALL FmXGridPeer::queryFieldData( sal_Int32 nRow, const Type
// don't use GetCurrentRow as this isn't affected by the above SeekRow
// FS - 30.09.99 - 68644
- DbGridRowRef aRow = pGrid->GetSeekRow();
- DBG_ASSERT(aRow.Is(), "FmXGridPeer::queryFieldData : invalid current Row !");
+ DbGridRowRef xPaintRow = pGrid->GetPaintRow();
+ ENSURE_OR_THROW( xPaintRow.Is(), "invalid paint row" );
// die Columns des Controls brauche ich fuer GetFieldText
DbGridColumns aColumns = pGrid->GetColumns();
@@ -1413,39 +1417,40 @@ Sequence< Any > SAL_CALL FmXGridPeer::queryFieldData( sal_Int32 nRow, const Type
// don't use GetCurrentFieldValue to determine the field content as this isn't affected by the above SeekRow
// FS - 30.09.99 - 68644
pCol = aColumns.GetObject(nModelPos);
- const DbGridRowRef xRow = pGrid->GetSeekRow();
- xFieldContent = (xRow.Is() && xRow->HasField(pCol->GetFieldPos())) ? xRow->GetField(pCol->GetFieldPos()).getColumn() : Reference< ::com::sun::star::sdb::XColumn > ();
+ xFieldContent = xPaintRow->HasField( pCol->GetFieldPos() )
+ ? xPaintRow->GetField( pCol->GetFieldPos() ).getColumn()
+ : Reference< XColumn > ();
+
+ if ( !xFieldContent.is() )
+ continue;
- if (xFieldContent.is())
+ if (bRequestedAsAny)
{
- if (bRequestedAsAny)
- {
- Reference< XPropertySet > xFieldSet(xFieldContent, UNO_QUERY);
- pReturnArray[i] = xFieldSet->getPropertyValue(FM_PROP_VALUE);
- }
- else
+ Reference< XPropertySet > xFieldSet(xFieldContent, UNO_QUERY);
+ pReturnArray[i] = xFieldSet->getPropertyValue(FM_PROP_VALUE);
+ }
+ else
+ {
+ switch (xType.getTypeClass())
{
- switch (xType.getTypeClass())
+ // Strings werden direkt ueber das GetFieldText abgehandelt
+ case TypeClass_STRING :
{
- // Strings werden direkt ueber das GetFieldText abgehandelt
- case TypeClass_STRING :
- {
- String sText = aColumns.GetObject(nModelPos)->GetCellText(aRow, pGrid->getNumberFormatter());
- pReturnArray[i] <<= ::rtl::OUString(sText);
- }
- break;
- // alles andere wird an der DatabaseVariant erfragt
- case TypeClass_FLOAT : pReturnArray[i] <<= xFieldContent->getFloat(); break;
- case TypeClass_DOUBLE : pReturnArray[i] <<= xFieldContent->getDouble(); break;
- case TypeClass_SHORT : pReturnArray[i] <<= (sal_Int16)xFieldContent->getShort(); break;
- case TypeClass_LONG : pReturnArray[i] <<= (sal_Int32)xFieldContent->getLong(); break;
- case TypeClass_UNSIGNED_SHORT: pReturnArray[i] <<= (sal_uInt16)xFieldContent->getShort(); break;
- case TypeClass_UNSIGNED_LONG : pReturnArray[i] <<= (sal_uInt32)xFieldContent->getLong(); break;
- case TypeClass_BOOLEAN : ::comphelper::setBOOL(pReturnArray[i],xFieldContent->getBoolean()); break;
- default:
- {
- throw IllegalArgumentException();
- }
+ String sText = aColumns.GetObject(nModelPos)->GetCellText( xPaintRow, pGrid->getNumberFormatter() );
+ pReturnArray[i] <<= ::rtl::OUString(sText);
+ }
+ break;
+ // alles andere wird an der DatabaseVariant erfragt
+ case TypeClass_FLOAT : pReturnArray[i] <<= xFieldContent->getFloat(); break;
+ case TypeClass_DOUBLE : pReturnArray[i] <<= xFieldContent->getDouble(); break;
+ case TypeClass_SHORT : pReturnArray[i] <<= (sal_Int16)xFieldContent->getShort(); break;
+ case TypeClass_LONG : pReturnArray[i] <<= (sal_Int32)xFieldContent->getLong(); break;
+ case TypeClass_UNSIGNED_SHORT : pReturnArray[i] <<= (sal_uInt16)xFieldContent->getShort(); break;
+ case TypeClass_UNSIGNED_LONG : pReturnArray[i] <<= (sal_uInt32)xFieldContent->getLong(); break;
+ case TypeClass_BOOLEAN : ::comphelper::setBOOL(pReturnArray[i],xFieldContent->getBoolean()); break;
+ default:
+ {
+ throw IllegalArgumentException();
}
}
}
@@ -1724,6 +1729,8 @@ void FmXGridPeer::removeColumnListeners(const Reference< XPropertySet >& xCol)
//------------------------------------------------------------------------------
void FmXGridPeer::setColumns(const Reference< XIndexContainer >& Columns) throw( RuntimeException )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
FmGridControl* pGrid = static_cast< FmGridControl* >( GetWindow() );
if (m_xColumns.is())
@@ -2457,7 +2464,7 @@ void FmXGridPeer::setMode(const ::rtl::OUString& Mode) throw( NoSupportException
m_aMode = Mode;
FmGridControl* pGrid = (FmGridControl*) GetWindow();
- if (Mode == FILTER_MODE)
+ if ( Mode == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) ) )
pGrid->SetFilterMode(sal_True);
else
{
@@ -2480,8 +2487,8 @@ void FmXGridPeer::setMode(const ::rtl::OUString& Mode) throw( NoSupportException
{
aModes.realloc(2);
::rtl::OUString* pModes = aModes.getArray();
- pModes[0] = DATA_MODE;
- pModes[1] = FILTER_MODE;
+ pModes[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) );
+ pModes[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) );
}
return aModes;
}
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index f4229b1bcb0c..c94a63c853f4 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -679,7 +679,15 @@ sal_Bool DbCellControl::Commit()
// lock the listening for value property changes
lockValueProperty();
// commit the content of the control into the model's value property
- sal_Bool bReturn = commitControl();
+ sal_Bool bReturn = sal_False;
+ try
+ {
+ bReturn = commitControl();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
// unlock the listening for value property changes
unlockValueProperty();
// outta here
diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx
index f56f8e0c7e86..a6ab95d28981 100644
--- a/svx/source/fmcomp/gridcols.cxx
+++ b/svx/source/fmcomp/gridcols.cxx
@@ -35,6 +35,7 @@
#include <comphelper/types.hxx>
#include "fmservs.hxx"
#include "svx/fmtools.hxx"
+using namespace ::com::sun::star::uno;
//------------------------------------------------------------------------------
const ::comphelper::StringSequence& getColumnTypes()
@@ -57,6 +58,36 @@ const ::comphelper::StringSequence& getColumnTypes()
return aColumnTypes;
}
+//------------------------------------------------------------------
+// Vergleichen von PropertyInfo
+extern "C" int
+#if defined( WNT )
+ __cdecl
+#endif
+#if defined( ICC ) && defined( OS2 )
+_Optlink
+#endif
+ NameCompare(const void* pFirst, const void* pSecond)
+{
+ return ((::rtl::OUString*)pFirst)->compareTo(*(::rtl::OUString*)pSecond);
+}
+
+namespace
+{
+ //------------------------------------------------------------------------------
+ sal_Int32 lcl_findPos(const ::rtl::OUString& aStr, const Sequence< ::rtl::OUString>& rList)
+ {
+ const ::rtl::OUString* pStrList = rList.getConstArray();
+ ::rtl::OUString* pResult = (::rtl::OUString*) bsearch(&aStr, (void*)pStrList, rList.getLength(), sizeof(::rtl::OUString),
+ &NameCompare);
+
+ if (pResult)
+ return (pResult - pStrList);
+ else
+ return -1;
+ }
+}
+
//------------------------------------------------------------------------------
sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName)
{
@@ -79,7 +110,7 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName)
: aModelName.copy(aCompatibleModelPrefix.getLength());
const ::comphelper::StringSequence& rColumnTypes = getColumnTypes();
- nTypeId = findPos(aColumnType, rColumnTypes);
+ nTypeId = lcl_findPos(aColumnType, rColumnTypes);
}
return nTypeId;
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 49f0bdfafda0..173354958150 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -874,7 +874,7 @@ void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor)
}
catch(SQLException&)
{
- OSL_ENSURE(0,"SQLException catched while getting the bookmark");
+ DBG_UNHANDLED_EXCEPTION();
m_aBookmark = Any();
m_eStatus = GRS_INVALID;
m_bIsNew = sal_False;
@@ -1787,30 +1787,32 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId)
sal_Bool DbGridControl::SeekRow(long nRow)
{
// in filter mode or in insert only mode we don't have any cursor!
- if (SeekCursor(nRow))
+ if ( !SeekCursor( nRow ) )
+ return sal_False;
+
+ if ( IsFilterMode() )
{
- if (m_pSeekCursor)
- {
- // on the current position we have to take the current row for display as we want
- // to have the most recent values for display
- if ((nRow == m_nCurrentPos) && getDisplaySynchron())
- m_xPaintRow = m_xCurrentRow;
- // seek to the empty insert row
- else if (IsInsertionRow(nRow))
- m_xPaintRow = m_xEmptyRow;
- else
- {
- m_xSeekRow->SetState(m_pSeekCursor, sal_True);
- m_xPaintRow = m_xSeekRow;
- }
- }
- else if (IsFilterMode())
- {
- DBG_ASSERT(IsFilterRow(nRow), "DbGridControl::SeekRow(): No filter row, wrong mode");
+ DBG_ASSERT( IsFilterRow( nRow ), "DbGridControl::SeekRow(): No filter row, wrong mode" );
+ m_xPaintRow = m_xEmptyRow;
+ }
+ else
+ {
+ // on the current position we have to take the current row for display as we want
+ // to have the most recent values for display
+ if ( ( nRow == m_nCurrentPos ) && getDisplaySynchron() )
+ m_xPaintRow = m_xCurrentRow;
+ // seek to the empty insert row
+ else if ( IsInsertionRow( nRow ) )
m_xPaintRow = m_xEmptyRow;
+ else
+ {
+ m_xSeekRow->SetState( m_pSeekCursor, sal_True );
+ m_xPaintRow = m_xSeekRow;
}
- DbGridControl_Base::SeekRow(nRow);
}
+
+ DbGridControl_Base::SeekRow(nRow);
+
return m_nSeekPos >= 0;
}
//------------------------------------------------------------------------------
@@ -2382,7 +2384,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute)
// da der letzte Datensatz bereits erreicht wurde!
if (nRow == m_nCurrentPos)
{
- // auf die aktuelle Zeile bewegt, dann mu� kein abgleich gemacht werden, wenn
+ // auf die aktuelle Zeile bewegt, dann muß kein abgleich gemacht werden, wenn
// gerade ein Datensatz eingefuegt wird
m_nSeekPos = nRow;
}
diff --git a/svx/source/form/confirmdelete.cxx b/svx/source/form/confirmdelete.cxx
deleted file mode 100644
index 819677c3f495..000000000000
--- a/svx/source/form/confirmdelete.cxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: confirmdelete.cxx,v $
- * $Revision: 1.10 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include "confirmdelete.hxx"
-#include <svx/dialmgr.hxx>
-#ifndef _SVX_FMHELP_HRC
-#include "fmhelp.hrc"
-#endif
-#ifndef _SVX_FMRESIDS_HRC
-#include "fmresids.hrc"
-#endif
-#include <unotools/configmgr.hxx>
-#include <vcl/msgbox.hxx>
-
-//........................................................................
-namespace svxform
-{
-//........................................................................
-
-#define BORDER_HEIGHT 6 // default distance control-dialog
-#define BORDER_WIDTH 6 // default distance control-dialog
-
- using namespace ::com::sun::star::uno;
-
- //====================================================================
- //= class ConfirmDeleteDialog
- //====================================================================
- //------------------------------------------------------------------------------
- ConfirmDeleteDialog::ConfirmDeleteDialog(Window* pParent, const String& _rTitle)
- :ButtonDialog(pParent, WB_HORZ | WB_STDDIALOG)
- ,m_aInfoImage (this)
- ,m_aTitle (this, WB_WORDBREAK | WB_LEFT)
- ,m_aMessage (this, WB_WORDBREAK | WB_LEFT)
- {
- String sMessage(SVX_RES(RID_STR_DELETECONFIRM));
-
- // Changed as per BugID 79541 Branding/Configuration
- Any aProductName = ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME);
- ::rtl::OUString sProductName;
- aProductName >>= sProductName;
-
- String aTitle = sProductName;
- aProductName = ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTVERSION);
- aProductName >>= sProductName;
- aTitle.AppendAscii(" ");
- aTitle += String(sProductName);
- SetText(aTitle);
-
- SetHelpId(HID_DLG_DBMSG);
- SetSizePixel(LogicToPixel(Size(220, 30),MAP_APPFONT));
-
- m_aInfoImage.SetPosSizePixel(LogicToPixel(Point(6, 6),MAP_APPFONT),
- LogicToPixel(Size(20, 20),MAP_APPFONT));
- m_aInfoImage.Show();
-
- m_aTitle.SetPosSizePixel(LogicToPixel(Point(45, 6),MAP_APPFONT),
- LogicToPixel(Size(169, 20),MAP_APPFONT));
-
- Font aFont = m_aTitle.GetFont();
- aFont.SetWeight(WEIGHT_SEMIBOLD);
- m_aTitle.SetFont(aFont);
- m_aTitle.Show();
-
- m_aMessage.SetPosSizePixel(LogicToPixel(Point(45, 29),MAP_APPFONT),
- LogicToPixel(Size(169, 1),MAP_APPFONT));
- m_aMessage.Show();
-
- // Image festlegen
- m_aInfoImage.SetImage(WarningBox::GetStandardImage());
-
- // Title setzen
- m_aTitle.SetText(_rTitle);
-
- // Ermitteln der Hoehe des Textfeldes und des Dialogs
- Size aBorderSize = LogicToPixel(Size(BORDER_WIDTH, BORDER_HEIGHT),MAP_APPFONT);
- Rectangle aDlgRect(GetPosPixel(),GetSizePixel());
- Rectangle aMessageRect(m_aMessage.GetPosPixel(),m_aMessage.GetSizePixel());
- Rectangle aTextRect =
- GetTextRect(aMessageRect, sMessage, TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE | TEXT_DRAW_LEFT);
-
- long nHText = aTextRect.Bottom() > aMessageRect.Bottom() ? aTextRect.Bottom() - aMessageRect.Bottom() : 0;
-
- aDlgRect.Bottom() += nHText + 2 * aBorderSize.Height();
- aMessageRect.Bottom() += nHText;
-
- // Dialog anpassen
- SetSizePixel(aDlgRect.GetSize());
- SetPageSizePixel(aDlgRect.GetSize());
-
- // Message Text anpassen und setzen
- m_aMessage.SetSizePixel(aMessageRect.GetSize());
- m_aMessage.SetText(sMessage);
-
- // Buttons anlegen
- AddButton(BUTTON_YES, BUTTONID_YES, 0);
- AddButton(BUTTON_NO, BUTTONID_NO, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
- }
-
- //------------------------------------------------------------------------------
- ConfirmDeleteDialog::~ConfirmDeleteDialog()
- {
- }
-
-//........................................................................
-} // namespace svxform
-//........................................................................
-
-
-
diff --git a/svx/source/form/delayedevent.cxx b/svx/source/form/delayedevent.cxx
index c6bce8efec98..a185ef04d389 100644
--- a/svx/source/form/delayedevent.cxx
+++ b/svx/source/form/delayedevent.cxx
@@ -5,10 +5,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
-* $RCSfile: delayedevent.cxx,v $
-*
-* $Revision: 1.1.2.1 $
-*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index b9ef8224a9ef..f3a5a67d39e6 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -30,50 +30,41 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#ifndef _SVX_FMRESIDS_HRC
-#include "fmresids.hrc"
-#endif
-#include "fmctrler.hxx"
-#include "filtnav.hxx"
-#include <com/sun/star/util/XNumberFormatter.hpp>
-#include <com/sun/star/form/XFormController.hpp>
-#include <fmexch.hxx>
-#include "fmitems.hxx"
-#ifndef _SVX_SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
-#ifndef _SVX_FMPROP_HRC
+#include "filtnav.hxx"
+#include "fmexch.hxx"
+#include "fmhelp.hrc"
+#include "fmitems.hxx"
#include "fmprop.hrc"
-#endif
+#include "fmresids.hrc"
+#include "gridcell.hxx"
-#ifndef _SVX_FMHELP_HRC
-#include "fmhelp.hrc"
-#endif
-#include <svx/dialmgr.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/objsh.hxx>
-#include <sfx2/objitem.hxx>
-#include <sfx2/request.hxx>
-#include <tools/shl.hxx>
+/** === begin UNO includes === **/
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+/** === end UNO includes === **/
-#ifndef _WRKWIN_HXX //autogen
-#include <vcl/wrkwin.hxx>
-#endif
-#include <svx/fmshell.hxx>
-#include <fmshimp.hxx>
-#include <fmservs.hxx>
+#include <comphelper/processfactory.hxx>
#include <svx/fmtools.hxx>
-#include <cppuhelper/implbase1.hxx>
#include <comphelper/property.hxx>
+#include <comphelper/sequence.hxx>
#include <comphelper/uno3.hxx>
#include <connectivity/dbtools.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <comphelper/sequence.hxx>
-#include "gridcell.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <fmservs.hxx>
+#include <fmshimp.hxx>
#include <rtl/logfile.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/objitem.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/request.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/fmshell.hxx>
+#include <svx/svxids.hrc>
+#include <tools/shl.hxx>
+#include <vcl/wrkwin.hxx>
#include <functional>
@@ -85,11 +76,6 @@
#define DROP_ACTION_TIMER_TICK_BASE 10
// das ist die Basis, mit der beide Angaben multipliziert werden (in ms)
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::beans;
using namespace ::svxform;
using namespace ::connectivity::simple;
using namespace ::connectivity;
@@ -100,6 +86,37 @@ namespace svxform
{
//........................................................................
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::awt::TextEvent;
+ using ::com::sun::star::container::XIndexAccess;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::form::runtime::XFormController;
+ using ::com::sun::star::form::runtime::XFilterController;
+ using ::com::sun::star::form::runtime::XFilterControllerListener;
+ using ::com::sun::star::form::runtime::FilterEvent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::form::XForm;
+ using ::com::sun::star::container::XChild;
+ using ::com::sun::star::awt::XControl;
+ using ::com::sun::star::sdbc::XConnection;
+ using ::com::sun::star::util::XNumberFormatsSupplier;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::util::XNumberFormatter;
+ using ::com::sun::star::sdbc::XRowSet;
+ using ::com::sun::star::lang::Locale;
+ using ::com::sun::star::sdb::SQLContext;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::awt::XTextComponent;
+ using ::com::sun::star::uno::Sequence;
+ /** === end UNO using === **/
+
//========================================================================
OFilterItemExchange::OFilterItemExchange()
{
@@ -141,8 +158,8 @@ TYPEINIT1(FmParentData, FmFilterData);
//------------------------------------------------------------------------
FmParentData::~FmParentData()
{
- for (::std::vector<FmFilterData*>::const_iterator i = m_aChilds.begin();
- i != m_aChilds.end(); i++)
+ for (::std::vector<FmFilterData*>::const_iterator i = m_aChildren.begin();
+ i != m_aChildren.end(); i++)
delete (*i);
}
@@ -168,16 +185,17 @@ Image FmFormItem::GetImage( BmpColorMode _eMode ) const
//========================================================================
TYPEINIT1(FmFilterItems, FmParentData);
//------------------------------------------------------------------------
-FmFilterItem* FmFilterItems::Find(const Reference< ::com::sun::star::awt::XTextComponent > & _xText) const
+FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterItems::Find" );
- for (::std::vector<FmFilterData*>::const_iterator i = m_aChilds.begin();
- i != m_aChilds.end(); ++i)
+ for ( ::std::vector< FmFilterData* >::const_iterator i = m_aChildren.begin();
+ i != m_aChildren.end();
+ ++i
+ )
{
- FmFilterItem* pCond = PTR_CAST(FmFilterItem, *i);
- DBG_ASSERT(pCond, "Wrong element in container");
- if (_xText == pCond->GetTextComponent())
- return pCond;
+ FmFilterItem* pCondition = PTR_CAST( FmFilterItem, *i );
+ DBG_ASSERT( pCondition, "FmFilterItems::Find: Wrong element in container!" );
+ if ( _nFilterComponentIndex == pCondition->GetComponentIndex() )
+ return pCondition;
}
return NULL;
}
@@ -185,7 +203,6 @@ FmFilterItem* FmFilterItems::Find(const Reference< ::com::sun::star::awt::XTextC
//------------------------------------------------------------------------
Image FmFilterItems::GetImage( BmpColorMode _eMode ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterItems::GetImage" );
static Image aImage;
static Image aImage_HC;
@@ -203,16 +220,15 @@ Image FmFilterItems::GetImage( BmpColorMode _eMode ) const
//========================================================================
TYPEINIT1(FmFilterItem, FmFilterData);
//------------------------------------------------------------------------
-FmFilterItem::FmFilterItem(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
- FmFilterItems* pParent,
- const ::rtl::OUString& aFieldName,
- const ::rtl::OUString& aText,
- const Reference< ::com::sun::star::awt::XTextComponent > & _xText)
+FmFilterItem::FmFilterItem( const Reference< XMultiServiceFactory >& _rxFactory,
+ FmFilterItems* pParent,
+ const ::rtl::OUString& aFieldName,
+ const ::rtl::OUString& aText,
+ const sal_Int32 _nComponentIndex )
:FmFilterData(_rxFactory,pParent, aText)
,m_aFieldName(aFieldName)
- ,m_xText(_xText)
+ ,m_nComponentIndex( _nComponentIndex )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterItems::FmFilterItem" );
}
//------------------------------------------------------------------------
@@ -262,17 +278,6 @@ public:
TYPEINIT1( FmFilterInsertedHint, FmFilterHint );
//========================================================================
-class FmFilterReplacedHint : public FmFilterHint
-{
-public:
- TYPEINFO();
- FmFilterReplacedHint(FmFilterData* pData)
- :FmFilterHint(pData){}
-
-};
-TYPEINIT1( FmFilterReplacedHint, FmFilterHint );
-
-//========================================================================
class FmFilterRemovedHint : public FmFilterHint
{
public:
@@ -315,243 +320,240 @@ TYPEINIT1( FmFilterCurrentChangedHint, SfxHint );
//========================================================================
// class FmFilterAdapter, Listener an den FilterControls
//========================================================================
-class FmFilterAdapter : public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XTextListener >
+class FmFilterAdapter : public ::cppu::WeakImplHelper1< XFilterControllerListener >
{
- FmFilterControls m_aFilterControls;
- FmFilterModel* m_pModel;
+ FmFilterModel* m_pModel;
+ Reference< XIndexAccess > m_xControllers;
public:
- FmFilterAdapter(FmFilterModel* pModel, const Reference< ::com::sun::star::container::XIndexAccess >& xControllers);
+ FmFilterAdapter(FmFilterModel* pModel, const Reference< XIndexAccess >& xControllers);
-// ::com::sun::star::lang::XEventListener
- virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException );
+// XEventListener
+ virtual void SAL_CALL disposing(const EventObject& Source) throw( RuntimeException );
-// ::com::sun::star::awt::XTextListener
- virtual void SAL_CALL textChanged(const ::com::sun::star::awt::TextEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+// XFilterControllerListener
+ virtual void SAL_CALL predicateExpressionChanged( const FilterEvent& _Event ) throw (RuntimeException);
+ virtual void SAL_CALL disjunctiveTermRemoved( const FilterEvent& _Event ) throw (RuntimeException);
+ virtual void SAL_CALL disjunctiveTermAdded( const FilterEvent& _Event ) throw (RuntimeException);
// helpers
void dispose() throw( RuntimeException );
- void InsertElements(const Reference< ::com::sun::star::container::XIndexAccess >& xControllers);
- void RemoveElement(const Reference< ::com::sun::star::awt::XTextComponent > & xText);
+ void AddOrRemoveListener( const Reference< XIndexAccess >& _rxControllers, const bool _bAdd );
- Reference< ::com::sun::star::beans::XPropertySet > getField(const Reference< ::com::sun::star::awt::XTextComponent > & xText) const;
void setText(sal_Int32 nPos,
const FmFilterItem* pFilterItem,
const ::rtl::OUString& rText);
- void DeleteItemsByText(::std::vector<FmFilterData*>& rItems, const Reference< ::com::sun::star::awt::XTextComponent > & xText);
- Reference< ::com::sun::star::form::XForm > findForm(const Reference< ::com::sun::star::container::XChild >& xChild);
};
//------------------------------------------------------------------------
-FmFilterAdapter::FmFilterAdapter(FmFilterModel* pModel, const Reference< ::com::sun::star::container::XIndexAccess >& xControllers)
- :m_pModel(pModel)
+FmFilterAdapter::FmFilterAdapter(FmFilterModel* pModel, const Reference< XIndexAccess >& xControllers)
+ :m_pModel( pModel )
+ ,m_xControllers( xControllers )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::FmFilterAdapter" );
- InsertElements(xControllers);
-
- // listen on all controls as text listener
- for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
- iter != m_aFilterControls.end(); iter++)
- (*iter).first->addTextListener(this);
+ AddOrRemoveListener( m_xControllers, true );
}
//------------------------------------------------------------------------
void FmFilterAdapter::dispose() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::dispose" );
- // clear the filter control map
- for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
- iter != m_aFilterControls.end(); iter++)
- (*iter).first->removeTextListener(this);
-
- m_aFilterControls.clear();
+ AddOrRemoveListener( m_xControllers, false );
}
-//------------------------------------------------------------------------------
-// delete all items relate to the control
-void FmFilterAdapter::DeleteItemsByText(::std::vector<FmFilterData*>& _rItems,
- const Reference< ::com::sun::star::awt::XTextComponent > & xText)
+//------------------------------------------------------------------------
+void FmFilterAdapter::AddOrRemoveListener( const Reference< XIndexAccess >& _rxControllers, const bool _bAdd )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::DeleteItemsByText" );
- for (::std::vector<FmFilterData*>::reverse_iterator i = _rItems.rbegin();
- // link problems with operator ==
- i.base() != _rItems.rend().base(); i++)
+ for (sal_Int32 i = 0, nLen = _rxControllers->getCount(); i < nLen; ++i)
{
- FmFilterItems* pFilterItems = PTR_CAST(FmFilterItems, *i);
- if (pFilterItems)
- {
- FmFilterItem* pFilterItem = pFilterItems->Find(xText);
- if (pFilterItem)
- {
- // remove the condition
- ::std::vector<FmFilterData*>& rItems = pFilterItems->GetChilds();
- ::std::vector<FmFilterData*>::iterator j = ::std::find(rItems.begin(), rItems.end(), pFilterItem);
- if (j != rItems.end())
- m_pModel->Remove(j, pFilterItem);
- }
- continue;
- }
- FmFormItem* pFormItem = PTR_CAST(FmFormItem, *i);
- if (pFormItem)
- DeleteItemsByText(pFormItem->GetChilds(), xText);
+ Reference< XIndexAccess > xElement( _rxControllers->getByIndex(i), UNO_QUERY );
+
+ // step down
+ AddOrRemoveListener( xElement, _bAdd );
+
+ // handle this particular controller
+ Reference< XFilterController > xController( xElement, UNO_QUERY );
+ OSL_ENSURE( xController.is(), "FmFilterAdapter::InsertElements: no XFilterController, cannot sync data!" );
+ if ( xController.is() )
+ if ( _bAdd )
+ xController->addFilterControllerListener( this );
+ else
+ xController->removeFilterControllerListener( this );
}
}
//------------------------------------------------------------------------
-void FmFilterAdapter::InsertElements(const Reference< ::com::sun::star::container::XIndexAccess >& xControllers)
+void FmFilterAdapter::setText(sal_Int32 nRowPos,
+ const FmFilterItem* pFilterItem,
+ const ::rtl::OUString& rText)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::InsertElements" );
- for (sal_Int32 i = 0, nLen = xControllers->getCount(); i < nLen; ++i)
- {
- Reference< ::com::sun::star::container::XIndexAccess > xElement;
- xControllers->getByIndex(i) >>= xElement;
+ FmFormItem* pFormItem = PTR_CAST( FmFormItem, pFilterItem->GetParent()->GetParent() );
- // Insert the Elements of the controller
- InsertElements(xElement);
+ try
+ {
+ Reference< XFilterController > xController( pFormItem->GetController(), UNO_QUERY_THROW );
+ xController->setPredicateExpression( pFilterItem->GetComponentIndex(), nRowPos, rText );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
- // store the filter controls
- FmXFormController* pController = FmXFormController::getImplementation( xElement.get() );
- DBG_ASSERT( pController, "FmFilterAdapter::InsertElements: no controller!" );
- const FmFilterControls& rControls = pController->getFilterControls();
- for (FmFilterControls::const_iterator iter = rControls.begin(); iter != rControls.end(); ++iter )
- m_aFilterControls.insert(*iter);
- }
+// XEventListener
+//------------------------------------------------------------------------
+void SAL_CALL FmFilterAdapter::disposing(const EventObject& /*e*/) throw( RuntimeException )
+{
}
-//------------------------------------------------------------------------------
-void FmFilterAdapter::RemoveElement(const Reference< ::com::sun::star::awt::XTextComponent > & xText)
+//------------------------------------------------------------------------
+namespace
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::RemoveElement" );
- if (xText.is())
+ ::rtl::OUString lcl_getLabelName_nothrow( const Reference< XControl >& _rxControl )
{
- // alle Level durchlaufen und eintraege entfernen
- if (m_pModel)
- DeleteItemsByText(m_pModel->GetChilds(), xText);
+ ::rtl::OUString sLabelName;
+ try
+ {
+ Reference< XControl > xControl( _rxControl, UNO_SET_THROW );
+ Reference< XPropertySet > xModel( xControl->getModel(), UNO_QUERY_THROW );
+ sLabelName = getLabelName( xModel );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return sLabelName;
+ }
- FmFilterControls::iterator iter = m_aFilterControls.find(xText);
- if (iter != m_aFilterControls.end())
- m_aFilterControls.erase(iter);
+ Reference< XPropertySet > lcl_getBoundField_nothrow( const Reference< XControl >& _rxControl )
+ {
+ Reference< XPropertySet > xField;
+ try
+ {
+ Reference< XControl > xControl( _rxControl, UNO_SET_THROW );
+ Reference< XPropertySet > xModelProps( xControl->getModel(), UNO_QUERY_THROW );
+ xField.set( xModelProps->getPropertyValue( FM_PROP_BOUNDFIELD ), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return xField;
}
}
+// XFilterControllerListener
//------------------------------------------------------------------------
-Reference< ::com::sun::star::beans::XPropertySet > FmFilterAdapter::getField(const Reference< ::com::sun::star::awt::XTextComponent > & xText) const
+void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::getField" );
- Reference< ::com::sun::star::beans::XPropertySet > xField;
- FmFilterControls::const_iterator i = m_aFilterControls.find(xText);
- if (i != m_aFilterControls.end())
- xField = (*i).second;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
- return xField;
-}
+ if ( !m_pModel )
+ return;
-//------------------------------------------------------------------------
-void FmFilterAdapter::setText(sal_Int32 nRowPos,
- const FmFilterItem* pFilterItem,
- const ::rtl::OUString& rText)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::setText" );
- // set the text for the text component
- Reference< ::com::sun::star::awt::XTextComponent > xText(pFilterItem->GetTextComponent());
- xText->setText(rText);
+ // the controller which sent the event
+ Reference< XFormController > xController( _Event.Source, UNO_QUERY_THROW );
+ Reference< XFilterController > xFilterController( _Event.Source, UNO_QUERY_THROW );
+ Reference< XForm > xForm( xController->getModel(), UNO_QUERY_THROW );
- // get the controller of the text component and its filter rows
- FmFormItem* pFormItem = PTR_CAST(FmFormItem,pFilterItem->GetParent()->GetParent());
- FmXFormController* pController = FmXFormController::getImplementation( pFormItem->GetController().get() );
- DBG_ASSERT( pController, "FmFilterAdapter::setText: no controller!" );
- FmFilterRows& rRows = pController->getFilterRows();
+ FmFormItem* pFormItem = m_pModel->Find( m_pModel->m_aChildren, xForm );
+ OSL_ENSURE( pFormItem, "FmFilterAdapter::predicateExpressionChanged: don't know this form!" );
+ if ( !pFormItem )
+ return;
- DBG_ASSERT(nRowPos < (sal_Int32)rRows.size(), "wrong row pos");
- // Suchen der aktuellen Row
- FmFilterRow& rRow = rRows[nRowPos];
+ const sal_Int32 nActiveTerm( xFilterController->getActiveTerm() );
- // do we have a new filter
- if (rText.getLength())
- rRow[xText] = rText;
- else
+ FmFilterItems* pFilter = PTR_CAST( FmFilterItems, pFormItem->GetChildren()[ nActiveTerm ] );
+ FmFilterItem* pFilterItem = pFilter->Find( _Event.FilterComponent );
+ if ( pFilterItem )
{
- // do we have the control in the row
- FmFilterRow::iterator iter = rRow.find(xText);
- // erase the entry out of the row
- if (iter != rRow.end())
- rRow.erase(iter);
+ if ( _Event.PredicateExpression.getLength())
+ {
+ pFilterItem->SetText( _Event.PredicateExpression );
+ // UI benachrichtigen
+ FmFilterTextChangedHint aChangeHint(pFilterItem);
+ m_pModel->Broadcast( aChangeHint );
+ }
+ else
+ {
+ // no text anymore so remove the condition
+ m_pModel->Remove(pFilterItem);
+ }
}
-}
+ else
+ {
+ // searching the component by field name
+ ::rtl::OUString aFieldName( lcl_getLabelName_nothrow( xFilterController->getFilterComponent( _Event.FilterComponent ) ) );
+ pFilterItem = new FmFilterItem( m_pModel->getORB(), pFilter, aFieldName, _Event.PredicateExpression, _Event.FilterComponent );
+ m_pModel->Insert(pFilter->GetChildren().end(), pFilterItem);
+ }
-// ::com::sun::star::lang::XEventListener
-//------------------------------------------------------------------------
-void SAL_CALL FmFilterAdapter::disposing(const ::com::sun::star::lang::EventObject& e) throw( RuntimeException )
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::disposing" );
- Reference< ::com::sun::star::awt::XTextComponent > xText(e.Source,UNO_QUERY);
- if (xText.is())
- RemoveElement(xText);
+ // ensure there's one empty term in the filter, just in case the active term was previously empty
+ m_pModel->EnsureEmptyFilterRows( *pFormItem );
}
-// XTextListener
//------------------------------------------------------------------------
-Reference< ::com::sun::star::form::XForm > FmFilterAdapter::findForm(const Reference< ::com::sun::star::container::XChild >& xChild)
+void SAL_CALL FmFilterAdapter::disjunctiveTermRemoved( const FilterEvent& _Event ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::findForm" );
- Reference< ::com::sun::star::form::XForm > xForm;
- if (xChild.is())
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ Reference< XFormController > xController( _Event.Source, UNO_QUERY_THROW );
+ Reference< XFilterController > xFilterController( _Event.Source, UNO_QUERY_THROW );
+ Reference< XForm > xForm( xController->getModel(), UNO_QUERY_THROW );
+
+ FmFormItem* pFormItem = m_pModel->Find( m_pModel->m_aChildren, xForm );
+ OSL_ENSURE( pFormItem, "FmFilterAdapter::disjunctiveTermRemoved: don't know this form!" );
+ if ( !pFormItem )
+ return;
+
+ ::std::vector< FmFilterData* >& rTermItems = pFormItem->GetChildren();
+ const bool bValidIndex = ( _Event.DisjunctiveTerm >= 0 ) && ( (size_t)_Event.DisjunctiveTerm < rTermItems.size() );
+ OSL_ENSURE( bValidIndex, "FmFilterAdapter::disjunctiveTermRemoved: invalid term index!" );
+ if ( !bValidIndex )
+ return;
+
+ // if the first term was removed, then the to-be first term needs its text updated
+ if ( _Event.DisjunctiveTerm == 0 )
{
- xForm = Reference< ::com::sun::star::form::XForm >(xChild->getParent(), UNO_QUERY);
- if (!xForm.is())
- xForm = findForm(Reference< ::com::sun::star::container::XChild >(xChild->getParent(), UNO_QUERY));
+ rTermItems[1]->SetText( String( SVX_RES( RID_STR_FILTER_FILTER_FOR ) ) );
+ FmFilterTextChangedHint aChangeHint( rTermItems[1] );
+ m_pModel->Broadcast( aChangeHint );
}
- return xForm;
+
+ // finally remove the entry from the model
+ m_pModel->Remove( rTermItems.begin() + _Event.DisjunctiveTerm );
+
+ // ensure there's one empty term in the filter, just in case the currently removed one was the last empty one
+ m_pModel->EnsureEmptyFilterRows( *pFormItem );
}
-// XTextListener
//------------------------------------------------------------------------
-void FmFilterAdapter::textChanged(const ::com::sun::star::awt::TextEvent& e) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& _Event ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterAdapter::textChanged" );
- // Find the according formitem in the
- Reference< ::com::sun::star::awt::XControl > xControl(e.Source, UNO_QUERY);
- if (!m_pModel || !xControl.is())
- return;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
- Reference< ::com::sun::star::form::XForm > xForm(findForm(Reference< ::com::sun::star::container::XChild >(xControl->getModel(), UNO_QUERY)));
- if (!xForm.is())
+ Reference< XFormController > xController( _Event.Source, UNO_QUERY_THROW );
+ Reference< XFilterController > xFilterController( _Event.Source, UNO_QUERY_THROW );
+ Reference< XForm > xForm( xController->getModel(), UNO_QUERY_THROW );
+
+ FmFormItem* pFormItem = m_pModel->Find( m_pModel->m_aChildren, xForm );
+ OSL_ENSURE( pFormItem, "FmFilterAdapter::disjunctiveTermAdded: don't know this form!" );
+ if ( !pFormItem )
return;
- FmFormItem* pFormItem = m_pModel->Find(m_pModel->m_aChilds, xForm);
- if (pFormItem)
+ const sal_Int32 nInsertPos = _Event.DisjunctiveTerm;
+ bool bValidIndex = ( nInsertPos >= 0 ) && ( (size_t)nInsertPos <= pFormItem->GetChildren().size() );
+ if ( !bValidIndex )
{
- Reference< ::com::sun::star::awt::XTextComponent > xText(e.Source, UNO_QUERY);
- FmFilterItems* pFilter = PTR_CAST(FmFilterItems, pFormItem->GetChilds()[pFormItem->GetCurrentPosition()]);
- FmFilterItem* pFilterItem = pFilter->Find(xText);
- if (pFilterItem)
- {
- if (xText->getText().getLength())
- {
- pFilterItem->SetText(xText->getText());
- // UI benachrichtigen
- FmFilterTextChangedHint aChangeHint(pFilterItem);
- m_pModel->Broadcast( aChangeHint );
- }
- else
- {
- // no text anymore so remove the condition
- m_pModel->Remove(pFilterItem);
- }
- }
- else
- {
- // searching the component by field name
- ::rtl::OUString aFieldName = getLabelName(Reference< ::com::sun::star::beans::XPropertySet > (Reference< ::com::sun::star::awt::XControl > (xText, UNO_QUERY)->getModel(),UNO_QUERY));
-
- pFilterItem = new FmFilterItem(m_pModel->getORB(),pFilter, aFieldName, xText->getText(), xText);
- m_pModel->Insert(pFilter->GetChilds().end(), pFilterItem);
- }
- m_pModel->CheckIntegrity(pFormItem);
+ OSL_ENSURE( false, "FmFilterAdapter::disjunctiveTermAdded: invalid index!" );
+ return;
}
+
+ const ::std::vector< FmFilterData* >::iterator insertPos = pFormItem->GetChildren().begin() + nInsertPos;
+
+ FmFilterItems* pFilterItems = new FmFilterItems( m_pModel->getORB(), pFormItem, String( SVX_RES( RID_STR_FILTER_FILTER_OR ) ) );
+ m_pModel->Insert( insertPos, pFilterItems );
}
//========================================================================
@@ -559,14 +561,13 @@ void FmFilterAdapter::textChanged(const ::com::sun::star::awt::TextEvent& e) thr
//========================================================================
TYPEINIT1(FmFilterModel, FmParentData);
//------------------------------------------------------------------------
-FmFilterModel::FmFilterModel(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
+FmFilterModel::FmFilterModel(const Reference< XMultiServiceFactory >& _rxFactory)
:FmParentData(_rxFactory,NULL, ::rtl::OUString())
,OSQLParserClient(_rxFactory)
,m_xORB(_rxFactory)
,m_pAdapter(NULL)
,m_pCurrentItems(NULL)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::FmFilterModel" );
}
//------------------------------------------------------------------------
@@ -578,7 +579,6 @@ FmFilterModel::~FmFilterModel()
//------------------------------------------------------------------------
void FmFilterModel::Clear()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Clear" );
// notify
FilterClearingHint aClearedHint;
Broadcast( aClearedHint );
@@ -595,18 +595,17 @@ void FmFilterModel::Clear()
m_xController = NULL;
m_xControllers = NULL;
- for (::std::vector<FmFilterData*>::const_iterator i = m_aChilds.begin();
- i != m_aChilds.end(); i++)
+ for (::std::vector<FmFilterData*>::const_iterator i = m_aChildren.begin();
+ i != m_aChildren.end(); i++)
delete (*i);
- m_aChilds.clear();
+ m_aChildren.clear();
}
//------------------------------------------------------------------------
-void FmFilterModel::Update(const Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const Reference< ::com::sun::star::form::XFormController > & xCurrent)
+void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, const Reference< XFormController > & xCurrent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Update" );
- if ((::com::sun::star::form::XFormController*) xCurrent.get() == (::com::sun::star::form::XFormController*) m_xController.get())
+ if ( xCurrent == m_xController )
return;
if (!xControllers.is())
@@ -616,7 +615,7 @@ void FmFilterModel::Update(const Reference< ::com::sun::star::container::XIndexA
}
// there is only a new current controller
- if ((::com::sun::star::container::XIndexAccess*)m_xControllers.get() != (::com::sun::star::container::XIndexAccess*)xControllers.get())
+ if ( m_xControllers != xControllers )
{
Clear();
@@ -630,77 +629,95 @@ void FmFilterModel::Update(const Reference< ::com::sun::star::container::XIndexA
m_pAdapter->acquire();
SetCurrentController(xCurrent);
- CheckIntegrity(this);
+ EnsureEmptyFilterRows( *this );
}
else
SetCurrentController(xCurrent);
}
//------------------------------------------------------------------------
-void FmFilterModel::Update(const Reference< ::com::sun::star::container::XIndexAccess > & xControllers, FmParentData* pParent)
+void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmParentData* pParent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Update" );
- sal_Int32 nCount = xControllers->getCount();
- for (sal_Int32 i = 0; i < nCount; i++)
+ try
{
- Reference< ::com::sun::star::form::XFormController > xController;
- xControllers->getByIndex(i) >>= xController;
- Reference< ::com::sun::star::beans::XPropertySet > xModelAsSet(xController->getModel(), UNO_QUERY);
- ::rtl::OUString aName = ::comphelper::getString(xModelAsSet->getPropertyValue(FM_PROP_NAME));
+ sal_Int32 nCount = xControllers->getCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ Reference< XFormController > xController( xControllers->getByIndex(i), UNO_QUERY_THROW );
- // Insert a new ::com::sun::star::form
- FmFormItem* pFormItem = new FmFormItem(m_xORB,pParent, xController, aName);
- Insert(pParent->GetChilds().end(), pFormItem);
+ Reference< XPropertySet > xFormProperties( xController->getModel(), UNO_QUERY_THROW );
+ ::rtl::OUString aName;
+ OSL_VERIFY( xFormProperties->getPropertyValue( FM_PROP_NAME ) >>= aName );
- // And now insert the filters for the form
- FmXFormController* pController = FmXFormController::getImplementation( pFormItem->GetController().get() );
- DBG_ASSERT( pController, "FmFilterAdapter::Update: no controller!" );
+ // Insert a new item for the form
+ FmFormItem* pFormItem = new FmFormItem( m_xORB, pParent, xController, aName );
+ Insert( pParent->GetChildren().end(), pFormItem );
- INT32 nPos = pController->getCurrentFilterPosition();
- pFormItem->SetCurrentPosition(nPos);
+ Reference< XFilterController > xFilterController( pFormItem->GetFilterController(), UNO_SET_THROW );
- String aTitle(SVX_RES(RID_STR_FILTER_FILTER_FOR));
- const FmFilterRows& rRows = pController->getFilterRows();
- for (FmFilterRows::const_iterator iter = rRows.begin(); iter != rRows.end(); ++iter)
- {
- const FmFilterRow& rRow = *iter;
- // now add the filter rows
- // One Row always exists
+ // insert the existing filters for the form
+ String aTitle( SVX_RES( RID_STR_FILTER_FILTER_FOR ) );
- FmFilterItems* pFilterItems = new FmFilterItems(m_xORB,pFormItem, aTitle);
- Insert(pFormItem->GetChilds().end(), pFilterItems);
- for (FmFilterRow::const_iterator iter1 = rRow.begin(); iter1 != rRow.end(); ++iter1)
+ Sequence< Sequence< ::rtl::OUString > > aExpressions = xFilterController->getPredicateExpressions();
+ for ( const Sequence< ::rtl::OUString >* pConjunctionTerm = aExpressions.getConstArray();
+ pConjunctionTerm != aExpressions.getConstArray() + aExpressions.getLength();
+ ++pConjunctionTerm
+ )
{
- // insert new and conditons
- ::rtl::OUString aFieldName = getLabelName(Reference< ::com::sun::star::beans::XPropertySet > (Reference< ::com::sun::star::awt::XControl > ((*iter1).first, UNO_QUERY)->getModel(),UNO_QUERY));
- FmFilterItem* pANDCondition = new FmFilterItem(m_xORB,pFilterItems, aFieldName, (*iter1).second, (*iter1).first);
- Insert(pFilterItems->GetChilds().end(), pANDCondition);
+ // we always display one row, even if there's no term to be displayed
+ FmFilterItems* pFilterItems = new FmFilterItems( m_xORB, pFormItem, aTitle );
+ Insert( pFormItem->GetChildren().end(), pFilterItems );
+
+ const Sequence< ::rtl::OUString >& rDisjunction( *pConjunctionTerm );
+ for ( const ::rtl::OUString* pDisjunctiveTerm = rDisjunction.getConstArray();
+ pDisjunctiveTerm != rDisjunction.getConstArray() + rDisjunction.getLength();
+ ++pDisjunctiveTerm
+ )
+ {
+ if ( pDisjunctiveTerm->getLength() == 0 )
+ // no condition for this particular component in this particular conjunction term
+ continue;
+
+ const sal_Int32 nComponentIndex = pDisjunctiveTerm - rDisjunction.getConstArray();
+
+ // determine the display name of the control
+ const Reference< XControl > xFilterControl( xFilterController->getFilterComponent( nComponentIndex ) );
+ const ::rtl::OUString sDisplayName( lcl_getLabelName_nothrow( xFilterControl ) );
+
+ // insert a new entry
+ FmFilterItem* pANDCondition = new FmFilterItem( m_xORB, pFilterItems, sDisplayName, *pDisjunctiveTerm, nComponentIndex );
+ Insert( pFilterItems->GetChildren().end(), pANDCondition );
+ }
+
+ // title for the next conditions
+ aTitle = SVX_RES( RID_STR_FILTER_FILTER_OR );
}
- // title for the next conditions
- aTitle = SVX_RES(RID_STR_FILTER_FILTER_OR);
- }
- // now add dependent controllers
- Reference< ::com::sun::star::container::XIndexAccess > xControllerAsIndex(xController, UNO_QUERY);
- Update(xControllerAsIndex, pFormItem);
+ // now add dependent controllers
+ Reference< XIndexAccess > xControllerAsIndex( xController, UNO_QUERY );
+ Update( xControllerAsIndex, pFormItem );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
//------------------------------------------------------------------------
-FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, const Reference< ::com::sun::star::form::XFormController > & xController) const
+FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, const Reference< XFormController > & xController) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Find" );
for (::std::vector<FmFilterData*>::const_iterator i = rItems.begin();
i != rItems.end(); i++)
{
FmFormItem* pForm = PTR_CAST(FmFormItem,*i);
if (pForm)
{
- if ((::com::sun::star::form::XFormController*)xController.get() == (::com::sun::star::form::XFormController*)pForm->GetController().get())
+ if ( xController == pForm->GetController() )
return pForm;
else
{
- pForm = Find(pForm->GetChilds(), xController);
+ pForm = Find(pForm->GetChildren(), xController);
if (pForm)
return pForm;
}
@@ -710,9 +727,8 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons
}
//------------------------------------------------------------------------
-FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, const Reference< ::com::sun::star::form::XForm >& xForm) const
+FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, const Reference< XForm >& xForm) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Find" );
for (::std::vector<FmFilterData*>::const_iterator i = rItems.begin();
i != rItems.end(); i++)
{
@@ -723,7 +739,7 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons
return pForm;
else
{
- pForm = Find(pForm->GetChilds(), xForm);
+ pForm = Find(pForm->GetChildren(), xForm);
if (pForm)
return pForm;
}
@@ -733,58 +749,64 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons
}
//------------------------------------------------------------------------
-void FmFilterModel::SetCurrentController(const Reference< ::com::sun::star::form::XFormController > & xCurrent)
+void FmFilterModel::SetCurrentController(const Reference< XFormController > & xCurrent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::SetCurrentController" );
- if ((::com::sun::star::form::XFormController*) xCurrent.get() == (::com::sun::star::form::XFormController*) m_xController.get())
+ if ( xCurrent == m_xController )
return;
m_xController = xCurrent;
- FmFormItem* pItem = Find(m_aChilds, xCurrent);
- if (pItem)
+ FmFormItem* pItem = Find( m_aChildren, xCurrent );
+ if ( !pItem )
+ return;
+
+ try
+ {
+ Reference< XFilterController > xFilterController( m_xController, UNO_QUERY_THROW );
+ const sal_Int32 nActiveTerm( xFilterController->getActiveTerm() );
+ if ( pItem->GetChildren().size() > (size_t)nActiveTerm )
+ {
+ SetCurrentItems( static_cast< FmFilterItems* >( pItem->GetChildren()[ nActiveTerm ] ) );
+ }
+ }
+ catch( const Exception& )
{
- if ( (USHORT)pItem->GetChilds().size() > pItem->GetCurrentPosition() )
- SetCurrentItems( static_cast< FmFilterItems* >( pItem->GetChilds()[ pItem->GetCurrentPosition() ] ) );
+ DBG_UNHANDLED_EXCEPTION();
}
}
//------------------------------------------------------------------------
-void FmFilterModel::AppendFilterItems(FmFormItem* pFormItem)
+void FmFilterModel::AppendFilterItems( FmFormItem& _rFormItem )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::AppendFilterItems" );
- DBG_ASSERT(pFormItem, "AppendFilterItems(): no form item present");
-
- FmFilterItems* pFilterItems = new FmFilterItems(m_xORB,pFormItem, ::rtl::OUString(String(SVX_RES(RID_STR_FILTER_FILTER_OR))));
// insert the condition behind the last filter items
::std::vector<FmFilterData*>::reverse_iterator iter;
- for (iter = pFormItem->GetChilds().rbegin();
- // link problems with operator ==
- iter.base() != pFormItem->GetChilds().rend().base(); iter++)
+ for ( iter = _rFormItem.GetChildren().rbegin();
+ iter != _rFormItem.GetChildren().rend();
+ ++iter
+ )
{
if ((*iter)->ISA(FmFilterItems))
break;
}
- sal_Int32 nInsertPos = iter.base() - pFormItem->GetChilds().rend().base();
- ::std::vector<FmFilterData*>::iterator i = pFormItem->GetChilds().begin() + nInsertPos;
- Insert(i, pFilterItems);
-
- // do we need a new row
- FmXFormController* pController = FmXFormController::getImplementation( pFormItem->GetController().get() );
- DBG_ASSERT( pController, "FmFilterAdapter::AppendFilterItems: no controller!" );
- FmFilterRows& rRows = pController->getFilterRows();
-
- // determine the filter position
- if (nInsertPos >= (sal_Int32)rRows.size())
- rRows.push_back(FmFilterRow());
+ sal_Int32 nInsertPos = iter.base() - _rFormItem.GetChildren().begin();
+ // delegate this to the FilterController, it will notify us, which will let us update our model
+ try
+ {
+ Reference< XFilterController > xFilterController( _rFormItem.GetFilterController(), UNO_SET_THROW );
+ if ( nInsertPos >= xFilterController->getDisjunctiveTerms() )
+ xFilterController->appendEmptyDisjunctiveTerm();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
//------------------------------------------------------------------------
void FmFilterModel::Insert(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pData)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Insert" );
- ::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetChilds();
+ ::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetChildren();
sal_Int32 nPos = rPos == rItems.end() ? LIST_APPEND : rPos - rItems.begin();
rItems.insert(rPos, pData);
@@ -796,9 +818,8 @@ void FmFilterModel::Insert(const ::std::vector<FmFilterData*>::iterator& rPos, F
//------------------------------------------------------------------------
void FmFilterModel::Remove(FmFilterData* pData)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Remove" );
FmParentData* pParent = pData->GetParent();
- ::std::vector<FmFilterData*>& rItems = pParent->GetChilds();
+ ::std::vector<FmFilterData*>& rItems = pParent->GetChildren();
// erase the item from the model
::std::vector<FmFilterData*>::iterator i = ::std::find(rItems.begin(), rItems.end(), pData);
@@ -808,80 +829,32 @@ void FmFilterModel::Remove(FmFilterData* pData)
if (pData->ISA(FmFilterItems))
{
FmFormItem* pFormItem = (FmFormItem*)pParent;
- FmXFormController* pController = FmXFormController::getImplementation( pFormItem->GetController().get() );
- DBG_ASSERT( pController, "FmFilterAdapter::Remove: no controller!" );
- FmFilterRows& rRows = pController->getFilterRows();
- // how many entries do we have
- // it's the last row than we just empty it
- if (nPos == (sal_Int32)(rRows.size() - 1))
- {
- // remove all childs and stay current
- ::std::vector<FmFilterData*>& rChilds = ((FmFilterItems*)pData)->GetChilds();
- while (!rChilds.empty())
- {
- ::std::vector<FmFilterData*>::iterator j = rChilds.end();
- j--;
-
- // we stay on the level so delete each item explizit to clean the controls
- sal_Int32 nParentPos = j - rChilds.begin();
- // EmptyText removes the filter
- FmFilterItem* pFilterItem = PTR_CAST(FmFilterItem, *j);
- m_pAdapter->setText(nParentPos, pFilterItem, ::rtl::OUString());
- Remove(j, pFilterItem);
- }
- }
- else // delete the row
+ try
{
- // if the row is on the current position we have to away from that position.
- // than we can delete it
- if (nPos == pFormItem->GetCurrentPosition())
- {
- ::std::vector<FmFilterData*>::iterator j = i;
-
- // give a new current postion
- if (nPos < (sal_Int32)(rRows.size() - 1))
- // set it to the next row
- ++j;
- else
- // set it to the previous row
- --j;
-
- // if necessary we have the formItem for the current controller
- // than we have to adjust the data displayed in the form
- pFormItem->SetCurrentPosition(j - rItems.begin());
- pController->setCurrentFilterPosition(j - rItems.begin());
-
- // Keep the view consistent and force and new painting
- FmFilterTextChangedHint aChangeHint(*j);
- Broadcast( aChangeHint );
- }
+ Reference< XFilterController > xFilterController( pFormItem->GetFilterController(), UNO_SET_THROW );
- // now delete the entry
- // before deleting we have to shift the current position of the form if necessary
- if (nPos < pFormItem->GetCurrentPosition())
+ bool bEmptyLastTerm = ( ( nPos == 0 ) && xFilterController->getDisjunctiveTerms() == 1 );
+ if ( bEmptyLastTerm )
{
- pFormItem->SetCurrentPosition(pFormItem->GetCurrentPosition() - 1);
- pController->decrementCurrentFilterPosition();
-
- // is it the first row, than the nex row has to recieve a different name
- if (nPos == 0)
+ // remove all children (by setting an empty predicate expression)
+ ::std::vector< FmFilterData* >& rChildren = ((FmFilterItems*)pData)->GetChildren();
+ while ( !rChildren.empty() )
{
- // ensure that the text labels are consistent
- rItems[1]->SetText(String(SVX_RES(RID_STR_FILTER_FILTER_FOR)));
- FmFilterTextChangedHint aChangeHint(rItems[1]);
- Broadcast( aChangeHint );
+ ::std::vector< FmFilterData* >::iterator removePos = rChildren.end() - 1;
+ FmFilterItem* pFilterItem = PTR_CAST( FmFilterItem, *removePos );
+ m_pAdapter->setText( nPos, pFilterItem, ::rtl::OUString() );
+ Remove( removePos );
}
}
-
- // delete it
- rRows.erase(rRows.begin() + nPos);
-
- // and keep the controller consistent
- DBG_ASSERT(rRows.size() != 0, "wrong row size");
-
- // and remove it from the model
- Remove(i, pData);
+ else
+ {
+ xFilterController->removeDisjunctiveTerm( nPos );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
else // FormItems can not be deleted
@@ -894,26 +867,26 @@ void FmFilterModel::Remove(FmFilterData* pData)
else
{
// find the position of the father within his father
- ::std::vector<FmFilterData*>& rParentParentItems = pData->GetParent()->GetParent()->GetChilds();
+ ::std::vector<FmFilterData*>& rParentParentItems = pData->GetParent()->GetParent()->GetChildren();
::std::vector<FmFilterData*>::iterator j = ::std::find(rParentParentItems.begin(), rParentParentItems.end(), pFilterItem->GetParent());
DBG_ASSERT(j != rParentParentItems.end(), "FmFilterModel::Remove(): unknown Item");
sal_Int32 nParentPos = j - rParentParentItems.begin();
// EmptyText removes the filter
m_pAdapter->setText(nParentPos, pFilterItem, ::rtl::OUString());
- Remove(i, pData);
+ Remove( i );
}
}
}
//------------------------------------------------------------------------
-void FmFilterModel::Remove(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pData)
+void FmFilterModel::Remove( const ::std::vector<FmFilterData*>::iterator& rPos )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Remove" );
- ::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetChilds();
- rItems.erase(rPos);
+ // remove from parent's child list
+ FmFilterData* pData = *rPos;
+ pData->GetParent()->GetChildren().erase( rPos );
- // UI benachrichtigen
+ // notify the view, this will remove the actual SvLBoxEntry
FmFilterRemovedHint aRemoveHint( pData );
Broadcast( aRemoveHint );
@@ -923,46 +896,58 @@ void FmFilterModel::Remove(const ::std::vector<FmFilterData*>::iterator& rPos, F
//------------------------------------------------------------------------
sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::ValidateText" );
- // check the input
- Reference< XPropertySet > xField(m_pAdapter->getField(pItem->GetTextComponent()));
-
- OStaticDataAccessTools aStaticTools;
- Reference< XConnection > xConnection(aStaticTools.getRowSetConnection(Reference< XRowSet > (m_xController->getModel(), UNO_QUERY)));
- Reference< ::com::sun::star::util::XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats(xConnection, sal_True);
-
- Reference< ::com::sun::star::util::XNumberFormatter > xFormatter(m_xORB->createInstance(FM_NUMBER_FORMATTER), UNO_QUERY);
- xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
-
- ::rtl::OUString aErr, aTxt(rText);
- ::rtl::Reference< ISQLParseNode > xParseNode = predicateTree(aErr, aTxt, xFormatter, xField);
- rErrorMsg = aErr;
- rText = aTxt;
- if (xParseNode.is())
+ FmFormItem* pFormItem = PTR_CAST( FmFormItem, pItem->GetParent()->GetParent() );
+ try
{
- ::rtl::OUString aPreparedText;
- ::com::sun::star::lang::Locale aAppLocale = Application::GetSettings().GetUILocale();
- xParseNode->parseNodeToPredicateStr(
- aPreparedText, xConnection, xFormatter, xField, aAppLocale, '.', getParseContext() );
- rText = aPreparedText;
- return sal_True;
+ Reference< XFormController > xFormController( pFormItem->GetController() );
+ // obtain the connection of the form belonging to the controller
+ OStaticDataAccessTools aStaticTools;
+ Reference< XRowSet > xRowSet( xFormController->getModel(), UNO_QUERY_THROW );
+ Reference< XConnection > xConnection( aStaticTools.getRowSetConnection( xRowSet ) );
+
+ // obtain a number formatter for this connection
+ // TODO: shouldn't this be cached?
+ Reference< XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats( xConnection, sal_True );
+ Reference< XNumberFormatter > xFormatter( m_xORB->createInstance( FM_NUMBER_FORMATTER ), UNO_QUERY );
+ xFormatter->attachNumberFormatsSupplier( xFormatSupplier );
+
+ // get the field (database column) which the item is responsible for
+ Reference< XFilterController > xFilterController( xFormController, UNO_QUERY_THROW );
+ Reference< XPropertySet > xField( lcl_getBoundField_nothrow( xFilterController->getFilterComponent( pItem->GetComponentIndex() ) ), UNO_SET_THROW );
+
+ // parse the given text as filter predicate
+ ::rtl::OUString aErr, aTxt( rText );
+ ::rtl::Reference< ISQLParseNode > xParseNode = predicateTree( aErr, aTxt, xFormatter, xField );
+ rErrorMsg = aErr;
+ rText = aTxt;
+ if ( xParseNode.is() )
+ {
+ ::rtl::OUString aPreparedText;
+ Locale aAppLocale = Application::GetSettings().GetUILocale();
+ xParseNode->parseNodeToPredicateStr(
+ aPreparedText, xConnection, xFormatter, xField, aAppLocale, '.', getParseContext() );
+ rText = aPreparedText;
+ return sal_True;
+ }
}
- else
- return sal_False;
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return sal_False;
}
//------------------------------------------------------------------------
void FmFilterModel::Append(FmFilterItems* pItems, FmFilterItem* pFilterItem)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::Append" );
- Insert(pItems->GetChilds().end(), pFilterItem);
+ Insert(pItems->GetChildren().end(), pFilterItem);
}
//------------------------------------------------------------------------
void FmFilterModel::SetTextForItem(FmFilterItem* pItem, const ::rtl::OUString& rText)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::SetTextForItem" );
- ::std::vector<FmFilterData*>& rItems = pItem->GetParent()->GetParent()->GetChilds();
+ ::std::vector<FmFilterData*>& rItems = pItem->GetParent()->GetParent()->GetChildren();
::std::vector<FmFilterData*>::iterator i = ::std::find(rItems.begin(), rItems.end(), pItem->GetParent());
sal_Int32 nParentPos = i - rItems.begin();
@@ -982,7 +967,6 @@ void FmFilterModel::SetTextForItem(FmFilterItem* pItem, const ::rtl::OUString& r
//------------------------------------------------------------------------
void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::SetCurrentItems" );
if (m_pCurrentItems == pCurrent)
return;
@@ -990,21 +974,26 @@ void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent)
if (pCurrent)
{
FmFormItem* pFormItem = (FmFormItem*)pCurrent->GetParent();
- ::std::vector<FmFilterData*>& rItems = pFormItem->GetChilds();
+ ::std::vector<FmFilterData*>& rItems = pFormItem->GetChildren();
::std::vector<FmFilterData*>::const_iterator i = ::std::find(rItems.begin(), rItems.end(), pCurrent);
if (i != rItems.end())
{
// determine the filter position
sal_Int32 nPos = i - rItems.begin();
- FmXFormController* pController = FmXFormController::getImplementation( pFormItem->GetController().get() );
- DBG_ASSERT( pController, "FmFilterAdapter::SetCurrentItems: no controller!" );
- pController->setCurrentFilterPosition(nPos);
- pFormItem->SetCurrentPosition(nPos);
+ try
+ {
+ Reference< XFilterController > xFilterController( pFormItem->GetFilterController(), UNO_SET_THROW );
+ xFilterController->setActiveTerm( nPos );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
- if ((::com::sun::star::form::XFormController*)m_xController.get() != (::com::sun::star::form::XFormController*)pFormItem->GetController().get())
+ if ( m_xController != pFormItem->GetController() )
// calls SetCurrentItems again
- SetCurrentController(pFormItem->GetController());
+ SetCurrentController( pFormItem->GetController() );
else
m_pCurrentItems = pCurrent;
}
@@ -1021,33 +1010,39 @@ void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent)
}
//------------------------------------------------------------------------
-void FmFilterModel::CheckIntegrity(FmParentData* pItem)
+void FmFilterModel::EnsureEmptyFilterRows( FmParentData& _rItem )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterModel::CheckIntegrity" );
// checks whether for each form there's one free level for input
+ ::std::vector< FmFilterData* >& rChildren = _rItem.GetChildren();
+ sal_Bool bAppendLevel = _rItem.ISA( FmFormItem );
- ::std::vector<FmFilterData*>& rItems = pItem->GetChilds();
- sal_Bool bAppendLevel = sal_False;
-
- for (::std::vector<FmFilterData*>::iterator i = rItems.begin();
- i != rItems.end(); i++)
+ for ( ::std::vector<FmFilterData*>::iterator i = rChildren.begin();
+ i != rChildren.end();
+ ++i
+ )
{
FmFilterItems* pItems = PTR_CAST(FmFilterItems, *i);
- if (pItems)
+ if ( pItems && pItems->GetChildren().empty() )
{
- bAppendLevel = !pItems->GetChilds().empty();
- continue;
+ bAppendLevel = sal_False;
+ break;
}
FmFormItem* pFormItem = PTR_CAST(FmFormItem, *i);
if (pFormItem)
{
- CheckIntegrity(pFormItem);
+ EnsureEmptyFilterRows( *pFormItem );
continue;
}
}
- if (bAppendLevel)
- AppendFilterItems((FmFormItem*)pItem);
+
+ if ( bAppendLevel )
+ {
+ FmFormItem* pFormItem = PTR_CAST( FmFormItem, &_rItem );
+ OSL_ENSURE( pFormItem, "FmFilterModel::EnsureEmptyFilterRows: no FmFormItem, but a FmFilterItems child?" );
+ if ( pFormItem )
+ AppendFilterItems( *pFormItem );
+ }
}
//========================================================================
@@ -1069,25 +1064,31 @@ void FmFilterItemsString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nF
{
FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData();
FmFormItem* pForm = (FmFormItem*)pRow->GetParent();
+
// current filter is significant painted
- if (pForm->GetChilds()[pForm->GetCurrentPosition()] == pRow)
+ const bool bIsCurrentFilter = pForm->GetChildren()[ pForm->GetFilterController()->getActiveTerm() ] == pRow;
+ if ( bIsCurrentFilter )
{
- Color aLineColor(rDev.GetLineColor());
- Rectangle aRect(rPos, GetSize(&rDev, pEntry ));
- Point aFirst(rPos.X(), aRect.Bottom() - 6);
- Point aSecond(aFirst.X() + 2, aFirst.Y() + 3);
+ rDev.Push( PUSH_LINECOLOR );
+
+ rDev.SetLineColor( rDev.GetTextColor() );
- rDev.SetLineColor(rDev.GetTextColor());
- rDev.DrawLine(aFirst, aSecond);
+ Rectangle aRect( rPos, GetSize( &rDev, pEntry ) );
+ Point aFirst( rPos.X(), aRect.Bottom() - 6 );
+ Point aSecond(aFirst .X() + 2, aFirst.Y() + 3 );
+
+ rDev.DrawLine( aFirst, aSecond );
aFirst = aSecond;
aFirst.X() += 1;
aSecond.X() += 6;
aSecond.Y() -= 5;
- rDev.DrawLine(aFirst, aSecond);
- rDev.SetLineColor( aLineColor );
+ rDev.DrawLine( aFirst, aSecond );
+
+ rDev.Pop();
}
+
rDev.DrawText( Point(rPos.X() + nxDBmp, rPos.Y()), GetText() );
}
@@ -1168,7 +1169,6 @@ FmFilterNavigator::FmFilterNavigator( Window* pParent )
,m_aTimerCounter( 0 )
,m_aDropActionType( DA_SCROLLUP )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::FmFilterNavigator" );
SetHelpId( HID_FILTER_NAVIGATOR );
{
@@ -1211,14 +1211,12 @@ FmFilterNavigator::~FmFilterNavigator()
//------------------------------------------------------------------------
void FmFilterNavigator::Clear()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::Clear" );
m_pModel->Clear();
}
//------------------------------------------------------------------------
-void FmFilterNavigator::UpdateContent(const Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const Reference< ::com::sun::star::form::XFormController > & xCurrent)
+void FmFilterNavigator::UpdateContent(const Reference< XIndexAccess > & xControllers, const Reference< XFormController > & xCurrent)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::UpdateContent" );
if (xCurrent == m_pModel->GetCurrentController())
return;
@@ -1246,7 +1244,6 @@ void FmFilterNavigator::UpdateContent(const Reference< ::com::sun::star::contain
//------------------------------------------------------------------------
sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::EditingEntry" );
m_pEditingCurrently = pEntry;
if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
return sal_False;
@@ -1257,7 +1254,6 @@ sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelec
//------------------------------------------------------------------------
sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::EditedEntry" );
DBG_ASSERT(pEntry == m_pEditingCurrently, "FmFilterNavigator::EditedEntry: suspicious entry!");
m_pEditingCurrently = NULL;
@@ -1293,7 +1289,6 @@ sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const XubString& r
else
{
// display the error and return sal_False
-
SQLContext aError;
aError.Message = String(SVX_RES(RID_STR_SYNTAXERROR));
aError.Details = aErrorMsg;
@@ -1350,7 +1345,6 @@ IMPL_LINK( FmFilterNavigator, OnDropActionTimer, void*, EMPTYARG )
//------------------------------------------------------------------------
sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::AcceptDrop" );
Point aDropPos = rEvt.maPosPixel;
// kuemmern wir uns erst mal um moeglich DropActions (Scrollen und Aufklappen)
@@ -1378,7 +1372,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
bNeedTrigger = sal_True;
}
else
- { // auf einem Entry mit Childs, der nicht aufgeklappt ist ?
+ { // is it an entry whith children, and not yet expanded?
SvLBoxEntry* pDropppedOn = GetEntry(aDropPos);
if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn))
{
@@ -1457,7 +1451,6 @@ namespace
//------------------------------------------------------------------------
sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::ExecuteDrop" );
// ware schlecht, wenn nach dem Droppen noch gescrollt wird ...
if (m_aDropActionTimer.IsActive())
m_aDropActionTimer.Stop();
@@ -1491,7 +1484,6 @@ void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry,
const Image& rImg2,
SvLBoxButtonKind eButtonKind)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::InitEntry" );
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pString = NULL;
@@ -1507,7 +1499,6 @@ void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry,
//------------------------------------------------------------------------
sal_Bool FmFilterNavigator::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::Select" );
if (bSelect == IsSelected(pEntry)) // das passiert manchmal, ich glaube, die Basisklasse geht zu sehr auf Nummer sicher ;)
return sal_True;
@@ -1543,7 +1534,6 @@ sal_Bool FmFilterNavigator::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
//------------------------------------------------------------------------
void FmFilterNavigator::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::Notify" );
if (rHint.ISA(FmFilterInsertedHint))
{
FmFilterInsertedHint* pHint = (FmFilterInsertedHint*)&rHint;
@@ -1577,7 +1567,6 @@ void FmFilterNavigator::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
//------------------------------------------------------------------------
SvLBoxEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::FindEntry" );
SvLBoxEntry* pEntry = NULL;
if (pItem)
{
@@ -1594,23 +1583,23 @@ SvLBoxEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const
//------------------------------------------------------------------------
void FmFilterNavigator::Insert(FmFilterData* pItem, sal_Int32 nPos)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::Insert" );
const FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : GetFilterModel();
// insert the item
- SvLBoxEntry* pParentEntry = FindEntry(pParent);
+ SvLBoxEntry* pParentEntry = FindEntry( pParent );
SvLBoxEntry* pNewEntry = InsertEntry(pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
if ( pNewEntry )
{
SetExpandedEntryBmp( pNewEntry, pItem->GetImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
SetCollapsedEntryBmp( pNewEntry, pItem->GetImage( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST );
}
+ if ( pParentEntry )
+ Expand( pParentEntry );
}
//------------------------------------------------------------------------
void FmFilterNavigator::Remove(FmFilterData* pItem)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::Remove" );
// der Entry zu den Daten
SvLBoxEntry* pEntry = FindEntry(pItem);
@@ -1624,7 +1613,6 @@ void FmFilterNavigator::Remove(FmFilterData* pItem)
// -----------------------------------------------------------------------------
FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem*>& _rItemList)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::getSelectedFilterItems" );
// be sure that the data is only used within only one form!
FmFormItem* pFirstItem = NULL;
@@ -1659,35 +1647,37 @@ FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem
// -----------------------------------------------------------------------------
void FmFilterNavigator::insertFilterItem(const ::std::vector<FmFilterItem*>& _rFilterList,FmFilterItems* _pTargetItems,sal_Bool _bCopy)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::insertFilterItem" );
::std::vector<FmFilterItem*>::const_iterator aEnd = _rFilterList.end();
- for (::std::vector<FmFilterItem*>::const_iterator i = _rFilterList.begin(); i != aEnd; ++i)
+ for ( ::std::vector< FmFilterItem* >::const_iterator i = _rFilterList.begin();
+ i != aEnd;
+ ++i
+ )
{
- if ((*i)->GetParent() == _pTargetItems)
+ FmFilterItem* pLookupItem( *i );
+ if ( pLookupItem->GetParent() == _pTargetItems )
continue;
- else
+
+ FmFilterItem* pFilterItem = _pTargetItems->Find( pLookupItem->GetComponentIndex() );
+ String aText = pLookupItem->GetText();
+ if ( !pFilterItem )
{
- FmFilterItem* pFilterItem = _pTargetItems->Find((*i)->GetTextComponent());
- String aText = (*i)->GetText();
- if ( !pFilterItem )
- {
- pFilterItem = new FmFilterItem(m_pModel->getORB(),_pTargetItems, (*i)->GetFieldName(), aText, (*i)->GetTextComponent());
- m_pModel->Append(_pTargetItems, pFilterItem);
- }
+ pFilterItem = new FmFilterItem( m_pModel->getORB(), _pTargetItems, pLookupItem->GetFieldName(), aText, pLookupItem->GetComponentIndex() );
+ m_pModel->Append( _pTargetItems, pFilterItem );
+ }
- if ( !_bCopy )
- m_pModel->Remove(*i);
+ if ( !_bCopy )
+ m_pModel->Remove( pLookupItem );
- // now set the text for the new dragged item
- m_pModel->SetTextForItem(pFilterItem, aText);
- }
+ // now set the text for the new dragged item
+ m_pModel->SetTextForItem( pFilterItem, aText );
}
- m_pModel->CheckIntegrity((FmFormItem*)_pTargetItems->GetParent());
+
+ m_pModel->EnsureEmptyFilterRows( *_pTargetItems->GetParent() );
}
+
//------------------------------------------------------------------------------
void FmFilterNavigator::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::StartDrag" );
EndSelection();
// be sure that the data is only used within a only one form!
@@ -1705,7 +1695,6 @@ void FmFilterNavigator::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPi
//------------------------------------------------------------------------------
void FmFilterNavigator::Command( const CommandEvent& rEvt )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::Command" );
sal_Bool bHandled = sal_False;
switch (rEvt.GetCommand())
{
@@ -1750,8 +1739,8 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
{
// don't delete the only empty row of a form
FmFilterItems* pFilterItems = PTR_CAST(FmFilterItems, aSelectList[0]);
- if (pFilterItems && pFilterItems->GetChilds().empty()
- && pFilterItems->GetParent()->GetChilds().size() == 1)
+ if (pFilterItems && pFilterItems->GetChildren().empty()
+ && pFilterItems->GetParent()->GetChildren().size() == 1)
aSelectList.clear();
}
@@ -1808,7 +1797,6 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
// -----------------------------------------------------------------------------
SvLBoxEntry* FmFilterNavigator::getNextEntry(SvLBoxEntry* _pStartWith)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::getNextEntry" );
SvLBoxEntry* pEntry = _pStartWith ? _pStartWith : LastSelected();
pEntry = Next(pEntry);
// we need the next filter entry
@@ -1819,7 +1807,6 @@ SvLBoxEntry* FmFilterNavigator::getNextEntry(SvLBoxEntry* _pStartWith)
// -----------------------------------------------------------------------------
SvLBoxEntry* FmFilterNavigator::getPrevEntry(SvLBoxEntry* _pStartWith)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::getPrevEntry" );
SvLBoxEntry* pEntry = _pStartWith ? _pStartWith : FirstSelected();
pEntry = Prev(pEntry);
// check if the previous entry is a filter, if so get the next prev
@@ -1835,81 +1822,90 @@ SvLBoxEntry* FmFilterNavigator::getPrevEntry(SvLBoxEntry* _pStartWith)
//------------------------------------------------------------------------
void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::KeyInput" );
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- if ( rKeyCode.IsMod1()
- && rKeyCode.IsMod2()
- && !rKeyCode.IsShift()
- && ( rKeyCode.GetCode() == KEY_UP || rKeyCode.GetCode() == KEY_DOWN )
- )
+
+ switch ( rKeyCode.GetCode() )
+ {
+ case KEY_UP:
+ case KEY_DOWN:
{
+ if ( !rKeyCode.IsMod1() || !rKeyCode.IsMod2() || rKeyCode.IsShift() )
+ break;
+
::std::vector<FmFilterItem*> aItemList;
- if ( getSelectedFilterItems(aItemList) )
- {
- ::std::mem_fun1_t<SvLBoxEntry*,FmFilterNavigator,SvLBoxEntry*> aGetEntry = ::std::mem_fun(&FmFilterNavigator::getNextEntry);
- if ( rKeyCode.GetCode() == KEY_UP )
- aGetEntry = ::std::mem_fun(&FmFilterNavigator::getPrevEntry);
+ if ( !getSelectedFilterItems( aItemList ) )
+ break;
- SvLBoxEntry* pTarget = aGetEntry(this,NULL);
+ ::std::mem_fun1_t<SvLBoxEntry*,FmFilterNavigator,SvLBoxEntry*> getter = ::std::mem_fun(&FmFilterNavigator::getNextEntry);
+ if ( rKeyCode.GetCode() == KEY_UP )
+ getter = ::std::mem_fun(&FmFilterNavigator::getPrevEntry);
- if ( pTarget )
+ SvLBoxEntry* pTarget = getter( this, NULL );
+ if ( !pTarget )
+ break;
+
+ FmFilterItems* pTargetItems = getTargetItems( pTarget );
+ if ( !pTargetItems )
+ break;
+
+ ::std::vector<FmFilterItem*>::const_iterator aEnd = aItemList.end();
+ sal_Bool bNextTargetItem = sal_True;
+ while ( bNextTargetItem )
+ {
+ ::std::vector<FmFilterItem*>::const_iterator i = aItemList.begin();
+ for (; i != aEnd; ++i)
{
- FmFilterItems* pTargetItems = getTargetItems(pTarget);
- if ( pTargetItems )
+ if ( (*i)->GetParent() == pTargetItems )
{
- ::std::vector<FmFilterItem*>::const_iterator aEnd = aItemList.end();
- sal_Bool bNextTargetItem = sal_True;
- while ( bNextTargetItem )
- {
- ::std::vector<FmFilterItem*>::const_iterator i = aItemList.begin();
- for (; i != aEnd; ++i)
- {
- if ( (*i)->GetParent() == pTargetItems )
- {
- pTarget = aGetEntry(this,pTarget);
- if ( !pTarget )
- return;
- pTargetItems = getTargetItems(pTarget);
- break;
- }
- else
- {
- FmFilterItem* pFilterItem = pTargetItems->Find((*i)->GetTextComponent());
- // we found the text component so jump above
- if ( pFilterItem )
- {
- pTarget = aGetEntry(this,pTarget);
- if ( !pTarget )
- return;
- pTargetItems = getTargetItems(pTarget);
- break;
- }
- }
- }
- bNextTargetItem = i != aEnd && pTargetItems;
- }
- if ( pTargetItems )
- {
- insertFilterItem(aItemList,pTargetItems);
+ pTarget = getter(this,pTarget);
+ if ( !pTarget )
return;
+ pTargetItems = getTargetItems( pTarget );
+ break;
+ }
+ else
+ {
+ FmFilterItem* pFilterItem = pTargetItems->Find( (*i)->GetComponentIndex() );
+ // we found the text component so jump above
+ if ( pFilterItem )
+ {
+ pTarget = getter( this, pTarget );
+ if ( !pTarget )
+ return;
+
+ pTargetItems = getTargetItems( pTarget );
+ break;
}
}
}
+ bNextTargetItem = i != aEnd && pTargetItems;
+ }
+
+ if ( pTargetItems )
+ {
+ insertFilterItem( aItemList, pTargetItems );
+ return;
}
}
- else if (rKeyCode.GetCode() == KEY_DELETE && !rKeyCode.GetModifier())
+ break;
+
+ case KEY_DELETE:
{
- if (!IsSelected(First()) || GetEntryCount() > 1)
+ if ( rKeyCode.GetModifier() )
+ break;
+
+ if ( !IsSelected( First() ) || GetEntryCount() > 1 )
DeleteSelection();
return;
}
+ }
+
SvTreeListBox::KeyInput(rKEvt);
}
//------------------------------------------------------------------------------
void FmFilterNavigator::DeleteSelection()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigator::DeleteSelection" );
// to avoid the deletion of an entry twice (e.g. deletion of a parent and afterward
// the deletion of it's child, i have to shrink the selecton list
::std::vector<SvLBoxEntry*> aEntryList;
@@ -1935,9 +1931,6 @@ void FmFilterNavigator::DeleteSelection()
{
m_pModel->Remove((FmFilterData*)(*i)->GetUserData());
}
-
- // now check if we need to insert new items
- m_pModel->CheckIntegrity(m_pModel);
}
// -----------------------------------------------------------------------------
@@ -1949,7 +1942,6 @@ FmFilterNavigatorWin::FmFilterNavigatorWin( SfxBindings* _pBindings, SfxChildWin
:SfxDockingWindow( _pBindings, _pMgr, _pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) )
,SfxControllerItem( SID_FM_FILTER_NAVIGATOR_CONTROL, *_pBindings )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::FmFilterNavigatorWin" );
SetHelpId( HID_FILTER_NAVIGATOR_WIN );
m_pNavigator = new FmFilterNavigator( this );
@@ -1967,22 +1959,21 @@ FmFilterNavigatorWin::~FmFilterNavigatorWin()
//-----------------------------------------------------------------------
void FmFilterNavigatorWin::UpdateContent(FmFormShell* pFormShell)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::UpdateContent" );
if (!pFormShell)
m_pNavigator->UpdateContent( NULL, NULL );
else
{
- Reference< ::com::sun::star::form::XFormController > xController(pFormShell->GetImpl()->getActiveInternalController());
- Reference< ::com::sun::star::container::XIndexAccess > xContainer;
+ Reference< XFormController > xController(pFormShell->GetImpl()->getActiveInternalController());
+ Reference< XIndexAccess > xContainer;
if (xController.is())
{
- Reference< ::com::sun::star::container::XChild > xChild(xController, UNO_QUERY);
+ Reference< XChild > xChild(xController, UNO_QUERY);
for (Reference< XInterface > xParent(xChild->getParent());
xParent.is();
xParent = xChild.is() ? xChild->getParent() : Reference< XInterface > ())
{
- xContainer = Reference< ::com::sun::star::container::XIndexAccess > (xParent, UNO_QUERY);
- xChild = Reference< ::com::sun::star::container::XChild > (xParent, UNO_QUERY);
+ xContainer = Reference< XIndexAccess > (xParent, UNO_QUERY);
+ xChild = Reference< XChild > (xParent, UNO_QUERY);
}
}
m_pNavigator->UpdateContent(xContainer, xController);
@@ -1992,7 +1983,6 @@ void FmFilterNavigatorWin::UpdateContent(FmFormShell* pFormShell)
//-----------------------------------------------------------------------
void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::StateChanged" );
if( !pState || SID_FM_FILTER_NAVIGATOR_CONTROL != nSID )
return;
@@ -2008,7 +1998,6 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c
//-----------------------------------------------------------------------
sal_Bool FmFilterNavigatorWin::Close()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::Close" );
if ( m_pNavigator && m_pNavigator->IsEditingActive() )
m_pNavigator->EndEditing();
@@ -2023,7 +2012,6 @@ sal_Bool FmFilterNavigatorWin::Close()
//-----------------------------------------------------------------------
void FmFilterNavigatorWin::FillInfo( SfxChildWinInfo& rInfo ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::FillInfo" );
SfxDockingWindow::FillInfo( rInfo );
rInfo.bVisible = sal_False;
}
@@ -2031,7 +2019,6 @@ void FmFilterNavigatorWin::FillInfo( SfxChildWinInfo& rInfo ) const
//-----------------------------------------------------------------------
Size FmFilterNavigatorWin::CalcDockingSize( SfxChildAlignment eAlign )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::CalcDockingSize" );
if ( ( eAlign == SFX_ALIGN_TOP ) || ( eAlign == SFX_ALIGN_BOTTOM ) )
return Size();
@@ -2041,7 +2028,6 @@ Size FmFilterNavigatorWin::CalcDockingSize( SfxChildAlignment eAlign )
//-----------------------------------------------------------------------
SfxChildAlignment FmFilterNavigatorWin::CheckAlignment( SfxChildAlignment eActAlign, SfxChildAlignment eAlign )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::CheckAlignment" );
switch (eAlign)
{
case SFX_ALIGN_LEFT:
@@ -2058,7 +2044,6 @@ SfxChildAlignment FmFilterNavigatorWin::CheckAlignment( SfxChildAlignment eActAl
//------------------------------------------------------------------------
void FmFilterNavigatorWin::Resize()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::Resize" );
SfxDockingWindow::Resize();
Size aLogOutputSize = PixelToLogic( GetOutputSizePixel(), MAP_APPFONT );
@@ -2074,7 +2059,6 @@ void FmFilterNavigatorWin::Resize()
// -----------------------------------------------------------------------------
void FmFilterNavigatorWin::GetFocus()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFilterNavigatorWin::GetFocus" );
// oj #97405#
if ( m_pNavigator )
m_pNavigator->GrabFocus();
diff --git a/svx/source/form/fmcontrolbordermanager.cxx b/svx/source/form/fmcontrolbordermanager.cxx
index 17bd10346302..5c6397662844 100644
--- a/svx/source/form/fmcontrolbordermanager.cxx
+++ b/svx/source/form/fmcontrolbordermanager.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmcontrolbordermanager.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 9fb7bd9b8f90..82227d8015ee 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmcontrollayout.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 691acb8a33e4..684c37c1b67c 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -30,35 +30,35 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include <tools/resmgr.hxx>
-#include <tools/diagnose_ex.h>
#include "fmobj.hxx"
#include "fmprop.hrc"
#include "fmvwimp.hxx"
-#include <svx/editeng.hxx>
-#include <svx/svdovirt.hxx>
+#include "fmpgeimp.hxx"
+#include "fmresids.hrc"
+#include "svx/fmview.hxx"
+#include "svx/fmglob.hxx"
+#include "svx/fmpage.hxx"
+#include "svx/editeng.hxx"
+#include "svx/svdovirt.hxx"
+#include "svx/fmmodel.hxx"
+#include "svx/dialmgr.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
/** === end UNO includes === **/
-#include <svx/fmmodel.hxx>
#include "svx/fmtools.hxx"
-#include <tools/shl.hxx>
-#include <svx/dialmgr.hxx>
-
-#include "fmresids.hrc"
-#include <svx/fmview.hxx>
-#include <svx/fmglob.hxx>
-#include "fmpgeimp.hxx"
-#include <svx/fmpage.hxx>
+#include <tools/shl.hxx>
#include <comphelper/property.hxx>
#include <comphelper/processfactory.hxx>
#include <toolkit/awt/vclxdevice.hxx>
#include <vcl/svapp.hxx>
+#include <tools/resmgr.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
@@ -437,10 +437,48 @@ void FmFormObj::operator= (const SdrObject& rObj)
}
//------------------------------------------------------------------
+namespace
+{
+ String lcl_getFormComponentAccessPath(const Reference< XInterface >& _xElement, Reference< XInterface >& _rTopLevelElement)
+ {
+ Reference< ::com::sun::star::form::XFormComponent> xChild(_xElement, UNO_QUERY);
+ Reference< ::com::sun::star::container::XIndexAccess> xParent;
+ if (xChild.is())
+ xParent = Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), UNO_QUERY);
+
+ // while the current content is a form
+ String sReturn;
+ String sCurrentIndex;
+ while (xChild.is())
+ {
+ // get the content's relative pos within it's parent container
+ sal_Int32 nPos = getElementPos(xParent, xChild);
+
+ // prepend this current relaive pos
+ sCurrentIndex = String::CreateFromInt32(nPos);
+ if (sReturn.Len() != 0)
+ {
+ sCurrentIndex += '\\';
+ sCurrentIndex += sReturn;
+ }
+
+ sReturn = sCurrentIndex;
+
+ // travel up
+ if (::comphelper::query_interface((Reference< XInterface >)xParent,xChild))
+ xParent = Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), UNO_QUERY);
+ }
+
+ _rTopLevelElement = xParent;
+ return sReturn;
+ }
+}
+
+//------------------------------------------------------------------
Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > & _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > _rTopLevelDestContainer)
{
Reference< XInterface > xTopLevelSouce;
- String sAccessPath = getFormComponentAccessPath(_rSourceContainer, xTopLevelSouce);
+ String sAccessPath = lcl_getFormComponentAccessPath(_rSourceContainer, xTopLevelSouce);
if (!xTopLevelSouce.is())
// somthing went wrong, maybe _rSourceContainer isn't part of a valid forms hierarchy
return Reference< XInterface > ();
@@ -547,8 +585,8 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
DBG_ASSERT(xSourcePersist.is(), "FmFormObj::ensureModelEnv : invalid form (no persist object) !");
// create and insert (into the destination) a clone of the form
- xCurrentDestForm = Reference< XPropertySet > (cloneUsingProperties(xSourcePersist), UNO_QUERY);
- DBG_ASSERT(xCurrentDestForm.is(), "FmFormObj::ensureModelEnv : invalid cloned form !");
+ Reference< XCloneable > xCloneable( xSourcePersist, UNO_QUERY_THROW );
+ xCurrentDestForm.set( xCloneable->createClone(), UNO_QUERY_THROW );
DBG_ASSERT(nCurrentDestIndex == xDestContainer->getCount(), "FmFormObj::ensureModelEnv : something went wrong with the numbers !");
xDestContainer->insertByIndex(nCurrentDestIndex, makeAny(xCurrentDestForm));
diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx
index b9f40b6ddda2..a69a541f3606 100644
--- a/svx/source/form/fmservs.cxx
+++ b/svx/source/form/fmservs.cxx
@@ -49,7 +49,8 @@
DECL_SERVICE( FmXGridControl )
- DECL_SERVICE( FmXFormController )
+ DECL_SERVICE( FormController )
+ DECL_SERVICE( LegacyFormController )
// ------------------------------------------------------------------------
@@ -91,7 +92,8 @@ namespace svxform
// ------------------------------------------------------------------------
// FormController
- REGISTER_SERVICE(FmXFormController, FM_FORM_CONTROLLER);
+ REGISTER_SERVICE( FormController, FM_FORM_CONTROLLER );
+ REGISTER_SERVICE( LegacyFormController, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.FormController" ) ) );
// ------------------------------------------------------------------------
// FormController
@@ -102,9 +104,6 @@ namespace svxform
REGISTER_SERVICE(FmXGridControl, FM_CONTROL_GRID); // compatibility
REGISTER_SERVICE(FmXGridControl, FM_CONTROL_GRIDCONTROL);
REGISTER_SERVICE(FmXGridControl, FM_SUN_CONTROL_GRIDCONTROL);
-
-
};
-
} // namespace svxform
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 2819045c237d..93cf9c1778af 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -685,7 +685,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_FILTER_NAVIGATOR:
case SID_FM_SHOW_DATANAVIGATOR :
{
- GetViewShell()->GetViewFrame()->ChildWindowExecute(rReq);
+ GetViewShell()->GetViewFrame()->ChildWindowExecute( rReq );
rReq.Done();
} break;
case SID_FM_SHOW_FMEXPLORER:
@@ -827,7 +827,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
bReopenNavigator = sal_True;
}
- Reference< XFormController > xController( GetImpl()->getActiveController() );
+ Reference< runtime::XFormController > xController( GetImpl()->getActiveController() );
if ( GetViewShell()->GetViewFrame()->HasChildWindow( SID_FM_FILTER_NAVIGATOR )
// closing the window was denied, for instance because of a invalid criterion
@@ -857,6 +857,11 @@ void FmFormShell::Execute(SfxRequest &rReq)
{
GetImpl()->startFiltering();
rReq.Done();
+
+ // initially open the filter navigator, the whole form based filter is pretty useless without it
+ SfxBoolItem aIdentifierItem( SID_FM_FILTER_NAVIGATOR, TRUE );
+ GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_FILTER_NAVIGATOR, SFX_CALLMODE_ASYNCHRON,
+ &aIdentifierItem, NULL );
} break;
}
}
@@ -1400,7 +1405,7 @@ SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxMod
}
//------------------------------------------------------------------------
-Reference< XFormController > FmFormShell::GetFormController( const Reference< XForm >& _rxForm, const SdrView& _rView, const OutputDevice& _rDevice ) const
+Reference< runtime::XFormController > FmFormShell::GetFormController( const Reference< XForm >& _rxForm, const SdrView& _rView, const OutputDevice& _rDevice ) const
{
const FmFormView* pFormView = dynamic_cast< const FmFormView* >( &_rView );
if ( !pFormView )
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 4d265d324820..38df41896f13 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -30,89 +30,88 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "gridcols.hxx"
-#include <svx/obj3d.hxx>
-#include "fmvwimp.hxx"
-#include "fmshimp.hxx"
-#include "fmtextcontrolshell.hxx"
-#include <svx/svdpagv.hxx>
-#include <svx/fmpage.hxx>
-#include <svx/dialmgr.hxx>
-#ifndef _SVX_FMRESIDS_HRC
-#include "fmresids.hrc"
-#endif
+
#include "fmitems.hxx"
#include "fmobj.hxx"
-#include "formtoolbars.hxx"
-#include <svx/fmglob.hxx>
-#include "svditer.hxx"
-#include "fmservs.hxx"
#include "fmpgeimp.hxx"
#include "svx/fmtools.hxx"
-#ifndef _SVX_FMPROP_HRC
#include "fmprop.hrc"
-#endif
-#include <svx/fmshell.hxx>
-#ifndef _SVX_SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
-#include <svx/fmmodel.hxx>
+#include "fmresids.hrc"
+#include "fmservs.hxx"
+#include "fmshimp.hxx"
+#include "fmtextcontrolshell.hxx"
#include "fmundo.hxx"
#include "fmurl.hxx"
-#include "formcontrolling.hxx"
-#include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/form/XLoadable.hpp>
-#include <com/sun/star/container/XNamed.hpp>
+#include "fmvwimp.hxx"
+#include "formtoolbars.hxx"
+#include "gridcols.hxx"
+#include "svditer.hxx"
+#include "svx/dialmgr.hxx"
+#include "svx/dialogs.hrc"
+#include "svx/fmglob.hxx"
+#include "svx/fmmodel.hxx"
+#include "svx/fmpage.hxx"
+#include "svx/fmshell.hxx"
+#include "svx/obj3d.hxx"
+#include "svx/sdrpagewindow.hxx"
+#include "svx/svdpagv.hxx"
+#include "svx/svxdlg.hxx"
+#include "svx/svxids.hrc"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XCheckBox.hpp>
+#include <com/sun/star/awt/XListBox.hpp>
+#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/awt/XTextComponent.hpp>
-#include <com/sun/star/awt/XListBox.hpp>
-#include <com/sun/star/awt/XCheckBox.hpp>
-#include <com/sun/star/form/XBoundComponent.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/form/ListSourceType.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/script/XEventAttacherManager.hpp>
+#include <com/sun/star/form/XBoundComponent.hpp>
#include <com/sun/star/form/XBoundControl.hpp>
-#include <com/sun/star/form/XReset.hpp>
#include <com/sun/star/form/XGrid.hpp>
#include <com/sun/star/form/XGridPeer.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
-#include <com/sun/star/util/XModeSelector.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/form/XReset.hpp>
#include <com/sun/star/form/binding/XBindableValue.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/form/binding/XListEntrySink.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/util/XCancellable.hpp>
+#include <com/sun/star/util/XModeSelector.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/beans/XIntrospection.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/property.hxx>
+#include <comphelper/stl_types.hxx>
+#include <connectivity/dbtools.hxx>
+#include <cppuhelper/servicefactory.hxx>
#include <osl/mutex.hxx>
-#include <sfx2/viewsh.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/frame.hxx>
-#include <vcl/waitobj.hxx>
-#include <tools/shl.hxx>
-#include <tools/diagnose_ex.h>
-#include <vcl/msgbox.hxx>
+#include <rtl/logfile.hxx>
#include <sfx2/dispatch.hxx>
-#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/frame.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/viewsh.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <tools/color.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/shl.hxx>
#include <tools/urlobj.hxx>
-#include <comphelper/property.hxx>
-#include <connectivity/dbtools.hxx>
-#include <comphelper/stl_types.hxx>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <comphelper/extract.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include <rtl/logfile.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/waitobj.hxx>
+#include <vos/mutex.hxx>
#include <algorithm>
#include <functional>
@@ -281,6 +280,7 @@ using namespace ::com::sun::star::view;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::script;
using namespace ::svxform;
using namespace ::svx;
@@ -289,7 +289,7 @@ using namespace ::svx;
//==============================================================================
namespace
{
- //....................................................................
+ //..........................................................................
void collectInterfacesFromMarkList( const SdrMarkList& _rMarkList, InterfaceBag& /* [out] */ _rInterfaces )
{
_rInterfaces.clear();
@@ -327,6 +327,198 @@ namespace
}
}
+ //..........................................................................
+ sal_Int16 GridView2ModelPos(const Reference< XIndexAccess>& rColumns, sal_Int16 nViewPos)
+ {
+ try
+ {
+ if (rColumns.is())
+ {
+ // loop through all columns
+ sal_Int16 i;
+ Reference< XPropertySet> xCur;
+ for (i=0; i<rColumns->getCount(); ++i)
+ {
+ rColumns->getByIndex(i) >>= xCur;
+ if (!::comphelper::getBOOL(xCur->getPropertyValue(FM_PROP_HIDDEN)))
+ {
+ // for every visible col : if nViewPos is greater zero, decrement it, else we
+ // have found the model position
+ if (!nViewPos)
+ break;
+ else
+ --nViewPos;
+ }
+ }
+ if (i<rColumns->getCount())
+ return i;
+ }
+ }
+ catch(const Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return (sal_Int16)-1;
+ }
+
+ //..........................................................................
+ Sequence< ::rtl::OUString> getEventMethods(const Type& type)
+ {
+ typelib_InterfaceTypeDescription *pType=0;
+ type.getDescription( (typelib_TypeDescription**)&pType);
+
+ if(!pType)
+ return Sequence< ::rtl::OUString>();
+
+ Sequence< ::rtl::OUString> aNames(pType->nMembers);
+ ::rtl::OUString* pNames = aNames.getArray();
+ for(sal_Int32 i=0;i<pType->nMembers;i++,++pNames)
+ {
+ // the decription reference
+ typelib_TypeDescriptionReference* pMemberDescriptionReference = pType->ppMembers[i];
+ // the description for the reference
+ typelib_TypeDescription* pMemberDescription = NULL;
+ typelib_typedescriptionreference_getDescription(&pMemberDescription, pMemberDescriptionReference);
+ if (pMemberDescription)
+ {
+ typelib_InterfaceMemberTypeDescription* pRealMemberDescription =
+ reinterpret_cast<typelib_InterfaceMemberTypeDescription*>(pMemberDescription);
+ *pNames = pRealMemberDescription->pMemberName;
+ }
+ }
+ typelib_typedescription_release( (typelib_TypeDescription *)pType );
+ return aNames;
+ }
+
+ //..........................................................................
+ void TransferEventScripts(const Reference< XControlModel>& xModel, const Reference< XControl>& xControl,
+ const Sequence< ScriptEventDescriptor>& rTransferIfAvailable)
+ {
+ // first check if we have a XEventAttacherManager for the model
+ Reference< XChild> xModelChild(xModel, UNO_QUERY);
+ if (!xModelChild.is())
+ return; // nothing to do
+
+ Reference< XEventAttacherManager> xEventManager(xModelChild->getParent(), UNO_QUERY);
+ if (!xEventManager.is())
+ return; // nothing to do
+
+ if (!rTransferIfAvailable.getLength())
+ return; // nothing to do
+
+ // check for the index of the model within it's parent
+ Reference< XIndexAccess> xParentIndex(xModelChild->getParent(), UNO_QUERY);
+ if (!xParentIndex.is())
+ return; // nothing to do
+ sal_Int32 nIndex = getElementPos(xParentIndex, xModel);
+ if (nIndex<0 || nIndex>=xParentIndex->getCount())
+ return; // nothing to do
+
+ // then we need informations about the listeners supported by the control and the model
+ Sequence< Type> aModelListeners;
+ Sequence< Type> aControlListeners;
+
+ Reference< XIntrospection> xModelIntrospection(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.beans.Introspection")), UNO_QUERY);
+ Reference< XIntrospection> xControlIntrospection(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.beans.Introspection")), UNO_QUERY);
+
+ if (xModelIntrospection.is() && xModel.is())
+ {
+ Any aModel(makeAny(xModel));
+ aModelListeners = xModelIntrospection->inspect(aModel)->getSupportedListeners();
+ }
+
+ if (xControlIntrospection.is() && xControl.is())
+ {
+ Any aControl(makeAny(xControl));
+ aControlListeners = xControlIntrospection->inspect(aControl)->getSupportedListeners();
+ }
+
+ sal_Int32 nMaxNewLen = aModelListeners.getLength() + aControlListeners.getLength();
+ if (!nMaxNewLen)
+ return; // the model and the listener don't support any listeners (or we were unable to retrieve these infos)
+
+ Sequence< ScriptEventDescriptor> aTransferable(nMaxNewLen);
+ ScriptEventDescriptor* pTransferable = aTransferable.getArray();
+
+ const ScriptEventDescriptor* pCurrent = rTransferIfAvailable.getConstArray();
+ sal_Int32 i,j,k;
+ for (i=0; i<rTransferIfAvailable.getLength(); ++i, ++pCurrent)
+ {
+ // search the model/control idl classes for the event described by pCurrent
+ for ( Sequence< Type>* pCurrentArray = &aModelListeners;
+ pCurrentArray;
+ pCurrentArray = (pCurrentArray == &aModelListeners) ? &aControlListeners : NULL
+ )
+ {
+ const Type* pCurrentListeners = pCurrentArray->getConstArray();
+ for (j=0; j<pCurrentArray->getLength(); ++j, ++pCurrentListeners)
+ {
+ UniString aListener = (*pCurrentListeners).getTypeName();
+ xub_StrLen nTokens = aListener.GetTokenCount('.');
+ if (nTokens)
+ aListener = aListener.GetToken(nTokens - 1, '.');
+
+ if (aListener == pCurrent->ListenerType.getStr())
+ // the current ScriptEventDescriptor doesn't match the current listeners class
+ continue;
+
+ // now check the methods
+ Sequence< ::rtl::OUString> aMethodsNames = getEventMethods(*pCurrentListeners);
+ const ::rtl::OUString* pMethodsNames = aMethodsNames.getConstArray();
+ for (k=0; k<aMethodsNames.getLength(); ++k, ++pMethodsNames)
+ {
+ if ((*pMethodsNames).compareTo(pCurrent->EventMethod) != COMPARE_EQUAL)
+ // the current ScriptEventDescriptor doesn't match the current listeners current method
+ continue;
+
+ // we can transfer the script event : the model (control) supports it
+ *pTransferable = *pCurrent;
+ ++pTransferable;
+ break;
+ }
+ if (k<aMethodsNames.getLength())
+ break;
+ }
+ }
+ }
+
+ sal_Int32 nRealNewLen = pTransferable - aTransferable.getArray();
+ aTransferable.realloc(nRealNewLen);
+
+ xEventManager->registerScriptEvents(nIndex, aTransferable);
+ }
+
+ //------------------------------------------------------------------------------
+ ::rtl::OUString getServiceNameByControlType(sal_Int16 nType)
+ {
+ switch (nType)
+ {
+ case OBJ_FM_EDIT : return FM_COMPONENT_TEXTFIELD;
+ case OBJ_FM_BUTTON : return FM_COMPONENT_COMMANDBUTTON;
+ case OBJ_FM_FIXEDTEXT : return FM_COMPONENT_FIXEDTEXT;
+ case OBJ_FM_LISTBOX : return FM_COMPONENT_LISTBOX;
+ case OBJ_FM_CHECKBOX : return FM_COMPONENT_CHECKBOX;
+ case OBJ_FM_RADIOBUTTON : return FM_COMPONENT_RADIOBUTTON;
+ case OBJ_FM_GROUPBOX : return FM_COMPONENT_GROUPBOX;
+ case OBJ_FM_COMBOBOX : return FM_COMPONENT_COMBOBOX;
+ case OBJ_FM_GRID : return FM_COMPONENT_GRIDCONTROL;
+ case OBJ_FM_IMAGEBUTTON : return FM_COMPONENT_IMAGEBUTTON;
+ case OBJ_FM_FILECONTROL : return FM_COMPONENT_FILECONTROL;
+ case OBJ_FM_DATEFIELD : return FM_COMPONENT_DATEFIELD;
+ case OBJ_FM_TIMEFIELD : return FM_COMPONENT_TIMEFIELD;
+ case OBJ_FM_NUMERICFIELD : return FM_COMPONENT_NUMERICFIELD;
+ case OBJ_FM_CURRENCYFIELD : return FM_COMPONENT_CURRENCYFIELD;
+ case OBJ_FM_PATTERNFIELD : return FM_COMPONENT_PATTERNFIELD;
+ case OBJ_FM_HIDDEN : return FM_COMPONENT_HIDDENCONTROL;
+ case OBJ_FM_IMAGECONTROL : return FM_COMPONENT_IMAGECONTROL;
+ case OBJ_FM_FORMATTEDFIELD : return FM_COMPONENT_FORMATTEDFIELD;
+ case OBJ_FM_SCROLLBAR : return FM_SUN_COMPONENT_SCROLLBAR;
+ case OBJ_FM_SPINBUTTON : return FM_SUN_COMPONENT_SPINBUTTON;
+ case OBJ_FM_NAVIGATIONBAR : return FM_SUN_COMPONENT_NAVIGATIONBAR;
+ }
+ return ::rtl::OUString();
+ }
+
}
//------------------------------------------------------------------------------
@@ -504,7 +696,6 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame )
,m_pTextShell( new ::svx::FmTextControlShell( _pViewFrame ) )
,m_aActiveControllerFeatures( ::comphelper::getProcessServiceFactory(), this )
,m_aNavControllerFeatures( ::comphelper::getProcessServiceFactory(), this )
- ,m_pExternalViewInterceptor( NULL )
,m_eDocumentType( eUnknownDocumentType )
,m_nLockSlotInvalidation( 0 )
,m_bHadPropertyBrowserInDesignMode( sal_False )
@@ -675,7 +866,8 @@ void SAL_CALL FmXFormShell::disposing(const EventObject& e) throw( RuntimeExcept
if (e.Source == m_xExternalViewController)
{
- Reference< XFormController> xFormController(m_xExternalViewController, UNO_QUERY);
+ Reference< runtime::XFormController > xFormController( m_xExternalViewController, UNO_QUERY );
+ OSL_ENSURE( xFormController.is(), "FmXFormShell::disposing: invalid external view controller!" );
if (xFormController.is())
xFormController->removeActivateListener((XFormControllerListener*)this);
@@ -765,7 +957,7 @@ void SAL_CALL FmXFormShell::formActivated(const EventObject& rEvent) throw( Runt
if ( impl_checkDisposed() )
return;
- Reference< XFormController > xController( rEvent.Source, UNO_QUERY_THROW );
+ Reference< runtime::XFormController > xController( rEvent.Source, UNO_QUERY_THROW );
m_pTextShell->formActivated( xController );
setActiveController( xController );
}
@@ -777,7 +969,7 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru
if ( impl_checkDisposed() )
return;
- Reference< XFormController > xController( rEvent.Source, UNO_QUERY_THROW );
+ Reference< runtime::XFormController > xController( rEvent.Source, UNO_QUERY_THROW );
m_pTextShell->formDeactivated( xController );
}
@@ -798,14 +990,6 @@ void FmXFormShell::disposing()
// are still uncommitted changes, the user explicitly wanted this.
// 2002-11-11 - 104702 - fs@openoffice.org
- // dispose our interceptor helpers
- if (m_pExternalViewInterceptor)
- {
- m_pExternalViewInterceptor->dispose();
- m_pExternalViewInterceptor->release();
- m_pExternalViewInterceptor = NULL;
- }
-
m_pTextShell->dispose();
m_xAttachedFrame = NULL;
@@ -1703,7 +1887,7 @@ Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet
if ( impl_checkDisposed() )
return NULL;
- Reference< XFormController> xExternalCtrlr(m_xExternalViewController, UNO_QUERY);
+ Reference< runtime::XFormController> xExternalCtrlr(m_xExternalViewController, UNO_QUERY);
if (xExternalCtrlr.is() && (_xForm == xExternalCtrlr->getModel()))
{
DBG_ASSERT(m_xExternalDisplayedForm.is(), "FmXFormShell::getInternalForm : invalid external form !");
@@ -1719,7 +1903,7 @@ Reference< XForm> FmXFormShell::getInternalForm(const Reference< XForm>& _xForm)
if ( impl_checkDisposed() )
return NULL;
- Reference< XFormController> xExternalCtrlr(m_xExternalViewController, UNO_QUERY);
+ Reference< runtime::XFormController > xExternalCtrlr(m_xExternalViewController, UNO_QUERY);
if (xExternalCtrlr.is() && (_xForm == xExternalCtrlr->getModel()))
{
DBG_ASSERT(m_xExternalDisplayedForm.is(), "FmXFormShell::getInternalForm : invalid external form !");
@@ -1808,7 +1992,7 @@ void FmXFormShell::impl_switchActiveControllerListening( const bool _bListen )
}
//------------------------------------------------------------------------------
-void FmXFormShell::setActiveController( const Reference< XFormController>& xController, sal_Bool _bNoSaveOldContent )
+void FmXFormShell::setActiveController( const Reference< runtime::XFormController >& xController, sal_Bool _bNoSaveOldContent )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::setActiveController" );
if ( impl_checkDisposed() )
@@ -2103,11 +2287,11 @@ void FmXFormShell::startListening()
{
// suchen des Controllers, ueber den eine Navigation moeglich ist
Reference< XChild> xChild(m_xActiveController, UNO_QUERY);
- Reference< XFormController> xParent;
+ Reference< runtime::XFormController > xParent;
while (xChild.is())
{
xChild = Reference< XChild>(xChild->getParent(), UNO_QUERY);
- xParent = Reference< XFormController>(xChild, UNO_QUERY);
+ xParent = Reference< runtime::XFormController >(xChild, UNO_QUERY);
Reference< XPropertySet> xParentSet;
if (xParent.is())
xParentSet = Reference< XPropertySet>(xParent->getModel(), UNO_QUERY);
@@ -2936,31 +3120,39 @@ void FmXFormShell::startFiltering()
FmWinRecList::iterator i = pXView->findWindow(xContainer);
if (i != pXView->getWindowList().end())
{
- const ::std::vector< Reference< XFormController> >& rControllerList = (*i)->GetList();
- for (::std::vector< Reference< XFormController> >::const_iterator j = rControllerList.begin();
+ const ::std::vector< Reference< runtime::XFormController> >& rControllerList = (*i)->GetList();
+ for (::std::vector< Reference< runtime::XFormController> >::const_iterator j = rControllerList.begin();
j != rControllerList.end(); ++j)
{
Reference< XModeSelector> xModeSelector(*j, UNO_QUERY);
if (xModeSelector.is())
- xModeSelector->setMode(FILTER_MODE);
+ xModeSelector->setMode( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) ) );
}
}
m_bFilterMode = sal_True;
m_pShell->UIFeatureChanged();
- m_pShell->GetViewShell()->GetViewFrame()->GetBindings().InvalidateShell(*m_pShell);
+ SfxViewFrame* pViewFrame = m_pShell->GetViewShell()->GetViewFrame();
+ pViewFrame->GetBindings().InvalidateShell( *m_pShell );
+
+ if ( pViewFrame->KnowsChildWindow( SID_FM_FILTER_NAVIGATOR )
+ && !pViewFrame->HasChildWindow( SID_FM_FILTER_NAVIGATOR )
+ )
+ {
+ pViewFrame->ToggleChildWindow( SID_FM_FILTER_NAVIGATOR );
+ }
}
//------------------------------------------------------------------------------
-void saveFilter(const Reference< XFormController>& _rxController)
+void saveFilter(const Reference< runtime::XFormController >& _rxController)
{
Reference< XPropertySet> xFormAsSet(_rxController->getModel(), UNO_QUERY);
Reference< XPropertySet> xControllerAsSet(_rxController, UNO_QUERY);
Reference< XIndexAccess> xControllerAsIndex(_rxController, UNO_QUERY);
// call the subcontroller
- Reference< XFormController> xController;
+ Reference< runtime::XFormController > xController;
for (sal_Int32 i = 0, nCount = xControllerAsIndex->getCount(); i < nCount; ++i)
{
xControllerAsIndex->getByIndex(i) >>= xController;
@@ -2995,7 +3187,7 @@ void FmXFormShell::stopFiltering(sal_Bool bSave)
Reference< XControlContainer> xContainer;
if (getActiveController() == m_xExternalViewController)
{
- DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::startFiltering : inconsistent : active external controller, but noone triggered this !");
+ DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::stopFiltering : inconsistent : active external controller, but noone triggered this !");
xContainer = m_xExtViewTriggerController->getContainer();
}
else
@@ -3004,13 +3196,13 @@ void FmXFormShell::stopFiltering(sal_Bool bSave)
FmWinRecList::iterator i = pXView->findWindow(xContainer);
if (i != pXView->getWindowList().end())
{
- const ::std::vector< Reference< XFormController> >& rControllerList = (*i)->GetList();
+ const ::std::vector< Reference< runtime::XFormController > >& rControllerList = (*i)->GetList();
::std::vector < ::rtl::OUString > aOriginalFilters;
::std::vector < sal_Bool > aOriginalApplyFlags;
if (bSave)
{
- for (::std::vector< Reference< XFormController> > ::const_iterator j = rControllerList.begin();
+ for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllerList.begin();
j != rControllerList.end(); ++j)
{
if (bSave)
@@ -3035,18 +3227,18 @@ void FmXFormShell::stopFiltering(sal_Bool bSave)
saveFilter(*j);
}
}
- for (::std::vector< Reference< XFormController> > ::const_iterator j = rControllerList.begin();
+ for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllerList.begin();
j != rControllerList.end(); ++j)
{
Reference< XModeSelector> xModeSelector(*j, UNO_QUERY);
if (xModeSelector.is())
- xModeSelector->setMode(DATA_MODE);
+ xModeSelector->setMode( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) ) );
}
if (bSave) // execute the filter
{
- const ::std::vector< Reference< XFormController> > & rControllers = (*i)->GetList();
- for (::std::vector< Reference< XFormController> > ::const_iterator j = rControllers.begin();
+ const ::std::vector< Reference< runtime::XFormController > > & rControllers = (*i)->GetList();
+ for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllers.begin();
j != rControllers.end(); ++j)
{
Reference< XLoadable> xReload((*j)->getModel(), UNO_QUERY);
@@ -3087,13 +3279,13 @@ void FmXFormShell::stopFiltering(sal_Bool bSave)
}
//------------------------------------------------------------------------------
-void clearFilter(const Reference< XFormController>& _rxController)
+void clearFilter(const Reference< runtime::XFormController >& _rxController)
{
Reference< XPropertySet> xControllerAsSet(_rxController, UNO_QUERY);
Reference< XIndexAccess> xControllerAsIndex(_rxController, UNO_QUERY);
// call the subcontroller
- Reference< XFormController> xController;
+ Reference< runtime::XFormController > xController;
for (sal_Int32 i = 0, nCount = xControllerAsIndex->getCount();
i < nCount; i++)
{
@@ -3132,7 +3324,7 @@ void FmXFormShell::clearFilter()
Reference< XControlContainer> xContainer;
if (getActiveController() == m_xExternalViewController)
{
- DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::startFiltering : inconsistent : active external controller, but noone triggered this !");
+ DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::clearFilter : inconsistent : active external controller, but noone triggered this !");
xContainer = m_xExtViewTriggerController->getContainer();
}
else
@@ -3141,8 +3333,8 @@ void FmXFormShell::clearFilter()
FmWinRecList::iterator i = pXView->findWindow(xContainer);
if (i != pXView->getWindowList().end())
{
- const ::std::vector< Reference< XFormController> > & rControllerList = (*i)->GetList();
- for (::std::vector< Reference< XFormController> > ::const_iterator j = rControllerList.begin();
+ const ::std::vector< Reference< runtime::XFormController > > & rControllerList = (*i)->GetList();
+ for (::std::vector< Reference< runtime::XFormController > > ::const_iterator j = rControllerList.begin();
j != rControllerList.end(); ++j)
{
::clearFilter(*j);
@@ -3253,7 +3445,7 @@ void FmXFormShell::restoreControlLocks()
}
//------------------------------------------------------------------------------
-void FmXFormShell::DoAsyncCursorAction(const Reference< XFormController>& _xController, CURSOR_ACTION _eWhat)
+void FmXFormShell::DoAsyncCursorAction(const Reference< runtime::XFormController >& _xController, CURSOR_ACTION _eWhat)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::DoAsyncCursorAction" );
if ( impl_checkDisposed() )
@@ -3329,7 +3521,7 @@ sal_Bool FmXFormShell::HasPendingCursorAction(const Reference< XResultSet>& _xFo
}
//------------------------------------------------------------------------------
-sal_Bool FmXFormShell::HasPendingCursorAction(const Reference< XFormController>& xController) const
+sal_Bool FmXFormShell::HasPendingCursorAction(const Reference< runtime::XFormController >& xController) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::HasPendingCursorAction" );
if ( impl_checkDisposed() )
@@ -3471,7 +3663,7 @@ void FmXFormShell::CreateExternalView()
::rtl::OUString sFrameName = ::rtl::OUString::createFromAscii("_beamer");
sal_Int32 nSearchFlags = ::com::sun::star::frame::FrameSearchFlag::CHILDREN | ::com::sun::star::frame::FrameSearchFlag::CREATE;
- Reference< XFormController> xCurrentNavController( getNavController());
+ Reference< runtime::XFormController > xCurrentNavController( getNavController());
// the creation of the "partwindow" may cause a deactivate of the document which will result in our nav controller to be set to NULL
// _first_ check if we have any valid fields we can use for the grid view
@@ -3538,12 +3730,12 @@ void FmXFormShell::CreateExternalView()
{
if ( m_xExternalViewController == getActiveController() )
{
- Reference< XFormController > xAsFormController( m_xExternalViewController, UNO_QUERY );
+ Reference< runtime::XFormController > xAsFormController( m_xExternalViewController, UNO_QUERY );
ControllerFeatures aHelper( ::comphelper::getProcessServiceFactory(), xAsFormController, NULL );
aHelper->commitCurrentControl();
}
- Reference< XFormController> xNewController(m_xExtViewTriggerController);
+ Reference< runtime::XFormController > xNewController(m_xExtViewTriggerController);
CloseExternalFormViewer();
setActiveController(xNewController);
return;
@@ -3557,28 +3749,8 @@ void FmXFormShell::CreateExternalView()
xClear->dispatch(aClearURL, Sequence< PropertyValue>());
}
- // interception of slots of the external view
- if (m_pExternalViewInterceptor)
- { // already intercepting ...
- if (m_pExternalViewInterceptor->getIntercepted() != xExternalViewFrame)
- { // ... but another frame -> create a new interceptor
- m_pExternalViewInterceptor->dispose();
- m_pExternalViewInterceptor->release();
- m_pExternalViewInterceptor = NULL;
- }
- }
-
- if (!m_pExternalViewInterceptor)
- {
- Reference< ::com::sun::star::frame::XDispatchProviderInterception> xSupplier(xExternalViewFrame, UNO_QUERY);
- ::rtl::OUString sInterceptorScheme = FMURL_FORMSLOTS_PREFIX;
- sInterceptorScheme += ::rtl::OUString::createFromAscii("*");
-// m_pExternalViewInterceptor = new FmXDispatchInterceptorImpl(xSupplier, this, 1, Sequence< ::rtl::OUString >(&sInterceptorScheme, 1));
-// m_pExternalViewInterceptor->acquire();
- // TODO: re-implement this in a easier way than before: We need an interceptor at the xSupplier, which
- // forwards all queryDispatch requests to the FormController instance for which this "external view"
- // was triggered
- }
+ // TODO: We need an interceptor at the xSupplier, which forwards all queryDispatch requests to the FormController
+ // instance for which this "external view" was triggered
// get the dispatch interface of the frame so we can communicate (interceptable) with the controller
Reference< ::com::sun::star::frame::XDispatchProvider> xCommLink(xExternalViewFrame, UNO_QUERY);
@@ -3876,7 +4048,8 @@ void FmXFormShell::CreateExternalView()
// we want to know modifications done in the external view
// if the external controller is a XFormController we can use all our default handlings for it
- Reference< XFormController> xFormController(m_xExternalViewController, UNO_QUERY);
+ Reference< runtime::XFormController > xFormController( m_xExternalViewController, UNO_QUERY );
+ OSL_ENSURE( xFormController.is(), "FmXFormShell::CreateExternalView:: invalid external view controller!" );
if (xFormController.is())
xFormController->addActivateListener((XFormControllerListener*)this);
}
@@ -4162,6 +4335,44 @@ IMPL_LINK( FmXFormShell, OnLoadForms, FmFormPage*, /*_pPage*/ )
return 0L;
}
+//------------------------------------------------------------------------------
+namespace
+{
+ sal_Bool lcl_isLoadable( const Reference< XInterface >& _rxLoadable )
+ {
+ // determines whether a form should be loaded or not
+ // if there is no datasource or connection there is no reason to load a form
+ Reference< XPropertySet > xSet( _rxLoadable, UNO_QUERY );
+ if ( !xSet.is() )
+ return sal_False;
+ try
+ {
+ Reference< XConnection > xConn;
+ if ( OStaticDataAccessTools().isEmbeddedInDatabase( _rxLoadable.get(), xConn ) )
+ return sal_True;
+
+ // is there already a active connection
+ xSet->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xConn;
+ if ( xConn.is() )
+ return sal_True;
+
+ ::rtl::OUString sPropertyValue;
+ OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DATASOURCE ) >>= sPropertyValue );
+ if ( sPropertyValue.getLength() )
+ return sal_True;
+
+ OSL_VERIFY( xSet->getPropertyValue( FM_PROP_URL ) >>= sPropertyValue );
+ if ( sPropertyValue.getLength() )
+ return sal_True;
+ }
+ catch(const Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return sal_False;
+ }
+}
+
//------------------------------------------------------------------------
void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /* FORMS_LOAD | FORMS_SYNC */ )
{
@@ -4206,7 +4417,7 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /
{
if ( 0 == ( _nBehaviour & FORMS_UNLOAD ) )
{
- if ( ::isLoadable( xForm ) && !xForm->isLoaded() )
+ if ( lcl_isLoadable( xForm ) && !xForm->isLoaded() )
xForm->load();
}
else
diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src
index 8b42ccadc6a6..da9b47de43cf 100644
--- a/svx/source/form/fmstring.src
+++ b/svx/source/form/fmstring.src
@@ -130,7 +130,7 @@ String RID_STR_DELETECONFIRM_RECORDS
};
String RID_STR_DELETECONFIRM
{
- Text [ en-US ] = "If you click Yes, you won't be able to undo this operation!\nDo you want to continue anyway?";
+ Text [ en-US ] = "If you click Yes, you won't be able to undo this operation.\nDo you want to continue anyway?";
};
String RID_ERR_NO_ELEMENT
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index b5f583102981..27ea8fc6e7b8 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -89,6 +89,7 @@ namespace svx
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::form;
+ using namespace ::com::sun::star::form::runtime;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::util;
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 0a97bdd981b7..ad4fb46e2a0c 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -30,83 +30,74 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/io/XPersistObject.hpp>
-#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <com/sun/star/sdb/XCompletedConnection.hpp>
-#include <com/sun/star/sdbcx/Privilege.hpp>
-#include <com/sun/star/lang/Locale.hpp>
+
+#include "fmprop.hrc"
+#include "fmservs.hxx"
#include "svx/fmtools.hxx"
#include "svx/dbtoolsclient.hxx"
-#include "fmservs.hxx"
-#include <svx/fmglob.hxx>
-#include <vcl/stdtext.hxx>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
-#include <toolkit/unohlp.hxx>
-#endif
+#include "svx/fmglob.hxx"
-#include <stdlib.h>
-#include <stdio.h>
-#include <wchar.h>
-#include <com/sun/star/uno/XNamingService.hpp>
-#include <com/sun/star/sdbc/XDataSource.hpp>
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/LineEndFormat.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XIntrospection.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/form/XGridColumnFactory.hpp>
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#include <com/sun/star/io/XPersistObject.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
-#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#include <com/sun/star/sdb/ErrorCondition.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
-#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/sdb/XCompletedConnection.hpp>
+#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/XResultSetAccess.hpp>
-#include <com/sun/star/sdb/ErrorCondition.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
-#include <com/sun/star/util/NumberFormat.hpp>
-#include <com/sun/star/io/XActiveDataSink.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/script/XEventAttacherManager.hpp>
-#include <com/sun/star/form/XForm.hpp>
-#include <com/sun/star/form/XFormComponent.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/sdbcx/Privilege.hpp>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/util/Language.hpp>
-#include <com/sun/star/util/XNumberFormats.hpp>
-#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#include <com/sun/star/reflection/XIdlClass.hpp>
-#include <com/sun/star/reflection/XIdlMethod.hpp>
-#include <com/sun/star/beans/XIntrospection.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/awt/LineEndFormat.hpp>
-#include <com/sun/star/form/XGridColumnFactory.hpp>
-
+#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#include <com/sun/star/util/XNumberFormats.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+/** === end UNO includes === **/
-#include <tools/debug.hxx>
-#include <tools/string.hxx>
#include <basic/sbxvar.hxx>
-#include <rtl/math.hxx>
-#include <vcl/svapp.hxx>
-
-#ifndef _SVX_FMPROP_HRC
-#include "fmprop.hrc"
-#endif
-#include <sfx2/bindings.hxx>
-#include <svl/eitem.hxx>
-#include <svl/stritem.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <comphelper/types.hxx>
-#include <comphelper/property.hxx>
#include <comphelper/container.hxx>
-#include <connectivity/dbtools.hxx>
+#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/extract.hxx>
+#include <comphelper/types.hxx>
#include <comphelper/uno3.hxx>
#include <connectivity/dbexception.hxx>
-#include <comphelper/extract.hxx>
+#include <connectivity/dbtools.hxx>
+#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <algorithm>
#include <rtl/logfile.hxx>
+#include <rtl/math.hxx>
+#include <sfx2/bindings.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <toolkit/unohlp.hxx>
+#include <tools/debug.hxx>
+#include <tools/string.hxx>
+#include <vcl/stdtext.hxx>
+#include <vcl/svapp.hxx>
+
+#include <algorithm>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
@@ -204,106 +195,8 @@ void displayException(const ::com::sun::star::sdb::SQLErrorEvent& _rEvent, Windo
}
//------------------------------------------------------------------------------
-Reference< XInterface > cloneUsingProperties(const Reference< ::com::sun::star::io::XPersistObject>& _xObj)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::cloneUsingProperties" );
- if (!_xObj.is())
- return Reference< XInterface >();
-
- // create a new object
- ::rtl::OUString aObjectService = _xObj->getServiceName();
- Reference< ::com::sun::star::beans::XPropertySet> xDestSet(::comphelper::getProcessServiceFactory()->createInstance(aObjectService), UNO_QUERY);
- if (!xDestSet.is())
- {
- DBG_ERROR("cloneUsingProperties : could not instantiate an object of the given type !");
- return Reference< XInterface >();
- }
- // transfer properties
- Reference< XPropertySet > xSourceSet(_xObj, UNO_QUERY);
- Reference< XPropertySetInfo > xSourceInfo( xSourceSet->getPropertySetInfo());
- Sequence< Property> aSourceProperties = xSourceInfo->getProperties();
- Reference< XPropertySetInfo > xDestInfo( xDestSet->getPropertySetInfo());
- Sequence< Property> aDestProperties = xDestInfo->getProperties();
- int nDestLen = aDestProperties.getLength();
-
- Property* pSourceProps = aSourceProperties.getArray();
- Property* pSourceEnd = pSourceProps + aSourceProperties.getLength();
- Property* pDestProps = aDestProperties.getArray();
-
- for (; pSourceProps != pSourceEnd; ++pSourceProps)
- {
- ::com::sun::star::beans::Property* pResult = ::std::lower_bound(
- pDestProps,
- pDestProps + nDestLen,
- pSourceProps->Name,
- ::comphelper::PropertyStringLessFunctor()
- );
-
- if ( ( pResult != pDestProps + nDestLen )
- && ( pResult->Name == pSourceProps->Name )
- && ( pResult->Attributes == pSourceProps->Attributes )
- && ( (pResult->Attributes & PropertyAttribute::READONLY ) == 0 )
- && ( pResult->Type.equals( pSourceProps->Type ) )
- )
- { // Attribute/type are the same and the prop isn't readonly
- try
- {
- xDestSet->setPropertyValue(pResult->Name, xSourceSet->getPropertyValue(pResult->Name));
- }
- catch(IllegalArgumentException e)
- {
- (void)e;
-#ifdef DBG_UTIL
- ::rtl::OString sMessage("cloneUsingProperties : could not transfer the value for property \"");
- sMessage = sMessage + ::rtl::OString(pResult->Name.getStr(), pResult->Name.getLength(), RTL_TEXTENCODING_ASCII_US);
- sMessage = sMessage + '\"';
- DBG_ERROR(sMessage);
-#endif
- }
-
- }
- }
-
- return xDestSet.get();
-}
-
-//------------------------------------------------------------------------------
-sal_Bool searchElement(const Reference< ::com::sun::star::container::XIndexAccess>& xCont, const Reference< XInterface >& xElement)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::searchElement" );
- if (!xCont.is() || !xElement.is())
- return sal_False;
-
- sal_Int32 nCount = xCont->getCount();
- Reference< XInterface > xComp;
- for (sal_Int32 i = 0; i < nCount; i++)
- {
- try
- {
- xCont->getByIndex(i) >>= xComp;
- if (xComp.is())
- {
- if ( xElement == xComp )
- return sal_True;
- else
- {
- Reference< ::com::sun::star::container::XIndexAccess> xCont2(xComp, UNO_QUERY);
- if (xCont2.is() && searchElement(xCont2, xElement))
- return sal_True;
- }
- }
- }
- catch(Exception&)
- {
- }
- }
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAccess>& xCont, const Reference< XInterface >& xElement)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::getElementPos" );
sal_Int32 nIndex = -1;
if (!xCont.is())
return nIndex;
@@ -336,127 +229,6 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce
}
//------------------------------------------------------------------
-String getFormComponentAccessPath(const Reference< XInterface >& _xElement, Reference< XInterface >& _rTopLevelElement)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::getFormComponentAccessPath" );
- Reference< ::com::sun::star::form::XFormComponent> xChild(_xElement, UNO_QUERY);
- Reference< ::com::sun::star::container::XIndexAccess> xParent;
- if (xChild.is())
- xParent = Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), UNO_QUERY);
-
- // while the current content is a form
- String sReturn;
- String sCurrentIndex;
- while (xChild.is())
- {
- // get the content's relative pos within it's parent container
- sal_Int32 nPos = getElementPos(xParent, xChild);
-
- // prepend this current relaive pos
- sCurrentIndex = String::CreateFromInt32(nPos);
- if (sReturn.Len() != 0)
- {
- sCurrentIndex += '\\';
- sCurrentIndex += sReturn;
- }
-
- sReturn = sCurrentIndex;
-
- // travel up
- if (::comphelper::query_interface((Reference< XInterface >)xParent,xChild))
- xParent = Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), UNO_QUERY);
- }
-
- _rTopLevelElement = xParent;
- return sReturn;
-}
-
-//------------------------------------------------------------------
-String getFormComponentAccessPath(const Reference< XInterface >& _xElement)
-{
- Reference< XInterface > xDummy;
- return getFormComponentAccessPath(_xElement, xDummy);
-}
-
-//------------------------------------------------------------------------------
-Reference< XInterface > getElementFromAccessPath(const Reference< ::com::sun::star::container::XIndexAccess>& _xParent, const String& _rRelativePath)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::getElementFromAccessPath" );
- if (!_xParent.is())
- return Reference< XInterface >();
- Reference< ::com::sun::star::container::XIndexAccess> xContainer(_xParent);
- Reference< XInterface > xElement( _xParent);
-
- String sPath(_rRelativePath);
- while (sPath.Len() && xContainer.is())
- {
- xub_StrLen nSepPos = sPath.Search((sal_Unicode)'\\');
-
- String sIndex(sPath.Copy(0, (nSepPos == STRING_NOTFOUND) ? sPath.Len() : nSepPos));
- // DBG_ASSERT(sIndex.IsNumeric(), "getElementFromAccessPath : invalid path !");
-
- sPath = sPath.Copy((nSepPos == STRING_NOTFOUND) ? sPath.Len() : nSepPos+1);
-
- ::cppu::extractInterface(xElement, xContainer->getByIndex(sIndex.ToInt32()));
- xContainer = Reference< ::com::sun::star::container::XIndexAccess>::query(xElement);
- }
-
- if (sPath.Len() != 0)
- // the loop terminated because an element wasn't a container, but we stil have a path -> the path is invalid
- xElement = NULL;
-
- return xElement;
-}
-
-//------------------------------------------------------------------
-// Vergleichen von PropertyInfo
-extern "C" int
-#if defined( WNT )
- __cdecl
-#endif
-#if defined( ICC ) && defined( OS2 )
-_Optlink
-#endif
- NameCompare(const void* pFirst, const void* pSecond)
-{
- return ((::rtl::OUString*)pFirst)->compareTo(*(::rtl::OUString*)pSecond);
-}
-
-//------------------------------------------------------------------------------
-sal_Int32 findPos(const ::rtl::OUString& aStr, const Sequence< ::rtl::OUString>& rList)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::findPos" );
- const ::rtl::OUString* pStrList = rList.getConstArray();
- ::rtl::OUString* pResult = (::rtl::OUString*) bsearch(&aStr, (void*)pStrList, rList.getLength(), sizeof(::rtl::OUString),
- &NameCompare);
-
- if (pResult)
- return (pResult - pStrList);
- else
- return -1;
-}
-
-//------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XModel> getXModel(const Reference< XInterface >& xIface)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::getXModel" );
- Reference< ::com::sun::star::frame::XModel> xModel(xIface, UNO_QUERY);
- if (xModel.is())
- return xModel;
- else
- {
- Reference< ::com::sun::star::container::XChild> xChild(xIface, UNO_QUERY);
- if (xChild.is())
- {
- Reference< XInterface > xParent( xChild->getParent());
- return getXModel(xParent);
- }
- else
- return NULL;
- }
-}
-
-//------------------------------------------------------------------
::rtl::OUString getLabelName(const Reference< ::com::sun::star::beans::XPropertySet>& xControlModel)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::getLabelName" );
@@ -690,412 +462,6 @@ sal_Int16 getControlTypeByObject(const Reference< ::com::sun::star::lang::XServi
}
//------------------------------------------------------------------------------
-::rtl::OUString getServiceNameByControlType(sal_Int16 nType)
-{
- switch (nType)
- {
- case OBJ_FM_EDIT : return FM_COMPONENT_TEXTFIELD;
- case OBJ_FM_BUTTON : return FM_COMPONENT_COMMANDBUTTON;
- case OBJ_FM_FIXEDTEXT : return FM_COMPONENT_FIXEDTEXT;
- case OBJ_FM_LISTBOX : return FM_COMPONENT_LISTBOX;
- case OBJ_FM_CHECKBOX : return FM_COMPONENT_CHECKBOX;
- case OBJ_FM_RADIOBUTTON : return FM_COMPONENT_RADIOBUTTON;
- case OBJ_FM_GROUPBOX : return FM_COMPONENT_GROUPBOX;
- case OBJ_FM_COMBOBOX : return FM_COMPONENT_COMBOBOX;
- case OBJ_FM_GRID : return FM_COMPONENT_GRIDCONTROL;
- case OBJ_FM_IMAGEBUTTON : return FM_COMPONENT_IMAGEBUTTON;
- case OBJ_FM_FILECONTROL : return FM_COMPONENT_FILECONTROL;
- case OBJ_FM_DATEFIELD : return FM_COMPONENT_DATEFIELD;
- case OBJ_FM_TIMEFIELD : return FM_COMPONENT_TIMEFIELD;
- case OBJ_FM_NUMERICFIELD : return FM_COMPONENT_NUMERICFIELD;
- case OBJ_FM_CURRENCYFIELD : return FM_COMPONENT_CURRENCYFIELD;
- case OBJ_FM_PATTERNFIELD : return FM_COMPONENT_PATTERNFIELD;
- case OBJ_FM_HIDDEN : return FM_COMPONENT_HIDDENCONTROL;
- case OBJ_FM_IMAGECONTROL : return FM_COMPONENT_IMAGECONTROL;
- case OBJ_FM_FORMATTEDFIELD : return FM_COMPONENT_FORMATTEDFIELD;
- case OBJ_FM_SCROLLBAR : return FM_SUN_COMPONENT_SCROLLBAR;
- case OBJ_FM_SPINBUTTON : return FM_SUN_COMPONENT_SPINBUTTON;
- case OBJ_FM_NAVIGATIONBAR : return FM_SUN_COMPONENT_NAVIGATIONBAR;
- }
- return ::rtl::OUString();
-}
-//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString> getEventMethods(const Type& type)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::getEventMethods" );
- typelib_InterfaceTypeDescription *pType=0;
- type.getDescription( (typelib_TypeDescription**)&pType);
-
- if(!pType)
- return Sequence< ::rtl::OUString>();
-
- Sequence< ::rtl::OUString> aNames(pType->nMembers);
- ::rtl::OUString* pNames = aNames.getArray();
- for(sal_Int32 i=0;i<pType->nMembers;i++,++pNames)
- {
- // the decription reference
- typelib_TypeDescriptionReference* pMemberDescriptionReference = pType->ppMembers[i];
- // the description for the reference
- typelib_TypeDescription* pMemberDescription = NULL;
- typelib_typedescriptionreference_getDescription(&pMemberDescription, pMemberDescriptionReference);
- if (pMemberDescription)
- {
- typelib_InterfaceMemberTypeDescription* pRealMemberDescription =
- reinterpret_cast<typelib_InterfaceMemberTypeDescription*>(pMemberDescription);
- *pNames = pRealMemberDescription->pMemberName;
- }
- }
- typelib_typedescription_release( (typelib_TypeDescription *)pType );
- return aNames;
-}
-
-
-//------------------------------------------------------------------------------
-void TransferEventScripts(const Reference< ::com::sun::star::awt::XControlModel>& xModel, const Reference< ::com::sun::star::awt::XControl>& xControl,
- const Sequence< ::com::sun::star::script::ScriptEventDescriptor>& rTransferIfAvailable)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::TransferEventScripts" );
- // first check if we have a XEventAttacherManager for the model
- Reference< ::com::sun::star::container::XChild> xModelChild(xModel, UNO_QUERY);
- if (!xModelChild.is())
- return; // nothing to do
-
- Reference< ::com::sun::star::script::XEventAttacherManager> xEventManager(xModelChild->getParent(), UNO_QUERY);
- if (!xEventManager.is())
- return; // nothing to do
-
- if (!rTransferIfAvailable.getLength())
- return; // nothing to do
-
- // check for the index of the model within it's parent
- Reference< ::com::sun::star::container::XIndexAccess> xParentIndex(xModelChild->getParent(), UNO_QUERY);
- if (!xParentIndex.is())
- return; // nothing to do
- sal_Int32 nIndex = getElementPos(xParentIndex, xModel);
- if (nIndex<0 || nIndex>=xParentIndex->getCount())
- return; // nothing to do
-
- // then we need informations about the listeners supported by the control and the model
- Sequence< Type> aModelListeners;
- Sequence< Type> aControlListeners;
-
- Reference< ::com::sun::star::beans::XIntrospection> xModelIntrospection(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.beans.Introspection")), UNO_QUERY);
- Reference< ::com::sun::star::beans::XIntrospection> xControlIntrospection(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.beans.Introspection")), UNO_QUERY);
-
- if (xModelIntrospection.is() && xModel.is())
- {
- Any aModel(makeAny(xModel));
- aModelListeners = xModelIntrospection->inspect(aModel)->getSupportedListeners();
- }
-
- if (xControlIntrospection.is() && xControl.is())
- {
- Any aControl(makeAny(xControl));
- aControlListeners = xControlIntrospection->inspect(aControl)->getSupportedListeners();
- }
-
- sal_Int32 nMaxNewLen = aModelListeners.getLength() + aControlListeners.getLength();
- if (!nMaxNewLen)
- return; // the model and the listener don't support any listeners (or we were unable to retrieve these infos)
-
- Sequence< ::com::sun::star::script::ScriptEventDescriptor> aTransferable(nMaxNewLen);
- ::com::sun::star::script::ScriptEventDescriptor* pTransferable = aTransferable.getArray();
-
- const ::com::sun::star::script::ScriptEventDescriptor* pCurrent = rTransferIfAvailable.getConstArray();
- sal_Int32 i,j,k;
- for (i=0; i<rTransferIfAvailable.getLength(); ++i, ++pCurrent)
- {
- // search the model/control idl classes for the event described by pCurrent
- for ( Sequence< Type>* pCurrentArray = &aModelListeners;
- pCurrentArray;
- pCurrentArray = (pCurrentArray == &aModelListeners) ? &aControlListeners : NULL
- )
- {
- const Type* pCurrentListeners = pCurrentArray->getConstArray();
- for (j=0; j<pCurrentArray->getLength(); ++j, ++pCurrentListeners)
- {
- UniString aListener = (*pCurrentListeners).getTypeName();
- xub_StrLen nTokens = aListener.GetTokenCount('.');
- if (nTokens)
- aListener = aListener.GetToken(nTokens - 1, '.');
-
- if (aListener == pCurrent->ListenerType.getStr())
- // the current ::com::sun::star::script::ScriptEventDescriptor doesn't match the current listeners class
- continue;
-
- // now check the methods
- Sequence< ::rtl::OUString> aMethodsNames = getEventMethods(*pCurrentListeners);
- const ::rtl::OUString* pMethodsNames = aMethodsNames.getConstArray();
- for (k=0; k<aMethodsNames.getLength(); ++k, ++pMethodsNames)
- {
- if ((*pMethodsNames).compareTo(pCurrent->EventMethod) != COMPARE_EQUAL)
- // the current ::com::sun::star::script::ScriptEventDescriptor doesn't match the current listeners current method
- continue;
-
- // we can transfer the script event : the model (control) supports it
- *pTransferable = *pCurrent;
- ++pTransferable;
- break;
- }
- if (k<aMethodsNames.getLength())
- break;
- }
- }
- }
-
- sal_Int32 nRealNewLen = pTransferable - aTransferable.getArray();
- aTransferable.realloc(nRealNewLen);
-
- xEventManager->registerScriptEvents(nIndex, aTransferable);
-}
-
-//------------------------------------------------------------------------------
-sal_Int16 GridView2ModelPos(const Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nViewPos)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::GridView2ModelPos" );
- try
- {
- if (rColumns.is())
- {
- // loop through all columns
- sal_Int16 i;
- Reference< ::com::sun::star::beans::XPropertySet> xCur;
- for (i=0; i<rColumns->getCount(); ++i)
- {
- rColumns->getByIndex(i) >>= xCur;
- if (!::comphelper::getBOOL(xCur->getPropertyValue(FM_PROP_HIDDEN)))
- {
- // for every visible col : if nViewPos is greater zero, decrement it, else we
- // have found the model position
- if (!nViewPos)
- break;
- else
- --nViewPos;
- }
- }
- if (i<rColumns->getCount())
- return i;
- }
- }
- catch(const Exception&)
- {
- DBG_ERROR("GridView2ModelPos Exception occured!");
- }
- return (sal_Int16)-1;
-}
-
-//========================================================================
-//= FmXDispatchInterceptorImpl
-//========================================================================
-
-DBG_NAME(FmXDispatchInterceptorImpl);
-//------------------------------------------------------------------------
-FmXDispatchInterceptorImpl::FmXDispatchInterceptorImpl(
- const Reference< XDispatchProviderInterception >& _rxToIntercept, FmDispatchInterceptor* _pMaster,
- sal_Int16 _nId, Sequence< ::rtl::OUString > _rInterceptedSchemes)
- :FmXDispatchInterceptorImpl_BASE(_pMaster && _pMaster->getInterceptorMutex() ? *_pMaster->getInterceptorMutex() : m_aFallback)
- ,m_xIntercepted(_rxToIntercept)
- ,m_bListening(sal_False)
- ,m_pMaster(_pMaster)
- ,m_nId(_nId)
- ,m_aInterceptedURLSchemes(_rInterceptedSchemes)
-{
- DBG_CTOR(FmXDispatchInterceptorImpl,NULL);
-
- ::osl::MutexGuard aGuard(getAccessSafety());
- ::comphelper::increment(m_refCount);
- if (_rxToIntercept.is())
- {
- _rxToIntercept->registerDispatchProviderInterceptor((::com::sun::star::frame::XDispatchProviderInterceptor*)this);
- // this should make us the top-level dispatch-provider for the component, via a call to our
- // setDispatchProvider we should have got an fallback for requests we (i.e. our master) cannot fullfill
- Reference< ::com::sun::star::lang::XComponent> xInterceptedComponent(_rxToIntercept, UNO_QUERY);
- if (xInterceptedComponent.is())
- {
- xInterceptedComponent->addEventListener(this);
- m_bListening = sal_True;
- }
- }
- ::comphelper::decrement(m_refCount);
-}
-
-//------------------------------------------------------------------------
-FmXDispatchInterceptorImpl::~FmXDispatchInterceptorImpl()
-{
- if (!rBHelper.bDisposed)
- dispose();
-
- DBG_DTOR(FmXDispatchInterceptorImpl,NULL);
-}
-
-//------------------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL FmXDispatchInterceptorImpl::getImplementationId() throw(RuntimeException)
-{
- static ::cppu::OImplementationId* pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-
-//------------------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XDispatch > SAL_CALL FmXDispatchInterceptorImpl::queryDispatch( const URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(RuntimeException)
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- Reference< ::com::sun::star::frame::XDispatch> xResult;
- // ask our 'real' interceptor
- if (m_pMaster)
- xResult = m_pMaster->interceptedQueryDispatch(m_nId, aURL, aTargetFrameName, nSearchFlags);
-
- // ask our slave provider
- if (!xResult.is() && m_xSlaveDispatcher.is())
- xResult = m_xSlaveDispatcher->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
-
- return xResult;
-}
-
-//------------------------------------------------------------------------------
-Sequence< Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL
-FmXDispatchInterceptorImpl::queryDispatches( const Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw(RuntimeException)
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- Sequence< Reference< ::com::sun::star::frame::XDispatch> > aReturn(aDescripts.getLength());
- Reference< ::com::sun::star::frame::XDispatch>* pReturn = aReturn.getArray();
- const ::com::sun::star::frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray();
- for (sal_Int16 i=0; i<aDescripts.getLength(); ++i, ++pReturn, ++pDescripts)
- {
- *pReturn = queryDispatch(pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags);
- }
- return aReturn;
-}
-
-//------------------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL FmXDispatchInterceptorImpl::getSlaveDispatchProvider( ) throw(RuntimeException)
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- return m_xSlaveDispatcher;
-}
-
-//------------------------------------------------------------------------------
-void SAL_CALL FmXDispatchInterceptorImpl::setSlaveDispatchProvider(const Reference< ::com::sun::star::frame::XDispatchProvider>& xNewDispatchProvider) throw( RuntimeException )
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- m_xSlaveDispatcher = xNewDispatchProvider;
-}
-
-//------------------------------------------------------------------------------
-Reference< ::com::sun::star::frame::XDispatchProvider> SAL_CALL FmXDispatchInterceptorImpl::getMasterDispatchProvider(void) throw( RuntimeException )
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- return m_xMasterDispatcher;
-}
-
-//------------------------------------------------------------------------------
-void SAL_CALL FmXDispatchInterceptorImpl::setMasterDispatchProvider(const Reference< ::com::sun::star::frame::XDispatchProvider>& xNewSupplier) throw( RuntimeException )
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- m_xMasterDispatcher = xNewSupplier;
-}
-
-//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > SAL_CALL FmXDispatchInterceptorImpl::getInterceptedURLs( ) throw(RuntimeException)
-{
- return m_aInterceptedURLSchemes;
-}
-
-//------------------------------------------------------------------------------
-void SAL_CALL FmXDispatchInterceptorImpl::disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException )
-{
- if (m_bListening)
- {
- Reference< XDispatchProviderInterception > xIntercepted(m_xIntercepted.get(), UNO_QUERY);
- if (Source.Source == xIntercepted)
- ImplDetach();
- }
-}
-
-//------------------------------------------------------------------------------
-void FmXDispatchInterceptorImpl::ImplDetach()
-{
- ::osl::MutexGuard aGuard(getAccessSafety());
- OSL_ENSURE(m_bListening, "FmXDispatchInterceptorImpl::ImplDetach: invalid call!");
-
- // deregister ourself from the interception component
- Reference< XDispatchProviderInterception > xIntercepted(m_xIntercepted.get(), UNO_QUERY);
- if (xIntercepted.is())
- xIntercepted->releaseDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this));
-
-// m_xIntercepted = Reference< XDispatchProviderInterception >();
- // Don't reset m_xIntercepted: It may be needed by our owner to check for which object we were
- // responsible. As we hold the object with a weak reference only, this should be no problem.
- // 88936 - 23.07.2001 - frank.schoenheit@sun.com
- m_pMaster = NULL;
- m_bListening = sal_False;
-}
-
-//------------------------------------------------------------------------------
-void FmXDispatchInterceptorImpl::disposing()
-{
- // remove ourself as event listener from the interception component
- if (m_bListening)
- {
- Reference< ::com::sun::star::lang::XComponent> xInterceptedComponent(m_xIntercepted.get(), UNO_QUERY);
- if (xInterceptedComponent.is())
- xInterceptedComponent->removeEventListener(static_cast<XEventListener*>(this));
-
- // detach from the interception component
- ImplDetach();
- }
-}
-
-//==============================================================================
-//==============================================================================
-
-//------------------------------------------------------------------------------
-sal_Bool isLoadable( const Reference< XInterface >& _rxLoadable )
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::isLoadable" );
- // determines whether a form should be loaded or not
- // if there is no datasource or connection there is no reason to load a form
- Reference< XPropertySet > xSet( _rxLoadable, UNO_QUERY );
- if ( xSet.is() )
- {
- try
- {
- Reference< XConnection > xConn;
- if ( OStaticDataAccessTools().isEmbeddedInDatabase( _rxLoadable.get(), xConn ) )
- return sal_True;
-
- // is there already a active connection
- xSet->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xConn;
- if ( xConn.is() )
- return sal_True;
-
- ::rtl::OUString sPropertyValue;
- OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DATASOURCE ) >>= sPropertyValue );
- if ( sPropertyValue.getLength() )
- return sal_True;
-
- OSL_VERIFY( xSet->getPropertyValue( FM_PROP_URL ) >>= sPropertyValue );
- if ( sPropertyValue.getLength() )
- return sal_True;
- }
- catch(Exception&)
- {
- DBG_ERROR( "isLoadable: caught an exception!" );
- }
-
- }
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
void setConnection(const Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet, const Reference< ::com::sun::star::sdbc::XConnection>& _rxConn)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "fmtools::setConnection" );
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index b88bf659418c..66d16674a2b7 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -30,12 +30,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include "fmundo.hxx"
+#include "fmpgeimp.hxx"
+#include "svx/dbtoolsclient.hxx"
+#include "svditer.hxx"
+#include "fmobj.hxx"
+#include "fmprop.hrc"
+#include "fmresids.hrc"
+#include "svx/fmglob.hxx"
+#include "svx/dialmgr.hxx"
+#include "svx/fmmodel.hxx"
+#include "svx/fmpage.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/form/XFormController.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
@@ -44,18 +54,8 @@
#include <com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp>
/** === end UNO includes === **/
-#ifndef _FM_FMMODEL_HXX
-#include <svx/fmmodel.hxx>
-#endif
#include "svx/fmtools.hxx"
-#include <svx/fmpage.hxx>
-#ifndef _SVX_FMRESIDS_HRC
-#include "fmresids.hrc"
-#endif
#include <rtl/logfile.hxx>
-#include <svx/dialmgr.hxx>
-#include "fmpgeimp.hxx"
-#include "svx/dbtoolsclient.hxx"
#include <svl/macitem.hxx>
#include <tools/shl.hxx>
#include <tools/diagnose_ex.h>
@@ -64,13 +64,8 @@
#include <sfx2/app.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/event.hxx>
-#include "svditer.hxx"
-#include "fmobj.hxx"
#include <osl/mutex.hxx>
-#include <svx/fmglob.hxx>
-#ifndef _SVX_FMPROP_HRC
-#include "fmprop.hrc"
-#endif
+#include <vos/mutex.hxx>
#include <comphelper/property.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
@@ -301,6 +296,42 @@ void FmXUndoEnvironment::Inserted(SdrObject* pObj)
}
//------------------------------------------------------------------------------
+namespace
+{
+ sal_Bool lcl_searchElement(const Reference< XIndexAccess>& xCont, const Reference< XInterface >& xElement)
+ {
+ if (!xCont.is() || !xElement.is())
+ return sal_False;
+
+ sal_Int32 nCount = xCont->getCount();
+ Reference< XInterface > xComp;
+ for (sal_Int32 i = 0; i < nCount; i++)
+ {
+ try
+ {
+ xCont->getByIndex(i) >>= xComp;
+ if (xComp.is())
+ {
+ if ( xElement == xComp )
+ return sal_True;
+ else
+ {
+ Reference< XIndexAccess> xCont2(xComp, UNO_QUERY);
+ if (xCont2.is() && lcl_searchElement(xCont2, xElement))
+ return sal_True;
+ }
+ }
+ }
+ catch(const Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ return sal_False;
+ }
+}
+
+//------------------------------------------------------------------------------
void FmXUndoEnvironment::Inserted(FmFormObj* pObj)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::Inserted" );
@@ -326,7 +357,7 @@ void FmXUndoEnvironment::Inserted(FmFormObj* pObj)
Reference< XIndexContainer > xNewParent;
Reference< XForm > xForm;
sal_Int32 nPos = -1;
- if ( searchElement( xForms, xObjectParent ) )
+ if ( lcl_searchElement( xForms, xObjectParent ) )
{
// the form which was the parent of the object when it was removed is still
// part of the form component hierachy of the current page
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index fff345413296..b4e4b46561e0 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -626,7 +626,7 @@ void FmFormView::createControlLabelPair( OutputDevice* _pOutDev, sal_Int32 _nXOf
);
}
// -----------------------------------------------------------------------------
-Reference< XFormController > FmFormView::GetFormController( const Reference< XForm >& _rxForm, const OutputDevice& _rDevice ) const
+Reference< runtime::XFormController > FmFormView::GetFormController( const Reference< XForm >& _rxForm, const OutputDevice& _rDevice ) const
{
return pImpl->getFormController( _rxForm, _rDevice );
}
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 0e7592d4b3a0..2206d8b59928 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "fmctrler.hxx"
#include "fmdocumentclassification.hxx"
#include "fmobj.hxx"
#include "fmpgeimp.hxx"
@@ -84,68 +83,88 @@
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbc/XPreparedStatement.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#include <com/sun/star/container/XContainer.hpp>
/** === end UNO includes === **/
#include <comphelper/enumhelper.hxx>
#include <comphelper/extract.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numbers.hxx>
#include <comphelper/property.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <unotools/moduleoptions.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/msgbox.hxx>
#include <vcl/stdtext.hxx>
+#include <vos/mutex.hxx>
#include <rtl/logfile.hxx>
#include <algorithm>
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::form;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::script;
-using namespace ::com::sun::star::style;
-using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::ui::dialogs;
using namespace ::comphelper;
-using namespace ::svxform;
using namespace ::svx;
-using com::sun::star::style::VerticalAlignment_MIDDLE;
-using ::com::sun::star::form::binding::XValueBinding;
-using ::com::sun::star::form::binding::XBindableValue;
-
-namespace svxform
-{
- //========================================================================
- class OAutoDispose
- {
- protected:
- Reference< XComponent > m_xComp;
-
- public:
- OAutoDispose( const Reference< XInterface > _rxObject );
- ~OAutoDispose();
- };
+using namespace ::svxform;
- //------------------------------------------------------------------------
- OAutoDispose::OAutoDispose( const Reference< XInterface > _rxObject )
- :m_xComp(_rxObject, UNO_QUERY)
- {
- }
-
- //------------------------------------------------------------------------
- OAutoDispose::~OAutoDispose()
- {
- if (m_xComp.is())
- m_xComp->dispose();
- }
-}
+ using namespace ::com::sun::star;
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::style::VerticalAlignment_MIDDLE;
+ using ::com::sun::star::form::FormButtonType_SUBMIT;
+ using ::com::sun::star::form::binding::XValueBinding;
+ using ::com::sun::star::form::binding::XBindableValue;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::container::XIndexAccess;
+ using ::com::sun::star::form::XForm;
+ using ::com::sun::star::form::runtime::XFormController;
+ using ::com::sun::star::script::XEventAttacherManager;
+ using ::com::sun::star::awt::XTabControllerModel;
+ using ::com::sun::star::container::XChild;
+ using ::com::sun::star::container::XEnumeration;
+ using ::com::sun::star::task::XInteractionHandler;
+ using ::com::sun::star::lang::XInitialization;
+ using ::com::sun::star::awt::XTabController;
+ using ::com::sun::star::lang::XUnoTunnel;
+ using ::com::sun::star::awt::XControlContainer;
+ using ::com::sun::star::awt::XControl;
+ using ::com::sun::star::form::XFormComponent;
+ using ::com::sun::star::form::XForm;
+ using ::com::sun::star::lang::IndexOutOfBoundsException;
+ using ::com::sun::star::lang::WrappedTargetException;
+ using ::com::sun::star::container::XContainer;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::beans::NamedValue;
+ using ::com::sun::star::sdb::SQLErrorEvent;
+ using ::com::sun::star::sdbc::XRowSet;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::container::XElementAccess;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::awt::FocusEvent;
+ using ::com::sun::star::ui::dialogs::XExecutableDialog;
+ using ::com::sun::star::sdbc::XDataSource;
+ using ::com::sun::star::container::XIndexContainer;
+ using ::com::sun::star::sdbc::XConnection;
+ using ::com::sun::star::container::XNameAccess;
+ using ::com::sun::star::sdb::SQLContext;
+ using ::com::sun::star::sdbc::SQLWarning;
+ using ::com::sun::star::sdbc::SQLException;
+ using ::com::sun::star::util::XNumberFormatsSupplier;
+ using ::com::sun::star::util::XNumberFormats;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ /** === end UNO using === **/
+ namespace FormComponentType = ::com::sun::star::form::FormComponentType;
+ namespace CommandType = ::com::sun::star::sdb::CommandType;
+ namespace DataType = ::com::sun::star::sdbc::DataType;
//------------------------------------------------------------------------------
class FmXFormView::ObjectRemoveListener : public SfxListener
@@ -181,7 +200,7 @@ FmXPageViewWinRec::FmXPageViewWinRec( const ::comphelper::ComponentContext& _rCo
{
Reference< XForm > xForm( xForms->getByIndex(i), UNO_QUERY );
if ( xForm.is() )
- setController( xForm );
+ setController( xForm, NULL );
}
}
catch( const Exception& )
@@ -207,7 +226,7 @@ void FmXPageViewWinRec::dispose()
{
try
{
- Reference< XFormController > xController( *i, UNO_SET_THROW );
+ Reference< XFormController > xController( *i, UNO_QUERY_THROW );
// detaching the events
Reference< XChild > xControllerModel( xController->getModel(), UNO_QUERY );
@@ -276,6 +295,21 @@ Any SAL_CALL FmXPageViewWinRec::getByIndex(sal_Int32 nIndex) throw( IndexOutOfBo
}
//------------------------------------------------------------------------
+void SAL_CALL FmXPageViewWinRec::makeVisible( const Reference< XControl >& _Control ) throw (RuntimeException)
+{
+ ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+
+ Reference< XWindow > xWindow( _Control, UNO_QUERY );
+ if ( xWindow.is() && m_pViewImpl->getView() && m_pWindow )
+ {
+ awt::Rectangle aRect = xWindow->getPosSize();
+ ::Rectangle aNewRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height );
+ aNewRect = m_pWindow->PixelToLogic( aNewRect );
+ m_pViewImpl->getView()->MakeVisible( aNewRect, *m_pWindow );
+ }
+}
+
+//------------------------------------------------------------------------
Reference< XFormController > getControllerSearchChilds( const Reference< XIndexAccess > & xIndex, const Reference< XTabControllerModel > & xModel)
{
if (xIndex.is() && xIndex->getCount())
@@ -319,9 +353,8 @@ Reference< XFormController > FmXPageViewWinRec::getController( const Reference<
}
//------------------------------------------------------------------------
-void FmXPageViewWinRec::setController(const Reference< XForm > & xForm, FmXFormController* _pParent )
+void FmXPageViewWinRec::setController(const Reference< XForm > & xForm, const Reference< XFormController >& _rxParentController )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXPageViewWinRec::setController" );
DBG_ASSERT( xForm.is(), "FmXPageViewWinRec::setController: there should be a form!" );
Reference< XIndexAccess > xFormCps(xForm, UNO_QUERY);
if (!xFormCps.is())
@@ -330,58 +363,52 @@ void FmXPageViewWinRec::setController(const Reference< XForm > & xForm, FmXForm
Reference< XTabControllerModel > xTabOrder(xForm, UNO_QUERY);
// create a form controller
- FmXFormController* pController = new FmXFormController( m_aContext.getLegacyServiceFactory(), m_pViewImpl->getView(), m_pWindow );
- Reference< XFormController > xController( pController );
+ Reference< XFormController > xController( m_aContext.createComponent( FM_FORM_CONTROLLER ), UNO_QUERY );
+ if ( !xController.is() )
+ {
+ ShowServiceNotAvailableError( m_pWindow, FM_FORM_CONTROLLER, sal_True );
+ return;
+ }
Reference< XInteractionHandler > xHandler;
- if ( _pParent )
- xHandler = _pParent->getInteractionHandler();
+ if ( _rxParentController.is() )
+ xHandler = _rxParentController->getInteractionHandler();
else
{
// TODO: should we create a default handler? Not really necessary, since the
// FormController itself has a default fallback
}
if ( xHandler.is() )
- {
- Reference< XInitialization > xInitController( xController, UNO_QUERY );
- DBG_ASSERT( xInitController.is(), "FmXPageViewWinRec::setController: can't initialize the controller!" );
- if ( xInitController.is() )
- {
- Sequence< Any > aInitArgs( 1 );
- aInitArgs[ 0 ] <<= NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) ), makeAny( xHandler ) );
- xInitController->initialize( aInitArgs );
- }
- }
+ xController->setInteractionHandler( xHandler );
- pController->setModel(xTabOrder);
- pController->setContainer( m_xControlContainer );
- pController->activateTabOrder();
- pController->addActivateListener(m_pViewImpl);
+ xController->setContext( this );
- if ( _pParent )
- _pParent->addChild(pController);
+ xController->setModel( xTabOrder );
+ xController->setContainer( m_xControlContainer );
+ xController->activateTabOrder();
+ xController->addActivateListener( m_pViewImpl );
+
+ if ( _rxParentController.is() )
+ _rxParentController->addChildController( xController );
else
{
- // Reference< XFormController > xController(pController);
m_aControllerList.push_back(xController);
- pController->setParent(*this);
+ xController->setParent( *this );
// attaching the events
- Reference< XEventAttacherManager > xEventManager(xForm->getParent(), UNO_QUERY);
+ Reference< XEventAttacherManager > xEventManager( xForm->getParent(), UNO_QUERY );
Reference< XInterface > xIfc(xController, UNO_QUERY);
xEventManager->attach(m_aControllerList.size() - 1, xIfc, makeAny(xController) );
}
-
-
// jetzt die Subforms durchgehen
sal_uInt32 nLength = xFormCps->getCount();
Reference< XForm > xSubForm;
for (sal_uInt32 i = 0; i < nLength; i++)
{
if ( xFormCps->getByIndex(i) >>= xSubForm )
- setController(xSubForm, pController);
+ setController( xSubForm, xController );
}
}
@@ -406,18 +433,12 @@ void FmXPageViewWinRec::updateTabOrder( const Reference< XForm >& _rxForm )
// if it's a sub form, then we must ensure there exist TabControllers
// for all its ancestors, too
Reference< XForm > xParentForm( _rxForm->getParent(), UNO_QUERY );
- FmXFormController* pFormController = NULL;
// there is a parent form -> look for the respective controller
+ Reference< XFormController > xParentController;
if ( xParentForm.is() )
- xTabCtrl = Reference< XTabController >( getController( xParentForm ), UNO_QUERY );
+ xParentController.set( getController( xParentForm ), UNO_QUERY );
- if ( xTabCtrl.is() )
- {
- Reference< XUnoTunnel > xTunnel( xTabCtrl, UNO_QUERY_THROW );
- pFormController = reinterpret_cast< FmXFormController* >( xTunnel->getSomething( FmXFormController::getUnoTunnelImplementationId() ) );
- }
-
- setController( _rxForm, pFormController );
+ setController( _rxForm, xParentController );
}
}
catch( const Exception& )
@@ -1068,20 +1089,14 @@ IMPL_LINK( FmXFormView, OnStartControlWizard, void*, /**/ )
if ( pWizardAsciiName )
{
// build the argument list
- Sequence< Any > aWizardArgs(1);
- // the object affected
- aWizardArgs[0] = makeAny( PropertyValue(
- ::rtl::OUString::createFromAscii("ObjectModel"),
- 0,
- makeAny( m_xLastCreatedControlModel ),
- PropertyState_DIRECT_VALUE
- ) );
+ ::comphelper::NamedValueCollection aWizardArgs;
+ aWizardArgs.put( "ObjectModel", m_xLastCreatedControlModel );
// create the wizard object
Reference< XExecutableDialog > xWizard;
try
{
- m_aContext.createComponentWithArguments( pWizardAsciiName, aWizardArgs, xWizard );
+ m_aContext.createComponentWithArguments( pWizardAsciiName, aWizardArgs.getWrappedPropertyValues(), xWizard );
}
catch( const Exception& )
{
@@ -1187,9 +1202,10 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript
m_aContext.getLegacyServiceFactory()
) );
}
- catch(const SQLContext& e) { aError.Reason <<= e; }
- catch(const SQLWarning& e) { aError.Reason <<= e; }
- catch(const SQLException& e) { aError.Reason <<= e; }
+ catch ( const SQLException& )
+ {
+ aError.Reason = ::cppu::getCaughtException();
+ }
catch( const Exception& ) { /* will be asserted below */ }
if (aError.Reason.hasValue())
{
@@ -1217,14 +1233,11 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript
if (xFields.is() && xFields->hasByName(sFieldName))
xFields->getByName(sFieldName) >>= xField;
-
- Reference< XNumberFormatsSupplier > xSupplier = aDBATools.getNumberFormats(xConnection, sal_False);
- if (!xSupplier.is() || !xField.is())
+ if ( !xField.is() )
return NULL;
- Reference< XNumberFormats > xNumberFormats(xSupplier->getNumberFormats());
- if (!xNumberFormats.is())
- return NULL;
+ Reference< XNumberFormatsSupplier > xSupplier( aDBATools.getNumberFormats( xConnection, sal_False ), UNO_SET_THROW );
+ Reference< XNumberFormats > xNumberFormats( xSupplier->getNumberFormats(), UNO_SET_THROW );
::rtl::OUString sLabelPostfix;
@@ -1275,10 +1288,12 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript
else
switch (nDataType)
{
+ case DataType::BLOB:
case DataType::LONGVARBINARY:
nOBJID = OBJ_FM_IMAGECONTROL;
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
nOBJID = OBJ_FM_EDIT;
break;
case DataType::BINARY:
@@ -1610,7 +1625,9 @@ bool FmXFormView::createControlLabelPair( const ::comphelper::ComponentContext&
aControlSize = aDefSize;
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
case DataType::LONGVARBINARY:
+ case DataType::BLOB:
aControlSize = aDefImageSize;
break;
}
@@ -1643,7 +1660,7 @@ bool FmXFormView::createControlLabelPair( const ::comphelper::ComponentContext&
}
}
- if ( nDataType == DataType::LONGVARCHAR && xControlPropInfo->hasPropertyByName( FM_PROP_MULTILINE ) )
+ if ( (nDataType == DataType::LONGVARCHAR || nDataType == DataType::CLOB) && xControlPropInfo->hasPropertyByName( FM_PROP_MULTILINE ) )
{
xControlSet->setPropertyValue( FM_PROP_MULTILINE, makeAny( sal_Bool( sal_True ) ) );
}
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index afc7e8ace77f..0a0f17f8d1c6 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -432,7 +432,8 @@ namespace svxform
case FormComponentType::COMBOBOX:
{
sal_Bool bDropDown = !_rControlBoundRect.IsEmpty() && ( _rControlBoundRect.GetWidth() >= 3 * _rControlBoundRect.GetHeight() );
- _rxControlModel->setPropertyValue( FM_PROP_DROPDOWN, makeAny( (sal_Bool)bDropDown ) );
+ if ( xPSI->hasPropertyByName( FM_PROP_DROPDOWN ) )
+ _rxControlModel->setPropertyValue( FM_PROP_DROPDOWN, makeAny( (sal_Bool)bDropDown ) );
_rxControlModel->setPropertyValue( FM_PROP_LINECOUNT, makeAny( sal_Int16( 20 ) ) );
}
break;
diff --git a/svx/source/form/fmctrler.cxx b/svx/source/form/formcontroller.cxx
index af2a103c5d03..d77422dccd9a 100644
--- a/svx/source/form/fmctrler.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmctrler.cxx,v $
- * $Revision: 1.71 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,24 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "confirmdelete.hxx"
#include "fmcontrolbordermanager.hxx"
#include "fmcontrollayout.hxx"
-#include "fmctrler.hxx"
-#include "fmdispatch.hxx"
+#include "formcontroller.hxx"
+#include "formfeaturedispatcher.hxx"
#include "fmdocumentclassification.hxx"
+#include "formcontrolling.hxx"
#include "fmprop.hrc"
+#include "svx/dialmgr.hxx"
#include "fmresids.hrc"
#include "fmservs.hxx"
-#include "fmshimp.hxx"
#include "svx/fmtools.hxx"
#include "fmurl.hxx"
-#include "svx/dialmgr.hxx"
-#include "svx/fmshell.hxx"
-#include "svx/fmview.hxx"
-#include "svx/sdrpagewindow.hxx"
-#include "svx/svdpagv.hxx"
-#include "trace.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/awt/FocusChangeReason.hpp>
@@ -72,6 +63,13 @@
#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/form/runtime/FormOperations.hpp>
+#include <com/sun/star/form/runtime/FormFeature.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/sdb/SQLContext.hpp>
+#include <com/sun/star/sdb/XColumn.hpp>
/** === end UNO includes === **/
#include <comphelper/enumhelper.hxx>
@@ -84,9 +82,6 @@
#include <comphelper/uno3.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/viewsh.hxx>
#include <toolkit/controls/unocontrol.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/debug.hxx>
@@ -94,32 +89,126 @@
#include <tools/shl.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
#include <rtl/logfile.hxx>
#include <algorithm>
#include <functional>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::sdbcx;
-using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::form;
-using namespace ::com::sun::star::form::validation;
-using namespace ::com::sun::star::form::runtime;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::script;
-using namespace ::com::sun::star::container;
using namespace ::comphelper;
using namespace ::connectivity;
-using namespace ::svxform;
using namespace ::connectivity::simple;
+//------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ FormController_NewInstance_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB )
+{
+ return *( new ::svxform::FormController( _rxORB ) );
+}
+
+namespace svxform
+{
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::sdb::XColumn;
+ using ::com::sun::star::awt::XControl;
+ using ::com::sun::star::awt::XTabController;
+ using ::com::sun::star::awt::XToolkit;
+ using ::com::sun::star::awt::XWindowPeer;
+ using ::com::sun::star::form::XGrid;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::container::XIndexAccess;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ using ::com::sun::star::beans::PropertyValue;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::lang::IndexOutOfBoundsException;
+ using ::com::sun::star::sdb::XInteractionSupplyParameters;
+ using ::com::sun::star::awt::XTextComponent;
+ using ::com::sun::star::awt::XTextListener;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::frame::XDispatch;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::uno::XAggregation;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::sdbc::XConnection;
+ using ::com::sun::star::sdbc::XRowSet;
+ using ::com::sun::star::sdbc::XDatabaseMetaData;
+ using ::com::sun::star::util::XNumberFormatsSupplier;
+ using ::com::sun::star::util::XNumberFormatter;
+ using ::com::sun::star::sdbcx::XColumnsSupplier;
+ using ::com::sun::star::container::XNameAccess;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::beans::Property;
+ using ::com::sun::star::container::XEnumeration;
+ using ::com::sun::star::form::XFormComponent;
+ using ::com::sun::star::form::runtime::XFormOperations;
+ using ::com::sun::star::form::runtime::FilterEvent;
+ using ::com::sun::star::form::runtime::XFilterControllerListener;
+ using ::com::sun::star::awt::XControlContainer;
+ using ::com::sun::star::container::XIdentifierReplace;
+ using ::com::sun::star::lang::WrappedTargetException;
+ using ::com::sun::star::form::XFormControllerListener;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::sdbc::XResultSet;
+ using ::com::sun::star::awt::XControlModel;
+ using ::com::sun::star::awt::XTabControllerModel;
+ using ::com::sun::star::beans::PropertyChangeEvent;
+ using ::com::sun::star::form::validation::XValidatableFormComponent;
+ using ::com::sun::star::form::XLoadable;
+ using ::com::sun::star::script::XEventAttacherManager;
+ using ::com::sun::star::form::XBoundControl;
+ using ::com::sun::star::beans::XPropertyChangeListener;
+ using ::com::sun::star::awt::TextEvent;
+ using ::com::sun::star::form::XBoundComponent;
+ using ::com::sun::star::awt::XCheckBox;
+ using ::com::sun::star::awt::XComboBox;
+ using ::com::sun::star::awt::XListBox;
+ using ::com::sun::star::awt::ItemEvent;
+ using ::com::sun::star::util::XModifyListener;
+ using ::com::sun::star::form::XReset;
+ using ::com::sun::star::frame::XDispatchProviderInterception;
+ using ::com::sun::star::form::XGridControl;
+ using ::com::sun::star::awt::XVclWindowPeer;
+ using ::com::sun::star::form::validation::XValidator;
+ using ::com::sun::star::awt::FocusEvent;
+ using ::com::sun::star::sdb::SQLContext;
+ using ::com::sun::star::container::XChild;
+ using ::com::sun::star::form::TabulatorCycle_RECORDS;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::lang::Locale;
+ using ::com::sun::star::beans::NamedValue;
+ using ::com::sun::star::lang::NoSupportException;
+ using ::com::sun::star::sdb::RowChangeEvent;
+ using ::com::sun::star::frame::XStatusListener;
+ using ::com::sun::star::frame::XDispatchProviderInterceptor;
+ using ::com::sun::star::sdb::SQLErrorEvent;
+ using ::com::sun::star::form::DatabaseParameterEvent;
+ using ::com::sun::star::sdb::ParametersRequest;
+ using ::com::sun::star::task::XInteractionRequest;
+ using ::com::sun::star::util::URL;
+ using ::com::sun::star::frame::FeatureStateEvent;
+ using ::com::sun::star::form::runtime::XFormControllerContext;
+ using ::com::sun::star::task::XInteractionHandler;
+ using ::com::sun::star::form::runtime::FormOperations;
+ using ::com::sun::star::container::XContainer;
+ using ::com::sun::star::sdbc::SQLWarning;
+ /** === end UNO using === **/
+ namespace ColumnValue = ::com::sun::star::sdbc::ColumnValue;
+ namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute;
+ namespace FocusChangeReason = ::com::sun::star::awt::FocusChangeReason;
+ namespace RowChangeAction = ::com::sun::star::sdb::RowChangeAction;
+ namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
+
//==============================================================================
// ColumnInfo
//==============================================================================
@@ -184,7 +273,6 @@ ColumnInfoCache::ColumnInfoCache( const Reference< XColumnsSupplier >& _rxColSup
:m_aColumns()
,m_bControlsInitialized( false )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "ColumnInfoCache::ColumnInfoCache" );
try
{
m_aColumns.clear();
@@ -242,7 +330,6 @@ namespace
//------------------------------------------------------------------------------
void ColumnInfoCache::deinitializeControls()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "ColumnInfoCache::deinitializeControls" );
for ( ColumnInfos::iterator col = m_aColumns.begin();
col != m_aColumns.end();
++col
@@ -255,7 +342,6 @@ void ColumnInfoCache::deinitializeControls()
//------------------------------------------------------------------------------
void ColumnInfoCache::initializeControls( const Sequence< Reference< XControl > >& _rControls )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "ColumnInfoCache::initializeControls" );
try
{
// for every of our known columns, find the controls which are bound to this column
@@ -338,7 +424,6 @@ void ColumnInfoCache::initializeControls( const Sequence< Reference< XControl >
//------------------------------------------------------------------------------
const ColumnInfo& ColumnInfoCache::getColumnInfo( size_t _pos )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "ColumnInfoCache::getColumnInfo" );
if ( _pos >= m_aColumns.size() )
throw IndexOutOfBoundsException();
@@ -424,7 +509,7 @@ void FmXAutoControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, cons
}
//------------------------------------------------------------------------------
-IMPL_LINK( FmXFormController, OnActivateTabOrder, void*, /*EMPTYTAG*/ )
+IMPL_LINK( FormController, OnActivateTabOrder, void*, /*EMPTYTAG*/ )
{
activateTabOrder();
return 1;
@@ -441,10 +526,10 @@ struct UpdateAllListeners : public ::std::unary_function< Reference< XDispatch >
}
};
//..............................................................................
-IMPL_LINK( FmXFormController, OnInvalidateFeatures, void*, /*_pNotInterestedInThisParam*/ )
+IMPL_LINK( FormController, OnInvalidateFeatures, void*, /*_pNotInterestedInThisParam*/ )
{
::osl::MutexGuard aGuard( m_aMutex );
- for ( ::std::set< sal_Int32 >::const_iterator aLoop = m_aInvalidFeatures.begin();
+ for ( ::std::set< sal_Int16 >::const_iterator aLoop = m_aInvalidFeatures.begin();
aLoop != m_aInvalidFeatures.end();
++aLoop
)
@@ -462,48 +547,28 @@ IMPL_LINK( FmXFormController, OnInvalidateFeatures, void*, /*_pNotInterestedInTh
/*************************************************************************/
+DBG_NAME( FormController )
//------------------------------------------------------------------
-Reference< XInterface > SAL_CALL
- FmXFormController_NewInstance_Impl(const Reference< XMultiServiceFactory > & _rxORB)
-{
- return *(new FmXFormController(_rxORB));
-}
-
-//------------------------------------------------------------------
-namespace fmctrlr
-{
- const ::rtl::OUString& getDataModeIdentifier()
- {
- static ::rtl::OUString s_sDataModeIdentifier = DATA_MODE;
- return s_sDataModeIdentifier;
- }
-}
-using namespace fmctrlr;
-
-DBG_NAME( FmXFormController )
-//------------------------------------------------------------------
-FmXFormController::FmXFormController(const Reference< XMultiServiceFactory > & _rxORB,
- FmFormView* _pView, Window* _pWindow )
- :FmXFormController_BASE( m_aMutex )
- ,OPropertySetHelper( FmXFormController_BASE::rBHelper )
- ,OSQLParserClient(_rxORB)
- ,m_xORB(_rxORB)
+FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB )
+ :FormController_BASE( m_aMutex )
+ ,OPropertySetHelper( FormController_BASE::rBHelper )
+ ,OSQLParserClient( _rxORB )
+ ,m_aContext( _rxORB )
,m_aActivateListeners(m_aMutex)
,m_aModifyListeners(m_aMutex)
,m_aErrorListeners(m_aMutex)
,m_aDeleteListeners(m_aMutex)
,m_aRowSetApproveListeners(m_aMutex)
,m_aParameterListeners(m_aMutex)
- ,m_pView(_pView)
- ,m_pWindow(_pWindow)
+ ,m_aFilterListeners(m_aMutex)
,m_pControlBorderManager( new ::svxform::ControlBorderManager )
- ,m_aControllerFeatures( _rxORB, this )
- ,m_aMode(getDataModeIdentifier())
- ,m_aLoadEvent( LINK( this, FmXFormController, OnLoad ) )
- ,m_aToggleEvent( LINK( this, FmXFormController, OnToggleAutoFields ) )
- ,m_aActivationEvent( LINK( this, FmXFormController, OnActivated ) )
- ,m_aDeactivationEvent( LINK( this, FmXFormController, OnDeactivated ) )
- ,m_nCurrentFilterPosition(0)
+ ,m_xFormOperations()
+ ,m_aMode( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) ) )
+ ,m_aLoadEvent( LINK( this, FormController, OnLoad ) )
+ ,m_aToggleEvent( LINK( this, FormController, OnToggleAutoFields ) )
+ ,m_aActivationEvent( LINK( this, FormController, OnActivated ) )
+ ,m_aDeactivationEvent( LINK( this, FormController, OnDeactivated ) )
+ ,m_nCurrentFilterPosition(-1)
,m_bCurrentRecordModified(sal_False)
,m_bCurrentRecordNew(sal_False)
,m_bLocked(sal_False)
@@ -519,17 +584,16 @@ FmXFormController::FmXFormController(const Reference< XMultiServiceFactory > & _
,m_bDetachEvents(sal_True)
,m_bAttemptedHandlerCreation( false )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::FmXFormController" );
- DBG_CTOR( FmXFormController, NULL );
+ DBG_CTOR( FormController, NULL );
::comphelper::increment(m_refCount);
{
{
m_xAggregate = Reference< XAggregation >(
- m_xORB->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.awt.TabController" ) ),
+ m_aContext.createComponent( "com.sun.star.awt.TabController" ),
UNO_QUERY
);
- DBG_ASSERT( m_xAggregate.is(), "FmXFormController::FmXFormController : could not create my aggregate !" );
+ DBG_ASSERT( m_xAggregate.is(), "FormController::FormController : could not create my aggregate !" );
m_xTabController = Reference< XTabController >( m_xAggregate, UNO_QUERY );
}
@@ -539,14 +603,14 @@ FmXFormController::FmXFormController(const Reference< XMultiServiceFactory > & _
::comphelper::decrement(m_refCount);
m_aTabActivationTimer.SetTimeout( 500 );
- m_aTabActivationTimer.SetTimeoutHdl( LINK( this, FmXFormController, OnActivateTabOrder ) );
+ m_aTabActivationTimer.SetTimeoutHdl( LINK( this, FormController, OnActivateTabOrder ) );
m_aFeatureInvalidationTimer.SetTimeout( 200 );
- m_aFeatureInvalidationTimer.SetTimeoutHdl( LINK( this, FmXFormController, OnInvalidateFeatures ) );
+ m_aFeatureInvalidationTimer.SetTimeoutHdl( LINK( this, FormController, OnInvalidateFeatures ) );
}
//------------------------------------------------------------------
-FmXFormController::~FmXFormController()
+FormController::~FormController()
{
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -565,6 +629,10 @@ FmXFormController::~FmXFormController()
disposeAllFeaturesAndDispatchers();
+ if ( m_xFormOperations.is() )
+ m_xFormOperations->dispose();
+ m_xFormOperations.clear();
+
// Freigeben der Aggregation
if ( m_xAggregate.is() )
{
@@ -574,28 +642,25 @@ FmXFormController::~FmXFormController()
DELETEZ( m_pControlBorderManager );
- DBG_DTOR( FmXFormController, NULL );
+ DBG_DTOR( FormController, NULL );
}
// -----------------------------------------------------------------------------
-void SAL_CALL FmXFormController::acquire() throw ()
+void SAL_CALL FormController::acquire() throw ()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::acquire" );
- FmXFormController_BASE::acquire();
+ FormController_BASE::acquire();
}
// -----------------------------------------------------------------------------
-void SAL_CALL FmXFormController::release() throw ()
+void SAL_CALL FormController::release() throw ()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::release" );
- FmXFormController_BASE::release();
+ FormController_BASE::release();
}
//------------------------------------------------------------------
-Any SAL_CALL FmXFormController::queryInterface( const Type& _rType ) throw(RuntimeException)
+Any SAL_CALL FormController::queryInterface( const Type& _rType ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::queryInterface" );
- Any aRet = FmXFormController_BASE::queryInterface( _rType );
+ Any aRet = FormController_BASE::queryInterface( _rType );
if ( !aRet.hasValue() )
aRet = OPropertySetHelper::queryInterface( _rType );
if ( !aRet.hasValue() )
@@ -604,9 +669,8 @@ Any SAL_CALL FmXFormController::queryInterface( const Type& _rType ) throw(Runti
}
//------------------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL FmXFormController::getImplementationId() throw( RuntimeException )
+Sequence< sal_Int8 > SAL_CALL FormController::getImplementationId() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getImplementationId" );
static ::cppu::OImplementationId* pId = NULL;
if ( !pId )
{
@@ -621,56 +685,18 @@ Sequence< sal_Int8 > SAL_CALL FmXFormController::getImplementationId() throw( Ru
}
//------------------------------------------------------------------------------
-Sequence< Type > SAL_CALL FmXFormController::getTypes( ) throw(RuntimeException)
+Sequence< Type > SAL_CALL FormController::getTypes( ) throw(RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getTypes" );
return comphelper::concatSequences(
- FmXFormController_BASE::getTypes(),
+ FormController_BASE::getTypes(),
::cppu::OPropertySetHelper::getTypes()
);
}
-// -----------------------------------------------------------------------------
-// XUnoTunnel
-Sequence< sal_Int8 > FmXFormController::getUnoTunnelImplementationId()
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getUnoTunnelImplementationId" );
- static ::cppu::OImplementationId * pId = NULL;
- if ( !pId )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pId )
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-//------------------------------------------------------------------------------
-FmXFormController* FmXFormController::getImplementation( const Reference< XInterface >& _rxComponent )
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getImplementation" );
- Reference< XUnoTunnel > xTunnel( _rxComponent, UNO_QUERY );
- if ( xTunnel.is() )
- return reinterpret_cast< FmXFormController* >( xTunnel->getSomething( getUnoTunnelImplementationId() ) );
- return NULL;
-}
-//------------------------------------------------------------------------------
-sal_Int64 SAL_CALL FmXFormController::getSomething(Sequence<sal_Int8> const& rId)throw( RuntimeException )
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getSomething" );
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
- return reinterpret_cast< sal_Int64 >( this );
-
- return sal_Int64();
-}
-
// XServiceInfo
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::supportsService(const ::rtl::OUString& ServiceName) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::supportsService(const ::rtl::OUString& ServiceName) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::supportsService" );
Sequence< ::rtl::OUString> aSNL(getSupportedServiceNames());
const ::rtl::OUString * pArray = aSNL.getConstArray();
for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
@@ -680,16 +706,14 @@ sal_Bool SAL_CALL FmXFormController::supportsService(const ::rtl::OUString& Serv
}
//------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXFormController::getImplementationName() throw( RuntimeException )
+::rtl::OUString SAL_CALL FormController::getImplementationName() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getImplementationName" );
- return ::rtl::OUString::createFromAscii("com.sun.star.form.FmXFormController");
+ return ::rtl::OUString::createFromAscii( "org.openoffice.comp.svx.FormController" );
}
//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString> SAL_CALL FmXFormController::getSupportedServiceNames(void) throw( RuntimeException )
+Sequence< ::rtl::OUString> SAL_CALL FormController::getSupportedServiceNames(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getSupportedServiceNames" );
// service names which are supported only, but cannot be used to created an
// instance at a service factory
Sequence< ::rtl::OUString > aNonCreatableServiceNames( 1 );
@@ -701,94 +725,107 @@ Sequence< ::rtl::OUString> SAL_CALL FmXFormController::getSupportedServiceNames(
}
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::approveReset(const EventObject& /*rEvent*/) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::approveReset(const EventObject& /*rEvent*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::approveReset" );
return sal_True;
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::resetted(const EventObject& rEvent) throw( RuntimeException )
+void SAL_CALL FormController::resetted(const EventObject& rEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::resetted" );
::osl::MutexGuard aGuard(m_aMutex);
if (getCurrentControl().is() && (getCurrentControl()->getModel() == rEvent.Source))
m_bModified = sal_False;
}
//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString> FmXFormController::getSupportedServiceNames_Static(void)
+Sequence< ::rtl::OUString> FormController::getSupportedServiceNames_Static(void)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getSupportedServiceNames_Static" );
static Sequence< ::rtl::OUString> aServices;
if (!aServices.getLength())
{
aServices.realloc(2);
- aServices.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.form.FormController");
+ aServices.getArray()[0] = FM_FORM_CONTROLLER;
aServices.getArray()[1] = ::rtl::OUString::createFromAscii("com.sun.star.awt.control.TabController");
}
return aServices;
}
-//------------------------------------------------------------------------------
-void FmXFormController::setCurrentFilterPosition( sal_Int32 nPos )
+// -----------------------------------------------------------------------------
+namespace
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setCurrentFilterPosition" );
- DBG_ASSERT(nPos < (sal_Int32)m_aFilters.size(), "Invalid Position");
-
- if (nPos != m_nCurrentFilterPosition)
+ struct ResetComponentText : public ::std::unary_function< Reference< XTextComponent >, void >
{
- m_nCurrentFilterPosition = nPos;
+ void operator()( const Reference< XTextComponent >& _rxText )
+ {
+ _rxText->setText( ::rtl::OUString() );
+ }
+ };
- // reset the text for all controls
- for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
- iter != m_aFilterControls.end(); iter++)
- (*iter).first->setText(rtl::OUString());
+ struct RemoveComponentTextListener : public ::std::unary_function< Reference< XTextComponent >, void >
+ {
+ RemoveComponentTextListener( const Reference< XTextListener >& _rxListener )
+ :m_xListener( _rxListener )
+ {
+ }
- if ( nPos != -1 )
+ void operator()( const Reference< XTextComponent >& _rxText )
{
- impl_setTextOnAllFilter_throw();
+ _rxText->removeTextListener( m_xListener );
}
- }
+
+ private:
+ Reference< XTextListener > m_xListener;
+ };
}
+
// -----------------------------------------------------------------------------
-void FmXFormController::impl_setTextOnAllFilter_throw()
+void FormController::impl_setTextOnAllFilter_throw()
{
+ // reset the text for all controls
+ ::std::for_each( m_aFilterComponents.begin(), m_aFilterComponents.end(), ResetComponentText() );
+
+ if ( m_aFilterRows.empty() )
+ // nothing to do anymore
+ return;
+
+ if ( m_nCurrentFilterPosition < 0 )
+ return;
+
// set the text for all filters
- OSL_ENSURE( ( m_aFilters.size() > (size_t)m_nCurrentFilterPosition ) && ( m_nCurrentFilterPosition >= 0 ),
- "FmXFormController::setCurrentFilterPosition: m_nCurrentFilterPosition too big" );
+ OSL_ENSURE( m_aFilterRows.size() > (size_t)m_nCurrentFilterPosition,
+ "FormController::impl_setTextOnAllFilter_throw: m_nCurrentFilterPosition too big" );
- if ( ( m_nCurrentFilterPosition >= 0 ) && ( (size_t)m_nCurrentFilterPosition < m_aFilters.size() ) )
+ if ( (size_t)m_nCurrentFilterPosition < m_aFilterRows.size() )
{
- FmFilterRow& rRow = m_aFilters[m_nCurrentFilterPosition];
- for (FmFilterRow::const_iterator iter2 = rRow.begin();
- iter2 != rRow.end(); iter2++)
+ FmFilterRow& rRow = m_aFilterRows[ m_nCurrentFilterPosition ];
+ for ( FmFilterRow::const_iterator iter2 = rRow.begin();
+ iter2 != rRow.end();
+ ++iter2
+ )
{
- (*iter2).first->setText((*iter2).second);
+ iter2->first->setText( iter2->second );
}
- } // if ( ( m_nCurrentFilterPosition >= 0 ) && ( (size_t)m_nCurrentFilterPosition < m_aFilters.size() ) )
+ }
}
// OPropertySetHelper
//------------------------------------------------------------------------------
-sal_Bool FmXFormController::convertFastPropertyValue( Any & /*rConvertedValue*/, Any & /*rOldValue*/,
+sal_Bool FormController::convertFastPropertyValue( Any & /*rConvertedValue*/, Any & /*rOldValue*/,
sal_Int32 /*nHandle*/, const Any& /*rValue*/ )
throw( IllegalArgumentException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::convertFastPropertyValue" );
return sal_False;
}
//------------------------------------------------------------------------------
-void FmXFormController::setFastPropertyValue_NoBroadcast( sal_Int32 /*nHandle*/, const Any& /*rValue*/ )
+void FormController::setFastPropertyValue_NoBroadcast( sal_Int32 /*nHandle*/, const Any& /*rValue*/ )
throw( Exception )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setFastPropertyValue_NoBroadcast" );
}
//------------------------------------------------------------------------------
-void FmXFormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
+void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getFastPropertyValue" );
switch (nHandle)
{
case FM_ATTR_FILTER:
@@ -799,9 +836,8 @@ void FmXFormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) c
if (xConnection.is())
{
Reference< XDatabaseMetaData> xMetaData(xConnection->getMetaData());
- Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats(xConnection, sal_True));
- Reference< XNumberFormatter> xFormatter(m_xORB
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats( xConnection, sal_True ) );
+ Reference< XNumberFormatter> xFormatter( m_aContext.createComponent( "com.sun.star.util.NumberFormatter" ), UNO_QUERY_THROW );
xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
Reference< XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY);
@@ -809,40 +845,48 @@ void FmXFormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) c
::rtl::OUString aQuote( xMetaData->getIdentifierQuoteString() );
- // now add the filter rows
- for ( FmFilterRows::const_iterator row = m_aFilters.begin(); row != m_aFilters.end(); ++row )
+ // now add the filter rows
+ try
{
- const FmFilterRow& rRow = *row;
+ for ( FmFilterRows::const_iterator row = m_aFilterRows.begin(); row != m_aFilterRows.end(); ++row )
+ {
+ const FmFilterRow& rRow = *row;
- if ( rRow.empty() )
- continue;
+ if ( rRow.empty() )
+ continue;
- if ( aFilter.getLength() )
- aFilter.appendAscii( " OR " );
+ if ( aFilter.getLength() )
+ aFilter.appendAscii( " OR " );
- aFilter.appendAscii( "( " );
- for ( FmFilterRow::const_iterator condition = rRow.begin(); condition != rRow.end(); ++condition )
- {
- // get the field of the controls map
- Reference< XTextComponent > xText = condition->first;
- Reference< XPropertySet > xField = m_aFilterControls.find( xText )->second;
- DBG_ASSERT( xField.is(), "FmXFormController::getFastPropertyValue: no field found!" );
- if ( condition != rRow.begin() )
- aFilter.appendAscii( " AND " );
-
- ::rtl::OUString sFilterValue( condition->second );
-
- ::rtl::OUString sErrorMsg, sCriteria;
- ::rtl::Reference< ISQLParseNode > xParseNode = predicateTree( sErrorMsg, sFilterValue, xFormatter, xField );
- OSL_ENSURE( xParseNode.is(), "FmXFormController::getFastPropertyValue: could not parse the field value predicate!" );
- if ( xParseNode.is() )
+ aFilter.appendAscii( "( " );
+ for ( FmFilterRow::const_iterator condition = rRow.begin(); condition != rRow.end(); ++condition )
{
- // don't use a parse context here, we need it unlocalized
- xParseNode->parseNodeToStr( sCriteria, xConnection, NULL );
- aFilter.append( sCriteria );
+ // get the field of the controls map
+ Reference< XControl > xControl( condition->first, UNO_QUERY_THROW );
+ Reference< XPropertySet > xModelProps( xControl->getModel(), UNO_QUERY_THROW );
+ Reference< XPropertySet > xField( xModelProps->getPropertyValue( FM_PROP_BOUNDFIELD ), UNO_QUERY_THROW );
+ if ( condition != rRow.begin() )
+ aFilter.appendAscii( " AND " );
+
+ ::rtl::OUString sFilterValue( condition->second );
+
+ ::rtl::OUString sErrorMsg, sCriteria;
+ ::rtl::Reference< ISQLParseNode > xParseNode = predicateTree( sErrorMsg, sFilterValue, xFormatter, xField );
+ OSL_ENSURE( xParseNode.is(), "FormController::getFastPropertyValue: could not parse the field value predicate!" );
+ if ( xParseNode.is() )
+ {
+ // don't use a parse context here, we need it unlocalized
+ xParseNode->parseNodeToStr( sCriteria, xConnection, NULL );
+ aFilter.append( sCriteria );
+ }
}
+ aFilter.appendAscii( " )" );
}
- aFilter.appendAscii( " )" );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ aFilter.setLength(0);
}
}
rValue <<= aFilter.makeStringAndClear();
@@ -850,15 +894,14 @@ void FmXFormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) c
break;
case FM_ATTR_FORM_OPERATIONS:
- rValue <<= m_aControllerFeatures->getFormOperations();
+ rValue <<= m_xFormOperations;
break;
}
}
//------------------------------------------------------------------------------
-Reference< XPropertySetInfo > FmXFormController::getPropertySetInfo() throw( RuntimeException )
+Reference< XPropertySetInfo > FormController::getPropertySetInfo() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getPropertySetInfo" );
static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
@@ -872,12 +915,11 @@ pDesc[nPos++] = Property(FM_PROP_##varname, FM_ATTR_##varname, ::getCppuType((co
DECL_PROP_CORE(varname, type) PropertyAttribute::attrib1)
//------------------------------------------------------------------------------
-void FmXFormController::fillProperties(
+void FormController::fillProperties(
Sequence< Property >& /* [out] */ _rProps,
Sequence< Property >& /* [out] */ /*_rAggregateProps*/
) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::fillProperties" );
_rProps.realloc(2);
sal_Int32 nPos = 0;
Property* pDesc = _rProps.getArray();
@@ -886,90 +928,229 @@ void FmXFormController::fillProperties(
}
//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper& FmXFormController::getInfoHelper()
+::cppu::IPropertyArrayHelper& FormController::getInfoHelper()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getInfoHelper" );
return *getArrayHelper();
}
+// XFilterController
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::addFilterControllerListener( const Reference< XFilterControllerListener >& _Listener ) throw( RuntimeException )
+{
+ m_aFilterListeners.addInterface( _Listener );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::removeFilterControllerListener( const Reference< XFilterControllerListener >& _Listener ) throw( RuntimeException )
+{
+ m_aFilterListeners.removeInterface( _Listener );
+}
+
+//------------------------------------------------------------------------------
+::sal_Int32 SAL_CALL FormController::getFilterComponents() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ return m_aFilterComponents.size();
+}
+
+//------------------------------------------------------------------------------
+::sal_Int32 SAL_CALL FormController::getDisjunctiveTerms() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ return m_aFilterRows.size();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::setPredicateExpression( ::sal_Int32 _Component, ::sal_Int32 _Term, const ::rtl::OUString& _PredicateExpression ) throw( RuntimeException, IndexOutOfBoundsException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ if ( ( _Component < 0 ) || ( _Component >= getFilterComponents() ) || ( _Term < 0 ) || ( _Term >= getDisjunctiveTerms() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ Reference< XTextComponent > xText( m_aFilterComponents[ _Component ] );
+ xText->setText( _PredicateExpression );
+
+ FmFilterRow& rFilterRow = m_aFilterRows[ _Term ];
+ if ( _PredicateExpression.getLength() )
+ rFilterRow[ xText ] = _PredicateExpression;
+ else
+ rFilterRow.erase( xText );
+}
+
+//------------------------------------------------------------------------------
+Reference< XControl > FormController::getFilterComponent( ::sal_Int32 _Component ) throw( RuntimeException, IndexOutOfBoundsException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ if ( ( _Component < 0 ) || ( _Component >= getFilterComponents() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ return Reference< XControl >( m_aFilterComponents[ _Component ], UNO_QUERY );
+}
+
+//------------------------------------------------------------------------------
+Sequence< Sequence< ::rtl::OUString > > FormController::getPredicateExpressions() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ Sequence< Sequence< ::rtl::OUString > > aExpressions( m_aFilterRows.size() );
+ sal_Int32 termIndex = 0;
+ for ( FmFilterRows::const_iterator row = m_aFilterRows.begin();
+ row != m_aFilterRows.end();
+ ++row, ++termIndex
+ )
+ {
+ const FmFilterRow& rRow( *row );
+
+ Sequence< ::rtl::OUString > aConjunction( m_aFilterComponents.size() );
+ sal_Int32 componentIndex = 0;
+ for ( FilterComponents::const_iterator comp = m_aFilterComponents.begin();
+ comp != m_aFilterComponents.end();
+ ++comp, ++componentIndex
+ )
+ {
+ FmFilterRow::const_iterator predicate = rRow.find( *comp );
+ if ( predicate != rRow.end() )
+ aConjunction[ componentIndex ] = predicate->second;
+ }
+
+ aExpressions[ termIndex ] = aConjunction;
+ }
+
+ return aExpressions;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::removeDisjunctiveTerm( ::sal_Int32 _Term ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ // SYNCHRONIZED -->
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ if ( ( _Term < 0 ) || ( _Term >= getDisjunctiveTerms() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ // if the to-be-deleted row is our current row, we need to shift
+ if ( _Term == m_nCurrentFilterPosition )
+ {
+ if ( m_nCurrentFilterPosition < sal_Int32( m_aFilterRows.size() - 1 ) )
+ ++m_nCurrentFilterPosition;
+ else
+ --m_nCurrentFilterPosition;
+ }
+
+ FmFilterRows::iterator pos = m_aFilterRows.begin() + _Term;
+ m_aFilterRows.erase( pos );
+
+ // adjust m_nCurrentFilterPosition if the removed row preceeded it
+ if ( _Term < m_nCurrentFilterPosition )
+ --m_nCurrentFilterPosition;
+
+ OSL_POSTCOND( ( m_nCurrentFilterPosition < 0 ) == ( m_aFilterRows.empty() ),
+ "FormController::removeDisjunctiveTerm: inconsistency!" );
+
+ // update the texts in the filter controls
+ impl_setTextOnAllFilter_throw();
+
+ FilterEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.DisjunctiveTerm = _Term;
+ aGuard.clear();
+ // <-- SYNCHRONIZED
+
+ m_aFilterListeners.notifyEach( &XFilterControllerListener::disjunctiveTermRemoved, aEvent );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::appendEmptyDisjunctiveTerm() throw (RuntimeException)
+{
+ // SYNCHRONIZED -->
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ impl_appendEmptyFilterRow( aGuard );
+ // <-- SYNCHRONIZED
+}
+
+//------------------------------------------------------------------------------
+::sal_Int32 SAL_CALL FormController::getActiveTerm() throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ return m_nCurrentFilterPosition;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::setActiveTerm( ::sal_Int32 _ActiveTerm ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ if ( ( _ActiveTerm < 0 ) || ( _ActiveTerm >= getDisjunctiveTerms() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ if ( _ActiveTerm == getActiveTerm() )
+ return;
+
+ m_nCurrentFilterPosition = _ActiveTerm;
+ impl_setTextOnAllFilter_throw();
+}
+
// XElementAccess
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::hasElements(void) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::hasElements(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::hasElements" );
-::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( m_aMutex );
return !m_aChilds.empty();
}
//------------------------------------------------------------------------------
-Type SAL_CALL FmXFormController::getElementType(void) throw( RuntimeException )
+Type SAL_CALL FormController::getElementType(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getElementType" );
return ::getCppuType((const Reference< XFormController>*)0);
}
// XEnumerationAccess
//------------------------------------------------------------------------------
-Reference< XEnumeration > SAL_CALL FmXFormController::createEnumeration(void) throw( RuntimeException )
+Reference< XEnumeration > SAL_CALL FormController::createEnumeration(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::createEnumeration" );
::osl::MutexGuard aGuard( m_aMutex );
return new ::comphelper::OEnumerationByIndex(this);
}
// XIndexAccess
//------------------------------------------------------------------------------
-sal_Int32 SAL_CALL FmXFormController::getCount(void) throw( RuntimeException )
+sal_Int32 SAL_CALL FormController::getCount(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getCount" );
::osl::MutexGuard aGuard( m_aMutex );
return m_aChilds.size();
}
//------------------------------------------------------------------------------
-Any SAL_CALL FmXFormController::getByIndex(sal_Int32 Index) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
+Any SAL_CALL FormController::getByIndex(sal_Int32 Index) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getByIndex" );
::osl::MutexGuard aGuard( m_aMutex );
if (Index < 0 ||
Index >= (sal_Int32)m_aChilds.size())
throw IndexOutOfBoundsException();
- return makeAny(m_aChilds[Index]);
- // , ::getCppuType((const XFormController*)0));
-}
-
-//-----------------------------------------------------------------------------
-void FmXFormController::addChild(FmXFormController* pChild)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addChild" );
- Reference< XFormController > xController(pChild);
- m_aChilds.push_back(xController);
- pChild->setParent(static_cast< XFormController* >(this));
-
- Reference< XFormComponent > xForm(pChild->getModel(), UNO_QUERY);
-
- // search the position of the model within the form
- sal_uInt32 nPos = m_xModelAsIndex->getCount();
- Reference< XFormComponent > xTemp;
- for( ; nPos; )
- {
- m_xModelAsIndex->getByIndex(--nPos) >>= xTemp;
- if ((XFormComponent*)xForm.get() == (XFormComponent*)xTemp.get())
- {
- Reference< XInterface > xIfc(xController, UNO_QUERY);
- m_xModelAsManager->attach( nPos, xIfc, makeAny( xController) );
- break;
- }
- }
+ return makeAny( m_aChilds[ Index ] );
}
// EventListener
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::disposing(const EventObject& e) throw( RuntimeException )
+void SAL_CALL FormController::disposing(const EventObject& e) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::disposing" );
// Ist der Container disposed worden
::osl::MutexGuard aGuard( m_aMutex );
Reference< XControlContainer > xContainer(e.Source, UNO_QUERY);
@@ -991,9 +1172,8 @@ void SAL_CALL FmXFormController::disposing(const EventObject& e) throw( RuntimeE
// OComponentHelper
//-----------------------------------------------------------------------------
-void FmXFormController::disposeAllFeaturesAndDispatchers() SAL_THROW(())
+void FormController::disposeAllFeaturesAndDispatchers() SAL_THROW(())
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::disposeAllFeaturesAndDispatchers" );
for ( DispatcherContainer::iterator aDispatcher = m_aFeatureDispatchers.begin();
aDispatcher != m_aFeatureDispatchers.end();
++aDispatcher
@@ -1005,18 +1185,16 @@ void FmXFormController::disposeAllFeaturesAndDispatchers() SAL_THROW(())
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::disposeAllFeaturesAndDispatchers: caught an exception while disposing a dispatcher!" );
+ DBG_UNHANDLED_EXCEPTION();
}
}
m_aFeatureDispatchers.clear();
- m_aControllerFeatures.dispose();
}
//-----------------------------------------------------------------------------
-void FmXFormController::disposing(void)
+void FormController::disposing(void)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::disposing" );
- EventObject aEvt(static_cast< XFormController* >(this));
+ EventObject aEvt( *this );
// if we're still active, simulate a "deactivated" event
if ( m_xActiveControl.is() )
@@ -1029,13 +1207,14 @@ void FmXFormController::disposing(void)
m_aDeleteListeners.disposeAndClear(aEvt);
m_aRowSetApproveListeners.disposeAndClear(aEvt);
m_aParameterListeners.disposeAndClear(aEvt);
+ m_aFilterListeners.disposeAndClear(aEvt);
removeBoundFieldListener();
stopFiltering();
m_pControlBorderManager->restoreAll();
- m_aFilters.clear();
+ m_aFilterRows.clear();
::osl::MutexGuard aGuard( m_aMutex );
m_xActiveControl = NULL;
@@ -1067,6 +1246,10 @@ void FmXFormController::disposing(void)
disposeAllFeaturesAndDispatchers();
+ if ( m_xFormOperations.is() )
+ m_xFormOperations->dispose();
+ m_xFormOperations.clear();
+
if (m_bDBConnection)
unload();
@@ -1076,7 +1259,6 @@ void FmXFormController::disposing(void)
::comphelper::disposeComponent( m_xComposer );
- m_xORB = NULL;
m_bDBConnection = sal_False;
}
@@ -1096,10 +1278,9 @@ namespace
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::propertyChange(const PropertyChangeEvent& evt) throw( RuntimeException )
+void SAL_CALL FormController::propertyChange(const PropertyChangeEvent& evt) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::propertyChange" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
if ( evt.PropertyName == FM_PROP_BOUNDFIELD )
{
Reference<XPropertySet> xOldBound;
@@ -1164,14 +1345,13 @@ void SAL_CALL FmXFormController::propertyChange(const PropertyChangeEvent& evt)
}
//------------------------------------------------------------------------------
-bool FmXFormController::replaceControl( const Reference< XControl >& _rxExistentControl, const Reference< XControl >& _rxNewControl )
+bool FormController::replaceControl( const Reference< XControl >& _rxExistentControl, const Reference< XControl >& _rxNewControl )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::replaceControl" );
bool bSuccess = false;
try
{
Reference< XIdentifierReplace > xContainer( getContainer(), UNO_QUERY );
- DBG_ASSERT( xContainer.is(), "FmXFormController::replaceControl: yes, it's not required by the service description, but XItentifierReplaces would be nice!" );
+ DBG_ASSERT( xContainer.is(), "FormController::replaceControl: yes, it's not required by the service description, but XItentifierReplaces would be nice!" );
if ( xContainer.is() )
{
// look up the ID of _rxExistentControl
@@ -1184,7 +1364,7 @@ bool FmXFormController::replaceControl( const Reference< XControl >& _rxExistent
if ( xCheck == _rxExistentControl )
break;
}
- DBG_ASSERT( pIdentifiers != pIdentifiersEnd, "FmXFormController::replaceControl: did not find the control in the container!" );
+ DBG_ASSERT( pIdentifiers != pIdentifiersEnd, "FormController::replaceControl: did not find the control in the container!" );
if ( pIdentifiers != pIdentifiersEnd )
{
bool bReplacedWasActive = ( m_xActiveControl.get() == _rxExistentControl.get() );
@@ -1217,7 +1397,7 @@ bool FmXFormController::replaceControl( const Reference< XControl >& _rxExistent
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::replaceControl: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
Reference< XControl > xDisposeIt( bSuccess ? _rxExistentControl : _rxNewControl );
@@ -1226,10 +1406,9 @@ bool FmXFormController::replaceControl( const Reference< XControl >& _rxExistent
}
//------------------------------------------------------------------------------
-void FmXFormController::toggleAutoFields(sal_Bool bAutoFields)
+void FormController::toggleAutoFields(sal_Bool bAutoFields)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::toggleAutoFields" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
Sequence< Reference< XControl > > aControlsCopy( m_aControls );
@@ -1289,7 +1468,7 @@ void FmXFormController::toggleAutoFields(sal_Bool bAutoFields)
{
::rtl::OUString sServiceName;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DEFAULTCONTROL ) >>= sServiceName );
- Reference< XControl > xNewControl( m_xORB->createInstance( sServiceName ), UNO_QUERY );
+ Reference< XControl > xNewControl( m_aContext.createComponent( sServiceName ), UNO_QUERY );
replaceControl( xControl, xNewControl );
}
}
@@ -1300,9 +1479,9 @@ void FmXFormController::toggleAutoFields(sal_Bool bAutoFields)
}
//------------------------------------------------------------------------------
-IMPL_LINK(FmXFormController, OnToggleAutoFields, void*, EMPTYARG)
+IMPL_LINK(FormController, OnToggleAutoFields, void*, EMPTYARG)
{
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
toggleAutoFields(m_bCurrentRecordNew);
return 1L;
@@ -1310,35 +1489,52 @@ IMPL_LINK(FmXFormController, OnToggleAutoFields, void*, EMPTYARG)
// XTextListener
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::textChanged(const TextEvent& e) throw( RuntimeException )
+void SAL_CALL FormController::textChanged(const TextEvent& e) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::textChanged" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ // SYNCHRONIZED -->
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
if (m_bFiltering)
{
Reference< XTextComponent > xText(e.Source,UNO_QUERY);
::rtl::OUString aText = xText->getText();
- // Suchen der aktuellen Row
- OSL_ENSURE( ( m_aFilters.size() > (size_t)m_nCurrentFilterPosition ) && ( m_nCurrentFilterPosition >= 0 ),
- "FmXFormController::textChanged: m_nCurrentFilterPosition too big" );
+ if ( m_aFilterRows.empty() )
+ appendEmptyDisjunctiveTerm();
- if ( ( m_nCurrentFilterPosition >= 0 ) && ( (size_t)m_nCurrentFilterPosition < m_aFilters.size() ) )
+ // Suchen der aktuellen Row
+ if ( ( (size_t)m_nCurrentFilterPosition >= m_aFilterRows.size() ) || ( m_nCurrentFilterPosition < 0 ) )
{
- FmFilterRow& rRow = m_aFilters[m_nCurrentFilterPosition];
+ OSL_ENSURE( false, "FormController::textChanged: m_nCurrentFilterPosition is wrong!" );
+ return;
+ }
- // do we have a new filter
- if (aText.getLength())
- rRow[xText] = aText;
- else
- {
- // do we have the control in the row
- FmFilterRow::iterator iter = rRow.find(xText);
- // erase the entry out of the row
- if (iter != rRow.end())
- rRow.erase(iter);
- }
+ FmFilterRow& rRow = m_aFilterRows[ m_nCurrentFilterPosition ];
+
+ // do we have a new filter
+ if (aText.getLength())
+ rRow[xText] = aText;
+ else
+ {
+ // do we have the control in the row
+ FmFilterRow::iterator iter = rRow.find(xText);
+ // erase the entry out of the row
+ if (iter != rRow.end())
+ rRow.erase(iter);
}
+
+ // multiplex the event to our FilterControllerListeners
+ FilterEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.FilterComponent = ::std::find( m_aFilterComponents.begin(), m_aFilterComponents.end(), xText ) - m_aFilterComponents.begin();
+ aEvent.DisjunctiveTerm = getActiveTerm();
+ aEvent.PredicateExpression = aText;
+
+ aGuard.clear();
+ // <-- SYNCHRONIZED
+
+ // notify the changed filter expression
+ m_aFilterListeners.notifyEach( &XFilterControllerListener::predicateExpressionChanged, aEvent );
}
else
impl_onModify();
@@ -1346,36 +1542,34 @@ void SAL_CALL FmXFormController::textChanged(const TextEvent& e) throw( RuntimeE
// XItemListener
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::itemStateChanged(const ItemEvent& /*rEvent*/) throw( RuntimeException )
+void SAL_CALL FormController::itemStateChanged(const ItemEvent& /*rEvent*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::itemStateChanged" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
impl_onModify();
}
// XModificationBroadcaster
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addModifyListener(const Reference< XModifyListener > & l) throw( RuntimeException )
+void SAL_CALL FormController::addModifyListener(const Reference< XModifyListener > & l) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addModifyListener" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
m_aModifyListeners.addInterface( l );
}
//------------------------------------------------------------------------------
-void FmXFormController::removeModifyListener(const Reference< XModifyListener > & l) throw( RuntimeException )
+void FormController::removeModifyListener(const Reference< XModifyListener > & l) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeModifyListener" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
m_aModifyListeners.removeInterface( l );
}
// XModificationListener
//------------------------------------------------------------------------------
-void FmXFormController::modified( const EventObject& _rEvent ) throw( RuntimeException )
+void FormController::modified( const EventObject& _rEvent ) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::modified" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
try
{
@@ -1400,10 +1594,16 @@ void FmXFormController::modified( const EventObject& _rEvent ) throw( RuntimeExc
}
//------------------------------------------------------------------------------
-void FmXFormController::impl_onModify()
+void FormController::impl_checkDisposed_throw() const
+{
+ if ( impl_isDisposed_nofail() )
+ throw DisposedException( ::rtl::OUString(), *const_cast< FormController* >( this ) );
+}
+
+//------------------------------------------------------------------------------
+void FormController::impl_onModify()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::onModify" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -1416,10 +1616,36 @@ void FmXFormController::impl_onModify()
}
//------------------------------------------------------------------------------
-sal_Bool FmXFormController::determineLockState() const
+void FormController::impl_addFilterRow( const FmFilterRow& _row )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::determineLockState" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ m_aFilterRows.push_back( _row );
+
+ if ( m_aFilterRows.size() == 1 )
+ { // that's the first row ever
+ OSL_ENSURE( m_nCurrentFilterPosition == -1, "FormController::impl_addFilterRow: inconsistency!" );
+ m_nCurrentFilterPosition = 0;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FormController::impl_appendEmptyFilterRow( ::osl::ClearableMutexGuard& _rClearBeforeNotify )
+{
+ // SYNCHRONIZED -->
+ impl_addFilterRow( FmFilterRow() );
+
+ // notify the listeners
+ FilterEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.DisjunctiveTerm = (sal_Int32)m_aFilterRows.size() - 1;
+ _rClearBeforeNotify.clear();
+ // <-- SYNCHRONIZED
+ m_aFilterListeners.notifyEach( &XFilterControllerListener::disjunctiveTermAdded, aEvent );
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FormController::determineLockState() const
+{
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
// a.) in filter mode we are always locked
// b.) if we have no valid model or our model (a result set) is not alive -> we're locked
// c.) if we are inserting everything is OK and we are not locked
@@ -1434,17 +1660,15 @@ sal_Bool FmXFormController::determineLockState() const
// FocusListener
//------------------------------------------------------------------------------
-void FmXFormController::focusGained(const FocusEvent& e) throw( RuntimeException )
+void FormController::focusGained(const FocusEvent& e) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::focusGained" );
- TRACE_RANGE( "FmXFormController::focusGained" );
-
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- ::osl::MutexGuard aGuard( m_aMutex );
- Reference< XControl > xControl(e.Source, UNO_QUERY);
+ // SYNCHRONIZED -->
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
m_pControlBorderManager->focusGained( e.Source );
+ Reference< XControl > xControl(e.Source, UNO_QUERY);
if (m_bDBConnection)
{
// do we need to keep the locking of the commit
@@ -1473,7 +1697,7 @@ void FmXFormController::focusGained(const FocusEvent& e) throw( RuntimeException
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
Reference< XBoundControl > xLockingTest(m_xCurrentControl, UNO_QUERY);
sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
- OSL_ENSURE(!bControlIsLocked, "FmXFormController::Gained: I'm modified and the current control is locked ? How this ?");
+ OSL_ENSURE(!bControlIsLocked, "FormController::Gained: I'm modified and the current control is locked ? How this ?");
// normalerweise sollte ein gelocktes Control nicht modified sein, also muss wohl mein bModified aus einem anderen Kontext
// gesetzt worden sein, was ich nicht verstehen wuerde ...
#endif
@@ -1505,22 +1729,33 @@ void FmXFormController::focusGained(const FocusEvent& e) throw( RuntimeException
if (!m_bFiltering && m_bCycle && (e.FocusFlags & FocusChangeReason::AROUND) && m_xCurrentControl.is())
{
- if ( e.FocusFlags & FocusChangeReason::FORWARD )
+ SQLErrorEvent aErrorEvent;
+ OSL_ENSURE( m_xFormOperations.is(), "FormController::focusGained: hmm?" );
+ // should have been created in setModel
+ try
{
- if ( m_aControllerFeatures->isEnabled( SID_FM_RECORD_NEXT ) )
- m_aControllerFeatures->moveRight();
+ if ( e.FocusFlags & FocusChangeReason::FORWARD )
+ {
+ if ( m_xFormOperations.is() && m_xFormOperations->isEnabled( FormFeature::MoveToNext ) )
+ m_xFormOperations->execute( FormFeature::MoveToNext );
+ }
+ else // backward
+ {
+ if ( m_xFormOperations.is() && m_xFormOperations->isEnabled( FormFeature::MoveToPrevious ) )
+ m_xFormOperations->execute( FormFeature::MoveToPrevious );
+ }
}
- else // backward
+ catch ( const Exception& )
{
- if ( m_aControllerFeatures->isEnabled( SID_FM_RECORD_PREV ) )
- m_aControllerFeatures->moveLeft();
+ // don't handle this any further. That's an ... admissible error.
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
// Immer noch ein und dasselbe Control
- if ( (m_xActiveControl.get() == xControl.get())
- && (xControl.get() == m_xCurrentControl.get())
+ if ( ( m_xActiveControl == xControl )
+ && ( xControl == m_xCurrentControl )
)
{
DBG_ASSERT(m_xCurrentControl.is(), "Kein CurrentControl selektiert");
@@ -1545,25 +1780,24 @@ void FmXFormController::focusGained(const FocusEvent& e) throw( RuntimeException
}
// invalidate all features which depend on the currently focused control
- if ( m_bDBConnection && !m_bFiltering && m_pView )
+ if ( m_bDBConnection && !m_bFiltering )
implInvalidateCurrentControlDependentFeatures();
- if (m_xCurrentControl.is())
- {
- // Control erhaelt Focus, dann eventuell in den sichtbaren Bereich
- Reference< XWindow > xWindow(xControl, UNO_QUERY);
- if (xWindow.is() && m_pView && m_pWindow)
- {
- ::com::sun::star::awt::Rectangle aRect = xWindow->getPosSize();
- ::Rectangle aNewRect(aRect.X,aRect.Y,aRect.X+aRect.Width,aRect.Y+aRect.Height);
- aNewRect = m_pWindow->PixelToLogic(aNewRect);
- m_pView->MakeVisible( aNewRect, *const_cast< Window* >( m_pWindow ) );
- }
- }
+ if ( !m_xCurrentControl.is() )
+ return;
+
+ // Control erhaelt Focus, dann eventuell in den sichtbaren Bereich
+ Reference< XFormControllerContext > xContext( m_xContext );
+ Reference< XControl > xCurrentControl( m_xCurrentControl );
+ aGuard.clear();
+ // <-- SYNCHRONIZED
+
+ if ( xContext.is() )
+ xContext->makeVisible( xCurrentControl );
}
//------------------------------------------------------------------------------
-IMPL_LINK( FmXFormController, OnActivated, void*, /**/ )
+IMPL_LINK( FormController, OnActivated, void*, /**/ )
{
EventObject aEvent;
aEvent.Source = *this;
@@ -1573,7 +1807,7 @@ IMPL_LINK( FmXFormController, OnActivated, void*, /**/ )
}
//------------------------------------------------------------------------------
-IMPL_LINK( FmXFormController, OnDeactivated, void*, /**/ )
+IMPL_LINK( FormController, OnDeactivated, void*, /**/ )
{
EventObject aEvent;
aEvent.Source = *this;
@@ -1583,10 +1817,9 @@ IMPL_LINK( FmXFormController, OnDeactivated, void*, /**/ )
}
//------------------------------------------------------------------------------
-void FmXFormController::focusLost(const FocusEvent& e) throw( RuntimeException )
+void FormController::focusLost(const FocusEvent& e) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::focusLost" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
m_pControlBorderManager->focusLost( e.Source );
@@ -1601,53 +1834,48 @@ void FmXFormController::focusLost(const FocusEvent& e) throw( RuntimeException )
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::mousePressed( const awt::MouseEvent& /*_rEvent*/ ) throw (RuntimeException)
+void SAL_CALL FormController::mousePressed( const awt::MouseEvent& /*_rEvent*/ ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::mousePressed" );
// not interested in
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::mouseReleased( const awt::MouseEvent& /*_rEvent*/ ) throw (RuntimeException)
+void SAL_CALL FormController::mouseReleased( const awt::MouseEvent& /*_rEvent*/ ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::mouseReleased" );
// not interested in
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::mouseEntered( const awt::MouseEvent& _rEvent ) throw (RuntimeException)
+void SAL_CALL FormController::mouseEntered( const awt::MouseEvent& _rEvent ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::mouseEntered" );
m_pControlBorderManager->mouseEntered( _rEvent.Source );
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::mouseExited( const awt::MouseEvent& _rEvent ) throw (RuntimeException)
+void SAL_CALL FormController::mouseExited( const awt::MouseEvent& _rEvent ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::mouseExited" );
m_pControlBorderManager->mouseExited( _rEvent.Source );
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::componentValidityChanged( const EventObject& _rSource ) throw (RuntimeException)
+void SAL_CALL FormController::componentValidityChanged( const EventObject& _rSource ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::componentValidityChanged" );
Reference< XControl > xControl( findControl( m_aControls, Reference< XControlModel >( _rSource.Source, UNO_QUERY ), sal_False, sal_False ) );
Reference< XValidatableFormComponent > xValidatable( _rSource.Source, UNO_QUERY );
- OSL_ENSURE( xControl.is() && xValidatable.is(), "FmXFormController::componentValidityChanged: huh?" );
+ OSL_ENSURE( xControl.is() && xValidatable.is(), "FormController::componentValidityChanged: huh?" );
if ( xControl.is() && xValidatable.is() )
m_pControlBorderManager->validityChanged( xControl, xValidatable );
}
//--------------------------------------------------------------------
-void FmXFormController::setModel(const Reference< XTabControllerModel > & Model) throw( RuntimeException )
+void FormController::setModel(const Reference< XTabControllerModel > & Model) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setModel" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::setModel : invalid aggregate !");
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::setModel : invalid aggregate !");
try
{
@@ -1672,10 +1900,15 @@ void FmXFormController::setModel(const Reference< XTabControllerModel > & Model)
Reference< XDatabaseParameterBroadcaster > xParamBroadcaster(m_xModelAsIndex, UNO_QUERY);
if (xParamBroadcaster.is())
xParamBroadcaster->removeParameterListener(this);
+
}
disposeAllFeaturesAndDispatchers();
+ if ( m_xFormOperations.is() )
+ m_xFormOperations->dispose();
+ m_xFormOperations.clear();
+
// set the new model wait for the load event
if (m_xTabController.is())
m_xTabController->setModel(Model);
@@ -1691,7 +1924,9 @@ void FmXFormController::setModel(const Reference< XTabControllerModel > & Model)
if (m_xModelAsIndex.is())
{
- m_aControllerFeatures.assign( this );
+ // re-create m_xFormOperations
+ m_xFormOperations.set( FormOperations::createWithFormController( m_aContext.getUNOContext(), this ), UNO_SET_THROW );
+ m_xFormOperations->setFeatureInvalidation( this );
// adding load and ui interaction listeners
Reference< XLoadable > xForm(Model, UNO_QUERY);
@@ -1743,27 +1978,27 @@ void FmXFormController::setModel(const Reference< XTabControllerModel > & Model)
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::setModel: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
}
//------------------------------------------------------------------------------
-Reference< XTabControllerModel > FmXFormController::getModel() throw( RuntimeException )
+Reference< XTabControllerModel > FormController::getModel() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getModel" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::getModel : invalid aggregate !");
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::getModel : invalid aggregate !");
if (!m_xTabController.is())
return Reference< XTabControllerModel > ();
return m_xTabController->getModel();
}
//------------------------------------------------------------------------------
-void FmXFormController::addToEventAttacher(const Reference< XControl > & xControl)
+void FormController::addToEventAttacher(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addToEventAttacher" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- OSL_ENSURE( xControl.is(), "FmXFormController::addToEventAttacher: invalid control - how did you reach this?" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
+ OSL_ENSURE( xControl.is(), "FormController::addToEventAttacher: invalid control - how did you reach this?" );
if ( !xControl.is() )
return; /* throw IllegalArgumentException(); */
@@ -1788,11 +2023,10 @@ void FmXFormController::addToEventAttacher(const Reference< XControl > & xContro
}
//------------------------------------------------------------------------------
-void FmXFormController::removeFromEventAttacher(const Reference< XControl > & xControl)
+void FormController::removeFromEventAttacher(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeFromEventAttacher" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- OSL_ENSURE( xControl.is(), "FmXFormController::removeFromEventAttacher: invalid control - how did you reach this?" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
+ OSL_ENSURE( xControl.is(), "FormController::removeFromEventAttacher: invalid control - how did you reach this?" );
if ( !xControl.is() )
return; /* throw IllegalArgumentException(); */
@@ -1817,14 +2051,13 @@ void FmXFormController::removeFromEventAttacher(const Reference< XControl > & xC
}
//------------------------------------------------------------------------------
-void FmXFormController::setContainer(const Reference< XControlContainer > & xContainer) throw( RuntimeException )
+void FormController::setContainer(const Reference< XControlContainer > & xContainer) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setContainer" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
Reference< XTabControllerModel > xTabModel(getModel());
DBG_ASSERT(xTabModel.is() || !xContainer.is(), "No Model defined");
// if we have a new container we need a model
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::setContainer : invalid aggregate !");
+ DBG_ASSERT(m_xTabController.is(), "FormController::setContainer : invalid aggregate !");
::osl::MutexGuard aGuard( m_aMutex );
Reference< XContainer > xCurrentContainer;
@@ -1838,11 +2071,8 @@ void FmXFormController::setContainer(const Reference< XControlContainer > & xCon
m_aTabActivationTimer.Stop();
// clear the filter map
- for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
- iter != m_aFilterControls.end(); ++iter)
- (*iter).first->removeTextListener(this);
-
- m_aFilterControls.clear();
+ ::std::for_each( m_aFilterComponents.begin(), m_aFilterComponents.end(), RemoveComponentTextListener( this ) );
+ m_aFilterComponents.clear();
// einsammeln der Controls
const Reference< XControl >* pControls = m_aControls.getConstArray();
@@ -1906,23 +2136,23 @@ void FmXFormController::setContainer(const Reference< XControlContainer > & xCon
}
//------------------------------------------------------------------------------
-Reference< XControlContainer > FmXFormController::getContainer() throw( RuntimeException )
+Reference< XControlContainer > FormController::getContainer() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getContainer" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::getContainer : invalid aggregate !");
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::getContainer : invalid aggregate !");
if (!m_xTabController.is())
return Reference< XControlContainer > ();
return m_xTabController->getContainer();
}
//------------------------------------------------------------------------------
-Sequence< Reference< XControl > > FmXFormController::getControls(void) throw( RuntimeException )
+Sequence< Reference< XControl > > FormController::getControls(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getControls" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
if (!m_bControlsSorted)
{
Reference< XTabControllerModel > xModel = getModel();
@@ -1958,32 +2188,31 @@ Sequence< Reference< XControl > > FmXFormController::getControls(void) throw( Ru
}
//------------------------------------------------------------------------------
-void FmXFormController::autoTabOrder() throw( RuntimeException )
+void FormController::autoTabOrder() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::autoTabOrder" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::autoTabOrder : invalid aggregate !");
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::autoTabOrder : invalid aggregate !");
if (m_xTabController.is())
m_xTabController->autoTabOrder();
}
//------------------------------------------------------------------------------
-void FmXFormController::activateTabOrder() throw( RuntimeException )
+void FormController::activateTabOrder() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::activateTabOrder" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::activateTabOrder : invalid aggregate !");
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::activateTabOrder : invalid aggregate !");
if (m_xTabController.is())
m_xTabController->activateTabOrder();
}
//------------------------------------------------------------------------------
-void FmXFormController::setControlLock(const Reference< XControl > & xControl)
+void FormController::setControlLock(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setControlLock" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
sal_Bool bLocked = isLocked();
// es wird gelockt
@@ -2022,8 +2251,9 @@ void FmXFormController::setControlLock(const Reference< XControl > & xControl)
else
xBound->setLock(bLocked);
}
- catch(...)
+ catch( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -2034,10 +2264,9 @@ void FmXFormController::setControlLock(const Reference< XControl > & xControl)
}
//------------------------------------------------------------------------------
-void FmXFormController::setLocks()
+void FormController::setLocks()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setLocks" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
// alle Controls, die mit einer Datenquelle verbunden sind locken/unlocken
const Reference< XControl >* pControls = m_aControls.getConstArray();
const Reference< XControl >* pControlsEnd = pControls + m_aControls.getLength();
@@ -2076,10 +2305,9 @@ namespace
}
//------------------------------------------------------------------------------
-void FmXFormController::startControlModifyListening(const Reference< XControl > & xControl)
+void FormController::startControlModifyListening(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::startControlModifyListening" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
bool bModifyListening = lcl_shouldListenForModifications( xControl, this );
@@ -2126,10 +2354,9 @@ void FmXFormController::startControlModifyListening(const Reference< XControl >
}
//------------------------------------------------------------------------------
-void FmXFormController::stopControlModifyListening(const Reference< XControl > & xControl)
+void FormController::stopControlModifyListening(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::stopControlModifyListening" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
bool bModifyListening = lcl_shouldListenForModifications( xControl, NULL );
@@ -2175,10 +2402,9 @@ void FmXFormController::stopControlModifyListening(const Reference< XControl > &
}
//------------------------------------------------------------------------------
-void FmXFormController::startListening()
+void FormController::startListening()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::startListening" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
m_bModified = sal_False;
// jetzt anmelden bei gebundenen feldern
@@ -2189,10 +2415,9 @@ void FmXFormController::startListening()
}
//------------------------------------------------------------------------------
-void FmXFormController::stopListening()
+void FormController::stopListening()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::stopListening" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
m_bModified = sal_False;
// jetzt anmelden bei gebundenen feldern
@@ -2204,10 +2429,9 @@ void FmXFormController::stopListening()
//------------------------------------------------------------------------------
-Reference< XControl > FmXFormController::findControl(Sequence< Reference< XControl > >& _rControls, const Reference< XControlModel > & xCtrlModel ,sal_Bool _bRemove,sal_Bool _bOverWrite) const
+Reference< XControl > FormController::findControl(Sequence< Reference< XControl > >& _rControls, const Reference< XControlModel > & xCtrlModel ,sal_Bool _bRemove,sal_Bool _bOverWrite) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::findControl" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
DBG_ASSERT( xCtrlModel.is(), "findControl - welches ?!" );
Reference< XControl >* pControls = _rControls.getArray();
@@ -2232,9 +2456,8 @@ Reference< XControl > FmXFormController::findControl(Sequence< Reference< XCont
}
//------------------------------------------------------------------------------
-void FmXFormController::implControlInserted( const Reference< XControl>& _rxControl, bool _bAddToEventAttacher )
+void FormController::implControlInserted( const Reference< XControl>& _rxControl, bool _bAddToEventAttacher )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::implControlInserted" );
Reference< XWindow > xWindow( _rxControl, UNO_QUERY );
if ( xWindow.is() )
{
@@ -2272,9 +2495,8 @@ void FmXFormController::implControlInserted( const Reference< XControl>& _rxCont
}
//------------------------------------------------------------------------------
-void FmXFormController::implControlRemoved( const Reference< XControl>& _rxControl, bool _bRemoveFromEventAttacher )
+void FormController::implControlRemoved( const Reference< XControl>& _rxControl, bool _bRemoveFromEventAttacher )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::implControlRemoved" );
Reference< XWindow > xWindow( _rxControl, UNO_QUERY );
if ( xWindow.is() )
{
@@ -2304,9 +2526,8 @@ void FmXFormController::implControlRemoved( const Reference< XControl>& _rxContr
}
//------------------------------------------------------------------------------
-void FmXFormController::implSetCurrentControl( const Reference< XControl >& _rxControl )
+void FormController::implSetCurrentControl( const Reference< XControl >& _rxControl )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::implSetCurrentControl" );
if ( m_xCurrentControl.get() == _rxControl.get() )
return;
@@ -2322,10 +2543,9 @@ void FmXFormController::implSetCurrentControl( const Reference< XControl >& _rxC
}
//------------------------------------------------------------------------------
-void FmXFormController::insertControl(const Reference< XControl > & xControl)
+void FormController::insertControl(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::insertControl" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
m_bControlsSorted = sal_False;
m_aControls.realloc(m_aControls.getLength() + 1);
m_aControls.getArray()[m_aControls.getLength() - 1] = xControl;
@@ -2343,10 +2563,9 @@ void FmXFormController::insertControl(const Reference< XControl > & xControl)
}
//------------------------------------------------------------------------------
-void FmXFormController::removeControl(const Reference< XControl > & xControl)
+void FormController::removeControl(const Reference< XControl > & xControl)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeControl" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
const Reference< XControl >* pControls = m_aControls.getConstArray();
const Reference< XControl >* pControlsEnd = pControls + m_aControls.getLength();
while ( pControls != pControlsEnd )
@@ -2358,13 +2577,9 @@ void FmXFormController::removeControl(const Reference< XControl > & xControl)
}
}
- if (m_aFilterControls.size())
- {
- Reference< XTextComponent > xText(xControl, UNO_QUERY);
- FmFilterControls::iterator iter = m_aFilterControls.find(xText);
- if (iter != m_aFilterControls.end())
- m_aFilterControls.erase(iter);
- }
+ FilterComponents::iterator componentPos = ::std::find( m_aFilterComponents.begin(), m_aFilterComponents.end(), xControl );
+ if ( componentPos != m_aFilterComponents.end() )
+ m_aFilterComponents.erase( componentPos );
implControlRemoved( xControl, m_bDetachEvents );
@@ -2374,12 +2589,11 @@ void FmXFormController::removeControl(const Reference< XControl > & xControl)
// XLoadListener
//------------------------------------------------------------------------------
-void FmXFormController::loaded(const EventObject& rEvent) throw( RuntimeException )
+void FormController::loaded(const EventObject& rEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::loaded" );
- OSL_ENSURE( rEvent.Source == m_xModelAsIndex, "FmXFormController::loaded: where did this come from?" );
+ OSL_ENSURE( rEvent.Source == m_xModelAsIndex, "FormController::loaded: where did this come from?" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
Reference< XRowSet > xForm(rEvent.Source, UNO_QUERY);
// do we have a connected data source
@@ -2431,9 +2645,8 @@ void FmXFormController::loaded(const EventObject& rEvent) throw( RuntimeExceptio
}
//------------------------------------------------------------------------------
-void FmXFormController::updateAllDispatchers() const
+void FormController::updateAllDispatchers() const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::updateAllDispatchers" );
::std::for_each(
m_aFeatureDispatchers.begin(),
m_aFeatureDispatchers.end(),
@@ -2445,9 +2658,9 @@ void FmXFormController::updateAllDispatchers() const
}
//------------------------------------------------------------------------------
-IMPL_LINK(FmXFormController, OnLoad, void*, EMPTYARG)
+IMPL_LINK(FormController, OnLoad, void*, EMPTYARG)
{
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
m_bLocked = determineLockState();
setLocks();
@@ -2463,19 +2676,20 @@ IMPL_LINK(FmXFormController, OnLoad, void*, EMPTYARG)
}
//------------------------------------------------------------------------------
-void FmXFormController::unloaded(const EventObject& /*rEvent*/) throw( RuntimeException )
+void FormController::unloaded(const EventObject& /*rEvent*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::unloaded" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
updateAllDispatchers();
}
//------------------------------------------------------------------------------
-void FmXFormController::reloading(const EventObject& /*aEvent*/) throw( RuntimeException )
+void FormController::reloading(const EventObject& /*aEvent*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::reloading" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
// do the same like in unloading
// just one exception toggle the auto values
m_aToggleEvent.CancelPendingCall();
@@ -2483,27 +2697,28 @@ void FmXFormController::reloading(const EventObject& /*aEvent*/) throw( RuntimeE
}
//------------------------------------------------------------------------------
-void FmXFormController::reloaded(const EventObject& aEvent) throw( RuntimeException )
+void FormController::reloaded(const EventObject& aEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::reloaded" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
loaded(aEvent);
}
//------------------------------------------------------------------------------
-void FmXFormController::unloading(const EventObject& /*aEvent*/) throw( RuntimeException )
+void FormController::unloading(const EventObject& /*aEvent*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::unloading" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
unload();
}
//------------------------------------------------------------------------------
-void FmXFormController::unload() throw( RuntimeException )
+void FormController::unload() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::unload" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
m_aLoadEvent.CancelPendingCall();
@@ -2529,9 +2744,8 @@ void FmXFormController::unload() throw( RuntimeException )
}
// -----------------------------------------------------------------------------
-void FmXFormController::removeBoundFieldListener()
+void FormController::removeBoundFieldListener()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeBoundFieldListener" );
const Reference< XControl >* pControls = m_aControls.getConstArray();
const Reference< XControl >* pControlsEnd = pControls + m_aControls.getLength();
while ( pControls != pControlsEnd )
@@ -2543,9 +2757,8 @@ void FmXFormController::removeBoundFieldListener()
}
//------------------------------------------------------------------------------
-void FmXFormController::startFormListening( const Reference< XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly )
+void FormController::startFormListening( const Reference< XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::startFormListening" );
try
{
if ( m_bCanInsert || m_bCanUpdate ) // form can be modified
@@ -2573,14 +2786,13 @@ void FmXFormController::startFormListening( const Reference< XPropertySet >& _rx
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::startFormListening: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
}
//------------------------------------------------------------------------------
-void FmXFormController::stopFormListening( const Reference< XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly )
+void FormController::stopFormListening( const Reference< XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::stopFormListening" );
try
{
if ( m_bCanInsert || m_bCanUpdate )
@@ -2606,20 +2818,20 @@ void FmXFormController::stopFormListening( const Reference< XPropertySet >& _rxF
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::stopFormListening: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
}
// com::sun::star::sdbc::XRowSetListener
//------------------------------------------------------------------------------
-void FmXFormController::cursorMoved(const EventObject& /*event*/) throw( RuntimeException )
+void FormController::cursorMoved(const EventObject& /*event*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::cursorMoved" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
// toggle the locking ?
if (m_bLocked != determineLockState())
{
- ::osl::MutexGuard aGuard( m_aMutex );
m_bLocked = !m_bLocked;
setLocks();
if (isListeningForChanges())
@@ -2633,31 +2845,28 @@ void FmXFormController::cursorMoved(const EventObject& /*event*/) throw( Runtime
}
//------------------------------------------------------------------------------
-void FmXFormController::rowChanged(const EventObject& /*event*/) throw( RuntimeException )
+void FormController::rowChanged(const EventObject& /*event*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::rowChanged" );
// not interested in ...
}
//------------------------------------------------------------------------------
-void FmXFormController::rowSetChanged(const EventObject& /*event*/) throw( RuntimeException )
+void FormController::rowSetChanged(const EventObject& /*event*/) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::rowSetChanged" );
// not interested in ...
}
// XContainerListener
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::elementInserted(const ContainerEvent& evt) throw( RuntimeException )
+void SAL_CALL FormController::elementInserted(const ContainerEvent& evt) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::elementInserted" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- Reference< XControl > xControl;
- evt.Element >>= xControl;
- if (!xControl.is())
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ Reference< XControl > xControl( evt.Element, UNO_QUERY );
+ if ( !xControl.is() )
return;
- ::osl::MutexGuard aGuard( m_aMutex );
Reference< XFormComponent > xModel(xControl->getModel(), UNO_QUERY);
if (xModel.is() && m_xModelAsIndex == xModel->getParent())
{
@@ -2686,8 +2895,8 @@ void SAL_CALL FmXFormController::elementInserted(const ContainerEvent& evt) thro
if (xText.is() && xField.is() && ::comphelper::hasProperty(FM_PROP_SEARCHABLE, xField) &&
::comphelper::getBOOL(xField->getPropertyValue(FM_PROP_SEARCHABLE)))
{
- m_aFilterControls[xText] = xField;
- xText->addTextListener(this);
+ m_aFilterComponents.push_back( xText );
+ xText->addTextListener( this );
}
}
}
@@ -2695,9 +2904,8 @@ void SAL_CALL FmXFormController::elementInserted(const ContainerEvent& evt) thro
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::elementReplaced(const ContainerEvent& evt) throw( RuntimeException )
+void SAL_CALL FormController::elementReplaced(const ContainerEvent& evt) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::elementReplaced" );
// simulate an elementRemoved
ContainerEvent aRemoveEvent( evt );
aRemoveEvent.Element = evt.ReplacedElement;
@@ -2711,11 +2919,10 @@ void SAL_CALL FmXFormController::elementReplaced(const ContainerEvent& evt) thro
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::elementRemoved(const ContainerEvent& evt) throw( RuntimeException )
+void SAL_CALL FormController::elementRemoved(const ContainerEvent& evt) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::elementRemoved" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
Reference< XControl > xControl;
evt.Element >>= xControl;
@@ -2731,18 +2938,17 @@ void SAL_CALL FmXFormController::elementRemoved(const ContainerEvent& evt) throw
// are we in filtermode and a XModeSelector has inserted an element
else if (m_bFiltering && Reference< XModeSelector > (evt.Source, UNO_QUERY).is())
{
- Reference< XTextComponent > xText(xControl, UNO_QUERY);
- FmFilterControls::iterator iter = m_aFilterControls.find(xText);
- if (iter != m_aFilterControls.end())
- m_aFilterControls.erase(iter);
+ FilterComponents::iterator componentPos = ::std::find(
+ m_aFilterComponents.begin(), m_aFilterComponents.end(), xControl );
+ if ( componentPos != m_aFilterComponents.end() )
+ m_aFilterComponents.erase( componentPos );
}
}
//------------------------------------------------------------------------------
-Reference< XControl > FmXFormController::isInList(const Reference< XWindowPeer > & xPeer) const
+Reference< XControl > FormController::isInList(const Reference< XWindowPeer > & xPeer) const
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::isInList" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
const Reference< XControl >* pControls = m_aControls.getConstArray();
sal_uInt32 nCtrls = m_aControls.getLength();
@@ -2759,58 +2965,134 @@ Reference< XControl > FmXFormController::isInList(const Reference< XWindowPeer
}
//------------------------------------------------------------------------------
-void FmXFormController::activateFirst() throw( RuntimeException )
+void FormController::activateFirst() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::activateFirst" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::activateFirst : invalid aggregate !");
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::activateFirst : invalid aggregate !");
if (m_xTabController.is())
m_xTabController->activateFirst();
}
//------------------------------------------------------------------------------
-void FmXFormController::activateLast() throw( RuntimeException )
+void FormController::activateLast() throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::activateLast" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT(m_xTabController.is(), "FmXFormController::activateLast : invalid aggregate !");
+ impl_checkDisposed_throw();
+
+ DBG_ASSERT(m_xTabController.is(), "FormController::activateLast : invalid aggregate !");
if (m_xTabController.is())
m_xTabController->activateLast();
}
// XFormController
//------------------------------------------------------------------------------
-Reference< XControl> SAL_CALL FmXFormController::getCurrentControl(void) throw( RuntimeException )
+Reference< XFormOperations > SAL_CALL FormController::getFormOperations() throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getCurrentControl" );
::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ return m_xFormOperations;
+}
+
+//------------------------------------------------------------------------------
+Reference< XControl> SAL_CALL FormController::getCurrentControl(void) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
return m_xCurrentControl;
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addActivateListener(const Reference< XFormControllerListener > & l) throw( RuntimeException )
+void SAL_CALL FormController::addActivateListener(const Reference< XFormControllerListener > & l) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addActivateListener" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
m_aActivateListeners.addInterface(l);
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeActivateListener(const Reference< XFormControllerListener > & l) throw( RuntimeException )
+void SAL_CALL FormController::removeActivateListener(const Reference< XFormControllerListener > & l) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeActivateListener" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
m_aActivateListeners.removeInterface(l);
}
//------------------------------------------------------------------------------
-void FmXFormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
+void SAL_CALL FormController::addChildController( const Reference< XFormController >& _ChildController ) throw( RuntimeException, IllegalArgumentException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ if ( !_ChildController.is() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+ // TODO: (localized) error message
+
+ // the parent of our (to-be-)child must be our own model
+ Reference< XFormComponent > xFormOfChild( _ChildController->getModel(), UNO_QUERY );
+ if ( !xFormOfChild.is() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+ // TODO: (localized) error message
+
+ if ( xFormOfChild->getParent() != m_xModelAsIndex )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+ // TODO: (localized) error message
+
+ m_aChilds.push_back( _ChildController );
+ _ChildController->setParent( *this );
+
+ // search the position of the model within the form
+ sal_uInt32 nPos = m_xModelAsIndex->getCount();
+ Reference< XFormComponent > xTemp;
+ for( ; nPos; )
+ {
+ m_xModelAsIndex->getByIndex(--nPos) >>= xTemp;
+ if ( xFormOfChild == xTemp )
+ {
+ Reference< XInterface > xIfc( _ChildController, UNO_QUERY );
+ m_xModelAsManager->attach( nPos, xIfc, makeAny( _ChildController) );
+ break;
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+Reference< XFormControllerContext > SAL_CALL FormController::getContext() throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+ return m_xContext;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::setContext( const Reference< XFormControllerContext >& _context ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+ m_xContext = _context;
+}
+
+//------------------------------------------------------------------------------
+Reference< XInteractionHandler > SAL_CALL FormController::getInteractionHandler() throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setFilter" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+ return m_xInteractionHandler;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::setInteractionHandler( const Reference< XInteractionHandler >& _interactionHandler ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+ m_xInteractionHandler = _interactionHandler;
+}
+
+//------------------------------------------------------------------------------
+void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
+{
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
// create the composer
Reference< XRowSet > xForm(m_xModelAsIndex, UNO_QUERY);
Reference< XConnection > xConnection(OStaticDataAccessTools().getRowSetConnection(xForm));
@@ -2865,11 +3147,10 @@ void FmXFormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
// need to parse criteria localized
OStaticDataAccessTools aStaticTools;
Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats(xConnection, sal_True));
- Reference< XNumberFormatter> xFormatter(m_xORB
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ Reference< XNumberFormatter> xFormatter( m_aContext.createComponent( "com.sun.star.util.NumberFormatter" ), UNO_QUERY );
xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
Locale aAppLocale = Application::GetSettings().GetUILocale();
- LocaleDataWrapper aLocaleWrapper(m_xORB,aAppLocale);
+ LocaleDataWrapper aLocaleWrapper( m_aContext.getLegacyServiceFactory(), aAppLocale );
// retrieving the filter
const Sequence < PropertyValue >* pRow = aFilterRows.getConstArray();
@@ -2967,26 +3248,24 @@ void FmXFormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
if (aRow.empty())
continue;
- m_aFilters.push_back(aRow);
+ impl_addFilterRow( aRow );
}
}
// now set the filter controls
- for (::std::vector<FmFieldInfo>::iterator iter = rFieldInfos.begin();
- iter != rFieldInfos.end(); iter++)
+ for ( ::std::vector<FmFieldInfo>::iterator field = rFieldInfos.begin();
+ field != rFieldInfos.end();
+ ++field
+ )
{
- m_aFilterControls[(*iter).xText] = (*iter).xField;
+ m_aFilterComponents.push_back( field->xText );
}
-
- // add an empty row
- m_aFilters.push_back(FmFilterRow());
}
//------------------------------------------------------------------------------
-void FmXFormController::startFiltering()
+void FormController::startFiltering()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::startFiltering" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
OStaticDataAccessTools aStaticTools;
Reference< XConnection > xConnection( aStaticTools.getRowSetConnection( Reference< XRowSet >( m_xModelAsIndex, UNO_QUERY ) ) );
@@ -3013,8 +3292,7 @@ void FmXFormController::startFiltering()
// the control we have to activate after replacement
Reference< XDatabaseMetaData > xMetaData(xConnection->getMetaData());
Reference< XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats(xConnection, sal_True);
- Reference< XNumberFormatter > xFormatter(m_xORB
- ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ Reference< XNumberFormatter > xFormatter( m_aContext.createComponent( "com.sun.star.util.NumberFormatter" ), UNO_QUERY );
xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
// structure for storing the field info
@@ -3032,7 +3310,7 @@ void FmXFormController::startFiltering()
Reference< XModeSelector > xSelector(xControl, UNO_QUERY);
if (xSelector.is())
{
- xSelector->setMode(FILTER_MODE);
+ xSelector->setMode( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) ) );
// listening for new controls of the selector
Reference< XContainer > xContainer(xSelector, UNO_QUERY);
@@ -3092,13 +3370,10 @@ void FmXFormController::startFiltering()
aCreationArgs[ 1 ] <<= NamedValue( ::rtl::OUString::createFromAscii( "NumberFormatter" ), makeAny( xFormatter ) );
aCreationArgs[ 2 ] <<= NamedValue( ::rtl::OUString::createFromAscii( "ControlModel" ), makeAny( xModel ) );
Reference< XControl > xFilterControl(
- m_xORB->createInstanceWithArguments(
- ::rtl::OUString::createFromAscii( "com.sun.star.form.control.FilterControl" ),
- aCreationArgs
- ),
+ m_aContext.createComponentWithArguments( "com.sun.star.form.control.FilterControl", aCreationArgs ),
UNO_QUERY
);
- DBG_ASSERT( xFilterControl.is(), "FmXFormController::startFiltering: could not create a filter control!" );
+ DBG_ASSERT( xFilterControl.is(), "FormController::startFiltering: could not create a filter control!" );
if ( replaceControl( xControl, xFilterControl ) )
{
@@ -3132,10 +3407,9 @@ void FmXFormController::startFiltering()
}
//------------------------------------------------------------------------------
-void FmXFormController::stopFiltering()
+void FormController::stopFiltering()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::stopFiltering" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
if ( !m_bFiltering ) // #104693# OJ
{ // nothing to do
return;
@@ -3150,17 +3424,10 @@ void FmXFormController::stopFiltering()
Sequence< Reference< XControl > > aControlsCopy( m_aControls );
const Reference< XControl > * pControls = aControlsCopy.getConstArray();
sal_Int32 nControlCount = aControlsCopy.getLength();
- // SdrPageView* pCurPageView = m_pView->GetSdrPageView();
-
- // sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND;
- // const SdrPageWindow* pWindow = pCurPageView ? pCurPageView->FindPageWindow(*((OutputDevice*)m_pView->GetActualOutDev())) : 0L;
// clear the filter control map
- for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
- iter != m_aFilterControls.end(); iter++)
- (*iter).first->removeTextListener(this);
-
- m_aFilterControls.clear();
+ ::std::for_each( m_aFilterComponents.begin(), m_aFilterComponents.end(), RemoveComponentTextListener( this ) );
+ m_aFilterComponents.clear();
for ( sal_Int32 i = nControlCount; i > 0; )
{
@@ -3173,7 +3440,7 @@ void FmXFormController::stopFiltering()
Reference< XModeSelector > xSelector(xControl, UNO_QUERY);
if (xSelector.is())
{
- xSelector->setMode(DATA_MODE);
+ xSelector->setMode( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) ) );
// listening for new controls of the selector
Reference< XContainer > xContainer(xSelector, UNO_QUERY);
@@ -3197,7 +3464,7 @@ void FmXFormController::stopFiltering()
{
::rtl::OUString sServiceName;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DEFAULTCONTROL ) >>= sServiceName );
- Reference< XControl > xNewControl( m_xORB->createInstance( sServiceName ), UNO_QUERY );
+ Reference< XControl > xNewControl( m_aContext.createComponent( sServiceName ), UNO_QUERY );
replaceControl( xControl, xNewControl );
}
}
@@ -3210,8 +3477,8 @@ void FmXFormController::stopFiltering()
m_bDetachEvents = sal_True;
- m_aFilters.clear();
- m_nCurrentFilterPosition = 0;
+ m_aFilterRows.clear();
+ m_nCurrentFilterPosition = -1;
// release the locks if possible
// lock all controls which are not used for filtering
@@ -3225,12 +3492,11 @@ void FmXFormController::stopFiltering()
// XModeSelector
//------------------------------------------------------------------------------
-void FmXFormController::setMode(const ::rtl::OUString& Mode) throw( NoSupportException, RuntimeException )
+void FormController::setMode(const ::rtl::OUString& Mode) throw( NoSupportException, RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::setMode" );
::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
if (!supportsMode(Mode))
throw NoSupportException();
@@ -3239,7 +3505,7 @@ void FmXFormController::setMode(const ::rtl::OUString& Mode) throw( NoSupportExc
m_aMode = Mode;
- if (Mode == FILTER_MODE)
+ if ( Mode.equalsAscii( "FilterMode" ) )
startFiltering();
else
stopFiltering();
@@ -3254,35 +3520,37 @@ void FmXFormController::setMode(const ::rtl::OUString& Mode) throw( NoSupportExc
}
//------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL FmXFormController::getMode(void) throw( RuntimeException )
+::rtl::OUString SAL_CALL FormController::getMode(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getMode" );
-::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
return m_aMode;
}
//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > SAL_CALL FmXFormController::getSupportedModes(void) throw( RuntimeException )
+Sequence< ::rtl::OUString > SAL_CALL FormController::getSupportedModes(void) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getSupportedModes" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
static Sequence< ::rtl::OUString > aModes;
if (!aModes.getLength())
{
aModes.realloc(2);
::rtl::OUString* pModes = aModes.getArray();
- pModes[0] = DATA_MODE;
- pModes[1] = FILTER_MODE;
+ pModes[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) );
+ pModes[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) );
}
return aModes;
}
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::supportsMode(const ::rtl::OUString& Mode) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::supportsMode(const ::rtl::OUString& Mode) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::supportsMode" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
Sequence< ::rtl::OUString > aModes(getSupportedModes());
const ::rtl::OUString* pModes = aModes.getConstArray();
for (sal_Int32 i = aModes.getLength(); i > 0; )
@@ -3294,37 +3562,32 @@ sal_Bool SAL_CALL FmXFormController::supportsMode(const ::rtl::OUString& Mode) t
}
//------------------------------------------------------------------------------
-Window* FmXFormController::getDialogParentWindow()
+Window* FormController::getDialogParentWindow()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::getDialogParentWindow" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
- Window* pParent = m_pWindow;
- if ( !pParent )
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
+ Window* pParentWindow = NULL;
+ try
{
- try
- {
- Reference< XControl > xContainerControl( getContainer(), UNO_QUERY_THROW );
- Reference< XWindowPeer > xContainerPeer( xContainerControl->getPeer(), UNO_QUERY_THROW );
- pParent = VCLUnoHelper::GetWindow( xContainerPeer );
- }
- catch( const Exception& )
- {
- OSL_ENSURE( sal_False, "FmXFormController::getDialogParentWindow: caught an exception!" );
- }
+ Reference< XControl > xContainerControl( getContainer(), UNO_QUERY_THROW );
+ Reference< XWindowPeer > xContainerPeer( xContainerControl->getPeer(), UNO_QUERY_THROW );
+ pParentWindow = VCLUnoHelper::GetWindow( xContainerPeer );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
- return pParent;
+ return pParentWindow;
}
//------------------------------------------------------------------------------
-bool FmXFormController::checkFormComponentValidity( ::rtl::OUString& /* [out] */ _rFirstInvalidityExplanation, Reference< XControlModel >& /* [out] */ _rxFirstInvalidModel ) SAL_THROW(())
+bool FormController::checkFormComponentValidity( ::rtl::OUString& /* [out] */ _rFirstInvalidityExplanation, Reference< XControlModel >& /* [out] */ _rxFirstInvalidModel ) SAL_THROW(())
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::checkFormComponentValidity" );
try
{
Reference< XEnumerationAccess > xControlEnumAcc( getModel(), UNO_QUERY );
Reference< XEnumeration > xControlEnumeration;
if ( xControlEnumAcc.is() )
xControlEnumeration = xControlEnumAcc->createEnumeration();
- OSL_ENSURE( xControlEnumeration.is(), "FmXFormController::checkFormComponentValidity: cannot enumerate the controls!" );
+ OSL_ENSURE( xControlEnumeration.is(), "FormController::checkFormComponentValidity: cannot enumerate the controls!" );
if ( !xControlEnumeration.is() )
// assume all valid
return true;
@@ -3340,7 +3603,7 @@ bool FmXFormController::checkFormComponentValidity( ::rtl::OUString& /* [out] */
continue;
Reference< XValidator > xValidator( xValidatable->getValidator() );
- OSL_ENSURE( xValidator.is(), "FmXFormController::checkFormComponentValidity: invalid, but no validator?" );
+ OSL_ENSURE( xValidator.is(), "FormController::checkFormComponentValidity: invalid, but no validator?" );
if ( !xValidator.is() )
// this violates the interface definition of css.form.validation.XValidatableFormComponent ...
continue;
@@ -3352,15 +3615,14 @@ bool FmXFormController::checkFormComponentValidity( ::rtl::OUString& /* [out] */
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::checkFormComponentValidity: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
return true;
}
//------------------------------------------------------------------------------
-Reference< XControl > FmXFormController::locateControl( const Reference< XControlModel >& _rxModel ) SAL_THROW(())
+Reference< XControl > FormController::locateControl( const Reference< XControlModel >& _rxModel ) SAL_THROW(())
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::locateControl" );
try
{
Sequence< Reference< XControl > > aControls( getControls() );
@@ -3369,18 +3631,18 @@ Reference< XControl > FmXFormController::locateControl( const Reference< XContro
for ( ; pControls != pControlsEnd; ++pControls )
{
- OSL_ENSURE( pControls->is(), "FmXFormController::locateControl: NULL-control?" );
+ OSL_ENSURE( pControls->is(), "FormController::locateControl: NULL-control?" );
if ( pControls->is() )
{
if ( ( *pControls)->getModel() == _rxModel )
return *pControls;
}
}
- OSL_ENSURE( sal_False, "FmXFormController::locateControl: did not find a control for this model!" );
+ OSL_ENSURE( sal_False, "FormController::locateControl: did not find a control for this model!" );
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "FmXFormController::locateControl: caught an exception!" );
+ DBG_UNHANDLED_EXCEPTION();
}
return NULL;
}
@@ -3448,12 +3710,11 @@ namespace
// XRowSetApproveListener
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::approveRowChange(const RowChangeEvent& _rEvent) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::approveRowChange" );
::osl::ClearableMutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
::cppu::OInterfaceIteratorHelper aIter(m_aRowSetApproveListeners);
sal_Bool bValid = sal_True;
if (aIter.hasMoreElements())
@@ -3486,7 +3747,7 @@ sal_Bool SAL_CALL FmXFormController::approveRowChange(const RowChangeEvent& _rEv
if ( !lcl_shouldValidateRequiredFields_nothrow( _rEvent.Source ) )
return sal_True;
- OSL_ENSURE( m_pColumnInfoCache.get(), "FmXFormController::approveRowChange: no column infos!" );
+ OSL_ENSURE( m_pColumnInfoCache.get(), "FormController::approveRowChange: no column infos!" );
if ( !m_pColumnInfoCache.get() )
return sal_True;
@@ -3537,11 +3798,11 @@ sal_Bool SAL_CALL FmXFormController::approveRowChange(const RowChangeEvent& _rEv
}
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::approveCursorMove(const EventObject& event) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::approveCursorMove(const EventObject& event) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::approveCursorMove" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
+
::cppu::OInterfaceIteratorHelper aIter(m_aRowSetApproveListeners);
if (aIter.hasMoreElements())
{
@@ -3554,11 +3815,11 @@ sal_Bool SAL_CALL FmXFormController::approveCursorMove(const EventObject& event)
}
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::approveRowSetChange(const EventObject& event) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::approveRowSetChange(const EventObject& event) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::approveRowSetChange" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
+
::cppu::OInterfaceIteratorHelper aIter(m_aRowSetApproveListeners);
if (aIter.hasMoreElements())
{
@@ -3572,30 +3833,29 @@ sal_Bool SAL_CALL FmXFormController::approveRowSetChange(const EventObject& even
// XRowSetApproveBroadcaster
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addRowSetApproveListener(const Reference< XRowSetApproveListener > & _rxListener) throw( RuntimeException )
+void SAL_CALL FormController::addRowSetApproveListener(const Reference< XRowSetApproveListener > & _rxListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addRowSetApproveListener" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
+
m_aRowSetApproveListeners.addInterface(_rxListener);
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeRowSetApproveListener(const Reference< XRowSetApproveListener > & _rxListener) throw( RuntimeException )
+void SAL_CALL FormController::removeRowSetApproveListener(const Reference< XRowSetApproveListener > & _rxListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeRowSetApproveListener" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
+
m_aRowSetApproveListeners.removeInterface(_rxListener);
}
// XErrorListener
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::errorOccured(const SQLErrorEvent& aEvent) throw( RuntimeException )
+void SAL_CALL FormController::errorOccured(const SQLErrorEvent& aEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::errorOccured" );
::osl::ClearableMutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
::cppu::OInterfaceIteratorHelper aIter(m_aErrorListeners);
if (aIter.hasMoreElements())
@@ -3613,61 +3873,62 @@ void SAL_CALL FmXFormController::errorOccured(const SQLErrorEvent& aEvent) throw
// XErrorBroadcaster
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addSQLErrorListener(const Reference< XSQLErrorListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::addSQLErrorListener(const Reference< XSQLErrorListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addSQLErrorListener" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
+
m_aErrorListeners.addInterface(aListener);
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeSQLErrorListener(const Reference< XSQLErrorListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::removeSQLErrorListener(const Reference< XSQLErrorListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeSQLErrorListener" );
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ impl_checkDisposed_throw();
+
m_aErrorListeners.removeInterface(aListener);
}
// XDatabaseParameterBroadcaster2
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addDatabaseParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::addDatabaseParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addDatabaseParameterListener" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
m_aParameterListeners.addInterface(aListener);
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeDatabaseParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::removeDatabaseParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeDatabaseParameterListener" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
m_aParameterListeners.removeInterface(aListener);
}
// XDatabaseParameterBroadcaster
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::addParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addParameterListener" );
- FmXFormController::addDatabaseParameterListener( aListener );
+ FormController::addDatabaseParameterListener( aListener );
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::removeParameterListener(const Reference< XDatabaseParameterListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeParameterListener" );
- FmXFormController::removeDatabaseParameterListener( aListener );
+ FormController::removeDatabaseParameterListener( aListener );
}
// XDatabaseParameterListener
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::approveParameter(const DatabaseParameterEvent& aEvent) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::approveParameter(const DatabaseParameterEvent& aEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::approveParameter" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
::cppu::OInterfaceIteratorHelper aIter(m_aParameterListeners);
if (aIter.hasMoreElements())
@@ -3698,10 +3959,7 @@ sal_Bool SAL_CALL FmXFormController::approveParameter(const DatabaseParameterEve
pParamRequest->addContinuation(pAbort);
// handle the request
- {
- ::vos::OGuard aGuard(Application::GetSolarMutex());
- m_xInteractionHandler->handle(xParamRequest);
- }
+ m_xInteractionHandler->handle(xParamRequest);
if (!pParamValues->wasSelected())
// canceled
@@ -3711,7 +3969,7 @@ sal_Bool SAL_CALL FmXFormController::approveParameter(const DatabaseParameterEve
Sequence< PropertyValue > aFinalValues = pParamValues->getValues();
if (aFinalValues.getLength() != aRequest.Parameters->getCount())
{
- DBG_ERROR("FmXFormController::approveParameter: the InteractionHandler returned nonsense!");
+ DBG_ERROR("FormController::approveParameter: the InteractionHandler returned nonsense!");
return sal_False;
}
const PropertyValue* pFinalValues = aFinalValues.getConstArray();
@@ -3724,19 +3982,19 @@ sal_Bool SAL_CALL FmXFormController::approveParameter(const DatabaseParameterEve
#ifdef DBG_UTIL
::rtl::OUString sName;
xParam->getPropertyValue(FM_PROP_NAME) >>= sName;
- DBG_ASSERT(sName.equals(pFinalValues->Name), "FmXFormController::approveParameter: suspicious value names!");
+ DBG_ASSERT(sName.equals(pFinalValues->Name), "FormController::approveParameter: suspicious value names!");
#endif
try { xParam->setPropertyValue(FM_PROP_VALUE, pFinalValues->Value); }
catch(Exception&)
{
- DBG_ERROR("FmXFormController::approveParameter: setting one of the properties failed!");
+ DBG_ERROR("FormController::approveParameter: setting one of the properties failed!");
}
}
}
}
catch(Exception&)
{
- DBG_ERROR("FmXFormController::approveParameter: caught an Exception (tried to let the InteractionHandler handle it)!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
return sal_True;
@@ -3744,27 +4002,29 @@ sal_Bool SAL_CALL FmXFormController::approveParameter(const DatabaseParameterEve
// XConfirmDeleteBroadcaster
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addConfirmDeleteListener(const Reference< XConfirmDeleteListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::addConfirmDeleteListener(const Reference< XConfirmDeleteListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addConfirmDeleteListener" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
m_aDeleteListeners.addInterface(aListener);
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeConfirmDeleteListener(const Reference< XConfirmDeleteListener > & aListener) throw( RuntimeException )
+void SAL_CALL FormController::removeConfirmDeleteListener(const Reference< XConfirmDeleteListener > & aListener) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeConfirmDeleteListener" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
m_aDeleteListeners.removeInterface(aListener);
}
// XConfirmDeleteListener
//------------------------------------------------------------------------------
-sal_Bool SAL_CALL FmXFormController::confirmDelete(const RowChangeEvent& aEvent) throw( RuntimeException )
+sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::confirmDelete" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
::cppu::OInterfaceIteratorHelper aIter(m_aDeleteListeners);
if (aIter.hasMoreElements())
@@ -3773,32 +4033,62 @@ sal_Bool SAL_CALL FmXFormController::confirmDelete(const RowChangeEvent& aEvent)
aEvt.Source = *this;
return ((XConfirmDeleteListener*)aIter.next())->confirmDelete(aEvt);
}
+ // default handling: instantiate an interaction handler and let it handle the request
+
+ String sTitle;
+ sal_Int32 nLength = aEvent.Rows;
+ if ( nLength > 1 )
+ {
+ sTitle = SVX_RES( RID_STR_DELETECONFIRM_RECORDS );
+ sTitle.SearchAndReplace( '#', String::CreateFromInt32( nLength ) );
+ }
else
+ sTitle = SVX_RES( RID_STR_DELETECONFIRM_RECORD );
+
+ try
{
- // default handling
- UniString aTitle;
- sal_Int32 nLength = aEvent.Rows;
- if (nLength > 1)
- {
- aTitle = SVX_RES(RID_STR_DELETECONFIRM_RECORDS);
- aTitle.SearchAndReplace('#', String::CreateFromInt32(nLength));
- }
- else
- aTitle = SVX_RES(RID_STR_DELETECONFIRM_RECORD);
+ if ( !ensureInteractionHandler() )
+ return sal_False;
+
+ // two continuations allowed: Yes and No
+ OInteractionApprove* pApprove = new OInteractionApprove;
+ OInteractionDisapprove* pDisapprove = new OInteractionDisapprove;
- ConfirmDeleteDialog aDlg(getDialogParentWindow(), aTitle);
- return RET_YES == aDlg.Execute();
+ // the request
+ SQLWarning aWarning;
+ aWarning.Message = sTitle;
+ SQLWarning aDetails;
+ aDetails.Message = String( SVX_RES( RID_STR_DELETECONFIRM ) );
+ aWarning.NextException <<= aDetails;
+
+ OInteractionRequest* pRequest = new OInteractionRequest( makeAny( aWarning ) );
+ Reference< XInteractionRequest > xRequest( pRequest );
+
+ // some knittings
+ pRequest->addContinuation( pApprove );
+ pRequest->addContinuation( pDisapprove );
+
+ // handle the request
+ m_xInteractionHandler->handle( xRequest );
+
+ if ( pApprove->wasSelected() )
+ return sal_True;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
+
+ return sal_False;
}
//------------------------------------------------------------------------------
-void FmXFormController::invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures )
+void SAL_CALL FormController::invalidateFeatures( const Sequence< ::sal_Int16 >& _Features ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::invalidateFeatures" );
::osl::MutexGuard aGuard( m_aMutex );
// for now, just copy the ids of the features, because ....
- ::std::copy( _rFeatures.begin(), _rFeatures.end(),
- ::std::insert_iterator< ::std::set< sal_Int32 > >( m_aInvalidFeatures, m_aInvalidFeatures.begin() )
+ ::std::copy( _Features.getConstArray(), _Features.getConstArray() + _Features.getLength(),
+ ::std::insert_iterator< ::std::set< sal_Int16 > >( m_aInvalidFeatures, m_aInvalidFeatures.begin() )
);
// ... we will do the real invalidation asynchronously
@@ -3807,13 +4097,30 @@ void FmXFormController::invalidateFeatures( const ::std::vector< sal_Int32 >& _r
}
//------------------------------------------------------------------------------
+void SAL_CALL FormController::invalidateAllFeatures( ) throw (RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
+
+ Sequence< sal_Int16 > aInterceptedFeatures( m_aFeatureDispatchers.size() );
+ ::std::transform(
+ m_aFeatureDispatchers.begin(),
+ m_aFeatureDispatchers.end(),
+ aInterceptedFeatures.getArray(),
+ ::std::select1st< DispatcherContainer::value_type >()
+ );
+
+ aGuard.clear();
+ if ( aInterceptedFeatures.getLength() )
+ invalidateFeatures( aInterceptedFeatures );
+}
+
+//------------------------------------------------------------------------------
Reference< XDispatch >
-FmXFormController::interceptedQueryDispatch(sal_uInt16 /*_nId*/, const URL& aURL,
+FormController::interceptedQueryDispatch( const URL& aURL,
const ::rtl::OUString& /*aTargetFrameName*/, sal_Int32 /*nSearchFlags*/)
throw( RuntimeException )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::interceptedQueryDispatch" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
Reference< XDispatch > xReturn;
// dispatches handled by ourself
if ( ( aURL.Complete == FMURL_CONFIRM_DELETION )
@@ -3824,22 +4131,23 @@ FmXFormController::interceptedQueryDispatch(sal_uInt16 /*_nId*/, const URL& aURL
xReturn = static_cast< XDispatch* >( this );
// dispatches of FormSlot-URLs we have to translate
- if ( !xReturn.is() && m_aControllerFeatures.isAssigned() )
+ if ( !xReturn.is() && m_xFormOperations.is() )
{
// find the slot id which corresponds to the URL
- sal_Int32 nFeatureId = ::svx::FeatureSlotTranslation::getControllerFeatureSlotIdForURL( aURL.Main );
- if ( nFeatureId > 0 )
+ sal_Int32 nFeatureSlotId = ::svx::FeatureSlotTranslation::getControllerFeatureSlotIdForURL( aURL.Main );
+ sal_Int16 nFormFeature = ( nFeatureSlotId != -1 ) ? ::svx::FeatureSlotTranslation::getFormFeatureForSlotId( nFeatureSlotId ) : -1;
+ if ( nFormFeature > 0 )
{
// get the dispatcher for this feature, create if necessary
- DispatcherContainer::const_iterator aDispatcherPos = m_aFeatureDispatchers.find( nFeatureId );
+ DispatcherContainer::const_iterator aDispatcherPos = m_aFeatureDispatchers.find( nFormFeature );
if ( aDispatcherPos == m_aFeatureDispatchers.end() )
{
aDispatcherPos = m_aFeatureDispatchers.insert(
- DispatcherContainer::value_type( nFeatureId, new ::svx::OSingleFeatureDispatcher( aURL, nFeatureId, *m_aControllerFeatures, m_aMutex ) )
+ DispatcherContainer::value_type( nFormFeature, new ::svx::OSingleFeatureDispatcher( aURL, nFormFeature, m_xFormOperations, m_aMutex ) )
).first;
}
- OSL_ENSURE( aDispatcherPos->second.is(), "FmXFormController::interceptedQueryDispatch: should have a dispatcher by now!" );
+ OSL_ENSURE( aDispatcherPos->second.is(), "FormController::interceptedQueryDispatch: should have a dispatcher by now!" );
return aDispatcherPos->second;
}
}
@@ -3849,12 +4157,11 @@ FmXFormController::interceptedQueryDispatch(sal_uInt16 /*_nId*/, const URL& aURL
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::dispatch( const URL& _rURL, const Sequence< PropertyValue >& _rArgs ) throw (RuntimeException)
+void SAL_CALL FormController::dispatch( const URL& _rURL, const Sequence< PropertyValue >& _rArgs ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::dispatch" );
if ( _rArgs.getLength() != 1 )
{
- DBG_ERROR( "FmXFormController::dispatch: no arguments -> no dispatch!" );
+ DBG_ERROR( "FormController::dispatch: no arguments -> no dispatch!" );
return;
}
@@ -3869,18 +4176,17 @@ void SAL_CALL FmXFormController::dispatch( const URL& _rURL, const Sequence< Pro
if ( _rURL.Complete == FMURL_CONFIRM_DELETION )
{
- DBG_ERROR( "FmXFormController::dispatch: How do you expect me to return something via this call?" );
+ DBG_ERROR( "FormController::dispatch: How do you expect me to return something via this call?" );
// confirmDelete has a return value - dispatch hasn't
return;
}
- DBG_ERROR( "FmXFormController::dispatch: unknown URL!" );
+ DBG_ERROR( "FormController::dispatch: unknown URL!" );
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::addStatusListener( const Reference< XStatusListener >& _rxListener, const URL& _rURL ) throw (RuntimeException)
+void SAL_CALL FormController::addStatusListener( const Reference< XStatusListener >& _rxListener, const URL& _rURL ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::addStatusListener" );
if (_rURL.Complete == FMURL_CONFIRM_DELETION)
{
if (_rxListener.is())
@@ -3893,23 +4199,33 @@ void SAL_CALL FmXFormController::addStatusListener( const Reference< XStatusList
}
}
else
- OSL_ENSURE(sal_False, "FmXFormController::addStatusListener: invalid (unsupported) URL!");
+ OSL_ENSURE(sal_False, "FormController::addStatusListener: invalid (unsupported) URL!");
+}
+
+//------------------------------------------------------------------------------
+Reference< XInterface > SAL_CALL FormController::getParent() throw( RuntimeException )
+{
+ return m_xParent;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FormController::setParent( const Reference< XInterface >& Parent) throw( NoSupportException, RuntimeException )
+{
+ m_xParent = Parent;
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::removeStatusListener( const Reference< XStatusListener >& /*_rxListener*/, const URL& _rURL ) throw (RuntimeException)
+void SAL_CALL FormController::removeStatusListener( const Reference< XStatusListener >& /*_rxListener*/, const URL& _rURL ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::removeStatusListener" );
(void)_rURL;
- OSL_ENSURE(_rURL.Complete == FMURL_CONFIRM_DELETION, "FmXFormController::removeStatusListener: invalid (unsupported) URL!");
+ OSL_ENSURE(_rURL.Complete == FMURL_CONFIRM_DELETION, "FormController::removeStatusListener: invalid (unsupported) URL!");
// we never really added the listener, so we don't need to remove it
}
//------------------------------------------------------------------------------
-Reference< XDispatchProviderInterceptor > FmXFormController::createInterceptor(const Reference< XDispatchProviderInterception > & _xInterception)
+Reference< XDispatchProviderInterceptor > FormController::createInterceptor(const Reference< XDispatchProviderInterception > & _xInterception)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::createInterceptor" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
#ifdef DBG_UTIL
// check if we already have a interceptor for the given object
for ( ConstInterceptorsIterator aIter = m_aControlDispatchInterceptors.begin();
@@ -3918,49 +4234,43 @@ Reference< XDispatchProviderInterceptor > FmXFormController::createInterceptor(
)
{
if ((*aIter)->getIntercepted() == _xInterception)
- DBG_ERROR("FmXFormController::createInterceptor : we already do intercept this objects dispatches !");
+ DBG_ERROR("FormController::createInterceptor : we already do intercept this objects dispatches !");
}
#endif
- ::rtl::OUString sInterceptorScheme(RTL_CONSTASCII_USTRINGPARAM("*"));
- FmXDispatchInterceptorImpl* pInterceptor = new FmXDispatchInterceptorImpl(_xInterception, this, 0, Sequence< ::rtl::OUString >(&sInterceptorScheme, 1));
+ DispatchInterceptionMultiplexer* pInterceptor = new DispatchInterceptionMultiplexer( _xInterception, this );
pInterceptor->acquire();
- m_aControlDispatchInterceptors.insert(m_aControlDispatchInterceptors.end(), pInterceptor);
+ m_aControlDispatchInterceptors.insert( m_aControlDispatchInterceptors.end(), pInterceptor );
- return (XDispatchProviderInterceptor*)pInterceptor;
+ return pInterceptor;
}
//------------------------------------------------------------------------------
-bool FmXFormController::ensureInteractionHandler()
+bool FormController::ensureInteractionHandler()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::ensureInteractionHandler" );
if ( m_xInteractionHandler.is() )
return true;
if ( m_bAttemptedHandlerCreation )
return false;
m_bAttemptedHandlerCreation = true;
- if ( !m_xORB.is() )
- return false;
- m_xInteractionHandler.set( m_xORB->createInstance( SRV_SDB_INTERACTION_HANDLER ), UNO_QUERY );
- OSL_ENSURE( m_xInteractionHandler.is(), "FmXFormController::ensureInteractionHandler: could not create an interaction handler!" );
+ m_xInteractionHandler.set( m_aContext.createComponent( (::rtl::OUString)SRV_SDB_INTERACTION_HANDLER ), UNO_QUERY );
+ OSL_ENSURE( m_xInteractionHandler.is(), "FormController::ensureInteractionHandler: could not create an interaction handler!" );
return m_xInteractionHandler.is();
}
//------------------------------------------------------------------------------
-void SAL_CALL FmXFormController::handle( const Reference< XInteractionRequest >& _rRequest ) throw (RuntimeException)
+void SAL_CALL FormController::handle( const Reference< XInteractionRequest >& _rRequest ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::handle" );
if ( !ensureInteractionHandler() )
return;
m_xInteractionHandler->handle( _rRequest );
}
//------------------------------------------------------------------------------
-void FmXFormController::deleteInterceptor(const Reference< XDispatchProviderInterception > & _xInterception)
+void FormController::deleteInterceptor(const Reference< XDispatchProviderInterception > & _xInterception)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::deleteInterceptor" );
- OSL_ENSURE( !impl_isDisposed_nofail(), "FmXFormController: already disposed!" );
+ OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" );
// search the interceptor responsible for the given object
InterceptorsIterator aIter;
for ( aIter = m_aControlDispatchInterceptors.begin();
@@ -3977,7 +4287,7 @@ void FmXFormController::deleteInterceptor(const Reference< XDispatchProviderInte
}
// log off the interception from it's interception object
- FmXDispatchInterceptorImpl* pInterceptorImpl = *aIter;
+ DispatchInterceptionMultiplexer* pInterceptorImpl = *aIter;
pInterceptorImpl->dispose();
pInterceptorImpl->release();
@@ -3986,35 +4296,22 @@ void FmXFormController::deleteInterceptor(const Reference< XDispatchProviderInte
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException)
+void FormController::implInvalidateCurrentControlDependentFeatures()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::initialize" );
- DBG_ASSERT( !m_xInteractionHandler.is(), "FmXFormController::initialize: already initialized!" );
- // currently, we only initialize our interaction handler here, so it's sufficient to assert this
+ Sequence< sal_Int16 > aCurrentControlDependentFeatures(4);
- ::comphelper::NamedValueCollection aArgs( aArguments );
- m_xInteractionHandler = aArgs.getOrDefault( "InteractionHandler", m_xInteractionHandler );
-}
-
-//--------------------------------------------------------------------
-void FmXFormController::implInvalidateCurrentControlDependentFeatures()
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::implInvalidateCurrentControlDependentFeatures" );
- ::std::vector< sal_Int32 > aCurrentControlDependentFeatures;
-
- aCurrentControlDependentFeatures.push_back( SID_FM_SORTUP );
- aCurrentControlDependentFeatures.push_back( SID_FM_SORTDOWN );
- aCurrentControlDependentFeatures.push_back( SID_FM_AUTOFILTER );
- aCurrentControlDependentFeatures.push_back( SID_FM_REFRESH_FORM_CONTROL );
+ aCurrentControlDependentFeatures[0] = FormFeature::SortAscending;
+ aCurrentControlDependentFeatures[1] = FormFeature::SortDescending;
+ aCurrentControlDependentFeatures[2] = FormFeature::AutoFilter;
+ aCurrentControlDependentFeatures[3] = FormFeature::RefreshCurrentControl;
- if ( m_pView && m_pView->GetFormShell() && m_pView->GetFormShell()->GetImpl() )
- m_pView->GetFormShell()->GetImpl()->invalidateFeatures( aCurrentControlDependentFeatures );
invalidateFeatures( aCurrentControlDependentFeatures );
}
//--------------------------------------------------------------------
-void SAL_CALL FmXFormController::columnChanged( const EventObject& /*_event*/ ) throw (RuntimeException)
+void SAL_CALL FormController::columnChanged( const EventObject& /*_event*/ ) throw (RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormController::columnChanged" );
implInvalidateCurrentControlDependentFeatures();
}
+
+} // namespace svxform
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index 454bdef5d8bf..de6208ef7527 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -33,7 +33,7 @@
#include "formcontrolling.hxx"
#include "fmurl.hxx"
-#include <svx/svxids.hrc>
+#include "svx/svxids.hrc"
#include "fmprop.hrc"
#include "svx/fmtools.hxx"
@@ -60,7 +60,7 @@ namespace svx
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
using ::com::sun::star::lang::XMultiServiceFactory;
- using ::com::sun::star::form::XFormController;
+ using ::com::sun::star::form::runtime::XFormController;
using ::com::sun::star::form::XForm;
using ::com::sun::star::form::runtime::FormOperations;
using ::com::sun::star::uno::Exception;
diff --git a/svx/source/form/formdispatchinterceptor.cxx b/svx/source/form/formdispatchinterceptor.cxx
new file mode 100644
index 000000000000..2950b1605b0f
--- /dev/null
+++ b/svx/source/form/formdispatchinterceptor.cxx
@@ -0,0 +1,213 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include "formdispatchinterceptor.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <tools/debug.hxx>
+
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::frame::XDispatchProviderInterception;
+ using ::com::sun::star::frame::XDispatchProviderInterceptor;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::util::URL;
+ using ::com::sun::star::frame::XDispatch;
+ using ::com::sun::star::frame::DispatchDescriptor;
+ using ::com::sun::star::frame::XDispatchProvider;
+ using ::com::sun::star::lang::EventObject;
+ /** === end UNO using === **/
+
+ //========================================================================
+ //= DispatchInterceptionMultiplexer
+ //========================================================================
+
+ DBG_NAME(DispatchInterceptionMultiplexer)
+ //------------------------------------------------------------------------
+ DispatchInterceptionMultiplexer::DispatchInterceptionMultiplexer(
+ const Reference< XDispatchProviderInterception >& _rxToIntercept, DispatchInterceptor* _pMaster )
+ :DispatchInterceptionMultiplexer_BASE(_pMaster && _pMaster->getInterceptorMutex() ? *_pMaster->getInterceptorMutex() : m_aFallback)
+ ,m_aFallback()
+ ,m_pMutex( _pMaster && _pMaster->getInterceptorMutex() ? _pMaster->getInterceptorMutex() : &m_aFallback )
+ ,m_xIntercepted(_rxToIntercept)
+ ,m_bListening(sal_False)
+ ,m_pMaster(_pMaster)
+ {
+ DBG_CTOR(DispatchInterceptionMultiplexer,NULL);
+
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ ::comphelper::increment(m_refCount);
+ if (_rxToIntercept.is())
+ {
+ _rxToIntercept->registerDispatchProviderInterceptor((XDispatchProviderInterceptor*)this);
+ // this should make us the top-level dispatch-provider for the component, via a call to our
+ // setDispatchProvider we should have got an fallback for requests we (i.e. our master) cannot fullfill
+ Reference< XComponent> xInterceptedComponent(_rxToIntercept, UNO_QUERY);
+ if (xInterceptedComponent.is())
+ {
+ xInterceptedComponent->addEventListener(this);
+ m_bListening = sal_True;
+ }
+ }
+ ::comphelper::decrement(m_refCount);
+ }
+
+ //------------------------------------------------------------------------
+ DispatchInterceptionMultiplexer::~DispatchInterceptionMultiplexer()
+ {
+ if (!rBHelper.bDisposed)
+ dispose();
+
+ DBG_DTOR(DispatchInterceptionMultiplexer,NULL);
+ }
+
+ //------------------------------------------------------------------------------
+ Reference< XDispatch > SAL_CALL DispatchInterceptionMultiplexer::queryDispatch( const URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ Reference< XDispatch> xResult;
+ // ask our 'real' interceptor
+ if (m_pMaster)
+ xResult = m_pMaster->interceptedQueryDispatch( aURL, aTargetFrameName, nSearchFlags);
+
+ // ask our slave provider
+ if (!xResult.is() && m_xSlaveDispatcher.is())
+ xResult = m_xSlaveDispatcher->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
+
+ return xResult;
+ }
+
+ //------------------------------------------------------------------------------
+ Sequence< Reference< XDispatch > > SAL_CALL
+ DispatchInterceptionMultiplexer::queryDispatches( const Sequence< DispatchDescriptor >& aDescripts ) throw(RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ Sequence< Reference< XDispatch> > aReturn(aDescripts.getLength());
+ Reference< XDispatch>* pReturn = aReturn.getArray();
+ const DispatchDescriptor* pDescripts = aDescripts.getConstArray();
+ for (sal_Int16 i=0; i<aDescripts.getLength(); ++i, ++pReturn, ++pDescripts)
+ {
+ *pReturn = queryDispatch(pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags);
+ }
+ return aReturn;
+ }
+
+ //------------------------------------------------------------------------------
+ Reference< XDispatchProvider > SAL_CALL DispatchInterceptionMultiplexer::getSlaveDispatchProvider( ) throw(RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ return m_xSlaveDispatcher;
+ }
+
+ //------------------------------------------------------------------------------
+ void SAL_CALL DispatchInterceptionMultiplexer::setSlaveDispatchProvider(const Reference< XDispatchProvider>& xNewDispatchProvider) throw( RuntimeException )
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ m_xSlaveDispatcher = xNewDispatchProvider;
+ }
+
+ //------------------------------------------------------------------------------
+ Reference< XDispatchProvider> SAL_CALL DispatchInterceptionMultiplexer::getMasterDispatchProvider(void) throw( RuntimeException )
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ return m_xMasterDispatcher;
+ }
+
+ //------------------------------------------------------------------------------
+ void SAL_CALL DispatchInterceptionMultiplexer::setMasterDispatchProvider(const Reference< XDispatchProvider>& xNewSupplier) throw( RuntimeException )
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ m_xMasterDispatcher = xNewSupplier;
+ }
+
+ //------------------------------------------------------------------------------
+ void SAL_CALL DispatchInterceptionMultiplexer::disposing(const EventObject& Source) throw( RuntimeException )
+ {
+ if (m_bListening)
+ {
+ Reference< XDispatchProviderInterception > xIntercepted(m_xIntercepted.get(), UNO_QUERY);
+ if (Source.Source == xIntercepted)
+ ImplDetach();
+ }
+ }
+
+ //------------------------------------------------------------------------------
+ void DispatchInterceptionMultiplexer::ImplDetach()
+ {
+ ::osl::MutexGuard aGuard( *m_pMutex );
+ OSL_ENSURE(m_bListening, "DispatchInterceptionMultiplexer::ImplDetach: invalid call!");
+
+ // deregister ourself from the interception component
+ Reference< XDispatchProviderInterception > xIntercepted(m_xIntercepted.get(), UNO_QUERY);
+ if (xIntercepted.is())
+ xIntercepted->releaseDispatchProviderInterceptor(static_cast<XDispatchProviderInterceptor*>(this));
+
+ // m_xIntercepted = Reference< XDispatchProviderInterception >();
+ // Don't reset m_xIntercepted: It may be needed by our owner to check for which object we were
+ // responsible. As we hold the object with a weak reference only, this should be no problem.
+ // 88936 - 23.07.2001 - frank.schoenheit@sun.com
+ m_pMaster = NULL;
+ m_pMutex = &m_aFallback;
+ m_bListening = sal_False;
+ }
+
+ //------------------------------------------------------------------------------
+ void DispatchInterceptionMultiplexer::disposing()
+ {
+ // remove ourself as event listener from the interception component
+ if (m_bListening)
+ {
+ Reference< XComponent> xInterceptedComponent(m_xIntercepted.get(), UNO_QUERY);
+ if (xInterceptedComponent.is())
+ xInterceptedComponent->removeEventListener(static_cast<XEventListener*>(this));
+
+ // detach from the interception component
+ ImplDetach();
+ }
+ }
+
+//........................................................................
+} // namespace svxform
+//........................................................................
diff --git a/svx/source/form/fmdispatch.cxx b/svx/source/form/formfeaturedispatcher.cxx
index 154063409bef..82ca17812562 100644
--- a/svx/source/form/fmdispatch.cxx
+++ b/svx/source/form/formfeaturedispatcher.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmdispatch.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,8 +27,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "fmdispatch.hxx"
-#include "formcontrolling.hxx"
+
+#include "formfeaturedispatcher.hxx"
+
+#include <comphelper/namedvaluecollection.hxx>
+#include <tools/diagnose_ex.h>
//........................................................................
namespace svx
@@ -49,13 +49,13 @@ namespace svx
//= OSingleFeatureDispatcher
//====================================================================
//--------------------------------------------------------------------
- OSingleFeatureDispatcher::OSingleFeatureDispatcher( const URL& _rFeatureURL, sal_Int32 _nFeatureId,
- const FormControllerHelper& _rController, ::osl::Mutex& _rMutex )
+ OSingleFeatureDispatcher::OSingleFeatureDispatcher( const URL& _rFeatureURL, const sal_Int16 _nFormFeature,
+ const Reference< XFormOperations >& _rxFormOperations, ::osl::Mutex& _rMutex )
:m_rMutex( _rMutex )
,m_aStatusListeners( _rMutex )
- ,m_rController( _rController )
+ ,m_xFormOperations( _rxFormOperations )
,m_aFeatureURL( _rFeatureURL )
- ,m_nFeatureId( _nFeatureId )
+ ,m_nFormFeature( _nFormFeature )
,m_bLastKnownEnabled( sal_False )
,m_bDisposed( sal_False )
{
@@ -82,10 +82,9 @@ namespace svx
//--------------------------------------------------------------------
void OSingleFeatureDispatcher::getUnoState( FeatureStateEvent& /* [out] */ _rState ) const
{
- FeatureState aState;
_rState.Source = *const_cast< OSingleFeatureDispatcher* >( this );
- m_rController.getState( m_nFeatureId, aState );
+ FeatureState aState( m_xFormOperations->getState( m_nFormFeature ) );
_rState.FeatureURL = m_aFeatureURL;
_rState.IsEnabled = aState.Enabled;
@@ -161,21 +160,34 @@ namespace svx
OSL_ENSURE( _rURL.Complete == m_aFeatureURL.Complete, "OSingleFeatureDispatcher::dispatch: not responsible for this URL!" );
(void)_rURL;
- if ( m_rController.isEnabled( m_nFeatureId ) )
- {
- // release our mutex before executing the slot?
- sal_Int32 nFeatureId( m_nFeatureId );
- aGuard.clear();
+ if ( !m_xFormOperations->isEnabled( m_nFormFeature ) )
+ return;
+ // release our mutex before executing the command
+ sal_Int16 nFormFeature( m_nFormFeature );
+ Reference< XFormOperations > xFormOperations( m_xFormOperations );
+ aGuard.clear();
+
+ try
+ {
if ( !_rArguments.getLength() )
{
- m_rController.execute( nFeatureId );
+ xFormOperations->execute( nFormFeature );
}
else
{ // at the moment we only support one parameter
- m_rController.execute( nFeatureId, _rArguments[0].Name, _rArguments[0].Value );
+ ::comphelper::NamedValueCollection aArgs( _rArguments );
+ xFormOperations->executeWithArguments( nFormFeature, aArgs.getNamedValues() );
}
}
+ catch( const RuntimeException& )
+ {
+ throw;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
//--------------------------------------------------------------------
diff --git a/svx/source/form/legacyformcontroller.cxx b/svx/source/form/legacyformcontroller.cxx
new file mode 100644
index 000000000000..47805a8d6ee1
--- /dev/null
+++ b/svx/source/form/legacyformcontroller.cxx
@@ -0,0 +1,225 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include "fmservs.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase2.hxx>
+
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::awt::XControl;
+ using ::com::sun::star::awt::XTabControllerModel;
+ using ::com::sun::star::awt::XControlContainer;
+ using ::com::sun::star::lang::XServiceInfo;
+ /** === end UNO using === **/
+
+ using namespace ::com::sun::star;
+
+ //====================================================================
+ //= LegacyFormController
+ //====================================================================
+ typedef ::cppu::WeakImplHelper2 < form::XFormController
+ , XServiceInfo
+ > LegacyFormController_Base;
+ /** is an implementation of the legacy form controller service, namely css.form.FormController, supporting the
+ css.form.XFormController interface.
+
+ This legacy API is superseded by css.form.runtime.(X)FormController, and though we migrated all OOo-internal
+ usage of this old API, their might be clients external to OOo still using it (though this is rather unlikely).
+ */
+ class LegacyFormController : public LegacyFormController_Base
+ {
+ public:
+ static Reference< XInterface > Create( const Reference< XMultiServiceFactory >& _rxFactory )
+ {
+ return *( new LegacyFormController( _rxFactory ) );
+ }
+
+ protected:
+ LegacyFormController( const Reference< XMultiServiceFactory >& _rxFactory )
+ :m_xDelegator( _rxFactory->createInstance( FM_FORM_CONTROLLER ), UNO_QUERY_THROW )
+ {
+ }
+
+ // form::XFormController
+ virtual Reference< XControl > SAL_CALL getCurrentControl( ) throw (RuntimeException);
+ virtual void SAL_CALL addActivateListener( const Reference< form::XFormControllerListener >& l ) throw (RuntimeException);
+ virtual void SAL_CALL removeActivateListener( const Reference< form::XFormControllerListener >& l ) throw (RuntimeException);
+
+ // awt::XTabController
+ virtual void SAL_CALL setModel( const Reference< XTabControllerModel >& Model ) throw (RuntimeException);
+ virtual Reference< XTabControllerModel > SAL_CALL getModel( ) throw (RuntimeException);
+ virtual void SAL_CALL setContainer( const Reference< XControlContainer >& Container ) throw (RuntimeException);
+ virtual Reference< XControlContainer > SAL_CALL getContainer( ) throw (RuntimeException);
+ virtual Sequence< Reference< XControl > > SAL_CALL getControls( ) throw (RuntimeException);
+ virtual void SAL_CALL autoTabOrder( ) throw (RuntimeException);
+ virtual void SAL_CALL activateTabOrder( ) throw (RuntimeException);
+ virtual void SAL_CALL activateFirst( ) throw (RuntimeException);
+ virtual void SAL_CALL activateLast( ) throw (RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException);
+ virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
+
+ private:
+ const Reference< form::runtime::XFormController > m_xDelegator;
+ };
+
+ //--------------------------------------------------------------------
+ Reference< XControl > SAL_CALL LegacyFormController::getCurrentControl( ) throw (RuntimeException)
+ {
+ return m_xDelegator->getCurrentControl();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::addActivateListener( const Reference< form::XFormControllerListener >& _listener ) throw (RuntimeException)
+ {
+ m_xDelegator->addActivateListener( _listener );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::removeActivateListener( const Reference< form::XFormControllerListener >& _listener ) throw (RuntimeException)
+ {
+ m_xDelegator->removeActivateListener( _listener );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::setModel( const Reference< XTabControllerModel >& _model ) throw (RuntimeException)
+ {
+ m_xDelegator->setModel( _model );
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XTabControllerModel > SAL_CALL LegacyFormController::getModel( ) throw (RuntimeException)
+ {
+ return m_xDelegator->getModel();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::setContainer( const Reference< XControlContainer >& _container ) throw (RuntimeException)
+ {
+ m_xDelegator->setContainer( _container );
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XControlContainer > SAL_CALL LegacyFormController::getContainer( ) throw (RuntimeException)
+ {
+ return m_xDelegator->getContainer();
+ }
+
+ //--------------------------------------------------------------------
+ Sequence< Reference< XControl > > SAL_CALL LegacyFormController::getControls( ) throw (RuntimeException)
+ {
+ return m_xDelegator->getControls();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::autoTabOrder( ) throw (RuntimeException)
+ {
+ m_xDelegator->autoTabOrder();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::activateTabOrder( ) throw (RuntimeException)
+ {
+ m_xDelegator->activateTabOrder();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::activateFirst( ) throw (RuntimeException)
+ {
+ m_xDelegator->activateFirst();
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL LegacyFormController::activateLast( ) throw (RuntimeException)
+ {
+ m_xDelegator->activateLast();
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL LegacyFormController::getImplementationName( ) throw (RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.svx.LegacyFormController" ) );
+ }
+
+ //--------------------------------------------------------------------
+ ::sal_Bool SAL_CALL LegacyFormController::supportsService( const ::rtl::OUString& _serviceName ) throw (RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServices( getSupportedServiceNames() );
+ const ::rtl::OUString* pServices = aServices.getConstArray();
+ for ( sal_Int32 i = 0; i < aServices.getLength(); ++i, ++pServices )
+ if( pServices->equals( _serviceName ) )
+ return sal_True;
+ return sal_False;
+ }
+
+ //--------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL LegacyFormController::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServices(2);
+ aServices.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.FormController" ) );
+ aServices.getArray()[1] = ::rtl::OUString::createFromAscii("com.sun.star.awt.control.TabController");
+ return aServices;
+ }
+
+//........................................................................
+} // namespace svxform
+//........................................................................
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ LegacyFormController_NewInstance_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB )
+{
+ return ::svxform::LegacyFormController::Create( _rxORB );
+}
+
diff --git a/svx/source/form/makefile.mk b/svx/source/form/makefile.mk
index e5d8e15903fe..1ea5a3f71e5a 100644
--- a/svx/source/form/makefile.mk
+++ b/svx/source/form/makefile.mk
@@ -63,7 +63,6 @@ LIB1OBJFILES= \
$(SLO)$/fmtextcontrolshell.obj \
$(SLO)$/ParseContext.obj \
$(SLO)$/typeconversionclient.obj \
- $(SLO)$/confirmdelete.obj \
$(SLO)$/dbtoolsclient.obj \
$(SLO)$/sqlparserclient.obj \
$(SLO)$/dataaccessdescriptor.obj \
@@ -73,7 +72,7 @@ LIB1OBJFILES= \
$(SLO)$/navigatortree.obj \
$(SLO)$/navigatortreemodel.obj \
$(SLO)$/fmexpl.obj \
- $(SLO)$/fmctrler.obj \
+ $(SLO)$/formcontroller.obj \
$(SLO)$/fmpgeimp.obj \
$(SLO)$/fmvwimp.obj \
$(SLO)$/fmdpage.obj \
@@ -89,14 +88,16 @@ LIB1OBJFILES= \
$(SLO)$/fmview.obj \
$(SLO)$/sdbdatacolumn.obj \
$(SLO)$/formcontrolling.obj \
- $(SLO)$/fmdispatch.obj \
+ $(SLO)$/formfeaturedispatcher.obj \
+ $(SLO)$/formdispatchinterceptor.obj \
$(SLO)$/datanavi.obj \
$(SLO)$/xfm_addcondition.obj \
$(SLO)$/datalistener.obj \
$(SLO)$/fmscriptingenv.obj \
$(SLO)$/stringlistresource.obj \
$(SLO)$/delayedevent.obj \
- $(SLO)$/formcontrolfactory.obj
+ $(SLO)$/formcontrolfactory.obj \
+ $(SLO)$/legacyformcontroller.obj
LIB2TARGET= $(SLB)$/$(TARGET).lib
LIB2OBJFILES= \
diff --git a/svx/source/inc/delayedevent.hxx b/svx/source/inc/delayedevent.hxx
index 151b998f2f8c..bd8194a00c82 100644
--- a/svx/source/inc/delayedevent.hxx
+++ b/svx/source/inc/delayedevent.hxx
@@ -5,10 +5,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
-* $RCSfile: delayedevent.hxx,v $
-*
-* $Revision: 1.1.2.1 $
-*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index ce382a1986bc..ce845b7cdea0 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -30,10 +30,12 @@
#ifndef _SVX_FILTNAV_HXX
#define _SVX_FILTNAV_HXX
-#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFilterController.hpp>
#include <svl/lstner.hxx>
#include <svl/brdcst.hxx>
+
#include <vcl/window.hxx>
#include <sfx2/childwin.hxx>
#include <svl/poolitem.hxx>
@@ -93,8 +95,7 @@ public:
class FmParentData : public FmFilterData
{
protected:
- ::std::vector<FmFilterData*> m_aChilds;
-
+ ::std::vector< FmFilterData* > m_aChildren;
public:
TYPEINFO();
@@ -103,28 +104,34 @@ public:
{}
virtual ~FmParentData();
- ::std::vector<FmFilterData*>& GetChilds() {return m_aChilds;}
+ ::std::vector< FmFilterData* >& GetChildren() { return m_aChildren; }
};
//========================================================================
// Item representing the forms and subforms
class FmFormItem : public FmParentData
{
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xController;
- sal_Int32 m_nCurrent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFilterController > m_xFilterController;
public:
TYPEINFO();
- FmFormItem(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory):FmParentData(_rxFactory,NULL, ::rtl::OUString()){}
- FmFormItem(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,FmParentData* _pParent,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & _xController,
- const ::rtl::OUString& _rText):FmParentData(_rxFactory,_pParent, _rText)
- ,m_xController(_xController)
- ,m_nCurrent(0){}
-
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & GetController(){return m_xController;}
- void SetCurrentPosition(sal_Int32 nCurrent){m_nCurrent = nCurrent;}
- sal_Int32 GetCurrentPosition() const {return m_nCurrent;}
+
+ FmFormItem( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,FmParentData* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & _xController,
+ const ::rtl::OUString& _rText)
+ :FmParentData( _rxFactory, _pParent, _rText )
+ ,m_xController( _xController )
+ ,m_xFilterController( _xController, ::com::sun::star::uno::UNO_QUERY_THROW )
+ {
+ }
+
+ inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >&
+ GetController() { return m_xController; }
+
+ inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFilterController >&
+ GetFilterController() { return m_xFilterController; }
+
virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
@@ -136,26 +143,28 @@ public:
FmFilterItems(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory):FmParentData(_rxFactory,NULL, ::rtl::OUString()){}
FmFilterItems(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,FmFormItem* pParent, const ::rtl::OUString& rText ):FmParentData(_rxFactory,pParent, rText){}
- FmFilterItem* Find(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & xText) const;
+ FmFilterItem* Find( const ::sal_Int32 _nFilterComponentIndex ) const;
virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
//========================================================================
class FmFilterItem : public FmFilterData
{
- ::rtl::OUString m_aFieldName;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > m_xText;
+ ::rtl::OUString m_aFieldName;
+ const sal_Int32 m_nComponentIndex;
public:
TYPEINFO();
- FmFilterItem(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
- FmFilterItems* pParent,
- const ::rtl::OUString& aFieldName,
- const ::rtl::OUString& aCondition,
- const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & xText);
+ FmFilterItem(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
+ FmFilterItems* pParent,
+ const ::rtl::OUString& aFieldName,
+ const ::rtl::OUString& aCondition,
+ const sal_Int32 _nComponentIndex
+ );
const ::rtl::OUString& GetFieldName() const {return m_aFieldName;}
- const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & GetTextComponent() const {return m_xText;}
+ sal_Int32 GetComponentIndex() const { return m_nComponentIndex; }
virtual Image GetImage( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
};
@@ -167,9 +176,9 @@ class FmFilterModel : public FmParentData
{
friend class FmFilterAdapter;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xControllers;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xController;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xControllers;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
FmFilterAdapter* m_pAdapter;
FmFilterItems* m_pCurrentItems;
@@ -178,7 +187,7 @@ public:
FmFilterModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory);
virtual ~FmFilterModel();
- void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xCurrent);
+ void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & xCurrent);
void Clear();
sal_Bool ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const;
void Append(FmFilterItems* pItems, FmFilterItem* pFilterItem);
@@ -190,17 +199,17 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const { return m_xORB; }
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & GetControllers() const {return m_xControllers;}
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & GetCurrentController() const {return m_xController;}
- void SetCurrentController(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xController);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & GetCurrentController() const {return m_xController;}
+ void SetCurrentController(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & xController);
void Remove(FmFilterData* pFilterItem);
- void AppendFilterItems(FmFormItem* pItem);
- void CheckIntegrity(FmParentData* pItem);
+ void AppendFilterItems( FmFormItem& _rItem );
+ void EnsureEmptyFilterRows( FmParentData& _rItem );
protected:
void Insert(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pFilterItem);
- void Remove(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pFilterItem);
- FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xController) const;
+ void Remove( const ::std::vector<FmFilterData*>::iterator& rPos );
+ FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & xController) const;
FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm) const;
void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, FmParentData* pParent);
};
@@ -267,7 +276,10 @@ public:
FmFilterNavigator( Window* pParent );
virtual ~FmFilterNavigator();
- void UpdateContent(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xCurrent);
+ void UpdateContent(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & xCurrent
+ );
const FmFilterModel* GetFilterModel() const {return m_pModel;}
protected:
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index 70072a0fe7de..cb35b2534043 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -37,6 +37,7 @@
#include <com/sun/star/inspection/XObjectInspectorModel.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
/** === end UNO includes === **/
+
#include <sfx2/basedlgs.hxx>
#include <sfx2/ctrlitem.hxx>
#include <sfx2/childwin.hxx>
diff --git a/svx/source/inc/fmcontrolbordermanager.hxx b/svx/source/inc/fmcontrolbordermanager.hxx
index c08907026585..a9e605873940 100644
--- a/svx/source/inc/fmcontrolbordermanager.hxx
+++ b/svx/source/inc/fmcontrolbordermanager.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmcontrolbordermanager.hxx,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -132,7 +129,7 @@ namespace svxform
//====================================================================
/** manages the dynamic border color for form controls
- Used by the <type>FmXFormController</type>, this class manages the dynamic changes in the
+ Used by the <type>FormController</type>, this class manages the dynamic changes in the
border color of form controls. For this a set of events have to be forwarded to the manager
instance, which then will switch the border color depending on the mouse and focus status
of the controls.
diff --git a/svx/source/inc/fmcontrollayout.hxx b/svx/source/inc/fmcontrollayout.hxx
index c5abe43f3228..4522cf352382 100644
--- a/svx/source/inc/fmcontrollayout.hxx
+++ b/svx/source/inc/fmcontrollayout.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmcontrollayout.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/svx/source/inc/fmctrler.hxx b/svx/source/inc/fmctrler.hxx
deleted file mode 100644
index 060f1fdb04db..000000000000
--- a/svx/source/inc/fmctrler.hxx
+++ /dev/null
@@ -1,617 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: fmctrler.hxx,v $
- * $Revision: 1.24 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SVX_FMCTRLER_HXX
-#define _SVX_FMCTRLER_HXX
-
-#include "svx/fmtools.hxx"
-#include "formcontrolling.hxx"
-#include "sqlparserclient.hxx"
-#include "delayedevent.hxx"
-
-/** === begin UNO includes === **/
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/awt/XControlModel.hpp>
-#include <com/sun/star/awt/XFocusListener.hpp>
-#include <com/sun/star/awt/XItemListener.hpp>
-#include <com/sun/star/awt/XMouseListener.hpp>
-#include <com/sun/star/awt/XTabController.hpp>
-#include <com/sun/star/awt/XTabControllerModel.hpp>
-#include <com/sun/star/awt/XTextComponent.hpp>
-#include <com/sun/star/awt/XTextListener.hpp>
-#include <com/sun/star/beans/PropertyChangeEvent.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/container/ContainerEvent.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/container/XContainer.hpp>
-#include <com/sun/star/container/XContainerListener.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/container/XIndexContainer.hpp>
-#include <com/sun/star/form/DatabaseDeleteEvent.hpp>
-#include <com/sun/star/form/DatabaseParameterEvent.hpp>
-#include <com/sun/star/form/ErrorEvent.hpp>
-#include <com/sun/star/form/validation/XFormComponentValidityListener.hpp>
-#include <com/sun/star/form/XConfirmDeleteBroadcaster.hpp>
-#include <com/sun/star/form/XConfirmDeleteListener.hpp>
-#include <com/sun/star/form/XDatabaseParameterBroadcaster2.hpp>
-#include <com/sun/star/form/XDatabaseParameterListener.hpp>
-#include <com/sun/star/form/XFormController.hpp>
-#include <com/sun/star/form/XFormControllerListener.hpp>
-#include <com/sun/star/form/XGridControlListener.hpp>
-#include <com/sun/star/form/XLoadListener.hpp>
-#include <com/sun/star/form/XResetListener.hpp>
-#include <com/sun/star/frame/DispatchDescriptor.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
-#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/script/XEventAttacherManager.hpp>
-#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
-#include <com/sun/star/sdb/XRowSetApproveListener.hpp>
-#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
-#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
-#include <com/sun/star/sdb/XSQLErrorListener.hpp>
-#include <com/sun/star/sdbc/XRowSetListener.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/util/XModeSelector.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <com/sun/star/util/XModifyListener.hpp>
-/** === end UNO includes === **/
-
-#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/proparrhlp.hxx>
-#include <comphelper/stl_types.hxx>
-#include <connectivity/sqlparse.hxx>
-#include <cppuhelper/propshlp.hxx>
-#include <tools/debug.hxx>
-#include <vcl/timer.hxx>
-
-#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_31)
-#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_31
-#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 31
-#include <comphelper/implbase_var.hxx>
-#endif
-
-struct FmXTextComponentLess : public ::std::binary_function< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent> , sal_Bool>
-{
- sal_Bool operator() (const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& x, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& y) const
- {
- return reinterpret_cast<sal_Int64>(x.get()) < reinterpret_cast<sal_Int64>(y.get());
- }
-};
-
-typedef ::std::map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >, FmXTextComponentLess> FmFilterControls;
-typedef ::std::map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::rtl::OUString, FmXTextComponentLess> FmFilterRow;
-typedef ::std::vector< FmFilterRow > FmFilterRows;
-typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > > FmFormControllers;
-
-struct FmFieldInfo;
-class FmFormView;
-class Window;
-
-namespace svxform
-{
- class ControlBorderManager;
-}
-
-typedef ::comphelper::WeakComponentImplHelper31 < ::com::sun::star::form::XFormController
- , ::com::sun::star::container::XChild
- , ::com::sun::star::container::XIndexAccess
- , ::com::sun::star::container::XEnumerationAccess
- , ::com::sun::star::awt::XFocusListener
- , ::com::sun::star::form::XLoadListener
- , ::com::sun::star::beans::XPropertyChangeListener
- , ::com::sun::star::awt::XTextListener
- , ::com::sun::star::awt::XItemListener
- , ::com::sun::star::container::XContainerListener
- , ::com::sun::star::util::XModifyListener
- , ::com::sun::star::util::XModifyBroadcaster
- , ::com::sun::star::util::XModeSelector
- , ::com::sun::star::form::XConfirmDeleteListener
- , ::com::sun::star::form::XConfirmDeleteBroadcaster
- , ::com::sun::star::sdb::XSQLErrorListener
- , ::com::sun::star::sdb::XSQLErrorBroadcaster
- , ::com::sun::star::sdbc::XRowSetListener
- , ::com::sun::star::sdb::XRowSetApproveListener
- , ::com::sun::star::sdb::XRowSetApproveBroadcaster
- , ::com::sun::star::form::XDatabaseParameterListener
- , ::com::sun::star::form::XDatabaseParameterBroadcaster
- , ::com::sun::star::lang::XServiceInfo
- , ::com::sun::star::form::XResetListener
- , ::com::sun::star::lang::XUnoTunnel
- , ::com::sun::star::frame::XDispatch
- , ::com::sun::star::awt::XMouseListener
- , ::com::sun::star::form::validation::XFormComponentValidityListener
- , ::com::sun::star::task::XInteractionHandler
- , ::com::sun::star::lang::XInitialization
- , ::com::sun::star::form::XGridControlListener
- > FmXFormController_BASE;
-
-//==================================================================
-// FmXFormController
-//==================================================================
-class ColumnInfoCache;
-class SAL_DLLPRIVATE FmXFormController :public ::comphelper::OBaseMutex
- ,public FmXFormController_BASE
- ,public ::cppu::OPropertySetHelper
- ,public FmDispatchInterceptor
- ,public ::comphelper::OAggregationArrayUsageHelper< FmXFormController >
- ,public ::svxform::OSQLParserClient
- ,public ::svx::IControllerFeatureInvalidation
-{
- typedef ::std::map < sal_Int32,
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
- > DispatcherContainer;
-
- friend class FmXPageViewWinRec;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController> m_xTabController;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> m_xActiveControl, m_xCurrentControl;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xModelAsIndex;
- ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xModelAsManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
- // Composer used for checking filter conditions
- ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xComposer;
- ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xInteractionHandler;
-
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > m_aControls;
- ::cppu::OInterfaceContainerHelper
- m_aActivateListeners,
- m_aModifyListeners,
- m_aErrorListeners,
- m_aDeleteListeners,
- m_aRowSetApproveListeners,
- m_aParameterListeners;
-
- FmFormControllers m_aChilds;
- FmFilterControls m_aFilterControls;
- FmFilterRows m_aFilters;
-
- Timer m_aTabActivationTimer;
- Timer m_aFeatureInvalidationTimer;
-
- FmFormView* m_pView;
- Window* m_pWindow;
- ::svxform::ControlBorderManager*
- m_pControlBorderManager;
-
- ::svx::ControllerFeatures m_aControllerFeatures;
- DispatcherContainer m_aFeatureDispatchers;
- ::std::set< sal_Int32 > m_aInvalidFeatures; // for asynchronous feature invalidation
-
- ::rtl::OUString m_aMode;
-
- ::svxform::DelayedEvent m_aLoadEvent;
- ::svxform::DelayedEvent m_aToggleEvent;
- ::svxform::DelayedEvent m_aActivationEvent;
- ::svxform::DelayedEvent m_aDeactivationEvent;
-
- ::std::auto_ptr< ColumnInfoCache >
- m_pColumnInfoCache;
-
- sal_Int32 m_nCurrentFilterPosition; // current level for filtering (or-criteria)
-
- sal_Bool m_bCurrentRecordModified : 1;
- sal_Bool m_bCurrentRecordNew : 1;
- sal_Bool m_bLocked : 1;
- sal_Bool m_bDBConnection : 1; // Focuslistener nur fuer Datenbankformulare
- sal_Bool m_bCycle : 1;
- sal_Bool m_bCanInsert : 1;
- sal_Bool m_bCanUpdate : 1;
- sal_Bool m_bCommitLock : 1; // lock the committing of controls see focusGained
- sal_Bool m_bModified : 1; // ist der Inhalt eines Controls modifiziert ?
- sal_Bool m_bControlsSorted : 1;
- sal_Bool m_bFiltering : 1;
- sal_Bool m_bAttachEvents : 1;
- sal_Bool m_bDetachEvents : 1;
- sal_Bool m_bAttemptedHandlerCreation : 1;
-
- // as we want to intercept dispatches of _all_ controls we're responsible for, and an object implementing
- // the ::com::sun::star::frame::XDispatchProviderInterceptor interface can intercept only _one_ objects dispatches, we need a helper class
- DECLARE_STL_VECTOR(FmXDispatchInterceptorImpl*, Interceptors);
- Interceptors m_aControlDispatchInterceptors;
-
-public:
- inline const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >&
- getInteractionHandler() const
- {
- const_cast< FmXFormController* >( this )->ensureInteractionHandler();
- return m_xInteractionHandler;
- }
-
-public:
- FmXFormController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB,
- FmFormView* _pView = NULL, Window* _pWindow = NULL );
- ~FmXFormController();
-
-// XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL acquire() throw ();
- virtual void SAL_CALL release() throw ();
-
-// XTypeProvider
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
-
-// XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
- SVX_DLLPUBLIC static FmXFormController* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
-
-// XDispatch
- virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& _rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
-
-// ::com::sun::star::container::XChild
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL getParent(void) throw( ::com::sun::star::uno::RuntimeException ) {return m_xParent;}
- virtual void SAL_CALL setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Parent) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException )
- {m_xParent = Parent;}
-
-// ::com::sun::star::lang::XEventListener
- virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
-
-// OComponentHelper
- virtual void SAL_CALL disposing();
-
-// OPropertySetHelper
- virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue,
- sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
- throw( ::com::sun::star::lang::IllegalArgumentException );
-
- virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw( ::com::sun::star::uno::Exception );
- virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
- virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
-
- using OPropertySetHelper::getFastPropertyValue;
-
-// XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL hasElements(void) throw( ::com::sun::star::uno::RuntimeException );
-
-// ::com::sun::star::container::XEnumerationAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration> SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
-
-// ::com::sun::star::container::XContainerListener
- virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XLoadListener
- virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XModeSelector
- virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getMode(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::uno::RuntimeException );
-
-// ::com::sun::star::container::XIndexAccess
- virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 Index) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
-
-// XModifyBroadcaster
- virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
-
-// XFocusListener
- virtual void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
-
-// XMouseListener
- virtual void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL mouseExited( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
-
-// XFormComponentValidityListener
- virtual void SAL_CALL componentValidityChanged( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
-
-// XInteractionHandler
- virtual void SAL_CALL handle( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& Request ) throw (::com::sun::star::uno::RuntimeException);
-
-// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
-// XGridControlListener
- virtual void SAL_CALL columnChanged( const ::com::sun::star::lang::EventObject& _event ) throw (::com::sun::star::uno::RuntimeException);
-
-// ::com::sun::star::beans::XPropertyChangeListener -> aenderung der stati
- virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
-
-// XTextListener -> modify setzen
- virtual void SAL_CALL textChanged(const ::com::sun::star::awt::TextEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XItemListener -> modify setzen
- virtual void SAL_CALL itemStateChanged(const ::com::sun::star::awt::ItemEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XModifyListener -> modify setzen
- virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XFormController
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> SAL_CALL getCurrentControl(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
-
-// XTabController
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > SAL_CALL getControls(void) throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel>& Model) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel> SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer>& Container) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> SAL_CALL getContainer() throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL autoTabOrder() throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL activateTabOrder() throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL activateFirst() throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL activateLast() throw( ::com::sun::star::uno::RuntimeException );
-
-// com::sun::star::sdbc::XRowSetListener
- virtual void SAL_CALL cursorMoved(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL rowChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
-
-// XRowSetApproveListener
- virtual sal_Bool SAL_CALL approveCursorMove(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL approveRowChange(const ::com::sun::star::sdb::RowChangeEvent& event) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL approveRowSetChange(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
-
-// XRowSetApproveBroadcaster
- virtual void SAL_CALL addRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
-
-// XSQLErrorBroadcaster
- virtual void SAL_CALL errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XSQLErrorListener
- virtual void SAL_CALL addSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
-
-// XDatabaseParameterBroadcaster2
- virtual void SAL_CALL addDatabaseParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeDatabaseParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
-
-// XDatabaseParameterBroadcaster
- virtual void SAL_CALL addParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
-
-// XDatabaseParameterListener
- virtual sal_Bool SAL_CALL approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XConfirmDeleteBroadcaster
- virtual void SAL_CALL addConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
-
-// XConfirmDeleteListener
- virtual sal_Bool SAL_CALL confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// XServiceInfo
- virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException);
-
-// XResetListener
- virtual sal_Bool SAL_CALL approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
-
-// method for registration
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void);
-
- // comphelper::OPropertyArrayUsageHelper
- virtual void fillProperties(
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps,
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
- ) const;
-
-// access to the controls for filtering
- const FmFilterControls& getFilterControls() const {return m_aFilterControls;}
-
-// access to the current filter rows
- const FmFilterRows& getFilterRows() const {return m_aFilters;}
- FmFilterRows& getFilterRows() {return m_aFilters;}
-
- // just decr. the positions no notifications for the view
- void decrementCurrentFilterPosition()
- {
- DBG_ASSERT(m_nCurrentFilterPosition, "Invalid Position");
- --m_nCurrentFilterPosition;
- }
-
- SVX_DLLPUBLIC void setCurrentFilterPosition(sal_Int32 nPos);
- sal_Int32 getCurrentFilterPosition() const {return m_nCurrentFilterPosition;}
-
-protected:
- // FmDispatchInterceptor
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>
- interceptedQueryDispatch(sal_uInt16 _nId,const ::com::sun::star::util::URL& aURL,
- const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags)
- throw( ::com::sun::star::uno::RuntimeException );
-
- // IControllerFeatureInvalidation
- virtual void invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures );
-
- virtual ::osl::Mutex* getInterceptorMutex() { return &m_aMutex; }
-
- /// update all our dispatchers
- void updateAllDispatchers() const;
-
- /** disposes all dispatchers in m_aFeatureDispatchers, empties m_aFeatureDispatchers,
- and disposes m_aControllerFeatures
- */
- void disposeAllFeaturesAndDispatchers() SAL_THROW(());
-
- void startFiltering();
- void stopFiltering();
- void setFilter(::std::vector<FmFieldInfo>&);
- void startListening();
- void stopListening();
-
- /** ensures that we have an interaction handler, if possible
-
- If an interaction handler was provided at creation time (<member>initialize</member>), this
- one will be used. Else, an attempt is made to create an <type scope="com::sun::star::sdb">InteractionHandler</type>
- is made.
-
- @return <TRUE/>
- if and only if <member>m_xInteractionHandler</member> is valid when the method returns
- */
- bool ensureInteractionHandler();
-
- /** replaces one of our controls with another one
-
- Upon successful replacing, the old control will be disposed. Also, internal members pointing
- to the current or active control will be adjusted. Yet more, if the replaced control was
- the active control, the new control will be made active.
-
- @param _rxExistentControl
- The control to replace. Must be one of the controls in our ControlContainer.
- @param _rxNewControl
- The control which should replace the existent control.
- @return
- <TRUE/> if and only if the control was successfully replaced
- */
- bool replaceControl(
- const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxExistentControl,
- const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxNewControl
- );
-
- // we're listening at all bound controls for modifications
- void startControlModifyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
- void stopControlModifyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
-
- void setLocks();
- void setControlLock(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
- void addToEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
- void removeFromEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
- void toggleAutoFields(sal_Bool bAutoFields);
- void unload() throw( ::com::sun::star::uno::RuntimeException );
- void removeBoundFieldListener();
-
- void startFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
- void stopFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
-
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> findControl( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> >& rCtrls, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& rxCtrlModel, sal_Bool _bRemove, sal_Bool _bOverWrite ) const;
-
- void insertControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
- void removeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
-
- /// called when a new control is to be handled by the controller
- void implControlInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rxControl, bool _bAddToEventAttacher );
- /// called when a control is not to be handled by the controller anymore
- void implControlRemoved( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rxControl, bool _bRemoveFromEventAttacher );
-
- /** sets m_xCurrentControl, plus does administrative tasks depending on it
- */
- void implSetCurrentControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
-
- /** invalidates the FormFeatures which depend on the current control
- */
- void implInvalidateCurrentControlDependentFeatures();
-
- bool impl_isDisposed_nofail() const { return FmXFormController_BASE::rBHelper.bDisposed; }
-
- void impl_onModify();
-
- sal_Bool isLocked() const {return m_bLocked;}
- sal_Bool determineLockState() const;
-
- Window* getDialogParentWindow();
- // returns m_pWindow or - if m_pWindow is NULL - the window of the currently set container
-
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor> createInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
- // create a new interceptor, register it on the given object
- void deleteInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
- // if createInterceptor was called for the given object the according interceptor will be removed
- // from the objects interceptor chain and released
-
- /** checks all form controls belonging to our form for validity
-
- If a form control supports the XValidatableFormComponent interface, this is used to determine
- the validity of the control. If the interface is not supported, the control is supposed to be
- valid.
-
- @param _rFirstInvalidityExplanation
- if the method returns <FALSE/> (i.e. if there is an invalid control), this string contains
- the explanation for the invalidity, as obtained from the validator.
-
- @param _rxFirstInvalidModel
- if the method returns <FALSE/> (i.e. if there is an invalid control), this contains
- the control model
-
- @return
- <TRUE/> if and only if all controls belonging to our form are valid
- */
- bool checkFormComponentValidity(
- ::rtl::OUString& /* [out] */ _rFirstInvalidityExplanation,
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& /* [out] */ _rxFirstInvalidModel
- ) SAL_THROW(());
-
- /** locates the control which belongs to a given model
- */
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
- locateControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel ) SAL_THROW(());
-
- // set the text for all filters
- void impl_setTextOnAllFilter_throw();
-
- // in filter mode we do not listen for changes
- sal_Bool isListeningForChanges() const {return m_bDBConnection && !m_bFiltering && !isLocked();}
- void addChild(FmXFormController* pChild);
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> isInList(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& xPeer) const;
-
- DECL_LINK( OnActivateTabOrder, void* );
- DECL_LINK( OnInvalidateFeatures, void* );
- DECL_LINK( OnLoad, void* );
- DECL_LINK( OnToggleAutoFields, void* );
- DECL_LINK( OnActivated, void* );
- DECL_LINK( OnDeactivated, void* );
-};
-
-
-#endif // _SVX_FMCTRLER_HXX
-
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 6f2ced3c98ca..8d01b6c01907 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -39,12 +39,17 @@
#include <sfx2/dockwin.hxx>
#include <sfx2/ctrlitem.hxx>
#include <vcl/image.hxx>
+
+/** === begin UNO includes === **/
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+/** === end UNO includes === **/
#include <svtools/svtreebx.hxx>
@@ -57,7 +62,6 @@
#include <svx/fmview.hxx>
#include "fmexch.hxx"
-#include "svx/fmtools.hxx"
class SdrObjListIter;
class FmFormShell;
diff --git a/svx/source/inc/fmservs.hxx b/svx/source/inc/fmservs.hxx
index 201a5a351224..62d9654858a3 100644
--- a/svx/source/inc/fmservs.hxx
+++ b/svx/source/inc/fmservs.hxx
@@ -57,7 +57,7 @@
#define FM_COMPONENT_IMAGECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ImageControl" ) )
#define FM_CONTROL_GRID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.control.Grid" ) )
#define FM_CONTROL_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.control.GridControl" ) )
-#define FM_FORM_CONTROLLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.FormController" ) )
+#define FM_FORM_CONTROLLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.runtime.FormController" ) )
#define SRV_SDB_CONNECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.Connection" ) )
#define SRV_SDB_INTERACTION_HANDLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.InteractionHandler" ) )
#define FM_SUN_COMPONENT_FORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.Form" ) )
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 89c384dd2648..35a00ccf7427 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -40,7 +40,7 @@
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/form/XForm.hpp>
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
#include <com/sun/star/form/NavigationBarMode.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -243,9 +243,9 @@ class SAL_DLLPRIVATE FmXFormShell :public FmXFormShell_BASE
// aktuelle Form, Controller
// nur im alive mode verfuegbar
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> m_xActiveController;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> m_xNavigationController;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> m_xActiveForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xActiveController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xNavigationController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > m_xActiveForm;
// Aktueller container einer Page
// nur im designmode verfuegbar
@@ -266,11 +266,9 @@ class SAL_DLLPRIVATE FmXFormShell :public FmXFormShell_BASE
// the frame we live in
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame> m_xAttachedFrame;
// Administration of external form views (see the SID_FM_VIEW_AS_GRID-slot)
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController> m_xExternalViewController; // the controller for the external form view
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> m_xExtViewTriggerController; // the nav controller at the time the external display was triggered
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xExternalDisplayedForm; // the form which the external view is based on
-
- FmXDispatchInterceptorImpl* m_pExternalViewInterceptor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > m_xExternalViewController; // the controller for the external form view
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xExtViewTriggerController; // the nav controller at the time the external display was triggered
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_xExternalDisplayedForm; // the form which the external view is based on
mutable ::svxform::DocumentType
m_eDocumentType; /// the type of document we're living in
@@ -399,11 +397,11 @@ protected:
public:
// methode fuer nicht designmode (alive mode)
- void setActiveController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController, sal_Bool _bNoSaveOldContent = sal_False );
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& getActiveController() const {return m_xActiveController;}
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& getActiveInternalController() const { return m_xActiveController == m_xExternalViewController ? m_xExtViewTriggerController : m_xActiveController; }
+ void setActiveController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& _xController, sal_Bool _bNoSaveOldContent = sal_False );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& getActiveController() const {return m_xActiveController;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& getActiveInternalController() const { return m_xActiveController == m_xExternalViewController ? m_xExtViewTriggerController : m_xActiveController; }
const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& getActiveForm() const {return m_xActiveForm;}
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& getNavController() const {return m_xNavigationController;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& getNavController() const {return m_xNavigationController;}
inline const ::svx::ControllerFeatures& getActiveControllerFeatures() const
{ return m_aActiveControllerFeatures; }
@@ -569,13 +567,13 @@ private:
public:
enum CURSOR_ACTION { CA_MOVE_TO_LAST, CA_MOVE_ABSOLUTE };
- void DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController, CURSOR_ACTION _eWhat);
+ void DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& _xController, CURSOR_ACTION _eWhat);
void DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, CURSOR_ACTION _eWhat);
sal_Bool HasAnyPendingCursorAction() const;
void CancelAnyPendingCursorAction();
- sal_Bool HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController) const;
+ sal_Bool HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& _xController) const;
sal_Bool HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const;
/** execute the given form slot
diff --git a/svx/source/inc/fmsrcimp.hxx b/svx/source/inc/fmsrcimp.hxx
index 0d6acf4f2909..0ede7660d2e4 100644
--- a/svx/source/inc/fmsrcimp.hxx
+++ b/svx/source/inc/fmsrcimp.hxx
@@ -32,18 +32,27 @@
#define _FMSRCIMP_HXX
#include <svx/fmtools.hxx>
-#include <vos/thread.hxx>
-#include <osl/mutex.hxx>
-#include <com/sun/star/awt/XTextComponent.hpp>
+#include "svx/svxdllapi.h"
+
+/** === begin UNO includes === **/
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XListBox.hpp>
+#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
+/** === end UNO includes === **/
+
#include <comphelper/stl_types.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <osl/mutex.hxx>
#include <unotools/charclass.hxx>
#include <unotools/collatorwrapper.hxx>
-#include "svx/svxdllapi.h"
+#include <vos/thread.hxx>
+
+#ifndef _SVSTDARR_ULONGS
+#define _SVSTDARR_ULONGS
+#include <svl/svstdarr.hxx>
+#endif
// ===================================================================================================
// Hilfsstrukturen
diff --git a/svx/source/inc/fmtextcontrolshell.hxx b/svx/source/inc/fmtextcontrolshell.hxx
index 17ba06d5513b..a67520f89ed8 100644
--- a/svx/source/inc/fmtextcontrolshell.hxx
+++ b/svx/source/inc/fmtextcontrolshell.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
#include <com/sun/star/awt/XMouseListener.hpp>
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
/** === end UNO includes === **/
@@ -92,10 +92,10 @@ namespace svx
,public IContextRequestObserver
{
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > m_xActiveControl;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > m_xActiveTextComponent;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xActiveController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > m_xActiveControl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > m_xActiveTextComponent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xActiveController;
#ifndef DONT_REMEMBER_LAST_CONTROL
// without this define, m_xActiveControl remembers the *last* active control, even
// if it, in the meantime, already lost the focus
@@ -144,10 +144,10 @@ namespace svx
/** to be called when a form in our document has been activated
*/
- void formActivated( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController );
+ void formActivated( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController );
/** to be called when a form in our document has been deactivated
*/
- void formDeactivated( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController );
+ void formDeactivated( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController );
/** notifies the instance that the design mode has changed
*/
@@ -205,7 +205,7 @@ namespace svx
@precond
we don't have an active controller currently
*/
- void startControllerListening( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController );
+ void startControllerListening( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController );
/** stops listening at the active controller
@precond
we have an active controller currently
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index 12965c07ad3b..c51c935883ed 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -37,7 +37,8 @@
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormControllerContext.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/ContainerEvent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -49,7 +50,7 @@
#include <comphelper/stl_types.hxx>
#include <tools/link.hxx>
#include <tools/string.hxx>
-#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/componentcontext.hxx>
@@ -73,7 +74,6 @@ FORWARD_DECLARE_INTERFACE(awt,XWindow)
FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
FORWARD_DECLARE_INTERFACE(util,XNumberFormats)
-class FmXFormController;
class FmXFormView;
namespace svx {
@@ -84,41 +84,49 @@ namespace svx {
//==================================================================
// FmXPageViewWinRec
//==================================================================
-class FmXPageViewWinRec : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess>
+typedef ::cppu::WeakImplHelper2 < ::com::sun::star::container::XIndexAccess
+ , ::com::sun::star::form::runtime::XFormControllerContext
+ > FmXPageViewWinRec_Base;
+
+class FmXPageViewWinRec : public FmXPageViewWinRec_Base
{
friend class FmXFormView;
- ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > > m_aControllerList;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xControlContainer;
- ::comphelper::ComponentContext m_aContext;
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > > m_aControllerList;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xControlContainer;
+ ::comphelper::ComponentContext m_aContext;
FmXFormView* m_pViewImpl;
Window* m_pWindow;
+protected:
+ ~FmXPageViewWinRec();
+
public:
FmXPageViewWinRec( const ::comphelper::ComponentContext& _rContext,
const SdrPageWindow&, FmXFormView* pView);
//const SdrPageViewWinRec*, FmXFormView* pView);
- ~FmXPageViewWinRec();
-
-// UNO Anbindung
-// ::com::sun::star::container::XElementAccess
+ // XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::container::XEnumerationAccess
+ // XEnumerationAccess
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::container::XIndexAccess
+ // XIndexAccess
virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _Index) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- const ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > >& GetList() {return m_aControllerList;}
+ // XFormControllerContext
+ virtual void SAL_CALL makeVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _Control ) throw (::com::sun::star::uno::RuntimeException);
+
+ const ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > >& GetList() {return m_aControllerList;}
protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > getController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm ) const;
- void setController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm,
- FmXFormController* pParent = NULL);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > getController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm ) const;
+ void setController(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxParentController );
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getControlContainer() const { return m_xControlContainer; }
void updateTabOrder( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm );
void dispose();
@@ -213,7 +221,7 @@ public:
FmWinRecList::const_iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC ) const;
const FmWinRecList& getWindowList() const {return m_aWinList;}
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >
getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;
// activation handling
diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx
new file mode 100644
index 000000000000..4c4ba187187d
--- /dev/null
+++ b/svx/source/inc/formcontroller.hxx
@@ -0,0 +1,592 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * 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.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMCTRLER_HXX
+#define _SVX_FMCTRLER_HXX
+
+#include "delayedevent.hxx"
+#include "formdispatchinterceptor.hxx"
+#include "sqlparserclient.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <com/sun/star/awt/XItemListener.hpp>
+#include <com/sun/star/awt/XMouseListener.hpp>
+#include <com/sun/star/awt/XTabController.hpp>
+#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/form/DatabaseDeleteEvent.hpp>
+#include <com/sun/star/form/DatabaseParameterEvent.hpp>
+#include <com/sun/star/form/ErrorEvent.hpp>
+#include <com/sun/star/form/validation/XFormComponentValidityListener.hpp>
+#include <com/sun/star/form/XConfirmDeleteBroadcaster.hpp>
+#include <com/sun/star/form/XConfirmDeleteListener.hpp>
+#include <com/sun/star/form/XDatabaseParameterBroadcaster2.hpp>
+#include <com/sun/star/form/XDatabaseParameterListener.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFilterController.hpp>
+#include <com/sun/star/form/XFormControllerListener.hpp>
+#include <com/sun/star/form/XGridControlListener.hpp>
+#include <com/sun/star/form/XLoadListener.hpp>
+#include <com/sun/star/form/XResetListener.hpp>
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
+#include <com/sun/star/sdb/XRowSetApproveListener.hpp>
+#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
+#include <com/sun/star/sdb/XSQLErrorListener.hpp>
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/util/XModeSelector.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/stl_types.hxx>
+#include <connectivity/sqlparse.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <tools/debug.hxx>
+#include <vcl/timer.hxx>
+
+#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_22)
+#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_22
+#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 22
+#include <comphelper/implbase_var.hxx>
+#endif
+
+struct FmXTextComponentLess : public ::std::binary_function< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent> , sal_Bool>
+{
+ sal_Bool operator() (const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& x, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& y) const
+ {
+ return reinterpret_cast<sal_Int64>(x.get()) < reinterpret_cast<sal_Int64>(y.get());
+ }
+};
+
+typedef ::std::map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::rtl::OUString, FmXTextComponentLess> FmFilterRow;
+typedef ::std::vector< FmFilterRow > FmFilterRows;
+typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > > FmFormControllers;
+
+class FmFormView;
+class Window;
+
+namespace svxform
+{
+ typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > > FilterComponents;
+ class ControlBorderManager;
+ struct FmFieldInfo;
+
+ typedef ::comphelper::WeakComponentImplHelper22 < ::com::sun::star::form::runtime::XFormController
+ , ::com::sun::star::form::runtime::XFilterController
+ , ::com::sun::star::awt::XFocusListener
+ , ::com::sun::star::form::XLoadListener
+ , ::com::sun::star::beans::XPropertyChangeListener
+ , ::com::sun::star::awt::XTextListener
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::util::XModifyListener
+ , ::com::sun::star::form::XConfirmDeleteListener
+ , ::com::sun::star::sdb::XSQLErrorListener
+ , ::com::sun::star::sdbc::XRowSetListener
+ , ::com::sun::star::sdb::XRowSetApproveListener
+ , ::com::sun::star::form::XDatabaseParameterListener
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::form::XResetListener
+ , ::com::sun::star::frame::XDispatch
+ , ::com::sun::star::awt::XMouseListener
+ , ::com::sun::star::form::validation::XFormComponentValidityListener
+ , ::com::sun::star::task::XInteractionHandler
+ , ::com::sun::star::form::XGridControlListener
+ , ::com::sun::star::form::runtime::XFeatureInvalidation
+ > FormController_BASE;
+
+ //==================================================================
+ // FormController
+ //==================================================================
+ class ColumnInfoCache;
+ class SAL_DLLPRIVATE FormController :public ::comphelper::OBaseMutex
+ ,public FormController_BASE
+ ,public ::cppu::OPropertySetHelper
+ ,public DispatchInterceptor
+ ,public ::comphelper::OAggregationArrayUsageHelper< FormController >
+ ,public ::svxform::OSQLParserClient
+ {
+ typedef ::std::map < sal_Int16,
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
+ > DispatcherContainer;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController> m_xTabController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> m_xActiveControl, m_xCurrentControl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xModelAsIndex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xModelAsManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent;
+ ::comphelper::ComponentContext m_aContext;
+ // Composer used for checking filter conditions
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xComposer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xInteractionHandler;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > m_xContext;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > m_aControls;
+ ::cppu::OInterfaceContainerHelper
+ m_aActivateListeners,
+ m_aModifyListeners,
+ m_aErrorListeners,
+ m_aDeleteListeners,
+ m_aRowSetApproveListeners,
+ m_aParameterListeners,
+ m_aFilterListeners;
+
+ FmFormControllers m_aChilds;
+ FilterComponents m_aFilterComponents;
+ FmFilterRows m_aFilterRows;
+
+ Timer m_aTabActivationTimer;
+ Timer m_aFeatureInvalidationTimer;
+
+ ::svxform::ControlBorderManager*
+ m_pControlBorderManager;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >
+ m_xFormOperations;
+ DispatcherContainer m_aFeatureDispatchers;
+ ::std::set< sal_Int16 > m_aInvalidFeatures; // for asynchronous feature invalidation
+
+ ::rtl::OUString m_aMode;
+
+ ::svxform::DelayedEvent m_aLoadEvent;
+ ::svxform::DelayedEvent m_aToggleEvent;
+ ::svxform::DelayedEvent m_aActivationEvent;
+ ::svxform::DelayedEvent m_aDeactivationEvent;
+
+ ::std::auto_ptr< ColumnInfoCache >
+ m_pColumnInfoCache;
+
+ sal_Int32 m_nCurrentFilterPosition; // current level for filtering (or-criteria)
+
+ sal_Bool m_bCurrentRecordModified : 1;
+ sal_Bool m_bCurrentRecordNew : 1;
+ sal_Bool m_bLocked : 1;
+ sal_Bool m_bDBConnection : 1; // Focuslistener nur fuer Datenbankformulare
+ sal_Bool m_bCycle : 1;
+ sal_Bool m_bCanInsert : 1;
+ sal_Bool m_bCanUpdate : 1;
+ sal_Bool m_bCommitLock : 1; // lock the committing of controls see focusGained
+ sal_Bool m_bModified : 1; // ist der Inhalt eines Controls modifiziert ?
+ sal_Bool m_bControlsSorted : 1;
+ sal_Bool m_bFiltering : 1;
+ sal_Bool m_bAttachEvents : 1;
+ sal_Bool m_bDetachEvents : 1;
+ sal_Bool m_bAttemptedHandlerCreation : 1;
+
+ // as we want to intercept dispatches of _all_ controls we're responsible for, and an object implementing
+ // the ::com::sun::star::frame::XDispatchProviderInterceptor interface can intercept only _one_ objects dispatches, we need a helper class
+ DECLARE_STL_VECTOR(DispatchInterceptionMultiplexer*, Interceptors);
+ Interceptors m_aControlDispatchInterceptors;
+
+ public:
+ FormController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB );
+
+ protected:
+ ~FormController();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XDispatch
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& _rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XChild
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL getParent(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Parent) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // OPropertySetHelper
+ virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue,
+ sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
+ throw( ::com::sun::star::lang::IllegalArgumentException );
+
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw( ::com::sun::star::uno::Exception );
+ virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
+
+ using OPropertySetHelper::getFastPropertyValue;
+
+ // XFilterController
+ virtual ::sal_Int32 SAL_CALL getFilterComponents() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDisjunctiveTerms() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addFilterControllerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFilterControllerListener >& _Listener ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeFilterControllerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFilterControllerListener >& _Listener ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPredicateExpression( ::sal_Int32 _Component, ::sal_Int32 _Term, const ::rtl::OUString& _PredicateExpression ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getFilterComponent( ::sal_Int32 _Component ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getPredicateExpressions() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeDisjunctiveTerm( ::sal_Int32 _Term ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL appendEmptyDisjunctiveTerm() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getActiveTerm() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveTerm( ::sal_Int32 _ActiveTerm ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasElements(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration> SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XLoadListener
+ virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XModeSelector
+ virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getMode(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 Index) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XFocusListener
+ virtual void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XMouseListener
+ virtual void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL mouseExited( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XFormComponentValidityListener
+ virtual void SAL_CALL componentValidityChanged( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInteractionHandler
+ virtual void SAL_CALL handle( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& Request ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XGridControlListener
+ virtual void SAL_CALL columnChanged( const ::com::sun::star::lang::EventObject& _event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertyChangeListener -> aenderung der stati
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XTextListener -> modify setzen
+ virtual void SAL_CALL textChanged(const ::com::sun::star::awt::TextEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XItemListener -> modify setzen
+ virtual void SAL_CALL itemStateChanged(const ::com::sun::star::awt::ItemEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XModifyListener -> modify setzen
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XFormController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations > SAL_CALL getFormOperations() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> SAL_CALL getCurrentControl(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addChildController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _ChildController ) throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > SAL_CALL getContext() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setContext( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext >& _context ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL getInteractionHandler() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _interactionHandler ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTabController
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > SAL_CALL getControls(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel>& Model) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel> SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer>& Container) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> SAL_CALL getContainer() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL autoTabOrder() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL activateTabOrder() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL activateFirst() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL activateLast() throw( ::com::sun::star::uno::RuntimeException );
+
+ // com::sun::star::sdbc::XRowSetListener
+ virtual void SAL_CALL cursorMoved(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL rowChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XRowSetApproveListener
+ virtual sal_Bool SAL_CALL approveCursorMove(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL approveRowChange(const ::com::sun::star::sdb::RowChangeEvent& event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL approveRowSetChange(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XRowSetApproveBroadcaster
+ virtual void SAL_CALL addRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XSQLErrorBroadcaster
+ virtual void SAL_CALL errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XSQLErrorListener
+ virtual void SAL_CALL addSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XDatabaseParameterBroadcaster2
+ virtual void SAL_CALL addDatabaseParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeDatabaseParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XDatabaseParameterBroadcaster
+ virtual void SAL_CALL addParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XDatabaseParameterListener
+ virtual sal_Bool SAL_CALL approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XConfirmDeleteBroadcaster
+ virtual void SAL_CALL addConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XConfirmDeleteListener
+ virtual sal_Bool SAL_CALL confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException);
+
+ // XResetListener
+ virtual sal_Bool SAL_CALL approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XFeatureInvalidation
+ virtual void SAL_CALL invalidateFeatures( const ::com::sun::star::uno::Sequence< ::sal_Int16 >& Features ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL invalidateAllFeatures( ) throw (::com::sun::star::uno::RuntimeException);
+
+// method for registration
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void);
+
+ // comphelper::OPropertyArrayUsageHelper
+ virtual void fillProperties(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
+ ) const;
+
+ protected:
+ // DispatchInterceptor
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>
+ interceptedQueryDispatch(
+ const ::com::sun::star::util::URL& aURL,
+ const ::rtl::OUString& aTargetFrameName,
+ sal_Int32 nSearchFlags
+ ) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::osl::Mutex* getInterceptorMutex() { return &m_aMutex; }
+
+ /// update all our dispatchers
+ void updateAllDispatchers() const;
+
+ /** disposes all dispatchers in m_aFeatureDispatchers, and empties m_aFeatureDispatchers
+ */
+ void disposeAllFeaturesAndDispatchers() SAL_THROW(());
+
+ void startFiltering();
+ void stopFiltering();
+ void setFilter(::std::vector<FmFieldInfo>&);
+ void startListening();
+ void stopListening();
+
+ /** ensures that we have an interaction handler, if possible
+
+ If an interaction handler was provided at creation time (<member>initialize</member>), this
+ one will be used. Else, an attempt is made to create an <type scope="com::sun::star::sdb">InteractionHandler</type>
+ is made.
+
+ @return <TRUE/>
+ if and only if <member>m_xInteractionHandler</member> is valid when the method returns
+ */
+ bool ensureInteractionHandler();
+
+ /** replaces one of our controls with another one
+
+ Upon successful replacing, the old control will be disposed. Also, internal members pointing
+ to the current or active control will be adjusted. Yet more, if the replaced control was
+ the active control, the new control will be made active.
+
+ @param _rxExistentControl
+ The control to replace. Must be one of the controls in our ControlContainer.
+ @param _rxNewControl
+ The control which should replace the existent control.
+ @return
+ <TRUE/> if and only if the control was successfully replaced
+ */
+ bool replaceControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxExistentControl,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxNewControl
+ );
+
+ // we're listening at all bound controls for modifications
+ void startControlModifyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void stopControlModifyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+
+ void setLocks();
+ void setControlLock(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void addToEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void removeFromEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void toggleAutoFields(sal_Bool bAutoFields);
+ void unload() throw( ::com::sun::star::uno::RuntimeException );
+ void removeBoundFieldListener();
+
+ void startFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
+ void stopFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> findControl( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> >& rCtrls, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& rxCtrlModel, sal_Bool _bRemove, sal_Bool _bOverWrite ) const;
+
+ void insertControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void removeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+
+ /// called when a new control is to be handled by the controller
+ void implControlInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rxControl, bool _bAddToEventAttacher );
+ /// called when a control is not to be handled by the controller anymore
+ void implControlRemoved( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rxControl, bool _bRemoveFromEventAttacher );
+
+ /** sets m_xCurrentControl, plus does administrative tasks depending on it
+ */
+ void implSetCurrentControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+
+ /** invalidates the FormFeatures which depend on the current control
+ */
+ void implInvalidateCurrentControlDependentFeatures();
+
+ bool impl_isDisposed_nofail() const { return FormController_BASE::rBHelper.bDisposed; }
+ void impl_checkDisposed_throw() const;
+
+ void impl_onModify();
+
+ /** adds the given filter row to m_aFilterRows, setting m_nCurrentFilterPosition to 0 if the newly added
+ row is the first one.
+
+ @precond
+ our mutex is locked
+ */
+ void impl_addFilterRow( const FmFilterRow& _row );
+
+ /** adds an empty filter row to m_aFilterRows, and notifies our listeners
+ */
+ void impl_appendEmptyFilterRow( ::osl::ClearableMutexGuard& _rClearBeforeNotify );
+
+ sal_Bool isLocked() const {return m_bLocked;}
+ sal_Bool determineLockState() const;
+
+ Window* getDialogParentWindow();
+ // returns the window which should be used as parent window for dialogs
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor> createInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
+ // create a new interceptor, register it on the given object
+ void deleteInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
+ // if createInterceptor was called for the given object the according interceptor will be removed
+ // from the objects interceptor chain and released
+
+ /** checks all form controls belonging to our form for validity
+
+ If a form control supports the XValidatableFormComponent interface, this is used to determine
+ the validity of the control. If the interface is not supported, the control is supposed to be
+ valid.
+
+ @param _rFirstInvalidityExplanation
+ if the method returns <FALSE/> (i.e. if there is an invalid control), this string contains
+ the explanation for the invalidity, as obtained from the validator.
+
+ @param _rxFirstInvalidModel
+ if the method returns <FALSE/> (i.e. if there is an invalid control), this contains
+ the control model
+
+ @return
+ <TRUE/> if and only if all controls belonging to our form are valid
+ */
+ bool checkFormComponentValidity(
+ ::rtl::OUString& /* [out] */ _rFirstInvalidityExplanation,
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& /* [out] */ _rxFirstInvalidModel
+ ) SAL_THROW(());
+
+ /** locates the control which belongs to a given model
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
+ locateControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel ) SAL_THROW(());
+
+ // set the text for all filters
+ void impl_setTextOnAllFilter_throw();
+
+ // in filter mode we do not listen for changes
+ sal_Bool isListeningForChanges() const {return m_bDBConnection && !m_bFiltering && !isLocked();}
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> isInList(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& xPeer) const;
+
+ DECL_LINK( OnActivateTabOrder, void* );
+ DECL_LINK( OnInvalidateFeatures, void* );
+ DECL_LINK( OnLoad, void* );
+ DECL_LINK( OnToggleAutoFields, void* );
+ DECL_LINK( OnActivated, void* );
+ DECL_LINK( OnDeactivated, void* );
+ };
+
+} // namespace svxform
+
+#endif // _SVX_FMCTRLER_HXX
+
diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx
index d082bd889804..f818ced85189 100644
--- a/svx/source/inc/formcontrolling.hxx
+++ b/svx/source/inc/formcontrolling.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: formcontrolling.hxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,7 +28,7 @@
#ifndef SVX_FORMCONTROLLING_HXX
#define SVX_FORMCONTROLLING_HXX
-#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/form/runtime/FeatureState.hpp>
@@ -117,7 +114,7 @@ namespace svx
IControllerFeatureInvalidation* _pInvalidationCallback
);
- /** constructs the instance from a <type scope="com::sun::star::form">XFormController<type> instance
+ /** constructs the instance from a <type scope="com::sun::star::form::runtime">XFormController<type> instance
@param _rxORB
a multi service factory for creating various needed components
@@ -131,7 +128,7 @@ namespace svx
*/
ControllerFeatures(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController,
IControllerFeatureInvalidation* _pInvalidationCallback
);
@@ -163,7 +160,7 @@ namespace svx
/** assign to a controller
*/
void assign(
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController
);
/** assign to a controller
@@ -206,7 +203,7 @@ namespace svx
::com::sun::star::uno::Any m_aOperationError;
public:
- /** constructs the helper from a <type scope="com::sun::star::form">XFormController<type> instance
+ /** constructs the helper from a <type scope="com::sun::star::form::runtime">XFormController<type> instance
@param _rContext
the context the component lives in
@@ -218,7 +215,7 @@ namespace svx
*/
FormControllerHelper(
const ::comphelper::ComponentContext& _rContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _rxController,
IControllerFeatureInvalidation* _pInvalidationCallback
);
diff --git a/svx/source/inc/formdispatchinterceptor.hxx b/svx/source/inc/formdispatchinterceptor.hxx
new file mode 100644
index 000000000000..5bcfc1726ad0
--- /dev/null
+++ b/svx/source/inc/formdispatchinterceptor.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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.
+************************************************************************/
+
+#ifndef SVX_FORMDISPATCHINTERCEPTOR_HXX
+#define SVX_FORMDISPATCHINTERCEPTOR_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/compbase2.hxx>
+#include <comphelper/uno3.hxx>
+
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+ //====================================================================
+ //= DispatchInterceptor
+ //====================================================================
+ class DispatchInterceptor
+ {
+ public:
+ DispatchInterceptor() { }
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> interceptedQueryDispatch(
+ const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException ) = 0;
+
+ virtual ::osl::Mutex* getInterceptorMutex() = 0;
+ };
+
+ //====================================================================
+ //=
+ //====================================================================
+ typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::frame::XDispatchProviderInterceptor
+ , ::com::sun::star::lang::XEventListener
+ > DispatchInterceptionMultiplexer_BASE;
+
+ class DispatchInterceptionMultiplexer : public DispatchInterceptionMultiplexer_BASE
+ {
+ ::osl::Mutex m_aFallback;
+ ::osl::Mutex* m_pMutex;
+
+ // the component which's dispatches we're intercepting
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProviderInterception >
+ m_xIntercepted;
+ sal_Bool m_bListening;
+
+ // the real interceptor
+ DispatchInterceptor* m_pMaster;
+
+ // chaining
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xSlaveDispatcher;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xMasterDispatcher;
+
+ virtual ~DispatchInterceptionMultiplexer();
+
+ public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> getIntercepted() const { return m_xIntercepted; }
+
+ public:
+ DispatchInterceptionMultiplexer(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _rToIntercept,
+ DispatchInterceptor* _pMaster
+ );
+
+ // UNO
+ DECLARE_UNO3_DEFAULTS(DispatchInterceptionMultiplexer, DispatchInterceptionMultiplexer_BASE);
+
+ // ::com::sun::star::frame::XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XDispatchProviderInterceptor
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSlaveDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewDispatchProvider ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMasterDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewSupplier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ protected:
+ void ImplDetach();
+ };
+
+//........................................................................
+} // namespace svxform
+//........................................................................
+
+#endif // SVX_FORMDISPATCHINTERCEPTOR_HXX
diff --git a/svx/source/inc/fmdispatch.hxx b/svx/source/inc/formfeaturedispatcher.hxx
index 90480afc4609..32316d52b922 100644
--- a/svx/source/inc/fmdispatch.hxx
+++ b/svx/source/inc/formfeaturedispatcher.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: fmdispatch.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -31,19 +28,20 @@
#ifndef SVX_FMDISPATCH_HXX
#define SVX_FMDISPATCH_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
+/** === begin UNO includes === **/
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/form/runtime/XFormOperations.hpp>
+/** === end UNO includes === **/
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
//........................................................................
namespace svx
{
//........................................................................
- class FormControllerHelper;
-
//====================================================================
//= OSingleFeatureDispatcher
//====================================================================
@@ -55,10 +53,11 @@ namespace svx
private:
::osl::Mutex& m_rMutex;
::cppu::OInterfaceContainerHelper m_aStatusListeners;
- const FormControllerHelper& m_rController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >
+ m_xFormOperations;
const ::com::sun::star::util::URL m_aFeatureURL;
::com::sun::star::uno::Any m_aLastKnownState;
- const sal_Int32 m_nFeatureId;
+ const sal_Int16 m_nFormFeature;
sal_Bool m_bLastKnownEnabled;
sal_Bool m_bDisposed;
@@ -80,9 +79,9 @@ namespace svx
*/
OSingleFeatureDispatcher(
const ::com::sun::star::util::URL& _rFeatureURL,
- sal_Int32 _nFeatureId,
- const FormControllerHelper& _rController,
- ::osl::Mutex& _rMutex
+ const sal_Int16 _nFormFeature,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >& _rxFormOperations,
+ ::osl::Mutex& _rMutex
);
/** disposes the dispatcher instance
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 504aaff7acf3..b3792b76422c 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -35,7 +35,6 @@
#include "sqlparserclient.hxx"
#include "typeconversionclient.hxx"
-#include "svx/fmtools.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/sdb/XColumn.hpp>
@@ -51,6 +50,7 @@
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/form/XChangeBroadcaster.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
/** === end UNO includes === **/
#include <comphelper/propmultiplex.hxx>
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index 8feda5ef6b68..02f58a507511 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -37,9 +37,6 @@
#include <sfx2/ctrlitem.hxx>
#include <com/sun/star/form/XForm.hpp>
-//#ifndef _SVX_FMTOOLS_HXX
-//#include "svx/fmtools.hxx"
-//#endif
#include <comphelper/propmultiplex.hxx>
#include <svtools/transfer.hxx>
#include "svx/dbtoolsclient.hxx"
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index b785b2285873..244fea07285f 100644..100755
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -40,6 +40,8 @@
#include <svx/svdoole2.hxx>
#include <svx/svdview.hxx>
+#include "fmobj.hxx"
+
//////////////////////////////////////////////////////////////////////////////
namespace sdr
@@ -91,8 +93,9 @@ namespace sdr
const bool bHideOle(rSdrView.getHideOle());
const bool bHideChart(rSdrView.getHideChart());
const bool bHideDraw(rSdrView.getHideDraw());
+ const bool bHideFormControl(rSdrView.getHideFormControl());
- if(bHideOle || bHideChart || bHideDraw)
+ if(bHideOle || bHideChart || bHideDraw || bHideFormControl)
{
if(OBJ_OLE2 == rObject.GetObjIdentifier())
{
@@ -123,8 +126,13 @@ namespace sdr
}
else
{
+ const bool bIsFormControl = dynamic_cast< const FmFormObj * >( &rObject ) != 0;
+ if(bIsFormControl && bHideFormControl)
+ {
+ return false;
+ }
// any other draw object
- if(bHideDraw)
+ if(!bIsFormControl && bHideDraw)
{
return false;
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 0442c95f60d5..5f7bf41386e0 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -303,8 +303,8 @@ namespace sdr { namespace contact {
// no check whether we're valid, this is the responsibility of the caller
// Argh. Why does XView have a setZoom only, but not a getZoom?
- Window* pWindow = VCLUnoHelper::GetWindow( m_xControlWindow );
- OSL_ENSURE( pWindow, "ControlHolder::setZoom: no implementation access!" );
+ Window* pWindow = VCLUnoHelper::GetWindow( m_xControl->getPeer() );
+ OSL_ENSURE( pWindow, "ControlHolder::getZoom: no implementation access!" );
::basegfx::B2DVector aZoom( 1, 1 );
if ( pWindow )
@@ -351,6 +351,12 @@ namespace sdr { namespace contact {
if ( !_rControl.is() )
return;
+ #if OSL_DEBUG_LEVEL > 0
+ ::basegfx::B2DTuple aViewScale, aViewTranslate;
+ double nViewRotate(0), nViewShearX(0);
+ _rViewTransformation.decompose( aViewScale, aViewTranslate, nViewRotate, nViewShearX );
+ #endif
+
// transform the logic bound rect, using the view transformation, to pixel coordinates
::basegfx::B2DPoint aTopLeft( _rLogicBoundingRect.Left(), _rLogicBoundingRect.Top() );
aTopLeft *= _rViewTransformation;
@@ -615,7 +621,7 @@ namespace sdr { namespace contact {
Failure of this method will be reported via an assertion in a non-product version.
*/
- bool ensureControl();
+ bool ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL );
/** returns our XControl, if it already has been created
@@ -652,20 +658,14 @@ namespace sdr { namespace contact {
*/
bool isControlVisible() const { return impl_isControlVisible_nofail(); }
- /** determines whether the instance belongs to a given OutputDevice
- @precond
- The instance knows the device it belongs to, or can determine it.
- If this is not the case, you will notice an assertion, and the method will
- return false.
- */
- bool belongsToDevice( const OutputDevice* _pDevice ) const;
-
/// creates an XControl for the given device and SdrUnoObj
static bool
createControlForDevice(
IPageViewAccess& _rPageView,
const OutputDevice& _rDevice,
const SdrUnoObj& _rUnoObject,
+ const basegfx::B2DHomMatrix& _rInitialViewTransformation,
+ const basegfx::B2DHomMatrix& _rInitialZoomNormalization,
ControlHolder& _out_rControl
);
@@ -840,7 +840,11 @@ namespace sdr { namespace contact {
/** ensures that we have a control for the given PageView/OutputDevice
*/
- bool impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice );
+ bool impl_ensureControl_nothrow(
+ IPageViewAccess& _rPageView,
+ const OutputDevice& _rDevice,
+ const basegfx::B2DHomMatrix& _rInitialViewTransformation
+ );
/** retrieves the device which a PageView belongs to, starting from its ObjectContactOfPageView
@@ -1026,8 +1030,8 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
void ViewObjectContactOfUnoControl_Impl::positionAndZoomControl( const basegfx::B2DHomMatrix& _rViewTransformation ) const
{
- OSL_PRECOND( ( m_pOutputDeviceForWindow != NULL ) && m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no output device or no control!" );
- if ( ( m_pOutputDeviceForWindow == NULL ) || !m_aControl.is() )
+ OSL_PRECOND( m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no output device or no control!" );
+ if ( !m_aControl.is() )
return;
try
@@ -1047,7 +1051,7 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::ensureControl()
+ bool ViewObjectContactOfUnoControl_Impl::ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL )
{
OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::ensureControl: already disposed()" );
if ( impl_isDisposed_nofail() )
@@ -1057,16 +1061,20 @@ namespace sdr { namespace contact {
if ( pPageViewContact )
{
SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ const OutputDevice& rDevice( impl_getPageViewOutputDevice_nothrow( *pPageViewContact ) );
return impl_ensureControl_nothrow(
aPVAccess,
- impl_getPageViewOutputDevice_nothrow( *pPageViewContact )
+ rDevice,
+ _pInitialViewTransformationOrNULL ? *_pInitialViewTransformationOrNULL : rDevice.GetViewTransformation()
);
}
DummyPageViewAccess aNoPageView;
+ const OutputDevice& rDevice( impl_getOutputDevice_throw() );
return impl_ensureControl_nothrow(
aNoPageView,
- impl_getOutputDevice_throw()
+ rDevice,
+ _pInitialViewTransformationOrNULL ? *_pInitialViewTransformationOrNULL : rDevice.GetViewTransformation()
);
}
@@ -1109,7 +1117,8 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice )
+ bool ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice,
+ const basegfx::B2DHomMatrix& _rInitialViewTransformation )
{
if ( m_bCreatingControl )
{
@@ -1153,7 +1162,7 @@ namespace sdr { namespace contact {
return false;
ControlHolder aControl;
- if ( !createControlForDevice( _rPageView, _rDevice, *pUnoObject, aControl ) )
+ if ( !createControlForDevice( _rPageView, _rDevice, *pUnoObject, _rInitialViewTransformation, m_aZoomLevelNormalization, aControl ) )
return false;
m_pOutputDeviceForWindow = &_rDevice;
@@ -1188,7 +1197,8 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
bool ViewObjectContactOfUnoControl_Impl::createControlForDevice( IPageViewAccess& _rPageView,
- const OutputDevice& _rDevice, const SdrUnoObj& _rUnoObject, ControlHolder& _out_rControl )
+ const OutputDevice& _rDevice, const SdrUnoObj& _rUnoObject, const basegfx::B2DHomMatrix& _rInitialViewTransformation,
+ const basegfx::B2DHomMatrix& _rInitialZoomNormalization, ControlHolder& _out_rControl )
{
_out_rControl.clear();
@@ -1212,8 +1222,8 @@ namespace sdr { namespace contact {
UnoControlContactHelper::adjustControlGeometry_throw(
_out_rControl,
_rUnoObject.GetLogicRect(),
- _rDevice.GetViewTransformation(),
- _rDevice.GetInverseViewTransformation()
+ _rInitialViewTransformation,
+ _rInitialZoomNormalization
);
// #107049# set design mode before peer is created,
@@ -1532,31 +1542,33 @@ namespace sdr { namespace contact {
VOCGuard aGuard( *this );
DBG_ASSERT( Event.Source == m_xContainer, "ViewObjectContactOfUnoControl_Impl::elementReplaced: where did this come from?" );
- if ( m_aControl == Event.ReplacedElement )
- {
- Reference< XControl > xNewControl( Event.Element, UNO_QUERY );
- DBG_ASSERT( xNewControl.is(), "ViewObjectContactOfUnoControl_Impl::elementReplaced: invalid new control!" );
- if ( !xNewControl.is() )
- return;
+ if ( ! ( m_aControl == Event.ReplacedElement ) )
+ return;
- ENSURE_OR_THROW( m_pOutputDeviceForWindow, "calling this without /me having an output device should be impossible." );
+ Reference< XControl > xNewControl( Event.Element, UNO_QUERY );
+ DBG_ASSERT( xNewControl.is(), "ViewObjectContactOfUnoControl_Impl::elementReplaced: invalid new control!" );
+ if ( !xNewControl.is() )
+ return;
- DBG_ASSERT( xNewControl->getModel() == m_aControl.getModel(), "ViewObjectContactOfUnoControl_Impl::elementReplaced: another model at the new control?" );
- // another model should - in the drawing layer - also imply another SdrUnoObj, which
- // should also result in new ViewContact, and thus in new ViewObjectContacts
+ ENSURE_OR_THROW( m_pOutputDeviceForWindow, "calling this without /me having an output device should be impossible." );
- impl_switchControlListening_nothrow( false );
+ DBG_ASSERT( xNewControl->getModel() == m_aControl.getModel(), "ViewObjectContactOfUnoControl_Impl::elementReplaced: another model at the new control?" );
+ // another model should - in the drawing layer - also imply another SdrUnoObj, which
+ // should also result in new ViewContact, and thus in new ViewObjectContacts
- ControlHolder aNewControl( xNewControl );
- aNewControl.setZoom( m_aControl.getZoom() );
- aNewControl.setPosSize( m_aControl.getPosSize() );
- aNewControl.setDesignMode( impl_isControlDesignMode_nothrow() );
+ impl_switchControlListening_nothrow( false );
- m_aControl = xNewControl;
- m_bControlIsVisible = m_aControl.isVisible();
+ ControlHolder aNewControl( xNewControl );
+ aNewControl.setZoom( m_aControl.getZoom() );
+ aNewControl.setPosSize( m_aControl.getPosSize() );
+ aNewControl.setDesignMode( impl_isControlDesignMode_nothrow() );
- impl_switchControlListening_nothrow( true );
- }
+ m_aControl = xNewControl;
+ m_bControlIsVisible = m_aControl.isVisible();
+
+ impl_switchControlListening_nothrow( true );
+
+ m_pAntiImpl->onControlChangedOrModified( ViewObjectContactOfUnoControl::ImplAccess() );
}
//--------------------------------------------------------------------
@@ -1656,7 +1668,7 @@ namespace sdr { namespace contact {
#endif
// force control here to make it a VCL ChildWindow. Will be fetched
// and used below by getExistentControl()
- m_pVOCImpl->ensureControl();
+ m_pVOCImpl->ensureControl( &_rViewInformation.getObjectToViewTransformation() );
impl_positionAndZoomControl( _rViewInformation );
// get needed data
@@ -1715,7 +1727,7 @@ namespace sdr { namespace contact {
Reference< XControl > ViewObjectContactOfUnoControl::getControl()
{
VOCGuard aGuard( *m_pImpl );
- m_pImpl->ensureControl();
+ m_pImpl->ensureControl( NULL );
return m_pImpl->getExistentControl().getControl();
}
@@ -1726,7 +1738,8 @@ namespace sdr { namespace contact {
ControlHolder aControl;
InvisibleControlViewAccess aSimulatePageView( _inout_ControlContainer );
- OSL_VERIFY( ViewObjectContactOfUnoControl_Impl::createControlForDevice( aSimulatePageView, _rWindow, _rUnoObject, aControl ) );
+ OSL_VERIFY( ViewObjectContactOfUnoControl_Impl::createControlForDevice( aSimulatePageView, _rWindow, _rUnoObject,
+ _rWindow.GetViewTransformation(), _rWindow.GetInverseViewTransformation(), aControl ) );
return aControl.getControl();
}
@@ -1819,14 +1832,7 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
void ViewObjectContactOfUnoControl::propertyChange()
{
- // graphical invalidate at all views
- ActionChanged();
-
- // #i93318# flush Primitive2DSequence to force recreation with updated XControlModel
- // since e.g. background color has changed and existing decompositions are possibly no
- // longer valid. Unfortunately this is not detected from ControlPrimitive2D::operator==
- // since it only has a uno reference to the XControlModel
- flushPrimitive2DSequence();
+ impl_onControlChangedOrModified();
}
//--------------------------------------------------------------------
@@ -1854,6 +1860,19 @@ namespace sdr { namespace contact {
}
}
+ //--------------------------------------------------------------------
+ void ViewObjectContactOfUnoControl::impl_onControlChangedOrModified()
+ {
+ // graphical invalidate at all views
+ ActionChanged();
+
+ // #i93318# flush Primitive2DSequence to force recreation with updated XControlModel
+ // since e.g. background color has changed and existing decompositions are possibly no
+ // longer valid. Unfortunately this is not detected from ControlPrimitive2D::operator==
+ // since it only has a uno reference to the XControlModel
+ flushPrimitive2DSequence();
+ }
+
//====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
diff --git a/svx/source/src/app.src b/svx/source/src/app.src
index 695424878729..c96511663073 100644
--- a/svx/source/src/app.src
+++ b/svx/source/src/app.src
@@ -47,26 +47,9 @@ ErrorBox RID_ERRBOX_MODULENOTINSTALLED
SID_HLINKBAR_SEARCH; \
SID_HLINKBAR_TARGET; \
SID_HYPERLINK_DIALOG; \
- SID_FM_RECORD_ABSOLUTE; \
- SID_FM_RECORD_FIRST; \
- SID_FM_RECORD_PREV; \
- SID_FM_RECORD_NEXT; \
- SID_FM_RECORD_LAST; \
- SID_FM_RECORD_SAVE; \
- SID_FM_RECORD_UNDO; \
- SID_FM_RECORD_NEW; \
- SID_FM_RECORD_DELETE; \
- SID_FM_REFRESH; \
- SID_FM_SORTUP; \
- SID_FM_SORTDOWN; \
- SID_FM_ORDERCRIT; \
- SID_FM_AUTOFILTER; \
- SID_FM_FILTERCRIT; \
- SID_FM_FORM_FILTERED; \
- SID_FM_REMOVE_FILTER_SORT; \
};\
IdCount = {\
- 21;\
+ 4;\
};
ImageList RID_DEFAULTIMAGELIST_SC
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 28d192f3956d..d9cdfbb44f37 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -133,14 +133,8 @@ void SdrGraphicLink::DataChanged( const String& rMimeType,
Graphic aGraphic;
if( SvxLinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic ))
{
- GraphicType eOldGraphicType = pGrafObj->GetGraphicType(); // kein Hereinswappen
- const sal_Bool bIsChanged = pModel->IsChanged();
-
- pGrafObj->SetGraphic( aGraphic );
- if( GRAPHIC_NONE != eOldGraphicType )
- pGrafObj->SetChanged();
- else
- pModel->SetChanged( bIsChanged );
+ pGrafObj->NbcSetGraphic( aGraphic );
+ pGrafObj->ActionChanged();
}
else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) !=
SvxLinkManager::RegisterStatusInfoId() )
@@ -303,11 +297,16 @@ const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const
// -----------------------------------------------------------------------------
-void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf )
{
pGraphic->SetGraphic( rGrf );
pGraphic->SetUserData();
mbIsPreview = sal_False;
+}
+
+void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+{
+ NbcSetGraphic(rGrf);
SetChanged();
BroadcastObjectChange();
}
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index d728e1f7edbc..e7d96e30accc 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1749,7 +1749,8 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
// break up matrix
basegfx::B2DTuple aScale;
basegfx::B2DTuple aTranslate;
- double fRotate, fShearX;
+ double fRotate(0.0);
+ double fShearX(0.0);
rMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
// #i75086# Old DrawingLayer (GeoStat and geometry) does not support holding negative scalings
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 8c46e1d06bb6..238bdf497180 100644..100755
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -275,7 +275,8 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut)
mbPagePaintingAllowed(true),
mbHideOle(false),
mbHideChart(false),
- mbHideDraw(false)
+ mbHideDraw(false),
+ mbHideFormControl(false)
{
DBG_CTOR(SdrPaintView,NULL);
pMod=pModel1;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 97e06fd4bb61..0a537f4f8999 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2575,7 +2575,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag
basegfx::B2DPolyPolygon aRetval;
const SdrHdl* pHdl = rDrag.GetHdl();
- if(HDL_USER == pHdl->GetKind())
+ if( pHdl && (HDL_USER == pHdl->GetKind()) )
{
const TableEdgeHdl* pEdgeHdl = dynamic_cast< const TableEdgeHdl* >( pHdl );
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index e6d7e1821435..815f4d8850c2 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1820,7 +1820,9 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const
SvMemoryStream aDestStrm( 65535, 65535 );
ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, sal_False );
- uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
rValue <<= aSeq;
}
break;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 674cb8fdb24d..7130a2d2f960 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -315,7 +315,9 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
}
SvMemoryStream aDestStrm( 65535, 65535 );
ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
- uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
rValue <<= aSeq;
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index be445143fbd5..bd1d71d36612 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -681,7 +681,9 @@ uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw
{
SvMemoryStream aDestStrm( 65535, 65535 );
ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
- uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
aAny.setValue( &aSeq, ::getCppuType((const uno::Sequence< sal_Int8 >*)0) );
}
else
@@ -3122,7 +3124,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper
}
SvMemoryStream aDestStrm( 65535, 65535 );
ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
- uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
rValue <<= aSeq;
}
}
diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx
index 30e698e74d70..fbfdd82d001b 100755
--- a/sw/inc/IDocumentDeviceAccess.hxx
+++ b/sw/inc/IDocumentDeviceAccess.hxx
@@ -33,7 +33,7 @@
class SfxPrinter;
class JobSetup;
- struct SwPrintData;
+ class SwPrintData;
class VirtualDevice;
class OutputDevice;
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 05ff8add5dd8..e040191ded98 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -323,7 +323,6 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* oeffnen */
#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* Inhalt der Verknuepfung mitspeichern */
#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* Navigations-Controller erzeugen */
-#define FN_PREVIEW_PRINT_OPTIONS (FN_VIEW + 50) /* Optionsdialog Preview drucken */
#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* der Tabellencontroller fuer den Zoom */
#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Zahlenerkennung in Tabellen */
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 9b61f001ed12..9adb2eb688a5 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -52,6 +52,7 @@ class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType
public:
SwDBFieldType(SwDoc* pDocPtr, const String& rColumnName, const SwDBData& rDBData);
+ ~SwDBFieldType();
virtual const String& GetName() const;
virtual SwFieldType* Copy() const;
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index dfb67a7025f9..cf49361ee8a4 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -184,7 +184,7 @@ struct SwMergeDescriptor
rDescriptor(rDesc),
bSendAsHTML( sal_True ),
bSendAsAttachment( sal_False ),
- bPrintAsync( sal_True ),
+ bPrintAsync( sal_False ),
bCreateSingleFile( sal_False ),
pMailMergeConfigItem(0)
{}
@@ -252,12 +252,6 @@ public:
// Mischen von Datensaetzen in Felder
BOOL MergeNew( const SwMergeDescriptor& rMergeDesc );
BOOL Merge(SwWrtShell* pSh);
- // Mischen von Datensaetzen in Felder, dann drucken
- BOOL MergePrint( SwView& rView,
- SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI );
- // printing parts of a merge result document
- BOOL MergePrintDocuments( SwView& rView,
- SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI );
// Datenbankfelder mit fehlendem Datenbankname initialisieren
inline BOOL IsInitDBFields() const { return bInitDBFields; }
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index df81a13dab12..ce6a665c5acd 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -88,6 +88,8 @@ class SwList;
#include <svtools/embedhlp.hxx>
#include <vector>
+#include <set>
+#include <map>
#include <memory>
#include <boost/scoped_ptr.hpp>
@@ -207,7 +209,8 @@ struct SwDocStat;
struct SwHash;
struct SwSortOptions;
struct SwDefTOXBase_Impl;
-struct SwPrintData;
+class SwPrintData;
+class SwPrintUIOptions;
class SdrPageView;
struct SwConversionArgs;
class SwRewriter;
@@ -215,6 +218,10 @@ class SwMsgPoolItem;
class SwChartDataProvider;
class SwChartLockController_Helper;
class IGrammarContact;
+class SwPrintData;
+class SwRenderData;
+class SwPageFrm;
+class SwViewOption;
namespace sw { namespace mark {
class MarkManager;
@@ -1361,6 +1368,15 @@ public:
sal_Bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
SwPaM& rPaM, SwCrsrShell* pShell = 0);
+ // get the set of printable pages for the XRenderable API by
+ // evaluating the respective settings (see implementation)
+ void CalculatePagesForPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ sal_Int32 nDocPageCount );
+ void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ sal_Int32 nDocPageCount );
+ void CalculatePagePairsForProspectPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions,
+ sal_Int32 nDocPageCount );
+
sal_uInt16 GetPageCount() const;
const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index a0c7635029f0..8f63fe816102 100644..100755
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -183,6 +183,7 @@ public:
// Doc rausreichen aber VORSICHT
inline SwDoc* GetDoc() { return pDoc; }
+ inline const SwDoc* GetDoc() const { return pDoc; }
IDocumentDeviceAccess* getIDocumentDeviceAccess();
const IDocumentSettingAccess* getIDocumentSettingAccess() const;
IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 0dc7f4e06be0..390b243cde03 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -54,6 +54,7 @@
#define STR_DOC_STAT (RC_GLOBALS_BEGIN + 10)
#define STR_PAGE (RC_GLOBALS_BEGIN + 14)
+#define STR_PRINTOPTUI (RC_GLOBALS_BEGIN + 15)
//EventStrings
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 03a79281932c..3368418354cf 100644..100755
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -33,15 +33,45 @@
#include <sal/types.h>
#include <rtl/ustring.hxx>
+#include <vcl/print.hxx>
-struct SwPrintData
+#include <set>
+#include <map>
+#include <vector>
+#include <utility>
+
+class SwPageFrm;
+class SwDoc;
+class SwDocShell;
+class ViewShell;
+class _SetGetExpFlds;
+class SwViewOption;
+class OutputDevice;
+class SwViewOptionAdjust_Impl;
+class SwPrtOptions;
+class SwWrtShell;
+class SfxViewShell;
+
+// forward declarations
+class SwPrintUIOptions;
+class SwRenderData;
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintData
{
+ const SwPrintUIOptions * m_pPrintUIOptions; // not owner
+ const SwRenderData * m_pRenderData; // not owner
+
+public:
+
sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground,
bPrintBlackFont,
//#i81434# - printing of hidden text
bPrintHiddenText, bPrintTextPlaceholder,
- bPrintLeftPage, bPrintRightPage, bPrintReverse, bPrintProspect,
- bPrintProspect_RTL,
+ bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect,
+ bPrintProspectRTL,
bPrintSingleJobs, bPaperFromSetup,
// --> FME 2005-12-13 #b6354161# Print empty pages
bPrintEmptyPages,
@@ -55,12 +85,15 @@ struct SwPrintData
SwPrintData()
{
+ m_pPrintUIOptions = NULL;
+ m_pRenderData = NULL;
+
bPrintGraphic =
bPrintTable =
bPrintDraw =
bPrintControl =
- bPrintLeftPage =
- bPrintRightPage =
+ bPrintLeftPages =
+ bPrintRightPages =
bPrintPageBackground =
bPrintEmptyPages =
bUpdateFieldsInPrinting = sal_True;
@@ -68,11 +101,11 @@ struct SwPrintData
bPaperFromSetup =
bPrintReverse =
bPrintProspect =
- bPrintProspect_RTL =
+ bPrintProspectRTL =
bPrintSingleJobs =
bModified =
bPrintBlackFont =
- bPrintHiddenText =
+ bPrintHiddenText =
bPrintTextPlaceholder = sal_False;
nPrintPostIts = 0;
@@ -83,64 +116,202 @@ struct SwPrintData
sal_Bool operator==(const SwPrintData& rData)const
{
return
- bPrintGraphic == rData.bPrintGraphic &&
- bPrintTable == rData.bPrintTable &&
- bPrintDraw == rData.bPrintDraw &&
- bPrintControl == rData.bPrintControl &&
- bPrintPageBackground== rData.bPrintPageBackground&&
- bPrintBlackFont == rData.bPrintBlackFont &&
- bPrintLeftPage == rData.bPrintLeftPage &&
- bPrintRightPage == rData.bPrintRightPage &&
- bPrintReverse == rData.bPrintReverse &&
- bPrintProspect == rData.bPrintProspect &&
- bPrintProspect_RTL == rData.bPrintProspect_RTL &&
- bPrintSingleJobs == rData.bPrintSingleJobs &&
- bPaperFromSetup == rData.bPaperFromSetup &&
- bPrintEmptyPages == rData.bPrintEmptyPages &&
+ bPrintGraphic == rData.bPrintGraphic &&
+ bPrintTable == rData.bPrintTable &&
+ bPrintDraw == rData.bPrintDraw &&
+ bPrintControl == rData.bPrintControl &&
+ bPrintPageBackground== rData.bPrintPageBackground &&
+ bPrintBlackFont == rData.bPrintBlackFont &&
+ bPrintLeftPages == rData.bPrintLeftPages &&
+ bPrintRightPages == rData.bPrintRightPages &&
+ bPrintReverse == rData.bPrintReverse &&
+ bPrintProspect == rData.bPrintProspect &&
+ bPrintProspectRTL == rData.bPrintProspectRTL &&
+ bPrintSingleJobs == rData.bPrintSingleJobs &&
+ bPaperFromSetup == rData.bPaperFromSetup &&
+ bPrintEmptyPages == rData.bPrintEmptyPages &&
bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting &&
- nPrintPostIts == rData.nPrintPostIts &&
- sFaxName == rData.sFaxName &&
- bPrintHiddenText == rData.bPrintHiddenText &&
+ nPrintPostIts == rData.nPrintPostIts &&
+ sFaxName == rData.sFaxName &&
+ bPrintHiddenText == rData.bPrintHiddenText &&
bPrintTextPlaceholder == rData.bPrintTextPlaceholder;
}
- sal_Bool IsPrintGraphic() const { return bPrintGraphic; }
- sal_Bool IsPrintTable() const { return bPrintTable; }
- sal_Bool IsPrintDraw() const { return bPrintDraw; }
- sal_Bool IsPrintControl() const { return bPrintControl; }
- sal_Bool IsPrintLeftPage() const { return bPrintLeftPage; }
- sal_Bool IsPrintRightPage() const { return bPrintRightPage; }
- sal_Bool IsPrintReverse() const { return bPrintReverse; }
- sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
- sal_Bool IsPrintEmptyPages() const{ return bPrintEmptyPages; }
- sal_Bool IsPrintProspect() const { return bPrintProspect; }
- sal_Bool IsPrintProspect_RTL() const { return bPrintProspect_RTL; }
- sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
- sal_Bool IsPrintBlackFont() const { return bPrintBlackFont;}
- sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs;}
- sal_Int16 GetPrintPostIts() const { return nPrintPostIts; }
- const rtl::OUString GetFaxName() const{return sFaxName;}
- sal_Bool IsPrintHiddenText() const {return bPrintHiddenText;}
- sal_Bool IsPrintTextPlaceholder() const {return bPrintTextPlaceholder;}
-
- void SetPrintGraphic ( sal_Bool b ) { doSetModified(); bPrintGraphic = b;}
- void SetPrintTable ( sal_Bool b ) { doSetModified(); bPrintTable = b;}
- void SetPrintDraw ( sal_Bool b ) { doSetModified(); bPrintDraw = b;}
- void SetPrintControl ( sal_Bool b ) { doSetModified(); bPrintControl = b; }
- void SetPrintLeftPage ( sal_Bool b ) { doSetModified(); bPrintLeftPage = b;}
- void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPage = b;}
- void SetPrintReverse ( sal_Bool b ) { doSetModified(); bPrintReverse = b;}
- void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b;}
- void SetPrintEmptyPages(sal_Bool b ) { doSetModified(); bPrintEmptyPages = b;}
- void SetPrintPostIts ( sal_Int16 n){ doSetModified(); nPrintPostIts = n; }
- void SetPrintProspect ( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
- void SetPrintProspect_RTL ( sal_Bool b ) { doSetModified(); bPrintProspect_RTL = b; }
- void SetPrintPageBackground(sal_Bool b){ doSetModified(); bPrintPageBackground = b;}
- void SetPrintBlackFont(sal_Bool b){ doSetModified(); bPrintBlackFont = b;}
- void SetPrintSingleJobs(sal_Bool b){ doSetModified(); bPrintSingleJobs = b;}
- void SetFaxName(const rtl::OUString& rSet){sFaxName = rSet;}
- void SetPrintHiddenText(sal_Bool b){ doSetModified(); bPrintHiddenText = b;}
- void SetPrintTextPlaceholder(sal_Bool b){ doSetModified(); bPrintTextPlaceholder = b;}
+
+ // Note: in the context where this class ist used the pointers should always be valid
+ // during the lifetime of this object
+ const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; }
+ const SwRenderData & GetRenderData() const { return *m_pRenderData; }
+ void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; }
+ void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; }
+
+ sal_Bool IsPrintGraphic() const { return bPrintGraphic; }
+ sal_Bool IsPrintTable() const { return bPrintTable; }
+ sal_Bool IsPrintDraw() const { return bPrintDraw; }
+ sal_Bool IsPrintControl() const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage() const { return bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ sal_Bool IsPrintReverse() const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_Int16 GetPrintPostIts() const { return nPrintPostIts; }
+ const rtl::OUString GetFaxName() const { return sFaxName; }
+ sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
+ sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
+
+ void SetPrintGraphic( sal_Bool b ) { doSetModified(); bPrintGraphic = b; }
+ void SetPrintTable( sal_Bool b ) { doSetModified(); bPrintTable = b; }
+ void SetPrintDraw( sal_Bool b ) { doSetModified(); bPrintDraw = b; }
+ void SetPrintControl( sal_Bool b ) { doSetModified(); bPrintControl = b; }
+ void SetPrintLeftPage( sal_Bool b ) { doSetModified(); bPrintLeftPages = b; }
+ void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = b; }
+ void SetPrintReverse( sal_Bool b ) { doSetModified(); bPrintReverse = b; }
+ void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b; }
+ void SetPrintEmptyPages( sal_Bool b ) { doSetModified(); bPrintEmptyPages = b; }
+ void SetPrintPostIts( sal_Int16 n ) { doSetModified(); nPrintPostIts = n; }
+ void SetPrintProspect( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
+ void SetPrintProspect_RTL( sal_Bool b ) { doSetModified(); bPrintProspectRTL = b; }
+ void SetPrintPageBackground( sal_Bool b ) { doSetModified(); bPrintPageBackground = b; }
+ void SetPrintBlackFont( sal_Bool b ) { doSetModified(); bPrintBlackFont = b; }
+ void SetPrintSingleJobs( sal_Bool b ) { doSetModified(); bPrintSingleJobs = b; }
+ void SetFaxName( const rtl::OUString& rSet ) { sFaxName = rSet; }
+ void SetPrintHiddenText( sal_Bool b ) { doSetModified(); bPrintHiddenText = b; }
+ void SetPrintTextPlaceholder( sal_Bool b ) { doSetModified(); bPrintTextPlaceholder = b; }
+
virtual void doSetModified () { bModified = sal_True;}
};
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintUIOptions : public vcl::PrinterOptionsHelper
+{
+ OutputDevice* m_pLast;
+ const SwPrintData & m_rDefaultPrintData;
+
+public:
+ SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData );
+ virtual ~SwPrintUIOptions();
+
+ bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp );
+
+ bool IsPrintFormControls() const { return getBoolValue( "PrintControls", m_rDefaultPrintData.bPrintControl ); }
+ bool IsPrintPageBackground() const { return getBoolValue( "PrintPageBackground", m_rDefaultPrintData.bPrintPageBackground ); }
+ bool IsPrintProspect() const { return getBoolValue( "PrintProspect", m_rDefaultPrintData.bPrintProspect ); }
+ bool IsPrintProspectRTL() const { return getIntValue( "PrintProspectRTL", m_rDefaultPrintData.bPrintProspectRTL ) ? true : false; }
+ bool IsPrintTextPlaceholders() const { return getBoolValue( "PrintTextPlaceholder", m_rDefaultPrintData.bPrintTextPlaceholder ); }
+ bool IsPrintHiddenText() const { return getBoolValue( "PrintHiddenText", m_rDefaultPrintData.bPrintHiddenText ); }
+ bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); }
+ sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); }
+ bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); }
+ bool IsPrintReverse() const { return false; /*handled by print dialog now*/ /*getBoolValue( "PrintReversed", m_rDefaultPrintData.bPrintReverse );*/ }
+
+ bool IsPrintLeftPages() const;
+ bool IsPrintRightPages() const;
+ bool IsPrintEmptyPages( bool bIsPDFExport ) const;
+ bool IsPrintTables() const;
+ bool IsPrintGraphics() const;
+ bool IsPrintDrawings() const;
+};
+
+
+////////////////////////////////////////////////////////////
+
+// A class that stores temporary data that is needed for rendering the document.
+// Usually this data is created when 'getRendererCount' is called and
+// and it is used in the 'render' function of that same interface
+class SwRenderData
+{
+ // pages valid for printing (according to the current settings)
+ // and their respective start frames (see getRendererCount in unotxdoc.cxx)
+ // This set of pages does NOT depend on the 'PageRange' that is used as a printing option!
+ std::set< sal_Int32 > m_aValidPages; // the set of possible pages (see StringRangeEnumerator::getRangesFromString )
+ std::map< sal_Int32, const SwPageFrm * > m_aValidStartFrames; // the map of start frames for those pages
+
+ // vector of pages and their order to be printed (duplicates and any order allowed!)
+ // (see 'render' in unotxdoc.cxx)
+ std::vector< sal_Int32 > m_aPagesToPrint;
+
+ std::vector< const SwPageFrm * > m_aPostItStartFrames;
+
+ // for prospect printing: the pairs of pages to be printed together on a single prospect page.
+ // -1 indicates a half page to be left empty.
+ std::vector< std::pair< sal_Int32, sal_Int32 > > m_aPagePairs;
+
+ rtl::OUString m_aPageRange;
+
+ // the view options to be applied for printing
+ SwViewOptionAdjust_Impl * m_pViewOptionAdjust;
+
+ SwPrtOptions * m_pPrtOptions;
+
+public:
+
+ // PostIt relevant data
+ _SetGetExpFlds * m_pPostItFields; // an array of "_SetGetExpFld *" sorted by page and line numbers
+ SwDoc * m_pPostItDoc;
+ ViewShell * m_pPostItShell;
+
+public:
+ SwRenderData();
+ ~SwRenderData();
+
+
+ bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0 && m_pPostItShell != 0; }
+ void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev );
+ void DeletePostItData();
+
+ bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
+ void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
+ void ViewOptionAdjust( const SwPrtOptions *pPrtOptions );
+ void ViewOptionAdjustStop();
+
+ bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
+ void SetSwPrtOptions( SwPrtOptions * pOpt ) { m_pPrtOptions = pOpt; }
+ const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; }
+ SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
+ void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell,
+ const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
+
+
+ typedef std::map< sal_Int32, const SwPageFrm * > ValidStartFramesMap_t;
+ typedef std::vector< std::pair< sal_Int32, sal_Int32 > > PagePairsVec_t;
+
+ std::set< sal_Int32 > & GetValidPagesSet() { return m_aValidPages; }
+ const std::set< sal_Int32 > & GetValidPagesSet() const { return m_aValidPages; }
+ ValidStartFramesMap_t & GetValidStartFrames() { return m_aValidStartFrames; }
+ const ValidStartFramesMap_t & GetValidStartFrames() const { return m_aValidStartFrames; }
+
+ // used for 'normal' printing
+ // A page value of 0 as entry indicates that this page is not from the document but
+ // from the post-it document. (See also GetPostItStartFrame below)
+ std::vector< sal_Int32 > & GetPagesToPrint() { return m_aPagesToPrint; }
+ const std::vector< sal_Int32 > & GetPagesToPrint() const { return m_aPagesToPrint; }
+
+ // used for 'normal' printing with post-its
+ // - if the map entry will be NULL then the respective page to be printed is from
+ // the document. In that case use the value from GetPagesToPrint at the same index to
+ // get the phys. page number to be printed, and then retrieve the start frame to use
+ // from GetValidStartFrms.
+ // - If the entry is not NULL it is the start frame of the page from the post-it document
+ // that is to be printed
+ std::vector< const SwPageFrm * > & GetPostItStartFrames() { return m_aPostItStartFrames; }
+ const std::vector< const SwPageFrm * > & GetPostItStartFrames() const { return m_aPostItStartFrames; }
+
+ // used for prospect printing only
+ PagePairsVec_t & GetPagePairsForProspectPrinting() { return m_aPagePairs; }
+ const PagePairsVec_t & GetPagePairsForProspectPrinting() const { return m_aPagePairs; }
+
+ rtl::OUString GetPageRange() const { return m_aPageRange; }
+ void SetPageRange( const rtl::OUString &rRange ) { m_aPageRange = rRange; }
+};
+
+
+////////////////////////////////////////////////////////////
+
#endif //_SW_PRINTDATA_HXX
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
index 1f225aeeb8b0..c8f8561138b8 100644
--- a/sw/inc/rolbck.hxx
+++ b/sw/inc/rolbck.hxx
@@ -163,8 +163,11 @@ public:
class SwHistorySetTxtFld : public SwHistoryHint
{
+ //!! beware of the order for the declation of thje auto_ptrs.
+ //!! If they get destroyed in the wrong order sw may crash (namely mail-merge as well)
::std::auto_ptr<SwFieldType> m_pFldType;
const ::std::auto_ptr<SwFmtFld> m_pFld;
+
ULONG m_nNodeIndex;
xub_StrLen m_nPos;
USHORT m_nFldWhich;
diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx
index 38250fe7f28d..dbf2898c481e 100644
--- a/sw/inc/swprtopt.hxx
+++ b/sw/inc/swprtopt.hxx
@@ -34,11 +34,24 @@
#include <tools/multisel.hxx>
#include <printdata.hxx>
+#include <set>
+#include <map>
+#include <vector>
+#include <utility>
+
#define POSTITS_NONE 0
#define POSTITS_ONLY 1
#define POSTITS_ENDDOC 2
#define POSTITS_ENDPAGE 3
+
+class PrintDialog;
+class SfxPrinter;
+
+
+////////////////////////////////////////////////////////////
+
+
class SwPrtOptions : public SwPrintData
{
USHORT nJobNo;
@@ -75,27 +88,18 @@ public:
#endif
- SwPrtOptions& operator=(const SwPrintData& rData)
- {
- SwPrintData::operator=(rData);
- return *this;
- }
-};
-
-
-#endif //_SWPRTOPT_HXX
-
-
-
-
-
-
-
-
-
-
+ SwPrtOptions& operator=(const SwPrintData& rData)
+ {
+ SwPrintData::operator=(rData);
+ return *this;
+ }
+ // get print options
+ void MakeOptions( BOOL bWeb );
+};
+////////////////////////////////////////////////////////////
+#endif //_SWPRTOPT_HXX
diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx
index dcb2f9cfcbda..0f46a92f323e 100644
--- a/sw/inc/unomod.hxx
+++ b/sw/inc/unomod.hxx
@@ -45,7 +45,7 @@
class SwView;
class SwViewOption;
-struct SwPrintData;
+class SwPrintData;
class SwDoc;
/******************************************************************************
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 7bb2af6393d1..19f0c625e02f 100644..100755
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -29,9 +29,11 @@
************************************************************************/
#ifndef _UNOTXDOC_HXX
#define _UNOTXDOC_HXX
+
#include "swdllapi.h"
#include <svl/svarray.hxx>
#include <sfx2/sfxbasemodel.hxx>
+
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/style/XAutoStylesSupplier.hpp>
@@ -61,6 +63,7 @@
#include <com/sun/star/util/XLinkUpdate.hpp>
#include <com/sun/star/view/XRenderable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
@@ -78,6 +81,8 @@
#include <cppuhelper/implbase4.hxx> // helper for implementations
#include <RefreshListenerContainer.hxx>
+#include <viewopt.hxx>
+
#define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32
@@ -114,6 +119,8 @@ public Ifc31, public Ifc32
__DEF_IMPLHELPER_EX( 32 )
+namespace css = ::com::sun::star;
+
class SwDoc;
class SwDocShell;
class UnoActionContext;
@@ -122,10 +129,17 @@ class SwXDrawPage;
class SwUnoCrsr;
class SwXDocumentPropertyHelper;
class SfxViewFrame;
+class SwPrintUIOptions;
+class SwPrintData;
+class SwRenderData;
+class SwPrtOptions;
+class SwWrtShell;
+
typedef UnoActionContext* UnoActionContextPtr;
SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
+
/******************************************************************************
*
******************************************************************************/
@@ -133,38 +147,38 @@ SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
typedef cppu::WeakImplHelper32
<
- ::com::sun::star::text::XTextDocument,
- ::com::sun::star::text::XLineNumberingProperties,
- ::com::sun::star::text::XChapterNumberingSupplier,
- ::com::sun::star::text::XNumberingRulesSupplier,
- ::com::sun::star::text::XFootnotesSupplier,
- ::com::sun::star::text::XEndnotesSupplier,
- ::com::sun::star::util::XReplaceable,
- ::com::sun::star::text::XPagePrintable,
- ::com::sun::star::text::XReferenceMarksSupplier,
- ::com::sun::star::text::XTextTablesSupplier,
- ::com::sun::star::text::XTextFramesSupplier,
- ::com::sun::star::text::XBookmarksSupplier,
- ::com::sun::star::text::XTextSectionsSupplier,
- ::com::sun::star::text::XTextGraphicObjectsSupplier,
- ::com::sun::star::text::XTextEmbeddedObjectsSupplier,
- ::com::sun::star::text::XTextFieldsSupplier,
- ::com::sun::star::style::XStyleFamiliesSupplier,
- ::com::sun::star::style::XAutoStylesSupplier,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::drawing::XDrawPageSupplier,
- ::com::sun::star::text::XDocumentIndexesSupplier,
- ::com::sun::star::beans::XPropertySet,
- ::com::sun::star::beans::XPropertyState,
- ::com::sun::star::document::XLinkTargetSupplier,
- ::com::sun::star::document::XRedlinesSupplier,
- ::com::sun::star::util::XRefreshable,
- ::com::sun::star::util::XLinkUpdate,
- ::com::sun::star::view::XRenderable,
- ::com::sun::star::xforms::XFormsSupplier,
- ::com::sun::star::text::XFlatParagraphIteratorProvider,
- ::com::sun::star::document::XDocumentLanguages,
- ::com::sun::star::util::XCloneable
+ css::text::XTextDocument,
+ css::text::XLineNumberingProperties,
+ css::text::XChapterNumberingSupplier,
+ css::text::XNumberingRulesSupplier,
+ css::text::XFootnotesSupplier,
+ css::text::XEndnotesSupplier,
+ css::util::XReplaceable,
+ css::text::XPagePrintable,
+ css::text::XReferenceMarksSupplier,
+ css::text::XTextTablesSupplier,
+ css::text::XTextFramesSupplier,
+ css::text::XBookmarksSupplier,
+ css::text::XTextSectionsSupplier,
+ css::text::XTextGraphicObjectsSupplier,
+ css::text::XTextEmbeddedObjectsSupplier,
+ css::text::XTextFieldsSupplier,
+ css::style::XStyleFamiliesSupplier,
+ css::style::XAutoStylesSupplier,
+ css::lang::XServiceInfo,
+ css::drawing::XDrawPageSupplier,
+ css::text::XDocumentIndexesSupplier,
+ css::beans::XPropertySet,
+ css::beans::XPropertyState,
+ css::document::XLinkTargetSupplier,
+ css::document::XRedlinesSupplier,
+ css::util::XRefreshable,
+ css::util::XLinkUpdate,
+ css::view::XRenderable,
+ css::xforms::XFormsSupplier,
+ css::text::XFlatParagraphIteratorProvider,
+ css::document::XDocumentLanguages,
+ css::util::XCloneable
>
SwXTextDocumentBaseClass;
@@ -181,47 +195,51 @@ class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
sal_Bool bObjectValid;
SwXDrawPage* pDrawPage;
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > * pxXDrawPage;
+ css::uno::Reference< css::drawing::XDrawPage > * pxXDrawPage;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xBodyText;
+ css::uno::Reference< css::text::XText > xBodyText;
SwXBodyText* pBodyText;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xNumFmtAgg;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXNumberingRules;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXFootnotes;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXFootnoteSettings;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXEndnotes;
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXEndnoteSettings;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXReferenceMarks;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > * pxXTextFieldTypes;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextFieldMasters;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextSections;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXBookmarks;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextTables;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextFrames;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXGraphicObjects;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXEmbeddedObjects;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXStyleFamilies;
- mutable ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyles > * pxXAutoStyles;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > * pxXChapterNumbering;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXDocumentIndexes;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXLineNumberingProperties;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxLinkTargetSupplier;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess >* pxXRedlines;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> xXFormsContainer;
+ css::uno::Reference< css::uno::XAggregation > xNumFmtAgg;
+
+ css::uno::Reference< css::container::XIndexAccess > * pxXNumberingRules;
+ css::uno::Reference< css::container::XIndexAccess > * pxXFootnotes;
+ css::uno::Reference< css::beans::XPropertySet > * pxXFootnoteSettings;
+ css::uno::Reference< css::container::XIndexAccess > * pxXEndnotes;
+ css::uno::Reference< css::beans::XPropertySet > * pxXEndnoteSettings;
+ css::uno::Reference< css::container::XNameAccess > * pxXReferenceMarks;
+ css::uno::Reference< css::container::XEnumerationAccess > * pxXTextFieldTypes;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextFieldMasters;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextSections;
+ css::uno::Reference< css::container::XNameAccess > * pxXBookmarks;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextTables;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextFrames;
+ css::uno::Reference< css::container::XNameAccess > * pxXGraphicObjects;
+ css::uno::Reference< css::container::XNameAccess > * pxXEmbeddedObjects;
+ css::uno::Reference< css::container::XNameAccess > * pxXStyleFamilies;
+ mutable css::uno::Reference< css::style::XAutoStyles > * pxXAutoStyles;
+ css::uno::Reference< css::container::XIndexReplace > * pxXChapterNumbering;
+ css::uno::Reference< css::container::XIndexAccess > * pxXDocumentIndexes;
+
+ css::uno::Reference< css::beans::XPropertySet > * pxXLineNumberingProperties;
+ css::uno::Reference< css::container::XNameAccess > * pxLinkTargetSupplier;
+ css::uno::Reference< css::container::XEnumerationAccess >* pxXRedlines;
+ css::uno::Reference< css::container::XNameContainer> xXFormsContainer;
//temporary frame to enable PDF export if no valid view is available
- SfxViewFrame* m_pHiddenViewFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xPropertyHelper;
- SwXDocumentPropertyHelper* pPropertyHelper;
+ SfxViewFrame* m_pHiddenViewFrame;
+ css::uno::Reference< css::uno::XInterface> xPropertyHelper;
+ SwXDocumentPropertyHelper* pPropertyHelper;
+
+ SwPrintUIOptions * m_pPrintUIOptions;
+ SwRenderData * m_pRenderData;
void GetBodyText();
void GetNumberFormatter();
// used for XRenderable implementation
- SfxViewShell * GuessViewShell();
- SwDoc * GetRenderDoc( SfxViewShell *&rpView, const ::com::sun::star::uno::Any& rSelection );
+ SfxViewShell * GuessViewShell( /* out */ bool &rbIsSwSrcView, const css::uno::Reference< css::frame::XController > xController = css::uno::Reference< css::frame::XController >() );
+ SwDoc * GetRenderDoc( SfxViewShell *&rpView, const css::uno::Any& rSelection, bool bIsPDFExport );
+ SfxViewShell * GetRenderView( bool &rbIsSwSrcView, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions, bool bIsPDFExport );
rtl::OUString maBuildId;
@@ -234,173 +252,173 @@ public:
SwXTextDocument(SwDocShell* pShell);
inline void notifyRefreshListeners() { aRefreshCont.Refreshed(); }
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException);
virtual void SAL_CALL acquire( ) throw();
virtual void SAL_CALL release( ) throw();
//XWeak
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAdapter > SAL_CALL queryAdapter( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter( ) throw(css::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw(css::uno::RuntimeException);
- static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
//XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException);
//XTextDocument
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL reformat(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::text::XText > SAL_CALL getText(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL reformat(void) throw( css::uno::RuntimeException );
//XModel
- virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getArgs( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL connectController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL disconnectController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL lockControllers( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL unlockControllers( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > SAL_CALL getCurrentController( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setCurrentController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) throw(css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getURL( ) throw(css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL lockControllers( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL unlockControllers( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(css::uno::RuntimeException);
+ virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::container::NoSuchElementException, css::uno::RuntimeException);
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(css::uno::RuntimeException);
//XComponent
- virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL dispose(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException );
//XCloseable
- virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (::com::sun::star::util::CloseVetoException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException);
//XLineNumberingProperties
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( css::uno::RuntimeException );
//XChapterNumberingSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( css::uno::RuntimeException );
//XNumberingRulesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getNumberingRules() throw (::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() throw (css::uno::RuntimeException);
//XFootnotesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( css::uno::RuntimeException );
//XEndnotesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( css::uno::RuntimeException );
//XReplaceable
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Int32 SAL_CALL replaceAll(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( css::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL replaceAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
//XSearchable
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL findAll(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL findFirst(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL findNext(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xStartAt, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL findAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findFirst(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findNext(const css::uno::Reference< css::uno::XInterface > & xStartAt, const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
//XPagePrintable
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setPagePrintSettings(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aSettings) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL printPages(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL setPagePrintSettings(const css::uno::Sequence< css::beans::PropertyValue >& aSettings) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL printPages(const css::uno::Sequence< css::beans::PropertyValue >& xOptions) throw( css::lang::IllegalArgumentException, css::uno::RuntimeException );
//XReferenceMarksSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XTextFieldsSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XTextFieldsSupplier
+ virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XTextEmbeddedObjectsSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XTextEmbeddedObjectsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( css::uno::RuntimeException );
-// // ::com::sun::star::text::XTextShapesSupplier
-// virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > getShapes(void) throw( ::com::sun::star::uno::RuntimeException );
+// // css::text::XTextShapesSupplier
+// virtual css::uno::Reference< css::container::XIndexAccess > getShapes(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XBookmarksSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getBookmarks(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XBookmarksSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getBookmarks(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XTextSectionsSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextSections(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XTextSectionsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextSections(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XTextTablesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextTables(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XTextTablesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextTables(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XTextGraphicObjectsSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XTextGraphicObjectsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XTextFramesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextFrames(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XTextFramesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFrames(void) throw( css::uno::RuntimeException );
//XStyleFamiliesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( css::uno::RuntimeException );
//XAutoStylesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (css::uno::RuntimeException);
//XMultiServiceFactory
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier)
- throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments)
- throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void)
- throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier)
+ throw( css::uno::Exception, css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier,
+ const css::uno::Sequence< css::uno::Any >& Arguments)
+ throw( css::uno::Exception, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void)
+ throw( css::uno::RuntimeException );
//XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::drawing::XDrawPageSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::drawing::XDrawPageSupplier
+ virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( css::uno::RuntimeException );
- // ::com::sun::star::text::XDocumentIndexesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( ::com::sun::star::uno::RuntimeException );
+ // css::text::XDocumentIndexesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( css::uno::RuntimeException );
//XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
//XPropertyState
- virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual css::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
//XLinkTargetSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
//XRedlinesSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(css::uno::RuntimeException);
- // ::com::sun::star::util::XRefreshable
- virtual void SAL_CALL refresh(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException );
+ // css::util::XRefreshable
+ virtual void SAL_CALL refresh(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException );
- // ::com::sun::star::util::XLinkUpdate,
- virtual void SAL_CALL updateLinks( ) throw(::com::sun::star::uno::RuntimeException);
+ // css::util::XLinkUpdate,
+ virtual void SAL_CALL updateLinks( ) throw(css::uno::RuntimeException);
- // ::com::sun::star::view::XRenderable
- virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ // css::view::XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
- // ::com::sun::star::xforms::XFormsSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getXForms( ) throw (::com::sun::star::uno::RuntimeException);
+ // css::xforms::XFormsSupplier
+ virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms( ) throw (css::uno::RuntimeException);
- // ::com::sun::star::document::XDocumentLanguages
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ // css::document::XDocumentLanguages
+ virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
- // ::com::sun::star::text::XFlatParagraphIteratorProvider:
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (::com::sun::star::uno::RuntimeException);
+ // css::text::XFlatParagraphIteratorProvider:
+ virtual css::uno::Reference< css::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (css::uno::RuntimeException);
// ::com::sun::star::util::XCloneable
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
@@ -414,15 +432,16 @@ public:
void InitNewDoc();
- SwUnoCrsr* CreateCursorForSearch(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & xCrsr);
- SwUnoCrsr* FindAny(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc,
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & xCrsr, sal_Bool bAll,
+ SwUnoCrsr* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCrsr);
+ SwUnoCrsr* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc,
+ css::uno::Reference< css::text::XTextCursor > & xCrsr, sal_Bool bAll,
sal_Int32& nResult,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xLastResult);
+ css::uno::Reference< css::uno::XInterface > xLastResult);
SwXDrawPage* GetDrawPage();
SwDocShell* GetDocShell() {return pDocShell;}
+
void * SAL_CALL operator new( size_t ) throw();
void SAL_CALL operator delete( void * ) throw();
@@ -432,8 +451,8 @@ public:
--------------------------------------------------*/
class SwXLinkTargetSupplier : public cppu::WeakImplHelper2
<
- ::com::sun::star::container::XNameAccess,
- ::com::sun::star::lang::XServiceInfo
+ css::container::XNameAccess,
+ css::lang::XServiceInfo
>
{
SwXTextDocument* pxDoc;
@@ -450,18 +469,18 @@ public:
~SwXLinkTargetSupplier();
//XNameAccess
- virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException );
//XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException);
//XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
//
void Invalidate() {pxDoc = 0;}
@@ -471,52 +490,52 @@ public:
--------------------------------------------------*/
class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
<
- ::com::sun::star::beans::XPropertySet,
- ::com::sun::star::container::XNameAccess,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::document::XLinkTargetSupplier
+ css::beans::XPropertySet,
+ css::container::XNameAccess,
+ css::lang::XServiceInfo,
+ css::document::XLinkTargetSupplier
>
{
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xRealAccess;
+ css::uno::Reference< css::container::XNameAccess > xRealAccess;
const SfxItemPropertySet* pPropSet;
const String sLinkSuffix;
const String sLinkDisplayName;
- ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xDoc;
+ css::uno::Reference< css::text::XTextDocument > xDoc;
SwXTextDocument* pxDoc;
public:
- SwXLinkNameAccessWrapper(::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xAccess,
+ SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > xAccess,
const String& rLinkDisplayName, String sSuffix);
SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
const String& rLinkDisplayName, String sSuffix);
~SwXLinkNameAccessWrapper();
//XNameAccess
- virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException );
//XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException);
//XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
//XLinkTargetSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
//XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
};
/* -----------------26.10.99 15:46-------------------
@@ -524,8 +543,8 @@ public:
--------------------------------------------------*/
class SwXOutlineTarget : public cppu::WeakImplHelper2
<
- ::com::sun::star::beans::XPropertySet,
- ::com::sun::star::lang::XServiceInfo
+ css::beans::XPropertySet,
+ css::lang::XServiceInfo
>
{
const SfxItemPropertySet* pPropSet;
@@ -536,37 +555,61 @@ public:
~SwXOutlineTarget();
//XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
//XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
};
#endif
class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
{
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xDashTable;
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xGradientTable;
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xHatchTable;
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xBitmapTable;
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xTransGradientTable;
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xMarkerTable;
- com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xDrawDefaults;
+ css::uno::Reference < css::uno::XInterface > xDashTable;
+ css::uno::Reference < css::uno::XInterface > xGradientTable;
+ css::uno::Reference < css::uno::XInterface > xHatchTable;
+ css::uno::Reference < css::uno::XInterface > xBitmapTable;
+ css::uno::Reference < css::uno::XInterface > xTransGradientTable;
+ css::uno::Reference < css::uno::XInterface > xMarkerTable;
+ css::uno::Reference < css::uno::XInterface > xDrawDefaults;
SwDoc* m_pDoc;
public:
SwXDocumentPropertyHelper(SwDoc& rDoc);
~SwXDocumentPropertyHelper();
- com::sun::star::uno::Reference<com::sun::star::uno::XInterface> GetDrawTable(short nWhich);
+ css::uno::Reference<css::uno::XInterface> GetDrawTable(short nWhich);
void Invalidate();
virtual void onChange();
};
+
+
+/*-- 06.01.2004 15:08:34---------------------------------------------------
+ The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
+ the current ViewShell so that fields are not printed as commands and
+ hidden characters are always invisible. Hidden text and place holders
+ should be printed according to the current print options.
+ After printing the view options are restored
+ -----------------------------------------------------------------------*/
+class SwViewOptionAdjust_Impl
+{
+ SwWrtShell & m_rShell;
+ SwViewOption m_aOldViewOptions;
+// SwViewOption m_aRenderViewOptions; // view options to use when rendering for PDF export or printing
+// bool m_bRestoreViewOptions;
+
+public:
+ SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
+ ~SwViewOptionAdjust_Impl();
+
+ void AdjustViewOptions( const SwPrtOptions *pPrtOptions );
+};
+
+
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index b3feded02ea1..5631ba3cdd2e 100644..100755
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -82,8 +82,7 @@ namespace svtools{ class ColorConfig;}
#define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L
#define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L
#define VIEWOPT_CORE2_PDF_EXPORT 0x00000010L
-
-
+#define VIEWOPT_CORE2_PRINTING 0x00000020L
#define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L
#define VIEWOPT_2_UNUSED1 0x00000100L
@@ -381,6 +380,12 @@ public:
inline void SetPDFExport(BOOL b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
+ inline BOOL IsPrinting() const
+ {return nCore2Options & VIEWOPT_CORE2_PRINTING ? TRUE : FALSE;}
+
+ inline void SetPrinting(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
+
/*---------------------------------------------------------------------------
----------------------------------------------------------------------------*/
@@ -450,7 +455,8 @@ public:
SwViewOption& operator=( const SwViewOption &rOpt );
// Vergleichsmethoden
BOOL IsEqualFlags ( const SwViewOption &rOpt ) const;
- inline BOOL operator==( const SwViewOption &rOpt ) const;
+ inline BOOL operator == ( const SwViewOption &rOpt ) const;
+ inline BOOL operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
/*---------------------------------------------------------------------------
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index f12b3ecbe9bc..8de10dfce94d 100644..100755
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -39,6 +39,7 @@
#include <swrect.hxx>
#include <errhdl.hxx>
#include <vcl/mapmod.hxx>
+#include <vcl/print.hxx>
namespace com { namespace sun { namespace star { namespace accessibility {
class XAccessible; } } } }
@@ -70,6 +71,7 @@ class SfxViewShell;
class SwViewOption;
class SwViewImp;
class SwPrtOptions;
+class SwPrintData;
class SwPagePreViewPrtData;
class Window;
class OutputDevice;
@@ -92,12 +94,19 @@ class SwPostItMgr;
// #i74769#
class SdrPaintWindow;
+namespace vcl
+{
+ class OldStylePrintAdaptor;
+}
+
+
//JP 19.07.98: - Bug 52312
// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
// benoetigt werden.
// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
#define VSHELLFLAG_ISPREVIEW ((long)0x1)
+
class SW_DLLPUBLIC ViewShell : public Ring
{
friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut );
@@ -186,7 +195,7 @@ class SW_DLLPUBLIC ViewShell : public Ring
SW_DLLPRIVATE void Scroll(); //Scrollen wenn sich aus der LayAction Scrollmoeglichkeiten
//ergaben.
- SW_DLLPRIVATE void PrepareForPrint( const SwPrtOptions &rOptions );
+ SW_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions );
SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
@@ -209,8 +218,7 @@ public:
const SwNodes& GetNodes() const;
//Nach Druckerwechsel, vom Doc
- //pPDFOut != NULL is used for PDF export.
- void InitPrt( SfxPrinter * , OutputDevice *pPDFOut = NULL );
+ void InitPrt( OutputDevice *pOutDev );
//Klammerung von zusammengehoerenden Aktionen.
inline void StartAction();
@@ -361,22 +369,25 @@ public:
void ChgAllPageOrientation( sal_uInt16 eOri );
void ChgAllPageSize( Size &rSz );
- //Druckauftrag abwickeln.
- // pPDFOut != Null is: do PDF Export (no printing!)
- sal_Bool Prt( SwPrtOptions& rOptions, SfxProgress* pProgress,
- OutputDevice* pPDFOut = NULL );
+ // printing of one page.
+ // bIsPDFExport == true is: do PDF Export (no printing!)
+ sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, const SwPrtOptions &rPrintData,
+ sal_Int32 nRenderer /* offset in vector of pages to print */ );
+
+ // printing of one brochure page
+ void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
+ sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
- //"Drucken" fuer OLE 2.0
- static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, SwPrtOptions& rOptions,
+ // printing for OLE 2.0
+ static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect );
// creates temporary doc with selected text for PDF export
- SwDoc * CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef& );
+ SwDoc * CreatePrtDoc( SfxObjectShellRef& );
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
- void CalcPagesForPrint( sal_uInt16 nMax, SfxProgress* pProgress = 0,
- const String* pStr = NULL, ULONG nMergeAct = 0, ULONG nMergeCnt = 0 );
+ void CalcPagesForPrint( sal_uInt16 nMax );
//All about fields.
void UpdateFlds(sal_Bool bCloseDB = sal_False);
@@ -475,14 +486,6 @@ public:
*/
void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
- // print page/print preview
- void PrintPreViewPage( SwPrtOptions& rOptions, sal_uInt16 nRowCol,
- SfxProgress& rProgress,
- const SwPagePreViewPrtData* = 0 );
-
- // Prospekt-Format drucken
- void PrintProspect( SwPrtOptions&, SfxProgress& , BOOL bRTL);
-
sal_Bool IsViewLocked() const { return bViewLocked; }
void LockView( sal_Bool b ) { bViewLocked = b; }
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 315d34197715..aede24688e1e 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -6509,31 +6509,6 @@ SfxVoidItem PageUpSel FN_PAGEUP_SEL
]
//--------------------------------------------------------------------------
-SfxVoidItem PreviewPrintOptions FN_PREVIEW_PRINT_OPTIONS
-()
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_DOC;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem PreviewZoom FN_PREVIEW_ZOOM
( SfxUInt16Item PreviewZoom FN_PREVIEW_ZOOM )
[
diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src
index d62d1da6b35b..0638e462a7ab 100644
--- a/sw/sdi/swslots.src
+++ b/sw/sdi/swslots.src
@@ -902,10 +902,6 @@ SfxSlotInfo FN_PREV_WORD_SEL
{
Slotname [ en-US ] = "Select to Begin of Word";
};
-SfxSlotInfo FN_PREVIEW_PRINT_OPTIONS
-{
- Slotname [ en-US ] = "Print options page view";
-};
SfxSlotInfo FN_PREVIEW_ZOOM
{
Slotname [ en-US ] = "Preview Zoom";
@@ -916,7 +912,7 @@ SfxSlotInfo FN_PRINT_LAYOUT
};
SfxSlotInfo FN_PRINT_PAGEPREVIEW
{
- Slotname [ en-US ] = "Print page view";
+ Slotname [ en-US ] = "Print document";
};
SfxSlotInfo FN_MAILMERGE_WIZARD
{
diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi
index 053c81b856aa..92c23fe82220 100644
--- a/sw/sdi/viewsh.sdi
+++ b/sw/sdi/viewsh.sdi
@@ -226,10 +226,6 @@ interface TextPrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
]
- FN_PREVIEW_PRINT_OPTIONS //status()
- [
- ExecMethod = Execute ;
- ]
FN_PRINT_PAGEPREVIEW // status()
[
ExecMethod = Execute ;
diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx
index 9d1f39acfc5b..bc2a74809420 100644
--- a/sw/source/core/access/accpage.cxx
+++ b/sw/source/core/access/accpage.cxx
@@ -129,8 +129,9 @@ void SwAccessiblePage::_InvalidateFocus()
}
SwAccessiblePage::SwAccessiblePage( SwAccessibleMap* pInitMap,
- const SwFrm* pFrame ) :
- SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame )
+ const SwFrm* pFrame )
+ : SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame )
+ , bIsSelected( sal_False )
{
DBG_ASSERT( pFrame != NULL, "need frame" );
DBG_ASSERT( pInitMap != NULL, "need map" );
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index bac7d6f7ea0d..868c636987d9 100644..100755
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -46,8 +46,11 @@
#include <comphelper/processfactory.hxx>
#include <tools/urlobj.hxx>
#include <tools/poly.hxx>
+#include <tools/multisel.hxx>
+#include <rtl/ustring.hxx>
#include <vcl/virdev.hxx>
#include <svl/itemiter.hxx>
+#include <unotools/syslocale.hxx>
#include <sfx2/printer.hxx>
#include <svx/keepitem.hxx>
#include <svx/cscoitem.hxx>
@@ -56,6 +59,8 @@
#include <svx/forbiddencharacterstable.hxx>
#include <svx/svdmodel.hxx>
#include <unotools/charclass.hxx>
+#include <unotools/localedatawrapper.hxx>
+
#include <swmodule.hxx>
#include <fmtpdsc.hxx>
#include <fmtanchr.hxx>
@@ -95,20 +100,22 @@
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
-#ifndef _CMDID_H
+#include <swprtopt.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
-#endif
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // StatLine-String
-#endif
#include <comcore.hrc>
#include <SwUndoTOXChange.hxx>
#include <SwUndoFmt.hxx>
#include <unocrsr.hxx>
#include <docsh.hxx>
-#include <docufld.hxx>
+#include <docfld.hxx> // _SetGetExpFld
+#include <docufld.hxx> // SwPostItField
+#include <viewsh.hxx>
+#include <shellres.hxx>
+#include <txtfrm.hxx>
#include <vector>
+#include <map>
#include <osl/diagnose.h>
#include <osl/interlck.h>
@@ -121,6 +128,8 @@
// <--
using namespace ::com::sun::star;
+using ::rtl::OUString;
+
// Seiten-Deskriptoren
SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
@@ -1028,6 +1037,625 @@ const SwDocStat& SwDoc::GetDocStat() const
return *pDocStat;
}
+/*************************************************************************/
+
+
+struct _PostItFld : public _SetGetExpFld
+{
+ _PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld, const SwIndex* pIdx = 0 )
+ : _SetGetExpFld( rNdIdx, pFld, pIdx ) {}
+
+ USHORT GetPageNo( const StringRangeEnumerator &rRangeEnum,
+ const std::set< sal_Int32 > &rPossiblePages,
+ USHORT& rVirtPgNo, USHORT& rLineNo );
+
+ SwPostItField* GetPostIt() const
+ {
+ return (SwPostItField*) GetFld()->GetFld().GetFld();
+ }
+};
+
+
+USHORT _PostItFld::GetPageNo(
+ const StringRangeEnumerator &rRangeEnum,
+ const std::set< sal_Int32 > &rPossiblePages,
+ /* out */ USHORT& rVirtPgNo, /* out */ USHORT& rLineNo )
+{
+ //Problem: Wenn ein PostItFld in einem Node steht, der von mehr als
+ //einer Layout-Instanz repraesentiert wird, steht die Frage im Raum,
+ //ob das PostIt nur ein- oder n-mal gedruck werden soll.
+ //Wahrscheinlich nur einmal, als Seitennummer soll hier keine Zufaellige
+ //sondern die des ersten Auftretens des PostIts innerhalb des selektierten
+ //Bereichs ermittelt werden.
+ rVirtPgNo = 0;
+ USHORT nPos = GetCntnt();
+ SwClientIter aIter( (SwModify &)GetFld()->GetTxtNode() );
+ for( SwTxtFrm* pFrm = (SwTxtFrm*)aIter.First( TYPE( SwFrm ));
+ pFrm; pFrm = (SwTxtFrm*)aIter.Next() )
+ {
+ if( pFrm->GetOfst() > nPos ||
+ (pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
+ continue;
+ USHORT nPgNo = pFrm->GetPhyPageNum();
+ if( rRangeEnum.hasValue( nPgNo, &rPossiblePages ))
+ {
+ rLineNo = (USHORT)(pFrm->GetLineCount( nPos ) +
+ pFrm->GetAllLines() - pFrm->GetThisLines());
+ rVirtPgNo = pFrm->GetVirtPageNum();
+ return nPgNo;
+ }
+ }
+ return 0;
+}
+
+
+bool lcl_GetPostIts(
+ IDocumentFieldsAccess* pIDFA,
+ _SetGetExpFlds * pSrtLst )
+{
+ bool bHasPostIts = false;
+
+ SwFieldType* pFldType = pIDFA->GetSysFldType( RES_POSTITFLD );
+ DBG_ASSERT( pFldType, "kein PostItType ? ");
+
+ if( pFldType->GetDepends() )
+ {
+ // Modify-Object gefunden, trage alle Felder ins Array ein
+ SwClientIter aIter( *pFldType );
+ SwClient* pLast;
+ const SwTxtFld* pTxtFld;
+
+ for( pLast = aIter.First( TYPE(SwFmtFld)); pLast; pLast = aIter.Next() )
+ {
+ if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
+ pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
+ {
+ bHasPostIts = true;
+ if (pSrtLst)
+ {
+ SwNodeIndex aIdx( pTxtFld->GetTxtNode() );
+ _PostItFld* pNew = new _PostItFld( aIdx, pTxtFld );
+ pSrtLst->Insert( pNew );
+ }
+ else
+ break; // we just wanted to check for the existence of postits ...
+ }
+ }
+ }
+
+ return bHasPostIts;
+}
+
+
+static void lcl_FormatPostIt(
+ IDocumentContentOperations* pIDCO,
+ SwPaM& aPam,
+ SwPostItField* pField,
+ bool bNewPage, bool bIsFirstPostIt,
+ USHORT nPageNo, USHORT nLineNo )
+{
+ static char __READONLY_DATA sTmp[] = " : ";
+
+ DBG_ASSERT( ViewShell::GetShellRes(), "missing ShellRes" );
+
+ if (bNewPage)
+ {
+ pIDCO->InsertPoolItem( aPam, SvxFmtBreakItem( SVX_BREAK_PAGE_AFTER, RES_BREAK ), 0 );
+ pIDCO->SplitNode( *aPam.GetPoint(), false );
+ }
+ else if (!bIsFirstPostIt)
+ {
+ // add an empty line between different notes
+ pIDCO->SplitNode( *aPam.GetPoint(), false );
+ pIDCO->SplitNode( *aPam.GetPoint(), false );
+ }
+
+ String aStr( ViewShell::GetShellRes()->aPostItPage );
+ aStr.AppendAscii(sTmp);
+
+ aStr += XubString::CreateFromInt32( nPageNo );
+ aStr += ' ';
+ if( nLineNo )
+ {
+ aStr += ViewShell::GetShellRes()->aPostItLine;
+ aStr.AppendAscii(sTmp);
+ aStr += XubString::CreateFromInt32( nLineNo );
+ aStr += ' ';
+ }
+ aStr += ViewShell::GetShellRes()->aPostItAuthor;
+ aStr.AppendAscii(sTmp);
+ aStr += pField->GetPar1();
+ aStr += ' ';
+ SvtSysLocale aSysLocale;
+ aStr += /*(LocaleDataWrapper&)*/aSysLocale.GetLocaleData().getDate( pField->GetDate() );
+ pIDCO->InsertString( aPam, aStr );
+
+ pIDCO->SplitNode( *aPam.GetPoint(), false );
+ aStr = pField->GetPar2();
+#if defined( WIN ) || defined( WNT ) || defined( PM2 )
+ // Bei Windows und Co alle CR rausschmeissen
+ aStr.EraseAllChars( '\r' );
+#endif
+ pIDCO->InsertString( aPam, aStr );
+}
+
+
+void SwDoc::CalculatePagesForPrinting(
+ /* out */ SwRenderData &rData,
+ const SwPrintUIOptions &rOptions,
+ bool bIsPDFExport,
+ sal_Int32 nDocPageCount )
+{
+ DBG_ASSERT( pLayout, "no layout present" );
+ if (!pLayout)
+ return;
+
+ // properties to take into account when calcualting the set of pages
+ // (PDF export UI does not allow for selecting left or right pages only)
+ bool bPrintLeftPages = bIsPDFExport ? true : rOptions.IsPrintLeftPages();
+ bool bPrintRightPages = bIsPDFExport ? true : rOptions.IsPrintRightPages();
+ bool bPrintEmptyPages = rOptions.IsPrintEmptyPages( bIsPDFExport );
+
+ Range aPages( 1, nDocPageCount );
+
+ MultiSelection aMulti( aPages );
+ aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
+ aMulti.Select( aPages );
+
+ const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
+ const SwFrm *pEndPage = pStPage;
+
+ USHORT nFirstPageNo = 0;
+ USHORT nLastPageNo = 0;
+ USHORT nPageNo = 1;
+
+ for( USHORT i = 1; i <= (USHORT)aPages.Max(); ++i )
+ {
+ if( i < (USHORT)aPages.Min() )
+ {
+ if( !pStPage->GetNext() )
+ break;
+ pStPage = (SwPageFrm*)pStPage->GetNext();
+ pEndPage= pStPage;
+ }
+ else if( i == (USHORT)aPages.Min() )
+ {
+ nFirstPageNo = i;
+ nLastPageNo = nFirstPageNo;
+ if( !pStPage->GetNext() || (i == (USHORT)aPages.Max()) )
+ break;
+ pEndPage = pStPage->GetNext();
+ }
+ else if( i > (USHORT)aPages.Min() )
+ {
+ nLastPageNo = i;
+ if( !pEndPage->GetNext() || (i == (USHORT)aPages.Max()) )
+ break;
+ pEndPage = pEndPage->GetNext();
+ }
+ }
+
+ DBG_ASSERT( nFirstPageNo, "first page not found! Should not happen!" );
+ if (nFirstPageNo)
+ {
+// HACK: Hier muss von der MultiSelection noch eine akzeptable Moeglichkeit
+// geschaffen werden, alle Seiten von Seite x an zu deselektieren.
+// Z.B. durch SetTotalRange ....
+
+// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), FALSE );
+ MultiSelection aTmpMulti( Range( 1, nLastPageNo ) );
+ long nTmpIdx = aMulti.FirstSelected();
+ static long nEndOfSelection = SFX_ENDOFSELECTION;
+ while ( nEndOfSelection != nTmpIdx && nTmpIdx <= long(nLastPageNo) )
+ {
+ aTmpMulti.Select( nTmpIdx );
+ nTmpIdx = aMulti.NextSelected();
+ }
+ aMulti = aTmpMulti;
+// Ende des HACKs
+
+ nPageNo = nFirstPageNo;
+
+ std::set< sal_Int32 > &rValidPages = rData.GetValidPagesSet();
+ std::map< sal_Int32, const SwPageFrm * > &rValidStartFrms = rData.GetValidStartFrames();
+ rValidPages.clear();
+ rValidStartFrms.clear();
+ while ( pStPage )
+ {
+ const BOOL bRightPg = pStPage->OnRightPage();
+ if ( aMulti.IsSelected( nPageNo ) &&
+ ( (bRightPg && bPrintRightPages) ||
+ (!bRightPg && bPrintLeftPages) ) )
+ {
+ // --> FME 2005-12-12 #b6354161# Feature - Print empty pages
+ if ( bPrintEmptyPages || pStPage->Frm().Height() )
+ // <--
+ {
+ // pStPage->GetUpper()->Paint( pStPage->Frm() );
+ rValidPages.insert( nPageNo );
+ rValidStartFrms[ nPageNo ] = pStPage;
+ }
+ }
+
+ if ( pStPage == pEndPage )
+ {
+ pStPage = 0;
+ }
+ else
+ { ++nPageNo;
+ pStPage = (SwPageFrm*)pStPage->GetNext();
+ }
+ }
+ }
+
+
+ //
+ // now that we have identified the valid pages for printing according
+ // to the print settings we need to get the PageRange to use and
+ // use both results to get the actual pages to be printed
+ // (post-it settings need to be taken into account later on!)
+ //
+
+ // get PageRange value to use
+ OUString aPageRange;
+ if (bIsPDFExport)
+ {
+ // ?? rOptions.getValue( C2U("Selection") );
+ aPageRange = rOptions.getStringValue( "PageRange", OUString() );
+ }
+ else
+ {
+ // PageContent :
+ // 0 -> print all pages (default if aPageRange is empty)
+ // 1 -> print range according to PageRange
+ // 2 -> print selection
+ const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 );
+ if (1 == nContent)
+ aPageRange = rOptions.getStringValue( "PageRange", OUString() );
+ if (2 == nContent)
+ {
+ // note that printing selections is actually implemented by copying
+ // the selection to a new temporary document and printing all of that one.
+ // Thus for Writer "PrintContent" must never be 2.
+ // See SwXTextDocument::GetRenderDoc for evaluating if a selection is to be
+ // printed and for creating the temporary document.
+ }
+
+ // please note
+ }
+ if (aPageRange.getLength() == 0) // empty string -> print all
+ {
+ // set page range to print to 'all pages'
+ aPageRange = OUString::valueOf( (sal_Int32)1 );
+ aPageRange += OUString::valueOf( (sal_Unicode)'-');
+ aPageRange += OUString::valueOf( nDocPageCount );
+ }
+ rData.SetPageRange( aPageRange );
+
+ // get vector of pages to print according to PageRange and valid pages set from above
+ // (result may be an empty vector, for example if the range string is not correct)
+ StringRangeEnumerator::getRangesFromString(
+ aPageRange, rData.GetPagesToPrint(),
+ 1, nDocPageCount, 0, &rData.GetValidPagesSet() );
+}
+
+
+void SwDoc::UpdatePagesForPrintingWithPostItData(
+ /* out */ SwRenderData &rData,
+ const SwPrintUIOptions &rOptions,
+ bool /*bIsPDFExport*/,
+ sal_Int32 nDocPageCount )
+{
+
+ sal_Int16 nPostItMode = (sal_Int16) rOptions.getIntValue( "PrintAnnotationMode", 0 );
+ DBG_ASSERT(nPostItMode == POSTITS_NONE || rData.HasPostItData(),
+ "print post-its without post-it data?" );
+ const USHORT nPostItCount = rData.HasPostItData() ? rData.m_pPostItFields->Count() : 0;
+ if (nPostItMode != POSTITS_NONE && nPostItCount > 0)
+ {
+ SET_CURR_SHELL( rData.m_pPostItShell );
+
+ // clear document and move to end of it
+ SwPaM aPam( rData.m_pPostItDoc->GetNodes().GetEndOfContent() );
+ aPam.Move( fnMoveBackward, fnGoDoc );
+ aPam.SetMark();
+ aPam.Move( fnMoveForward, fnGoDoc );
+ rData.m_pPostItDoc->DeleteRange( aPam );
+
+ const StringRangeEnumerator aRangeEnum( rData.GetPageRange(), 1, nDocPageCount, 0 );
+
+ // For mode POSTITS_ENDPAGE:
+ // maps a physical page number to the page number in post-it document that holds
+ // the first post-it for that physical page . Needed to relate the correct start frames
+ // from the post-it doc to the physical page of the document
+ std::map< sal_Int32, sal_Int32 > aPostItLastStartPageNum;
+
+ // add all post-its on valid pages within the the page range to the
+ // temporary post-it document.
+ // Since the array of post-it fileds is sorted by page and line number we will
+ // already get them in the correct order
+ USHORT nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
+ bool bIsFirstPostIt = true;
+ for (USHORT i = 0; i < nPostItCount; ++i)
+ {
+ _PostItFld& rPostIt = (_PostItFld&)*(*rData.m_pPostItFields)[ i ];
+ nLastPageNum = nPhyPageNum;
+ nPhyPageNum = rPostIt.GetPageNo(
+ aRangeEnum, rData.GetValidPagesSet(), nVirtPg, nLineNo );
+ if (nPhyPageNum)
+ {
+ // need to insert a page break?
+ // In POSTITS_ENDPAGE mode for each document page the following
+ // post-it page needs to start on a new page
+ const bool bNewPage = nPostItMode == POSTITS_ENDPAGE &&
+ !bIsFirstPostIt && nPhyPageNum != nLastPageNum;
+
+ lcl_FormatPostIt( rData.m_pPostItShell->GetDoc(), aPam,
+ rPostIt.GetPostIt(), bNewPage, bIsFirstPostIt, nVirtPg, nLineNo );
+ bIsFirstPostIt = false;
+
+ if (nPostItMode == POSTITS_ENDPAGE)
+ {
+ // get the correct number of current pages for the post-it document
+ rData.m_pPostItShell->CalcLayout();
+ const sal_Int32 nPages = rData.m_pPostItDoc->GetPageCount();
+ aPostItLastStartPageNum[ nPhyPageNum ] = nPages;
+ }
+ }
+ }
+
+ // format post-it doc to get correct number of pages
+ rData.m_pPostItShell->CalcLayout();
+ const sal_Int32 nPostItDocPageCount = rData.m_pPostItDoc->GetPageCount();
+
+ if (nPostItMode == POSTITS_ONLY || nPostItMode == POSTITS_ENDDOC)
+ {
+ // now add those post-it pages to the vector of pages to print
+ // or replace them if only post-its should be printed
+
+ rData.GetPostItStartFrames().clear();
+ if (nPostItMode == POSTITS_ENDDOC)
+ {
+ // set all values up to number of pages to print currently known to NULL,
+ // meaning none of the pages currently in the vector is from the
+ // post-it document, they are the documents pages.
+ rData.GetPostItStartFrames().resize( rData.GetPagesToPrint().size() );
+ }
+ else if (nPostItMode == POSTITS_ONLY)
+ {
+ // no document page to be printed
+ rData.GetPagesToPrint().clear();
+ }
+
+ // now we just need to add the post-it pages to be printed to the end
+ // of the vector of pages to print and keep the GetValidStartFrames
+ // data conform with it
+ sal_Int32 nPageNum = 0;
+ const SwPageFrm * pPageFrm = (SwPageFrm*)rData.m_pPostItShell->GetLayout()->Lower();
+ while( pPageFrm && nPageNum < nPostItDocPageCount )
+ {
+ DBG_ASSERT( pPageFrm, "Empty page frame. How are we going to print this?" );
+ ++nPageNum;
+ rData.GetPagesToPrint().push_back( 0 ); // a page number of 0 indicates this page is from the post-it doc
+ DBG_ASSERT( pPageFrm, "pPageFrm is NULL!" );
+ rData.GetPostItStartFrames().push_back( pPageFrm );
+ pPageFrm = (SwPageFrm*)pPageFrm->GetNext();
+ }
+ DBG_ASSERT( nPageNum == nPostItDocPageCount, "unexpected number of pages" );
+ }
+ else if (nPostItMode == POSTITS_ENDPAGE)
+ {
+ // the next step is to find all the start frames from the post-it
+ // document that should be printed for a given physical page of the document
+ std::map< sal_Int32, std::vector< const SwPageFrm * > > aPhysPageToPostItFrames;
+
+ // ... thus, first collect all post-it doc start frames in a vector
+ sal_Int32 nPostItPageNum = 0;
+ std::vector< const SwPageFrm * > aAllPostItStartFrames;
+ const SwPageFrm * pPageFrm = (SwPageFrm*)rData.m_pPostItShell->GetLayout()->Lower();
+ while( pPageFrm && sal_Int32(aAllPostItStartFrames.size()) < nPostItDocPageCount )
+ {
+ DBG_ASSERT( pPageFrm, "Empty page frame. How are we going to print this?" );
+ ++nPostItPageNum;
+ aAllPostItStartFrames.push_back( pPageFrm );
+ pPageFrm = (SwPageFrm*)pPageFrm->GetNext();
+ }
+ DBG_ASSERT( sal_Int32(aAllPostItStartFrames.size()) == nPostItDocPageCount,
+ "unexpected number of frames; does not match number of pages" );
+
+ // get a map that holds all post-it frames to be printed for a
+ // given physical page from the document
+ sal_Int32 nLastStartPageNum = 0;
+ std::map< sal_Int32, sal_Int32 >::const_iterator aIt;
+ for (aIt = aPostItLastStartPageNum.begin(); aIt != aPostItLastStartPageNum.end(); ++aIt)
+ {
+ const sal_Int32 nFrames = aIt->second - nLastStartPageNum;
+ const sal_Int32 nFirstStartPageNum = aIt == aPostItLastStartPageNum.begin() ?
+ 1 : aIt->second - nFrames + 1;
+ DBG_ASSERT( 1 <= nFirstStartPageNum && nFirstStartPageNum <= nPostItDocPageCount,
+ "page number for first frame out of range" );
+ std::vector< const SwPageFrm * > aStartFrames;
+ for (sal_Int32 i = 0; i < nFrames; ++i)
+ {
+ const sal_Int32 nIdx = nFirstStartPageNum - 1 + i; // -1 because lowest page num is 1
+ DBG_ASSERT( 0 <= nIdx && nIdx < sal_Int32(aAllPostItStartFrames.size()),
+ "index out of range" );
+ aStartFrames.push_back( aAllPostItStartFrames[ nIdx ] );
+ }
+ aPhysPageToPostItFrames[ aIt->first /* phys page num */ ] = aStartFrames;
+ nLastStartPageNum = aIt->second;
+ }
+
+
+ // ok, now that aPhysPageToPostItFrames can give the start frames for all
+ // post-it pages to be printed we need to merge those at the correct
+ // position into the GetPagesToPrint vector and build and maintain the
+ // GetValidStartFrames vector as well.
+ // Since inserting a larger number of entries in the middle of a vector
+ // isn't that efficient we will create new vectors by copying the required data
+ std::vector< sal_Int32 > aTmpPagesToPrint;
+ std::vector< const SwPageFrm * > aTmpPostItStartFrames;
+ const size_t nNum = rData.GetPagesToPrint().size();
+ for (size_t i = 0 ; i < nNum; ++i)
+ {
+ // add the physical page to print from the document
+ const sal_Int32 nPhysPage = rData.GetPagesToPrint()[i];
+ aTmpPagesToPrint.push_back( nPhysPage );
+ aTmpPostItStartFrames.push_back( NULL );
+
+ // add the post-it document pages to print, i.e those
+ // post-it pages that have the data for the above physical page
+ const std::vector< const SwPageFrm * > &rPostItFrames = aPhysPageToPostItFrames[ nPhysPage ];
+ const size_t nPostItFrames = rPostItFrames.size();
+ for (size_t k = 0; k < nPostItFrames; ++k)
+ {
+ aTmpPagesToPrint.push_back( 0 );
+ aTmpPostItStartFrames.push_back( rPostItFrames[k] );
+ }
+ }
+
+ // finally we need to assign those vectors to the resulting ones.
+ // swapping the data should be more efficient than assigning since
+ // we won't need the temporary vectors anymore
+ rData.GetPagesToPrint().swap( aTmpPagesToPrint );
+ rData.GetPostItStartFrames().swap( aTmpPostItStartFrames );
+ }
+ }
+}
+
+
+void SwDoc::CalculatePagePairsForProspectPrinting(
+ /* out */ SwRenderData &rData,
+ const SwPrintUIOptions &rOptions,
+ sal_Int32 nDocPageCount )
+{
+ std::set< sal_Int32 > &rValidPagesSet = rData.GetValidPagesSet();
+ std::map< sal_Int32, const SwPageFrm * > &rValidStartFrms = rData.GetValidStartFrames();
+ std::vector< std::pair< sal_Int32, sal_Int32 > > &rPagePairs = rData.GetPagePairsForProspectPrinting();
+
+ rPagePairs.clear();
+ rValidPagesSet.clear();
+ rValidStartFrms.clear();
+
+ rtl::OUString aPageRange = rOptions.getStringValue( "PageRange", rtl::OUString() );
+ StringRangeEnumerator aRange( aPageRange, 1, nDocPageCount, 0 );
+
+ DBG_ASSERT( pLayout, "no layout present" );
+ if (!pLayout || aRange.size() <= 0)
+ return;
+
+ const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
+ sal_Int32 i = 0;
+ for ( i = 1; pStPage && i < nDocPageCount; ++i )
+ pStPage = (SwPageFrm*)pStPage->GetNext();
+ if ( !pStPage ) // dann wars das
+ return;
+
+ // currently for prospect printing all pages are valid to be printed
+ // thus we add them all to the respective map and set for later use
+ sal_Int32 nPageNum = 0;
+ const SwPageFrm *pPageFrm = (SwPageFrm*)pLayout->Lower();
+ while( pPageFrm && nPageNum < nDocPageCount )
+ {
+ DBG_ASSERT( pPageFrm, "Empty page frame. How are we going to print this?" );
+ ++nPageNum;
+ rValidPagesSet.insert( nPageNum );
+ rValidStartFrms[ nPageNum ] = pPageFrm;
+ pPageFrm = (SwPageFrm*)pPageFrm->GetNext();
+ }
+ DBG_ASSERT( nPageNum == nDocPageCount, "unexpected number of pages" );
+
+ // properties to take into account when calcualting the set of pages
+ // Note: here bPrintLeftPages and bPrintRightPages refer to the (virtual) resulting pages
+ // of the prospect!
+ bool bPrintLeftPages = rOptions.IsPrintLeftPages();
+ bool bPrintRightPages = rOptions.IsPrintRightPages();
+ bool bPrintProspectRTL = rOptions.getIntValue( "PrintProspectRTL", 0 ) ? true : false;
+
+ // get pages for prospect printing according to the 'PageRange'
+ // (duplicates and any order allowed!)
+ std::vector< sal_Int32 > aPagesToPrint;
+ StringRangeEnumerator::getRangesFromString(
+ aPageRange, aPagesToPrint, 1, nDocPageCount, 0 );
+
+ // now fill the vector for calculating the page pairs with the start frames
+ // from the above obtained vector
+ std::vector< const SwPageFrm * > aVec;
+ for ( i = 0; i < sal_Int32(aPagesToPrint.size()); ++i)
+ {
+ const sal_Int32 nPage = aPagesToPrint[i];
+ const SwPageFrm *pFrm = rValidStartFrms[ nPage ];
+ aVec.push_back( pFrm );
+ }
+
+ // just one page is special ...
+ if ( 1 == aVec.size() )
+ aVec.insert( aVec.begin() + 1, 0 ); // insert a second empty page
+ else
+ {
+ // now extend the number of pages to fit a multiple of 4
+ // (4 'normal' pages are needed for a single prospect paper
+ // with back and front)
+ while( aVec.size() & 3 )
+ aVec.push_back( 0 );
+ }
+
+ // dann sorge mal dafuer, das alle Seiten in der richtigen
+ // Reihenfolge stehen:
+ USHORT nSPg = 0, nEPg = aVec.size(), nStep = 1;
+ if ( 0 == (nEPg & 1 )) // ungerade gibt es nicht!
+ --nEPg;
+
+ if ( !bPrintLeftPages )
+ ++nStep;
+ else if ( !bPrintRightPages )
+ {
+ ++nStep;
+ ++nSPg, --nEPg;
+ }
+
+ // the number of 'virtual' pages to be printed
+ sal_Int32 nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
+
+ for ( USHORT nPrintCount = 0; nSPg < nEPg &&
+ nPrintCount < nCntPage; ++nPrintCount )
+ {
+ pStPage = aVec[ nSPg ];
+ const SwPageFrm* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] : 0;
+
+ short nRtlOfs = bPrintProspectRTL ? 1 : 0;
+ if ( 0 == (( nSPg + nRtlOfs) & 1 ) ) // switch for odd number in LTR, even number in RTL
+ {
+ const SwPageFrm* pTmp = pStPage;
+ pStPage = pNxtPage;
+ pNxtPage = pTmp;
+ }
+
+ sal_Int32 nFirst = -1, nSecond = -1;
+ for ( int nC = 0; nC < 2; ++nC )
+ {
+ sal_Int32 nPage = -1;
+ if ( pStPage )
+ nPage = pStPage->GetPhyPageNum();
+ if (nC == 0)
+ nFirst = nPage;
+ else
+ nSecond = nPage;
+
+ pStPage = pNxtPage;
+ }
+ rPagePairs.push_back( std::pair< sal_Int32, sal_Int32 >(nFirst, nSecond) );
+
+ nSPg = nSPg + nStep;
+ nEPg = nEPg - nStep;
+ }
+ DBG_ASSERT( size_t(nCntPage) == rPagePairs.size(), "size mismatch for number of page pairs" );
+
+ // luckily prospect printing does not make use of post-its so far,
+ // thus we are done here.
+}
+
+
sal_uInt16 SwDoc::GetPageCount() const
{
return GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 0aff3b40fc8a..70b39376b857 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -39,6 +39,7 @@
#include "svx/frmdiritem.hxx"
#include <tools/urlobj.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/printer.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
#include <fmtfsize.hxx>
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 57d017bd050e..c4eb79d5a31a 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -46,6 +46,7 @@
#include <sfx2/printer.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/frame.hxx>
+#include <sfx2/viewfrm.hxx>
#include <svl/macitem.hxx>
#include <svx/svxids.hrc>
@@ -169,15 +170,33 @@ SV_IMPL_PTRARR( SwGrfFmtColls, SwGrfFmtCollPtr)
void StartGrammarChecking( SwDoc &rDoc )
{
- uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( rDoc.GetGCIterator() );
- if ( xGCIterator.is() )
+ // check for a visible view
+ bool bVisible = false;
+ const SwDocShell *pDocShell = rDoc.GetDocShell();
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False );
+ while (pFrame && !bVisible)
{
- uno::Reference< lang::XComponent > xDoc( rDoc.GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
- uno::Reference< text::XFlatParagraphIteratorProvider > xFPIP( xDoc, uno::UNO_QUERY );
+ if (pFrame->IsVisible())
+ bVisible = true;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False );
+ }
- // start automatic background checking if not active already
- if ( xFPIP.is() && !xGCIterator->isProofreading( xDoc ) )
- xGCIterator->startProofreading( xDoc, xFPIP );
+ //!! only documents with visible views need to be checked
+ //!! (E.g. don't check temporary documents created for printing, see printing of notes and selections.
+ //!! Those get created on the fly and get hard deleted a bit later as well, and no one should have
+ //!! a uno reference to them)
+ if (bVisible)
+ {
+ uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( rDoc.GetGCIterator() );
+ if ( xGCIterator.is() )
+ {
+ uno::Reference< lang::XComponent > xDoc( rDoc.GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
+ uno::Reference< text::XFlatParagraphIteratorProvider > xFPIP( xDoc, uno::UNO_QUERY );
+
+ // start automatic background checking if not active already
+ if ( xFPIP.is() && !xGCIterator->isProofreading( xDoc ) )
+ xGCIterator->startProofreading( xDoc, xFPIP );
+ }
}
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 54139e06c340..460374578cf0 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -269,7 +269,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
*************************************************************************/
-void SwNoTxtFrm::Paint( const SwRect &rRect ) const
+void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
{
if ( Frm().IsEmpty() )
return;
@@ -804,27 +804,27 @@ void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, Out
{
if(!pOut)
return;
- Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() );
- Rectangle aNewPxRect( aPxRect );
- while( aNewPxRect.Left() < aPxRect.Left() )
- {
- rAlignedGrfArea.Left( rAlignedGrfArea.Left()+1 );
- aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
- }
- while( aNewPxRect.Top() < aPxRect.Top() )
- {
- rAlignedGrfArea.Top( rAlignedGrfArea.Top()+1 );
- aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
- }
- while( aNewPxRect.Bottom() > aPxRect.Bottom() )
- {
- rAlignedGrfArea.Bottom( rAlignedGrfArea.Bottom()-1 );
- aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
- }
- while( aNewPxRect.Right() > aPxRect.Right() )
- {
- rAlignedGrfArea.Right( rAlignedGrfArea.Right()-1 );
- aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
+ Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() );
+ Rectangle aNewPxRect( aPxRect );
+ while( aNewPxRect.Left() < aPxRect.Left() )
+ {
+ rAlignedGrfArea.Left( rAlignedGrfArea.Left()+1 );
+ aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
+ }
+ while( aNewPxRect.Top() < aPxRect.Top() )
+ {
+ rAlignedGrfArea.Top( rAlignedGrfArea.Top()+1 );
+ aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
+ }
+ while( aNewPxRect.Bottom() > aPxRect.Bottom() )
+ {
+ rAlignedGrfArea.Bottom( rAlignedGrfArea.Bottom()-1 );
+ aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
+ }
+ while( aNewPxRect.Right() > aPxRect.Right() )
+ {
+ rAlignedGrfArea.Right( rAlignedGrfArea.Right()-1 );
+ aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
}
}
@@ -861,13 +861,13 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
::SwAlignGrfRect( &aAlignedGrfArea, *pOut );
}
else //if( bIsChart )
- {
- //#i78025# charts own borders are not completely visible
- //the above pixel correction is not correct - at least not for charts
- //so a different pixel correction is choosen here
- //this might be a good idea for all other OLE objects also,
- //but as I cannot oversee the consequences I fix it only for charts for now
- lcl_correctlyAlignRect( aAlignedGrfArea, rGrfArea, pOut );
+ {
+ //#i78025# charts own borders are not completely visible
+ //the above pixel correction is not correct - at least not for charts
+ //so a different pixel correction is choosen here
+ //this might be a good idea for all other OLE objects also,
+ //but as I cannot oversee the consequences I fix it only for charts for now
+ lcl_correctlyAlignRect( aAlignedGrfArea, rGrfArea, pOut );
}
if( pGrfNd )
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 7c6b991be535..642ca2ed2fdc 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -96,6 +96,10 @@ SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const String& rNam, const SwDBData&
sName += GetColumnName();
}
//------------------------------------------------------------------------------
+SwDBFieldType::~SwDBFieldType()
+{
+}
+//------------------------------------------------------------------------------
SwFieldType* SwDBFieldType::Copy() const
{
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index c4241a33c798..e1542a2d7141 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1368,7 +1368,8 @@ BOOL SwDocInfoField::PutValue( const uno::Any& rAny, USHORT nWhichId )
SwHiddenTxtFieldType::SwHiddenTxtFieldType( sal_Bool bSetHidden )
: SwFieldType( RES_HIDDENTXTFLD ), bHidden( bSetHidden )
-{}
+{
+}
SwFieldType* SwHiddenTxtFieldType::Copy() const
{
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index c8bbc7be70c6..0825ccc2dfd7 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -51,7 +51,7 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
const SwTableBox *GetTabBox() const { return pTabBox; }
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 4e3c196814c6..65dc532f4667 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -161,7 +161,7 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual Size ChgSize( const Size& aNewSize );
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index c9bbb72693ce..aa56e2db55d9 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -56,6 +56,7 @@ class SvxBrushItem;
class SwSelectionList;
struct SwPosition;
struct SwCrsrMoveState;
+class SwPrtOptions;
// --> OD 2004-07-06 #i28701#
class SwSortedObjs;
@@ -828,7 +829,7 @@ public:
SwCrsrMoveState* = 0 ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
// der "kurze Dienstweg" zwischen den Frames und der Formatierung.
// Wer den void* falsch Casted ist selbst schuld!
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 76262d18a894..e3ee5edf60c1 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -108,7 +108,7 @@ public:
SwLayoutFrm( SwFrmFmt* );
~SwLayoutFrm();
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
const SwFrm *Lower() const { return pLower; }
SwFrm *Lower() { return pLower; }
const SwCntntFrm *ContainsCntnt() const;
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 81d63e733f9c..ff739b530758 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -59,7 +59,7 @@ public:
~SwNoTxtFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint(const SwRect& ) const;
+ virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const;
BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint,
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index be5b8acd22da..fd7f97dcb5b3 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -200,7 +200,7 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
#ifdef DBG_UTIL
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index b41ba4214aa0..bbd2931d7839 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -132,7 +132,7 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual BOOL GetInfo( SfxPoolItem &rHnt ) const;
- virtual void Paint( const SwRect& ) const;
+ virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
virtual void Cut();
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 79cd2a1a574c..dc91b188e439 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -296,7 +296,7 @@ public:
void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
SwRect Paint();
- virtual void Paint( const SwRect & ) const;
+ virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index eba323bd52a2..026b293a827c 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -57,6 +57,7 @@ struct SdrPaintProcRec;
class SwAccessibleMap;
class SdrObject;
class Fraction;
+class SwPrtOptions;
// OD 12.12.2002 #103492#
class SwPagePreviewLayout;
// OD 15.01.2003 #103492#
@@ -270,10 +271,11 @@ public:
// direction at the outliner of the draw view for painting layers <hell>
// and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
- void PaintLayer ( const SdrLayerID _nLayerID,
- const SwRect& _rRect,
- const Color* _pPageBackgrdColor = 0,
- const bool _bIsPageRightToLeft = false ) const;
+ void PaintLayer( const SdrLayerID _nLayerID,
+ const SwPrtOptions *pPrintData,
+ const SwRect& _rRect,
+ const Color* _pPageBackgrdColor = 0,
+ const bool _bIsPageRightToLeft = false ) const;
//wird als Link an die DrawEngine uebergeben, entscheidet was wie
//gepaintet wird oder nicht.
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a52423e24bc1..96e775b93d7c 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2740,7 +2740,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|*
|*************************************************************************/
-void SwRootFrm::Paint( const SwRect& rRect ) const
+void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
@@ -2939,7 +2939,7 @@ void SwRootFrm::Paint( const SwRect& rRect ) const
// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
- pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), aPaintRect,
+ pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), pPrintData, aPaintRect,
&aPageBackgrdColor, (pPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( pSh->GetOut() );
pLines->LockLines( FALSE );
@@ -2972,7 +2972,7 @@ void SwRootFrm::Paint( const SwRect& rRect ) const
{
/// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
- pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), aPaintRect,
+ pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(), pPrintData, aPaintRect,
&aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false) );
}
@@ -3190,7 +3190,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint( const SwRect& rRect ) const
+void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
{
ViewShell *pSh = GetShell();
@@ -3478,7 +3478,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
/*************************************************************************
|* SwCellFrm::Paint( const SwRect& ) const
|*************************************************************************/
-void SwCellFrm::Paint( const SwRect& rRect ) const
+void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
{
if ( GetLayoutRowSpan() >= 1 )
SwLayoutFrm::Paint( rRect );
@@ -3497,7 +3497,7 @@ void SwCellFrm::Paint( const SwRect& rRect ) const
void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay,
const SwRect &rRect, const SwPageFrm *pPage );
-void SwFlyFrm::Paint( const SwRect& rRect ) const
+void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
{
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
@@ -3732,7 +3732,7 @@ void SwFlyFrm::Paint( const SwRect& rRect ) const
|*
|*************************************************************************/
-void SwTabFrm::Paint( const SwRect& rRect ) const
+void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
{
if ( pGlobalShell->GetViewOptions()->IsTable() )
{
@@ -6438,10 +6438,10 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
- pSh->Imp()->PaintLayer( pIDDMA->GetHellId(),
+ pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), 0,
aRetouchePart, &aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false) );
- pSh->Imp()->PaintLayer( pIDDMA->GetHeavenId(),
+ pSh->Imp()->PaintLayer( pIDDMA->GetHeavenId(), 0,
aRetouchePart, &aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false) );
}
@@ -6691,14 +6691,14 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
// OD 30.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
- pImp->PaintLayer( pIDDMA->GetHellId(), aOut, &aPageBackgrdColor,
+ pImp->PaintLayer( pIDDMA->GetHellId(), 0, aOut, &aPageBackgrdColor,
(pFlyPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( &aDev );
if ( pFly->IsFlyInCntFrm() )
pFly->Paint( aOut );
pLines->PaintLines( &aDev );
/// OD 30.08.2002 #102450# - add 3rd parameter
- pImp->PaintLayer( pIDDMA->GetHeavenId(), aOut, &aPageBackgrdColor,
+ pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor,
(pFlyPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( &aDev );
DELETEZ( pLines );
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index 994a4d9ce625..bbbf10a0901f 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -44,7 +44,7 @@ void SwFrm::Format( const SwBorderAttrs * )
ASSERT( FALSE, "Format() der Basisklasse gerufen." );
}
-void SwFrm::Paint(const SwRect &) const
+void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const
{
ASSERT( FALSE, "Paint() der Basisklasse gerufen." );
}
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 4bf0ba0860a5..c6f6dd43e64d 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -101,6 +101,11 @@ SwFrm::SwFrm( SwModify *pMod ) :
pNext( 0 ),
pPrev( 0 ),
pDrawObjs( 0 )
+ , bInfBody( FALSE )
+ , bInfTab ( FALSE )
+ , bInfFly ( FALSE )
+ , bInfFtn ( FALSE )
+ , bInfSct ( FALSE )
{
#ifdef DBG_UTIL
bFlag01 = bFlag02 = bFlag03 = bFlag04 = bFlag05 = 0;
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 05c142e1fd84..684db7afe4aa 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -600,7 +600,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
* SwTxtFrm::Paint()
*************************************************************************/
-void SwTxtFrm::Paint( const SwRect &rRect ) const
+void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
{
ResetRepaint();
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 22f454033929..34980ee0dba0 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -101,6 +101,7 @@ void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *p
pMulti = NULL;
bOnceMore = sal_False;
+ bFlyInCntBase = sal_False;
bChanges = sal_False;
bTruncLines = sal_False;
nCntEndHyph = 0;
@@ -2106,7 +2107,10 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos )
{
// Only if hidden text should not be shown:
- if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
+// if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
+ const bool bShowInDocView = rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar();
+ const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( TRUE ) && rInf.GetOpt().IsPrinting();
+ if (bShowInDocView || bShowForPrinting)
return false;
const SwScriptInfo& rSI = rInf.GetParaPortion()->GetScriptInfo();
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index a0b859cf0e12..fe39264e416b 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -219,6 +219,7 @@ SwArrowPortion::SwArrowPortion( const SwTxtPaintInfo &rInf )
rInf.GetTxtFrm()->Prt().Right();
aPos.Y() = rInf.GetTxtFrm()->Frm().Top() +
rInf.GetTxtFrm()->Prt().Bottom();
+ SetWhichPor( POR_ARROW );
}
void SwArrowPortion::Paint( const SwTxtPaintInfo &rInf ) const
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 4f1b2c1770e3..3a22c81daaab 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2737,12 +2737,14 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
rtl::OUString aHoriOrientPropStr( RTL_CONSTASCII_USTRINGPARAM("HoriOrient") );
uno::Any aHoriOrient( getPropertyValue( aHoriOrientPropStr ) );
sal_Int16 eHoriOrient;
- aHoriOrient >>= eHoriOrient;
- if ( eHoriOrient != text::HoriOrientation::NONE )
+ if (aHoriOrient >>= eHoriOrient) // may be void
{
- eHoriOrient = text::HoriOrientation::NONE;
- aHoriOrient <<= eHoriOrient;
- setPropertyValue( aHoriOrientPropStr, aHoriOrient );
+ if ( eHoriOrient != text::HoriOrientation::NONE )
+ {
+ eHoriOrient = text::HoriOrientation::NONE;
+ aHoriOrient <<= eHoriOrient;
+ setPropertyValue( aHoriOrientPropStr, aHoriOrient );
+ }
}
// set x-position attribute
aHoriPos <<= _aPosition.X;
@@ -2765,12 +2767,14 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
rtl::OUString aVertOrientPropStr( RTL_CONSTASCII_USTRINGPARAM("VertOrient") );
uno::Any aVertOrient( getPropertyValue( aVertOrientPropStr ) );
sal_Int16 eVertOrient;
- aVertOrient >>= eVertOrient;
- if ( eVertOrient != text::VertOrientation::NONE )
+ if (aVertOrient >>= eVertOrient) // may be void
{
- eVertOrient = text::VertOrientation::NONE;
- aVertOrient <<= eVertOrient;
- setPropertyValue( aVertOrientPropStr, aVertOrient );
+ if ( eVertOrient != text::VertOrientation::NONE )
+ {
+ eVertOrient = text::VertOrientation::NONE;
+ aVertOrient <<= eVertOrient;
+ setPropertyValue( aVertOrientPropStr, aVertOrient );
+ }
}
// set y-position attribute
aVertPos <<= _aPosition.Y;
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index da9800c9068a..1b692f36ad8d 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -57,6 +57,7 @@
#include "viewimp.hxx"
#include "dflyobj.hxx"
#include "viewopt.hxx"
+#include "swprtopt.hxx"
#include "dcontact.hxx"
#include "dview.hxx"
#include "flyfrm.hxx"
@@ -184,6 +185,7 @@ void SwViewImp::UnlockPaint()
// outliner of the draw view for painting layers <hell> and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
+ const SwPrtOptions * _pPrintData,
const SwRect& ,
const Color* _pPageBackgrdColor,
const bool _bIsPageRightToLeft ) const
@@ -230,6 +232,12 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
pOutDev->Push( PUSH_LINECOLOR ); // #114231#
+ if (_pPrintData)
+ {
+ // hide drawings but not form controls (form controls are handled elsewhere)
+ SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
+ rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() );
+ }
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index cad53470e95b..61594065c3db 100644..100755
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -31,9 +31,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <com/sun/star/uno/Sequence.hxx>
#include <hintids.hxx>
#include <vcl/window.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/progress.hxx>
#include <pvprtdat.hxx>
@@ -59,6 +61,10 @@
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
+
+using namespace ::com::sun::star;
+
+
// OD 12.12.2002 #103492#
SwPagePreviewLayout* ViewShell::PagePreviewLayout()
{
@@ -87,671 +93,173 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions
return;
}
-// output print preview on printer
-// OD 05.05.2003 #i14016# - consider empty pages on calculation of scaling
-// and on calculation of paint offset.
-void ViewShell::PrintPreViewPage( SwPrtOptions& rOptions,
- USHORT nRowCol, SfxProgress& rProgress,
- const SwPagePreViewPrtData* pPrtData )
-{
- if( !rOptions.aMulti.GetSelectCount() )
- return;
- // wenn kein Drucker vorhanden ist, wird nicht gedruckt
- SfxPrinter* pPrt = getIDocumentDeviceAccess()->getPrinter(false);
- if( !pPrt || !pPrt->GetName().Len() )
+// print brochure
+// OD 05.05.2003 #i14016# - consider empty pages on calculation of the scaling
+// for a page to be printed.
+void ViewShell::PrintProspect(
+ OutputDevice *pOutDev,
+ const SwPrintData &rPrintData,
+ sal_Int32 nRenderer // the index in the vector of prospect pages to be printed
+ )
+{
+ const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagePairsForProspectPrinting().size() - 1;
+#if OSL_DEBUG_LEVEL > 1
+ DBG_ASSERT( 0 <= nRenderer && nRenderer <= nMaxRenderer, "nRenderer out of bounds");
+#endif
+ Printer *pPrinter = dynamic_cast< Printer * >(pOutDev);
+ if (!pPrinter || nMaxRenderer < 0 || nRenderer < 0 || nRenderer > nMaxRenderer)
return;
-// schoen waers gewesen !!! const MultiSelection& rMulti = rOptions.aMulti;
- MultiSelection aMulti( rOptions.aMulti );
- Range aPages( aMulti.FirstSelected(), aMulti.LastSelected() );
- if ( aPages.Max() > USHRT_MAX )
- aPages.Max() = USHRT_MAX;
-
- ASSERT( aPages.Min() > 0,
- "Seite 0 Drucken?" );
- ASSERT( aPages.Min() <= aPages.Max(),
- "MinSeite groesser MaxSeite." );
+ // save settings of OutputDevice (should be done always since the
+ // output device is now provided by a call from outside the Writer)
+ pPrinter->Push();
+
+ std::pair< sal_Int32, sal_Int32 > rPagesToPrint =
+ rPrintData.GetRenderData().GetPagePairsForProspectPrinting()[ nRenderer ];
+// const USHORT nPageMax = static_cast< USHORT >(rPagesToPrint.first > rPagesToPrint.second ?
+// rPagesToPrint.first : rPagesToPrint.second);
+#if OSL_DEBUG_LEVEL > 1
+ DBG_ASSERT( rPagesToPrint.first == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
+ DBG_ASSERT( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
+#endif
// eine neue Shell fuer den Printer erzeugen
- ViewShell aShell( *this, 0 );
- if ( &GetRefDev() == pPrt )
- aShell.mpTmpRef = new SfxPrinter( *pPrt );
+ ViewShell aShell( *this, 0, pPrinter );
SET_CURR_SHELL( &aShell );
- aShell.PrepareForPrint( rOptions );
+ aShell.PrepareForPrint( rPrintData );
- // gibt es versteckte Absatzfelder, unnoetig wenn die Absaetze bereits
- // ausgeblendet sind.
- int bHiddenFlds = FALSE;
- SwFieldType* pFldType = 0;
- if ( GetViewOptions()->IsShowHiddenPara() )
- {
- pFldType = getIDocumentFieldsAccess()->GetSysFldType( RES_HIDDENPARAFLD );
- bHiddenFlds = 0 != pFldType->GetDepends();
- if( bHiddenFlds )
- {
- SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
- pFldType->Modify( &aHnt, 0);
- }
- }
-
- // Seiten fuers Drucken formatieren
- aShell.CalcPagesForPrint( (USHORT)aPages.Max(), &rProgress );
+ //!! applying view options and formatting the dcoument should now only be done in getRendererCount!
- USHORT nCopyCnt = rOptions.bCollate ? rOptions.nCopyCount : 1;
- BOOL bStartJob = FALSE;
+ MapMode aMapMode( MAP_TWIP );
+ Size aPrtSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), aMapMode ) );
- const bool bPrintEmptyPages = rOptions.IsPrintEmptyPages();
+ SwTwips nMaxRowSz, nMaxColSz;
- for ( USHORT nCnt = 0; nCnt < nCopyCnt; nCnt++ )
+ const SwPageFrm *pStPage = 0;
+ const SwPageFrm *pNxtPage = 0;
+ const SwRenderData::ValidStartFramesMap_t &rFrms = rPrintData.GetRenderData().GetValidStartFrames();
+ if (rPagesToPrint.first > 0)
{
- if( rOptions.IsPrintSingleJobs() && rOptions.GetJobName().Len() &&
- ( bStartJob || rOptions.bJobStartet ) )
- {
- pPrt->EndJob();
- rOptions.bJobStartet = TRUE;
-
- // Reschedule statt Yield, da Yield keine Events abarbeitet
- // und es sonst eine Endlosschleife gibt.
- while( pPrt->IsPrinting() )
- rProgress.Reschedule();
-
- rOptions.MakeNextJobName();
- bStartJob = pPrt->StartJob( rOptions.GetJobName() );
- }
-
- const SwPageFrm *pStPage = (SwPageFrm*)GetLayout()->Lower();
- const SwFrm *pEndPage = pStPage;
- USHORT i;
-
- for( i = 1; pStPage && i < (USHORT)aPages.Min(); ++i )
- pStPage = (SwPageFrm*)pStPage->GetNext();
-
- if( !pStPage ) // dann wars das
- {
- if( bHiddenFlds )
- {
- SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
- pFldType->Modify( &aHnt, 0);
- CalcPagesForPrint( (USHORT)aPages.Max() );
- }
- return;
- }
-
- // unsere SttPage haben wir, dann die EndPage suchen
- USHORT nFirstPageNo = i;
- USHORT nLastPageNo = i;
- USHORT nPageNo = 1;
-
- pEndPage = pStPage;
-
- if( pStPage->GetNext() && (i != (USHORT)aPages.Max()) )
- {
- pEndPage = pEndPage->GetNext();
- for( ++i,++nLastPageNo;
- pEndPage->GetNext() && i < (USHORT)aPages.Max(); ++i )
- {
- pEndPage = pEndPage->GetNext();
- ++nLastPageNo;
- }
- }
+ SwRenderData::ValidStartFramesMap_t::const_iterator aIt( rFrms.find( rPagesToPrint.first ) );
+ DBG_ASSERT( aIt != rFrms.end(), "failed to find start frame" );
+ pStPage = aIt->second;
+ }
+ if (rPagesToPrint.second > 0)
+ {
+ SwRenderData::ValidStartFramesMap_t::const_iterator aIt( rFrms.find( rPagesToPrint.second ) );
+ DBG_ASSERT( aIt != rFrms.end(), "failed to find start frame" );
+ pNxtPage = aIt->second;
+ }
- if( rOptions.bPrintReverse )
+ // OD 05.05.2003 #i14016# - consider empty pages on calculation
+ // of page size, used for calculation of scaling.
+ Size aSttPageSize;
+ if ( pStPage )
+ {
+ if ( pStPage->IsEmptyPage() )
{
- const SwFrm *pTmp = pStPage;
- pStPage = (SwPageFrm*)pEndPage;
- pEndPage = pTmp;
- nPageNo = nLastPageNo;
+ if ( pStPage->GetPhyPageNum() % 2 == 0 )
+ aSttPageSize = pStPage->GetPrev()->Frm().SSize();
+ else
+ aSttPageSize = pStPage->GetNext()->Frm().SSize();
}
else
- nPageNo = nFirstPageNo;
-
- // ein Array fuer die Seiten anlegen, die auf eine Drucker-Seite
- // gedruckt werden sollen.
- BYTE nRow = BYTE(nRowCol >> 8), nCol = BYTE(nRowCol & 0xff);
- USHORT nPages = nRow * nCol;
- SwPageFrm** aPageArr = new SwPageFrm* [ nPages ];
- memset( aPageArr, 0, sizeof( SwPageFrm* ) * nPages );
- USHORT nCntPage = 0;
-
- SwTwips nCalcW = 0, nCalcH = 0, nMaxRowSz = 0, nMaxColSz = 0;
-
- MapMode aOld( pPrt->GetMapMode() );
- MapMode aMapMode( MAP_TWIP );
- Size aPrtSize( pPrt->PixelToLogic( pPrt->GetPaperSizePixel(), aMapMode ));
- if( pPrtData )
{
- aPrtSize.Width() -= pPrtData->GetLeftSpace() +
- pPrtData->GetRightSpace() +
- ( pPrtData->GetHorzSpace() * (nCol - 1));
- aPrtSize.Height() -= pPrtData->GetTopSpace() +
- pPrtData->GetBottomSpace() +
- ( pPrtData->GetVertSpace() * (nRow - 1));
+ aSttPageSize = pStPage->Frm().SSize();
}
-
- aMulti.Select( Range( nLastPageNo+1, USHRT_MAX ), FALSE );
- USHORT nSelCount = USHORT((aMulti.GetSelectCount()+nPages-1) / nPages);
- nSelCount = nSelCount * nCopyCnt;
- USHORT nPrintCount = 1;
-
- const XubString aTmp( SW_RES( STR_STATSTR_PRINT ) );
- rProgress.SetText( aTmp );
- //HACK, damit die Anzeige nicht durcheinander kommt:
- rProgress.SetState( 1, nSelCount );
- rProgress.SetText( aTmp );
- bStartJob = TRUE;
-
- while( pStPage )
+ }
+ Size aNxtPageSize;
+ if ( pNxtPage )
+ {
+ if ( pNxtPage->IsEmptyPage() )
{
- // Mag der Anwender noch ?
- rProgress.Reschedule();
-
- if ( !pPrt->IsJobActive() )
- break;
-
- // --> FME 2005-12-12 #b6354161# Feature - Print empty pages
- // --> OD 2007-10-22 #i79738# - correct condition:
- // always consider, if page is selected for print.
- if( aMulti.IsSelected( nPageNo ) &&
- ( bPrintEmptyPages || !pStPage->IsEmptyPage() ) )
- // <--
- {
- if( rOptions.bPrintReverse )
- aPageArr[ nPages - ++nCntPage ] = (SwPageFrm*)pStPage;
- else
- aPageArr[ nCntPage++ ] = (SwPageFrm*)pStPage;
-
- // OD 05.05.2003 #i14016# - consider empty pages on calculation
- // of page size, used for calculation of scaling.
- Size aPageSize;
- if ( pStPage->IsEmptyPage() )
- {
- if ( pStPage->GetPhyPageNum() % 2 == 0 )
- aPageSize = pStPage->GetPrev()->Frm().SSize();
- else
- aPageSize = pStPage->GetNext()->Frm().SSize();
- }
- else
- {
- aPageSize = pStPage->Frm().SSize();
- }
- nCalcW += aPageSize.Width();
- if( nCalcH < aPageSize.Height() )
- nCalcH = aPageSize.Height();
-
- if( 0 == (nCntPage % nCol ) || // neue Zeile
- nCntPage == nPages || pStPage == pEndPage )
- {
- // sollte die Seite nicht gefuellt sein, so erweiter
- // anhand der letzen Seite. Dadurch hat auch die
- // letze Seite die richtigen Spalten/Reihen.
- // BUG: 17695
- if( pStPage == pEndPage && nCntPage != nPages )
- {
- // dann Werte mit der letzen Seite auffuellen
- if( nCntPage < nCol )
- nCalcW += aPageSize.Width() * (nCol - nCntPage);
-
- BYTE nRows = (BYTE) ( nCntPage / nCol + 1 );
- if( nRows < nRow )
- nCalcH += ( nRow - nRows ) * nCalcH;
- }
-
- if( nMaxColSz < nCalcW )
- nMaxColSz = nCalcW;
- nCalcW = 0;
- nMaxRowSz += nCalcH;
- }
-
- if( nCntPage == nPages || pStPage == pEndPage )
- {
- // den MapMode einstellen
- aMapMode.SetOrigin( Point() );
- {
- Fraction aScX( aPrtSize.Width(), nMaxColSz );
- Fraction aScY( aPrtSize.Height(), nMaxRowSz );
-
- {
- if( aScX < aScY )
- aScY = aScX;
-
- // fuer Drawing, damit diese ihre Objecte vernuenftig Painten
- // koennen, auf "glatte" Prozentwerte setzen
- aScY *= Fraction( 1000, 1 );
- long nTmp = (long)aScY;
- if( 1 < nTmp )
- --nTmp;
- else
- nTmp = 1;
- aScY = Fraction( nTmp, 1000 );
- aScX = aScY;
- }
-
- aMapMode.SetScaleY( aScY );
- aMapMode.SetScaleX( aScX );
- }
-
- Point aPrtOff( pPrt->PixelToLogic(
- pPrt->GetPageOffsetPixel(), aMapMode ) );
- long nPageHeight = (nMaxRowSz / nRow);
-
- // dann kann das drucken losgehen
- rProgress.SetState( nPrintCount++, nSelCount );
-
- pPrt->StartPage();
- Point aCalcPt;
- SwPageFrm** ppTmpPg = aPageArr;
-
- // ist das Array nicht vollsteandig gefuellt ?
- if( rOptions.bPrintReverse && nCntPage != nPages )
- {
- // beim Rueckwaertsdruck alle Seiten nach vorne
- // verschieben!
- memmove( ppTmpPg, ppTmpPg + (nPages - nCntPage),
- nCntPage * sizeof( SwPageFrm*) );
- aPageArr[ nCntPage ] = 0; // Endekennung
- }
-
- long nHOffs = 0, nVOffs = 0, nXStt = 0;
- if( pPrtData )
- {
- const Fraction& rScaleX = aMapMode.GetScaleX();
- const Fraction& rScaleY = aMapMode.GetScaleY();
- Fraction aF( pPrtData->GetTopSpace(), 1 );
- aCalcPt.Y() = aF /= rScaleY;
- aF = Fraction( pPrtData->GetLeftSpace(), 1 );
- nXStt = aF /= rScaleX;
- aF = Fraction( pPrtData->GetVertSpace(), 1 );
- nVOffs = aF /= rScaleY;
- aF = Fraction( pPrtData->GetHorzSpace(), 1 );
- nHOffs = aF /= rScaleX;
- }
-
- for( BYTE nR = 0; *ppTmpPg && nR < nRow; ++nR )
- {
- aCalcPt.X() = nXStt;
- for( BYTE nC = 0; *ppTmpPg && nC < nCol; ++nC )
- {
- aShell.Imp()->SetFirstVisPageInvalid();
- aShell.aVisArea = (*ppTmpPg)->Frm();
-
- Point aPos( aCalcPt );
- aPos -= aShell.aVisArea.Pos();
- aPos -= aPrtOff;
- aMapMode.SetOrigin( aPos );
- pPrt->SetMapMode( aMapMode );
- (*ppTmpPg)->GetUpper()->Paint( (*ppTmpPg)->Frm() );
- // OD 05.05.2003 #i14016# - consider empty pages
- // on calculation of the paint offset for the next page.
- aCalcPt.X() += nHOffs;
- if ( (*ppTmpPg)->IsEmptyPage() )
- {
- if ( (*ppTmpPg)->GetPhyPageNum() % 2 == 0 )
- aCalcPt.X() += (*ppTmpPg)->GetPrev()->Frm().SSize().Width();
- else
- aCalcPt.X() += (*ppTmpPg)->GetNext()->Frm().SSize().Width();
- }
- else
- {
- aCalcPt.X() += (*ppTmpPg)->Frm().Width();
- }
- ++ppTmpPg;
- }
- aCalcPt.Y() += nVOffs + nPageHeight;
- }
- pPrt->EndPage();
- SwPaintQueue::Repaint();
-
- memset( aPageArr, 0, sizeof( SwPageFrm* ) * nPages );
- nCntPage = 0;
- nMaxRowSz = nMaxColSz = nCalcH = nCalcW = 0;
- }
- }
-
- if( pStPage == pEndPage )
- pStPage = 0;
- else if( rOptions.bPrintReverse )
- {
- --nPageNo;
- pStPage = (SwPageFrm*)pStPage->GetPrev();
- }
+ if ( pNxtPage->GetPhyPageNum() % 2 == 0 )
+ aNxtPageSize = pNxtPage->GetPrev()->Frm().SSize();
else
- {
- ++nPageNo;
- pStPage = (SwPageFrm*)pStPage->GetNext();
- }
+ aNxtPageSize = pNxtPage->GetNext()->Frm().SSize();
}
- pPrt->SetMapMode( aOld );
-
- if( bHiddenFlds )
+ else
{
- SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
- pFldType->Modify( &aHnt, 0);
- CalcPagesForPrint( (USHORT)aPages.Max() );
+ aNxtPageSize = pNxtPage->Frm().SSize();
}
- delete[] aPageArr;
-
- if( bStartJob )
- rOptions.bJobStartet = TRUE;
}
- pFntCache->Flush();
-}
-// print brochure
-// OD 05.05.2003 #i14016# - consider empty pages on calculation of the scaling
-// for a page to be printed.
-void ViewShell::PrintProspect( SwPrtOptions& rOptions,
- SfxProgress& rProgress , BOOL bRTL)
-{
- if( !rOptions.aMulti.GetSelectCount() )
- return;
-
- // wenn kein Drucker vorhanden ist, wird nicht gedruckt
- SfxPrinter* pPrt = getIDocumentDeviceAccess()->getPrinter(false);
- if( !pPrt || !pPrt->GetName().Len() ||
- ( !rOptions.bPrintLeftPage && !rOptions.bPrintRightPage ))
- return;
-
- MultiSelection aMulti( rOptions.aMulti );
- Range aPages( aMulti.FirstSelected(), aMulti.LastSelected() );
- if ( aPages.Max() > USHRT_MAX )
- aPages.Max() = USHRT_MAX;
-
- ASSERT( aPages.Min() > 0,
- "Seite 0 Drucken?" );
- ASSERT( aPages.Min() <= aPages.Max(),
- "MinSeite groesser MaxSeite." );
-
- // eine neue Shell fuer den Printer erzeugen
- ViewShell aShell( *this, 0 );
- if ( &GetRefDev() == pPrt )
- aShell.mpTmpRef = new SfxPrinter( *pPrt );
-
- SET_CURR_SHELL( &aShell );
-
- aShell.PrepareForPrint( rOptions );
-
- // gibt es versteckte Absatzfelder, unnoetig wenn die Absaetze bereits
- // ausgeblendet sind.
- int bHiddenFlds = FALSE;
- SwFieldType* pFldType = 0;
- if ( GetViewOptions()->IsShowHiddenPara() )
+ if( !pStPage )
{
- pFldType = getIDocumentFieldsAccess()->GetSysFldType( RES_HIDDENPARAFLD );
- bHiddenFlds = 0 != pFldType->GetDepends();
- if( bHiddenFlds )
- {
- SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
- pFldType->Modify( &aHnt, 0);
- }
+ nMaxColSz = 2 * aNxtPageSize.Width();
+ nMaxRowSz = aNxtPageSize.Height();
}
-
- // Seiten fuers Drucken formatieren
- aShell.CalcPagesForPrint( (USHORT)aPages.Max(), &rProgress );
-
- USHORT nCopyCnt = rOptions.bCollate ? rOptions.nCopyCount : 1;
-
- const SwPageFrm *pStPage = (SwPageFrm*)GetLayout()->Lower();
- USHORT i;
-
- for( i = 1; pStPage && i < (USHORT)aPages.Min(); ++i )
- pStPage = (SwPageFrm*)pStPage->GetNext();
-
- if( !pStPage ) // dann wars das
+ else if( !pNxtPage )
{
- if( bHiddenFlds )
- {
- SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
- pFldType->Modify( &aHnt, 0);
- CalcPagesForPrint( (USHORT)aPages.Max() );
- }
- return;
+ nMaxColSz = 2 * aSttPageSize.Width();
+ nMaxRowSz = aSttPageSize.Height();
}
-
- // unsere SttPage haben wir, dann die EndPage suchen
- SvPtrarr aArr( 255, 255 );
- aArr.Insert( (void*)pStPage, aArr.Count() );
-
- while( pStPage->GetNext() && i < (USHORT)aPages.Max() )
+ else
{
- pStPage = (SwPageFrm*)pStPage->GetNext();
- if( aMulti.IsSelected( ++i ) )
- aArr.Insert( (void*)pStPage, aArr.Count() );
+ nMaxColSz = aNxtPageSize.Width() + aSttPageSize.Width();
+ nMaxRowSz = Max( aNxtPageSize.Height(), aSttPageSize.Height() );
}
- // auf Doppelseiten auffuellen
- if( 1 == aArr.Count() ) // eine Seite ist ein Sonderfall
- aArr.Insert( (void*)0, 1 );
- else
+ // den MapMode einstellen
+ aMapMode.SetOrigin( Point() );
{
- while( aArr.Count() & 3 )
- aArr.Insert( (void*)0, aArr.Count() );
+ Fraction aScX( aPrtSize.Width(), nMaxColSz );
+ Fraction aScY( aPrtSize.Height(), nMaxRowSz );
+ if( aScX < aScY )
+ aScY = aScX;
- if( rOptions.bPrintReverse && 4 < aArr.Count() )
{
- // das Array umsortieren
- // Array: 1 2 3 4 5 6 7 8
- // soll: 3 4 1 2 7 8 5 6
- // Algorhytmus:
- // vordere Haelfte: Austausch von 2 Pointer von Vorne vor die Haelfte
- // hintere Haelfte: Austausch von 2 Pointer von der Haelfte nach hinten
-
- USHORT nHalf = aArr.Count() / 2;
- USHORT nSwapCount = nHalf / 4;
-
- VoidPtr* ppArrStt = (VoidPtr*)aArr.GetData();
- VoidPtr* ppArrHalf = (VoidPtr*)aArr.GetData() + nHalf;
-
- for( int nLoop = 0; nLoop < 2; ++nLoop )
- {
- for( USHORT n = 0; n < nSwapCount; ++n )
- {
- void* pTmp = *ppArrStt;
- *ppArrStt++ = *(ppArrHalf-2);
- *(ppArrHalf-2) = pTmp;
-
- pTmp = *ppArrStt;
- *ppArrStt++ = *--ppArrHalf;
- *ppArrHalf-- = pTmp;
- }
- ppArrStt = (VoidPtr*)aArr.GetData() + nHalf;
- ppArrHalf = (VoidPtr*)aArr.GetData() + aArr.Count();
- }
+ // fuer Drawing, damit diese ihre Objecte vernuenftig Painten
+ // koennen, auf "glatte" Prozentwerte setzen
+ aScY *= Fraction( 1000, 1 );
+ long nTmp = (long)aScY;
+ if( 1 < nTmp )
+ --nTmp;
+ else
+ nTmp = 1;
+ aScY = Fraction( nTmp, 1000 );
}
+
+ aMapMode.SetScaleY( aScY );
+ aMapMode.SetScaleX( aScY );
}
- BOOL bStartJob = FALSE;
+ Size aTmpPrtSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), aMapMode ) );
- for( USHORT nCnt = 0; nCnt < nCopyCnt; nCnt++ )
+ // calculate start point for equal border on all sides
+ Point aSttPt( (aTmpPrtSize.Width() - nMaxColSz) / 2,
+ (aTmpPrtSize.Height() - nMaxRowSz) / 2 );
+ for( int nC = 0; nC < 2; ++nC )
{
- if( rOptions.IsPrintSingleJobs() && rOptions.GetJobName().Len() &&
- ( bStartJob || rOptions.bJobStartet ) )
+ if( pStPage )
{
- pPrt->EndJob();
- rOptions.bJobStartet = TRUE;
-
- // Reschedule statt Yield, da Yield keine Events abarbeitet
- // und es sonst eine Endlosschleife gibt.
- while( pPrt->IsPrinting() )
- rProgress.Reschedule();
-
- rOptions.MakeNextJobName();
- bStartJob = pPrt->StartJob( rOptions.GetJobName() );
+ aShell.Imp()->SetFirstVisPageInvalid();
+ aShell.aVisArea = pStPage->Frm();
+
+ Point aPos( aSttPt );
+ aPos -= aShell.aVisArea.Pos();
+// aPos -= aPrtOff;
+ aMapMode.SetOrigin( aPos );
+ pPrinter->SetMapMode( aMapMode );
+ pStPage->GetUpper()->Paint( pStPage->Frm() );
}
- // dann sorge mal dafuer, das alle Seiten in der richtigen
- // Reihenfolge stehen:
- USHORT nSPg = 0, nEPg = aArr.Count(), nStep = 1;
- if( 0 == (nEPg & 1 )) // ungerade gibt es nicht!
- --nEPg;
-
- if( !rOptions.bPrintLeftPage )
- ++nStep;
- else if( !rOptions.bPrintRightPage )
- {
- ++nStep;
- ++nSPg, --nEPg;
- }
+ pStPage = pNxtPage;
+ aSttPt.X() += aTmpPrtSize.Width() / 2;
+ }
- USHORT nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
+ SwPaintQueue::Repaint();
- MapMode aOld( pPrt->GetMapMode() );
- MapMode aMapMode( MAP_TWIP );
- Size aPrtSize( pPrt->PixelToLogic( pPrt->GetPaperSizePixel(), aMapMode ) );
+ //!! applying/modifying view options and formatting the dcoument should now only be done in getRendererCount!
- const XubString aTmp( SW_RES( STR_STATSTR_PRINT ) );
- rProgress.SetText( aTmp );
- //HACK, damit die Anzeige nicht durcheinander kommt:
- rProgress.SetState( 1, nCntPage );
- rProgress.SetText( aTmp );
+ pFntCache->Flush();
- for( USHORT nPrintCount = 0; nSPg < nEPg &&
- nPrintCount < nCntPage; ++nPrintCount )
- {
- // Mag der Anwender noch ?
- rProgress.Reschedule();
-
- if ( !pPrt->IsJobActive() )
- break;
-
- SwTwips nMaxRowSz, nMaxColSz;
- pStPage = (SwPageFrm*)aArr[ nSPg ];
- const SwPageFrm* pNxtPage = nEPg < aArr.Count()
- ? (SwPageFrm*)aArr[ nEPg ]
- : 0;
-
- // OD 05.05.2003 #i14016# - consider empty pages on calculation
- // of page size, used for calculation of scaling.
- Size aSttPageSize;
- if ( pStPage )
- {
- if ( pStPage->IsEmptyPage() )
- {
- if ( pStPage->GetPhyPageNum() % 2 == 0 )
- aSttPageSize = pStPage->GetPrev()->Frm().SSize();
- else
- aSttPageSize = pStPage->GetNext()->Frm().SSize();
- }
- else
- {
- aSttPageSize = pStPage->Frm().SSize();
- }
- }
- Size aNxtPageSize;
- if ( pNxtPage )
- {
- if ( pNxtPage->IsEmptyPage() )
- {
- if ( pNxtPage->GetPhyPageNum() % 2 == 0 )
- aNxtPageSize = pNxtPage->GetPrev()->Frm().SSize();
- else
- aNxtPageSize = pNxtPage->GetNext()->Frm().SSize();
- }
- else
- {
- aNxtPageSize = pNxtPage->Frm().SSize();
- }
- }
-
- if( !pStPage )
- {
- nMaxColSz = 2 * aNxtPageSize.Width();
- nMaxRowSz = aNxtPageSize.Height();
- }
- else if( !pNxtPage )
- {
- nMaxColSz = 2 * aSttPageSize.Width();
- nMaxRowSz = aSttPageSize.Height();
- }
- else
- {
- nMaxColSz = aNxtPageSize.Width() +
- aSttPageSize.Width();
- nMaxRowSz = Max( aNxtPageSize.Height(),
- aSttPageSize.Height() );
- }
-
- short nRtlOfs = bRTL ? 1 : 0;
- if( 0 == (( nSPg + nRtlOfs) & 1 ) ) // switch for odd number in LTR, even number in RTL
- {
- const SwPageFrm* pTmp = pStPage;
- pStPage = pNxtPage;
- pNxtPage = pTmp;
- }
-
- // den MapMode einstellen
- aMapMode.SetOrigin( Point() );
- {
- Fraction aScX( aPrtSize.Width(), nMaxColSz );
- Fraction aScY( aPrtSize.Height(), nMaxRowSz );
- if( aScX < aScY )
- aScY = aScX;
-
- {
- // fuer Drawing, damit diese ihre Objecte vernuenftig Painten
- // koennen, auf "glatte" Prozentwerte setzen
- aScY *= Fraction( 1000, 1 );
- long nTmp = (long)aScY;
- if( 1 < nTmp )
- --nTmp;
- else
- nTmp = 1;
- aScY = Fraction( nTmp, 1000 );
- }
-
- aMapMode.SetScaleY( aScY );
- aMapMode.SetScaleX( aScY );
- }
-
- Point aPrtOff( pPrt->PixelToLogic(
- pPrt->GetPageOffsetPixel(), aMapMode ) );
- Size aTmpPrtSize( pPrt->PixelToLogic(
- pPrt->GetPaperSizePixel(), aMapMode ) );
-
- // dann kann das drucken losgehen
- bStartJob = TRUE;
- rProgress.SetState( nPrintCount, nCntPage );
-
- pPrt->StartPage();
-
- Point aSttPt;
- for( int nC = 0; nC < 2; ++nC )
- {
- if( pStPage )
- {
- aShell.Imp()->SetFirstVisPageInvalid();
- aShell.aVisArea = pStPage->Frm();
-
- Point aPos( aSttPt );
- aPos -= aShell.aVisArea.Pos();
- aPos -= aPrtOff;
- aMapMode.SetOrigin( aPos );
- pPrt->SetMapMode( aMapMode );
- pStPage->GetUpper()->Paint( pStPage->Frm() );
- }
-
- pStPage = pNxtPage;
- aSttPt.X() += aTmpPrtSize.Width() / 2;
- }
-
- pPrt->EndPage();
- SwPaintQueue::Repaint();
- nSPg = nSPg + nStep;
- nEPg = nEPg - nStep;
- }
- pPrt->SetMapMode( aOld );
+ // restore settings of OutputDevice (should be done always now since the
+ // output device is now provided by a call from outside the Writer)
+ pPrinter->Pop();
+}
- if( bHiddenFlds )
- {
- SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
- pFldType->Modify( &aHnt, 0);
- CalcPagesForPrint( (USHORT)aPages.Max() );
- }
- if( bStartJob )
- rOptions.bJobStartet = TRUE;
- }
- pFntCache->Flush();
-}
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index a270c6f78492..99c16d68f2bd 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -116,11 +116,8 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
// Only setup the printer if we need one:
const IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
const bool bBrowseMode = pIDSA->get(IDocumentSettingAccess::BROWSE_MODE);
- const bool bCreatePrinter = !bBrowseMode &&
- !pIDSA->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE);
- SfxPrinter* pPrinter = getIDocumentDeviceAccess()->getPrinter( bCreatePrinter );
- if( pPrinter )
- InitPrt( pPrinter, pPDFOut );
+ if( pPDFOut )
+ InitPrt( pPDFOut );
// <--
// --> FME 2005-03-16 #i44963# Good occasion to check if page sizes in
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index e64a3f58eba2..7a22698b87ca 100644..100755
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -33,11 +33,19 @@
#include "precompiled_sw.hxx"
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
#include <hintids.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/objsh.hxx>
+#include <tools/resary.hxx>
+#include <tools/debug.hxx>
+#include <rtl/ustring.hxx>
+#include <toolkit/awt/vclxdevice.hxx>
+#include <toolkit/awt/vclxdevice.hxx>
-// #include <tools/intn.hxx>
#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
#include <sfx2/prnmon.hxx>
@@ -45,6 +53,16 @@
#include <svx/pbinitem.hxx>
#include <svx/svdview.hxx>
#include <unotools/localedatawrapper.hxx>
+
+#include <unotools/moduleoptions.hxx>
+#include <svl/languageoptions.hxx>
+
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/view/XRenderable.hpp>
+
+#include <unotxdoc.hxx>
+
+#include <docsh.hxx>
#include <unotools/syslocale.hxx>
#include <txtfld.hxx>
#include <fmtfld.hxx>
@@ -54,14 +72,15 @@
#include <pagefrm.hxx>
#include <cntfrm.hxx>
#include <doc.hxx>
+#include <wdocsh.hxx>
#include <fesh.hxx>
#include <pam.hxx>
#include <viewimp.hxx> // Imp->SetFirstVisPageInvalid()
#include <layact.hxx>
#include <ndtxt.hxx>
#include <fldbas.hxx>
-#include <docufld.hxx> // PostItFld /-Type
#include <docfld.hxx> // _SetGetExpFld
+#include <docufld.hxx> // PostItFld /-Type
#include <shellres.hxx>
#include <viewopt.hxx>
#include <swprtopt.hxx> // SwPrtOptions
@@ -76,11 +95,18 @@
#include <txtfrm.hxx> // MinPrtLine
#include <viscrs.hxx> // SwShellCrsr
#include <fmtpdsc.hxx> // SwFmtPageDesc
+#include <globals.hrc>
#define JOBSET_ERR_DEFAULT 0
#define JOBSET_ERR_ERROR 1
#define JOBSET_ERR_ISSTARTET 2
+
+extern bool lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst );
+
+
+using namespace ::com::sun::star;
+
//--------------------------------------------------------------------
//Klasse zum Puffern von Paints
class SwQueuedPaint
@@ -99,19 +125,6 @@ public:
SwQueuedPaint *SwPaintQueue::pQueue = 0;
-//Klasse zum Speichern einiger Druckereinstellungen
-class SwPrtOptSave
-{
- Printer *pPrt;
- Size aSize;
- Paper ePaper;
- Orientation eOrientation;
- USHORT nPaperBin;
-public:
- SwPrtOptSave( Printer *pPrinter );
- ~SwPrtOptSave();
-};
-
// saves some settings from the draw view
class SwDrawViewSave
{
@@ -201,6 +214,7 @@ void SwPaintQueue::Remove( ViewShell *pSh )
}
}
+/*****************************************************************************/
const XubString& SwPrtOptions::MakeNextJobName()
{
@@ -214,340 +228,538 @@ const XubString& SwPrtOptions::MakeNextJobName()
return sJobName += XubString::CreateFromInt32( ++nJobNo );
}
-/******************************************************************************
- * Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ...
- * Beschreibung:
- * Erstellt : OK 04.11.94 16:27
- * Aenderung :
- ******************************************************************************/
+/*****************************************************************************/
-void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, BOOL bPDFExport )
+SwRenderData::SwRenderData()
{
- ASSERT( !pSh->GetWin(), "Drucken mit Window?" );
- pSh->aVisArea = rRect;
- pSh->Imp()->SetFirstVisPageInvalid();
- Point aPt( rRect.Pos() );
+ m_pPostItFields = 0;
+ m_pPostItDoc = 0;
+ m_pPostItShell = 0;
- if (!bPDFExport)
- aPt += pSh->aPrtOffst;
- aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
+ m_pViewOptionAdjust = 0;
+ m_pPrtOptions = 0;
+}
- OutputDevice *pOut = bPDFExport ?
- pSh->GetOut() :
- pSh->getIDocumentDeviceAccess()->getPrinter( false );
- MapMode aMapMode( pOut->GetMapMode() );
- aMapMode.SetOrigin( aPt );
- pOut->SetMapMode( aMapMode );
+SwRenderData::~SwRenderData()
+{
+ delete m_pViewOptionAdjust; m_pViewOptionAdjust = 0;
+ delete m_pPrtOptions; m_pPrtOptions = 0;
+ DBG_ASSERT( !m_pPostItShell, "m_pPostItShell should already have been deleted" );
+ DBG_ASSERT( !m_pPostItDoc, "m_pPostItDoc should already have been deleted" );
+ DBG_ASSERT( !m_pPostItFields, " should already have been deleted" );
}
-/******************************************************************************
- * Methode : struct _PostItFld : public _SetGetExpFld
- * Beschreibung: Update an das PostItFeld
- * Erstellt : OK 07.11.94 10:18
- * Aenderung :
- ******************************************************************************/
-struct _PostItFld : public _SetGetExpFld
-{
- _PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld,
- const SwIndex* pIdx = 0 )
- : _SetGetExpFld( rNdIdx, pFld, pIdx ) {}
-
- USHORT GetPageNo( MultiSelection &rMulti, BOOL bRgt, BOOL bLft,
- USHORT& rVirtPgNo, USHORT& rLineNo );
- SwPostItField* GetPostIt() const
- { return (SwPostItField*) GetFld()->GetFld().GetFld(); }
-};
+void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev )
+{
+ DBG_ASSERT( !m_pPostItFields && !m_pPostItDoc && !m_pPostItShell, "some post-it data already exists" );
+ m_pPostItFields = new _SetGetExpFlds;
+ lcl_GetPostIts( pDoc, m_pPostItFields );
+ m_pPostItDoc = new SwDoc;
+
+ //!! Disable spell and grammar checking in the temporary document.
+ //!! Otherwise the grammar checker might process it and crash if we later on
+ //!! simply delete this document while he is still at it.
+ SwViewOption aViewOpt( *pViewOpt );
+ aViewOpt.SetOnlineSpell( FALSE );
+
+ m_pPostItShell = new ViewShell( *m_pPostItDoc, 0, &aViewOpt, pOutDev );
+}
-USHORT _PostItFld::GetPageNo( MultiSelection &rMulti, BOOL bRgt, BOOL bLft,
- USHORT& rVirtPgNo, USHORT& rLineNo )
+void SwRenderData::DeletePostItData()
{
- //Problem: Wenn ein PostItFld in einem Node steht, der von mehr als
- //einer Layout-Instanz repraesentiert wird, steht die Frage im Raum,
- //ob das PostIt nur ein- oder n-mal gedruck werden soll.
- //Wahrscheinlich nur einmal, als Seitennummer soll hier keine Zufaellige
- //sondern die des ersten Auftretens des PostIts innerhalb des selektierten
- //Bereichs ermittelt werden.
- rVirtPgNo = 0;
- USHORT nPos = GetCntnt();
- SwClientIter aIter( (SwModify &)GetFld()->GetTxtNode() );
- for( SwTxtFrm* pFrm = (SwTxtFrm*)aIter.First( TYPE( SwFrm ));
- pFrm; pFrm = (SwTxtFrm*)aIter.Next() )
+ if (HasPostItData())
{
- if( pFrm->GetOfst() > nPos ||
- (pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
- continue;
- USHORT nPgNo = pFrm->GetPhyPageNum();
- BOOL bRight = pFrm->OnRightPage();
- if( rMulti.IsSelected( nPgNo ) &&
- ( (bRight && bRgt) || (!bRight && bLft) ) )
- {
- rLineNo = (USHORT)(pFrm->GetLineCount( nPos ) +
- pFrm->GetAllLines() - pFrm->GetThisLines());
- rVirtPgNo = pFrm->GetVirtPageNum();
- return nPgNo;
- }
+ m_pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt
+ delete m_pPostItShell; //Nimmt das PostItDoc mit ins Grab.
+ delete m_pPostItFields;
+ m_pPostItDoc = 0;
+ m_pPostItShell = 0;
+ m_pPostItFields = 0;
}
- return 0;
}
-/******************************************************************************
- * Methode : void lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds& ...
- * Beschreibung:
- * Erstellt : OK 07.11.94 10:20
- * Aenderung :
- ******************************************************************************/
-
-void lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds& rSrtLst )
+void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions )
{
- SwFieldType* pFldType = pIDFA->GetSysFldType( RES_POSTITFLD );
- ASSERT( pFldType, "kein PostItType ? ");
-
- if( pFldType->GetDepends() )
+ if (m_pViewOptionAdjust)
{
- // Modify-Object gefunden, trage alle Felder ins Array ein
- SwClientIter aIter( *pFldType );
- SwClient* pLast;
- const SwTxtFld* pTxtFld;
-
- for( pLast = aIter.First( TYPE(SwFmtFld)); pLast; pLast = aIter.Next() )
- if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
- pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
- {
- SwNodeIndex aIdx( pTxtFld->GetTxtNode() );
- _PostItFld* pNew = new _PostItFld( aIdx, pTxtFld );
- rSrtLst.Insert( pNew );
- }
+ DBG_ASSERT( 0, "error: there should be no ViewOptionAdjust active when calling this function" );
}
+ m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions );
}
-/******************************************************************************
- * Methode : void lcl_FormatPostIt( IDocumentContentOperations* pIDCO, SwPaM& aPam, ...
- * Beschreibung:
- * Erstellt : OK 07.11.94 10:20
- * Aenderung :
- ******************************************************************************/
-
-void lcl_FormatPostIt( IDocumentContentOperations* pIDCO, SwPaM& aPam, SwPostItField* pField,
- USHORT nPageNo, USHORT nLineNo )
+void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions )
{
- static char __READONLY_DATA sTmp[] = " : ";
-
- ASSERT( ViewShell::GetShellRes(), "missing ShellRes" );
+ m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions );
+}
- String aStr( ViewShell::GetShellRes()->aPostItPage );
- aStr.AppendAscii(sTmp);
- aStr += XubString::CreateFromInt32( nPageNo );
- aStr += ' ';
- if( nLineNo )
+void SwRenderData::ViewOptionAdjustStop()
+{
+ if (m_pViewOptionAdjust)
{
- aStr += ViewShell::GetShellRes()->aPostItLine;
- aStr.AppendAscii(sTmp);
- aStr += XubString::CreateFromInt32( nLineNo );
- aStr += ' ';
+ delete m_pViewOptionAdjust;
+ m_pViewOptionAdjust = 0;
}
- aStr += ViewShell::GetShellRes()->aPostItAuthor;
- aStr.AppendAscii(sTmp);
- aStr += pField->GetPar1();
- aStr += ' ';
- aStr += SvtSysLocale().GetLocaleData().getDate( pField->GetDate() );
- pIDCO->InsertString( aPam, aStr );
-
- pIDCO->SplitNode( *aPam.GetPoint(), false );
- aStr = pField->GetPar2();
-#if defined( WIN ) || defined( WNT ) || defined( PM2 )
- // Bei Windows und Co alle CR rausschmeissen
- aStr.EraseAllChars( '\r' );
-#endif
- pIDCO->InsertString( aPam, aStr );
- pIDCO->SplitNode( *aPam.GetPoint(), false );
- pIDCO->SplitNode( *aPam.GetPoint(), false );
}
-/******************************************************************************
- * Methode : void lcl_PrintPostIts( ViewShell* pPrtShell )
- * Beschreibung:
- * Erstellt : OK 07.11.94 10:21
- * Aenderung : MA 10. May. 95
- ******************************************************************************/
+void SwRenderData::MakeSwPrtOptions(
+ SwPrtOptions &rOptions,
+ const SwDocShell *pDocShell,
+ const SwPrintUIOptions *pOpt,
+ const SwRenderData *pData,
+ bool bIsPDFExport )
+{
+ if (!pDocShell || !pOpt || !pData)
+ return;
-void lcl_PrintPostIts( ViewShell* pPrtShell, const XubString& rJobName,
- BOOL& rStartJob, int& rJobStartError, BOOL bReverse)
+ // get default print options
+ const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
+ BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
+ rOptions.MakeOptions( bWeb );
+
+ // get print options to use from provided properties
+ rOptions.bPrintGraphic = pOpt->IsPrintGraphics();
+ rOptions.bPrintTable = pOpt->IsPrintTables();
+ rOptions.bPrintDraw = pOpt->IsPrintDrawings();
+ rOptions.bPrintControl = pOpt->IsPrintFormControls();
+ rOptions.bPrintLeftPages = pOpt->IsPrintLeftPages();
+ rOptions.bPrintRightPages = pOpt->IsPrintRightPages();
+ rOptions.bPrintPageBackground = pOpt->IsPrintPageBackground();
+ rOptions.bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport );
+ // bUpdateFieldsInPrinting <-- not set here; mail merge only
+ rOptions.bPaperFromSetup = pOpt->IsPaperFromSetup();
+ rOptions.bPrintReverse = pOpt->IsPrintReverse();
+ rOptions.bPrintProspect = pOpt->IsPrintProspect();
+ rOptions.bPrintProspectRTL = pOpt->IsPrintProspectRTL();
+ // bPrintSingleJobs <-- not set here; mail merge and or configuration
+ // bModified <-- not set here; mail merge only
+ rOptions.bPrintBlackFont = pOpt->IsPrintWithBlackTextColor();
+ rOptions.bPrintHiddenText = pOpt->IsPrintHiddenText();
+ rOptions.bPrintTextPlaceholder = pOpt->IsPrintTextPlaceholders();
+ rOptions.nPrintPostIts = pOpt->GetPrintPostItsType();
+
+ //! needs to be set after MakeOptions since the assignment operation in that
+ //! function will destroy the pointers
+ rOptions.SetPrintUIOptions( pOpt );
+ rOptions.SetRenderData( pData );
+
+ // rOptions.aMulti is not used anymore in the XRenderable API
+ // Thus we set it to a dummy value here.
+ rOptions.aMulti = MultiSelection( Range( 1, 1 ) );
+
+ //! Note: Since for PDF export of (multi-)selection a temporary
+ //! document is created that contains only the selects parts,
+ //! and thus that document is to printed in whole the,
+ //! rOptions.bPrintSelection parameter will be false.
+ if (bIsPDFExport)
+ rOptions.bPrintSelection = FALSE;
+}
+
+
+/*****************************************************************************/
+
+SwPrintUIOptions::SwPrintUIOptions(
+ bool bWeb,
+ bool bSwSrcView,
+ bool bHasSelection,
+ bool bHasPostIts,
+ const SwPrintData &rDefaultPrintData ) :
+ m_pLast( NULL ),
+ m_rDefaultPrintData( rDefaultPrintData )
{
- // Formatieren und Ausdrucken
- pPrtShell->CalcLayout();
+ ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) );
- SfxPrinter* pPrn = pPrtShell->getIDocumentDeviceAccess()->getPrinter( false );
+ DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" );
+ if( aLocalizedStrings.Count() < 44 ) // bad resource ?
+ return;
- //Das Druckdokument ist ein default Dokument, mithin arbeitet es auf der
- //StandardSeite.
- SwFrm *pPage = pPrtShell->GetLayout()->Lower();
+ // printing HTML sources does not have any valid UI options.
+ // Its just the source code that gets printed ...
+ if (bSwSrcView)
+ {
+ m_aUIProperties.realloc( 0 );
+ return;
+ }
- SwPrtOptSave aPrtSave( pPrn );
+ // check if CTL is enabled
+ SvtLanguageOptions aLangOpt;
+ bool bCTL = aLangOpt.IsCTLFontEnabled();
+
+ // create sequence of print UI options
+ // (5 options are not available for Writer-Web)
+ const int nCTLOpts = bCTL ? 1 : 0;
+ const int nNumProps = nCTLOpts + (bWeb ? 14 : 20);
+ m_aUIProperties.realloc( nNumProps );
+ int nIdx = 0;
+
+ // create "writer" section (new tab page in dialog)
+ SvtModuleOptions aModOpt;
+ String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
+ aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
+ aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) );
+ m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+
+ // create sub section for Contents
+ m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
+
+ // create a bool option for background
+ bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
+ aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ),
+ bDefaultVal );
+
+ // create a bool option for pictures/graphics AND OLE and drawing objects as well
+ bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ aLocalizedStrings.GetString( 5 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ),
+ bDefaultVal );
+ if (!bWeb)
+ {
+ // create a bool option for hidden text
+ bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
+ aLocalizedStrings.GetString( 7 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ),
+ bDefaultVal );
+
+ // create a bool option for place holder
+ bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ),
+ aLocalizedStrings.GetString( 9 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ),
+ bDefaultVal );
+ }
- pPrn->SetOrientation( ORIENTATION_PORTRAIT );
- pPrn->SetPaperBin( pPage->GetAttrSet()->GetPaperBin().GetValue() );
+ // create a bool option for controls
+ bDefaultVal = rDefaultPrintData.IsPrintControl();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
+ aLocalizedStrings.GetString( 11 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ),
+ bDefaultVal );
- if( !rStartJob && JOBSET_ERR_DEFAULT == rJobStartError &&
- rJobName.Len() )
+ // create sub section for Color
+ m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() );
+
+ // create a bool option for printing text with black font color
+ bDefaultVal = rDefaultPrintData.IsPrintBlackFont();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ),
+ aLocalizedStrings.GetString( 14 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
+ bDefaultVal );
+
+ if (!bWeb)
{
- if( !pPrn->IsJobActive() )
- {
- rStartJob = pPrn->StartJob( rJobName );
- if( !rStartJob )
- {
- rJobStartError = JOBSET_ERR_ERROR;
- return;
- }
- }
- pPrtShell->InitPrt( pPrn );
- rJobStartError = JOBSET_ERR_ISSTARTET;
+ // create subgroup for misc options
+ m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() );
+
+ // create a bool option for printing automatically inserted blank pages
+ bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ),
+ aLocalizedStrings.GetString( 17 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ),
+ bDefaultVal );
}
- // Wir koennen auch rueckwaerts:
- if ( bReverse )
- pPage = pPrtShell->GetLayout()->GetLastPage();
+ // create a bool option for paper tray
+ bDefaultVal = rDefaultPrintData.IsPaperFromSetup();
+ vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt;
+ aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ),
+ aLocalizedStrings.GetString( 19 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
+ bDefaultVal,
+ aPaperTrayOpt
+ );
+
+ // print range selection
+ vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
+ aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ aPrintRangeOpt.mbInternalOnly = sal_True;
+ m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ),
+ rtl::OUString(),
+ aPrintRangeOpt
+ );
+
+ // create a choice for the content to create
+ rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
+ uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 );
+ uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 );
+ aChoices[0] = aLocalizedStrings.GetString( 38 );
+ aHelpText[0] = aLocalizedStrings.GetString( 39 );
+ aChoices[1] = aLocalizedStrings.GetString( 40 );
+ aHelpText[1] = aLocalizedStrings.GetString( 41 );
+ if (bHasSelection)
+ {
+ aChoices[2] = aLocalizedStrings.GetString( 42 );
+ aHelpText[2] = aLocalizedStrings.GetString( 43 );
+ }
+ m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
+ aHelpText,
+ aPrintRangeName,
+ aChoices,
+ bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */);
+ // create a an Edit dependent on "Pages" selected
+ vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
+ m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(),
+ rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
+ rtl::OUString(),
+ aPageRangeOpt
+ );
+ // print content selection
+ vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt;
+ aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) );
+ m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ),
+ rtl::OUString(),
+ aContentsOpt
+ );
+ // create a list box for notes content
+ const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
+ aChoices.realloc( 4 );
+ aChoices[0] = aLocalizedStrings.GetString( 21 );
+ aChoices[1] = aLocalizedStrings.GetString( 22 );
+ aChoices[2] = aLocalizedStrings.GetString( 23 );
+ aChoices[3] = aLocalizedStrings.GetString( 24 );
+ aHelpText.realloc( 2 );
+ aHelpText[0] = aLocalizedStrings.GetString( 25 );
+ aHelpText[1] = aLocalizedStrings.GetString( 25 );
+ vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False );
+ aAnnotOpt.mbEnabled = bHasPostIts;
+ m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ),
+ aHelpText,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ),
+ aChoices,
+ nPrintPostIts,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ aAnnotOpt
+ );
+
+ // create subsection for Page settings
+ vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt;
+ aPageSetOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
+
+ if (!bWeb)
+ {
+ m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ),
+ rtl::OUString(),
+ aPageSetOpt
+ );
+ uno::Sequence< rtl::OUString > aRLChoices( 3 );
+ aRLChoices[0] = aLocalizedStrings.GetString( 28 );
+ aRLChoices[1] = aLocalizedStrings.GetString( 29 );
+ aRLChoices[2] = aLocalizedStrings.GetString( 30 );
+ uno::Sequence< rtl::OUString > aRLHelp( 1 );
+ aRLHelp[0] = aLocalizedStrings.GetString( 31 );
+ // create a choice option for all/left/right pages
+ // 0 : all pages (left & right)
+ // 1 : left pages
+ // 2 : right pages
+ DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRightPage(),
+ "unexpected value combination" );
+ sal_Int16 nPagesChoice = 0;
+ if (rDefaultPrintData.IsPrintLeftPage() && !rDefaultPrintData.IsPrintRightPage())
+ nPagesChoice = 1;
+ else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage())
+ nPagesChoice = 2;
+ m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ),
+ aRLHelp,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ),
+ aRLChoices,
+ nPagesChoice,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) )
+ );
+ }
- while( pPage )
+ // create a bool option for brochure
+ bDefaultVal = rDefaultPrintData.IsPrintProspect();
+ rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ),
+ aLocalizedStrings.GetString( 34 ),
+ aBrochurePropertyName,
+ bDefaultVal,
+ aPageSetOpt
+ );
+
+ if (bCTL)
{
- //Mag der Anwender noch?, Abbruch erst in Prt()
- GetpApp()->Reschedule();
- ::SetSwVisArea( pPrtShell, pPage->Frm() );
- pPrn->StartPage();
- pPage->GetUpper()->Paint( pPage->Frm() );
-// SFX_APP()->SpoilDemoOutput( *pPrtShell->GetOut(), pPage->Frm().SVRect());
- SwPaintQueue::Repaint();
- pPrn->EndPage();
- pPage = bReverse ? pPage->GetPrev() : pPage->GetNext();
+ // create a bool option for brochure RTL dependent on brochure
+ uno::Sequence< rtl::OUString > aBRTLChoices( 2 );
+ aBRTLChoices[0] = aLocalizedStrings.GetString( 35 );
+ aBRTLChoices[1] = aLocalizedStrings.GetString( 36 );
+ vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True );
+ aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
+ // RTL brochure choices
+ // 0 : left-to-right
+ // 1 : right-to-left
+ const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
+ m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(),
+ uno::Sequence< rtl::OUString >(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ),
+ aBRTLChoices,
+ nBRTLChoice,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ aBrochureRTLOpt
+ );
}
+
+
+ DBG_ASSERT( nIdx == nNumProps, "number of added properties is not as expected" );
}
-/******************************************************************************
- * Methode : void lcl_PrintPostItsEndDoc( ViewShell* pPrtShell, ...
- * Beschreibung:
- * Erstellt : OK 07.11.94 10:21
- * Aenderung : MA 10. May. 95
- ******************************************************************************/
+SwPrintUIOptions::~SwPrintUIOptions()
+{
+}
-void lcl_PrintPostItsEndDoc( ViewShell* pPrtShell,
- _SetGetExpFlds& rPostItFields, MultiSelection &rMulti,
- const XubString& rJobName, BOOL& rStartJob, int& rJobStartError,
- BOOL bRgt, BOOL bLft, BOOL bRev )
+bool SwPrintUIOptions::IsPrintLeftPages() const
{
- USHORT nPostIts = rPostItFields.Count();
- if( !nPostIts )
- // Keine Arbeit
- return;
+ // take care of different property names for the option.
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
+
+ // 0: left and right pages
+ // 1: left pages only
+ // 2: right pages only
+ sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ );
+ bool bRes = nLRPages == 0 || nLRPages == 1;
+ bRes = getBoolValue( "PrintLeftPages", bRes /* <- default value if property is not found */ );
+ return bRes;
+}
- SET_CURR_SHELL( pPrtShell );
+bool SwPrintUIOptions::IsPrintRightPages() const
+{
+ // take care of different property names for the option.
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
- SwDoc* pPrtDoc = pPrtShell->GetDoc();
+ sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ );
+ bool bRes = nLRPages == 0 || nLRPages == 2;
+ bRes = getBoolValue( "PrintRightPages", bRes /* <- default value if property is not found */ );
+ return bRes;
+}
- // Dokument leeren und ans Dokumentende gehen
- SwPaM aPam( pPrtDoc->GetNodes().GetEndOfContent() );
- aPam.Move( fnMoveBackward, fnGoDoc );
- aPam.SetMark();
- aPam.Move( fnMoveForward, fnGoDoc );
- pPrtDoc->DeleteRange( aPam );
+bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const
+{
+ // take care of different property names for the option.
- for( USHORT i = 0, nVirtPg, nLineNo; i < nPostIts; ++i )
- {
- _PostItFld& rPostIt = (_PostItFld&)*rPostItFields[ i ];
- if( rPostIt.GetPageNo( rMulti, bRgt, bLft, nVirtPg, nLineNo ) )
- lcl_FormatPostIt( pPrtShell->GetDoc(), aPam,
- rPostIt.GetPostIt(), nVirtPg, nLineNo );
- }
+ bool bRes = bIsPDFExport ?
+ !getBoolValue( "IsSkipEmptyPages", sal_True ) :
+ getBoolValue( "PrintEmptyPages", sal_True );
+ return bRes;
+}
- lcl_PrintPostIts( pPrtShell, rJobName, rStartJob, rJobStartError, bRev );
+bool SwPrintUIOptions::IsPrintTables() const
+{
+ // take care of different property names currently in use for this option.
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
+
+// bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
+// bRes = getBoolValue( "PrintTables", bRes );
+// return bRes;
+ // for now it was decided that tables should always be printed
+ return true;
}
-/******************************************************************************
- * Methode : void lcl_PrintPostItsEndPage( ViewShell* pPrtShell, ...
- * Beschreibung:
- * Erstellt : OK 07.11.94 10:22
- * Aenderung :
- ******************************************************************************/
+bool SwPrintUIOptions::IsPrintGraphics() const
+{
+ // take care of different property names for the option.
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
+ bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True );
+ bRes = getBoolValue( "PrintGraphics", bRes );
+ return bRes;
+}
-void lcl_PrintPostItsEndPage( ViewShell* pPrtShell,
- _SetGetExpFlds& rPostItFields, USHORT nPageNo, MultiSelection &rMulti,
- const XubString& rJobName, BOOL& rStartJob, int& rJobStartError,
- BOOL bRgt, BOOL bLft, BOOL bRev )
+bool SwPrintUIOptions::IsPrintDrawings() const
{
- USHORT nPostIts = rPostItFields.Count();
- if( !nPostIts )
- // Keine Arbeit
- return;
+ // take care of different property names for the option.
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
- SET_CURR_SHELL( pPrtShell );
-
- USHORT i = 0, nVirtPg, nLineNo;
- while( ( i < nPostIts ) &&
- ( nPageNo != ((_PostItFld&)*rPostItFields[ i ]).
- GetPageNo( rMulti,bRgt, bLft, nVirtPg, nLineNo )))
- ++i;
- if(i == nPostIts)
- // Nix zu drucken
- return;
+ bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True );
+ bRes = getBoolValue( "PrintDrawings", bRes );
+ return bRes;
+}
- SwDoc* pPrtDoc = pPrtShell->GetDoc();
+bool SwPrintUIOptions::processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp )
+{
+ bool bChanged = processProperties( i_rNewProp );
- // Dokument leeren und ans Dokumentende gehen
- SwPaM aPam( pPrtDoc->GetNodes().GetEndOfContent() );
- aPam.Move( fnMoveBackward, fnGoDoc );
- aPam.SetMark();
- aPam.Move( fnMoveForward, fnGoDoc );
- pPrtDoc->DeleteRange( aPam );
+ uno::Reference< awt::XDevice > xRenderDevice;
+ uno::Any aVal( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) );
+ aVal >>= xRenderDevice;
- while( i < nPostIts )
+ OutputDevice* pOut = 0;
+ if (xRenderDevice.is())
{
- _PostItFld& rPostIt = (_PostItFld&)*rPostItFields[ i ];
- if( nPageNo == rPostIt.GetPageNo( rMulti, bRgt, bLft, nVirtPg, nLineNo ) )
- lcl_FormatPostIt( pPrtShell->GetDoc(), aPam,
- rPostIt.GetPostIt(), nVirtPg, nLineNo );
- ++i;
+ VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
+ pOut = pDevice ? pDevice->GetOutputDevice() : 0;
}
- lcl_PrintPostIts( pPrtShell, rJobName, rStartJob, rJobStartError, bRev );
+ bChanged = bChanged || (pOut != m_pLast);
+ if( pOut )
+ m_pLast = pOut;
+
+ return bChanged;
}
+
/******************************************************************************
- * Methode : void ViewShell::InitPrt( SfxPrinter *pNew, OutputDevice *pPDFOut )
+ * Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ...
* Beschreibung:
- * Erstellt : OK 07.11.94 10:22
+ * Erstellt : OK 04.11.94 16:27
* Aenderung :
******************************************************************************/
-void ViewShell::InitPrt( SfxPrinter *pPrt, OutputDevice *pPDFOut )
+void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, BOOL /*bPDFExport*/ )
+{
+ ASSERT( !pSh->GetWin(), "Drucken mit Window?" );
+ pSh->aVisArea = rRect;
+ pSh->Imp()->SetFirstVisPageInvalid();
+ Point aPt( rRect.Pos() );
+
+ // calculate an offset for the rectangle of the n-th page to
+ // move the start point of the output operation to a position
+ // such that in the output device all pages will be painted
+ // at the same position
+ aPt.X() = -aPt.X(); aPt.Y() = -aPt.Y();
+
+ OutputDevice *pOut = pSh->GetOut();
+
+ MapMode aMapMode( pOut->GetMapMode() );
+ aMapMode.SetOrigin( aPt );
+ pOut->SetMapMode( aMapMode );
+}
+
+/******************************************************************************/
+
+void ViewShell::InitPrt( OutputDevice *pOutDev )
{
//Fuer den Printer merken wir uns einen negativen Offset, der
//genau dem Offset de OutputSize entspricht. Das ist notwendig,
//weil unser Ursprung der linken ober Ecke der physikalischen
//Seite ist, die Ausgaben (SV) aber den Outputoffset als Urstprung
//betrachten.
- OutputDevice *pTmpDev = pPDFOut ? pPDFOut : (OutputDevice *) pPrt;
- if ( pTmpDev )
+ if ( pOutDev )
{
- aPrtOffst = pPrt ? pPrt->GetPageOffset() : Point();
+ aPrtOffst = Point();
- aPrtOffst += pTmpDev->GetMapMode().GetOrigin();
- MapMode aMapMode( pTmpDev->GetMapMode() );
+ aPrtOffst += pOutDev->GetMapMode().GetOrigin();
+ MapMode aMapMode( pOutDev->GetMapMode() );
aMapMode.SetMapUnit( MAP_TWIP );
- pTmpDev->SetMapMode( aMapMode );
- pTmpDev->SetLineColor();
- pTmpDev->SetFillColor();
+ pOutDev->SetMapMode( aMapMode );
+ pOutDev->SetLineColor();
+ pOutDev->SetFillColor();
}
else
aPrtOffst.X() = aPrtOffst.Y() = 0;
if ( !pWin )
- pOut = pTmpDev; //Oder was sonst?
+ pOut = pOutDev; //Oder was sonst?
}
/******************************************************************************
@@ -638,14 +850,6 @@ void ViewShell::ChgAllPageSize( Size &rSz )
}
}
-/******************************************************************************
- * Methode : void ViewShell::CalcPagesForPrint( short nMax, BOOL ...
- * Beschreibung:
- * Erstellt : OK 04.11.94 15:33
- * Aenderung : MA 07. Jun. 95
- ******************************************************************************/
-
-
void lcl_SetState( SfxProgress& rProgress, ULONG nPage, ULONG nMax,
const XubString *pStr, ULONG nAct, ULONG nCnt, ULONG nOffs, ULONG nPageNo )
@@ -674,50 +878,19 @@ void lcl_SetState( SfxProgress& rProgress, ULONG nPage, ULONG nMax,
-void ViewShell::CalcPagesForPrint( USHORT nMax, SfxProgress* pProgress,
- const XubString* pStr, ULONG nMergeAct, ULONG nMergeCnt )
+void ViewShell::CalcPagesForPrint( USHORT nMax )
{
SET_CURR_SHELL( this );
- //Seitenweise durchformatieren, by the way kann die Statusleiste
- //angetriggert werden, damit der Anwender sieht worauf er wartet.
- //Damit der Vorgang moeglichst transparent gestaltet werden kann
- //Versuchen wir mal eine Schaetzung.
- SfxPrinter* pPrt = getIDocumentDeviceAccess()->getPrinter( false );
- BOOL bPrtJob = pPrt ? pPrt->IsJobActive() : FALSE;
SwRootFrm* pLayout = GetLayout();
- ULONG nStatMax = pLayout->GetPageNum();
+ // ULONG nStatMax = pLayout->GetPageNum();
const SwFrm *pPage = pLayout->Lower();
SwLayAction aAction( pLayout, Imp() );
- if( pProgress )
- {
- // HACK, damit die Anzeige sich nicht verschluckt.
- const XubString aTmp( SW_RES( STR_STATSTR_FORMAT ) );
- pProgress->SetText( aTmp );
- lcl_SetState( *pProgress, 1, nStatMax, pStr, nMergeAct, nMergeCnt, 0, 1 );
- pProgress->Reschedule(); //Mag der Anwender noch oder hat er genug?
- aAction.SetProgress(pProgress);
- }
-
pLayout->StartAllAction();
for ( USHORT i = 1; pPage && i <= nMax; pPage = pPage->GetNext(), ++i )
{
- if ( ( bPrtJob && !pPrt->IsJobActive() ) || Imp()->IsStopPrt() )
- break;
-
- if( pProgress )
- {
- //HACK, damit die Anzeige sich nicht verschluckt.
- if ( i > nStatMax ) nStatMax = i;
- lcl_SetState( *pProgress, i, nStatMax, pStr, nMergeAct, nMergeCnt, 0, i );
- pProgress->Reschedule(); //Mag der Anwender noch oder hat er genug?
- }
-
- if ( ( bPrtJob && !pPrt->IsJobActive() ) || Imp()->IsStopPrt() )
- break;
-
pPage->Calc();
SwRect aOldVis( VisArea() );
aVisArea = pPage->Frm();
@@ -731,34 +904,23 @@ void ViewShell::CalcPagesForPrint( USHORT nMax, SfxProgress* pProgress,
aVisArea = aOldVis; //Zuruecksetzen wg. der Paints!
Imp()->SetFirstVisPageInvalid();
- SwPaintQueue::Repaint();
-
- if ( pProgress )
- pProgress->Reschedule(); //Mag der Anwender noch oder hat er genug?
+// SwPaintQueue::Repaint();
}
-
- if (pProgress)
- aAction.SetProgress( NULL );
-
pLayout->EndAllAction();
}
/******************************************************************************/
-SwDoc * ViewShell::CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef &rDocShellRef)
+SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
{
ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
SwFEShell* pFESh = (SwFEShell*)this;
// Wir bauen uns ein neues Dokument
SwDoc *pPrtDoc = new SwDoc;
pPrtDoc->acquire();
- pPrtDoc->SetRefForDocShell( boost::addressof(rDocShellRef) );
+ pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef );
pPrtDoc->LockExpFlds();
- // Der Drucker wird uebernommen
- if (pPrt)
- pPrtDoc->setPrinter( pPrt, true, true );
-
const SfxPoolItem* pCpyItem;
const SfxItemPool& rPool = GetAttrPool();
for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
@@ -849,6 +1011,7 @@ SwDoc * ViewShell::CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef &rDocShellR
}
return pPrtDoc;
}
+
SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
@@ -856,7 +1019,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
// Wir bauen uns ein neues Dokument
// SwDoc *pPrtDoc = new SwDoc;
// pPrtDoc->acquire();
-// pPrtDoc->SetRefForDocShell( boost::addressof(rDocShellRef) );
+// pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
pPrtDoc->LockExpFlds();
// Der Drucker wird uebernommen
@@ -958,76 +1121,41 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
return pPrtDoc;
}
-/******************************************************************************
- * Methode : void ViewShell::Prt( const SwPrtOptions& rOptions,
- * SfxProgress* pProgress,
- * OutputDevice* pPDFOut )
- * Beschreibung:
- * Erstellt : OK 04.11.94 15:33
- * Aenderung : MA 10. May. 95
- ******************************************************************************/
-
-BOOL ViewShell::Prt( SwPrtOptions& rOptions, SfxProgress* pProgress,
- OutputDevice* pPDFOut )
+sal_Bool ViewShell::PrintOrPDFExport(
+ OutputDevice *pOutDev,
+ const SwPrtOptions &rPrintData,
+ sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//Immer die Druckroutine in viewpg.cxx (fuer Seitenvorschau) mitpflegen!!
-//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ASSERT( pPDFOut || pProgress, "Printing without progress bar!" )
-
- BOOL bStartJob = FALSE;
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rOptions.bPrintSelection parameter will be false.
- BOOL bSelection = rOptions.bPrintSelection;
-
- MultiSelection aMulti( rOptions.aMulti );
-
- if ( !aMulti.GetSelectCount() )
- return bStartJob;
-
- Range aPages( aMulti.FirstSelected(), aMulti.LastSelected() );
- if ( aPages.Max() > USHRT_MAX )
- aPages.Max() = USHRT_MAX;
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//Immer die Druckroutinen in viewpg.cxx (PrintProspect) mitpflegen!!
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ASSERT( aPages.Min() > 0,
- "Seite 0 Drucken?" );
- ASSERT( aPages.Min() <= aPages.Max(),
- "MinSeite groesser MaxSeite." );
-
- SfxPrinter* pPrt = 0; //!! will be 0 for PDF export !!
- if (pPDFOut)
- pPDFOut->Push();
- else
- {
- // wenn kein Drucker vorhanden ist, wird nicht gedruckt
- pPrt = getIDocumentDeviceAccess()->getPrinter( false );
- if( !pPrt || !pPrt->GetName().Len() )
- {
- ASSERT( FALSE, "Drucken ohne Drucker?" );
- return bStartJob;
- }
-
- if( !rOptions.GetJobName().Len() && !pPrt->IsJobActive() )
- return bStartJob;
- }
-
- // Einstellungen am Drucker merken
- SwPrtOptSave aPrtSave( pPrt );
+ const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagesToPrint().size() - 1;
+#if OSL_DEBUG_LEVEL > 1
+ DBG_ASSERT( 0 <= nRenderer && nRenderer <= nMaxRenderer, "nRenderer out of bounds");
+#endif
+ if (!pOutDev || nMaxRenderer < 0 || nRenderer < 0 || nRenderer > nMaxRenderer)
+ return sal_False;
- OutputDevice *pPrtOrPDFOut = pPDFOut ? pPDFOut : (OutputDevice *) pPrt;
+ // save settings of OutputDevice (should be done always since the
+ // output device is now provided by a call from outside the Writer)
+ pOutDev->Push();
// eine neue Shell fuer den Printer erzeugen
ViewShell *pShell;
- SwDoc *pPrtDoc;
+ SwDoc *pOutDevDoc;
//!! muss warum auch immer hier in diesem scope existieren !!
//!! (h?ngt mit OLE Objekten im Dokument zusammen.)
SfxObjectShellRef aDocShellRef;
+ //! Note: Since for PDF export of (multi-)selection a temporary
+ //! document is created that contains only the selects parts,
+ //! and thus that document is to printed in whole the,
+ //! rPrintData.bPrintSelection parameter will be false.
+ BOOL bSelection = rPrintData.bPrintSelection;
+
// PDF export for (multi-)selection has already generated a temporary document
// with the selected text. (see XRenderable implementation in unotxdoc.cxx)
// Thus we like to go in the 'else' part here in that case.
@@ -1036,443 +1164,100 @@ BOOL ViewShell::Prt( SwPrtOptions& rOptions, SfxProgress* pProgress,
// to be created that often here in the 'then' part.
if ( bSelection )
{
- pPrtDoc = CreatePrtDoc( pPrt, aDocShellRef );
+ pOutDevDoc = CreatePrtDoc( aDocShellRef );
// eine ViewShell darauf
- OutputDevice *pTmpDev = pPDFOut ? pPDFOut : 0;
- pShell = new ViewShell( *pPrtDoc, 0, pOpt, pTmpDev );
- pPrtDoc->SetRefForDocShell( 0 );
+ pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev );
+ pOutDevDoc->SetRefForDocShell( 0 );
}
else
{
- pPrtDoc = GetDoc();
- OutputDevice *pTmpDev = pPDFOut ? pPDFOut : 0;
- pShell = new ViewShell( *this, 0, pTmpDev );
+ pOutDevDoc = GetDoc();
+ pShell = new ViewShell( *this, 0, pOutDev );
+ }
+
+ SdrView *pDrawView = pShell->GetDrawView();
+ if (pDrawView)
+ {
+ pDrawView->SetBufferedOutputAllowed( false );
+ pDrawView->SetBufferedOverlayAllowed( false );
}
{ //Zusaetzlicher Scope, damit die CurrShell vor dem zerstoeren der
//Shell zurueckgesetzt wird.
- SET_CURR_SHELL( pShell );
-
- if ( pProgress )
- {
- Link aLnk = LINK(pShell->Imp(), SwViewImp, SetStopPrt);
- ((SfxPrintProgress *)pProgress)->SetCancelHdl(aLnk);
- }
+ SET_CURR_SHELL( pShell );
- //JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
- if( pOpt->IsReadonly() )
- pShell->pOpt->SetReadonly( TRUE );
+ //JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
+ if( pOpt->IsReadonly() )
+ pShell->pOpt->SetReadonly( TRUE );
- // save options at draw view:
- SwDrawViewSave aDrawViewSave( pShell->GetDrawView() );
+ // save options at draw view:
+ SwDrawViewSave aDrawViewSave( pShell->GetDrawView() );
- pShell->PrepareForPrint( rOptions );
+ pShell->PrepareForPrint( rPrintData );
- XubString* pStr = 0;
- ULONG nMergeAct = rOptions.nMergeAct, nMergeCnt = rOptions.nMergeCnt;
- if ( pProgress )
- {
- if( nMergeAct )
+ const sal_Int32 nPage = rPrintData.GetRenderData().GetPagesToPrint()[ nRenderer ];
+#if OSL_DEBUG_LEVEL > 1
+ DBG_ASSERT( nPage == 0 || rPrintData.GetRenderData().GetValidPagesSet().count( nPage ) == 1, "nPage not valid" );
+#endif
+ const SwPageFrm *pStPage = 0;
+ if (nPage > 0) // a 'regular' page, not one from the post-it document
{
- pStr = new SW_RESSTR(STR_STATSTR_LETTER);
- *pStr += ' ';
- *pStr += XubString::CreateFromInt64( nMergeAct );
- if( nMergeCnt )
- {
- *pStr += '/';
- *pStr += XubString::CreateFromInt64( nMergeCnt );
- }
+ const SwRenderData::ValidStartFramesMap_t &rFrms = rPrintData.GetRenderData().GetValidStartFrames();
+ SwRenderData::ValidStartFramesMap_t::const_iterator aIt( rFrms.find( nPage ) );
+ DBG_ASSERT( aIt != rFrms.end(), "failed to find start frame" );
+ if (aIt == rFrms.end())
+ return sal_False;
+ pStPage = aIt->second;
}
- else
+ else // a page from the post-its document ...
{
- ++nMergeAct;
+ DBG_ASSERT( nPage == 0, "unexpected page number. 0 for post-it pages expected" );
+ pStPage = rPrintData.GetRenderData().GetPostItStartFrames()[ nRenderer ];
}
- }
+ DBG_ASSERT( pStPage, "failed to get start page" );
- // Seiten fuers Drucken formatieren
- pShell->CalcPagesForPrint( (USHORT)aPages.Max(), pProgress, pStr,
- nMergeAct, nMergeCnt );
-
- // Some field types, can require a valid layout
- // (expression fields in tables). For these we do an UpdateFlds
- // here after calculation of the pages.
- // --> FME 2004-06-21 #i9684# For performance reasons, we do not update
- // the fields during pdf export.
- // #i56195# prevent update of fields (for mail merge)
- if ( !pPDFOut && rOptions.bUpdateFieldsInPrinting )
- // <--
- pShell->UpdateFlds(TRUE);
-
- if( !pShell->Imp()->IsStopPrt() &&
- ( pPDFOut || rOptions.GetJobName().Len() || pPrt->IsJobActive()) )
- {
- BOOL bStop = FALSE;
- int nJobStartError = JOBSET_ERR_DEFAULT;
+ //!! applying view options and formatting the dcoument should now only be done in getRendererCount!
- USHORT nCopyCnt = rOptions.bCollate ? rOptions.nCopyCount : 1;
+ ViewShell *pViewSh2 = nPage == 0 ? /* post-it page? */
+ rPrintData.GetRenderData().m_pPostItShell : pShell;
+ ::SetSwVisArea( pViewSh2, pStPage->Frm() );
- USHORT nPrintCount = 1;
- XubString sJobName( rOptions.GetJobName() );
-
- for ( USHORT nCnt = 0; !bStop && nCnt < nCopyCnt; nCnt++ )
+ // wenn wir einen Umschlag drucken wird ein Offset beachtet
+ if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
- const SwPageFrm *pStPage = (SwPageFrm*)pShell->GetLayout()->Lower();
- const SwFrm *pEndPage = pStPage;
-
- USHORT nFirstPageNo = 0;
- USHORT nLastPageNo = 0;
- USHORT nPageNo = 1;
-
- if (pPrt)
- {
- if( rOptions.IsPrintSingleJobs() && sJobName.Len() &&
- ( bStartJob || rOptions.bJobStartet ) )
- {
- pPrt->EndJob();
- bStartJob = FALSE;
- rOptions.bJobStartet = TRUE;
-
- // Reschedule statt Yield, da Yield keine Events abarbeitet
- // und es sonst eine Endlosschleife gibt.
- while( pPrt->IsPrinting() && pProgress )
- pProgress->Reschedule();
-
- sJobName = rOptions.MakeNextJobName();
- nJobStartError = JOBSET_ERR_DEFAULT;
- }
- }
-
- for( USHORT i = 1; i <= (USHORT)aPages.Max(); ++i )
- {
- if( i < (USHORT)aPages.Min() )
- {
- if( !pStPage->GetNext() )
- break;
- pStPage = (SwPageFrm*)pStPage->GetNext();
- pEndPage= pStPage;
- }
- else if( i == (USHORT)aPages.Min() )
- {
- nFirstPageNo = i;
- nLastPageNo = nFirstPageNo;
- if( !pStPage->GetNext() || (i == (USHORT)aPages.Max()) )
- break;
- pEndPage = pStPage->GetNext();
- }
- else if( i > (USHORT)aPages.Min() )
- {
- nLastPageNo = i;
- if( !pEndPage->GetNext() || (i == (USHORT)aPages.Max()) )
- break;
- pEndPage = pEndPage->GetNext();
- }
- }
-
- if( !nFirstPageNo )
- {
- bStop = TRUE;
- break;
- }
-
-// HACK: Hier muss von der MultiSelection noch eine akzeptable Moeglichkeit
-// geschaffen werden, alle Seiten von Seite x an zu deselektieren.
-// Z.B. durch SetTotalRange ....
-
-// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), FALSE );
- MultiSelection aTmpMulti( Range( 1, nLastPageNo ) );
- long nTmpIdx = aMulti.FirstSelected();
- static long nEndOfSelection = SFX_ENDOFSELECTION;
- while ( nEndOfSelection != nTmpIdx && nTmpIdx <= long(nLastPageNo) )
- {
- aTmpMulti.Select( nTmpIdx );
- nTmpIdx = aMulti.NextSelected();
- }
- aMulti = aTmpMulti;
-// Ende des HACKs
-
- const USHORT nSelCount = USHORT(aMulti.GetSelectCount()
- /* * nCopyCnt*/);
-
- if ( pProgress )
- {
- pProgress->SetText( SW_RESSTR(STR_STATSTR_PRINT) );
- lcl_SetState( *pProgress, 1, nSelCount, pStr,
- nMergeAct, nMergeCnt, nSelCount, 1 );
- }
-
- if ( rOptions.bPrintReverse )
- {
- const SwFrm *pTmp = pStPage;
- pStPage = (SwPageFrm*)pEndPage;
- pEndPage = pTmp;
- nPageNo = nLastPageNo;
- }
- else
- nPageNo = nFirstPageNo;
-
- // PostitListe holen
- _SetGetExpFlds aPostItFields;
- SwDoc* pPostItDoc = 0;
- ViewShell* pPostItShell = 0;
- if( rOptions.nPrintPostIts != POSTITS_NONE )
- {
- lcl_GetPostIts( pDoc, aPostItFields );
- pPostItDoc = new SwDoc;
- if (pPrt)
- pPostItDoc->setPrinter( pPrt, true, true );
- pPostItShell = new ViewShell( *pPostItDoc, 0,
- pShell->GetViewOptions() );
- // Wenn PostIts am Dokumentenende gedruckt werden sollen,
- // die Druckreihenfolge allerdings umgekehrt ist, dann hier
- if ( ( rOptions.nPrintPostIts == POSTITS_ENDDOC ) &&
- rOptions.bPrintReverse )
- lcl_PrintPostItsEndDoc( pPostItShell, aPostItFields,
- aMulti, sJobName, bStartJob, nJobStartError,
- rOptions.bPrintRightPage, rOptions.bPrintLeftPage, TRUE );
-
- }
-
- // aOldMapMode wird fuer das Drucken von Umschlaegen gebraucht.
- MapMode aOldMapMode;
-
- const SwPageDesc *pLastPageDesc = NULL;
- BOOL bSetOrient = FALSE;
- BOOL bSetPaperSz = FALSE;
- BOOL bSetPaperBin = FALSE;
- BOOL bSetPrt = FALSE;
- if (pPrt)
- {
- bSetOrient = pPrt->HasSupport( SUPPORT_SET_ORIENTATION );
- bSetPaperSz = pPrt->HasSupport( SUPPORT_SET_PAPERSIZE );
- bSetPaperBin = !rOptions.bPaperFromSetup &&
- pPrt->HasSupport( SUPPORT_SET_PAPERBIN );
- bSetPrt = bSetOrient || bSetPaperSz || bSetPaperBin;
- }
-
- if ( rOptions.nPrintPostIts != POSTITS_ONLY )
- {
- // --> FME 2005-01-05 #110536# This valiable is used to track
- // the number of pages which actually have been printed.
- // If nPagesPrinted is odd, we have to send an additional
- // empty page to the printer if we are currently in collation
- // and duplex mode and there are still some more copies of the
- // document to print.
- USHORT nPagesPrinted = 0;
- // <--
-
- while( pStPage && !bStop )
- {
- // Mag der Anwender noch ?
- if ( pProgress )
- pProgress->Reschedule();
-
- if (pPrt)
- {
- if ( JOBSET_ERR_ERROR == nJobStartError ||
- ( !pPrt->IsJobActive() && ( !sJobName.Len() || bStartJob ) ) ||
- pShell->Imp()->IsStopPrt() )
- {
- bStop = TRUE;
- break;
- }
- }
-
- ::SetSwVisArea( pShell, pStPage->Frm(), 0 != pPDFOut );
-
- // wenn wir einen Umschlag drucken wird ein Offset beachtet
- if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
- {
- aOldMapMode = pPrtOrPDFOut->GetMapMode();
- Point aNewOrigin = pPrtOrPDFOut->GetMapMode().GetOrigin();
- aNewOrigin += rOptions.aOffset;
- MapMode aTmp( pPrtOrPDFOut->GetMapMode() );
- aTmp.SetOrigin( aNewOrigin );
- pPrtOrPDFOut->SetMapMode( aTmp );
- }
-
- const BOOL bRightPg = pStPage->OnRightPage();
- if( aMulti.IsSelected( nPageNo ) &&
- ( (bRightPg && rOptions.bPrintRightPage) ||
- (!bRightPg && rOptions.bPrintLeftPage) ) )
- {
- if ( bSetPrt )
- {
- // check for empty page
- const SwPageFrm& rFormatPage = pStPage->GetFormatPage();
-
- if ( pLastPageDesc != rFormatPage.GetPageDesc() )
- {
- pLastPageDesc = rFormatPage.GetPageDesc();
-
- const BOOL bLandScp = rFormatPage.GetPageDesc()->GetLandscape();
-
- if( bSetPaperBin ) // Schacht einstellen.
- pPrt->SetPaperBin( rFormatPage.GetFmt()->
- GetPaperBin().GetValue() );
-
- if (bSetOrient )
- {
- // Orientation einstellen: Breiter als Hoch
- // -> Landscape, sonst -> Portrait.
- if( bLandScp )
- pPrt->SetOrientation(ORIENTATION_LANDSCAPE);
- else
- pPrt->SetOrientation(ORIENTATION_PORTRAIT);
- }
-
- if (bSetPaperSz )
- {
- Size aSize = pStPage->Frm().SSize();
- if ( bLandScp && bSetOrient )
- {
- // landscape is always interpreted as a rotation by 90 degrees !
- // this leads to non WYSIWIG but at least it prints!
- // #i21775#
- long nWidth = aSize.Width();
- aSize.Width() = aSize.Height();
- aSize.Height() = nWidth;
- }
- Paper ePaper = SvxPaperInfo::GetSvxPaper(aSize,MAP_TWIP,TRUE);
- if ( PAPER_USER == ePaper )
- pPrt->SetPaperSizeUser( aSize );
- else
- pPrt->SetPaper( ePaper );
- }
- }
- }
-
- // Wenn PostIts nach Seite gedruckt werden sollen,
- // jedoch Reverse eingestellt ist ...
- if( rOptions.bPrintReverse &&
- rOptions.nPrintPostIts == POSTITS_ENDPAGE )
- lcl_PrintPostItsEndPage( pPostItShell, aPostItFields,
- nPageNo, aMulti, sJobName, bStartJob, nJobStartError,
- rOptions.bPrintRightPage, rOptions.bPrintLeftPage,
- rOptions.bPrintReverse );
-
- if ( pProgress )
- lcl_SetState( *pProgress, nPrintCount++, nSelCount,
- pStr, nMergeAct, nMergeCnt,
- nSelCount, nPageNo );
-
- if( !bStartJob && JOBSET_ERR_DEFAULT == nJobStartError
- && sJobName.Len() )
- {
- if( pPrt && !pPrt->IsJobActive() )
- {
- bStartJob = pPrt->StartJob( sJobName );
- if( !bStartJob )
- {
- nJobStartError = JOBSET_ERR_ERROR;
- continue;
- }
- }
-
- pShell->InitPrt( pPrt, pPDFOut );
-
- ::SetSwVisArea( pShell, pStPage->Frm(), 0 != pPDFOut );
- nJobStartError = JOBSET_ERR_ISSTARTET;
- }
- // --> FME 2005-12-12 #b6354161# Feature - Print empty pages
- if ( rOptions.bPrintEmptyPages || pStPage->Frm().Height() )
- // <--
- {
- if (pPrt)
- pPrt->StartPage();
-
- pStPage->GetUpper()->Paint( pStPage->Frm() );
- ++nPagesPrinted;
-
- if (pPrt)
- pPrt->EndPage();
- }
- SwPaintQueue::Repaint();
-
- // Wenn PostIts nach Seite gedruckt werden sollen ...
- if( (!rOptions.bPrintReverse) &&
- rOptions.nPrintPostIts == POSTITS_ENDPAGE )
- lcl_PrintPostItsEndPage( pPostItShell, aPostItFields,
- nPageNo, aMulti, sJobName, bStartJob, nJobStartError,
- rOptions.bPrintRightPage, rOptions.bPrintLeftPage,
- rOptions.bPrintReverse );
- }
-
- // den eventl. fuer Umschlaege modifizierte OutDevOffset wieder
- // zuruecksetzen.
- if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
- pPrtOrPDFOut->SetMapMode( aOldMapMode );
-
- if ( pStPage == pEndPage )
- {
- // --> FME 2005-01-05 #110536# Print emtpy page if
- // we are have an odd page count in collation/duplex
- // mode and there are still some copies to print:
- if ( pPrt && ( 1 == ( nPagesPrinted % 2 ) ) &&
- DUPLEX_ON == pPrt->GetDuplexMode() &&
- nCnt + 1 < nCopyCnt )
- {
- pPrt->StartPage();
- pPrt->EndPage();
- }
- // <--
-
- pStPage = 0;
- }
- else if ( rOptions.bPrintReverse )
- {
- --nPageNo;
- pStPage = (SwPageFrm*)pStPage->GetPrev();
- }
- else
- { ++nPageNo;
- pStPage = (SwPageFrm*)pStPage->GetNext();
- }
- }
- if ( bStop )
- break;
- }
+ Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
+ aNewOrigin += rPrintData.aOffset;
+ MapMode aTmp( pOutDev->GetMapMode() );
+ aTmp.SetOrigin( aNewOrigin );
+ pOutDev->SetMapMode( aTmp );
+ }
- // Wenn PostIts am Dokumentenende gedruckt werden sollen, dann hier machen
- if( ((rOptions.nPrintPostIts == POSTITS_ENDDOC) && !rOptions.bPrintReverse)
- || (rOptions.nPrintPostIts == POSTITS_ONLY) )
- lcl_PrintPostItsEndDoc( pPostItShell, aPostItFields, aMulti,
- sJobName, bStartJob, nJobStartError,
- rOptions.bPrintRightPage, rOptions.bPrintLeftPage,
- rOptions.bPrintReverse );
+ pShell->InitPrt( pOutDev );
- if( pPostItShell )
- {
- pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt
- delete pPostItShell; //Nimmt das PostItDoc mit ins Grab.
- }
+ pViewSh2 = nPage == 0 ? /* post-it page? */
+ rPrintData.GetRenderData().m_pPostItShell : pShell;
+ ::SetSwVisArea( pViewSh2, pStPage->Frm() );
- if( bStartJob )
- rOptions.bJobStartet = TRUE;
- }
-
- }
- delete pStr;
+ pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
+ SwPaintQueue::Repaint();
} //Zus. Scope wg. CurShell!
delete pShell;
if (bSelection )
{
- // damit das Dokument nicht den Drucker mit ins Grab nimmt
- pPrtDoc->setPrinter( 0, false, false );
-
- if ( !pPrtDoc->release() )
- delete pPrtDoc;
+ if ( !pOutDevDoc->release() )
+ delete pOutDevDoc;
}
- // restore settings of OutputDevicef
- if (pPDFOut)
- pPDFOut->Pop();
+ // restore settings of OutputDevice (should be done always now since the
+ // output device is now provided by a call from outside the Writer)
+ pOutDev->Pop();
- return bStartJob;
+ return sal_True;
}
/******************************************************************************
@@ -1484,7 +1269,7 @@ BOOL ViewShell::Prt( SwPrtOptions& rOptions, SfxProgress* pProgress,
-void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, SwPrtOptions& rOptions,
+void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect )
{
//Wir brauchen eine Shell fuer das Drucken. Entweder hat das Doc schon
@@ -1562,52 +1347,6 @@ BOOL ViewShell::IsAnyFieldInDoc() const
/******************************************************************************
- * Klasse : SwPrtOptSave
- * Erstellt : AMA 12.07.95
- * Aenderung : AMA 12.07.95
- * Holt sich im Ctor folgende Einstellungen des Druckers, die im Dtor dann
- * wieder im Drucker gesetzt werden (falls sie sich ueberhaupt geaendert haben)
- * - PaperBin - Orientation - PaperSize -
- ******************************************************************************/
-
-
-
-SwPrtOptSave::SwPrtOptSave( Printer *pPrinter )
- : pPrt( pPrinter )
-{
- if ( pPrt )
- {
- ePaper = pPrt->GetPaper();
- if ( PAPER_USER == ePaper )
- aSize = pPrt->GetPaperSize();
- eOrientation = pPrt->GetOrientation();
- nPaperBin = pPrt->GetPaperBin();
-
- }
-}
-
-
-
-SwPrtOptSave::~SwPrtOptSave()
-{
- if ( pPrt )
- {
- if ( PAPER_USER == ePaper )
- {
- if( pPrt->GetPaperSize() != aSize )
- pPrt->SetPaperSizeUser( aSize );
- }
- else if ( pPrt->GetPaper() != ePaper )
- pPrt->SetPaper( ePaper );
- if ( pPrt->GetOrientation() != eOrientation)
- pPrt->SetOrientation( eOrientation );
- if ( pPrt->GetPaperBin() != nPaperBin )
- pPrt->SetPaperBin( nPaperBin );
- }
-}
-
-
-/******************************************************************************
* SwDrawViewSave
*
* Saves some settings at the draw view
@@ -1633,7 +1372,7 @@ SwDrawViewSave::~SwDrawViewSave()
// OD 09.01.2003 #i6467# - method also called for page preview
-void ViewShell::PrepareForPrint( const SwPrtOptions &rOptions )
+void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
{
// Viewoptions fuer den Drucker setzen
pOpt->SetGraphic ( TRUE == rOptions.bPrintGraphic );
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 68d3a1a85e2b..c9c850448f56 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -76,6 +76,9 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
+#include <com/sun/star/awt/XImageConsumer.hpp>
+#include <com/sun/star/form/XImageProducerSupplier.hpp>
+#include <com/sun/star/form/XForm.hpp>
#include <doc.hxx>
#include <pam.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index 50cec6322339..0c85e78dc0e7 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -530,7 +530,7 @@ void OutRTF_SwFlyFrmFmt( SwRTFWriter& rRTFWrt )
rRTFWrt.SetStrm( *pSaveStrm ); // Stream-Pointer wieder zurueck
- if( aTmpStrm.GetSize() ) // gibt es SWG spezifische Attribute ??
+ if ( aTmpStrm.GetEndOfData() ) // gibt es SWG spezifische Attribute?
{
aTmpStrm.Seek( 0L );
rRTFWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << aTmpStrm << '}';
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 70756840603c..8e6b0c77b878 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -72,6 +72,7 @@
#include <fmtline.hxx>
#include <swtable.hxx>
#include <msfilter.hxx>
+#include <swmodule.hxx>
#include <writerfilter/doctok/sprmids.hxx>
@@ -1856,13 +1857,48 @@ void WW8_WrPlcFtnEdn::Append( WW8_CP nCp, const SwFmtFtn& rFtn )
aCntnt.Insert( p, aCntnt.Count() );
}
-void WW8_WrPlcPostIt::Append( WW8_CP nCp, const SwPostItField& rPostIt )
+WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt)
+{
+ mpRichText = pPostIt->GetTextObject();
+ if (!mpRichText)
+ msSimpleText = pPostIt->GetTxt();
+ msOwner = pPostIt->GetPar1();
+ maDateTime = DateTime(pPostIt->GetDate(), pPostIt->GetTime());
+}
+
+WW8_Annotation::WW8_Annotation(const SwRedlineData* pRedline) : mpRichText(0)
+{
+ msSimpleText = pRedline->GetComment();
+ msOwner = SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor());
+ maDateTime = pRedline->GetTimeStamp();
+}
+
+void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwPostItField *pPostIt )
{
aCps.Insert( nCp, aCps.Count() );
- void* p = (void*)&rPostIt;
+ WW8_Annotation* p = new WW8_Annotation(pPostIt);
aCntnt.Insert( p, aCntnt.Count() );
}
+void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwRedlineData *pRedline )
+{
+ maProcessedRedlines.insert(pRedline);
+ aCps.Insert( nCp, aCps.Count() );
+ WW8_Annotation* p = new WW8_Annotation(pRedline);
+ aCntnt.Insert( p, aCntnt.Count() );
+}
+
+bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline )
+{
+ return maProcessedRedlines.find(pRedline) == maProcessedRedlines.end();
+}
+
+WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations()
+{
+ for( USHORT n=0; n < aCntnt.Count(); n++ )
+ delete (WW8_Annotation*)aCntnt[n];
+}
+
bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
WW8_CP& rCount )
{
@@ -1882,13 +1918,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
// Anfaenge fuer PlcfAtnTxt
pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() ));
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
rWrt.WritePostItBegin();
- if (const OutlinerParaObject* pOutliner = rPFld.GetTextObject())
- rWrt.WriteOutliner(*pOutliner, nTTyp);
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
+ if (rAtn.mpRichText)
+ rWrt.WriteOutliner(*rAtn.mpRichText, nTTyp);
else
{
- String sTxt(rPFld.GetTxt());
+ String sTxt(rAtn.msSimpleText);
sTxt.SearchAndReplaceAll(0x0A, 0x0B);
rWrt.WriteStringAsPara( sTxt );
}
@@ -2015,8 +2051,8 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
// then write first the GrpXstAtnOwners
for ( i = 0; i < nLen; ++i )
{
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
- aStrArr.push_back(rPFld.GetPar1());
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
+ aStrArr.push_back(rAtn.msOwner);
}
//sort and remove duplicates
@@ -2054,10 +2090,9 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
{
for( i = 0; i < nLen; ++i )
{
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
- sal_uInt32 nDTTM =
- sw::ms::DateTime2DTTM(DateTime(rPFld.GetDate(),rPFld.GetTime()));
+ sal_uInt32 nDTTM = sw::ms::DateTime2DTTM(rAtn.maDateTime);
SwWW8Writer::WriteLong( *rWrt.pTableStrm, nDTTM );
SwWW8Writer::WriteShort( *rWrt.pTableStrm, 0 );
@@ -2137,12 +2172,12 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
{
for ( i = 0; i < nLen; ++i )
{
- const SwPostItField& rPFld = *(SwPostItField*)aCntnt[ i ];
+ const WW8_Annotation& rAtn = *(const WW8_Annotation*)aCntnt[i];
//aStrArr is sorted
myiter aIter = ::std::lower_bound(aStrArr.begin(),
- aStrArr.end(), rPFld.GetPar1());
- ASSERT(aIter != aStrArr.end() && *aIter == rPFld.GetPar1(),
+ aStrArr.end(), rAtn.msOwner);
+ ASSERT(aIter != aStrArr.end() && *aIter == rAtn.msOwner,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index fb121eb322f7..fb5ce68ec654 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3039,7 +3039,7 @@ void WW8Export::ExportDocument_Impl()
pFtn = new WW8_WrPlcFtnEdn( TXT_FTN ); // Footnotes
pEdn = new WW8_WrPlcFtnEdn( TXT_EDN ); // Endnotes
- pAtn = new WW8_WrPlcPostIt; // PostIts
+ pAtn = new WW8_WrPlcAnnotations; // PostIts
pTxtBxs = new WW8_WrPlcTxtBoxes( TXT_TXTBOX );
pHFTxtBxs = new WW8_WrPlcTxtBoxes( TXT_HFTXTBOX );
@@ -3448,7 +3448,7 @@ void WW8_WrPlcFtnEdn::WritePlc( WW8Export& rWrt ) const
}
-bool WW8_WrPlcPostIt::WriteTxt( WW8Export& rWrt )
+bool WW8_WrPlcAnnotations::WriteTxt( WW8Export& rWrt )
{
bool bRet = WriteGenericTxt( rWrt, TXT_ATN, rWrt.pFib->ccpAtn );
rWrt.pFldAtn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ),
@@ -3457,7 +3457,7 @@ bool WW8_WrPlcPostIt::WriteTxt( WW8Export& rWrt )
return bRet;
}
-void WW8_WrPlcPostIt::WritePlc( WW8Export& rWrt ) const
+void WW8_WrPlcAnnotations::WritePlc( WW8Export& rWrt ) const
{
WriteGenericPlc( rWrt, TXT_ATN, rWrt.pFib->fcPlcfandTxt,
rWrt.pFib->lcbPlcfandTxt, rWrt.pFib->fcPlcfandRef,
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 2e0b4ab7d778..83b3b7b265ed 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -109,7 +109,7 @@ class WW8_WrPlcFld;
class WW8_WrMagicTable;
class WW8_WrPlcFtnEdn;
class WW8_WrPlcPn;
-class WW8_WrPlcPostIt;
+class WW8_WrPlcAnnotations;
class MSWordSections;
class WW8_WrPlcTxtBoxes;
class WW8_WrPct; // Verwaltung
@@ -488,7 +488,7 @@ public:
WW8_WrPlcPn* pChpPlc;
MSWordAttrIter* pChpIter;
MSWordStyles* pStyles;
- WW8_WrPlcPostIt* pAtn;
+ WW8_WrPlcAnnotations* pAtn;
WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs;
const sw::Frame *mpParentFrame; //If set we are exporting content inside
@@ -1149,16 +1149,30 @@ public:
void Append( WW8_CP nCp, const SwFmtFtn& rFtn );
};
-class WW8_WrPlcPostIt : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts
+struct WW8_Annotation
+{
+ const OutlinerParaObject* mpRichText;
+ String msSimpleText;
+ String msOwner;
+ DateTime maDateTime;
+ WW8_Annotation(const SwPostItField* pPostIt);
+ WW8_Annotation(const SwRedlineData* pRedline);
+};
+
+class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts
{
private:
//No copying
- WW8_WrPlcPostIt(const WW8_WrPlcPostIt&);
- WW8_WrPlcPostIt& operator=(WW8_WrPlcPostIt&);
+ WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations&);
+ WW8_WrPlcAnnotations& operator=(WW8_WrPlcAnnotations&);
+ std::set<const SwRedlineData*> maProcessedRedlines;
public:
- WW8_WrPlcPostIt() {}
+ WW8_WrPlcAnnotations() {}
+ ~WW8_WrPlcAnnotations();
- void Append( WW8_CP nCp, const SwPostItField& rPostIt );
+ void Append( WW8_CP nCp, const SwPostItField* pPostIt );
+ void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
+ bool IsNewRedlineComment( const SwRedlineData* pRedLine );
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
};
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 54ebd5c5a9ba..b20df77e79a1 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -982,6 +982,24 @@ void WW8AttributeOutput::StartRunProperties()
m_nFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
}
+
+void WW8AttributeOutput::StartRun( const SwRedlineData* pRedlineData )
+{
+ if (pRedlineData)
+ {
+ const String &rComment = pRedlineData->GetComment();
+ //Only possible to export to main text
+ if (rComment.Len() && (m_rWW8Export.nTxtTyp == TXT_MAINTEXT))
+ {
+ if (m_rWW8Export.pAtn->IsNewRedlineComment(pRedlineData))
+ {
+ m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pRedlineData );
+ m_rWW8Export.WritePostItBegin( m_rWW8Export.pO );
+ }
+ }
+ }
+}
+
void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
{
Redline( pRedlineData );
@@ -2555,8 +2573,8 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const
void WW8AttributeOutput::PostitField( const SwField* pFld )
{
- const SwPostItField& rPFld = *(SwPostItField*)pFld;
- m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), rPFld );
+ const SwPostItField *pPFld = (const SwPostItField*)pFld;
+ m_rWW8Export.pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pPFld );
m_rWW8Export.WritePostItBegin( m_rWW8Export.pO );
}
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index 4968d88887dc..8d8516433432 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -57,8 +57,7 @@ public:
/// Start of the text run.
///
- /// No-op for binary filters.
- virtual void StartRun( const SwRedlineData* /*pRedlineData*/ ) {}
+ virtual void StartRun( const SwRedlineData* pRedlineData );
/// End of the text run.
///
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 0553267d12ed..e1c5b2509228 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -506,14 +506,15 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
// ItemSet gestopft.
void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
{
- if( nColl < nColls && pCollA[nColl].pFmt && pCollA[nColl].bColl )
+ SwWW8StyInf * pStyInf = GetStyle(nColl);
+ if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl )
{
const SfxPoolItem* pItem;
for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
{
//If we are set in the source and not set in the destination
//then add it in.
- if ( SFX_ITEM_SET == pCollA[nColl].pFmt->GetItemState(
+ if ( SFX_ITEM_SET == pStyInf->pFmt->GetItemState(
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b92f80c85290..10aa3d36d6bb 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -57,9 +57,8 @@
#include <svx/lrspitem.hxx> // SvxLRSpaceItem
#include <svx/ulspitem.hxx>
#include <svx/langitem.hxx>
-// --> OD 2005-02-28 #i43427#
#include <svx/opaqitem.hxx>
-// <--
+#include <svx/charhiddenitem.hxx>
#include <filter/msfilter/svxmsbas.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdoole2.hxx>
@@ -989,7 +988,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
SfxItemState eState = SFX_ITEM_DEFAULT;
if (const SfxItemSet *pSet = pNd->GetpSwAttrSet())
eState = pSet->GetItemState(RES_LR_SPACE, false);
- if (eState != SFX_ITEM_SET)
+ if (eState != SFX_ITEM_SET && rReader.pCollA != NULL)
pItem = &(rReader.pCollA[rReader.nAktColl].maWordLR);
}
@@ -1630,7 +1629,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sTxt, aDate );
aPostIt.SetTextObject(pOutliner);
+ pCtrlStck->NewAttr(*pPaM->GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN));
rDoc.InsertPoolItem(*pPaM, SwFmtFld(aPostIt), 0);
+ pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_HIDDEN);
return 0;
}
@@ -2163,7 +2164,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet()
eSrcCharSet = maFontSrcCharSets.top();
if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
eSrcCharSet = pCollA[nCharFmt].GetCharSet();
- if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && StyleExists(nAktColl))
eSrcCharSet = pCollA[nAktColl].GetCharSet();
if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
{ // patch from cmc for #i52786#
@@ -2221,10 +2222,13 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet()
{
if (!maFontSrcCJKCharSets.empty())
eSrcCharSet = maFontSrcCJKCharSets.top();
- if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
- eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet();
- if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
- eSrcCharSet = pCollA[nAktColl].GetCJKCharSet();
+ if (pCollA != NULL)
+ {
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
+ eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet();
+ if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
+ eSrcCharSet = pCollA[nAktColl].GetCJKCharSet();
+ }
if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
{ // patch from cmc for #i52786#
/*
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 795cfb749531..afbf4b3593c1 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -827,7 +827,8 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
{
// nur fuer SwTxtFmtColl, nicht CharFmt
// WW: 0 = no Numbering
- if (pCollA[nAktColl].bColl && *pData)
+ SwWW8StyInf * pColl = GetStyle(nAktColl);
+ if (pColl != NULL && pColl->bColl && *pData)
{
// Bereich WW:1..9 -> SW:0..8 keine Aufzaehlung / Nummerierung
@@ -861,12 +862,16 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12
{
- if( !pAktColl || nLen <= 0 // nur bei Styledef
- || !pCollA[nAktColl].bColl // CharFmt -> ignorieren
- || ( nIniFlags & WW8FL_NO_OUTLINE ) ){
- nSwNumLevel = 0xff;
- return;
+ {
+ SwWW8StyInf * pStyInf = GetStyle(nAktColl);
+ if( !pAktColl || nLen <= 0 // nur bei Styledef
+ || (pStyInf && !pStyInf->bColl) // CharFmt -> ignorieren
+ || ( nIniFlags & WW8FL_NO_OUTLINE ) ){
+ nSwNumLevel = 0xff;
+ return;
+ }
}
+
if( nSwNumLevel <= MAXLEVEL // Bereich WW:1..9 -> SW:0..8
&& nSwNumLevel <= 9 ){ // keine Aufzaehlung / Nummerierung
@@ -892,7 +897,10 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen )
SwNumRule* pNR = GetStyRule();
SetAnld(pNR, (WW8_ANLD*)pData, 0, false);
pAktColl->SetFmtAttr( SwNumRuleItem( pNR->GetName() ) );
- pCollA[nAktColl].bHasStyNumRule = true;
+
+ SwWW8StyInf * pStyInf = GetStyle(nAktColl);
+ if (pStyInf != NULL)
+ pStyInf->bHasStyNumRule = true;
}
}
@@ -1007,9 +1015,10 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
}
}
- if (!sNumRule.Len() && pCollA[nAktColl].bHasStyNumRule)
+ SwWW8StyInf * pStyInf = GetStyle(nAktColl);
+ if (!sNumRule.Len() && pStyInf->bHasStyNumRule)
{
- sNumRule = pCollA[nAktColl].pFmt->GetNumRule().GetValue();
+ sNumRule = pStyInf->pFmt->GetNumRule().GetValue();
pNumRule = rDoc.FindNumRulePtr(sNumRule);
if (!pNumRule)
sNumRule.Erase();
@@ -3918,8 +3927,8 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI)
: WW8Style(*pI->pTableStream, _rFib), maSprmParser(_rFib.GetFIBVersion()),
pIo(pI), pStStrm(pI->pTableStream), pStyRule(0), nWwNumLevel(0)
{
- pIo->pCollA = new SwWW8StyInf[ cstd ]; // Style-UEbersetzung WW->SW
pIo->nColls = cstd;
+ pIo->pCollA = cstd ? new SwWW8StyInf[ cstd ] : NULL; // Style-UEbersetzung WW->SW
}
void WW8RStyle::Set1StyleDefaults()
@@ -4691,7 +4700,7 @@ void WW8RStyle::Import()
//
// fuer z.B. Tabellen wird ein immer gueltiger Std-Style gebraucht
- if( pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid )
+ if( pIo->StyleExists(0) && pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid )
pIo->pDfltTxtFmtColl = (SwTxtFmtColl*)pIo->pCollA[0].pFmt;
else
pIo->pDfltTxtFmtColl = pIo->rDoc.GetDfltTxtFmtColl();
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f20c13889f27..55834f5c0816 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2281,22 +2281,48 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
{
+ bool failure = false;
+
// Pointer auf Pos-Array
pPLCF_PosArray = new WW8_CP[ ( nPLCF + 3 ) / 4 ];
sal_Size nOldPos = pSt->Tell();
pSt->Seek( nFilePos );
- pSt->Read( pPLCF_PosArray, nPLCF );
+ failure = pSt->GetError();
+
+ if (!failure)
+ {
+ pSt->Read( pPLCF_PosArray, nPLCF );
+ failure = pSt->GetError();
+ }
+
+ if (!failure)
+ {
#ifdef OSL_BIGENDIAN
- for( nIdx = 0; nIdx <= nIMax; nIdx++ )
- pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
- nIdx = 0;
+ for( nIdx = 0; nIdx <= nIMax; nIdx++ )
+ pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
+ nIdx = 0;
#endif // OSL_BIGENDIAN
- // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ // Pointer auf Inhalts-Array
+ pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ }
pSt->Seek( nOldPos );
+
+ ASSERT( !failure, "Document has corrupt PLCF, ignoring it" );
+
+ if (failure)
+ MakeFailedPLCF();
+}
+
+void WW8PLCF::MakeFailedPLCF()
+{
+ nIMax = 0;
+ delete[] pPLCF_PosArray;
+ pPLCF_PosArray = new INT32[2];
+ pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
+ pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
}
void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
@@ -2359,13 +2385,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
ASSERT( !failure, "Document has corrupt PLCF, ignoring it" );
if (failure)
- {
- nIMax = 0;
- delete[] pPLCF_PosArray;
- pPLCF_PosArray = new INT32[2];
- pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- }
+ MakeFailedPLCF();
}
bool WW8PLCF::SeekPos(WW8_CP nPos)
@@ -4390,15 +4410,16 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
pBkm = &aD[1];
pEdn = &aD[2];
pFtn = &aD[3];
+ pAnd = &aD[4];
-
- pPcd = ( pBase->pPLCFx_PCD ) ? &aD[4] : 0;
+ pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : 0;
//pPcdA index == pPcd index + 1
- pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[5] : 0;
- pChp = &aD[6];
- pAnd = &aD[7];
+ pPcdA = ( pBase->pPLCFx_PCDAttrs ) ? &aD[6] : 0;
+
+ pChp = &aD[7];
pPap = &aD[8];
pSep = &aD[9];
+
pSep->pPLCFx = pBase->pSepPLCF;
pFtn->pPLCFx = pBase->pFtnPLCF;
pEdn->pPLCFx = pBase->pEdnPLCF;
@@ -6240,8 +6261,11 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
+ INT32 nFFn = rFib.lcbSttbfffn - 2;
+
// allocate Font Array
- BYTE* pA = new BYTE[ rFib.lcbSttbfffn - 2 ];
+ BYTE* pA = new BYTE[ nFFn ];
+ memset(pA, 0, nFFn);
WW8_FFN* p = (WW8_FFN*)pA;
ww::WordVersion eVersion = rFib.GetFIBVersion();
@@ -6258,13 +6282,13 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.SeekRel( 2 );
// read all font information
- rSt.Read( pA, rFib.lcbSttbfffn - 2 );
+ nFFn = rSt.Read( pA, nFFn );
if( eVersion < ww::eWW8 )
{
// try to figure out how many fonts are defined here
nMax = 0;
- long nLeft = rFib.lcbSttbfffn - 2;
+ long nLeft = nFFn;
for(;;)
{
short nNextSiz;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 3547eaf99391..85c80ba51025 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -295,6 +295,8 @@ private:
machen wir uns hiermit einen PLC:
*/
void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN );
+
+ void MakeFailedPLCF();
public:
WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
WW8_CP nStartPos = -1 );
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 84c2ae9b9a95..16728ca544c9 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1132,7 +1132,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
xRef( pClipCntnr );
pClipCntnr->CopyAnyData( FORMAT_RTF, (sal_Char*)
- pStrm->GetData(), pStrm->GetSize() );
+ pStrm->GetData(), pStrm->GetEndOfData() );
pClipCntnr->CopyToClipboard(
GetView()? (Window*)&GetView()->GetEditWin() : 0 );
delete pStrm;
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 953ab1b8b8f7..8d723f64f28e 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -42,6 +42,7 @@
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/newstyle.hxx>
+#include <sfx2/printer.hxx>
#include <svl/macitem.hxx>
#include <svx/brshitem.hxx>
#include <svl/stritem.hxx>
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index c58eaa369fc0..f89046c40f74 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -1065,12 +1065,6 @@ Menu MN_PPREVIEW_POPUPMENU
HelpID = FN_PRINT_PAGEPREVIEW ;
Text [ en-US ] = "Print" ;
};
- MenuItem
- {
- Identifier = FN_PREVIEW_PRINT_OPTIONS;
- HelpID = FN_PREVIEW_PRINT_OPTIONS;
- Text [ en-US ] = "Print Options";
- };
SEPARATOR ;
MenuItem
{
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 2ada884e48c7..63ad384c7bd9 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -96,13 +96,13 @@
#define CB_CHAR_HIDDEN 61
// Print-Extra-Page
#define CB_PGRF 61
-#define CB_PTAB 62
-#define CB_PDRAW 63
+//#define CB_PTAB 62 merged with CB_PGRF in printerpullpages
+//#define CB_PDRAW 63 removed in printerpullpages
#define CB_LEFTP 64
#define CB_RIGHTP 65
-#define CB_REVERSE 66
+//#define CB_REVERSE 66 removed in printerpullpages
#define CB_PROSPECT 67
-#define CB_SINGLEJOBS 68
+//#define CB_SINGLEJOBS 68 removed in printerpullpages
#define CB_CTRLFLD 69
#define CB_PAPERFROMSETUP 70
#define FL_1 71
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 41ba789789ff..f509b1cdcc5c 100644..100755
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -215,60 +215,66 @@ TabPage TP_OPTPRINT_PAGE
Text [ en-US ] = "Contents" ;
Group = TRUE ;
};
- CheckBox CB_PGRF
+ CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "~Graphics" ;
+ Text [ en-US ] = "~Pictures and objects" ;
TabStop = TRUE ;
Group = TRUE ;
};
+/*
+ removed, tables now always get printed
CheckBox CB_PTAB
{
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Tables" ;
};
+*/
+/*
+ functionally merged with CB_PGRF (pictures and graphics)
CheckBox CB_PDRAW
{
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Dra~wings" ;
};
+*/
CheckBox CB_CTRLFLD
{
- Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Control~s" ;
+ Text [ en-US ] = "Form control~s" ;
};
CheckBox CB_BACKGROUND
{
- Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Ba~ckground" ;
+ Text [ en-US ] = "Page ba~ckground" ;
};
CheckBox CB_BLACK_FONT
{
- Pos = MAP_APPFONT ( 12 , 79 ) ;
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Print blac~k" ;
+ Text [ en-US ] = "Print text in blac~k" ;
};
CheckBox CB_HIDDEN_TEXT
{
- Pos = MAP_APPFONT ( 12 , 92 ) ;
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Hidden te~xt" ;
};
CheckBox CB_TEXT_PLACEHOLDER
{
- Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Text ~placeholder" ;
};
FixedLine FL_SEP_PRT_LEFT
{
Pos = MAP_APPFONT ( 85 , 14 ) ;
- Size = MAP_APPFONT ( 4 , 104 ) ;
+ Size = MAP_APPFONT ( 4 , 78 ) ;
Vert = TRUE;
};
FixedLine FL_2
@@ -292,21 +298,24 @@ TabPage TP_OPTPRINT_PAGE
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Right pages" ;
};
+/*
+ removed, noe handled by the new print dialog (i.e. vcl) itself
CheckBox CB_REVERSE
{
Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Re~versed" ;
};
+*/
CheckBox CB_PROSPECT
{
- Pos = MAP_APPFONT ( 96 , 53 ) ;
+ Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Broch~ure" ;
};
CheckBox CB_PROSPECT_RTL
{
- Pos = MAP_APPFONT ( 103 , 66 ) ;
+ Pos = MAP_APPFONT ( 103 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Right to Left" ;
Text [ x-comment ] = " ";
@@ -340,7 +349,7 @@ TabPage TP_OPTPRINT_PAGE
FixedLine FL_SEP_PRT_RIGHT
{
Pos = MAP_APPFONT ( 169 , 14 ) ;
- Size = MAP_APPFONT ( 4 , 104 ) ;
+ Size = MAP_APPFONT ( 4 , 78 ) ;
Vert = TRUE;
};
FixedLine FL_3
@@ -352,35 +361,37 @@ TabPage TP_OPTPRINT_PAGE
};
FixedLine FL_4
{
- Pos = MAP_APPFONT ( 6 , 121 ) ;
+ Pos = MAP_APPFONT ( 6 , 95 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "Other";
};
CheckBox CB_PRINTEMPTYPAGES
{
- Pos = MAP_APPFONT ( 12 , 132 ) ;
+ Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Print ~automatically inserted blank pages";
};
+/*
CheckBox CB_SINGLEJOBS
{
- Pos = MAP_APPFONT ( 12 , 145 ) ;
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Create s~ingle print jobs" ;
};
+*/
CheckBox CB_PAPERFROMSETUP
{
- Pos = MAP_APPFONT ( 12 , 158 ) ;
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Paper tray from printer settings";
};
FixedText FT_FAX
{
- Pos = MAP_APPFONT ( 12 , 173 ) ;
+ Pos = MAP_APPFONT ( 12 , 134 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "~Fax";
@@ -388,7 +399,7 @@ TabPage TP_OPTPRINT_PAGE
ListBox LB_FAX
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 70 , 171 ) ;
+ Pos = MAP_APPFONT ( 70 , 132 ) ;
Size = MAP_APPFONT ( 184 , 70 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
@@ -935,3 +946,55 @@ TabPage TP_OPTSHDWCRSR
};
};
+
+StringArray STR_PRINTOPTUI
+{
+ ItemList [en-US] =
+ {
+ < "%PRODUCTNAME %s"; >;
+ < "Contents"; >;
+ < "Page ba~ckground"; >;
+ < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >;
+ < "~Pictures and objects"; >;
+ < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >;
+ < "Hidden te~xt"; >;
+ < "Enable this option to print text that is marked as hidden."; >;
+ < "~Text placeholder"; >;
+ < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >;
+ < "Form control~s"; >;
+ < "Specifies whether the form control fields of the text document are printed"; >;
+ < "Color"; >;
+ < "Print text in blac~k"; >;
+ < "Specifies whether to always print text in black."; >;
+ < "Pages"; >;
+ < "Print ~automatically inserted blank pages"; >;
+ < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >;
+ < "~Use only paper tray from printer preferences"; >;
+ < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >;
+ < "Print"; >;
+ < "None (document only)"; >;
+ < "Comments only"; >;
+ < "Place at end of document"; >;
+ < "Place at end of page"; >;
+ < "Specify where to print comments (if any)."; >;
+ < "~Comments"; >;
+ < "Page sides";>;
+ < "All pages"; >;
+ < "Back sides / left pages"; >;
+ < "Front sides / right pages"; >;
+ < "Specify which pages to include in the output"; >;
+ < "Include"; >;
+ < "Broch~ure"; >;
+ < "Select the Brochure option to print the document in brochure format."; >;
+ < "Left-to-right script"; >;
+ < "Right-to-left script"; >;
+ < "Ranges and copies"; >;
+ < "~All pages"; >;
+ < "Print the whole document."; >;
+ < "Pa~ges"; >;
+ < "Print a range of pages of the document."; >;
+ < "~Selection"; >;
+ < "Print only the selected parts of the document"; >;
+ };
+};
+
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index b206bce741fd..84e8958fa977 100644..100755
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -350,8 +350,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
SfxTabPage( pParent, SW_RES( TP_OPTPRINT_PAGE ), rCoreSet),
aFL1 (this, SW_RES(FL_1)),
aGrfCB (this, SW_RES(CB_PGRF)),
- aTabCB (this, SW_RES(CB_PTAB)),
- aDrawCB (this, SW_RES(CB_PDRAW)),
+// aTabCB (this, SW_RES(CB_PTAB)),
+// aDrawCB (this, SW_RES(CB_PDRAW)),
aCtrlFldCB (this, SW_RES(CB_CTRLFLD)),
aBackgroundCB (this, SW_RES(CB_BACKGROUND)),
aBlackFontCB (this, SW_RES(CB_BLACK_FONT)),
@@ -361,7 +361,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL2 (this, SW_RES(FL_2)),
aLeftPageCB (this, SW_RES(CB_LEFTP)),
aRightPageCB (this, SW_RES(CB_RIGHTP)),
- aReverseCB (this, SW_RES(CB_REVERSE)),
+// aReverseCB (this, SW_RES(CB_REVERSE)),
aProspectCB (this, SW_RES(CB_PROSPECT)),
aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
@@ -372,7 +372,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL3 (this, SW_RES(FL_3)),
aFL4 (this, SW_RES(FL_4)),
aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
- aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
+// aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
@@ -386,14 +386,14 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aGrfCB.SetClickHdl( aLk );
aRightPageCB.SetClickHdl( aLk );
aLeftPageCB.SetClickHdl( aLk );
- aTabCB.SetClickHdl( aLk );
- aDrawCB.SetClickHdl( aLk );
+// aTabCB.SetClickHdl( aLk );
+// aDrawCB.SetClickHdl( aLk );
aCtrlFldCB.SetClickHdl( aLk );
aBackgroundCB.SetClickHdl( aLk );
aBlackFontCB.SetClickHdl( aLk );
aPrintHiddenTextCB.SetClickHdl( aLk );
aPrintTextPlaceholderCB.SetClickHdl( aLk );
- aReverseCB.SetClickHdl( aLk );
+// aReverseCB.SetClickHdl( aLk );
aProspectCB.SetClickHdl( aLk );
aProspectCB_RTL.SetClickHdl( aLk );
aPaperFromSetupCB.SetClickHdl( aLk );
@@ -402,27 +402,40 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aEndRB.SetClickHdl( aLk );
aOnlyRB.SetClickHdl( aLk );
aNoRB.SetClickHdl( aLk );
- aSingleJobsCB.SetClickHdl( aLk );
+// aSingleJobsCB.SetClickHdl( aLk );
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
- aDrawCB .Hide();
+// aDrawCB .Hide();
aLeftPageCB .Hide();
aRightPageCB .Hide();
aPrintHiddenTextCB.Hide();
aPrintTextPlaceholderCB.Hide();
- Point rPt(aReverseCB .GetPosPixel());
- rPt.setX(rPt.getX() + 15); // indent
- aProspectCB_RTL.SetPosPixel(rPt);
- aReverseCB.SetPosPixel(aLeftPageCB .GetPosPixel());
- aProspectCB.SetPosPixel(aRightPageCB .GetPosPixel());
- aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
- aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
- aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
- aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
+// aReverseCB.SetPosPixel(aLeftPageCB.GetPosPixel());
+ aProspectCB.SetPosPixel(aLeftPageCB.GetPosPixel());
+ Point aPt( aRightPageCB.GetPosPixel() );
+ aPt.setX(aPt.getX() + 15); // indent
+ aProspectCB_RTL.SetPosPixel(aPt);
+// aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
+// aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
+// aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
+// aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
+
+ // hide aPrintEmptyPagesCB and move everything below up accordingly
+ long nDeltaY = aPaperFromSetupCB.GetPosPixel().getY() - aPrintEmptyPagesCB.GetPosPixel().getY();
+ aPrintEmptyPagesCB.Hide();
+ aPt = aPaperFromSetupCB.GetPosPixel();
+ aPt.setY( aPt.getY() - nDeltaY );
+ aPaperFromSetupCB.SetPosPixel( aPt );
+ aPt = aFaxFT.GetPosPixel();
+ aPt.setY( aPt.getY() - nDeltaY );
+ aFaxFT.SetPosPixel( aPt );
+ aPt = aFaxLB.GetPosPixel();
+ aPt.setY( aPt.getY() - nDeltaY );
+ aFaxLB.SetPosPixel( aPt );
}
aProspectCB_RTL.Disable();
SvtCTLOptions aCTLOptions;
@@ -465,22 +478,22 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
- aAddPrinterAttr.bPrintTable = aTabCB.IsChecked();
- aAddPrinterAttr.bPrintDraw = aDrawCB.IsChecked();
+ aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
+ aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/;
aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
aAddPrinterAttr.bPrintBlackFont = aBlackFontCB.IsChecked();
aAddPrinterAttr.bPrintHiddenText = aPrintHiddenTextCB.IsChecked();
aAddPrinterAttr.bPrintTextPlaceholder = aPrintTextPlaceholderCB.IsChecked();
- aAddPrinterAttr.bPrintLeftPage = aLeftPageCB.IsChecked();
- aAddPrinterAttr.bPrintRightPage = aRightPageCB.IsChecked();
- aAddPrinterAttr.bPrintReverse = aReverseCB.IsChecked();
- aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
- aAddPrinterAttr.bPrintProspect_RTL = aProspectCB_RTL.IsChecked();
- aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
- aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
- aAddPrinterAttr.bPrintSingleJobs = aSingleJobsCB.IsChecked();
+ aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked();
+ aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked();
+ aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
+ aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked();
+ aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
+ aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
+ aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_NONE;
@@ -508,22 +521,22 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
(const SfxPoolItem**)&pAddPrinterAttr ))
{
- aGrfCB.Check( pAddPrinterAttr->bPrintGraphic);
- aTabCB.Check( pAddPrinterAttr->bPrintTable);
- aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
+ aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
+// aTabCB.Check( pAddPrinterAttr->bPrintTable);
+// aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
aCtrlFldCB.Check( pAddPrinterAttr->bPrintControl);
aBackgroundCB.Check( pAddPrinterAttr->bPrintPageBackground);
aBlackFontCB.Check( pAddPrinterAttr->bPrintBlackFont);
aPrintHiddenTextCB.Check( pAddPrinterAttr->bPrintHiddenText);
aPrintTextPlaceholderCB.Check(pAddPrinterAttr->bPrintTextPlaceholder);
- aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPage);
- aRightPageCB.Check( pAddPrinterAttr->bPrintRightPage);
- aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
+ aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPages);
+ aRightPageCB.Check( pAddPrinterAttr->bPrintRightPages);
+// aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
aPaperFromSetupCB.Check(pAddPrinterAttr->bPaperFromSetup);
aPrintEmptyPagesCB.Check(pAddPrinterAttr->bPrintEmptyPages);
aProspectCB.Check( pAddPrinterAttr->bPrintProspect);
- aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspect_RTL);
- aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
+ aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspectRTL);
+// aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
aNoRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_NONE ) ;
aOnlyRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ONLY ) ;
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index 31f3dde739c7..68f86cae4639 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -69,8 +69,8 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames()
"Page/LeftPage", // 13 not in SW/Web
"Page/RightPage", // 14 not in SW/Web
"EmptyPages", // 15 not in SW/Web
- "Content/PrintPlaceholders", // 16 not in Sw/Web
- "Content/PrintHiddenText" // 17
+ "Content/PrintPlaceholders", // 16 not in Sw/Web
+ "Content/PrintHiddenText" // 17 not in Sw/Web
};
const int nCount = bIsWeb ? 12 : 18;
Sequence<OUString> aNames(nCount);
@@ -92,6 +92,8 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
bPrintPageBackground = !bWeb;
bPrintBlackFont = bWeb;
bPrintTextPlaceholder = bPrintHiddenText = sal_False;
+ if (bWeb)
+ bPrintEmptyPages = sal_False;
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
@@ -119,13 +121,13 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
break;
case 6: bPrintReverse = *(sal_Bool*)pValues[nProp].getValue(); break;
case 7: bPrintProspect = *(sal_Bool*)pValues[nProp].getValue(); break;
- case 8: bPrintProspect_RTL = *(sal_Bool*)pValues[nProp].getValue(); break;
+ case 8: bPrintProspectRTL = *(sal_Bool*)pValues[nProp].getValue(); break;
case 9: bPrintSingleJobs = *(sal_Bool*)pValues[nProp].getValue(); break;
case 10: pValues[nProp] >>= sFaxName; break;
case 11: bPaperFromSetup = *(sal_Bool*)pValues[nProp].getValue(); break;
case 12: bPrintDraw = *(sal_Bool*)pValues[nProp].getValue() ; break;
- case 13: bPrintLeftPage = *(sal_Bool*)pValues[nProp].getValue(); break;
- case 14: bPrintRightPage = *(sal_Bool*)pValues[nProp].getValue(); break;
+ case 13: bPrintLeftPages = *(sal_Bool*)pValues[nProp].getValue(); break;
+ case 14: bPrintRightPages = *(sal_Bool*)pValues[nProp].getValue(); break;
case 15: bPrintEmptyPages = *(sal_Bool*)pValues[nProp].getValue(); break;
case 16: bPrintTextPlaceholder = *(sal_Bool*)pValues[nProp].getValue(); break;
case 17: bPrintHiddenText = *(sal_Bool*)pValues[nProp].getValue(); break;
@@ -133,6 +135,12 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
}
}
}
+
+ // currently there is just one checkbox for print drawings and print graphics
+ // In the UI. (File/Print dialog and Tools/Options/.../Print)
+ // And since print graphics is the only available in Writer and WrtierWeb ...
+
+ bPrintDraw = bPrintGraphic;
}
/* -----------------------------06.09.00 16:50--------------------------------
@@ -167,18 +175,24 @@ void SwPrintOptions::Commit()
case 5: pValues[nProp] <<= (sal_Int32)nPrintPostIts ; break;
case 6: bVal = bPrintReverse ; pValues[nProp].setValue(&bVal, rType); break;
case 7: bVal = bPrintProspect ; pValues[nProp].setValue(&bVal, rType); break;
- case 8: bVal = bPrintProspect_RTL ; pValues[nProp].setValue(&bVal, rType); break;
+ case 8: bVal = bPrintProspectRTL ; pValues[nProp].setValue(&bVal, rType); break;
case 9: bVal = bPrintSingleJobs ; pValues[nProp].setValue(&bVal, rType); break;
case 10: pValues[nProp] <<= sFaxName; break;
case 11: bVal = bPaperFromSetup ; pValues[nProp].setValue(&bVal, rType); break;
case 12: bVal = bPrintDraw ; pValues[nProp].setValue(&bVal, rType); break;
- case 13: bVal = bPrintLeftPage ; pValues[nProp].setValue(&bVal, rType); break;
- case 14: bVal = bPrintRightPage ; pValues[nProp].setValue(&bVal, rType); break;
+ case 13: bVal = bPrintLeftPages ; pValues[nProp].setValue(&bVal, rType); break;
+ case 14: bVal = bPrintRightPages ; pValues[nProp].setValue(&bVal, rType); break;
case 15: bVal = bPrintEmptyPages ; pValues[nProp].setValue(&bVal, rType); break;
case 16: bVal = bPrintTextPlaceholder; pValues[nProp].setValue(&bVal, rType); break;
case 17: bVal = bPrintHiddenText; pValues[nProp].setValue(&bVal, rType); break;
}
}
+
+ // currently there is just one checkbox for print drawings and print graphics
+ // In the UI. (File/Print dialog and Tools/Options/.../Print)
+ // And since print graphics is the only available in Writer and WrtierWeb ...
+ bPrintDraw = bPrintGraphic;
+
PutProperties(aNames, aValues);
}
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 329316dcb21a..07ba1564c5ef 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -73,7 +73,7 @@
#include <svl/zformat.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
-#include <sfx2/printer.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/progress.hxx>
#include <sfx2/dispatch.hxx>
@@ -454,80 +454,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
bRet = Merge(&rMergeDesc.rSh); // Mischen
break;
- case DBMGR_MERGE_MAILMERGE: // Serienbrief
- {
- SwView& rView = rMergeDesc.rSh.GetView();
- SfxDispatcher *pDis = rView.GetViewFrame()->GetDispatcher();
- SfxItemSet aPrintArgs( rView.GetPool(),
- SID_SILENT, SID_SILENT, //5528
- SID_ASYNCHRON, SID_ASYNCHRON, //5811
- SID_PRINT_FIRST_PAGE, SID_PRINT_FIRST_PAGE, // 5001
- SID_PRINT_LAST_PAGE, SID_PRINT_LAST_PAGE, // 5002
- SID_PRINT_COPIES, SID_PRINT_COPIES, // 5003
- SID_PRINTER_NAME, SID_PRINTER_NAME, //5322
- SID_SELECTION, SID_SELECTION, //5346
- SID_FILE_NAME, SID_FILE_NAME, // 5507
- SID_PRINT_PAGES, SID_PRINT_PAGES, //6589
- SID_PRINT_COLLATE, SID_PRINT_COLLATE, //6590
- FN_QRY_MERGE, FN_QRY_MERGE,
- 0 );
- aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
-
- // !! Currently (Jan-2003) silent is defined by supplying *any*
- // !! item!! (Thus according to OS it would be silent even when
- // !! other items then SID_SILENT would be supplied!)
- // !! Therefore it has to be the 0 pointer when not silent.
- if(IsMergeSilent())
- {
- aPrintArgs.Put( SfxBoolItem(SID_SILENT, TRUE) );
- // #i25686# printing should be done asynchronously to prevent dangling offices
- // when mail merge is called as command line macro
- // #i52629# aynchronous printing should only be done in silent mode - otherwise
- // the printer dialog does not come up
- aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDesc.bPrintAsync ));
- }
- // convert PropertyValues
- const beans::PropertyValue* pPrintOptions = rMergeDesc.aPrintOptions.getConstArray();
- for( sal_Int32 nOption = 0; nOption < rMergeDesc.aPrintOptions.getLength(); ++nOption)
- {
- if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" ))
- {
- sal_Int16 nCopies = 0;
- if((pPrintOptions[nOption].Value >>= nCopies) && nCopies > 0)
- aPrintArgs.Put( SfxInt16Item( SID_PRINT_COPIES, nCopies ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "FileName" ))
- {
- ::rtl::OUString sFileName;
- if( (pPrintOptions[nOption].Value >>= sFileName) && sFileName.getLength() > 0)
- aPrintArgs.Put( SfxStringItem( SID_FILE_NAME, sFileName ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "Collate" ))
- {
- sal_Bool bCollate = sal_False;
- if( pPrintOptions[nOption].Value >>= bCollate )
- aPrintArgs.Put( SfxBoolItem( SID_PRINT_COLLATE, bCollate ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "Pages" ))
- {
- ::rtl::OUString sPages;
- if( (pPrintOptions[nOption].Value >>= sPages) && sPages.getLength() )
- aPrintArgs.Put( SfxStringItem( SID_PRINT_PAGES, sPages ));
- }
- else if( pPrintOptions[nOption].Name.equalsAscii( "Wait" ))
- {
- sal_Bool bWait = sal_False;
- if( pPrintOptions[nOption].Value >>= bWait )
- aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, !bWait ));
- }
-
- }
- pDis->Execute( SID_PRINTDOC,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
- aPrintArgs );
- }
- break;
-
+ case DBMGR_MERGE_MAILMERGE: // printing merge from 'old' merge dialog or from UNO-component
case DBMGR_MERGE_MAILING:
case DBMGR_MERGE_MAILFILES:
case DBMGR_MERGE_SINGLE_FILE:
@@ -853,323 +780,6 @@ SwNewDBMgr::~SwNewDBMgr()
}
delete pImpl;
}
-/*--------------------------------------------------------------------
- Beschreibung: Serienbrief drucken
- --------------------------------------------------------------------*/
-
-
-BOOL SwNewDBMgr::MergePrint( SwView& rView,
- SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI )
-{
- SwWrtShell* pSh = &rView.GetWrtShell();
- //check if the doc is synchronized and contains at least one linked section
- BOOL bSynchronizedDoc = pSh->IsLabelDoc() && pSh->GetSectionFmtCount() > 1;
- //merge source is already open
- rOpt.nMergeCnt = 0;
- //#i56195# no field update while printing mail merge documents
- rOpt.bUpdateFieldsInPrinting = sal_False;
- if(pImpl->pMergeData)
- {
- if(pImpl->pMergeData->aSelection.getLength())
- rOpt.nMergeCnt = pImpl->pMergeData->aSelection.getLength();
- else if(pImpl->pMergeData->xResultSet.is())
- {
- sal_Int32 nCount;
- if( lcl_getCountFromResultSet( nCount, pImpl->pMergeData->xResultSet ) )
- rOpt.nMergeCnt = (ULONG)nCount;
- }
- }
-
- SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- pModOpt->SetSinglePrintJob(rOpt.IsPrintSingleJobs());
-
- SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false );
- Link aSfxSaveLnk = pPrt->GetEndPrintHdl();
- if( rOpt.IsPrintSingleJobs() )
- pPrt->SetEndPrintHdl( Link() );
-
- BOOL bUserBreak = FALSE,
- bRet = FALSE;
- long nStartRow, nEndRow;
- //calculate number of data sets to be printed
-
- Sequence<PropertyValue> aViewProperties(16);
- PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[0].Name = C2U("MailMergeCount");
- pViewProperties[0].Value <<= (sal_Int32)rOpt.nMergeCnt;
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)rOpt.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)rOpt.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)rOpt.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)rOpt.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)rOpt.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)rOpt.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)rOpt.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)rOpt.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= rOpt.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) rOpt.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)rOpt.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)rOpt.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)rOpt.IsPrintBlackFont();
- pViewProperties[14].Name = C2U("IsSinglePrintJob");
- pViewProperties[14].Value <<= (sal_Bool)rOpt.IsPrintSingleJobs();
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)rOpt.IsPrintEmptyPages();
-
- rView.SetAdditionalPrintOptions(aViewProperties);
- do {
- nStartRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0;
- {
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE), pSh->GetView().GetViewFrame()->GetObjectShell()));
- pSh->ViewShell::UpdateFlds();
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE_FINISHED), pSh->GetView().GetViewFrame()->GetObjectShell()));
- ++rOpt.nMergeAct;
-
- // launch MailMergeEvent if required
- const SwXMailMerge *pEvtSrc = GetMailMergeEvtSrc();
- if (pEvtSrc)
- {
- uno::Reference< XInterface > xRef( (XMailMergeBroadcaster *) pEvtSrc );
- text::MailMergeEvent aEvt( xRef, rView.GetDocShell()->GetModel() );
- pEvtSrc->LaunchMailMergeEvent( aEvt );
- }
-
- rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren
- if( rOpt.IsPrintSingleJobs() && bRet )
- {
- //rOpt.bJobStartet = FALSE;
- bRet = FALSE;
- }
-
- bMergeLock = TRUE;
- if(rOpt.IsPrintProspect())
- {
- if( ! pPrt->IsJobActive() )
- {
- pPrt->SetJobValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
- String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
- pPrt->StartJob( rOpt.GetJobName() );
- }
- if( pPrt->IsJobActive() )
- {
- pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() );
- bRet = TRUE;
- }
- }
- else if( pSh->Prt( rOpt, &rProgress ) )
- bRet = TRUE;
- bMergeLock = FALSE;
-
- if( !pPrt->IsJobActive() )
- {
- bUserBreak = TRUE;
- bRet = FALSE;
- break;
- }
- if( !rOpt.IsPrintSingleJobs() )
- {
- String& rJNm = (String&)rOpt.GetJobName();
- rJNm.Erase();
- }
- }
- nEndRow = pImpl->pMergeData ? pImpl->pMergeData->xResultSet->getRow() : 0;
- } while( bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord());
-
- if( rOpt.IsPrintSingleJobs() )
- {
- SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true );
- pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk );
- if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet?
- aSfxSaveLnk.Call( pTmpPrinter );
- }
-
- rOpt.nMergeCnt = 0;
- rOpt.nMergeAct = 0;
-
- nMergeType = DBMGR_INSERT;
-
- SwDocShell* pDocSh = rView.GetDocShell();
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(pDocSh);
-
- while (pTmpFrm) // Alle Views Invalidieren
- {
- SwView *pVw = PTR_CAST(SwView, pTmpFrm->GetViewShell());
- if (pVw)
- pVw->GetEditWin().Invalidate();
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, pDocSh);
- }
-
- return bRet;
-}
-/*-- 21.06.2004 09:08:16---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-BOOL SwNewDBMgr::MergePrintDocuments( SwView& rView,
- SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI )
-{
- SwWrtShell* pSh = &rView.GetWrtShell();
- //check if the doc is synchronized and contains at least one linked section
- //merge source is already open
- rOpt.nMergeCnt = 0;
- rOpt.SetPrintSingleJobs( sal_True );
-
- SfxPrinter *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( false );
- Link aSfxSaveLnk = pPrt->GetEndPrintHdl();
- if( rOpt.IsPrintSingleJobs() )
- pPrt->SetEndPrintHdl( Link() );
-
- BOOL bUserBreak = FALSE,
- bRet = FALSE;
- //calculate number of data sets to be printed
-
- Sequence<PropertyValue> aViewProperties(16);
- PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[0].Name = C2U("MailMergeCount");
- pViewProperties[0].Value <<= (sal_Int32)rOpt.nMergeCnt;
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)rOpt.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)rOpt.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)rOpt.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)rOpt.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)rOpt.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)rOpt.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)rOpt.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)rOpt.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= rOpt.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) rOpt.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)rOpt.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)rOpt.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)rOpt.IsPrintBlackFont();
- pViewProperties[14].Name = C2U("IsSinglePrintJob");
- pViewProperties[14].Value <<= (sal_Bool)rOpt.IsPrintSingleJobs();
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)rOpt.IsPrintEmptyPages();
-
- rView.SetAdditionalPrintOptions(aViewProperties);
-
- SwMailMergeConfigItem* pConfigItem = rView.GetMailMergeConfigItem();
- DBG_ASSERT(pConfigItem, "mail merge config item is missing");
- if(!pConfigItem)
- return sal_False;
-
- USHORT nDocStart = pConfigItem->GetPrintRangeStart();
- USHORT nDocEnd = pConfigItem->GetPrintRangeEnd();
- DBG_ASSERT(nDocStart < nDocEnd && nDocEnd <= pConfigItem->GetMergedDocumentCount(),
- "merge print settings are not correct");
-
- for( sal_uInt32 nPrintDocument = nDocStart; nPrintDocument < nDocEnd; ++nPrintDocument)
- {
- SwDocMergeInfo& rDocInfo = pConfigItem->GetDocumentMergeInfo(nPrintDocument);
- rOpt.aMulti.SelectAll(FALSE);
- rOpt.aMulti.Select(Range( rDocInfo.nStartPageInTarget, rDocInfo.nEndPageInTarget ), TRUE );
-
- ++rOpt.nMergeAct;
-
- // launch MailMergeEvent if required
- const SwXMailMerge *pEvtSrc = GetMailMergeEvtSrc();
- if (pEvtSrc)
- {
- uno::Reference< XInterface > xRef( (XMailMergeBroadcaster *) pEvtSrc );
- text::MailMergeEvent aEvt( xRef, rView.GetDocShell()->GetModel() );
- pEvtSrc->LaunchMailMergeEvent( aEvt );
- }
-
- String aTmp;
- aTmp += String::CreateFromInt32( rDocInfo.nStartPageInTarget );
- aTmp += '-';
- aTmp += String::CreateFromInt32( rDocInfo.nEndPageInTarget );
-
- Sequence<PropertyValue> aAddViewProperties(1);
- PropertyValue* pAddViewProperties = aAddViewProperties.getArray();
- pAddViewProperties[0].Name = C2U("Pages");
- pAddViewProperties[0].Value <<= ::rtl::OUString( aTmp );
- rView.SetAdditionalPrintOptions(aAddViewProperties);
-
- rView.SfxViewShell::Print( rProgress, bIsAPI ); // ggf Basic-Macro ausfuehren
- if( rOpt.IsPrintSingleJobs() && bRet )
- {
- //rOpt.bJobStartet = FALSE;
- bRet = FALSE;
- }
-
- bMergeLock = TRUE;
- if(rOpt.IsPrintProspect())
- {
- if( pPrt->IsJobActive() || pPrt->StartJob( rOpt.GetJobName() ))
- {
- pSh->PrintProspect( rOpt, rProgress, rOpt.IsPrintProspect_RTL() );
- bRet = TRUE;
- }
- }
- else if( pSh->Prt( rOpt, &rProgress ) )
- bRet = TRUE;
- bMergeLock = FALSE;
-
- if( !pPrt->IsJobActive() )
- {
- bUserBreak = TRUE;
- bRet = FALSE;
- break;
- }
- if( !rOpt.IsPrintSingleJobs() )
- {
- String& rJNm = (String&)rOpt.GetJobName();
- rJNm.Erase();
- }
- }
-
- if( rOpt.IsPrintSingleJobs() )
- {
- SfxPrinter* pTmpPrinter = pSh->getIDocumentDeviceAccess()->getPrinter( true );
- pTmpPrinter->SetEndPrintHdl( aSfxSaveLnk );
- if ( !bUserBreak && !pTmpPrinter->IsJobActive() ) //Schon zu spaet?
- aSfxSaveLnk.Call( pTmpPrinter );
- }
-
- rOpt.nMergeCnt = 0;
- rOpt.nMergeAct = 0;
-
- nMergeType = DBMGR_INSERT;
-
- SwDocShell* pDocSh = rView.GetDocShell();
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(pDocSh);
-
- while (pTmpFrm) // Alle Views Invalidieren
- {
- SwView *pVw = PTR_CAST(SwView, pTmpFrm->GetViewShell());
- if (pVw)
- pVw->GetEditWin().Invalidate();
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, pDocSh);
- }
-
- return bRet;
-}
-
-
/*--------------------------------------------------------------------
Beschreibung: Serienbriefe als einzelne Dokumente speichern
@@ -1317,6 +927,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
SfxObjectShellRef xTargetDocShell;
+ SwView* pTargetView = 0;
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
String sStartingPageDesc;
@@ -1329,7 +940,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
xTargetDocShell->DoInitNew( 0 );
SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE );
- SwView* pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() );
+ pTargetView = static_cast<SwView*>( pTargetFrame->GetViewShell() );
//initiate SelectShell() to create sub shells
pTargetView->AttrChangedNotify( &pTargetView->GetWrtShell() );
@@ -1650,27 +1261,83 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// save the single output document
if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
{
- DBG_ASSERT( aTempFile.get(), "Temporary file not available" );
- INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
- SfxMedium* pDstMed = new SfxMedium(
- aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
- STREAM_STD_READWRITE, TRUE );
- pDstMed->SetFilter( pStoreToFilter );
- if(pDstMed->GetItemSet())
+ if( rMergeDescriptor.nMergeType != DBMGR_MERGE_MAILMERGE )
{
- if(pStoreToFilterOptions )
- pDstMed->GetItemSet()->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, *pStoreToFilterOptions));
- if(rMergeDescriptor.aSaveToFilterData.getLength())
- pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData)));
- }
+ DBG_ASSERT( aTempFile.get(), "Temporary file not available" );
+ INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
+ SfxMedium* pDstMed = new SfxMedium(
+ aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
+ STREAM_STD_READWRITE, TRUE );
+ pDstMed->SetFilter( pStoreToFilter );
+ if(pDstMed->GetItemSet())
+ {
+ if(pStoreToFilterOptions )
+ pDstMed->GetItemSet()->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, *pStoreToFilterOptions));
+ if(rMergeDescriptor.aSaveToFilterData.getLength())
+ pDstMed->GetItemSet()->Put(SfxUsrAnyItem(SID_FILTER_DATA, makeAny(rMergeDescriptor.aSaveToFilterData)));
+ }
- xTargetDocShell->DoSaveAs(*pDstMed);
- xTargetDocShell->DoSaveCompleted(pDstMed);
- if( xTargetDocShell->GetError() )
+ xTargetDocShell->DoSaveAs(*pDstMed);
+ xTargetDocShell->DoSaveCompleted(pDstMed);
+ if( xTargetDocShell->GetError() )
+ {
+ // error message ??
+ ErrorHandler::HandleError( xTargetDocShell->GetError() );
+ bLoop = FALSE;
+ }
+ }
+ else if( pTargetView ) // must be available!
{
- // error message ??
- ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = FALSE;
+ //print the target document
+ #if OSL_DEBUG_LEVEL > 1
+ sal_Bool _bVal;
+ sal_Int16 _nVal;
+ rtl::OUString _sVal;
+ const beans::PropertyValue* pDbgPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray();
+ for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption)
+ {
+ rtl::OUString aName( pDbgPrintOptions[nOption].Name );
+ uno::Any aVal( pDbgPrintOptions[nOption].Value );
+ aVal >>= _bVal;
+ aVal >>= _nVal;
+ aVal >>= _sVal;
+ }
+ #endif
+ // printing should be done synchronously otherwise the document
+ // might already become invalid during the process
+ uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions );
+ const sal_Int32 nOpts = aOptions.getLength();
+ aOptions.realloc( nOpts + 1 );
+ aOptions[ nOpts ].Name = rtl::OUString::createFromAscii( "Wait" );
+ aOptions[ nOpts ].Value <<= sal_True ;
+// aPrintArgs.Put(SfxBoolItem(FN_QRY_MERGE, TRUE) );
+// // #i52629# aynchronous printing should only be done in silent mode - otherwise
+// // the printer dialog does not come up
+// aPrintArgs.Put( SfxBoolItem( SID_ASYNCHRON, rMergeDescriptor.bPrintAsync ));
+ // move print options
+ const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray();
+ for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption)
+ {
+ if( pPrintOptions[nOption].Name.equalsAscii( "CopyCount" )
+ ||( pPrintOptions[nOption].Name.equalsAscii( "FileName" ))
+ ||( pPrintOptions[nOption].Name.equalsAscii( "Collate" ))
+ ||( pPrintOptions[nOption].Name.equalsAscii( "Pages" ))
+ ||( pPrintOptions[nOption].Name.equalsAscii( "Wait" )))
+ {
+ aOptions.realloc( nOpts + 1 );
+ aOptions[ nOpts ].Name = pPrintOptions[nOption].Name;
+ aOptions[ nOpts ].Value = pPrintOptions[nOption].Value ;
+ }
+ }
+
+// const SwModuleOptions * pModOpt = SW_MOD()->GetModuleConfig();
+// if (pModOpt->IsSinglePrintJob())
+// {
+// }
+// else
+// {
+ pTargetView->ExecPrint( aOptions, IsMergeSilent(), rMergeDescriptor.bPrintAsync );
+// }
}
xTargetDocShell->DoClose();
}
@@ -2902,6 +2569,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
SwMergeDescriptor aMergeDesc( pImpl->pMergeDialog->GetMergeType(), pView->GetWrtShell(), aDescriptor );
aMergeDesc.sSaveToFilter = pImpl->pMergeDialog->GetSaveFilter();
+ aMergeDesc.bCreateSingleFile= true;
MergeNew(aMergeDesc);
pWorkDoc->SetNewDBMgr( pWorkDBMgr );
@@ -3255,8 +2923,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pWorkDoc->EmbedAllLinks();
if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds())
rWorkShell.Undo();
- // #i69485# lock fields to prevent access to the result set while calculating layout
- rWorkShell.LockExpFlds();
+ // #i69485# lock fields to prevent access to the result set while calculating layout
+ rWorkShell.LockExpFlds();
// create a layout
rWorkShell.CalcLayout();
rWorkShell.UnlockExpFlds();
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 1106a1ac62fe..331589570246 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -991,6 +991,13 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
nEnd = rConfigItem.GetMergedDocumentCount();
}
rConfigItem.SetPrintRange( (USHORT)nBegin, (USHORT)nEnd );
+ SwDocMergeInfo& rStartInfo = rConfigItem.GetDocumentMergeInfo(nBegin);
+ SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1);
+
+ rtl::OUString sPages(rtl::OUString::valueOf( rStartInfo.nStartPageInTarget ));
+ sPages += rtl::OUString::createFromAscii( " - ");
+ sPages += rtl::OUString::valueOf( rEndInfo.nEndPageInTarget );
+
SwWrtShell& rSh = pTargetView->GetWrtShell();
pTargetView->SetMailMergeConfigItem(&rConfigItem, 0, sal_False);
if(m_pTempPrinter)
@@ -1002,11 +1009,17 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell();
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh));
rSh.GetNewDBMgr()->SetMergeType( DBMGR_MERGE_DOCUMENTS );
- SfxDispatcher *pDis = pTargetView->GetViewFrame()->GetDispatcher();
+ //SfxDispatcher *pDis = pTargetView->GetViewFrame()->GetDispatcher();
SfxBoolItem aMergeSilent(SID_SILENT, sal_False);
m_pWizard->enableButtons(WZB_CANCEL, sal_False);
- pDis->Execute(SID_PRINTDOCDIRECT,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aMergeSilent, 0L);
+
+ uno::Sequence < beans::PropertyValue > aProps( 2 );
+ aProps[0]. Name = rtl::OUString::createFromAscii("MonitorVisible");
+ aProps[0].Value <<= sal_True;
+ aProps[1]. Name = rtl::OUString::createFromAscii("Pages");
+ aProps[1]. Value <<= sPages;
+
+ pTargetView->ExecPrint( aProps, false, true );
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh));
pTargetView->SetMailMergeConfigItem(0, 0, sal_False);
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 537a39dad8cf..4b9fb14d0500 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -227,6 +227,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
m_aDialogSize( GetSizePixel() )
{
FreeResource();
+ aSingleJobsCB.Show(sal_False); // not supported in since cws printerpullpages anymore
//task #97066# mailing of form letters is currently not supported
aMailingRB.Show(FALSE);
aSubjectFT.Show(FALSE);
@@ -347,7 +348,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pModOpt = SW_MOD()->GetModuleConfig();
- aSingleJobsCB.Check(pModOpt->IsSinglePrintJob());
+ //aSingleJobsCB.Check(pModOpt->IsSinglePrintJob());// not supported in since cws printerpullpages anymore
sal_Int16 nMailingMode(pModOpt->GetMailingFormats());
aFormatSwCB.Check((nMailingMode & TXTFORMAT_OFFICE) != 0);
@@ -941,4 +942,3 @@ SwMailMergeFieldConnectionsDlg::~SwMailMergeFieldConnectionsDlg()
{
}
-
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index 3adfa962b9d7..913191ea7c3b 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -155,15 +155,15 @@ public:
BOOL IsPrintProspect() const { return bPrintProspect; }
- BOOL IsPrintProspect_RTL() const { return bPrintProspect_RTL; }
+ BOOL IsPrintProspectRTL() const { return bPrintProspectRTL; }
void SetPrintProspect(BOOL bFlag ){ bPrintProspect = bFlag; }
- void SetPrintProspect_RTL(BOOL bFlag ){ bPrintProspect_RTL = bFlag; }
+ void SetPrintProspectRTL(BOOL bFlag ){ bPrintProspectRTL = bFlag; }
BOOL IsPrintGraphic () const { return bPrintGraphic; }
BOOL IsPrintTable () const { return bPrintTable; }
BOOL IsPrintDraw () const { return bPrintDraw; }
BOOL IsPrintControl () const { return bPrintControl; }
- BOOL IsPrintLeftPage () const { return bPrintLeftPage; }
- BOOL IsPrintRightPage() const { return bPrintRightPage; }
+ BOOL IsPrintLeftPage () const { return bPrintLeftPages; }
+ BOOL IsPrintRightPage() const { return bPrintRightPages; }
BOOL IsPrintReverse () const { return bPrintReverse; }
BOOL IsPaperFromSetup() const { return bPaperFromSetup; }
BOOL IsPrintEmptyPages() const { return bPrintEmptyPages; }
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 959c4dc4fdd6..52611a703447 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -119,8 +119,8 @@ class SwAddPrinterTabPage : public SfxTabPage
{
FixedLine aFL1;
CheckBox aGrfCB;
- CheckBox aTabCB;
- CheckBox aDrawCB;
+// CheckBox aTabCB;
+// CheckBox aDrawCB;
CheckBox aCtrlFldCB;
CheckBox aBackgroundCB;
CheckBox aBlackFontCB;
@@ -132,7 +132,7 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aFL2;
CheckBox aLeftPageCB;
CheckBox aRightPageCB;
- CheckBox aReverseCB;
+// CheckBox aReverseCB;
CheckBox aProspectCB;
CheckBox aProspectCB_RTL;
@@ -145,7 +145,7 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aFL3;
FixedLine aFL4;
CheckBox aPrintEmptyPagesCB;
- CheckBox aSingleJobsCB;
+// CheckBox aSingleJobsCB;
CheckBox aPaperFromSetupCB;
FixedText aFaxFT;
ListBox aFaxLB;
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index bcb96a26cb3d..9fe9e61e2d6f 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -222,8 +222,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = TRUE );
- SW_DLLPRIVATE virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI,
- PrintDialog *pPrintDialog = 0 );
SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent,
diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx
index 996aab82b446..687015759243 100644..100755
--- a/sw/source/ui/inc/srcview.hxx
+++ b/sw/source/ui/inc/srcview.hxx
@@ -28,10 +28,12 @@
*
************************************************************************/
#ifndef _SRCVIEW_HXX
-#define _SRCIEW_HXX
+#define _SRCVIEW_HXX
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
+#include <vcl/outdev.hxx>
+
#include "srcedtw.hxx"
#include "shellid.hxx"
@@ -92,11 +94,11 @@ public:
void Load(SwDocShell* pDocShell);
- virtual USHORT SetPrinter( SfxPrinter* pNew,
- USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
+ virtual USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
+
void SourceSaved() {bSourceSaved = TRUE;}
BOOL HasSourceSaved() const {return bSourceSaved;}
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 43dc420915ef..2793c625dfe3 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -109,7 +109,7 @@ public:
virtual void SAL_CALL removeSelectionChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener > & xListener) throw( ::com::sun::star::uno::RuntimeException );
// XFormLayerAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isFormDesignMode( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFormDesignMode( ::sal_Bool DesignMode ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 7ddfc2775299..b181c85fa5ae 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -88,7 +88,7 @@ class SwPrtOptions;
class SwTransferable;
class SwMailMergeConfigItem;
class SwTxtNode; // #i23726#
-struct SwPrintData;
+class SwPrintData;
class SwFormatClipboard;
struct SwConversionArgs;
class Graphic;
@@ -424,8 +424,6 @@ public:
virtual USHORT SetPrinter( SfxPrinter* pNew,
USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
ShellModes GetShellMode();
com::sun::star::view::XSelectionSupplier* GetUNOObject();
@@ -632,10 +630,6 @@ public:
//apply Accessiblity options
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
- // get print options (SwPrtOptions)
- static void MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts,
- BOOL* pPrtProspect, BOOL* pPrtProspect_RTL, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData );
-
SwView(SfxViewFrame* pFrame, SfxViewShell*);
~SwView();
@@ -692,3 +686,4 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
BOOL bPreview);
#endif
+
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index 12befeaeb194..03e3bf12f1f0 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -154,10 +154,10 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
--------------------------------------------------------------------*/
-SwGlosDocShell::SwGlosDocShell( sal_Bool bNewShow)
- :
- SwDocShell( bShow ? SFX_CREATE_MODE_STANDARD : SFX_CREATE_MODE_INTERNAL )
- ,bShow ( bNewShow )
+SwGlosDocShell::SwGlosDocShell(sal_Bool bNewShow)
+ : SwDocShell( (bNewShow)
+ ? SFX_CREATE_MODE_STANDARD : SFX_CREATE_MODE_INTERNAL )
+ , bShow ( bNewShow )
{
SetHelpId(SW_GLOSDOCSHELL);
}
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
index 2aa5e12e2631..28ab2271a823 100644
--- a/sw/source/ui/uiview/makefile.mk
+++ b/sw/source/ui/uiview/makefile.mk
@@ -54,6 +54,7 @@ EXCEPTIONSFILES= \
$(SLO)$/uivwimp.obj \
$(SLO)$/view.obj \
$(SLO)$/view2.obj \
+ $(SLO)$/viewprt.obj \
$(SLO)$/viewling.obj \
$(SLO)$/viewmdi.obj \
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index d7cc7936958b..801a5fa68f6a 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -45,6 +45,7 @@
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <sfx2/printer.hxx>
+#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
#include <sfx2/topfrm.hxx>
#include <sfx2/bindings.hxx>
@@ -1520,12 +1521,6 @@ MOVEPAGE:
rReq.SetSlot( FN_PRINT_PAGEPREVIEW );
return;
}
- case FN_PREVIEW_PRINT_OPTIONS :
- {
- SwPreviewPrintOptionsDialog aDlg(aViewWin, *this);
- aDlg.Execute();
- }
- break;
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
@@ -1788,7 +1783,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
// OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- SwView::MakeOptions( 0, aPrintOptions, 0, 0, false, 0, 0 );
+ aPrintOptions.MakeOptions( false );
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
@@ -2416,72 +2411,6 @@ void SwPagePreView::ScrollDocSzChg()
// alles zum Thema Drucken
-USHORT SwPagePreView::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pDlg )
-{
- ViewShell* pSh = aViewWin.GetViewShell();
- SfxPrinter* pPrinter = GetPrinter();
- if( !pPrinter || !pPrinter->InitJob( &aViewWin,
- pSh->HasDrawView() && !bIsAPI && pSh->GetDrawView()->GetModel()->HasTransparentObjects() ))
- return ERRCODE_IO_ABORT;
-
- SwWait aWait( *GetDocShell(), TRUE );
-
- USHORT nRowCol = ( aViewWin.GetRow() << 8 ) +
- aViewWin.GetCol(); // Zeilen / DoppelSeiten
-
- {
- // die Felder aktualisieren
- // ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
- // In den Methoden wird auf die akt. Shell abgefragt!
- SwEditShell* pESh = (SwEditShell*)pSh;
- SwDocStat aDocStat;
- BOOL bIsModified = pESh->IsModified();
-
- pESh->StartAllAction();
- pESh->UpdateDocStat( aDocStat );
- pSh->UpdateFlds();
- pESh->EndAllAction();
-
- if( !bIsModified )
- pESh->ResetModified();
- }
-
- // Druckauftrag starten
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- SwPrtOptions aOpts( pObjShell->GetTitle(0) );
-
- BOOL bPrtPros;
- BOOL bPrtPros_RTL;
- SwView::MakeOptions( pDlg, aOpts, &bPrtPros, &bPrtPros_RTL, FALSE, GetPrinter(), GetDocShell()->GetDoc()->getPrintData() );
-
- if( bNormalPrint )
- {
- if( bPrtPros )
- pSh->PrintProspect( aOpts, rProgress, bPrtPros_RTL );
- else
- pSh->Prt( aOpts, &rProgress );
- }
- else
- {
- const SwPagePreViewPrtData* pPPVPD = pSh->GetDoc()->GetPreViewPrtData();
- if( pPPVPD && pPPVPD->GetCol() && pPPVPD->GetRow() )
- {
- // Zeilen / Seiten
- nRowCol = ( pPPVPD->GetRow() << 8 ) + pPPVPD->GetCol();
- }
- else
- pPPVPD = 0;
- pSh->PrintPreViewPage( aOpts, nRowCol, rProgress, pPPVPD );
- }
-
- return 0; // OK
-}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src
index a213c8df80e7..ff7f834db7a6 100644
--- a/sw/source/ui/uiview/pview.src
+++ b/sw/source/ui/uiview/pview.src
@@ -453,11 +453,6 @@ ToolBox RID_PVIEW_TOOLBOX
Identifier = FN_PRINT_PAGEPREVIEW ;
HelpID = FN_PRINT_PAGEPREVIEW ;
};
- ToolBoxItem
- {
- Identifier = FN_PREVIEW_PRINT_OPTIONS ;
- HelpID = FN_PREVIEW_PRINT_OPTIONS ;
- };
ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
ToolBoxItem
{
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 26a1253c5486..050f5c9d3057 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -152,23 +152,23 @@ TYPEINIT1(SwSrcView, SfxViewShell)
--------------------------------------------------*/
-void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
- Size aSz = pPrinter->GetOutputSize();
+ Size aSz = rOutDev.GetOutputSize();
short nBorder = BORDERPRN;
- Color aOldFillColor( pPrinter->GetFillColor() );
- Font aOldFont( pPrinter->GetFont() );
+ Color aOldFillColor( rOutDev.GetFillColor() );
+ Font aOldFont( rOutDev.GetFont() );
- pPrinter->SetFillColor( Color(COL_TRANSPARENT) );
+ rOutDev.SetFillColor( Color(COL_TRANSPARENT) );
Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD );
aFont.SetAlign( ALIGN_BOTTOM );
- pPrinter->SetFont( aFont );
+ rOutDev.SetFont( aFont );
- long nFontHeight = pPrinter->GetTextHeight();
+ long nFontHeight = rOutDev.GetTextHeight();
// 1.Border => Strich, 2+3 Border = Freiraum.
long nYTop = TMARGPRN-3*nBorder-nFontHeight;
@@ -176,34 +176,34 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
long nXLeft = nLeftMargin-nBorder;
long nXRight = aSz.Width()-RMARGPRN+nBorder;
- pPrinter->DrawRect( Rectangle(
+ rOutDev.DrawRect( Rectangle(
Point( nXLeft, nYTop ),
Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
long nY = TMARGPRN-2*nBorder;
Point aPos( nLeftMargin, nY );
- pPrinter->DrawText( aPos, rTitle );
+ rOutDev.DrawText( aPos, rTitle );
if ( nPages != 1 )
{
aFont.SetWeight( WEIGHT_NORMAL );
- pPrinter->SetFont( aFont );
+ rOutDev.SetFont( aFont );
String aPageStr( C2S(" [") );
aPageStr += String( SW_RES( STR_PAGE ) );
aPageStr += ' ';
aPageStr += String::CreateFromInt32( nCurPage );
aPageStr += ']';
- aPos.X() += pPrinter->GetTextWidth( rTitle );
- pPrinter->DrawText( aPos, aPageStr );
+ aPos.X() += rOutDev.GetTextWidth( rTitle );
+ rOutDev.DrawText( aPos, aPageStr );
}
nY = TMARGPRN-nBorder;
- pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
+ rOutDev.DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
- pPrinter->SetFont( aOldFont );
- pPrinter->SetFillColor( aOldFillColor );
+ rOutDev.SetFont( aOldFont );
+ rOutDev.SetFillColor( aOldFillColor );
}
/* -----------------13.11.2003 16:24-----------------
@@ -734,16 +734,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
return nFound;
}
-/*-----------------02.07.97 09:29-------------------
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
---------------------------------------------------*/
USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
- SfxPrinter* pOld = pDocSh->GetDoc()->getPrinter( false );
- if ( pOld && pOld->IsPrinting() )
- return SFX_PRINTERROR_BUSY;
-
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
{
pDocSh->GetDoc()->setPrinter( pNew, true, true );
@@ -766,109 +763,88 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
Beschreibung:
--------------------------------------------------------------------*/
-ErrCode SwSrcView::DoPrint( SfxPrinter *pPrinter, PrintDialog *pDlg, BOOL bSilent, BOOL bIsAPI )
+SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
{
- SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- }
- pProgress->SetWaitMode(FALSE);
+ return GetDocShell()->GetDoc()->getPrinter( bCreate );
+}
- // Drucker starten
- PreparePrint( pDlg );
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+sal_Int32 SwSrcView::PrintSource(
+ OutputDevice *pOutDev,
+ sal_Int32 nPage,
+ bool bCalcNumPagesOnly )
+{
+ if (!pOutDev || nPage <= 0)
+ return 0;
- SfxViewShell::Print(*pProgress, bIsAPI, pDlg ); //???
+ //! this a lgorithm for printing the n-th page is very poor since it
+ //! needs to go over the text of all previous pages to get to the correct one.
+ //! But since HTML source code is expected to be just a small number of pages
+ //! even this poor algorithm should be enough...
- MapMode eOldMapMode( pPrinter->GetMapMode() );
- Font aOldFont( pPrinter->Printer::GetFont() );
+ pOutDev->Push();
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pPrinter->SetMapMode(MAP_100TH_MM);
- Font aFont(aEditWin.GetOutWin()->GetFont());
- Size aSize(aFont.GetSize());
- aSize = aEditWin.GetOutWin()->PixelToLogic(aSize, MAP_100TH_MM);
- aFont.SetSize(aSize);
- aFont.SetColor(COL_BLACK);
- pPrinter->SetFont( aFont );
+ pOutDev->SetMapMode( MAP_100TH_MM );
+ Font aFont( aEditWin.GetOutWin()->GetFont() );
+ Size aSize( aFont.GetSize() );
+ aSize = aEditWin.GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM );
+ aFont.SetSize( aSize );
+ aFont.SetColor( COL_BLACK );
+ pOutDev->SetFont( aFont );
String aTitle( GetViewFrame()->GetWindow().GetText() );
- USHORT nLineHeight = (USHORT) pPrinter->GetTextHeight(); // etwas mehr.
+ USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr.
USHORT nParaSpace = 10;
- Size aPaperSz = pPrinter->GetOutputSize();
- aPaperSz.Width() -= (LMARGPRN+RMARGPRN);
- aPaperSz.Height() -= (TMARGPRN+BMARGPRN);
+ Size aPaperSz = pOutDev->GetOutputSize();
+ aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
+ aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height()/nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ));
+ USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight);
+ USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() );
- USHORT nPages = (USHORT) (nParas/nLinespPage+1 );
+ USHORT nPages = (USHORT) (nParas / nLinespPage + 1 );
USHORT nCurPage = 1;
- BOOL bStartJob = pPrinter->StartJob( aTitle );
- if( bStartJob )
+ // Header drucken...
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
+ const Point aStartPos( LMARGPRN, TMARGPRN );
+ Point aPos( aStartPos );
+ for ( USHORT nPara = 0; nPara < nParas; ++nPara )
{
- pPrinter->StartPage();
- // Header drucken...
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
- Point aPos( LMARGPRN, TMARGPRN );
- for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ String aLine( pTextEngine->GetText( nPara ) );
+ lcl_ConvertTabsToSpaces( aLine );
+ USHORT nLines = aLine.Len() / nCharspLine + 1;
+ for ( USHORT nLine = 0; nLine < nLines; ++nLine )
{
- String aLine( pTextEngine->GetText( nPara ) );
- lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len()/nCharspLine+1;
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ String aTmpLine( aLine, nLine * nCharspLine, nCharspLine );
+ aPos.Y() += nLineHeight;
+ if ( aPos.Y() > ( aPaperSz.Height() + TMARGPRN - nLineHeight/2 ) )
{
- String aTmpLine( aLine, nLine*nCharspLine, nCharspLine );
- aPos.Y() += nLineHeight;
- if ( aPos.Y() > ( aPaperSz.Height()+TMARGPRN ) )
- {
- nCurPage++;
- pPrinter->EndPage();
- pPrinter->StartPage();
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
- aPos = Point( LMARGPRN, TMARGPRN+nLineHeight );
- }
- pPrinter->DrawText( aPos, aTmpLine );
+ ++nCurPage;
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
+ aPos = aStartPos;
}
- aPos.Y() += nParaSpace;
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ pOutDev->DrawText( aPos, aTmpLine );
}
- pPrinter->EndPage();
+ aPos.Y() += nParaSpace;
}
- pPrinter->SetFont( aOldFont );
- pPrinter->SetMapMode( eOldMapMode );
+ pOutDev->Pop();
- if ( !bStartJob )
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- return ERRCODE_IO_ABORT;
- }
-
- pProgress->Stop();
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- return pPrinter->GetError();
+ DBG_ASSERT( bCalcNumPagesOnly || nPage <= nCurPage, "page number out of range" );
+ return nCurPage;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
-{
- return GetDocShell()->GetDoc()->getPrinter( bCreate );
-}
/*--------------------------------------------------------------------
Beschreibung:
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index d823f2e6c63b..3d9062b14684 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1920,53 +1920,6 @@ void SwView::NotifyDBChanged()
Beschreibung: Drucken
--------------------------------------------------------------------*/
-void SwView::MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts,
- BOOL* pPrtProspect, BOOL* pPrtProspect_RTL, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData )
-{
- SwAddPrinterItem* pAddPrinterAttr;
- if( pPrt && SFX_ITEM_SET == pPrt->GetOptions().GetItemState(
- FN_PARAM_ADDPRINTER, FALSE, (const SfxPoolItem**)&pAddPrinterAttr ))
- {
- pData = pAddPrinterAttr;
- }
- else if(!pData)
- {
- pData = SW_MOD()->GetPrtOptions(bWeb);
- }
- rOpts = *pData;
- if( pPrtProspect )
- *pPrtProspect = pData->bPrintProspect;
- if( pPrtProspect_RTL )
- *pPrtProspect_RTL = pData->bPrintProspect_RTL;
- rOpts.aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- rOpts.aMulti.SelectAll( FALSE );
- rOpts.nCopyCount = 1;
- rOpts.bCollate = FALSE;
- rOpts.bPrintSelection = FALSE;
- rOpts.bJobStartet = FALSE;
-
- if ( pDlg )
- {
- rOpts.nCopyCount = pDlg->GetCopyCount();
- rOpts.bCollate = pDlg->IsCollateChecked();
- if ( pDlg->GetCheckedRange() == PRINTDIALOG_SELECTION )
- {
- rOpts.aMulti.SelectAll();
- rOpts.bPrintSelection = TRUE;
- }
- else if ( PRINTDIALOG_ALL == pDlg->GetCheckedRange() )
- rOpts.aMulti.SelectAll();
- else
- {
- rOpts.aMulti = MultiSelection( pDlg->GetRangeText() );
- rOpts.aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- }
- }
- else
- rOpts.aMulti.SelectAll();
- rOpts.aMulti.Select( 0, FALSE );
-}
-
/* -----------------------------28.10.02 13:25--------------------------------
---------------------------------------------------------------------------*/
@@ -1995,3 +1948,20 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
{
GetViewImpl()->AddTransferable(rTransferable);
}
+
+/* --------------------------------------------------*/
+
+void SwPrtOptions::MakeOptions( BOOL bWeb )
+{
+ *this = *SW_MOD()->GetPrtOptions(bWeb);
+
+ nCopyCount = 1;
+ bCollate = FALSE;
+ bPrintSelection = FALSE;
+ bJobStartet = FALSE;
+
+ aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
+ aMulti.SelectAll();
+ aMulti.Select( 0, FALSE );
+}
+
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index c53f6efbc3fc..4d46407d3f15 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -47,9 +47,11 @@
#endif
#include <sfx2/request.hxx>
+#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
#include <svl/flagitem.hxx>
#include <vcl/msgbox.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <svtools/printdlg.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/prnmon.hxx>
@@ -175,287 +177,6 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
}
/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-ErrCode SwView::DoPrint( SfxPrinter *pPrinter, PrintDialog *pDlg, BOOL bSilent, BOOL bIsAPI )
-{
- // First test
- SwWrtShell* pSh = &GetWrtShell();
- SwNewDBMgr* pMgr = pSh->GetNewDBMgr();
-
- int bPrintSelection = -1;
- USHORT nMergeType = pMgr->GetMergeType();
- if( DBMGR_MERGE_MAILMERGE != nMergeType &&
- DBMGR_MERGE_DOCUMENTS != nMergeType &&
- !pDlg &&
- !bIsAPI && ( pSh->IsSelection() || pSh->IsFrmSelected() ||
- pSh->IsObjSelected() ) )
- {
- short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
- if( RET_CANCEL == nBtn )
- return ERRCODE_IO_ABORT;
-
- if( RET_OK == nBtn )
- bPrintSelection = 1;
- else
- bPrintSelection = 0;
- }
-
-// Der PrintProgress stellt Handler am Printer der ViewShell ein.
-// Das kann natuerlich erste nach dem evtl. Umschalten des Druckers korrekt
-// funktionieren. #55210#
-// SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrintProgress *pProgress = 0;
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- //Da der Doc-Drucker beim SetPrinter geloescht wird,
- // muss man ihn vorher clonen
- SfxPrinter* pClone = pDocPrinter->Clone();
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- pProgress = new SfxPrintProgress( this, !bSilent );
- pProgress->RestoreOnEndPrint( pClone );
- }
- if(!pProgress)
- pProgress = new SfxPrintProgress( this, !bSilent );
- pProgress->SetWaitMode(FALSE);
-
- BOOL bStartJob = pPrinter->InitJob( &GetEditWin(),
- !bIsAPI && pSh->HasDrawView() && pSh->GetDrawView()->GetModel()->HasTransparentObjects());
- if( bStartJob )
- {
- // Drucker starten
- PreparePrint( pDlg );
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- //#i82625# GetTitle( 0 ) doesn't work for 'embedded' documents like forms or reports
- String sDocumentTitle( pObjShell->GetTitle(SFX_TITLE_APINAME));
- SwPrtOptions aOpts( sDocumentTitle );
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
- nMergeType = pMgr->GetMergeType();
-
- BOOL bPrtPros;
- BOOL bPrtPros_RTL;
- SwView::MakeOptions( pDlg, aOpts, &bPrtPros, &bPrtPros_RTL, bWeb, GetPrinter(),
- pSh->getIDocumentDeviceAccess()->getPrintData() );
-
- //set the appropriate view options to print
- //on silent mode the field commands have to be switched off always
- //on default print the user is asked what to do
- const SwViewOption* pCurrentViewOptions = pSh->GetViewOptions();
- bool bSwitchOff_IsFldName = pCurrentViewOptions->IsFldName() && pSh->IsAnyFieldInDoc();
-
- if(!bSilent && bSwitchOff_IsFldName)
- {
- QueryBox aBox( &GetEditWin(), SW_RES( DLG_PRT_FIELDNAME ) );
- USHORT nRet = aBox.Execute();
- if( RET_CANCEL == nRet)
- {
- delete pProgress;
- return ERRCODE_IO_ABORT;
- }
- // disable field commands
- if( RET_NO != nRet )
- {
- bSwitchOff_IsFldName = false;
- }
- }
- bool bApplyViewOptions = bSwitchOff_IsFldName;
- //switch off display of hidden characters if on and hidden characters are in use
- const sal_Bool bOldShowHiddenChar = pCurrentViewOptions->IsShowHiddenChar();
- const sal_Bool bOldMetaChars = pCurrentViewOptions->IsViewMetaChars();
- if( bOldShowHiddenChar != aOpts.IsPrintHiddenText()
- && pSh->GetDoc()->ContainsHiddenChars())
- bApplyViewOptions |= true;
- //switch off display of hidden paragraphs if on and hidden paragraphs are in use
- const sal_Bool bOldShowHiddenPara = pCurrentViewOptions->IsShowHiddenPara();
- if( aOpts.IsPrintHiddenText() != bOldShowHiddenPara )
- {
- const SwFieldType* pFldType = pSh->GetDoc()->GetSysFldType(RES_HIDDENPARAFLD);
- if( pFldType && pFldType->GetDepends())
- bApplyViewOptions |= true;
- }
- const sal_Bool bOldShowHiddenField = pCurrentViewOptions->IsShowHiddenField();
- if( aOpts.IsPrintHiddenText() != bOldShowHiddenField )
- {
- const SwFieldType* pFldType = pSh->GetDoc()->GetSysFldType(RES_HIDDENTXTFLD);
- if( pFldType || pFldType->GetDepends())
- bApplyViewOptions |= true;
- }
-
- SwViewOption* pOrgViewOption = 0;
- bApplyViewOptions |= !aOpts.IsPrintTextPlaceholder();
- if(bApplyViewOptions)
- {
- pOrgViewOption = new SwViewOption(*pSh->GetViewOptions());
- if(bSwitchOff_IsFldName)
- pOrgViewOption->SetFldName(aOpts.IsPrintHiddenText());
-
- pOrgViewOption->SetShowHiddenChar(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetViewMetaChars(sal_True);
- pOrgViewOption->SetShowHiddenPara(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetShowHiddenField(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetShowPlaceHolderFields( aOpts.bPrintTextPlaceholder );
-
- SW_MOD()->ApplyUsrPref(*pOrgViewOption, this, VIEWOPT_DEST_VIEW_ONLY );
- }
-
- if( nMergeType == DBMGR_MERGE_MAILMERGE ||
- DBMGR_MERGE_DOCUMENTS == nMergeType )
- {
- if(DBMGR_MERGE_DOCUMENTS == nMergeType)
- bStartJob = pMgr->MergePrintDocuments( *this, aOpts, *pProgress, bIsAPI );
- else
- bStartJob = pMgr->MergePrint( *this, aOpts, *pProgress, bIsAPI );
- }
- else
- {
- const BOOL bLockedView = pSh->IsViewLocked();
- pSh->LockView( TRUE );
-
- //BrowseView abschalten und die View gegen alle Paints locken.
- BOOL bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
- SfxBoolItem aBrowse( SID_BROWSER_MODE, FALSE );
- if ( bBrowse )
- {
- if ( pSh->GetWin() )
- pSh->GetWin()->Update();
- pSh->LockPaint();
- aSet.Put( aBrowse, aBrowse.Which() );
- SfxRequest aReq( SID_BROWSER_MODE, 0, aSet );
- GetDocShell()->Execute( aReq );
- }
-
- // die Felder aktualisieren
- BOOL bIsModified = pSh->IsModified();
- pSh->StartAllAction();
- SwDocStat aDocStat;
- pSh->UpdateDocStat( aDocStat );
- pSh->EndAllTblBoxEdit();
- pSh->ViewShell::UpdateFlds(TRUE);
- if( pSh->IsCrsrInTbl() )
- {
- pSh->ClearTblBoxCntnt();
- pSh->SaveTblBoxCntnt();
- }
- pSh->EndAllAction();
-
- if( !bIsModified )
- pSh->ResetModified();
-
- if( -1 != bPrintSelection )
- aOpts.bPrintSelection = 0 != bPrintSelection;
-
- uno::Sequence< beans::PropertyValue> aViewProperties(18);
- beans::PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)aOpts.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)aOpts.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)aOpts.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)aOpts.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)aOpts.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)aOpts.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)aOpts.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)aOpts.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= aOpts.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) aOpts.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)aOpts.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)aOpts.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)aOpts.IsPrintBlackFont();
- pViewProperties[0].Name = C2U("IsSinglePrintJob");
- pViewProperties[0].Value <<= (sal_Bool)aOpts.IsPrintSingleJobs();
- pViewProperties[14].Name = C2U("Selection");
- pViewProperties[14].Value <<= (sal_Bool)aOpts.bPrintSelection;
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)aOpts.bPrintEmptyPages;
- pViewProperties[16].Name = C2U("PrintHiddenText");
- pViewProperties[16].Value <<= (sal_Bool)aOpts.bPrintHiddenText;
- pViewProperties[17].Name = C2U("PrintTextPlaceholder");
- pViewProperties[17].Value <<= (sal_Bool)aOpts.bPrintTextPlaceholder;
- SetAdditionalPrintOptions(aViewProperties);
-
- SfxViewShell::Print(*pProgress, bIsAPI );
- if ( !pProgress->IsAborted() )
- {
- if( bPrtPros )
- {
- bStartJob = pPrinter->StartJob( aOpts.GetJobName() );
- if( bStartJob )
- pSh->PrintProspect( aOpts, *pProgress, bPrtPros_RTL );
- }
- else
- bStartJob = pSh->Prt( aOpts, pProgress );
-
- if ( bBrowse )
- {
- aBrowse.SetValue( TRUE );
- aSet.Put( aBrowse, aBrowse.Which() );
- SfxRequest aReq( SID_BROWSER_MODE, 0, aSet );
- GetDocShell()->Execute( aReq );
- pSh->UnlockPaint();
- }
- }
- else
- bStartJob = FALSE;
-
- pSh->LockView( bLockedView );
- }
- if(pOrgViewOption)
- {
- if(bSwitchOff_IsFldName)
- pOrgViewOption->SetFldName(TRUE);
- pOrgViewOption->SetShowHiddenChar(bOldShowHiddenChar);
- pOrgViewOption->SetViewMetaChars(bOldMetaChars);
- pOrgViewOption->SetShowHiddenField(bOldShowHiddenField);
- pOrgViewOption->SetShowHiddenPara(bOldShowHiddenPara);
- //must to be set to sal_True anyway
- pOrgViewOption->SetShowPlaceHolderFields( sal_True );
- SW_MOD()->ApplyUsrPref(*pOrgViewOption, this, VIEWOPT_DEST_VIEW_ONLY );
- delete pOrgViewOption;
- }
- }
-
- if( !bStartJob )
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- return pPrinter->GetError();
- }
-
- pProgress->Stop();
- if ( pPrinter->IsJobActive() )
- {
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- return pPrinter->GetError();
- }
- else
- {
- // the next call might destroy pPrinter (in case it is not the usual document printer); so get the error before
- ULONG nError = pPrinter->GetError();
- pProgress->DeleteOnEndPrint();
- return nError;
- }
-}
-
-
-
-/*--------------------------------------------------------------------
Beschreibung: TabPage fuer applikationsspezifische Druckoptionen
--------------------------------------------------------------------*/
@@ -549,6 +270,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
rReq.RemoveItem(FN_QRY_MERGE);
BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
SwMiscConfig aMiscConfig;
+ bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc())
{
@@ -563,12 +285,29 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
return;
}
}
+ else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent )
+ {
+ if( /*!bIsAPI && */
+ ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
+ {
+ short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
+ if( RET_CANCEL == nBtn )
+ return;;
+
+ if( RET_OK == nBtn )
+ bPrintSelection = true;
+ }
+ }
+
//#i61455# if master documentes are printed silently without loaded links then update the links now
if( bSilent && pSh->IsGlobalDoc() && !pSh->IsGlblDocSaveLinks() )
{
pSh->GetLinkManager().UpdateAllLinks( sal_False, sal_False, sal_False, 0 );
}
- SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
+ SfxRequest aReq( rReq );
+ SfxBoolItem aBool(SID_SELECTION, bPrintSelection);
+ aReq.AppendItem( aBool );
+ SfxViewShell::ExecuteSlot( aReq, SfxViewShell::GetInterface() );
return;
}
default:
@@ -637,4 +376,3 @@ void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
}
}
-
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index b47f599a9120..5d0b03a4eaad 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -725,6 +725,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// when mail merge is called as command line macro
aMergeDesc.bPrintAsync = sal_False;
aMergeDesc.aPrintOptions = aPrintSettings;
+ aMergeDesc.bCreateSingleFile = true;
}
else /* FILE and MAIL*/
{
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index ed6d61898804..906402b8e365 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -519,81 +519,75 @@ void SwXPrintSettings::_preGetValues ()
void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
- sal_Bool bBool = TRUE;
- sal_Bool bBoolVal;
switch( rInfo.mnHandle )
{
case HANDLE_PRINTSET_LEFT_PAGES:
- bBoolVal = mpPrtOpt->IsPrintLeftPage();
+ rValue <<= mpPrtOpt->IsPrintLeftPage();
break;
case HANDLE_PRINTSET_RIGHT_PAGES:
- bBoolVal = mpPrtOpt->IsPrintRightPage();
+ rValue <<= mpPrtOpt->IsPrintRightPage();
break;
case HANDLE_PRINTSET_REVERSED:
- bBoolVal = mpPrtOpt->IsPrintReverse();
+ rValue <<= mpPrtOpt->IsPrintReverse();
break;
case HANDLE_PRINTSET_PROSPECT:
- bBoolVal = mpPrtOpt->IsPrintProspect();
+ rValue <<= mpPrtOpt->IsPrintProspect();
break;
case HANDLE_PRINTSET_GRAPHICS:
- bBoolVal = mpPrtOpt->IsPrintGraphic();
+ rValue <<= mpPrtOpt->IsPrintGraphic();
break;
case HANDLE_PRINTSET_TABLES:
- bBoolVal = mpPrtOpt->IsPrintTable();
+ rValue <<= mpPrtOpt->IsPrintTable();
break;
case HANDLE_PRINTSET_DRAWINGS:
- bBoolVal = mpPrtOpt->IsPrintDraw();
+ rValue <<= mpPrtOpt->IsPrintDraw();
break;
case HANDLE_PRINTSET_CONTROLS:
- bBoolVal = mpPrtOpt->IsPrintControl();
+ rValue <<= mpPrtOpt->IsPrintControl();
break;
case HANDLE_PRINTSET_PAGE_BACKGROUND:
- bBoolVal = mpPrtOpt->IsPrintPageBackground();
+ rValue <<= mpPrtOpt->IsPrintPageBackground();
break;
case HANDLE_PRINTSET_BLACK_FONTS:
- bBoolVal = mpPrtOpt->IsPrintBlackFont();
+ rValue <<= mpPrtOpt->IsPrintBlackFont();
break;
case HANDLE_PRINTSET_SINGLE_JOBS:
- bBoolVal = mpPrtOpt->IsPrintSingleJobs();
+ rValue <<= mpPrtOpt->IsPrintSingleJobs();
break;
case HANDLE_PRINTSET_EMPTY_PAGES:
- bBoolVal = mpPrtOpt->IsPrintEmptyPages();
+ rValue <<= mpPrtOpt->IsPrintEmptyPages();
break;
case HANDLE_PRINTSET_PAPER_FROM_SETUP:
- bBoolVal = mpPrtOpt->IsPaperFromSetup();
+ rValue <<= mpPrtOpt->IsPaperFromSetup();
break;
case HANDLE_PRINTSET_ANNOTATION_MODE:
{
- bBool = FALSE;
rValue <<= static_cast < sal_Int16 > ( mpPrtOpt->GetPrintPostIts() );
}
break;
case HANDLE_PRINTSET_FAX_NAME :
{
- bBool = FALSE;
rValue <<= mpPrtOpt->GetFaxName();
}
break;
case HANDLE_PRINTSET_PROSPECT_RTL:
{
- bBoolVal = mpPrtOpt->IsPrintProspect_RTL();
+ rValue <<= mpPrtOpt->IsPrintProspectRTL();
}
break;
case HANDLE_PRINTSET_PLACEHOLDER:
{
- bBoolVal = mpPrtOpt->IsPrintTextPlaceholder();
+ rValue <<= mpPrtOpt->IsPrintTextPlaceholder();
}
break;
case HANDLE_PRINTSET_HIDDEN_TEXT:
{
- bBoolVal = mpPrtOpt->IsPrintHiddenText();
+ rValue <<= mpPrtOpt->IsPrintHiddenText();
}
break;
default:
throw UnknownPropertyException();
}
- if(bBool)
- rValue.setValue(&bBoolVal, ::getBooleanCppuType());
}
void SwXPrintSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index aa2712225703..4b519bc747fd 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -31,13 +31,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <cmdid.h>
-#include <swtypes.hxx>
+#include <vos/mutex.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/print.hxx>
#include <sfx2/viewfrm.hxx>
+#include <sfx2/sfxbasecontroller.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/awt/vclxdevice.hxx>
+#include <cmdid.h>
+#include <swtypes.hxx>
#include <wdocsh.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
@@ -54,7 +58,6 @@
#include <unocoll.hxx>
#include <unoredlines.hxx>
#include <unosrch.hxx>
-#include <toolkit/awt/vclxdevice.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
@@ -68,6 +71,7 @@
#include <unofield.hxx>
#include <unoidx.hxx>
#include <unoflatpara.hxx>
+#include <unotxvw.hxx>
#include <poolfmt.hxx>
#include <globdoc.hxx>
#include <viewopt.hxx>
@@ -75,6 +79,8 @@
#include <doc.hxx>
#include <charatr.hxx>
#include <svx/xmleohlp.hxx>
+#include <globals.hrc>
+#include <unomid.h>
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
@@ -129,11 +135,14 @@
#include <svl/stylepool.hxx>
#include <swatrset.hxx>
+#include <view.hxx>
+#include <srcview.hxx>
//#include <com/sun/star/i18n/ScriptType.hpp>
#include <svtools/langtab.hxx>
#include <map>
#include <set>
+#include <vector>
#include <svx/eeitem.hxx>
#include <svx/editeng.hxx>
@@ -170,6 +179,32 @@ using ::osl::FileBase;
/******************************************************************************
*
******************************************************************************/
+
+extern bool lcl_GetPostIts( IDocumentFieldsAccess* pIDFA, _SetGetExpFlds * pSrtLst );
+
+SwPrintUIOptions * lcl_GetPrintUIOptions(
+ SwDocShell * pDocShell,
+ const SfxViewShell * pView )
+{
+ if (!pDocShell)
+ return NULL;
+
+ const BOOL bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
+ const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView);
+ const SwView * pSwView = dynamic_cast< const SwView * >(pView);
+ const bool bHasSelection = pSwView ? pSwView->HasSelection( sal_False ) : false; // check for any selection, not just text selection
+ const bool bHasPostIts = lcl_GetPostIts( pDocShell->GetDoc(), 0 );
+
+ // get default values to use in dialog from documents SwPrintData
+ const SwPrintData *pPrintData = pDocShell->GetDoc()->getPrintData();
+ DBG_ASSERT( pPrintData, "failed to get SwPrintData from document" );
+
+ return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, *pPrintData );
+}
+
+////////////////////////////////////////////////////////////
+
+
SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc)
{
SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName( rCollName );
@@ -364,7 +399,9 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell) :
pxXLineNumberingProperties(0),
pxLinkTargetSupplier(0),
pxXRedlines(0),
- m_pHiddenViewFrame(0)
+ m_pHiddenViewFrame(0),
+ m_pPrintUIOptions( NULL ),
+ m_pRenderData( NULL )
{
}
/*-- 18.12.98 11:53:00---------------------------------------------------
@@ -379,6 +416,8 @@ SwXTextDocument::~SwXTextDocument()
xNumFmtAgg->setDelegator(x0);
xNumFmtAgg = 0;
}
+ delete m_pPrintUIOptions;
+ delete m_pRenderData;
}
@@ -2453,100 +2492,74 @@ Any SAL_CALL SwXTextDocument::getPropertyDefault( const OUString& rPropertyName
}
return aAny;
}
-/*-- 06.01.2004 15:08:34---------------------------------------------------
- The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
- the current ViewShell so that fields are not printed as commands and
- hidden text and hidden characters are always invisible.
- After printing the view options are restored
- -----------------------------------------------------------------------*/
-class SwViewOptionAdjust_Impl
-{
- bool m_bSwitchOff_IsFldName;
- bool m_bSwitchOff_PlaceHolderView;
- bool m_bSwitchOff_HiddenChar;
- bool m_bSwitchOff_HiddenParagraphs;
- bool m_bSwitchOff_IsShowHiddenField;
-
- SwViewOption* m_pViewOption;
- SwWrtShell& m_rShell;
-public:
- SwViewOptionAdjust_Impl(SwWrtShell& rSh);
- ~SwViewOptionAdjust_Impl();
-};
-/*-- 06.01.2004 15:08:34---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-SwViewOptionAdjust_Impl::SwViewOptionAdjust_Impl(SwWrtShell& rSh) :
- m_pViewOption(0),
- m_rShell(rSh)
-{
- const SwViewOption* pCurrentViewOptions = m_rShell.GetViewOptions();
- m_bSwitchOff_IsFldName = pCurrentViewOptions->IsFldName() && m_rShell.IsAnyFieldInDoc();
- bool bApplyViewOptions = m_bSwitchOff_IsFldName;
- //switch off painting of placeholder fields
- m_bSwitchOff_PlaceHolderView = pCurrentViewOptions->IsShowPlaceHolderFields();
- //switch off display of hidden characters if on and hidden characters are in use
- m_bSwitchOff_HiddenChar = pCurrentViewOptions->IsShowHiddenChar() && m_rShell.GetDoc()->ContainsHiddenChars();
- //switch off display of hidden paragraphs if on and hidden paragraphs are in use
- m_bSwitchOff_HiddenParagraphs = pCurrentViewOptions->IsShowHiddenPara();
- if(m_bSwitchOff_HiddenParagraphs)
- {
- const SwFieldType* pFldType = m_rShell.GetDoc()->GetSysFldType(RES_HIDDENPARAFLD);
- if(!pFldType || !pFldType->GetDepends())
- m_bSwitchOff_HiddenParagraphs = false;
- }
- m_bSwitchOff_IsShowHiddenField = pCurrentViewOptions->IsShowHiddenField();
- if(m_bSwitchOff_IsShowHiddenField)
- {
- const SwFieldType* pFldType = m_rShell.GetDoc()->GetSysFldType(RES_HIDDENTXTFLD);
- if( !pFldType || !pFldType->GetDepends())
- m_bSwitchOff_IsShowHiddenField = false;
- }
-
- bApplyViewOptions |= m_bSwitchOff_PlaceHolderView;
- bApplyViewOptions |= m_bSwitchOff_HiddenChar;
- bApplyViewOptions |= m_bSwitchOff_HiddenParagraphs;
- bApplyViewOptions |= m_bSwitchOff_IsShowHiddenField;
- if(bApplyViewOptions)
- {
- m_pViewOption = new SwViewOption(*m_rShell.GetViewOptions());
- if(m_bSwitchOff_IsFldName)
- m_pViewOption->SetFldName(FALSE);
- if(m_bSwitchOff_PlaceHolderView)
- m_pViewOption->SetShowPlaceHolderFields(FALSE);
- if(m_bSwitchOff_HiddenChar)
- m_pViewOption->SetShowHiddenChar(FALSE);
- if(m_bSwitchOff_HiddenParagraphs)
- m_pViewOption->SetShowHiddenPara(FALSE);
- if(m_bSwitchOff_IsShowHiddenField)
- m_pViewOption->SetShowHiddenField(FALSE);
- SW_MOD()->ApplyUsrPref(*m_pViewOption, &m_rShell.GetView(), VIEWOPT_DEST_VIEW_ONLY );
- }
-}
-/*-- 06.01.2004 15:08:34---------------------------------------------------
- -----------------------------------------------------------------------*/
-SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
+static OutputDevice * lcl_GetOutputDevice( const SwPrintUIOptions &rPrintUIOptions )
+{
+ OutputDevice *pOut = 0;
+
+ uno::Any aAny( rPrintUIOptions.getValue( C2U( "RenderDevice" ) ));
+ uno::Reference< awt::XDevice > xRenderDevice;
+ aAny >>= xRenderDevice;
+ if (xRenderDevice.is())
+ {
+ VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
+ pOut = pDevice ? pDevice->GetOutputDevice() : 0;
+ }
+
+ return pOut;
+}
+
+
+static bool lcl_SeqHasProperty(
+ const uno::Sequence< beans::PropertyValue >& rOptions,
+ const sal_Char *pPropName )
{
- if(m_pViewOption)
+ bool bRes = false;
+ const sal_Int32 nLen = rOptions.getLength();
+ const beans::PropertyValue *pProps = rOptions.getConstArray();
+ for (sal_Int32 i = 0; i < nLen && !bRes; ++i)
{
- if(m_bSwitchOff_IsFldName)
- m_pViewOption->SetFldName(TRUE);
- if(m_bSwitchOff_PlaceHolderView)
- m_pViewOption->SetShowPlaceHolderFields(TRUE);
- if(m_bSwitchOff_HiddenChar)
- m_pViewOption->SetShowHiddenChar(TRUE);
- if(m_bSwitchOff_HiddenParagraphs)
- m_pViewOption->SetShowHiddenPara(TRUE);
- if(m_bSwitchOff_IsShowHiddenField)
- m_pViewOption->SetShowHiddenField(TRUE);
- SW_MOD()->ApplyUsrPref(*m_pViewOption, &m_rShell.GetView(), VIEWOPT_DEST_VIEW_ONLY );
- delete m_pViewOption;
+ if (pProps[i].Name.equalsAscii( pPropName ))
+ bRes = true;
}
+ return bRes;
}
-/* -----------------------------23.08.02 16:00--------------------------------
- ---------------------------------------------------------------------------*/
+
+SfxViewShell * SwXTextDocument::GetRenderView(
+ bool &rbIsSwSrcView,
+ const uno::Sequence< beans::PropertyValue >& rOptions,
+ bool bIsPDFExport )
+{
+ // get view shell to use
+ SfxViewShell *pView = 0;
+ if (bIsPDFExport)
+ pView = GuessViewShell( rbIsSwSrcView );
+ else
+ {
+ uno::Any aTmp;
+ const sal_Int32 nLen = rOptions.getLength();
+ const beans::PropertyValue *pProps = rOptions.getConstArray();
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ if (pProps[i].Name.equalsAscii( "View" ))
+ {
+ aTmp = pProps[i].Value;
+ break;
+ }
+ }
+
+ uno::Reference< frame::XController > xController;
+ if (aTmp >>= xController)
+ {
+ DBG_ASSERT( xController.is(), "controller is empty!" );
+ pView = GuessViewShell( rbIsSwSrcView, xController );
+ }
+ }
+ return pView;
+}
+
+
/*
* GetRenderDoc:
* returns the document to be rendered, usually this will be the 'regular'
@@ -2556,7 +2569,10 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
* SfxViewShell.
*/
-SwDoc * SwXTextDocument::GetRenderDoc( SfxViewShell *&rpView, const uno::Any& rSelection )
+SwDoc * SwXTextDocument::GetRenderDoc(
+ SfxViewShell *&rpView,
+ const uno::Any& rSelection,
+ bool bIsPDFExport )
{
SwDoc *pDoc = 0;
@@ -2566,11 +2582,22 @@ SwDoc * SwXTextDocument::GetRenderDoc( SfxViewShell *&rpView, const uno::Any& rS
pDoc = pDocShell->GetDoc();
else
{
- // used for PDF export of (multi-)selection
+ DBG_ASSERT( !xModel.is(), "unexpected model found" );
+
if (rSelection.hasValue()) // is anything selected ?
{
+ // this part should only be called when a temporary document needs to be created,
+ // for example for PDF export or printing of (multi-)selection only.
+
+ bool bIsSwSrcView = false;
if (!rpView)
- rpView = GuessViewShell();
+ {
+ (void) bIsPDFExport;
+ // aside from maybe PDF export the view should always have been provided!
+ DBG_ASSERT( bIsPDFExport, "view is missing, guessing one..." );
+
+ rpView = GuessViewShell( bIsSwSrcView );
+ }
DBG_ASSERT( rpView, "ViewShell missing" );
// the view shell should be SwView for documents PDF export.
// for the page preview no selection should be possible
@@ -2585,55 +2612,187 @@ SwDoc * SwXTextDocument::GetRenderDoc( SfxViewShell *&rpView, const uno::Any& rS
rpView = pDoc->GetDocShell()->GetView();
}
}
- else {
+ else
+ {
DBG_ERROR( "unexpected ViewShell" );
}
}
}
return pDoc;
}
+
/* -----------------------------23.08.02 16:00--------------------------------
---------------------------------------------------------------------------*/
+
+static void lcl_SavePrintUIOptionsToDocumentPrintData(
+ SwDoc &rDoc,
+ const SwPrintUIOptions &rPrintUIOptions,
+ bool bIsPDFEXport )
+{
+ if (!rDoc.getPrintData())
+ {
+ SwPrintData *pTmpData = new SwPrintData;
+ rDoc.setPrintData ( *pTmpData );
+ delete pTmpData; // setPrintData does make its own copy!
+ }
+
+ SwPrintData *pDocPrintData = rDoc.getPrintData();
+
+ pDocPrintData->SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() );
+ pDocPrintData->SetPrintTable( rPrintUIOptions.IsPrintTables() );
+ pDocPrintData->SetPrintDraw( rPrintUIOptions.IsPrintDrawings() );
+ pDocPrintData->SetPrintControl( rPrintUIOptions.IsPrintFormControls() );
+ pDocPrintData->SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() );
+ pDocPrintData->SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() );
+ pDocPrintData->SetPrintReverse( rPrintUIOptions.IsPrintReverse() );
+ pDocPrintData->SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() );
+ pDocPrintData->SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) );
+ pDocPrintData->SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() );
+ pDocPrintData->SetPrintProspect( rPrintUIOptions.IsPrintProspect() );
+ pDocPrintData->SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() );
+ pDocPrintData->SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() );
+ pDocPrintData->SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() );
+ // pDocPrintData->SetPrintSingleJobs( b ); handled by File/Print dialog itself
+ // pDocPrintData->SetFaxName( s ); n/a in File/Print dialog
+ pDocPrintData->SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() );
+ pDocPrintData->SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() );
+}
+
+
sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
const uno::Any& rSelection,
- const uno::Sequence< beans::PropertyValue >& /*rxOptions*/ )
+ const uno::Sequence< beans::PropertyValue >& rxOptions )
throw (IllegalArgumentException, RuntimeException)
{
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- SfxViewShell *pView = 0;
- SwDoc *pDoc = GetRenderDoc( pView, rSelection );
- if (!pDoc)
- throw RuntimeException();
- SwDocShell *pRenderDocShell = pDoc->GetDocShell();
- // #i38289
- if(pDoc->get(IDocumentSettingAccess::BROWSE_MODE))
- {
- pRenderDocShell->ToggleBrowserMode(false,NULL);
- }
+ const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
+ bool bIsSwSrcView = false;
+ SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
- SwWrtShell *pWrtShell = pRenderDocShell->GetWrtShell();
+ if (!bIsSwSrcView && !m_pRenderData)
+ m_pRenderData = new SwRenderData;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ bool bFormat = m_pPrintUIOptions->processPropertiesAndCheckFormat( rxOptions );
+ // const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
+
+ SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
+ DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ if (!pDoc || !pView)
+ return 0;
+
+ // save current UI options from the print dialog for the next call to that dialog
+ lcl_SavePrintUIOptionsToDocumentPrintData( *pDoc, *m_pPrintUIOptions, bIsPDFExport );
sal_Int32 nRet = 0;
- if( !pWrtShell )
+ if (bIsSwSrcView)
{
- //create a hidden view to be able to export as PDF also in print preview
- m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE );
- SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell();
- pWrtShell = pSwView->GetWrtShellPtr();
+ SwSrcView *pSwSrcView = dynamic_cast< SwSrcView * >(pView);
+ OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
+ nRet = pSwSrcView->PrintSource( pOutDev, 1 /* dummy */, true /* get page count only */ );
}
+ else
+ {
+ SwDocShell *pRenderDocShell = pDoc->GetDocShell();
+ SwWrtShell *pWrtShell = pRenderDocShell->GetWrtShell();
+ if (bFormat)
+ {
+ // #i38289
+ if(pDoc->get(IDocumentSettingAccess::BROWSE_MODE))
+ {
+ pRenderDocShell->ToggleBrowserMode(false,NULL);
+ }
+
+ if (!pWrtShell)
+ {
+ //create a hidden view to be able to export as PDF also in print preview
+ m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE );
+ SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell();
+ pWrtShell = pSwView->GetWrtShellPtr();
+ }
+
+ // reformating the document for printing will show the changes in the view
+ // which is likely to produce many unwanted and not nice to view actions.
+ // We don't want that! Thus we disable updating of the view.
+ pWrtShell->StartAction();
+
+ const TypeId aSwViewTypeId = TYPE(SwView);
+ if (pView->IsA(aSwViewTypeId))
+ {
+ if (m_pRenderData && !m_pRenderData->IsViewOptionAdjust())
+ m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() );
+ }
- SwViewOptionAdjust_Impl aAdjust(*pWrtShell);
- pWrtShell->SetPDFExportOption( sal_True );
- // --> FME 2005-05-23 #122919# Force field update before PDF export:
- pWrtShell->ViewShell::UpdateFlds(TRUE);
- // <--
- pWrtShell->CalcLayout();
- pWrtShell->SetPDFExportOption( sal_False );
- nRet = pDoc->GetPageCount();
+ m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) );
+ m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell,
+ m_pPrintUIOptions, m_pRenderData, bIsPDFExport );
+
+ if (pView->IsA(aSwViewTypeId))
+ {
+ // PDF export should not make use of the SwPrtOptions
+ const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions();
+ m_pRenderData->ViewOptionAdjust( pPrtOptions );
+ }
+
+ // since printing now also use the API for PDF export this option
+ // should be set for printing as well ...
+ pWrtShell->SetPDFExportOption( sal_True );
+
+ // --> FME 2005-05-23 #122919# Force field update before PDF export:
+ pWrtShell->ViewShell::UpdateFlds(TRUE);
+ // <--
+
+ // there is some redundancy between those two function calls, but right now
+ // there is no time to sort this out.
+ //TODO: check what exatly needs to be done and make just one function for that
+ pWrtShell->CalcLayout();
+ pWrtShell->CalcPagesForPrint( pDoc->GetPageCount() );
+
+ pWrtShell->SetPDFExportOption( sal_False );
+
+
+ // enable view again
+ pWrtShell->EndAction();
+ }
+
+ const sal_Int32 nPageCount = pDoc->GetPageCount();
+
+ //
+ // get number of pages to be rendered
+ //
+ const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
+ if (bPrintProspect)
+ {
+ pDoc->CalculatePagePairsForProspectPrinting( *m_pRenderData, *m_pPrintUIOptions, nPageCount );
+ nRet = m_pRenderData->GetPagePairsForProspectPrinting().size();
+ }
+ else
+ {
+ const sal_Int16 nPostItMode = (sal_Int16) m_pPrintUIOptions->getIntValue( "PrintAnnotationMode", 0 );
+ if (nPostItMode != POSTITS_NONE)
+ {
+ OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
+ m_pRenderData->CreatePostItData( pDoc, pWrtShell->GetViewOptions(), pOutDev );
+ }
+
+ // get set of valid document pages (according to the current settings)
+ // and their start frames
+ pDoc->CalculatePagesForPrinting( *m_pRenderData, *m_pPrintUIOptions, bIsPDFExport, nPageCount );
+
+ if (nPostItMode != POSTITS_NONE)
+ {
+ pDoc->UpdatePagesForPrintingWithPostItData( *m_pRenderData,
+ *m_pPrintUIOptions, bIsPDFExport, nPageCount );
+ }
+
+ nRet = m_pRenderData->GetPagesToPrint().size();
+ }
+ }
+ DBG_ASSERT( nRet >= 0, "negative number of pages???" );
return nRet;
}
@@ -2649,41 +2808,110 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- SfxViewShell *pView = 0;
- SwDoc *pDoc = GetRenderDoc( pView, rSelection );
- if (!pDoc)
- throw RuntimeException();
+
+ const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
+ bool bIsSwSrcView = false;
+ SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
+
+ // m_pRenderData should NOT be created here!
+ // That should only be done in getRendererCount. If this function is called before
+ // getRendererCount was called then the caller will probably just retrieve the extra UI options
+ // and is not interested in getting valid information about the other data that would
+ // otherwise be provided here!
+// if( ! m_pRenderData )
+// m_pRenderData = new SwRenderData;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ m_pPrintUIOptions->processProperties( rxOptions );
+ const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
+ const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
+
+ SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
+ DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ if (!pDoc || !pView)
+ return uno::Sequence< beans::PropertyValue >();
// due to #110067# (document page count changes sometimes during
// PDF export/printing) we can not check for the upper bound properly.
// Thus instead of throwing the exception we silently return.
- if (!(0 <= nRenderer /* && nRenderer < pDoc->GetPageCount()*/))
+ if (0 > nRenderer)
throw IllegalArgumentException();
- if (nRenderer >= pDoc->GetPageCount())
+ sal_Int32 nMaxRenderer = 0;
+ if (!bIsSwSrcView && m_pRenderData)
+ {
+ DBG_ASSERT( m_pRenderData, "m_pRenderData missing!!" );
+ nMaxRenderer = bPrintProspect?
+ m_pRenderData->GetPagePairsForProspectPrinting().size() - 1 :
+ m_pRenderData->GetPagesToPrint().size() - 1;
+ }
+ // since SwSrcView::PrintSource is a poor implementation to get the number of pages to print
+ // we obmit checking of the upper bound in this case.
+ if (!bIsSwSrcView && m_pRenderData && nRenderer > nMaxRenderer)
return uno::Sequence< beans::PropertyValue >();
- bool bSkipEmptyPages = false;
- for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty )
+ uno::Sequence< beans::PropertyValue > aRenderer;
+ if (m_pRenderData)
{
- if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ) )
- rxOptions[ nProperty].Value >>= bSkipEmptyPages;
- }
+ awt::Size aPageSize;
+ Size aTmpSize;
+ if (bIsSwSrcView || bPrintProspect)
+ {
+ // for printing of HTML source code and prospect printing we should use
+ // the printers paper size since
+ // a) HTML source view has no page size
+ // b) prospect printing has a different page size from the documents page
+ // since two document pages will get rendered on one printer page
+
+ // since PageIncludesNonprintableArea will be set to true we can return the
+ // printers paper size here.
+ // Sometimes 'getRenderer' is only called to get "ExtraPrintUIOptions", in this
+ // case we won't get an OutputDevice here, but then the caller also has no need
+ // for the correct PageSisze right now...
+ Printer *pPrinter = dynamic_cast< Printer * >(lcl_GetOutputDevice( *m_pPrintUIOptions ));
+ if (pPrinter)
+ {
+ if (bPrintProspect)
+ {
+ aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages );
+ // we just state what output size we would need
+ // the rest is nowadays up to vcl
+ aPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ),
+ TWIP_TO_MM100( aTmpSize.Height() ));
+ }
+ else
+ {
+ // printing HTML source view
+ aTmpSize = pPrinter->GetPaperSize();
+ aTmpSize = pPrinter->LogicToLogic( aTmpSize,
+ pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
+ aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
+ }
+ }
+ }
+ else
+ {
+ aTmpSize = pDoc->GetPageSize( USHORT(nRenderer + 1), bIsSkipEmptyPages );
+ aPageSize = awt::Size ( TWIP_TO_MM100( aTmpSize.Width() ),
+ TWIP_TO_MM100( aTmpSize.Height() ));
+ }
- Size aPgSize( pDoc->GetPageSize( sal_uInt16(nRenderer + 1), bSkipEmptyPages ) );
+ aRenderer.realloc(2);
+ aRenderer[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
+ aRenderer[0].Value <<= aPageSize;
+ aRenderer[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageIncludesNonprintableArea" ) );
+ aRenderer[1].Value <<= sal_True;
+ }
- awt::Size aPageSize( TWIP_TO_MM100( aPgSize.Width() ),
- TWIP_TO_MM100( aPgSize.Height() ));
- uno::Sequence< beans::PropertyValue > aRenderer(1);
- PropertyValue &rValue = aRenderer.getArray()[0];
- rValue.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
- rValue.Value <<= aPageSize;
+ m_pPrintUIOptions->appendPrintUIOptions( aRenderer );
return aRenderer;
}
/* -----------------------------28.10.02 16:00--------------------------------
---------------------------------------------------------------------------*/
-SfxViewShell * SwXTextDocument::GuessViewShell()
+SfxViewShell * SwXTextDocument::GuessViewShell(
+ /* out */ bool &rbIsSwSrcView,
+ const uno::Reference< css::frame::XController > xController )
{
// #130810# SfxViewShell::Current() / SfxViewShell::GetObjectShell()
// must not be used (see comment from MBA)
@@ -2691,24 +2919,39 @@ SfxViewShell * SwXTextDocument::GuessViewShell()
SfxViewShell *pView = 0;
SwView *pSwView = 0;
SwPagePreView *pSwPagePreView = 0;
+ SwSrcView *pSwSrcView = 0;
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False );
+
+ // look for the view shell with the same controller in use,
+ // otherwise look for a suitable view, preferably a SwView,
+ // if that one is not found use a SwPagePreView if found.
while (pFrame)
{
pView = pFrame->GetViewShell();
pSwView = dynamic_cast< SwView * >(pView);
- if (pSwView)
- break;
+ pSwSrcView = dynamic_cast< SwSrcView * >(pView);
if (!pSwPagePreView)
pSwPagePreView = dynamic_cast< SwPagePreView * >(pView);
+ if (xController.is())
+ {
+ if (pView && pView->GetController() == xController)
+ break;
+ }
+ else if (pSwView || pSwSrcView)
+ break;
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False );
}
- return pSwView ? pSwView : dynamic_cast< SwView * >(pSwPagePreView);
+ DBG_ASSERT( pSwView || pSwPagePreView || pSwSrcView, "failed to get view shell" );
+ if (pView)
+ rbIsSwSrcView = pSwSrcView != 0;
+ return pView;
+// return pSwView ? dynamic_cast< SfxViewShell * >(pSwView) :
+// (pSwSrcView ? dynamic_cast< SfxViewShell * >(pSwSrcView) :
+// dynamic_cast< SfxViewShell * >(pSwPagePreView) );
}
-/* -----------------------------23.08.02 16:00--------------------------------
- ---------------------------------------------------------------------------*/
void SAL_CALL SwXTextDocument::render(
sal_Int32 nRenderer,
const uno::Any& rSelection,
@@ -2718,121 +2961,143 @@ void SAL_CALL SwXTextDocument::render(
::vos::OGuard aGuard(Application::GetSolarMutex());
if(!IsValid())
throw RuntimeException();
- SfxViewShell *pView = GuessViewShell();
- SwDoc *pDoc = GetRenderDoc( pView, rSelection );
- if (!pDoc || !pView)
- throw RuntimeException();
// due to #110067# (document page count changes sometimes during
// PDF export/printing) we can not check for the upper bound properly.
// Thus instead of throwing the exception we silently return.
- if (!(0 <= nRenderer /* && nRenderer < pDoc->GetPageCount()*/))
+ if (0 > nRenderer)
throw IllegalArgumentException();
- if (nRenderer >= pDoc->GetPageCount())
- return;
- // the view shell should be SwView for documents PDF export
- // or SwPagePreView for PDF export of the page preview
- //!! (check for SwView first as in GuessViewShell) !!
- const TypeId aSwViewTypeId = TYPE(SwView);
- ViewShell* pVwSh = pView->IsA(aSwViewTypeId) ?
- ((SwView*)pView)->GetWrtShellPtr() :
- ((SwPagePreView*)pView)->GetViewShell();
-
- uno::Reference< awt::XDevice > xRenderDevice;
- bool bFirstPage = false;
- bool bLastPage = false;
- rtl::OUString aPages;
- bool bSkipEmptyPages = false;
-
- for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty )
- {
- if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) )
- rxOptions[ nProperty].Value >>= xRenderDevice;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFirstPage" ) ) )
- rxOptions[ nProperty].Value >>= bFirstPage;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsLastPage" ) ) )
- rxOptions[ nProperty].Value >>= bLastPage;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ) )
- rxOptions[ nProperty].Value >>= aPages;
- else if( rxOptions[ nProperty ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ) )
- rxOptions[ nProperty].Value >>= bSkipEmptyPages;
- }
-
- OutputDevice* pOut = 0;
- if (xRenderDevice.is())
+ const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
+ bool bIsSwSrcView = false;
+ SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
+
+ DBG_ASSERT( m_pRenderData, "data should have been created already in getRendererCount..." );
+ DBG_ASSERT( m_pPrintUIOptions, "data should have been created already in getRendererCount..." );
+ if (!bIsSwSrcView && !m_pRenderData)
+ m_pRenderData = new SwRenderData;
+ if (!m_pPrintUIOptions)
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ m_pPrintUIOptions->processProperties( rxOptions );
+ const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
+ const bool bLastPage = m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False );
+
+ SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
+ DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
+ if (pDoc && pView)
{
- VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
- pOut = pDevice ? pDevice->GetOutputDevice() : 0;
- }
-
- if(pVwSh && pOut)
- {
- SwPrtOptions aOptions( C2U("PDF export") );
-
- const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
- BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
- SwView::MakeOptions( NULL, aOptions, NULL, NULL, bWeb, NULL, NULL );
-
- Range aPageRange( nRenderer+1, nRenderer+1 );
- MultiSelection aPage( aPageRange );
- aPage.SetTotalRange( Range( 0, RANGE_MAX ) );
- aPage.Select( aPageRange );
- aOptions.aMulti = aPage;
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! aOptions.bPrintSelection parameter will be false.
- aOptions.bPrintSelection = FALSE;
-
- SwViewOptionAdjust_Impl* pViewOptionAdjust = pView->IsA(aSwViewTypeId) ?
- new SwViewOptionAdjust_Impl(*((SwView*)pView)->GetWrtShellPtr()) : 0;
-
-
- pVwSh->SetPDFExportOption( sal_True );
-
- // --> FME 2004-06-08 #i12836# enhanced pdf export
- //
- // First, we have to export hyperlinks, notes, and outline to pdf.
- // During this process, additional information required for tagging
- // the pdf file are collected, which are evaulated during painting.
- //
- SwWrtShell* pWrtShell = pView->IsA(aSwViewTypeId) ?
- ((SwView*)pView)->GetWrtShellPtr() :
- 0;
-
- if ( bFirstPage && pWrtShell )
+ sal_Int32 nMaxRenderer = 0;
+ if (!bIsSwSrcView)
{
- SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPages, bSkipEmptyPages, sal_False );
+ DBG_ASSERT( m_pRenderData, "m_pRenderData missing!!" );
+ nMaxRenderer = bPrintProspect?
+ m_pRenderData->GetPagePairsForProspectPrinting().size() - 1 :
+ m_pRenderData->GetPagesToPrint().size() - 1;
}
- // <--
+ // since SwSrcView::PrintSource is a poor implementation to get the number of pages to print
+ // we obmit checking of the upper bound in this case.
+ if (bIsSwSrcView || nRenderer <= nMaxRenderer)
+ {
+ if (bIsSwSrcView)
+ {
+ SwSrcView *pSwSrcView = dynamic_cast< SwSrcView * >(pView);
+ OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
+ pSwSrcView->PrintSource( pOutDev, nRenderer + 1, false );
+ }
+ else
+ {
+ // the view shell should be SwView for documents PDF export
+ // or SwPagePreView for PDF export of the page preview
+ //!! (check for SwView first as in GuessViewShell) !!
+ DBG_ASSERT( pView, "!! view missing !!" );
+ const TypeId aSwViewTypeId = TYPE(SwView);
+ ViewShell* pVwSh = 0;
+ if (pView)
+ {
+ pVwSh = pView->IsA(aSwViewTypeId) ?
+ ((SwView*)pView)->GetWrtShellPtr() :
+ ((SwPagePreView*)pView)->GetViewShell();
+ }
- pVwSh->Prt( aOptions, 0, pOut );
+ // get output device to use
+ OutputDevice * pOut = lcl_GetOutputDevice( *m_pPrintUIOptions );
- // --> FME 2004-10-08 #i35176#
- //
- // After printing the last page, we take care for the links coming
- // from the EditEngine. The links are generated during the painting
- // process, but the destinations are still missing.
- //
- if ( bLastPage && pWrtShell )
- {
- SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPages, bSkipEmptyPages, sal_True );
- }
- // <--
+ if(pVwSh && pOut && m_pRenderData->HasSwPrtOptions())
+ {
+ const rtl::OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange", OUString() );
+ const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage", sal_False );
+ bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
+
+ DBG_ASSERT(( pView->IsA(aSwViewTypeId) && m_pRenderData->IsViewOptionAdjust())
+ || (!pView->IsA(aSwViewTypeId) && !m_pRenderData->IsViewOptionAdjust()),
+ "SwView / SwViewOptionAdjust_Impl availability mismatch" );
+
+ // since printing now also use the API for PDF export this option
+ // should be set for printing as well ...
+ pVwSh->SetPDFExportOption( sal_True );
+
+ // --> FME 2004-06-08 #i12836# enhanced pdf export
+ //
+ // First, we have to export hyperlinks, notes, and outline to pdf.
+ // During this process, additional information required for tagging
+ // the pdf file are collected, which are evaulated during painting.
+ //
+ SwWrtShell* pWrtShell = pView->IsA(aSwViewTypeId) ?
+ ((SwView*)pView)->GetWrtShellPtr() :
+ 0;
+
+ if (bIsPDFExport && bFirstPage && pWrtShell)
+ {
+ SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, sal_False );
+ }
+ // <--
+
+ const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ if (bPrintProspect)
+ pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer );
+ else // normal printing and PDF export
+ pVwSh->PrintOrPDFExport( pOut, rSwPrtOptions, nRenderer );
+
+ // --> FME 2004-10-08 #i35176#
+ //
+ // After printing the last page, we take care for the links coming
+ // from the EditEngine. The links are generated during the painting
+ // process, but the destinations are still missing.
+ //
+ if (bIsPDFExport && bLastPage && pWrtShell)
+ {
+ SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, sal_True );
+ }
+ // <--
- pVwSh->SetPDFExportOption( sal_False );
- // #i96167# haggai: delete pViewOptionsAdjust here because it makes use
- // of the shell, which might get destroyed in lcl_DisposeView!
- delete pViewOptionAdjust;
+ pVwSh->SetPDFExportOption( sal_False );
- if( bLastPage && m_pHiddenViewFrame)
- {
- lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
- m_pHiddenViewFrame = 0;
+ // last page to be rendered? (not necessarily the last page of the document)
+ // -> do clean-up of data
+ if (bLastPage)
+ {
+ // #i96167# haggai: delete ViewOptionsAdjust here because it makes use
+ // of the shell, which might get destroyed in lcl_DisposeView!
+ if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
+ m_pRenderData->ViewOptionAdjustStop();
+
+ if (m_pRenderData && m_pRenderData->HasPostItData())
+ m_pRenderData->DeletePostItData();
+ if (m_pHiddenViewFrame)
+ {
+ lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
+ m_pHiddenViewFrame = 0;
+ }
+ }
+ }
+ }
}
}
+ if( bLastPage )
+ {
+ delete m_pRenderData; m_pRenderData = NULL;
+ delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
+ }
}
/* -----------------------------03.10.04 -------------------------------------
@@ -3790,3 +4055,80 @@ void SwXDocumentPropertyHelper::onChange()
if(m_pDoc)
m_pDoc->SetModified();
}
+
+
+/*****************************************************************************/
+
+SwViewOptionAdjust_Impl::SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions ) :
+ m_rShell( rSh ),
+ m_aOldViewOptions( rViewOptions )
+{
+}
+
+
+SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
+{
+ m_rShell.ApplyViewOptions( m_aOldViewOptions );
+}
+
+
+void SwViewOptionAdjust_Impl::AdjustViewOptions(
+ const SwPrtOptions *pPrtOptions )
+{
+ // to avoid unnecessary reformatting the view options related to the content
+ // below should only change if necessary, that is if respective content is present
+ const bool bContainsHiddenChars = m_rShell.GetDoc()->ContainsHiddenChars();
+ const SwFieldType* pFldType = m_rShell.GetDoc()->GetSysFldType( RES_HIDDENTXTFLD );
+ const bool bContainsHiddenFields = pFldType && pFldType->GetDepends();
+ pFldType = m_rShell.GetDoc()->GetSysFldType( RES_HIDDENPARAFLD );
+ const bool bContainsHiddenParagraphs = pFldType && pFldType->GetDepends();
+ pFldType = m_rShell.GetDoc()->GetSysFldType( RES_JUMPEDITFLD );
+ const bool bContainsPlaceHolders = pFldType && pFldType->GetDepends();
+ const bool bContainsFields = m_rShell.IsAnyFieldInDoc();
+
+ SwViewOption aRenderViewOptions( m_aOldViewOptions );
+
+ // disable anything in the view that should not be printed (or exported to PDF) by default
+ // (see also dialog "Tools/Options - StarOffice Writer - Formatting Aids"
+ // in section "Display of ...")
+ aRenderViewOptions.SetParagraph( FALSE ); // paragraph end
+ aRenderViewOptions.SetSoftHyph( FALSE ); // aka custom hyphens
+ aRenderViewOptions.SetBlank( FALSE ); // spaces
+ aRenderViewOptions.SetHardBlank( FALSE ); // non-breaking spaces
+ aRenderViewOptions.SetTab( FALSE ); // tabs
+ aRenderViewOptions.SetLineBreak( FALSE ); // breaks (type 1)
+ aRenderViewOptions.SetPageBreak( FALSE ); // breaks (type 2)
+ aRenderViewOptions.SetColumnBreak( FALSE ); // breaks (type 3)
+ BOOL bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : FALSE;
+ if (bContainsHiddenChars)
+ aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text
+ if (bContainsHiddenFields)
+ aRenderViewOptions.SetShowHiddenField( bVal );
+ if (bContainsHiddenParagraphs)
+ aRenderViewOptions.SetShowHiddenPara( bVal );
+
+ if (bContainsPlaceHolders)
+ {
+ // should always be printed in PDF export!
+ bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE;
+ aRenderViewOptions.SetShowPlaceHolderFields( bVal );
+ }
+
+ if (bContainsFields)
+ aRenderViewOptions.SetFldName( FALSE );
+
+ // we need to set this flag in order to get to see the visible effect of
+ // some of the above settings (needed for correct rendering)
+ aRenderViewOptions.SetViewMetaChars( TRUE );
+
+ if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
+ {
+ aRenderViewOptions.SetPrinting( pPrtOptions != NULL );
+ m_rShell.ApplyViewOptions( aRenderViewOptions );
+ }
+}
+
+
+/*****************************************************************************/
+
+
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 6197bb489d61..26feb0bf3117 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -721,7 +721,7 @@ uno::Reference< awt::XControl > SwXTextView::getControl(const uno::Reference< a
/*-- 08.03.07 13:55------------------------------------------------------
-----------------------------------------------------------------------*/
-uno::Reference< form::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException)
+uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -731,7 +731,7 @@ uno::Reference< form::XFormController > SAL_CALL SwXTextView::getFormController(
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
DBG_ASSERT( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
- uno::Reference< form::XFormController > xController;
+ uno::Reference< form::runtime::XFormController > xController;
if ( pFormShell && pDrawView && pWindow )
xController = pFormShell->GetFormController( _Form, *pDrawView, *pWindow );
return xController;
@@ -2214,5 +2214,6 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe
}
}
}
+
// -----------------------------------------------------------------------------
diff --git a/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml b/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml
index a1a2c2f84f89..f0dc732d4ef9 100644
--- a/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml
@@ -19,7 +19,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FullScreen" toolbar:helpid="5627"/>
<toolbar:toolbaritem xlink:href=".uno:PrintPagePreView" toolbar:helpid="21253"/>
- <toolbar:toolbaritem xlink:href=".uno:PreviewPrintOptions" toolbar:helpid="20250"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ClosePreview" toolbar:helpid="5325"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/sweb/toolbar/previewobjectbar.xml b/sw/uiconfig/sweb/toolbar/previewobjectbar.xml
index a1c2fe8ded6e..5c6d30522614 100644
--- a/sw/uiconfig/sweb/toolbar/previewobjectbar.xml
+++ b/sw/uiconfig/sweb/toolbar/previewobjectbar.xml
@@ -19,7 +19,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FullScreen" toolbar:helpid="5627"/>
<toolbar:toolbaritem xlink:href=".uno:PrintPagePreView" toolbar:helpid="21253"/>
- <toolbar:toolbaritem xlink:href=".uno:PreviewPrintOptions" toolbar:helpid="20250"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ClosePreview" toolbar:helpid="5325"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swform/toolbar/previewobjectbar.xml b/sw/uiconfig/swform/toolbar/previewobjectbar.xml
index 8278110f8e4c..435250b63af5 100644
--- a/sw/uiconfig/swform/toolbar/previewobjectbar.xml
+++ b/sw/uiconfig/swform/toolbar/previewobjectbar.xml
@@ -19,7 +19,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FullScreen" toolbar:helpid="5627"/>
<toolbar:toolbaritem xlink:href=".uno:PrintPagePreView" toolbar:helpid="21253"/>
- <toolbar:toolbaritem xlink:href=".uno:PreviewPrintOptions" toolbar:helpid="20250"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ClosePreview" toolbar:helpid="5325"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swreport/toolbar/previewobjectbar.xml b/sw/uiconfig/swreport/toolbar/previewobjectbar.xml
index 8278110f8e4c..435250b63af5 100644
--- a/sw/uiconfig/swreport/toolbar/previewobjectbar.xml
+++ b/sw/uiconfig/swreport/toolbar/previewobjectbar.xml
@@ -19,7 +19,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FullScreen" toolbar:helpid="5627"/>
<toolbar:toolbaritem xlink:href=".uno:PrintPagePreView" toolbar:helpid="21253"/>
- <toolbar:toolbaritem xlink:href=".uno:PreviewPrintOptions" toolbar:helpid="20250"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ClosePreview" toolbar:helpid="5325"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swriter/toolbar/previewobjectbar.xml b/sw/uiconfig/swriter/toolbar/previewobjectbar.xml
index 8278110f8e4c..435250b63af5 100644
--- a/sw/uiconfig/swriter/toolbar/previewobjectbar.xml
+++ b/sw/uiconfig/swriter/toolbar/previewobjectbar.xml
@@ -19,7 +19,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FullScreen" toolbar:helpid="5627"/>
<toolbar:toolbaritem xlink:href=".uno:PrintPagePreView" toolbar:helpid="21253"/>
- <toolbar:toolbaritem xlink:href=".uno:PreviewPrintOptions" toolbar:helpid="20250"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ClosePreview" toolbar:helpid="5325"/>
</toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/toolbar/previewobjectbar.xml b/sw/uiconfig/swxform/toolbar/previewobjectbar.xml
index 8278110f8e4c..435250b63af5 100644
--- a/sw/uiconfig/swxform/toolbar/previewobjectbar.xml
+++ b/sw/uiconfig/swxform/toolbar/previewobjectbar.xml
@@ -19,7 +19,6 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FullScreen" toolbar:helpid="5627"/>
<toolbar:toolbaritem xlink:href=".uno:PrintPagePreView" toolbar:helpid="21253"/>
- <toolbar:toolbaritem xlink:href=".uno:PreviewPrintOptions" toolbar:helpid="20250"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ClosePreview" toolbar:helpid="5325"/>
</toolbar:toolbar>
diff --git a/testautomation/chart2/required/includes/ch2_format.inc b/testautomation/chart2/required/includes/ch2_format.inc
index 64f42270ae2d..aef508bcf230 100755
--- a/testautomation/chart2/required/includes/ch2_format.inc
+++ b/testautomation/chart2/required/includes/ch2_format.inc
@@ -798,6 +798,8 @@ endcase
'-------------------------------------------------------------------------------
'
testcase tFormatAxisXAxis
+
+ Dim bAsianLanguage as boolean
Dim iCountTabPg as integer
iCountTabPg = 0
@@ -805,7 +807,9 @@ testcase tFormatAxisXAxis
if fLoadVerySimpleChartAndSaveLocal() > 0 then
warnlog "Loading test document seems to have failed -> Check this out!"
goto endsub
- endif
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
printlog "Select chart using navigator"
call fSelectFirstOLE
printlog "Edit / Object / Edit"
@@ -834,10 +838,10 @@ testcase tFormatAxisXAxis
printlog "Goto tab page Line"
Kontext
iCountTabPg = Active.GetPageCount
- if iCountTabPg <> 7 then
- warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "."
else
- printlog "Format::Axis::XAxis has 7 tab pages."
+ printlog "Format::Axis::XAxis has 8 tab pages."
endif
Active.SetPage TabFormatChartLine
printlog "Check if tab page Line exists"
@@ -879,7 +883,11 @@ testcase tFormatAxisXAxis
Kontext "TabChartAxisNumbers"
call DialogTest ( TabChartAxisNumbers )
printlog "Close dialog with cancel"
- TabChartAxisNumbers.Cancel
+ TabChartAxisNumbers.Cancel
+ printlog " Set support for CJK back to default (Tools – Options – Language Support)"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
printlog "File / Close"
Call hCloseDocument
endcase
@@ -887,6 +895,8 @@ endcase
'-------------------------------------------------------------
'
testcase tFormatAxisYAxis
+
+ Dim bAsianLanguage as boolean
Dim iCountTabPg as integer
Dim iCrossingEntries as integer
Dim iCategoryEntries as integer
@@ -903,7 +913,9 @@ testcase tFormatAxisYAxis
if fLoadVerySimpleChartAndSaveLocal() > 0 then
warnlog "Loading test document seems to have failed -> Check this out!"
goto endsub
- endif
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
printlog "Select chart using navigator"
call fSelectFirstOLE
printlog "Edit / Object / Edit"
@@ -931,10 +943,10 @@ testcase tFormatAxisYAxis
FormatAxisYAxis
Kontext
iCountTabPg = Active.GetPageCount
- if iCountTabPg <> 7 then
- warnlog "Format::Axis::YAxis should have 7 tab pages but has " & iCountTabPg & "."
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::YAxis should have 8 tab pages but has " & iCountTabPg & "."
else
- printlog "Format::Axis::YAxis has 7 tab pages."
+ printlog "Format::Axis::YAxis has 8 tab pages."
endif
printlog "Goto tab page Characters"
Active.SetPage TabFont
@@ -1024,7 +1036,10 @@ testcase tFormatAxisYAxis
endif
Kontext "TabChartAxisPositioning"
printlog "Leave dialog with Cancel."
- TabChartAxisPositioning.Cancel
+ TabChartAxisPositioning.Cancel
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
printlog "File / Close"
Call hCloseDocument
endcase
@@ -1113,14 +1128,18 @@ endcase
'-------------------------------------------------------------
'
testcase tFormatAxisSecondaryXAxis
- Dim iCountTabPg as integer
+
+ Dim bAsianLanguage as boolean
+ Dim iCountTabPg as integer
iCountTabPg = 0
printlog "Load simple chart document"
if fLoadVerySimpleChartAndSaveLocal() > 0 then
warnlog "Loading test document seems to have failed -> Check this out!"
goto endsub
- endif
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
printlog "Select chart using navigator"
call fSelectFirstOLE
printlog "Edit / Object / Edit"
@@ -1168,10 +1187,10 @@ testcase tFormatAxisSecondaryXAxis
printlog "Goto tab page Line"
Kontext
iCountTabPg = Active.GetPageCount
- if iCountTabPg <> 7 then
- warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "."
else
- printlog "Format::Axis::XAxis has 7 tab pages."
+ printlog "Format::Axis::XAxis has 8 tab pages."
endif
Active.SetPage TabFormatChartLine
printlog "Check if tab page Line exists"
@@ -1213,7 +1232,10 @@ testcase tFormatAxisSecondaryXAxis
Kontext "TabChartAxisNumbers"
call DialogTest ( TabChartAxisNumbers )
printlog "Close dialog with cancel"
- TabChartAxisNumbers.Cancel
+ TabChartAxisNumbers.Cancel
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
printlog "File / Close"
Call hCloseDocument
endcase
@@ -1221,14 +1243,18 @@ endcase
'-------------------------------------------------------------
'
testcase tFormatAxisSecondaryYAxis
- Dim iCountTabPg as integer
+
+ Dim bAsianLanguage as boolean
+ Dim iCountTabPg as integer
iCountTabPg = 0
printlog "Load simple chart document"
if fLoadVerySimpleChartAndSaveLocal() > 0 then
warnlog "Loading test document seems to have failed -> Check this out!"
goto endsub
- endif
+ endif
+ printlog " Enable language support for CJK (Tools-Options-Language Support)"
+ bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
printlog "Select chart using navigator"
call fSelectFirstOLE
printlog "Edit / Object / Edit"
@@ -1258,10 +1284,10 @@ testcase tFormatAxisSecondaryYAxis
printlog "Goto tab page Line"
Kontext
iCountTabPg = Active.GetPageCount
- if iCountTabPg <> 7 then
- warnlog "Format::Axis::XAxis should have 7 tab pages but has " & iCountTabPg & "."
+ if iCountTabPg <> 8 then
+ warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "."
else
- printlog "Format::Axis::XAxis has 7 tab pages."
+ printlog "Format::Axis::XAxis has 8 tab pages."
endif
Active.SetPage TabFormatChartLine
printlog "Check if tab page Line exists"
@@ -1303,7 +1329,11 @@ testcase tFormatAxisSecondaryYAxis
Kontext "TabChartAxisNumbers"
call DialogTest ( TabChartAxisNumbers )
printlog "Close dialog with cancel"
- TabChartAxisNumbers.Cancel
+ TabChartAxisNumbers.Cancel
+ printlog " Set support for CJK back to default (Tools – Options – Language Support)"
+ if bAsianLanguage = FALSE then
+ Call ActiveDeactivateAsianSupport(FALSE)
+ end if
printlog "File / Close"
Call hCloseDocument
endcase
diff --git a/testautomation/chart2/tools/ch_tools_statistics.inc b/testautomation/chart2/tools/ch_tools_statistics.inc
index 7666fac165e5..513e8c8b3f56 100644
--- a/testautomation/chart2/tools/ch_tools_statistics.inc
+++ b/testautomation/chart2/tools/ch_tools_statistics.inc
@@ -88,7 +88,7 @@ function fInvokeTrendlinesDialog() as INTEGER
'/// Lookup if call was successful
Kontext
- active.SetPage "TabTrendLineType"
+ active.SetPage (TabTrendLineType)
Kontext "TabTrendLineType"
if TabTrendLineType.exists(2) then
printlog ">> Trend lines dialog is visible now."
diff --git a/testautomation/dbaccess/optional/includes/ctrl_PropertyBrowser.inc b/testautomation/dbaccess/optional/includes/ctrl_PropertyBrowser.inc
index f242426167ad..0322974437cc 100755
--- a/testautomation/dbaccess/optional/includes/ctrl_PropertyBrowser.inc
+++ b/testautomation/dbaccess/optional/includes/ctrl_PropertyBrowser.inc
@@ -409,6 +409,7 @@ testcase tForms
'/// set encoding to Multipart
printlog "set encoding to Multipart"
Encoding.select 2
+ sleep(1)
'/// check if the SubmitMethod get enabled
printlog "check if the SubmitMethod get enabled"
if SubmitMethod.isEnabled then
@@ -417,6 +418,7 @@ testcase tForms
'/// set encoding to URL
printlog "set encoding to URL"
Encoding.select 1
+ sleep(1)
'/// check if the SubmitMethod get disabled
printlog "check if the SubmitMethod get disabled"
if NOT SubmitMethod.isEnabled then
diff --git a/testautomation/dbaccess/optional/includes/ctrl_Wizards.inc b/testautomation/dbaccess/optional/includes/ctrl_Wizards.inc
index b7e93ba9e34c..ae090136d2ee 100755
--- a/testautomation/dbaccess/optional/includes/ctrl_Wizards.inc
+++ b/testautomation/dbaccess/optional/includes/ctrl_Wizards.inc
@@ -96,7 +96,8 @@ testcase tGroupBoxWithDatasource
'/// set the datasource TT
printlog "set the datasource TT"
DataSource.setText(sDSName)
- DataSource.TypeKeys "<RETURN>" , true
+ DataSource.TypeKeys "<RETURN>" , true
+ sleep(1)
'/// insert password 'testtool' into login dialog
printlog "insert password 'testtool' into login dialog"
Kontext "LoginDialog"
diff --git a/testautomation/framework/optional/f_CJK_GridLayout.bas b/testautomation/framework/optional/f_CJK_GridLayout.bas
index d131afc451ba..7d3d212fc7de 100755
--- a/testautomation/framework/optional/f_CJK_GridLayout.bas
+++ b/testautomation/framework/optional/f_CJK_GridLayout.bas
@@ -43,7 +43,7 @@ sub main
PrintLog "---------------------------------------------------------------------"
Printlog "----- Grid Layout for CJK in Writer -----"
PrintLog "---------------------------------------------------------------------"
-
+
use "framework\optional\includes\w_grid_layout1.inc"
sAsianLanguageFlag = CheckAsianLanguageSupport("Current")
@@ -80,7 +80,9 @@ sub LoadIncludeFiles
use "global\system\includes\gvariabl.inc"
use "global\tools\includes\required\t_doc1.inc"
use "global\tools\includes\required\t_tools1.inc"
- use "framework\tools\includes\CJK_tools.inc"
+ use "global\tools\includes\optional\t_docfuncs.inc"
+
+ use "framework\tools\includes\CJK_tools.inc"
gApplication = "WRITER"
Call GetUseFiles
end sub
diff --git a/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc b/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc
index ce8dabdfaa7d..209e5b0ed0c9 100755..100644
--- a/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc
+++ b/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
+'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
@@ -39,213 +39,220 @@
testcase tLanguageTest_1
- Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
- Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
- Dim i as Integer
-
-
- select case iSprache
- case 01 :' English (USA)
- sKeyTypeEnglishUSA = "Alphanumeric"
- sKeyTypeSChinese = "Character set"
- sKeyTypeTChinese = "Numeric"
- sKeyTypeJapanese = "Character set"
- sKeyTypeKoren = "Character set"
- case 49 :' German
- sKeyTypeEnglishUSA = "Alphanumerisch"
- sKeyTypeSChinese = "Numerisch"
- sKeyTypeTChinese = "Numerisch"
- sKeyTypeJapanese = "Numerisch"
- sKeyTypeKoren = "Numerisch"
- case 55 :' Brazilian
- sKeyTypeEnglishUSA = "Alfanumérico"
- sKeyTypeSChinese = "Conjunto de caracteres"
- sKeyTypeTChinese = "numérico"
- sKeyTypeJapanese = "Conjunto de caracteres"
- sKeyTypeKoren = "Conjunto de caracteres"
- case 81 :' Japanese
- sKeyTypeEnglishUSA = "英数字"
- sKeyTypeSChinese = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
- sKeyTypeTChinese = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
- sKeyTypeJapanese = "æ•°å­—"
- sKeyTypeKoren = "æ•°å­—"
-' case 82 : ' Korean
-' sKeyTypeEnglishUSA = 1 'alphanumeric
-' sKeyTypeSChinese = 1 'Character set
-' sKeyTypeTChinese = 3 'Pin yin
-' sKeyTypeJapanese = 2 'Character set
-' sKeyTypeKoren = 3 'Character set
- case 86 :' Chinese (simplified)
- sKeyTypeEnglishUSA = "å­—æ¯æ•°å­—å¼"
- sKeyTypeSChinese = "字符集"
- sKeyTypeTChinese = "拼音"
- sKeyTypeJapanese = "字符集"
- sKeyTypeKoren = "å­—å…¸"
- case 88 :' Chinese (traditional)
- sKeyTypeEnglishUSA = "å­—æ¯æ•¸å­—å¼"
- sKeyTypeSChinese = "å­—åž‹"
- sKeyTypeTChinese = "拼音"
- sKeyTypeJapanese = "å­—åž‹"
- sKeyTypeKoren = "å­—å…¸"
- case else :' Fallback
- PrintLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- sLanguageIDEnglishUSA = fGetCountryName(01)
- sLanguageIDSChinese = fGetCountryName(86)
- sLanguageIDTChinese = fGetCountryName(88)
- sLanguageIDJapanese = fGetCountryName(81)
- sLanguageIDKoren = fGetCountryName(82)
-
- call hNewDocument
-
- DocumentWriter.TypeKeys "test"
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 1
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- Sleep 2
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDTChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
- ' try fallback to 'Chinese (traditional)'
- try
- Sprache.Select ("Chinese (traditional)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
- for i = 1 to Sprache.getItemCount
- printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
- next i
- endcatch
- endcatch
- Sleep 2
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDJapanese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
- ' try fallback to 'Japanese'
- try
- Sprache.Select ("Japanese")
- catch
- qaErrorLog "Can't select even tha fallback: 'Japanese'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
- warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDKoren)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
- ' try fallback to 'Korean (RoK)'
- try
- Sprache.Select ("Korean (RoK)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
- for i = 1 to Sprache.getItemCount
- printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
- next i
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
- warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
- end if
-
- Sortieren.Cancel
-
- Call hCloseDocument
+ Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
+ Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
+ Dim i as Integer
+
+ '/// Check if the default setting for &quot;key type&quot; is right for CJK when alphanumeric is chosen in English
+
+ select case iSprache
+ case 01 :' English (USA)
+ sKeyTypeEnglishUSA = "Alphanumeric"
+ sKeyTypeSChinese = "Character set"
+ sKeyTypeTChinese = "Numeric"
+ sKeyTypeJapanese = "Character set"
+ sKeyTypeKoren = "Character set"
+ case 49 :' German
+ sKeyTypeEnglishUSA = "Alphanumerisch"
+ sKeyTypeSChinese = "Numerisch"
+ sKeyTypeTChinese = "Numerisch"
+ sKeyTypeJapanese = "Numerisch"
+ sKeyTypeKoren = "Numerisch"
+ case 55 :' Brazilian
+ sKeyTypeEnglishUSA = "Alfanumérico"
+ sKeyTypeSChinese = "Conjunto de caracteres"
+ sKeyTypeTChinese = "numérico"
+ sKeyTypeJapanese = "Conjunto de caracteres"
+ sKeyTypeKoren = "Conjunto de caracteres"
+ case 81 :' Japanese
+ sKeyTypeEnglishUSA = "英数字"
+ sKeyTypeSChinese = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
+ sKeyTypeTChinese = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
+ sKeyTypeJapanese = "æ•°å­—"
+ sKeyTypeKoren = "æ•°å­—"
+ ' case 82 : ' Korean
+ ' sKeyTypeEnglishUSA = 1 'alphanumeric
+ ' sKeyTypeSChinese = 1 'Character set
+ ' sKeyTypeTChinese = 3 'Pin yin
+ ' sKeyTypeJapanese = 2 'Character set
+ ' sKeyTypeKoren = 3 'Character set
+ case 86 :' Chinese (simplified)
+ sKeyTypeEnglishUSA = "å­—æ¯æ•°å­—å¼"
+ sKeyTypeSChinese = "字符集"
+ sKeyTypeTChinese = "拼音"
+ sKeyTypeJapanese = "字符集"
+ sKeyTypeKoren = "å­—å…¸"
+ case 88 :' Chinese (traditional)
+ sKeyTypeEnglishUSA = "å­—æ¯æ•¸å­—å¼"
+ sKeyTypeSChinese = "å­—åž‹"
+ sKeyTypeTChinese = "拼音"
+ sKeyTypeJapanese = "å­—åž‹"
+ sKeyTypeKoren = "å­—å…¸"
+ case else :' Fallback
+ PrintLog "The test does not support the language " + iSprache
+ Goto endsub
+ end select
+
+ sLanguageIDEnglishUSA = fGetCountryName(01)
+ sLanguageIDSChinese = fGetCountryName(86)
+ sLanguageIDTChinese = fGetCountryName(88)
+ sLanguageIDJapanese = fGetCountryName(81)
+ sLanguageIDKoren = fGetCountryName(82)
+
+ call hNewDocument
+
+ DocumentWriter.TypeKeys "test"
+ DocumentWriter.TypeKeys "<Shift Home>"
+ Sleep 1
+
+ '/// Open Tools/Sort
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: English and key type: alphanumeric
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ '/// Check to simplified Chinese
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ Sleep 2
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to traditional Chinese
+ try
+ Sprache.Select (sLanguageIDTChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
+ ' try fallback to 'Chinese (traditional)'
+ try
+ Sprache.Select ("Chinese (traditional)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
+ for i = 1 to Sprache.getItemCount
+ printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
+ next i
+ endcatch
+ endcatch
+ Sleep 2
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Japanese
+ try
+ Sprache.Select (sLanguageIDJapanese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
+ ' try fallback to 'Japanese'
+ try
+ Sprache.Select ("Japanese")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Japanese'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
+ warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Korean
+ try
+ Sprache.Select (sLanguageIDKoren)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
+ ' try fallback to 'Korean (RoK)'
+ try
+ Sprache.Select ("Korean (RoK)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
+ for i = 1 to Sprache.getItemCount
+ printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
+ next i
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
+ warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
+ end if
+
+ Sortieren.Cancel
+
+ Call hCloseDocument
endcase
@@ -253,458 +260,452 @@ endcase
testcase tLanguageTest_2
- Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
- Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
- Dim i as Integer
-
-
- select case iSprache
- case 01 :' English (USA)
- sKeyTypeEnglishUSA = "Numeric"
- sKeyTypeSChinese = "Numeric"
- sKeyTypeTChinese = "Numeric"
- sKeyTypeJapanese = "Numeric"
- sKeyTypeKoren = "Numeric"
- case 49 :' German
- sKeyTypeEnglishUSA = "Numerisch"
- sKeyTypeSChinese = "Numerisch"
- sKeyTypeTChinese = "Numerisch"
- sKeyTypeJapanese = "Numerisch"
- sKeyTypeKoren = "Numerisch"
- case 55 :' Brazilian
- sKeyTypeEnglishUSA = "numérico"
- sKeyTypeSChinese = "numérico"
- sKeyTypeTChinese = "numérico"
- sKeyTypeJapanese = "numérico"
- sKeyTypeKoren = "numérico"
- case 81 :' Japanese
- sKeyTypeEnglishUSA = "æ•°å­—"
- sKeyTypeSChinese = "æ•°å­—"
- sKeyTypeTChinese = "æ•°å­—"
- sKeyTypeJapanese = "æ•°å­—"
- sKeyTypeKoren = "æ•°å­—"
-' case 82 ' Korean
-' sKeyTypeEnglishUSA = 2 'numeric
-' sKeyTypeSChinese = 4 'numeric
-' sKeyTypeTChinese = 4 'numeric
-' sKeyTypeJapanese = 4 'numeric
-' sKeyTypeKoren = 4 'numeric
- case 86 :' Chinese (simplified)
- sKeyTypeEnglishUSA = "æ•°å­—"
- sKeyTypeSChinese = "æ•°å­—"
- sKeyTypeTChinese = "æ•°å­—"
- sKeyTypeJapanese = "æ•°å­—"
- sKeyTypeKoren = "æ•°å­—"
- case 88 :' Chinese (traditional)
- sKeyTypeEnglishUSA = "數字"
- sKeyTypeSChinese = "數字"
- sKeyTypeTChinese = "數字"
- sKeyTypeJapanese = "數字"
- sKeyTypeKoren = "數字"
- case else :' Fallback
- printLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- sLanguageIDEnglishUSA = fGetCountryName(01)
- sLanguageIDSChinese = fGetCountryName(86)
- sLanguageIDTChinese = fGetCountryName(88)
- sLanguageIDJapanese = fGetCountryName(81)
- sLanguageIDKoren = fGetCountryName(82)
-
- call hNewDocument
-
- DocumentWriter.TypeKeys "123"
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 1
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- for i = 1 to Sprache.getItemCount
- printlog "" + i + ": '" + Sprache.getItemText(i) + "'"
- next i
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeSChinese then
- warnlog "The default key type for Simplified Chinese should be: '" + sKeyTypeSChinese + "' but is '" + Schluesseltyp1.GetSelText + "'"
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDTChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
- ' try fallback to 'Chinese (traditional)'
- try
- Sprache.Select ("Chinese (traditional)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeTChinese then
- warnlog "The default key type for traditional Chinese should be " + sKeyTypeTChinese + " but get " + Schluesseltyp1.GetSelText
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDJapanese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
- ' try fallback to 'Japanese'
- try
- Sprache.Select ("Japanese")
- catch
- qaErrorLog "Can't select even tha fallback: 'Japanese'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
- warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDKoren)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
- ' try fallback to 'Korean (RoK)'
- try
- Sprache.Select ("Korean (RoK)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
- warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
- end if
-
- Sortieren.Cancel
-
- Call hCloseDocument
+ Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
+ Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
+ Dim i as Integer
+
+ '/// Check if the default setting for &quot;key type&quot; is right for CJK when numeric is chosen in English
+
+ select case iSprache
+ case 01 :' English (USA)
+ sKeyTypeEnglishUSA = "Numeric"
+ sKeyTypeSChinese = "Numeric"
+ sKeyTypeTChinese = "Numeric"
+ sKeyTypeJapanese = "Numeric"
+ sKeyTypeKoren = "Numeric"
+ case 49 :' German
+ sKeyTypeEnglishUSA = "Numerisch"
+ sKeyTypeSChinese = "Numerisch"
+ sKeyTypeTChinese = "Numerisch"
+ sKeyTypeJapanese = "Numerisch"
+ sKeyTypeKoren = "Numerisch"
+ case 55 :' Brazilian
+ sKeyTypeEnglishUSA = "numérico"
+ sKeyTypeSChinese = "numérico"
+ sKeyTypeTChinese = "numérico"
+ sKeyTypeJapanese = "numérico"
+ sKeyTypeKoren = "numérico"
+ case 81 :' Japanese
+ sKeyTypeEnglishUSA = "æ•°å­—"
+ sKeyTypeSChinese = "æ•°å­—"
+ sKeyTypeTChinese = "æ•°å­—"
+ sKeyTypeJapanese = "æ•°å­—"
+ sKeyTypeKoren = "æ•°å­—"
+ ' case 82 ' Korean
+ ' sKeyTypeEnglishUSA = 2 'numeric
+ ' sKeyTypeSChinese = 4 'numeric
+ ' sKeyTypeTChinese = 4 'numeric
+ ' sKeyTypeJapanese = 4 'numeric
+ ' sKeyTypeKoren = 4 'numeric
+ case 86 :' Chinese (simplified)
+ sKeyTypeEnglishUSA = "æ•°å­—"
+ sKeyTypeSChinese = "æ•°å­—"
+ sKeyTypeTChinese = "æ•°å­—"
+ sKeyTypeJapanese = "æ•°å­—"
+ sKeyTypeKoren = "æ•°å­—"
+ case 88 :' Chinese (traditional)
+ sKeyTypeEnglishUSA = "數字"
+ sKeyTypeSChinese = "數字"
+ sKeyTypeTChinese = "數字"
+ sKeyTypeJapanese = "數字"
+ sKeyTypeKoren = "數字"
+ case else :' Fallback
+ printLog "The test does not support the language " + iSprache
+ Goto endsub
+ end select
+
+ sLanguageIDEnglishUSA = fGetCountryName(01)
+ sLanguageIDSChinese = fGetCountryName(86)
+ sLanguageIDTChinese = fGetCountryName(88)
+ sLanguageIDJapanese = fGetCountryName(81)
+ sLanguageIDKoren = fGetCountryName(82)
+
+ call hNewDocument
+
+ DocumentWriter.TypeKeys "123"
+ DocumentWriter.TypeKeys "<Shift Home>"
+ Sleep 1
+
+ '/// Open Tools/Sort
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: English and key type: Numeric
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ for i = 1 to Sprache.getItemCount
+ printlog "" + i + ": '" + Sprache.getItemText(i) + "'"
+ next i
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ '/// Check to simplified Chinese
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeSChinese then
+ warnlog "The default key type for Simplified Chinese should be: '" + sKeyTypeSChinese + "' but is '" + Schluesseltyp1.GetSelText + "'"
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to traditional Chinese
+ try
+ Sprache.Select (sLanguageIDTChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
+ ' try fallback to 'Chinese (traditional)'
+ try
+ Sprache.Select ("Chinese (traditional)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeTChinese then
+ warnlog "The default key type for traditional Chinese should be " + sKeyTypeTChinese + " but get " + Schluesseltyp1.GetSelText
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Japanese
+ try
+ Sprache.Select (sLanguageIDJapanese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
+ ' try fallback to 'Japanese'
+ try
+ Sprache.Select ("Japanese")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Japanese'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
+ warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Korean
+ try
+ Sprache.Select (sLanguageIDKoren)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
+ ' try fallback to 'Korean (RoK)'
+ try
+ Sprache.Select ("Korean (RoK)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
+ warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
+ end if
+
+ Sortieren.Cancel
+
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tStrokeSort
- Dim testFile as String
- Dim sLanguageIDSChinese as String
- Dim sKeyTypeSChinese as String
- Dim aCorrectSequence() as String
-
- Dim i , j as Integer
-
- testFile = "sortTest.sxw"
- aCorrectSequence = Array( "1" , "2" , "3" , "4" ,"5" )
-
- j = UBound(aCorrectSequence)
-
- select case iSprache
- case 01 : ' English (USA)
- sKeyTypeSChinese = "Stroke"
- case 49 : ' German
- sKeyTypeSChinese = "Stroke"
- case 55 : ' Brazilian
- sKeyTypeSChinese = "Traço"
- case 81 : ' Japanese
- sKeyTypeSChinese = "ç·ç”»æ•°"
- case 86 : ' Chinese (simplified)
- sKeyTypeSChinese = "笔画"
- case 88 : ' Chinese (simplified)
- sKeyTypeSChinese = "筆畫"
- case else : ' Fallback
- printLog "Now, the test does not support for the language " +iSprache
- Goto endsub
+ Dim testFile as String
+ Dim sLanguageIDSChinese as String
+ Dim sKeyTypeSChinese as String
+ Dim aCorrectSequence() as String
+
+ Dim i , j as Integer
+
+ testFile = "sortTest.sxw"
+ aCorrectSequence = Array( "1" , "2" , "3" , "4" ,"5" )
+
+ j = UBound(aCorrectSequence)
+
+ select case iSprache
+ case 01 : ' English (USA)
+ sKeyTypeSChinese = "Stroke"
+ case 49 : ' German
+ sKeyTypeSChinese = "Stroke"
+ case 55 : ' Brazilian
+ sKeyTypeSChinese = "Traço"
+ case 81 : ' Japanese
+ sKeyTypeSChinese = "ç·ç”»æ•°"
+ case 86 : ' Chinese (simplified)
+ sKeyTypeSChinese = "笔画"
+ case 88 : ' Chinese (simplified)
+ sKeyTypeSChinese = "筆畫"
+ case else : ' Fallback
+ printLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
end select
- sLanguageIDSChinese = fGetCountryName(86)
-
+ sLanguageIDSChinese = fGetCountryName(86)
+
+ '/// Check Stroke sort for Simplified Chinese
+
+ Call hNewDocument
+ '/// Open a test file and check <i>No Grid</i> checkbox
+ Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
+ sMakeReadOnlyDocumentEditable
+ EditSelectAll
+
+ '/// Open <i>Tools/Sort</i>
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: Simplified Chinese and key type <i>Stroke</i>
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeSChinese
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ Sortieren.OK
+
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<MOD1 Home>"
+
+ For i = 0 to j
+ DocumentWriter.TypeKeys "<End>"
+ DocumentWriter.TypeKeys "<Shift Left>"
+
+ EditCopy
+ if GetClipboardText <> aCorrectSequence(i) then Warnlog "The Stroke sort is wrong , should be " + aCorrectSequence(i) + " ,but get " +GetClipboardText
+
+ DocumentWriter.TypeKeys "<Down>"
+ next i
+
+ Call hCloseDocument
- Call hNewDocument
- Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
- sMakeReadOnlyDocumentEditable
- EditSelectAll
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeSChinese
- catch
- qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- Sortieren.OK
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<MOD1 Home>"
+endcase
- For i = 0 to j
- DocumentWriter.TypeKeys "<End>"
- DocumentWriter.TypeKeys "<Shift Left>"
+'-------------------------------------------------------------------------
- EditCopy
- if GetClipboardText <> aCorrectSequence(i) then Warnlog "The Stroke sort is wrong , should be " + aCorrectSequence(i) + " ,but get " +GetClipboardText
+testcase tPinyinSort
- DocumentWriter.TypeKeys "<Down>"
- next i
+ Dim testFile as String
+ Dim sLanguageIDSChinese as String
+ Dim sKeyTypeSChinese as String
+ Dim aCorrectSequence() as String
+
+ Dim i , j as Integer
+
+ testFile = "sortTest.sxw"
+ aCorrectSequence = Array( "2" , "3" , "4" , "1" , "5" )
+
+ j = UBound(aCorrectSequence)
+
+ select case iSprache
+ case 01 : ' English (USA)
+ sKeyTypeSChinese = "Pinyin"
+ case 49 : ' German
+ sKeyTypeSChinese = "Pinyin"
+ case 55 : ' Brazilian
+ sKeyTypeSChinese = "Pinyin"
+ case 81 : ' Japanese
+ sKeyTypeSChinese = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
+ case 86 : ' Chinese (simplified)
+ sKeyTypeSChinese = "拼音"
+ case 88 : ' Chinese (simplified)
+ sKeyTypeSChinese = "拼音"
+ case else : ' Fallback
+ printLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
+ end select
- Call hCloseDocument
+ sLanguageIDSChinese = fGetCountryName(86)
+
+ '/// Check <i>Pinyin</i> sort for Simplified Chinese
+
+ Call hNewDocument
+ '/// Open a test file and check <i>No Grid</i> checkbox
+ Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
+ sMakeReadOnlyDocumentEditable
+ EditSelectAll
+
+ '/// Open <i>Tools/Sort</i>
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: Simplified Chinese and key type <i>Pin yin</i>
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeSChinese
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ Sortieren.OK
+
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<MOD1 Home>"
+
+ For i = 0 to j
+ DocumentWriter.TypeKeys "<End>"
+ DocumentWriter.TypeKeys "<Shift Left>"
+
+ EditCopy
+ if GetClipboardText <> aCorrectSequence(i) then
+ Warnlog "The Pin yin sort is wrong, should be: '" + aCorrectSequence(i) + "' ,but is: '" +GetClipboardText + "'"
+ endif
+
+ DocumentWriter.TypeKeys "<Down>"
+ next i
+
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
-testcase tPinyinSort
+testcase tSortOptionTest_1
- Dim testFile as String
- Dim sLanguageIDSChinese as String
- Dim sKeyTypeSChinese as String
- Dim aCorrectSequence() as String
-
- Dim i , j as Integer
-
- testFile = "sortTest.sxw"
- aCorrectSequence = Array( "2" , "3" , "4" , "1" , "5" )
-
- j = UBound(aCorrectSequence)
-
- select case iSprache
- case 01 : ' English (USA)
- sKeyTypeSChinese = "Pinyin"
- case 49 : ' German
- sKeyTypeSChinese = "Pinyin"
- case 55 : ' Brazilian
- sKeyTypeSChinese = "Pinyin"
- case 81 : ' Japanese
- sKeyTypeSChinese = "ピンイン(中国語ã®ãƒ­ãƒ¼ãƒžå­—表記法)"
- case 86 : ' Chinese (simplified)
- sKeyTypeSChinese = "拼音"
- case 88 : ' Chinese (simplified)
- sKeyTypeSChinese = "拼音"
- case else : ' Fallback
- printLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- sLanguageIDSChinese = fGetCountryName(86)
-
-
- Call hNewDocument
- Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
- sMakeReadOnlyDocumentEditable
- EditSelectAll
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeSChinese
- catch
- qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- Sortieren.OK
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<MOD1 Home>"
-
- For i = 0 to j
- DocumentWriter.TypeKeys "<End>"
- DocumentWriter.TypeKeys "<Shift Left>"
-
- EditCopy
- if GetClipboardText <> aCorrectSequence(i) then
- Warnlog "The Pin yin sort is wrong, should be: '" + aCorrectSequence(i) + "' ,but is: '" +GetClipboardText + "'"
- endif
-
- DocumentWriter.TypeKeys "<Down>"
- next i
-
- Call hCloseDocument
+ Dim i , j as Integer
+ Dim asList() as String
+
+ select case iSprache
+ case 81 :' Japanese
+ if iSystemSprache <> 81 then goto NOTest
+ asList = Array( "Sun,Mon,Tue,Wed,Thu,Fri,Sat" , "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday" , "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" , "January,February,March,April,May,June,July,August,September,October,November,December" , "æ—¥,月,ç«,æ°´,木,金,土" , "日曜日,月曜日,ç«æ›œæ—¥,水曜日,木曜日,金曜日,土曜日" , )
+ case 82 :' Korean
+ if iSystemSprache <> 82 then goto NOTest
+ asList = Array( "ì¼,ì›”,í™”,수,목,금,토" ,"ì¼ìš”ì¼,월요ì¼,화요ì¼,수요ì¼,목요ì¼,금요ì¼,토요ì¼" ,"1,2,3,4,5,6,7,8,9,10,11,12" , "æ—¥,月,ç«,æ°´,木,金,土" , "日曜日,月曜日,ç«æ›œæ—¥,水曜日,木曜日,金曜日,土曜日" , )
+ case 86 :' Chinese (simplified)
+ if iSystemSprache <> 86 then goto NOTest
+ asList = Array( "æ—¥,一,二,三,å››,五,å…­" , "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , "一,二,三,å››,五,å…­,七,å…«,ä¹,å,å一,å二" , "一月,二月,三月,四月,五月,六月,七月,八月,ä¹æœˆ,å月,å一月,å二月" , )
+ case 88 :' Chinese (traditional)
+ if iSystemSprache <> 88 then goto NOTest
+ asList = Array( "æ—¥,一,二,三,å››,五,å…­" , "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , "一,二,三,å››,五,å…­,七,å…«,ä¹,å,å一,å二" , "一月,二月,三月,四月,五月,六月,七月,八月,ä¹æœˆ,å月,å一月,å二月" , )
+ case else :' Fallback
+ NOTest:
+ printLog "The test does not support for the language " +iSprache + " System language " + iSystemSprache
+ Goto endsub
+ end select
-endcase
+ '/// Check if the entries in custom sort order is right in CJK version
-'-------------------------------------------------------------------------
+ call hNewDocument
-testcase tSortOptionTest_1
+ '/// Open <i>Data/Sort</i> -&gt; tabpage <i>option</i>
+
+ DataSort
+
+ Kontext
+ active.SetPage TabSortierenOptionen
+ Kontext "TabSortierenOptionen"
-Dim i , j as Integer
-Dim asList() as String
-
-select case iSprache
- case 81 :' Japanese
- if iSystemSprache <> 81 then goto NOTest
- asList = Array( _
- "Sun,Mon,Tue,Wed,Thu,Fri,Sat" , _
- "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday" , _
- "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" , _
- "January,February,March,April,May,June,July,August,September,October,November,December" , _
- "æ—¥,月,ç«,æ°´,木,金,土" , _
- "日曜日,月曜日,ç«æ›œæ—¥,水曜日,木曜日,金曜日,土曜日" , _
- )
- case 82 :' Korean
- if iSystemSprache <> 82 then goto NOTest
- asList = Array( _
- "ì¼,ì›”,í™”,수,목,금,토" ,_
- "ì¼ìš”ì¼,월요ì¼,화요ì¼,수요ì¼,목요ì¼,금요ì¼,토요ì¼" ,_
- "1,2,3,4,5,6,7,8,9,10,11,12" , _
- "æ—¥,月,ç«,æ°´,木,金,土" , _
- "日曜日,月曜日,ç«æ›œæ—¥,水曜日,木曜日,金曜日,土曜日" , _
- )
- case 86 :' Chinese (simplified)
- if iSystemSprache <> 86 then goto NOTest
- asList = Array( _
- "日,一,二,三,四,五,六" , _
- "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , _
- "一,二,三,å››,五,å…­,七,å…«,ä¹,å,å一,å二" , _
- "一月,二月,三月,四月,五月,六月,七月,八月,ä¹æœˆ,å月,å一月,å二月" , _
- )
- case 88 :' Chinese (traditional)
- if iSystemSprache <> 88 then goto NOTest
- asList = Array( _
- "日,一,二,三,四,五,六" , _
- "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , _
- "一,二,三,å››,五,å…­,七,å…«,ä¹,å,å一,å二" , _
- "一月,二月,三月,四月,五月,六月,七月,八月,ä¹æœˆ,å月,å一月,å二月" , _
- )
- case else :' Fallback
-NOTest:
- printLog "The test does not support for the language " +iSprache + " System language " + iSystemSprache
- Goto endsub
-end select
-
-
- call hNewDocument
-
-
- DataSort
-
- Kontext
- active.SetPage TabSortierenOptionen
- Kontext "TabSortierenOptionen"
-
- BenutzerdefinierteSortierreihenfolge.Check
+ BenutzerdefinierteSortierreihenfolge.Check
For i = 1 to SortierreihenfolgeListe.GetItemCount
- if SortierreihenfolgeListe.GetItemText(i) <> asList(i-1) then
- warnlog "Should get " +asList(i) + " but get " +SortierreihenfolgeListe.GetItemText(i)
- end if
- next i
+ if SortierreihenfolgeListe.GetItemText(i) <> asList(i-1) then
+ warnlog "Should get " +asList(i) + " but get " +SortierreihenfolgeListe.GetItemText(i)
+ end if
+ next i
- TabSortierenOptionen.Cancel
+ TabSortierenOptionen.Cancel
- Call hCloseDocument
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
index 8e6f85afac01..37b905ec4e1e 100755..100644
--- a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
+++ b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
+'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
@@ -38,45 +38,69 @@
'\***********************************************************************
testcase tSwitchLocation
- ToolsOptions
+ '/// Check if the switch "Asian Language support" exist -- tools/options/language settings/language
+ ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS" , "LANGUAGES")
+ Call hToolsOptions("LANGUAGESETTINGS" , "LANGUAGES")
- try
- if Aktivieren.IsChecked = TRUE then
- printLog "CJK language is checked"
- else
- printLog "CJK language isn't checked"
- end if
- catch
- warnlog "Something wrong in checkbox 'Asian Language Support'"
- endcatch
+ try
+ if Aktivieren.IsChecked = TRUE then
+ printLog "CJK language is checked"
+ else
+ printLog "CJK language isn't checked"
+ end if
+ catch
+ warnlog "Something wrong in checkbox 'Asian Language Support'"
+ endcatch
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest1
- call hNewDocument
+ '/// Check if checkbox "Snap to text grid" is enable or not -- Format/Paragraph tabpage "Alignment"
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , check if checkbox "Snap to text grid" is enable
+ Call CheckAsianLanguageSupport("On")
- Kontext
- FormatParagraph
+ Kontext
+ FormatParagraph
Active.SetPage TabAusrichtungAbsatz
Kontext "TabAusrichtungAbsatz"
- try
- if TextrasterFangen.IsChecked = TRUE then
- printLog "snap to text grid is checked"
- else
- printLog "snap to text grid isn't checked"
+ try
+ if TextrasterFangen.IsChecked = TRUE then
+ printLog "snap to text grid is checked"
+ else
+ printLog "snap to text grid isn't checked"
+ end if
+ catch
+ warnlog "Something wrong in checkbox 'snap to text grid'"
+ endcatch
+
+ TabAusrichtungAbsatz.Cancel
+
+ '/// turn off "Asian Language support" , check if checkbox "Snap to text grid" isn't enable
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+
+ Kontext
+ FormatParagraph
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+
+ try
+ if TextrasterFangen.IsChecked = TRUE Or TextrasterFangen.IsChecked <> TRUE then
+ warnlog "Something wrong in checkbox 'snap to text grid'"
+ end if
+ catch
+ endcatch
+
+ TabAusrichtungAbsatz.Cancel
end if
- catch
- warnlog "Something wrong in checkbox 'snap to text grid'"
- endcatch
TabAusrichtungAbsatz.Cancel
@@ -104,278 +128,303 @@ endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest2
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
-
- Kontext
- FormatParagraph
+ '/// Check if tabpage "Asian Typography" appear or not -- Format/Paragraph
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , check if tabpage "Asian Typography" appears
+ Call CheckAsianLanguageSupport("On")
+
+ Kontext
+ FormatParagraph
+
+ try
+ Active.SetPage TabAsianTypography
+ Kontext "TabAsianTypography"
+ TabAsianTypography.Cancel
+ catch
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ TabAusrichtungAbsatz.Cancel
+ warnlog "Something wring in tabpage - Asian Typography!"
+ endcatch
+
+ '/// turn off "Asian Language support" , check if tabpage "Asian Typography" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- try
- Active.SetPage TabAsianTypography
- Kontext "TabAsianTypography"
- TabAsianTypography.Cancel
- catch
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- TabAusrichtungAbsatz.Cancel
- warnlog "Something wring in tabpage - Asian Typography!"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
-
- Kontext
- FormatParagraph
+ Kontext
+ FormatParagraph
- try
- Active.SetPage TabAsianTypography
- Kontext "TabAsianTypography"
- TabAsianTypography.Cancel
- warnlog "tabpage - Asian Typography should NOT appear!"
- catch
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- TabAusrichtungAbsatz.Cancel
- endcatch
- end if
+ try
+ Active.SetPage TabAsianTypography
+ Kontext "TabAsianTypography"
+ TabAsianTypography.Cancel
+ warnlog "tabpage - Asian Typography should NOT appear!"
+ catch
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ TabAusrichtungAbsatz.Cancel
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest3
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- FontEast.Select 1
- catch
- warnlog "Something wrong in list box Asian text font when Asian Language support is on"
- endcatch
- TabFont.Cancel
+ '/// Check if list box "Asian text font" appear or not -- Format/Character
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , Check if list box "Asian text font" appear
+ Call CheckAsianLanguageSupport("On")
+
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
+ try
+ FontEast.Select 1
+ catch
+ warnlog "Something wrong in list box Asian text font when Asian Language support is on"
+ endcatch
+ TabFont.Cancel
+
+ '/// turn off "Asian Language support" , Check if list box "Asian text font" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
try
- FontEast.Select 1
- warnlog "Something wrong in list box Asian text font when Asian Language support is off"
+ FontEast.Select 1
+ warnlog "Something wrong in list box Asian text font when Asian Language support is off"
catch
endcatch
- TabFont.Cancel
- end if
+ TabFont.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest4
- call hNewDocument
+ '/// Check if list box "Emphasis mark" appear or not -- Format/Character
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , Check if list box "Emphasis mark" appear
+ Call CheckAsianLanguageSupport("On")
+
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ try
+ Emphasis.Select 1
+ catch
+ warnlog "Something wrong in list box Emphasis mark when Asian Language support is on"
+ endcatch
+ TabFontEffects.Cancel
+
+ '/// turn off "Asian Language support" , Check if list box "Emphasis mark" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- Call CheckAsianLanguageSupport("On")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- try
- Emphasis.Select 1
- catch
- warnlog "Something wrong in list box Emphasis mark when Asian Language support is on"
- endcatch
- TabFontEffects.Cancel
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
try
- Emphasis.Select 1
- warnlog "Something wrong in list box Emphasis mark when Asian Language support is off"
+ Emphasis.Select 1
+ warnlog "Something wrong in list box Emphasis mark when Asian Language support is off"
catch
endcatch
- TabFontEffects.Cancel
- end if
+ TabFontEffects.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest5
- call hNewDocument
+ '/// Check if tabpage "Searching in Japanese" appear or not -- tools/options/language settings/
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if tabpage "Searching in Japanese" appear
+ Call CheckAsianLanguageSupport("On")
- ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE") <> TRUE then
- warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is on"
- end if
+ ToolsOptions
+ if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE") <> TRUE then
+ warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is on"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- ToolsOptions
+ '/// turn on "Asian Language support" , Check if tabpage "Searching in Japanese" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE" , TRUE) = FALSE then
- printLog Chr(13) + "Yes, 'Searching Japanese'-page has been disabled after switching Asian Language Support 'off'."
- else
- warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is off"
- end if
+ if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE" , TRUE) = FALSE then
+ printLog Chr(13) & "Yes, 'Searching Japanese'-page has been disabled after switching Asian Language Support 'off'."
+ else
+ warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is off"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest6
- call hNewDocument
+ '/// Check if tabpage "Asian Layout" appear or not -- tools/options/language settings/
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if tabpage "Asian Layout" appear
+ Call CheckAsianLanguageSupport("On")
- ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT") <> TRUE then
- warnlog "Something wrong in tabpage Asian Layout when Asian Language support is on"
- end if
+ ToolsOptions
+ if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT") <> TRUE then
+ warnlog "Something wrong in tabpage Asian Layout when Asian Language support is on"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- ToolsOptions
+ '/// turn off "Asian Language support" , Check if tabpage "Asian Layout" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT", TRUE) = FALSE then
- printLog Chr(13) + "Yes, 'Asian Layout'-page has been disabled after switching 'Asian Language Support' off."
- else
- warnlog "Something wrong in tabpage Asian Layout when Asian Language support is off"
- end if
+ if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT", TRUE) = FALSE then
+ printLog Chr(13) & "Yes, 'Asian Layout'-page has been disabled after switching 'Asian Language Support' off."
+ else
+ warnlog "Something wrong in tabpage Asian Layout when Asian Language support is off"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest7
- call hNewDocument
+ '/// Check if menu format/Ruby is active or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if menu format/Ruby is actived
+ Call CheckAsianLanguageSupport("On")
- try
- formatRuby
- Kontext "RubyDialog"
- DialogClose.Click
- Sleep 2
- catch
- warnlog "Something wrong in menu format/Ruby when Asian Language support is on"
- endcatch
+ try
+ formatRuby
+ Kontext "RubyDialog"
+ DialogClose.Click
+ Sleep 2
+ catch
+ warnlog "Something wrong in menu format/Ruby when Asian Language support is on"
+ endcatch
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ '/// turn off "Asian Language support" , Check if menu format/Ruby is inactived
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- try
- formatRuby
- Kontext "RubyDialog"
- DialogClose.Click
- Sleep 2
- QAErrorlog "#i40913# Something wrong in menu format/Ruby when Asian Language support is off"
- catch
- endcatch
- end if
+ try
+ formatRuby
+ Kontext "RubyDialog"
+ DialogClose.Click
+ Sleep 2
+ QAErrorlog "#i40913# Something wrong in menu format/Ruby when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest8
+ '/// Check if the following submenus in format/change case is active or not
+ '/// - Half width
+ '/// - Full width
+ '/// - Hiragana
+ '/// - Katagana
+
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , Check if submenus in format/change case is actived
+ Call CheckAsianLanguageSupport("On")
+
+ try
+ FormatChangeCaseHalfWidth
+ catch
+ warnlog "Something wrong in submenu format/change case -> Half width when Asian Language support is on"
+ endcatch
+
+ try
+ FormatChangeCaseFullWidth
+ catch
+ warnlog "Something wrong in submenu format/change case -> Full width when Asian Language support is on"
+ endcatch
+
+ try
+ FormatChangeCaseHiragana
+ catch
+ warnlog "Something wrong in submenu format/change case -> Hiragana when Asian Language support is on"
+ endcatch
+
+ try
+ FormatChangeCaseKatagana
+ catch
+ warnlog "Something wrong in submenu format/change case -> Katagana when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if submenus in format/change case is inactived
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
-
- try
- FormatChangeCaseHalfWidth
- catch
- warnlog "Something wrong in submenu format/change case -> Half width when Asian Language support is on"
- endcatch
-
- try
- FormatChangeCaseFullWidth
- catch
- warnlog "Something wrong in submenu format/change case -> Full width when Asian Language support is on"
- endcatch
-
- try
- FormatChangeCaseHiragana
- catch
- warnlog "Something wrong in submenu format/change case -> Hiragana when Asian Language support is on"
- endcatch
+ try
+ FormatChangeCaseHalfWidth
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Half width when Asian Language support is off"
+ catch
+ endcatch
- try
- FormatChangeCaseKatagana
- catch
- warnlog "Something wrong in submenu format/change case -> Katagana when Asian Language support is on"
- endcatch
+ try
+ FormatChangeCaseFullWidth
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Full width when Asian Language support is off"
+ catch
+ endcatch
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ try
+ FormatChangeCaseHiragana
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Hiragana when Asian Language support is off"
+ catch
+ endcatch
- try
- FormatChangeCaseHalfWidth
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Half width when Asian Language support is off"
- catch
- endcatch
-
- try
- FormatChangeCaseFullWidth
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Full width when Asian Language support is off"
- catch
- endcatch
-
- try
- FormatChangeCaseHiragana
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Hiragana when Asian Language support is off"
- catch
- endcatch
-
- try
- FormatChangeCaseKatagana
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Katagana when Asian Language support is off"
- catch
- endcatch
- end if
+ try
+ FormatChangeCaseKatagana
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Katagana when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
@@ -383,76 +432,81 @@ endcase
testcase tWriterUIChangesTest9
call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if list box text direction appear
+ Call CheckAsianLanguageSupport("On")
- FormatPageWriter
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
+ FormatPageWriter
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
- try
- Textfluss.select 1
- catch
- warnlog "Something wrong in list box text direction when Asian Language support is on"
- endcatch
- TabSeite.Cancel
+ try
+ Textfluss.select 1
+ catch
+ warnlog "Something wrong in list box text direction when Asian Language support is on"
+ endcatch
+ TabSeite.Cancel
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ '/// turn off "Asian Language support" , Check if list box text direction disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- FormatPageWriter
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
+ FormatPageWriter
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
- try
- Textfluss.select 1
- warnlog "Something wrong in list box text direction when Asian Language support is off"
- catch
- endcatch
- TabSeite.Cancel
- end if
+ try
+ Textfluss.select 1
+ warnlog "Something wrong in list box text direction when Asian Language support is off"
+ catch
+ endcatch
+ TabSeite.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest10
- call hNewDocument
+ '/// Check if vertical text box and callout appear or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
- sleep(1)
-
- Call hToolbarSelect("DRAWING", true)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
- try
- VerticalCallout.Click
- catch
- warnlog "Something wrong in vertical text callout when Asian Language support is on"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- Kontext "Drawbar"
- try
- VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- try
- VerticalCallout.Click
- warnlog "Something wrong in vertical text callout when Asian Language support is off"
- catch
- endcatch
- end if
+ '/// turn on "Asian Language support" , Check if vertical text box and callout appear
+ Call CheckAsianLanguageSupport("On")
+ sleep(1)
- Call hCloseDocument
+ Call hToolbarSelect("DRAWING", true)
+ try
+ VerticalText.Click
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+ try
+ VerticalCallout.Click
+ catch
+ warnlog "Something wrong in vertical text callout when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box and callout disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ try
+ VerticalCallout.Click
+ warnlog "Something wrong in vertical text callout when Asian Language support is off"
+ catch
+ endcatch
+ end if
+
+ Call hCloseDocument
endcase
@@ -463,46 +517,52 @@ testcase tWriterUIChangesTest11
dim i as integer
dim iCount as integer
- iHopeNumber1 = 38
- iHopeNumber2 = 19
+ iHopeNumber1 = 38
+ iHopeNumber2 = 19
+ '/// Check if the number in listbox numbering is right or not.
+ '/// [if the number of the listbox numbering is changed, this case should be modified according]
- call hNewDocument
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if the number in listbox numbering is right
+ Call CheckAsianLanguageSupport("On")
FormatNumberingBullets
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
-
- iCount = Numerierung.GetItemCount
- if iCount = iHopeNumber1 then
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+
+ iCount = Numerierung.GetItemCount
+ if iCount = iHopeNumber1 then
Numerierung.Select 15
TabOptionenNumerierung.OK
- printLog Chr(13) + "Pls. go to the printer to find if you can get a paper"
- printLog Chr(13) + "which is printed like '-'.Otherwise , something wrong!"
+ printLog Chr(13) & "Pls. go to the printer to find if you can get a paper"
+ printLog Chr(13) & "which is printed like '-'.Otherwise , something wrong!"
+ '/// --Pls. go to the printer to find if you can get a paper which is printed like '-'. Otherwise , something is wrong!
FilePrint
Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- end if
+ if Active.Exists( 1 ) then
+ if Active.GetRT = 304 then
+ Active.Ok
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 ) ) then
+ Printing.cancel()
+ endif
+ end if
else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- Sleep 5
- end if
- else
+ Kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+ Printing.cancel()
+ Printing.notExists( 5 )
+ endif
+ endif
+ else
for i =1 to iCount
- printlog "("+i+"/"+iCount+"): "+Numerierung.getItemText(i)
+ printlog "(" & i & "/" & iCount & "): " & Numerierung.getItemText(i)
next i
'Referenze:
TabOptionenNumerierung.Cancel
@@ -516,47 +576,57 @@ testcase tWriterUIChangesTest11
active.ok
endif
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ 'print warning if no printer is available
+ kontext
+ if active.exists(5) then
+ qaErrorlog "print warning: '" & active.getText & "'"
+ active.ok
+ endif
+
+ '/// turn off "Asian Language support" , Check if the number in listbox numbering is right
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- FormatNumberingBullets
+ FormatNumberingBullets
Kontext
Active.SetPage TabOptionenNumerierung
Kontext "TabOptionenNumerierung"
- iCount = Numerierung.GetItemCount
+ iCount = Numerierung.GetItemCount
if iCount <> iHopeNumber2 then
- for i =1 to iCount
- printlog "("+i+"/"+iCount+"): "+Numerierung.getItemText(i)
- next i
- 'Referenze:
- qaerrorlog "the number of list box numbering is wrong when Asian Language support is off; expected: " + iHopeNumber2 + "; is: " + iCount
+ for i =1 to iCount
+ printlog "(" & i & "/" & iCount & "): " & Numerierung.getItemText(i)
+ next i
+ 'Referenze:
+ warnlog "the number of list box numbering is wrong when Asian Language support is off; expected: " & iHopeNumber2 & "; is: " & iCount
end if
- TabOptionenNumerierung.Cancel
- end if
+ TabOptionenNumerierung.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tProlongedVowelsTest1
+ '/// Check if the default setting of "Prolonged vowels (ka-/kaa) will be ACTIVATED.
- call hNewDocument
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if the default setting of "Prolonged vowels (ka-/kaa) is ACTIVATED.
+ Call CheckAsianLanguageSupport("On")
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE")
+ ToolsOptions
+ Call hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE")
- if ProlongedSoundmarks.IsChecked <> TRUE then
- warnlog "The default setting of 'Prolonged vowels (ka-/kaa)' isn't ACTIVATED."
- end if
+ if ProlongedSoundmarks.IsChecked <> TRUE then
+ warnlog "The default setting of 'Prolonged vowels (ka-/kaa)' isn't ACTIVATED."
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -564,39 +634,42 @@ endcase
testcase tCalcUIChangesTest_10
+ '/// Check if vertical text box and callout appear or not
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
- sleep(1)
- Call hToolbarSelect("DRAWING", true)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
- try
- VerticalCallout.Click
- catch
- warnlog "Something wrong in vertical text callout when Asian Language support is on"
- endcatch
+ call hNewDocument
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- Kontext "Drawbar"
- try
+ '/// turn on "Asian Language support" , Check if vertical text box and callout appear
+ Call CheckAsianLanguageSupport("On")
+ sleep(1)
+ Call hToolbarSelect("DRAWING", true)
+ try
VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- try
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+ try
VerticalCallout.Click
- warnlog "Something wrong in vertical text callout when Asian Language support is off"
- catch
- endcatch
- end if
+ catch
+ warnlog "Something wrong in vertical text callout when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box and callout disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ try
+ VerticalCallout.Click
+ warnlog "Something wrong in vertical text callout when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -604,30 +677,33 @@ endcase
testcase tImpressUIChangesTest_10
- call hNewDocument
+ '/// Check if vertical text box and callout and fit vertical text to frame appear or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
- sleep(1)
- Kontext "Drawbar"
- sleep(1)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- sleep(1)
- Kontext "Drawbar"
- try
+ '/// turn on "Asian Language support" , Check if vertical text box appear
+ Call CheckAsianLanguageSupport("On")
+ sleep(1)
+ Kontext "Drawbar"
+ sleep(1)
+ try
VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- end if
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ sleep(1)
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -635,28 +711,31 @@ endcase
testcase tDrawUIChangesTest_10
- call hNewDocument
+ '/// Check if vertical text box and callout and fit vertical text to frame appear or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
- Kontext "Drawbar"
- sleep(1)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- Kontext "Drawbar"
- try
+ '/// turn on "Asian Language support" , Check if vertical text box appear
+ Call CheckAsianLanguageSupport("On")
+ Kontext "Drawbar"
+ sleep(1)
+ try
VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- end if
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc b/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc
index c4caed718803..0df9c6c97aae 100755..100644
--- a/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc
+++ b/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
+'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
@@ -39,18 +39,23 @@
testcase tRubyDialog_1
- Dim sBaseText , sRubyText as String
- Dim sBaseText1 , sRubyText1 as String
+ Dim sBaseText , sRubyText as String
+ Dim sBaseText1 , sRubyText1 as String
- sBaseText = "BaseText"
- sRubyText = "RubyText"
+ sBaseText = "BaseText"
+ sRubyText = "RubyText"
- sBaseText1 = "BaseText1"
- sRubyText1 = "RubyText1"
+ sBaseText1 = "BaseText1"
+ sRubyText1 = "RubyText1"
- Call hNewDocument
+ '/// Check Apply and Close button in Ruby dialogue
+ Call hNewDocument
- FormatRuby
+ '/// Check close button.
+ '/// open ruby dialogue , input base text and ruby text , then press close button
+ '/// 1) check if the ruby dialogue is closed
+ '/// 2) check if the base text and ruby text is recorded
+ FormatRuby
Kontext "RubyDialog"
Sleep 3
BasisText1.SetText sBaseText
@@ -58,19 +63,23 @@ testcase tRubyDialog_1
RubyText1.SetText sRubyText
Sleep 1
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- if RubyDialog.Exists then
- Warnlog "The Ruby dialogue is NOT closed !"
- end if
+ if RubyDialog.Exists then
+ Warnlog "The Ruby dialogue is NOT closed !"
+ end if
- FormatRuby
+ FormatRuby
Kontext "RubyDialog"
Sleep 3
if Len(BasisText1.GetText) <> 0 then Warnlog "The base text should not been inputed"
if Len(RubyText1.SetText) <> 0 then Warnlog "The ruby text should not been inputed"
+ '/// Check Apply button -- Normally , we think it is RubyDialog.OK
+ '/// open ruby dialogue , input base text and ruby text , then press close button
+ '/// Press Apply button , then press close button
+ '/// check if the base text and ruby text is recorded
BasisText1.SetText sBaseText1
Sleep 1
@@ -80,22 +89,22 @@ testcase tRubyDialog_1
RubyDialog.OK
Sleep 2
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- EditSelectAll
- Sleep 1
+ EditSelectAll
+ Sleep 1
- FormatRuby
- Kontext "RubyDialog"
+ FormatRuby
+ Kontext "RubyDialog"
Sleep 3
if BasisText1.GetText <> sBaseText1 then Warnlog "The base text should be "+sBaseText1 + " but get " + BasisText1.GetText
if RubyText1.GetText <> sRubyText1 then Warnlog "The ruby text should be "+sRubyText1 + " but get " + RubyText1.GetText
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -103,61 +112,72 @@ endcase
testcase tRubyDialog_2
- Dim sBaseText as String
+ Dim sBaseText as String
- sBaseText = "test1 test2 test3 test4 test5 test6 test7 test8 test9"
+ sBaseText = "test1 test2 test3 test4 test5 test6 test7 test8 test9"
+ '/// Test scrollbar in Ruby dialog
- Call hNewDocument
+ Call hNewDocument
- FormatRuby
+ '/// when there is less basetext, the scrollbar should appear
+ FormatRuby
Kontext "RubyDialog"
if RubyDialog.HasScrollbar <> TRUE then warnlog "The Scrollbar should appear when less basetext!"
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys sBaseText
- DocumentWriter.TypeKeys "<Shift Home>"
+ '/// when there is more basetext(here is >4), the scrollbar should appear
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys sBaseText
+ DocumentWriter.TypeKeys "<Shift Home>"
- FormatRuby
+ FormatRuby
Kontext "RubyDialog"
if RubyDialog.HasScrollbar <> TRUE then warnlog "The Scrollbar should appear when more basetext!"
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tRubyDialog_3
- Dim sTestText as String
- Dim sBaseText1, sBaseText2 as String
+ Dim sTestText as String
+ Dim sBaseText1, sBaseText2 as String
- sTestText = "Test1 Test2"
- sBaseText1 = "Test1"
- sBaseText2 = "Test2"
+ sTestText = "Test1 Test2"
+ sBaseText1 = "Test1"
+ sBaseText2 = "Test2"
+ '/// The list in ruby dialogure will be updated as soon as the uses
+ '/// selects new or further words of his text.
+ '/// The update will be done once the user changes his focus
+ '/// back to the Ruby-Dialogue from the text
- Call hNewDocument
+ Call hNewDocument
- DocumentWriter.TypeKeys sTestText
- DocumentWriter.TypeKeys "<Shift Left>" , 5
+ '/// input 2 test words, and mark the second
+ DocumentWriter.TypeKeys sTestText
+ DocumentWriter.TypeKeys "<Shift Left>" , 5
- FormatRuby
+ '/// There should be only the second test word in basetext1 in ruby dialogue
+ FormatRuby
Kontext "RubyDialog"
Sleep 2
if BasisText1.GetText <> sBaseText2 then warnlog "The BaseText1 should be:" +sBaseText2 + " but get "+BasisText1.GetText
- Kontext "DocumentWriter"
- try
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 2
- catch
- warnlog "The ruby dialogue is MODE less dialogue , the document can be edited!"
- endcatch
+ '/// Mark 2 test words
+ Kontext "DocumentWriter"
+ try
+ DocumentWriter.TypeKeys "<Shift Home>"
+ Sleep 2
+ catch
+ warnlog "The ruby dialogue is MODE less dialogue , the document can be edited!"
+ endcatch
+ '/// Check if the 2 test words are all in the ruby dialogue when set forcus back to the dialogue
Kontext "RubyDialog"
Sleep 1
'this step is meaningless, just let the focus back to ruby dialogue
@@ -167,10 +187,10 @@ testcase tRubyDialog_3
Sleep 1
if BasisText2.GetText <> sBaseText2 then warnlog "The BaseText2 should be:" +sBaseText2 + " but get "+BasisText2.GetText
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -178,41 +198,42 @@ endcase
testcase tRubyDialog_4
- Dim sCharacterStyle as String
- dim i as integer
-
-
- select case iSprache
- case 01 : sCharacterStyle = "Rubies"
- case 33 : sCharacterStyle = "Rubys"
- case 34 : sCharacterStyle = "Rubys"
- case 39 : sCharacterStyle = "Testo Ruby"
- case 46 : sCharacterStyle = "Rubytext"
- case 49 : sCharacterStyle = "Rubys"
- case 55 : sCharacterStyle = "Rubys"
- case 81 : sCharacterStyle = "ãµã‚ŠãŒãª"
- case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO
- case 86 : sCharacterStyle = "拼音和注音符å·"
- case 88 : sCharacterStyle = "注音符號"
- case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- Call hNewDocument
-
- FormatRuby
+ Dim sCharacterStyle as String
+ dim i as integer
+
+ '/// Check default setting for Character Style of Ruby Text
+
+ select case iSprache
+ case 01 : sCharacterStyle = "Rubies"
+ case 33 : sCharacterStyle = "Rubys"
+ case 34 : sCharacterStyle = "Rubys"
+ case 39 : sCharacterStyle = "Testo Ruby"
+ case 46 : sCharacterStyle = "Rubytext"
+ case 49 : sCharacterStyle = "Rubys"
+ case 55 : sCharacterStyle = "Rubys"
+ case 81 : sCharacterStyle = "ãµã‚ŠãŒãª"
+ case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO
+ case 86 : sCharacterStyle = "拼音和注音符å·"
+ case 88 : sCharacterStyle = "注音符號"
+ case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
+ end select
+
+ Call hNewDocument
+
+ FormatRuby
Kontext "RubyDialog"
Sleep 3
- if CharacterStyle.GetSelText <> sCharacterStyle then
- warnlog "Default setting for Character Style of Ruby Text isn't right, should be "+sCharacterStyle + " but get "+CharacterStyle.GetSelText
- for i = 1 to CharacterStyle.getItemCount
- printlog "("+i+"/"+CharacterStyle.getItemCount+"): '"+CharacterStyle.getItemText(i)+"'"
- next i
+ if CharacterStyle.GetSelText <> sCharacterStyle then
+ warnlog "Default setting for Character Style of Ruby Text isn't right, should be "+sCharacterStyle + " but get "+CharacterStyle.GetSelText
+ for i = 1 to CharacterStyle.getItemCount
+ printlog "("+i+"/"+CharacterStyle.getItemCount+"): '"+CharacterStyle.getItemText(i)+"'"
+ next i
endif
DialogClose.Click
- Sleep 1
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -220,45 +241,49 @@ endcase
testcase tRubyDialog_5
- Dim sCharacterStyle as String
- Dim sStyleName as String
- Dim i as Integer
- dim iCount as integer
- dim bError as boolean
- dim bWileExit as boolean
-
-
- select case iSprache
- case 01 : sCharacterStyle = "Rubies"
- case 33 : sCharacterStyle = "Rubys"
- case 34 : sCharacterStyle = "Rubys"
- case 39 : sCharacterStyle = "Testo Ruby"
- case 46 : sCharacterStyle = "Rubytext"
- case 49 : sCharacterStyle = "Rubys"
- case 55 : sCharacterStyle = "Rubys"
- case 81 : sCharacterStyle = "ãµã‚ŠãŒãª"
- case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO was "ë§ë§"
- case 86 : sCharacterStyle = "拼音和注音符å·"
- case 88 : sCharacterStyle = "注音符號"
- case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- sStyleName = "ZZZ-Test-ZZZ"
-
- Call hNewDocument
-
- FormatRuby
+ Dim sCharacterStyle as String
+ Dim sStyleName as String
+ Dim i as Integer
+ dim iCount as integer
+ dim bError as boolean
+ dim bWileExit as boolean
+
+ '/// Check stylist
+
+ select case iSprache
+ case 01 : sCharacterStyle = "Rubies"
+ case 33 : sCharacterStyle = "Rubys"
+ case 34 : sCharacterStyle = "Rubys"
+ case 39 : sCharacterStyle = "Testo Ruby"
+ case 46 : sCharacterStyle = "Rubytext"
+ case 49 : sCharacterStyle = "Rubys"
+ case 55 : sCharacterStyle = "Rubys"
+ case 81 : sCharacterStyle = "ãµã‚ŠãŒãª"
+ case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO was "ë§ë§"
+ case 86 : sCharacterStyle = "拼音和注音符å·"
+ case 88 : sCharacterStyle = "注音符號"
+ case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
+ end select
+
+ sStyleName = "ZZZ-Test-ZZZ"
+
+ Call hNewDocument
+
+ '/// Open ruby dialogue
+ FormatRuby
Kontext "RubyDialog"
+ '/// Click stylist button
CallStylist.Click
Sleep 2
Kontext "Stylist"
if Stylist.NotExists then
- Warnlog "No Stylist with clicking Stylist button!"
+ Warnlog "No Stylist with clicking Stylist button!"
end if
+ '/// click Character Style
Zeichenvorlagen.Click
' needed to update the listbox count :-(
@@ -282,22 +307,24 @@ testcase tRubyDialog_5
endif
if (NOT bError) then
+ '/// find entry ruby and add a new entry
AusSelektion.OpenMenu
Sleep 1
printlog "hMenuSelect 1"
hMenuSelectNr(1)
printlog "hMenuSelect 1 survived"
Sleep 1
-
+
Kontext "VorlageErzeugen"
Sleep 1
Vorlagenname.SetText sStyleName
Sleep 1
VorlageErzeugen.OK
Sleep 2
-
+
+ '/// check if the new entry is in the Character Style list box in ruby dialogue
Kontext "RubyDialog"
-
+
' needed to update the listbox count :-(
CharacterStyle.typeKeys ("<end><up><down>")
iCount = CharacterStyle.GetItemCount
@@ -317,14 +344,14 @@ testcase tRubyDialog_5
CharacterStyle.select (i)
bError = false
endif
-
+
if (NOT bError) then
Kontext "Stylist"
iCount = Vorlagenliste.getItemCount
i=0
while ((i<iCount) AND (Vorlagenliste.getItemText (i+1) <> sStyleName))
inc (i)
- printlog "" + (i) + ": " + Vorlagenliste.getItemText (i)
+ printlog "" + (i) + ": " + Vorlagenliste.getItemText (i)
wEnd
if (i = iCount) then
warnlog "Style (Rubies) not found for deleting: '" + sStyleName + "' inside of entries: " + iCount
@@ -362,7 +389,7 @@ testcase tRubyDialog_5
DialogClose.Click
Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/options_ooo_general.inc b/testautomation/framework/optional/includes/options_ooo_general.inc
index e0a07bb6b741..bda3b9a24d8f 100755
--- a/testautomation/framework/optional/includes/options_ooo_general.inc
+++ b/testautomation/framework/optional/includes/options_ooo_general.inc
@@ -1,16 +1,16 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
+'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
'*
-'* $RCSfile: options_ooo_general.inc,v $
+'* $RCSfile: w_grid_layout1.inc,v $
'*
-'* $Revision: 1.1 $
+'* $Revision: 1.2 $
'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
+'* last change: $Author: jsk $ $Date: 2008-06-17 07:50:24 $
'*
'* This file is part of OpenOffice.org.
'*
@@ -31,20 +31,39 @@
'*
'/************************************************************************
'*
-'* owner : joerg.skottke@sun.com
+'* owner : thorsten.bosbach@sun.com
'*
-'* short description : 1. test for general group userdata ... view)
+'* short description : Grid Layout for CJK test in Writer
'*
-'\******************************************************************************
+'\***********************************************************************
+private const SOURCE_PATH = "framework\optional\input\CJK\"
-testcase tOOoGeneral
+testcase tTextGridDialog_1
- dim lsSave (4) as String
- dim lbSave (3) as Boolean
+ '/// Check if tabpage 'Text Grid' disappears when "Asian Language support" is NOT checked
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ hNewDocument()
+ FormatPageWriter
+ try
+ Kontext
+ Active.SetPage TabGrid
+ Kontext "TabGrid"
+ TabGrid.Cancel
+ warnlog "Shouldn't get Tabpage: Grid Text"
+ catch
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
+ TabSeite.Cancel
+ endcatch
+ endif
- hNewDocument
+ '/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
+ Call CheckAsianLanguageSupport("On")
+ hNewDocument
ToolsOptions
hToolsOptions ( "StarOffice", "General" )
@@ -72,129 +91,499 @@ testcase tOOoGeneral
if ( ExtrasOptionenDlg.notExists( 3 ) ) then
printlog( "Options closed" )
endif
+ hCloseDocument()
+endcase
+'-------------------------------------------------------------------------
- hCloseDocument
+testcase tTextGridDialog_2
+ '/// No grid is active, no changes to existing version
+ Dim testFile , sCorrectResult as String
- printlog " - exit/restart StarOffice"
- ExitRestartTheOffice
+ testFile = "gridtest.sxw"
+ sCorrectResult = "1"
- printlog " - check data"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
+ Call hNewDocument
- if Zweistellig.GetText <> "1950" then Warnlog "Year ( 2 digits ) => changes not saved: '" + Zweistellig.GetText +"' #i29810"
- if Aktivieren.IsChecked <> TRUE then Warnlog "Enable HelpAgent => changes not saved"
- Zuruecksetzen.Click
- if gPlatgroup = "w95" then
- if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
- end if
- If DruckenStatus.IsChecked = lbSave ( 3 ) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
+ '/// open a test file , and check No Grid checkbox
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
- printlog " - 2. change data"
- Zweistellig.SetText "1800"
- DruckenStatus.UnCheck
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ NoGrid.Check
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
+ '/// Active navigator dialogue , set page to '2' and wait for a while
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+
+ '/// In No Grid mode, there should be only 1 page, the focus is before the first line
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing NoGrid option!"
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tTextGridDialog_3
+ '/// Grid (lines only): The page is set up with a defined number of lines
+ Dim testFile , sCorrectResult , sLinesPerPage as String
+
+ testFile = "gridtest.sxw"
+ sCorrectResult = "G"
+ sLinesPerPage = "10"
+
+ Call hNewDocument
+
+ '/// open a test file and check Grid(lines onle) checkbox ,
+ '/// + set 10 line/page
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ LinesGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
+
+ '/// Active navigator dialogue , set page to '2' and wait for a while
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines only) option!"
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tTextGridDialog_4
+ '/// Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line
+ Dim testFile , sCorrectResult as String
+ Dim sLinesPerPage , sCharsPerLine as String
+
+ testFile = "gridtest.sxw"
+ sCorrectResult = "E"
+ sLinesPerPage = "10"
+ sCharsPerLine = "9"
+
+ Call hNewDocument
+
+ '/// open a test file and check Grid(lines and characters) checkbox
+ '/// + set 10 line/page and 9 characters/line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
+
+ '/// Active navigator dialogue , set page to '2' and wait for a while
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines and characters) option!"
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGridDisplay_1
+ '/// Print grid: The grid lines will be printed. Inactive if "Display grid" is inactive.
+ Call hNewDocument
+
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and check "print grid"
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.Check
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
- 'It's a little tricky to reproduce.
- if gPlatgroup = "unx" then
- hNewDocument()
- FilePrint
- Kontext "DruckenDLG"
- if DruckenDLG.exists(5) then
- if gPlatform <> "osx" then
- Eigenschaften.click
- kontext
- active.setPage TabSPAPaper
- Kontext "TabSPAPaper"
- if TabSPAPaper.exists (5) then
- TabSPAPaper.OK
- sleep 5
- else
- qaErrorlog "Properties of Printer didn't come up."
- endif
- end if
- Kontext "DruckenDLG"
- DruckenDLG.OK
- ' check state
- kontext
- if active.exists(5) then
- printlog "active: printing failed? '" + active.gettext + "'"
- active.ok
+ '/// Print to printer
+ FilePrint
+ Kontext "Active"
+ if ( Active.Exists( 5 ) ) then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel
endif
- try
- FileSave
- qaErrorlog "#i52248# Modify flag is set after printing though option is not set."
- kontext "SpeichernDlg"
- if SpeichernDlg.exists(5) then
- SpeichernDlg.cancel
- endif
- catch
- printlog "#i52248# doesn't come up."
- endcatch
- else
- qaErrorLog "No printer available - resuming."
- kontext
- if active.exists(5) then
- printlog active.getText
- active.ok
+ endif
+ else
+ Kontext "Printing"
+ if ( Printing.exists( 2 )) then
+ Printing.OK()
+ Printing.notExists( 5 )
+ endif
+
+ kontext "Active"
+ if active.exists(5) then
+ qaErrorLog active.getText()
+ active.ok()
+ endif
+ endif
+
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and uncheck "print grid"
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.UnCheck
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
+
+ '/// Print to printer
+ FilePrint
+ Kontext "Active"
+ if ( Active.Exists( 5 ) )then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel()
endif
- endif
- hCloseDocument
- endif
-
- printlog " - check data"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
+ endif
+ else
+ Kontext "Printing"
+ if( Printing.exists( 1 )) then
+ Printing.OK
+ Printing.notExists( 5 )
+ endif
+ kontext
+ if ( active.exists( 2 ) ) then
+ qaErrorLog active.getText
+ active.ok
+ endif
+ endif
- if Zweistellig.GetText <> "1800" then Warnlog "Year ( 2 digits ) => changes not saved : '" + Zweistellig.GetText +"'"
- If DruckenStatus.IsChecked <> FALSE then Warnlog "Printing sets 'Document modified' status => changes not saved!"
- if StyleSheet.GetSelIndex <> 3 then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+ Call hCloseDocument
+endcase
- printlog " - reset to saved data"
- Zweistellig.SetText lsSave ( 1 )
- Aktivieren.Check
- Zuruecksetzen.Click
- if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
- if gPlatgroup = "w95" then
- if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
- end if
- If lbSave(3)= TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
- StyleSheet.Select lsSave(3)
+'-------------------------------------------------------------------------
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
+testcase tUserDefineLayout_1
+ '/// Decrease characters per line will cause lines per page decrease accordingly
+ Dim sLinesPerPage , sCharsPerLine as String
+ Dim sExpectLinesPerPage , sExpectLinesPerPage1 as String
+
+ sLinesPerPage = "20"
+ sCharsPerLine = "2"
+ sExpectLinesPerPage = "2"
+ sExpectLinesPerPage1 = "3"
+
+ Call hNewDocument
+
+ '/// Format/page , set lines per page to 20, and set charsets per line to 2
+ '/// + wait for a moment , then check the the number of lines per page.
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
endif
+ Kontext "TabGrid"
+ CharsGrid.Check
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 2
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 2
- printlog " - check the reset data"
- if Zweistellig.GetText <> lsSave ( 1 ) then Warnlog "Year ( 2 digits ) => changes not saved"
- if Aktivieren.IsChecked <> lbSave (1) then Warnlog "Enable HelpAgent => changes not saved"
- Aktivieren.Check
- Zuruecksetzen.Click
- if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
- if gPlatgroup = "w95" then
- if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
- end if
- If DruckenStatus.IsChecked <> lbSave(3) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
- if StyleSheet.GetSelText <> lsSave (3) then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+ 'This step is no use, just let the LinesPerPage change the number
+ CharsGrid.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
+ if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
+ Warnlog "The lines per page should be" + sExpectLinesPerPage + " OR " + sExpectLinesPerPage1 +" but get " +LinesPerPage.GetText
endif
+ TabGrid.Cancel
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tFontSizeChanges_1
+ '/// Change the font size to bigger enough will change the layout
+ Dim testFile , sCorrectResult as String
+ Dim sLinesPerPage , sCharsPerLine as String
+ dim sTemp as string
+
+ testFile = "FontSizeChanges_1.sxw"
+ sCorrectResult = "1"
+ sLinesPerPage = "2"
+ sCharsPerLine = "9"
+
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+
+ Kontext "FormatObjectbar"
+ Schriftgroesse.Select "60"
+ Schriftgroesse.TypeKeys "<Return>"
+ Sleep 1
+
+ Kontext "DocumentWriter"
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ if TabGrid.exists(5) then
+ sTemp = LinesPerPage.GetText
+ if sTemp <> sLinesPerPage then
+ Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
+ endif
+ sTemp = CharsPerLine.GetText
+ if sTemp <> sCharsPerLine then
+ Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
+ endif
+ TabGrid.Cancel
+ else
+ warnlog "TabGrid is not available."
+ endif
+
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ if NavigatorWriter.exists(5) then
+ Seitennummer.SetText "2"
+ Sleep 5
+ else
+ warnlog "Navigator not available"
+ endif
+ hCloseNavigator
+
+ Kontext "DocumentWriter"
+ sleep 3
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+
+ hUseAsyncSlot( "EditCopy" )
+ sTemp = GetClipboardText
+ if sTemp <> sCorrectResult then
+ Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
+ endif
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tRubyText_1
+ '/// If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself.
+ Dim testFile , sRubyText as String
+
+ testFile = "rubytest.sxw"
+ sRubyText = "Ruby Test Text ....................."
+
+ Call hNewDocument
+
+ '/// open a test file , and insert long ruby test text
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+ Sleep 1
+
+ FormatRuby
+ Kontext "RubyDialog"
+ Sleep 3
+ RubyText1.setText sRubyText
+ Sleep 2
+ RubyDialog.OK
+ Sleep 2
+ DialogClose.Click
+ Sleep 1
+
+ Kontext "DocumentWriter"
+ FormatAutoformatApply
+ Sleep 2
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 2
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
+ Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
+ endif
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tIndentsTest_1
+ '/// Indents should work and always indenting as close as possible to their measurements by snapping to the appropriate grid cell. Tabs therefore will be ignored.
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+
+ testFile = "IndentsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
+
+ Call hNewDocument
+
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Down>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Tab>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+
+ '/// Active navigator dialogue , check if the page number is 1
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
+ hCloseNavigator
+
+ '/// press TAB in second line again
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Home>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Tab>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+
+ '/// Active navigator dialogue , check if the page number is 2
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
+ hCloseNavigator
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tObjectsTest_1
+ '/// If objects are anchored to text they will "wander" with its surrounding text.
+ '/// If they are anchored as character they will snap to the appropriate grid cell (since they are a character).
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+
+ testFile = "objectsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
+
+ Call hNewDocument
+
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+
+ '/// If object is anchored as Character , check if it will snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Sleep 1
+ Auswahlliste.TypeKeys "<Return>"
+ Sleep 1
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorAsCharacter
+ WaitSlot()
+
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
+ hCloseNavigator
+
+ '/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Auswahlliste.TypeKeys "<Return>"
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorToCharacter
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
+ hCloseNavigator
+ Kontext
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/options_so_4.inc b/testautomation/framework/optional/includes/options_so_4.inc
deleted file mode 100755
index e8c5639d5f35..000000000000
--- a/testautomation/framework/optional/includes/options_so_4.inc
+++ /dev/null
@@ -1,707 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: options_so_4.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
-'*
-'* 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.
-'*
-'/************************************************************************
-'*
-'* owner : thorsten.bosbach@sun.com
-'*
-'* short description : options test (General/Memory/View)
-'*
-'\******************************************************************************
-
-testcase func_StarOfficeGeneral_1
- gApplication = "WRITER"
- Dim sSave as String
- Dim ClipText as String
-
-
- printlog " - other"
- printlog " - years two digits => 1899"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- sSave = Zweistellig.GetText
- Zweistellig.SetText "1899"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "CALC"
- hNewDocument
- DocumentCalc.TypeKeys "04.03.00<return>"
- DocumentCalc.TypeKeys "<up>"
- DocumentCalc.TypeKeys "<F2><Home><Shift End>"
- Sleep (1)
- EditCopy
- DocumentCalc.TypeKeys "<Escape>"
-
- ClipText = GetClipboardText
- if ClipText <> "04.03.1900" AND ClipText <> "04/03/1900" then Warnlog "Wrong date not 04.03.1900 or 04/03/1900 : => '" + ClipText + "'"
-
- hCloseDocument
-
- printlog " - years two digits => 2050"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Zweistellig.SetText "2050"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "CALC"
- hNewDocument
- DocumentCalc.TypeKeys "05.03.68<return>"
- DocumentCalc.TypeKeys "<up>"
- DocumentCalc.TypeKeys "<F2><Home><Shift End>"
- Sleep (1)
- EditCopy
- DocumentCalc.TypeKeys "<Escape>"
-
- ClipText = GetClipboardText
- if ClipText <> "05.03.2068" AND ClipText <> "05/03/2068" then Warnlog "Wrong date not 05.03.2068 or 05/03/2068 : => '" + ClipText + "'"
-
- hCloseDocument
-
- printlog " - reset to default"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Zweistellig.SetText sSave
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "WRITER"
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeGeneral_2
- Dim bSave as Boolean
- Dim sSave as String
- Dim i as Integer, iTime as Integer
-
- gApplication = "WRITER"
-
- printlog "tools / options / staroffice / general -> help agent"
- printlog "- check the minimum and the maximum of display duration for help agent ( 60sec and 5sec )"
- printlog " activate the help agent options-dialog -> OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- bSave = Aktivieren.IsChecked
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- working with activated HelpAgent"
- printlog " - check display duration of 10sec"
- printlog " new writer-doc"
- gApplication = "WRITER"
- hNewDocument
-
- printlog " tools / options / staroffice / general -> help agent -> duration to 10 -> "
- printlog " click also reset to delete the ignore-list for help-agent -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Zuruecksetzen.Click
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog " Format/Character - Font-Tabpage => help-agent must be activated"
- printlog " check if agent closed after ~10sec"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) <> TRUE then
- Warnlog "The help agent wasn't activated for autocorrection!"
- else
- for i=1 to 20
- if HelpAgent.Exists then
- Sleep 1
- else
- iTime = i
- i=21
- end if
- next i
- if iTime < 9 then Warnlog "The help agent is closed faster than 9 seconds!"
- if iTime > 12 then Warnlog "The help agent isn't closed after 12 seconds!"
- if HelpAgent.Exists then
- Warnlog "The help agent isn't closed after 20 seconds, the test close it!"
- HelpAgent.Close
- end if
- end if
-
- Kontext "TabFont"
- TabFont.Cancel
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check another display duration of 40sec"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> duration to 40 -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent must be activated"
- printlog " check if agent closed after ~40sec"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) <> TRUE then
- Warnlog "The help agent wasn't activated for autocorrection!"
- else
- for i=1 to 60
- if HelpAgent.Exists then
- Sleep 1
- else
- iTime = i
- i=61
- end if
- next i
- if iTime < 35 then Warnlog "The help agent is closed faster than 35 seconds!"
- if iTime > 45 then Warnlog "The help agent isn't closed after 45 seconds!"
- if HelpAgent.Exists then
- Warnlog "The help agent isn't closed after 40 seconds, the test close it!"
- HelpAgent.Close
- end if
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check another display duration of 60sec"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> duration to 60 -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent must be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) <> TRUE then
- Warnlog "The help agent wasn't activated for autocorrection!"
- else
- for i=1 to 80
- if HelpAgent.Exists then
- Sleep 1
- else
- iTime = i
- i=81
- end if
- next i
- if iTime < 55 then Warnlog "The help agent is closed faster than 55 seconds!"
- if iTime > 65 then Warnlog "The help agent isn't closed after 65 seconds!"
- if HelpAgent.Exists then
- Warnlog "The help agent isn't closed after 60 seconds, the test close it!"
- HelpAgent.Close
- end if
- end if
-
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check if the help agent isn't active, when you ignore it 3 times ( inserted in the ignore-list )"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> duration to 10 -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent should not be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists then
- Warnlog "Ignore HelpAgent 3 time for the same slot does not work, HelpAgent is active!"
- HelpAgent.Close
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check if ignore-list can be deleted"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> click on reset -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Zuruecksetzen.Click
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent should not be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(2) <> TRUE then
- Warnlog "Ignore-list isn't reset, the HelpAgent is not active"
- else
- HelpAgent.Close
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - working with deactivated the help agent"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> deactivate help agent -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog " Format/Character - Font-Tabpage => help-agent ust be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) = TRUE then
- Warnlog "The help agent was active!"
- HelpAgent.Close
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - reset help-agent-options"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Zuruecksetzen.Click
- if bSave = TRUE then Aktivieren.Check else Aktivieren.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeGeneral_3
- Dim bStatus as Boolean
-
- gApplication = "WRITER"
-
-
- printlog "StarOffice / General => 'printing sets 'document modified' status'"
- printlog "save a writer-doc"
- hNewDocument
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "This is a file, for options test: <return> Tools / Options / StarOffice / General -> 'Printing sets 'document modified' status'"
- DocumentWriter.TypeKeys "<Return><Return>This file is created by an automated test. It can be trashed after one day!<Return>Today is " + Date
- hFileSaveAsKill ( gOfficePath + "user\work\opt.sxw" )
-
- printlog "- open tools/option/StarOffice/general and save the state of the checkbox"
- printlog "- check it"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- bStatus = DruckenStatus.IsChecked
- DruckenStatus.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- file/print and click OK at the print-dialog"
- FilePrint
-
- Kontext "Active"
- if Active.Exists() then
- warnlog( "Unexpected dialog, no default printer found (#108776?)" )
- Active.OK()
- else
- Kontext "DruckenDlg"
- DruckenDlg.OK
- Sleep (5)
- endif
-
- printlog "- file/close"
- FileClose
- Kontext "Active"
- if Active.Exists(2) <> TRUE then
- Warnlog "No warning, when this options is checked!"
- else
- Active.Cancel
- end if
-
- printlog "- file/save"
- FileSave
-
- printlog "- uncheck the checkbox"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- DruckenStatus.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- file/print"
- FilePrint
- Kontext "DruckenDlg"
- DruckenDlg.OK
- Sleep (5)
-
- printlog "- file/close"
- FileClose
- Kontext "Active"
- if Active.Exists(2) then
- Warnlog "The document is modified, a messagebox came up at closing"
- Active.Yes
- end if
-
- printlog "- reset this option"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- if bStatus = TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeGeneral_4
- Dim bStatus as Boolean
-
- gApplication = "WRITER"
-
-
- hNewDocument
- printlog "StarOffice / General => 'use StarOffice dialogs'"
- if gPlatgroup = "unx" then
- printlog "This feature is only available on windows systems"
- else
- printlog "- open tools/options/staroffice/general and uncheck 'use StarOffice dialogs'"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- bStatus = StarOfficeDialogeBenutzen.IsChecked
- StarOfficeDialogeBenutzen.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- file/open and check if the file-dialog is a system-dialog"
- FileOpen
- if ExistsSysDialog ( FilePicker ) = FALSE then
- Warnlog "The file-open-dialog is no system dialog"
- Kontext "OeffnenDlg"
- OeffnenDlg.Cancel
- else
- CloseSysDialog ( FilePicker )
- end if
-
- printlog Chr(13) + "check that StarOffice dialogs are used => state of the checkbox is checked"
- printlog "- open tools/options/staroffice/general"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- StarOfficeDialogeBenutzen.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- open tools/options/staroffice/general and check 'use StarOffice dialogs'"
- FileOpen
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists (1) <> TRUE then
- Warnlog "StarOffice dialogs are not used!"
- if ExistsSysDialog ( FilePicker ) then CloseSysDialog ( FilePicker )
- else
- OeffnenDlg.Cancel
- end if
-
- printlog Chr(13) + "reset the state of 'use StarOffice dialogs' to default"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- if bStatus = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- end if
-
- hCloseDocument
-
-endcase
-
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeMemory_1
- Dim sSave as String
- Dim i, ilast as Integer
- gApplication = "WRITER"
-
-
- printlog " - save"
- printlog " - undo"
- printlog " - set number of steps => 1"
-
- hNewDocument
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- sSave = UndoSteps.GetText
- UndoSteps.SetText "1"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "Hello "
- DocumentWriter.TypeKeys "friends "
-
- EditUndo
- try
- EditUndo
- Warnlog "More than 1 undo was possible!"
- catch
- endcatch
-
- printlog " - set number of steps => 15"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- UndoSteps.SetText "15"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- for i=1 to 20
- DocumentWriter.TypeKeys "Hello<return>"
- next i
- Sleep (2)
-
- for i=1 to 20
- if i<16 then
- try
- EditUndo
- catch
- iLast = i-1
- Warnlog "The 15th undo was impossible! The test can do only " + iLast + " undos! => BugID 83891"
- endcatch
- else
- try
- EditUndo
- Warnlog "More than 15 undo was possible!"
- catch
- endcatch
- end if
- next i
-
- printlog " - set number of steps => 99"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- UndoSteps.SetText "99"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- for i=1 to 102
- DocumentWriter.TypeKeys "Hello<return>"
- next i
-
- for i=1 to 102
- if i<100 then
- try
- EditUndo
- catch
- iLast = i-1
- Warnlog "The 99th undo was impossible! The test can do only " + iLast + " undos! => BugID 83891"
- i=105
- endcatch
- else
- try
- EditUndo
- Warnlog "More than 99 undo are possible!"
- catch
- i=105
- endcatch
- end if
- next i
-
- hCloseDocument
-
- printlog " - reset the number of steps"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- UndoSteps.SetText sSave
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeView_1
- Dim bSave as Boolean
- Dim iSave as Integer
- Dim sSave as String
-
-hNewDocument
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - view"
- printlog " - display"
- printlog " - scaling"
- sSave = FontScale.GetText
- FontScale.SetText "50"
- FontScale.More
- FontScale.Less
- printlog " - " + FontScale.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- FontScale.SetText "150"
- FontScale.More
- FontScale.Less
- printlog " - " + FontScale.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- FontScale.SetText(sSave)
- FontScale.More
- FontScale.Less
- printlog " - " + FontScale.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- hclosedocument
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeView_2
- Dim iSave as Integer
-
- printlog " - view"
- printlog " - mouse positioning"
-
- hNewDocument
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- iSave = MousePositioning.GetSelIndex
- MousePositioning.Select 1
- printlog " - " + MousePositioning.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.MouseMove 1, 1
-
- DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- MousePositioning.Select 2
- printlog " - " + MousePositioning.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.MouseMove 1, 1
-
- DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- MousePositioning.Select 3
- printlog " - " + MousePositioning.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.MouseMove 1, 1
-
- DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- MousePositioning.Select iSave
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hCloseDocument
-endcase
-
-
diff --git a/testautomation/framework/optional/includes/options_so_5.inc b/testautomation/framework/optional/includes/options_so_5.inc
deleted file mode 100755
index 200e37ad47c1..000000000000
--- a/testautomation/framework/optional/includes/options_so_5.inc
+++ /dev/null
@@ -1,612 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: options_so_5.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
-'*
-'* 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.
-'*
-'/************************************************************************
-'*
-'* owner : thorsten.bosbach@sun.com
-'*
-'* short description : general option test
-'*
-'\******************************************************************************
-
-
-testcase func_StarOfficeView_3
-
- Dim bSave as Boolean
- Dim iSave as Integer
- Dim xPos, yPos as Integer
-
- printlog " - view"
- printlog " - buttons"
-
- hNewDocument
-
- Kontext "DocumentWriter"
- xPos = DocumentWriter.getSizeX
- yPos = DocumentWriter.getSizeY
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- iSave = IconScale.getSelIndex()
-
- printlog " - set buttonsize to 'large'"
- IconScale.Select( 3 )
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- if DocumentWriter.getSizeX = xPos AND DocumentWriter.getSizeY = yPos then
- warnlog "Perhaps the buttons are not large!"
- endif
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- printlog " - set buttonsize to 'small'"
- IconScale.Select( 2 )
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- if DocumentWriter.getSizeX <> xPos OR DocumentWriter.getSizeY <> yPos then
- warnlog "Perhaps the buttons are not small!"
- endif
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- printlog " - large buttons => default"
- if iSave <> 1 then
- IconScale.Select( iSave )
- endif
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hCloseDocument
-endcase
-
-'*******************************************************************************
-
-testcase func_StarOfficeView_4
- Dim bSave ( 10 ) as Boolean
- Dim i as Integer, iCount as Integer
-
- printlog " - view"
- printlog " - options"
-
- hNewDocument
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- bSave(4) = VorschauInSchriftlisten.IsChecked
- bSave(6) = SchriftenHistorie.IsChecked
-
- printlog " - inactive menu items : => check"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- iCount = hMenuItemGetCount
- Sleep (2)
- hMenuClose
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - inactive menu items : => uncheck"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- if hMenuItemGetCount <> iCount then
- Warnlog "The number of entries at the context menu on a writer doc is NOT the same at 'show inactive' is checked or not => BUG!"
- end if
- Sleep (2)
- hMenuClose
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - preview in fontlist : => Uncheck"
- VorschauInSchriftlisten.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- if textobjectbar.exists then
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
- else
- warnlog "No Textobjectbar?"
- endif
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - preview in fontlist : => check"
- VorschauInSchriftlisten.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(4) = TRUE then VorschauInSchriftlisten.Check else VorschauInSchriftlisten.UnCheck
- printlog " - font history : => Uncheck"
- SchriftenHistorie.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - font history : => check"
- SchriftenHistorie.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(6) = TRUE then SchriftenHistorie.Check else SchriftenHistorie.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hCloseDocument
-
-endcase
-
-'*******************************************************************************
-
-testcase func_StarOfficeView_5
-
- Dim bSave ( 5 ) as Boolean
- Dim i as Integer
-
- printlog " - view"
- printlog " - 3D-view"
-
- printlog " - use OpenGL => Uncheck"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- bSave (1) = OpenGL.IsChecked
- bSave (2) = OptimierteAusgabe.IsChecked
-
- OpenGL.Uncheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => Check + optimized output => UnCheck"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Check
- OptimierteAusgabe.Uncheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => Check + optimized output => Check"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Check
- OptimierteAusgabe.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use dithering => uncheck"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(2) = TRUE then OptimierteAusgabe.Check else OptimierteAusgabe.Check
- if bSave(1) = TRUE then OpenGL.Check else OpenGL.UnCheck
- bSave (3) = Dithering.IsChecked
- Dithering.Uncheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use dithering => Check"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- Dithering.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => UnCheck + Dithering => UnCheck!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Uncheck
- Dithering.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - Object refresh after interaction => check!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(1) = TRUE then OpenGL.check else OpenGL.UnCheck
- if bSave(3) = TRUE then Dithering.Check else Dithering.UnCheck
- bSave (4) = Volldarstellung.IsChecked
- Volldarstellung.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => UnCheck + Object refresh after interaction => check!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Uncheck
- Volldarstellung.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - Object refresh after interaction => UnCheck!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(1) = TRUE then OpenGL.check else OpenGL.UnCheck
- Volldarstellung.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - reset to default"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(4) = TRUE then Volldarstellung.check else Volldarstellung.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "WRITER"
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeView_6
- Dim bSave as Boolean
- Dim sSave as String
- Dim i as Integer
-
- if gPlatgroup <> "unx" then
- printlog "No test for 'anti aliasing' fonts on windows platforms!"
- goto endsub
- end if
-
- printlog "open a new writer-document"
- gApplication = "WRITER"
- hNewDocument
-
- printlog " - view"
- printlog " - anti aliasing"
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- bSave = FontAntiAliasing.IsChecked
- FontAntiAliasing.Check
- sSave = AAPixel.GetText
-
- printlog " change pixelsize to 5"
- AAPixel.SetText "5"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- for i=1 to 8
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- hMenuSelectNr i
- Sleep (2)
- hMenuClose
- next i
-
- printlog " change pixelsize to 15"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- AAPixel.SetText "15"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- for i=1 to 8
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- hMenuSelectNr i
- Sleep (2)
- hMenuClose
- next i
-
- printlog " change pixelsize to 25"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- AAPixel.SetText "25"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- for i=1 to 8
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- hMenuSelectNr i
- Sleep (2)
- hMenuClose
- next i
-
- printlog " reset all changes to raw data"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- AAPixel.SetText sSave
- if bSave = TRUE then FontAntiAliasing.Check else FontAntiAliasing.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- hCloseDocument
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficePrint_1
- Dim bSave as Boolean, bSave2 as Boolean
- Dim i as Integer
-
- gApplication = "DRAW"
-
- printlog " - printer warnings"
-
- printlog " - Paper size => active"
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- bSave = PaperSize.IsChecked
- PaperSize.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- FormatSlideDraw
- Kontext
- Active.Setpage TabSeite
- Kontext "TabSeite"
- Papierformat.Select 1 ' select the format A0
- TabSeite.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintOptions"
- if WarningPrintOptions.Exists(3) then
- WarningPrintOptions.Cancel
- else
- Warnlog "The warning-message for papersize does not turn up!"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- hCloseDocument
-
- printlog " - Paper size => disabled"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- PaperSize.uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- FormatSlideDraw
- Kontext
- Active.Setpage TabSeite
- Kontext "TabSeite"
- Papierformat.Select 1 ' select the format A0
- TabSeite.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintOptions"
- if WarningPrintOptions.Exists(3) then
- WarningPrintOptions.Cancel
- Printlog "The warning-message for papersize does exist => not realy a BUG"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- hCloseDocument
-
- printlog " - Transparency => active"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- bSave2 = Transparency.IsChecked
- PaperSize.Uncheck
- Transparency.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- hRechteckErstellen ( 30, 30, 60, 60 )
-
- FormatArea
- Kontext
- Active.Setpage TabTransparenz
- Kontext "TabTransparenz"
- LineareTransparenz.Check
- TabTransparenz.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintOptions"
- if WarningPrintOptions.Exists(3) then
- WarningPrintOptions.Cancel
- else
- Warnlog "The warning-message for papersize does not turn up!"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- hCloseDocument
-
- printlog " - Transparency => disabled"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- Transparency.Uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- hRechteckErstellen ( 30, 30, 60, 60 )
-
- FormatArea
- Kontext
- Active.Setpage TabTransparenz
- Kontext "TabTransparenz"
- LineareTransparenz.Check
- TabTransparenz.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintTransparency"
- if WarningPrintTransparency.Exists(3) then
- WarningPrintTransparency.Cancel
- Warnlog "The warning-message for papersize does exist => BUG!"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- for i=1 to 100
- FileClose
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- try
- Active.OK
- Sleep ( 5 )
- catch
- Active.No
- i=101
- endcatch
- end if
- next i
-
- printlog " - reset the printing options"
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
- if bSave = TRUE then PaperSize.Check else PaperSize.Uncheck
- if bSave2 = TRUE then Transparency.Check else Transparency.Uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
-endcase
-
diff --git a/testautomation/framework/optional/includes/w_grid_layout1.inc b/testautomation/framework/optional/includes/w_grid_layout1.inc
index 8909045f288b..b467a7be3ae1 100755..100644
--- a/testautomation/framework/optional/includes/w_grid_layout1.inc
+++ b/testautomation/framework/optional/includes/w_grid_layout1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
+'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
@@ -41,265 +41,335 @@ private const SOURCE_PATH = "framework\optional\input\CJK\"
testcase tTextGridDialog_1
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- hNewDocument()
- FormatPageWriter
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- warnlog "Shouldn't get Tabpage: Grid Text"
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- endcatch
- end if
-
- Call CheckAsianLanguageSupport("On")
-
- sleep 5
- FormatPageWriter
- Kontext
- if Active.exists (10) then
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- warnlog "Couldn't get Tabpage: Grid Text"
- endcatch
- else
- warnlog "FormatPageWriter didn't bring up ndialog"
- endif
- hCloseDocument()
+ '/// Check if tabpage 'Text Grid' disappears when "Asian Language support" is NOT checked
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ hNewDocument()
+ FormatPageWriter
+ try
+ Kontext
+ Active.SetPage TabGrid
+ Kontext "TabGrid"
+ TabGrid.Cancel
+ warnlog "Shouldn't get Tabpage: Grid Text"
+ catch
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
+ TabSeite.Cancel
+ endcatch
+ endif
+
+ '/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
+ Call CheckAsianLanguageSupport("On")
+
+ sleep 5
+ FormatPageWriter
+ Kontext
+ if Active.exists (10) then
+ try
+ Kontext
+ Active.SetPage TabGrid
+ Kontext "TabGrid"
+ TabGrid.Cancel
+ catch
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
+ TabSeite.Cancel
+ warnlog "Couldn't get Tabpage: Grid Text"
+ endcatch
+ else
+ warnlog "FormatPageWriter didn't bring up ndialog"
+ endif
+ hCloseDocument()
endcase
'-------------------------------------------------------------------------
testcase tTextGridDialog_2
- Dim testFile , sCorrectResult as String
+ '/// No grid is active, no changes to existing version
+ Dim testFile , sCorrectResult as String
+
+ testFile = "gridtest.sxw"
+ sCorrectResult = "1"
- testFile = "gridtest.sxw"
- sCorrectResult = "1"
+ Call hNewDocument
- Call hNewDocument
+ '/// open a test file , and check No Grid checkbox
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
-
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- NoGrid.Check
- Sleep 1
+ Kontext "TabGrid"
+ NoGrid.Check
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
+ Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 5
- fCloseNavigator
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+ '/// In No Grid mode, there should be only 1 page, the focus is before the first line
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing NoGrid option!"
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tTextGridDialog_3
- Dim testFile , sCorrectResult , sLinesPerPage as String
+ '/// Grid (lines only): The page is set up with a defined number of lines
+ Dim testFile , sCorrectResult , sLinesPerPage as String
- testFile = "gridtest.sxw"
- sCorrectResult = "G"
- sLinesPerPage = "10"
+ testFile = "gridtest.sxw"
+ sCorrectResult = "G"
+ sLinesPerPage = "10"
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
+ '/// open a test file and check Grid(lines onle) checkbox ,
+ '/// + set 10 line/page
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- LinesGrid.Check
- LinesPerPage.SetText sLinesPerPage
- Sleep 1
+ Kontext "TabGrid"
+ LinesGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
+ Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 5
- fCloseNavigator
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines only) option!"
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tTextGridDialog_4
- Dim testFile , sCorrectResult as String
- Dim sLinesPerPage , sCharsPerLine as String
+ '/// Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line
+ Dim testFile , sCorrectResult as String
+ Dim sLinesPerPage , sCharsPerLine as String
- testFile = "gridtest.sxw"
- sCorrectResult = "E"
- sLinesPerPage = "10"
- sCharsPerLine = "9"
+ testFile = "gridtest.sxw"
+ sCorrectResult = "E"
+ sLinesPerPage = "10"
+ sCharsPerLine = "9"
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
+ '/// open a test file and check Grid(lines and characters) checkbox
+ '/// + set 10 line/page and 9 characters/line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- CharsGrid.Check
- LinesPerPage.SetText sLinesPerPage
- CharsPerLine.SetText sCharsPerLine
- Sleep 1
+ Kontext "TabGrid"
+ CharsGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
+ Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 5
- fCloseNavigator
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines and characters) option!"
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tGridDisplay_1
- Call hNewDocument
+ '/// Print grid: The grid lines will be printed. Inactive if "Display grid" is inactive.
+ Call hNewDocument
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and check "print grid"
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- CharsGrid.Check
- Display.Check
- Sleep 1
- PrintGrid.Check
- Sleep 1
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.Check
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Print to printer
FilePrint
Kontext "Active"
- if Active.Exists(5) then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- end if
+ if ( Active.Exists( 5 ) ) then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel
+ endif
+ endif
else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- Sleep 5
- kontext
- if active.exists(5) then
- qaErrorLog active.getText
- active.ok
- end if
- end if
+ Kontext "Printing"
+ if ( Printing.exists( 2 )) then
+ printing.cancel()
+ Printing.notExists( 5 )
+ endif
+
+ kontext "Active"
+ if active.exists(5) then
+ qaErrorLog active.getText()
+ active.ok()
+ endif
+ endif
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and uncheck "print grid"
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- CharsGrid.Check
- Display.Check
- Sleep 1
- PrintGrid.UnCheck
- Sleep 1
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.UnCheck
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Print to printer
FilePrint
Kontext "Active"
- if Active.Exists(5) then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- end if
+ if ( Active.Exists( 5 ) )then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel()
+ endif
+ endif
else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- Sleep 5
- kontext
- if active.exists(5) then
- qaErrorLog active.getText
- active.ok
- end if
- end if
-
- Call hCloseDocument
+ Kontext "Printing"
+ if( Printing.exists( 1 )) then
+ printing.cancel()
+ Printing.notExists( 5 )
+ endif
+ kontext
+ if ( active.exists( 2 ) ) then
+ qaErrorLog active.getText
+ active.ok
+ endif
+ endif
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tUserDefineLayout_1
+ '/// Decrease characters per line will cause lines per page decrease accordingly
+ Dim sLinesPerPage , sCharsPerLine as String
+ Dim sExpectLinesPerPage , sExpectLinesPerPage1 as String
+
+ sLinesPerPage = "20"
+ sCharsPerLine = "2"
+ sExpectLinesPerPage = "2"
+ sExpectLinesPerPage1 = "3"
+
+ Call hNewDocument
+
+ '/// Format/page , set lines per page to 20, and set charsets per line to 2
+ '/// + wait for a moment , then check the the number of lines per page.
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 2
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 2
+
+ 'This step is no use, just let the LinesPerPage change the number
+ CharsGrid.Check
+
+ if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
+ Warnlog( "#i106381# - LInes per page changed" )
+ printlog( "The lines per page should be" + sExpectLinesPerPage & " OR " & sExpectLinesPerPage1 & " but get " &LinesPerPage.GetText )
+ endif
+
+ TabGrid.Cancel
+
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tFontSizeChanges_1
+
+ '/// Change the font size to bigger enough will change the layout
Dim testFile , sCorrectResult as String
Dim sLinesPerPage , sCharsPerLine as String
dim sTemp as string
@@ -315,30 +385,30 @@ testcase tFontSizeChanges_1
Call DocumentWriter.TypeKeys "<Shift Right>"
Kontext "FormatObjectbar"
- Schriftgroesse.Select "60"
- Schriftgroesse.TypeKeys "<Return>"
- Sleep 1
+ Schriftgroesse.Select "60"
+ Schriftgroesse.TypeKeys "<Return>"
+ Sleep 1
Kontext "DocumentWriter"
FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ if TabGrid.exists(5) then
+ sTemp = LinesPerPage.GetText
+ if sTemp <> sLinesPerPage then
+ Warnlog "The lines per page should be: '" & sLinesPerPage & "'; but get: '" & sTemp & "'"
endif
- Kontext "TabGrid"
- if TabGrid.exists(5) then
- sTemp = LinesPerPage.GetText
- if sTemp <> sLinesPerPage then
- Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
- endif
- sTemp = CharsPerLine.GetText
- if sTemp <> sCharsPerLine then
- Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
- endif
- TabGrid.Cancel
- else
- warnlog "TabGrid is not available."
+ sTemp = CharsPerLine.GetText
+ if sTemp <> sCharsPerLine then
+ Warnlog "The chars per line should be: '" & sCharsPerLine & "'; but get: '" &sTemp & "'"
endif
+ TabGrid.Cancel
+ else
+ warnlog "TabGrid is not available."
+ endif
Kontext
ViewNavigator
@@ -349,16 +419,16 @@ testcase tFontSizeChanges_1
else
warnlog "Navigator not available"
endif
- fCloseNavigator
+ hCloseNavigator
Kontext "DocumentWriter"
sleep 3
Call DocumentWriter.TypeKeys "<Shift Right>"
- sleep 3
- Editcopy
+
+ hUseAsyncSlot( "EditCopy" )
sTemp = GetClipboardText
- if sTemp <> sCorrectResult then
- Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
+ if sTemp <> sCorrectResult then
+ Warnlog "Don't get the expected result , hope to be: '" & sCorrectResult & "'; but get: '" & sTemp & "'"
endif
Call hCloseDocument
@@ -367,26 +437,28 @@ endcase
'-------------------------------------------------------------------------
testcase tRubyText_1
- Dim testFile , sRubyText as String
+ '/// If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself.
+ Dim testFile , sRubyText as String
- testFile = "rubytest.sxw"
- sRubyText = "Ruby Test Text ....................."
+ testFile = "rubytest.sxw"
+ sRubyText = "Ruby Test Text ....................."
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ '/// open a test file , and insert long ruby test text
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Shift Right>"
- Sleep 1
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+ Sleep 1
FormatRuby
Kontext "RubyDialog"
- Sleep 3
- RubyText1.setText sRubyText
- Sleep 2
- RubyDialog.OK
- Sleep 2
+ Sleep 3
+ RubyText1.setText sRubyText
+ Sleep 2
+ RubyDialog.OK
+ Sleep 2
DialogClose.Click
Sleep 1
@@ -396,42 +468,46 @@ testcase tRubyText_1
Call DocumentWriter.TypeKeys "<End>"
Sleep 2
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
- Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
- end if
+ Warnlog "Don't get the correct result after inserting ruby text! Get " & GetClipboardText
+ endif
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tIndentsTest_1
- Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+ '/// Indents should work and always indenting as close as possible to their measurements by snapping to the appropriate grid cell. Tabs therefore will be ignored.
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
- testFile = "IndentsTest.sxw"
- sCorrectPage1 = "1"
- sCorrectPage2 = "2"
+ testFile = "IndentsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Down>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Tab>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Down>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Tab>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ '/// Active navigator dialogue , check if the page number is 1
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
- if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
- fCloseNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
+ hCloseNavigator
+ '/// press TAB in second line again
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<Home>"
Sleep 1
@@ -440,13 +516,67 @@ testcase tIndentsTest_1
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
+ '/// Active navigator dialogue , check if the page number is 2
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
- if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
- fCloseNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
+ hCloseNavigator
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
+
+testcase tObjectsTest_1
+ '/// If objects are anchored to text they will "wander" with its surrounding text.
+ '/// If they are anchored as character they will snap to the appropriate grid cell (since they are a character).
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+
+ testFile = "objectsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
+
+ Call hNewDocument
+
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+
+ '/// If object is anchored as Character , check if it will snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Sleep 1
+ Auswahlliste.TypeKeys "<Return>"
+ Sleep 1
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorAsCharacter
+ WaitSlot()
+
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
+ hCloseNavigator
+
+ '/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Auswahlliste.TypeKeys "<Return>"
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorToCharacter
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
+ hCloseNavigator
+ Kontext
+
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/framework/required/includes/help_browser.inc b/testautomation/framework/required/includes/help_browser.inc
index 2b4ee6270fda..86ed8f3d81ba 100755
--- a/testautomation/framework/required/includes/help_browser.inc
+++ b/testautomation/framework/required/includes/help_browser.inc
@@ -41,9 +41,7 @@ testcase tHelp_DialogTest
printlog( "Resource test for the Help Browser" )
- Dim i as Integer
dim brc as boolean
- printlog "- open the help"
brc = hOpenHelp()
if ( not brc ) then
@@ -56,6 +54,11 @@ testcase tHelp_DialogTest
goto endsub
endif
+ hSelectHelpTab( "content" )
+ hSelectHelpTab( "index" )
+ hSelectHelpTab( "find" )
+ hSelectHelpTab( "bookmarks" )
+
brc = hSelectHelpTab( "content" )
call DialogTest( ContentPage )
@@ -78,8 +81,10 @@ endcase
testcase tHelp_ToolBar
- Dim i as Integer
+ printlog( "Resource test for the help toolbar" )
+
dim brc as boolean
+ dim iExitCounter as integer : iExitCounter = 0
brc = hOpenHelp()
if ( not brc ) then
@@ -104,9 +109,13 @@ testcase tHelp_ToolBar
' Backward- and Forward-button
printlog "- activate 'Index'-page"
brc = hSelectHelpTab( "index" )
- sleep( 2 )
+
+ do while( SearchIndex.getItemCount() < 100 )
+ iExitCounter = iExitCounter + 1 : if ( iExitCounter = 20 ) then exit do
+ wait( 100 )
+ loop
- SearchIndex.Select 4
+ SearchIndex.Select( 4 )
DisplayIndex.Click()
waitslot
@@ -126,37 +135,25 @@ testcase tHelp_ToolBar
PrintButton.Click()
kontext "active"
-
- if Active.Exists ( 1 ) then
-
- if Active.getRT() = 304 then
- qaerrorlog "- Printing failed: Did you define a default printer?"
- Active.OK()
-
- Kontext "DruckenDlg"
- if ( druckenDlg.exists() ) then
- printlog( "Printer dialog is still open, closing with cancel" )
- druckenDlg. cancel()
- endif
-
- endif
-
+ if ( Active.Exists ( 1 ) ) then
+ qaerrorlog( "Unexpected messagebox: " & Active.getText() )
+ qaerrorlog( "Probably missing default printer on this system, fix it!" )
+ Active.OK()
+ endif
+
+ kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+ printlog( "Print dialog open, good." )
+ Printing.cancel()
else
- kontext "druckendlg"
- if DruckenDlg.NotExists (2) then
- warnlog "No print-dialog is open. => direct printing? - bug 93788!"
- else
- DruckenDlg.Cancel()
- endif
-
+ warnlog( "Print dialog not open" )
endif
- printlog "- Set Bookmark"
-
kontext "tb_help"
+ printlog "- Set Bookmark"
SetBookmarks.Click()
- kontext "addbookmark"
+ kontext "AddBookmark"
call DialogTest ( AddBookmark )
AddBookmark.Cancel()
diff --git a/testautomation/framework/tools/includes/CJK_tools.inc b/testautomation/framework/tools/includes/CJK_tools.inc
index e877bbb2b3c5..7c6eec5b9896 100755
--- a/testautomation/framework/tools/includes/CJK_tools.inc
+++ b/testautomation/framework/tools/includes/CJK_tools.inc
@@ -37,10 +37,6 @@
'*
'\***********************************************************************
-
-'******************************************************************************
-' This function will check Asina Language Support on/off based on the parameter
-'******************************************************************************
function CheckAsianLanguageSupport( sSupport as String ) as String
ToolsOptions
@@ -67,11 +63,8 @@ function CheckAsianLanguageSupport( sSupport as String ) as String
end function
+'******************************************************************************'
-
-'***************************************************************
-' Start up Navigator , and set focus to the correct position
-'**************************************************************
function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
Dim j as Integer
@@ -117,28 +110,8 @@ function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
sleep 1
end function
+'******************************************************************************'
-'******************
-'Close Navigator
-'******************
-function fCloseNavigator
- '/// This function will close Navigator dialogure
-
- Kontext
- Kontext "Navigator"
- if ( Navigator.exists() ) then
- Navigator.Close()
- printlog( "Closed navigator" )
- else
- printlog( "Navigator not open." )
- endif
-
-end function
-
-
-'****************************************************************************
-' This routine will return the Country name based on CountryID
-'*****************************************************************************
function fGetCountryName( CountryID as Integer ) as String
select case iSprache
diff --git a/testautomation/framework/tools/includes/customize_tools.inc b/testautomation/framework/tools/includes/customize_tools.inc
index 8c0cbf80f1c9..a8fd0b3dba99 100755
--- a/testautomation/framework/tools/includes/customize_tools.inc
+++ b/testautomation/framework/tools/includes/customize_tools.inc
@@ -114,9 +114,6 @@ function hToolsCustomizeSelectTab( cTab as string ) as boolean
'///+<li>Switch to one of the four available tabpages</li>
'///<ol>
kontext
- active.setPage
-
- kontext
try
@@ -193,8 +190,7 @@ function hToolsCustomizeClose( iMode as integer ) as boolean
'///<ul>
const CFN = "hToolsCustomizeClose::"
- dim brc as boolean
- brc = true
+ dim brc as boolean : brc = true
kontext
@@ -213,8 +209,11 @@ function hToolsCustomizeClose( iMode as integer ) as boolean
end select
'///</ol>
+
+
'///+<li>Verify that the dialog has indeed been closed</li>
kontext "TabCustomizeEvents"
+ TabCustomizeEvents.notExists( 3 )
if ( TabCustomizeEvents.exists() ) then
brc = false
endif
diff --git a/testautomation/framework/tools/includes/fileoperations.inc b/testautomation/framework/tools/includes/fileoperations.inc
index d4abf557afe8..16f57f5cce6a 100755
--- a/testautomation/framework/tools/includes/fileoperations.inc
+++ b/testautomation/framework/tools/includes/fileoperations.inc
@@ -872,6 +872,8 @@ function hFindFileObjectViaFileOpen( cName as string ) as integer
dim iPathItems as integer
dim asPathList( 100 ) as string
+ dim iWait as integer ' some increment variable
+
printlog( CFN & "Enter with option (File): " & cName )
'///+<li>If a fully qualified path has been provided we have to split it up</li>
@@ -899,6 +901,21 @@ function hFindFileObjectViaFileOpen( cName as string ) as integer
'///+<li>get the number of items in the filepicker</li>
kontext "OeffnenDlg"
+ iWait = 0
+ while ( DateiAuswahl.getItemCount() = 0 )
+ wait( 100 )
+ iWait = iWait + 1
+ if ( iWait = 10 ) then
+ warnlog( "Filepicker is not populated within reasonable timeframe, aborting" )
+ kontext "OeffnenDlg"
+ OeffnenDlg.Close()
+ hFindFileObjectViaFileOpen() = 0
+ exit function
+ else
+ printlog( "Waiting for filepicker list to populate..." )
+ endif
+ wend
+
iFileOpenItemCount = DateiAuswahl.getItemCount()
'///+<li>Jump to the first item in the filelist and select it with SPACE</li>
diff --git a/testautomation/framework/tools/includes/help_tools.inc b/testautomation/framework/tools/includes/help_tools.inc
index 438c01d7ef7e..18e1691a1a43 100755
--- a/testautomation/framework/tools/includes/help_tools.inc
+++ b/testautomation/framework/tools/includes/help_tools.inc
@@ -199,18 +199,22 @@ function hSelectHelpTab( cTab as string ) as boolean
select case cTabName
case "content" : TabControl.setPage( ContentPage )
if ( SearchContent.isVisible() ) then
+ call DialogTest( ContentPage )
brc = true
endif
case "index" : TabControl.setPage( IndexPage )
if ( SearchIndex.isVisible() ) then
+ call DialogTest( IndexPage )
brc = true
endif
case "find" : TabControl.setPage( FindPage )
if ( SearchFind.isVisible() ) then
+ call DialogTest( FindPage )
brc = true
endif
case "bookmarks" : TabControl.setPage( BookmarksPage )
if ( Bookmarks.isVisible() ) then
+ call DialogTest( BookmarksPage )
brc = true
endif
case else
diff --git a/testautomation/global/required/includes/g_printing.inc b/testautomation/global/required/includes/g_printing.inc
new file mode 100755
index 000000000000..b46a096c4364
--- /dev/null
+++ b/testautomation/global/required/includes/g_printing.inc
@@ -0,0 +1,524 @@
+'encoding UTF-8 Do not remove or change this line!
+'*******************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: basic_delete_modules.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:13 $
+'*
+'* 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.
+'*
+'/******************************************************************************
+'*
+'* owner : joerg.skottke@sun.com
+'*
+'* short description : Resource test for the printing dialog
+'*
+'\******************************************************************************
+
+private const MSG1 = "Incorrect default setting: "
+
+'*******************************************************************************
+
+sub g_printing()
+
+ call tPrintCommon()
+ call tPrintGeneral()
+ call tPrintApplication()
+ call tPrintLayout()
+ call tPrintOptions()
+
+end sub
+
+'*******************************************************************************
+
+testcase tPrintCommon()
+
+ printlog( "Common print options (main dialog)" )
+
+ printlog( "Open new document" )
+ hCreateDocument()
+
+ printlog( "Open printing dialog" )
+ FilePrint
+
+ kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+
+ call DialogTest( Printing )
+
+ if ( PreviewPageNumber.isEnabled() ) then
+ warnlog( "Page number should be disabled for empty document" )
+ endif
+
+ if ( ScrollBackward.isEnabled() ) then
+ warnlog( "Scroll backward button should be disabled for empty document" )
+ endif
+
+ if ( ScrollForward.isEnabled() ) then
+ warnlog( "Scroll forward button should be disabled for empty document" )
+ endif
+
+ kontext "Printing"
+ printlog( "Close print dialog")
+ Printing.cancel()
+
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
+
+ printlog( "Close document" )
+ hDestroyDocument()
+
+endcase
+
+'*******************************************************************************
+
+testcase tPrintGeneral()
+
+ printlog( "General printing options - General tabpage" )
+
+ dim iSlidesPerPage as integer
+ dim iExpected as integer
+
+ printlog( "Open new document" )
+ hCreateDocument()
+
+ printlog( "Open printing dialog" )
+ FilePrint
+
+ kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+
+ PrintingTabControl.setPage( TabPrintGeneral )
+
+ kontext "TabPrintGeneral"
+ call DialogTest( TabPrintGeneral )
+
+ printlog( "PrinterList" )
+ if ( NOT PrinterList.isEnabled() ) then
+ warnlog( "Printer List is disabled" )
+ endif
+
+ printlog( "Number of copies/Collate" )
+ if ( NumberOfCopies.getText <> "1" ) then
+ warnlog( "Number of copies should be 1 by default, is " & NumberOfCopies.getText() )
+ endif
+
+ if ( Collate.isEnabled() ) then
+ warnlog( "<Collate> should not be enabled for just one copy" )
+ endif
+
+ NumberOfCopies.setText( "2" )
+
+ if ( Collate.isEnabled() ) then
+ cb_test( Collate, true, "" )
+ else
+ warnlog( "Collate should be enabled if number of copies <> 1" )
+ endif
+
+ NumberOfCopies.setText( "1" )
+
+ if ( Collate.isEnabled() ) then
+ warnlog( "<Collate> should not be enabled for just one copy" )
+ endif
+
+ printlog( "Properties/Details" )
+ Details.click() ' open
+ Details.click() ' close
+
+ if ( gPlatGroup = "unx" and lcase( gPlatform ) <> "osx" ) then
+ Properties.click()
+ kontext "TabSPAPaper"
+ if ( TabSPAPaper.exists( 2 ) ) then
+ TabSPAPaper.close()
+ else
+ warnlog( "Printer properties did not open." )
+ endif
+ else
+ printlog( "Skipping printer properties on Windows and MacOS X (no SPAdmin)" )
+ endif
+
+ kontext "TabPrintGeneral"
+ printlog( "General settings on the Tab-Page" )
+
+ select case( gApplication )
+ case "WRITER", "HTML", "MASTERDOCUMENT"
+
+ lb_test( PrintNotes, 4, 1, "" )
+
+ if ( NOT AllPages.isChecked() ) then
+ warnlog( MSG1 & "<All pages> should be checked" )
+ endif
+
+ if ( Pages.isEnabled() ) then
+ Pages.check()
+ PageRange.setText( "1-5,7" )
+ else
+ warnlog( "Pages setting disabled" )
+ endif
+
+ 'Selection.check()
+ 'AllPages.check()
+
+ case "CALC"
+
+ printlog( "Print ranges" )
+ if ( NOT SelectedSheets.isChecked() ) then
+ warnlog( MSG1 & "<Selected sheets> should be selected" )
+ endif
+
+ AllSheets.check()
+ SelectedSheets.check()
+ SelectedCells.check()
+
+ if ( NOT PrintAllPages.isChecked() ) then
+ warnlog( MSG1 & "<Thereof print all pages> should be selected" )
+ endif
+
+ PrintPages.check()
+ PageRange.setText( "1-5,8" )
+ PrintAllPages.check()
+
+ case "IMPRESS", "DRAW"
+
+ printlog( "Print ranges" )
+ if ( NOT AllSlides.isChecked() ) then
+ warnlog( MSG1 & "<All slides> should be selected" )
+ endif
+
+ Slides.check()
+ PageRange.setText( "1-6,9" )
+
+ Selection.check()
+
+
+ if ( gApplication = "IMPRESS" ) then
+
+ printlog( "General print options/layout (IMPRESS only)" )
+
+ lb_test( PartsToPrint, 4, 1, "" )
+
+ if ( SlidesPerPage.isEnabled() ) then
+ warnlog( "<Slides per page> should only be enabled for Handouts" )
+ endif
+
+ if ( ArrangeSlides.isEnabled() ) then
+ warnlog( "<Ararange slides> should only be enabled for Handouts" )
+ endif
+
+ PartsToPrint.select( 2 ) ' Should be "Handouts" to enable further controls
+
+ if ( NOT SlidesPerPage.isEnabled() ) then
+ warnlog( "<Slides per Page> should be enabled for Handouts" )
+ endif
+
+ if ( NOT ArrangeSlides.isEnabled() ) then
+ warnlog( "<Arrange slides> should be enabled for Handouts" )
+ endif
+
+ lb_test( SlidesPerPage, 6, 0, "" )
+ lb_test( ArrangeSlides, 2, 1, "" )
+
+ endif
+
+
+ case "MATH"
+
+ printlog( "Math does not have any special options on this tabpage" )
+
+ case default
+ warnlog( "Invalid gApplication: " & gApplication )
+ end select
+
+ kontext "Printing"
+ printlog( "Close print dialog" )
+ Printing.cancel()
+
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
+
+ printlog( "Close document" )
+ hDestroyDocument()
+
+endcase
+
+'*******************************************************************************
+
+testcase tPrintApplication()
+
+ printlog( "Application specific printing options - Application tabpage" )
+
+ printlog( "Open new document" )
+ hCreateDocument()
+
+ printlog( "Open printing dialog" )
+ FilePrint
+
+ kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+
+ PrintingTabControl.setPage( TabApplication )
+
+ kontext "TabApplication"
+ call DialogTest( TabApplication )
+
+ printlog( "Check defaults, modify and reset controls" )
+ select case( gApplication )
+ case "WRITER", "HTML", "MASTERDOCUMENT"
+
+ cb_test( PrintPageBackground, true, "" )
+ 'cb_test( PrintGraphicsAndDiagrams, true, "" )
+ cb_test( PrintPicturesAndObjects, true, "" )
+ cb_test( PrintTextInBlack, false, "" )
+ cb_test( PrintBlankPages, true, "" )
+
+ if ( gApplication <> "HTML" ) then
+ cb_test( PrintHiddenText, false, "" )
+ cb_test( PrintTextPlaceholder, false, "" )
+ endif
+
+ case "CALC"
+
+ cb_test( IncludeEmptyPages, false, "" )
+
+ case "IMPRESS", "DRAW"
+
+ cb_test( SlideName, false, "" )
+ cb_test( DateAndTime, false, "" )
+ if ( gApplication = "IMPRESS" ) then
+ cb_test( HiddenPages, false, "" )
+ endif
+
+ printlog( "Color options" )
+ if ( NOT OriginalColors.isChecked() ) then
+ warnlog( MSG1 & "<Original colors> should be checked" )
+ endif
+
+ GrayScale.check()
+ BlackAndWhite.check()
+
+ printlog( "Scaling options" )
+ if ( NOT OriginalSize.isChecked() ) then
+ warnlog( MSG1 & "<Original size> should be checked" )
+ endif
+
+ FitToPage.check()
+ MultiplePages.check()
+ TilePaper.check()
+
+ case "MATH"
+
+ cb_test( TitleRow, true, "" )
+ cb_test( FormulaText, true, "" )
+ cb_test( Borders, true, "" )
+
+ if ( NOT OriginalSizeMath.isChecked() ) then
+ warnlog( MSG1 & "<Original size> should be selected" )
+ endif
+
+ FitToPageMath.check()
+ Scaling.check()
+ ScalingFactor.setText( "1000" )
+
+ case default
+
+ warnlog( "Invalid gApplication: " & gApplication )
+
+ end select
+
+ kontext "Printing"
+ printlog( "Close print dialog" )
+ Printing.cancel()
+
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
+
+ printlog( "Close document" )
+ hDestroyDocument()
+
+endcase
+
+'*******************************************************************************
+
+testcase tPrintLayout()
+
+ printlog( "Layout printing options - Layout tabpage" )
+
+ printlog( "Open new document" )
+ hCreateDocument()
+
+ printlog( "Open printing dialog" )
+ FilePrint
+
+ kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+
+ ' Math does not have a layout page as it does not have any layout options
+ if ( gApplication <> "MATH" ) then
+
+ PrintingTabControl.setPage( TabLayout )
+
+ kontext "TabLayout"
+ call DialogTest( TabLayout )
+
+ printlog( "Controls common for (almost) all applications" )
+ if ( gApplication <> "CALC" ) then
+ if ( NOT PagesPerSheet.isChecked()) then
+ warnlog( MSG1 & "<Pages per sheet> should be selected" )
+ endif
+
+ lb_test( NumberOfPages, 7, 1, "" )
+ NumberOfPages.select( 7 )
+
+ if ( NumberOfColumns.getText() <> "1" ) then
+ warnlog( MSG1 & "<Pages> has incorrect default: " & NumberOfColumns.getText() )
+ endif
+
+ if ( NumberOfRows.getText() <> "1" ) then
+ warnlog( MSG1 & "<by> has incorrect default: " & NumberOfRows.getText() )
+ endif
+
+ NumberOfColumns.typeKeys( "<UP>" )
+ NumberOfRows.typeKeys( "<UP>" )
+ DistanceBetweenPages.typeKeys( "<UP>" )
+ MarginToSheetBorder.typeKeys( "<UP>" )
+
+ lb_test( PaperOrientation, 3, 1, "" )
+ else
+ if ( PagesPerSheet.isVisible() ) then
+ warnlog( "<Pages per Sheet> should not be visible for spreadsheet documents" )
+ endif
+ endif
+
+ lb_test( PrintOrder, 2, 1, "" )
+ cb_test( BorderAroundPages, false, "" )
+
+ select case( gApplication )
+ case "WRITER", "HTML", "MASTERDOCUMENT"
+
+ 'if ( NOT PrintBrochureRTL.isEnabled() ) then
+ ' warnlog( "<Brochure> listbox should be enabled" )
+ 'endif
+
+ Brochure.check()
+
+ 'lb_test( PrintBrochureRTL, 2, 1, "#i105265#" )
+
+ case "CALC"
+
+ printlog( "Calc does not have any options in this section" )
+
+ case "IMPRESS", "DRAW"
+
+ if ( BrochurePageSides.isEnabled() ) then
+ warnlog( "<Page sides> listbox should be disabled" )
+ endif
+ Brochure.check()
+ lb_test( BrochurePageSides, 3, 1, "" )
+
+ case default
+
+ warnlog( "Invalid gApplication: " & gApplication )
+
+ end select
+
+ else ' What we do if gApplication = MATH
+ try
+ PrintingTabControl.setPage( TabLayout )
+ warnlog( "Math should not have a layout page as no layout options exist" )
+ catch
+ printlog( "Math has no layout page. Good." )
+ endcatch
+ endif
+
+ kontext "Printing"
+ printlog( "Close print dialog" )
+ Printing.cancel()
+
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
+
+ printlog( "Close document" )
+ hDestroyDocument()
+
+endcase
+
+'*******************************************************************************
+
+testcase tPrintOptions()
+
+ printlog( "Extended printing options - Options tabpage" )
+
+ printlog( "Open new document" )
+ hCreateDocument()
+
+ printlog( "Open printing dialog" )
+ FilePrint
+
+ kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+
+ PrintingTabControl.setPage( TabOptions )
+
+ kontext "TabOptions"
+ call DialogTest( TabOptions )
+
+ printlog( "Controls common for all applications" )
+ cb_test( PrintToFile, false, "" )
+ cb_test( PrintAsSingleJobs, false, "" )
+ cb_test( PrintReverse, false, "" )
+
+ printlog( "Application specific controls" )
+ select case( gApplication )
+ case "WRITER", "HTML", "MASTERDOCUMENT", "IMPRESS", "DRAW"
+
+ cb_test( PaperTrayFromPrefs, false, "" )
+
+ case "CALC", "MATH"
+
+ printlog( "Calc does not have any program specific options." )
+
+ case default
+
+ warnlog( "Invalid gApplication: " & gApplication )
+
+ end select
+
+ kontext "Printing"
+ printlog( "Close print dialog" )
+ Printing.cancel()
+
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
+
+ printlog( "Close document" )
+ hDestroyDocument()
+
+endcase
+
diff --git a/testautomation/global/tools/includes/optional/t_control_objects.inc b/testautomation/global/tools/includes/optional/t_control_objects.inc
index 79b28ece9214..ea49aca7bd61 100755
--- a/testautomation/global/tools/includes/optional/t_control_objects.inc
+++ b/testautomation/global/tools/includes/optional/t_control_objects.inc
@@ -35,93 +35,102 @@
'*
'* short description : Functions to manipulate controls by accessing them as objects
'*
-'*******************************************************************************
-'**
-' #0 checkRadioButtons ' check a group of RBs where the sel. RB is given by number
-' #0 checkRadioButton ' check a singe RB where the state is specified directly
-' #0 checkCheckbox ' check a single checkbox
-' #0 setCheckBox ' sets checkbox to status provided in reference file
-' #0 checkComboBox ' compares an index to one provided in a reference-file
-' #0 setComboBox ' selects an index provided by a reference file
-' #0 checkListBox ' compares an index to one provided in a reference-file
-' #0 setListBox ' selects an index provided by a reference file
-' #0 checkListItem ' check that a listitem is correct
-' #1 hSetControlValue ' Change the value of a EntryField (failsafe)
-'**
'\******************************************************************************
-function checkRadioButtons( _file as string , sKey as string , control1 as object , control2 as object , optional control3 as object , optional control4 as object ) as integer
-
- '///<h3>EXPERIMENTAL: Get/Set function for some control types</h3>
- '///<i>This is a function that allows to change the state/content of a
- '///+ control via a configuration file. This function is experimental
- '///+ and should not be used.<br>
- '///+ This function checks if the correct radiobutton of a group is selected.
- '///+ at least two radiobuttons must be provided, the third and fouth are optional.
- '///+ The value for sKey in the reference file must be of type integer</i><br>
-
- dim _sItem as string
- dim _iItem as integer
-
- ' lowercase sKey for comparision
- sKey = lcase( sKey )
-
- ' get the reference value for sKey as string
- _sItem = hGetFileData( _file , sKey )
+private const MSG1 = "Incorrect default setting: "
+
+'*******************************************************************************
+
+function cb_test( oControl as object, def_state as string, issueid as string ) as boolean
+
+ ' Small helper that prints a warnlog if a checkbox does not have the correct
+ ' default setting (checked -> def_state = TRUE). You can supply an issue id
+ ' which will be printed to the log. no parameter is optional, issueid can
+ ' be an empty string.
+
+ ' oControl: The checkbox itself
+ ' def_state: Default state (checked or unchecked)
+ ' issueid: Issue id as string "#i123456#" for QUASTe
+
+ dim con_state as boolean : con_state = oControl.isChecked()
+ dim con_name as string : con_name = oControl.name()
- ' cast it to int
- _iItem = val( _sItem )
+ printlog( con_name & " (Checkbox)" )
+ cb_test() = true
+
+ if ( def_state ) then
- ' check which one of the up to four radiobuttons is selected.
- select case _iItem
-
- case 1 :
- if ( control1.isChecked() = true ) then
- checkRadioButtons() = true
- printlog( " * Radiobutton 1 selected: ok" )
- else
- warnlog( "The wrong radiobutton is selected" )
+ if ( NOT con_state ) then
+ warnlog( issueid & " " & MSG1 & con_name & " should be checked" )
+ cb_test() = false
endif
- case 2 :
- if ( control2.isChecked() = true ) then
- checkRadioButtons() = true
- printlog( " * Radiobutton 2 selected: ok" )
- else
- warnlog( "The wrong radiobutton is selected" )
+ oControl.unCheck()
+ oControl.check()
+
+ else
+
+ if ( con_state ) then
+ warnlog( issueid & " " & MSG1 & con_name & " should be unchecked" )
+ cb_test() = false
endif
- case 3 :
- if ( isMissing( control3 ) = false ) then
- if ( control3.isChecked() = true ) then
- checkRadioButtons() = true
- printlog( " * Radiobutton 3 selected: ok" )
- else
- warnlog( "The wrong radiobutton is selected" )
- endif
- else
- warnlog( "referencing to non-existing control." )
- checkRadioButtons() = false
+ oControl.check()
+ oControl.unCheck()
+
+ endif
+
+end function
+
+'*******************************************************************************
+
+function lb_test( oControl as object, items as integer, preset as integer, issueid as string ) as boolean
+
+ ' Do some basic testing on listboxes
+ ' - verify that the number of entries is correct
+ ' - verify that the default selection is correct
+ ' - select each item and restore default
+
+ ' oControl: The Listbox as object
+ ' items: Number of items in the list
+ ' preset: Item which is selected by default (usually 1), skip with 0
+ ' issueid: Issue id as string "#i123456#" for QUASTe
+
+ dim con_name as string : con_name = oControl.name()
+ dim con_items as integer : con_items = oControl.getItemCount()
+ dim con_preset as integer : con_preset = oControl.getSelIndex()
+ dim con_iterator as integer
+
+ printlog( con_name & " (Listbox)" )
+ if ( oControl.isEnabled() ) then
+ lb_test() = true
+
+ if ( con_items <> items ) then
+ warnlog( issueid & " Incorrect itemcount in listbox: " & con_name )
+ printlog( "Expected: " & items )
+ printlog( "Found...: " & con_items )
+ lb_test() = false
endif
- case 4 :
- if ( isMissing( control4 ) = false ) then
- if ( control4.isChecked() = true ) then
- checkRadioButtons() = true
- printlog( " * Radiobutton 4 selected: ok" )
- else
- warnlog( "The wrong radiobutton is selected" )
+ if ( preset > 0 ) then
+ if ( con_preset <> preset ) then
+ warnlog( issueid & " Incorrect default setting (index): " & con_name )
+ printlog( "Expected: " & preset )
+ printlog( "Found...: " & con_preset )
+ lb_test() = false
endif
- else
- warnlog( "referencing to non-existing control." )
- checkRadioButtons() = false
endif
- case else
- warnlog( "Maximum of four connected radiobuttons allowed." )
- checkRadioButtons() = false
- end select
-
+ for con_iterator = 1 to items
+ oControl.select( con_iterator )
+ next con_iterator
+
+ if ( preset > 0 ) then oControl.select( preset )
+ else
+ printlog( "The control is disabled" & con_name )
+ lb_test() = false
+ endif
+
end function
'*******************************************************************************
diff --git a/testautomation/global/tools/includes/optional/t_docfuncs.inc b/testautomation/global/tools/includes/optional/t_docfuncs.inc
index 704d10fea8ba..8a9c143f7179 100755
--- a/testautomation/global/tools/includes/optional/t_docfuncs.inc
+++ b/testautomation/global/tools/includes/optional/t_docfuncs.inc
@@ -95,22 +95,19 @@ end function
function hCloseNavigator() as boolean
'///<h3>Function to close the navigator</h3>
- '///<i>Starting point: Any document</i>
- '///<ul>
const CFN = "global::tools::includes::optional::t_docfuncs.inc::hCloseNavigator::"
if ( VERBOSE ) then printlog( CFN & "Enter" )
- '///+<li>close the navigator if found</li>
Kontext "Navigator"
if ( Navigator.Exists() ) then
Navigator.Close()
+ Navigator.notExists( 2 )
if ( VERBOSE ) then printlog( CFN & "Closed Navigator" )
else
if ( VERBOSE ) then printlog( CFN & "Navigator not present" )
endif
- '///+<li>verify that the navigator is indeed closed, return true on success</li>
Kontext "Navigator"
if ( Navigator.exists() ) then
hCloseNavigator() = false
@@ -120,7 +117,6 @@ function hCloseNavigator() as boolean
endif
if ( VERBOSE ) then printlog( CFN & "Exit" )
- '///</ul>
end function
@@ -302,36 +298,16 @@ end function
function hCreateDocument() as boolean
- '///<h3>Create anew document, extends hNewDocument()</h3>
- '///<i>Starting point: Any document</i><br>
- '///<i>Note: When calling this function with gApplication "BACKGROUND" the
- '///+ function will actually close one document to get to the backing window</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Nothing, valid gApplication must be set</li>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorstatus (boolean)</li>
- '///<ul>
- '///+<li>TRUE if a new document was created successfully</li>
- '///+<li>FALSE if anything went wrong</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
-
+ '///<h3>Create anew document, extends hNewDocument() by providing a returnvalue</h3>
+ ' TRUE = New document created, FALSE = Failed to create a new document '
const CFN = "global::tools::includes::optional::t_docfuncs.inc::hCreateDocument::"
dim iDocCountBefore as integer
dim iDocCountAfter as integer
- '///+<li>Retrieve the number of open documents</li>
iDocCountBefore = getDocumentCount
if ( VERBOSE ) then printlog( CFN & "Number of open documents before: " & iDocCountBefore )
- '///+<li>Special treatment if gApplication = BACKGROUND (virtual gApplication)</li>
if ( ucase( gApplication ) = "BACKGROUND" ) then
do while( getDocumentCount > 0 )
hCloseDocument()
@@ -339,13 +315,8 @@ function hCreateDocument() as boolean
hCreateDocument() = true
else
- '///+<li>Open a new document using hNewDocument()</li>
call hNewDocument()
-
- '///+<li>Retrieve the number of open documents</li>
iDocCountAfter = getDocumentCount()
-
- '///+<li>Verify that there is exactly one more document than before</li>
if ( iDocCountAfter = ( iDocCountBefore + 1 ) ) then
hCreateDocument() = true
else
@@ -484,9 +455,7 @@ function hInitSingleDoc() as boolean
'///<u>Description:</u>
'///<ul>
'///+<li>Close all documents until we are on the backing window</li>
- do while ( getDocumentCount > 0 )
- call hCloseDocument()
- loop
+ hFileCloseAll()
'///+<li>Save the previous gApplication</li>
cOldApplication = gApplication
@@ -539,9 +508,7 @@ function hInitBackingMode() as boolean
'///<u>Description:</u>
'///<ul>
'///+<li>Close all documents until we are on the backing window</li>
- do while ( getDocumentCount > 0 )
- hCloseDocument()
- loop
+ hFileCloseAll()
'///+<li>verify that we do not have any open documents left (redundant check)</li>
if ( getDocumentCount = 0 ) then
diff --git a/testautomation/global/tools/includes/required/t_tools2.inc b/testautomation/global/tools/includes/required/t_tools2.inc
index 731bea120afc..f5fa7bb01cf7 100755
--- a/testautomation/global/tools/includes/required/t_tools2.inc
+++ b/testautomation/global/tools/includes/required/t_tools2.inc
@@ -763,7 +763,7 @@ function fGetProductName as string
'Using the bootstraprc/bootstrap.ini file in ../program dir
'to get the value of 'ProductKey'
- if gPlatform = lcase("osx") then
+ if ( lcase( gPlatform ) = "osx" ) then
sfile = convertPath(gNetzOfficePath + "MacOS/bootstrap")
else
sfile = convertPath(gNetzOfficePath + "program/bootstrap")
@@ -826,7 +826,7 @@ function FindBuildID as String
' bootstrap.ini/rc part
if (gSamePC = TRUE) then
' since CWS nativefixer18 the information from bootstrap file is spread across bootstrap and version
- if gPlatform = lcase("osx") then
+ if ( lcase( gPlatform ) = "osx" ) then
sPlatformProgramPath = "MacOS"
else
sPlatformProgramPath = "program"
diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win
index 2917c20d27d6..e7af03c506e6 100755
--- a/testautomation/global/win/dial_d_h.win
+++ b/testautomation/global/win/dial_d_h.win
@@ -214,8 +214,6 @@ AusDruckereinstellung sd:CheckBox:TP_PRINT_OPTIONS:CBX_PAPERBIN
*DruckerZusaetzeWriter HID_OPTPRINT_PAGE
Grafiken sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF
-Tabellen sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB
-Zeichnungen sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW
Kontrollfelder sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD
Hintergrund sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND
HiddenText sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT
@@ -224,7 +222,6 @@ RightToLeft sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL
SchwarzDrucken sw:CheckBox:TP_OPTPRINT_PAGE:CB_BLACK_FONT
LinkeSeiten sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP
RechteSeiten sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP
-Umgekehrt sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE
Prospekt sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT
Keine sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO
NurNotizen sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY
diff --git a/testautomation/global/win/edia_p_s.win b/testautomation/global/win/edia_p_s.win
index 0fd52589b6b5..a95316d03619 100755..100644
--- a/testautomation/global/win/edia_p_s.win
+++ b/testautomation/global/win/edia_p_s.win
@@ -71,6 +71,101 @@ Currency HID_DLGDEPOT_LSTMARKETS
OKButton HID_DLGDEPOT_0_CMDGOON_HISTORY
CancelButton HID_DLGDEPOT_0_CMDCANCEL_HISTORY
+*Printing .HelpId:vcl:PrintDialog:Dialog
+PreviewWindow .HelpId:vcl:PrintDialog:Preview
+PreviewPageNumber .HelpId:vcl:PrintDialog:PageEdit
+ScrollBackward .HelpId:vcl:PrintDialog:BackwardBtn
+ScrollForward .HelpId:vcl:PrintDialog:ForwardBtn
+Print .HelpId:vcl:PrintDialog:OK
+Cancel .HelpId:vcl:PrintDialog:Cancel
+
+PrintingTabControl .HelpId:vcl:PrintDialog:TabPages
+TabPrintGeneral .HelpId:vcl:PrintDialog:JobPage
+TabApplication .HelpId:vcl:PrintDialog:TabPage:10
+TabLayout .HelpId:vcl:PrintDialog:NUpPage
+TabOptions .HelpId:vcl:PrintDialog:OptPage
+
+*TabPrintGeneral .HelpId:vcl:PrintDialog:JobPage
+PrinterList .HelpId:vcl:PrintDialog:JobPage:PrinterList
+NumberOfCopies .HelpId:vcl:PrintDialog:JobPage:Copies
+Collate .HelpId:vcl:PrintDialog:JobPage:Collate
+PrintNotes .HelpId:vcl:PrintDialog:PrintAnnotationMode:ListBox
+AllPages .HelpId:vcl:PrintDialog:PrintContent:RadioButton:0
+AllSlides .HelpId:vcl:PrintDialog:PrintContent:RadioButton:0
+AllSheets .HelpId:vcl:PrintDialog:PrintContent:RadioButton:0
+Pages .HelpId:vcl:PrintDialog:PrintContent:RadioButton:1
+Slides .HelpId:vcl:PrintDialog:PrintContent:RadioButton:1
+SelectedSheets .HelpId:vcl:PrintDialog:PrintContent:RadioButton:1
+PrintAllPages .HelpId:vcl:PrintDialog:PrintRange:RadioButton:0
+PrintPages .HelpId:vcl:PrintDialog:PrintRange:RadioButton:1
+PageRange .HelpId:vcl:PrintDialog:PageRange:Edit
+Selection .HelpId:vcl:PrintDialog:PrintContent:RadioButton:2
+SelectedCells .HelpId:vcl:PrintDialog:PrintContent:RadioButton:2
+Details .HelpId:vcl:PrintDialog:JobPage:DetailsBtn
+Properties .HelpId:vcl:PrintDialog:JobPage:Properties
+PageCount .HelpId:vcl:PrintDialog:NumPagesText
+PartsToPrint .HelpId:vcl:PrintDialog:PageContentType:ListBox
+SlidesPerPage .HelpId:vcl:PrintDialog:SlidesPerPage:ListBox
+ArrangeSlides .HelpId:vcl:PrintDialog:SlidesPerPageOrder:ListBox
+
+*TabApplication .HelpId:vcl:PrintDialog:TabPage:10
+PrintPageBackground .HelpId:vcl:PrintDialog:PrintPageBackground:CheckBox
+PrintGraphicsAndDiagrams .HelpId:vcl:PrintDialog:PrintTablesGraphicsAndDiagrams:CheckBox
+PrintPicturesAndObjects .HelpId:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox
+PrintHiddenText .HelpId:vcl:PrintDialog:PrintHiddenText:CheckBox
+PrintTextPlaceholder .HelpId:vcl:PrintDialog:PrintTextPlaceholder:CheckBox
+PrintFormControls .HelpId:vcl:PrintDialog:PrintControls:CheckBox
+PrintTextInBlack .HelpId:vcl:PrintDialog:PrintBlackFonts:CheckBox
+PrintBlankPages .HelpId:vcl:PrintDialog:PrintEmptyPages:CheckBox
+IncludeEmptyPages .HelpId:vcl:PrintDialog:IsIncludeEmptyPages:CheckBox
+SlideName .HelpId:vcl:PrintDialog:IsPrintName:CheckBox
+DateAndTime .HelpId:vcl:PrintDialog:IsPrintDateTime:CheckBox
+HiddenPages .HelpId:vcl:PrintDialog:IsPrintHidden:CheckBox
+TilePaper .HelpId:vcl:PrintDialog:PageOptions:RadioButton:3
+OriginalColors .HelpId:vcl:PrintDialog:Quality:RadioButton:0
+Grayscale .HelpId:vcl:PrintDialog:Quality:RadioButton:1
+BlackAndWhite .HelpId:vcl:PrintDialog:Quality:RadioButton:2
+MultiplePages .HelpId:vcl:PrintDialog:PageOptions:RadioButton:2
+TitleRow .HelpId:vcl:PrintDialog:TitleRow:CheckBox
+FormulaText .HelpId:vcl:PrintDialog:FormulaText:CheckBox
+Borders .HelpId:vcl:PrintDialog:Border:CheckBox
+OriginalSize .HelpId:vcl:PrintDialog:PageOptions:RadioButton:0
+OriginalSizeMath .HelpId:vcl:PrintDialog:PrintFormat:RadioButton:0
+FitToPage .HelpId:vcl:PrintDialog:PageOptions:RadioButton:1
+FitToPageMath .HelpId:vcl:PrintDialog:PrintFormat:RadioButton:1
+Scaling .HelpId:vcl:PrintDialog:PrintFormat:RadioButton:2
+ScalingFactor .HelpId:vcl:PrintDialog:PrintScale:NumericField
+
+*TabLayout .HelpId:vcl:PrintDialog:NUpPage
+PagesPerSheet .HelpId:vcl:PrintDialog:NUpPage:PagesPerSheet
+NumberOfPages .HelpId:vcl:PrintDialog:NUpPage:PagesPerSheetBox
+NumberOfColumns .HelpId:vcl:PrintDialog:NUpPage:ColumnsBox
+NumberOfRows .HelpId:vcl:PrintDialog:NUpPage:RowsBox
+BorderAroundPages .HelpId:vcl:PrintDialog:NUpPage:BorderBox
+Brochure .HelpId:vcl:PrintDialog:NUpPage:Brochure
+DistanceBetweenPages .HelpId:vcl:PrintDialog:NUpPage:PageMarginBox
+MarginToSheetBorder .HelpId:vcl:PrintDialog:NUpPage:SheetMarginBox
+PaperOrientation .HelpId:vcl:PrintDialog:NUpPage:OrientationBox
+PrintOrder .HelpId:vcl:PrintDialog:NUpPage:OrderBox
+IncludePages .HelpId:vcl:PrintDialog:PrintLeftRightPages:ListBox
+PrintBrochureRTL .HelpId:vcl:PrintDialog:PrintProspectRTL:ListBox
+BrochurePageSides .HelpId:vcl:PrintDialog:PrintProspectInclude:ListBox
+
+*TabOptions .HelpId:vcl:PrintDialog:OptPage
+PrintToFile .HelpId:vcl:PrintDialog:OptPage:ToFile
+PrintAsSingleJobs .HelpId:vcl:PrintDialog:OptPage:SingleJobs
+PrintReverse .HelpId:vcl:PrintDialog:OptPage:Reverse
+PaperTrayFromPrefs .HelpId:vcl:PrintDialog:PrintPaperFromSetup:CheckBox
+
+*PurchaseStarOffice HID_LICENSING_DIALOG
+TabPurchase HID_TP_PURCHASE
+getSerialNumber tab:PushButton:TP_PURCHASE:PB_PURCHASE_GET
+TabUnlockStarOffice HID_TP_UNLOCK
+SerialNumberA tab:Edit:TP_UNLOCK:ED_UNLOCK_A
+SerialNumberB tab:Edit:TP_UNLOCK:ED_UNLOCK_B
+SerialNumberC tab:Edit:TP_UNLOCK:ED_UNLOCK_C
+TabSummary HID_TP_SUMMARY
+
*QueryEditWindow HID_CTL_QRYSQLEDIT
*QueryDesignTable HID_CTL_QRYDGNTAB
@@ -456,6 +551,7 @@ PrintButton HID_HELP_TOOLBOXITEM_PRINT
SetBookmarks HID_HELP_TOOLBOXITEM_BOOKMARKS
*SaveScheme HID_OPTIONS_COLORCONFIG_SAVE_SCHEME
+
SchemeName HID_OPTIONS_COLORCONFIG_NAME_SCHEME
*SecurityWarning HID_XMLSECDLG_MACROWARN
diff --git a/testautomation/global/win/sys_dial.win b/testautomation/global/win/sys_dial.win
index aeca03118da6..4cacc4dda5cc 100755
--- a/testautomation/global/win/sys_dial.win
+++ b/testautomation/global/win/sys_dial.win
@@ -1,21 +1,3 @@
-' **** general print-Dialog ( File/Print )
-' ****
-*DruckenDlg svtools:ModalDialog:DLG_SVT_PRNDLG_PRINTDLG
-Drucker svtools:ListBox:DLG_SVT_PRNDLG_PRINTDLG:LB_NAMES
-Eigenschaften svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_PROPERTIES
-AusdruckInDatei svtools:CheckBox:DLG_SVT_PRNDLG_PRINTDLG:CBX_FILEPRINT
-Alles svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_ALL
-Seiten svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_PAGES
-SeitenText svtools:Edit:DLG_SVT_PRNDLG_PRINTDLG:EDT_PAGES
-Auswahl svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTION
-Exemplare svtools:NumericField:DLG_SVT_PRNDLG_PRINTDLG:NUM_COPIES
-Sortieren svtools:CheckBox:DLG_SVT_PRNDLG_PRINTDLG:CBX_COLLATE
-Zusaetze svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_OPTIONS
-EditFaxNo svtools:Edit:DLG_SVT_PRNDLG_PRINTDLG:EDT_FAXNO
-AllSheets svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_ALL_SHEETS
-SelectedSheets svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTED_SHEETS
-SelectedCells svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTED_CELLS
-
' **** general Printersettings-Dialog ( File/Printer settings )
' ****
*DruckerEinrichten svtools:ModalDialog:DLG_SVT_PRNDLG_PRNSETUPDLG
diff --git a/testautomation/global/win/tab_a_d.win b/testautomation/global/win/tab_a_d.win
index 10e2a8b50652..af6d933aefb4 100755
--- a/testautomation/global/win/tab_a_d.win
+++ b/testautomation/global/win/tab_a_d.win
@@ -303,24 +303,20 @@ SchwarzWeiss SD:RADIOBUTTON:TP_PRINT_OPTIONS:RBT_BLACKWHITE
*TabDruckenHTML HID_OPTPRINT_PAGE
Grafiken SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_PGRF
-Tabellen SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_PTAB
Kontrollfelder SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_CTRLFLD
Hintergrund SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_BACKGROUND
SchwarzDrucken SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_BLACK_FONT
-Umgekehrt SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_REVERSE
Prospekt SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_PROSPECT
Keine SW:RADIOBUTTON:TP_OPTPRINT_PAGE:RB_NO
NurNotizen SW:RADIOBUTTON:TP_OPTPRINT_PAGE:RB_ONLY
Dokumentende SW:RADIOBUTTON:TP_OPTPRINT_PAGE:RB_END
Seitenende SW:RADIOBUTTON:TP_OPTPRINT_PAGE:RB_PAGEEND
-EinzelneDruckauftraege sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS
AusDruckereinstellung SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP
+LeereSeitenDrucken sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES
Fax SW:LISTBOX:TP_OPTPRINT_PAGE:LB_FAX
*TabDruckenWriter HID_OPTPRINT_PAGE
Grafiken sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF
-Tabellen sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB
-Zeichnungen sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW
Kontrollfelder sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD
Hintergrund sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND
HiddenText sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT
@@ -329,13 +325,11 @@ RightToLeft sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL
SchwarzDrucken SW:CHECKBOX:TP_OPTPRINT_PAGE:CB_BLACK_FONT
LinkeSeiten sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP
RechteSeiten sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP
-Umgekehrt sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE
Prospekt sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT
Keine sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO
NurNotizen sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY
Dokumentende sw:RadioButton:TP_OPTPRINT_PAGE:RB_END
Seitenende sw:RadioButton:TP_OPTPRINT_PAGE:RB_PAGEEND
-EinzelneDruckauftraege sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS
AusDruckereinstellung sw:CheckBox:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP
LeereSeitenDrucken sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES
Fax sw:ListBox:TP_OPTPRINT_PAGE:LB_FAX
diff --git a/testautomation/graphics/optional/g_print.bas b/testautomation/graphics/optional/g_print.bas
deleted file mode 100755
index 73ec23a9fef6..000000000000
--- a/testautomation/graphics/optional/g_print.bas
+++ /dev/null
@@ -1,64 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: g_print.bas,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:37 $
-'*
-'* 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.
-'*
-'/************************************************************************
-'*
-'* Owner : wolfram.garten@sun.com
-'*
-'* short description : Graphics Function: Print
-'*
-'\******************************************************************
-
-public glLocale (15*20) as string
-
-sub main
- PrintLog "------------------------- g_print test -------------------------"
- Call hStatusIn ( "Graphics","g_print.bas")
-
- use "graphics\tools\id_tools.inc"
- use "graphics\optional\includes\global\g_print.inc"
-
- PrintLog "-------------------------" + gApplication + "-------------------"
- call tFilePrint
-
- gApplication = "DRAW"
- PrintLog "-------------------------" + gApplication + "-------------------"
- call tFilePrint
-
- Call hStatusOut
-end sub
-
-sub LoadIncludeFiles
- use "global\system\includes\master.inc"
- use "global\system\includes\gvariabl.inc"
- gApplication = "IMPRESS"
- Call GetUseFiles
-end sub
diff --git a/testautomation/graphics/optional/includes/global/g_print.inc b/testautomation/graphics/optional/includes/global/g_print.inc
deleted file mode 100755
index 21bad45dc420..000000000000
--- a/testautomation/graphics/optional/includes/global/g_print.inc
+++ /dev/null
@@ -1,164 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: g_print.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
-'*
-'* 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.
-'*
-'/************************************************************************
-'*
-'* Owner : wolfram.garten@sun.com
-'*
-'* short description :
-'*
-'**************************************************************************************
-' #1 tFilePrint
-'\*************************************************************************************
-
-testcase tFilePrint
- Call hNewDocument
-
- printlog "Inserting testtext."
- hTextrahmenErstellen ("This is an automated print test with testtool for GRAPHICS ",90,90,80,10)
- hTextrahmenErstellen ("Version : "+ gVersionsnummer + " / " + gLanguage,80,90,70,10)
- hTextrahmenErstellen ("Date / Time : "+ Date + " / " + Time,70,90,60,10)
- hTextrahmenErstellen ("Machine / User: " + gPCName + " " + gUser,60,90,50,10)
-
- printlog "Opening print Dialog."
- FilePrint
- kontext
- if active.exists(2) then
- active.ok
- qaerrorlog "There is no printer available - please install one on your system!"
- endif
- sleep 2
- Kontext "DruckenDlg"
-
-
- ' Not yet active since this feature is not build into the master: i85355
- ' printlog "Checking options for impress..."
- ' if (gApplication = "IMPRESS") then
- ' if PrintContent.GetSelIndex <> 1 then
- ' warnlog "Not first entry selected!"
- ' else
- ' printlog " First entry selected."
- ' endif
- '
- ' if PrintContent.GetItemCount <> 4 then
- ' warnlog "Entry-number of PrintContent listbox is wrong!"
- ' else
- ' printlog "Entry-number of PrintContent listbox is 4."
- ' endif
- '
- ' PrintContent.Select 2
- ' if SlidesPerPage.IsEnabled then
- ' printlog "SlidesPerPage active."
- ' else
- ' warnlog "SlidesPerPage did not get active!"
- ' endif
- '
- ' VerticalOrder.Check
- ' printlog "Vertical checked."
- ' HorizontalOrder.Check
- ' printlog "Horizontal checked again."
- '
- ' else
- ' printlog "This is not impress, so no further print content testing."
- ' endif
-
- printlog "Opening Options dialog."
- Zusaetze.Click
- sleep 1
- Kontext "DruckerZusaetzeDraw"
-
- printlog "Checking brochure printing."
- if Prospekt.IsChecked then
- warnlog "Somebody forgot to uncheck the prospect printing!"
- Standard.Check
- else
- printlog "Brochure printing is checked."
- endif
-
-
- Seitenname.Check
- Datum.Check
- Zeit.Check
- AusgeblendeteSeiten.Check
- SeitengroesseAnpassen.Check
- AusDruckereinstellung.Check
-
- DruckerZusaetzeDraw.OK
- Kontext "DruckenDlg"
- Zusaetze.Click
- sleep 2
- Kontext "DruckerZusaetzeDraw"
- if NOT Seitenname.IsChecked Then
- warnlog " - Page name not checked"
- else
- printlog "Page name checked."
- endif
-
- if NOT Datum.IsChecked Then
- warnlog " - Date not checked"
- else
- printlog "Date is checked."
- endif
-
- if NOT Zeit.IsChecked Then
- warnlog " - Time not checked"
- else
- printlog "Time is checked."
- endif
-
- if NOT AusgeblendeteSeiten.IsChecked Then
- warnlog " - Hidden pages not checked"
- else
- printlog "Hidden pages checked."
- endif
-
- if NOT SeitengroesseAnpassen.IsChecked Then
- warnlog " - Fit to page not checked"
- else
- printlog "Fit to page checked."
- endif
-
- if NOT AusDruckereinstellung.IsChecked Then
- warnlog " - Paper tray from printer settings not checked"
- else
- printlog "Paper tray checked."
- endif
-
- AusDruckereinstellung.UnCheck
- Standard.Check
- DruckerZusaetzeDraw.OK
- Kontext "DruckenDlg"
- DruckenDlg.Cancel
- Sleep 5
-
- Call hCloseDocument
-endcase
-
diff --git a/testautomation/graphics/optional/includes/global/id_001.inc b/testautomation/graphics/optional/includes/global/id_001.inc
index a92daf05c2e2..fabc078af92b 100755
--- a/testautomation/graphics/optional/includes/global/id_001.inc
+++ b/testautomation/graphics/optional/includes/global/id_001.inc
@@ -41,7 +41,6 @@
' #1 tiFileVersion (sFileIn as string)
' #1 tiFilePassword
' #1 tiFileTemplates
-' #1 tiFilePrint
' #1 tmFileNewFromTemplate
' #1 tmFileOpen
' #1 tmFileClose
@@ -471,30 +470,6 @@ testcase tiFileTemplates
Call hCloseDocument
endcase
-testcase tiFilePrint
- Call hNewDocument
- FilePrint
- WaitSlot (1000)
- kontext
- if active.exists(5) then
- active.ok
- qaerrorlog "There is no printer available - please install one on your system!"
- end if
- WaitSlot (2000)
- Kontext "DruckenDlg"
- Call DialogTest (DruckenDlg)
- WaitSlot (2000)
- Zusaetze.Click
-
- Kontext "DruckerZusaetzeDraw"
- Call DialogTest (DruckerZusaetzeDraw)
- DruckerZusaetzeDraw.Cancel
- Kontext "DruckenDlg"
- DruckenDlg.Cancel
- WaitSlot (2000)
- Call hCloseDocument
-endcase
-
'-----------------------------------------------------------
'******************* M A T H dito *************************
diff --git a/testautomation/graphics/optional/includes/global/id_009.inc b/testautomation/graphics/optional/includes/global/id_009.inc
index bfbaf6861c36..bb005deb996c 100755
--- a/testautomation/graphics/optional/includes/global/id_009.inc
+++ b/testautomation/graphics/optional/includes/global/id_009.inc
@@ -165,9 +165,9 @@ testcase tmHelpContents
Active.Ok
end if
- kontext "DruckenDLG"
- if DruckenDLG.Exists then
- DruckenDLG.cancel
+ kontext "Printing"
+ if Printing.Exists( 2 ) then
+ Printing.cancel
else
warnlog "the Print-Dialogue didnt appear."
end if
diff --git a/testautomation/graphics/required/d_updt.bas b/testautomation/graphics/required/d_updt.bas
index 66ca92a6b190..3511bf199989 100755
--- a/testautomation/graphics/required/d_updt.bas
+++ b/testautomation/graphics/required/d_updt.bas
@@ -75,6 +75,7 @@ sub main
call id_008
call id_009
call id_001
+ Call g_printing
Call tFileExportAsPDF
Call tExportAsPDFButton
@@ -88,6 +89,9 @@ sub LoadIncludeFiles
use "global\required\includes\g_option.inc"
use "global\required\includes\g_customize.inc"
use "global\required\includes\g_001.inc"
+ use "global\required\includes\g_printing.inc"
+ use "global\tools\includes\optional\t_docfuncs.inc"
+ use "global\tools\includes\optional\t_control_objects.inc"
Call GetUseFiles
gApplication = "DRAW"
end sub
diff --git a/testautomation/graphics/required/i_updt_2.bas b/testautomation/graphics/required/i_updt_2.bas
index c0da23879d21..83dfc5047db0 100755
--- a/testautomation/graphics/required/i_updt_2.bas
+++ b/testautomation/graphics/required/i_updt_2.bas
@@ -65,6 +65,7 @@ sub main
call id_009
call id_007
call id_011
+ call g_printing
Call hStatusOut
end sub
@@ -75,6 +76,10 @@ sub LoadIncludeFiles
use "global\system\includes\gvariabl.inc"
use "global\required\includes\g_001.inc"
use "global\required\includes\g_009.inc"
+ use "global\required\includes\g_printing.inc"
+ use "global\tools\includes\optional\t_docfuncs.inc"
+ use "global\tools\includes\optional\t_control_objects.inc"
+
gApplication = "IMPRESS"
Call GetUseFiles()
end sub
diff --git a/testautomation/graphics/required/includes/global/id_001.inc b/testautomation/graphics/required/includes/global/id_001.inc
index 995de9f2b1e1..e84afee0de56 100755
--- a/testautomation/graphics/required/includes/global/id_001.inc
+++ b/testautomation/graphics/required/includes/global/id_001.inc
@@ -41,7 +41,6 @@
' #1 tiFileVersion (sFileIn as string)
' #1 tiFilePassword
' #1 tiFileTemplates
-' #1 tiFilePrint
' #1 tmFileNewFromTemplate
' #1 tmFileOpen
' #1 tmFileClose
@@ -537,38 +536,6 @@ endcase 'tiFileTemplates
'-------------------------------------------------------------------------------
-testcase tiFilePrint
- Call hNewDocument
-printlog " open application"
-printlog " File->Print"
- FilePrint
- WaitSlot (1000)
- kontext
- if active.exists(5) then
- active.ok
- qaerrorlog "There is no printer available - please install one on your system!"
- end if
- WaitSlot (2000)
- Kontext "DruckenDlg"
- Call DialogTest (DruckenDlg)
- printlog " click 'options'"
- WaitSlot (2000)
- Zusaetze.Click
-
- Kontext "DruckerZusaetzeDraw"
- Call DialogTest (DruckerZusaetzeDraw)
- DruckerZusaetzeDraw.Cancel
- printlog " close options dialog with 'cancel'"
- Kontext "DruckenDlg"
- printlog " close print dialog with 'cancel'"
- DruckenDlg.Cancel
- WaitSlot (2000)
-printlog " close application"
- Call hCloseDocument
-endcase 'tiFilePrint
-
-'-------------------------------------------------------------------------------
-
testcase tmFileNewFromTemplate
Call hNewDocument
FileNewFromTemplate
diff --git a/testautomation/graphics/required/includes/global/id_009.inc b/testautomation/graphics/required/includes/global/id_009.inc
index 959b6d5ebfd9..24e7e712363f 100755
--- a/testautomation/graphics/required/includes/global/id_009.inc
+++ b/testautomation/graphics/required/includes/global/id_009.inc
@@ -194,10 +194,10 @@ testcase tmHelpContents
Active.Ok
end if
- kontext "DruckenDLG"
- if DruckenDLG.Exists then
+ kontext "Printing"
+ if Printing.Exists( 2 ) then
'/// In the dialog 'Print' press the button 'Cancel' ///'
- DruckenDLG.cancel
+ Printing.cancel
else
warnlog "the Print-Dialogue didnt appear."
end if
diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc
index d0335997d2f4..78a71da95775 100755
--- a/testautomation/graphics/tools/id_tools_2.inc
+++ b/testautomation/graphics/tools/id_tools_2.inc
@@ -730,7 +730,6 @@ sub id_001
call tiFileVersion
printlog " File->Send not possible to test, because extrnal prg get's called!"
call tiFileTemplates
- call tiFilePrint
' Call tiFileNew instead i call:
call tmFileNewFromTemplate
call tmFileOpen
diff --git a/testautomation/math/optional/includes/m_101_.inc b/testautomation/math/optional/includes/m_101_.inc
index 98b72b99b734..4139e688f1f5 100755
--- a/testautomation/math/optional/includes/m_101_.inc
+++ b/testautomation/math/optional/includes/m_101_.inc
@@ -550,20 +550,25 @@ testcase tFilePrint
'/// print file ///'
try
Fileprint
- sleep 2
kontext
if active.exists(2) then
active.ok
qaerrorlog "There is no printer available - please install one on your system!"
- sleep 2
- Kontext "DruckenDlg"
- DruckenDlg.cancel
+ Kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+ Printing.cancel
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
else
- sleep 2
- Kontext "DruckenDlg"
- DruckenDlg.Ok
+ Kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+ Printing.ok
+ else
+ warnlog( "Printing dialog did not open" )
+ endif
endif
- sleep 2
+
kontext
if active.exists(2) then
active.ok
diff --git a/testautomation/math/required/includes/m_001_.inc b/testautomation/math/required/includes/m_001_.inc
index fd7905ef382a..452a3bfd0106 100755
--- a/testautomation/math/required/includes/m_001_.inc
+++ b/testautomation/math/required/includes/m_001_.inc
@@ -61,7 +61,6 @@ sub M_001_
Call tmFileVersions
Call tmExportAsPDF
Call tmFileProperties
- Call tmFilePrint
Call tmFilePrinterSetting
Call tmFilePassword
end sub
@@ -380,27 +379,6 @@ testcase tmFileVersions
if app.Dir (Datei) <> "" then app.kill Datei
endcase
-testcase tmFilePrint
-'/// open application ///'
- Call hNewDocument
- sleep 3
- '/// File->Print ///'
- FilePrint
- kontext
- if active.exists(2) then
- active.ok
- qaerrorlog "There is no printer available - please install one on your system!"
- endif
- sleep 2
- Kontext "DruckenDlg"
- Call DialogTest (DruckenDlg)
- '/// cancel dialog 'Print' ///'
- DruckenDlg.Cancel
- sleep 2
-'/// close application ///'
- Call hCloseDocument
-endcase
-
'-----------------------------------------------------------
'******************* I D dito *************************
'-----------------------------------------------------------
diff --git a/testautomation/math/required/includes/m_007_.inc b/testautomation/math/required/includes/m_007_.inc
index 64b5fda9fb3e..606ab22cd8f4 100755
--- a/testautomation/math/required/includes/m_007_.inc
+++ b/testautomation/math/required/includes/m_007_.inc
@@ -204,9 +204,9 @@ testcase tmHelpContents
qaerrorlog "There is no printer available - please install one on your system!"
endif
sleep 2
- kontext "DruckenDLG"
+ kontext "Printing"
'/// On the dialog 'Print' press the button 'Cancel' ///'
- DruckenDLG.cancel
+ Printing.cancel
Kontext "TB_Help"
'///+ click on button 'Add to Bookmarks ...' ///'
SetBookmarks.Click
diff --git a/testautomation/math/required/m_updt.bas b/testautomation/math/required/m_updt.bas
index 61b517b1ba65..85d7e730518a 100755
--- a/testautomation/math/required/m_updt.bas
+++ b/testautomation/math/required/m_updt.bas
@@ -64,6 +64,7 @@ sub main
Call m_020_ ' toolbars
Call M_010_ ' Operators
Call M_001_ ' File Menu
+ Call g_printing()
Call tFileExportAsPDF
Call hStatusOut
@@ -76,7 +77,11 @@ sub LoadIncludeFiles
use "global\required\includes\g_option.inc"
use "global\required\includes\g_customize.inc"
use "global\required\includes\g_001.inc"
+ use "global\required\includes\g_009.inc"
+ use "global\required\includes\g_printing.inc"
use "global\tools\includes\optional\t_ui_filters.inc" ' for gMathFilter in m_001_.inc
+ use "global\tools\includes\optional\t_docfuncs.inc"
+ use "global\tools\includes\optional\t_control_objects.inc"
gApplication = "MATH"
Call GetUseFiles
end sub
diff --git a/testautomation/spreadsheet/optional/includes/printrange/c_printrange.inc b/testautomation/spreadsheet/optional/includes/printrange/c_printrange.inc
index 3d4ceb3138aa..fa13497cea4a 100755
--- a/testautomation/spreadsheet/optional/includes/printrange/c_printrange.inc
+++ b/testautomation/spreadsheet/optional/includes/printrange/c_printrange.inc
@@ -266,14 +266,16 @@ testcase tAddPrintRange
Active.ok
end if
- Kontext "DruckenDlg"
- Seiten.check
- if SeitenText.GetText = "1-3" then
+ Kontext "Printing"
+ Kontext "TabPrintGeneral"
+ PrintPages.check
+ if PageRange.GetText = "1-3" then
printlog "+ Pages to print as expected"
else
- warnlog "Expected pages to print are <1-3>, but we got: " & SeitenText.GetText
+ warnlog "Expected pages to print are <1-3>, but we got: " & PageRange.GetText
end if
- DruckenDlg.Cancel
+ Kontext "Printing"
+ Printing.Cancel
sleep(2)
call hCloseDocument
endcase
@@ -864,15 +866,15 @@ testcase tEmptyRangeMessagebox
endcatch
end if
else
- warnlog "There is no messagebox"
+ warnlog "There is no messagebox (#i106423#)"
kontext "DocumentCalc"
call hCloseDocument
goto endsub
end if
- Kontext "DruckenDlg"
- if DruckenDlg.Exists( 2 ) then
- DruckenDlg.Cancel
+ Kontext "Printing"
+ if Printing.Exists( 2 ) then
+ Printing.Cancel
end if
sleep 2
@@ -916,9 +918,9 @@ testcase tEmptyRangeMessagebox
goto endsub
end if
- kontext "DruckenDlg"
- if DruckenDlg.Exists( 2 ) then
- DruckenDlg.Cancel
+ kontext "Printing"
+ if Printing.Exists( 2 ) then
+ Printing.Cancel
end if
printlog "Close document"
call hCloseDocument
diff --git a/testautomation/spreadsheet/optional/includes/printscale/c_print_scale.inc b/testautomation/spreadsheet/optional/includes/printscale/c_print_scale.inc
index aed510138d38..08d424470de5 100755
--- a/testautomation/spreadsheet/optional/includes/printscale/c_print_scale.inc
+++ b/testautomation/spreadsheet/optional/includes/printscale/c_print_scale.inc
@@ -232,17 +232,19 @@ dim sPagesToPrint as STRING
end if
end if
printlog "Check if print dialog exists"
- Kontext "DruckenDlg"
- if DruckenDlg.Exists(2) then
- Seiten.check
- printlog "Check for string '1-12' in pages textbox"
- sPagesToPrint = SeitenText.getText
- if sPagesToPrint = "1-12" then
+ Kontext "Printing"
+ if Printing.Exists(2) then
+ Kontext "TabPrintGeneral"
+ PrintPages.check
+ printlog "Check for string '1-4' in pages textbox"
+ sPagesToPrint = PageRange.getText
+ if sPagesToPrint = "1-4" then
printlog " OK, expected number of pages for output"
else
warnlog "Unexpected number of pages for print output: " & sPagesToPrint & " -> Check this out!"
end if
- DruckenDlg.Cancel
+ Kontext "Printing"
+ Printing.Cancel
else
qaErrorlog "OOPS, are you sure that a printer is configured at all?"
end if
diff --git a/testautomation/spreadsheet/required/c_updt1.bas b/testautomation/spreadsheet/required/c_updt1.bas
index af3ea7596374..076b247a82ad 100755
--- a/testautomation/spreadsheet/required/c_updt1.bas
+++ b/testautomation/spreadsheet/required/c_updt1.bas
@@ -69,6 +69,10 @@ sub LoadIncludeFiles
use "global\system\includes\master.inc"
use "global\system\includes\gvariabl.inc"
use "global\tools\includes\optional\t_locale_tools.inc"
+ use "global\tools\includes\optional\t_docfuncs.inc"
+ use "global\tools\includes\optional\t_control_objects.inc"
+ use "global\required\includes\g_printing.inc"
+
gApplication = "CALC"
GetUseFiles ()
end sub
diff --git a/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc b/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc
index 1220b283e2ec..02367cf9e625 100755
--- a/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc
+++ b/testautomation/spreadsheet/required/includes/c_upd_editmenu2.inc
@@ -590,7 +590,7 @@ testcase tEditImageMap
Aktiv.Click
'/// Click on 'Macro...'-button
printlog " Click on 'Macro...'-button"
- warnlog "Due to #i102720# this functionality is outcommented"
+ warnlog "#i102720# => crash, therefor this functionality is outcommented"
' Makro.Click
' Kontext "MakroZuweisen"
' Call DialogTest ( MakroZuweisen )
diff --git a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc
index a05f22ed9360..4e6dbe0f8d70 100755
--- a/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc
+++ b/testautomation/spreadsheet/required/includes/c_upd_filemenu.inc
@@ -48,7 +48,6 @@
' #0 tFileSaveAsDBF
' #1 tFileVersions
' #1 tFilePagePreview
-' #1 tFilePrint
'*
'\***********************************************************************
@@ -67,7 +66,7 @@ sub c_upd_filemenu
Call tFileSaveAsDBF
Call tFileVersions
Call tFilePagePreview
- Call tFilePrint
+ Call g_printing()
end sub
@@ -596,71 +595,3 @@ testcase tFilePagePreview
endcase
-'-----------------------------------------------------------
-
-testcase tFilePrint
-
- '/// Open new Spreadsheet document
- Printlog " Open new Spreadsheet document"
- Call hNewDocument
- '/// Enter some text
- Printlog " Enter some text"
- Kontext "DocumentCalc"
- DocumentCalc.Typekeys "Test <RETURN>"
- '/// Open File-Print
- Printlog " Open File-Print"
- FilePrint
- '/// Look for warning regarding missing printer
- '/// -> If configuration is missing only this MsgBox is tested
- Kontext
- if Active.Exists(2) then
- if Active.GetRT = 304 then
- Printlog Active.GetText
- QAErrorLog "No printer is configured for this system"
- else
- Printlog Active.GetText
- warnlog "There is an unexpected warning!"
- end if
- '/// Close messagebox with OK
- Printlog " Close messagebox with OK"
- Active.OK
- '/// Cancel Print dialog
- Printlog " Cancel Print dialog"
- Kontext "DruckenDLG"
- DruckenDLG.Cancel
- '/// Close document
- Printlog " Close document"
- Call hCloseDocument
- goto endsub
- end if
- Kontext "DruckenDLG"
- '/// Check existence of print dilaog
- Call DialogTest ( DruckenDLG )
- '/// Invoke the print options dialog
- Printlog " Invoke the print options dialog"
- Kontext "DruckenDLG"
- Zusaetze.Click
- Kontext "TabPrintCalcOptions"
- '/// Check existence of print options dilaog
- Call DialogTest ( TabPrintCalcOptions )
- '/// Cancel print options dialog
- Printlog " Cancel print options dialog"
- TabPrintCalcOptions.Cancel
- '/// Check option 'Print to file'
- Printlog " Check option 'Print to file'"
- Kontext "DruckenDLG"
- AusdruckInDatei.check
- '/// Commit print dialog
- Printlog " Commit print dialog"
- DruckenDLG.OK
- '/// (Save file dialog should be visible now)
- Kontext "SpeichernDLG"
- '/// Check existence of save dilaog
- Call DialogTest ( SpeichernDLG )
- '/// Cancel save dialog
- Printlog " Cancel save dialog"
- SpeichernDLG.Cancel
- '/// Close document
- Printlog " Close document"
- Call hCloseDocument
-endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc
index f0444a21271b..0331c701032d 100755
--- a/testautomation/writer/optional/includes/fields/w_fields4.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields4.inc
@@ -782,15 +782,15 @@ testcase tDocInformationPrinted
if Active.GetRT = 304 then
Active.Ok
QAErrorLog "No Default-Printer! The testcase isn't tested !"
- Kontext "DruckenDlg"
+ Kontext "Printing"
Sleep 1
- DruckenDlg.Cancel
+ Printing.Cancel
goto NoTest
end if
else
- Kontext "DruckenDlg"
+ Kontext "Printing"
Sleep 1
- DruckenDlg.OK
+ Printing.OK
kontext "active"
if active.exists(5) then
QaErrorLog "Error Printing..."
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc
index 034bbd7c1793..ff010c0cda14 100755
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc
+++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic1.inc
@@ -455,39 +455,34 @@ endcase
testcase tInsertGraphic_8
- Dim iFileType as Integer
- Dim iFileNumber as Integer
-
- iFileType = 1 'filter (Format <All>)
-
- if gPlatGroup = "unx" then
- iFileNumber = 4 '4 graphic files. (directory hidden on Unix)
- else
- iFileNumber = 5 '4 graphic files and 1 directory.
- end if
-
- PrintLog "- Test preselect Filter (Format <All>)"
- '/// Test preselect Filter (Format <All>)
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
-
- '/// Select filter (Format <All>)
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
- Sleep 1
- Oeffnen.Click
-
- Dateityp.Select iFileType
- Sleep 1
-
- '/// Check if Filter (Format <All>) works well
- if DateiAuswahl.GetItemCount <> iFileNumber then Warnlog "Filter (Format <All>) does NOT work well"
- GrafikEinfuegenDlg.Cancel
-
- Call hCloseDocument
+ Dim iFileType as Integer
+ Dim iFileNumber as Integer
+
+ iFileType = 1 'filter (Format <All>)
+ iFileNumber = 4
+
+ PrintLog "- Test preselect Filter (Format <All>)"
+ '/// Test preselect Filter (Format <All>)
+
+ Call hNewDocument
+
+ '/// Insert a Graphic , Insert/Graphics/From file
+ InsertGraphicsFromFile
+
+ '/// Select filter (Format <All>)
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
+ Sleep 1
+ Oeffnen.Click
+
+ Dateityp.Select iFileType
+ Sleep 1
+
+ '/// Check if Filter (Format <All>) works well
+ if DateiAuswahl.GetItemCount <> iFileNumber then Warnlog "Filter (Format <All>) does NOT work well"
+ GrafikEinfuegenDlg.Cancel
+
+ Call hCloseDocument
endcase
@@ -495,39 +490,34 @@ endcase
testcase tInsertGraphic_9
- Dim iFileType as Integer
- Dim iFileNumber as Integer
-
- iFileType = 2 'another filter except for (Format <All>) -- bmp
-
- if gPlatGroup = "unx" then
- iFileNumber = 1
- else
- iFileNumber = 2 'the first is the .svn-directory
- end if
-
- PrintLog "- Test preselect Filter excepte for (Format <All>)"
- '/// Test preselect Filter excepte for (Format <All>)
-
- Call hNewDocument
-
- '/// Insert a Graphic , Insert/Graphics/From file
- InsertGraphicsFromFile
-
- '/// Select filter 'BMP'
- Kontext "GrafikEinfuegenDlg"
- Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
- Sleep 1
- Oeffnen.Click
-
- Dateityp.Select iFileType
- Sleep 1
-
- '/// Check if Filter BMP works well
- if DateiAuswahl.GetItemCount <> iFileNumber then Warnlog "Filter BMP does NOT work well"
- GrafikEinfuegenDlg.Cancel
-
- Call hCloseDocument
+ Dim iFileType as Integer
+ Dim iFileNumber as Integer
+
+ iFileType = 2 'another filter except for (Format <All>) -- bmp
+ iFileNumber = 1
+
+ PrintLog "- Test preselect Filter excepte for (Format <All>)"
+ '/// Test preselect Filter excepte for (Format <All>)
+
+ Call hNewDocument
+
+ '/// Insert a Graphic , Insert/Graphics/From file
+ InsertGraphicsFromFile
+
+ '/// Select filter 'BMP'
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.Settext (ConvertPath (gTesttoolpath + "writer\optional\input\insertgraphic") )
+ Sleep 1
+ Oeffnen.Click
+
+ Dateityp.Select iFileType
+ Sleep 1
+
+ '/// Check if Filter BMP works well
+ if DateiAuswahl.GetItemCount <> iFileNumber then Warnlog "Filter BMP does NOT work well"
+ GrafikEinfuegenDlg.Cancel
+
+ Call hCloseDocument
endcase
diff --git a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
index 0a1790c1cbcb..83c59edb4a68 100755
--- a/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
+++ b/testautomation/writer/optional/includes/insertgraphic/w_insertgraphic4.inc
@@ -812,14 +812,14 @@ testcase tInsertGraphic_40
if Active.GetRT = 304 then
Active.Ok
QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
+ Kontext "Printing"
Sleep 1
- DruckenDlg.Cancel
+ Printing.Cancel
end if
else
- Kontext "DruckenDlg"
+ Kontext "Printing"
Sleep 1
- DruckenDlg.OK
+ Printing.OK
Sleep 5
end if
diff --git a/testautomation/writer/optional/includes/option/wh_o_1.inc b/testautomation/writer/optional/includes/option/wh_o_1.inc
index 508030bdc4d7..73e129c47910 100755
--- a/testautomation/writer/optional/includes/option/wh_o_1.inc
+++ b/testautomation/writer/optional/includes/option/wh_o_1.inc
@@ -50,7 +50,7 @@ end sub
'------------------------------------------------------------------------------
testcase tToolsOptionsHTMLContent
- Dim irgendwas(17) as boolean
+ Dim bCheckboxStatus(17) as boolean
printlog "tToolsOptionsHTMLContent datei erstellen zum laden"
'/// uses "input\\writer\\optional\\options\\options1.sxw" ///
@@ -63,23 +63,21 @@ testcase tToolsOptionsHTMLContent
ToolsOptions
Call hToolsOptions ("HTML","View")
- irgendwas(1) = GrafikenUndObjekte.IsChecked
- irgendwas(2) = Tabellen.IsChecked
- irgendwas(3) = Zeichnungen.IsChecked
- irgendwas(4) = Feldnamen.IsChecked
- irgendwas(5) = Notizen.IsChecked
+ bCheckboxStatus(1) = GrafikenUndObjekte.IsChecked
+ bCheckboxStatus(3) = Zeichnungen.IsChecked
+ bCheckboxStatus(4) = Feldnamen.IsChecked
+ bCheckboxStatus(5) = Notizen.IsChecked
- 'irgendwas(9) = Felder.IsChecked
+ 'bCheckboxStatus(9) = Felder.IsChecked
printlog ("'/// - all states inverting ///")
- if irgendwas(1) Then GrafikenUndObjekte.UnCheck Else GrafikenUndObjekte.Check
- if irgendwas(2) Then Tabellen.UnCheck Else Tabellen.Check
- if irgendwas(3) Then Zeichnungen.UnCheck Else Zeichnungen.Check
- if irgendwas(4) Then Feldnamen.UnCheck Else Feldnamen.Check
- if irgendwas(5) Then Notizen.UnCheck Else Notizen.Check
+ if bCheckboxStatus(1) Then GrafikenUndObjekte.UnCheck Else GrafikenUndObjekte.Check
+ if bCheckboxStatus(3) Then Zeichnungen.UnCheck Else Zeichnungen.Check
+ if bCheckboxStatus(4) Then Feldnamen.UnCheck Else Feldnamen.Check
+ if bCheckboxStatus(5) Then Notizen.UnCheck Else Notizen.Check
- 'if irgendwas(9) Then Felder.UnCheck Else Felder.Check
+ 'if bCheckboxStatus(9) Then Felder.UnCheck Else Felder.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -92,16 +90,14 @@ testcase tToolsOptionsHTMLContent
ToolsOptions
Call hToolsOptions ( "HTML","View" )
- if ( irgendwas(1) = GrafikenUndObjekte.IsChecked ) Then WarnLog "GrafikenUndObjekte state changed"
- if ( irgendwas(2) = Tabellen.IsChecked ) Then WarnLog "Tabellen state changed"
- if ( irgendwas(3) = Zeichnungen.IsChecked ) Then WarnLog "Zeichnungen state changed"
- if ( irgendwas(4) = Feldnamen.IsChecked ) Then WarnLog "Feldnamen state changed"
- if ( irgendwas(5) = Notizen.IsChecked ) Then WarnLog "Notizen state changed"
+ if ( bCheckboxStatus(1) = GrafikenUndObjekte.IsChecked ) Then WarnLog "Grafiken state changed"
+ if ( bCheckboxStatus(3) = Zeichnungen.IsChecked ) Then WarnLog "Zeichnungen state changed"
+ if ( bCheckboxStatus(4) = Feldnamen.IsChecked ) Then WarnLog "Feldnamen state changed"
+ if ( bCheckboxStatus(5) = Notizen.IsChecked ) Then WarnLog "Notizen state changed"
printlog ("'/// - all UnCheck -> o ///")
GrafikenUndObjekte.UnCheck
- Tabellen.UnCheck
Zeichnungen.UnCheck
Feldnamen.UnCheck
Notizen.UnCheck
@@ -115,15 +111,13 @@ testcase tToolsOptionsHTMLContent
ToolsOptions
hToolsOptions ( "HTML","View" )
- if GrafikenUndObjekte.IsChecked Then WarnLog "GrafikenUndObjekte x"
- if Tabellen.IsChecked Then WarnLog "Tabellen x"
+ if GrafikenUndObjekte.IsChecked Then WarnLog "Grafiken x"
if Zeichnungen.IsChecked Then WarnLog "Zeichnungen x"
if Feldnamen.IsChecked Then WarnLog "Feldnamen x"
if Notizen.IsChecked Then WarnLog "Notizen x"
Printlog ("'/// - all Check -> x ///")
GrafikenUndObjekte.Check
- Tabellen.Check
Zeichnungen.Check
Feldnamen.Check
Notizen.Check
@@ -135,18 +129,16 @@ testcase tToolsOptionsHTMLContent
ToolsOptions
Call hToolsOptions ( "HTML","View" )
- if true <> GrafikenUndObjekte.IsChecked Then WarnLog "GrafikenUndObjekte o"
- if True <> Tabellen.IsChecked Then WarnLog "Tabellen o"
+ if true <> GrafikenUndObjekte.IsChecked Then WarnLog "Grafiken o"
if True <> Zeichnungen.IsChecked Then WarnLog "Zeichnungen o"
if True <> Feldnamen.IsChecked Then WarnLog "Feldnamen o"
if True <> Notizen.IsChecked Then WarnLog "Notizen o"
printlog ("'/// - restore states ///")
- if ( irgendwas(1) = TRUE ) Then GrafikenUndObjekte.Check Else GrafikenUndObjekte.UnCheck
- if ( irgendwas(2) = TRUE ) Then Tabellen.Check Else Tabellen.UnCheck
- if ( irgendwas(3) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
- if ( irgendwas(4) = TRUE ) Then Feldnamen.Check Else Feldnamen.UnCheck
- if ( irgendwas(5) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
+ if ( bCheckboxStatus(1) = TRUE ) Then GrafikenUndObjekte.Check Else GrafikenUndObjekte.UnCheck
+ if ( bCheckboxStatus(3) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
+ if ( bCheckboxStatus(4) = TRUE ) Then Feldnamen.Check Else Feldnamen.UnCheck
+ if ( bCheckboxStatus(5) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -158,7 +150,7 @@ endcase
'------------------------------------------------------------------------------
testcase tToolsOptionsHTMLLayout
- Dim irgendwas(11) as boolean
+ Dim bCheckboxStatus(11) as boolean
Dim iMasseinheit(3) as integer
Dim iTemp(3) as integer
'///Open "writer\\optional\\input\\options\\options1.sxw ///
@@ -169,15 +161,15 @@ testcase tToolsOptionsHTMLLayout
ToolsOptions
Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1)
- irgendwas(1) = Hilfslinien.IsChecked
- irgendwas(2) = FarbigeHandles.IsChecked
- irgendwas(3) = GrosseHandles.IsChecked
- irgendwas(4) = HorizontaleBildlaufleiste.IsChecked
- irgendwas(5) = VertikaleBildlaufleiste.IsChecked
- irgendwas(10) = Lineal.IsChecked
- irgendwas(6) = HorizontalesLineal.IsChecked
- irgendwas(7) = VertikalesLineal.IsChecked
- irgendwas(8) = WeichesScrollen.IsChecked
+ bCheckboxStatus(1) = Hilfslinien.IsChecked
+ bCheckboxStatus(2) = FarbigeHandles.IsChecked
+ bCheckboxStatus(3) = GrosseHandles.IsChecked
+ bCheckboxStatus(4) = HorizontaleBildlaufleiste.IsChecked
+ bCheckboxStatus(5) = VertikaleBildlaufleiste.IsChecked
+ bCheckboxStatus(10) = Lineal.IsChecked
+ bCheckboxStatus(6) = HorizontalesLineal.IsChecked
+ bCheckboxStatus(7) = VertikalesLineal.IsChecked
+ bCheckboxStatus(8) = WeichesScrollen.IsChecked
iMasseinheit(2) = HorizontalesLinealMasseinheit.GetSelIndex
iMasseinheit(3) = VertikalesLinealMasseinheit.GetSelIndex
@@ -185,17 +177,17 @@ testcase tToolsOptionsHTMLLayout
printlog ("'/// - all states inverting ///")
'this one has 2 places: ViewTextBoundaries
- if irgendwas(1) Then Hilfslinien.UnCheck Else Hilfslinien.Check
- if irgendwas(2) Then FarbigeHandles.UnCheck Else FarbigeHandles.Check
- if irgendwas(3) Then GrosseHandles.UnCheck Else GrosseHandles.Check
+ if bCheckboxStatus(1) Then Hilfslinien.UnCheck Else Hilfslinien.Check
+ if bCheckboxStatus(2) Then FarbigeHandles.UnCheck Else FarbigeHandles.Check
+ if bCheckboxStatus(3) Then GrosseHandles.UnCheck Else GrosseHandles.Check
'this one has 2 places: ViewRuler
- if irgendwas(4) Then HorizontaleBildlaufleiste.UnCheck Else HorizontaleBildlaufleiste.Check
- if irgendwas(5) Then VertikaleBildlaufleiste.UnCheck Else VertikaleBildlaufleiste.Check
- if irgendwas(10) then Lineal.UnCheck Else Lineal.Check ' has to be checked to enable Horizontal and Vertical Ruler
+ if bCheckboxStatus(4) Then HorizontaleBildlaufleiste.UnCheck Else HorizontaleBildlaufleiste.Check
+ if bCheckboxStatus(5) Then VertikaleBildlaufleiste.UnCheck Else VertikaleBildlaufleiste.Check
+ if bCheckboxStatus(10) then Lineal.UnCheck Else Lineal.Check ' has to be checked to enable Horizontal and Vertical Ruler
if Lineal.IsChecked then
- if irgendwas(6) Then HorizontalesLineal.UnCheck Else HorizontalesLineal.Check
- if irgendwas(7) Then VertikalesLineal.UnCheck Else VertikalesLineal.Check
+ if bCheckboxStatus(6) Then HorizontalesLineal.UnCheck Else HorizontalesLineal.Check
+ if bCheckboxStatus(7) Then VertikalesLineal.UnCheck Else VertikalesLineal.Check
if ( HorizontalesLinealMasseinheit.GetItemCount <> iMasseinheit(2) ) Then HorizontalesLinealMasseinheit.Select (HorizontalesLinealMasseinheit.GetItemCount) Else HorizontalesLinealMasseinheit.Select (1)
if ( VertikalesLinealMasseinheit.GetItemCount <> iMasseinheit(3) ) Then VertikalesLinealMasseinheit.Select (VertikalesLinealMasseinheit.GetItemCount) Else VertikalesLinealMasseinheit.Select (1)
iTemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
@@ -203,13 +195,13 @@ testcase tToolsOptionsHTMLLayout
'/// if Asian Language enabled there has to be a checkbox 'Right-aligned' for 'Vertical-Ruler' ///
if gAsianSup = True and VertikalesLineal.IsChecked = True then
if RechtsAusgerichtet.IsVisible = True then
- if irgendwas(9) Then RechtsAusgerichtet.Uncheck Else RechtsAusgerichtet.Check
+ if bCheckboxStatus(9) Then RechtsAusgerichtet.Uncheck Else RechtsAusgerichtet.Check
else
Warnlog "- Checkbox 'Right-aligned' is not visible !"
end if
end if
end if
- if irgendwas(8) Then WeichesScrollen.UnCheck Else WeichesScrollen.Check
+ if bCheckboxStatus(8) Then WeichesScrollen.UnCheck Else WeichesScrollen.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -222,22 +214,22 @@ testcase tToolsOptionsHTMLLayout
ToolsOptions
Call hToolsOptions ( "HTML" , "VIEW" ) '*TabLayoutHTML/ (1)
- if ( irgendwas(1) = Hilfslinien.IsChecked ) Then WarnLog "Hilfslinien state changed"
- if ( irgendwas(2) = FarbigeHandles.IsChecked ) Then WarnLog "FarbigeHandles state changed"
- if ( irgendwas(3) = GrosseHandles.IsChecked ) Then WarnLog "GrosseHandles state changed"
- if ( irgendwas(4) = HorizontaleBildlaufleiste.IsChecked ) Then WarnLog "HorizontaleBildlaufleiste state changed"
- if ( irgendwas(5) = VertikaleBildlaufleiste.IsChecked ) Then WarnLog "VertikaleBildlaufleiste state changed"
- if ( irgendwas(8) = WeichesScrollen.IsChecked ) Then WarnLog "WeichesScrollen state changed"
- if ( irgendwas(10) = Lineal.IsChecked ) Then
+ if ( bCheckboxStatus(1) = Hilfslinien.IsChecked ) Then WarnLog "Hilfslinien state changed"
+ if ( bCheckboxStatus(2) = FarbigeHandles.IsChecked ) Then WarnLog "FarbigeHandles state changed"
+ if ( bCheckboxStatus(3) = GrosseHandles.IsChecked ) Then WarnLog "GrosseHandles state changed"
+ if ( bCheckboxStatus(4) = HorizontaleBildlaufleiste.IsChecked ) Then WarnLog "HorizontaleBildlaufleiste state changed"
+ if ( bCheckboxStatus(5) = VertikaleBildlaufleiste.IsChecked ) Then WarnLog "VertikaleBildlaufleiste state changed"
+ if ( bCheckboxStatus(8) = WeichesScrollen.IsChecked ) Then WarnLog "WeichesScrollen state changed"
+ if ( bCheckboxStatus(10) = Lineal.IsChecked ) Then
WarnLog "Ruler state changed"
- if ( irgendwas(6) = HorizontalesLineal.IsChecked ) Then WarnLog "HorizontalesLineal state changed"
- if ( irgendwas(7) = VertikalesLineal.IsChecked ) Then WarnLog "VertikalesLineal state changed"
+ if ( bCheckboxStatus(6) = HorizontalesLineal.IsChecked ) Then WarnLog "HorizontalesLineal state changed"
+ if ( bCheckboxStatus(7) = VertikalesLineal.IsChecked ) Then WarnLog "VertikalesLineal state changed"
if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) Then WarnLog "HorizontalesLinealMasseinheit state changed"
if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) Then WarnLog "VertikalesLinealMasseinheit state changed"
if gAsianSup = True and VertikalesLineal.IsChecked = True then
if RechtsAusgerichtet.IsVisible = True then
- if irgendwas(9) = RechtsAusgerichtet.IsChecked then WarnLog "Right-aligned state changed"
+ if bCheckboxStatus(9) = RechtsAusgerichtet.IsChecked then WarnLog "Right-aligned state changed"
else
Warnlog "- Checkbox 'Right-aligned' is not visible !"
end if
@@ -381,19 +373,19 @@ testcase tToolsOptionsHTMLLayout
ToolsOptions
Call hToolsOptions ( "HTML" , "VIEW" )
- if ( irgendwas(1) = TRUE ) Then Hilfslinien.Check Else Hilfslinien.UnCheck
- if ( irgendwas(2) = TRUE ) Then FarbigeHandles.Check Else FarbigeHandles.UnCheck
- if ( irgendwas(3) = TRUE ) Then GrosseHandles.Check Else GrosseHandles.UnCheck
+ if ( bCheckboxStatus(1) = TRUE ) Then Hilfslinien.Check Else Hilfslinien.UnCheck
+ if ( bCheckboxStatus(2) = TRUE ) Then FarbigeHandles.Check Else FarbigeHandles.UnCheck
+ if ( bCheckboxStatus(3) = TRUE ) Then GrosseHandles.Check Else GrosseHandles.UnCheck
- if ( irgendwas(4) = TRUE ) Then HorizontaleBildlaufleiste.Check Else HorizontaleBildlaufleiste.UnCheck
- if ( irgendwas(5) = TRUE ) Then VertikaleBildlaufleiste.Check Else VertikaleBildlaufleiste.UnCheck
+ if ( bCheckboxStatus(4) = TRUE ) Then HorizontaleBildlaufleiste.Check Else HorizontaleBildlaufleiste.UnCheck
+ if ( bCheckboxStatus(5) = TRUE ) Then VertikaleBildlaufleiste.Check Else VertikaleBildlaufleiste.UnCheck
Lineal.Check
- if ( irgendwas(6) = TRUE ) Then HorizontalesLineal.Check Else HorizontalesLineal.UnCheck
- if ( irgendwas(7) = TRUE ) Then VertikalesLineal.Check Else VertikalesLineal.UnCheck
+ if ( bCheckboxStatus(6) = TRUE ) Then HorizontalesLineal.Check Else HorizontalesLineal.UnCheck
+ if ( bCheckboxStatus(7) = TRUE ) Then VertikalesLineal.Check Else VertikalesLineal.UnCheck
HorizontalesLinealMasseinheit.Select (iMasseinheit(2))
VertikalesLinealMasseinheit.Select (iMasseinheit(3))
- if ( irgendwas(8) = TRUE ) Then WeichesScrollen.Check Else WeichesScrollen.UnCheck
+ if ( bCheckboxStatus(8) = TRUE ) Then WeichesScrollen.Check Else WeichesScrollen.UnCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -406,7 +398,7 @@ endcase
'------------------------------------------------------------------------------
testcase tToolsOptionsHTMLGrid
- Dim irgendwas(3) as boolean
+ Dim bCheckboxStatus(3) as boolean
Dim sMetricField(4) as string ' MetricField
Dim sTempMetricField(4) as string
@@ -422,9 +414,9 @@ testcase tToolsOptionsHTMLGrid
printlog ("'///TabRaster all UnCheck ! ///")
- irgendwas(1) = FangrasterBenutzen.IsChecked
- irgendwas(2) = RasterSichtbar.IsChecked
- irgendwas(3) = AchsenSynchronisieren.IsChecked
+ bCheckboxStatus(1) = FangrasterBenutzen.IsChecked
+ bCheckboxStatus(2) = RasterSichtbar.IsChecked
+ bCheckboxStatus(3) = AchsenSynchronisieren.IsChecked
sMetricField(1) = RasterAufloesungXAchse.GetText
sMetricField(2) = RasterAufloesungYAchse.GetText
@@ -433,9 +425,9 @@ testcase tToolsOptionsHTMLGrid
printlog ("'/// - all states inverting ///")
- if irgendwas(1) Then FangrasterBenutzen.UnCheck Else FangrasterBenutzen.Check
- if irgendwas(2) Then RasterSichtbar.UnCheck Else RasterSichtbar.Check
- ' if irgendwas(3) Then AchsenSynchronisieren.UnCheck Else AchsenSynchronisieren.Check
+ if bCheckboxStatus(1) Then FangrasterBenutzen.UnCheck Else FangrasterBenutzen.Check
+ if bCheckboxStatus(2) Then RasterSichtbar.UnCheck Else RasterSichtbar.Check
+ ' if bCheckboxStatus(3) Then AchsenSynchronisieren.UnCheck Else AchsenSynchronisieren.Check
' this CheckBox interacts with the MetricBoxes:
AchsenSynchronisieren.UnCheck
@@ -467,8 +459,8 @@ testcase tToolsOptionsHTMLGrid
ToolsOptions
Call hToolsOptions ( "HTML","Grid" )
- if (irgendwas(1) = FangrasterBenutzen.IsChecked ) Then WarnLog "FangrasterBenutzen state changed BugID: 82944 "
- if (irgendwas(2) = RasterSichtbar.IsChecked ) Then WarnLog "RasterSichtbar state changed"
+ if (bCheckboxStatus(1) = FangrasterBenutzen.IsChecked ) Then WarnLog "FangrasterBenutzen state changed BugID: 82944 "
+ if (bCheckboxStatus(2) = RasterSichtbar.IsChecked ) Then WarnLog "RasterSichtbar state changed"
if ( AchsenSynchronisieren.IsChecked = TRUE ) Then WarnLog "AchsenSynchronisieren state changed"
if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) Then WarnLog "RasterAufloesungXAchse state changed"
if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) Then WarnLog "RasterAufloesungYAchse state changed"
@@ -638,9 +630,9 @@ testcase tToolsOptionsHTMLGrid
ToolsOptions
Call hToolsOptions ( "HTML","Grid" )
- if ( irgendwas(1) = TRUE ) Then FangrasterBenutzen.Check Else FangrasterBenutzen.UnCheck
- if ( irgendwas(2) = TRUE ) Then RasterSichtbar.Check Else RasterSichtbar.UnCheck
- if ( irgendwas(3) = TRUE ) Then AchsenSynchronisieren.Check Else AchsenSynchronisieren.UnCheck
+ if ( bCheckboxStatus(1) = TRUE ) Then FangrasterBenutzen.Check Else FangrasterBenutzen.UnCheck
+ if ( bCheckboxStatus(2) = TRUE ) Then RasterSichtbar.Check Else RasterSichtbar.UnCheck
+ if ( bCheckboxStatus(3) = TRUE ) Then AchsenSynchronisieren.Check Else AchsenSynchronisieren.UnCheck
RasterAufloesungXAchse.SetText (sMetricField(1))
RasterAufloesungYAchse.SetText (sMetricField(2))
RasterUnterteilungXAchse.SetText (sMetricField(3))
diff --git a/testautomation/writer/optional/includes/option/wh_o_2.inc b/testautomation/writer/optional/includes/option/wh_o_2.inc
index ca7c0a789349..dd25cb452c08 100755
--- a/testautomation/writer/optional/includes/option/wh_o_2.inc
+++ b/testautomation/writer/optional/includes/option/wh_o_2.inc
@@ -48,53 +48,28 @@ end sub
'------------------------------------------------------------------------------
testcase tToolsOptionsHTMLPrint
- dim irgendwas(12) as boolean ' Checkbox states
+ dim bCheckboxStatus(12) as boolean ' Checkbox states
dim iListBox(1) as integer ' ListBox
dim iTempListBox(1) as integer
dim bRadioBut(4) as boolean ' RadioButtons
dim bTempRadioBut(4) as boolean
- ' sMetricField(i) and sTempMetricField(i)
- '(1) = Grafiken
- '(2) = Tabellen
- '(3) = Zeichnungen
- '(4) = Kontrollfelder
- '(5) = Hintergrund
- '(6) = SchwarzDrucken
- '
- '(7) = LinkeSeiten
- '(8) = RechteSeiten
- '(9) = Umgekehrt
- '(10)= Prospekt
- '
- '(11)= EinzelneDruckauftraege
- '(12)= AusDruckereinstellung
-
- ' bRadioBut(i) and bTempRadioBut(i) / RadioButton
- '(1) = Keine
- '(2) = NurNotizen
- '(3) = Dokumentende
- '(4) = Seitenende
-
Call hFileOpen ( gTesttoolPath + "writer\optional\input\options\test.html" )
Call sMakeReadOnlyDocumentEditable
- printlog "'///- Tools/Options/HTML: PrintHTML ///"
+ printlog "- Tools/Options/HTML: PrintHTML "
- printlog ("'/// - save states ///")
+ printlog (" - save states ")
ToolsOptions
Call hToolsOptions ("HTML","PRINT")
- irgendwas(1) = Grafiken.IsChecked
- irgendwas(2) = Tabellen.IsChecked
- irgendwas(4) = Kontrollfelder.IsChecked
- irgendwas(5) = Hintergrund.IsChecked
- irgendwas(6) = SchwarzDrucken.IsChecked
+ bCheckboxStatus(1) = Grafiken.IsChecked
+ bCheckboxStatus(2) = Kontrollfelder.IsChecked
+ bCheckboxStatus(3) = Hintergrund.IsChecked
+ bCheckboxStatus(4) = SchwarzDrucken.IsChecked
- irgendwas(9) = Umgekehrt.IsChecked
- irgendwas(10)= Prospekt.IsChecked
+ bCheckboxStatus(5)= Prospekt.IsChecked
- irgendwas(11)= EinzelneDruckauftraege.IsChecked
- irgendwas(12)= AusDruckereinstellung.IsChecked
+ bCheckboxStatus(6)= AusDruckereinstellung.IsChecked
iListBox(1) = Fax.GetSelIndex
@@ -103,19 +78,16 @@ testcase tToolsOptionsHTMLPrint
bRadioBut(3) = Dokumentende.IsChecked
bRadioBut(4) = Seitenende.IsChecked
- printlog ("'/// - all states inverting ///")
+ printlog (" - all states inverting ")
- if irgendwas(1) Then Grafiken.UnCheck Else Grafiken.Check
- if irgendwas(2) Then Tabellen.UnCheck Else Tabellen.Check
- if irgendwas(4) Then Kontrollfelder.UnCheck Else Kontrollfelder.Check
- if irgendwas(5) Then Hintergrund.UnCheck Else Hintergrund.Check
- if irgendwas(6) Then SchwarzDrucken.UnCheck Else SchwarzDrucken.Check
+ if bCheckboxStatus(1) Then Grafiken.UnCheck Else Grafiken.Check
+ if bCheckboxStatus(2) Then Kontrollfelder.UnCheck Else Kontrollfelder.Check
+ if bCheckboxStatus(3) Then Hintergrund.UnCheck Else Hintergrund.Check
+ if bCheckboxStatus(4) Then SchwarzDrucken.UnCheck Else SchwarzDrucken.Check
- if irgendwas(9) Then Umgekehrt.UnCheck Else Umgekehrt.Check
- if irgendwas(10) Then Prospekt.UnCheck Else Prospekt.Check
+ if bCheckboxStatus(5) Then Prospekt.UnCheck Else Prospekt.Check
- if irgendwas(11) Then EinzelneDruckauftraege.UnCheck Else EinzelneDruckauftraege.Check
- if irgendwas(12) Then AusDruckereinstellung.UnCheck Else AusDruckereinstellung.Check
+ if bCheckboxStatus(6) Then AusDruckereinstellung.UnCheck Else AusDruckereinstellung.Check
if (Keine.IsChecked = True) Then NurNotizen.Check Else Keine.Check
@@ -134,25 +106,22 @@ testcase tToolsOptionsHTMLPrint
Call hFileSaveAsKill(gOfficepath + "user\work\printtest.html")
Call hCloseDocument
- printlog ("'/// - SO quit - start ///")
+ printlog (" - SO quit - start ")
Call wOfficeRestart
- printlog ("'/// - checking states ///")
+ printlog (" - checking states ")
ToolsOptions
Call hToolsOptions ( "HTML" , "PRINT" )
- if ( irgendwas(1) = Grafiken.IsChecked ) Then WarnLog "'Graphics' state changed"
- if ( irgendwas(2) = Tabellen.IsChecked ) Then WarnLog "'Tables' state changed"
- if ( irgendwas(4) = Kontrollfelder.IsChecked ) Then WarnLog "'Controls' state changed"
- if ( irgendwas(5) = Hintergrund.IsChecked ) Then WarnLog "'Background' state changed"
- if ( irgendwas(6) = SchwarzDrucken.IsChecked ) Then WarnLog "'Print black' state changed"
+ if ( bCheckboxStatus(1) = Grafiken.IsChecked ) Then WarnLog "#i108219#'Graphics' state changed"
+ if ( bCheckboxStatus(2) = Kontrollfelder.IsChecked ) Then WarnLog "'Controls' state changed"
+ if ( bCheckboxStatus(3) = Hintergrund.IsChecked ) Then WarnLog "'Background' state changed"
+ if ( bCheckboxStatus(4) = SchwarzDrucken.IsChecked ) Then WarnLog "'Print black' state changed"
- if ( irgendwas(9) = Umgekehrt.IsChecked ) Then WarnLog "'Reversed' state changed"
- if ( irgendwas(10)= Prospekt.IsChecked ) Then WarnLog "'Brochure' state changed"
+ if ( bCheckboxStatus(5)= Prospekt.IsChecked ) Then WarnLog "'Brochure' state changed"
- if ( irgendwas(11)= EinzelneDruckauftraege.IsChecked ) Then WarnLog "'Create single print jobs' state changed"
- if ( irgendwas(12)= AusDruckereinstellung.IsChecked ) Then WarnLog "'Paper tray from printer settings' state changed"
+ if ( bCheckboxStatus(6)= AusDruckereinstellung.IsChecked ) Then WarnLog "'Paper tray from printer settings' state changed"
if ( bTempRadioBut(1) <> Keine.IsChecked ) Then WarnLog "'None' state changed (Bug#99202)"
if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) Then WarnLog "'Notes only' state changed (Bug#99202)"
@@ -161,18 +130,15 @@ testcase tToolsOptionsHTMLPrint
if ( Fax.GetSelIndex <> iTempListBox(1) ) Then warnlog "Fax state changed"
- printlog ("'/// - all UnCheck -> o ///")
+ printlog (" - all UnCheck -> o ")
Grafiken.UnCheck
- Tabellen.UnCheck
Kontrollfelder.UnCheck
Hintergrund.UnCheck
SchwarzDrucken.UnCheck
- Umgekehrt.UnCheck
Prospekt.UnCheck
- EinzelneDruckauftraege.UnCheck
AusDruckereinstellung.UnCheck
if (NurNotizen.IsChecked = True) Then Dokumentende.Check Else NurNotizen.Check
@@ -187,20 +153,17 @@ testcase tToolsOptionsHTMLPrint
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - check if all UnChecked ///")
+ printlog (" - check if all UnChecked ")
ToolsOptions
Call hToolsOptions ( "HTML" , "PRINT" )
if Grafiken.IsChecked Then WarnLog "'Graphics' x"
- if Tabellen.IsChecked Then WarnLog "'Tables' x"
if Kontrollfelder.IsChecked Then WarnLog "'Controls' x"
if Hintergrund.IsChecked Then WarnLog "'Background' x"
if SchwarzDrucken.IsChecked Then WarnLog "'Print black' x"
- if Umgekehrt.IsChecked Then WarnLog "'Reversed' x"
if Prospekt.IsChecked Then WarnLog "'Brochure' x"
- if EinzelneDruckauftraege.IsChecked Then WarnLog "'Create single print jobs' x"
if AusDruckereinstellung.IsChecked Then WarnLog "'Paper tray from printer settings' x"
' Is saved with document
@@ -217,18 +180,15 @@ testcase tToolsOptionsHTMLPrint
if ( Fax.GetSelIndex <> 1 ) Then WarnLog "Fax is not item 1"
- Printlog ("'/// - all Check -> x ///")
+ Printlog (" - all Check -> x ")
Grafiken.Check
- Tabellen.Check
Kontrollfelder.Check
Hintergrund.Check
SchwarzDrucken.Check
- Umgekehrt.Check
Prospekt.Check
- EinzelneDruckauftraege.Check
AusDruckereinstellung.Check
if (Dokumentende.IsChecked = True) Then Seitenende.Check Else Dokumentende.Check
@@ -243,20 +203,17 @@ testcase tToolsOptionsHTMLPrint
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - check if all Checked ///")
+ printlog (" - check if all Checked ")
ToolsOptions
Call hToolsOptions ( "HTML" , "PRINT" )
if not Grafiken.IsChecked Then WarnLog "'Graphics' o"
- if not Tabellen.IsChecked Then WarnLog "'Tables' o"
if not Kontrollfelder.IsChecked Then WarnLog "'Controls' o"
if not Hintergrund.IsChecked Then WarnLog "'Background' o"
if not SchwarzDrucken.IsChecked Then WarnLog "'Print black' o"
- if not Umgekehrt.IsChecked Then WarnLog "'Reversed' o"
if not Prospekt.IsChecked Then WarnLog "'Brochure' o"
- if not EinzelneDruckauftraege.IsChecked Then WarnLog "'Create single print jobs' o"
if not AusDruckereinstellung.IsChecked Then WarnLog "'Paper tray from printer settings' o"
if ( bTempRadioBut(1) <> Keine.IsChecked ) Then WarnLog "'None' state changed"
@@ -269,21 +226,18 @@ testcase tToolsOptionsHTMLPrint
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.Cancel
- printlog ("'/// - restore states ///")
+ printlog (" - restore states ")
ToolsOptions
Call hToolsOptions ( "HTML" , "PRINT" )
- if ( irgendwas(1) = TRUE ) Then Grafiken.Check Else Grafiken.UnCheck
- if ( irgendwas(2) = TRUE ) Then Tabellen.Check Else Tabellen.UnCheck
- if ( irgendwas(4) = TRUE ) Then Kontrollfelder.Check Else Kontrollfelder.UnCheck
- if ( irgendwas(5) = TRUE ) Then Hintergrund.Check Else Hintergrund.UnCheck
- if ( irgendwas(6) = TRUE ) Then SchwarzDrucken.Check Else SchwarzDrucken.UnCheck
+ if ( bCheckboxStatus(1) = TRUE ) Then Grafiken.Check Else Grafiken.UnCheck
+ if ( bCheckboxStatus(2) = TRUE ) Then Kontrollfelder.Check Else Kontrollfelder.UnCheck
+ if ( bCheckboxStatus(3) = TRUE ) Then Hintergrund.Check Else Hintergrund.UnCheck
+ if ( bCheckboxStatus(4) = TRUE ) Then SchwarzDrucken.Check Else SchwarzDrucken.UnCheck
- if ( irgendwas(9) = TRUE ) Then Umgekehrt.Check Else Umgekehrt.UnCheck
- if ( irgendwas(10) = TRUE ) Then Prospekt.Check Else Prospekt.UnCheck
+ if ( bCheckboxStatus(5) = TRUE ) Then Prospekt.Check Else Prospekt.UnCheck
- if ( irgendwas(11) = TRUE ) Then EinzelneDruckauftraege.Check Else EinzelneDruckauftraege.UnCheck
- if ( irgendwas(12) = TRUE ) Then AusDruckereinstellung.Check Else AusDruckereinstellung.UnCheck
+ if ( bCheckboxStatus(7) = TRUE ) Then AusDruckereinstellung.Check Else AusDruckereinstellung.UnCheck
try
Fax.Select (iListBox(1))
@@ -332,9 +286,9 @@ testcase tToolsOptionsHTMLTable
'(3) = Variabel
Call hNewDocument
- printlog ("'///- Tools/Options/HTML: Table ///")
+ printlog ("- Tools/Options/HTML: Table ")
- printlog ("'/// - save states ///")
+ printlog (" - save states ")
ToolsOptions
Call hToolsOptions ("HTML","Table")
@@ -349,7 +303,7 @@ testcase tToolsOptionsHTMLTable
if ((bRadioBut(1) Xor bRadioBut(2) Xor bRadioBut(3)) = False) Then Warnlog (" RadioButtons have NO init state: " + bRadioBut(1) +", BugID: 83097")
- printlog ("'/// - all states inverting ///")
+ printlog (" - all states inverting ")
VerschiebenZeile.ToMax
VerschiebenSpalte.ToMax
@@ -373,11 +327,11 @@ testcase tToolsOptionsHTMLTable
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - SO quit - start ///")
+ printlog (" - SO quit - start ")
Call wOfficeRestart
- printlog ("'/// - checking states ///")
+ printlog (" - checking states ")
ToolsOptions
Call hToolsOptions ( "HTML" , "Table" )
@@ -393,7 +347,7 @@ testcase tToolsOptionsHTMLTable
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - all UnCheck -> o ///")
+ printlog (" - all UnCheck -> o ")
ToolsOptions
Call hToolsOptions ( "HTML" , "Table" )
@@ -405,7 +359,7 @@ testcase tToolsOptionsHTMLTable
sTempMetricField(2) = VerschiebenSpalte.GetText
sTempMetricField(3) = EinfuegenZeile.GetText
sTempMetricField(4) = EinfuegenSpalte.GetText
- printlog ("'/// More test ///'")
+ printlog (" More test ///'")
VerschiebenZeile.More
VerschiebenSpalte.More
EinfuegenZeile.More
@@ -428,7 +382,7 @@ testcase tToolsOptionsHTMLTable
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - check if all UnChecked ///")
+ printlog (" - check if all UnChecked ")
ToolsOptions
Call hToolsOptions ( "HTML" , "Table" )
@@ -441,7 +395,7 @@ testcase tToolsOptionsHTMLTable
if ( bTempRadioBut(2) <> FixProportional.IsChecked) Then WarnLog "Behaviour of rows/columns : 'Fixed, proportional' state changed"
if ( bTempRadioBut(3) <> Variabel.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Variable' state changed"
- Printlog ("'/// - all Check -> x ///")
+ Printlog (" - all Check -> x ")
VerschiebenZeile.ToMax
VerschiebenSpalte.ToMax
@@ -451,7 +405,7 @@ testcase tToolsOptionsHTMLTable
sTempMetricField(2) = VerschiebenSpalte.GetText
sTempMetricField(3) = EinfuegenZeile.GetText
sTempMetricField(4) = EinfuegenSpalte.GetText
- printlog ("'/// Less test ///'")
+ printlog (" Less test ///'")
VerschiebenZeile.Less
VerschiebenSpalte.Less
EinfuegenZeile.Less
@@ -474,7 +428,7 @@ testcase tToolsOptionsHTMLTable
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - check if all Checked ///")
+ printlog (" - check if all Checked ")
ToolsOptions
Call hToolsOptions ( "HTML" , "Table" )
@@ -487,7 +441,7 @@ testcase tToolsOptionsHTMLTable
if ( bTempRadioBut(2) <> FixProportional.IsChecked) Then WarnLog "Behaviour of rows/columns : 'Fixed, proportional' state changed"
if ( bTempRadioBut(3) <> Variabel.IsChecked ) Then WarnLog "Behaviour of rows/columns : 'Variable' state changed"
- printlog ("'/// - restore states ///")
+ printlog (" - restore states ")
VerschiebenZeile.SetText (sMetricField(1))
VerschiebenSpalte.SetText (sMetricField(2))
@@ -510,7 +464,7 @@ testcase tToolsOptionsHTMLTable1
'/// This testcase check for this bug ///
Call hNewDocument
- printlog ("'///- Tools/Options/Text document: Table ///")
+ printlog ("- Tools/Options/Text document: Table ")
ToolsOptions
Call hToolsOptions ("WRITER","Table")
diff --git a/testautomation/writer/optional/includes/option/wr_o_1.inc b/testautomation/writer/optional/includes/option/wr_o_1.inc
index e55ebbd73280..e20d47236dc5 100755
--- a/testautomation/writer/optional/includes/option/wr_o_1.inc
+++ b/testautomation/writer/optional/includes/option/wr_o_1.inc
@@ -441,18 +441,16 @@ testcase tToolsOptionsWriterView5
Call hToolsOptions ("WRITER","VIEW")
option_value(1) = GrafikenUndObjekte.IsChecked
- option_value(2) = Tabellen.IsChecked
- option_value(3) = Zeichnungen.IsChecked
- option_value(4) = Feldname.IsChecked
- option_value(5) = Notizen.IsChecked
+ option_value(2) = Zeichnungen.IsChecked
+ option_value(3) = Feldname.IsChecked
+ option_value(4) = Notizen.IsChecked
printlog ("'/// - all states inverting ///")
if option_value(1) then GrafikenUndObjekte.UnCheck else GrafikenUndObjekte.Check
- if option_value(2) then Tabellen.UnCheck else Tabellen.Check
- if option_value(3) then Zeichnungen.UnCheck else Zeichnungen.Check
- if option_value(4) then Feldname.UnCheck else Feldname.Check
- if option_value(5) then Notizen.UnCheck else Notizen.Check
+ if option_value(2) then Zeichnungen.UnCheck else Zeichnungen.Check
+ if option_value(3) then Feldname.UnCheck else Feldname.Check
+ if option_value(4) then Notizen.UnCheck else Notizen.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -465,11 +463,10 @@ testcase tToolsOptionsWriterView5
ToolsOptions
Call hToolsOptions ( "WRITER" , "VIEW" )
- if ( option_value(1) = GrafikenUndObjekte.IsChecked ) then WarnLog "GrafikenUndObjekte state changed"
- if ( option_value(2) = Tabellen.IsChecked ) then WarnLog "Tabellen state changed"
- if ( option_value(3) = Zeichnungen.IsChecked ) then WarnLog "Zeichnungen state changed"
- if ( option_value(4) = Feldname.IsChecked ) then WarnLog "Feldname state changed"
- if ( option_value(5) = Notizen.IsChecked ) then WarnLog "Notizen state changed"
+ if ( option_value(1) = GrafikenUndObjekte.IsChecked ) then WarnLog "Graphics and objects state changed"
+ if ( option_value(2) = Zeichnungen.IsChecked ) then WarnLog "Zeichnungen state changed"
+ if ( option_value(3) = Feldname.IsChecked ) then WarnLog "Feldname state changed"
+ if ( option_value(4) = Notizen.IsChecked ) then WarnLog "Notizen state changed"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -499,15 +496,13 @@ testcase tToolsOptionsWriterView6
Call hToolsOptions ("WRITER","VIEW")
option_value(1) = GrafikenUndObjekte.IsChecked
- option_value(2) = Tabellen.IsChecked
- option_value(3) = Zeichnungen.IsChecked
- option_value(4) = Feldname.IsChecked
- option_value(5) = Notizen.IsChecked
+ option_value(2) = Zeichnungen.IsChecked
+ option_value(3) = Feldname.IsChecked
+ option_value(4) = Notizen.IsChecked
printlog ("'/// - all states unchecked ///")
GrafikenUndObjekte.UnCheck
- Tabellen.UnCheck
Zeichnungen.UnCheck
Feldname.UnCheck
Notizen.UnCheck
@@ -523,18 +518,16 @@ testcase tToolsOptionsWriterView6
ToolsOptions
Call hToolsOptions ( "WRITER" , "VIEW" )
- if GrafikenUndObjekte.IsChecked then WarnLog "GrafikenUndObjekte x"
- if Tabellen.IsChecked then WarnLog "Tabellen x"
+ if GrafikenUndObjekte.IsChecked then WarnLog "Graphics and objects x"
if Zeichnungen.IsChecked then WarnLog "Zeichnungen x"
if Feldname.IsChecked then WarnLog "Feldname x"
if Notizen.IsChecked then WarnLog "Notizen x"
printlog ("'/// - restore states ///")
if ( option_value(1) = TRUE ) Then GrafikenUndObjekte.Check Else GrafikenUndObjekte.UnCheck
- if ( option_value(2) = TRUE ) Then Tabellen.Check Else Tabellen.UnCheck
- if ( option_value(3) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
- if ( option_value(4) = TRUE ) Then Feldname.Check Else Feldname.UnCheck
- if ( option_value(5) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
+ if ( option_value(2) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
+ if ( option_value(3) = TRUE ) Then Feldname.Check Else Feldname.UnCheck
+ if ( option_value(4) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -564,15 +557,13 @@ testcase tToolsOptionsWriterView7
Call hToolsOptions ("WRITER","VIEW")
option_value(1) = GrafikenUndObjekte.IsChecked
- option_value(2) = Tabellen.IsChecked
- option_value(3) = Zeichnungen.IsChecked
- option_value(4) = Feldname.IsChecked
- option_value(5) = Notizen.IsChecked
+ option_value(2) = Zeichnungen.IsChecked
+ option_value(3) = Feldname.IsChecked
+ option_value(4) = Notizen.IsChecked
printlog ("'/// - all Check -> x ///")
GrafikenUndObjekte.Check
- Tabellen.Check
Zeichnungen.Check
Feldname.Check
Notizen.Check
@@ -588,8 +579,7 @@ testcase tToolsOptionsWriterView7
ToolsOptions
hToolsOptions ( "WRITER" , "VIEW" )
- if true <> GrafikenUndObjekte.IsChecked then WarnLog "GrafikenUndObjekte o"
- if true <> Tabellen.IsChecked then WarnLog "Tabellen."
+ if true <> GrafikenUndObjekte.IsChecked then WarnLog "Graphics and objects o"
if true <> Zeichnungen.IsChecked then WarnLog "Zeichnungen o"
if true <> Feldname.IsChecked then WarnLog "Feldname o"
if true <> Notizen.IsChecked then WarnLog "Notizen o"
diff --git a/testautomation/writer/optional/includes/option/wr_o_2.inc b/testautomation/writer/optional/includes/option/wr_o_2.inc
index 78bff9f411ff..f677a5c39ed5 100755
--- a/testautomation/writer/optional/includes/option/wr_o_2.inc
+++ b/testautomation/writer/optional/includes/option/wr_o_2.inc
@@ -451,14 +451,12 @@ testcase tToolsOptionsWriterPrint1
' sMetricField(i) and sTempMetricField(i)
'(1) = Grafiken
'(2) = Tabellen
- '(3) = Zeichnungen
'(4) = Kontrollfelder
'(5) = Hintergrund
'(6) = SchwarzDrucken
'
'(7) = LinkeSeiten
'(8) = RechteSeiten
- '(9) = Umgekehrt
'(10)= Prospekt
'
'(11)= EinzelneDruckauftraege
@@ -480,20 +478,18 @@ testcase tToolsOptionsWriterPrint1
Call hToolsOptions ("WRITER","PRINT")
bCheckboxes(1) = Grafiken.IsChecked
- bCheckboxes(2) = Tabellen.IsChecked
- bCheckboxes(3) = Zeichnungen.IsChecked
- bCheckboxes(4) = Kontrollfelder.IsChecked
- bCheckboxes(5) = Hintergrund.IsChecked
- bCheckboxes(6) = SchwarzDrucken.IsChecked
+ bCheckboxes(2) = Kontrollfelder.IsChecked
+ bCheckboxes(3) = Hintergrund.IsChecked
+ bCheckboxes(4) = SchwarzDrucken.IsChecked
+ bCheckboxes(5) = HiddenText.IsChecked
+ bCheckboxes(6) = TextPlaceholder.IsChecked
bCheckboxes(7) = LinkeSeiten.IsChecked
bCheckboxes(8) = RechteSeiten.IsChecked
- bCheckboxes(9) = Umgekehrt.IsChecked
- bCheckboxes(10)= Prospekt.IsChecked
+ bCheckboxes(9)= Prospekt.IsChecked
- bCheckboxes(11)= EinzelneDruckauftraege.IsChecked
- bCheckboxes(12)= AusDruckereinstellung.IsChecked
- bCheckboxes(13)= LeereSeitenDrucken.IsChecked
+ bCheckboxes(10)= LeereSeitenDrucken.IsChecked
+ bCheckboxes(11)= AusDruckereinstellung.IsChecked
iListBox(1) = Fax.GetSelText
@@ -504,21 +500,19 @@ testcase tToolsOptionsWriterPrint1
printlog ("'/// - all states inverting ///")
- if bCheckboxes(1) then Grafiken.UnCheck else Grafiken.Check
- if bCheckboxes(2) then Tabellen.UnCheck else Tabellen.Check
- if bCheckboxes(3) then Zeichnungen.UnCheck else Zeichnungen.Check
- if bCheckboxes(4) then Kontrollfelder.UnCheck else Kontrollfelder.Check
- if bCheckboxes(5) then Hintergrund.UnCheck else Hintergrund.Check
- if bCheckboxes(6) then SchwarzDrucken.UnCheck else SchwarzDrucken.Check
+ if bCheckboxes(1) then Grafiken.UnCheck else Grafiken.Check
+ if bCheckboxes(2) then Kontrollfelder.UnCheck else Kontrollfelder.Check
+ if bCheckboxes(3) then Hintergrund.UnCheck else Hintergrund.Check
+ if bCheckboxes(4) then SchwarzDrucken.UnCheck else SchwarzDrucken.Check
+ if bCheckboxes(5) then HiddenText.UnCheck else HiddenText.Check
+ if bCheckboxes(6) then TextPlaceholder.UnCheck else TextPlaceholder.Check
- if bCheckboxes(7) then LinkeSeiten.UnCheck else LinkeSeiten.Check
- if bCheckboxes(8) then RechteSeiten.UnCheck else RechteSeiten.Check
- if bCheckboxes(9) then Umgekehrt.UnCheck else Umgekehrt.Check
- if bCheckboxes(10) then Prospekt.UnCheck else Prospekt.Check
+ if bCheckboxes(7) then LinkeSeiten.UnCheck else LinkeSeiten.Check
+ if bCheckboxes(8) then RechteSeiten.UnCheck else RechteSeiten.Check
+ if bCheckboxes(9) then Prospekt.UnCheck else Prospekt.Check
- if bCheckboxes(11) then EinzelneDruckauftraege.UnCheck else EinzelneDruckauftraege.Check
- if bCheckboxes(12) then AusDruckereinstellung.UnCheck else AusDruckereinstellung.Check
- if bCheckboxes(13) then LeereSeitenDrucken.UnCheck else LeereSeitenDrucken.Check
+ if bCheckboxes(10) then LeereSeitenDrucken.UnCheck else LeereSeitenDrucken.Check
+ if bCheckboxes(11) then AusDruckereinstellung.UnCheck else AusDruckereinstellung.Check
if (Keine.IsChecked = True) then NurNotizen.Check else Keine.Check
@@ -574,21 +568,19 @@ testcase tToolsOptionsWriterPrint1
ToolsOptions
Call hToolsOptions ( "WRITER" , "PRINT" )
- if ( bCheckboxes(1) = Grafiken.IsChecked ) then WarnLog "Grafiken state changed"
- if ( bCheckboxes(2) = Tabellen.IsChecked ) then WarnLog "Tabellen state changed"
- if ( bCheckboxes(3) = Zeichnungen.IsChecked ) then WarnLog "Zeichnungen state changed"
- if ( bCheckboxes(4) = Kontrollfelder.IsChecked ) then WarnLog "Kontrollfelder state changed"
- if ( bCheckboxes(5) = Hintergrund.IsChecked ) then WarnLog "Hintergrund state changed"
- if ( bCheckboxes(6) = SchwarzDrucken.IsChecked ) then WarnLog "SchwarzDrucken state changed"
+ if ( bCheckboxes(1) = Grafiken.IsChecked ) then WarnLog "Grafiken state changed"
+ if ( bCheckboxes(2) = Kontrollfelder.IsChecked ) then WarnLog "Kontrollfelder state changed"
+ if ( bCheckboxes(3) = Hintergrund.IsChecked ) then WarnLog "Hintergrund state changed"
+ if ( bCheckboxes(4) = SchwarzDrucken.IsChecked ) then WarnLog "SchwarzDrucken state changed"
+ if ( bCheckboxes(5) = HiddenText.IsChecked ) then WarnLog "HiddenText state changed"
+ if ( bCheckboxes(6) = TextPlaceholder.IsChecked ) then WarnLog "TextPlaceholder state changed"
if ( bCheckboxes(7) = LinkeSeiten.IsChecked ) then WarnLog "LinkeSeiten state changed"
if ( bCheckboxes(8) = RechteSeiten.IsChecked ) then WarnLog "RechteSeiten state changed"
- if ( bCheckboxes(9) = Umgekehrt.IsChecked ) then WarnLog "Umgekehrt state changed"
- if ( bCheckboxes(10)= Prospekt.IsChecked ) then WarnLog "Prospekt state changed"
+ if ( bCheckboxes(9)= Prospekt.IsChecked ) then WarnLog "Prospekt state changed"
- if ( bCheckboxes(11)= EinzelneDruckauftraege.IsChecked ) then WarnLog "EinzelneDruckauftraege state changed"
- if ( bCheckboxes(12)= AusDruckereinstellung.IsChecked ) then WarnLog "AusDruckereinstellung state changed"
- if ( bCheckboxes(13)= LeereSeitenDrucken.IsChecked ) then WarnLog "'Print automatically inserted blank pages' state changed"
+ if ( bCheckboxes(10)= LeereSeitenDrucken.IsChecked ) then WarnLog "'Print automatically inserted blank pages' state changed"
+ if ( bCheckboxes(11)= AusDruckereinstellung.IsChecked ) then WarnLog "AusDruckereinstellung state changed"
if ( Fax.GetSelIndex <> iTempListBox(1) ) Then warnlog "Fax state changed"
@@ -613,18 +605,17 @@ testcase tToolsOptionsWriterPrint1
printlog ("'/// - all UnCheck -> o ///")
Grafiken.UnCheck
- Tabellen.UnCheck
- Zeichnungen.UnCheck
Kontrollfelder.UnCheck
Hintergrund.UnCheck
SchwarzDrucken.UnCheck
+ HiddenText.UnCheck
+ TextPlaceholder.UnCheck
LinkeSeiten.UnCheck
RechteSeiten.UnCheck
- Umgekehrt.UnCheck
Prospekt.UnCheck
- EinzelneDruckauftraege.UnCheck
+ LeereSeitenDrucken.UnCheck
AusDruckereinstellung.UnCheck
if (NurNotizen.IsChecked = True) then Dokumentende.Check else NurNotizen.Check
@@ -644,20 +635,19 @@ testcase tToolsOptionsWriterPrint1
ToolsOptions
Call hToolsOptions ( "WRITER" , "PRINT" )
- if Grafiken.IsChecked then WarnLog "Grafiken x"
- if Tabellen.IsChecked then WarnLog "Tabellen x"
- if Zeichnungen.IsChecked then WarnLog "Zeichnungen x"
- if Kontrollfelder.IsChecked then WarnLog "Kontrollfelder x"
- if Hintergrund.IsChecked then WarnLog "Hintergrund x"
- if SchwarzDrucken.IsChecked then WarnLog "SchwarzDrucken x"
+ if Grafiken.IsChecked then WarnLog "Grafiken is checked"
+ if Kontrollfelder.IsChecked then WarnLog "Kontrollfelder is checked"
+ if Hintergrund.IsChecked then WarnLog "Hintergrund is checked"
+ if SchwarzDrucken.IsChecked then WarnLog "SchwarzDrucken is checked"
+ if HiddenText.IsChecked then WarnLog "HiddenText is checked"
+ if TextPlaceholder.IsChecked then WarnLog "TextPlaceholder is checked"
- if LinkeSeiten.IsChecked then WarnLog "LinkeSeiten x"
- if RechteSeiten.IsChecked then WarnLog "RechteSeiten x"
- if Umgekehrt.IsChecked then WarnLog "Umgekehrt x"
- if Prospekt.IsChecked then WarnLog "Prospekt x"
+ if LinkeSeiten.IsChecked then WarnLog "LinkeSeiten is checked"
+ if RechteSeiten.IsChecked then WarnLog "RechteSeiten is checked"
+ if Prospekt.IsChecked then WarnLog "Prospekt is checked"
- if EinzelneDruckauftraege.IsChecked then WarnLog "EinzelneDruckauftraege x"
- if AusDruckereinstellung.IsChecked then WarnLog "AusDruckereinstellung x"
+ if LeereSeitenDrucken.IsChecked then WarnLog "LeereSeitenDrucken is checked"
+ if AusDruckereinstellung.IsChecked then WarnLog "AusDruckereinstellung is checked"
if ( bTempRadioBut(1) <> Keine.IsChecked ) then WarnLog "Keine state changed"
if ( bTempRadioBut(2) <> NurNotizen.IsChecked ) then WarnLog "NurNotizen state changed"
@@ -669,18 +659,17 @@ testcase tToolsOptionsWriterPrint1
Printlog ("'/// - all Check -> x ///")
Grafiken.Check
- Tabellen.Check
- Zeichnungen.Check
Kontrollfelder.Check
Hintergrund.Check
SchwarzDrucken.Check
+ HiddenText.Check
+ TextPlaceholder.Check
LinkeSeiten.Check
RechteSeiten.Check
- Umgekehrt.Check
Prospekt.Check
- EinzelneDruckauftraege.Check
+ LeereSeitenDrucken.Check
AusDruckereinstellung.Check
if (Dokumentende.IsChecked = True) then Seitenende.Check else Dokumentende.Check
@@ -700,20 +689,19 @@ testcase tToolsOptionsWriterPrint1
ToolsOptions
Call hToolsOptions ( "WRITER" , "PRINT" )
- if not Grafiken.IsChecked then WarnLog "Grafiken o"
- if not Tabellen.IsChecked then WarnLog "Tabellen o"
- if not Zeichnungen.IsChecked then WarnLog "Zeichnungen o"
- if not Kontrollfelder.IsChecked then WarnLog "Kontrollfelder o"
- if not Hintergrund.IsChecked then WarnLog "Hintergrund o"
- if not SchwarzDrucken.IsChecked then WarnLog "SchwarzDrucken o"
+ if not Grafiken.IsChecked then WarnLog "Grafiken is unchecked"
+ if not Kontrollfelder.IsChecked then WarnLog "Kontrollfelder is unchecked"
+ if not Hintergrund.IsChecked then WarnLog "Hintergrund is unchecked"
+ if not SchwarzDrucken.IsChecked then WarnLog "SchwarzDrucken is unchecked"
+ if not HiddenText.IsChecked then WarnLog "HiddenText is unchecked "
+ if not TextPlaceholder.IsChecked then WarnLog "TextPlaceholder is unchecked"
- if not LinkeSeiten.IsChecked then WarnLog "LinkeSeiten o"
- if not RechteSeiten.IsChecked then WarnLog "RechteSeiten o"
- if not Umgekehrt.IsChecked then WarnLog "Umgekehrt o"
- if not Prospekt.IsChecked then WarnLog "Prospekt o"
+ if not LinkeSeiten.IsChecked then WarnLog "LinkeSeiten is unchecked"
+ if not RechteSeiten.IsChecked then WarnLog "RechteSeiten is unchecked"
+ if not Prospekt.IsChecked then WarnLog "Prospekt is unchecked"
- if not EinzelneDruckauftraege.IsChecked then WarnLog "EinzelneDruckauftraege o"
- if not AusDruckereinstellung.IsChecked then WarnLog "AusDruckereinstellung o"
+ if not LeereSeitenDrucken.IsChecked then WarnLog "LeereSeitenDrucken is unchecked"
+ if not AusDruckereinstellung.IsChecked then WarnLog "AusDruckereinstellung is unchecked"
' This state will be saved with the document
if ( bTempRadioBut(1) <> Keine.IsChecked ) then WarnLog "Keine state changed"
@@ -730,21 +718,19 @@ testcase tToolsOptionsWriterPrint1
ToolsOptions
Call hToolsOptions ( "WRITER" , "PRINT" )
- if ( bCheckboxes(1) = TRUE ) then Grafiken.Check else Grafiken.UnCheck
- if ( bCheckboxes(2) = TRUE ) then Tabellen.Check else Tabellen.UnCheck
- if ( bCheckboxes(3) = TRUE ) then Zeichnungen.Check else Zeichnungen.UnCheck
- if ( bCheckboxes(4) = TRUE ) then Kontrollfelder.Check else Kontrollfelder.UnCheck
- if ( bCheckboxes(5) = TRUE ) then Hintergrund.Check else Hintergrund.UnCheck
- if ( bCheckboxes(6) = TRUE ) then SchwarzDrucken.Check else SchwarzDrucken.UnCheck
-
- if ( bCheckboxes(7) = TRUE ) then LinkeSeiten.Check else LinkeSeiten.UnCheck
- if ( bCheckboxes(8) = TRUE ) then RechteSeiten.Check else RechteSeiten.UnCheck
- if ( bCheckboxes(9) = TRUE ) then Umgekehrt.Check else Umgekehrt.UnCheck
- if ( bCheckboxes(10) = TRUE ) then Prospekt.Check else Prospekt.UnCheck
-
- if ( bCheckboxes(11) = TRUE ) then EinzelneDruckauftraege.Check else EinzelneDruckauftraege.UnCheck
- if ( bCheckboxes(12) = TRUE ) then AusDruckereinstellung.Check else AusDruckereinstellung.UnCheck
- if ( bCheckboxes(13) = TRUE ) then LeereSeitenDrucken.Check else LeereSeitenDrucken.UnCheck
+ if ( bCheckboxes(1) = TRUE ) then Grafiken.Check else Grafiken.Uncheck
+ if ( bCheckboxes(2) = TRUE ) then Kontrollfelder.Check else Kontrollfelder.UnCheck
+ if ( bCheckboxes(3) = TRUE ) then Hintergrund.Check else Hintergrund.Uncheck
+ if ( bCheckboxes(4) = TRUE ) then SchwarzDrucken.Check else SchwarzDrucken.UnCheck
+ if ( bCheckboxes(5) = TRUE ) then HiddenText.check else HiddenText.Uncheck
+ if ( bCheckboxes(6) = TRUE ) then TextPlaceholder.check else TextPlaceholder.Uncheck
+
+ if ( bCheckboxes(7) = TRUE ) then LinkeSeiten.Check else LinkeSeiten.Uncheck
+ if ( bCheckboxes(8) = TRUE ) then RechteSeiten.Check else RechteSeiten.Uncheck
+ if ( bCheckboxes(9) = TRUE ) then Prospekt.Check else Prospekt.Uncheck
+
+ if ( bCheckboxes(10) = TRUE ) then LeereSeitenDrucken.Check else LeereSeitenDrucken.UnCheck
+ if ( bCheckboxes(11) = TRUE ) then AusDruckereinstellung.Check else AusDruckereinstellung.UnCheck
try
Fax.Select (iListBox(1))
diff --git a/testautomation/writer/optional/includes/option/wr_o_3.inc b/testautomation/writer/optional/includes/option/wr_o_3.inc
index 6c5537eed48b..2a99278d5de2 100755
--- a/testautomation/writer/optional/includes/option/wr_o_3.inc
+++ b/testautomation/writer/optional/includes/option/wr_o_3.inc
@@ -935,9 +935,17 @@ testcase tToolsOptionsWriterCompatibility1
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.Ok
- '/// restart the office
+ printlog "- save document"
+ Call hFileSaveAsKill (gOfficePath + "user\work\tToolsOptionsWriterCompatibility1.odt")
+ Call hCloseDocument
+
+ printlog "- restart the office"
Call wOfficeRestart
+ printlog "- load previously saved document"
+ Call hNewDocument
+ Call hFileOpen (gOfficePath + "user\work\tToolsOptionsWriterCompatibility1.odt")
+
Printlog "check state of all checkboxes and uncheck all checkboxes"
ToolsOptions
Call hToolsOptions("WRITER","COMPATIBILITY")
@@ -960,6 +968,8 @@ testcase tToolsOptionsWriterCompatibility1
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.Ok
+ Call hCloseDocument
+
'/// restart the office
Call wOfficeRestart
WaitSlot (2)
diff --git a/testautomation/writer/optional/includes/option/wr_o_4.inc b/testautomation/writer/optional/includes/option/wr_o_4.inc
index deb98f579ce1..6a3ca9dd50f3 100755
--- a/testautomation/writer/optional/includes/option/wr_o_4.inc
+++ b/testautomation/writer/optional/includes/option/wr_o_4.inc
@@ -78,9 +78,9 @@ testcase tToolsOptionsWriterOther
'- !!! -Current Document only- ist bei office beenden zu beachten!!!
Call hNewDocument
- printlog ("'///- Tools/Options/Writer: General ///")
+ printlog ("- Tools/Options/Writer: General ")
- printlog ("'/// - save states ///")
+ printlog (" - save states ")
ToolsOptions
Call hToolsOptions ("WRITER","GENERAL")
@@ -94,7 +94,7 @@ testcase tToolsOptionsWriterOther
iMasseinheit = Masseinheit.GetSelIndex
sTabAbstand = Tabulatorenabstand.GetText
- printlog ("'/// - all states inverting ///")
+ printlog ("- all states inverting ")
if irgendwas(2) Then Feldbefehle.UnCheck Else Feldbefehle.Check
if Feldbefehle.IsChecked Then if irgendwas(3) Then Diagramme.UnCheck Else Diagramme.Check
@@ -124,11 +124,11 @@ testcase tToolsOptionsWriterOther
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - SO quit - start ///")
+ printlog ("- SO quit - start ")
Call wOfficeRestart
- printlog ("'/// - checking states ///")
+ printlog ("- checking states ")
ToolsOptions
Call hToolsOptions ( "WRITER" , "GENERAL" )
@@ -144,7 +144,7 @@ testcase tToolsOptionsWriterOther
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - all UnCheck -> o ///")
+ printlog ("- all UnCheck -> o ")
ToolsOptions
Call hToolsOptions ( "WRITER" , "GENERAL" )
@@ -159,7 +159,7 @@ testcase tToolsOptionsWriterOther
Masseinheit.Select (1)
Tabulatorenabstand.ToMin
sTemp = Tabulatorenabstand.GetText
- printlog ("'/// More test ///'")
+ printlog ("More test ///'")
Tabulatorenabstand.More
if ( sTemp = Tabulatorenabstand.GetText ) Then WarnLog "Tabulatorenabstand More-Button not working; stemp1: "+sTemp + " =? (2) " +Tabulatorenabstand.GetText
sTemp = Tabulatorenabstand.GetText
@@ -167,7 +167,7 @@ testcase tToolsOptionsWriterOther
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - check if all UnChecked ///")
+ printlog ("- check if all UnChecked ")
ToolsOptions
Call hToolsOptions ( "WRITER" , "GENERAL" )
@@ -186,7 +186,7 @@ testcase tToolsOptionsWriterOther
'---------------------------------------------------------------------------------
- printlog ("'/// check if tab stops get saved in document ///")
+ printlog ("- check if tab stops get saved in document ")
Call hNewDocument
' set Default Tab Stop to 2,5cm
@@ -240,7 +240,7 @@ testcase tToolsOptionsWriterOther
Call hCloseDocument
'---------------------------------------------------------------------------------
- Printlog ("'/// - all Check -> x ///")
+ Printlog ("- all Check -> x ")
ToolsOptions
Call hToolsOptions ("WRITER","GENERAL")
@@ -264,7 +264,7 @@ testcase tToolsOptionsWriterOther
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - check if all Checked ///")
+ printlog ("- check if all Checked ")
ToolsOptions
Call hToolsOptions ( "WRITER" , "GENERAL" )
@@ -280,7 +280,7 @@ testcase tToolsOptionsWriterOther
if ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Masseinheit is not item " + iTemp + " it's: " + Masseinheit.GetSelIndex
if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE ) Then WarnLog "Tabulatorenabstand is not " + sTemp + " it's: " + Tabulatorenabstand.GetText
- printlog ("'/// - restore states ///")
+ printlog ("- restore states ")
' if ( irgendwas(1) = TRUE ) Then NurFuerAktuellesDokument.Check Else NurFuerAktuellesDokument.UnCheck
if ( irgendwas(2) = TRUE ) Then Feldbefehle.Check Else Feldbefehle.UnCheck
@@ -327,7 +327,7 @@ sub hGetAllOptionsWriterGeneralCaption
fHoleTabPage2 = ConvertPath(gOfficePath + "user\work\opt2_" + iSprache + "." + gPlatGroup)
'------------------------
- Printlog "'///(1/3) Get all items before selecting smth. ///"
+ Printlog "(1/3) Get all items before selecting smth. "
' put them in lsHoleTabPage and write them to 'user\work\opt__...'
Call hNewDocument
@@ -355,7 +355,7 @@ sub hGetAllOptionsWriterGeneralCaption
' ------------------------
- Printlog "'///(2/3) Select every ListItem & exit with OK ///"
+ Printlog "(2/3) Select every ListItem & exit with OK "
ToolsOptions
Call hToolsOptions ("WRITER","AutoCaption")
Kontext "TabAutoCaption"
@@ -381,7 +381,7 @@ sub hGetAllOptionsWriterGeneralCaption
ExtrasOptionenDlg.OK
'------------------------
- Printlog "'///(3/3) Get all items after selecting all ///"
+ Printlog "(3/3) Get all items after selecting all "
' put them in lsHoleTabPage2 and write them to 'user\work\opt2_...'
ToolsOptions
@@ -429,9 +429,9 @@ testcase tToolsOptionsWriterAutoCaption
'/// !no more Listentries than 9, you have to update the allocation for the var's! ///'
Call hNewDocument
- printlog "'///- Tools/Options/Writer: AutoCaption ///"
+ printlog "- Tools/Options/Writer: AutoCaption "
- printlog ("'/// - save states ///")
+ printlog ("- save states ")
ToolsOptions
Call hToolsOptions ("WRITER","AutoCaption")
Kontext "TabAutoCaption"
@@ -463,7 +463,7 @@ testcase tToolsOptionsWriterAutoCaption
next i
'-- just checking the checkboxes of 'ObjectList'
- printlog ("'/// - uncheck all object - checkboxes ///")
+ printlog ("- uncheck all object - checkboxes ")
for i=1 to NumberOfObjects
ObjectList.Select (i)
ObjectList.UnCheck
@@ -471,7 +471,7 @@ testcase tToolsOptionsWriterAutoCaption
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - verify if all unchecked and check all ///")
+ printlog ("- verify if all unchecked and check all ")
ToolsOptions
Call hToolsOptions ("WRITER","AutoCaption")
Kontext "TabAutoCaption"
@@ -486,7 +486,7 @@ testcase tToolsOptionsWriterAutoCaption
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - verify all checkboxes are checked ///")
+ printlog ("- verify all checkboxes are checked ")
ToolsOptions
Call hToolsOptions ("WRITER","AutoCaption")
Kontext "TabAutoCaption"
@@ -498,10 +498,11 @@ testcase tToolsOptionsWriterAutoCaption
end if
next i
- printlog ("'/// - change states ///")
+ printlog ("- change states ")
'/// look if properties get saved for each list item
for i=1 to NumberOfObjects
ObjectList.Select (i)
+ printlog " - " & ObjectList.GetText
if ObjectList.IsChecked Then
if i <= 7 then Numbering.Select i
CaptionSeparator.Settext "Caption Separator " & cstr(i)
@@ -520,16 +521,12 @@ testcase tToolsOptionsWriterAutoCaption
ApplyBorderAndShadow.Check
case 4:
Category.Select 5
- Position.Select 2
case 5:
Category.Select 2
- Position.Select 1
case 6:
Category.Select 3
- Position.Select 2
case 7:
Category.Select 4
- Position.Select 1
case 8:
Category.Select 5
if Numbering.GetItemCount > 7 then
@@ -537,7 +534,6 @@ testcase tToolsOptionsWriterAutoCaption
else
Numbering.Select 4
end if
- Position.Select 2
case 9:
Category.Select 2
if Numbering.GetItemCount > 7 then
@@ -545,7 +541,6 @@ testcase tToolsOptionsWriterAutoCaption
else
Numbering.Select 5
end if
- Position.Select 1
end select
vCategoryTmp(i) = Category.GetSelText
@@ -556,17 +551,17 @@ testcase tToolsOptionsWriterAutoCaption
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - SO quit - start ///")
+ printlog ("- SO quit - start")
Call wOfficeRestart
- printlog ("'/// - checking states ///")
+ printlog ("- checking states ")
ToolsOptions
Call hToolsOptions ("WRITER","AutoCaption")
Kontext "TabAutoCaption"
for i=1 to NumberOfObjects
- printlog "- checking: " & ObjectList.Gettext
ObjectList.Select (i)
+ printlog " - " & ObjectList.GetText
wait 500
if ObjectList.IsChecked Then
if i <= 7 then
@@ -632,31 +627,31 @@ testcase tToolsOptionsWriterAutoCaption
end if
case 4:
- if Position.GetSelIndex <> 2 then
- Warnlog "- 'Position' changed after restart"
+ if Position.IsEnabled = true then
+ Warnlog "- 'Position' should be disabled"
else
- printlog "- 'Position' => ok"
+ printlog "- 'Position' disabled => ok"
end if
case 5:
- if Position.GetSelIndex <> 1 then
- Warnlog "- 'Position' changed after restart"
+ if Position.IsEnabled = true then
+ Warnlog "- 'Position' should be disabled"
else
- printlog "- 'Position' => ok"
+ printlog "- 'Position' disabled => ok"
end if
case 6:
- if Position.GetSelIndex <> 2 then
- Warnlog "- 'Position' changed after restart"
+ if Position.IsEnabled = true then
+ Warnlog "- 'Position' should be disabled"
else
- printlog "- 'Position' => ok"
+ printlog "- 'Position' disabled => ok"
end if
case 7:
- if Position.GetSelIndex <> 1 then
- Warnlog "- 'Position' changed after restart"
+ if Position.IsEnabled = true then
+ Warnlog "- 'Position' should be disabled"
else
- printlog "- 'Position' => ok"
+ printlog "- 'Position' disabled => ok"
end if
case 8:
@@ -674,10 +669,10 @@ testcase tToolsOptionsWriterAutoCaption
end if
end if
- if Position.GetSelIndex <> 2 then
- Warnlog "- 'Position' changed after restart"
+ if Position.IsEnabled = true then
+ Warnlog "- 'Position' should be disabled"
else
- printlog "- 'Position' => ok"
+ printlog "- 'Position' disabled => ok"
end if
case 9:
@@ -695,10 +690,10 @@ testcase tToolsOptionsWriterAutoCaption
end if
end if
- if Position.GetSelIndex <> 1 then
- Warnlog "- 'Position' changed after restart"
+ if Position.IsEnabled = true then
+ Warnlog "- 'Position' should be disabled"
else
- printlog "- 'Position' => ok"
+ printlog "- 'Position' disabled => ok"
end if
end select
@@ -710,7 +705,7 @@ testcase tToolsOptionsWriterAutoCaption
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- printlog ("'/// - restore states ///")
+ printlog ("- restore states ")
ToolsOptions
Call hToolsOptions ("WRITER","AutoCaption")
@@ -765,10 +760,10 @@ testcase tToolsOptionsWriterGeneral
' State is saved with document. Thats why I use 3 docs
Call hNewDocument
- printlog "'///- Extras / Optionen / Sonstiges / Verkn?pfungen aktualisieren ///"
+ printlog "- Extras / Optionen / Sonstiges / Verkn?pfungen aktualisieren "
ToolsOptions
Call hToolsOptions("WRITER","GENERAL")
- printlog "'///- Update links when loading -> always ///"
+ printlog "- Update links when loading -> always "
Immer.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -796,7 +791,7 @@ testcase tToolsOptionsWriterGeneral
ToolsOptions
Call hToolsOptions("WRITER","GENERAL")
if not Immer.IsChecked then Warnlog "Option 'always' has not been changed"
- printlog "'///- Update links when loading -> On request ///"
+ printlog "- Update links when loading -> On request "
AufNachfrage.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -820,7 +815,7 @@ testcase tToolsOptionsWriterGeneral
ToolsOptions
Call hToolsOptions("WRITER","GENERAL")
if not AufNachfrage.IsChecked then Warnlog "Option 'On request' has been changed"
- printlog "'///- Update links when loading -> Never ///"
+ printlog "- Update links when loading -> Never "
Nie.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
@@ -873,7 +868,7 @@ endcase
testcase tToolsOptionsWriterMailMerge
Call hNewDocument
- printlog ("'///- Tools/Options/Writer: Mail Merge ///")
+ printlog ("- Tools/Options/Writer: Mail Merge ")
Kontext "Navigator"
if Navigator.Exists then ViewNavigator
ToolsOptions
diff --git a/testautomation/writer/optional/includes/option/wr_o_a.inc b/testautomation/writer/optional/includes/option/wr_o_a.inc
index 2f917d4961c1..ce8eea6178c3 100755
--- a/testautomation/writer/optional/includes/option/wr_o_a.inc
+++ b/testautomation/writer/optional/includes/option/wr_o_a.inc
@@ -59,15 +59,11 @@ testcase tToolsOptionsWriterPrint
Call hToolsOptions("WRITER","PRINT")
Grafiken.Check
- Tabellen.Check
- Zeichnungen.Check
Kontrollfelder.Check
Hintergrund.Check
SchwarzDrucken.Check
LinkeSeiten.Check
RechteSeiten.Check
- Umgekehrt.Check
-
Prospekt.UnCheck
Seitenende.Check
@@ -97,14 +93,11 @@ testcase tToolsOptionsWriterPrint
Printlog " - uncheck everything"
Grafiken.UnCheck
- Tabellen.UnCheck
- Zeichnungen.UnCheck
Kontrollfelder.UnCheck
Hintergrund.UnCheck
SchwarzDrucken.UnCheck
LinkeSeiten.Check ' that's so, otherwise there will be no printing
RechteSeiten.Check ' that's so, otherwise there will be no printing
- Umgekehrt.UnCheck
Prospekt.UnCheck
Keine.Check
AusDruckereinstellung.UnCheck
diff --git a/testautomation/writer/optional/w_fields.bas b/testautomation/writer/optional/w_fields.bas
index 9d2240321158..3eb650c5ad0e 100644
--- a/testautomation/writer/optional/w_fields.bas
+++ b/testautomation/writer/optional/w_fields.bas
@@ -93,7 +93,8 @@ end sub
sub LoadIncludeFiles
use "global\system\includes\master.inc"
- use "global\system\includes\gvariabl.inc"
+ use "global\system\includes\gvariabl.inc"
+
Call GetUseFiles
gApplication = "WRITER"
end Sub
diff --git a/testautomation/writer/optional/w_insertgraphic.bas b/testautomation/writer/optional/w_insertgraphic.bas
index 84402564098a..ba2014952921 100644
--- a/testautomation/writer/optional/w_insertgraphic.bas
+++ b/testautomation/writer/optional/w_insertgraphic.bas
@@ -131,6 +131,7 @@ end sub
sub LoadIncludeFiles
use "global\system\includes\master.inc"
use "global\system\includes\gvariabl.inc"
+
Call GetUseFiles
gApplication = "WRITER"
end sub
diff --git a/testautomation/writer/required/includes/w_001a_.inc b/testautomation/writer/required/includes/w_001a_.inc
index cbfd5de23047..1b33d5360606 100644
--- a/testautomation/writer/required/includes/w_001a_.inc
+++ b/testautomation/writer/required/includes/w_001a_.inc
@@ -1,582 +1,480 @@
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: w_001a_.inc,v $
-'*
-'* $Revision: 1.2 $
-'*
-'* last change: $Author: vg $ $Date: 2008-08-18 12:40:41 $
-'*
-'* 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.
-'*
-'/************************************************************************
-'*
-'* owner : helge.delfs@sun.com
-'*
-'* short description: Testcases for the Writer Required-test.
-'*
-'\***********************************************************************
-
-sub w_001a_
-
- printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
- gApplication = "WRITER"
-
- Call tFileProperties
-
- Call tFileTemplatesOrganize
- Call tFileTemplatesAddressbookSource
- Call tFileTemplatesSave
- Call tFileTemplatesEdit
-
- Call tFilePagePreview
- Call tFilePrint
- Call tFilePrinterSetup
-
- 'Writer Master Document
- gApplication = "MASTERDOCUMENT"
- Call tMasterDocFilePagePreview
- gApplication = "WRITER"
-
-end sub
-
-'-----------------------------------------------------------
-
-testcase tFileProperties
- PrintLog "- File / Properties"
-
- printlog " Open new document"
- Call hNewDocument
-
- printlog " File / Properties"
- FileProperties
-
- WaitSlot(5000)
- Kontext
- try
- active.SetPage TabDokument
- catch
- Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
- goto endsub
- endcatch
-
- printlog " Switch to Tabpage 'General'"
- Kontext "TabDokument"
- Call DialogTest (TabDokument)
-
- printlog " Switch to Tabpage 'Description'"
- Kontext
- active.SetPage TabDokumentinfo
- Kontext "TabDokumentinfo"
- Call DialogTest (TabDokumentinfo)
-
-
- QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
- ' printlog " Switch to Tabpage 'User defined'"
- ' Kontext
- ' active.SetPage TabBenutzer
- ' Kontext "TabBenutzer"
- ' Call DialogTest ( TabBenutzer )
-
- ' Wait 500
-
- ' Infofelder.Click
- ' printlog " Click 'Infofields'"
- ' Kontext "InfonamenBearbeiten"
- ' printlog " Close upcoming dialog with 'Cancel'"
- ' Call DialogTest (InfonamenBearbeiten)
- ' InfonamenBearbeiten.Cancel
-
- printlog " Switch to Tabpage 'Internet'"
- Kontext
- active.SetPage TabInternet
- Kontext "TabInternet"
- Call DialogTest (TabInternet)
-
- printlog " Switch to Tabpage 'Statistics' and close dialog"
- Kontext
- active.SetPage TabStatistik
- Kontext "TabStatistik"
- Call DialogTest (TabStatistik)
- TabStatistik.Close
-
- Sleep 1
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesOrganize
- Dim i as integer
-
- PrintLog " Open new document."
- Call hNewDocument
- PrintLog " File / Templates / Organize"
- FileTemplatesOrganize
- Kontext "DVVerwalten"
- For i = 1 to 50
- if DVVerwalten.Exists then
- i = 51
- else
- Sleep 5
- end if
- next i
- if Not DVVerwalten.Exists then
- Warnlog "Dialog 'Template Management' not up !"
- Call hCloseDocument
- goto endsub
- end if
- wait 500
- PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
- ListeLinks.Select 1
- ListeLinks.TypeKeys "<Home>"
- Sleep 1
- Befehle.Click
- wait 500
- PrintLog " Select 'Commands -> Import Template'"
- Call hMenuSelectNr(3)
- Wait 500
- PrintLog " Close Filedialog."
- if gUseSysDlg = False then
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists then
- OeffnenDlg.Cancel
- else
- Warnlog "FileOpen dialog not up!"
- end if
- end if
-
- PrintLog " Select 'Commands -> Printer Settings"
- Kontext "DVVerwalten"
- Sleep 1
- Befehle.Click
- wait 500
- Call hMenuSelectNr(4)
-
- PrintLog " Cancel 'Printer-Setup' dialog"
- Kontext "DruckerEinrichten"
- if DruckerEinrichten.Exists then
- DruckerEinrichten.Cancel
- else
- Warnlog "Printersettings dialog is not up!"
- end if
-
- PrintLog " Select first entry in right list"
- Kontext "DVVerwalten"
- ListeRechts.Select 1
-
- PrintLog " Select pushbutton 'File..'"
- if WelcheDatei.IsEnabled then
- WelcheDatei.Click
- if gUseSysDlg = False then
- PrintLog " Cancel Filedialog"
- Kontext "OeffnenDlg"
- OeffnenDlg.Cancel
- end if
- end if
-
- PrintLog " Select pushbutton 'Address Book'"
- Kontext "DVVerwalten"
- AddressBook.Click
- Kontext "AddressbookSource"
- PrintLog " Cancel Dialog 'Address Book-Assignment'"
- if AddressbookSource.Exists then
- AddressbookSource.Cancel
- else
- Warnlog "the Dialog ' Address Book Source' wasnt up!"
- end if
-
- PrintLog " Close dialog"
- Kontext "DVVerwalten"
- DVVerwalten.Close
-
- PrintLog " Close active document."
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesAddressbookSource
-
- PrintLog " Open new document"
- Call hNewDocument
-
- PrintLog " File / Templates /Address Book Source..."
- UseBindings
- FileTemplatesAddressbookSource
-
- WaitSlot(2000)
- PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
- Kontext "AddressbookSource"
- if AddressbookSource.Exists then
- Call DialogTest (AddressbookSource)
- Administrate.Click
- Sleep 2
- PrintLog " Close 'Data Source Administration' with 'Cancel'"
- Kontext "DatabaseProperties"
- if Not DatabaseProperties.Exists then
- Kontext "AddressSourceAutopilot"
- if AddressSourceAutopilot.Exists then
- AddressSourceAutopilot.Cancel
- end if
- Kontext "AddressbookSource"
- AddressbookSource.Cancel
- else
- PrintLog " DatabaseProperties.SetPage TabConnection"
- Kontext "TabConnection"
- Call DialogTest ( TabConnection )
- Kontext "DatabaseProperties"
- DatabaseProperties.Close
- Kontext "AddressbookSource"
- PrintLog " Close dialog"
- AddressbookSource.Cancel
- end if
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesSave
- if gApplication = "MASTERDOCUMENT" then
- qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
- goto endsub
- end if
- printlog "- File / Templates / Save"
- Call hNewDocument
- printlog " Open new document"
- FileTemplatesSave
- printlog " File / Templates / Save"
-
- Kontext "DokumentVorlagen"
- Call DialogTest ( DokumentVorlagen )
- printlog " On 'Templates' dialog click 'Organizer'"
-
- Verwalten.Click
- Kontext "DVVerwalten"
- DVVerwalten.Close
- printlog " Close dialog 'Template Management'"
-
- Kontext "DokumentVorlagen"
- DokumentVorlagen.Cancel
- printlog " Close 'Templates' dialog"
-
- printlog " Close active document"
- Call hCloseDocument
- gApplication = "WRITER"
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFileTemplatesEdit
- printlog "- File / Templates / Edit"
-
- printlog " Open new document"
- Call hNewDocument
- printlog " File / Templates / Edit"
- FileTemplatesEdit
-
- if gUseSysDlg = False then
- printlog " Cancel Filedialog"
- Kontext "OeffnenDlg"
- OeffnenDlg.Cancel
- end if
-
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFilePagePreview
- PrintLog "- File / Page Preview"
- Dim gehtnicht as boolean
- gehtnicht = FALSE
- printlog " Open new document"
- Select Case gApplication
- Case "WRITER"
- Call hNewDocument
-
- Case "MASTERDOCUMENT"
- Call hNewDocument
-
- Case "HTML"
- printlog "Not in Writer/Web!"
- goto endsub
- end select
-
- printlog " Enter some text in document"
- Call wTypeKeys("Just a small change!")
- printlog " File / Page Preview"
- FilePageView
- WaitSlot (1000)
- Kontext "DocPageViewWriter"
- if DocPageViewWriter.NotExists then
- Warnlog "Page Preview is not coming up!"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.No
- end if
- end if
- else
- if gehtnicht=FALSE then
- Kontext "PreviewObjectbar"
- if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
- printlog " Select 'Zoom 100%' in toolbar"
- try
- Massstab.Select 4
- catch
- Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
- endcatch
-
- printlog " Click 'Print Page Preview' in toolbar"
- Kontext "PreviewObjectbar"
- DruckenSeitenansicht.Click
- Kontext "Active"
- if Active.Exists then
- QAErrorlog "No default printer!"
- Active.ok
- Sleep 1
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then DruckenDlg.Cancel
- else
- printlog " Close 'Print' dialog with cancel"
- Kontext "DruckenDlg"
- DruckenDlg.Cancel
- end if
-
- printlog " Click 'Print options page preview' in toolbar"
- Kontext "PreviewObjectbar"
- Skalierung.Click
- printlog " Close 'Print Options' dialog with cancel"
- Kontext "DruckOptionen"
- Call DialogTest ( DruckOptionen )
- DruckOptionen.Cancel
-
- printlog " Close Page Preview with button 'Close Preview' in toolbar"
- Kontext "PreviewObjectbar"
- SeitenansichtSchliessen.Click
- else
- Warnlog "Objectbar not addressable!"
- end if
- end if
- printlog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFilePrint
- PrintLog " Open new document"
- Call hNewDocument
-
- PrintLog " File / Print"
- FilePrint
-
- Kontext "Active"
- WaitSlot(1000)
- if Active.Exists then
- if Active.GetRT = 304 then
- QAErrorlog "No Default Printer!"
- Active.Ok
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then DruckenDlg.Cancel
- Call hCloseDocument
- goto endsub
- end if
- end if
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- PrintLog " In printer dialog click 'Options'"
- Zusaetze.Click
- Sleep 1
-
- Kontext "DruckerZusaetzeWriter"
- PrintLog " Close 'Print options' with 'Cancel'"
- DruckerZusaetzeWriter.Cancel
- Kontext "DruckenDlg"
-
- if gPlatGroup = "unx" then
- if NOT Eigenschaften.IsEnabled AND gPlatform = "osx" then
- QAErrorlog "#i81545#-macport File -> Print|Printer Settings: Properties button disabled"
- Kontext "DruckenDlg"
- DruckenDlg.Cancel
- Call hCloseDocument
- goto endsub
- end if
- PrintLog " On Unix-Platforms select 'Properties"
- Eigenschaften.Click
- sleep (3)
- Kontext "TabSPAPaper"
- if NOT TabSPAPaper.Exists then
- Kontext "TabSPADevice"
- if NOT TabSPADevice.Exists then
- Warnlog "#i88799# - Non functional options-button in Print-dialog."
- else
- Kontext
- Active.Setpage TabSPAPaper
- Kontext "TabSPAPaper"
- Call DialogTest ( TabSPAPaper )
-
- printlog( "ALLES WIRD GUT!" )
- Kontext
- Active.Setpage TabSPADevice
- Kontext "TabSPADevice"
- Call DialogTest ( TabSPADevice )
-
- PrintLog " Cancel Printer Properties' (only unix)"
- TabSPADevice.Cancel
- end if
- else
- Kontext
- Active.Setpage TabSPAPaper
- Kontext "TabSPAPaper"
- Call DialogTest ( TabSPAPaper )
-
- printlog( "ALLES WIRD GUT!" )
- Kontext
- Active.Setpage TabSPADevice
- Kontext "TabSPADevice"
- Call DialogTest ( TabSPADevice )
-
- PrintLog " Cancel Printer Properties' (only unix)"
- TabSPADevice.Cancel
- end if
- end if
- Kontext "DruckenDlg"
- Call DialogTest ( DruckenDlg )
- PrintLog " Close 'Print' dialog"
- DruckenDlg.Cancel
- else
- Warnlog "Print dialog is not up !"
- end if
-
- PrintLog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tFilePrinterSetup
- PrintLog " Open new document"
- Call hNewDocument
-
- PrintLog " File / Printer Settings"
- FilePrintersettings
- Kontext "Active"
- WaitSlot(1000)
- if Active.Exists then
- if Active.GetRT = 304 then
- QAErrorLog "No Default Printer!"
- Active.Ok
- Sleep 2
- Kontext "DruckerEinrichten"
- if DruckerEinrichten.Exists then
- Call DialogTest ( DruckerEinrichten )
- DruckerEinrichten.Cancel
- end if
- end if
- else
- Kontext "DruckerEinrichten"
- Call DialogTest ( DruckerEinrichten )
- DruckerEinrichten.Cancel
- PrintLog " Cancel 'Printer Setup' dialog"
- end if
- PrintLog " Close active document"
- Call hCloseDocument
-endcase
-
-'-----------------------------------------------------------
-
-testcase tMasterDocFilePagePreview
- PrintLog "- File / Page Preview"
- Dim gehtnicht as boolean
- gehtnicht = FALSE
- gApplication = "MASTERDOCUMENT"
- printlog " Open new document"
- Call hNewDocument
-
- printlog " Enter some text in document"
- Call wTypeKeys("Just a small change!")
- printlog " File / Page Preview"
- FilePageView
- WaitSlot (1000)
- Kontext "DocPageViewWriter"
- if DocPageViewWriter.NotExists then
- Warnlog "Page Preview is not coming up!"
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.No
- end if
- end if
- else
- if gehtnicht=FALSE then
- Kontext "PreviewObjectbar"
- if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
- printlog " Select 'Zoom 100%' in toolbar"
- try
- Massstab.Select 4
- catch
- Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
- endcatch
-
- printlog " Click 'Print Page Preview' in toolbar"
- Kontext "PreviewObjectbar"
- DruckenSeitenansicht.Click
- Kontext "Active"
- if Active.Exists then
- QAErrorlog "No default printer!"
- Active.ok
- Sleep 1
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then DruckenDlg.Cancel
- else
- printlog " Close 'Print' dialog with cancel"
- Kontext "DruckenDlg"
- DruckenDlg.Cancel
- end if
-
- printlog " Click 'Print options page preview' in toolbar"
- Kontext "PreviewObjectbar"
- Skalierung.Click
- printlog " Close 'Print Options' dialog with cancel"
- Kontext "DruckOptionen"
- Call DialogTest ( DruckOptionen )
- DruckOptionen.Cancel
-
- printlog " Close Page Preview with button 'Close Preview' in toolbar"
- Kontext "PreviewObjectbar"
- SeitenansichtSchliessen.Click
- else
- Warnlog "Objectbar not addressable!"
- end if
- end if
-
- printlog " Close active document"
- Call hCloseDocument
- gApplication = "WRITER"
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: w_001a_.inc,v $
+'*
+'* $Revision: 1.2 $
+'*
+'* last change: $Author: vg $ $Date: 2008-08-18 12:40:41 $
+'*
+'* 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.
+'*
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description: Testcases for the Writer Required-test.
+'*
+'\***********************************************************************
+
+sub w_001a_
+
+ printLog Chr(13) + "--------- File Menu (w_001a_.inc) ----------"
+ gApplication = "WRITER"
+
+ Call tFileProperties
+
+ Call tFileTemplatesOrganize
+ Call tFileTemplatesAddressbookSource
+ Call tFileTemplatesSave
+ Call tFileTemplatesEdit
+
+ Call tFilePagePreview
+ Call tPrintCommon()
+ Call tPrintGeneral()
+ Call tPrintApplication()
+ Call tPrintLayout()
+ Call tPrintOptions()
+ Call tFilePrinterSetup
+
+ 'Writer Master Document
+ gApplication = "MASTERDOCUMENT"
+ Call tMasterDocFilePagePreview
+ gApplication = "WRITER"
+
+end sub
+
+'-----------------------------------------------------------
+
+testcase tFileProperties
+ PrintLog "- File / Properties"
+
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " File / Properties"
+ FileProperties
+
+ WaitSlot(5000)
+ Kontext
+ try
+ active.SetPage TabDokument
+ catch
+ Warnlog "Dialog 'FileProperties' not up! (Bug#99828)"
+ goto endsub
+ endcatch
+
+ printlog " Switch to Tabpage 'General'"
+ Kontext "TabDokument"
+ Call DialogTest (TabDokument)
+
+ printlog " Switch to Tabpage 'Description'"
+ Kontext
+ active.SetPage TabDokumentinfo
+ Kontext "TabDokumentinfo"
+ Call DialogTest (TabDokumentinfo)
+
+
+ QAErrorlog "#i95523# - FileProperties - Tabpage 'User Defined' has changed. - Adaption of testcases needed."
+ ' printlog " Switch to Tabpage 'User defined'"
+ ' Kontext
+ ' active.SetPage TabBenutzer
+ ' Kontext "TabBenutzer"
+ ' Call DialogTest ( TabBenutzer )
+
+ ' Wait 500
+
+ ' Infofelder.Click
+ ' printlog " Click 'Infofields'"
+ ' Kontext "InfonamenBearbeiten"
+ ' printlog " Close upcoming dialog with 'Cancel'"
+ ' Call DialogTest (InfonamenBearbeiten)
+ ' InfonamenBearbeiten.Cancel
+
+ printlog " Switch to Tabpage 'Internet'"
+ Kontext
+ active.SetPage TabInternet
+ Kontext "TabInternet"
+ Call DialogTest (TabInternet)
+
+ printlog " Switch to Tabpage 'Statistics' and close dialog"
+ Kontext
+ active.SetPage TabStatistik
+ Kontext "TabStatistik"
+ Call DialogTest (TabStatistik)
+ TabStatistik.Close
+
+ Sleep 1
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesOrganize
+ Dim i as integer
+
+ PrintLog " Open new document."
+ Call hNewDocument
+ PrintLog " File / Templates / Organize"
+ FileTemplatesOrganize
+ Kontext "DVVerwalten"
+ For i = 1 to 50
+ if DVVerwalten.Exists then
+ i = 51
+ else
+ Sleep 5
+ end if
+ next i
+ if Not DVVerwalten.Exists then
+ Warnlog "Dialog 'Template Management' not up !"
+ Call hCloseDocument
+ goto endsub
+ end if
+ wait 500
+ PrintLog " Select first entry in left list of dialog 'Template Management' (should be 'My Templates')"
+ ListeLinks.Select 1
+ ListeLinks.TypeKeys "<Home>"
+ Sleep 1
+ Befehle.Click
+ wait 500
+ PrintLog " Select 'Commands -> Import Template'"
+ Call hMenuSelectNr(3)
+ Wait 500
+ PrintLog " Close Filedialog."
+ if gUseSysDlg = False then
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists then
+ OeffnenDlg.Cancel
+ else
+ Warnlog "FileOpen dialog not up!"
+ end if
+ end if
+
+ PrintLog " Select 'Commands -> Printer Settings"
+ Kontext "DVVerwalten"
+ Sleep 1
+ Befehle.Click
+ wait 500
+ Call hMenuSelectNr(4)
+
+ PrintLog " Cancel 'Printer-Setup' dialog"
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ DruckerEinrichten.Cancel
+ else
+ Warnlog "Printersettings dialog is not up!"
+ end if
+
+ PrintLog " Select first entry in right list"
+ Kontext "DVVerwalten"
+ ListeRechts.Select 1
+
+ PrintLog " Select pushbutton 'File..'"
+ if WelcheDatei.IsEnabled then
+ WelcheDatei.Click
+ if gUseSysDlg = False then
+ PrintLog " Cancel Filedialog"
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+ end if
+
+ PrintLog " Select pushbutton 'Address Book'"
+ Kontext "DVVerwalten"
+ AddressBook.Click
+ Kontext "AddressbookSource"
+ PrintLog " Cancel Dialog 'Address Book-Assignment'"
+ if AddressbookSource.Exists then
+ AddressbookSource.Cancel
+ else
+ Warnlog "the Dialog ' Address Book Source' wasnt up!"
+ end if
+
+ PrintLog " Close dialog"
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+
+ PrintLog " Close active document."
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesAddressbookSource
+
+ PrintLog " Open new document"
+ Call hNewDocument
+
+ PrintLog " File / Templates /Address Book Source..."
+ UseBindings
+ FileTemplatesAddressbookSource
+
+ WaitSlot(2000)
+ PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'"
+ Kontext "AddressbookSource"
+ if AddressbookSource.Exists then
+ Call DialogTest (AddressbookSource)
+ Administrate.Click
+ Sleep 2
+ PrintLog " Close 'Data Source Administration' with 'Cancel'"
+ Kontext "DatabaseProperties"
+ if Not DatabaseProperties.Exists then
+ Kontext "AddressSourceAutopilot"
+ if AddressSourceAutopilot.Exists then
+ AddressSourceAutopilot.Cancel
+ end if
+ Kontext "AddressbookSource"
+ AddressbookSource.Cancel
+ else
+ PrintLog " DatabaseProperties.SetPage TabConnection"
+ Kontext "TabConnection"
+ Call DialogTest ( TabConnection )
+ Kontext "DatabaseProperties"
+ DatabaseProperties.Close
+ Kontext "AddressbookSource"
+ PrintLog " Close dialog"
+ AddressbookSource.Cancel
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesSave
+ if gApplication = "MASTERDOCUMENT" then
+ qaErrorLog " tFileTemplatesSave has been disabled in Masterdocument."
+ goto endsub
+ end if
+ printlog "- File / Templates / Save"
+ Call hNewDocument
+ printlog " Open new document"
+ FileTemplatesSave
+ printlog " File / Templates / Save"
+
+ Kontext "DokumentVorlagen"
+ Call DialogTest ( DokumentVorlagen )
+ printlog " On 'Templates' dialog click 'Organizer'"
+
+ Verwalten.Click
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+ printlog " Close dialog 'Template Management'"
+
+ Kontext "DokumentVorlagen"
+ DokumentVorlagen.Cancel
+ printlog " Close 'Templates' dialog"
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFileTemplatesEdit
+ printlog "- File / Templates / Edit"
+
+ printlog " Open new document"
+ Call hNewDocument
+ printlog " File / Templates / Edit"
+ FileTemplatesEdit
+
+ if gUseSysDlg = False then
+ printlog " Cancel Filedialog"
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFilePagePreview
+ PrintLog "- File / Page Preview"
+ Dim gehtnicht as boolean
+ gehtnicht = FALSE
+ printlog " Open new document"
+ Select Case gApplication
+ Case "WRITER"
+ Call hNewDocument
+
+ Case "MASTERDOCUMENT"
+ Call hNewDocument
+
+ Case "HTML"
+ printlog "Not in Writer/Web!"
+ goto endsub
+ end select
+
+ printlog " Enter some text in document"
+ Call wTypeKeys("Just a small change!")
+ printlog " File / Page Preview"
+ FilePageView
+ WaitSlot (1000)
+ Kontext "DocPageViewWriter"
+ if DocPageViewWriter.NotExists then
+ Warnlog "Page Preview is not coming up!"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if
+ else
+ if gehtnicht=FALSE then
+ Kontext "PreviewObjectbar"
+ if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
+ printlog " Select 'Zoom 100%' in toolbar"
+ try
+ Massstab.Select 4
+ catch
+ Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
+ endcatch
+
+ printlog " Click 'Print Page Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ DruckenSeitenansicht.Click
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog "No default printer!"
+ Active.ok
+ Sleep 1
+ Kontext "Printing"
+ if Printing.Exists then Printing.Cancel
+ else
+ printlog " Close 'Print' dialog with cancel"
+ Kontext "Printing"
+ Printing.Cancel
+ end if
+
+ printlog " Close Page Preview with button 'Close Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ SeitenansichtSchliessen.Click
+ else
+ Warnlog "Objectbar not addressable!"
+ end if
+ end if
+ printlog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tFilePrinterSetup
+ PrintLog " Open new document"
+ Call hNewDocument
+
+ PrintLog " File / Printer Settings"
+ FilePrintersettings
+ Kontext "Active"
+ WaitSlot(1000)
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorLog "No Default Printer!"
+ Active.Ok
+ Sleep 2
+ Kontext "DruckerEinrichten"
+ if DruckerEinrichten.Exists then
+ Call DialogTest ( DruckerEinrichten )
+ DruckerEinrichten.Cancel
+ end if
+ end if
+ else
+ Kontext "DruckerEinrichten"
+ Call DialogTest ( DruckerEinrichten )
+ DruckerEinrichten.Cancel
+ PrintLog " Cancel 'Printer Setup' dialog"
+ end if
+ PrintLog " Close active document"
+ Call hCloseDocument
+endcase
+
+'-----------------------------------------------------------
+
+testcase tMasterDocFilePagePreview
+ PrintLog "- File / Page Preview"
+ Dim gehtnicht as boolean
+ gehtnicht = FALSE
+ gApplication = "MASTERDOCUMENT"
+ printlog " Open new document"
+ Call hNewDocument
+
+ printlog " Enter some text in document"
+ Call wTypeKeys("Just a small change!")
+ printlog " File / Page Preview"
+ FilePageView
+ WaitSlot (1000)
+ Kontext "DocPageViewWriter"
+ if DocPageViewWriter.NotExists then
+ Warnlog "Page Preview is not coming up!"
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.No
+ end if
+ end if
+ else
+ if gehtnicht=FALSE then
+ Kontext "PreviewObjectbar"
+ if PreviewObjectbar.Exists = False then Call hToolbarSelect("PagePreview", true)
+ printlog " Select 'Zoom 100%' in toolbar"
+ try
+ Massstab.Select 4
+ catch
+ Warnlog "Unable to change Zoom factor in toolbar! (Bug#110498)"
+ endcatch
+
+ printlog " Click 'Print Page Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ DruckenSeitenansicht.Click
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog "No default printer!"
+ Active.ok
+ Sleep 1
+ Kontext "Printing"
+ if Printing.Exists then Printing.Cancel
+ else
+ printlog " Close 'Print' dialog with cancel"
+ Kontext "Printing"
+ Printing.Cancel
+ end if
+
+ printlog " Close Page Preview with button 'Close Preview' in toolbar"
+ Kontext "PreviewObjectbar"
+ SeitenansichtSchliessen.Click
+ else
+ Warnlog "Objectbar not addressable!"
+ end if
+ end if
+
+ printlog " Close active document"
+ Call hCloseDocument
+ gApplication = "WRITER"
+endcase
diff --git a/testautomation/writer/required/includes/w_011_.inc b/testautomation/writer/required/includes/w_011_.inc
index d08875f48541..707615b1bffd 100755
--- a/testautomation/writer/required/includes/w_011_.inc
+++ b/testautomation/writer/required/includes/w_011_.inc
@@ -458,7 +458,7 @@ testcase tZORest
Call hNewDocument
printlog "Insert a draw object ( rectangle )"
Call wZeichenobjektEinfuegen ( "Rechteck", 30, 30, 50, 60 )
- Call gMouseClick ( 25, 25 )
+ Call gMouseClick ( 50, 25 )
printlog "Select drawing object with shortcut 'Shift F4'"
Call wTypeKeys ( "<Shift F4>" )
diff --git a/testautomation/writer/required/w_updt.bas b/testautomation/writer/required/w_updt.bas
index 992a4cc9f194..a52335d47e37 100755
--- a/testautomation/writer/required/w_updt.bas
+++ b/testautomation/writer/required/w_updt.bas
@@ -58,7 +58,7 @@ sub main
use "writer\required\includes\w_010_1.inc"
use "writer\required\includes\w_011_.inc"
use "writer\required\includes\w_020_.inc"
-
+
Printlog "******* Ressource-Test Writer Document *******"
Call wChangeDefaultView()
@@ -89,7 +89,10 @@ sub LoadIncludeFiles
use "global\system\includes\gvariabl.inc"
use "global\required\includes\g_001.inc"
use "global\required\includes\g_option.inc" ' global subroutines for Tools / Options
+ use "global\required\includes\g_printing.inc"
use "global\tools\includes\optional\t_xml_filter1.inc" ' global routines for XML-functionality
+ use "global\tools\includes\optional\t_docfuncs.inc"
+ use "global\tools\includes\optional\t_control_objects.inc"
gApplication = "WRITER"
GetUseFiles ()
diff --git a/testautomation/writer/tools/includes/w_tools.inc b/testautomation/writer/tools/includes/w_tools.inc
index 63e7e3a8ef7d..41d6b98eaeac 100755
--- a/testautomation/writer/tools/includes/w_tools.inc
+++ b/testautomation/writer/tools/includes/w_tools.inc
@@ -917,7 +917,6 @@ sub wOptionsUndo ( sOption$ )
WeichesScrollen.Uncheck
' Display
GrafikenUndObjekte.Check
- Tabellen.Check
Zeichnungen.Check
Feldname.Uncheck
Notizen.Check
@@ -981,20 +980,17 @@ sub wOptionsUndo ( sOption$ )
Call hToolsOptions("WRITER","Print")
' Contents
Grafiken.Check
- Tabellen.Check
- Zeichnungen.Check
Kontrollfelder.Check
Hintergrund.Check
SchwarzDrucken.Uncheck
' Pages
LinkeSeiten.Check
RechteSeiten.Check
- Umgekehrt.Uncheck
Prospekt.Uncheck
' Notes
Keine.Check
' Other
- EinzelneDruckauftraege.Uncheck
+ LeereSeitenDrucken.Check
AusDruckereinstellung.Uncheck
Fax.SetNoSelection
end if
diff --git a/toolkit/inc/toolkit/awt/vclxprinter.hxx b/toolkit/inc/toolkit/awt/vclxprinter.hxx
index e94864b51280..4db43a3c5d77 100644
--- a/toolkit/inc/toolkit/awt/vclxprinter.hxx
+++ b/toolkit/inc/toolkit/awt/vclxprinter.hxx
@@ -43,9 +43,7 @@
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
#include <cppuhelper/propshlp.hxx>
-class Printer;
-class String;
-
+#include "vcl/oldprintadaptor.hxx"
// Fuer den Drucker relevante Properties:
/*
@@ -65,20 +63,17 @@ class VCLXPrinterPropertySet : public ::com::sun::star::awt::XPrinterPropertySe
public MutexAndBroadcastHelper,
public ::cppu::OPropertySetHelper
{
-private:
- Printer* mpPrinter;
+protected:
+ boost::shared_ptr<Printer> mpPrinter;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > mxPrnDevice;
sal_Int16 mnOrientation;
sal_Bool mbHorizontal;
-
-protected:
-
public:
VCLXPrinterPropertySet( const String& rPrinterName );
virtual ~VCLXPrinterPropertySet();
- Printer* GetPrinter() const { return mpPrinter; }
+ Printer* GetPrinter() const { return mpPrinter.get(); }
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > GetDevice();
// ::com::sun::star::uno::XInterface
@@ -120,6 +115,8 @@ class VCLXPrinter: public ::com::sun::star::awt::XPrinter,
public VCLXPrinterPropertySet,
public ::cppu::OWeakObject
{
+ boost::shared_ptr<vcl::OldStylePrintAdaptor> mpListener;
+ JobSetup maInitJobSetup;
public:
VCLXPrinter( const String& rPrinterName );
~VCLXPrinter();
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index 69d8dd827497..a8059463a297 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -102,10 +102,10 @@ IMPL_XTYPEPROVIDER_END
VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName )
: OPropertySetHelper( BrdcstHelper )
+ , mpPrinter( new Printer( rPrinterName ) )
{
osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() );
- mpPrinter = new Printer( rPrinterName );
mnOrientation = 0;
mbHorizontal = sal_False;
}
@@ -113,8 +113,7 @@ VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName )
VCLXPrinterPropertySet::~VCLXPrinterPropertySet()
{
osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() );
-
- delete mpPrinter;
+ mpPrinter.reset();
}
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinterPropertySet::GetDevice()
@@ -326,13 +325,16 @@ IMPL_XTYPEPROVIDER_START( VCLXPrinter )
VCLXPrinterPropertySet::getTypes()
IMPL_XTYPEPROVIDER_END
-sal_Bool VCLXPrinter::start( const ::rtl::OUString& rJobName, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+sal_Bool VCLXPrinter::start( const ::rtl::OUString& /*rJobName*/, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
::osl::Guard< ::osl::Mutex > aGuard( Mutex );
sal_Bool bDone = sal_True;
- if ( GetPrinter() )
- bDone = GetPrinter()->StartJob( rJobName );
+ if ( mpListener.get() )
+ {
+ maInitJobSetup = mpPrinter->GetJobSetup();
+ mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
+ }
return bDone;
}
@@ -341,24 +343,28 @@ void VCLXPrinter::end( ) throw(::com::sun::star::awt::PrinterException, ::com::
{
::osl::Guard< ::osl::Mutex > aGuard( Mutex );
- if ( GetPrinter() )
- GetPrinter()->EndJob();
+ if ( mpListener.get() )
+ {
+ Printer::PrintJob( mpListener, maInitJobSetup );
+ mpListener.reset();
+ }
}
void VCLXPrinter::terminate( ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::Guard< ::osl::Mutex > aGuard( Mutex );
- if ( GetPrinter() )
- GetPrinter()->AbortJob();
+ mpListener.reset();
}
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinter::startPage( ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException)
{
::osl::Guard< ::osl::Mutex > aGuard( Mutex );
- if ( GetPrinter() )
- GetPrinter()->StartPage();
+ if ( mpListener.get() )
+ {
+ mpListener->StartPage();
+ }
return GetDevice();
}
@@ -366,8 +372,10 @@ void VCLXPrinter::endPage( ) throw(::com::sun::star::awt::PrinterException, ::c
{
::osl::Guard< ::osl::Mutex > aGuard( Mutex );
- if ( GetPrinter() )
- GetPrinter()->EndPage();
+ if ( mpListener.get() )
+ {
+ mpListener->EndPage();
+ }
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 7757d170256a..e41de1e8bd25 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -3390,6 +3390,7 @@ void VCLXEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_PAINTTRANSPARENT,
BASEPROPERTY_AUTOHSCROLL,
BASEPROPERTY_AUTOVSCROLL,
+ BASEPROPERTY_VERTICALALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
0);
@@ -4283,6 +4284,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_ENFORCE_FORMAT,
BASEPROPERTY_TEXT,
BASEPROPERTY_HIDEINACTIVESELECTION,
+ BASEPROPERTY_VERTICALALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
@@ -4624,6 +4626,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_ENFORCE_FORMAT,
BASEPROPERTY_TEXT,
BASEPROPERTY_HIDEINACTIVESELECTION,
+ BASEPROPERTY_VERTICALALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
@@ -4927,6 +4930,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_VALUE_DOUBLE,
BASEPROPERTY_ENFORCE_FORMAT,
BASEPROPERTY_HIDEINACTIVESELECTION,
+ BASEPROPERTY_VERTICALALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
@@ -5521,6 +5525,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_VALUE_DOUBLE,
BASEPROPERTY_ENFORCE_FORMAT,
BASEPROPERTY_HIDEINACTIVESELECTION,
+ BASEPROPERTY_VERTICALALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
@@ -5868,6 +5873,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_TABSTOP,
BASEPROPERTY_TEXT,
BASEPROPERTY_HIDEINACTIVESELECTION,
+ BASEPROPERTY_VERTICALALIGN,
BASEPROPERTY_WRITING_MODE,
BASEPROPERTY_CONTEXT_WRITING_MODE,
BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR,
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 6171067f1185..5ac7a0237479 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -160,6 +160,7 @@ namespace toolkit
ImplRegisterProperty( BASEPROPERTY_TEXTCOLOR );
ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION );
ImplRegisterProperty( BASEPROPERTY_ENFORCE_FORMAT );
+ ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN );
ImplRegisterProperty( BASEPROPERTY_WRITING_MODE );
ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE );
ImplRegisterProperty( BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR );
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 3abacef7b67f..9e508c884f59 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -476,6 +476,7 @@ void UnoEditControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) t
// ----------------------------------------------------
UnoControlFileControlModel::UnoControlFileControlModel()
{
+ ImplRegisterProperty( BASEPROPERTY_ALIGN );
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
@@ -489,6 +490,7 @@ UnoControlFileControlModel::UnoControlFileControlModel()
ImplRegisterProperty( BASEPROPERTY_READONLY );
ImplRegisterProperty( BASEPROPERTY_TABSTOP );
ImplRegisterProperty( BASEPROPERTY_TEXT );
+ ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN );
ImplRegisterProperty( BASEPROPERTY_WRITING_MODE );
ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE );
ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION );
diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index 46fd8947e21b..9de3cc172e70 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -35,6 +35,9 @@
#include <tools/list.hxx>
#include <tools/string.hxx>
+#include <vector>
+#include <set>
+
//------------------------------------------------------------------
#ifdef _SV_MULTISEL_CXX
@@ -112,4 +115,105 @@ public:
const Range& GetRange( ULONG nRange ) const { return *(const Range*)aSels.GetObject(nRange); }
};
+class TOOLS_DLLPUBLIC StringRangeEnumerator
+{
+ struct Range
+ {
+ sal_Int32 nFirst;
+ sal_Int32 nLast;
+
+ Range() : nFirst( -1 ), nLast( -1 ) {}
+ Range( sal_Int32 i_nFirst, sal_Int32 i_nLast ) : nFirst( i_nFirst ), nLast( i_nLast ) {}
+ };
+ std::vector< StringRangeEnumerator::Range > maSequence;
+ sal_Int32 mnCount;
+ sal_Int32 mnMin;
+ sal_Int32 mnMax;
+ sal_Int32 mnOffset;
+
+ bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool bMayAdjust );
+ bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const;
+public:
+ class TOOLS_DLLPUBLIC Iterator
+ {
+ const StringRangeEnumerator* pEnumerator;
+ const std::set< sal_Int32 >* pPossibleValues;
+ sal_Int32 nRangeIndex;
+ sal_Int32 nCurrent;
+
+ friend class StringRangeEnumerator;
+ Iterator( const StringRangeEnumerator* i_pEnum,
+ const std::set< sal_Int32 >* i_pPossibleValues,
+ sal_Int32 i_nRange,
+ sal_Int32 i_nCurrent )
+ : pEnumerator( i_pEnum ), pPossibleValues( i_pPossibleValues )
+ , nRangeIndex( i_nRange ), nCurrent( i_nCurrent ) {}
+ public:
+ Iterator() : pEnumerator( NULL ), pPossibleValues( NULL ), nRangeIndex( -1 ), nCurrent( -1 ) {}
+ Iterator& operator++();
+ sal_Int32 operator*() const;
+ bool operator==(const Iterator&) const;
+ bool operator!=(const Iterator& i_rComp) const
+ { return ! (*this == i_rComp); }
+ };
+
+ friend class StringRangeEnumerator::Iterator;
+
+ StringRangeEnumerator() : mnCount( 0 ), mnMin( -1 ), mnMax( -1 ), mnOffset( -1 ) {}
+ StringRangeEnumerator( const rtl::OUString& i_rInput,
+ sal_Int32 i_nMinNumber = -1,
+ sal_Int32 i_nMaxNumber = -1,
+ sal_Int32 i_nLogicalOffset = -1
+ );
+
+ size_t size() const { return size_t(mnCount); }
+ Iterator begin( const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const;
+ Iterator end( const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const;
+
+ sal_Int32 getMin() const { return mnMin; }
+ void setMin( sal_Int32 i_nMinValue ) { mnMin = i_nMinValue; }
+ sal_Int32 getMax() const { return mnMax; }
+ void setMax( sal_Int32 i_nMaxValue ) { mnMax = i_nMaxValue; }
+ sal_Int32 getLogicalOffset() const { return mnOffset; }
+ void setLogicalOffset( sal_Int32 i_nOffset ) { mnOffset = i_nOffset; }
+
+ bool setRange( const rtl::OUString& i_rNewRange, bool i_bStrict = false );
+ bool hasValue( sal_Int32 nValue, const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const;
+
+
+ /**
+ i_rPageRange: the string to be changed into a sequence of numbers
+ valid format example "5-3,9,9,7-8" ; instead of ',' ';' or ' ' are allowed as well
+ o_rPageVector: the output sequence of numbers
+ i_nLogicalOffset: an offset to be applied to each number in the string before inserting it in the resulting sequence
+ example: a user enters page numbers from 1 to n (since that is logical)
+ of course usable page numbers in code would start from 0 and end at n-1
+ so the logical offset would be -1
+ i_nMinNumber: the minimum allowed number, a negative number means no minimum check
+ i_nMaxNumber: the maximum allowed number, a negative number means no maximum check
+
+ @returns: true if the input string was valid, o_rPageVector will contain the resulting sequence
+ false if the input string was invalid, o_rPageVector will be unchanged
+
+ behavior:
+ - only non-negative sequence numbers are allowed
+ - only non-negative values in the input string are allowed
+ - the string "-3" will be either
+ * an error if no minimum is given
+ * or result in the sequence i_nMinNumber to 3
+ - the string "3-" will be either
+ * an error if no maximum is given
+ * or result in the seqeuence 3 to i_nMaxNumber
+ - an empty string as input is valid and will result in the range [min,max] if given
+ or an empty vector, if not
+ */
+ static bool getRangesFromString( const rtl::OUString& i_rPageRange,
+ std::vector< sal_Int32 >& o_rPageVector,
+ sal_Int32 i_nMinNumber = -1,
+ sal_Int32 i_nMaxNumber = -1,
+ sal_Int32 i_nLogicalOffset = -1,
+ std::set< sal_Int32 >* i_pPossibleValues = NULL
+ );
+};
+
#endif // _SV_MULTISEL_HXX
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index bacaac89fe44..23496322fa4c 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -776,6 +776,9 @@ class TOOLS_DLLPUBLIC SvMemoryStream : public SvStream
SvMemoryStream (const SvMemoryStream&);
SvMemoryStream & operator= (const SvMemoryStream&);
+ friend class SvCacheStream;
+ sal_Size GetSize() const { return nSize; }
+
protected:
sal_Size nSize;
sal_Size nResize;
@@ -817,7 +820,7 @@ public:
virtual void ResetError();
- sal_Size GetSize() const { return nSize; }
+ sal_Size GetEndOfData() const { return nEndOfData; }
const void* GetData() { Flush(); return pBuf; }
operator const void*() { Flush(); return pBuf; }
virtual sal_uInt16 IsA() const;
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index f7ffed5e4dd1..e0f711bd2883 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1022,16 +1022,14 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef,
if (pEnd - pPos >= 2 && pPos[0] == '/' && pPos[1] == '/')
{
sal_Unicode const * p1 = pPos + 2;
- if (
- p1 == pEnd || *p1 == nFragmentDelimiter || *p1 == '/' ||
- (
- (
- scanDomain(p1, pEnd) > 0 ||
- scanIPv6reference(p1, pEnd)
- ) &&
- (p1 == pEnd || *p1 == nFragmentDelimiter || *p1 == '/')
- )
- )
+ while (p1 != pEnd && *p1 != '/' &&
+ *p1 != nFragmentDelimiter)
+ {
+ ++p1;
+ }
+ if (parseHostOrNetBiosName(
+ pPos + 2, p1, bOctets, ENCODE_ALL,
+ RTL_TEXTENCODING_DONTKNOW, true, NULL))
{
aSynAbsURIRef.
appendAscii(RTL_CONSTASCII_STRINGPARAM("//"));
diff --git a/tools/source/memtools/makefile.mk b/tools/source/memtools/makefile.mk
index 037dadbf4a46..51d831ec0fed 100644
--- a/tools/source/memtools/makefile.mk
+++ b/tools/source/memtools/makefile.mk
@@ -47,6 +47,8 @@ SLOFILES= $(SLO)$/contnr.obj \
$(SLO)$/mempool.obj \
$(SLO)$/multisel.obj
+EXCEPTIONSFILES= $(SLO)$/multisel.obj $(OBJ)$/multisel.obj
+
OBJFILES= $(OBJ)$/contnr.obj \
$(OBJ)$/table.obj \
$(OBJ)$/unqidx.obj \
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 6b32badc283e..5fe920b6998a 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -41,12 +41,16 @@
#include <tools/debug.hxx>
#include <tools/multisel.hxx>
+#include "rtl/ustrbuf.hxx"
+
#ifdef MI_DEBUG
#define DBG(x) x
#else
#define DBG(x)
#endif
+using namespace rtl;
+
//==================================================================
#ifdef MI_DEBUG
@@ -865,3 +869,297 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
bCurValid = FALSE;
nCurIndex = 0;
}
+
+// -----------------------------------------------------------------------
+//
+// StringRangeEnumerator
+//
+// -----------------------------------------------------------------------
+StringRangeEnumerator::StringRangeEnumerator( const rtl::OUString& i_rInput,
+ sal_Int32 i_nMinNumber,
+ sal_Int32 i_nMaxNumber,
+ sal_Int32 i_nLogicalOffset
+ )
+ : mnCount( 0 )
+ , mnMin( i_nMinNumber )
+ , mnMax( i_nMaxNumber )
+ , mnOffset( i_nLogicalOffset )
+{
+ setRange( i_rInput );
+}
+
+bool StringRangeEnumerator::checkValue( sal_Int32 i_nValue, const std::set< sal_Int32 >* i_pPossibleValues ) const
+{
+ if( mnMin >= 0 && i_nValue < mnMin )
+ return false;
+ if( mnMax >= 0 && i_nValue > mnMax )
+ return false;
+ if( i_nValue < 0 )
+ return false;
+ if( i_pPossibleValues && i_pPossibleValues->find( i_nValue ) == i_pPossibleValues->end() )
+ return false;
+ return true;
+}
+
+bool StringRangeEnumerator::insertRange( sal_Int32 i_nFirst, sal_Int32 i_nLast, bool bSequence, bool bMayAdjust )
+{
+ bool bSuccess = true;
+ if( bSequence )
+ {
+ if( i_nFirst == -1 )
+ i_nFirst = mnMin;
+ if( i_nLast == -1 )
+ i_nLast = mnMax;
+ if( bMayAdjust )
+ {
+ if( i_nFirst < mnMin )
+ i_nFirst = mnMin;
+ if( i_nFirst > mnMax )
+ i_nFirst = mnMax;
+ if( i_nLast < mnMin )
+ i_nLast = mnMin;
+ if( i_nLast > mnMax )
+ i_nLast = mnMax;
+ }
+ if( checkValue( i_nFirst ) && checkValue( i_nLast ) )
+ {
+ maSequence.push_back( Range( i_nFirst, i_nLast ) );
+ sal_Int32 nNumber = i_nLast - i_nFirst;
+ nNumber = nNumber < 0 ? -nNumber : nNumber;
+ mnCount += nNumber + 1;
+ }
+ else
+ bSuccess = false;
+ }
+ else
+ {
+ if( i_nFirst >= 0 )
+ {
+ if( checkValue( i_nFirst ) )
+ {
+ maSequence.push_back( Range( i_nFirst, i_nFirst ) );
+ mnCount++;
+ }
+ else
+ bSuccess = false;
+ }
+ if( i_nLast >= 0 )
+ {
+ if( checkValue( i_nLast ) )
+ {
+ maSequence.push_back( Range( i_nLast, i_nLast ) );
+ mnCount++;
+ }
+ else
+ bSuccess = false;
+ }
+ }
+
+ return bSuccess;
+}
+
+bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange, bool i_bStrict )
+{
+ mnCount = 0;
+ maSequence.clear();
+
+ // we love special cases
+ if( i_rNewRange.getLength() == 0 )
+ {
+ if( mnMin >= 0 && mnMax >= 0 )
+ {
+ insertRange( mnMin, mnMax, mnMin != mnMax, ! i_bStrict );
+ }
+ return true;
+ }
+
+ const sal_Unicode* pInput = i_rNewRange.getStr();
+ rtl::OUStringBuffer aNumberBuf( 16 );
+ sal_Int32 nLastNumber = -1, nNumber = -1;
+ bool bSequence = false;
+ bool bSuccess = true;
+ while( *pInput )
+ {
+ while( *pInput >= sal_Unicode('0') && *pInput <= sal_Unicode('9') )
+ aNumberBuf.append( *pInput++ );
+ if( aNumberBuf.getLength() )
+ {
+ if( nNumber != -1 )
+ {
+ if( bSequence )
+ {
+ if( ! insertRange( nLastNumber, nNumber, true, ! i_bStrict ) && i_bStrict )
+ {
+ bSuccess = false;
+ break;
+ }
+ nLastNumber = -1;
+ }
+ else
+ {
+ if( ! insertRange( nNumber, nNumber, false, ! i_bStrict ) && i_bStrict )
+ {
+ bSuccess = false;
+ break;
+ }
+ }
+ }
+ nNumber = aNumberBuf.makeStringAndClear().toInt32();
+ nNumber += mnOffset;
+ }
+ bool bInsertRange = false;
+ if( *pInput == sal_Unicode('-') )
+ {
+ nLastNumber = nNumber;
+ nNumber = -1;
+ bSequence = true;
+ }
+ else if( *pInput == ' ' )
+ {
+ }
+ else if( *pInput == sal_Unicode(',') || *pInput == sal_Unicode(';') )
+ bInsertRange = true;
+ else if( *pInput )
+ {
+
+ bSuccess = false;
+ break; // parse error
+ }
+
+ if( bInsertRange )
+ {
+ if( ! insertRange( nLastNumber, nNumber, bSequence, ! i_bStrict ) && i_bStrict )
+ {
+ bSuccess = false;
+ break;
+ }
+ nNumber = nLastNumber = -1;
+ bSequence = false;
+ }
+ if( *pInput )
+ pInput++;
+ }
+ // insert last entries
+ insertRange( nLastNumber, nNumber, bSequence, ! i_bStrict );
+
+ return bSuccess;
+}
+
+bool StringRangeEnumerator::hasValue( sal_Int32 i_nValue, const std::set< sal_Int32 >* i_pPossibleValues ) const
+{
+ if( i_pPossibleValues && i_pPossibleValues->find( i_nValue ) == i_pPossibleValues->end() )
+ return false;
+ size_t n = maSequence.size();
+ for( size_t i= 0; i < n; ++i )
+ {
+ const StringRangeEnumerator::Range rRange( maSequence[i] );
+ if( rRange.nFirst < rRange.nLast )
+ {
+ if( i_nValue >= rRange.nFirst && i_nValue <= rRange.nLast )
+ return true;
+ }
+ else
+ {
+ if( i_nValue >= rRange.nLast && i_nValue <= rRange.nFirst )
+ return true;
+ }
+ }
+ return false;
+}
+
+StringRangeEnumerator::Iterator& StringRangeEnumerator::Iterator::operator++()
+{
+ if( nRangeIndex >= 0 && nCurrent >= 0 && pEnumerator )
+ {
+ const StringRangeEnumerator::Range& rRange( pEnumerator->maSequence[nRangeIndex] );
+ bool bRangeChange = false;
+ if( rRange.nLast < rRange.nFirst )
+ {
+ // backward range
+ if( nCurrent > rRange.nLast )
+ nCurrent--;
+ else
+ bRangeChange = true;
+ }
+ else
+ {
+ // forward range
+ if( nCurrent < rRange.nLast )
+ nCurrent++;
+ else
+ bRangeChange = true;
+ }
+ if( bRangeChange )
+ {
+ nRangeIndex++;
+ if( size_t(nRangeIndex) == pEnumerator->maSequence.size() )
+ {
+ // reached the end
+ nRangeIndex = nCurrent = -1;
+ }
+ else
+ nCurrent = pEnumerator->maSequence[nRangeIndex].nFirst;
+ }
+ if( nRangeIndex != -1 && nCurrent != -1 )
+ {
+ if( ! pEnumerator->checkValue( nCurrent, pPossibleValues ) )
+ return ++(*this);
+ }
+ }
+ return *this;
+}
+
+sal_Int32 StringRangeEnumerator::Iterator::operator*() const
+{
+ return nCurrent;
+}
+
+bool StringRangeEnumerator::Iterator::operator==( const Iterator& i_rCompare ) const
+{
+ return i_rCompare.pEnumerator == pEnumerator && i_rCompare.nRangeIndex == nRangeIndex && i_rCompare.nCurrent == nCurrent;
+}
+
+StringRangeEnumerator::Iterator StringRangeEnumerator::begin( const std::set< sal_Int32 >* i_pPossibleValues ) const
+{
+ StringRangeEnumerator::Iterator it( this,
+ i_pPossibleValues,
+ maSequence.empty() ? -1 : 0,
+ maSequence.empty() ? -1 : maSequence[0].nFirst );
+ if( ! checkValue(*it, i_pPossibleValues ) )
+ ++it;
+ return it;
+}
+
+StringRangeEnumerator::Iterator StringRangeEnumerator::end( const std::set< sal_Int32 >* i_pPossibleValues ) const
+{
+ return StringRangeEnumerator::Iterator( this, i_pPossibleValues, -1, -1 );
+}
+
+bool StringRangeEnumerator::getRangesFromString( const OUString& i_rPageRange,
+ std::vector< sal_Int32 >& o_rPageVector,
+ sal_Int32 i_nMinNumber,
+ sal_Int32 i_nMaxNumber,
+ sal_Int32 i_nLogicalOffset,
+ std::set< sal_Int32 >* i_pPossibleValues
+ )
+{
+ StringRangeEnumerator aEnum;
+ aEnum.setMin( i_nMinNumber );
+ aEnum.setMax( i_nMaxNumber );
+ aEnum.setLogicalOffset( i_nLogicalOffset );
+
+ bool bRes = aEnum.setRange( i_rPageRange );
+ if( bRes )
+ {
+ o_rPageVector.clear();
+ o_rPageVector.reserve( aEnum.size() );
+ for( StringRangeEnumerator::Iterator it = aEnum.begin( i_pPossibleValues );
+ it != aEnum.end( i_pPossibleValues ); ++it )
+ {
+ o_rPageVector.push_back( *it );
+ }
+ }
+
+ return bRes;
+}
+
diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx
index a232f8ebdd93..0e9d22081cb4 100644
--- a/tools/workben/urltest.cxx
+++ b/tools/workben/urltest.cxx
@@ -1629,6 +1629,20 @@ main()
rtl::OUString(urlobj.GetMainURL(INetURLObject::NO_DECODE)));
}
+ if (true) { // #i53184#
+ rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("file://comp_name/path"));
+ bSuccess &= assertEqual(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("#i53184# smart INET_PROT_FILE")),
+ INetURLObject(url, INET_PROT_FILE).GetMainURL(
+ INetURLObject::NO_DECODE),
+ url);
+ bSuccess &= assertEqual(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("#i53184# strict")),
+ INetURLObject(url).GetMainURL(INetURLObject::NO_DECODE), url);
+ }
+
if (true) {
rtl::OUString path;
path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/a/b/c"));
diff --git a/transex3/source/inireader.cxx b/transex3/source/inireader.cxx
index 0985e788452d..1ff34fad8e95 100644
--- a/transex3/source/inireader.cxx
+++ b/transex3/source/inireader.cxx
@@ -120,7 +120,7 @@ void INIreader::toStlString( const UnicodeString& str , string& stl_str)
char* buffer = new char[ str.length()*3 ];
str.extract( 0 , str.length() , buffer );
stl_str = string( buffer );
- delete buffer;
+ delete[] buffer;
}
void INIreader::trim( string& str )
diff --git a/unotools/inc/unotools/confignode.hxx b/unotools/inc/unotools/confignode.hxx
index 580274004e1a..2e305030fa2b 100644
--- a/unotools/inc/unotools/confignode.hxx
+++ b/unotools/inc/unotools/confignode.hxx
@@ -88,6 +88,9 @@ namespace utl
/// dtor
~OConfigurationNode() {}
+ /// returns the local name of the node
+ ::rtl::OUString getLocalName() const;
+
/** open a sub node
@param _rPath access path of the to-be-opened sub node. May be a hierarchical path.
*/
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 4b1b9fe272db..56d258461e95 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/util/XStringEscape.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#include <comphelper/extract.hxx>
#include <rtl/string.hxx>
#if OSL_DEBUG_LEVEL > 0
@@ -139,6 +140,22 @@ namespace utl
}
//------------------------------------------------------------------------
+ ::rtl::OUString OConfigurationNode::getLocalName() const
+ {
+ ::rtl::OUString sLocalName;
+ try
+ {
+ Reference< XNamed > xNamed( m_xDirectAccess, UNO_QUERY_THROW );
+ sLocalName = xNamed->getName();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return sLocalName;
+ }
+
+ //------------------------------------------------------------------------
::rtl::OUString OConfigurationNode::normalizeName(const ::rtl::OUString& _rName, NAMEORIGIN _eOrigin) const
{
::rtl::OUString sName(_rName);
@@ -155,13 +172,9 @@ namespace utl
else
sName = xEscaper->unescapeString(sName);
}
- catch(IllegalArgumentException&)
- {
- OSL_ENSURE(sal_False, "OConfigurationNode::normalizeName: illegal argument (caught an exception saying so)!");
- }
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::normalizeName: caught an exception!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
diff --git a/vcl/aqua/inc/aquaprintview.h b/vcl/aqua/inc/aquaprintview.h
index c5ce20c17425..55a85678cd50 100755
--- a/vcl/aqua/inc/aquaprintview.h
+++ b/vcl/aqua/inc/aquaprintview.h
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: aquaprintview.h,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.114.1 $
*
* This file is part of OpenOffice.org.
*
@@ -35,20 +35,36 @@
#include <Cocoa/Cocoa.h>
#include "postmac.h"
-class ImplQPrinter;
+#include "vcl/print.hxx"
+
class AquaSalInfoPrinter;
+struct PrintAccessoryViewState
+{
+ bool bNeedRestart;
+ sal_Int32 nLastPage;
+
+ PrintAccessoryViewState()
+ : bNeedRestart( false ), nLastPage( 0 ) {}
+};
+
@interface AquaPrintView : NSView
{
- ImplQPrinter* mpQPrinter;
- AquaSalInfoPrinter* mpInfoPrinter;
+ vcl::PrinterController* mpController;
+ AquaSalInfoPrinter* mpInfoPrinter;
}
--(id)initWithQPrinter: (ImplQPrinter*)pPrinter withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter;
+-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter;
-(MacOSBOOL)knowsPageRange: (NSRangePointer)range;
-(NSRect)rectForPage: (int)page;
-(NSPoint)locationOfPrintRect: (NSRect)aRect;
-(void)drawRect: (NSRect)rect;
@end
+@interface AquaPrintAccessoryView : NSObject
+{
+}
++(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState;
+@end
+
#endif
diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h
index 4933dbc48586..e835ac773a50 100644
--- a/vcl/aqua/inc/salgdi.h
+++ b/vcl/aqua/inc/salgdi.h
@@ -175,6 +175,9 @@ public:
void RefreshRect(float lX, float lY, float lWidth, float lHeight);
void SetState();
+ void UnsetState();
+ // InvalidateContext does an UnsetState and sets mrContext to 0
+ void InvalidateContext();
virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
diff --git a/vcl/aqua/inc/salprn.h b/vcl/aqua/inc/salprn.h
index ec08261e8321..bf9c3c25bc87 100644
--- a/vcl/aqua/inc/salprn.h
+++ b/vcl/aqua/inc/salprn.h
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: salprn.h,v $
- * $Revision: 1.12 $
+ * $Revision: 1.12.56.1 $
*
* This file is part of OpenOffice.org.
*
@@ -73,8 +73,8 @@ class AquaSalInfoPrinter : public SalInfoPrinter
int mnStartPageOffsetX;
int mnStartPageOffsetY;
- ULONG mnCurPageRangeStart;
- ULONG mnCurPageRangeCount;
+ sal_Int32 mnCurPageRangeStart;
+ sal_Int32 mnCurPageRangeCount;
public:
AquaSalInfoPrinter( const SalPrinterQueueInfo& pInfo );
@@ -96,19 +96,17 @@ class AquaSalInfoPrinter : public SalInfoPrinter
virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData );
- virtual DuplexMode GetDuplexMode( const ImplJobSetup* i_pSetupData );
-
// the artificial separation between InfoPrinter and Printer
// is not really useful for us
// so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter
// and concentrate the real work in one class
// implement pull model print system
- BOOL StartJob( const String* pFileName,
- const String& rAppName,
- ImplJobSetup* pSetupData,
- ImplQPrinter* pQPrinter,
- bool bIsQuickJob );
+ BOOL StartJob( const String* i_pFileName,
+ const String& rJobName,
+ const String& i_rAppName,
+ ImplJobSetup* i_pSetupData,
+ vcl::PrinterController& i_rController );
BOOL EndJob();
BOOL AbortJob();
SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
@@ -117,8 +115,12 @@ class AquaSalInfoPrinter : public SalInfoPrinter
NSPrintInfo* getPrintInfo() const { return mpPrintInfo; }
void setStartPageOffset( int nOffsetX, int nOffsetY ) { mnStartPageOffsetX = nOffsetX; mnStartPageOffsetY = nOffsetY; }
- ULONG getCurPageRangeStart() const { return mnCurPageRangeStart; }
- ULONG getCurPageRangeCount() const { return mnCurPageRangeCount; }
+ sal_Int32 getCurPageRangeStart() const { return mnCurPageRangeStart; }
+ sal_Int32 getCurPageRangeCount() const { return mnCurPageRangeCount; }
+
+ // match width/height against known paper formats, possibly switching orientation
+ const PaperInfo* matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const;
+ void setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation );
private:
AquaSalInfoPrinter( const AquaSalInfoPrinter& );
@@ -139,13 +141,16 @@ class AquaSalPrinter : public SalPrinter
virtual BOOL StartJob( const XubString* i_pFileName,
const XubString& i_rJobName,
const XubString& i_rAppName,
- ULONG i_nCopies, BOOL i_bCollate,
+ ULONG i_nCopies,
+ bool i_bCollate,
+ bool i_bDirect,
ImplJobSetup* i_pSetupData );
// implement pull model print system
- virtual BOOL StartJob( const String* pFileName,
- const String& rAppName,
- ImplJobSetup* pSetupData,
- ImplQPrinter* pQPrinter );
+ virtual BOOL StartJob( const String* i_pFileName,
+ const String& rJobName,
+ const String& i_rAppName,
+ ImplJobSetup* i_pSetupData,
+ vcl::PrinterController& i_rListener );
virtual BOOL EndJob();
virtual BOOL AbortJob();
@@ -162,7 +167,7 @@ const double fPtTo100thMM = 35.27777778;
inline int PtTo10Mu( double nPoints ) { return (int)(((nPoints)*fPtTo100thMM)+0.5); }
-inline double TenMuToPt( double nUnits ) { return (((nUnits)/fPtTo100thMM)+0.5); }
+inline double TenMuToPt( double nUnits ) { return floor(((nUnits)/fPtTo100thMM)+0.5); }
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
new file mode 100644
index 000000000000..798fefef1b25
--- /dev/null
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -0,0 +1,1237 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: aquaprintview.mm,v $
+ * $Revision: 1.5.56.1 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_vcl.hxx"
+
+#include "aquaprintview.h"
+#include "salinst.h"
+#include "vcl/print.hxx"
+#include "vcl/image.hxx"
+#include "vcl/virdev.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/unohelp.hxx"
+
+#include "vcl/svids.hrc"
+
+#include "tools/resary.hxx"
+
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/WordType.hpp"
+
+#include <map>
+
+using namespace vcl;
+using namespace com::sun::star;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::uno;
+
+/* Note: the accesory view as implemented here is already deprecated in Leopard. Unfortunately
+ as long as our baseline is Tiger we cannot gain the advantages over multiple accessory views
+ as well havs having accessory views AND a preview (as long as you are linked vs. 10.4 libraries
+ the preview insists on not being present. This is unfortunate.
+*/
+
+class ControllerProperties;
+
+@interface ControlTarget : NSObject
+{
+ ControllerProperties* mpController;
+}
+-(id)initWithControllerMap: (ControllerProperties*)pController;
+-(void)triggered:(id)pSender;
+-(void)triggeredNumeric:(id)pSender;
+-(void)triggeredPreview:(id)pSender;
+-(void)dealloc;
+@end
+
+
+class ControllerProperties
+{
+ vcl::PrinterController* mpController;
+ std::map< int, rtl::OUString > maTagToPropertyName;
+ std::map< int, sal_Int32 > maTagToValueInt;
+ std::map< NSView*, NSView* > maViewPairMap;
+ std::vector< NSObject* > maViews;
+ int mnNextTag;
+ sal_Int32 mnLastPageCount;
+ PrintAccessoryViewState* mpState;
+ NSPrintOperation* mpOp;
+ NSView* mpAccessoryView;
+ NSTabView* mpTabView;
+ NSBox* mpPreviewBox;
+ NSImageView* mpPreview;
+ NSTextField* mpPageEdit;
+ NSStepper* mpStepper;
+ NSTextView* mpPagesLabel;
+ ResStringArray maLocalizedStrings;
+
+ public:
+ ControllerProperties( vcl::PrinterController* i_pController,
+ NSPrintOperation* i_pOp,
+ NSView* i_pAccessoryView,
+ NSTabView* i_pTabView,
+ PrintAccessoryViewState* i_pState )
+ : mpController( i_pController ),
+ mnNextTag( 0 ),
+ mnLastPageCount( i_pController->getFilteredPageCount() ),
+ mpState( i_pState ),
+ mpOp( i_pOp ),
+ mpAccessoryView( i_pAccessoryView ),
+ mpTabView( i_pTabView ),
+ mpPreviewBox( nil ),
+ mpPreview( nil ),
+ mpPageEdit( nil ),
+ mpStepper( nil ),
+ mpPagesLabel( nil ),
+ maLocalizedStrings( VclResId( SV_PRINT_NATIVE_STRINGS ) )
+ {
+ mpState->bNeedRestart = false;
+ DBG_ASSERT( maLocalizedStrings.Count() >= 4, "resources not found !" );
+ }
+
+ rtl::OUString getMoreString()
+ {
+ return maLocalizedStrings.Count() >= 4
+ ? rtl::OUString( maLocalizedStrings.GetString( 3 ) )
+ : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "More" ) );
+ }
+
+ void updatePrintJob()
+ {
+ // TODO: refresh page count etc from mpController
+
+ // page range may have changed depending on options
+ sal_Int32 nPages = mpController->getFilteredPageCount();
+ #if OSL_DEBUG_LEVEL > 1
+ if( nPages != mnLastPageCount )
+ fprintf( stderr, "trouble: number of pages changed from %ld to %ld !\n", mnLastPageCount, nPages );
+ #endif
+ mpState->bNeedRestart = (nPages != mnLastPageCount);
+ NSTabViewItem* pItem = [mpTabView selectedTabViewItem];
+ if( pItem )
+ mpState->nLastPage = [mpTabView indexOfTabViewItem: pItem];
+ else
+ mpState->nLastPage = 0;
+ mnLastPageCount = nPages;
+ if( mpState->bNeedRestart )
+ {
+ #if 0
+ // Warning: bad hack ahead
+ // Apple does not give us a chance of changing the page count,
+ // and they don't let us cancel the dialog either
+ // hack: send a cancel message to the window displaying our views.
+ // this is ugly.
+ for( std::vector< NSObject* >::iterator it = maViews.begin(); it != maViews.end(); ++it )
+ {
+ if( [*it isKindOfClass: [NSView class]] )
+ {
+ NSView* pView = (NSView*)*it;
+ NSWindow* pWindow = [pView window];
+ if( pWindow )
+ {
+ [pWindow cancelOperation: nil];
+ break;
+ }
+ }
+ }
+ #else
+ NSWindow* pWindow = [NSApp modalWindow];
+ if( pWindow )
+ [pWindow cancelOperation: nil];
+ #endif
+ [[mpOp printInfo] setJobDisposition: NSPrintCancelJob];
+ }
+ else
+ {
+ sal_Int32 nPage = [mpStepper intValue];
+ updatePreviewImage( nPage-1 );
+ }
+ }
+
+ int addNameTag( const rtl::OUString& i_rPropertyName )
+ {
+ int nNewTag = mnNextTag++;
+ maTagToPropertyName[ nNewTag ] = i_rPropertyName;
+ return nNewTag;
+ }
+
+ int addNameAndValueTag( const rtl::OUString& i_rPropertyName, sal_Int32 i_nValue )
+ {
+ int nNewTag = mnNextTag++;
+ maTagToPropertyName[ nNewTag ] = i_rPropertyName;
+ maTagToValueInt[ nNewTag ] = i_nValue;
+ return nNewTag;
+ }
+
+ void addObservedControl( NSObject* i_pView )
+ {
+ maViews.push_back( i_pView );
+ }
+
+ void addViewPair( NSView* i_pLeft, NSView* i_pRight )
+ {
+ maViewPairMap[ i_pLeft ] = i_pRight;
+ maViewPairMap[ i_pRight ] = i_pLeft;
+ }
+
+ NSView* getPair( NSView* i_pLeft ) const
+ {
+ NSView* pRight = nil;
+ std::map< NSView*, NSView* >::const_iterator it = maViewPairMap.find( i_pLeft );
+ if( it != maViewPairMap.end() )
+ pRight = it->second;
+ return pRight;
+ }
+
+ void changePropertyWithIntValue( int i_nTag )
+ {
+ std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( i_nTag );
+ std::map< int, sal_Int32 >::const_iterator value_it = maTagToValueInt.find( i_nTag );
+ if( name_it != maTagToPropertyName.end() && value_it != maTagToValueInt.end() )
+ {
+ PropertyValue* pVal = mpController->getValue( name_it->second );
+ if( pVal )
+ {
+ pVal->Value <<= value_it->second;
+ updatePrintJob();
+ }
+ }
+ }
+
+ void changePropertyWithIntValue( int i_nTag, sal_Int64 i_nValue )
+ {
+ std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( i_nTag );
+ if( name_it != maTagToPropertyName.end() )
+ {
+ PropertyValue* pVal = mpController->getValue( name_it->second );
+ if( pVal )
+ {
+ pVal->Value <<= i_nValue;
+ updatePrintJob();
+ }
+ }
+ }
+
+ void changePropertyWithBoolValue( int i_nTag, sal_Bool i_bValue )
+ {
+ std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( i_nTag );
+ if( name_it != maTagToPropertyName.end() )
+ {
+ PropertyValue* pVal = mpController->getValue( name_it->second );
+ if( pVal )
+ {
+ pVal->Value <<= i_bValue;
+ updatePrintJob();
+ }
+ }
+ }
+
+ void changePropertyWithStringValue( int i_nTag, const rtl::OUString& i_rValue )
+ {
+ std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( i_nTag );
+ if( name_it != maTagToPropertyName.end() )
+ {
+ PropertyValue* pVal = mpController->getValue( name_it->second );
+ if( pVal )
+ {
+ pVal->Value <<= i_rValue;
+ updatePrintJob();
+ }
+ }
+ }
+
+ void updateEnableState()
+ {
+ for( std::vector< NSObject* >::iterator it = maViews.begin(); it != maViews.end(); ++it )
+ {
+ NSObject* pObj = *it;
+ NSControl* pCtrl = nil;
+ NSCell* pCell = nil;
+ if( [pObj isKindOfClass: [NSControl class]] )
+ pCtrl = (NSControl*)pObj;
+ else if( [pObj isKindOfClass: [NSCell class]] )
+ pCell = (NSCell*)pObj;
+
+ int nTag = pCtrl ? [pCtrl tag] :
+ pCell ? [pCell tag] :
+ -1;
+
+ std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( nTag );
+ if( name_it != maTagToPropertyName.end() )
+ {
+ MacOSBOOL bEnabled = mpController->isUIOptionEnabled( name_it->second ) ? YES : NO;
+ if( pCtrl )
+ {
+ [pCtrl setEnabled: bEnabled];
+ NSView* pOther = getPair( pCtrl );
+ if( pOther && [pOther isKindOfClass: [NSControl class]] )
+ [(NSControl*)pOther setEnabled: bEnabled];
+ }
+ else if( pCell )
+ [pCell setEnabled: bEnabled];
+
+ }
+ }
+ }
+
+ void updatePreviewImage( sal_Int32 i_nPage )
+ {
+ sal_Int32 nPages = mpController->getFilteredPageCount();
+ NSRect aViewFrame = [mpPreview frame];
+ Size aPixelSize( static_cast<long>(aViewFrame.size.width),
+ static_cast<long>(aViewFrame.size.height) );
+ if( i_nPage >= 0 && nPages > i_nPage )
+ {
+ GDIMetaFile aMtf;
+ PrinterController::PageSize aPageSize( mpController->getFilteredPageFile( i_nPage, aMtf, false ) );
+ VirtualDevice aDev;
+ // see salprn.cxx, currently we pretend to be a 720dpi device on printers
+ aDev.SetReferenceDevice( 720, 720 );
+ aDev.EnableOutput( TRUE );
+ Size aLogicSize( aDev.PixelToLogic( aPixelSize, MapMode( MAP_100TH_MM ) ) );
+ double fScaleX = double(aLogicSize.Width())/double(aPageSize.aSize.Width());
+ double fScaleY = double(aLogicSize.Height())/double(aPageSize.aSize.Height());
+ double fScale = (fScaleX < fScaleY) ? fScaleX : fScaleY;
+ aMtf.WindStart();
+ aMtf.Scale( fScale, fScale );
+ aMtf.WindStart();
+ aLogicSize.Width() = long(double(aPageSize.aSize.Width()) * fScale);
+ aLogicSize.Height() = long(double(aPageSize.aSize.Height()) * fScale);
+ aPixelSize = aDev.LogicToPixel( aLogicSize, MapMode( MAP_100TH_MM ) );
+ aDev.SetOutputSizePixel( aPixelSize );
+ aMtf.WindStart();
+ aDev.SetMapMode( MapMode( MAP_100TH_MM ) );
+ aMtf.Play( &aDev, Point( 0, 0 ), aLogicSize );
+ aDev.EnableMapMode( FALSE );
+ Image aImage( aDev.GetBitmap( Point( 0, 0 ), aPixelSize ) );
+ NSImage* pImage = CreateNSImage( aImage );
+ [mpPreview setImage: [pImage autorelease]];
+ }
+ else
+ [mpPreview setImage: nil];
+ }
+
+ void setupPreview( ControlTarget* i_pCtrlTarget )
+ {
+ if( maLocalizedStrings.Count() < 3 )
+ return;
+
+ // get the preview control
+ NSRect aPreviewFrame = [mpAccessoryView frame];
+ aPreviewFrame.origin.x = 0;
+ aPreviewFrame.origin.y = 5;
+ aPreviewFrame.size.width = 190;
+ aPreviewFrame.size.height -= 7;
+
+ // create a box to put the preview controls in
+ mpPreviewBox = [[NSBox alloc] initWithFrame: aPreviewFrame];
+ [mpPreviewBox setTitle: [CreateNSString( maLocalizedStrings.GetString( 0 ) ) autorelease]];
+ [mpAccessoryView addSubview: [mpPreviewBox autorelease]];
+
+ // now create the image view of the preview
+ NSSize aMargins = [mpPreviewBox contentViewMargins];
+ aPreviewFrame.origin.x = 0;
+ aPreviewFrame.origin.y = 34;
+ aPreviewFrame.size.height -= 61;
+ mpPreview = [[NSImageView alloc] initWithFrame: aPreviewFrame];
+ [mpPreview setImageScaling: NSScaleNone];
+ [mpPreview setImageAlignment: NSImageAlignCenter];
+ [mpPreview setImageFrameStyle: NSImageFrameNone];
+ [mpPreviewBox addSubview: [mpPreview autorelease]];
+
+ // add a label
+ sal_Int32 nPages = mpController->getFilteredPageCount();
+ rtl::OUStringBuffer aBuf( 16 );
+ aBuf.appendAscii( "/ " );
+ aBuf.append( rtl::OUString::valueOf( nPages ) );
+
+ NSString* pText = CreateNSString( aBuf.makeStringAndClear() );
+ NSRect aTextRect = { { 100, 5 }, { 100, 22 } };
+ mpPagesLabel = [[NSTextView alloc] initWithFrame: aTextRect];
+ [mpPagesLabel setFont: [NSFont controlContentFontOfSize: 0]];
+ [mpPagesLabel setEditable: NO];
+ [mpPagesLabel setSelectable: NO];
+ [mpPagesLabel setDrawsBackground: NO];
+ [mpPagesLabel setString: [pText autorelease]];
+ [mpPagesLabel setToolTip: [CreateNSString( maLocalizedStrings.GetString( 2 ) ) autorelease]];
+ [mpPreviewBox addSubview: [mpPagesLabel autorelease]];
+
+ NSRect aFieldRect = { { 45, 5 }, { 35, 25 } };
+ mpPageEdit = [[NSTextField alloc] initWithFrame: aFieldRect];
+ [mpPageEdit setEditable: YES];
+ [mpPageEdit setSelectable: YES];
+ [mpPageEdit setDrawsBackground: YES];
+ [mpPageEdit setToolTip: [CreateNSString( maLocalizedStrings.GetString( 1 ) ) autorelease]];
+ [mpPreviewBox addSubview: [mpPageEdit autorelease]];
+
+ // add a stepper control
+ NSRect aStepFrame = { { 85, 5 }, { 15, 25 } };
+ mpStepper = [[NSStepper alloc] initWithFrame: aStepFrame];
+ [mpStepper setIncrement: 1];
+ [mpStepper setValueWraps: NO];
+ [mpPreviewBox addSubview: [mpStepper autorelease]];
+
+ // constrain the text field to decimal numbers
+ NSNumberFormatter* pFormatter = [[NSNumberFormatter alloc] init];
+ [pFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4];
+ [pFormatter setMinimum: [[NSNumber numberWithInt: 1] autorelease]];
+ [pFormatter setMaximum: [[NSNumber numberWithInt: nPages] autorelease]];
+ [pFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
+ [pFormatter setAllowsFloats: NO];
+ [pFormatter setMaximumFractionDigits: 0];
+ [mpPageEdit setFormatter: pFormatter];
+ [mpStepper setMinValue: 1];
+ [mpStepper setMaxValue: nPages];
+
+ [mpPageEdit setIntValue: 1];
+ [mpStepper setIntValue: 1];
+
+ // connect target and action
+ [mpStepper setTarget: i_pCtrlTarget];
+ [mpStepper setAction: @selector(triggeredPreview:)];
+ [mpPageEdit setTarget: i_pCtrlTarget];
+ [mpPageEdit setAction: @selector(triggeredPreview:)];
+
+ // set first preview image
+ updatePreviewImage( 0 );
+ }
+
+ void changePreview( NSObject* i_pSender )
+ {
+ if( [i_pSender isMemberOfClass: [NSTextField class]] )
+ {
+ NSTextField* pField = (NSTextField*)i_pSender;
+ if( pField == mpPageEdit ) // sanity check
+ {
+ sal_Int32 nPage = [pField intValue];
+ [mpStepper setIntValue: nPage];
+ updatePreviewImage( nPage-1 );
+ }
+ }
+ else if( [i_pSender isMemberOfClass: [NSStepper class]] )
+ {
+ NSStepper* pStepper = (NSStepper*)i_pSender;
+ if( pStepper == mpStepper ) // sanity check
+ {
+ sal_Int32 nPage = [pStepper intValue];
+ [mpPageEdit setIntValue: nPage];
+ updatePreviewImage( nPage-1 );
+ }
+ }
+ }
+};
+
+static void filterAccelerator( rtl::OUString& io_rText )
+{
+ rtl::OUStringBuffer aBuf( io_rText.getLength() );
+ for( sal_Int32 nIndex = 0; nIndex != -1; )
+ aBuf.append( io_rText.getToken( 0, '~', nIndex ) );
+ io_rText = aBuf.makeStringAndClear();
+}
+
+@implementation ControlTarget
+-(id)initWithControllerMap: (ControllerProperties*)pController
+{
+ if( (self = [super init]) )
+ {
+ mpController = pController;
+ }
+ return self;
+}
+-(void)triggered:(id)pSender;
+{
+ if( [pSender isMemberOfClass: [NSPopUpButton class]] )
+ {
+ NSPopUpButton* pBtn = (NSPopUpButton*)pSender;
+ NSMenuItem* pSelected = [pBtn selectedItem];
+ if( pSelected )
+ {
+ int nTag = [pSelected tag];
+ mpController->changePropertyWithIntValue( nTag );
+ }
+ }
+ else if( [pSender isMemberOfClass: [NSButton class]] )
+ {
+ NSButton* pBtn = (NSButton*)pSender;
+ int nTag = [pBtn tag];
+ mpController->changePropertyWithBoolValue( nTag, [pBtn state] == NSOnState );
+ }
+ else if( [pSender isMemberOfClass: [NSMatrix class]] )
+ {
+ NSObject* pObj = [(NSMatrix*)pSender selectedCell];
+ if( [pObj isMemberOfClass: [NSButtonCell class]] )
+ {
+ NSButtonCell* pCell = (NSButtonCell*)pObj;
+ int nTag = [pCell tag];
+ mpController->changePropertyWithIntValue( nTag );
+ }
+ }
+ else if( [pSender isMemberOfClass: [NSTextField class]] )
+ {
+ NSTextField* pField = (NSTextField*)pSender;
+ int nTag = [pField tag];
+ rtl::OUString aValue = GetOUString( [pSender stringValue] );
+ mpController->changePropertyWithStringValue( nTag, aValue );
+ }
+ else
+ {
+ DBG_ERROR( "unsupported class" );
+ }
+ mpController->updateEnableState();
+}
+-(void)triggeredNumeric:(id)pSender;
+{
+ if( [pSender isMemberOfClass: [NSTextField class]] )
+ {
+ NSTextField* pField = (NSTextField*)pSender;
+ int nTag = [pField tag];
+ sal_Int64 nValue = [pField intValue];
+
+ NSView* pOther = mpController->getPair( pField );
+ if( pOther )
+ [(NSControl*)pOther setIntValue: nValue];
+
+ mpController->changePropertyWithIntValue( nTag, nValue );
+ }
+ else if( [pSender isMemberOfClass: [NSStepper class]] )
+ {
+ NSStepper* pStep = (NSStepper*)pSender;
+ int nTag = [pStep tag];
+ sal_Int64 nValue = [pStep intValue];
+
+ NSView* pOther = mpController->getPair( pStep );
+ if( pOther )
+ [(NSControl*)pOther setIntValue: nValue];
+
+ mpController->changePropertyWithIntValue( nTag, nValue );
+ }
+ else
+ {
+ DBG_ERROR( "unsupported class" );
+ }
+ mpController->updateEnableState();
+}
+-(void)triggeredPreview:(id)pSender
+{
+ mpController->changePreview( pSender );
+}
+-(void)dealloc
+{
+ delete mpController;
+ [super dealloc];
+}
+@end
+
+struct ColumnItem
+{
+ NSControl* pControl;
+ long nOffset;
+ NSControl* pSubControl;
+
+ ColumnItem( NSControl* i_pControl = nil, long i_nOffset = 0, NSControl* i_pSub = nil )
+ : pControl( i_pControl )
+ , nOffset( i_nOffset )
+ , pSubControl( i_pSub )
+ {}
+
+ long getWidth() const
+ {
+ long nWidth = 0;
+ if( pControl )
+ {
+ NSRect aCtrlRect = [pControl frame];
+ nWidth = aCtrlRect.size.width;
+ nWidth += nOffset;
+ if( pSubControl )
+ {
+ NSRect aSubRect = [pSubControl frame];
+ nWidth += aSubRect.size.width;
+ nWidth += aSubRect.origin.x - (aCtrlRect.origin.x + aCtrlRect.size.width);
+ }
+ }
+ return nWidth;
+ }
+};
+
+static void adjustViewAndChildren( NSView* pView, NSSize& rMaxSize,
+ std::vector< ColumnItem >& rLeftColumn,
+ std::vector< ColumnItem >& rRightColumn
+ )
+{
+ // balance columns
+
+ // first get overall column widths
+ long nLeftWidth = 0;
+ long nRightWidth = 0;
+ for( size_t i = 0; i < rLeftColumn.size(); i++ )
+ {
+ long nW = rLeftColumn[i].getWidth();
+ if( nW > nLeftWidth )
+ nLeftWidth = nW;
+ }
+ for( size_t i = 0; i < rRightColumn.size(); i++ )
+ {
+ long nW = rRightColumn[i].getWidth();
+ if( nW > nRightWidth )
+ nRightWidth = nW;
+ }
+
+ // right align left column
+ for( size_t i = 0; i < rLeftColumn.size(); i++ )
+ {
+ if( rLeftColumn[i].pControl )
+ {
+ NSRect aCtrlRect = [rLeftColumn[i].pControl frame];
+ long nX = nLeftWidth - aCtrlRect.size.width;
+ if( rLeftColumn[i].pSubControl )
+ {
+ NSRect aSubRect = [rLeftColumn[i].pSubControl frame];
+ nX -= aSubRect.size.width + (aSubRect.origin.x - (aCtrlRect.origin.x + aCtrlRect.size.width));
+ aSubRect.origin.x = nLeftWidth - aSubRect.size.width;
+ [rLeftColumn[i].pSubControl setFrame: aSubRect];
+ }
+ aCtrlRect.origin.x = nX;
+ [rLeftColumn[i].pControl setFrame: aCtrlRect];
+ }
+ }
+
+ // left align right column
+ for( size_t i = 0; i < rRightColumn.size(); i++ )
+ {
+ if( rRightColumn[i].pControl )
+ {
+ NSRect aCtrlRect = [rRightColumn[i].pControl frame];
+ long nX = nLeftWidth + 3;
+ if( rRightColumn[i].pSubControl )
+ {
+ NSRect aSubRect = [rRightColumn[i].pSubControl frame];
+ aSubRect.origin.x = nX + aSubRect.origin.x - aCtrlRect.origin.x;
+ [rRightColumn[i].pSubControl setFrame: aSubRect];
+ }
+ aCtrlRect.origin.x = nX;
+ [rRightColumn[i].pControl setFrame: aCtrlRect];
+ }
+ }
+
+ NSArray* pSubViews = [pView subviews];
+ unsigned int nViews = [pSubViews count];
+ NSRect aUnion = { { 0, 0 }, { 0, 0 } };
+
+ // get the combined frame of all subviews
+ for( unsigned int n = 0; n < nViews; n++ )
+ {
+ aUnion = NSUnionRect( aUnion, [[pSubViews objectAtIndex: n] frame] );
+ }
+
+ // move everything so it will fit
+ for( unsigned int n = 0; n < nViews; n++ )
+ {
+ NSView* pCurSubView = [pSubViews objectAtIndex: n];
+ NSRect aFrame = [pCurSubView frame];
+ aFrame.origin.x -= aUnion.origin.x - 5;
+ aFrame.origin.y -= aUnion.origin.y - 5;
+ [pCurSubView setFrame: aFrame];
+ }
+
+ // resize the view itself
+ aUnion.size.height += 10;
+ aUnion.size.width += 20;
+ [pView setFrameSize: aUnion.size];
+
+ if( aUnion.size.width > rMaxSize.width )
+ rMaxSize.width = aUnion.size.width;
+ if( aUnion.size.height > rMaxSize.height )
+ rMaxSize.height = aUnion.size.height;
+}
+
+static void adjustTabViews( NSTabView* pTabView, NSSize aTabSize )
+{
+ // loop over all contained tab pages
+ NSArray* pTabbedViews = [pTabView tabViewItems];
+ int nViews = [pTabbedViews count];
+ for( int i = 0; i < nViews; i++ )
+ {
+ NSTabViewItem* pItem = (NSTabViewItem*)[pTabbedViews objectAtIndex: i];
+ NSView* pView = [pItem view];
+ if( pView )
+ {
+ NSRect aRect = [pView frame];
+ double nDiff = aTabSize.height - aRect.size.height;
+ aRect.size = aTabSize;
+ [pView setFrame: aRect];
+
+ NSArray* pSubViews = [pView subviews];
+ unsigned int nSubViews = [pSubViews count];
+
+ // move everything up
+ for( unsigned int n = 0; n < nSubViews; n++ )
+ {
+ NSView* pCurSubView = [pSubViews objectAtIndex: n];
+ NSRect aFrame = [pCurSubView frame];
+ aFrame.origin.y += nDiff;
+ // give separators the correct width
+ // separators are currently the only NSBoxes we use
+ if( [pCurSubView isMemberOfClass: [NSBox class]] )
+ {
+ aFrame.size.width = aTabSize.width - aFrame.origin.x - 10;
+ }
+ [pCurSubView setFrame: aFrame];
+ }
+ }
+ }
+}
+
+static NSControl* createLabel( const rtl::OUString& i_rText )
+{
+ NSString* pText = CreateNSString( i_rText );
+ NSRect aTextRect = { { 0, 0 }, {20, 15} };
+ NSTextField* pTextView = [[NSTextField alloc] initWithFrame: aTextRect];
+ [pTextView setFont: [NSFont controlContentFontOfSize: 0]];
+ [pTextView setEditable: NO];
+ [pTextView setSelectable: NO];
+ [pTextView setDrawsBackground: NO];
+ [pTextView setBordered: NO];
+ [pTextView setStringValue: pText];
+ [pTextView sizeToFit];
+ [pText release];
+ return pTextView;
+}
+
+static sal_Int32 findBreak( const rtl::OUString& i_rText, sal_Int32 i_nPos )
+{
+ sal_Int32 nRet = i_rText.getLength();
+ Reference< i18n::XBreakIterator > xBI( vcl::unohelper::CreateBreakIterator() );
+ if( xBI.is() )
+ {
+ i18n::Boundary aBoundary = xBI->getWordBoundary( i_rText, i_nPos,
+ Application::GetSettings().GetLocale(),
+ i18n::WordType::ANYWORD_IGNOREWHITESPACES,
+ sal_True );
+ nRet = aBoundary.endPos;
+ }
+ return nRet;
+}
+
+static void linebreakCell( NSCell* pBtn, const rtl::OUString& i_rText )
+{
+ NSString* pText = CreateNSString( i_rText );
+ [pBtn setTitle: pText];
+ [pText release];
+ NSSize aSize = [pBtn cellSize];
+ if( aSize.width > 280 )
+ {
+ // need two lines
+ sal_Int32 nLen = i_rText.getLength();
+ sal_Int32 nIndex = nLen / 2;
+ nIndex = findBreak( i_rText, nIndex );
+ if( nIndex < nLen )
+ {
+ rtl::OUStringBuffer aBuf( i_rText );
+ aBuf.setCharAt( nIndex, '\n' );
+ pText = CreateNSString( aBuf.makeStringAndClear() );
+ [pBtn setTitle: pText];
+ [pText release];
+ }
+ }
+}
+
+
+@implementation AquaPrintAccessoryView
++(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState;
+{
+ const Sequence< PropertyValue >& rOptions( pController->getUIOptions() );
+ if( rOptions.getLength() == 0 )
+ return nil;
+
+ NSView* pCurParent = 0;
+ long nCurY = 0;
+ long nCurX = 0;
+ NSRect aViewFrame = { { 0, 0 }, {600, 400 } };
+ NSRect aTabViewFrame = { { 190, 0 }, {410, 400 } };
+ NSSize aMaxTabSize = { 0, 0 };
+ NSView* pAccessoryView = [[NSView alloc] initWithFrame: aViewFrame];
+ NSTabView* pTabView = [[NSTabView alloc] initWithFrame: aTabViewFrame];
+ [pAccessoryView addSubview: [pTabView autorelease]];
+
+ sal_Bool bIgnoreSubgroup = sal_False;
+
+ ControllerProperties* pControllerProperties = new ControllerProperties( pController, pOp, pAccessoryView, pTabView, pState );
+ ControlTarget* pCtrlTarget = [[ControlTarget alloc] initWithControllerMap: pControllerProperties];
+
+ std::vector< ColumnItem > aLeftColumn, aRightColumn;
+
+ for( int i = 0; i < rOptions.getLength(); i++ )
+ {
+ Sequence< beans::PropertyValue > aOptProp;
+ rOptions[i].Value >>= aOptProp;
+
+ // extract ui element
+ bool bEnabled = true;
+ rtl::OUString aCtrlType;
+ rtl::OUString aText;
+ rtl::OUString aPropertyName;
+ Sequence< rtl::OUString > aChoices;
+ sal_Int64 nMinValue = 0, nMaxValue = 0;
+ long nAttachOffset = 0;
+ sal_Bool bIgnore = sal_False;
+
+ for( int n = 0; n < aOptProp.getLength(); n++ )
+ {
+ const beans::PropertyValue& rEntry( aOptProp[ n ] );
+ if( rEntry.Name.equalsAscii( "Text" ) )
+ {
+ rEntry.Value >>= aText;
+ filterAccelerator( aText );
+ }
+ else if( rEntry.Name.equalsAscii( "ControlType" ) )
+ {
+ rEntry.Value >>= aCtrlType;
+ }
+ else if( rEntry.Name.equalsAscii( "Choices" ) )
+ {
+ rEntry.Value >>= aChoices;
+ }
+ else if( rEntry.Name.equalsAscii( "Property" ) )
+ {
+ PropertyValue aVal;
+ rEntry.Value >>= aVal;
+ aPropertyName = aVal.Name;
+ }
+ else if( rEntry.Name.equalsAscii( "Enabled" ) )
+ {
+ sal_Bool bValue = sal_True;
+ rEntry.Value >>= bValue;
+ bEnabled = bValue;
+ }
+ else if( rEntry.Name.equalsAscii( "MinValue" ) )
+ {
+ rEntry.Value >>= nMinValue;
+ }
+ else if( rEntry.Name.equalsAscii( "MaxValue" ) )
+ {
+ rEntry.Value >>= nMaxValue;
+ }
+ else if( rEntry.Name.equalsAscii( "AttachToDependency" ) )
+ {
+ nAttachOffset = 20;
+ }
+ else if( rEntry.Name.equalsAscii( "InternalUIOnly" ) )
+ {
+ rEntry.Value >>= bIgnore;
+ }
+ }
+
+ if( aCtrlType.equalsAscii( "Group" ) ||
+ aCtrlType.equalsAscii( "Subgroup" ) ||
+ aCtrlType.equalsAscii( "Radio" ) ||
+ aCtrlType.equalsAscii( "List" ) ||
+ aCtrlType.equalsAscii( "Edit" ) ||
+ aCtrlType.equalsAscii( "Range" ) ||
+ aCtrlType.equalsAscii( "Bool" ) )
+ {
+ // since our build target is MacOSX 10.4 we can have only one accessory view
+ // so we have a single accessory view that is tabbed for grouping
+ if( aCtrlType.equalsAscii( "Group" )
+ || ! pCurParent
+ || ( aCtrlType.equalsAscii( "Subgroup" ) && nCurY < -250 && ! bIgnore )
+ )
+ {
+ rtl::OUString aGroupTitle( aText );
+ if( aCtrlType.equalsAscii( "Subgroup" ) )
+ aGroupTitle = pControllerProperties->getMoreString();
+ // set size of current parent
+ if( pCurParent )
+ adjustViewAndChildren( pCurParent, aMaxTabSize, aLeftColumn, aRightColumn );
+
+ // new tab item
+ if( ! aText.getLength() )
+ aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OOo" ) );
+ NSString* pLabel = CreateNSString( aGroupTitle );
+ NSTabViewItem* pItem = [[NSTabViewItem alloc] initWithIdentifier: pLabel ];
+ [pItem setLabel: pLabel];
+ [pTabView addTabViewItem: pItem];
+ pCurParent = [[NSView alloc] initWithFrame: aTabViewFrame];
+ [pItem setView: pCurParent];
+ [pLabel release];
+
+ // reset indent
+ nCurX = 20;
+ // reset Y
+ nCurY = 0;
+ // clear columns
+ aLeftColumn.clear();
+ aRightColumn.clear();
+ }
+
+ if( aCtrlType.equalsAscii( "Subgroup" ) && pCurParent )
+ {
+ bIgnoreSubgroup = bIgnore;
+ if( bIgnore )
+ continue;
+
+ NSControl* pTextView = createLabel( aText );
+ [pCurParent addSubview: [pTextView autorelease]];
+ NSRect aTextRect = [pTextView frame];
+ // move to nCurY
+ aTextRect.origin.y = nCurY - aTextRect.size.height;
+ [pTextView setFrame: aTextRect];
+
+ NSRect aSepRect = { { aTextRect.size.width + 1, aTextRect.origin.y }, { 100, 6 } };
+ NSBox* pBox = [[NSBox alloc] initWithFrame: aSepRect];
+ [pBox setBoxType: NSBoxSeparator];
+ [pCurParent addSubview: [pBox autorelease]];
+
+ // update nCurY
+ nCurY = aTextRect.origin.y - 5;
+ }
+ else if( bIgnoreSubgroup || bIgnore )
+ continue;
+ else if( aCtrlType.equalsAscii( "Bool" ) && pCurParent )
+ {
+ NSRect aCheckRect = { { nCurX + nAttachOffset, 0 }, { 0, 15 } };
+ NSButton* pBtn = [[NSButton alloc] initWithFrame: aCheckRect];
+ [pBtn setButtonType: NSSwitchButton];
+ sal_Bool bVal = sal_False;
+ PropertyValue* pVal = pController->getValue( aPropertyName );
+ if( pVal )
+ pVal->Value >>= bVal;
+ [pBtn setState: bVal ? NSOnState : NSOffState];
+ linebreakCell( [pBtn cell], aText );
+ [pBtn sizeToFit];
+ [pCurParent addSubview: [pBtn autorelease]];
+
+ aRightColumn.push_back( ColumnItem( pBtn ) );
+
+ // connect target
+ [pBtn setTarget: pCtrlTarget];
+ [pBtn setAction: @selector(triggered:)];
+ int nTag = pControllerProperties->addNameTag( aPropertyName );
+ pControllerProperties->addObservedControl( pBtn );
+ [pBtn setTag: nTag];
+
+ aCheckRect = [pBtn frame];
+
+ // move to nCurY
+ aCheckRect.origin.y = nCurY - aCheckRect.size.height;
+ [pBtn setFrame: aCheckRect];
+
+ // update nCurY
+ nCurY = aCheckRect.origin.y - 5;
+ }
+ else if( aCtrlType.equalsAscii( "Radio" ) && pCurParent )
+ {
+ sal_Int32 nOff = 0;
+ if( aText.getLength() )
+ {
+ // add a label
+ NSControl* pTextView = createLabel( aText );
+ NSRect aTextRect = [pTextView frame];
+ aTextRect.origin.x = nCurX + nAttachOffset;
+ [pCurParent addSubview: [pTextView autorelease]];
+
+ aLeftColumn.push_back( ColumnItem( pTextView ) );
+
+ // move to nCurY
+ aTextRect.origin.y = nCurY - aTextRect.size.height;
+ [pTextView setFrame: aTextRect];
+
+ // update nCurY
+ nCurY = aTextRect.origin.y - 5;
+
+ // indent the radio group relative to the text
+ // nOff = 20;
+ }
+
+ // setup radio matrix
+ NSButtonCell* pProto = [[NSButtonCell alloc] init];
+
+ NSRect aRadioRect = { { nCurX + nOff, 0 }, { 280 - nCurX, 5*aChoices.getLength() } };
+ [pProto setTitle: @"RadioButtonGroup"];
+ [pProto setButtonType: NSRadioButton];
+ NSMatrix* pMatrix = [[NSMatrix alloc] initWithFrame: aRadioRect
+ mode: NSRadioModeMatrix
+ prototype: (NSCell*)pProto
+ numberOfRows: aChoices.getLength()
+ numberOfColumns: 1];
+ // get currently selected value
+ sal_Int32 nSelectVal = 0;
+ PropertyValue* pVal = pController->getValue( aPropertyName );
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= nSelectVal;
+ // set individual titles
+ NSArray* pCells = [pMatrix cells];
+ for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
+ {
+ NSCell* pCell = [pCells objectAtIndex: m];
+ filterAccelerator( aChoices[m] );
+ linebreakCell( pCell, aChoices[m] );
+ //NSString* pTitle = CreateNSString( aChoices[m] );
+ //[pCell setTitle: pTitle];
+ // connect target and action
+ [pCell setTarget: pCtrlTarget];
+ [pCell setAction: @selector(triggered:)];
+ int nTag = pControllerProperties->addNameAndValueTag( aPropertyName, m );
+ pControllerProperties->addObservedControl( pCell );
+ [pCell setTag: nTag];
+ //[pTitle release];
+ // set current selection
+ if( nSelectVal == m )
+ [pMatrix selectCellAtRow: m column: 0];
+ }
+ [pMatrix sizeToFit];
+ aRadioRect = [pMatrix frame];
+
+ // move it down, so it comes to the correct position
+ aRadioRect.origin.y = nCurY - aRadioRect.size.height;
+ [pMatrix setFrame: aRadioRect];
+ [pCurParent addSubview: [pMatrix autorelease]];
+
+ aRightColumn.push_back( ColumnItem( pMatrix ) );
+
+ // update nCurY
+ nCurY = aRadioRect.origin.y - 5;
+
+ [pProto release];
+ }
+ else if( aCtrlType.equalsAscii( "List" ) && pCurParent )
+ {
+ // don't indent attached lists, looks bad in the existing cases
+ NSControl* pTextView = createLabel( aText );
+ [pCurParent addSubview: [pTextView autorelease]];
+ aLeftColumn.push_back( ColumnItem( pTextView ) );
+ NSRect aTextRect = [pTextView frame];
+ aTextRect.origin.x = nCurX /* + nAttachOffset*/;
+
+ // don't indent attached lists, looks bad in the existing cases
+ NSRect aBtnRect = { { nCurX /*+ nAttachOffset*/ + aTextRect.size.width, 0 }, { 0, 15 } };
+ NSPopUpButton* pBtn = [[NSPopUpButton alloc] initWithFrame: aBtnRect pullsDown: NO];
+
+ // iterate options
+ for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
+ {
+ NSString* pItemText = CreateNSString( aChoices[m] );
+ [pBtn addItemWithTitle: pItemText];
+ NSMenuItem* pItem = [pBtn itemWithTitle: pItemText];
+ int nTag = pControllerProperties->addNameAndValueTag( aPropertyName, m );
+ [pItem setTag: nTag];
+ [pItemText release];
+ }
+
+ PropertyValue* pVal = pController->getValue( aPropertyName );
+ sal_Int32 aSelectVal = 0;
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= aSelectVal;
+ [pBtn selectItemAtIndex: aSelectVal];
+
+ // add the button to observed controls for enabled state changes
+ // also add a tag just for this purpose
+ pControllerProperties->addObservedControl( pBtn );
+ [pBtn setTag: pControllerProperties->addNameTag( aPropertyName )];
+
+ [pBtn sizeToFit];
+ [pCurParent addSubview: [pBtn autorelease]];
+
+ aRightColumn.push_back( ColumnItem( pBtn ) );
+
+ // connect target and action
+ [pBtn setTarget: pCtrlTarget];
+ [pBtn setAction: @selector(triggered:)];
+
+ // move to nCurY
+ aBtnRect = [pBtn frame];
+ aBtnRect.origin.y = nCurY - aBtnRect.size.height;
+ [pBtn setFrame: aBtnRect];
+
+ // align label
+ aTextRect.origin.y = aBtnRect.origin.y + (aBtnRect.size.height - aTextRect.size.height)/2;
+ [pTextView setFrame: aTextRect];
+
+ // update nCurY
+ nCurY = aBtnRect.origin.y - 5;
+ }
+ else if( (aCtrlType.equalsAscii( "Edit" ) || aCtrlType.equalsAscii( "Range" )) && pCurParent )
+ {
+ sal_Int32 nOff = 0;
+ if( aText.getLength() )
+ {
+ // add a label
+ NSControl* pTextView = createLabel( aText );
+ [pCurParent addSubview: [pTextView autorelease]];
+
+ aLeftColumn.push_back( ColumnItem( pTextView ) );
+
+ // move to nCurY
+ NSRect aTextRect = [pTextView frame];
+ aTextRect.origin.x = nCurX + nAttachOffset;
+ aTextRect.origin.y = nCurY - aTextRect.size.height;
+ [pTextView setFrame: aTextRect];
+
+ // update nCurY
+ nCurY = aTextRect.origin.y - 5;
+
+ // and set the offset for the real edit field
+ nOff = aTextRect.size.width + 5;
+ }
+
+ NSRect aFieldRect = { { nCurX + nOff + nAttachOffset, 0 }, { 100, 25 } };
+ NSTextField* pFieldView = [[NSTextField alloc] initWithFrame: aFieldRect];
+ [pFieldView setEditable: YES];
+ [pFieldView setSelectable: YES];
+ [pFieldView setDrawsBackground: YES];
+ [pFieldView sizeToFit]; // FIXME: this does nothing
+ [pCurParent addSubview: [pFieldView autorelease]];
+
+ aRightColumn.push_back( ColumnItem( pFieldView ) );
+
+ // add the field to observed controls for enabled state changes
+ // also add a tag just for this purpose
+ pControllerProperties->addObservedControl( pFieldView );
+ int nTag = pControllerProperties->addNameTag( aPropertyName );
+ [pFieldView setTag: nTag];
+ // pControllerProperties->addNamedView( pFieldView, aPropertyName );
+
+ // move to nCurY
+ aFieldRect.origin.y = nCurY - aFieldRect.size.height;
+ [pFieldView setFrame: aFieldRect];
+
+ // current value
+ PropertyValue* pVal = pController->getValue( aPropertyName );
+ if( aCtrlType.equalsAscii( "Range" ) )
+ {
+ // add a stepper control
+ NSRect aStepFrame = { { aFieldRect.origin.x + aFieldRect.size.width + 5,
+ aFieldRect.origin.y },
+ { 15, aFieldRect.size.height } };
+ NSStepper* pStep = [[NSStepper alloc] initWithFrame: aStepFrame];
+ [pStep setIncrement: 1];
+ [pStep setValueWraps: NO];
+ [pStep setTag: nTag];
+ [pCurParent addSubview: [pStep autorelease]];
+
+ aRightColumn.back().pSubControl = pStep;
+
+ pControllerProperties->addObservedControl( pStep );
+ [pStep setTarget: pCtrlTarget];
+ [pStep setAction: @selector(triggered:)];
+
+ // constrain the text field to decimal numbers
+ NSNumberFormatter* pFormatter = [[NSNumberFormatter alloc] init];
+ [pFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4];
+ [pFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
+ [pFormatter setAllowsFloats: NO];
+ [pFormatter setMaximumFractionDigits: 0];
+ if( nMinValue != nMaxValue )
+ {
+ [pFormatter setMinimum: [[NSNumber numberWithInt: nMinValue] autorelease]];
+ [pStep setMinValue: nMinValue];
+ [pFormatter setMaximum: [[NSNumber numberWithInt: nMaxValue] autorelease]];
+ [pStep setMaxValue: nMaxValue];
+ }
+ [pFieldView setFormatter: pFormatter];
+
+ sal_Int64 nSelectVal = 0;
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= nSelectVal;
+
+ [pFieldView setIntValue: nSelectVal];
+ [pStep setIntValue: nSelectVal];
+
+ pControllerProperties->addViewPair( pFieldView, pStep );
+ // connect target and action
+ [pFieldView setTarget: pCtrlTarget];
+ [pFieldView setAction: @selector(triggeredNumeric:)];
+ [pStep setTarget: pCtrlTarget];
+ [pStep setAction: @selector(triggeredNumeric:)];
+ }
+ else
+ {
+ // connect target and action
+ [pFieldView setTarget: pCtrlTarget];
+ [pFieldView setAction: @selector(triggered:)];
+
+ if( pVal && pVal->Value.hasValue() )
+ {
+ rtl::OUString aValue;
+ pVal->Value >>= aValue;
+ if( aValue.getLength() )
+ {
+ NSString* pText = CreateNSString( aValue );
+ [pFieldView setStringValue: pText];
+ [pText release];
+ }
+ }
+ }
+
+ // update nCurY
+ nCurY = aFieldRect.origin.y - 5;
+
+ }
+ }
+ else
+ {
+ DBG_ERROR( "Unsupported UI option" );
+ }
+ }
+
+ pControllerProperties->updateEnableState();
+ adjustViewAndChildren( pCurParent, aMaxTabSize, aLeftColumn, aRightColumn );
+
+ // leave some space for the preview
+ if( aMaxTabSize.height < 200 )
+ aMaxTabSize.height = 200;
+
+ // now reposition everything again so it is upper bound
+ adjustTabViews( pTabView, aMaxTabSize );
+
+ // find the minimum needed tab size
+ NSSize aTabCtrlSize = [pTabView minimumSize];
+ aTabCtrlSize.height += aMaxTabSize.height + 10;
+ if( aTabCtrlSize.width < aMaxTabSize.width + 10 )
+ aTabCtrlSize.width = aMaxTabSize.width + 10;
+ [pTabView setFrameSize: aTabCtrlSize];
+ aViewFrame.size.width = aTabCtrlSize.width + aTabViewFrame.origin.x;
+ aViewFrame.size.height = aTabCtrlSize.height + aTabViewFrame.origin.y;
+ [pAccessoryView setFrameSize: aViewFrame.size];
+
+ pControllerProperties->setupPreview( pCtrlTarget );
+
+ // set the accessory view
+ [pOp setAccessoryView: [pAccessoryView autorelease]];
+
+ // set the current selecte tab item
+ if( pState->nLastPage >= 0 && pState->nLastPage < [pTabView numberOfTabViewItems] )
+ [pTabView selectTabViewItemAtIndex: pState->nLastPage];
+
+ return pCtrlTarget;
+}
+
+@end
diff --git a/vcl/aqua/source/gdi/aquaprintview.mm b/vcl/aqua/source/gdi/aquaprintview.mm
index ba139da5f5a4..870b7cbab6f0 100755
--- a/vcl/aqua/source/gdi/aquaprintview.mm
+++ b/vcl/aqua/source/gdi/aquaprintview.mm
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: aquaprintview.mm,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.56.1 $
*
* This file is part of OpenOffice.org.
*
@@ -33,15 +33,15 @@
#include "aquaprintview.h"
#include "salprn.h"
-#include "vcl/impprn.hxx"
+#include "vcl/print.hxx"
@implementation AquaPrintView
--(id)initWithQPrinter: (ImplQPrinter*)pPrinter withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter
+-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter
{
NSRect aRect = { { 0, 0 }, [pInfoPrinter->getPrintInfo() paperSize] };
if( (self = [super initWithFrame: aRect]) != nil )
{
- mpQPrinter = pPrinter;
+ mpController = pController;
mpInfoPrinter = pInfoPrinter;
}
return self;
@@ -79,6 +79,7 @@
int nPage = (int)(aPaperSize.width * rect.origin.y + rect.origin.x);
// page count is 1 based
- mpQPrinter->PrintPage( nPage-1 + mpInfoPrinter->getCurPageRangeStart() );
+ if( nPage - 1 < (mpInfoPrinter->getCurPageRangeStart() + mpInfoPrinter->getCurPageRangeCount() ) )
+ mpController->printFilteredPage( nPage-1 );
}
@end
diff --git a/vcl/aqua/source/gdi/makefile.mk b/vcl/aqua/source/gdi/makefile.mk
index deb6832a5525..90b5e55b82db 100644
--- a/vcl/aqua/source/gdi/makefile.mk
+++ b/vcl/aqua/source/gdi/makefile.mk
@@ -62,6 +62,7 @@ SLOFILES= $(SLO)$/salmathutils.obj \
$(SLO)$/salvd.obj \
$(SLO)$/salprn.obj \
$(SLO)$/aquaprintview.obj \
+ $(SLO)$/aquaprintaccessoryview.obj \
$(SLO)$/salbmp.obj
.IF "$(ENABLE_CAIRO)" == "TRUE"
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 263a5b6e6803..dedae3ac7cfc 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -604,7 +604,8 @@ void AquaSalGraphics::EndSetClipRegion()
void AquaSalGraphics::SetLineColor()
{
maLineColor.SetAlpha( 0.0 ); // transparent
- CGContextSetStrokeColor( mrContext, maLineColor.AsArray() );
+ if( CheckContext() )
+ CGContextSetStrokeColor( mrContext, maLineColor.AsArray() );
}
// -----------------------------------------------------------------------
@@ -612,7 +613,8 @@ void AquaSalGraphics::SetLineColor()
void AquaSalGraphics::SetLineColor( SalColor nSalColor )
{
maLineColor = RGBAColor( nSalColor );
- CGContextSetStrokeColor( mrContext, maLineColor.AsArray() );
+ if( CheckContext() )
+ CGContextSetStrokeColor( mrContext, maLineColor.AsArray() );
}
// -----------------------------------------------------------------------
@@ -620,7 +622,8 @@ void AquaSalGraphics::SetLineColor( SalColor nSalColor )
void AquaSalGraphics::SetFillColor()
{
maFillColor.SetAlpha( 0.0 ); // transparent
- CGContextSetFillColor( mrContext, maFillColor.AsArray() );
+ if( CheckContext() )
+ CGContextSetFillColor( mrContext, maFillColor.AsArray() );
}
// -----------------------------------------------------------------------
@@ -628,7 +631,8 @@ void AquaSalGraphics::SetFillColor()
void AquaSalGraphics::SetFillColor( SalColor nSalColor )
{
maFillColor = RGBAColor( nSalColor );
- CGContextSetFillColor( mrContext, maFillColor.AsArray() );
+ if( CheckContext() )
+ CGContextSetFillColor( mrContext, maFillColor.AsArray() );
}
// -----------------------------------------------------------------------
diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx
index 99a1629006d2..6df50f79e9d0 100755
--- a/vcl/aqua/source/gdi/salgdiutils.cxx
+++ b/vcl/aqua/source/gdi/salgdiutils.cxx
@@ -68,6 +68,13 @@ void AquaSalGraphics::SetPrinterGraphics( CGContextRef xContext, long nDPIX, lon
mnRealDPIX = nDPIX;
mnRealDPIY = nDPIY;
+ // a previously set clip path is now invalid
+ if( mxClipPath )
+ {
+ CGPathRelease( mxClipPath );
+ mxClipPath = NULL;
+ }
+
if( mrContext )
{
CGContextSetFillColorSpace( mrContext, GetSalData()->mxRGBSpace );
@@ -126,6 +133,28 @@ void AquaSalGraphics::SetVirDevGraphics( CGLayerRef xLayer, CGContextRef xContex
// ----------------------------------------------------------------------
+void AquaSalGraphics::InvalidateContext()
+{
+ UnsetState();
+ mrContext = 0;
+}
+
+// ----------------------------------------------------------------------
+
+void AquaSalGraphics::UnsetState()
+{
+ if( mrContext )
+ {
+ CGContextRestoreGState( mrContext );
+ mrContext = 0;
+ }
+ if( mxClipPath )
+ {
+ CGPathRelease( mxClipPath );
+ mxClipPath = NULL;
+ }
+}
+
void AquaSalGraphics::SetState()
{
CGContextRestoreGState( mrContext );
@@ -134,9 +163,9 @@ void AquaSalGraphics::SetState()
// setup clipping
if( mxClipPath )
{
- CGContextBeginPath( mrContext ); // discard any existing path
+ CGContextBeginPath( mrContext ); // discard any existing path
CGContextAddPath( mrContext, mxClipPath ); // set the current path to the clipping path
- CGContextClip( mrContext ); // use it for clipping
+ CGContextClip( mrContext ); // use it for clipping
}
// set RGB colorspace and line and fill colors
@@ -205,7 +234,7 @@ bool AquaSalGraphics::CheckContext()
CGContextRelease( rReleaseContext );
}
- DBG_ASSERT( mrContext, "<<<WARNING>>> AquaSalGraphics::CheckContext() FAILED!!!!\n" );
+ DBG_ASSERT( mrContext || mbPrinter, "<<<WARNING>>> AquaSalGraphics::CheckContext() FAILED!!!!\n" );
return (mrContext != NULL);
}
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index b9a1f4ef7748..47c027a033aa 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: salprn.cxx,v $
- * $Revision: 1.16 $
+ * $Revision: 1.16.56.2 $
*
* This file is part of OpenOffice.org.
*
@@ -38,7 +38,6 @@
#include "saldata.hxx"
#include "vcl/jobset.h"
#include "vcl/salptype.hxx"
-#include "vcl/impprn.hxx"
#include "vcl/print.hxx"
#include "vcl/unohelp.hxx"
@@ -47,11 +46,13 @@
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/awt/Size.hpp"
#include <algorithm>
using namespace rtl;
using namespace vcl;
+using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
@@ -67,7 +68,9 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
mpPrintInfo( nil ),
mePageOrientation( ORIENTATION_PORTRAIT ),
mnStartPageOffsetX( 0 ),
- mnStartPageOffsetY( 0 )
+ mnStartPageOffsetY( 0 ),
+ mnCurPageRangeStart( 0 ),
+ mnCurPageRangeCount( 0 )
{
NSString* pStr = CreateNSString( i_rQueue.maPrinterName );
mpPrinter = [NSPrinter printerWithName: pStr];
@@ -87,6 +90,7 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
const int nWidth = 100, nHeight = 100;
maContextMemory.reset( reinterpret_cast<sal_uInt8*>( rtl_allocateMemory( nWidth * 4 * nHeight ) ),
boost::bind( rtl_freeMemory, _1 ) );
+
if( maContextMemory )
{
mrContext = CGBitmapContextCreate( maContextMemory.get(), nWidth, nHeight, 8, nWidth * 4, GetSalData()->mxRGBSpace, kCGImageAlphaNoneSkipFirst );
@@ -134,7 +138,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
dY -= aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetX, dY - mnStartPageOffsetY );
// scale to be top/down and reflect our "virtual" DPI
- CGContextScaleCTM( i_rContext, 0.1, -0.1 );
+ CGContextScaleCTM( i_rContext, 72.0/double(nDPIX), -(72.0/double(nDPIY)) );
}
else
{
@@ -148,7 +152,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
dY = -aPaperSize.width;
CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetY, dY - mnStartPageOffsetX );
// scale to be top/down and reflect our "virtual" DPI
- CGContextScaleCTM( i_rContext, -0.1, 0.1 );
+ CGContextScaleCTM( i_rContext, -(72.0/double(nDPIY)), (72.0/double(nDPIX)) );
}
mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY, 1.0 );
}
@@ -296,6 +300,28 @@ BOOL AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
// -----------------------------------------------------------------------
+void AquaSalInfoPrinter::setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation )
+{
+
+ Orientation ePaperOrientation = ORIENTATION_PORTRAIT;
+ const PaperInfo* pPaper = matchPaper( i_nWidth, i_nHeight, ePaperOrientation );
+
+ if( pPaper )
+ {
+ NSString* pPaperName = [CreateNSString( rtl::OStringToOUString(PaperInfo::toPSName(pPaper->getPaper()), RTL_TEXTENCODING_ASCII_US) ) autorelease];
+ [mpPrintInfo setPaperName: pPaperName];
+ }
+ else if( i_nWidth > 0 && i_nHeight > 0 )
+ {
+ NSSize aPaperSize = { TenMuToPt(i_nWidth), TenMuToPt(i_nHeight) };
+ [mpPrintInfo setPaperSize: aPaperSize];
+ }
+ // this seems counterintuitive
+ mePageOrientation = i_eSetOrientation;
+}
+
+// -----------------------------------------------------------------------
+
BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
{
if( ! io_pSetupData || io_pSetupData->mnSystem != JOBSETUP_SYSTEM_MAC )
@@ -304,31 +330,32 @@ BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
if( mpPrintInfo )
{
+ if( (i_nFlags & SAL_JOBSET_ORIENTATION) != 0 )
+ mePageOrientation = io_pSetupData->meOrientation;
+
if( (i_nFlags & SAL_JOBSET_PAPERSIZE) != 0)
{
// set paper format
- double width = 0, height = 0;
+ long width = 21000, height = 29700;
if( io_pSetupData->mePaperFormat == PAPER_USER )
{
// #i101108# sanity check
if( io_pSetupData->mnPaperWidth && io_pSetupData->mnPaperHeight )
{
- width = TenMuToPt( io_pSetupData->mnPaperWidth );
- height = TenMuToPt( io_pSetupData->mnPaperHeight );
+ width = io_pSetupData->mnPaperWidth;
+ height = io_pSetupData->mnPaperHeight;
}
}
else
- getPaperSize( width, height, io_pSetupData->mePaperFormat );
-
- if( width > 0 && height > 0 )
{
- NSSize aPaperSize = { width, height };
- [mpPrintInfo setPaperSize: aPaperSize];
+ double w = 595, h = 842;
+ getPaperSize( w, h, io_pSetupData->mePaperFormat );
+ width = static_cast<long>(PtTo10Mu( w ));
+ height = static_cast<long>(PtTo10Mu( h ));
}
- }
- if( (i_nFlags & SAL_JOBSET_ORIENTATION) != 0 )
- mePageOrientation = io_pSetupData->meOrientation;
+ setPaperSize( width, height, mePageOrientation );
+ }
}
return mpPrintInfo != nil;
@@ -424,6 +451,8 @@ ULONG AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, USH
return 0;
case PRINTER_CAPABILITIES_SETORIENTATION:
return 1;
+ case PRINTER_CAPABILITIES_SETDUPLEX:
+ return 0;
case PRINTER_CAPABILITIES_SETPAPERBIN:
return 0;
case PRINTER_CAPABILITIES_SETPAPERSIZE:
@@ -432,6 +461,8 @@ ULONG AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, USH
return 1;
case PRINTER_CAPABILITIES_EXTERNALDIALOG:
return getUseNativeDialog() ? 1 : 0;
+ case PRINTER_CAPABILITIES_PDF:
+ return 1;
default: break;
};
return 0;
@@ -470,58 +501,129 @@ void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
}
}
-BOOL AquaSalInfoPrinter::StartJob( const String* pFileName,
- const String& rAppName,
- ImplJobSetup* pSetupData,
- ImplQPrinter* pQPrinter,
- bool bIsQuickJob )
+static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPage )
+{
+ Size aPageSize;
+ Sequence< PropertyValue > aPageParms( i_rController.getPageParameters( i_nPage ) );
+ for( sal_Int32 nProperty = 0, nPropertyCount = aPageParms.getLength(); nProperty < nPropertyCount; ++nProperty )
+ {
+ if( aPageParms[ nProperty ].Name.equalsAscii( "PageSize" ) )
+ {
+ awt::Size aSize;
+ aPageParms[ nProperty].Value >>= aSize;
+ aPageSize.Width() = aSize.Width;
+ aPageSize.Height() = aSize.Height;
+ break;
+ }
+ }
+ return aPageSize;
+}
+
+BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
+ const String& i_rJobName,
+ const String& i_rAppName,
+ ImplJobSetup* i_pSetupData,
+ vcl::PrinterController& i_rController
+ )
{
if( mbJob )
return FALSE;
BOOL bSuccess = FALSE;
- std::vector<ULONG> aPaperRanges;
- if( ! pQPrinter->GetPaperRanges( aPaperRanges, true ) )
- return FALSE;
-
- size_t nRanges = aPaperRanges.size();
+ bool bWasAborted = false;
AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
-
- for( ULONG nCurRange = 0; nCurRange < nRanges-1; nCurRange++ )
+ PrintAccessoryViewState aAccViewState;
+ sal_Int32 nAllPages = 0;
+
+ aAccViewState.bNeedRestart = true;
+
+ // reset IsLastPage
+ i_rController.setLastPage( sal_False );
+
+ // update job data
+ if( i_pSetupData )
+ SetData( ~0, i_pSetupData );
+
+ // do we want a progress panel ?
+ sal_Bool bShowProgressPanel = sal_True;
+ beans::PropertyValue* pMonitor = i_rController.getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MonitorVisible" ) ) );
+ if( pMonitor )
+ pMonitor->Value >>= bShowProgressPanel;
+ if( ! i_rController.isShowDialogs() )
+ bShowProgressPanel = sal_False;
+
+ // FIXME: jobStarted() should be done after the print dialog has ended (if there is one)
+ // how do I know when that might be ?
+ i_rController.jobStarted();
+ do
{
- mnStartPageOffsetX = mnStartPageOffsetY = 0;
+ if( aAccViewState.bNeedRestart )
+ {
+ mnCurPageRangeStart = 0;
+ mnCurPageRangeCount = 0;
+ nAllPages = i_rController.getFilteredPageCount();
+ }
- // update job data
- ImplJobSetup* pSetup = pQPrinter->GetPageSetup( aPaperRanges[ nCurRange ] );
- if( pSetup )
- SetData( ~0, pSetup );
- DBG_ASSERT( pSetup, "no job setup for range" );
+ aAccViewState.bNeedRestart = false;
+
+ Size aCurSize( 21000, 29700 );
+ if( nAllPages > 0 )
+ {
+ mnCurPageRangeCount = 1;
+ aCurSize = getPageSize( i_rController, mnCurPageRangeStart );
+ Size aNextSize( aCurSize );
+
+ // print pages up to a different size
+ while( mnCurPageRangeCount + mnCurPageRangeStart < nAllPages )
+ {
+ aNextSize = getPageSize( i_rController, mnCurPageRangeStart + mnCurPageRangeCount );
+ if( aCurSize == aNextSize // same page size
+ ||
+ (aCurSize.Width() == aNextSize.Height() && aCurSize.Height() == aNextSize.Width()) // same size, but different orientation
+ )
+ {
+ mnCurPageRangeCount++;
+ }
+ else
+ break;
+ }
+ }
+ else
+ mnCurPageRangeCount = 0;
+
+ // now for the current run
+ mnStartPageOffsetX = mnStartPageOffsetY = 0;
+ // setup the paper size and orientation
+ // do this on our associated Printer object, since that is
+ // out interface to the applications which occasionally rely on the paper
+ // information (e.g. brochure printing scales to the found paper size)
+ // also SetPaperSizeUser has the advantage that we can share a
+ // platform independent paper matching algorithm
+ boost::shared_ptr<Printer> pPrinter( i_rController.getPrinter() );
+ pPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
+ pPrinter->SetPaperSizeUser( aCurSize, true );
- mnCurPageRangeStart = aPaperRanges[nCurRange];
- mnCurPageRangeCount = aPaperRanges[nCurRange+1] - aPaperRanges[nCurRange];
// create view
- NSView* pPrintView = [[AquaPrintView alloc] initWithQPrinter: pQPrinter withInfoPrinter: this];
+ NSView* pPrintView = [[AquaPrintView alloc] initWithController: &i_rController withInfoPrinter: this];
NSMutableDictionary* pPrintDict = [mpPrintInfo dictionary];
// set filename
- if( pFileName )
+ if( i_pFileName )
{
[mpPrintInfo setJobDisposition: NSPrintSaveJob];
- NSString* pPath = CreateNSString( *pFileName );
+ NSString* pPath = CreateNSString( *i_pFileName );
[pPrintDict setObject: pPath forKey: NSPrintSavePath];
[pPath release];
-
- // in this case we can only deliver the print job in one file
- mnCurPageRangeStart = 0;
- mnCurPageRangeCount = aPaperRanges.back();
- nCurRange = nRanges;
}
- [pPrintDict setObject: [[NSNumber numberWithInt: (int)pQPrinter->GetCopyCount()] autorelease] forKey: NSPrintCopies];
+ [pPrintDict setObject: [[NSNumber numberWithInt: (int)i_rController.getPrinter()->GetCopyCount()] autorelease] forKey: NSPrintCopies];
[pPrintDict setObject: [[NSNumber numberWithBool: YES] autorelease] forKey: NSPrintDetailedErrorReporting];
[pPrintDict setObject: [[NSNumber numberWithInt: 1] autorelease] forKey: NSPrintFirstPage];
- [pPrintDict setObject: [[NSNumber numberWithInt: (int)mnCurPageRangeCount] autorelease] forKey: NSPrintLastPage];
+ // #i103253# weird: for some reason, autoreleasing the value below like the others above
+ // leads do a double free malloc error. Why this value should behave differently from all the others
+ // is a mystery.
+ [pPrintDict setObject: [NSNumber numberWithInt: mnCurPageRangeCount] forKey: NSPrintLastPage];
// create print operation
@@ -529,17 +631,47 @@ BOOL AquaSalInfoPrinter::StartJob( const String* pFileName,
if( pPrintOperation )
{
- bool bShowPanel = (! bIsQuickJob && getUseNativeDialog() );
+ NSObject* pReleaseAfterUse = nil;
+ bool bShowPanel = (! i_rController.isDirectPrint() && getUseNativeDialog() && i_rController.isShowDialogs() );
[pPrintOperation setShowsPrintPanel: bShowPanel ? YES : NO ];
- // [pPrintOperation setShowsProgressPanel: NO];
+ [pPrintOperation setShowsProgressPanel: bShowProgressPanel ? YES : NO];
+
+ // set job title (since MacOSX 10.5)
+ if( [pPrintOperation respondsToSelector: @selector(setJobTitle:)] )
+ [pPrintOperation performSelector: @selector(setJobTitle:) withObject: [CreateNSString( i_rJobName ) autorelease]];
+
+ if( bShowPanel && mnCurPageRangeStart == 0 ) // only the first range of pages gets the accesory view
+ pReleaseAfterUse = [AquaPrintAccessoryView setupPrinterPanel: pPrintOperation withController: &i_rController withState: &aAccViewState];
+
bSuccess = TRUE;
mbJob = true;
pInst->startedPrintJob();
[pPrintOperation runOperation];
pInst->endedPrintJob();
+ bWasAborted = [[[pPrintOperation printInfo] jobDisposition] compare: NSPrintCancelJob] == NSOrderedSame;
mbJob = false;
+ if( pReleaseAfterUse )
+ [pReleaseAfterUse release];
}
- }
+
+ mnCurPageRangeStart += mnCurPageRangeCount;
+ mnCurPageRangeCount = 1;
+ } while( aAccViewState.bNeedRestart || mnCurPageRangeStart + mnCurPageRangeCount < nAllPages );
+
+ // inform application that it can release its data
+ // this is awkward, but the XRenderable interface has no method for this,
+ // so we need to call XRenderadble::render one last time with IsLastPage = TRUE
+ i_rController.setLastPage( sal_True );
+ GDIMetaFile aPageFile;
+ if( mrContext )
+ SetupPrinterGraphics( mrContext );
+ i_rController.getFilteredPageFile( 0, aPageFile );
+
+ i_rController.setJobState( bWasAborted
+ ? view::PrintableState_JOB_ABORTED
+ : view::PrintableState_JOB_SPOOLED );
+
+ mnCurPageRangeStart = mnCurPageRangeCount = 0;
return bSuccess;
}
@@ -581,6 +713,7 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, BOOL i_b
BOOL AquaSalInfoPrinter::EndPage()
{
+ mpGraphics->InvalidateContext();
return TRUE;
}
@@ -606,31 +739,24 @@ AquaSalPrinter::~AquaSalPrinter()
// -----------------------------------------------------------------------
-BOOL AquaSalPrinter::StartJob( const String* pFileName,
- const String& rAppName,
- ImplJobSetup* pSetupData,
- ImplQPrinter* pQPrinter )
+BOOL AquaSalPrinter::StartJob( const String* i_pFileName,
+ const String& i_rJobName,
+ const String& i_rAppName,
+ ImplJobSetup* i_pSetupData,
+ vcl::PrinterController& i_rController )
{
- bool bIsQuickJob = false;
- std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator quick_it =
- pSetupData->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ) );
-
- if( quick_it != pSetupData->maValueMap.end() )
- {
- if( quick_it->second.equalsIgnoreAsciiCaseAscii( "true" ) )
- bIsQuickJob = true;
- }
-
- return mpInfoPrinter->StartJob( pFileName, rAppName, pSetupData, pQPrinter, bIsQuickJob );
+ return mpInfoPrinter->StartJob( i_pFileName, i_rJobName, i_rAppName, i_pSetupData, i_rController );
}
// -----------------------------------------------------------------------
BOOL AquaSalPrinter::StartJob( const XubString* i_pFileName,
- const XubString& i_rJobName,
- const XubString& i_rAppName,
- ULONG i_nCopies, BOOL i_bCollate,
- ImplJobSetup* i_pSetupData )
+ const XubString& i_rJobName,
+ const XubString& i_rAppName,
+ ULONG i_nCopies,
+ bool i_bCollate,
+ bool i_bDirect,
+ ImplJobSetup* i_pSetupData )
{
DBG_ERROR( "should never be called" );
return FALSE;
@@ -671,20 +797,62 @@ ULONG AquaSalPrinter::GetErrorCode()
return mpInfoPrinter->GetErrorCode();
}
-////////////////////////////
-////// IMPLEMENT US /////
-////////////////////////////
-
-DuplexMode AquaSalInfoPrinter::GetDuplexMode( const ImplJobSetup* i_pSetupData )
+void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* i_pSetupData )
{
- return DUPLEX_UNKNOWN;
+ m_aPaperFormats.clear();
+ m_bPapersInit = true;
+
+ if( mpPrinter )
+ {
+ if( [mpPrinter statusForTable: @"PPD"] == NSPrinterTableOK )
+ {
+ NSArray* pPaperNames = [mpPrinter stringListForKey: @"PageSize" inTable: @"PPD"];
+ if( pPaperNames )
+ {
+ unsigned int nPapers = [pPaperNames count];
+ for( unsigned int i = 0; i < nPapers; i++ )
+ {
+ NSString* pPaper = [pPaperNames objectAtIndex: i];
+ NSSize aPaperSize = [mpPrinter pageSizeForPaper: pPaper];
+ if( aPaperSize.width > 0 && aPaperSize.height > 0 )
+ {
+ PaperInfo aInfo( PtTo10Mu( aPaperSize.width ),
+ PtTo10Mu( aPaperSize.height ) );
+ m_aPaperFormats.push_back( aInfo );
+ }
+ }
+ }
+ }
+ }
}
-void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* i_pSetupData )
+const PaperInfo* AquaSalInfoPrinter::matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const
{
+ if( ! m_bPapersInit )
+ const_cast<AquaSalInfoPrinter*>(this)->InitPaperFormats( NULL );
+
+ const PaperInfo* pMatch = NULL;
+ o_rOrientation = ORIENTATION_PORTRAIT;
+ for( int n = 0; n < 2 ; n++ )
+ {
+ for( size_t i = 0; i < m_aPaperFormats.size(); i++ )
+ {
+ if( abs( m_aPaperFormats[i].getWidth() - i_nWidth ) < 50 &&
+ abs( m_aPaperFormats[i].getHeight() - i_nHeight ) < 50 )
+ {
+ pMatch = &m_aPaperFormats[i];
+ return pMatch;
+ }
+ }
+ o_rOrientation = ORIENTATION_LANDSCAPE;
+ std::swap( i_nWidth, i_nHeight );
+ }
+ return pMatch;
}
int AquaSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* i_pSetupData )
{
- return 0;
+ return 900;
}
+
+
diff --git a/vcl/inc/vcl/arrange.hxx b/vcl/inc/vcl/arrange.hxx
new file mode 100644
index 000000000000..309d0bf930ea
--- /dev/null
+++ b/vcl/inc/vcl/arrange.hxx
@@ -0,0 +1,425 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accel.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef _VCL_ARRANGE_HXX
+#define _VCL_ARRANGE_HXX
+
+#include "vcl/window.hxx"
+
+#include <vector>
+#include <map>
+#include <boost/shared_ptr.hpp>
+
+namespace vcl
+{
+ /* some helper classes for simple window layouting
+ guidelines:
+ - a WindowArranger is not a Window
+ - a WindowArranger hierarchy manages exactly one level of child windows inside a common parent
+ this is to keep the vcl Window hierarchy flat, as some code like accelerators depend on such behavior
+ - a WindowArranger never becomes owner of a Window, windows need to be destroyed separately
+ - a WindowArranger however always is owner of its child WindowArrangers, that is the
+ WindowArranger hierarchy will keep track of its objects and delete them
+ - a managed element of a WindowArranger can either be a Window (a leaf in the hierarchy)
+ or a child WindowArranger (a node in the hierarchy), but never both
+ */
+
+ class WindowArranger
+ {
+ protected:
+ struct Element
+ {
+ Window* m_pElement;
+ boost::shared_ptr<WindowArranger> m_pChild;
+ sal_Int32 m_nExpandPriority;
+ Size m_aMinSize;
+ bool m_bHidden;
+ long m_nLeftBorder;
+ long m_nTopBorder;
+ long m_nRightBorder;
+ long m_nBottomBorder;
+
+ Element()
+ : m_pElement( NULL )
+ , m_pChild()
+ , m_nExpandPriority( 0 )
+ , m_bHidden( false )
+ , m_nLeftBorder( 0 )
+ , m_nTopBorder( 0 )
+ , m_nRightBorder( 0 )
+ , m_nBottomBorder( 0 )
+ {}
+
+ Element( Window* i_pWin,
+ boost::shared_ptr<WindowArranger> const & i_pChild = boost::shared_ptr<WindowArranger>(),
+ sal_Int32 i_nExpandPriority = 0
+ )
+ : m_pElement( i_pWin )
+ , m_pChild( i_pChild )
+ , m_nExpandPriority( i_nExpandPriority )
+ , m_bHidden( false )
+ , m_nLeftBorder( 0 )
+ , m_nTopBorder( 0 )
+ , m_nRightBorder( 0 )
+ , m_nBottomBorder( 0 )
+ {}
+
+ void deleteChild() { m_pChild.reset(); }
+
+ sal_Int32 getExpandPriority() const;
+ Size getOptimalSize( WindowSizeType ) const;
+ bool isVisible() const;
+ void setPosSize( const Point&, const Size& );
+ };
+
+ Window* m_pParentWindow;
+ WindowArranger* m_pParentArranger;
+ Rectangle m_aManagedArea;
+ long m_nOuterBorder;
+
+ virtual Element* getElement( size_t i_nIndex ) = 0;
+ const Element* getConstElement( size_t i_nIndex ) const
+ { return const_cast<WindowArranger*>(this)->getElement( i_nIndex ); }
+
+
+ public:
+ WindowArranger( WindowArranger* i_pParent = NULL )
+ : m_pParentWindow( i_pParent ? i_pParent->m_pParentWindow : NULL )
+ , m_pParentArranger( i_pParent )
+ , m_nOuterBorder( 0 )
+ {}
+ virtual ~WindowArranger();
+
+ // ask what would be the optimal size
+ virtual Size getOptimalSize( WindowSizeType ) const = 0;
+ // call Resize to trigger layouting inside the managed area
+ // without function while parent window is unset
+ virtual void resize() = 0;
+ // avoid this if possible, using the constructor instead
+ // there can be only one parent window and all managed windows MUST
+ // be direct children of that window
+ // violating that condition will result in undefined behavior
+ virtual void setParentWindow( Window* );
+
+ virtual void setParent( WindowArranger* );
+
+ virtual size_t countElements() const = 0;
+ boost::shared_ptr<WindowArranger> getChild( size_t i_nIndex ) const
+ {
+ const Element* pEle = getConstElement( i_nIndex );
+ return pEle ? pEle->m_pChild : boost::shared_ptr<WindowArranger>();
+ }
+ Window* getWindow( size_t i_nIndex ) const
+ {
+ const Element* pEle = getConstElement( i_nIndex );
+ return pEle ? pEle->m_pElement : NULL;
+ }
+
+ virtual bool isVisible() const; // true if any element is visible
+
+ sal_Int32 getExpandPriority( size_t i_nIndex ) const
+ {
+ const Element* pEle = getConstElement( i_nIndex );
+ return pEle ? pEle->getExpandPriority() : 0;
+ }
+
+ Size getMinimumSize( size_t i_nIndex ) const
+ {
+ const Element* pEle = getConstElement( i_nIndex );
+ return pEle ? pEle->m_aMinSize : Size();
+ }
+
+ bool setMinimumSize( size_t i_nIndex, const Size& i_rMinSize )
+ {
+ Element* pEle = getElement( i_nIndex );
+ if( pEle )
+ pEle->m_aMinSize = i_rMinSize;
+ return pEle != NULL;
+ }
+
+ void setBorders( size_t i_nIndex, long i_nLeft, long i_nTop, long i_nRight, long i_nBottom )
+ {
+ Element* pEle = getElement( i_nIndex );
+ if( pEle )
+ {
+ pEle->m_nLeftBorder = i_nLeft;
+ pEle->m_nRightBorder = i_nRight;
+ pEle->m_nTopBorder = i_nTop;
+ pEle->m_nBottomBorder = i_nBottom;
+ }
+ }
+
+ void show( bool i_bShow = true, bool i_bImmediateUpdate = true );
+
+ void setManagedArea( const Rectangle& i_rArea )
+ {
+ m_aManagedArea = i_rArea;
+ resize();
+ }
+ const Rectangle& getManagedArea() const { return m_aManagedArea; }
+
+ void setOuterBorder( long i_nBorder )
+ {
+ m_nOuterBorder = i_nBorder;
+ resize();
+ }
+ };
+
+ class RowOrColumn : public WindowArranger
+ {
+ long m_nBorderWidth;
+ bool m_bColumn;
+
+ std::vector< WindowArranger::Element > m_aElements;
+
+ void distributeRowWidth( std::vector< Size >& io_rSizes, long i_nUsedWidth, long i_nExtraWidth );
+ void distributeColumnHeight( std::vector< Size >& io_rSizes, long i_nUsedHeight, long i_nExtraHeight );
+ protected:
+ virtual Element* getElement( size_t i_nIndex )
+ { return i_nIndex < m_aElements.size() ? &m_aElements[ i_nIndex ] : 0; }
+
+ public:
+ RowOrColumn( WindowArranger* i_pParent = NULL,
+ bool bColumn = true, long i_nBorderWidth = 5 )
+ : WindowArranger( i_pParent )
+ , m_nBorderWidth( i_nBorderWidth )
+ , m_bColumn( bColumn )
+ {}
+
+ virtual ~RowOrColumn();
+
+ virtual Size getOptimalSize( WindowSizeType ) const;
+ virtual void resize();
+ virtual size_t countElements() const { return m_aElements.size(); }
+
+ // add a managed window at the given index
+ // an index smaller than zero means add the window at the end
+ size_t addWindow( Window*, sal_Int32 i_nExpandPrio = 0, size_t i_nIndex = ~0 );
+ void remove( Window* );
+
+ size_t addChild( boost::shared_ptr<WindowArranger> const &, sal_Int32 i_nExpandPrio = 0, size_t i_nIndex = ~0 );
+ // convenience: use for addChild( new WindowArranger( ... ) ) constructs
+ size_t addChild( WindowArranger* i_pNewChild, sal_Int32 i_nExpandPrio = 0, size_t i_nIndex = ~0 )
+ { return addChild( boost::shared_ptr<WindowArranger>( i_pNewChild ), i_nExpandPrio, i_nIndex ); }
+ void remove( boost::shared_ptr<WindowArranger> const & );
+
+ long getBorderWidth() const { return m_nBorderWidth; }
+ };
+
+ class LabeledElement : public WindowArranger
+ {
+ WindowArranger::Element m_aLabel;
+ WindowArranger::Element m_aElement;
+ long m_nDistance;
+ long m_nLabelColumnWidth;
+ int m_nLabelStyle;
+ protected:
+ virtual Element* getElement( size_t i_nIndex )
+ {
+ if( i_nIndex == 0 )
+ return &m_aLabel;
+ else if( i_nIndex == 1 )
+ return &m_aElement;
+ return 0;
+ }
+
+ public:
+ LabeledElement( WindowArranger* i_pParent = NULL, int i_nLabelStyle = 0, long i_nDistance = 5 )
+ : WindowArranger( i_pParent )
+ , m_nDistance( i_nDistance )
+ , m_nLabelColumnWidth( 0 )
+ , m_nLabelStyle( i_nLabelStyle )
+ {}
+
+ virtual ~LabeledElement();
+
+ virtual Size getOptimalSize( WindowSizeType ) const;
+ virtual void resize();
+ virtual size_t countElements() const { return 2; }
+
+ void setLabel( Window* );
+ void setLabel( boost::shared_ptr<WindowArranger> const & );
+ void setElement( Window* );
+ void setElement( boost::shared_ptr<WindowArranger> const & );
+ void setLabelColumnWidth( long i_nWidth )
+ { m_nLabelColumnWidth = i_nWidth; }
+
+ Size getLabelSize( WindowSizeType i_eType ) const
+ { return m_aLabel.getOptimalSize( i_eType ); }
+ Size getElementSize( WindowSizeType i_eType ) const
+ { return m_aElement.getOptimalSize( i_eType ); }
+ };
+
+ class LabelColumn : public RowOrColumn
+ {
+ long getLabelWidth() const;
+ public:
+ LabelColumn( WindowArranger* i_pParent = NULL, long i_nBorderWidth = 5 )
+ : RowOrColumn( i_pParent, true, i_nBorderWidth )
+ {}
+ virtual ~LabelColumn();
+
+ virtual Size getOptimalSize( WindowSizeType ) const;
+ virtual void resize();
+
+ // returns the index of the added label
+ size_t addRow( Window* i_pLabel, boost::shared_ptr<WindowArranger> const& i_rElement, long i_nIndent = 0 );
+ size_t addRow( Window* i_pLabel, Window* i_pElement, long i_nIndent = 0 );
+ };
+
+ class Indenter : public WindowArranger
+ {
+ long m_nIndent;
+ WindowArranger::Element m_aElement;
+
+ protected:
+ virtual Element* getElement( size_t i_nIndex )
+ { return i_nIndex == 0 ? &m_aElement : NULL; }
+
+ public:
+ Indenter( WindowArranger* i_pParent = NULL, long i_nIndent = 15 )
+ : WindowArranger( i_pParent )
+ , m_nIndent( i_nIndent )
+ {}
+
+ virtual ~Indenter();
+
+ virtual Size getOptimalSize( WindowSizeType ) const;
+ virtual void resize();
+ virtual size_t countElements() const { return (m_aElement.m_pElement != 0 || m_aElement.m_pChild != 0) ? 1 : 0; }
+
+ void setIndent( long i_nIndent )
+ {
+ m_nIndent = i_nIndent;
+ resize();
+ }
+
+ void setWindow( Window*, sal_Int32 i_nExpandPrio = 0 );
+ void setChild( boost::shared_ptr<WindowArranger> const &, sal_Int32 i_nExpandPrio = 0 );
+ // convenience: use for setChild( new WindowArranger( ... ) ) constructs
+ void setChild( WindowArranger* i_pChild, sal_Int32 i_nExpandPrio = 0 )
+ { setChild( boost::shared_ptr<WindowArranger>( i_pChild ), i_nExpandPrio ); }
+ };
+
+ class Spacer : public WindowArranger
+ {
+ WindowArranger::Element m_aElement;
+ Size m_aSize;
+
+ protected:
+ virtual Element* getElement( size_t i_nIndex )
+ { return i_nIndex == 0 ? &m_aElement : NULL; }
+
+ public:
+ Spacer( WindowArranger* i_pParent = NULL, sal_Int32 i_nPrio = 20, const Size& i_rSize = Size( 0, 0 ) )
+ : WindowArranger( i_pParent )
+ , m_aElement( NULL, boost::shared_ptr<WindowArranger>(), i_nPrio )
+ , m_aSize( i_rSize )
+ {}
+
+ virtual ~Spacer() {}
+
+ virtual Size getOptimalSize( WindowSizeType ) const
+ { return m_aSize; }
+ virtual void resize() {}
+ virtual void setParentWindow( Window* ) {}
+ virtual size_t countElements() const { return 1; }
+ virtual bool isVisible() const { return true; }
+ };
+
+ class MatrixArranger : public WindowArranger
+ {
+ long m_nBorderX;
+ long m_nBorderY;
+
+ struct MatrixElement : public WindowArranger::Element
+ {
+ sal_uInt32 m_nX;
+ sal_uInt32 m_nY;
+
+ MatrixElement()
+ : WindowArranger::Element()
+ , m_nX( 0 )
+ , m_nY( 0 )
+ {}
+
+ MatrixElement( Window* i_pWin,
+ sal_uInt32 i_nX, sal_uInt32 i_nY,
+ boost::shared_ptr<WindowArranger> const & i_pChild = boost::shared_ptr<WindowArranger>(),
+ sal_Int32 i_nExpandPriority = 0
+ )
+ : WindowArranger::Element( i_pWin, i_pChild, i_nExpandPriority )
+ , m_nX( i_nX )
+ , m_nY( i_nY )
+ {
+ }
+ };
+
+ std::vector< MatrixElement > m_aElements;
+ std::map< sal_uInt64, size_t > m_aMatrixMap; // maps (x | (y << 32)) to index in m_aElements
+
+ sal_uInt64 getMap( sal_uInt32 i_nX, sal_uInt32 i_nY )
+ { return static_cast< sal_uInt64 >(i_nX) | (static_cast< sal_uInt64>(i_nY) << 32 ); }
+
+ Size getOptimalSize( WindowSizeType, std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights ) const;
+ protected:
+ virtual Element* getElement( size_t i_nIndex )
+ { return i_nIndex < m_aElements.size() ? &m_aElements[ i_nIndex ] : 0; }
+
+ public:
+ MatrixArranger( WindowArranger* i_pParent = NULL,
+ long i_nBorderX = 5,
+ long i_nBorderY = 5 )
+ : WindowArranger( i_pParent )
+ , m_nBorderX( i_nBorderX )
+ , m_nBorderY( i_nBorderY )
+ {}
+
+ virtual ~MatrixArranger();
+
+ virtual Size getOptimalSize( WindowSizeType ) const;
+ virtual void resize();
+ virtual size_t countElements() const { return m_aElements.size(); }
+
+ // add a managed window at the given matrix position
+ size_t addWindow( Window*, sal_uInt32 i_nX, sal_uInt32 i_nY, sal_Int32 i_nExpandPrio = 0 );
+ void remove( Window* );
+
+ size_t addChild( boost::shared_ptr<WindowArranger> const &, sal_uInt32 i_nX, sal_uInt32 i_nY, sal_Int32 i_nExpandPrio = 0 );
+ // convenience: use for addChild( new WindowArranger( ... ) ) constructs
+ size_t addChild( WindowArranger* i_pNewChild, sal_uInt32 i_nX, sal_uInt32 i_nY, sal_Int32 i_nExpandPrio = 0 )
+ { return addChild( boost::shared_ptr<WindowArranger>( i_pNewChild ), i_nX, i_nY, i_nExpandPrio ); }
+ void remove( boost::shared_ptr<WindowArranger> const & );
+ };
+
+}
+
+#endif
+
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index b80edf6712cd..b5f70217e149 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -425,7 +425,6 @@ private:
SAL_DLLPRIVATE void ImplInitCheckBoxData();
SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SAL_DLLPRIVATE void ImplDrawCheckBoxState();
SAL_DLLPRIVATE void ImplInvalidateOrDrawCheckBoxState();
SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize,
@@ -450,10 +449,12 @@ protected:
SAL_DLLPRIVATE virtual const Color&
GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
+ SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState();
+ SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; }
+ SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; }
public:
SAL_DLLPRIVATE void ImplCheck();
SAL_DLLPRIVATE void ImplSetMinimumNWFSize();
-
public:
CheckBox( Window* pParent, WinBits nStyle = 0 );
CheckBox( Window* pParent, const ResId& rResId );
@@ -552,4 +553,15 @@ public:
~TriStateBox();
};
+class VCL_DLLPUBLIC DisclosureButton : public CheckBox
+{
+protected:
+ SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState();
+public:
+ DisclosureButton( Window* pParent, WinBits nStyle = 0 );
+ DisclosureButton( Window* pParent, const ResId& rResId );
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+};
+
#endif // _SV_BUTTON_HXX
diff --git a/vcl/inc/vcl/configsettings.hxx b/vcl/inc/vcl/configsettings.hxx
index aee684a84ca4..211ea3f0892b 100644
--- a/vcl/inc/vcl/configsettings.hxx
+++ b/vcl/inc/vcl/configsettings.hxx
@@ -54,7 +54,6 @@ namespace vcl
std::hash_map< rtl::OUString, SmallOUStrMap, rtl::OUStringHash > m_aSettings;
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames );
- virtual void Commit();
void getValues();
SettingsConfigItem();
@@ -65,6 +64,8 @@ namespace vcl
const rtl::OUString& getValue( const rtl::OUString& rGroup, const rtl::OUString& rKey ) const;
void setValue( const rtl::OUString& rGroup, const rtl::OUString& rKey, const rtl::OUString& rValue );
+
+ virtual void Commit();
};
//........................................................................
diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx
index fb99bd028631..ad6a4ee017d9 100644
--- a/vcl/inc/vcl/edit.hxx
+++ b/vcl/inc/vcl/edit.hxx
@@ -120,6 +120,7 @@ private:
SAL_DLLPRIVATE void ImplCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard );
SAL_DLLPRIVATE void ImplPaste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard );
SAL_DLLPRIVATE long ImplGetExtraOffset() const;
+ SAL_DLLPRIVATE long ImplGetTextYPosition() const;
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > ImplGetInputSequenceChecker() const;
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > ImplGetBreakIterator() const;
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index a5c834fce486..d6ffc1625afe 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -187,6 +187,7 @@ public:
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual void UserDraw( const UserDrawEvent& rUDEvt );
+ virtual Size GetOptimalSize(WindowSizeType eType) const;
void SetImage( const Image& rImage );
const Image& GetImage() const { return maImage; }
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index c53460d35584..e4acd55439cc 100644
--- a/vcl/inc/vcl/gdimtf.hxx
+++ b/vcl/inc/vcl/gdimtf.hxx
@@ -164,6 +164,7 @@ public:
void Scale( double fScaleX, double fScaleY );
void Scale( const Fraction& rScaleX, const Fraction& rScaleY );
void Rotate( long nAngle10 );
+ void Clip( const Rectangle& );
/* get the bound rect of the contained actions
* caveats:
* - clip actions will limit the contained actions,
diff --git a/vcl/inc/vcl/impprn.hxx b/vcl/inc/vcl/impprn.hxx
index c86090e8b49f..0cd6e9688201 100644
--- a/vcl/inc/vcl/impprn.hxx
+++ b/vcl/inc/vcl/impprn.hxx
@@ -28,7 +28,7 @@
*
************************************************************************/
-#ifndef _SV_IMPPRN_HXX
+#if 0
#define _SV_IMPPRN_HXX
#include <vcl/print.hxx>
@@ -107,7 +107,6 @@ public:
/**
used by pull implementation to emit the next page
*/
- using Printer::PrintPage;
void PrintPage( unsigned int nPage );
/**
used by pull implementation to get the number of physical pages
diff --git a/vcl/inc/vcl/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx
index 4451c566b5bf..d328f41f5b5b 100644
--- a/vcl/inc/vcl/jobdata.hxx
+++ b/vcl/inc/vcl/jobdata.hxx
@@ -74,6 +74,8 @@ struct JobData
JobData( const JobData& rData ) { *this = rData; }
+ void setCollate( bool bCollate );
+
// creates a new buffer using new
// it is up to the user to delete it again
bool getStreamBuffer( void*& pData, int& bytes );
diff --git a/vcl/inc/vcl/jobset.h b/vcl/inc/vcl/jobset.h
index 9f3eefd507d5..fd15d0c076da 100644
--- a/vcl/inc/vcl/jobset.h
+++ b/vcl/inc/vcl/jobset.h
@@ -60,12 +60,13 @@ struct ImplJobSetup
String maPrinterName; // Printer-Name
String maDriver; // Driver-Name
Orientation meOrientation; // Orientation
- USHORT mnPaperBin; // Papierschacht
- Paper mePaperFormat; // Papierformat
- long mnPaperWidth; // Papierbreite in 100tel mm
- long mnPaperHeight; // Papierhoehe in 100tel mm
- ULONG mnDriverDataLen; // Laenge der systemabhaengigen Daten
- BYTE* mpDriverData; // Systemabhaengige Daten die als Byte-Block rausgeschrieben werden
+ DuplexMode meDuplexMode; // Duplex
+ USHORT mnPaperBin; // paper bin / in tray
+ Paper mePaperFormat; // paper format
+ long mnPaperWidth; // paper width (100th mm)
+ long mnPaperHeight; // paper height (100th mm)
+ ULONG mnDriverDataLen; // length of system specific data
+ BYTE* mpDriverData; // system specific data (will be streamed a byte block)
::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap;
ImplJobSetup();
diff --git a/vcl/inc/vcl/lstbox.h b/vcl/inc/vcl/lstbox.h
index 6097422b556b..9b95b9526d58 100644
--- a/vcl/inc/vcl/lstbox.h
+++ b/vcl/inc/vcl/lstbox.h
@@ -60,4 +60,9 @@
*/
#define LISTBOX_ENTRY_FLAG_MULTILINE 0x0000002
+/** this flags lets the item be drawn disabled (e.g. in grey text)
+ usage only guaranteed with LISTBOX_ENTRY_FLAG_DISABLE_SELECTION
+*/
+#define LISTBOX_ENTRY_FLAG_DRAW_DISABLED 0x0000004
+
#endif // _SV_LSTBOX_H
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 8d3ac4e8b505..66f35823b06a 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -93,6 +93,8 @@ typedef USHORT MenuItemBits;
#define MIB_POPUPSELECT ((MenuItemBits)0x0020)
// not in rsc/vclsrc.hxx because only a prelimitary solution
#define MIB_NOSELECT ((MenuItemBits)0x0040)
+#define MIB_ICON ((MenuItemBits)0x0080)
+#define MIB_TEXT ((MenuItemBits)0x0100)
#define MENU_FLAG_NOAUTOMNEMONICS 0x0001
#define MENU_FLAG_HIDEDISABLEDENTRIES 0x0002
diff --git a/svx/source/inc/confirmdelete.hxx b/vcl/inc/vcl/oldprintadaptor.hxx
index a06e297a8748..d8b26433af94 100644
--- a/svx/source/inc/confirmdelete.hxx
+++ b/vcl/inc/vcl/oldprintadaptor.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: confirmdelete.hxx,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -28,35 +25,28 @@
*
************************************************************************/
-#ifndef SVX_FORM_CONFIRMDELETE_HXX
-#define SVX_FORM_CONFIRMDELETE_HXX
+#ifndef _VCL_OLDPRINTADAPTOR
+#define _VCL_OLDPRINTADAPTOR
-#include <vcl/btndlg.hxx>
-#include <vcl/fixed.hxx>
+#include "vcl/print.hxx"
-//........................................................................
-namespace svxform
+namespace vcl
{
-//........................................................................
-
- //====================================================================
- //= class ConfirmDeleteDialog
- //====================================================================
- class ConfirmDeleteDialog : public ButtonDialog
+ struct ImplOldStyleAdaptorData;
+ class VCL_DLLPUBLIC OldStylePrintAdaptor : public PrinterController
{
- FixedImage m_aInfoImage;
- FixedText m_aTitle;
- FixedText m_aMessage;
-
+ ImplOldStyleAdaptorData* mpData;
public:
- ConfirmDeleteDialog(Window* pParent, const String& _rTitle);
- ~ConfirmDeleteDialog();
- };
-
-//........................................................................
-} // namespace svxform
-//........................................................................
+ OldStylePrintAdaptor( const boost::shared_ptr< Printer >& );
+ virtual ~OldStylePrintAdaptor();
-#endif // SVX_FORM_CONFIRMDELETE_HXX
+ void StartPage();
+ void EndPage();
+ virtual int getPageCount() const;
+ virtual com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParameters( int i_nPage ) const;
+ virtual void printPage( int i_nPage ) const;
+ };
+}
+#endif
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 4a5b92444c21..0c03652d9300 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -1131,12 +1131,15 @@ public:
false: output metafile is unchanged input metafile
@attention this is a member method, so current state can influence the result !
+ @attention the output metafile is prepared in pixel mode for the currentOutputDevice
+ state. It can not be moved or rotated reliably anymore.
*/
bool RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
long nMaxBmpDPIX, long nMaxBmpDPIY,
bool bReduceTransparency,
bool bTransparencyAutoMode,
- bool bDownsampleBitmaps
+ bool bDownsampleBitmaps,
+ const Color& rBackground = Color( COL_TRANSPARENT )
);
/** Retrieve downsampled and cropped bitmap
diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h
index 51cbb5dee0cf..12c7439aa5b3 100644
--- a/vcl/inc/vcl/print.h
+++ b/vcl/inc/vcl/print.h
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: print.h,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.114.2 $
*
* This file is part of OpenOffice.org.
*
@@ -31,27 +31,18 @@
#ifndef _SV_PRINT_H
#define _SV_PRINT_H
-#include <tools/list.hxx>
-#include <vcl/sv.h>
-#include <vcl/dllapi.h>
+#include "vcl/sv.h"
+#include "vcl/dllapi.h"
#include <vector>
#include <hash_map>
struct SalPrinterQueueInfo;
class QueueInfo;
+class JobSetup;
-// ------------------------
-// - private printer data -
-// ------------------------
-struct ImplPrivatePrinterData
-{
- bool mbNextJobIsQuick;
-
- ImplPrivatePrinterData() :
- mbNextJobIsQuick( false )
- {}
-};
+namespace vcl
+{ class PrinterListener; }
// --------------------
// - ImplPrnQueueData -
@@ -87,5 +78,7 @@ public:
// --------------
void ImplDeletePrnQueueList();
+void SAL_DLLPRIVATE ImplUpdateJobSetupPaper( JobSetup& rJobSetup );
+
#endif // _SV_PRINT_H
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index b9176f4106dc..daea0c941dd0 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -31,14 +31,22 @@
#ifndef _SV_PRINT_HXX
#define _SV_PRINT_HXX
-#include <tools/errcode.hxx>
-#include <vcl/sv.h>
-#include <vcl/dllapi.h>
-#include <vcl/outdev.hxx>
-#include <vcl/prntypes.hxx>
-#include <vcl/jobset.hxx>
-#include <vcl/gdimtf.hxx>
-#include <tools/stream.hxx>
+#include "tools/errcode.hxx"
+#include "vcl/sv.h"
+#include "vcl/dllapi.h"
+#include "vcl/outdev.hxx"
+#include "vcl/prntypes.hxx"
+#include "vcl/jobset.hxx"
+#include "vcl/gdimtf.hxx"
+#include "tools/stream.hxx"
+#include "tools/multisel.hxx"
+
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/view/PrintableState.hpp"
+
+#include <boost/shared_ptr.hpp>
+#include <hash_map>
+#include <set>
struct SalPrinterInfoQueue;
class SalInfoPrinter;
@@ -46,12 +54,11 @@ struct SalPrinterQueueInfo;
class SalPrinter;
class VirtualDevice;
class Window;
-class ImplQPrinter;
-struct ImplPrivatePrinterData;
-namespace com { namespace sun { namespace star { namespace uno {
- class Any;
-} } } }
+namespace vcl {
+ class PrinterController;
+ class PrintDialog;
+}
// -----------------
// - Printer-Types -
@@ -216,16 +223,12 @@ class VCL_DLLPUBLIC Printer : public OutputDevice
friend class ImplQPrinter;
private:
- ImplPrivatePrinterData* mpPrinterData;
SalInfoPrinter* mpInfoPrinter;
SalPrinter* mpPrinter;
- Printer* mpJobPrinter;
SalGraphics* mpJobGraphics;
Printer* mpPrev;
Printer* mpNext;
VirtualDevice* mpDisplayDev;
- ImplQPrinter* mpQPrinter;
- GDIMetaFile* mpQMtf;
PrinterOptions* mpPrinterOptions;
XubString maPrinterName;
XubString maDriver;
@@ -250,9 +253,6 @@ private:
BOOL mbUserSetupCompleted;
BOOL mbUserSetupResult;
Link maErrorHdl;
- Link maStartPrintHdl;
- Link maEndPrintHdl;
- Link maPrintPageHdl;
SAL_DLLPRIVATE void ImplInitData();
SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
@@ -261,22 +261,25 @@ private:
const XubString* pDriver );
SAL_DLLPRIVATE void ImplUpdatePageData();
SAL_DLLPRIVATE void ImplUpdateFontList();
- SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
+ SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
DECL_DLLPRIVATE_LINK( ImplDestroyPrinterAsync, void* );
-public:
- SAL_DLLPRIVATE void ImplEndPrint();
- SAL_DLLPRIVATE void ImplUpdateQuickStatus();
+
+ SAL_DLLPRIVATE bool StartJob( const rtl::OUString& rJobName, boost::shared_ptr<vcl::PrinterController>& );
+
+ static SAL_DLLPRIVATE ULONG ImplSalPrinterErrorCodeToVCL( ULONG nError );
+
private:
+ SAL_DLLPRIVATE void ImplEndPrint();
+ SAL_DLLPRIVATE BOOL EndJob();
SAL_DLLPRIVATE Printer( const Printer& rPrinter );
SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter );
-
-#ifdef _SPOOLPRINTER_EXT
+public:
+ SAL_DLLPRIVATE void ImplStartPage();
+ SAL_DLLPRIVATE void ImplEndPage();
public:
void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient );
void DrawGradientEx( OutputDevice* pOut, const PolyPolygon& rPolyPoly, const Gradient& rGradient );
-#endif // _SPOOLPRINTER_EXT
-
protected:
void SetSelfAsQueuePrinter( BOOL bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
@@ -295,9 +298,6 @@ public:
static XubString GetDefaultPrinterName();
virtual void Error();
- virtual void StartPrint();
- virtual void EndPrint();
- virtual void PrintPage();
const XubString& GetName() const { return maPrinterName; }
const XubString& GetDriverName() const { return maDriver; }
@@ -322,6 +322,7 @@ public:
BOOL SetOrientation( Orientation eOrient );
Orientation GetOrientation() const;
DuplexMode GetDuplexMode() const;
+ BOOL SetDuplexMode( DuplexMode );
// returns the angle that a landscape page will be turned counterclockwise
// wrt to portrait. The return value may be only valid for
// the current paper
@@ -330,6 +331,7 @@ public:
USHORT GetPaperBin() const;
BOOL SetPaper( Paper ePaper );
BOOL SetPaperSizeUser( const Size& rSize );
+ BOOL SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
Paper GetPaper() const;
// returns number of available paper formats
@@ -348,58 +350,333 @@ public:
USHORT GetCopyCount() const { return mnCopyCount; }
BOOL IsCollateCopy() const { return mbCollateCopy; }
- USHORT GetCurPrintPage() const { return mnCurPrintPage; }
BOOL IsPrinting() const { return mbPrinting; }
void SetPrintFile( const XubString& rFileName ) { maPrintFile = rFileName; }
const XubString& GetPrintFile() const { return maPrintFile; }
void EnablePrintFile( BOOL bEnable ) { mbPrintFile = bEnable; }
BOOL IsPrintFileEnabled() const { return mbPrintFile; }
- BOOL StartJob( const XubString& rJobName );
- BOOL EndJob();
BOOL AbortJob();
const XubString& GetCurJobName() const { return maJobName; }
USHORT GetCurPage() const { return mnCurPage; }
BOOL IsJobActive() const { return mbJobActive; }
- BOOL StartPage();
- BOOL EndPage();
-
- void SetPageQueueSize( USHORT nPages ) { mnPageQueueSize = nPages; }
- USHORT GetPageQueueSize() const { return mnPageQueueSize; }
ULONG GetError() const { return ERRCODE_TOERROR(mnError); }
ULONG GetErrorCode() const { return mnError; }
void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
const Link& GetErrorHdl() const { return maErrorHdl; }
- void SetStartPrintHdl( const Link& rLink ) { maStartPrintHdl = rLink; }
- const Link& GetStartPrintHdl() const { return maStartPrintHdl; }
- void SetEndPrintHdl( const Link& rLink ) { maEndPrintHdl = rLink; }
- const Link& GetEndPrintHdl() const { return maEndPrintHdl; }
- void SetPrintPageHdl( const Link& rLink ) { maPrintPageHdl = rLink; }
- const Link& GetPrintPageHdl() const { return maPrintPageHdl; }
void Compat_OldPrinterMetrics( bool bSet );
- /** Notify that the next StartJob belongs to a UI less "direct print" job
- *
- * deprecated: the canonical way to notify a UI less job is to set the
- * JobSetup value "IsQuickJob" to "true". If set at all, the "IsQuickJob" value
- * on JobSetup will be preferred. However if no "IsQuickJob" value is set,
- * setting SetNextJobIsQuick will cause the following StartJob to set this value
- * to "true" in the current JobSetup.
- *
- * the paramter can be set to "false" again in case a job was not started and the
- * printer is to be reused.
- */
- void SetNextJobIsQuick( bool bQuick = true );
-
/** checks the printer list and updates it necessary
*
* sends a DataChanged event of type DATACHANGED_PRINTER
* if the printer list changed
*/
static void updatePrinters();
+
+ /** execute a print job
+
+ starts a print job asynchronously (that is will return
+
+ */
+ static void PrintJob( const boost::shared_ptr<vcl::PrinterController>& i_pController,
+ const JobSetup& i_rInitSetup
+ );
+
+ // implementation detail of PrintJob being asynchronous
+ // not exported, not usable outside vcl
+ static void SAL_DLLPRIVATE ImplPrintJob( const boost::shared_ptr<vcl::PrinterController>& i_pController,
+ const JobSetup& i_rInitSetup
+ );
+};
+
+namespace vcl
+{
+class ImplPrinterControllerData;
+
+class VCL_DLLPUBLIC PrinterController
+{
+ ImplPrinterControllerData* mpImplData;
+protected:
+ PrinterController( const boost::shared_ptr<Printer>& );
+public:
+ enum NupOrderType
+ { LRTB, TBLR };
+ struct MultiPageSetup
+ {
+ // all metrics in 100th mm
+ int nRows;
+ int nColumns;
+ int nRepeat;
+ Size aPaperSize;
+ long nLeftMargin;
+ long nTopMargin;
+ long nRightMargin;
+ long nBottomMargin;
+ long nHorizontalSpacing;
+ long nVerticalSpacing;
+ bool bDrawBorder;
+ PrinterController::NupOrderType nOrder;
+
+ MultiPageSetup()
+ : nRows( 1 ), nColumns( 1 ), nRepeat( 1 ), aPaperSize( 21000, 29700 )
+ , nLeftMargin( 0 ), nTopMargin( 0 )
+ , nRightMargin( 0 ), nBottomMargin( 0 )
+ , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
+ , bDrawBorder( false )
+ , nOrder( LRTB )
+ {
+ }
+ };
+
+ struct PageSize
+ {
+ Size aSize; // in 100th mm
+ bool bFullPaper; // full paper, not only imageable area is printed
+
+ PageSize( const Size& i_rSize = Size( 21000, 29700 ),
+ bool i_bFullPaper = false
+ ) : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
+ };
+
+ PrinterController();
+ virtual ~PrinterController();
+
+ const boost::shared_ptr<Printer>& getPrinter() const;
+ /* for implementations: get current job properties as changed by e.g. print dialog
+ this gets the current set of properties initially told to Printer::PrintJob
+
+ For convenience a second sequence will be merged in to get a combined sequence.
+ In case of duplicate property names, the value of i_MergeList wins.
+ */
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
+ getJobProperties( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rMergeList ) const;
+
+ /* get the PropertyValue of a Property
+ */
+ com::sun::star::beans::PropertyValue* getValue( const rtl::OUString& i_rPropertyName );
+ const com::sun::star::beans::PropertyValue* getValue( const rtl::OUString& i_rPropertyName ) const;
+ // get a sequence of properties
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getValues( const com::sun::star::uno::Sequence< rtl::OUString >& ) const;
+ /* get a bool property
+ in case the property is unknown or not convertible to bool, i_bFallback is returned
+ */
+ sal_Bool getBoolProperty( const rtl::OUString& i_rPropertyName, sal_Bool i_bFallback ) const;
+
+ /* set a property value - can also be used to add another UI property
+ */
+ void setValue( const rtl::OUString& i_rPropertyName, const com::sun::star::uno::Any& i_rValue );
+ void setValue( const com::sun::star::beans::PropertyValue& i_rValue );
+
+ /* return the currently active UI options. These are the same that were passed to setUIOptions.
+ */
+ const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& getUIOptions() const;
+ /* set possible UI options. should only be done once before passing the PrinterListener
+ to Printer::PrintJob
+ */
+ void setUIOptions( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& );
+ /* enable/disable an option; this can be used to implement dialog logic.
+ */
+ void enableUIOption( const rtl::OUString& rPropName, bool bEnable );
+ bool isUIOptionEnabled( const rtl::OUString& rPropName ) const;
+ /* returns the property name rPropName depends on or an empty string
+ if no dependency exists.
+ */
+ rtl::OUString getDependency( const rtl::OUString& rPropName ) const;
+ /* makeEnabled will chage the property rPropName depends on to the value
+ that makes rPropName enabled. If the dependency itself is also disabled,
+ no action will be performed.
+
+ returns the property name rPropName depends on or an empty string
+ if no change was made.
+ */
+ rtl::OUString makeEnabled( const rtl::OUString& rPropName );
+
+ virtual int getPageCount() const = 0; // must be overloaded by the app
+ /* get the page parameters, namely the jobsetup that should be active for the page
+ (describing among others the physical page size) and the "page size". In writer
+ case this would probably be the same as the JobSetup since writer sets the page size
+ draw/impress for example print their page on the paper set on the printer,
+ possibly adjusting the page size to fit. That means the page size can be different from
+ the paper size.
+ */
+ // must be overloaded by the app, return page size in 1/100th mm
+ virtual com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParameters( int i_nPage ) const = 0;
+ virtual void printPage( int i_nPage ) const = 0; // must be overloaded by the app
+ virtual void jobStarted(); // will be called after a possible dialog has been shown and the real printjob starts
+ virtual void jobFinished( com::sun::star::view::PrintableState );
+
+ com::sun::star::view::PrintableState getJobState() const;
+
+ void abortJob();
+
+ bool isShowDialogs() const;
+ bool isDirectPrint() const;
+
+ // implementation details, not usable outside vcl
+ SAL_DLLPRIVATE int getFilteredPageCount();
+ SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false );
+ SAL_DLLPRIVATE PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false );
+ SAL_DLLPRIVATE void printFilteredPage( int i_nPage );
+ SAL_DLLPRIVATE void setPrinter( const boost::shared_ptr<Printer>& );
+ SAL_DLLPRIVATE void setOptionChangeHdl( const Link& );
+ SAL_DLLPRIVATE void createProgressDialog();
+ SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
+ SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const;
+ SAL_DLLPRIVATE void setLastPage( sal_Bool i_bLastPage );
+ SAL_DLLPRIVATE void setReversePrint( sal_Bool i_bReverse );
+ SAL_DLLPRIVATE bool getReversePrint() const;
+ SAL_DLLPRIVATE void pushPropertiesToPrinter();
+ SAL_DLLPRIVATE void setJobState( com::sun::star::view::PrintableState );
+ SAL_DLLPRIVATE bool setupPrinter( Window* i_pDlgParent );
+
+ SAL_DLLPRIVATE int getPageCountProtected() const;
+ SAL_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParametersProtected( int i_nPage ) const;
+
+ SAL_DLLPRIVATE ULONG removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
};
+class VCL_DLLPUBLIC PrinterOptionsHelper
+{
+ protected:
+ std::hash_map< rtl::OUString, com::sun::star::uno::Any, rtl::OUStringHash > m_aPropertyMap;
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > m_aUIProperties;
+
+ public:
+ PrinterOptionsHelper() {} // create without ui properties
+ PrinterOptionsHelper( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rUIProperties )
+ : m_aUIProperties( i_rUIProperties )
+ {}
+ ~PrinterOptionsHelper()
+ {}
+
+ /* process a new set of properties
+ * merges changed properties and returns "true" if any occured
+ * if the optional output set is not NULL then the names of the changed properties are returned
+ **/
+ bool processProperties( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp,
+ std::set< rtl::OUString >* o_pChangeProp = NULL );
+ /* append to a sequence of property values the ui property sequence passed at creation
+ * as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property
+ * will be appended.
+ **/
+ void appendPrintUIOptions( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& io_rProps ) const;
+
+ // check if a property exists
+ bool hasProperty( const rtl::OUString& i_rPropertyName ) const;
+ bool hasProperty( const char* i_pPropertyName ) const
+ { return hasProperty( rtl::OUString::createFromAscii( i_pPropertyName ) ); }
+
+ // returns an empty Any for not existing properties
+ com::sun::star::uno::Any getValue( const rtl::OUString& i_rPropertyName ) const;
+ // change a value in the property set; this will not have an effect to an eventual PrinterController
+ // the user of setValue must decide whether it is necessary to set the value there also
+ void setValue( const rtl::OUString& i_rPropertyName, const com::sun::star::uno::Any& i_rValue );
+ void setValue( const char* i_pPropertyName, const com::sun::star::uno::Any& i_rValue )
+ { setValue( rtl::OUString::createFromAscii( i_pPropertyName ), i_rValue ); }
+
+ sal_Bool getBoolValue( const rtl::OUString& i_rPropertyName, sal_Bool i_bDefault = sal_False ) const;
+ // convenience for fixed strings
+ sal_Bool getBoolValue( const char* i_pPropName, sal_Bool i_bDefault = sal_False ) const
+ { return getBoolValue( rtl::OUString::createFromAscii( i_pPropName ), i_bDefault ); }
+
+ sal_Int64 getIntValue( const rtl::OUString& i_rPropertyName, sal_Int64 i_nDefault = 0 ) const;
+ // convenience for fixed strings
+ sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault = 0 ) const
+ { return getIntValue( rtl::OUString::createFromAscii( i_pPropName ), i_nDefault ); }
+
+ rtl::OUString getStringValue( const rtl::OUString& i_rPropertyName, const rtl::OUString& i_rDefault = rtl::OUString() ) const;
+ // convenience for fixed strings
+ rtl::OUString getStringValue( const char* i_pPropName, const rtl::OUString& i_rDefault = rtl::OUString() ) const
+ { return getStringValue( rtl::OUString::createFromAscii( i_pPropName ), i_rDefault ); }
+
+ // helper functions for user to create a single control
+ struct UIControlOptions
+ {
+ rtl::OUString maDependsOnName;
+ sal_Int32 mnDependsOnEntry;
+ sal_Bool mbAttachToDependency;
+ rtl::OUString maGroupHint;
+ sal_Bool mbInternalOnly;
+ sal_Bool mbEnabled;
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > maAddProps;
+
+ UIControlOptions( const rtl::OUString& i_rDependsOnName = rtl::OUString(),
+ sal_Int32 i_nDependsOnEntry = -1,
+ sal_Bool i_bAttachToDependency = sal_False,
+ const rtl::OUString& i_rGroupHint = rtl::OUString(),
+ sal_Bool i_bInternalOnly = sal_False,
+ sal_Bool i_bEnabled = sal_True
+ )
+ : maDependsOnName( i_rDependsOnName )
+ , mnDependsOnEntry( i_nDependsOnEntry )
+ , mbAttachToDependency( i_bAttachToDependency )
+ , maGroupHint( i_rGroupHint )
+ , mbInternalOnly( i_bInternalOnly )
+ , mbEnabled( i_bEnabled ) {}
+ };
+
+ // general control
+ static com::sun::star::uno::Any getUIControlOpt( const rtl::OUString& i_rTitle,
+ const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpText,
+ const rtl::OUString& i_rType,
+ const com::sun::star::beans::PropertyValue* i_pValue = NULL,
+ const UIControlOptions& i_rControlOptions = UIControlOptions()
+ );
+ // create a group (e.g. a TabPage); following controls will be grouped in it until the next
+ // group begins
+ static com::sun::star::uno::Any getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpText );
+
+ // create a subgroup (e.g. a FixedLine); following controls will be grouped in it until the next
+ // subgroup or group begins
+ // setting bJobPage = true will make the subgroup appear on the first page of the print dialog
+ static com::sun::star::uno::Any getSubgroupControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const UIControlOptions& i_rControlOptions = UIControlOptions()
+ );
+
+ // create a bool option (usually a checkbox)
+ static com::sun::star::uno::Any getBoolControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ sal_Bool i_bValue,
+ const UIControlOptions& i_rControlOptions = UIControlOptions()
+ );
+
+ // create a set of choices (either a radio button group or a list box)
+ static com::sun::star::uno::Any getChoiceControlOpt( const rtl::OUString& i_rTitle,
+ const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ const com::sun::star::uno::Sequence< rtl::OUString >& i_rChoices,
+ sal_Int32 i_nValue,
+ const rtl::OUString& i_rType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ const UIControlOptions& i_rControlOptions = UIControlOptions()
+ );
+
+ // create an integer range (e.g. a spin field)
+ // note: max value < min value means do not apply min/max values
+ static com::sun::star::uno::Any getRangeControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ sal_Int32 i_nValue,
+ sal_Int32 i_nMinValue = -1,
+ sal_Int32 i_nMaxValue = -2,
+ const UIControlOptions& i_rControlOptions = UIControlOptions()
+ );
+
+ // create a string field
+ // note: max value < min value means do not apply min/max values
+ static com::sun::star::uno::Any getEditControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ const rtl::OUString& i_rValue,
+ const UIControlOptions& i_rControlOptions = UIControlOptions()
+ );
+};
+
+}
+
+
#endif // _SV_PRINT_HXX
diff --git a/vcl/inc/vcl/printerjob.hxx b/vcl/inc/vcl/printerjob.hxx
index 9880700d4008..e445a81d54c8 100644
--- a/vcl/inc/vcl/printerjob.hxx
+++ b/vcl/inc/vcl/printerjob.hxx
@@ -91,7 +91,7 @@ private: // private methods
bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
bool writeSetup( osl::File* pFile, const JobData& );
- bool writePageSetup( osl::File* pFile, const JobData& );
+ bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures = true );
void writeJobPatch( osl::File* File, const JobData& );
bool writeProlog (osl::File* pFile, const JobData& );
diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx
index 4fd6eaa999da..f1b69e1ca3aa 100644
--- a/vcl/inc/vcl/prndlg.hxx
+++ b/vcl/inc/vcl/prndlg.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: prndlg.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.114.5 $
*
* This file is part of OpenOffice.org.
*
@@ -33,19 +33,301 @@
#include <vcl/dllapi.h>
-#include <vcl/dialog.hxx>
+#include "vcl/print.hxx"
+#include "vcl/print.h"
-class Printer;
+#include "vcl/dialog.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/button.hxx"
+#include "vcl/gdimtf.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/field.hxx"
+#include "vcl/tabctrl.hxx"
+#include "vcl/tabpage.hxx"
+#include "vcl/arrange.hxx"
+#include "vcl/virdev.hxx"
-class VCL_DLLPUBLIC SystemDialog : public ModalDialog
+#include <boost/shared_ptr.hpp>
+#include <map>
+
+namespace vcl
{
-public:
- SystemDialog( Window* pParent, WinBits nWinStyle ) :
- ModalDialog( pParent, nWinStyle ) {}
- SystemDialog( Window* pParent, const ResId& rResId ) :
- ModalDialog( pParent, rResId ) {}
-
- virtual short Execute() { return 0; }
-};
+ class PrintDialog : public ModalDialog
+ {
+ class PrintPreviewWindow : public Window
+ {
+ GDIMetaFile maMtf;
+ Size maOrigSize;
+ VirtualDevice maPageVDev;
+ rtl::OUString maReplacementString;
+ rtl::OUString maToolTipString;
+ public:
+ PrintPreviewWindow( Window* pParent, const ResId& );
+ virtual ~PrintPreviewWindow();
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Command( const CommandEvent& );
+ virtual void Resize();
+ virtual void DataChanged( const DataChangedEvent& );
+
+ void setPreview( const GDIMetaFile&, const Size&, const rtl::OUString&,
+ sal_Int32 i_nDPIX, sal_Int32 i_nDPIY
+ );
+ };
+
+ class ShowNupOrderWindow : public Window
+ {
+ int mnOrderMode;
+ int mnRows;
+ int mnColumns;
+ void ImplInitSettings();
+ public:
+ ShowNupOrderWindow( Window* pParent );
+ virtual ~ShowNupOrderWindow();
+
+ virtual void Paint( const Rectangle& );
+
+ void setValues( int i_nOrderMode, int i_nColumns, int i_nRows )
+ {
+ mnOrderMode = i_nOrderMode;
+ mnRows = i_nRows;
+ mnColumns = i_nColumns;
+ Invalidate();
+ }
+ };
+
+ class NUpTabPage : public TabPage
+ {
+ public:
+ FixedLine maNupLine;
+ RadioButton maPagesBtn;
+ RadioButton maBrochureBtn;
+ FixedText maPagesBoxTitleTxt;
+ ListBox maNupPagesBox;
+
+ // controls for "Custom" page mode
+ FixedText maNupNumPagesTxt;
+ NumericField maNupColEdt;
+ FixedText maNupTimesTxt;
+ NumericField maNupRowsEdt;
+ FixedText maPageMarginTxt1;
+ MetricField maPageMarginEdt;
+ FixedText maPageMarginTxt2;
+ FixedText maSheetMarginTxt1;
+ MetricField maSheetMarginEdt;
+ FixedText maSheetMarginTxt2;
+ FixedText maNupOrientationTxt;
+ ListBox maNupOrientationBox;
+
+ // page order ("left to right, then down")
+ FixedText maNupOrderTxt;
+ ListBox maNupOrderBox;
+ ShowNupOrderWindow maNupOrderWin;
+ // border around each page
+ CheckBox maBorderCB;
+
+ vcl::RowOrColumn maLayout;
+ boost::shared_ptr< vcl::RowOrColumn > mxBrochureDep;
+ boost::shared_ptr< vcl::LabeledElement >mxPagesBtnLabel;
+
+ void setupLayout();
+
+ NUpTabPage( Window*, const ResId& );
+ virtual ~NUpTabPage();
+
+ void readFromSettings();
+ void storeToSettings();
+ void initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& );
+ void enableNupControls( bool bEnable );
+
+ void showAdvancedControls( bool );
+
+ virtual void Resize();
+ };
+
+ class JobTabPage : public TabPage
+ {
+ public:
+ FixedLine maPrinterFL;
+ ListBox maPrinters;
+ DisclosureButton maDetailsBtn;
+ FixedText maStatusLabel;
+ FixedText maStatusTxt;
+ FixedText maLocationLabel;
+ FixedText maLocationTxt;
+ FixedText maCommentLabel;
+ FixedText maCommentTxt;
+
+ PushButton maSetupButton;
+
+ FixedLine maCopies;
+ FixedLine maCopySpacer;
+ FixedText maCopyCount;
+ NumericField maCopyCountField;
+ CheckBox maCollateBox;
+ FixedImage maCollateImage;
+
+ Image maCollateImg;
+ Image maCollateHCImg;
+ Image maNoCollateImg;
+ Image maNoCollateHCImg;
+
+ long mnCollateUIMode;
+
+ vcl::RowOrColumn maLayout;
+ boost::shared_ptr<vcl::RowOrColumn> mxPrintRange;
+ boost::shared_ptr<vcl::WindowArranger> mxDetails;
+
+ JobTabPage( Window*, const ResId& );
+ virtual ~JobTabPage();
+
+ void readFromSettings();
+ void storeToSettings();
+
+ virtual void Resize();
+
+ void setupLayout();
+ };
+
+ class OutputOptPage : public TabPage
+ {
+ public:
+ FixedLine maOptionsLine;
+ CheckBox maToFileBox;
+ CheckBox maCollateSingleJobsBox;
+ CheckBox maReverseOrderBox;
+
+ vcl::RowOrColumn maLayout;
+ boost::shared_ptr<vcl::RowOrColumn> mxOptGroup;
+
+ OutputOptPage( Window*, const ResId& );
+ virtual ~OutputOptPage();
+
+ void readFromSettings();
+ void storeToSettings();
+
+ virtual void Resize();
+
+ void setupLayout();
+ };
+
+ OKButton maOKButton;
+ CancelButton maCancelButton;
+ HelpButton maHelpButton;
+ PrintPreviewWindow maPreviewWindow;
+ NumericField maPageEdit;
+ FixedText maNumPagesText;
+ PushButton maBackwardBtn;
+ PushButton maForwardBtn;
+
+ TabControl maTabCtrl;
+ NUpTabPage maNUpPage;
+ JobTabPage maJobPage;
+ OutputOptPage maOptionsPage;
+
+ FixedLine maButtonLine;
+
+ boost::shared_ptr< PrinterController > maPController;
+
+ rtl::OUString maPageStr;
+ rtl::OUString maNoPageStr;
+ sal_Int32 mnCurPage;
+ sal_Int32 mnCachedPages;
+
+ std::list< Window* > maControls;
+ std::map< Window*, rtl::OUString > maControlToPropertyMap;
+ std::map< rtl::OUString, std::vector< Window* > >
+ maPropertyToWindowMap;
+ std::map< Window*, sal_Int32 > maControlToNumValMap;
+ std::set< rtl::OUString > maReverseDependencySet;
+
+ Size maNupPortraitSize;
+ Size maNupLandscapeSize;
+
+ // internal, used for automatic Nup-Portrait/landscape
+ Size maFirstPageSize;
+
+ rtl::OUString maPrintToFileText;
+ rtl::OUString maPrintText;
+ rtl::OUString maDefPrtText;
+
+ vcl::RowOrColumn maLayout;
+ boost::shared_ptr<vcl::RowOrColumn> mxPreviewCtrls;
+
+ Size maDetailsCollapsedSize;
+ Size maDetailsExpandedSize;
+
+ sal_Bool mbShowLayoutPage;
+
+ Size getJobPageSize();
+ void updateNup();
+ void updateNupFromPages();
+ void preparePreview( bool i_bPrintChanged = true, bool i_bMayUseCache = false );
+ void setPreviewText( sal_Int32 );
+ void updatePrinterText();
+ void checkControlDependencies();
+ void checkOptionalControlDependencies();
+ void makeEnabled( Window* );
+ void updateWindowFromProperty( const rtl::OUString& );
+ void setupOptionalUI();
+ void readFromSettings();
+ void storeToSettings();
+ com::sun::star::beans::PropertyValue* getValueForWindow( Window* ) const;
+
+ virtual void Resize();
+ virtual void Command( const CommandEvent& );
+ virtual void DataChanged( const DataChangedEvent& );
+
+ DECL_LINK( SelectHdl, ListBox* );
+ DECL_LINK( ClickHdl, Button* );
+ DECL_LINK( ModifyHdl, Edit* );
+ DECL_LINK( UIOptionsChanged, void* );
+
+ DECL_LINK( UIOption_CheckHdl, CheckBox* );
+ DECL_LINK( UIOption_RadioHdl, RadioButton* );
+ DECL_LINK( UIOption_SelectHdl, ListBox* );
+ DECL_LINK( UIOption_ModifyHdl, Edit* );
+
+ void setupLayout();
+ public:
+ PrintDialog( Window*, const boost::shared_ptr< PrinterController >& );
+ virtual ~PrintDialog();
+
+ bool isPrintToFile();
+ int getCopyCount();
+ bool isCollate();
+
+ void previewForward();
+ void previewBackward();
+ };
+
+ class PrintProgressDialog : public ModelessDialog
+ {
+ String maStr;
+ FixedText maText;
+ CancelButton maButton;
+
+ bool mbCanceled;
+ sal_Int32 mnCur;
+ sal_Int32 mnMax;
+ long mnProgressHeight;
+ Rectangle maProgressRect;
+ bool mbNativeProgress;
+
+ DECL_LINK( ClickHdl, Button* );
+
+ void implCalcProgressRect();
+ public:
+ PrintProgressDialog( Window* i_pParent, int i_nMax );
+ ~PrintProgressDialog();
+
+ bool isCanceled() const { return mbCanceled; }
+ void setProgress( int i_nCurrent, int i_nMax = -1 );
+ void tick();
+
+ virtual void Paint( const Rectangle& );
+ };
+}
+
#endif // _SV_PRNDLG_HXX
diff --git a/vcl/inc/vcl/prntypes.hxx b/vcl/inc/vcl/prntypes.hxx
index 681f4f972a7c..a61c1a275474 100644
--- a/vcl/inc/vcl/prntypes.hxx
+++ b/vcl/inc/vcl/prntypes.hxx
@@ -39,7 +39,7 @@
// - Duplex Mode -
// ---------------
-enum DuplexMode { DUPLEX_UNKNOWN, DUPLEX_OFF, DUPLEX_ON };
+enum DuplexMode { DUPLEX_UNKNOWN, DUPLEX_OFF, DUPLEX_LONGEDGE, DUPLEX_SHORTEDGE };
// ---------------
// - Orientation -
@@ -93,5 +93,6 @@ enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE };
#define PRINTER_CAPABILITIES_FAX ((USHORT)8)
#define PRINTER_CAPABILITIES_PDF ((USHORT)9)
#define PRINTER_CAPABILITIES_EXTERNALDIALOG ((USHORT)10)
+#define PRINTER_CAPABILITIES_SETDUPLEX ((USHORT)11)
#endif // _SV_PRNTYPES_HXX
diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx
index 2927215034b5..73f5454457cf 100644
--- a/vcl/inc/vcl/salprn.hxx
+++ b/vcl/inc/vcl/salprn.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: salprn.hxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.114.1 $
*
* This file is part of OpenOffice.org.
*
@@ -41,7 +41,7 @@
class SalGraphics;
class SalFrame;
struct ImplJobSetup;
-class ImplQPrinter;
+namespace vcl { class PrinterController; }
// -----------------------
// - SalPrinterQueueInfo -
@@ -101,7 +101,6 @@ public:
virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0;
// returns angle that a landscape page will be turned counterclockwise wrt to portrait
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0;
- virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData ) = 0;
};
// --------------
@@ -114,18 +113,21 @@ public: // public for Sal Implementation
SalPrinter() {}
virtual ~SalPrinter();
- virtual BOOL StartJob( const XubString* pFileName,
- const XubString& rJobName,
- const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
+ virtual BOOL StartJob( const String* pFileName,
+ const String& rJobName,
+ const String& rAppName,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pSetupData ) = 0;
// implement for pull model print systems only,
// default implementations (see salvtables.cxx) just returns FALSE
virtual BOOL StartJob( const String* pFileName,
+ const String& rJobName,
const String& rAppName,
ImplJobSetup* pSetupData,
- ImplQPrinter* pQPrinter );
+ vcl::PrinterController& rController );
virtual BOOL EndJob() = 0;
virtual BOOL AbortJob() = 0;
diff --git a/vcl/inc/vcl/salptype.hxx b/vcl/inc/vcl/salptype.hxx
index 7f1c82079f38..bc9883757432 100644
--- a/vcl/inc/vcl/salptype.hxx
+++ b/vcl/inc/vcl/salptype.hxx
@@ -40,7 +40,11 @@
#define SAL_JOBSET_ORIENTATION ((ULONG)0x00000001)
#define SAL_JOBSET_PAPERBIN ((ULONG)0x00000002)
#define SAL_JOBSET_PAPERSIZE ((ULONG)0x00000004)
-#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION | SAL_JOBSET_PAPERBIN | SAL_JOBSET_PAPERSIZE)
+#define SAL_JOBSET_DUPLEXMODE ((ULONG)0x00000008)
+#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\
+ SAL_JOBSET_PAPERBIN |\
+ SAL_JOBSET_PAPERSIZE |\
+ SAL_JOBSET_DUPLEXMODE)
// -------------------
// - SalPrinterError -
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 17ad1aa28c1a..081b2fffca0b 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdata.hxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.13.16.1 $
*
* This file is part of OpenOffice.org.
*
@@ -87,6 +87,7 @@ class Timer;
class AutoTimer;
class Help;
class ImageList;
+class Image;
class PopupMenu;
class Application;
class OutputDevice;
@@ -259,6 +260,10 @@ struct ImplSVCtrlData
ImageList* mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's)
ImageList* mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows)
ImageList* mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows)
+ Image* mpDisclosurePlus;
+ Image* mpDisclosurePlusHC;
+ Image* mpDisclosureMinus;
+ Image* mpDisclosureMinusHC;
ImplTBDragMgr* mpTBDragMgr; // DragMgr for ToolBox
USHORT mnCheckStyle; // CheckBox-Style for ImageList-Update
USHORT mnRadioStyle; // Radio-Style for ImageList-Update
@@ -367,6 +372,7 @@ void ImplDeInitSVData();
void ImplDestroySVData();
Window* ImplGetDefaultWindow();
VCL_DLLPUBLIC ResMgr* ImplGetResMgr();
+VCL_DLLPUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
DockingManager* ImplGetDockingManager();
void ImplWindowAutoMnemonic( Window* pWindow );
diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc
index 48297a04ea0e..e2a8226ac878 100644
--- a/vcl/inc/vcl/svids.hrc
+++ b/vcl/inc/vcl/svids.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svids.hrc,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.84.3 $
*
* This file is part of OpenOffice.org.
*
@@ -31,6 +31,8 @@
#ifndef _SV_SVIDS_HRC
#define _SV_SVIDS_HRC
+#include "svl/solar.hrc"
+
#define SV_RESID_STDOFFSET 0
#define SV_RESID_WINOFFSET 1
#define SV_RESID_OS2OFFSET 2
@@ -58,6 +60,11 @@
#define SV_RESID_BITMAP_CLOSEDOC 1052
#define SV_RESID_BITMAP_CLOSEDOCHC 1053
+#define SV_DISCLOSURE_PLUS 1060
+#define SV_DISCLOSURE_MINUS 1061
+#define SV_DISCLOSURE_PLUS_HC 1062
+#define SV_DISCLOSURE_MINUS_HC 1063
+
#define SV_RESID_MENU_EDIT 2000
#define SV_MENU_EDIT_UNDO 1
#define SV_MENU_EDIT_CUT 2
@@ -74,6 +81,92 @@
#define SV_MENU_MAC_SHOWALL 2005
#define SV_MENU_MAC_QUITAPP 2006
+#define SV_DLG_PRINT 2048
+#define SV_PRINT_OK 1
+#define SV_PRINT_CANCEL 2
+#define SV_PRINT_HELP 3
+#define SV_PRINT_PAGE_PREVIEW 4
+#define SV_PRINT_PAGE_TXT 5
+#define SV_PRINT_PAGE_FORWARD 6
+#define SV_PRINT_PAGE_BACKWARD 7
+#define SV_PRINT_PAGE_EDIT 8
+#define SV_PRINT_TABCTRL 9
+#define SV_PRINT_PRT_TYPE 10
+#define SV_PRINT_PRT_STATUS 11
+#define SV_PRINT_PRT_LOCATION 12
+#define SV_PRINT_PRT_COMMENT 13
+#define SV_PRINT_TOFILE_TXT 14
+#define SV_PRINT_DEFPRT_TXT 15
+#define SV_PRINT_PRINTPREVIEW_TXT 16
+
+#define SV_PRINT_TAB_NUP 1
+#define SV_PRINT_PRT_NUP_LAYOUT_FL 1
+#define SV_PRINT_PRT_NUP_DEFAULT_BTN 2
+#define SV_PRINT_PRT_NUP_BROCHURE_BTN 3
+#define SV_PRINT_PRT_NUP_PAGES_BTN 4
+#define SV_PRINT_PRT_NUP_PAGES_BOX 5
+#define SV_PRINT_PRT_NUP_NUM_PAGES_TXT 6
+#define SV_PRINT_PRT_NUP_COLS_EDT 7
+#define SV_PRINT_PRT_NUP_TIMES_TXT 8
+#define SV_PRINT_PRT_NUP_ROWS_EDT 9
+#define SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT 10
+#define SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT 11
+#define SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT 12
+#define SV_PRINT_PRT_NUP_MARGINS_SHEET_1_TXT 13
+#define SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT 14
+#define SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT 15
+#define SV_PRINT_PRT_NUP_ORIENTATION_TXT 16
+#define SV_PRINT_PRT_NUP_ORIENTATION_BOX 17
+#define SV_PRINT_PRT_NUP_ORDER_TXT 18
+#define SV_PRINT_PRT_NUP_ORDER_BOX 19
+#define SV_PRINT_PRT_NUP_BORDER_CB 20
+
+#define SV_PRINT_PRT_NUP_ORIENTATION_AUTOMATIC 0
+#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1
+#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2
+
+#define SV_PRINT_PRT_NUP_ORDER_LRTD 0
+#define SV_PRINT_PRT_NUP_ORDER_TDLR 1
+
+#define SV_PRINT_TAB_JOB 2
+#define SV_PRINT_PRINTERS_FL 1
+#define SV_PRINT_PRINTERS 2
+#define SV_PRINT_PRT_SETUP 3
+#define SV_PRINT_RANGE 4
+#define SV_PRINT_ALL 5
+#define SV_PRINT_PAGERANGE 6
+#define SV_PRINT_SELECTION 7
+#define SV_PRINT_PAGERANGE_EDIT 8
+#define SV_PRINT_COPIES 9
+#define SV_PRINT_COPYCOUNT 10
+#define SV_PRINT_COPYCOUNT_FIELD 11
+#define SV_PRINT_COLLATE 12
+#define SV_PRINT_COLLATE_IMAGE 13
+#define SV_PRINT_BUTTONLINE 14
+#define SV_PRINT_COLLATE_IMG 15
+#define SV_PRINT_NOCOLLATE_IMG 16
+#define SV_PRINT_COLLATE_HC_IMG 17
+#define SV_PRINT_NOCOLLATE_HC_IMG 18
+#define SV_PRINT_NOPAGES 19
+#define SV_PRINT_STATUS_TXT 20
+#define SV_PRINT_LOCATION_TXT 21
+#define SV_PRINT_COMMENT_TXT 22
+#define SV_PRINT_DETAILS_BTN 23
+
+#define SV_PRINT_TAB_OPT 3
+#define SV_PRINT_OPT_PRINT_FL 1
+#define SV_PRINT_OPT_TOFILE 2
+#define SV_PRINT_OPT_SINGLEJOBS 3
+#define SV_PRINT_OPT_REVERSE 4
+
+#define SV_DLG_PRINT_PROGRESS 2049
+#define SV_PRINT_PROGRESS_CANCEL 1
+#define SV_PRINT_PROGRESS_TEXT 2
+
+#define SV_PRINT_NATIVE_STRINGS 2050
+#define SV_PRINT_NOPRINTERWARNING 2051
+#define SV_PRINT_NOCONTENT 2052
+
#define SV_HELPTEXT_CLOSE 10000
#define SV_HELPTEXT_MINIMIZE 10001
#define SV_HELPTEXT_MAXIMIZE 10002
@@ -108,7 +201,8 @@
#define SV_STDTEXT_ABOUT 10204
#define SV_STDTEXT_PREFERENCES 10205
#define SV_MAC_SCREENNNAME 10206
-#define SV_STDTEXT_LAST SV_MAC_SCREENNNAME
+#define SV_STDTEXT_ALLFILETYPES 10207
+#define SV_STDTEXT_LAST SV_STDTEXT_ALLFILETYPES
#define SV_ACCESSERROR_FIRST SV_ACCESSERROR_WRONG_VERSION
#define SV_ACCESSERROR_WRONG_VERSION 10500
@@ -165,4 +259,6 @@
#define SV_ICON_ID_MACRO 17
#define SV_ICON_ID_PRINTERADMIN 501
+#define HID_PRINTDLG HID_VCL_START
+
#endif // _SV_SVIDS_HRC
diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx
index 30edf6227a60..f6646426b2e7 100644
--- a/vcl/inc/vcl/tabctrl.hxx
+++ b/vcl/inc/vcl/tabctrl.hxx
@@ -31,15 +31,16 @@
#ifndef _SV_TABCTRL_HXX
#define _SV_TABCTRL_HXX
-#include <vcl/sv.h>
-#include <vcl/dllapi.h>
-#include <vcl/ctrl.hxx>
+#include "vcl/sv.h"
+#include "vcl/dllapi.h"
+#include "vcl/ctrl.hxx"
struct ImplTabItem;
struct ImplTabCtrlData;
class ImplTabItemList;
class TabPage;
class PushButton;
+class ListBox;
// --------------------
// - TabControl-Types -
@@ -72,7 +73,7 @@ private:
BOOL mbRestoreUnqId;
BOOL mbSingleLine;
BOOL mbScroll;
- BOOL mbColored;
+ BOOL mbRestoreSmartId;
BOOL mbSmallInvalidate;
BOOL mbExtraSpace;
Link maActivateHdl;
@@ -95,6 +96,7 @@ private:
SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false );
SAL_DLLPRIVATE void ImplFreeLayoutData();
DECL_DLLPRIVATE_LINK( ImplScrollBtnHdl, PushButton* pBtn );
+ DECL_DLLPRIVATE_LINK( ImplListBoxSelectHdl, ListBox* );
protected:
using Window::ImplInit;
@@ -128,6 +130,9 @@ public:
virtual void ActivatePage();
virtual long DeactivatePage();
+ virtual Size GetOptimalSize(WindowSizeType eType) const;
+ void SetMinimumSizePixel( const Size& );
+
void SetTabPageSizePixel( const Size& rSize );
Size GetTabPageSizePixel() const;
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 6e4c300ccc40..c2547e4b01ba 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -124,6 +124,9 @@ typedef USHORT ToolBoxItemBits;
#define TIB_DROPDOWN ((ToolBoxItemBits)0x0020)
#define TIB_REPEAT ((ToolBoxItemBits)0x0040)
#define TIB_DROPDOWNONLY ((ToolBoxItemBits)0x0080 | TIB_DROPDOWN) // this button has only drop down functionality
+#define TIB_TEXT_ONLY ((ToolBoxItemBits)0x0100)
+#define TIB_ICON_ONLY ((ToolBoxItemBits)0x0200)
+#define TIB_TEXTICON ((ToolBoxItemBits) TIB_TEXT_ONLY | TIB_ICON_ONLY )
// -----------------
// - ToolBox-Types -
diff --git a/vcl/inc/vcl/virdev.hxx b/vcl/inc/vcl/virdev.hxx
index bc21dde6f4ac..ea2b49eb8290 100644
--- a/vcl/inc/vcl/virdev.hxx
+++ b/vcl/inc/vcl/virdev.hxx
@@ -74,7 +74,6 @@ private:
#define REFDEV_FORCE_ZERO_EXTLEAD 0x80
SAL_DLLPRIVATE bool ForceZeroExtleadBug() const
{ return ((meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD) != 0); }
-
public:
VirtualDevice( USHORT nBitCount = 0 );
VirtualDevice( const OutputDevice& rCompDev,
@@ -115,11 +114,19 @@ public:
REFDEV_MODE06 = 1, // 600 dpi
REFDEV_MODE48 = 2, // 4800 dpi
REFDEV_MODE_MSO1 = 3,
- REFDEV_MODE_PDF1 = 4 };
+ REFDEV_MODE_PDF1 = 4,
+ REFDEV_CUSTOM = 5
+ };
void SetReferenceDevice( RefDevMode );
void Compat_ZeroExtleadBug(); // enable workaround for #i60495#
+
+ void SetReferenceDevice( sal_Int32 i_nDPIX, sal_Int32 i_nDPIY );
+
+private:
+ SAL_DLLPRIVATE void ImplSetReferenceDevice( RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY );
+
};
#endif // _SV_VIRDEV_HXX
diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h
index d745f3dcf081..563849873e3b 100644
--- a/vcl/inc/vcl/window.h
+++ b/vcl/inc/vcl/window.h
@@ -358,7 +358,8 @@ public:
mbToolbarFloatingWindow:1,
mbCallHandlersDuringInputDisabled:1,
mbDisableAccessibleLabelForRelation:1,
- mbDisableAccessibleLabeledByRelation:1;
+ mbDisableAccessibleLabeledByRelation:1,
+ mbHelpTextDynamic:1;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer;
};
diff --git a/vcl/os2/inc/salprn.h b/vcl/os2/inc/salprn.h
index 25ecfe87ed89..2c95965bc609 100644
--- a/vcl/os2/inc/salprn.h
+++ b/vcl/os2/inc/salprn.h
@@ -83,7 +83,6 @@ public:
virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
- virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData );
};
// ------------------
@@ -136,7 +135,9 @@ public:
virtual BOOL StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pSetupData );
virtual BOOL EndJob();
virtual BOOL AbortJob();
diff --git a/vcl/os2/source/gdi/salprn.cxx b/vcl/os2/source/gdi/salprn.cxx
index 0c254e2f6e62..a31a4bb779f8 100644
--- a/vcl/os2/source/gdi/salprn.cxx
+++ b/vcl/os2/source/gdi/salprn.cxx
@@ -1559,7 +1559,9 @@ Os2SalPrinter::~Os2SalPrinter()
BOOL Os2SalPrinter::StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pSetupData )
{
DEVOPENSTRUC aDevOpenStruc;
@@ -1831,9 +1833,4 @@ int Os2SalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData )
printf("Os2SalInfoPrinter::GetLandscapeAngle\n");
return 0;
}
-DuplexMode Os2SalInfoPrinter::GetDuplexMode( const ImplJobSetup* pSetupData )
-{
- DuplexMode nRet = DUPLEX_UNKNOWN;
- printf("Os2SalInfoPrinter::GetDuplexMode\n");
- return nRet;
-}
+
diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst
index 5d2aaf90c6f7..cf2824f72942 100644
--- a/vcl/prj/build.lst
+++ b/vcl/prj/build.lst
@@ -1,4 +1,4 @@
-vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools transex3 icc SO:print_header cpputools shell NULL
+vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools transex3 icc SO:print_header cpputools shell svl NULL
vc vcl usr1 - all vc_mkout NULL
vc vcl\inc nmake - all vc_inc NULL
vc vcl\source\glyphs nmake - all vc_glyphs vc_inc NULL
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index 54af0d2e289d..b106ff73729e 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -81,10 +81,10 @@ mkdir: %_DEST%\inc%_EXT%\vcl
..\inc\vcl\morebtn.hxx %_DEST%\inc%_EXT%\vcl\morebtn.hxx
..\inc\vcl\msgbox.hxx %_DEST%\inc%_EXT%\vcl\msgbox.hxx
..\inc\vcl\octree.hxx %_DEST%\inc%_EXT%\vcl\octree.hxx
+..\inc\vcl\oldprintadaptor.hxx %_DEST%\inc%_EXT%\vcl\oldprintadaptor.hxx
..\inc\vcl\outdev.hxx %_DEST%\inc%_EXT%\vcl\outdev.hxx
..\inc\vcl\pointr.hxx %_DEST%\inc%_EXT%\vcl\pointr.hxx
..\inc\vcl\print.hxx %_DEST%\inc%_EXT%\vcl\print.hxx
-..\inc\vcl\prndlg.hxx %_DEST%\inc%_EXT%\vcl\prndlg.hxx
..\inc\vcl\prntypes.hxx %_DEST%\inc%_EXT%\vcl\prntypes.hxx
..\inc\vcl\ptrstyle.hxx %_DEST%\inc%_EXT%\vcl\ptrstyle.hxx
..\inc\vcl\regband.hxx %_DEST%\inc%_EXT%\vcl\regband.hxx
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 516b23dd76be..31971468d9c6 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -97,8 +97,8 @@ SalPrinter::~SalPrinter()
{
}
-BOOL SalPrinter::StartJob( const String*, const String&,
- ImplJobSetup*, ImplQPrinter* )
+BOOL SalPrinter::StartJob( const String*, const String&, const String&,
+ ImplJobSetup*, vcl::PrinterController& )
{
return FALSE;
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 6a61d15db4c0..e8e56c6ee5a8 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdata.cxx,v $
- * $Revision: 1.56 $
+ * $Revision: 1.56.114.1 $
*
* This file is part of OpenOffice.org.
*
@@ -234,6 +234,15 @@ ResMgr* ImplGetResMgr()
return pSVData->mpResMgr;
}
+ResId VclResId( sal_Int32 nId )
+{
+ ResMgr* pMgr = ImplGetResMgr();
+ if( ! pMgr )
+ throw std::bad_alloc();
+
+ return ResId( nId, *pMgr );
+}
+
DockingManager* ImplGetDockingManager()
{
ImplSVData* pSVData = ImplGetSVData();
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 310c01a40673..f1af78662813 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -444,6 +444,26 @@ void DeInitVCL()
delete pSVData->maCtrlData.mpSplitVArwImgList;
pSVData->maCtrlData.mpSplitVArwImgList = NULL;
}
+ if ( pSVData->maCtrlData.mpDisclosurePlus )
+ {
+ delete pSVData->maCtrlData.mpDisclosurePlus;
+ pSVData->maCtrlData.mpDisclosurePlus = NULL;
+ }
+ if ( pSVData->maCtrlData.mpDisclosurePlusHC )
+ {
+ delete pSVData->maCtrlData.mpDisclosurePlusHC;
+ pSVData->maCtrlData.mpDisclosurePlusHC = NULL;
+ }
+ if ( pSVData->maCtrlData.mpDisclosureMinus )
+ {
+ delete pSVData->maCtrlData.mpDisclosureMinus;
+ pSVData->maCtrlData.mpDisclosureMinus = NULL;
+ }
+ if ( pSVData->maCtrlData.mpDisclosureMinusHC )
+ {
+ delete pSVData->maCtrlData.mpDisclosureMinusHC;
+ pSVData->maCtrlData.mpDisclosureMinusHC = NULL;
+ }
if ( pSVData->mpDefaultWin )
{
delete pSVData->mpDefaultWin;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 53a060af6bd6..b5915cc35daf 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1983,8 +1983,11 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
// cf. ImplDrawPushButton ...
- aSize.Width() += 8;
- aSize.Height() += 8;
+ if( (GetStyle() & WB_SMALLSTYLE) == 0 )
+ {
+ aSize.Width() += 8;
+ aSize.Height() += 8;
+ }
return CalcWindowSize( aSize );
}
@@ -4376,3 +4379,95 @@ TriStateBox::TriStateBox( Window* pParent, const ResId& rResId ) :
TriStateBox::~TriStateBox()
{
}
+
+// =======================================================================
+
+DisclosureButton::DisclosureButton( Window* pParent, WinBits ) :
+ CheckBox( pParent, WB_NOBORDER )
+{
+}
+
+// -----------------------------------------------------------------------
+
+DisclosureButton::DisclosureButton( Window* pParent, const ResId& rResId ) :
+ CheckBox( pParent, rResId.SetRT( RSC_CHECKBOX ) )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void DisclosureButton::ImplDrawCheckBoxState()
+{
+ /* HACK: DisclosureButton is currently assuming, that the disclosure sign
+ will fit into the rectangle occupied by a normal checkbox on all themes.
+ If this does not hold true for some theme, ImplGetCheckImageSize
+ would have to be overloaded for DisclosureButton; also GetNativeControlRegion
+ for CTRL_LISTNODE would have to be implemented and taken into account
+ */
+
+ Rectangle aStateRect( GetStateRect() );
+
+ ImplControlValue aControlValue( GetState() == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF, rtl::OUString(), 0 );
+ Region aCtrlRegion( aStateRect );
+ ControlState nState = 0;
+
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( IsMouseOver() && GetMouseRect().IsInside( GetPointerPosPixel() ) )
+ nState |= CTRL_STATE_ROLLOVER;
+
+ if( ! DrawNativeControl( CTRL_LISTNODE, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
+ aControlValue, rtl::OUString() ) )
+ {
+ ImplSVCtrlData& rCtrlData( ImplGetSVData()->maCtrlData );
+ if( ! rCtrlData.mpDisclosurePlus )
+ rCtrlData.mpDisclosurePlus = new Image( BitmapEx( VclResId( SV_DISCLOSURE_PLUS ) ) );
+ if( ! rCtrlData.mpDisclosurePlusHC )
+ rCtrlData.mpDisclosurePlusHC = new Image( BitmapEx( VclResId( SV_DISCLOSURE_PLUS_HC ) ) );
+ if( ! rCtrlData.mpDisclosureMinus )
+ rCtrlData.mpDisclosureMinus = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS ) ) );
+ if( ! rCtrlData.mpDisclosureMinusHC )
+ rCtrlData.mpDisclosureMinusHC = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS_HC ) ) );
+
+ Image* pImg = NULL;
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
+ pImg = IsChecked() ? rCtrlData.mpDisclosureMinusHC : rCtrlData.mpDisclosurePlusHC;
+ else
+ pImg = IsChecked() ? rCtrlData.mpDisclosureMinus : rCtrlData.mpDisclosurePlus;
+
+ DBG_ASSERT( pImg, "no disclosure image" );
+ if( ! pImg )
+ return;
+
+ USHORT nStyle = 0;
+ if( ! IsEnabled() )
+ nStyle |= IMAGE_DRAW_DISABLE;
+
+ Size aSize( aStateRect.GetSize() );
+ Size aImgSize( pImg->GetSizePixel() );
+ Point aOff( (aSize.Width() - aImgSize.Width())/2,
+ (aSize.Height() - aImgSize.Height())/2 );
+ aOff += aStateRect.TopLeft();
+ DrawImage( aOff, *pImg, nStyle );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void DisclosureButton::KeyInput( const KeyEvent& rKEvt )
+{
+ KeyCode aKeyCode = rKEvt.GetKeyCode();
+
+ if( !aKeyCode.GetModifier() &&
+ ( ( aKeyCode.GetCode() == KEY_ADD ) ||
+ ( aKeyCode.GetCode() == KEY_SUBTRACT ) )
+ )
+ {
+ Check( aKeyCode.GetCode() == KEY_ADD );
+ }
+ else
+ Button::KeyInput( rKEvt );
+}
+
+
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index b654e034470f..320f235a8c30 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -492,6 +492,17 @@ void Edit::ImplInvalidateOrRepaint( xub_StrLen nStart, xub_StrLen nEnd )
// -----------------------------------------------------------------------
+long Edit::ImplGetTextYPosition() const
+{
+ if ( GetStyle() & WB_TOP )
+ return ImplGetExtraOffset();
+ else if ( GetStyle() & WB_BOTTOM )
+ return GetOutputSizePixel().Height() - GetTextHeight() - ImplGetExtraOffset();
+ return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2;
+}
+
+// -----------------------------------------------------------------------
+
void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
{
if ( !IsReallyVisible() )
@@ -516,10 +527,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
GetCaretPositions( aText, pDX, nStart, nEnd );
}
- // center vertically
- long nH = GetOutputSize().Height();
long nTH = GetTextHeight();
- Point aPos( mnXOffset, (nH-nTH)/2 );
+ Point aPos( mnXOffset, ImplGetTextYPosition() );
if( bLayout )
{
@@ -1193,7 +1202,7 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
long nCursorPosX = nTextPos + mnXOffset + ImplGetExtraOffset();
// Cursor muss im sichtbaren Bereich landen:
- Size aOutSize = GetOutputSizePixel();
+ const Size aOutSize = GetOutputSizePixel();
if ( (nCursorPosX < 0) || (nCursorPosX >= aOutSize.Width()) )
{
long nOldXOffset = mnXOffset;
@@ -1227,8 +1236,8 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
ImplInvalidateOrRepaint();
}
- long nTextHeight = GetTextHeight();
- long nCursorPosY = (aOutSize.Height()-nTextHeight) / 2;
+ const long nTextHeight = GetTextHeight();
+ const long nCursorPosY = ImplGetTextYPosition();
pCursor->SetPos( Point( nCursorPosX, nCursorPosY ) );
pCursor->SetSize( Size( nCursorWidth, nTextHeight ) );
pCursor->Show();
@@ -2831,7 +2840,29 @@ void Edit::SetSubEdit( Edit* pEdit )
Size Edit::CalcMinimumSize() const
{
Size aSize ( GetTextWidth( GetText() ), GetTextHeight() );
- return CalcWindowSize( aSize );
+ // do not create edit fields in which one cannot enter anything
+ // a default minimum width should exist for at least 3 characters
+ Size aMinSize ( CalcSize( 3 ) );
+ if( aSize.Width() < aMinSize.Width() )
+ aSize.Width() = aMinSize.Width();
+ // add some space between text entry an border
+ aSize.Height() += 4;
+
+ aSize = CalcWindowSize( aSize );
+
+ // ask NWF what if it has an opinion, too
+ ImplControlValue aControlValue;
+ Rectangle aRect( Point( 0, 0 ), aSize );
+ Region aContent, aBound;
+ if( const_cast<Edit*>(this)->GetNativeControlRegion(
+ CTRL_EDITBOX, PART_ENTIRE_CONTROL,
+ aRect, 0, aControlValue, rtl::OUString(), aBound, aContent) )
+ {
+ Rectangle aBoundRect( aContent.GetBoundRect() );
+ if( aBoundRect.GetHeight() > aSize.Height() )
+ aSize.Height() = aBoundRect.GetHeight();
+ }
+ return aSize;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 3d19e288a1ce..df2673ede10c 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -1062,6 +1062,14 @@ void FixedImage::Paint( const Rectangle& )
// -----------------------------------------------------------------------
+Size FixedImage::GetOptimalSize( WindowSizeType ) const
+{
+ const Image* pImage = GetSettings().GetStyleSettings().GetHighContrastMode() ? &maImageHC : &maImage;
+ return pImage->GetSizePixel();
+}
+
+// -----------------------------------------------------------------------
+
void FixedImage::UserDraw( const UserDrawEvent& )
{
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index a915d8e6b9e8..fd5cd7ae4dac 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -1873,6 +1873,8 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
USHORT nDrawStyle = ImplGetTextStyle();
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_MULTILINE) )
nDrawStyle |= MULTILINE_ENTRY_DRAW_FLAGS;
+ if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_DRAW_DISABLED) )
+ nDrawStyle |= TEXT_DRAW_DISABLE;
DrawText( aTextRect, aStr, nDrawStyle, pVector, pDisplayText );
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index ceabbe4ab166..81a8dc0e8242 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -108,6 +108,7 @@ void ListBox::ImplInitListBoxData()
mnDDHeight = 0;
mbDDAutoSize = TRUE;
mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
+ mnLineCount = 0;
}
// -----------------------------------------------------------------------
@@ -1286,31 +1287,47 @@ Size ListBox::CalcMinimumSize() const
else
{
aSz.Height() = mpImplLB->CalcSize( 1 ).Height();
- if( aSz.Height() < mnDDHeight )
+ aSz.Height() += 4; // add a space between entry and border
+ // size to maxmimum entry width and add a little breathing space
+ aSz.Width() = mpImplLB->GetMaxEntryWidth() + 4;
+ // do not create ultrathin ListBoxes, it doesn't look good
+ if( aSz.Width() < GetSettings().GetStyleSettings().GetScrollBarSize() )
+ aSz.Width() = GetSettings().GetStyleSettings().GetScrollBarSize();
+
+ // try native borders; scrollbar size may not be a good indicator
+ // see how large the edit area inside is to estimate what is needed for the dropdown
+ ImplControlValue aControlValue;
+ Point aPoint;
+ Region aContent, aBound;
+ Size aTestSize( 100, 20 );
+ Region aArea( Rectangle( aPoint, aTestSize ) );
+ if( const_cast<ListBox*>(this)->GetNativeControlRegion(
+ CTRL_LISTBOX, PART_SUB_EDIT, aArea, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
- aSz.Height() = mnDDHeight;
- // FIXME: this is currently only on mac/aqua
- if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
- IsNativeWidgetEnabled() &&
- const_cast<ListBox*>(this)->IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) )
- {
- ImplControlValue aControlValue;
- Region aCtrlRegion( Rectangle( (const Point&)Point(), Size( 20, mnDDHeight ) ) );
- Region aBoundingRgn( aCtrlRegion );
- Region aContentRgn( aCtrlRegion );
- // adjust the size of the edit field
- if( const_cast<ListBox*>(this)->GetNativeControlRegion( CTRL_LISTBOX, PART_ENTIRE_CONTROL,
- aCtrlRegion, 0, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn) )
- {
- aSz.Height() = aContentRgn.GetBoundRect().GetHeight();
- }
- }
+ // use the themes drop down size
+ Rectangle aContentRect = aContent.GetBoundRect();
+ aSz.Width() += aTestSize.Width() - aContentRect.GetWidth();
}
- aSz.Width() = mpImplLB->GetMaxEntryWidth();
- aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize();
+ else
+ aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize();
}
aSz = CalcWindowSize( aSz );
+
+ if ( IsDropDownBox() ) // check minimum height of dropdown box
+ {
+ ImplControlValue aControlValue;
+ Rectangle aRect( Point( 0, 0 ), aSz );
+ Region aContent, aBound;
+ if( const_cast<ListBox*>(this)->GetNativeControlRegion(
+ CTRL_LISTBOX, PART_ENTIRE_CONTROL, aRect, 0, aControlValue, rtl::OUString(), aBound, aContent) )
+ {
+ Rectangle aBoundRect( aBound.GetBoundRect() );
+ if( aBoundRect.GetHeight() > aSz.Height() )
+ aSz.Height() = aBoundRect.GetHeight();
+ }
+ }
+
return aSz;
}
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 9a34629ddf8e..56cc2c3fb012 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -30,25 +30,24 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <tools/debug.hxx>
-
-#ifndef _SV_RC_H
-#include <tools/rc.h>
-#endif
-#include <vcl/svdata.hxx>
-#ifndef _SV_APP_HXX
-#include <vcl/svapp.hxx>
-#endif
-#include <vcl/help.hxx>
-#include <vcl/event.hxx>
-#include <vcl/menu.hxx>
-#include <vcl/button.hxx>
-#include <vcl/tabpage.hxx>
-#include <vcl/tabctrl.hxx>
-#include <vcl/controldata.hxx>
-#include <vcl/sound.hxx>
-
-#include <vcl/window.h>
+#include "tools/debug.hxx"
+
+#include "tools/rc.h"
+#include "vcl/svdata.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/help.hxx"
+#include "vcl/event.hxx"
+#include "vcl/menu.hxx"
+#include "vcl/button.hxx"
+#include "vcl/tabpage.hxx"
+#include "vcl/tabctrl.hxx"
+#include "vcl/controllayout.hxx"
+#include "vcl/controldata.hxx"
+#include "vcl/sound.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/smartid.hxx"
+
+#include "vcl/window.h"
#include <hash_map>
#include <vector>
@@ -87,6 +86,8 @@ struct ImplTabCtrlData
std::vector< Rectangle > maTabRectangles;
Point maItemsOffset; // offset of the tabitems
std::vector< ImplTabItem > maItemList;
+ ListBox* mpListBox;
+ Size maMinSize;
};
// -----------------------------------------------------------------------
@@ -153,16 +154,25 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
mbRestoreUnqId = FALSE;
mbSingleLine = FALSE;
mbScroll = FALSE;
- mbColored = FALSE;
+ mbRestoreSmartId = FALSE;
mbSmallInvalidate = FALSE;
mbExtraSpace = FALSE;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData->mpLeftBtn = NULL;
mpTabCtrlData->mpRightBtn = NULL;
+ mpTabCtrlData->mpListBox = NULL;
ImplInitSettings( TRUE, TRUE, TRUE );
+ if( (nStyle & WB_DROPDOWN) )
+ {
+ mpTabCtrlData->mpListBox = new ListBox( this, WB_DROPDOWN );
+ mpTabCtrlData->mpListBox->SetPosSizePixel( Point( 0, 0 ), Size( 200, 20 ) );
+ mpTabCtrlData->mpListBox->SetSelectHdl( LINK( this, TabControl, ImplListBoxSelectHdl ) );
+ mpTabCtrlData->mpListBox->Show();
+ }
+
// if the tabcontrol is drawn (ie filled) by a native widget, make sure all contols will have transparent background
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) )
@@ -286,6 +296,8 @@ TabControl::~TabControl()
// TabCtrl-Daten loeschen
if ( mpTabCtrlData )
{
+ if( mpTabCtrlData->mpListBox )
+ delete mpTabCtrlData->mpListBox;
if ( mpTabCtrlData->mpLeftBtn )
delete mpTabCtrlData->mpLeftBtn;
if ( mpTabCtrlData->mpRightBtn )
@@ -693,6 +705,8 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
pCtrlParent->SetHelpId( 0 );
if ( mbRestoreUnqId )
pCtrlParent->SetUniqueId( 0 );
+ if( mbRestoreSmartId )
+ pCtrlParent->SetSmartHelpId( SmartId() );
pOldPage->DeactivatePage();
}
@@ -700,8 +714,8 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
{
pPage->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() );
- // Hier Page aktivieren, damit die Controls entsprechend umgeschaltet
- // werden koennen und HilfeId gegebenenfalls beim Parent umsetzen
+ // activate page here so the conbtrols can be switched
+ // also set the help id of the parent window to that of the tab page
if ( !GetHelpId() )
{
mbRestoreHelpId = TRUE;
@@ -712,6 +726,11 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
mbRestoreUnqId = TRUE;
pCtrlParent->SetUniqueId( pPage->GetUniqueId() );
}
+ if( ! GetSmartHelpId().HasAny() )
+ {
+ mbRestoreSmartId = TRUE;
+ pCtrlParent->SetSmartHelpId( pPage->GetSmartHelpId() );
+ }
pPage->ActivatePage();
@@ -791,7 +810,7 @@ void TabControl::ImplSetFirstPagePos( USHORT )
void TabControl::ImplShowFocus()
{
- if ( !GetPageCount() )
+ if ( !GetPageCount() || mpTabCtrlData->mpListBox )
return;
// make sure the focussed item rect is computed using a bold font
@@ -1062,16 +1081,27 @@ IMPL_LINK( TabControl, ImplScrollBtnHdl, PushButton*, EMPTYARG )
// -----------------------------------------------------------------------
+IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG )
+{
+ SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
- if ( rMEvt.IsLeft() )
+ if( mpTabCtrlData->mpListBox == NULL )
{
- USHORT nPageId = GetPageId( rMEvt.GetPosPixel() );
- ImplTabItem* pItem = ImplGetItem( nPageId );
- if( pItem && pItem->mbEnabled )
- SelectTabPage( nPageId );
- else
- Sound::Beep( SOUND_ERROR, this );
+ if( rMEvt.IsLeft() )
+ {
+ USHORT nPageId = GetPageId( rMEvt.GetPosPixel() );
+ ImplTabItem* pItem = ImplGetItem( nPageId );
+ if( pItem && pItem->mbEnabled )
+ SelectTabPage( nPageId );
+ else
+ Sound::Beep( SOUND_ERROR, this );
+ }
}
}
@@ -1079,7 +1109,9 @@ void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
void TabControl::KeyInput( const KeyEvent& rKEvt )
{
- if ( GetPageCount() > 1 )
+ if( mpTabCtrlData->mpListBox )
+ mpTabCtrlData->mpListBox->KeyInput( rKEvt );
+ else if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
USHORT nKeyCode = aKeyCode.GetCode();
@@ -1224,7 +1256,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
}
}
- if ( !mpTabCtrlData->maItemList.empty() )
+ if ( !mpTabCtrlData->maItemList.empty() && mpTabCtrlData->mpListBox == NULL )
{
// Some native toolkits (GTK+) draw tabs right-to-left, with an
// overlap between adjacent tabs
@@ -1294,6 +1326,18 @@ void TabControl::Resize()
if ( !IsReallyShown() )
return;
+ if( mpTabCtrlData->mpListBox )
+ {
+ // get the listbox' preferred size
+ Size aTabCtrlSize( GetSizePixel() );
+ long nPrefWidth = mpTabCtrlData->mpListBox->GetOptimalSize( WINDOWSIZE_PREFERRED ).Width();
+ if( nPrefWidth > aTabCtrlSize.Width() )
+ nPrefWidth = aTabCtrlSize.Width();
+ Size aNewSize( nPrefWidth, LogicToPixel( Size( 12, 12 ), MapMode( MAP_APPFONT ) ).Height() );
+ Point aNewPos( (aTabCtrlSize.Width() - nPrefWidth) / 2, 0 );
+ mpTabCtrlData->mpListBox->SetPosSizePixel( aNewPos, aNewSize );
+ }
+
mbFormat = TRUE;
// Aktuelle TabPage resizen/positionieren
@@ -1343,8 +1387,16 @@ void TabControl::Resize()
void TabControl::GetFocus()
{
- ImplShowFocus();
- SetInputContext( InputContext( GetFont() ) );
+ if( ! mpTabCtrlData->mpListBox )
+ {
+ ImplShowFocus();
+ SetInputContext( InputContext( GetFont() ) );
+ }
+ else
+ {
+ if( mpTabCtrlData->mpListBox->IsReallyVisible() )
+ mpTabCtrlData->mpListBox->GrabFocus();
+ }
Control::GetFocus();
}
@@ -1352,7 +1404,8 @@ void TabControl::GetFocus()
void TabControl::LoseFocus()
{
- HideFocus();
+ if( ! mpTabCtrlData->mpListBox )
+ HideFocus();
Control::LoseFocus();
}
@@ -1446,7 +1499,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
void TabControl::Command( const CommandEvent& rCEvt )
{
- if ( (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
+ if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
{
Point aMenuPos;
BOOL bMenu;
@@ -1490,7 +1543,11 @@ void TabControl::StateChanged( StateChangedType nType )
Control::StateChanged( nType );
if ( nType == STATE_CHANGE_INITSHOW )
+ {
ImplPosCurTabPage();
+ if( mpTabCtrlData->mpListBox )
+ Resize();
+ }
else if ( nType == STATE_CHANGE_UPDATEMODE )
{
if ( IsUpdateMode() )
@@ -1708,24 +1765,34 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
DBG_ASSERT( GetPagePos( nPageId ) == TAB_PAGE_NOTFOUND,
"TabControl::InsertPage(): PageId already exists" );
- // set current page id
- if ( !mnCurPageId )
- mnCurPageId = nPageId;
-
// insert new page item
ImplTabItem* pItem = NULL;
if( nPos == TAB_APPEND || size_t(nPos) >= mpTabCtrlData->maItemList.size() )
{
mpTabCtrlData->maItemList.push_back( ImplTabItem() );
pItem = &mpTabCtrlData->maItemList.back();
+ if( mpTabCtrlData->mpListBox )
+ mpTabCtrlData->mpListBox->InsertEntry( rText );
}
else
{
std::vector< ImplTabItem >::iterator new_it =
mpTabCtrlData->maItemList.insert( mpTabCtrlData->maItemList.begin() + nPos, ImplTabItem() );
pItem = &(*new_it);
+ if( mpTabCtrlData->mpListBox )
+ mpTabCtrlData->mpListBox->InsertEntry( rText, nPos);
+ }
+ if( mpTabCtrlData->mpListBox )
+ {
+ if( ! mnCurPageId )
+ mpTabCtrlData->mpListBox->SelectEntryPos( 0 );
+ mpTabCtrlData->mpListBox->SetDropDownLineCount( mpTabCtrlData->mpListBox->GetEntryCount() );
}
+ // set current page id
+ if ( !mnCurPageId )
+ mnCurPageId = nPageId;
+
// init new page item
pItem->mnId = nPageId;
pItem->mpTabPage = NULL;
@@ -1739,6 +1806,8 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
Invalidate();
ImplFreeLayoutData();
+ if( mpTabCtrlData->mpListBox ) // reposition/resize listbox
+ Resize();
ImplCallEventListeners( VCLEVENT_TABPAGE_INSERTED, (void*) (ULONG)nPageId );
}
@@ -1756,6 +1825,11 @@ void TabControl::RemovePage( USHORT nPageId )
std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin() + nPos;
bool bIsCurrentPage = (it->mnId == mnCurPageId);
mpTabCtrlData->maItemList.erase( it );
+ if( mpTabCtrlData->mpListBox )
+ {
+ mpTabCtrlData->mpListBox->RemoveEntry( nPos );
+ mpTabCtrlData->mpListBox->SetDropDownLineCount( mpTabCtrlData->mpListBox->GetEntryCount() );
+ }
// If current page is removed, than first page gets the current page
if ( bIsCurrentPage )
@@ -1793,6 +1867,8 @@ void TabControl::Clear()
// clear item list
mpTabCtrlData->maItemList.clear();
mnCurPageId = 0;
+ if( mpTabCtrlData->mpListBox )
+ mpTabCtrlData->mpListBox->Clear();
ImplFreeLayoutData();
@@ -1813,6 +1889,9 @@ void TabControl::EnablePage( USHORT i_nPageId, bool i_bEnable )
{
pItem->mbEnabled = i_bEnable;
mbFormat = TRUE;
+ if( mpTabCtrlData->mpListBox )
+ mpTabCtrlData->mpListBox->SetEntryFlags( GetPagePos( i_nPageId ),
+ i_bEnable ? 0 : (LISTBOX_ENTRY_FLAG_DISABLE_SELECTION | LISTBOX_ENTRY_FLAG_DRAW_DISABLED) );
if( pItem->mnId == mnCurPageId )
{
// SetCurPageId will change to an enabled page
@@ -1937,6 +2016,8 @@ void TabControl::SelectTabPage( USHORT nPageId )
nPageId = mnActPageId;
mnActPageId = 0;
SetCurPageId( nPageId );
+ if( mpTabCtrlData->mpListBox )
+ mpTabCtrlData->mpListBox->SelectEntryPos( GetPagePos( nPageId ) );
ImplCallEventListeners( VCLEVENT_TABPAGE_ACTIVATE, (void*) (ULONG) nPageId );
}
}
@@ -2001,6 +2082,12 @@ void TabControl::SetPageText( USHORT nPageId, const XubString& rText )
{
pItem->maText = rText;
mbFormat = TRUE;
+ if( mpTabCtrlData->mpListBox )
+ {
+ USHORT nPos = GetPagePos( nPageId );
+ mpTabCtrlData->mpListBox->RemoveEntry( nPos );
+ mpTabCtrlData->mpListBox->InsertEntry( rText, nPos );
+ }
if ( IsUpdateMode() )
Invalidate();
ImplFreeLayoutData();
@@ -2216,3 +2303,25 @@ Point TabControl::GetItemsOffset() const
}
// -----------------------------------------------------------------------
+
+Size TabControl::GetOptimalSize(WindowSizeType eType) const
+{
+ switch (eType) {
+ case WINDOWSIZE_MINIMUM:
+ return mpTabCtrlData ? mpTabCtrlData->maMinSize : Size();
+ default:
+ return Control::GetOptimalSize( eType );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void TabControl::SetMinimumSizePixel( const Size& i_rSize )
+{
+ if( mpTabCtrlData )
+ mpTabCtrlData->maMinSize = i_rSize;
+}
+
+// -----------------------------------------------------------------------
+
+
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index 9d9b81ba50d4..03d85acb0159 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -192,7 +192,8 @@ BmpTransporter::BmpTransporter( const Bitmap& rBM )
m_aSize.Height = rBM.GetSizePixel().Height();
SvMemoryStream aStream;
rBM.Write( aStream, FALSE, TRUE );
- m_aBM = Sequence<sal_Int8>((const sal_Int8*)aStream.GetData(), aStream.GetSize() );
+ m_aBM = Sequence<sal_Int8>(static_cast<const sal_Int8*>(aStream.GetData()),
+ aStream.GetEndOfData());
}
BmpTransporter::~BmpTransporter()
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 6483c8292df7..951d80f9af9d 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -876,6 +876,40 @@ void GDIMetaFile::Scale( const Fraction& rScaleX, const Fraction& rScaleY )
// ------------------------------------------------------------------------
+void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
+{
+ Rectangle aCurRect( i_rClipRect );
+ VirtualDevice aMapVDev;
+
+ aMapVDev.EnableOutput( FALSE );
+ aMapVDev.SetMapMode( GetPrefMapMode() );
+
+ for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+ {
+ const long nType = pAct->GetType();
+
+ if( ( META_MAPMODE_ACTION == nType ) ||
+ ( META_PUSH_ACTION == nType ) ||
+ ( META_POP_ACTION == nType ) )
+ {
+ pAct->Execute( &aMapVDev );
+ aCurRect = aMapVDev.LogicToLogic( i_rClipRect, GetPrefMapMode(), aMapVDev.GetMapMode() );
+ }
+ else if( nType == META_CLIPREGION_ACTION )
+ {
+ MetaClipRegionAction* pOldAct = (MetaClipRegionAction*)pAct;
+ Region aNewReg( aCurRect );
+ if( pOldAct->IsClipping() )
+ aNewReg.Intersect( pOldAct->GetRegion() );
+ MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, TRUE );
+ Replace( pNewAct, GetCurPos() );
+ pOldAct->Delete();
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos )
{
diff --git a/vcl/source/gdi/impprn.cxx b/vcl/source/gdi/impprn.cxx
index 539c879c89ea..28d92a0b3832 100644
--- a/vcl/source/gdi/impprn.cxx
+++ b/vcl/source/gdi/impprn.cxx
@@ -478,10 +478,12 @@ void ImplQPrinter::EndQueuePrint()
DBG_ASSERT( mpPrinter, "no SalPrinter in ImplQPrinter" );
if( mpPrinter )
{
+ #if 0
mpPrinter->StartJob( mbPrintFile ? &maPrintFile : NULL,
Application::GetDisplayName(),
maJobSetup.ImplGetConstData(),
this );
+ #endif
EndJob();
mpParent->ImplEndPrint();
}
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 686d33593466..4823a5492ded 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -73,6 +73,7 @@ ImplJobSetup::ImplJobSetup()
mnRefCount = 1;
mnSystem = 0;
meOrientation = ORIENTATION_PORTRAIT;
+ meDuplexMode = DUPLEX_UNKNOWN;
mnPaperBin = 0;
mePaperFormat = PAPER_USER;
mnPaperWidth = 0;
@@ -90,6 +91,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
mnRefCount = 1;
mnSystem = rJobSetup.mnSystem;
meOrientation = rJobSetup.meOrientation;
+ meDuplexMode = rJobSetup.meDuplexMode;
mnPaperBin = rJobSetup.mnPaperBin;
mePaperFormat = rJobSetup.mePaperFormat;
mnPaperWidth = rJobSetup.mnPaperWidth;
@@ -277,6 +279,7 @@ BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
(pData1->maPrinterName == pData2->maPrinterName) &&
(pData1->maDriver == pData2->maDriver) &&
(pData1->meOrientation == pData2->meOrientation) &&
+ (pData1->meDuplexMode == pData2->meDuplexMode) &&
(pData1->mnPaperBin == pData2->mnPaperBin) &&
(pData1->mePaperFormat == pData2->mePaperFormat) &&
(pData1->mnPaperWidth == pData2->mnPaperWidth) &&
@@ -337,6 +340,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
+ pJobData->meDuplexMode = DUPLEX_UNKNOWN;
pJobData->mnPaperBin = SVBT16ToShort( pOldJobData->nPaperBin );
pJobData->mePaperFormat = (Paper)SVBT16ToShort( pOldJobData->nPaperFormat );
pJobData->mnPaperWidth = (long)SVBT32ToUInt32( pOldJobData->nPaperWidth );
@@ -355,7 +359,19 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
String aKey, aValue;
rIStream.ReadByteString( aKey, RTL_TEXTENCODING_UTF8 );
rIStream.ReadByteString( aValue, RTL_TEXTENCODING_UTF8 );
- pJobData->maValueMap[ aKey ] = aValue;
+ if( aKey.EqualsAscii( "COMPAT_DUPLEX_MODE" ) )
+ {
+ if( aValue.EqualsAscii( "DUPLEX_UNKNOWN" ) )
+ pJobData->meDuplexMode = DUPLEX_UNKNOWN;
+ else if( aValue.EqualsAscii( "DUPLEX_OFF" ) )
+ pJobData->meDuplexMode = DUPLEX_OFF;
+ else if( aValue.EqualsAscii( "DUPLEX_SHORTEDGE" ) )
+ pJobData->meDuplexMode = DUPLEX_SHORTEDGE;
+ else if( aValue.EqualsAscii( "DUPLEX_LONGEDGE" ) )
+ pJobData->meDuplexMode = DUPLEX_LONGEDGE;
+ }
+ else
+ pJobData->maValueMap[ aKey ] = aValue;
}
DBG_ASSERT( rIStream.Tell() == nFirstPos+nLen, "corrupted job setup" );
// ensure correct stream position
@@ -421,6 +437,14 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
rOStream.WriteByteString( it->first, RTL_TEXTENCODING_UTF8 );
rOStream.WriteByteString( it->second, RTL_TEXTENCODING_UTF8 );
}
+ rOStream.WriteByteString( "COMPAT_DUPLEX_MODE" ) ;
+ switch( pJobData->meDuplexMode )
+ {
+ case DUPLEX_UNKNOWN: rOStream.WriteByteString( "DUPLEX_UNKNOWN" );break;
+ case DUPLEX_OFF: rOStream.WriteByteString( "DUPLEX_OFF" );break;
+ case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
+ case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
+ }
nLen = sal::static_int_cast<USHORT>(rOStream.Tell() - nPos);
rOStream.Seek( nPos );
rOStream << nLen;
diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk
index eda537bf629a..ed2a9b2ba1e1 100755..100644
--- a/vcl/source/gdi/makefile.mk
+++ b/vcl/source/gdi/makefile.mk
@@ -57,6 +57,8 @@ EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
$(SLO)$/gfxlink.obj \
$(SLO)$/print.obj \
$(SLO)$/print2.obj \
+ $(SLO)$/print3.obj \
+ $(SLO)$/oldprintadaptor.obj \
$(SLO)$/configsettings.obj \
$(SLO)$/sallayout.obj \
$(SLO)$/image.obj \
@@ -72,7 +74,6 @@ EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
$(SLO)$/pngread.obj \
$(SLO)$/pngwrite.obj \
$(SLO)$/virdev.obj \
- $(SLO)$/impprn.obj \
$(SLO)$/gdimtf.obj \
$(SLO)$/graphictools.obj \
$(SLO)$/textlayout.obj \
@@ -118,6 +119,7 @@ SLOFILES= $(EXCEPTIONSFILES) \
$(SLO)$/extoutdevdata.obj \
$(SLO)$/salnativewidgets-none.obj
+
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
new file mode 100644
index 000000000000..cffd11daaad6
--- /dev/null
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_vcl.hxx"
+
+#include "vcl/oldprintadaptor.hxx"
+#include "vcl/gdimtf.hxx"
+
+#include "com/sun/star/awt/Size.hpp"
+
+#include <vector>
+
+namespace vcl
+{
+ struct AdaptorPage
+ {
+ GDIMetaFile maPage;
+ com::sun::star::awt::Size maPageSize;
+ };
+
+ struct ImplOldStyleAdaptorData
+ {
+ std::vector< AdaptorPage > maPages;
+ };
+}
+
+using namespace vcl;
+using namespace cppu;
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+
+OldStylePrintAdaptor::OldStylePrintAdaptor( const boost::shared_ptr< Printer >& i_pPrinter )
+ : PrinterController( i_pPrinter )
+ , mpData( new ImplOldStyleAdaptorData() )
+{
+}
+
+OldStylePrintAdaptor::~OldStylePrintAdaptor()
+{
+}
+
+void OldStylePrintAdaptor::StartPage()
+{
+ Size aPaperSize( getPrinter()->PixelToLogic( getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ mpData->maPages.push_back( AdaptorPage() );
+ mpData->maPages.back().maPageSize.Width = aPaperSize.getWidth();
+ mpData->maPages.back().maPageSize.Height = aPaperSize.getHeight();
+ getPrinter()->SetConnectMetaFile( &mpData->maPages.back().maPage );
+
+ // copy state into metafile
+ boost::shared_ptr<Printer> pPrinter( getPrinter() );
+ pPrinter->SetMapMode( pPrinter->GetMapMode() );
+ pPrinter->SetFont( pPrinter->GetFont() );
+ pPrinter->SetDrawMode( pPrinter->GetDrawMode() );
+ pPrinter->SetLineColor( pPrinter->GetLineColor() );
+ pPrinter->SetFillColor( pPrinter->GetFillColor() );
+}
+
+void OldStylePrintAdaptor::EndPage()
+{
+ getPrinter()->SetConnectMetaFile( NULL );
+ mpData->maPages.back().maPage.WindStart();
+}
+
+int OldStylePrintAdaptor::getPageCount() const
+{
+ return int(mpData->maPages.size());
+}
+
+Sequence< PropertyValue > OldStylePrintAdaptor::getPageParameters( int i_nPage ) const
+{
+ Sequence< PropertyValue > aRet( 1 );
+ aRet[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageSize") );
+ if( i_nPage < int(mpData->maPages.size() ) )
+ aRet[0].Value = makeAny( mpData->maPages[i_nPage].maPageSize );
+ else
+ {
+ awt::Size aEmpty( 0, 0 );
+ aRet[0].Value = makeAny( aEmpty );
+ }
+ return aRet;
+}
+
+void OldStylePrintAdaptor::printPage( int i_nPage ) const
+{
+ if( i_nPage < int(mpData->maPages.size()) )
+ {
+ mpData->maPages[ i_nPage ].maPage.WindStart();
+ mpData->maPages[ i_nPage ].maPage.Play( getPrinter().get() );
+ }
+}
+
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 937d966b3978..16f6b53af7a8 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: print.cxx,v $
- * $Revision: 1.65 $
+ * $Revision: 1.65.114.1 $
*
* This file is part of OpenOffice.org.
*
@@ -31,8 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#define _SPOOLPRINTER_EXT
-#define _RMPRINTER_EXT
#define ENABLE_BYTESTRING_STREAM_OPERATORS
#include <list>
@@ -58,7 +56,6 @@
#include <vcl/print.h>
#include <vcl/gdimtf.hxx>
#include <vcl/metaact.hxx>
-#include <vcl/impprn.hxx>
#include <vcl/print.hxx>
#include <comphelper/processfactory.hxx>
@@ -280,7 +277,9 @@ static void ImplInitPrnQueueList()
pSVData->maGDIData.mpPrinterQueueList = new ImplPrnQueueList;
- pSVData->mpDefInst->GetPrinterQueueInfo( pSVData->maGDIData.mpPrinterQueueList );
+ static const char* pEnv = getenv( "SAL_DISABLE_PRINTERLIST" );
+ if( !pEnv || !*pEnv )
+ pSVData->mpDefInst->GetPrinterQueueInfo( pSVData->maGDIData.mpPrinterQueueList );
}
// -----------------------------------------------------------------------
@@ -339,16 +338,20 @@ const QueueInfo* Printer::GetQueueInfo( const String& rPrinterName, bool bStatus
XubString Printer::GetDefaultPrinterName()
{
- ImplSVData* pSVData = ImplGetSVData();
+ static const char* pEnv = getenv( "SAL_DISABLE_DEFAULTPRINTER" );
+ if( !pEnv || !*pEnv )
+ {
+ ImplSVData* pSVData = ImplGetSVData();
- return pSVData->mpDefInst->GetDefaultPrinter();
+ return pSVData->mpDefInst->GetDefaultPrinter();
+ }
+ return XubString();
}
// =======================================================================
void Printer::ImplInitData()
{
- mpPrinterData = new ImplPrivatePrinterData();
mbDevOutput = FALSE;
meOutDevType = OUTDEV_PRINTER;
mbDefPrinter = FALSE;
@@ -366,8 +369,6 @@ void Printer::ImplInitData()
mpInfoPrinter = NULL;
mpPrinter = NULL;
mpDisplayDev = NULL;
- mpQPrinter = NULL;
- mpQMtf = NULL;
mbIsQueuePrinter = FALSE;
mpPrinterOptions = new PrinterOptions;
@@ -414,7 +415,6 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
mpPrinter = NULL;
- mpJobPrinter = NULL;
mpJobGraphics = NULL;
ImplUpdateJobSetupPaper( maJobSetup );
@@ -446,7 +446,6 @@ void Printer::ImplInitDisplay( const Window* pWindow )
mpInfoPrinter = NULL;
mpPrinter = NULL;
- mpJobPrinter = NULL;
mpJobGraphics = NULL;
if ( pWindow )
@@ -518,6 +517,26 @@ void Printer::ImplUpdatePageData()
mnOutWidth, mnOutHeight,
maPageOffset.X(), maPageOffset.Y(),
maPaperSize.Width(), maPaperSize.Height() );
+ static const char* pDebugOffset = getenv( "SAL_DBG_PAGEOFFSET" );
+ if( pDebugOffset )
+ {
+ rtl::OString aLine( pDebugOffset );
+ sal_Int32 nIndex = 0;
+ rtl::OString aToken( aLine.getToken( 0, ',', nIndex ) );
+ sal_Int32 nLeft = aToken.toInt32();
+ sal_Int32 nTop = nLeft;
+ if( nIndex > 0 )
+ {
+ aToken = aLine.getToken( 0, ',', nIndex );
+ nTop = aToken.toInt32();
+ }
+ maPageOffset = LogicToPixel( Point( static_cast<long>(nLeft),
+ static_cast<long>(nTop) ),
+ MapMode( MAP_100TH_MM )
+ );
+ mnOutWidth = maPaperSize.Width() - 2*maPageOffset.X();
+ mnOutWidth = maPaperSize.Width() - 2*maPageOffset.Y();
+ }
}
// -----------------------------------------------------------------------
@@ -602,11 +621,6 @@ Printer::~Printer()
{
DBG_ASSERT( !IsPrinting(), "Printer::~Printer() - Job is printing" );
DBG_ASSERT( !IsJobActive(), "Printer::~Printer() - Job is active" );
- DBG_ASSERT( !mpQPrinter, "Printer::~Printer() - QueuePrinter not destroyed" );
- DBG_ASSERT( !mpQMtf, "Printer::~Printer() - QueueMetafile not destroyed" );
-
- delete mpPrinterData;
- mpPrinterData = NULL;
delete mpPrinterOptions;
@@ -653,21 +667,11 @@ Printer::~Printer()
}
// -----------------------------------------------------------------------
-void Printer::SetNextJobIsQuick( bool bQuick )
-{
- mpPrinterData->mbNextJobIsQuick = bQuick;
- if( mpQPrinter )
- mpQPrinter->SetNextJobIsQuick( bQuick );
-}
-
-// -----------------------------------------------------------------------
void Printer::Compat_OldPrinterMetrics( bool bSet )
{
// propagate flag
if( mpInfoPrinter )
mpInfoPrinter->m_bCompatMetrics = bSet;
- if( mpQPrinter )
- mpQPrinter->Compat_OldPrinterMetrics( bSet );
// get new font data
ImplUpdateFontData( TRUE );
@@ -977,12 +981,13 @@ USHORT Printer::GetPaperBin() const
// -----------------------------------------------------------------------
// Map user paper format to a available printer paper formats
-void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
+void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNearest )
{
ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
int nLandscapeAngle = GetLandscapeAngle();
int nPaperCount = GetPaperInfoCount();
+ bool bFound = false;
PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight);
@@ -995,6 +1000,8 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
{
pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.getWidth(),
rPaperInfo.getHeight() );
+ pSetupData->meOrientation = ORIENTATION_PORTRAIT;
+ bFound = true;
break;
}
}
@@ -1017,10 +1024,49 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
{
pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.getWidth(),
rPaperInfo.getHeight() );
+ pSetupData->meOrientation = ORIENTATION_LANDSCAPE;
+ bFound = true;
break;
}
}
}
+
+ if( ! bFound && bMatchNearest )
+ {
+ sal_Int64 nBestMatch = SAL_MAX_INT64;
+ int nBestIndex = 0;
+ Orientation eBestOrientation = ORIENTATION_PORTRAIT;
+ for( int i = 0; i < nPaperCount; i++ )
+ {
+ const PaperInfo& rPaperInfo = GetPaperInfo( i );
+
+ // check protrait match
+ sal_Int64 nDX = pSetupData->mnPaperWidth - rPaperInfo.getWidth();
+ sal_Int64 nDY = pSetupData->mnPaperHeight - rPaperInfo.getHeight();
+ sal_Int64 nMatch = nDX*nDX + nDY*nDY;
+ if( nMatch < nBestMatch )
+ {
+ nBestMatch = nMatch;
+ nBestIndex = i;
+ eBestOrientation = ORIENTATION_PORTRAIT;
+ }
+
+ // check landscape match
+ nDX = pSetupData->mnPaperWidth - rPaperInfo.getHeight();
+ nDY = pSetupData->mnPaperHeight - rPaperInfo.getWidth();
+ nMatch = nDX*nDX + nDY*nDY;
+ if( nMatch < nBestMatch )
+ {
+ nBestMatch = nMatch;
+ nBestIndex = i;
+ eBestOrientation = ORIENTATION_LANDSCAPE;
+ }
+ }
+ const PaperInfo& rBestInfo = GetPaperInfo( nBestIndex );
+ pSetupData->mePaperFormat = ImplGetPaperFormat( rBestInfo.getWidth(),
+ rBestInfo.getHeight() );
+ pSetupData->meOrientation = eBestOrientation;
+ }
}
// -----------------------------------------------------------------------
@@ -1051,7 +1097,7 @@ BOOL Printer::SetPaper( Paper ePaper )
ImplReleaseGraphics();
if ( ePaper == PAPER_USER )
- ImplFindPaperFormatForUserSize( aJobSetup );
+ ImplFindPaperFormatForUserSize( aJobSetup, false );
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
@@ -1072,6 +1118,11 @@ BOOL Printer::SetPaper( Paper ePaper )
BOOL Printer::SetPaperSizeUser( const Size& rSize )
{
+ return SetPaperSizeUser( rSize, false );
+}
+
+BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
+{
if ( mbInPrintPage )
return FALSE;
@@ -1095,7 +1146,7 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize )
}
ImplReleaseGraphics();
- ImplFindPaperFormatForUserSize( aJobSetup );
+ ImplFindPaperFormatForUserSize( aJobSetup, bMatchNearest );
// Changing the paper size can also change the orientation!
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
@@ -1142,7 +1193,44 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const
DuplexMode Printer::GetDuplexMode() const
{
- return mpInfoPrinter ? mpInfoPrinter->GetDuplexMode( maJobSetup.ImplGetConstData() ) : DUPLEX_UNKNOWN;
+ return maJobSetup.ImplGetConstData()->meDuplexMode;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
+{
+ if ( mbInPrintPage )
+ return FALSE;
+
+ if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex )
+ {
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ pSetupData->meDuplexMode = eDuplex;
+
+ if ( IsDisplayPrinter() )
+ {
+ mbNewJobSetup = TRUE;
+ maJobSetup = aJobSetup;
+ return TRUE;
+ }
+
+ ImplReleaseGraphics();
+ if ( mpInfoPrinter->SetData( SAL_JOBSET_DUPLEXMODE, pSetupData ) )
+ {
+ ImplUpdateJobSetupPaper( aJobSetup );
+ mbNewJobSetup = TRUE;
+ maJobSetup = aJobSetup;
+ ImplUpdatePageData();
+ ImplUpdateFontList();
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
+
+ return TRUE;
}
// -----------------------------------------------------------------------
@@ -1184,9 +1272,10 @@ XubString Printer::GetPaperBinName( USHORT nPaperBin ) const
// -----------------------------------------------------------------------
-BOOL Printer::SetCopyCount( USHORT nCopy, BOOL /*bCollate*/ )
+BOOL Printer::SetCopyCount( USHORT nCopy, BOOL bCollate )
{
mnCopyCount = nCopy;
+ mbCollateCopy = bCollate;
return TRUE;
}
@@ -1199,29 +1288,8 @@ void Printer::Error()
// -----------------------------------------------------------------------
-void Printer::StartPrint()
-{
- maStartPrintHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-void Printer::EndPrint()
-{
- maEndPrintHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-void Printer::PrintPage()
-{
- maPrintPageHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-ULONG ImplSalPrinterErrorCodeToVCL( ULONG nError )
+ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
{
ULONG nVCLError;
switch ( nError )
@@ -1247,12 +1315,6 @@ void Printer::ImplEndPrint()
mbPrinting = FALSE;
mnCurPrintPage = 0;
maJobName.Erase();
- if( mpQPrinter ) // not necessarily filled e.g. after AbortJob
- {
- mpQPrinter->Destroy();
- mpQPrinter = NULL;
- }
- EndPrint();
}
// -----------------------------------------------------------------------
@@ -1267,180 +1329,6 @@ IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter )
// -----------------------------------------------------------------------
-void Printer::ImplUpdateQuickStatus()
-{
- // remove possibly added "IsQuickJob"
- if( mpPrinterData->mbNextJobIsQuick )
- {
- rtl::OUString aKey( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) );
- // const data means not really const, but change all references
- // to refcounted job setup
- ImplJobSetup* pImpSetup = maJobSetup.ImplGetConstData();
- pImpSetup->maValueMap.erase( aKey );
- mpPrinterData->mbNextJobIsQuick = false;
- }
-}
-
-class QuickGuard
-{
- Printer* mpPrinter;
- public:
- QuickGuard( Printer* pPrn ) : mpPrinter( pPrn ) {}
- ~QuickGuard()
- {
- mpPrinter->ImplUpdateQuickStatus();
- }
-};
-
-BOOL Printer::StartJob( const XubString& rJobName )
-{
- mnError = PRINTER_OK;
-
- if ( IsDisplayPrinter() )
- return FALSE;
-
- if ( IsJobActive() || IsPrinting() )
- return FALSE;
-
- if( mpPrinterData->mbNextJobIsQuick )
- {
- String aKey( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) );
- if( maJobSetup.GetValue( aKey ).Len() == 0 )
- maJobSetup.SetValue( aKey, String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
- }
-
- QuickGuard aQGuard( this );
-
- ULONG nCopies = mnCopyCount;
- BOOL bCollateCopy = mbCollateCopy;
- BOOL bUserCopy = FALSE;
- if ( IsQueuePrinter() )
- {
- if ( ((ImplQPrinter*)this)->IsUserCopy() )
- {
- nCopies = 1;
- bCollateCopy = FALSE;
- }
- }
- else
- {
- if ( nCopies > 1 )
- {
- ULONG nDevCopy;
-
- if ( bCollateCopy )
- nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
- else
- nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COPIES );
-
- // Muessen Kopien selber gemacht werden?
- if ( nCopies > nDevCopy )
- {
- bUserCopy = TRUE;
- nCopies = 1;
- bCollateCopy = FALSE;
- }
- }
- else
- bCollateCopy = FALSE;
-
- // we need queue printing
- if( !mnPageQueueSize )
- mnPageQueueSize = 1;
- }
-
- if ( !mnPageQueueSize )
- {
- ImplSVData* pSVData = ImplGetSVData();
- mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
-
- if ( !mpPrinter )
- return FALSE;
-
- XubString* pPrintFile;
- if ( mbPrintFile )
- pPrintFile = &maPrintFile;
- else
- pPrintFile = NULL;
-
- // #125075# StartJob can Reschedule on Windows, sfx
- // depends on IsPrinting() in case of closing a document
- BOOL bSaveNewJobSetup = mbNewJobSetup;
- mbNewJobSetup = FALSE;
- String aSaveJobName = maJobName;
- maJobName = rJobName;
- mnCurPage = 1;
- mnCurPrintPage = 1;
- mbPrinting = TRUE;
-
- if( ! ImplGetSVData()->maGDIData.mbPrinterPullModel )
- {
- // in the pull model the job can only be started when
- // we have collected all pages to be printed
- if ( !mpPrinter->StartJob( pPrintFile, rJobName, Application::GetDisplayName(),
- nCopies, bCollateCopy,
- maJobSetup.ImplGetConstData() ) )
- {
- mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
- if ( !mnError )
- mnError = PRINTER_GENERALERROR;
- pSVData->mpDefInst->DestroyPrinter( mpPrinter );
- mbNewJobSetup = bSaveNewJobSetup;
- maJobName = aSaveJobName;
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mbPrinting = FALSE;
- mpPrinter = NULL;
- return FALSE;
- }
- }
-
- mbJobActive = TRUE;
- StartPrint();
- }
- else
- {
- mpQPrinter = new ImplQPrinter( this );
- if( mpInfoPrinter )
- mpQPrinter->Compat_OldPrinterMetrics( mpInfoPrinter->m_bCompatMetrics );
- mpQPrinter->SetDigitLanguage( GetDigitLanguage() );
- mpQPrinter->SetUserCopy( bUserCopy );
- mpQPrinter->SetPrinterOptions( *mpPrinterOptions );
-
- // #125075# StartJob can Reschedule on Windows, sfx
- // depends on IsPrinting() in case of closing a document
- BOOL bSaveNewJobSetup = mbNewJobSetup;
- mbNewJobSetup = FALSE;
- String aSaveJobName = maJobName;
- maJobName = rJobName;
- mnCurPage = 1;
- mbPrinting = TRUE;
-
- if ( mpQPrinter->StartJob( rJobName ) )
- {
- mbJobActive = TRUE;
- StartPrint();
- mpQPrinter->StartQueuePrint();
- }
- else
- {
- mbNewJobSetup = bSaveNewJobSetup;
- maJobName = aSaveJobName;
- mnCurPage = 0;
- mbPrinting = FALSE;
- mnError = mpQPrinter->GetErrorCode();
- mpQPrinter->Destroy();
- mpQPrinter = NULL;
- return FALSE;
- }
- }
-
-
- return TRUE;
-}
-
-// -----------------------------------------------------------------------
-
BOOL Printer::EndJob()
{
BOOL bRet = FALSE;
@@ -1451,7 +1339,7 @@ BOOL Printer::EndJob()
mbJobActive = FALSE;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
ImplReleaseGraphics();
@@ -1459,23 +1347,17 @@ BOOL Printer::EndJob()
bRet = TRUE;
- if ( mpPrinter )
- {
- mbPrinting = FALSE;
- mnCurPrintPage = 0;
- maJobName.Erase();
-
- mbDevOutput = FALSE;
- bRet = mpPrinter->EndJob();
- // Hier den Drucker nicht asyncron zerstoeren, da es
- // W95 nicht verkraftet, wenn gleichzeitig gedruckt wird
- // und ein Druckerobjekt zerstoert wird
- ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter );
- mpPrinter = NULL;
- EndPrint();
- }
- else
- mpQPrinter->EndQueuePrint();
+ mbPrinting = FALSE;
+ mnCurPrintPage = 0;
+ maJobName.Erase();
+
+ mbDevOutput = FALSE;
+ bRet = mpPrinter->EndJob();
+ // Hier den Drucker nicht asyncron zerstoeren, da es
+ // W95 nicht verkraftet, wenn gleichzeitig gedruckt wird
+ // und ein Druckerobjekt zerstoert wird
+ ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter );
+ mpPrinter = NULL;
}
return bRet;
@@ -1494,35 +1376,18 @@ BOOL Printer::AbortJob()
mbInPrintPage = FALSE;
mpJobGraphics = NULL;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
mbPrinting = FALSE;
mnCurPage = 0;
mnCurPrintPage = 0;
maJobName.Erase();
- if ( mpPrinter )
- {
- ImplReleaseGraphics();
- mbDevOutput = FALSE;
- mpPrinter->AbortJob();
- Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
- mpPrinter = NULL;
- EndPrint();
- }
- else
- {
- mpQPrinter->AbortQueuePrint();
- mpQPrinter->Destroy();
- mpQPrinter = NULL;
- if ( mpQMtf )
- {
- mpQMtf->Clear();
- delete mpQMtf;
- mpQMtf = NULL;
- }
- EndPrint();
- }
+ ImplReleaseGraphics();
+ mbDevOutput = FALSE;
+ mpPrinter->AbortJob();
+ Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
+ mpPrinter = NULL;
return TRUE;
}
@@ -1532,88 +1397,49 @@ BOOL Printer::AbortJob()
// -----------------------------------------------------------------------
-BOOL Printer::StartPage()
+void Printer::ImplStartPage()
{
if ( !IsJobActive() )
- return FALSE;
+ return;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
- if ( mpPrinter )
- {
- SalGraphics* pGraphics = mpPrinter->StartPage( maJobSetup.ImplGetConstData(), mbNewJobSetup );
- if ( pGraphics )
- {
- ImplReleaseGraphics();
- mpJobGraphics = pGraphics;
- }
- mbDevOutput = TRUE;
- }
- else
+ SalGraphics* pGraphics = mpPrinter->StartPage( maJobSetup.ImplGetConstData(), mbNewJobSetup );
+ if ( pGraphics )
{
- ImplGetGraphics();
- mpJobGraphics = mpGraphics;
+ ImplReleaseGraphics();
+ mpJobGraphics = pGraphics;
}
+ mbDevOutput = TRUE;
// PrintJob not aborted ???
if ( IsJobActive() )
{
mbInPrintPage = TRUE;
mnCurPage++;
- if ( mpQPrinter )
- {
- mpQPrinter->SetPrinterOptions( *mpPrinterOptions );
- mpQMtf = new GDIMetaFile;
- mpQMtf->Record( this );
- mpQMtf->SaveStatus();
- }
- else
- {
- mnCurPrintPage++;
- PrintPage();
- }
+ mnCurPrintPage++;
}
-
- return TRUE;
}
-
- return FALSE;
}
// -----------------------------------------------------------------------
-BOOL Printer::EndPage()
+void Printer::ImplEndPage()
{
if ( !IsJobActive() )
- return FALSE;
+ return;
mbInPrintPage = FALSE;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
- if ( mpPrinter )
- {
- mpPrinter->EndPage();
- ImplReleaseGraphics();
- mbDevOutput = FALSE;
- }
- else if ( mpQPrinter )
- {
- // Eigentuemeruebergang an QPrinter
- mpQMtf->Stop();
- mpQMtf->WindStart();
- GDIMetaFile* pPage = mpQMtf;
- mpQMtf = NULL;
- mpQPrinter->AddQueuePage( pPage, mnCurPage, mbNewJobSetup );
- }
+ mpPrinter->EndPage();
+ ImplReleaseGraphics();
+ mbDevOutput = FALSE;
mpJobGraphics = NULL;
mbNewJobSetup = FALSE;
-
- return TRUE;
}
-
- return FALSE;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 685f68fe7af3..9d435af5f4b1 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -31,8 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#define _SPOOLPRINTER_EXT
-
#include <functional>
#include <algorithm>
#include <utility>
@@ -648,7 +646,9 @@ static bool ImplIsActionHandlingTransparency( const MetaAction& rAct )
bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
long nMaxBmpDPIX, long nMaxBmpDPIY,
bool bReduceTransparency, bool bTransparencyAutoMode,
- bool bDownsampleBitmaps )
+ bool bDownsampleBitmaps,
+ const Color& rBackground
+ )
{
MetaAction* pCurrAct;
bool bTransparent( false );
@@ -737,6 +737,20 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
bool bStillBackground=true; // true until first non-bg action
nActionNum=0; nLastBgAction=-1;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction();
+ if( rBackground != Color( COL_TRANSPARENT ) )
+ {
+ aBackgroundComponent.aBgColor = rBackground;
+ if( meOutDevType == OUTDEV_PRINTER )
+ {
+ Printer* pThis = dynamic_cast<Printer*>(this);
+ Point aPageOffset = pThis->GetPageOffsetPixel();
+ aPageOffset = Point( 0, 0 ) - aPageOffset;
+ Size aSize = pThis->GetPaperSizePixel();
+ aBackgroundComponent.aBounds = Rectangle( aPageOffset, aSize );
+ }
+ else
+ aBackgroundComponent.aBounds = Rectangle( Point( 0, 0 ), GetOutputSizePixel() );
+ }
while( pCurrAct && bStillBackground )
{
switch( pCurrAct->GetType() )
@@ -880,7 +894,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
//
// if aBBCurrAct is empty, it will intersect with no
- // aCCList member. Thus, we can safe us the check.
+ // aCCList member. Thus, we can save the check.
// Furthermore, this ensures that non-output-generating
// actions get their own aCCList entry, which is necessary
// when copying them to the output metafile (see stage 4
@@ -1110,7 +1124,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// ====================================================
//
- Point aTmpPoint;
+ Point aPageOffset;
Size aTmpSize( GetOutputSizePixel() );
if( mpPDFWriter )
{
@@ -1120,7 +1134,14 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// also add error code to PDFWriter
mpPDFWriter->insertError( vcl::PDFWriter::Warning_Transparency_Converted );
}
- const Rectangle aOutputRect( aTmpPoint, aTmpSize );
+ else if( meOutDevType == OUTDEV_PRINTER )
+ {
+ Printer* pThis = dynamic_cast<Printer*>(this);
+ aPageOffset = pThis->GetPageOffsetPixel();
+ aPageOffset = Point( 0, 0 ) - aPageOffset;
+ aTmpSize = pThis->GetPaperSizePixel();
+ }
+ const Rectangle aOutputRect( aPageOffset, aTmpSize );
bool bTiling = dynamic_cast<Printer*>(this) != NULL;
// iterate over all aCCList members and generate bitmaps for the special ones
@@ -1228,7 +1249,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
pCurrAct->Execute( &aPaintVDev );
}
- if( !( nActionNum % 4 ) )
+ if( !( nActionNum % 8 ) )
Application::Reschedule();
}
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
new file mode 100644
index 000000000000..6778cfbc867e
--- /dev/null
+++ b/vcl/source/gdi/print3.cxx
@@ -0,0 +1,1765 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: print3.cxx,v $
+ * $Revision: 1.1.2.11 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_vcl.hxx"
+
+#include "vcl/print.hxx"
+#include "vcl/prndlg.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/salinst.hxx"
+#include "vcl/salprn.hxx"
+#include "vcl/svids.hrc"
+#include "vcl/metaact.hxx"
+#include "vcl/msgbox.hxx"
+
+#include "tools/urlobj.hxx"
+
+#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
+#include "com/sun/star/ui/dialogs/XFilterManager.hpp"
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
+#include "com/sun/star/view/DuplexMode.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/awt/Size.hpp"
+#include "comphelper/processfactory.hxx"
+
+#include <hash_map>
+#include <hash_set>
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+using namespace vcl;
+
+class ImplPageCache
+{
+ struct CacheEntry
+ {
+ GDIMetaFile aPage;
+ PrinterController::PageSize aSize;
+ };
+
+ std::vector< CacheEntry > maPages;
+ std::vector< sal_Int32 > maPageNumbers;
+ std::vector< sal_Int32 > maCacheRanking;
+
+ static const sal_Int32 nCacheSize = 6;
+
+ void updateRanking( sal_Int32 nLastHit )
+ {
+ if( maCacheRanking[0] != nLastHit )
+ {
+ bool bMove = false;
+ for( sal_Int32 i = nCacheSize-1; i > 0; i-- )
+ {
+ if( maCacheRanking[i] == nLastHit )
+ bMove = true;
+ maCacheRanking[i] = maCacheRanking[i-1];
+ }
+ maCacheRanking[0] = nLastHit;
+ }
+ }
+
+public:
+ ImplPageCache()
+ : maPages( nCacheSize )
+ , maPageNumbers( nCacheSize, -1 )
+ , maCacheRanking( nCacheSize )
+ {
+ for( sal_Int32 i = 0; i < nCacheSize; i++ )
+ maCacheRanking[i] = nCacheSize - i - 1;
+ }
+
+ // caution: does not ensure uniqueness
+ void insert( sal_Int32 i_nPageNo, const GDIMetaFile& i_rPage, const PrinterController::PageSize& i_rSize )
+ {
+ sal_Int32 nReplacePage = maCacheRanking.back();
+ maPages[ nReplacePage ].aPage = i_rPage;
+ maPages[ nReplacePage ].aSize = i_rSize;
+ maPageNumbers[ nReplacePage ] = i_nPageNo;
+ // cache insertion means in our case, the page was just queried
+ // so update the ranking
+ updateRanking( nReplacePage );
+ }
+
+ // caution: bad algorithm; should there ever be reason to increase the cache size beyond 6
+ // this needs to be urgently rewritten. However do NOT increase the cache size lightly,
+ // whole pages can be rather memory intensive
+ bool get( sal_Int32 i_nPageNo, GDIMetaFile& o_rPageFile, PrinterController::PageSize& o_rSize )
+ {
+ for( sal_Int32 i = 0; i < nCacheSize; ++i )
+ {
+ if( maPageNumbers[i] == i_nPageNo )
+ {
+ updateRanking( i );
+ o_rPageFile = maPages[i].aPage;
+ o_rSize = maPages[i].aSize;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ void invalidate()
+ {
+ for( sal_Int32 i = 0; i < nCacheSize; ++i )
+ {
+ maPageNumbers[i] = -1;
+ maPages[i].aPage.Clear();
+ maCacheRanking[i] = nCacheSize - i - 1;
+ }
+ }
+};
+
+class vcl::ImplPrinterControllerData
+{
+public:
+ struct ControlDependency
+ {
+ rtl::OUString maDependsOnName;
+ sal_Int32 mnDependsOnEntry;
+
+ ControlDependency() : mnDependsOnEntry( -1 ) {}
+ };
+
+ typedef std::hash_map< rtl::OUString, size_t, rtl::OUStringHash > PropertyToIndexMap;
+ typedef std::hash_map< rtl::OUString, ControlDependency, rtl::OUStringHash > ControlDependencyMap;
+
+ boost::shared_ptr<Printer> mpPrinter;
+ Sequence< PropertyValue > maUIOptions;
+ std::vector< PropertyValue > maUIProperties;
+ std::vector< bool > maUIPropertyEnabled;
+ PropertyToIndexMap maPropertyToIndex;
+ Link maOptionChangeHdl;
+ ControlDependencyMap maControlDependencies;
+ sal_Bool mbFirstPage;
+ sal_Bool mbLastPage;
+ sal_Bool mbReversePageOrder;
+ view::PrintableState meJobState;
+
+ vcl::PrinterController::MultiPageSetup maMultiPage;
+
+ vcl::PrintProgressDialog* mpProgress;
+
+ ImplPageCache maPageCache;
+
+ // set by user through printer config dialog
+ // if set, pages are centered and trimmed onto the fixed page
+ Size maFixedPageSize;
+
+ ImplPrinterControllerData() :
+ mbFirstPage( sal_True ),
+ mbLastPage( sal_False ),
+ mbReversePageOrder( sal_False ),
+ meJobState( view::PrintableState_JOB_STARTED ),
+ mpProgress( NULL )
+ {}
+ ~ImplPrinterControllerData() { delete mpProgress; }
+
+ Size getRealPaperSize( const Size& i_rPageSize ) const
+ {
+ if( maFixedPageSize.Width() > 0 && maFixedPageSize.Height() > 0 )
+ return maFixedPageSize;
+ if( maMultiPage.nRows * maMultiPage.nColumns > 1 )
+ return maMultiPage.aPaperSize;
+ return i_rPageSize;
+ }
+ bool isFixedPageSize() const
+ { return maFixedPageSize.Width() != 0 && maFixedPageSize.Height() != 0; }
+ PrinterController::PageSize modifyJobSetup( const Sequence< PropertyValue >& i_rProps );
+};
+
+PrinterController::PrinterController()
+ : mpImplData( new ImplPrinterControllerData )
+{
+}
+
+PrinterController::PrinterController( const boost::shared_ptr<Printer>& i_pPrinter )
+ : mpImplData( new ImplPrinterControllerData )
+{
+ mpImplData->mpPrinter = i_pPrinter;
+}
+
+static rtl::OUString queryFile( Printer* pPrinter )
+{
+ rtl::OUString aResult;
+
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ if( xFactory.is() )
+ {
+ uno::Sequence< uno::Any > aTempl( 1 );
+ aTempl.getArray()[0] <<= ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION;
+ uno::Reference< ui::dialogs::XFilePicker > xFilePicker(
+ xFactory->createInstanceWithArguments(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ),
+ aTempl ), uno::UNO_QUERY );
+ DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" );
+
+ uno::Reference< ui::dialogs::XFilterManager > xFilterMgr( xFilePicker, uno::UNO_QUERY );
+ if( xFilePicker.is() && xFilterMgr.is() )
+ {
+ try
+ {
+#ifdef UNX
+ // add PostScript and PDF
+ bool bPS = true, bPDF = true;
+ if( pPrinter )
+ {
+ if( pPrinter->GetCapabilities( PRINTER_CAPABILITIES_PDF ) )
+ bPS = false;
+ else
+ bPDF = false;
+ }
+ if( bPS )
+ xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) );
+ if( bPDF )
+ xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Portable Document Format" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.pdf" ) ) );
+#elif defined WNT
+ (void)pPrinter;
+ xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.PRN" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) );
+#endif
+ // add arbitrary files
+ xFilterMgr->appendFilter( String( VclResId( SV_STDTEXT_ALLFILETYPES ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) );
+ }
+ catch( lang::IllegalArgumentException rExc )
+ {
+ DBG_ERRORFILE( "caught IllegalArgumentException when registering filter\n" );
+ }
+
+ if( xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK )
+ {
+ uno::Sequence< ::rtl::OUString > aPathSeq( xFilePicker->getFiles() );
+ INetURLObject aObj( aPathSeq[0] );
+ aResult = aObj.PathToFileName();
+ }
+ }
+ }
+ return aResult;
+}
+
+struct PrintJobAsync
+{
+ boost::shared_ptr<PrinterController> mpController;
+ JobSetup maInitSetup;
+
+ PrintJobAsync( const boost::shared_ptr<PrinterController>& i_pController,
+ const JobSetup& i_rInitSetup
+ )
+ : mpController( i_pController ), maInitSetup( i_rInitSetup )
+ {}
+
+ DECL_LINK( ExecJob, void* );
+};
+
+IMPL_LINK( PrintJobAsync, ExecJob, void*, EMPTYARG )
+{
+ Printer::ImplPrintJob( mpController, maInitSetup );
+
+ // clean up, do not access members after this
+ delete this;
+
+ return 0;
+}
+
+void Printer::PrintJob( const boost::shared_ptr<PrinterController>& i_pController,
+ const JobSetup& i_rInitSetup
+ )
+{
+ sal_Bool bSynchronous = sal_False;
+ beans::PropertyValue* pVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Wait" ) ) );
+ if( pVal )
+ pVal->Value >>= bSynchronous;
+
+ if( bSynchronous )
+ ImplPrintJob( i_pController, i_rInitSetup );
+ else
+ {
+ PrintJobAsync* pAsync = new PrintJobAsync( i_pController, i_rInitSetup );
+ Application::PostUserEvent( LINK( pAsync, PrintJobAsync, ExecJob ) );
+ }
+}
+
+void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pController,
+ const JobSetup& i_rInitSetup
+ )
+{
+ boost::shared_ptr<PrinterController> pController( i_pController );
+
+ // check if there is a default printer; if not, show an error box (if appropriate)
+ if( GetDefaultPrinterName().Len() == 0 )
+ {
+ if( pController->isShowDialogs()
+ // && ! pController->isDirectPrint()
+ )
+ {
+ ErrorBox aBox( NULL, VclResId( SV_PRINT_NOPRINTERWARNING ) );
+ aBox.Execute();
+ }
+ pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ),
+ makeAny( sal_False ) );
+ }
+
+ // setup printer
+
+ // if no specific printer is already set, create one
+ if( ! pController->getPrinter() )
+ {
+ boost::shared_ptr<Printer> pPrinter( new Printer( i_rInitSetup.GetPrinterName() ) );
+ pController->setPrinter( pPrinter );
+ }
+
+ // reset last page property
+ i_pController->setLastPage( sal_False );
+
+ // update "PageRange" property inferring from other properties:
+ // case 1: "Pages" set from UNO API ->
+ // setup "Print Selection" and insert "PageRange" attribute
+ // case 2: "All pages" is selected
+ // update "Page range" attribute to have a sensible default,
+ // but leave "All" as selected
+
+ // "Pages" attribute from API is now equivalent to "PageRange"
+ // AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
+ // Argh ! That sure needs cleaning up
+ beans::PropertyValue* pContentVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ) );
+ if( ! pContentVal )
+ pContentVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ) );
+
+ // case 1: UNO API has set "Pages"
+ beans::PropertyValue* pPagesVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pages" ) ) );
+ if( pPagesVal )
+ {
+ rtl::OUString aPagesVal;
+ pPagesVal->Value >>= aPagesVal;
+ if( aPagesVal.getLength() )
+ {
+ // "Pages" attribute from API is now equivalent to "PageRange"
+ // AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
+ // Argh ! That sure needs cleaning up
+ if( pContentVal )
+ {
+ pContentVal->Value = makeAny( sal_Int32( 1 ) );
+ i_pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), pPagesVal->Value );
+ }
+ }
+ }
+ // case 2: is "All" selected ?
+ else if( pContentVal )
+ {
+ sal_Int32 nContent = -1;
+ if( pContentVal->Value >>= nContent )
+ {
+ if( nContent == 0 )
+ {
+ sal_Int32 nPages = i_pController->getPageCount();
+ if( nPages > 0 )
+ {
+ rtl::OUStringBuffer aBuf( 32 );
+ aBuf.appendAscii( "1" );
+ if( nPages > 1 )
+ {
+ aBuf.appendAscii( "-" );
+ aBuf.append( nPages );
+ }
+ i_pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), makeAny( aBuf.makeStringAndClear() ) );
+ }
+ }
+ }
+ }
+
+ beans::PropertyValue* pReverseVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintReverse" ) ) );
+ if( pReverseVal )
+ {
+ sal_Bool bReverse = sal_False;
+ pReverseVal->Value >>= bReverse;
+ pController->setReversePrint( bReverse );
+ }
+
+ // in direct print case check whether there is anything to print.
+ // if not, show an errorbox (if appropriate)
+ if( pController->isShowDialogs() && pController->isDirectPrint() )
+ {
+ if( pController->getFilteredPageCount() == 0 )
+ {
+ ErrorBox aBox( NULL, VclResId( SV_PRINT_NOCONTENT ) );
+ aBox.Execute();
+ return;
+ }
+ }
+
+ // check if the printer brings up its own dialog
+ // in that case leave the work to that dialog
+ if( ! pController->getPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) &&
+ ! pController->isDirectPrint() &&
+ pController->isShowDialogs()
+ )
+ {
+ try
+ {
+ PrintDialog aDlg( NULL, i_pController );
+ if( ! aDlg.Execute() )
+ {
+ GDIMetaFile aPageFile;
+ i_pController->setLastPage( sal_True );
+ i_pController->getFilteredPageFile( 0, aPageFile );
+ return;
+ }
+ if( aDlg.isPrintToFile() )
+ {
+ rtl::OUString aFile = queryFile( pController->getPrinter().get() );
+ if( ! aFile.getLength() )
+ {
+ GDIMetaFile aPageFile;
+ i_pController->setLastPage( sal_True );
+ i_pController->getFilteredPageFile( 0, aPageFile );
+ return;
+ }
+ pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalFileName" ) ),
+ makeAny( aFile ) );
+ }
+ }
+ catch( std::bad_alloc& )
+ {
+ }
+ }
+
+ pController->pushPropertiesToPrinter();
+
+ rtl::OUString aJobName;
+ beans::PropertyValue* pJobNameVal = pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ) );
+ if( pJobNameVal )
+ pJobNameVal->Value >>= aJobName;
+
+ pController->getPrinter()->StartJob( String( aJobName ), pController );
+
+ pController->jobFinished( pController->getJobState() );
+}
+
+bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::PrinterController>& i_pController )
+{
+ mnError = PRINTER_OK;
+
+ if ( IsDisplayPrinter() )
+ return FALSE;
+
+ if ( IsJobActive() || IsPrinting() )
+ return FALSE;
+
+ ULONG nCopies = mnCopyCount;
+ bool bCollateCopy = mbCollateCopy;
+ bool bUserCopy = FALSE;
+
+ if ( nCopies > 1 )
+ {
+ ULONG nDevCopy;
+
+ if ( bCollateCopy )
+ nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
+ else
+ nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COPIES );
+
+ // need to do copies by hand ?
+ if ( nCopies > nDevCopy )
+ {
+ bUserCopy = TRUE;
+ nCopies = 1;
+ bCollateCopy = FALSE;
+ }
+ }
+ else
+ bCollateCopy = FALSE;
+
+
+ ImplSVData* pSVData = ImplGetSVData();
+ mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
+
+ if ( !mpPrinter )
+ return FALSE;
+
+ // remark: currently it is still possible to use EnablePrintFile and
+ // SetPrintFileName to redirect printout into file
+ // it can be argued that those methods should be removed in favor
+ // of only using the LocalFileName property
+ beans::PropertyValue* pFileValue = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalFileName" ) ) );
+ if( pFileValue )
+ {
+ rtl::OUString aFile;
+ pFileValue->Value >>= aFile;
+ if( aFile.getLength() )
+ {
+ mbPrintFile = TRUE;
+ maPrintFile = aFile;
+ }
+ }
+
+ XubString* pPrintFile = NULL;
+ if ( mbPrintFile )
+ pPrintFile = &maPrintFile;
+
+ maJobName = i_rJobName;
+ mnCurPage = 1;
+ mnCurPrintPage = 1;
+ mbPrinting = TRUE;
+ if( ImplGetSVData()->maGDIData.mbPrinterPullModel )
+ {
+ mbJobActive = TRUE;
+ // sallayer does all necessary page printing
+ // and also handles showing a dialog
+ // that also means it must call jobStarted when the dialog is finished
+ // it also must set the JobState of the Controller
+ if( mpPrinter->StartJob( pPrintFile,
+ i_rJobName,
+ Application::GetDisplayName(),
+ maJobSetup.ImplGetConstData(),
+ *i_pController ) )
+ {
+ EndJob();
+ }
+ else
+ {
+ mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
+ if ( !mnError )
+ mnError = PRINTER_GENERALERROR;
+ pSVData->mpDefInst->DestroyPrinter( mpPrinter );
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mpPrinter = NULL;
+
+ return false;
+ }
+ }
+ else
+ {
+ // possibly a dialog has been shown
+ // now the real job starts
+ i_pController->setJobState( view::PrintableState_JOB_STARTED );
+ i_pController->jobStarted();
+
+ if( mpPrinter->StartJob( pPrintFile,
+ i_rJobName,
+ Application::GetDisplayName(),
+ nCopies,
+ bCollateCopy,
+ i_pController->isDirectPrint(),
+ maJobSetup.ImplGetConstData() ) )
+ {
+ mbJobActive = TRUE;
+ i_pController->createProgressDialog();
+ int nPages = i_pController->getFilteredPageCount();
+ int nRepeatCount = bUserCopy ? mnCopyCount : 1;
+ for( int nIteration = 0; nIteration < nRepeatCount; nIteration++ )
+ {
+ for( int nPage = 0; nPage < nPages; nPage++ )
+ {
+ if( nPage == nPages-1 && nIteration == nRepeatCount-1 )
+ i_pController->setLastPage( sal_True );
+ i_pController->printFilteredPage( nPage );
+ }
+ // FIXME: duplex ?
+ }
+ EndJob();
+
+ if( i_pController->getJobState() == view::PrintableState_JOB_STARTED )
+ i_pController->setJobState( view::PrintableState_JOB_SPOOLED );
+ }
+ else
+ {
+ mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
+ if ( !mnError )
+ mnError = PRINTER_GENERALERROR;
+ i_pController->setJobState( mnError == PRINTER_ABORT
+ ? view::PrintableState_JOB_ABORTED
+ : view::PrintableState_JOB_FAILED );
+ pSVData->mpDefInst->DestroyPrinter( mpPrinter );
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mpPrinter = NULL;
+
+ return false;
+ }
+ }
+
+ return true;
+}
+
+PrinterController::~PrinterController()
+{
+ delete mpImplData;
+}
+
+view::PrintableState PrinterController::getJobState() const
+{
+ return mpImplData->meJobState;
+}
+
+void PrinterController::setJobState( view::PrintableState i_eState )
+{
+ mpImplData->meJobState = i_eState;
+}
+
+const boost::shared_ptr<Printer>& PrinterController::getPrinter() const
+{
+ return mpImplData->mpPrinter;
+}
+
+void PrinterController::setPrinter( const boost::shared_ptr<Printer>& i_rPrinter )
+{
+ mpImplData->mpPrinter = i_rPrinter;
+ setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ),
+ makeAny( rtl::OUString( i_rPrinter->GetName() ) ) );
+}
+
+bool PrinterController::setupPrinter( Window* i_pParent )
+{
+ bool bRet = false;
+ if( mpImplData->mpPrinter.get() )
+ {
+ Size aPaperSize( mpImplData->mpPrinter->PixelToLogic(
+ mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ bRet = mpImplData->mpPrinter->Setup( i_pParent );
+ if( bRet )
+ {
+ // was the papersize overridden ? if so we need to take action
+ Size aNewPaperSize( mpImplData->mpPrinter->PixelToLogic(
+ mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ if( aNewPaperSize != aPaperSize )
+ {
+ mpImplData->maFixedPageSize = aNewPaperSize;
+ mpImplData->maPageCache.invalidate();
+ awt::Size aOverrideSize;
+ aOverrideSize.Width = aNewPaperSize.Width();
+ aOverrideSize.Height = aNewPaperSize.Height();
+ setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OverridePageSize" ) ),
+ makeAny( aOverrideSize ) );
+ }
+ }
+ }
+ return bRet;
+}
+
+PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const Sequence< PropertyValue >& i_rProps )
+{
+ PrinterController::PageSize aPageSize;
+ aPageSize.aSize = mpPrinter->GetPaperSize();
+ for( sal_Int32 nProperty = 0, nPropertyCount = i_rProps.getLength(); nProperty < nPropertyCount; ++nProperty )
+ {
+ if( i_rProps[ nProperty ].Name.equalsAscii( "PageSize" ) )
+ {
+ awt::Size aSize;
+ i_rProps[ nProperty].Value >>= aSize;
+ aPageSize.aSize.Width() = aSize.Width;
+ aPageSize.aSize.Height() = aSize.Height;
+
+ Size aCurSize( mpPrinter->GetPaperSize() );
+ Size aRealPaperSize( getRealPaperSize( aPageSize.aSize ) );
+ if( aRealPaperSize != aCurSize )
+ mpPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() );
+ }
+ if( i_rProps[ nProperty ].Name.equalsAscii( "PageIncludesNonprintableArea" ) )
+ {
+ sal_Bool bVal = sal_False;
+ i_rProps[ nProperty].Value >>= bVal;
+ aPageSize.bFullPaper = static_cast<bool>(bVal);
+ }
+ }
+ return aPageSize;
+}
+
+int PrinterController::getPageCountProtected() const
+{
+ const MapMode aMapMode( MAP_100TH_MM );
+
+ mpImplData->mpPrinter->Push();
+ mpImplData->mpPrinter->SetMapMode( aMapMode );
+ int nPages = getPageCount();
+ mpImplData->mpPrinter->Pop();
+ return nPages;
+}
+
+Sequence< beans::PropertyValue > PrinterController::getPageParametersProtected( int i_nPage ) const
+{
+ const MapMode aMapMode( MAP_100TH_MM );
+
+ mpImplData->mpPrinter->Push();
+ mpImplData->mpPrinter->SetMapMode( aMapMode );
+ Sequence< beans::PropertyValue > aResult( getPageParameters( i_nPage ) );
+ mpImplData->mpPrinter->Pop();
+ return aResult;
+}
+
+PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache )
+{
+ // update progress if necessary
+ if( mpImplData->mpProgress )
+ {
+ // do nothing if printing is canceled
+ if( mpImplData->mpProgress->isCanceled() )
+ return PrinterController::PageSize();
+ mpImplData->mpProgress->tick();
+ Application::Reschedule( true );
+ }
+
+ if( i_bMayUseCache )
+ {
+ PrinterController::PageSize aPageSize;
+ if( mpImplData->maPageCache.get( i_nUnfilteredPage, o_rMtf, aPageSize ) )
+ {
+ return aPageSize;
+ }
+ }
+ else
+ mpImplData->maPageCache.invalidate();
+
+ o_rMtf.Clear();
+
+ // get page parameters
+ Sequence< PropertyValue > aPageParm( getPageParametersProtected( i_nUnfilteredPage ) );
+ const MapMode aMapMode( MAP_100TH_MM );
+
+ mpImplData->mpPrinter->Push();
+ mpImplData->mpPrinter->SetMapMode( aMapMode );
+
+ // modify job setup if necessary
+ PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm );
+
+ o_rMtf.SetPrefSize( aPageSize.aSize );
+ o_rMtf.SetPrefMapMode( aMapMode );
+
+ mpImplData->mpPrinter->EnableOutput( FALSE );
+
+ o_rMtf.Record( mpImplData->mpPrinter.get() );
+
+ printPage( i_nUnfilteredPage );
+
+ o_rMtf.Stop();
+ o_rMtf.WindStart();
+ mpImplData->mpPrinter->Pop();
+
+ if( i_bMayUseCache )
+ mpImplData->maPageCache.insert( i_nUnfilteredPage, o_rMtf, aPageSize );
+
+ // reset "FirstPage" property to false now we've gotten at least our first one
+ mpImplData->mbFirstPage = sal_False;
+
+ return aPageSize;
+}
+
+static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GDIMetaFile& io_rSubPage, bool i_bDrawBorder )
+{
+ // intersect all clipregion actions with our clip rect
+ io_rSubPage.WindStart();
+ io_rSubPage.Clip( i_rClipRect );
+
+ // save gstate
+ o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
+
+ // clip to page rect
+ o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), TRUE ) );
+
+ // append the subpage
+ io_rSubPage.WindStart();
+ io_rSubPage.Play( o_rMtf );
+
+ // restore gstate
+ o_rMtf.AddAction( new MetaPopAction() );
+
+ // draw a border
+ if( i_bDrawBorder )
+ {
+ // save gstate
+ o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION | PUSH_MAPMODE ) );
+ o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
+
+ Rectangle aBorderRect( i_rClipRect );
+ o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), TRUE ) );
+ o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), FALSE ) );
+ o_rMtf.AddAction( new MetaRectAction( aBorderRect ) );
+
+ // restore gstate
+ o_rMtf.AddAction( new MetaPopAction() );
+ }
+}
+
+PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache )
+{
+ const MultiPageSetup& rMPS( mpImplData->maMultiPage );
+ int nSubPages = rMPS.nRows * rMPS.nColumns;
+ if( nSubPages < 1 )
+ nSubPages = 1;
+
+ // reverse sheet order
+ if( mpImplData->mbReversePageOrder )
+ {
+ int nDocPages = getFilteredPageCount();
+ i_nFilteredPage = nDocPages - 1 - i_nFilteredPage;
+ }
+
+ // there is no filtering to be done (and possibly the page size of the
+ // original page is to be set), when N-Up is "neutral" that is there is
+ // only one subpage and the margins are 0
+ if( nSubPages == 1 &&
+ rMPS.nLeftMargin == 0 && rMPS.nRightMargin == 0 &&
+ rMPS.nTopMargin == 0 && rMPS.nBottomMargin == 0 )
+ {
+ PrinterController::PageSize aPageSize = getPageFile( i_nFilteredPage, o_rMtf, i_bMayUseCache );
+ Size aPaperSize = mpImplData->getRealPaperSize( aPageSize.aSize );
+ mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
+ mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() );
+ if( aPaperSize != aPageSize.aSize )
+ {
+ // user overridden page size, center Metafile
+ o_rMtf.WindStart();
+ long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
+ long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
+ o_rMtf.Move( nDX, nDY );
+ o_rMtf.WindStart();
+ o_rMtf.SetPrefSize( aPaperSize );
+ aPageSize.aSize = aPaperSize;
+ }
+ return aPageSize;
+ }
+
+ // set last page property really only on the very last page to be rendered
+ // that is on the last subpage of a NUp run
+ sal_Bool bIsLastPage = mpImplData->mbLastPage;
+ mpImplData->mbLastPage = sal_False;
+
+ Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize ) );
+
+ // multi page area: page size minus margins + one time spacing right and down
+ // the added spacing is so each subpage can be calculated including its spacing
+ Size aMPArea( aPaperSize );
+ aMPArea.Width() -= rMPS.nLeftMargin + rMPS.nRightMargin;
+ aMPArea.Width() += rMPS.nHorizontalSpacing;
+ aMPArea.Height() -= rMPS.nTopMargin + rMPS.nBottomMargin;
+ aMPArea.Height() += rMPS.nVerticalSpacing;
+
+ // determine offsets
+ long nAdvX = aMPArea.Width() / rMPS.nColumns;
+ long nAdvY = aMPArea.Height() / rMPS.nRows;
+
+ // determine size of a "cell" subpage, leave a little space around pages
+ Size aSubPageSize( nAdvX - rMPS.nHorizontalSpacing, nAdvY - rMPS.nVerticalSpacing );
+
+ o_rMtf.Clear();
+ o_rMtf.SetPrefSize( aPaperSize );
+ o_rMtf.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
+ o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
+
+ int nDocPages = getPageCountProtected();
+ for( int nSubPage = 0; nSubPage < nSubPages; nSubPage++ )
+ {
+ // map current sub page to real page
+ int nPage = (i_nFilteredPage * nSubPages + nSubPage) / rMPS.nRepeat;
+ if( nSubPage == nSubPages-1 ||
+ nPage == nDocPages-1 )
+ {
+ mpImplData->mbLastPage = bIsLastPage;
+ }
+ if( nPage >= 0 && nPage < nDocPages )
+ {
+ GDIMetaFile aPageFile;
+ PrinterController::PageSize aPageSize = getPageFile( nPage, aPageFile, i_bMayUseCache );
+ if( aPageSize.aSize.Width() && aPageSize.aSize.Height() )
+ {
+ long nCellX = 0, nCellY = 0;
+ switch( rMPS.nOrder )
+ {
+ case PrinterController::LRTB:
+ nCellX = (nSubPage % rMPS.nColumns);
+ nCellY = (nSubPage / rMPS.nColumns);
+ break;
+ case PrinterController::TBLR:
+ nCellX = (nSubPage / rMPS.nRows);
+ nCellY = (nSubPage % rMPS.nRows);
+ break;
+ }
+ // scale the metafile down to a sub page size
+ double fScaleX = double(aSubPageSize.Width())/double(aPageSize.aSize.Width());
+ double fScaleY = double(aSubPageSize.Height())/double(aPageSize.aSize.Height());
+ double fScale = std::min( fScaleX, fScaleY );
+ aPageFile.Scale( fScale, fScale );
+ aPageFile.WindStart();
+
+ // move the subpage so it is centered in its "cell"
+ long nOffX = (aSubPageSize.Width() - long(double(aPageSize.aSize.Width()) * fScale)) / 2;
+ long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2;
+ long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
+ long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
+ aPageFile.Move( nX, nY );
+ aPageFile.WindStart();
+ // calculate border rectangle
+ Rectangle aSubPageRect( Point( nX, nY ),
+ Size( long(double(aPageSize.aSize.Width())*fScale),
+ long(double(aPageSize.aSize.Height())*fScale) ) );
+
+ // append subpage to page
+ appendSubPage( o_rMtf, aSubPageRect, aPageFile, rMPS.bDrawBorder );
+ }
+ }
+ }
+ o_rMtf.WindStart();
+
+ // subsequent getPageFile calls have changed the paper, reset it to current value
+ mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
+ mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() );
+
+ return PrinterController::PageSize( aPaperSize, true );
+}
+
+int PrinterController::getFilteredPageCount()
+{
+ int nDiv = mpImplData->maMultiPage.nRows * mpImplData->maMultiPage.nColumns;
+ if( nDiv < 1 )
+ nDiv = 1;
+ return (getPageCountProtected() * mpImplData->maMultiPage.nRepeat + (nDiv-1)) / nDiv;
+}
+
+ULONG PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
+{
+ ULONG nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
+ sal_Int32 nMaxBmpDPIX = mpImplData->mpPrinter->ImplGetDPIX();
+ sal_Int32 nMaxBmpDPIY = mpImplData->mpPrinter->ImplGetDPIY();
+
+ const PrinterOptions& rPrinterOptions = mpImplData->mpPrinter->GetPrinterOptions();
+
+ static const sal_Int32 OPTIMAL_BMP_RESOLUTION = 300;
+ static const sal_Int32 NORMAL_BMP_RESOLUTION = 200;
+
+
+ if( rPrinterOptions.IsReduceBitmaps() )
+ {
+ // calculate maximum resolution for bitmap graphics
+ if( PRINTER_BITMAP_OPTIMAL == rPrinterOptions.GetReducedBitmapMode() )
+ {
+ nMaxBmpDPIX = std::min( sal_Int32(OPTIMAL_BMP_RESOLUTION), nMaxBmpDPIX );
+ nMaxBmpDPIY = std::min( sal_Int32(OPTIMAL_BMP_RESOLUTION), nMaxBmpDPIY );
+ }
+ else if( PRINTER_BITMAP_NORMAL == rPrinterOptions.GetReducedBitmapMode() )
+ {
+ nMaxBmpDPIX = std::min( sal_Int32(NORMAL_BMP_RESOLUTION), nMaxBmpDPIX );
+ nMaxBmpDPIY = std::min( sal_Int32(NORMAL_BMP_RESOLUTION), nMaxBmpDPIY );
+ }
+ else
+ {
+ nMaxBmpDPIX = std::min( sal_Int32(rPrinterOptions.GetReducedBitmapResolution()), nMaxBmpDPIX );
+ nMaxBmpDPIY = std::min( sal_Int32(rPrinterOptions.GetReducedBitmapResolution()), nMaxBmpDPIY );
+ }
+ }
+
+ // convert to greysacles
+ if( rPrinterOptions.IsConvertToGreyscales() )
+ {
+ mpImplData->mpPrinter->SetDrawMode( mpImplData->mpPrinter->GetDrawMode() |
+ ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+ }
+
+ // disable transparency output
+ if( rPrinterOptions.IsReduceTransparency() && ( PRINTER_TRANSPARENCY_NONE == rPrinterOptions.GetReducedTransparencyMode() ) )
+ {
+ mpImplData->mpPrinter->SetDrawMode( mpImplData->mpPrinter->GetDrawMode() | DRAWMODE_NOTRANSPARENCY );
+ }
+
+ Color aBg( COL_TRANSPARENT ); // default: let RemoveTransparenciesFromMetaFile do its own background logic
+ if( mpImplData->maMultiPage.nRows * mpImplData->maMultiPage.nColumns > 1 )
+ {
+ // in N-Up printing we have no "page" background operation
+ // we also have no way to determine the paper color
+ // so let's go for white, which will kill 99.9% of the real cases
+ aBg = Color( COL_WHITE );
+ }
+ mpImplData->mpPrinter->RemoveTransparenciesFromMetaFile( i_rIn, o_rOut, nMaxBmpDPIX, nMaxBmpDPIY,
+ rPrinterOptions.IsReduceTransparency(),
+ rPrinterOptions.GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO,
+ rPrinterOptions.IsReduceBitmaps() && rPrinterOptions.IsReducedBitmapIncludesTransparency(),
+ aBg
+ );
+ return nRestoreDrawMode;
+}
+
+void PrinterController::printFilteredPage( int i_nPage )
+{
+ if( mpImplData->meJobState != view::PrintableState_JOB_STARTED )
+ return;
+
+ GDIMetaFile aPageFile;
+ PrinterController::PageSize aPageSize = getFilteredPageFile( i_nPage, aPageFile );
+
+ if( mpImplData->mpProgress )
+ {
+ // do nothing if printing is canceled
+ if( mpImplData->mpProgress->isCanceled() )
+ {
+ setJobState( view::PrintableState_JOB_ABORTED );
+ return;
+ }
+ }
+
+ // in N-Up printing set the correct page size
+ mpImplData->mpPrinter->SetMapMode( MAP_100TH_MM );
+ // aPageSize was filtered through mpImplData->getRealPaperSize already by getFilteredPageFile()
+ mpImplData->mpPrinter->SetPaperSizeUser( aPageSize.aSize, ! mpImplData->isFixedPageSize() );
+
+ // if full paper are is meant, move the output to accomodate for pageoffset
+ if( aPageSize.bFullPaper )
+ {
+ Point aPageOffset( mpImplData->mpPrinter->GetPageOffset() );
+ aPageFile.WindStart();
+ aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y() );
+ }
+
+ GDIMetaFile aCleanedFile;
+ ULONG nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
+
+ mpImplData->mpPrinter->EnableOutput( TRUE );
+
+ // actually print the page
+ mpImplData->mpPrinter->ImplStartPage();
+
+ mpImplData->mpPrinter->Push();
+ aCleanedFile.WindStart();
+ aCleanedFile.Play( mpImplData->mpPrinter.get() );
+ mpImplData->mpPrinter->Pop();
+
+ mpImplData->mpPrinter->ImplEndPage();
+
+ mpImplData->mpPrinter->SetDrawMode( nRestoreDrawMode );
+}
+
+void PrinterController::jobStarted()
+{
+}
+
+void PrinterController::jobFinished( view::PrintableState )
+{
+}
+
+void PrinterController::abortJob()
+{
+ setJobState( view::PrintableState_JOB_ABORTED );
+}
+
+void PrinterController::setLastPage( sal_Bool i_bLastPage )
+{
+ mpImplData->mbLastPage = i_bLastPage;
+}
+
+void PrinterController::setReversePrint( sal_Bool i_bReverse )
+{
+ mpImplData->mbReversePageOrder = i_bReverse;
+}
+
+bool PrinterController::getReversePrint() const
+{
+ return mpImplData->mbReversePageOrder;
+}
+
+Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< PropertyValue >& i_rMergeList ) const
+{
+ std::hash_set< rtl::OUString, rtl::OUStringHash > aMergeSet;
+ size_t nResultLen = size_t(i_rMergeList.getLength()) + mpImplData->maUIProperties.size() + 3;
+ for( int i = 0; i < i_rMergeList.getLength(); i++ )
+ aMergeSet.insert( i_rMergeList[i].Name );
+
+ Sequence< PropertyValue > aResult( nResultLen );
+ for( int i = 0; i < i_rMergeList.getLength(); i++ )
+ aResult[i] = i_rMergeList[i];
+ int nCur = i_rMergeList.getLength();
+ for( size_t i = 0; i < mpImplData->maUIProperties.size(); i++ )
+ {
+ if( aMergeSet.find( mpImplData->maUIProperties[i].Name ) == aMergeSet.end() )
+ aResult[nCur++] = mpImplData->maUIProperties[i];
+ }
+ // append IsFirstPage
+ if( aMergeSet.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFirstPage" ) ) ) == aMergeSet.end() )
+ {
+ PropertyValue aVal;
+ aVal.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFirstPage" ) );
+ aVal.Value <<= mpImplData->mbFirstPage;
+ aResult[nCur++] = aVal;
+ }
+ // append IsLastPage
+ if( aMergeSet.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsLastPage" ) ) ) == aMergeSet.end() )
+ {
+ PropertyValue aVal;
+ aVal.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsLastPage" ) );
+ aVal.Value <<= mpImplData->mbLastPage;
+ aResult[nCur++] = aVal;
+ }
+ // append IsPrinter
+ if( aMergeSet.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrinter" ) ) ) == aMergeSet.end() )
+ {
+ PropertyValue aVal;
+ aVal.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrinter" ) );
+ aVal.Value <<= sal_True;
+ aResult[nCur++] = aVal;
+ }
+ aResult.realloc( nCur );
+ return aResult;
+}
+
+const Sequence< beans::PropertyValue >& PrinterController::getUIOptions() const
+{
+ return mpImplData->maUIOptions;
+}
+
+beans::PropertyValue* PrinterController::getValue( const rtl::OUString& i_rProperty )
+{
+ std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it =
+ mpImplData->maPropertyToIndex.find( i_rProperty );
+ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL;
+}
+
+const beans::PropertyValue* PrinterController::getValue( const rtl::OUString& i_rProperty ) const
+{
+ std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it =
+ mpImplData->maPropertyToIndex.find( i_rProperty );
+ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL;
+}
+
+Sequence< beans::PropertyValue > PrinterController::getValues( const Sequence< rtl::OUString >& i_rNames ) const
+{
+ Sequence< beans::PropertyValue > aRet( i_rNames.getLength() );
+ sal_Int32 nFound = 0;
+ for( sal_Int32 i = 0; i < i_rNames.getLength(); i++ )
+ {
+ const beans::PropertyValue* pVal = getValue( i_rNames[i] );
+ if( pVal )
+ aRet[ nFound++ ] = *pVal;
+ }
+ aRet.realloc( nFound );
+ return aRet;
+}
+
+void PrinterController::setValue( const rtl::OUString& i_rName, const Any& i_rValue )
+{
+ beans::PropertyValue aVal;
+ aVal.Name = i_rName;
+ aVal.Value = i_rValue;
+
+ setValue( aVal );
+}
+
+void PrinterController::setValue( const beans::PropertyValue& i_rValue )
+{
+ std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it =
+ mpImplData->maPropertyToIndex.find( i_rValue.Name );
+ if( it != mpImplData->maPropertyToIndex.end() )
+ mpImplData->maUIProperties[ it->second ] = i_rValue;
+ else
+ {
+ // insert correct index into property map
+ mpImplData->maPropertyToIndex[ i_rValue.Name ] = mpImplData->maUIProperties.size();
+ mpImplData->maUIProperties.push_back( i_rValue );
+ mpImplData->maUIPropertyEnabled.push_back( true );
+ }
+}
+
+void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_rOptions )
+{
+ DBG_ASSERT( mpImplData->maUIOptions.getLength() == 0, "setUIOptions called twice !" );
+
+ mpImplData->maUIOptions = i_rOptions;
+
+ for( int i = 0; i < i_rOptions.getLength(); i++ )
+ {
+ Sequence< beans::PropertyValue > aOptProp;
+ i_rOptions[i].Value >>= aOptProp;
+ bool bIsEnabled = true;
+ bool bHaveProperty = false;
+ rtl::OUString aPropName;
+ vcl::ImplPrinterControllerData::ControlDependency aDep;
+ for( int n = 0; n < aOptProp.getLength(); n++ )
+ {
+ const beans::PropertyValue& rEntry( aOptProp[ n ] );
+ if( rEntry.Name.equalsAscii( "Property" ) )
+ {
+ PropertyValue aVal;
+ rEntry.Value >>= aVal;
+ DBG_ASSERT( mpImplData->maPropertyToIndex.find( aVal.Name )
+ == mpImplData->maPropertyToIndex.end(), "duplicate property entry" );
+ setValue( aVal );
+ aPropName = aVal.Name;
+ bHaveProperty = true;
+ }
+ else if( rEntry.Name.equalsAscii( "Enabled" ) )
+ {
+ sal_Bool bValue = sal_True;
+ rEntry.Value >>= bValue;
+ bIsEnabled = bValue;
+ }
+ else if( rEntry.Name.equalsAscii( "DependsOnName" ) )
+ {
+ rEntry.Value >>= aDep.maDependsOnName;
+ }
+ else if( rEntry.Name.equalsAscii( "DependsOnEntry" ) )
+ {
+ rEntry.Value >>= aDep.mnDependsOnEntry;
+ }
+ }
+ if( bHaveProperty )
+ {
+ vcl::ImplPrinterControllerData::PropertyToIndexMap::const_iterator it =
+ mpImplData->maPropertyToIndex.find( aPropName );
+ // sanity check
+ if( it != mpImplData->maPropertyToIndex.end() )
+ {
+ mpImplData->maUIPropertyEnabled[ it->second ] = bIsEnabled;
+ }
+ if( aDep.maDependsOnName.getLength() > 0 )
+ mpImplData->maControlDependencies[ aPropName ] = aDep;
+ }
+ }
+}
+
+void PrinterController::enableUIOption( const rtl::OUString& i_rProperty, bool i_bEnable )
+{
+ std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it =
+ mpImplData->maPropertyToIndex.find( i_rProperty );
+ if( it != mpImplData->maPropertyToIndex.end() )
+ {
+ // call handler only for actual changes
+ if( ( mpImplData->maUIPropertyEnabled[ it->second ] && ! i_bEnable ) ||
+ ( ! mpImplData->maUIPropertyEnabled[ it->second ] && i_bEnable ) )
+ {
+ mpImplData->maUIPropertyEnabled[ it->second ] = i_bEnable;
+ rtl::OUString aPropName( i_rProperty );
+ mpImplData->maOptionChangeHdl.Call( &aPropName );
+ }
+ }
+}
+
+bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) const
+{
+ bool bEnabled = false;
+ std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator prop_it =
+ mpImplData->maPropertyToIndex.find( i_rProperty );
+ if( prop_it != mpImplData->maPropertyToIndex.end() )
+ {
+ bEnabled = mpImplData->maUIPropertyEnabled[prop_it->second];
+
+ if( bEnabled )
+ {
+ // check control dependencies
+ vcl::ImplPrinterControllerData::ControlDependencyMap::const_iterator it =
+ mpImplData->maControlDependencies.find( i_rProperty );
+ if( it != mpImplData->maControlDependencies.end() )
+ {
+ // check if the dependency is enabled
+ // if the dependency is disabled, we are too
+ bEnabled = isUIOptionEnabled( it->second.maDependsOnName );
+
+ if( bEnabled )
+ {
+ // does the dependency have the correct value ?
+ const com::sun::star::beans::PropertyValue* pVal = getValue( it->second.maDependsOnName );
+ OSL_ENSURE( pVal, "unknown property in dependency" );
+ if( pVal )
+ {
+ sal_Int32 nDepVal = 0;
+ sal_Bool bDepVal = sal_False;
+ if( pVal->Value >>= nDepVal )
+ {
+ bEnabled = (nDepVal == it->second.mnDependsOnEntry) || (it->second.mnDependsOnEntry == -1);
+ }
+ else if( pVal->Value >>= bDepVal )
+ {
+ // could be a dependency on a checked boolean
+ // in this case the dependency is on a non zero for checked value
+ bEnabled = ( bDepVal && it->second.mnDependsOnEntry != 0) ||
+ ( ! bDepVal && it->second.mnDependsOnEntry == 0);
+ }
+ else
+ {
+ // if the type does not match something is awry
+ OSL_ENSURE( 0, "strange type in control dependency" );
+ bEnabled = false;
+ }
+ }
+ }
+ }
+ }
+ }
+ return bEnabled;
+}
+
+rtl::OUString PrinterController::getDependency( const rtl::OUString& i_rProperty ) const
+{
+ rtl::OUString aDependency;
+
+ vcl::ImplPrinterControllerData::ControlDependencyMap::const_iterator it =
+ mpImplData->maControlDependencies.find( i_rProperty );
+ if( it != mpImplData->maControlDependencies.end() )
+ aDependency = it->second.maDependsOnName;
+
+ return aDependency;
+}
+
+rtl::OUString PrinterController::makeEnabled( const rtl::OUString& i_rProperty )
+{
+ rtl::OUString aDependency;
+
+ vcl::ImplPrinterControllerData::ControlDependencyMap::const_iterator it =
+ mpImplData->maControlDependencies.find( i_rProperty );
+ if( it != mpImplData->maControlDependencies.end() )
+ {
+ if( isUIOptionEnabled( it->second.maDependsOnName ) )
+ {
+ aDependency = it->second.maDependsOnName;
+ const com::sun::star::beans::PropertyValue* pVal = getValue( aDependency );
+ OSL_ENSURE( pVal, "unknown property in dependency" );
+ if( pVal )
+ {
+ sal_Int32 nDepVal = 0;
+ sal_Bool bDepVal = sal_False;
+ if( pVal->Value >>= nDepVal )
+ {
+ if( it->second.mnDependsOnEntry != -1 )
+ {
+ setValue( aDependency, makeAny( sal_Int32( it->second.mnDependsOnEntry ) ) );
+ }
+ }
+ else if( pVal->Value >>= bDepVal )
+ {
+ setValue( aDependency, makeAny( sal_Bool( it->second.mnDependsOnEntry != 0 ) ) );
+ }
+ else
+ {
+ // if the type does not match something is awry
+ OSL_ENSURE( 0, "strange type in control dependency" );
+ }
+ }
+ }
+ }
+
+ return aDependency;
+}
+
+void PrinterController::setOptionChangeHdl( const Link& i_rHdl )
+{
+ mpImplData->maOptionChangeHdl = i_rHdl;
+}
+
+void PrinterController::createProgressDialog()
+{
+ if( ! mpImplData->mpProgress )
+ {
+ sal_Bool bShow = sal_True;
+ beans::PropertyValue* pMonitor = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MonitorVisible" ) ) );
+ if( pMonitor )
+ pMonitor->Value >>= bShow;
+ else
+ {
+ const com::sun::star::beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsApi" ) ) );
+ if( pVal )
+ {
+ sal_Bool bApi = sal_False;
+ pVal->Value >>= bApi;
+ bShow = ! bApi;
+ }
+ }
+
+ if( bShow && ! Application::IsHeadlessModeEnabled() )
+ {
+ mpImplData->mpProgress = new PrintProgressDialog( NULL, getPageCountProtected() );
+ mpImplData->mpProgress->Show();
+ }
+ }
+}
+
+void PrinterController::setMultipage( const MultiPageSetup& i_rMPS )
+{
+ mpImplData->maMultiPage = i_rMPS;
+}
+
+const PrinterController::MultiPageSetup& PrinterController::getMultipage() const
+{
+ return mpImplData->maMultiPage;
+}
+
+void PrinterController::pushPropertiesToPrinter()
+{
+ sal_Int32 nCopyCount = 1;
+ // set copycount and collate
+ const beans::PropertyValue* pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CopyCount" ) ) );
+ if( pVal )
+ pVal->Value >>= nCopyCount;
+ sal_Bool bCollate = sal_False;
+ pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) );
+ if( pVal )
+ pVal->Value >>= bCollate;
+ mpImplData->mpPrinter->SetCopyCount( static_cast<USHORT>(nCopyCount), bCollate );
+
+ // duplex mode
+ pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DuplexMode" ) ) );
+ if( pVal )
+ {
+ sal_Int16 nDuplex = view::DuplexMode::UNKNOWN;
+ pVal->Value >>= nDuplex;
+ switch( nDuplex )
+ {
+ case view::DuplexMode::OFF: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_OFF ); break;
+ case view::DuplexMode::LONGEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_LONGEDGE ); break;
+ case view::DuplexMode::SHORTEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break;
+ }
+ }
+}
+
+bool PrinterController::isShowDialogs() const
+{
+ sal_Bool bApi = getBoolProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsApi" ) ), sal_False );
+ return ! bApi && ! Application::IsHeadlessModeEnabled();
+}
+
+bool PrinterController::isDirectPrint() const
+{
+ sal_Bool bDirect = getBoolProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ), sal_False );
+ return bDirect == sal_True;
+}
+
+sal_Bool PrinterController::getBoolProperty( const rtl::OUString& i_rProperty, sal_Bool i_bFallback ) const
+{
+ sal_Bool bRet = i_bFallback;
+ const com::sun::star::beans::PropertyValue* pVal = getValue( i_rProperty );
+ if( pVal )
+ pVal->Value >>= bRet;
+ return bRet;
+}
+
+/*
+ * PrinterOptionsHelper
+**/
+Any PrinterOptionsHelper::getValue( const rtl::OUString& i_rPropertyName ) const
+{
+ Any aRet;
+ std::hash_map< rtl::OUString, Any, rtl::OUStringHash >::const_iterator it =
+ m_aPropertyMap.find( i_rPropertyName );
+ if( it != m_aPropertyMap.end() )
+ aRet = it->second;
+ return aRet;
+}
+
+void PrinterOptionsHelper::setValue( const rtl::OUString& i_rPropertyName, const Any& i_rValue )
+{
+ m_aPropertyMap[ i_rPropertyName ] = i_rValue;
+}
+
+bool PrinterOptionsHelper::hasProperty( const rtl::OUString& i_rPropertyName ) const
+{
+ Any aRet;
+ std::hash_map< rtl::OUString, Any, rtl::OUStringHash >::const_iterator it =
+ m_aPropertyMap.find( i_rPropertyName );
+ return it != m_aPropertyMap.end();
+}
+
+sal_Bool PrinterOptionsHelper::getBoolValue( const rtl::OUString& i_rPropertyName, sal_Bool i_bDefault ) const
+{
+ sal_Bool bRet = sal_False;
+ Any aVal( getValue( i_rPropertyName ) );
+ return (aVal >>= bRet) ? bRet : i_bDefault;
+}
+
+sal_Int64 PrinterOptionsHelper::getIntValue( const rtl::OUString& i_rPropertyName, sal_Int64 i_nDefault ) const
+{
+ sal_Int64 nRet = 0;
+ Any aVal( getValue( i_rPropertyName ) );
+ return (aVal >>= nRet) ? nRet : i_nDefault;
+}
+
+rtl::OUString PrinterOptionsHelper::getStringValue( const rtl::OUString& i_rPropertyName, const rtl::OUString& i_rDefault ) const
+{
+ rtl::OUString aRet;
+ Any aVal( getValue( i_rPropertyName ) );
+ return (aVal >>= aRet) ? aRet : i_rDefault;
+}
+
+bool PrinterOptionsHelper::processProperties( const Sequence< PropertyValue >& i_rNewProp,
+ std::set< rtl::OUString >* o_pChangeProp )
+{
+ bool bChanged = false;
+
+ // clear the changed set
+ if( o_pChangeProp )
+ o_pChangeProp->clear();
+
+ sal_Int32 nElements = i_rNewProp.getLength();
+ const PropertyValue* pVals = i_rNewProp.getConstArray();
+ for( sal_Int32 i = 0; i < nElements; i++ )
+ {
+ bool bElementChanged = false;
+ std::hash_map< rtl::OUString, Any, rtl::OUStringHash >::iterator it =
+ m_aPropertyMap.find( pVals[ i ].Name );
+ if( it != m_aPropertyMap.end() )
+ {
+ if( it->second != pVals[ i ].Value )
+ bElementChanged = true;
+ }
+ else
+ bElementChanged = true;
+
+ if( bElementChanged )
+ {
+ if( o_pChangeProp )
+ o_pChangeProp->insert( pVals[ i ].Name );
+ m_aPropertyMap[ pVals[i].Name ] = pVals[i].Value;
+ bChanged = true;
+ }
+ }
+ return bChanged;
+}
+
+void PrinterOptionsHelper::appendPrintUIOptions( uno::Sequence< beans::PropertyValue >& io_rProps ) const
+{
+ if( m_aUIProperties.getLength() > 0 )
+ {
+ sal_Int32 nIndex = io_rProps.getLength();
+ io_rProps.realloc( nIndex+1 );
+ PropertyValue aVal;
+ aVal.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ExtraPrintUIOptions" ) );
+ aVal.Value = makeAny( m_aUIProperties );
+ io_rProps[ nIndex ] = aVal;
+ }
+}
+
+Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
+ const Sequence< rtl::OUString >& i_rHelpTexts,
+ const rtl::OUString& i_rType,
+ const PropertyValue* i_pVal,
+ const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
+ )
+{
+ sal_Int32 nElements =
+ 1 // ControlType
+ + (i_rTitle.getLength() ? 1 : 0) // Text
+ + (i_rHelpTexts.getLength() ? 1 : 0) // HelpText
+ + (i_pVal ? 1 : 0) // Property
+ + i_rControlOptions.maAddProps.getLength() // additional props
+ + (i_rControlOptions.maGroupHint.getLength() ? 1 : 0) // grouping
+ + (i_rControlOptions.mbInternalOnly ? 1 : 0) // internal hint
+ + (i_rControlOptions.mbEnabled ? 0 : 1) // enabled
+ ;
+ if( i_rControlOptions.maDependsOnName.getLength() )
+ {
+ nElements += 1;
+ if( i_rControlOptions.mnDependsOnEntry != -1 )
+ nElements += 1;
+ if( i_rControlOptions.mbAttachToDependency )
+ nElements += 1;
+ }
+
+ Sequence< PropertyValue > aCtrl( nElements );
+ sal_Int32 nUsed = 0;
+ if( i_rTitle.getLength() )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rTitle );
+ }
+ if( i_rHelpTexts.getLength() )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rHelpTexts );
+ }
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlType" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rType );
+ if( i_pVal )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Property" ) );
+ aCtrl[nUsed++].Value = makeAny( *i_pVal );
+ }
+ if( i_rControlOptions.maDependsOnName.getLength() )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DependsOnName" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rControlOptions.maDependsOnName );
+ if( i_rControlOptions.mnDependsOnEntry != -1 )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DependsOnEntry" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rControlOptions.mnDependsOnEntry );
+ }
+ if( i_rControlOptions.mbAttachToDependency )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AttachToDependency" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rControlOptions.mbAttachToDependency );
+ }
+ }
+ if( i_rControlOptions.maGroupHint.getLength() )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GroupingHint" ) );
+ aCtrl[nUsed++].Value <<= i_rControlOptions.maGroupHint;
+ }
+ if( i_rControlOptions.mbInternalOnly )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InternalUIOnly" ) );
+ aCtrl[nUsed++].Value <<= sal_True;
+ }
+ if( ! i_rControlOptions.mbEnabled )
+ {
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) );
+ aCtrl[nUsed++].Value <<= sal_False;
+ }
+
+ sal_Int32 nAddProps = i_rControlOptions.maAddProps.getLength();
+ for( sal_Int32 i = 0; i < nAddProps; i++ )
+ aCtrl[ nUsed++ ] = i_rControlOptions.maAddProps[i];
+
+ DBG_ASSERT( nUsed == nElements, "nUsed != nElements, probable heap corruption" );
+
+ return makeAny( aCtrl );
+}
+
+Any PrinterOptionsHelper::getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpText )
+{
+ Sequence< rtl::OUString > aHelpText;
+ if( i_rHelpText.getLength() > 0 )
+ {
+ aHelpText.realloc( 1 );
+ *aHelpText.getArray() = i_rHelpText;
+ }
+ return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Group" ) ) );
+}
+
+Any PrinterOptionsHelper::getSubgroupControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
+ )
+{
+ Sequence< rtl::OUString > aHelpText;
+ if( i_rHelpText.getLength() > 0 )
+ {
+ aHelpText.realloc( 1 );
+ *aHelpText.getArray() = i_rHelpText;
+ }
+ return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Subgroup" ) ),
+ NULL, i_rControlOptions );
+}
+
+Any PrinterOptionsHelper::getBoolControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ sal_Bool i_bValue,
+ const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
+ )
+{
+ Sequence< rtl::OUString > aHelpText;
+ if( i_rHelpText.getLength() > 0 )
+ {
+ aHelpText.realloc( 1 );
+ *aHelpText.getArray() = i_rHelpText;
+ }
+ PropertyValue aVal;
+ aVal.Name = i_rProperty;
+ aVal.Value = makeAny( i_bValue );
+ return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Bool" ) ), &aVal, i_rControlOptions );
+}
+
+Any PrinterOptionsHelper::getChoiceControlOpt( const rtl::OUString& i_rTitle,
+ const Sequence< rtl::OUString >& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ const Sequence< rtl::OUString >& i_rChoices,
+ sal_Int32 i_nValue,
+ const rtl::OUString& i_rType,
+ const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
+ )
+{
+ UIControlOptions aOpt( i_rControlOptions );
+ sal_Int32 nUsed = aOpt.maAddProps.getLength();
+ aOpt.maAddProps.realloc( nUsed + 1 );
+ aOpt.maAddProps[nUsed].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Choices" ) );
+ aOpt.maAddProps[nUsed].Value = makeAny( i_rChoices );
+
+ PropertyValue aVal;
+ aVal.Name = i_rProperty;
+ aVal.Value = makeAny( i_nValue );
+ return getUIControlOpt( i_rTitle, i_rHelpText, i_rType, &aVal, aOpt );
+}
+
+Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ sal_Int32 i_nValue,
+ sal_Int32 i_nMinValue,
+ sal_Int32 i_nMaxValue,
+ const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
+ )
+{
+ UIControlOptions aOpt( i_rControlOptions );
+ if( i_nMaxValue >= i_nMinValue )
+ {
+ sal_Int32 nUsed = aOpt.maAddProps.getLength();
+ aOpt.maAddProps.realloc( nUsed + 2 );
+ aOpt.maAddProps[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MinValue" ) );
+ aOpt.maAddProps[nUsed++].Value = makeAny( i_nMinValue );
+ aOpt.maAddProps[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxValue" ) );
+ aOpt.maAddProps[nUsed++].Value = makeAny( i_nMaxValue );
+ }
+
+ Sequence< rtl::OUString > aHelpText;
+ if( i_rHelpText.getLength() > 0 )
+ {
+ aHelpText.realloc( 1 );
+ *aHelpText.getArray() = i_rHelpText;
+ }
+ PropertyValue aVal;
+ aVal.Name = i_rProperty;
+ aVal.Value = makeAny( i_nValue );
+ return getUIControlOpt( i_rTitle,
+ aHelpText,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Range" ) ),
+ &aVal,
+ aOpt
+ );
+}
+
+Any PrinterOptionsHelper::getEditControlOpt( const rtl::OUString& i_rTitle,
+ const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rProperty,
+ const rtl::OUString& i_rValue,
+ const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
+ )
+{
+ Sequence< rtl::OUString > aHelpText;
+ if( i_rHelpText.getLength() > 0 )
+ {
+ aHelpText.realloc( 1 );
+ *aHelpText.getArray() = i_rHelpText;
+ }
+ PropertyValue aVal;
+ aVal.Name = i_rProperty;
+ aVal.Value = makeAny( i_rValue );
+ return getUIControlOpt( i_rTitle,
+ aHelpText,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Edit" ) ),
+ &aVal,
+ i_rControlOptions
+ );
+}
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index f1c532a9295f..a13e272e368b 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -359,27 +359,40 @@ BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase )
// -----------------------------------------------------------------------
-void VirtualDevice::SetReferenceDevice( RefDevMode eRefDevMode )
+void VirtualDevice::SetReferenceDevice( RefDevMode i_eRefDevMode )
{
- switch( eRefDevMode )
+ sal_Int32 nDPIX = 600, nDPIY = 600;
+ switch( i_eRefDevMode )
{
case REFDEV_NONE:
default:
DBG_ASSERT( FALSE, "VDev::SetRefDev illegal argument!" );
- // fall through
+ break;
case REFDEV_MODE06:
- mnDPIX = mnDPIY = 600;
+ nDPIX = nDPIY = 600;
break;
case REFDEV_MODE48:
- mnDPIX = mnDPIY = 4800;
+ nDPIX = nDPIY = 4800;
break;
case REFDEV_MODE_MSO1:
- mnDPIX = mnDPIY = 6*1440;
+ nDPIX = nDPIY = 6*1440;
break;
case REFDEV_MODE_PDF1:
- mnDPIX = mnDPIY = 720;
+ nDPIX = nDPIY = 720;
break;
}
+ ImplSetReferenceDevice( i_eRefDevMode, nDPIX, nDPIY );
+}
+
+void VirtualDevice::SetReferenceDevice( sal_Int32 i_nDPIX, sal_Int32 i_nDPIY )
+{
+ ImplSetReferenceDevice( REFDEV_CUSTOM, i_nDPIX, i_nDPIY );
+}
+
+void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY )
+{
+ mnDPIX = i_nDPIX;
+ mnDPIY = i_nDPIY;
EnableOutput( FALSE ); // prevent output on reference device
mbScreenComp = FALSE;
@@ -391,7 +404,7 @@ void VirtualDevice::SetReferenceDevice( RefDevMode eRefDevMode )
// avoid adjusting font lists when already in refdev mode
BYTE nOldRefDevMode = meRefDevMode;
BYTE nOldCompatFlag = (BYTE)meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD;
- meRefDevMode = (BYTE)(eRefDevMode | nOldCompatFlag);
+ meRefDevMode = (BYTE)(i_eRefDevMode | nOldCompatFlag);
if( (nOldRefDevMode ^ nOldCompatFlag) != REFDEV_NONE )
return;
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index 477ff5fb9902..489e3cf9340e 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -30,10 +30,31 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/xconnection.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/salinst.hxx>
+
+#include "svsys.h"
+#include "vcl/xconnection.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/salinst.hxx"
+#include "vcl/svapp.hxx"
+
+namespace vcl
+{
+ class SolarMutexReleaser
+ {
+ ULONG mnReleased;
+ public:
+ SolarMutexReleaser()
+ {
+ mnReleased = Application::ReleaseSolarMutex();
+ }
+
+ ~SolarMutexReleaser()
+ {
+ if( mnReleased )
+ Application::AcquireSolarMutex( mnReleased );
+ }
+ };
+}
using namespace rtl;
using namespace osl;
@@ -41,6 +62,7 @@ using namespace vcl;
using namespace com::sun::star::uno;
using namespace com::sun::star::awt;
+
DisplayConnection::DisplayConnection()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -108,6 +130,8 @@ Any SAL_CALL DisplayConnection::getIdentifier() throw()
void DisplayConnection::dispatchDowningEvent()
{
+ SolarMutexReleaser aRel;
+
MutexGuard aGuard( m_aMutex );
Any aEvent;
std::list< Reference< XEventHandler > > aLocalList( m_aHandlers );
@@ -117,6 +141,8 @@ void DisplayConnection::dispatchDowningEvent()
bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes )
{
+ SolarMutexReleaser aRel;
+
DisplayConnection* This = (DisplayConnection*)pThis;
MutexGuard aGuard( This->m_aMutex );
@@ -131,6 +157,8 @@ bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes )
bool DisplayConnection::dispatchErrorEvent( void* pThis, void* pData, int nBytes )
{
+ SolarMutexReleaser aRel;
+
DisplayConnection* This = (DisplayConnection*)pThis;
MutexGuard aGuard( This->m_aMutex );
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index a2b057c8d234..5a0e7b412a58 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -833,3 +833,23 @@ Bitmap (SV_ICON_SMALL_HC_START + SV_ICON_ID_PRINTERADMIN)
File = "printeradmin_16_h.png" ;
};
+Bitmap SV_DISCLOSURE_PLUS
+{
+ File = "plus.png";
+};
+
+Bitmap SV_DISCLOSURE_PLUS_HC
+{
+ File = "plus_sch.png";
+};
+
+Bitmap SV_DISCLOSURE_MINUS
+{
+ File = "minus.png";
+};
+
+Bitmap SV_DISCLOSURE_MINUS_HC
+{
+ File = "minus_sch.png";
+};
+
diff --git a/vcl/source/src/makefile.mk b/vcl/source/src/makefile.mk
index cf01c74b977d..7772af5a0978 100644
--- a/vcl/source/src/makefile.mk
+++ b/vcl/source/src/makefile.mk
@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.8 $
+# $Revision: 1.8.114.1 $
#
# This file is part of OpenOffice.org.
#
@@ -47,7 +47,8 @@ SRC1FILES= images.src \
stdtext.src \
helptext.src \
units.src \
- btntext.src
+ btntext.src \
+ print.src
RESLIB1NAME= $(RESTARGET)
RESLIB1IMAGES= $(PRJ)$/source/src
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
new file mode 100644
index 000000000000..0125c0dfbeb3
--- /dev/null
+++ b/vcl/source/src/print.src
@@ -0,0 +1,495 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: print.src,v $
+ * $Revision: 1.1.2.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "vcl/svids.hrc"
+
+ModalDialog SV_DLG_PRINT
+{
+ Text [en-US] = "Print";
+ Closeable = TRUE;
+ Sizeable = TRUE;
+ Moveable = TRUE;
+ Maxable = TRUE;
+ SVLook = TRUE;
+
+ Size = MAP_APPFONT( 350, 215 );
+
+ OKButton SV_PRINT_OK
+ {
+ DefButton = TRUE;
+ Pos = MAP_APPFONT( 240, 195 );
+ Size = MAP_APPFONT( 50, 15 );
+ Text [en-US] = "~Print";
+ };
+ CancelButton SV_PRINT_CANCEL
+ {
+ Pos = MAP_APPFONT( 295, 195 );
+ Size = MAP_APPFONT( 50, 15 );
+ };
+ HelpButton SV_PRINT_HELP
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 50, 15 );
+ };
+
+ Window SV_PRINT_PAGE_PREVIEW
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 130, 130 );
+ Border = FALSE;
+ };
+ NumericField SV_PRINT_PAGE_EDIT
+ {
+ Pos = MAP_APPFONT( 5, 140 );
+ Size = MAP_APPFONT( 30, 12 );
+ SVLook = TRUE;
+ Spin = FALSE;
+ Border = TRUE;
+ HelpText [en-US] = "Select page to display in preview.";
+ };
+ FixedText SV_PRINT_PAGE_TXT
+ {
+ Pos = MAP_APPFONT( 40,142 );
+ Size = MAP_APPFONT( 30, 12 );
+ Text [ en-US ] = "/ %n";
+ VCenter = TRUE;
+ };
+ PushButton SV_PRINT_PAGE_FORWARD
+ {
+ Pos = MAP_APPFONT( 95, 140 );
+ Size = MAP_APPFONT( 15, 12 );
+ HelpText [en-US] = "Scroll one page forward.";
+ };
+ PushButton SV_PRINT_PAGE_BACKWARD
+ {
+ Pos = MAP_APPFONT( 80, 140 );
+ Size = MAP_APPFONT( 15, 12 );
+ HelpText [en-US] = "Scroll one page backward.";
+ };
+ TabControl SV_PRINT_TABCTRL
+ {
+ Pos = MAP_APPFONT( 140, 5 );
+ Size = MAP_APPFONT( 205, 175 );
+ };
+ FixedLine SV_PRINT_BUTTONLINE
+ {
+ Pos = MAP_APPFONT( 0, 185 );
+ Size = MAP_APPFONT( 350, 8 );
+ };
+ String SV_PRINT_NOPAGES
+ {
+ Text [en-US] = "No pages";
+ };
+
+ String SV_PRINT_TOFILE_TXT
+ {
+ Text [en-US] = "Print to File...";
+ };
+
+ String SV_PRINT_DEFPRT_TXT
+ {
+ Text [en-US] = "Default printer";
+ };
+
+
+ String SV_PRINT_PRINTPREVIEW_TXT
+ {
+ Text [en-US] = "Print preview";
+ };
+
+ TabPage SV_PRINT_TAB_NUP
+ {
+ Text [en-US] = "Page Layout";
+ Hide = TRUE;
+
+ FixedLine SV_PRINT_PRT_NUP_LAYOUT_FL
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 150, 10 );
+ Text [en-US] = "Layout";
+ };
+ RadioButton SV_PRINT_PRT_NUP_DEFAULT_BTN
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 10 );
+ Text [en-US] = "~Default";
+ HelpText [en-US] = "Print one page per sheet of paper.";
+ };
+ RadioButton SV_PRINT_PRT_NUP_BROCHURE_BTN
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 10 );
+ Text = "";
+ };
+ RadioButton SV_PRINT_PRT_NUP_PAGES_BTN
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 10 );
+ Text [en-US] = "Pa~ges per sheet";
+ HelpText [en-US] = "Print multiple pages per sheet of paper.";
+ };
+ ListBox SV_PRINT_PRT_NUP_PAGES_BOX
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 80 );
+ Border = TRUE;
+ DropDown = TRUE;
+ CurPos = 0;
+ HelpText [en-US] = "Select how many pages to print per sheet of paper.";
+ StringList [en-US] =
+ {
+ < "1"; 1; >;
+ < "2"; 2; >;
+ < "4"; 4; >;
+ < "6"; 6; >;
+ < "9"; 9; >;
+ < "16"; 16; >;
+ < "Custom"; 0xffff; >;
+ };
+ };
+ FixedText SV_PRINT_PRT_NUP_NUM_PAGES_TXT
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 10 );
+ Text [en-US] = "P~ages";
+ VCenter = TRUE;
+ };
+ NumericField SV_PRINT_PRT_NUP_COLS_EDT
+ {
+ Pos = MAP_APPFONT( 55, 20 );
+ Size = MAP_APPFONT( 40, 12 );
+ Border = TRUE;
+ Spin = TRUE;
+ Minimum = 1;
+ Maximum = 32;
+ Value = 1;
+ HelpText [en-US] = "Select number of columns.";
+ };
+ FixedText SV_PRINT_PRT_NUP_TIMES_TXT
+ {
+ Pos = MAP_APPFONT( 10, 35 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text [en-US] = "b~y";
+ VCenter = TRUE;
+ };
+ NumericField SV_PRINT_PRT_NUP_ROWS_EDT
+ {
+ Pos = MAP_APPFONT( 55, 35 );
+ Size = MAP_APPFONT( 40, 12 );
+ Border = TRUE;
+ Spin = TRUE;
+ Minimum = 1;
+ Maximum = 32;
+ Value = 1;
+ HelpText [en-US] = "Select number of rows.";
+ };
+ FixedText SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT
+ {
+ Pos = MAP_APPFONT( 10, 95 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text [en-US] = "~Distance";
+ };
+ MetricField SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT
+ {
+ Pos = MAP_APPFONT( 55, 95 );
+ Size = MAP_APPFONT( 40, 12 );
+ Spin = TRUE;
+ Border = TRUE;
+ Value = 0;
+ Unit = FUNIT_MM;
+ HelpText [en-US] = "Select margin between individual pages on each sheet of paper.";
+ };
+ FixedText SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT
+ {
+ Pos = MAP_APPFONT( 10, 95 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text [en-US] = "between pages";
+ };
+ FixedText SV_PRINT_PRT_NUP_MARGINS_SHEET_1_TXT
+ {
+ Pos = MAP_APPFONT( 110, 95 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text [en-US] = "~Margin";
+ };
+ MetricField SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT
+ {
+ Pos = MAP_APPFONT( 155, 95 );
+ Size = MAP_APPFONT( 40, 12 );
+ Spin = TRUE;
+ Border = TRUE;
+ Value = 0;
+ Unit = FUNIT_MM;
+ HelpText [en-US] = "Select margin between the printed pages and paper edge.";
+ };
+ FixedText SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT
+ {
+ Pos = MAP_APPFONT( 110, 95 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text [en-US] = "to sheet border";
+ };
+ FixedText SV_PRINT_PRT_NUP_ORIENTATION_TXT
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 10 );
+ Text [en-US] = "~Orientation";
+ };
+ ListBox SV_PRINT_PRT_NUP_ORIENTATION_BOX
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 40 );
+ Border = TRUE;
+ DropDown = TRUE;
+ CurPos = 0;
+ StringList [en-US] =
+ {
+ < "Automatic"; SV_PRINT_PRT_NUP_ORIENTATION_AUTOMATIC; >;
+ < "Portrait"; SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT; >;
+ < "Landscape"; SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE; >;
+ };
+ HelpText [en-US] = "Select the orientation of the paper.";
+ };
+ FixedText SV_PRINT_PRT_NUP_ORDER_TXT
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 10 );
+ Text [en-US] = "Order";
+ };
+ ListBox SV_PRINT_PRT_NUP_ORDER_BOX
+ {
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 10, 20 );
+ DropDown = TRUE;
+ Border = TRUE;
+ CurPos = 0;
+ StringList [en-US] =
+ {
+ < "left to right, then down"; SV_PRINT_PRT_NUP_ORDER_LRTD; >;
+ < "top to bottom, then right"; SV_PRINT_PRT_NUP_ORDER_TDLR; >;
+ };
+ HelpText [en-US] = "Select order in which pages are to be printed.";
+ };
+ CheckBox SV_PRINT_PRT_NUP_BORDER_CB
+ {
+ Pos = MAP_APPFONT( 10, 65 );
+ Size = MAP_APPFONT( 150, 12 );
+ Text [en-US] = "Draw a border around each page";
+ HelpText [en-US] = "Check to draw a border around each page.";
+ };
+ };
+
+ TabPage SV_PRINT_TAB_JOB
+ {
+ Text [en-US] = "General";
+ Hide = TRUE;
+
+ FixedLine SV_PRINT_PRINTERS_FL
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text [ en-US ] = "Prin~ter";
+ };
+ ListBox SV_PRINT_PRINTERS
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 100, 80 );
+ Border = TRUE;
+ Sort = TRUE;
+ HelpText [en-US] = "Select the printer to print on.";
+ };
+ CheckBox SV_PRINT_DETAILS_BTN
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 5, 5 );
+ Text [en-US] = "Details";
+ HelpText [en-US] = "Show/Hide detailed information of the selected printer.";
+ };
+ FixedText SV_PRINT_STATUS_TXT
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text [en-US] = "Status:";
+ };
+ FixedText SV_PRINT_LOCATION_TXT
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text [en-US] = "Location:";
+ };
+ FixedText SV_PRINT_COMMENT_TXT
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text [en-US] = "Comment:";
+ };
+ PushButton SV_PRINT_PRT_SETUP
+ {
+ Pos = MAP_APPFONT( 115, 5 );
+ Size = MAP_APPFONT( 50, 15 );
+ Text [en-US] = "Properties...";
+ HelpText [en-US] = "Call the setup dialog of the selected printer.";
+ };
+ FixedLine SV_PRINT_COPIES
+ {
+ Pos = MAP_APPFONT( 5, 35 );
+ Size = MAP_APPFONT( 150, 10 );
+ Text [en-US] = "Range and Copies";
+ };
+ FixedText SV_PRINT_COPYCOUNT
+ {
+ Pos = MAP_APPFONT( 10, 45 );
+ Size = MAP_APPFONT( 80, 10 );
+ Text [en-US] = "Number of copies";
+ };
+ NumericField SV_PRINT_COPYCOUNT_FIELD
+ {
+ Pos = MAP_APPFONT( 10, 56 );
+ Size = MAP_APPFONT( 40, 12 );
+ Border = TRUE;
+ Spin = TRUE;
+ Minimum = 1;
+ Maximum = 16384;
+ Value = 1;
+ HelpText [en-US] = "Select the number of copies to be produced.";
+ };
+ FixedImage SV_PRINT_COLLATE_IMAGE
+ {
+ Pos = MAP_APPFONT( 95, 60 );
+ Size = MAP_PIXEL( 80, 30 );
+ };
+ CheckBox SV_PRINT_COLLATE
+ {
+ Pos = MAP_APPFONT( 95, 45 );
+ Size = MAP_APPFONT( 70, 10 );
+ Text [en-US] = "Collate";
+ HelpText [en-US] = "Select whether copies should be collated or not.";
+ };
+
+ Image SV_PRINT_COLLATE_IMG
+ {
+ ImageBitmap = Bitmap { File = "collate.png" ; };
+ };
+
+ Image SV_PRINT_NOCOLLATE_IMG
+ {
+ ImageBitmap = Bitmap { File = "ncollate.png" ; };
+ };
+
+ Image SV_PRINT_COLLATE_HC_IMG
+ {
+ ImageBitmap = Bitmap { File = "collate_h.png" ; };
+ };
+
+ Image SV_PRINT_NOCOLLATE_HC_IMG
+ {
+ ImageBitmap = Bitmap { File = "ncollate_h.png" ; };
+ };
+ };
+
+ TabPage SV_PRINT_TAB_OPT
+ {
+ Text [en-US] = "Options";
+ Hide = TRUE;
+
+ FixedLine SV_PRINT_OPT_PRINT_FL
+ {
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 150, 10 );
+ Text [en-US] = "Options";
+ };
+ CheckBox SV_PRINT_OPT_TOFILE
+ {
+ Pos = MAP_APPFONT( 10, 20 );
+ Size = MAP_APPFONT( 200, 12 );
+ Text [en-US] = "Print to ~file";
+ HelpText [en-US] = "Check to send output to a file instead of the actual printer.";
+ };
+ CheckBox SV_PRINT_OPT_SINGLEJOBS
+ {
+ Pos = MAP_APPFONT( 10, 35 );
+ Size = MAP_APPFONT( 200, 12 );
+ Text [en-US] = "~Create single print jobs for collated output";
+ HelpText [en-US] = "Check to not rely on the printer to create collated copies but create a print job for each copy instead.";
+ };
+ CheckBox SV_PRINT_OPT_REVERSE
+ {
+ Pos = MAP_APPFONT( 10, 50 );
+ Size = MAP_APPFONT( 200, 12 );
+ Text [en-US] = "Print in ~reverse page order";
+ HelpText [en-US] = "Check to print pages in reverse order.";
+ };
+ };
+};
+
+ModelessDialog SV_DLG_PRINT_PROGRESS
+{
+ Text [en-US] = "Printing";
+ Closeable = FALSE;
+ Sizeable = FALSE;
+ Moveable = TRUE;
+ SVLook = TRUE;
+
+ Size = MAP_APPFONT( 120, 70 );
+
+ CancelButton SV_PRINT_PROGRESS_CANCEL
+ {
+ Pos = MAP_APPFONT( 35, 50 );
+ Size = MAP_APPFONT( 50, 15 );
+ };
+ FixedText SV_PRINT_PROGRESS_TEXT
+ {
+ Pos = MAP_APPFONT( 5,10 );
+ Size = MAP_APPFONT( 110, 10 );
+ Text [ en-US ] = "Page %p of %n";
+ Center = TRUE;
+ };
+};
+
+ErrorBox SV_PRINT_NOPRINTERWARNING
+{
+ Title = "%PRODUCTNAME";
+ Message [en-US] = "No default printer found.\nPlease choose a printer and try again.";
+};
+
+ErrorBox SV_PRINT_NOCONTENT
+{
+ Title = "%PRODUCTNAME";
+ Message [en-US] = "There are no pages to be printed. Please check your document for ranges relevant to printing.";
+};
+
+StringArray SV_PRINT_NATIVE_STRINGS
+{
+ ItemList [en-US] =
+ {
+ < "Preview"; >;
+ < "Page number"; >;
+ < "Number of pages"; >;
+ < "More"; >;
+ };
+};
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 5ad1cdceeb61..d4dca4915b6b 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: stdtext.src,v $
- * $Revision: 1.53 $
+ * $Revision: 1.53.84.1 $
*
* This file is part of OpenOffice.org.
*
@@ -123,3 +123,8 @@ String SV_MAC_SCREENNNAME
{
Text [en-US] = "Screen %d";
};
+
+String SV_STDTEXT_ALLFILETYPES
+{
+ Text [en-US] = "Any type";
+};
diff --git a/vcl/source/window/arrange.cxx b/vcl/source/window/arrange.cxx
new file mode 100644
index 000000000000..0199af7ed50d
--- /dev/null
+++ b/vcl/source/window/arrange.cxx
@@ -0,0 +1,906 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accel.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_vcl.hxx"
+
+#include "vcl/arrange.hxx"
+#include "vcl/edit.hxx"
+
+#include "osl/diagnose.h"
+
+using namespace vcl;
+
+// ----------------------------------------
+// vcl::WindowArranger
+//-----------------------------------------
+
+WindowArranger::~WindowArranger()
+{}
+
+void WindowArranger::setParent( WindowArranger* i_pParent )
+{
+ OSL_VERIFY( i_pParent->m_pParentWindow == m_pParentWindow || m_pParentWindow == NULL );
+
+ m_pParentArranger = i_pParent;
+ m_pParentWindow = i_pParent->m_pParentWindow;
+ setParentWindow( m_pParentWindow );
+}
+
+void WindowArranger::setParentWindow( Window* i_pNewParent )
+{
+ m_pParentWindow = i_pNewParent;
+
+ size_t nEle = countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ Element* pEle = getElement( i );
+ if( pEle ) // sanity check
+ {
+ #if OSL_DEBUG_LEVEL > 0
+ if( pEle->m_pElement )
+ {
+ OSL_VERIFY( pEle->m_pElement->GetParent() == i_pNewParent );
+ }
+ #endif
+ if( pEle->m_pChild )
+ pEle->m_pChild->setParentWindow( i_pNewParent );
+ }
+ }
+}
+
+void WindowArranger::show( bool i_bShow, bool i_bImmediateUpdate )
+{
+ size_t nEle = countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ Element* pEle = getElement( i );
+ if( pEle ) // sanity check
+ {
+ pEle->m_bHidden = ! i_bShow;
+ if( pEle->m_pElement )
+ pEle->m_pElement->Show( i_bShow );
+ if( pEle->m_pChild.get() )
+ pEle->m_pChild->show( i_bShow, false );
+ }
+ }
+ if( m_pParentArranger )
+ {
+ nEle = m_pParentArranger->countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ Element* pEle = m_pParentArranger->getElement( i );
+ if( pEle && pEle->m_pChild.get() == this )
+ {
+ pEle->m_bHidden = ! i_bShow;
+ break;
+ }
+ }
+ }
+ if( i_bImmediateUpdate )
+ {
+ // find the topmost parent
+ WindowArranger* pResize = this;
+ while( pResize->m_pParentArranger )
+ pResize = pResize->m_pParentArranger;
+ pResize->resize();
+ }
+}
+
+bool WindowArranger::isVisible() const
+{
+ size_t nEle = countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ const Element* pEle = getConstElement( i );
+ if( pEle->isVisible() )
+ return true;
+ }
+ return false;
+}
+
+bool WindowArranger::Element::isVisible() const
+{
+ bool bVisible = false;
+ if( ! m_bHidden )
+ {
+ if( m_pElement )
+ bVisible = m_pElement->IsVisible();
+ else if( m_pChild )
+ bVisible = m_pChild->isVisible();
+ }
+ return bVisible;
+}
+
+sal_Int32 WindowArranger::Element::getExpandPriority() const
+{
+ sal_Int32 nPrio = m_nExpandPriority;
+ if( m_pChild && m_nExpandPriority >= 0 )
+ {
+ size_t nElements = m_pChild->countElements();
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ sal_Int32 nCPrio = m_pChild->getExpandPriority( i );
+ if( nCPrio > nPrio )
+ nPrio = nCPrio;
+ }
+ }
+ return nPrio;
+}
+
+Size WindowArranger::Element::getOptimalSize( WindowSizeType i_eType ) const
+{
+ Size aResult;
+ if( ! m_bHidden )
+ {
+ if( m_pElement && m_pElement->IsVisible() )
+ aResult = m_pElement->GetOptimalSize( i_eType );
+ else if( m_pChild )
+ aResult = m_pChild->getOptimalSize( i_eType );
+ if( aResult.Width() < m_aMinSize.Width() )
+ aResult.Width() = m_aMinSize.Width();
+ if( aResult.Height() < m_aMinSize.Height() )
+ aResult.Height() = m_aMinSize.Height();
+ aResult.Width() += m_nLeftBorder + m_nRightBorder;
+ aResult.Height() += m_nTopBorder + m_nBottomBorder;
+ }
+
+ return aResult;
+}
+
+void WindowArranger::Element::setPosSize( const Point& i_rPos, const Size& i_rSize )
+{
+ Point aPoint( i_rPos );
+ Size aSize( i_rSize );
+ aPoint.X() += m_nLeftBorder;
+ aPoint.Y() += m_nTopBorder;
+ aSize.Width() -= m_nLeftBorder + m_nRightBorder;
+ aSize.Height() -= m_nTopBorder + m_nBottomBorder;
+ if( m_pElement )
+ m_pElement->SetPosSizePixel( aPoint, aSize );
+ else if( m_pChild )
+ m_pChild->setManagedArea( Rectangle( aPoint, aSize ) );
+}
+
+// ----------------------------------------
+// vcl::RowOrColumn
+//-----------------------------------------
+
+RowOrColumn::~RowOrColumn()
+{
+ for( std::vector< WindowArranger::Element >::iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ it->deleteChild();
+ }
+}
+
+Size RowOrColumn::getOptimalSize( WindowSizeType i_eType ) const
+{
+ Size aRet( 0, 0 );
+ for( std::vector< WindowArranger::Element >::const_iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ if( it->isVisible() )
+ {
+ // get the size of type of the managed element
+ Size aElementSize( it->getOptimalSize( i_eType ) );
+ if( m_bColumn )
+ {
+ // add the distance between elements
+ aRet.Height() += m_nBorderWidth;
+ // check if the width needs adjustment
+ if( aRet.Width() < aElementSize.Width() )
+ aRet.Width() = aElementSize.Width();
+ aRet.Height() += aElementSize.Height();
+ }
+ else
+ {
+ // add the distance between elements
+ aRet.Width() += m_nBorderWidth;
+ // check if the height needs adjustment
+ if( aRet.Height() < aElementSize.Height() )
+ aRet.Height() = aElementSize.Height();
+ aRet.Width() += aElementSize.Width();
+ }
+ }
+ }
+
+ if( aRet.Width() != 0 || aRet.Height() != 0 )
+ {
+ // subtract the border for the first element
+ if( m_bColumn )
+ aRet.Height() -= m_nBorderWidth;
+ else
+ aRet.Width() -= m_nBorderWidth;
+
+ // add the outer border
+ aRet.Width() += 2*m_nOuterBorder;
+ aRet.Height() += 2*m_nOuterBorder;
+ }
+
+ return aRet;
+}
+
+void RowOrColumn::distributeRowWidth( std::vector<Size>& io_rSizes, long /*i_nUsedWidth*/, long i_nExtraWidth )
+{
+ if( ! io_rSizes.empty() && io_rSizes.size() == m_aElements.size() )
+ {
+ // find all elements with the highest expand priority
+ size_t nElements = m_aElements.size();
+ std::vector< size_t > aIndices;
+ sal_Int32 nHighPrio = 0;
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ if( m_aElements[ i ].isVisible() )
+ {
+ sal_Int32 nCurPrio = m_aElements[ i ].getExpandPriority();
+ if( nCurPrio > nHighPrio )
+ {
+ aIndices.clear();
+ nHighPrio = nCurPrio;
+ }
+ if( nCurPrio == nHighPrio )
+ aIndices.push_back( i );
+ }
+ }
+
+ // distribute extra space evenly among collected elements
+ nElements = aIndices.size();
+ if( nElements > 0 )
+ {
+ long nDelta = i_nExtraWidth / nElements;
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ io_rSizes[ aIndices[i] ].Width() += nDelta;
+ i_nExtraWidth -= nDelta;
+ }
+ // add the last pixels to the last row element
+ if( i_nExtraWidth > 0 && nElements > 0 )
+ io_rSizes[aIndices.back()].Width() += i_nExtraWidth;
+ }
+ }
+}
+
+void RowOrColumn::distributeColumnHeight( std::vector<Size>& io_rSizes, long /*i_nUsedHeight*/, long i_nExtraHeight )
+{
+ if( ! io_rSizes.empty() && io_rSizes.size() == m_aElements.size() )
+ {
+ // find all elements with the highest expand priority
+ size_t nElements = m_aElements.size();
+ std::vector< size_t > aIndices;
+ sal_Int32 nHighPrio = 3;
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ if( m_aElements[ i ].isVisible() )
+ {
+ sal_Int32 nCurPrio = m_aElements[ i ].getExpandPriority();
+ if( nCurPrio > nHighPrio )
+ {
+ aIndices.clear();
+ nHighPrio = nCurPrio;
+ }
+ if( nCurPrio == nHighPrio )
+ aIndices.push_back( i );
+ }
+ }
+
+ // distribute extra space evenly among collected elements
+ nElements = aIndices.size();
+ if( nElements > 0 )
+ {
+ long nDelta = i_nExtraHeight / nElements;
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ io_rSizes[ aIndices[i] ].Height() += nDelta;
+ i_nExtraHeight -= nDelta;
+ }
+ // add the last pixels to the last row element
+ if( i_nExtraHeight > 0 && nElements > 0 )
+ io_rSizes[aIndices.back()].Height() += i_nExtraHeight;
+ }
+ }
+}
+
+void RowOrColumn::resize()
+{
+ // check if we can get optimal size, else fallback to minimal size
+ Size aOptSize( getOptimalSize( WINDOWSIZE_PREFERRED ) );
+ WindowSizeType eType = WINDOWSIZE_PREFERRED;
+ if( m_bColumn )
+ {
+ if( aOptSize.Height() > m_aManagedArea.GetHeight() )
+ eType = WINDOWSIZE_MINIMUM;
+ }
+ else
+ {
+ if( aOptSize.Width() > m_aManagedArea.GetWidth() )
+ eType = WINDOWSIZE_MINIMUM;
+ }
+
+ size_t nElements = m_aElements.size();
+ // get all element sizes for sizing
+ std::vector<Size> aElementSizes( nElements );
+ long nUsedWidth = 2*m_nOuterBorder - (nElements ? m_nBorderWidth : 0);
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ if( m_aElements[i].isVisible() )
+ {
+ aElementSizes[i] = m_aElements[i].getOptimalSize( eType );
+ if( m_bColumn )
+ {
+ aElementSizes[i].Width() = m_aManagedArea.GetWidth() - 2* m_nOuterBorder;
+ nUsedWidth += aElementSizes[i].Height() + m_nBorderWidth;
+ }
+ else
+ {
+ aElementSizes[i].Height() = m_aManagedArea.GetHeight() - 2* m_nOuterBorder;
+ nUsedWidth += aElementSizes[i].Width() + m_nBorderWidth;
+ }
+ }
+ }
+
+ long nExtraWidth = (m_bColumn ? m_aManagedArea.GetHeight() : m_aManagedArea.GetWidth()) - nUsedWidth;
+ if( nExtraWidth > 0 )
+ {
+ if( m_bColumn )
+ distributeColumnHeight( aElementSizes, nUsedWidth, nExtraWidth );
+ else
+ distributeRowWidth( aElementSizes, nUsedWidth, nExtraWidth );
+ }
+
+ // get starting position
+ Point aElementPos( m_aManagedArea.TopLeft() );
+ // outer border
+ aElementPos.X() += m_nOuterBorder;
+ aElementPos.Y() += m_nOuterBorder;
+
+ // position managed windows
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ // get the size of type of the managed element
+ if( m_aElements[i].isVisible() )
+ {
+ m_aElements[i].setPosSize( aElementPos, aElementSizes[i] );
+ if( m_bColumn )
+ aElementPos.Y() += m_nBorderWidth + aElementSizes[i].Height();
+ else
+ aElementPos.X() += m_nBorderWidth + aElementSizes[i].Width();
+ }
+ }
+}
+
+size_t RowOrColumn::addWindow( Window* i_pWindow, sal_Int32 i_nExpandPrio, size_t i_nIndex )
+{
+ size_t nIndex = i_nIndex;
+ if( i_nIndex >= m_aElements.size() )
+ {
+ nIndex = m_aElements.size();
+ m_aElements.push_back( WindowArranger::Element( i_pWindow, boost::shared_ptr<WindowArranger>(), i_nExpandPrio ) );
+ }
+ else
+ {
+ std::vector< WindowArranger::Element >::iterator it = m_aElements.begin();
+ while( i_nIndex-- )
+ ++it;
+ m_aElements.insert( it, WindowArranger::Element( i_pWindow, boost::shared_ptr<WindowArranger>(), i_nExpandPrio ) );
+ }
+ return nIndex;
+}
+
+size_t RowOrColumn::addChild( boost::shared_ptr<WindowArranger> const & i_pChild, sal_Int32 i_nExpandPrio, size_t i_nIndex )
+{
+ size_t nIndex = i_nIndex;
+ if( i_nIndex >= m_aElements.size() )
+ {
+ nIndex = m_aElements.size();
+ m_aElements.push_back( WindowArranger::Element( NULL, i_pChild, i_nExpandPrio ) );
+ }
+ else
+ {
+ std::vector< WindowArranger::Element >::iterator it = m_aElements.begin();
+ while( i_nIndex-- )
+ ++it;
+ m_aElements.insert( it, WindowArranger::Element( NULL, i_pChild, i_nExpandPrio ) );
+ }
+ return nIndex;
+}
+
+void RowOrColumn::remove( Window* i_pWindow )
+{
+ if( i_pWindow )
+ {
+ for( std::vector< WindowArranger::Element >::iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ if( it->m_pElement == i_pWindow )
+ {
+ m_aElements.erase( it );
+ return;
+ }
+ }
+ }
+}
+
+void RowOrColumn::remove( boost::shared_ptr<WindowArranger> const & i_pChild )
+{
+ if( i_pChild )
+ {
+ for( std::vector< WindowArranger::Element >::iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ if( it->m_pChild == i_pChild )
+ {
+ m_aElements.erase( it );
+ return;
+ }
+ }
+ }
+}
+
+// ----------------------------------------
+// vcl::LabeledElement
+//-----------------------------------------
+
+LabeledElement::~LabeledElement()
+{
+ m_aLabel.deleteChild();
+ m_aElement.deleteChild();
+}
+
+Size LabeledElement::getOptimalSize( WindowSizeType i_eType ) const
+{
+ Size aRet( m_aLabel.getOptimalSize( WINDOWSIZE_MINIMUM ) );
+ if( aRet.Width() != 0 )
+ {
+ if( m_nLabelColumnWidth != 0 )
+ aRet.Width() = m_nLabelColumnWidth;
+ else
+ aRet.Width() += m_nDistance;
+ }
+ Size aElementSize( m_aElement.getOptimalSize( i_eType ) );
+ aRet.Width() += aElementSize.Width();
+ if( aElementSize.Height() > aRet.Height() )
+ aRet.Height() = aElementSize.Height();
+ if( aRet.Height() != 0 )
+ aRet.Height() += 2*m_nOuterBorder;
+
+ return aRet;
+}
+
+void LabeledElement::resize()
+{
+ Size aLabelSize( m_aLabel.getOptimalSize( WINDOWSIZE_MINIMUM ) );
+ Size aElementSize( m_aElement.getOptimalSize( WINDOWSIZE_PREFERRED ) );
+ if( m_nDistance + aLabelSize.Width() + aElementSize.Width() > m_aManagedArea.GetWidth() )
+ aElementSize = m_aElement.getOptimalSize( WINDOWSIZE_MINIMUM );
+
+ // align label and element vertically in LabeledElement
+ long nYOff = (m_aManagedArea.GetHeight() - 2*m_nOuterBorder - aLabelSize.Height()) / 2;
+ Point aPos( m_aManagedArea.Left(),
+ m_aManagedArea.Top() + m_nOuterBorder + nYOff );
+ Size aSize( aLabelSize );
+ if( m_nLabelColumnWidth != 0 )
+ aSize.Width() = m_nLabelColumnWidth;
+ m_aLabel.setPosSize( aPos, aSize );
+
+ aPos.X() += aSize.Width() + m_nDistance;
+ nYOff = (m_aManagedArea.GetHeight() - 2*m_nOuterBorder - aElementSize.Height()) / 2;
+ aPos.Y() = m_aManagedArea.Top() + m_nOuterBorder + nYOff;
+ aSize.Width() = aElementSize.Width();
+ aSize.Height() = m_aManagedArea.GetHeight() - 2*m_nOuterBorder;
+
+ // label style
+ // 0: position left and right
+ // 1: keep the element close to label and grow it
+ // 2: keep the element close and don't grow it
+ if( m_nLabelStyle == 0)
+ {
+ if( aPos.X() + aSize.Width() < m_aManagedArea.Right() )
+ aPos.X() = m_aManagedArea.Right() - aSize.Width();
+ }
+ else if( m_nLabelStyle == 1 )
+ {
+ if( aPos.X() + aSize.Width() < m_aManagedArea.Right() )
+ aSize.Width() = m_aManagedArea.Right() - aPos.X();
+ }
+ m_aElement.setPosSize( aPos, aSize );
+}
+
+void LabeledElement::setLabel( Window* i_pLabel )
+{
+ m_aLabel.m_pElement = i_pLabel;
+ m_aLabel.m_pChild.reset();
+}
+
+void LabeledElement::setLabel( boost::shared_ptr<WindowArranger> const & i_pLabel )
+{
+ m_aLabel.m_pElement = NULL;
+ m_aLabel.m_pChild = i_pLabel;
+}
+
+void LabeledElement::setElement( Window* i_pElement )
+{
+ m_aElement.m_pElement = i_pElement;
+ m_aElement.m_pChild.reset();
+}
+
+void LabeledElement::setElement( boost::shared_ptr<WindowArranger> const & i_pElement )
+{
+ m_aElement.m_pElement = NULL;
+ m_aElement.m_pChild = i_pElement;
+}
+
+// ----------------------------------------
+// vcl::LabelColumn
+//-----------------------------------------
+LabelColumn::~LabelColumn()
+{
+}
+
+long LabelColumn::getLabelWidth() const
+{
+ long nWidth = 0;
+
+ size_t nEle = countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ const Element* pEle = getConstElement( i );
+ if( pEle && pEle->m_pChild.get() )
+ {
+ const LabeledElement* pLabel = dynamic_cast< const LabeledElement* >(pEle->m_pChild.get());
+ if( pLabel )
+ {
+ Window* pLW = pLabel->getWindow( 0 );
+ if( pLW )
+ {
+ Size aLabSize( pLW->GetOptimalSize( WINDOWSIZE_MINIMUM ) );
+ if( aLabSize.Width() > nWidth )
+ nWidth = aLabSize.Width();
+ }
+ }
+ }
+ }
+ return nWidth + getBorderWidth();
+}
+
+Size LabelColumn::getOptimalSize( WindowSizeType i_eType ) const
+{
+ long nWidth = getLabelWidth();
+ Size aColumnSize;
+
+ // every child is a LabeledElement
+ size_t nEle = countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ Size aElementSize;
+ const Element* pEle = getConstElement( i );
+ if( pEle && pEle->m_pChild.get() )
+ {
+ const LabeledElement* pLabel = dynamic_cast< const LabeledElement* >(pEle->m_pChild.get());
+ if( pLabel ) // we have a label
+ {
+ aElementSize = pLabel->getLabelSize( WINDOWSIZE_MINIMUM );
+ if( aElementSize.Width() )
+ aElementSize.Width() = nWidth;
+ Size aSize( pLabel->getElementSize( i_eType ) );
+ aElementSize.Width() += aSize.Width();
+ if( aSize.Height() > aElementSize.Height() )
+ aElementSize.Height() = aSize.Height();
+ }
+ else // a non label, just treat it as a row
+ {
+ aElementSize = pEle->getOptimalSize( i_eType );
+ }
+ }
+ else if( pEle && pEle->m_pElement ) // a general window, treat is as a row
+ {
+ aElementSize = pEle->getOptimalSize( i_eType );
+ }
+ if( aElementSize.Width() )
+ {
+ aElementSize.Width() += 2*m_nOuterBorder;
+ if( aElementSize.Width() > aColumnSize.Width() )
+ aColumnSize.Width() = aElementSize.Width();
+ }
+ if( aElementSize.Height() )
+ {
+ aColumnSize.Height() += getBorderWidth() + aElementSize.Height();
+ }
+ }
+ if( nEle > 0 && aColumnSize.Height() )
+ {
+ aColumnSize.Height() -= getBorderWidth(); // for the first element
+ aColumnSize.Height() += 2*m_nOuterBorder;
+ }
+ return aColumnSize;
+}
+
+void LabelColumn::resize()
+{
+ long nWidth = getLabelWidth();
+ size_t nEle = countElements();
+ for( size_t i = 0; i < nEle; i++ )
+ {
+ Element* pEle = getElement( i );
+ if( pEle && pEle->m_pChild.get() )
+ {
+ LabeledElement* pLabel = dynamic_cast< LabeledElement* >(pEle->m_pChild.get());
+ if( pLabel )
+ pLabel->setLabelColumnWidth( nWidth );
+ }
+ }
+ RowOrColumn::resize();
+}
+
+size_t LabelColumn::addRow( Window* i_pLabel, boost::shared_ptr<WindowArranger> const& i_rElement, long i_nIndent )
+{
+ boost::shared_ptr< LabeledElement > xLabel( new LabeledElement( this, 1 ) );
+ xLabel->setLabel( i_pLabel );
+ xLabel->setBorders( 0, i_nIndent, 0, 0, 0 );
+ xLabel->setElement( i_rElement );
+ size_t nIndex = addChild( xLabel );
+ resize();
+ return nIndex;
+}
+
+size_t LabelColumn::addRow( Window* i_pLabel, Window* i_pElement, long i_nIndent )
+{
+ boost::shared_ptr< LabeledElement > xLabel( new LabeledElement( this, 1 ) );
+ xLabel->setLabel( i_pLabel );
+ xLabel->setBorders( 0, i_nIndent, 0, 0, 0 );
+ xLabel->setElement( i_pElement );
+ size_t nIndex = addChild( xLabel );
+ resize();
+ return nIndex;
+}
+
+// ----------------------------------------
+// vcl::Indenter
+//-----------------------------------------
+
+Indenter::~Indenter()
+{
+ m_aElement.deleteChild();
+}
+
+Size Indenter::getOptimalSize( WindowSizeType i_eType ) const
+{
+ Size aSize( m_aElement.getOptimalSize( i_eType ) );
+ aSize.Width() += 2*m_nOuterBorder + m_nIndent;
+ aSize.Height() += 2*m_nOuterBorder;
+ return aSize;
+}
+
+void Indenter::resize()
+{
+ Point aPt( m_aManagedArea.TopLeft() );
+ aPt.X() += m_nOuterBorder + m_nIndent;
+ aPt.Y() += m_nOuterBorder;
+ Size aSz( m_aManagedArea.GetSize() );
+ aSz.Width() -= 2*m_nOuterBorder + m_nIndent;
+ aSz.Height() -= 2*m_nOuterBorder;
+ m_aElement.setPosSize( aPt, aSz );
+}
+
+void Indenter::setWindow( Window* i_pWindow, sal_Int32 i_nExpandPrio )
+{
+ OSL_VERIFY( (m_aElement.m_pElement == 0 && m_aElement.m_pChild == 0) || i_pWindow == 0 );
+ OSL_VERIFY( i_pWindow == 0 || i_pWindow->GetParent() == m_pParentWindow );
+ m_aElement.m_pElement = i_pWindow;
+ m_aElement.m_nExpandPriority = i_nExpandPrio;
+}
+
+void Indenter::setChild( boost::shared_ptr<WindowArranger> const & i_pChild, sal_Int32 i_nExpandPrio )
+{
+ OSL_VERIFY( (m_aElement.m_pElement == 0 && m_aElement.m_pChild == 0 ) || i_pChild == 0 );
+ m_aElement.m_pChild = i_pChild;
+ m_aElement.m_nExpandPriority = i_nExpandPrio;
+}
+
+// ----------------------------------------
+// vcl::MatrixArranger
+//-----------------------------------------
+MatrixArranger::~MatrixArranger()
+{
+}
+
+Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights ) const
+{
+ Size aMatrixSize( 2*m_nOuterBorder, 2*m_nOuterBorder );
+
+ // first find out the current number of rows and columns
+ sal_uInt32 nRows = 0, nColumns = 0;
+ for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ if( it->m_nX >= nColumns )
+ nColumns = it->m_nX+1;
+ if( it->m_nY >= nRows )
+ nRows = it->m_nY+1;
+ }
+
+ // now allocate row and column depth vectors
+ o_rColumnWidths = std::vector< long >( nColumns, 0 );
+ o_rRowHeights = std::vector< long >( nRows, 0 );
+
+ // get sizes an allocate them into rows/columns
+ for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ Size aSize( it->getOptimalSize( i_eType ) );
+ if( aSize.Width() > o_rColumnWidths[ it->m_nX ] )
+ o_rColumnWidths[ it->m_nX ] = aSize.Width();
+ if( aSize.Height() > o_rRowHeights[ it->m_nY ] )
+ o_rRowHeights[ it->m_nY ] = aSize.Height();
+ }
+
+ // add up sizes
+ for( sal_uInt32 i = 0; i < nColumns; i++ )
+ aMatrixSize.Width() += o_rColumnWidths[i] + m_nBorderX;
+ if( nColumns > 0 )
+ aMatrixSize.Width() -= m_nBorderX;
+
+ for( sal_uInt32 i = 0; i < nRows; i++ )
+ aMatrixSize.Height() += o_rRowHeights[i] + m_nBorderY;
+ if( nRows > 0 )
+ aMatrixSize.Height() -= m_nBorderY;
+
+ return aMatrixSize;
+}
+
+Size MatrixArranger::getOptimalSize( WindowSizeType i_eType ) const
+{
+ std::vector<long> aColumnWidths, aRowHeights;
+ return getOptimalSize( i_eType, aColumnWidths, aRowHeights );
+}
+
+void MatrixArranger::resize()
+{
+ // assure that we have at least one row and column
+ if( m_aElements.empty() )
+ return;
+
+ // check if we can get optimal size, else fallback to minimal size
+ std::vector<long> aColumnWidths, aRowHeights;
+ Size aOptSize( getOptimalSize( WINDOWSIZE_PREFERRED, aColumnWidths, aRowHeights ) );
+ if( aOptSize.Height() > m_aManagedArea.GetHeight() ||
+ aOptSize.Width() > m_aManagedArea.GetWidth() )
+ {
+ std::vector<long> aMinColumnWidths, aMinRowHeights;
+ getOptimalSize( WINDOWSIZE_MINIMUM, aMinColumnWidths, aMinRowHeights );
+ if( aOptSize.Height() > m_aManagedArea.GetHeight() )
+ aRowHeights = aMinRowHeights;
+ if( aOptSize.Width() > m_aManagedArea.GetWidth() )
+ aColumnWidths = aMinColumnWidths;
+ }
+
+ // FIXME: distribute extra space available
+
+ // prepare offsets
+ std::vector<long> aColumnX( aColumnWidths.size() );
+ aColumnX[0] = m_aManagedArea.Left() + m_nOuterBorder;
+ for( size_t i = 1; i < aColumnX.size(); i++ )
+ aColumnX[i] = aColumnX[i-1] + aColumnWidths[i-1] + m_nBorderX;
+
+ std::vector<long> aRowY( aRowHeights.size() );
+ aRowY[0] = m_aManagedArea.Top() + m_nOuterBorder;
+ for( size_t i = 1; i < aRowY.size(); i++ )
+ aRowY[i] = aRowY[i-1] + aRowHeights[i-1] + m_nBorderY;
+
+ // now iterate over the elements and assign their positions
+ for( std::vector< MatrixElement >::iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ Point aCellPos( aColumnX[it->m_nX], aRowY[it->m_nY] );
+ Size aCellSize( aColumnWidths[it->m_nX], aRowHeights[it->m_nY] );
+ it->setPosSize( aCellPos, aCellSize );
+ }
+}
+
+size_t MatrixArranger::addWindow( Window* i_pWindow, sal_uInt32 i_nX, sal_uInt32 i_nY, sal_Int32 i_nExpandPrio )
+{
+ sal_uInt64 nMapValue = getMap( i_nX, i_nY );
+ std::map< sal_uInt64, size_t >::const_iterator it = m_aMatrixMap.find( nMapValue );
+ size_t nIndex = 0;
+ if( it == m_aMatrixMap.end() )
+ {
+ m_aMatrixMap[ nMapValue ] = nIndex = m_aElements.size();
+ m_aElements.push_back( MatrixElement( i_pWindow, i_nX, i_nY, boost::shared_ptr<WindowArranger>(), i_nExpandPrio ) );
+ }
+ else
+ {
+ MatrixElement& rEle( m_aElements[ it->second ] );
+ rEle.m_pElement = i_pWindow;
+ rEle.m_pChild.reset();
+ rEle.m_nExpandPriority = i_nExpandPrio;
+ rEle.m_nX = i_nX;
+ rEle.m_nY = i_nY;
+ nIndex = it->second;
+ }
+ return nIndex;
+}
+
+void MatrixArranger::remove( Window* i_pWindow )
+{
+ if( i_pWindow )
+ {
+ for( std::vector< MatrixElement >::iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ if( it->m_pElement == i_pWindow )
+ {
+ m_aMatrixMap.erase( getMap( it->m_nX, it->m_nY ) );
+ m_aElements.erase( it );
+ return;
+ }
+ }
+ }
+}
+
+size_t MatrixArranger::addChild( boost::shared_ptr<WindowArranger> const &i_pChild, sal_uInt32 i_nX, sal_uInt32 i_nY, sal_Int32 i_nExpandPrio )
+{
+ sal_uInt64 nMapValue = getMap( i_nX, i_nY );
+ std::map< sal_uInt64, size_t >::const_iterator it = m_aMatrixMap.find( nMapValue );
+ size_t nIndex = 0;
+ if( it == m_aMatrixMap.end() )
+ {
+ m_aMatrixMap[ nMapValue ] = nIndex = m_aElements.size();
+ m_aElements.push_back( MatrixElement( NULL, i_nX, i_nY, i_pChild, i_nExpandPrio ) );
+ }
+ else
+ {
+ MatrixElement& rEle( m_aElements[ it->second ] );
+ rEle.m_pElement = 0;
+ rEle.m_pChild = i_pChild;
+ rEle.m_nExpandPriority = i_nExpandPrio;
+ rEle.m_nX = i_nX;
+ rEle.m_nY = i_nY;
+ nIndex = it->second;
+ }
+ return nIndex;
+}
+
+void MatrixArranger::remove( boost::shared_ptr<WindowArranger> const &i_pChild )
+{
+ if( i_pChild )
+ {
+ for( std::vector< MatrixElement >::iterator it = m_aElements.begin();
+ it != m_aElements.end(); ++it )
+ {
+ if( it->m_pChild == i_pChild )
+ {
+ m_aMatrixMap.erase( getMap( it->m_nX, it->m_nY ) );
+ m_aElements.erase( it );
+ return;
+ }
+ }
+ }
+}
+
diff --git a/vcl/source/window/makefile.mk b/vcl/source/window/makefile.mk
index 169cf44b2b13..21b8efe4c586 100644
--- a/vcl/source/window/makefile.mk
+++ b/vcl/source/window/makefile.mk
@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.25 $
+# $Revision: 1.25.114.1 $
#
# This file is part of OpenOffice.org.
#
@@ -45,6 +45,7 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
SLOFILES= \
+ $(SLO)$/arrange.obj \
$(SLO)$/abstdlg.obj \
$(SLO)$/accel.obj \
$(SLO)$/accmgr.obj \
@@ -70,6 +71,7 @@ SLOFILES= \
$(SLO)$/mnemonicengine.obj \
$(SLO)$/msgbox.obj \
$(SLO)$/scrwnd.obj \
+ $(SLO)$/printdlg.obj \
$(SLO)$/seleng.obj \
$(SLO)$/split.obj \
$(SLO)$/splitwin.obj \
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
new file mode 100644
index 000000000000..649ca21a32b8
--- /dev/null
+++ b/vcl/source/window/printdlg.cxx
@@ -0,0 +1,2489 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: printdlg.cxx,v $
+ * $Revision: 1.1.2.7 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_vcl.hxx"
+
+#include "vcl/print.hxx"
+#include "vcl/prndlg.hxx"
+#include "vcl/dialog.hxx"
+#include "vcl/button.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/svids.hrc"
+#include "vcl/wall.hxx"
+#include "vcl/jobset.h"
+#include "vcl/status.hxx"
+#include "vcl/decoview.hxx"
+#include "vcl/arrange.hxx"
+#include "vcl/configsettings.hxx"
+#include "vcl/help.hxx"
+#include "vcl/decoview.hxx"
+#include "vcl/svapp.hxx"
+
+#include "unotools/localedatawrapper.hxx"
+
+#include "rtl/ustrbuf.hxx"
+
+#include "com/sun/star/awt/Size.hpp"
+
+using namespace vcl;
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+
+#define HELPID_PREFIX ".HelpId:vcl:PrintDialog"
+#define SMHID2( a, b ) SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX ":" a ":" b ) ), HID_PRINTDLG ) )
+#define SMHID1( a ) SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX ":" a ) ), HID_PRINTDLG ) )
+
+PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const ResId& i_rId )
+ : Window( i_pParent, i_rId )
+ , maOrigSize( 10, 10 )
+ , maPageVDev( *this )
+ , maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) )
+{
+ SetPaintTransparent( TRUE );
+ SetBackground();
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
+ maPageVDev.SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
+ else
+ maPageVDev.SetBackground( Color( COL_WHITE ) );
+}
+
+PrintDialog::PrintPreviewWindow::~PrintPreviewWindow()
+{
+}
+
+void PrintDialog::PrintPreviewWindow::DataChanged( const DataChangedEvent& i_rDCEvt )
+{
+ // react on settings changed
+ if( i_rDCEvt.GetType() == DATACHANGED_SETTINGS )
+ {
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() )
+ maPageVDev.SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
+ else
+ maPageVDev.SetBackground( Color( COL_WHITE ) );
+ }
+ Window::DataChanged( i_rDCEvt );
+}
+
+void PrintDialog::PrintPreviewWindow::Resize()
+{
+ Size aNewSize( GetSizePixel() );
+ // leave small space for decoration
+ aNewSize.Width() -= 2;
+ aNewSize.Height() -= 2;
+ Size aScaledSize;
+ double fScale = 1.0;
+
+ // #i106435# catch corner case of Size(0,0)
+ Size aOrigSize( maOrigSize );
+ if( aOrigSize.Width() < 1 )
+ aOrigSize.Width() = aNewSize.Width();
+ if( aOrigSize.Height() < 1 )
+ aOrigSize.Height() = aNewSize.Height();
+ if( aOrigSize.Width() > aOrigSize.Height() )
+ {
+ aScaledSize = Size( aNewSize.Width(), aNewSize.Width() * aOrigSize.Height() / aOrigSize.Width() );
+ if( aScaledSize.Height() > aNewSize.Height() )
+ fScale = double(aNewSize.Height())/double(aScaledSize.Height());
+ }
+ else
+ {
+ aScaledSize = Size( aNewSize.Height() * aOrigSize.Width() / aOrigSize.Height(), aNewSize.Height() );
+ if( aScaledSize.Width() > aNewSize.Width() )
+ fScale = double(aNewSize.Width())/double(aScaledSize.Width());
+ }
+ aScaledSize.Width() = long(aScaledSize.Width()*fScale);
+ aScaledSize.Height() = long(aScaledSize.Height()*fScale);
+ maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
+}
+
+void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
+{
+ Size aSize( GetSizePixel() );
+ if( maReplacementString.getLength() != 0 )
+ {
+ // replacement is active
+ Push();
+ Rectangle aTextRect( Point( 0, 0 ), aSize );
+ Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
+ aFont.SetSize( Size( 0, aSize.Height()/12 ) );
+ SetFont( aFont );
+ DrawText( aTextRect, maReplacementString,
+ TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER | TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE
+ );
+ Pop();
+ }
+ else
+ {
+ GDIMetaFile aMtf( maMtf );
+
+ Size aPreviewSize = maPageVDev.GetOutputSizePixel();
+ Point aOffset( (aSize.Width() - aPreviewSize.Width()) / 2,
+ (aSize.Height() - aPreviewSize.Height()) / 2 );
+
+ const Size aLogicSize( maPageVDev.PixelToLogic( aPreviewSize, MapMode( MAP_100TH_MM ) ) );
+ Size aOrigSize( maOrigSize );
+ if( aOrigSize.Width() < 1 )
+ aOrigSize.Width() = aLogicSize.Width();
+ if( aOrigSize.Height() < 1 )
+ aOrigSize.Height() = aLogicSize.Height();
+ double fScale = double(aLogicSize.Width())/double(aOrigSize.Width());
+
+
+ maPageVDev.Erase();
+ maPageVDev.Push();
+ maPageVDev.SetMapMode( MAP_100TH_MM );
+ aMtf.WindStart();
+ aMtf.Scale( fScale, fScale );
+ aMtf.WindStart();
+ aMtf.Play( &maPageVDev, Point( 0, 0 ), aLogicSize );
+ maPageVDev.Pop();
+
+ SetMapMode( MAP_PIXEL );
+ maPageVDev.SetMapMode( MAP_PIXEL );
+ DrawOutDev( aOffset, aPreviewSize, Point( 0, 0 ), aPreviewSize, maPageVDev );
+
+ DecorationView aVw( this );
+ aOffset.X() -= 1; aOffset.Y() -=1; aPreviewSize.Width() += 2; aPreviewSize.Height() += 2;
+ aVw.DrawFrame( Rectangle( aOffset, aPreviewSize ), FRAME_DRAW_GROUP );
+ }
+}
+
+void PrintDialog::PrintPreviewWindow::Command( const CommandEvent& rEvt )
+{
+ if( rEvt.GetCommand() == COMMAND_WHEEL )
+ {
+ const CommandWheelData* pWheelData = rEvt.GetWheelData();
+ PrintDialog* pDlg = dynamic_cast<PrintDialog*>(GetParent());
+ if( pDlg )
+ {
+ if( pWheelData->GetDelta() > 0 )
+ pDlg->previewForward();
+ else if( pWheelData->GetDelta() < 0 )
+ pDlg->previewBackward();
+ /*
+ else
+ huh ?
+ */
+ }
+ }
+}
+
+void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPreview,
+ const Size& i_rOrigSize,
+ const rtl::OUString& i_rReplacement,
+ sal_Int32 i_nDPIX,
+ sal_Int32 i_nDPIY
+ )
+{
+ rtl::OUStringBuffer aBuf( 256 );
+ aBuf.append( maToolTipString );
+ #if OSL_DEBUG_LEVEL > 0
+ aBuf.appendAscii( "\n---\nPageSize: " );
+ aBuf.append( sal_Int32( i_rOrigSize.Width()/100) );
+ aBuf.appendAscii( "mm x " );
+ aBuf.append( sal_Int32( i_rOrigSize.Height()/100) );
+ aBuf.appendAscii( "mm" );
+ #endif
+ SetQuickHelpText( aBuf.makeStringAndClear() );
+ maMtf = i_rNewPreview;
+ if( GetSettings().GetStyleSettings().GetHighContrastMode() &&
+ GetSettings().GetStyleSettings().GetWindowColor().IsDark()
+ )
+ {
+ maMtf.ReplaceColors( Color( COL_BLACK ), Color( COL_WHITE ), 30 );
+ }
+
+ maOrigSize = i_rOrigSize;
+ maReplacementString = i_rReplacement;
+ maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY );
+ maPageVDev.EnableOutput( TRUE );
+ Resize();
+ Invalidate();
+}
+
+PrintDialog::ShowNupOrderWindow::ShowNupOrderWindow( Window* i_pParent )
+ : Window( i_pParent, WB_NOBORDER )
+ , mnOrderMode( 0 )
+ , mnRows( 1 )
+ , mnColumns( 1 )
+{
+ ImplInitSettings();
+}
+
+PrintDialog::ShowNupOrderWindow::~ShowNupOrderWindow()
+{
+}
+
+void PrintDialog::ShowNupOrderWindow::ImplInitSettings()
+{
+ SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
+}
+
+void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect )
+{
+ Window::Paint( i_rRect );
+ SetMapMode( MAP_PIXEL );
+ SetTextColor( GetSettings().GetStyleSettings().GetFieldTextColor() );
+
+ int nPages = mnRows * mnColumns;
+ Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
+ aFont.SetSize( Size( 0, 24 ) );
+ SetFont( aFont );
+ Size aSampleTextSize( GetTextWidth( rtl::OUString::valueOf( sal_Int32(nPages+1) ) ), GetTextHeight() );
+
+ Size aOutSize( GetOutputSizePixel() );
+ Size aSubSize( aOutSize.Width() / mnColumns, aOutSize.Height() / mnRows );
+ // calculate font size: shrink the sample text so it fits
+ double fX = double(aSubSize.Width())/double(aSampleTextSize.Width());
+ double fY = double(aSubSize.Height())/double(aSampleTextSize.Height());
+ double fScale = (fX < fY) ? fX : fY;
+ long nFontHeight = long(24.0*fScale) - 3;
+ if( nFontHeight < 5 )
+ nFontHeight = 5;
+ aFont.SetSize( Size( 0, nFontHeight ) );
+ SetFont( aFont );
+ long nTextHeight = GetTextHeight();
+ for( int i = 0; i < nPages; i++ )
+ {
+ rtl::OUString aPageText( rtl::OUString::valueOf( sal_Int32(i+1) ) );
+ int nX = 0, nY = 0;
+ switch( mnOrderMode )
+ {
+ case SV_PRINT_PRT_NUP_ORDER_LRTD:
+ nX = (i % mnColumns); nY = (i / mnColumns);
+ break;
+ case SV_PRINT_PRT_NUP_ORDER_TDLR:
+ nX = (i / mnRows); nY = (i % mnRows);
+ break;
+ }
+ Size aTextSize( GetTextWidth( aPageText ), nTextHeight );
+ int nDeltaX = (aSubSize.Width() - aTextSize.Width()) / 2;
+ int nDeltaY = (aSubSize.Height() - aTextSize.Height()) / 2;
+ DrawText( Point( nX * aSubSize.Width() + nDeltaX,
+ nY * aSubSize.Height() + nDeltaY ),
+ aPageText );
+ }
+ DecorationView aVw( this );
+ aVw.DrawFrame( Rectangle( Point( 0, 0), aOutSize ), FRAME_DRAW_GROUP );
+}
+
+PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
+ : TabPage( i_pParent, rResId )
+ , maNupLine( this, VclResId( SV_PRINT_PRT_NUP_LAYOUT_FL ) )
+ , maPagesBtn( this, VclResId( SV_PRINT_PRT_NUP_PAGES_BTN ) )
+ , maBrochureBtn( this, VclResId( SV_PRINT_PRT_NUP_BROCHURE_BTN ) )
+ , maPagesBoxTitleTxt( this, 0 )
+ , maNupPagesBox( this, VclResId( SV_PRINT_PRT_NUP_PAGES_BOX ) )
+ , maNupNumPagesTxt( this, VclResId( SV_PRINT_PRT_NUP_NUM_PAGES_TXT ) )
+ , maNupColEdt( this, VclResId( SV_PRINT_PRT_NUP_COLS_EDT ) )
+ , maNupTimesTxt( this, VclResId( SV_PRINT_PRT_NUP_TIMES_TXT ) )
+ , maNupRowsEdt( this, VclResId( SV_PRINT_PRT_NUP_ROWS_EDT ) )
+ , maPageMarginTxt1( this, VclResId( SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT ) )
+ , maPageMarginEdt( this, VclResId( SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT ) )
+ , maPageMarginTxt2( this, VclResId( SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT ) )
+ , maSheetMarginTxt1( this, VclResId( SV_PRINT_PRT_NUP_MARGINS_SHEET_1_TXT ) )
+ , maSheetMarginEdt( this, VclResId( SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT ) )
+ , maSheetMarginTxt2( this, VclResId( SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT ) )
+ , maNupOrientationTxt( this, VclResId( SV_PRINT_PRT_NUP_ORIENTATION_TXT ) )
+ , maNupOrientationBox( this, VclResId( SV_PRINT_PRT_NUP_ORIENTATION_BOX ) )
+ , maNupOrderTxt( this, VclResId( SV_PRINT_PRT_NUP_ORDER_TXT ) )
+ , maNupOrderBox( this, VclResId( SV_PRINT_PRT_NUP_ORDER_BOX ) )
+ , maNupOrderWin( this )
+ , maBorderCB( this, VclResId( SV_PRINT_PRT_NUP_BORDER_CB ) )
+{
+ FreeResource();
+
+ maNupOrderWin.Show();
+ maPagesBtn.Check( TRUE );
+ maBrochureBtn.Show( FALSE );
+
+ // setup field units for metric fields
+ const LocaleDataWrapper& rLocWrap( maPageMarginEdt.GetLocaleDataWrapper() );
+ FieldUnit eUnit = FUNIT_MM;
+ USHORT nDigits = 0;
+ if( rLocWrap.getMeasurementSystemEnum() == MEASURE_US )
+ {
+ eUnit = FUNIT_INCH;
+ nDigits = 2;
+ }
+ // set units
+ maPageMarginEdt.SetUnit( eUnit );
+ maSheetMarginEdt.SetUnit( eUnit );
+
+ // set precision
+ maPageMarginEdt.SetDecimalDigits( nDigits );
+ maSheetMarginEdt.SetDecimalDigits( nDigits );
+
+ SMHID1( "NUpPage" );
+ maNupLine.SMHID2("NUpPage", "Layout");
+ maBrochureBtn.SMHID2("NUpPage", "Brochure" );
+ maPagesBtn.SMHID2( "NUpPage", "PagesPerSheet" );
+ maPagesBoxTitleTxt.SMHID2( "NUpPage", "PagesPerSheetLabel" );
+ maNupPagesBox.SMHID2( "NUpPage", "PagesPerSheetBox" );
+ maNupNumPagesTxt.SMHID2( "NUpPage", "Columns" );
+ maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" );
+ maNupTimesTxt.SMHID2( "NUpPage", "Rows" );
+ maNupRowsEdt.SMHID2( "NUpPage", "RowsBox" );
+ maPageMarginTxt1.SMHID2( "NUpPage", "PageMargin" );
+ maPageMarginEdt.SMHID2( "NUpPage", "PageMarginBox" );
+ maPageMarginTxt2.SMHID2( "NUpPage", "PageMarginCont" );
+ maSheetMarginTxt1.SMHID2( "NUpPage", "SheetMargin" );
+ maSheetMarginEdt.SMHID2( "NUpPage", "SheetMarginBox" );
+ maSheetMarginTxt2.SMHID2( "NUpPage", "SheetMarginCont" );
+ maNupOrientationTxt.SMHID2( "NUpPage", "Orientation" );
+ maNupOrientationBox.SMHID2( "NUpPage", "OrientationBox" );
+ maNupOrderTxt.SMHID2( "NUpPage", "Order" );
+ maNupOrderBox.SMHID2( "NUpPage", "OrderBox" );
+ maBorderCB.SMHID2( "NUpPage", "BorderBox" );
+
+ setupLayout();
+}
+
+PrintDialog::NUpTabPage::~NUpTabPage()
+{
+}
+
+void PrintDialog::NUpTabPage::enableNupControls( bool bEnable )
+{
+ maNupPagesBox.Enable( TRUE );
+ maNupNumPagesTxt.Enable( bEnable );
+ maNupColEdt.Enable( bEnable );
+ maNupTimesTxt.Enable( bEnable );
+ maNupRowsEdt.Enable( bEnable );
+ maPageMarginTxt1.Enable( bEnable );
+ maPageMarginEdt.Enable( bEnable );
+ maPageMarginTxt2.Enable( bEnable );
+ maSheetMarginTxt1.Enable( bEnable );
+ maSheetMarginEdt.Enable( bEnable );
+ maSheetMarginTxt2.Enable( bEnable );
+ maNupOrientationTxt.Enable( bEnable );
+ maNupOrientationBox.Enable( bEnable );
+ maNupOrderTxt.Enable( bEnable );
+ maNupOrderBox.Enable( bEnable );
+ maNupOrderWin.Enable( bEnable );
+ maBorderCB.Enable( bEnable );
+}
+
+void PrintDialog::NUpTabPage::showAdvancedControls( bool i_bShow )
+{
+ maNupNumPagesTxt.Show( i_bShow );
+ maNupColEdt.Show( i_bShow );
+ maNupTimesTxt.Show( i_bShow );
+ maNupRowsEdt.Show( i_bShow );
+ maPageMarginTxt1.Show( i_bShow );
+ maPageMarginEdt.Show( i_bShow );
+ maPageMarginTxt2.Show( i_bShow );
+ maSheetMarginTxt1.Show( i_bShow );
+ maSheetMarginEdt.Show( i_bShow );
+ maSheetMarginTxt2.Show( i_bShow );
+ maNupOrientationTxt.Show( i_bShow );
+ maNupOrientationBox.Show( i_bShow );
+ maLayout.resize();
+}
+
+void PrintDialog::NUpTabPage::setupLayout()
+{
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+ long nIndent = 3*aBorder.Width();
+
+ maLayout.setParentWindow( this );
+ maLayout.setOuterBorder( aBorder.Width() );
+
+ maLayout.addWindow( &maNupLine );
+ boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &maLayout, false ) );
+ maLayout.addChild( xRow );
+ boost::shared_ptr< vcl::Indenter > xIndent( new vcl::Indenter( xRow.get() ) );
+ xRow->addChild( xIndent );
+
+ boost::shared_ptr< vcl::RowOrColumn > xShowNupCol( new vcl::RowOrColumn( xRow.get() ) );
+ xRow->addChild( xShowNupCol, -1 );
+ xShowNupCol->setMinimumSize( xShowNupCol->addWindow( &maNupOrderWin ), Size( 70, 70 ) );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xShowNupCol.get() ) );
+ xShowNupCol->addChild( xSpacer );
+
+ boost::shared_ptr< vcl::LabelColumn > xMainCol( new vcl::LabelColumn( xIndent.get() ) );
+ xIndent->setChild( xMainCol );
+
+ size_t nPagesIndex = xMainCol->addRow( &maPagesBtn, &maNupPagesBox );
+ mxPagesBtnLabel = boost::dynamic_pointer_cast<vcl::LabeledElement>( xMainCol->getChild( nPagesIndex ) );
+
+ xRow.reset( new vcl::RowOrColumn( xMainCol.get(), false ) );
+ xMainCol->addRow( &maNupNumPagesTxt, xRow, nIndent );
+ xRow->addWindow( &maNupColEdt );
+ xRow->addWindow( &maNupTimesTxt );
+ xRow->addWindow( &maNupRowsEdt );
+
+ boost::shared_ptr< vcl::LabeledElement > xLab( new vcl::LabeledElement( xMainCol.get(), 2 ) );
+ xLab->setLabel( &maPageMarginEdt );
+ xLab->setElement( &maPageMarginTxt2 );
+ xMainCol->addRow( &maPageMarginTxt1, xLab, nIndent );
+
+ xLab.reset( new vcl::LabeledElement( xMainCol.get(), 2 ) );
+ xLab->setLabel( &maSheetMarginEdt );
+ xLab->setElement( &maSheetMarginTxt2 );
+ xMainCol->addRow( &maSheetMarginTxt1, xLab, nIndent );
+
+ xMainCol->addRow( &maNupOrientationTxt, &maNupOrientationBox, nIndent );
+ xMainCol->addRow( &maNupOrderTxt, &maNupOrderBox, nIndent );
+ xMainCol->setBorders( xMainCol->addWindow( &maBorderCB ), nIndent, 0, 0, 0 );
+
+ xSpacer.reset( new vcl::Spacer( xMainCol.get(), 0, Size( 10, aBorder.Width() ) ) );
+ xMainCol->addChild( xSpacer );
+
+ xRow.reset( new vcl::RowOrColumn( xMainCol.get(), false ) );
+ xMainCol->addRow( &maBrochureBtn, xRow );
+ // remember brochure row for dependencies
+ mxBrochureDep = xRow;
+
+ // initially advanced controls are not shown, rows=columns=1
+ showAdvancedControls( false );
+}
+
+void PrintDialog::NUpTabPage::Resize()
+{
+ maLayout.setManagedArea( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) );
+}
+
+void PrintDialog::NUpTabPage::initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& i_rMPS )
+{
+ maSheetMarginEdt.SetValue( maSheetMarginEdt.Normalize( i_rMPS.nLeftMargin ), FUNIT_100TH_MM );
+ maPageMarginEdt.SetValue( maPageMarginEdt.Normalize( i_rMPS.nHorizontalSpacing ), FUNIT_100TH_MM );
+ maBorderCB.Check( i_rMPS.bDrawBorder );
+ maNupRowsEdt.SetValue( i_rMPS.nRows );
+ maNupColEdt.SetValue( i_rMPS.nColumns );
+}
+
+void PrintDialog::NUpTabPage::readFromSettings()
+{
+}
+
+void PrintDialog::NUpTabPage::storeToSettings()
+{
+}
+
+PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId )
+ : TabPage( i_pParent, rResId )
+ , maPrinterFL( this, VclResId( SV_PRINT_PRINTERS_FL ) )
+ , maPrinters( this, VclResId( SV_PRINT_PRINTERS ) )
+ , maDetailsBtn( this, VclResId( SV_PRINT_DETAILS_BTN ) )
+ , maStatusLabel( this, VclResId( SV_PRINT_STATUS_TXT ) )
+ , maStatusTxt( this, 0 )
+ , maLocationLabel( this, VclResId( SV_PRINT_LOCATION_TXT ) )
+ , maLocationTxt( this, 0 )
+ , maCommentLabel( this, VclResId( SV_PRINT_COMMENT_TXT ) )
+ , maCommentTxt( this, 0 )
+ , maSetupButton( this, VclResId( SV_PRINT_PRT_SETUP ) )
+ , maCopies( this, VclResId( SV_PRINT_COPIES ) )
+ , maCopySpacer( this, WB_VERT )
+ , maCopyCount( this, VclResId( SV_PRINT_COPYCOUNT ) )
+ , maCopyCountField( this, VclResId( SV_PRINT_COPYCOUNT_FIELD ) )
+ , maCollateBox( this, VclResId( SV_PRINT_COLLATE ) )
+ , maCollateImage( this, VclResId( SV_PRINT_COLLATE_IMAGE ) )
+ , maCollateImg( VclResId( SV_PRINT_COLLATE_IMG ) )
+ , maCollateHCImg( VclResId( SV_PRINT_COLLATE_HC_IMG ) )
+ , maNoCollateImg( VclResId( SV_PRINT_NOCOLLATE_IMG ) )
+ , maNoCollateHCImg( VclResId( SV_PRINT_NOCOLLATE_HC_IMG ) )
+ , mnCollateUIMode( 0 )
+ , maLayout( NULL, true )
+{
+ FreeResource();
+
+ SMHID1( "JobPage" );
+ maPrinterFL.SMHID2( "JobPage", "Printer" );
+ maPrinters.SMHID2( "JobPage", "PrinterList" );
+ maDetailsBtn.SMHID2( "JobPage", "DetailsBtn" );
+ maStatusLabel.SMHID2( "JobPage", "StatusLabel" );
+ maStatusTxt.SMHID2( "JobPage", "StatusText" );
+ maLocationLabel.SMHID2( "JobPage", "LocationLabel" );
+ maLocationTxt.SMHID2( "JobPage", "LocationText" );
+ maCommentLabel.SMHID2( "JobPage", "CommentLabel" );
+ maCommentTxt.SMHID2( "JobPage", "CommentText" );
+ maSetupButton.SMHID2( "JobPage", "Properties" );
+ maCopies.SMHID2( "JobPage", "CopiesLine" );
+ maCopySpacer.SMHID2( "JobPage", "CopySpacer" );
+ maCopyCount.SMHID2( "JobPage", "CopiesText" );
+ maCopyCountField.SMHID2( "JobPage", "Copies" );
+ maCollateBox.SMHID2( "JobPage", "Collate" );
+ maCollateImage.SMHID2( "JobPage", "CollateImage" );
+
+ maCopySpacer.Show();
+ maStatusTxt.Show();
+ maCommentTxt.Show();
+ maLocationTxt.Show();
+
+ setupLayout();
+}
+
+PrintDialog::JobTabPage::~JobTabPage()
+{
+}
+
+void PrintDialog::JobTabPage::setupLayout()
+{
+ // HACK: this is not a dropdown box, but the dropdown line count
+ // sets the results of GetOptimalSize in a normal ListBox
+ maPrinters.SetDropDownLineCount( 4 );
+
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+
+ maLayout.setParentWindow( this );
+ maLayout.setOuterBorder( aBorder.Width() );
+
+ // add printer fixed line
+ maLayout.addWindow( &maPrinterFL );
+ // add print LB
+ maLayout.addWindow( &maPrinters );
+
+ // create a row for details button/text and properties button
+ boost::shared_ptr< vcl::RowOrColumn > xDetRow( new vcl::RowOrColumn( &maLayout, false ) );
+ maLayout.addChild( xDetRow );
+ xDetRow->addWindow( &maDetailsBtn );
+ xDetRow->addChild( new vcl::Spacer( xDetRow.get(), 2 ) );
+ xDetRow->addWindow( &maSetupButton );
+
+ // create an indent for details
+ boost::shared_ptr< vcl::Indenter > xIndent( new vcl::Indenter( &maLayout ) );
+ maLayout.addChild( xIndent );
+ // remember details controls
+ mxDetails = xIndent;
+ // create a column for the details
+ boost::shared_ptr< vcl::LabelColumn > xLabelCol( new vcl::LabelColumn( xIndent.get(), aBorder.Height() ) );
+ xIndent->setChild( xLabelCol );
+ xLabelCol->addRow( &maStatusLabel, &maStatusTxt );
+ xLabelCol->addRow( &maLocationLabel, &maLocationTxt );
+ xLabelCol->addRow( &maCommentLabel, &maCommentTxt );
+
+ // add print range and copies columns
+ maLayout.addWindow( &maCopies );
+ boost::shared_ptr< vcl::RowOrColumn > xRangeRow( new vcl::RowOrColumn( &maLayout, false, aBorder.Width() ) );
+ maLayout.addChild( xRangeRow );
+
+ // create print range and add to range row
+ mxPrintRange.reset( new vcl::RowOrColumn( xRangeRow.get() ) );
+ xRangeRow->addChild( mxPrintRange );
+ xRangeRow->addWindow( &maCopySpacer );
+
+ boost::shared_ptr< vcl::RowOrColumn > xCopyCollateCol( new vcl::RowOrColumn( xRangeRow.get() ) );
+ xRangeRow->addChild( xCopyCollateCol );
+
+ // add copies row to copy/collate column
+ boost::shared_ptr< vcl::LabeledElement > xCopiesRow( new vcl::LabeledElement( xCopyCollateCol.get(), 2 ) );
+ xCopyCollateCol->addChild( xCopiesRow );
+ xCopiesRow->setLabel( &maCopyCount );
+ xCopiesRow->setElement( &maCopyCountField );
+ boost::shared_ptr< vcl::LabeledElement > xCollateRow( new vcl::LabeledElement( xCopyCollateCol.get(), 2 ) );
+ xCopyCollateCol->addChild( xCollateRow );
+ xCollateRow->setLabel( &maCollateBox );
+ xCollateRow->setElement( &maCollateImage );
+
+ // maDetailsBtn.SetStyle( maDetailsBtn.GetStyle() | (WB_SMALLSTYLE | WB_BEVELBUTTON) );
+ mxDetails->show( false, false );
+}
+
+void PrintDialog::JobTabPage::readFromSettings()
+{
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ rtl::OUString aValue;
+
+ #if 0
+ // do not actually make copy count persistent
+ // the assumption is that this would lead to a lot of unwanted copies
+ aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CopyCount" ) ) );
+ sal_Int32 nVal = aValue.toInt32();
+ maCopyCountField.SetValue( sal_Int64(nVal > 1 ? nVal : 1) );
+ #endif
+
+ aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CollateBox" ) ) );
+ if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) )
+ {
+ mnCollateUIMode = 1;
+ maCollateBox.Check( FALSE );
+ maCollateBox.Enable( FALSE );
+ }
+ else
+ {
+ mnCollateUIMode = 0;
+ aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) );
+ maCollateBox.Check( aValue.equalsIgnoreAsciiCaseAscii( "true" ) );
+ }
+ Resize();
+}
+
+void PrintDialog::JobTabPage::storeToSettings()
+{
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CopyCount" ) ),
+ maCopyCountField.GetText() );
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ),
+ rtl::OUString::createFromAscii( maCollateBox.IsChecked() ? "true" : "false" ) );
+}
+
+void PrintDialog::JobTabPage::Resize()
+{
+ maLayout.setManagedArea( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
+}
+
+PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rResId )
+ : TabPage( i_pParent, i_rResId )
+ , maOptionsLine( this, VclResId( SV_PRINT_OPT_PRINT_FL ) )
+ , maToFileBox( this, VclResId( SV_PRINT_OPT_TOFILE ) )
+ , maCollateSingleJobsBox( this, VclResId( SV_PRINT_OPT_SINGLEJOBS ) )
+ , maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) )
+{
+ FreeResource();
+ SMHID1( "OptPage" );
+ maOptionsLine.SMHID2( "OptPage", "Options" );
+ maToFileBox.SMHID2( "OptPage", "ToFile" );
+ maCollateSingleJobsBox.SMHID2( "OptPage", "SingleJobs" );
+ maReverseOrderBox.SMHID2( "OptPage", "Reverse" );
+
+ setupLayout();
+}
+
+PrintDialog::OutputOptPage::~OutputOptPage()
+{
+}
+
+void PrintDialog::OutputOptPage::setupLayout()
+{
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+
+ maLayout.setParentWindow( this );
+ maLayout.setOuterBorder( aBorder.Width() );
+
+ maLayout.addWindow( &maOptionsLine );
+ boost::shared_ptr<vcl::Indenter> xIndent( new vcl::Indenter( &maLayout, aBorder.Width() ) );
+ maLayout.addChild( xIndent );
+ boost::shared_ptr<vcl::RowOrColumn> xCol( new vcl::RowOrColumn( xIndent.get(), aBorder.Height() ) );
+ xIndent->setChild( xCol );
+ mxOptGroup = xCol;
+ xCol->addWindow( &maToFileBox );
+ xCol->addWindow( &maCollateSingleJobsBox );
+ xCol->addWindow( &maReverseOrderBox );
+}
+
+void PrintDialog::OutputOptPage::readFromSettings()
+{
+ #if 0
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ rtl::OUString aValue;
+
+ aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToFile" ) ) );
+ maToFileBox.Check( aValue.equalsIgnoreAsciiCaseAscii( "true" ) );
+ #endif
+}
+
+void PrintDialog::OutputOptPage::storeToSettings()
+{
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToFile" ) ),
+ rtl::OUString::createFromAscii( maToFileBox.IsChecked() ? "true" : "false" ) );
+}
+
+void PrintDialog::OutputOptPage::Resize()
+{
+ maLayout.setManagedArea( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
+}
+
+
+PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterController>& i_rController )
+ : ModalDialog( i_pParent, VclResId( SV_DLG_PRINT ) )
+ , maOKButton( this, VclResId( SV_PRINT_OK ) )
+ , maCancelButton( this, VclResId( SV_PRINT_CANCEL ) )
+ , maHelpButton( this, VclResId( SV_PRINT_HELP ) )
+ , maPreviewWindow( this, VclResId( SV_PRINT_PAGE_PREVIEW ) )
+ , maPageEdit( this, VclResId( SV_PRINT_PAGE_EDIT ) )
+ , maNumPagesText( this, VclResId( SV_PRINT_PAGE_TXT ) )
+ , maBackwardBtn( this, VclResId( SV_PRINT_PAGE_BACKWARD ) )
+ , maForwardBtn( this, VclResId( SV_PRINT_PAGE_FORWARD ) )
+ , maTabCtrl( this, VclResId( SV_PRINT_TABCTRL ) )
+ , maNUpPage( &maTabCtrl, VclResId( SV_PRINT_TAB_NUP ) )
+ , maJobPage( &maTabCtrl, VclResId( SV_PRINT_TAB_JOB ) )
+ , maOptionsPage( &maTabCtrl, VclResId( SV_PRINT_TAB_OPT ) )
+ , maButtonLine( this, VclResId( SV_PRINT_BUTTONLINE ) )
+ , maPController( i_rController )
+ , maNoPageStr( String( VclResId( SV_PRINT_NOPAGES ) ) )
+ , mnCurPage( 0 )
+ , mnCachedPages( 0 )
+ , maPrintToFileText( String( VclResId( SV_PRINT_TOFILE_TXT ) ) )
+ , maDefPrtText( String( VclResId( SV_PRINT_DEFPRT_TXT ) ) )
+ , mbShowLayoutPage( sal_True )
+{
+ FreeResource();
+
+ // save printbutton text, gets exchanged occasionally with print to file
+ maPrintText = maOKButton.GetText();
+
+ // setup preview controls
+ maForwardBtn.SetStyle( maForwardBtn.GetStyle() | WB_BEVELBUTTON );
+ maBackwardBtn.SetStyle( maBackwardBtn.GetStyle() | WB_BEVELBUTTON );
+
+ // insert the job (general) tab page first
+ maTabCtrl.InsertPage( SV_PRINT_TAB_JOB, maJobPage.GetText() );
+ maTabCtrl.SetTabPage( SV_PRINT_TAB_JOB, &maJobPage );
+
+ // set symbols on forward and backward button
+ maBackwardBtn.SetSymbol( SYMBOL_PREV );
+ maForwardBtn.SetSymbol( SYMBOL_NEXT );
+ maBackwardBtn.ImplSetSmallSymbol( TRUE );
+ maForwardBtn.ImplSetSmallSymbol( TRUE );
+
+ maPageStr = maNumPagesText.GetText();
+
+ // init reverse print
+ maOptionsPage.maReverseOrderBox.Check( maPController->getReversePrint() );
+
+ // get the first page
+ preparePreview( true, true );
+
+ // fill printer listbox
+ const std::vector< rtl::OUString >& rQueues( Printer::GetPrinterQueues() );
+ for( std::vector< rtl::OUString >::const_iterator it = rQueues.begin();
+ it != rQueues.end(); ++it )
+ {
+ maJobPage.maPrinters.InsertEntry( *it );
+ }
+ // select current printer
+ if( maJobPage.maPrinters.GetEntryPos( maPController->getPrinter()->GetName() ) != LISTBOX_ENTRY_NOTFOUND )
+ {
+ maJobPage.maPrinters.SelectEntry( maPController->getPrinter()->GetName() );
+ }
+ else
+ {
+ // fall back to last printer
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ String aValue( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinter" ) ) ) );
+ if( maJobPage.maPrinters.GetEntryPos( aValue ) != LISTBOX_ENTRY_NOTFOUND )
+ {
+ maJobPage.maPrinters.SelectEntry( aValue );
+ maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( aValue ) ) );
+ }
+ else
+ {
+ // fall back to default printer
+ maJobPage.maPrinters.SelectEntry( Printer::GetDefaultPrinterName() );
+ maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( Printer::GetDefaultPrinterName() ) ) );
+ }
+ }
+ // update the text fields for the printer
+ updatePrinterText();
+
+ // set a select handler
+ maJobPage.maPrinters.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
+
+ // setup sizes for N-Up
+ Size aNupSize( maPController->getPrinter()->PixelToLogic(
+ maPController->getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ if( maPController->getPrinter()->GetOrientation() == ORIENTATION_LANDSCAPE )
+ {
+ maNupLandscapeSize = aNupSize;
+ maNupPortraitSize = Size( aNupSize.Height(), aNupSize.Width() );
+ }
+ else
+ {
+ maNupPortraitSize = aNupSize;
+ maNupLandscapeSize = Size( aNupSize.Height(), aNupSize.Width() );
+ }
+ maNUpPage.initFromMultiPageSetup( maPController->getMultipage() );
+
+
+ // setup click handler on the various buttons
+ maOKButton.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ #if OSL_DEBUG_LEVEL > 1
+ maCancelButton.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ #endif
+ maHelpButton.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maForwardBtn.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maBackwardBtn.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maJobPage.maCollateBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maJobPage.maSetupButton.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maJobPage.maDetailsBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maNUpPage.maBorderCB.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maOptionsPage.maToFileBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maOptionsPage.maReverseOrderBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maNUpPage.maPagesBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+
+ // setup modify hdl
+ maPageEdit.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
+ maJobPage.maCopyCountField.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
+ maNUpPage.maNupRowsEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
+ maNUpPage.maNupColEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
+ maNUpPage.maPageMarginEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
+ maNUpPage.maSheetMarginEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
+
+ // setup select hdl
+ maNUpPage.maNupPagesBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
+ maNUpPage.maNupOrientationBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
+ maNUpPage.maNupOrderBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
+
+ // setup the layout
+ setupLayout();
+
+ // setup optional UI options set by application
+ setupOptionalUI();
+
+ // set change handler for UI options
+ maPController->setOptionChangeHdl( LINK( this, PrintDialog, UIOptionsChanged ) );
+
+ // set min size pixel to current size
+ Size aOutSize( GetOutputSizePixel() );
+ SetMinOutputSizePixel( aOutSize );
+
+ // if there is space enough, enlarge the preview so it gets roughly as
+ // high as the tab control
+ if( aOutSize.Width() < 768 )
+ {
+ Size aJobPageSize( getJobPageSize() );
+ Size aTabSize( maTabCtrl.GetSizePixel() );
+ if( aJobPageSize.Width() < 1 )
+ aJobPageSize.Width() = aTabSize.Width();
+ if( aJobPageSize.Height() < 1 )
+ aJobPageSize.Height() = aTabSize.Height();
+ long nOptPreviewWidth = aTabSize.Height() * aJobPageSize.Width() / aJobPageSize.Height();
+ // add space for borders
+ nOptPreviewWidth += 15;
+ if( aOutSize.Width() - aTabSize.Width() < nOptPreviewWidth )
+ {
+ aOutSize.Width() = aTabSize.Width() + nOptPreviewWidth;
+ if( aOutSize.Width() > 768 ) // don't enlarge the dialog too much
+ aOutSize.Width() = 768;
+ SetOutputSizePixel( aOutSize );
+ }
+ }
+
+ // set HelpIDs
+ SMHID1( "Dialog" );
+ maOKButton.SMHID1( "OK" );
+ maCancelButton.SMHID1( "Cancel" );
+ maHelpButton.SMHID1( "Help" );
+ maPreviewWindow.SMHID1( "Preview" );
+ maNumPagesText.SMHID1( "NumPagesText" );
+ maPageEdit.SMHID1( "PageEdit" );
+ maForwardBtn.SMHID1( "ForwardBtn" );
+ maBackwardBtn.SMHID1( "BackwardBtn" );
+ maTabCtrl.SMHID1( "TabPages" );
+
+ // append further tab pages
+ if( mbShowLayoutPage )
+ {
+ maTabCtrl.InsertPage( SV_PRINT_TAB_NUP, maNUpPage.GetText() );
+ maTabCtrl.SetTabPage( SV_PRINT_TAB_NUP, &maNUpPage );
+ }
+ maTabCtrl.InsertPage( SV_PRINT_TAB_OPT, maOptionsPage.GetText() );
+ maTabCtrl.SetTabPage( SV_PRINT_TAB_OPT, &maOptionsPage );
+
+ // restore settings from last run
+ readFromSettings();
+
+ // setup dependencies
+ checkControlDependencies();
+
+}
+
+PrintDialog::~PrintDialog()
+{
+ while( ! maControls.empty() )
+ {
+ delete maControls.front();
+ maControls.pop_front();
+ }
+}
+
+void PrintDialog::setupLayout()
+{
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+
+ maLayout.setParentWindow( this );
+
+ boost::shared_ptr< vcl::RowOrColumn > xPreviewAndTab( new vcl::RowOrColumn( &maLayout, false ) );
+ size_t nIndex = maLayout.addChild( xPreviewAndTab, 5 );
+ maLayout.setBorders( nIndex, aBorder.Width(), aBorder.Width(), aBorder.Width(), 0 );
+
+ // setup column for preview and sub controls
+ boost::shared_ptr< vcl::RowOrColumn > xPreview( new vcl::RowOrColumn( xPreviewAndTab.get() ) );
+ xPreviewAndTab->addChild( xPreview, 5 );
+ xPreview->addWindow( &maPreviewWindow, 5 );
+ // get a row for the preview controls
+ mxPreviewCtrls.reset( new vcl::RowOrColumn( xPreview.get(), false ) );
+ nIndex = xPreview->addChild( mxPreviewCtrls );
+ boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( mxPreviewCtrls.get(), 2 ) );
+ mxPreviewCtrls->addChild( xSpacer );
+ mxPreviewCtrls->addWindow( &maPageEdit );
+ mxPreviewCtrls->addWindow( &maNumPagesText );
+ xSpacer.reset( new vcl::Spacer( mxPreviewCtrls.get(), 2 ) );
+ mxPreviewCtrls->addChild( xSpacer );
+ mxPreviewCtrls->addWindow( &maBackwardBtn );
+ mxPreviewCtrls->addWindow( &maForwardBtn );
+ xSpacer.reset( new vcl::Spacer( mxPreviewCtrls.get(), 2 ) );
+ mxPreviewCtrls->addChild( xSpacer );
+
+ // continue with the tab ctrl
+ xPreviewAndTab->addWindow( &maTabCtrl );
+
+ // add the button line
+ maLayout.addWindow( &maButtonLine );
+
+ // add the row for the buttons
+ boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &maLayout, false ) );
+ nIndex = maLayout.addChild( xButtons );
+ maLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() );
+
+ Size aMinSize( maCancelButton.GetSizePixel() );
+ // insert help button
+ xButtons->setMinimumSize( xButtons->addWindow( &maHelpButton ), aMinSize );
+ // insert a spacer, cancel and OK buttons are right aligned
+ xSpacer.reset( new vcl::Spacer( xButtons.get(), 2 ) );
+ xButtons->addChild( xSpacer );
+ xButtons->setMinimumSize( xButtons->addWindow( &maOKButton ), aMinSize );
+ xButtons->setMinimumSize( xButtons->addWindow( &maCancelButton ), aMinSize );
+}
+
+void PrintDialog::readFromSettings()
+{
+ maJobPage.readFromSettings();
+ maNUpPage.readFromSettings();
+ maOptionsPage.readFromSettings();
+
+ // read last selected tab page; if it exists, actiavte it
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ rtl::OUString aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ) );
+ USHORT nCount = maTabCtrl.GetPageCount();
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ USHORT nPageId = maTabCtrl.GetPageId( i );
+ if( aValue.equals( maTabCtrl.GetPageText( nPageId ) ) )
+ {
+ maTabCtrl.SelectTabPage( nPageId );
+ break;
+ }
+ }
+ maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
+}
+
+void PrintDialog::storeToSettings()
+{
+ maJobPage.storeToSettings();
+ maNUpPage.storeToSettings();
+ maOptionsPage.storeToSettings();
+
+ // store last selected printer
+ SettingsConfigItem* pItem = SettingsConfigItem::get();
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinter" ) ),
+ maJobPage.maPrinters.GetSelectEntry() );
+
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ),
+ maTabCtrl.GetPageText( maTabCtrl.GetCurPageId() ) );
+ pItem->Commit();
+}
+
+bool PrintDialog::isPrintToFile()
+{
+ return maOptionsPage.maToFileBox.IsChecked();
+}
+
+int PrintDialog::getCopyCount()
+{
+ return static_cast<int>(maJobPage.maCopyCountField.GetValue());
+}
+
+bool PrintDialog::isCollate()
+{
+ return maJobPage.maCopyCountField.GetValue() > 1 ? maJobPage.maCollateBox.IsChecked() : FALSE;
+}
+
+static void setSmartId( Window* i_pWindow, const char* i_pType, sal_Int32 i_nId = -1, const rtl::OUString& i_rPropName = rtl::OUString() )
+{
+ rtl::OUStringBuffer aBuf( 256 );
+ aBuf.appendAscii( HELPID_PREFIX );
+ if( i_rPropName.getLength() )
+ {
+ aBuf.append( sal_Unicode( ':' ) );
+ aBuf.append( i_rPropName );
+ }
+ if( i_pType )
+ {
+ aBuf.append( sal_Unicode( ':' ) );
+ aBuf.appendAscii( i_pType );
+ }
+ if( i_nId >= 0 )
+ {
+ aBuf.append( sal_Unicode( ':' ) );
+ aBuf.append( i_nId );
+ }
+ i_pWindow->SetSmartHelpId( SmartId( aBuf.makeStringAndClear(), HID_PRINTDLG ) );
+}
+
+static void setHelpText( Window* i_pWindow, const Sequence< rtl::OUString >& i_rHelpTexts, sal_Int32 i_nIndex )
+{
+ if( i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength() )
+ i_pWindow->SetHelpText( i_rHelpTexts.getConstArray()[i_nIndex] );
+}
+
+void updateMaxSize( const Size& i_rCheckSize, Size& o_rMaxSize )
+{
+ if( i_rCheckSize.Width() > o_rMaxSize.Width() )
+ o_rMaxSize.Width() = i_rCheckSize.Width();
+ if( i_rCheckSize.Height() > o_rMaxSize.Height() )
+ o_rMaxSize.Height() = i_rCheckSize.Height();
+}
+
+void PrintDialog::setupOptionalUI()
+{
+ Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
+
+ std::vector<vcl::RowOrColumn*> aDynamicColumns;
+ vcl::RowOrColumn* pCurColumn = 0;
+
+ Window* pCurParent = 0, *pDynamicPageParent = 0;
+ USHORT nOptPageId = 9, nCurSubGroup = 0;
+ bool bOnStaticPage = false;
+ bool bSubgroupOnStaticPage = false;
+
+ std::multimap< rtl::OUString, vcl::RowOrColumn* > aPropertyToDependencyRowMap;
+
+ const Sequence< PropertyValue >& rOptions( maPController->getUIOptions() );
+ for( int i = 0; i < rOptions.getLength(); i++ )
+ {
+ Sequence< beans::PropertyValue > aOptProp;
+ rOptions[i].Value >>= aOptProp;
+
+ // extract ui element
+ bool bEnabled = true;
+ rtl::OUString aCtrlType;
+ rtl::OUString aText;
+ rtl::OUString aPropertyName;
+ Sequence< rtl::OUString > aChoices;
+ Sequence< rtl::OUString > aHelpTexts;
+ sal_Int64 nMinValue = 0, nMaxValue = 0;
+ sal_Int32 nCurHelpText = 0;
+ rtl::OUString aGroupingHint;
+ rtl::OUString aDependsOnName;
+ sal_Int32 nDependsOnValue = 0;
+ sal_Bool bUseDependencyRow = sal_False;
+
+ for( int n = 0; n < aOptProp.getLength(); n++ )
+ {
+ const beans::PropertyValue& rEntry( aOptProp[ n ] );
+ if( rEntry.Name.equalsAscii( "Text" ) )
+ {
+ rEntry.Value >>= aText;
+ }
+ else if( rEntry.Name.equalsAscii( "ControlType" ) )
+ {
+ rEntry.Value >>= aCtrlType;
+ }
+ else if( rEntry.Name.equalsAscii( "Choices" ) )
+ {
+ rEntry.Value >>= aChoices;
+ }
+ else if( rEntry.Name.equalsAscii( "Property" ) )
+ {
+ PropertyValue aVal;
+ rEntry.Value >>= aVal;
+ aPropertyName = aVal.Name;
+ }
+ else if( rEntry.Name.equalsAscii( "Enabled" ) )
+ {
+ sal_Bool bValue = sal_True;
+ rEntry.Value >>= bValue;
+ bEnabled = bValue;
+ }
+ else if( rEntry.Name.equalsAscii( "GroupingHint" ) )
+ {
+ rEntry.Value >>= aGroupingHint;
+ }
+ else if( rEntry.Name.equalsAscii( "DependsOnName" ) )
+ {
+ rEntry.Value >>= aDependsOnName;
+ }
+ else if( rEntry.Name.equalsAscii( "DependsOnEntry" ) )
+ {
+ rEntry.Value >>= nDependsOnValue;
+ }
+ else if( rEntry.Name.equalsAscii( "AttachToDependency" ) )
+ {
+ rEntry.Value >>= bUseDependencyRow;
+ }
+ else if( rEntry.Name.equalsAscii( "MinValue" ) )
+ {
+ rEntry.Value >>= nMinValue;
+ }
+ else if( rEntry.Name.equalsAscii( "MaxValue" ) )
+ {
+ rEntry.Value >>= nMaxValue;
+ }
+ else if( rEntry.Name.equalsAscii( "HelpText" ) )
+ {
+ if( ! (rEntry.Value >>= aHelpTexts) )
+ {
+ rtl::OUString aHelpText;
+ if( (rEntry.Value >>= aHelpText) )
+ {
+ aHelpTexts.realloc( 1 );
+ *aHelpTexts.getArray() = aHelpText;
+ }
+ }
+ }
+ else if( rEntry.Name.equalsAscii( "HintNoLayoutPage" ) )
+ {
+ sal_Bool bNoLayoutPage = sal_False;
+ rEntry.Value >>= bNoLayoutPage;
+ mbShowLayoutPage = ! bNoLayoutPage;
+ }
+ }
+
+ // bUseDependencyRow should only be true if a dependency exists
+ bUseDependencyRow = bUseDependencyRow && (aDependsOnName.getLength() != 0);
+
+ // is it necessary to switch between static and dynamic pages ?
+ bool bSwitchPage = false;
+ if( aGroupingHint.getLength() )
+ bSwitchPage = true;
+ else if( aCtrlType.equalsAscii( "Subgroup" ) || (bOnStaticPage && ! bSubgroupOnStaticPage ) )
+ bSwitchPage = true;
+ if( bSwitchPage )
+ {
+ // restore to dynamic
+ pCurParent = pDynamicPageParent;
+ pCurColumn = aDynamicColumns.empty() ? NULL : aDynamicColumns.back();
+ bOnStaticPage = false;
+ bSubgroupOnStaticPage = false;
+
+ if( aGroupingHint.equalsAscii( "PrintRange" ) )
+ {
+ pCurColumn = maJobPage.mxPrintRange.get();
+ pCurParent = &maJobPage; // set job page as current parent
+ bOnStaticPage = true;
+ }
+ else if( aGroupingHint.equalsAscii( "OptionsPage" ) )
+ {
+ pCurColumn = &maOptionsPage.maLayout;
+ pCurParent = &maOptionsPage; // set options page as current parent
+ bOnStaticPage = true;
+ }
+ else if( aGroupingHint.equalsAscii( "OptionsPageOptGroup" ) )
+ {
+ pCurColumn = maOptionsPage.mxOptGroup.get();
+ pCurParent = &maOptionsPage; // set options page as current parent
+ bOnStaticPage = true;
+ }
+ else if( aGroupingHint.equalsAscii( "LayoutPage" ) )
+ {
+ pCurColumn = &maNUpPage.maLayout;
+ pCurParent = &maNUpPage; // set layout page as current parent
+ bOnStaticPage = true;
+ }
+ else if( aGroupingHint.getLength() )
+ {
+ pCurColumn = &maJobPage.maLayout;
+ pCurParent = &maJobPage; // set job page as current parent
+ bOnStaticPage = true;
+ }
+ }
+
+ if( aCtrlType.equalsAscii( "Group" ) ||
+ ( ! pCurParent && ! (bOnStaticPage || aGroupingHint.getLength() ) ) )
+ {
+ // add new tab page
+ TabPage* pNewGroup = new TabPage( &maTabCtrl );
+ maControls.push_front( pNewGroup );
+ pDynamicPageParent = pCurParent = pNewGroup;
+ pNewGroup->SetText( aText );
+ maTabCtrl.InsertPage( ++nOptPageId, aText );
+ maTabCtrl.SetTabPage( nOptPageId, pNewGroup );
+
+ // set help id
+ setSmartId( pNewGroup, "TabPage", nOptPageId );
+ // set help text
+ setHelpText( pNewGroup, aHelpTexts, 0 );
+
+ // reset subgroup counter
+ nCurSubGroup = 0;
+
+ aDynamicColumns.push_back( new vcl::RowOrColumn( NULL, true, aBorder.Width() ) );
+ pCurColumn = aDynamicColumns.back();
+ pCurColumn->setParentWindow( pNewGroup );
+ pCurColumn->setOuterBorder( aBorder.Width() );
+ bSubgroupOnStaticPage = false;
+ bOnStaticPage = false;
+ }
+ else if( aCtrlType.equalsAscii( "Subgroup" ) && (pCurParent || aGroupingHint.getLength() ) )
+ {
+ bSubgroupOnStaticPage = (aGroupingHint.getLength() != 0);
+ // create group FixedLine
+ if( ! aGroupingHint.equalsAscii( "PrintRange" ) ||
+ ! pCurColumn->countElements() == 0
+ )
+ {
+ Window* pNewSub = NULL;
+ if( aGroupingHint.equalsAscii( "PrintRange" ) )
+ pNewSub = new FixedText( pCurParent, WB_VCENTER );
+ else
+ pNewSub = new FixedLine( pCurParent );
+ maControls.push_front( pNewSub );
+ pNewSub->SetText( aText );
+ pNewSub->Show();
+
+ // set help id
+ setSmartId( pNewSub, "FixedLine", sal_Int32( nCurSubGroup++ ) );
+ // set help text
+ setHelpText( pNewSub, aHelpTexts, 0 );
+ // add group to current column
+ pCurColumn->addWindow( pNewSub );
+ }
+
+ // add an indent to the current column
+ vcl::Indenter* pIndent = new vcl::Indenter( pCurColumn, aBorder.Width() );
+ pCurColumn->addChild( pIndent );
+ // and create a column inside the indent
+ pCurColumn = new vcl::RowOrColumn( pIndent );
+ pIndent->setChild( pCurColumn );
+ }
+ // EVIL
+ else if( aCtrlType.equalsAscii( "Bool" ) &&
+ aGroupingHint.equalsAscii( "LayoutPage" ) &&
+ aPropertyName.equalsAscii( "PrintProspect" )
+ )
+ {
+ maNUpPage.maBrochureBtn.SetText( aText );
+ maNUpPage.maBrochureBtn.Show();
+ setHelpText( &maNUpPage.maBrochureBtn, aHelpTexts, 0 );
+
+ sal_Bool bVal = sal_False;
+ PropertyValue* pVal = maPController->getValue( aPropertyName );
+ if( pVal )
+ pVal->Value >>= bVal;
+ maNUpPage.maBrochureBtn.Check( bVal );
+ maNUpPage.maBrochureBtn.Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL );
+ maNUpPage.maBrochureBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+
+ maPropertyToWindowMap[ aPropertyName ].push_back( &maNUpPage.maBrochureBtn );
+ maControlToPropertyMap[&maNUpPage.maBrochureBtn] = aPropertyName;
+
+ aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, maNUpPage.mxBrochureDep.get() ) );
+ }
+ else
+ {
+ vcl::RowOrColumn* pSaveCurColumn = pCurColumn;
+
+ if( bUseDependencyRow )
+ {
+ // find the correct dependency row (if any)
+ std::pair< std::multimap< rtl::OUString, vcl::RowOrColumn* >::iterator,
+ std::multimap< rtl::OUString, vcl::RowOrColumn* >::iterator > aDepRange;
+ aDepRange = aPropertyToDependencyRowMap.equal_range( aDependsOnName );
+ if( aDepRange.first != aDepRange.second )
+ {
+ while( nDependsOnValue && aDepRange.first != aDepRange.second )
+ {
+ nDependsOnValue--;
+ ++aDepRange.first;
+ }
+ if( aDepRange.first != aPropertyToDependencyRowMap.end() )
+ {
+ pCurColumn = aDepRange.first->second;
+ maReverseDependencySet.insert( aPropertyName );
+ }
+ }
+ }
+ if( aCtrlType.equalsAscii( "Bool" ) && pCurParent )
+ {
+ // add a check box
+ CheckBox* pNewBox = new CheckBox( pCurParent );
+ maControls.push_front( pNewBox );
+ pNewBox->SetText( aText );
+ pNewBox->Show();
+
+ sal_Bool bVal = sal_False;
+ PropertyValue* pVal = maPController->getValue( aPropertyName );
+ if( pVal )
+ pVal->Value >>= bVal;
+ pNewBox->Check( bVal );
+ pNewBox->SetToggleHdl( LINK( this, PrintDialog, UIOption_CheckHdl ) );
+
+ maPropertyToWindowMap[ aPropertyName ].push_back( pNewBox );
+ maControlToPropertyMap[pNewBox] = aPropertyName;
+
+ // set help id
+ setSmartId( pNewBox, "CheckBox", -1, aPropertyName );
+ // set help text
+ setHelpText( pNewBox, aHelpTexts, 0 );
+
+ vcl::RowOrColumn* pDependencyRow = new vcl::RowOrColumn( pCurColumn, false );
+ pCurColumn->addChild( pDependencyRow );
+ aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pDependencyRow ) );
+
+ // add checkbox to current column
+ pDependencyRow->addWindow( pNewBox );
+ }
+ else if( aCtrlType.equalsAscii( "Radio" ) && pCurParent )
+ {
+ vcl::RowOrColumn* pRadioColumn = pCurColumn;
+ if( aText.getLength() )
+ {
+ // add a FixedText:
+ FixedText* pHeading = new FixedText( pCurParent );
+ maControls.push_front( pHeading );
+ pHeading->SetText( aText );
+ pHeading->Show();
+
+ // set help id
+ setSmartId( pHeading, "FixedText", -1, aPropertyName );
+ // set help text
+ setHelpText( pHeading, aHelpTexts, nCurHelpText++ );
+ // add fixed text to current column
+ pCurColumn->addWindow( pHeading );
+ // add an indent to the current column
+ vcl::Indenter* pIndent = new vcl::Indenter( pCurColumn, 15 );
+ pCurColumn->addChild( pIndent );
+ // and create a column inside the indent
+ pRadioColumn = new vcl::RowOrColumn( pIndent );
+ pIndent->setChild( pRadioColumn );
+ }
+ // iterate options
+ sal_Int32 nSelectVal = 0;
+ PropertyValue* pVal = maPController->getValue( aPropertyName );
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= nSelectVal;
+ for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
+ {
+ boost::shared_ptr<vcl::LabeledElement> pLabel( new vcl::LabeledElement( pRadioColumn, 1 ) );
+ pRadioColumn->addChild( pLabel );
+ boost::shared_ptr<vcl::RowOrColumn> pDependencyRow( new vcl::RowOrColumn( pLabel.get(), false ) );
+ pLabel->setElement( pDependencyRow );
+ aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pDependencyRow.get() ) );
+
+ RadioButton* pBtn = new RadioButton( pCurParent, m == 0 ? WB_GROUP : 0 );
+ maControls.push_front( pBtn );
+ pBtn->SetText( aChoices[m] );
+ pBtn->Check( m == nSelectVal );
+ pBtn->SetToggleHdl( LINK( this, PrintDialog, UIOption_RadioHdl ) );
+ pBtn->Show();
+ maPropertyToWindowMap[ aPropertyName ].push_back( pBtn );
+ maControlToPropertyMap[pBtn] = aPropertyName;
+ maControlToNumValMap[pBtn] = m;
+
+ // set help id
+ setSmartId( pBtn, "RadioButton", m, aPropertyName );
+ // set help text
+ setHelpText( pBtn, aHelpTexts, nCurHelpText++ );
+ // add the radio button to the column
+ pLabel->setLabel( pBtn );
+ }
+ }
+ else if( ( aCtrlType.equalsAscii( "List" ) ||
+ aCtrlType.equalsAscii( "Range" ) ||
+ aCtrlType.equalsAscii( "Edit" )
+ ) && pCurParent )
+ {
+ // create a row in the current column
+ vcl::RowOrColumn* pFieldColumn = new vcl::RowOrColumn( pCurColumn, false );
+ pCurColumn->addChild( pFieldColumn );
+ aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pFieldColumn ) );
+
+ vcl::LabeledElement* pLabel = NULL;
+ if( aText.getLength() )
+ {
+ // add a FixedText:
+ FixedText* pHeading = new FixedText( pCurParent, WB_VCENTER );
+ maControls.push_front( pHeading );
+ pHeading->SetText( aText );
+ pHeading->Show();
+
+ // set help id
+ setSmartId( pHeading, "FixedText", -1, aPropertyName );
+
+ // add to row
+ pLabel = new vcl::LabeledElement( pFieldColumn, 2 );
+ pFieldColumn->addChild( pLabel );
+ pLabel->setLabel( pHeading );
+ }
+
+ if( aCtrlType.equalsAscii( "List" ) )
+ {
+ ListBox* pList = new ListBox( pCurParent, WB_DROPDOWN | WB_BORDER );
+ maControls.push_front( pList );
+
+ // iterate options
+ for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
+ {
+ pList->InsertEntry( aChoices[m] );
+ }
+ sal_Int32 nSelectVal = 0;
+ PropertyValue* pVal = maPController->getValue( aPropertyName );
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= nSelectVal;
+ pList->SelectEntryPos( static_cast<USHORT>(nSelectVal) );
+ pList->SetSelectHdl( LINK( this, PrintDialog, UIOption_SelectHdl ) );
+ pList->SetDropDownLineCount( static_cast<USHORT>(aChoices.getLength()) );
+ pList->Show();
+
+ // set help id
+ setSmartId( pList, "ListBox", -1, aPropertyName );
+ // set help text
+ setHelpText( pList, aHelpTexts, 0 );
+
+ maPropertyToWindowMap[ aPropertyName ].push_back( pList );
+ maControlToPropertyMap[pList] = aPropertyName;
+
+ // finish the pair
+ if( pLabel )
+ pLabel->setElement( pList );
+ else
+ pFieldColumn->addWindow( pList );
+ }
+ else if( aCtrlType.equalsAscii( "Range" ) )
+ {
+ NumericField* pField = new NumericField( pCurParent, WB_BORDER | WB_SPIN );
+ maControls.push_front( pField );
+
+ // set min/max and current value
+ if( nMinValue != nMaxValue )
+ {
+ pField->SetMin( nMinValue );
+ pField->SetMax( nMaxValue );
+ }
+ sal_Int64 nCurVal = 0;
+ PropertyValue* pVal = maPController->getValue( aPropertyName );
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= nCurVal;
+ pField->SetValue( nCurVal );
+ pField->SetModifyHdl( LINK( this, PrintDialog, UIOption_ModifyHdl ) );
+ pField->Show();
+
+ // set help id
+ setSmartId( pField, "NumericField", -1, aPropertyName );
+ // set help text
+ setHelpText( pField, aHelpTexts, 0 );
+
+ maPropertyToWindowMap[ aPropertyName ].push_back( pField );
+ maControlToPropertyMap[pField] = aPropertyName;
+
+ // add to row
+ if( pLabel )
+ pLabel->setElement( pField );
+ else
+ pFieldColumn->addWindow( pField );
+ }
+ else if( aCtrlType.equalsAscii( "Edit" ) )
+ {
+ Edit* pField = new Edit( pCurParent, WB_BORDER );
+ maControls.push_front( pField );
+
+ rtl::OUString aCurVal;
+ PropertyValue* pVal = maPController->getValue( aPropertyName );
+ if( pVal && pVal->Value.hasValue() )
+ pVal->Value >>= aCurVal;
+ pField->SetText( aCurVal );
+ pField->SetModifyHdl( LINK( this, PrintDialog, UIOption_ModifyHdl ) );
+ pField->Show();
+
+ // set help id
+ setSmartId( pField, "Edit", -1, aPropertyName );
+ // set help text
+ setHelpText( pField, aHelpTexts, 0 );
+
+ maPropertyToWindowMap[ aPropertyName ].push_back( pField );
+ maControlToPropertyMap[pField] = aPropertyName;
+
+ // add to row
+ if( pLabel )
+ pLabel->setElement( pField );
+ else
+ pFieldColumn->addWindow( pField, 2 );
+ }
+ }
+ else
+ {
+ DBG_ERROR( "Unsupported UI option" );
+ }
+
+ pCurColumn = pSaveCurColumn;
+ }
+ }
+
+ // #i106506# if no brochure button, then the singular Pages radio button
+ // makes no sense, so replace it by a FixedText label
+ if( ! maNUpPage.maBrochureBtn.IsVisible() )
+ {
+ if( maNUpPage.mxPagesBtnLabel.get() )
+ {
+ maNUpPage.maPagesBoxTitleTxt.SetText( maNUpPage.maPagesBtn.GetText() );
+ maNUpPage.maPagesBoxTitleTxt.Show( TRUE );
+ maNUpPage.mxPagesBtnLabel->setLabel( &maNUpPage.maPagesBoxTitleTxt );
+ maNUpPage.maPagesBtn.Show( FALSE );
+ }
+ }
+
+ // update enable states
+ checkOptionalControlDependencies();
+
+ // print range empty (currently math only) -> hide print range and spacer line
+ if( maJobPage.mxPrintRange->countElements() == 0 )
+ {
+ maJobPage.mxPrintRange->show( false, false );
+ maJobPage.maCopySpacer.Show( FALSE );
+ }
+
+#ifdef WNT
+ // FIXME: the GetNativeControlRegion call on Windows has some issues
+ // (which skew the results of GetOptimalSize())
+ // however fixing this thoroughly needs to take interaction with paint into
+ // acoount, making the right fix less simple. Fix this the right way
+ // at some point. For now simply add some space at the lowest element
+ size_t nIndex = maJobPage.maLayout.countElements();
+ if( nIndex > 0 ) // sanity check
+ maJobPage.maLayout.setBorders( nIndex-1, 0, 0, 0, aBorder.Width() );
+#endif
+
+ // calculate job page
+ Size aMaxSize = maJobPage.maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
+ // and layout page
+ updateMaxSize( maNUpPage.maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ), aMaxSize );
+ // and options page
+ updateMaxSize( maOptionsPage.maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ), aMaxSize );
+
+ for( std::vector< vcl::RowOrColumn* >::iterator it = aDynamicColumns.begin();
+ it != aDynamicColumns.end(); ++it )
+ {
+ Size aPageSize( (*it)->getOptimalSize( WINDOWSIZE_PREFERRED ) );
+ updateMaxSize( aPageSize, aMaxSize );
+ }
+
+ // resize dialog if necessary
+ Size aTabSize = maTabCtrl.GetTabPageSizePixel();
+ maTabCtrl.SetMinimumSizePixel( maTabCtrl.GetSizePixel() );
+ if( aMaxSize.Height() > aTabSize.Height() || aMaxSize.Width() > aTabSize.Width() )
+ {
+ Size aCurSize( GetOutputSizePixel() );
+ if( aMaxSize.Height() > aTabSize.Height() )
+ {
+ aCurSize.Height() += aMaxSize.Height() - aTabSize.Height();
+ aTabSize.Height() = aMaxSize.Height();
+ }
+ if( aMaxSize.Width() > aTabSize.Width() )
+ {
+ aCurSize.Width() += aMaxSize.Width() - aTabSize.Width();
+ // and the tab ctrl needs more space, too
+ aTabSize.Width() = aMaxSize.Width();
+ }
+ maTabCtrl.SetTabPageSizePixel( aTabSize );
+ maTabCtrl.SetMinimumSizePixel( maTabCtrl.GetSizePixel() );
+ }
+
+ // and finally arrange controls
+ for( std::vector< vcl::RowOrColumn* >::iterator it = aDynamicColumns.begin();
+ it != aDynamicColumns.end(); ++it )
+ {
+ (*it)->setManagedArea( Rectangle( Point(), aTabSize ) );
+ delete *it;
+ *it = NULL;
+ }
+ maJobPage.Resize();
+ maNUpPage.Resize();
+ maOptionsPage.Resize();
+
+ Size aSz = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
+ SetOutputSizePixel( aSz );
+}
+
+void PrintDialog::DataChanged( const DataChangedEvent& i_rDCEvt )
+{
+ // react on settings changed
+ if( i_rDCEvt.GetType() == DATACHANGED_SETTINGS )
+ checkControlDependencies();
+ ModalDialog::DataChanged( i_rDCEvt );
+}
+
+void PrintDialog::checkControlDependencies()
+{
+ if( maJobPage.maCopyCountField.GetValue() > 1 )
+ maJobPage.maCollateBox.Enable( maJobPage.mnCollateUIMode == 0 );
+ else
+ maJobPage.maCollateBox.Enable( FALSE );
+
+ Image aImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateImg : maJobPage.maNoCollateImg );
+ Image aHCImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateHCImg : maJobPage.maNoCollateHCImg );
+ bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ Size aImgSize( aImg.GetSizePixel() );
+ Size aHCImgSize( aHCImg.GetSizePixel() );
+
+ if( aHCImgSize.Width() > aImgSize.Width() )
+ aImgSize.Width() = aHCImgSize.Width();
+ if( aHCImgSize.Height() > aImgSize.Height() )
+ aImgSize.Height() = aHCImgSize.Height();
+
+ // adjust size of image
+ maJobPage.maCollateImage.SetSizePixel( aImgSize );
+ maJobPage.maCollateImage.SetImage( bHC ? aHCImg : aImg );
+ maJobPage.maCollateImage.SetModeImage( aHCImg, BMP_COLOR_HIGHCONTRAST );
+
+ // enable setup button only for printers that can be setup
+ bool bHaveSetup = maPController->getPrinter()->HasSupport( SUPPORT_SETUPDIALOG );
+ maJobPage.maSetupButton.Enable( bHaveSetup );
+ if( bHaveSetup )
+ {
+ if( ! maJobPage.maSetupButton.IsVisible() )
+ {
+ Point aPrinterPos( maJobPage.maPrinters.GetPosPixel() );
+ Point aSetupPos( maJobPage.maSetupButton.GetPosPixel() );
+ Size aPrinterSize( maJobPage.maPrinters.GetSizePixel() );
+ aPrinterSize.Width() = aSetupPos.X() - aPrinterPos.X() - LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ).Width();
+ maJobPage.maPrinters.SetSizePixel( aPrinterSize );
+ maJobPage.maSetupButton.Show();
+ maLayout.resize();
+ }
+ }
+ else
+ {
+ if( maJobPage.maSetupButton.IsVisible() )
+ {
+ Point aPrinterPos( maJobPage.maPrinters.GetPosPixel() );
+ Point aSetupPos( maJobPage.maSetupButton.GetPosPixel() );
+ Size aPrinterSize( maJobPage.maPrinters.GetSizePixel() );
+ Size aSetupSize( maJobPage.maSetupButton.GetSizePixel() );
+ aPrinterSize.Width() = aSetupPos.X() + aSetupSize.Width() - aPrinterPos.X();
+ maJobPage.maPrinters.SetSizePixel( aPrinterSize );
+ maJobPage.maSetupButton.Hide();
+ maLayout.resize();
+ }
+ }
+}
+
+void PrintDialog::checkOptionalControlDependencies()
+{
+ for( std::map< Window*, rtl::OUString >::iterator it = maControlToPropertyMap.begin();
+ it != maControlToPropertyMap.end(); ++it )
+ {
+ bool bShouldbeEnabled = maPController->isUIOptionEnabled( it->second );
+ if( ! bShouldbeEnabled )
+ {
+ // enable controls that are directly attached to a dependency anyway
+ // if the normally disabled controls get modified, change the dependency
+ // so the control would be enabled
+ // example: in print range "Print All" is selected, "Page Range" is then of course
+ // not selected and the Edit for the Page Range would be disabled
+ // as a convenience we should enable the Edit anyway and automatically select
+ // "Page Range" instead of "Print All" if the Edit gets modified
+ if( maReverseDependencySet.find( it->second ) != maReverseDependencySet.end() )
+ {
+ rtl::OUString aDep( maPController->getDependency( it->second ) );
+ // if the dependency is at least enabled, then enable this control anyway
+ if( aDep.getLength() && maPController->isUIOptionEnabled( aDep ) )
+ bShouldbeEnabled = true;
+ }
+ }
+
+ bool bIsEnabled = it->first->IsEnabled();
+ // Enable does not do a change check first, so can be less cheap than expected
+ if( bShouldbeEnabled != bIsEnabled )
+ it->first->Enable( bShouldbeEnabled );
+ }
+}
+
+static rtl::OUString searchAndReplace( const rtl::OUString& i_rOrig, const char* i_pRepl, sal_Int32 i_nReplLen, const rtl::OUString& i_rRepl )
+{
+ sal_Int32 nPos = i_rOrig.indexOfAsciiL( i_pRepl, i_nReplLen );
+ if( nPos != -1 )
+ {
+ rtl::OUStringBuffer aBuf( i_rOrig.getLength() );
+ aBuf.append( i_rOrig.getStr(), nPos );
+ aBuf.append( i_rRepl );
+ if( nPos + i_nReplLen < i_rOrig.getLength() )
+ aBuf.append( i_rOrig.getStr() + nPos + i_nReplLen );
+ return aBuf.makeStringAndClear();
+ }
+ return i_rOrig;
+}
+
+void PrintDialog::updatePrinterText()
+{
+ String aDefPrt( Printer::GetDefaultPrinterName() );
+ const QueueInfo* pInfo = Printer::GetQueueInfo( maJobPage.maPrinters.GetSelectEntry(), true );
+ if( pInfo )
+ {
+ maJobPage.maLocationTxt.SetText( pInfo->GetLocation() );
+ maJobPage.maCommentTxt.SetText( pInfo->GetComment() );
+ // FIXME: status text
+ rtl::OUString aStatus;
+ if( aDefPrt == pInfo->GetPrinterName() )
+ aStatus = maDefPrtText;
+ maJobPage.maStatusTxt.SetText( aStatus );
+ }
+ else
+ {
+ maJobPage.maLocationTxt.SetText( String() );
+ maJobPage.maCommentTxt.SetText( String() );
+ maJobPage.maStatusTxt.SetText( String() );
+ }
+}
+
+void PrintDialog::setPreviewText( sal_Int32 )
+{
+ rtl::OUString aNewText( searchAndReplace( maPageStr, "%n", 2, rtl::OUString::valueOf( mnCachedPages ) ) );
+ maNumPagesText.SetText( aNewText );
+
+ // if layout is already established the refresh layout of
+ // preview controls since text length may have changes
+ if( mxPreviewCtrls.get() )
+ mxPreviewCtrls->setManagedArea( mxPreviewCtrls->getManagedArea() );
+}
+
+void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
+{
+ // page range may have changed depending on options
+ sal_Int32 nPages = maPController->getFilteredPageCount();
+ mnCachedPages = nPages;
+
+ if( mnCurPage >= nPages )
+ mnCurPage = nPages-1;
+ if( mnCurPage < 0 )
+ mnCurPage = 0;
+
+ setPreviewText( mnCurPage );
+
+ maPageEdit.SetMin( 1 );
+ maPageEdit.SetMax( nPages );
+
+ if( i_bNewPage )
+ {
+ const MapMode aMapMode( MAP_100TH_MM );
+ GDIMetaFile aMtf;
+ boost::shared_ptr<Printer> aPrt( maPController->getPrinter() );
+ if( nPages > 0 )
+ {
+ PrinterController::PageSize aPageSize =
+ maPController->getFilteredPageFile( mnCurPage, aMtf, i_bMayUseCache );
+ if( ! aPageSize.bFullPaper )
+ {
+ Point aOff( aPrt->PixelToLogic( aPrt->GetPageOffsetPixel(), aMapMode ) );
+ aMtf.Move( aOff.X(), aOff.Y() );
+ }
+ }
+
+ Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
+ maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr,
+ aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY()
+ );
+
+ maForwardBtn.Enable( mnCurPage < nPages-1 );
+ maBackwardBtn.Enable( mnCurPage != 0 );
+ maPageEdit.Enable( nPages > 1 );
+ }
+}
+
+Size PrintDialog::getJobPageSize()
+{
+ if( maFirstPageSize.Width() == 0 && maFirstPageSize.Height() == 0)
+ {
+ maFirstPageSize = maNupPortraitSize;
+ GDIMetaFile aMtf;
+ if( maPController->getPageCountProtected() > 0 )
+ {
+ PrinterController::PageSize aPageSize = maPController->getPageFile( 0, aMtf, true );
+ maFirstPageSize = aPageSize.aSize;
+ }
+ }
+ return maFirstPageSize;
+}
+
+void PrintDialog::updateNupFromPages()
+{
+ long nPages = long(maNUpPage.maNupPagesBox.GetEntryData(maNUpPage.maNupPagesBox.GetSelectEntryPos()));
+ int nRows = int(maNUpPage.maNupRowsEdt.GetValue());
+ int nCols = int(maNUpPage.maNupColEdt.GetValue());
+ long nPageMargin = long(maNUpPage.maPageMarginEdt.Denormalize(maNUpPage.maPageMarginEdt.GetValue( FUNIT_100TH_MM )));
+ long nSheetMargin = long(maNUpPage.maSheetMarginEdt.Denormalize(maNUpPage.maSheetMarginEdt.GetValue( FUNIT_100TH_MM )));
+ bool bCustom = false;
+
+ if( nPages == 1 )
+ {
+ nRows = nCols = 1;
+ nSheetMargin = 0;
+ nPageMargin = 0;
+ }
+ else if( nPages == 2 || nPages == 4 || nPages == 6 || nPages == 9 || nPages == 16 )
+ {
+ Size aJobPageSize( getJobPageSize() );
+ bool bPortrait = aJobPageSize.Width() < aJobPageSize.Height();
+ if( nPages == 2 )
+ {
+ if( bPortrait )
+ nRows = 1, nCols = 2;
+ else
+ nRows = 2, nCols = 1;
+ }
+ else if( nPages == 4 )
+ nRows = nCols = 2;
+ else if( nPages == 6 )
+ {
+ if( bPortrait )
+ nRows = 2, nCols = 3;
+ else
+ nRows = 3, nCols = 2;
+ }
+ else if( nPages == 9 )
+ nRows = nCols = 3;
+ else if( nPages == 16 )
+ nRows = nCols = 4;
+ nPageMargin = 0;
+ nSheetMargin = 0;
+ }
+ else
+ bCustom = true;
+
+ if( nPages > 1 )
+ {
+ // set upper limits for margins based on job page size and rows/columns
+ Size aSize( getJobPageSize() );
+
+ // maximum sheet distance: 1/2 sheet
+ long nHorzMax = aSize.Width()/2;
+ long nVertMax = aSize.Height()/2;
+ if( nSheetMargin > nHorzMax )
+ nSheetMargin = nHorzMax;
+ if( nSheetMargin > nVertMax )
+ nSheetMargin = nVertMax;
+
+ maNUpPage.maSheetMarginEdt.SetMax(
+ maNUpPage.maSheetMarginEdt.Normalize(
+ nHorzMax > nVertMax ? nVertMax : nHorzMax ), FUNIT_100TH_MM );
+
+ // maximum page distance
+ nHorzMax = (aSize.Width() - 2*nSheetMargin);
+ if( nCols > 1 )
+ nHorzMax /= (nCols-1);
+ nVertMax = (aSize.Height() - 2*nSheetMargin);
+ if( nRows > 1 )
+ nHorzMax /= (nRows-1);
+
+ if( nPageMargin > nHorzMax )
+ nPageMargin = nHorzMax;
+ if( nPageMargin > nVertMax )
+ nPageMargin = nVertMax;
+
+ maNUpPage.maPageMarginEdt.SetMax(
+ maNUpPage.maSheetMarginEdt.Normalize(
+ nHorzMax > nVertMax ? nVertMax : nHorzMax ), FUNIT_100TH_MM );
+ }
+
+ maNUpPage.maNupRowsEdt.SetValue( nRows );
+ maNUpPage.maNupColEdt.SetValue( nCols );
+ maNUpPage.maPageMarginEdt.SetValue( maNUpPage.maPageMarginEdt.Normalize( nPageMargin ), FUNIT_100TH_MM );
+ maNUpPage.maSheetMarginEdt.SetValue( maNUpPage.maSheetMarginEdt.Normalize( nSheetMargin ), FUNIT_100TH_MM );
+
+ maNUpPage.showAdvancedControls( bCustom );
+ if( bCustom )
+ {
+ // see if we have to enlarge the dialog to make the tab page fit
+ Size aCurSize( maNUpPage.maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ) );
+ Size aTabSize( maTabCtrl.GetTabPageSizePixel() );
+ if( aTabSize.Height() < aCurSize.Height() )
+ {
+ Size aDlgSize( GetSizePixel() );
+ aDlgSize.Height() += aCurSize.Height() - aTabSize.Height();
+ SetSizePixel( aDlgSize );
+ }
+ }
+
+ updateNup();
+}
+
+void PrintDialog::updateNup()
+{
+ int nRows = int(maNUpPage.maNupRowsEdt.GetValue());
+ int nCols = int(maNUpPage.maNupColEdt.GetValue());
+ long nPageMargin = long(maNUpPage.maPageMarginEdt.Denormalize(maNUpPage.maPageMarginEdt.GetValue( FUNIT_100TH_MM )));
+ long nSheetMargin = long(maNUpPage.maSheetMarginEdt.Denormalize(maNUpPage.maSheetMarginEdt.GetValue( FUNIT_100TH_MM )));
+
+ PrinterController::MultiPageSetup aMPS;
+ aMPS.nRows = nRows;
+ aMPS.nColumns = nCols;
+ aMPS.nRepeat = 1;
+ aMPS.nLeftMargin =
+ aMPS.nTopMargin =
+ aMPS.nRightMargin =
+ aMPS.nBottomMargin = nSheetMargin;
+
+ aMPS.nHorizontalSpacing =
+ aMPS.nVerticalSpacing = nPageMargin;
+
+ aMPS.bDrawBorder = maNUpPage.maBorderCB.IsChecked();
+
+ int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData(
+ maNUpPage.maNupOrderBox.GetSelectEntryPos() )));
+ if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTD )
+ aMPS.nOrder = PrinterController::LRTB;
+ else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TDLR )
+ aMPS.nOrder = PrinterController::TBLR;
+
+ int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData(
+ maNUpPage.maNupOrientationBox.GetSelectEntryPos() )));
+ if( nOrientationMode == SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE )
+ aMPS.aPaperSize = maNupLandscapeSize;
+ else if( nOrientationMode == SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT )
+ aMPS.aPaperSize = maNupPortraitSize;
+ else // automatic mode
+ {
+ // get size of first real page to see if it is portrait or landscape
+ // we assume same page sizes for all the pages for this
+ Size aPageSize = getJobPageSize();
+
+ Size aMultiSize( aPageSize.Width() * nCols, aPageSize.Height() * nRows );
+ if( aMultiSize.Width() > aMultiSize.Height() ) // fits better on landscape
+ aMPS.aPaperSize = maNupLandscapeSize;
+ else
+ aMPS.aPaperSize = maNupPortraitSize;
+ }
+
+ maPController->setMultipage( aMPS );
+
+ maNUpPage.maNupOrderWin.setValues( nOrderMode, nCols, nRows );
+
+ preparePreview( true, true );
+}
+
+IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
+{
+ if( pBox == &maJobPage.maPrinters )
+ {
+ String aNewPrinter( pBox->GetSelectEntry() );
+ // set new printer
+ maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( aNewPrinter ) ) );
+ // update text fields
+ updatePrinterText();
+ }
+ else if( pBox == &maNUpPage.maNupOrientationBox || pBox == &maNUpPage.maNupOrderBox )
+ {
+ updateNup();
+ }
+ else if( pBox == &maNUpPage.maNupPagesBox )
+ {
+ if( !maNUpPage.maPagesBtn.IsChecked() )
+ maNUpPage.maPagesBtn.Check();
+ updateNupFromPages();
+ }
+
+ return 0;
+}
+
+IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
+{
+ if( pButton == &maOKButton || pButton == &maCancelButton )
+ {
+ storeToSettings();
+ EndDialog( pButton == &maOKButton );
+ }
+ else if( pButton == &maHelpButton )
+ {
+ // start help system
+ Help* pHelp = Application::GetHelp();
+ if( pHelp )
+ {
+ // FIXME: find out proper help URL and use here
+ pHelp->Start( HID_PRINTDLG, GetParent() );
+ }
+ }
+ else if( pButton == &maForwardBtn )
+ {
+ previewForward();
+ }
+ else if( pButton == &maBackwardBtn )
+ {
+ previewBackward();
+ }
+ else if( pButton == &maOptionsPage.maToFileBox )
+ {
+ maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
+ maLayout.resize();
+ }
+ else if( pButton == &maNUpPage.maBrochureBtn )
+ {
+ PropertyValue* pVal = getValueForWindow( pButton );
+ if( pVal )
+ {
+ sal_Bool bVal = maNUpPage.maBrochureBtn.IsChecked();
+ pVal->Value <<= bVal;
+
+ checkOptionalControlDependencies();
+
+ // update preview and page settings
+ preparePreview();
+ }
+ if( maNUpPage.maBrochureBtn.IsChecked() )
+ {
+ maNUpPage.maNupPagesBox.SelectEntryPos( 0 );
+ updateNupFromPages();
+ maNUpPage.showAdvancedControls( false );
+ maNUpPage.enableNupControls( false );
+ }
+ }
+ else if( pButton == &maNUpPage.maPagesBtn )
+ {
+ maNUpPage.enableNupControls( true );
+ updateNupFromPages();
+ }
+ else if( pButton == &maJobPage.maDetailsBtn )
+ {
+ bool bShow = maJobPage.maDetailsBtn.IsChecked();
+ maJobPage.mxDetails->show( bShow );
+ if( bShow )
+ {
+ maDetailsCollapsedSize = GetOutputSizePixel();
+ // enlarge dialog if necessary
+ Size aMinSize( maJobPage.maLayout.getOptimalSize( WINDOWSIZE_MINIMUM ) );
+ Size aCurSize( maJobPage.GetSizePixel() );
+ if( aCurSize.Height() < aMinSize.Height() )
+ {
+ Size aDlgSize( GetOutputSizePixel() );
+ aDlgSize.Height() += aMinSize.Height() - aCurSize.Height();
+ SetOutputSizePixel( aDlgSize );
+ }
+ maDetailsExpandedSize = GetOutputSizePixel();
+ }
+ else if( maDetailsCollapsedSize.Width() > 0 &&
+ maDetailsCollapsedSize.Height() > 0 )
+ {
+ // if the user did not resize the dialog
+ // make it smaller again on collapsing the details
+ Size aDlgSize( GetOutputSizePixel() );
+ if( aDlgSize == maDetailsExpandedSize &&
+ aDlgSize.Height() > maDetailsCollapsedSize.Height() )
+ {
+ SetOutputSizePixel( maDetailsCollapsedSize );
+ }
+ }
+ }
+ else if( pButton == &maJobPage.maCollateBox )
+ {
+ maPController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ),
+ makeAny( sal_Bool(isCollate()) ) );
+ checkControlDependencies();
+ }
+ else if( pButton == &maOptionsPage.maReverseOrderBox )
+ {
+ sal_Bool bChecked = maOptionsPage.maReverseOrderBox.IsChecked();
+ maPController->setReversePrint( bChecked );
+ maPController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintReverse" ) ),
+ makeAny( bChecked ) );
+ preparePreview( true, true );
+ }
+ else if( pButton == &maNUpPage.maBorderCB )
+ {
+ updateNup();
+ }
+ else
+ {
+ if( pButton == &maJobPage.maSetupButton )
+ {
+ maPController->setupPrinter( this );
+ preparePreview( true, true );
+ }
+ checkControlDependencies();
+ }
+ return 0;
+}
+
+IMPL_LINK( PrintDialog, ModifyHdl, Edit*, pEdit )
+{
+ checkControlDependencies();
+ if( pEdit == &maNUpPage.maNupRowsEdt || pEdit == &maNUpPage.maNupColEdt ||
+ pEdit == &maNUpPage.maSheetMarginEdt || pEdit == &maNUpPage.maPageMarginEdt
+ )
+ {
+ updateNupFromPages();
+ }
+ else if( pEdit == &maPageEdit )
+ {
+ mnCurPage = sal_Int32( maPageEdit.GetValue() - 1 );
+ preparePreview( true, true );
+ }
+ else if( pEdit == &maJobPage.maCopyCountField )
+ {
+ maPController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CopyCount" ) ),
+ makeAny( sal_Int32(maJobPage.maCopyCountField.GetValue()) ) );
+ maPController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ),
+ makeAny( sal_Bool(isCollate()) ) );
+ }
+ return 0;
+}
+
+IMPL_LINK( PrintDialog, UIOptionsChanged, void*, EMPTYARG )
+{
+ checkOptionalControlDependencies();
+ return 0;
+}
+
+PropertyValue* PrintDialog::getValueForWindow( Window* i_pWindow ) const
+{
+ PropertyValue* pVal = NULL;
+ std::map< Window*, rtl::OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow );
+ if( it != maControlToPropertyMap.end() )
+ {
+ pVal = maPController->getValue( it->second );
+ DBG_ASSERT( pVal, "property value not found" );
+ }
+ else
+ {
+ DBG_ERROR( "changed control not in property map" );
+ }
+ return pVal;
+}
+
+void PrintDialog::updateWindowFromProperty( const rtl::OUString& i_rProperty )
+{
+ beans::PropertyValue* pValue = maPController->getValue( i_rProperty );
+ std::map< rtl::OUString, std::vector< Window* > >::const_iterator it = maPropertyToWindowMap.find( i_rProperty );
+ if( pValue && it != maPropertyToWindowMap.end() )
+ {
+ const std::vector< Window* >& rWindows( it->second );
+ if( ! rWindows.empty() )
+ {
+ sal_Bool bVal = sal_False;
+ sal_Int32 nVal = -1;
+ if( pValue->Value >>= bVal )
+ {
+ // we should have a CheckBox for this one
+ CheckBox* pBox = dynamic_cast< CheckBox* >( rWindows.front() );
+ if( pBox )
+ {
+ pBox->Check( bVal );
+ }
+ else if( i_rProperty.equalsAscii( "PrintProspect" ) )
+ {
+ // EVIL special case
+ if( bVal )
+ maNUpPage.maBrochureBtn.Check();
+ else
+ maNUpPage.maPagesBtn.Check();
+ }
+ else
+ {
+ DBG_ASSERT( 0, "missing a checkbox" );
+ }
+ }
+ else if( pValue->Value >>= nVal )
+ {
+ // this could be a ListBox or a RadioButtonGroup
+ ListBox* pList = dynamic_cast< ListBox* >( rWindows.front() );
+ if( pList )
+ {
+ pList->SelectEntryPos( static_cast< USHORT >(nVal) );
+ }
+ else if( nVal >= 0 && nVal < sal_Int32(rWindows.size() ) )
+ {
+ RadioButton* pBtn = dynamic_cast< RadioButton* >( rWindows[nVal] );
+ DBG_ASSERT( pBtn, "unexpected control for property" );
+ if( pBtn )
+ pBtn->Check();
+ }
+ }
+ }
+ }
+}
+
+void PrintDialog::makeEnabled( Window* i_pWindow )
+{
+ std::map< Window*, rtl::OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow );
+ if( it != maControlToPropertyMap.end() )
+ {
+ rtl::OUString aDependency( maPController->makeEnabled( it->second ) );
+ if( aDependency.getLength() )
+ updateWindowFromProperty( aDependency );
+ }
+}
+
+IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox )
+{
+ PropertyValue* pVal = getValueForWindow( i_pBox );
+ if( pVal )
+ {
+ makeEnabled( i_pBox );
+
+ sal_Bool bVal = i_pBox->IsChecked();
+ pVal->Value <<= bVal;
+
+ checkOptionalControlDependencies();
+
+ // update preview and page settings
+ preparePreview();
+ }
+ return 0;
+}
+
+IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
+{
+ // this handler gets called for all radiobuttons that get unchecked, too
+ // however we only want one notificaction for the new value (that is for
+ // the button that gets checked)
+ if( i_pBtn->IsChecked() )
+ {
+ PropertyValue* pVal = getValueForWindow( i_pBtn );
+ std::map< Window*, sal_Int32 >::const_iterator it = maControlToNumValMap.find( i_pBtn );
+ if( pVal && it != maControlToNumValMap.end() )
+ {
+ makeEnabled( i_pBtn );
+
+ sal_Int32 nVal = it->second;
+ pVal->Value <<= nVal;
+
+ checkOptionalControlDependencies();
+
+ // update preview and page settings
+ preparePreview();
+ }
+ }
+ return 0;
+}
+
+IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox )
+{
+ PropertyValue* pVal = getValueForWindow( i_pBox );
+ if( pVal )
+ {
+ makeEnabled( i_pBox );
+
+ sal_Int32 nVal( i_pBox->GetSelectEntryPos() );
+ pVal->Value <<= nVal;
+
+ checkOptionalControlDependencies();
+
+ // update preview and page settings
+ preparePreview();
+ }
+ return 0;
+}
+
+IMPL_LINK( PrintDialog, UIOption_ModifyHdl, Edit*, i_pBox )
+{
+ PropertyValue* pVal = getValueForWindow( i_pBox );
+ if( pVal )
+ {
+ makeEnabled( i_pBox );
+
+ NumericField* pNum = dynamic_cast<NumericField*>(i_pBox);
+ MetricField* pMetric = dynamic_cast<MetricField*>(i_pBox);
+ if( pNum )
+ {
+ sal_Int64 nVal = pNum->GetValue();
+ pVal->Value <<= nVal;
+ }
+ else if( pMetric )
+ {
+ sal_Int64 nVal = pMetric->GetValue();
+ pVal->Value <<= nVal;
+ }
+ else
+ {
+ rtl::OUString aVal( i_pBox->GetText() );
+ pVal->Value <<= aVal;
+ }
+
+ checkOptionalControlDependencies();
+
+ // update preview and page settings
+ preparePreview();
+ }
+ return 0;
+}
+
+void PrintDialog::Command( const CommandEvent& rEvt )
+{
+ if( rEvt.GetCommand() == COMMAND_WHEEL )
+ {
+ const CommandWheelData* pWheelData = rEvt.GetWheelData();
+ if( pWheelData->GetDelta() > 0 )
+ previewForward();
+ else if( pWheelData->GetDelta() < 0 )
+ previewBackward();
+ /*
+ else
+ huh ?
+ */
+ }
+}
+
+void PrintDialog::Resize()
+{
+ maLayout.setManagedArea( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
+ // and do the preview; however the metafile does not need to be gotten anew
+ preparePreview( false );
+
+ // do an invalidate for the benefit of the grouping elements
+ Invalidate();
+}
+
+void PrintDialog::previewForward()
+{
+ maPageEdit.Up();
+}
+
+void PrintDialog::previewBackward()
+{
+ maPageEdit.Down();
+}
+
+// -----------------------------------------------------------------------------
+//
+// PrintProgressDialog
+//
+// -----------------------------------------------------------------------------
+
+PrintProgressDialog::PrintProgressDialog( Window* i_pParent, int i_nMax ) :
+ ModelessDialog( i_pParent, VclResId( SV_DLG_PRINT_PROGRESS ) ),
+ maText( this, VclResId( SV_PRINT_PROGRESS_TEXT ) ),
+ maButton( this, VclResId( SV_PRINT_PROGRESS_CANCEL ) ),
+ mbCanceled( false ),
+ mnCur( 0 ),
+ mnMax( i_nMax ),
+ mnProgressHeight( 15 ),
+ mbNativeProgress( false )
+{
+ FreeResource();
+
+ if( mnMax < 1 )
+ mnMax = 1;
+
+ maStr = maText.GetText();
+
+ maButton.SetClickHdl( LINK( this, PrintProgressDialog, ClickHdl ) );
+
+}
+
+PrintProgressDialog::~PrintProgressDialog()
+{
+}
+
+IMPL_LINK( PrintProgressDialog, ClickHdl, Button*, pButton )
+{
+ if( pButton == &maButton )
+ mbCanceled = true;
+
+ return 0;
+}
+
+void PrintProgressDialog::implCalcProgressRect()
+{
+ if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
+ {
+ ImplControlValue aValue;
+ Region aControlRegion( Rectangle( Point(), Size( 100, mnProgressHeight ) ) );
+ Region aNativeControlRegion, aNativeContentRegion;
+ if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
+ CTRL_STATE_ENABLED, aValue, rtl::OUString(),
+ aNativeControlRegion, aNativeContentRegion ) )
+ {
+ mnProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight();
+ }
+ mbNativeProgress = true;
+ }
+ maProgressRect = Rectangle( Point( 10, maText.GetPosPixel().Y() + maText.GetSizePixel().Height() + 8 ),
+ Size( GetSizePixel().Width() - 20, mnProgressHeight ) );
+}
+
+void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax )
+{
+ if( maProgressRect.IsEmpty() )
+ implCalcProgressRect();
+
+ mnCur = i_nCurrent;
+ if( i_nMax != -1 )
+ mnMax = i_nMax;
+
+ if( mnMax < 1 )
+ mnMax = 1;
+
+ rtl::OUString aNewText( searchAndReplace( maStr, "%p", 2, rtl::OUString::valueOf( mnCur ) ) );
+ aNewText = searchAndReplace( aNewText, "%n", 2, rtl::OUString::valueOf( mnMax ) );
+ maText.SetText( aNewText );
+
+ // update progress
+ Invalidate( maProgressRect, INVALIDATE_UPDATE );
+}
+
+void PrintProgressDialog::tick()
+{
+ if( mnCur < mnMax )
+ setProgress( ++mnCur );
+}
+
+void PrintProgressDialog::Paint( const Rectangle& )
+{
+ if( maProgressRect.IsEmpty() )
+ implCalcProgressRect();
+
+ Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ Color aPrgsColor = rStyleSettings.GetHighlightColor();
+ if ( aPrgsColor == rStyleSettings.GetFaceColor() )
+ aPrgsColor = rStyleSettings.GetDarkShadowColor();
+ SetLineColor();
+ SetFillColor( aPrgsColor );
+
+ const long nOffset = 3;
+ const long nWidth = 3*mnProgressHeight/2;
+ const long nFullWidth = nWidth + nOffset;
+ const long nMaxCount = maProgressRect.GetWidth() / nFullWidth;
+ DrawProgress( this, maProgressRect.TopLeft(),
+ nOffset,
+ nWidth,
+ mnProgressHeight,
+ static_cast<USHORT>(0),
+ static_cast<USHORT>(10000*mnCur/mnMax),
+ static_cast<USHORT>(10000/nMaxCount),
+ maProgressRect
+ );
+ Pop();
+
+ if( ! mbNativeProgress )
+ {
+ DecorationView aDecoView( this );
+ Rectangle aFrameRect( maProgressRect );
+ aFrameRect.Left() -= nOffset;
+ aFrameRect.Right() += nOffset;
+ aFrameRect.Top() -= nOffset;
+ aFrameRect.Bottom() += nOffset;
+ aDecoView.DrawFrame( aFrameRect );
+ }
+}
+
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 8aa4926f5e1a..ef58ea9e6bc6 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -229,6 +229,22 @@ int ToolBox::ImplGetDragWidth( ToolBox* pThis )
}
return width;
}
+
+ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
+{
+ ButtonType tmpButtonType = defaultType;
+ ToolBoxItemBits nBits( pItem->mnBits & 0x300 );
+ if ( nBits & TIB_TEXTICON ) // item has custom setting
+ {
+ tmpButtonType = BUTTON_SYMBOLTEXT;
+ if ( nBits == TIB_TEXT_ONLY )
+ tmpButtonType = BUTTON_TEXT;
+ else if ( nBits == TIB_ICON_ONLY )
+ tmpButtonType = BUTTON_SYMBOL;
+ }
+ return tmpButtonType;
+}
+
// -----------------------------------------------------------------------
void ToolBox::ImplUpdateDragArea( ToolBox *pThis )
@@ -1992,12 +2008,13 @@ BOOL ToolBox::ImplCalcItem()
bText = FALSE;
else
bText = TRUE;
-
+ ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting
if ( bImage || bText )
{
+
it->mbEmptyBtn = FALSE;
- if ( meButtonType == BUTTON_SYMBOL )
+ if ( tmpButtonType == BUTTON_SYMBOL )
{
// we're drawing images only
if ( bImage || !bText )
@@ -2011,7 +2028,7 @@ BOOL ToolBox::ImplCalcItem()
it->mbVisibleText = TRUE;
}
}
- else if ( meButtonType == BUTTON_TEXT )
+ else if ( tmpButtonType == BUTTON_TEXT )
{
// we're drawing text only
if ( bText || !bImage )
@@ -3625,7 +3642,8 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
// determine what has to be drawn on the button: image, text or both
BOOL bImage;
BOOL bText;
- pItem->DetermineButtonDrawStyle( meButtonType, bImage, bText );
+ ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting
+ pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText );
// compute output values
long nBtnWidth = aBtnSize.Width()-SMALLBUTTON_HSIZE;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bcf86c749673..ca0ebb10a4e9 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -698,6 +698,7 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mbCallHandlersDuringInputDisabled = FALSE; // TRUE: call event handlers even if input is disabled
mpWindowImpl->mbDisableAccessibleLabelForRelation = FALSE; // TRUE: do not set LabelFor relation on accessible objects
mpWindowImpl->mbDisableAccessibleLabeledByRelation = FALSE; // TRUE: do not set LabeledBy relation on accessible objects
+ mpWindowImpl->mbHelpTextDynamic = FALSE; // TRUE: append help id in HELP_DEBUG case
mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // TRUE: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
}
@@ -1279,7 +1280,10 @@ void Window::ImplLoadRes( const ResId& rResId )
if ( nObjMask & WINDOW_TEXT )
SetText( ReadStringRes() );
if ( nObjMask & WINDOW_HELPTEXT )
+ {
SetHelpText( ReadStringRes() );
+ mpWindowImpl->mbHelpTextDynamic = TRUE;
+ }
if ( nObjMask & WINDOW_QUICKTEXT )
SetQuickHelpText( ReadStringRes() );
if ( nObjMask & WINDOW_EXTRALONG )
@@ -8109,9 +8113,26 @@ const XubString& Window::GetHelpText() const
((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
else
((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( nNumHelpId, this );
+ mpWindowImpl->mbHelpTextDynamic = FALSE;
}
}
}
+ else if( mpWindowImpl->mbHelpTextDynamic && (nNumHelpId || bStrHelpId) )
+ {
+ static const char* pEnv = getenv( "HELP_DEBUG" );
+ if( pEnv && *pEnv )
+ {
+ rtl::OUStringBuffer aTxt( 64+mpWindowImpl->maHelpText.Len() );
+ aTxt.append( mpWindowImpl->maHelpText );
+ aTxt.appendAscii( "\n+++++++++++++++\n" );
+ if( bStrHelpId )
+ aTxt.append( rtl::OUString( aStrHelpId ) );
+ else
+ aTxt.append( sal_Int32( nNumHelpId ) );
+ mpWindowImpl->maHelpText = aTxt.makeStringAndClear();
+ }
+ mpWindowImpl->mbHelpTextDynamic = FALSE;
+ }
return mpWindowImpl->maHelpText;
}
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index d70f607a6cc6..a9bc93863829 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1459,7 +1459,6 @@ ULONG Window::GetHelpId() const
void Window::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
{
- mpWindowImpl->maHelpText = String();
// create SmartId if required
if ( (aMode == SMART_SET_STR) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasString() ) )
{
@@ -2000,6 +1999,7 @@ BOOL Window::IsZoom() const
void Window::SetHelpText( const XubString& rHelpText )
{
mpWindowImpl->maHelpText = rHelpText;
+ mpWindowImpl->mbHelpTextDynamic = TRUE;
}
void Window::SetQuickHelpText( const XubString& rHelpText )
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index f922552ce923..654f39c51a92 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1091,6 +1091,19 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeContentRegion = Region( aIndicatorRect );
returnVal = TRUE;
}
+ if( (nType == CTRL_EDITBOX || nType == CTRL_SPINBOX) && nPart == PART_ENTIRE_CONTROL )
+ {
+ NWEnsureGTKEditBox( m_nScreen );
+ GtkWidget* widget = gWidgetData[m_nScreen].gEditBoxWidget;
+ GtkRequisition aReq;
+ gtk_widget_size_request( widget, &aReq );
+ Rectangle aEditRect = rControlRegion.GetBoundRect();
+ aEditRect = Rectangle( aEditRect.TopLeft(),
+ Size( aEditRect.GetWidth(), aReq.height+1 ) );
+ rNativeBoundingRegion = Region( aEditRect );
+ rNativeContentRegion = rNativeBoundingRegion;
+ returnVal = TRUE;
+ }
return( returnVal );
}
diff --git a/vcl/unx/headless/svpprn.cxx b/vcl/unx/headless/svpprn.cxx
index 1882b50e6ad7..75d86959b2b5 100644
--- a/vcl/unx/headless/svpprn.cxx
+++ b/vcl/unx/headless/svpprn.cxx
@@ -123,6 +123,32 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->mnPaperBin = 0xffff;
}
+ // copy duplex
+ pKey = NULL;
+ pValue = NULL;
+
+ pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
+ if( rData.m_pParser )
+ pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ if( pKey )
+ pValue = rData.m_aContext.getValue( pKey );
+ if( pKey && pValue )
+ {
+ if( pValue->m_aOption.EqualsIgnoreCaseAscii( "None" ) ||
+ pValue->m_aOption.EqualsIgnoreCaseAscii( "Simplex", 0, 7 )
+ )
+ {
+ pJobSetup->meDuplexMode = DUPLEX_OFF;
+ }
+ else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexNoTumble" ) )
+ {
+ pJobSetup->meDuplexMode = DUPLEX_LONGEDGE;
+ }
+ else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexTumble" ) )
+ {
+ pJobSetup->meDuplexMode = DUPLEX_SHORTEDGE;
+ }
+ }
// copy the whole context
if( pJobSetup->mpDriverData )
@@ -455,34 +481,6 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* )
// -----------------------------------------------------------------------
-DuplexMode PspSalInfoPrinter::GetDuplexMode( const ImplJobSetup* pJobSetup )
-{
- DuplexMode aRet = DUPLEX_UNKNOWN;
- PrinterInfo aInfo( PrinterInfoManager::get().getPrinterInfo( pJobSetup->maPrinterName ) );
- if ( pJobSetup->mpDriverData )
- JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo );
- if( aInfo.m_pParser )
- {
- const PPDKey * pKey = aInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
- if( pKey )
- {
- const PPDValue* pVal = aInfo.m_aContext.getValue( pKey );
- if( pVal && (
- pVal->m_aOption.EqualsIgnoreCaseAscii( "None" ) ||
- pVal->m_aOption.EqualsIgnoreCaseAscii( "Simplex", 0, 7 )
- ) )
- {
- aRet = DUPLEX_OFF;
- }
- else
- aRet = DUPLEX_ON;
- }
- }
- return aRet;
-}
-
-// -----------------------------------------------------------------------
-
int PspSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* )
{
return 900;
@@ -624,6 +622,37 @@ BOOL PspSalInfoPrinter::SetData(
if( nSetDataFlags & SAL_JOBSET_ORIENTATION )
aData.m_eOrientation = pJobSetup->meOrientation == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait;
+ // merge duplex if necessary
+ if( nSetDataFlags & SAL_JOBSET_DUPLEXMODE )
+ {
+ pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ if( pKey )
+ {
+ pValue = NULL;
+ switch( pJobSetup->meDuplexMode )
+ {
+ case DUPLEX_OFF:
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) );
+ if( pValue == NULL )
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "SimplexNoTumble" ) ) );
+ break;
+ case DUPLEX_SHORTEDGE:
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexTumble" ) ) );
+ break;
+ case DUPLEX_LONGEDGE:
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexNoTumble" ) ) );
+ break;
+ case DUPLEX_UNKNOWN:
+ default:
+ pValue = 0;
+ break;
+ }
+ if( ! pValue )
+ pValue = pKey->getDefaultValue();
+ aData.m_aContext.setValue( pKey, pValue );
+ }
+ }
+
m_aJobData = aData;
copyJobDataToJobSetup( pJobSetup, aData );
return TRUE;
@@ -725,9 +754,22 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
case PRINTER_CAPABILITIES_COPIES:
return 0xffff;
case PRINTER_CAPABILITIES_COLLATECOPIES:
- return 0;
+ {
+ // see if the PPD contains a value to set Collate to True
+ JobData aData;
+ JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
+
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ) : NULL;
+ const PPDValue* pVal = pKey ? pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ) : NULL;
+
+ // PPDs don't mention the number of possible collated copies.
+ // so let's guess as many as we want ?
+ return pVal ? 0xffff : 0;
+ }
case PRINTER_CAPABILITIES_SETORIENTATION:
return 1;
+ case PRINTER_CAPABILITIES_SETDUPLEX:
+ return 1;
case PRINTER_CAPABILITIES_SETPAPERBIN:
return 1;
case PRINTER_CAPABILITIES_SETPAPERSIZE:
@@ -777,6 +819,7 @@ PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter )
m_bSwallowFaxNo( false ),
m_pGraphics( NULL ),
m_nCopies( 1 ),
+ m_bCollate( false ),
m_pInfoPrinter( pInfoPrinter )
{
}
@@ -802,7 +845,9 @@ BOOL PspSalPrinter::StartJob(
const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL /*bCollate*/,
+ ULONG nCopies,
+ bool bCollate,
+ bool /*bDirect*/,
ImplJobSetup* pJobSetup )
{
vcl_sal::PrinterUpdate::jobStarted();
@@ -811,13 +856,17 @@ BOOL PspSalPrinter::StartJob(
m_bPdf = false;
m_aFileName = pFileName ? *pFileName : String();
m_aTmpFile = String();
- m_nCopies = nCopies;
+ m_nCopies = nCopies;
+ m_bCollate = bCollate;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
if( m_nCopies > 1 )
+ {
// in case user did not do anything (m_nCopies=1)
// take the default from jobsetup
m_aJobData.m_nCopies = m_nCopies;
+ m_aJobData.setCollate( bCollate );
+ }
// check wether this printer is configured as fax
int nMode = 0;
@@ -917,9 +966,12 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter );
m_pGraphics->SetLayout( 0 );
if( m_nCopies > 1 )
+ {
// in case user did not do anything (m_nCopies=1)
// take the default from jobsetup
m_aJobData.m_nCopies = m_nCopies;
+ m_aJobData.setCollate( m_nCopies > 1 && m_bCollate );
+ }
m_aPrintJob.StartPage( m_aJobData );
m_aPrinterGfx.Init( m_aPrintJob );
diff --git a/vcl/unx/headless/svpprn.hxx b/vcl/unx/headless/svpprn.hxx
index c2d85c054fce..8f5a47fed118 100644
--- a/vcl/unx/headless/svpprn.hxx
+++ b/vcl/unx/headless/svpprn.hxx
@@ -63,7 +63,6 @@ public:
virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
- virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData );
};
class PspSalPrinter : public SalPrinter
@@ -80,6 +79,7 @@ public:
psp::JobData m_aJobData;
psp::PrinterGfx m_aPrinterGfx;
ULONG m_nCopies;
+ bool m_bCollate;
SalInfoPrinter* m_pInfoPrinter;
PspSalPrinter( SalInfoPrinter* );
@@ -90,7 +90,9 @@ public:
virtual BOOL StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pSetupData );
virtual BOOL EndJob();
virtual BOOL AbortJob();
diff --git a/vcl/unx/inc/salprn.h b/vcl/unx/inc/salprn.h
index 452fa5a89387..59a5c3eef56a 100644
--- a/vcl/unx/inc/salprn.h
+++ b/vcl/unx/inc/salprn.h
@@ -63,7 +63,6 @@ public:
virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
- virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData );
};
class PspSalPrinter : public SalPrinter
@@ -80,6 +79,7 @@ public:
psp::JobData m_aJobData;
psp::PrinterGfx m_aPrinterGfx;
ULONG m_nCopies;
+ bool m_bCollate;
SalInfoPrinter* m_pInfoPrinter;
PspSalPrinter( SalInfoPrinter* );
@@ -90,7 +90,9 @@ public:
virtual BOOL StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pSetupData );
virtual BOOL EndJob();
virtual BOOL AbortJob();
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index cfd568ac9b6c..558ae3714358 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -2304,11 +2304,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
return 0;
SalInstance* pInstance = GetSalData()->m_pInstance;
- if( pInstance->GetEventCallback() )
- {
- YieldMutexReleaser aReleaser;
- pInstance->CallEventCallback( pEvent, sizeof( XEvent ) );
- }
+ pInstance->CallEventCallback( pEvent, sizeof( XEvent ) );
switch( pEvent->type )
{
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index 2cf4e3baedd3..d47e30a89633 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -177,6 +177,32 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->mnPaperBin = 0;
}
+ // copy duplex
+ pKey = NULL;
+ pValue = NULL;
+
+ pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
+ if( rData.m_pParser )
+ pKey = rData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ if( pKey )
+ pValue = rData.m_aContext.getValue( pKey );
+ if( pKey && pValue )
+ {
+ if( pValue->m_aOption.EqualsIgnoreCaseAscii( "None" ) ||
+ pValue->m_aOption.EqualsIgnoreCaseAscii( "Simplex", 0, 7 )
+ )
+ {
+ pJobSetup->meDuplexMode = DUPLEX_OFF;
+ }
+ else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexNoTumble" ) )
+ {
+ pJobSetup->meDuplexMode = DUPLEX_LONGEDGE;
+ }
+ else if( pValue->m_aOption.EqualsIgnoreCaseAscii( "DuplexTumble" ) )
+ {
+ pJobSetup->meDuplexMode = DUPLEX_SHORTEDGE;
+ }
+ }
// copy the whole context
if( pJobSetup->mpDriverData )
@@ -525,34 +551,6 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* )
// -----------------------------------------------------------------------
-DuplexMode PspSalInfoPrinter::GetDuplexMode( const ImplJobSetup* pJobSetup )
-{
- DuplexMode aRet = DUPLEX_UNKNOWN;
- PrinterInfo aInfo( PrinterInfoManager::get().getPrinterInfo( pJobSetup->maPrinterName ) );
- if ( pJobSetup->mpDriverData )
- JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo );
- if( aInfo.m_pParser )
- {
- const PPDKey * pKey = aInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
- if( pKey )
- {
- const PPDValue* pVal = aInfo.m_aContext.getValue( pKey );
- if( pVal && (
- pVal->m_aOption.EqualsIgnoreCaseAscii( "None" ) ||
- pVal->m_aOption.EqualsIgnoreCaseAscii( "Simplex", 0, 7 )
- ) )
- {
- aRet = DUPLEX_OFF;
- }
- else
- aRet = DUPLEX_ON;
- }
- }
- return aRet;
-}
-
-// -----------------------------------------------------------------------
-
int PspSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* )
{
return 900;
@@ -727,6 +725,37 @@ BOOL PspSalInfoPrinter::SetData(
if( nSetDataFlags & SAL_JOBSET_ORIENTATION )
aData.m_eOrientation = pJobSetup->meOrientation == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait;
+ // merge duplex if necessary
+ if( nSetDataFlags & SAL_JOBSET_DUPLEXMODE )
+ {
+ pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ if( pKey )
+ {
+ pValue = NULL;
+ switch( pJobSetup->meDuplexMode )
+ {
+ case DUPLEX_OFF:
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) );
+ if( pValue == NULL )
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "SimplexNoTumble" ) ) );
+ break;
+ case DUPLEX_SHORTEDGE:
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexTumble" ) ) );
+ break;
+ case DUPLEX_LONGEDGE:
+ pValue = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "DuplexNoTumble" ) ) );
+ break;
+ case DUPLEX_UNKNOWN:
+ default:
+ pValue = 0;
+ break;
+ }
+ if( ! pValue )
+ pValue = pKey->getDefaultValue();
+ aData.m_aContext.setValue( pKey, pValue );
+ }
+ }
+
m_aJobData = aData;
copyJobDataToJobSetup( pJobSetup, aData );
return TRUE;
@@ -828,9 +857,22 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
case PRINTER_CAPABILITIES_COPIES:
return 0xffff;
case PRINTER_CAPABILITIES_COLLATECOPIES:
- return 0;
+ {
+ // see if the PPD contains a value to set Collate to True
+ JobData aData;
+ JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
+
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ) : NULL;
+ const PPDValue* pVal = pKey ? pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ) : NULL;
+
+ // PPDs don't mention the number of possible collated copies.
+ // so let's guess as many as we want ?
+ return pVal ? 0xffff : 0;
+ }
case PRINTER_CAPABILITIES_SETORIENTATION:
return 1;
+ case PRINTER_CAPABILITIES_SETDUPLEX:
+ return 1;
case PRINTER_CAPABILITIES_SETPAPERBIN:
return 1;
case PRINTER_CAPABILITIES_SETPAPERSIZE:
@@ -860,6 +902,7 @@ ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT
m_bSwallowFaxNo( false ),
m_pGraphics( NULL ),
m_nCopies( 1 ),
+ m_bCollate( false ),
m_pInfoPrinter( pInfoPrinter )
{
}
@@ -885,7 +928,9 @@ BOOL PspSalPrinter::StartJob(
const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL /*bCollate*/,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pJobSetup )
{
vcl_sal::PrinterUpdate::jobStarted();
@@ -894,13 +939,17 @@ BOOL PspSalPrinter::StartJob(
m_bPdf = false;
m_aFileName = pFileName ? *pFileName : String();
m_aTmpFile = String();
- m_nCopies = nCopies;
+ m_nCopies = nCopies;
+ m_bCollate = bCollate;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
if( m_nCopies > 1 )
+ {
// in case user did not do anything (m_nCopies=1)
// take the default from jobsetup
m_aJobData.m_nCopies = m_nCopies;
+ m_aJobData.setCollate( bCollate );
+ }
// check wether this printer is configured as fax
int nMode = 0;
@@ -943,15 +992,6 @@ BOOL PspSalPrinter::StartJob(
}
m_aPrinterGfx.Init( m_aJobData );
- bool bIsQuickJob = false;
- std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator quick_it =
- pJobSetup->maValueMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ) );
- if( quick_it != pJobSetup->maValueMap.end() )
- {
- if( quick_it->second.equalsIgnoreAsciiCaseAscii( "true" ) )
- bIsQuickJob = true;
- }
-
// set/clear backwards compatibility flag
bool bStrictSO52Compatibility = false;
std::hash_map<rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator compat_it =
@@ -964,7 +1004,7 @@ BOOL PspSalPrinter::StartJob(
}
m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility );
- return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bIsQuickJob ) ? TRUE : FALSE;
+ return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? TRUE : FALSE;
}
// -----------------------------------------------------------------------
@@ -1010,9 +1050,12 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter );
m_pGraphics->SetLayout( 0 );
if( m_nCopies > 1 )
+ {
// in case user did not do anything (m_nCopies=1)
// take the default from jobsetup
m_aJobData.m_nCopies = m_nCopies;
+ m_aJobData.setCollate( m_nCopies > 1 && m_bCollate );
+ }
m_aPrintJob.StartPage( m_aJobData );
m_aPrinterGfx.Init( m_aPrintJob );
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index f1c63b8abee7..08820b2cb7f9 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -219,8 +219,10 @@ SalInstance *CreateSalInstance()
if( !(pUsePlugin && *pUsePlugin) )
pInst = check_headless_plugin();
+ else
+ pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) );
- if( ! pInst && !(pUsePlugin && *pUsePlugin) )
+ if( ! pInst )
pInst = autodetect_plugin();
// fallback to gen
diff --git a/vcl/unx/source/printer/jobdata.cxx b/vcl/unx/source/printer/jobdata.cxx
index 51e171d578d9..0410b349c93b 100644
--- a/vcl/unx/source/printer/jobdata.cxx
+++ b/vcl/unx/source/printer/jobdata.cxx
@@ -64,6 +64,28 @@ JobData& JobData::operator=(const JobData& rRight)
return *this;
}
+void JobData::setCollate( bool bCollate )
+{
+ const PPDParser* pParser = m_aContext.getParser();
+ if( pParser )
+ {
+ const PPDKey* pKey = pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) );
+ if( pKey )
+ {
+ const PPDValue* pVal = NULL;
+ if( bCollate )
+ pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) );
+ else
+ {
+ pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "False" ) ) );
+ if( ! pVal )
+ pVal = pKey->getValue( String( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) );
+ }
+ m_aContext.setValue( pKey, pVal );
+ }
+ }
+}
+
bool JobData::getStreamBuffer( void*& pData, int& bytes )
{
// consistency checks
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index 783dd5ff2b47..1c42cafa4cb9 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -681,14 +681,6 @@ PrinterJob::StartPage (const JobData& rJobSetup)
if( ! (pPageHeader && pPageBody) )
return sal_False;
- /* #i7262# write setup only before first page
- * don't do this in StartJob since the jobsetup there may be
- * different.
- */
- bool bSuccess = true;
- if( 1 == maPageList.size() )
- m_aDocumentJobData = rJobSetup;
-
// write page header according to Document Structuring Conventions (DSC)
WritePS (pPageHeader, "%%Page: ");
WritePS (pPageHeader, aPageNo);
@@ -722,13 +714,25 @@ PrinterJob::StartPage (const JobData& rJobSetup)
WritePS (pPageHeader, pBBox);
- if (bSuccess)
- bSuccess = writePageSetup ( pPageHeader, rJobSetup );
- if(bSuccess)
- m_aLastJobData = rJobSetup;
+ /* #i7262# #i65491# write setup only before first page
+ * (to %%Begin(End)Setup, instead of %%Begin(End)PageSetup)
+ * don't do this in StartJob since the jobsetup there may be
+ * different.
+ */
+ bool bWriteFeatures = true;
+ if( 1 == maPageList.size() )
+ {
+ m_aDocumentJobData = rJobSetup;
+ bWriteFeatures = false;
+ }
+ if ( writePageSetup( pPageHeader, rJobSetup, bWriteFeatures ) )
+ {
+ m_aLastJobData = rJobSetup;
+ return true;
+ }
- return bSuccess;
+ return false;
}
sal_Bool
@@ -828,12 +832,9 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
if( pKey->getSetupType() == PPDKey::DocumentSetup )
bEmit = true;
}
- else
- {
- if( pKey->getSetupType() == PPDKey::PageSetup ||
- pKey->getSetupType() == PPDKey::AnySetup )
- bEmit = true;
- }
+ if( pKey->getSetupType() == PPDKey::PageSetup ||
+ pKey->getSetupType() == PPDKey::AnySetup )
+ bEmit = true;
if( bEmit )
{
const PPDValue* pValue = rJob.m_aContext.getValue( pKey );
@@ -866,13 +867,13 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
return bSuccess;
}
-bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob )
+bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob, bool bWriteFeatures )
{
bool bSuccess = true;
WritePS (pFile, "%%BeginPageSetup\n%\n");
-
- bSuccess = writeFeatureList( pFile, rJob, false );
+ if ( bWriteFeatures )
+ bSuccess = writeFeatureList( pFile, rJob, false );
WritePS (pFile, "%%EndPageSetup\n");
sal_Char pTranslate [128];
diff --git a/vcl/util/hidother.src b/vcl/util/hidother.src
new file mode 100644
index 000000000000..ab10a1e4c4ea
--- /dev/null
+++ b/vcl/util/hidother.src
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hidother.src,v $
+ * $Revision: 1.20 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "vcl/svids.hrc"
+
+hidspecial HID_PRINTDLG { HelpID = HID_PRINTDLG; };
+
diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
index ef4f13301ecd..c5a99d47c709 100644
--- a/vcl/util/makefile.mk
+++ b/vcl/util/makefile.mk
@@ -31,6 +31,7 @@ PRJNAME=vcl
TARGET=vcl
TARGETTYPE=GUI
USE_DEFFILE=TRUE
+GEN_HID_OTHER=TRUE
.IF "$(SNDFILE_LIBS)"!=""
SNDFILELIB=$(SNDFILE_LIBS)
diff --git a/vcl/win/inc/salprn.h b/vcl/win/inc/salprn.h
index 58d721fd043a..890ff70bc3d6 100644
--- a/vcl/win/inc/salprn.h
+++ b/vcl/win/inc/salprn.h
@@ -88,7 +88,6 @@ public:
virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
- virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData );
};
// -----------------
@@ -117,7 +116,9 @@ public:
virtual BOOL StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
+ ULONG nCopies,
+ bool bCollate,
+ bool bDirect,
ImplJobSetup* pSetupData );
virtual BOOL EndJob();
virtual BOOL AbortJob();
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 5a5703e10944..5c85d5d67144 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -337,7 +337,7 @@ BOOL ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, cons
}
-Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const Rectangle& aRect )
+Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const Rectangle& aRect, THEMESIZE eTS = TS_TRUE )
{
SIZE aSz;
RECT rc;
@@ -345,7 +345,7 @@ Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const
rc.right = aRect.nRight;
rc.top = aRect.nTop;
rc.bottom = aRect.nBottom;
- HRESULT hr = vsAPI.GetThemePartSize( hTheme, hDC, iPart, iState, NULL, TS_TRUE, &aSz ); // TS_TRUE returns optimal size
+ HRESULT hr = vsAPI.GetThemePartSize( hTheme, hDC, iPart, iState, NULL, eTS, &aSz ); // TS_TRUE returns optimal size
if( hr == S_OK )
return Rectangle( 0, 0, aSz.cx, aSz.cy );
else
@@ -1109,6 +1109,63 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
bRet = TRUE;
}
}
+
+ if( (nType == CTRL_LISTBOX || nType == CTRL_COMBOBOX ) && nPart == PART_ENTIRE_CONTROL )
+ {
+ HTHEME hTheme = getThemeHandle( mhWnd, L"Combobox");
+ if( hTheme )
+ {
+ Rectangle aBoxRect( rControlRegion.GetBoundRect() );
+ Rectangle aRect( ImplGetThemeRect( hTheme, hDC, CP_DROPDOWNBUTTON,
+ CBXS_NORMAL, aBoxRect ) );
+ Rectangle aBrdRect( ImplGetThemeRect( hTheme, hDC, CP_BORDER,
+ CBB_HOT, aBoxRect ) );
+ aRect.Top() -= aBrdRect.GetHeight();
+ if( aRect.GetHeight() > aBoxRect.GetHeight() )
+ aBoxRect.Bottom() = aBoxRect.Top() + aRect.GetHeight();
+ if( aRect.GetWidth() > aBoxRect.GetWidth() )
+ aBoxRect.Right() = aBoxRect.Left() + aRect.GetWidth();
+ rNativeContentRegion = aBoxRect;
+ rNativeBoundingRegion = rNativeContentRegion;
+ if( !aRect.IsEmpty() )
+ bRet = TRUE;
+ }
+ }
+
+ if( (nType == CTRL_EDITBOX || nType == CTRL_SPINBOX) && nPart == PART_ENTIRE_CONTROL )
+ {
+ HTHEME hTheme = getThemeHandle( mhWnd, L"Edit");
+ if( hTheme )
+ {
+ // get borderr size
+ Rectangle aBoxRect( rControlRegion.GetBoundRect() );
+ Rectangle aRect( ImplGetThemeRect( hTheme, hDC, EP_BACKGROUNDWITHBORDER,
+ EBWBS_HOT, aBoxRect ) );
+ // ad app font height
+ NONCLIENTMETRICSW aNonClientMetrics;
+ aNonClientMetrics.cbSize = sizeof( aNonClientMetrics );
+ if ( SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, sizeof( aNonClientMetrics ), &aNonClientMetrics, 0 ) )
+ {
+ long nFontHeight = aNonClientMetrics.lfMessageFont.lfHeight;
+ if( nFontHeight < 0 )
+ nFontHeight = -nFontHeight;
+
+ if( aRect.GetHeight() && nFontHeight )
+ {
+ aRect.Bottom() += aRect.GetHeight();
+ aRect.Bottom() += nFontHeight;
+ if( aRect.GetHeight() > aBoxRect.GetHeight() )
+ aBoxRect.Bottom() = aBoxRect.Top() + aRect.GetHeight();
+ if( aRect.GetWidth() > aBoxRect.GetWidth() )
+ aBoxRect.Right() = aBoxRect.Left() + aRect.GetWidth();
+ rNativeContentRegion = aBoxRect;
+ rNativeBoundingRegion = rNativeContentRegion;
+ bRet = TRUE;
+ }
+ }
+ }
+ }
+
ReleaseDC( mhWnd, hDC );
return( bRet );
}
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index ecf91aea7c1b..f4f55dd0adbf 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -1059,6 +1059,21 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
break;
}
}
+
+ if( nFlags & SAL_JOBSET_DUPLEXMODE )
+ {
+ DuplexMode eDuplex = DUPLEX_UNKNOWN;
+ if( (CHOOSE_DEVMODE(dmFields) & DM_DUPLEX) )
+ {
+ if( CHOOSE_DEVMODE(dmDuplex) == DMDUP_SIMPLEX )
+ eDuplex = DUPLEX_OFF;
+ else if( CHOOSE_DEVMODE(dmDuplex) == DMDUP_VERTICAL )
+ eDuplex = DUPLEX_LONGEDGE;
+ else if( CHOOSE_DEVMODE(dmDuplex) == DMDUP_HORIZONTAL )
+ eDuplex = DUPLEX_SHORTEDGE;
+ }
+ pSetupData->meDuplexMode = eDuplex;
+ }
}
// -----------------------------------------------------------------------
@@ -1326,6 +1341,26 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
}
}
+ if( (nFlags & SAL_JOBSET_DUPLEXMODE) )
+ {
+ switch( pSetupData->meDuplexMode )
+ {
+ case DUPLEX_OFF:
+ CHOOSE_DEVMODE(dmFields) |= DM_DUPLEX;
+ CHOOSE_DEVMODE(dmDuplex) = DMDUP_SIMPLEX;
+ break;
+ case DUPLEX_SHORTEDGE:
+ CHOOSE_DEVMODE(dmFields) |= DM_DUPLEX;
+ CHOOSE_DEVMODE(dmDuplex) = DMDUP_HORIZONTAL;
+ break;
+ case DUPLEX_LONGEDGE:
+ CHOOSE_DEVMODE(dmFields) |= DM_DUPLEX;
+ CHOOSE_DEVMODE(dmDuplex) = DMDUP_VERTICAL;
+ break;
+ case DUPLEX_UNKNOWN:
+ break;
+ }
+ }
}
// -----------------------------------------------------------------------
@@ -1559,39 +1594,6 @@ void WinSalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-DuplexMode WinSalInfoPrinter::GetDuplexMode( const ImplJobSetup* pSetupData )
-{
- DuplexMode nRet = DUPLEX_UNKNOWN;
- if ( pSetupData &&pSetupData->mpDriverData )
- {
- if( aSalShlData.mbWPrinter )
- {
- DEVMODEW* pDevMode = SAL_DEVMODE_W( pSetupData );
- if ( pDevMode && (pDevMode->dmFields & DM_DUPLEX ))
- {
- if ( pDevMode->dmDuplex == DMDUP_SIMPLEX )
- nRet = DUPLEX_OFF;
- else
- nRet = DUPLEX_ON;
- }
- }
- else
- {
- DEVMODEA* pDevMode = SAL_DEVMODE_A( pSetupData );
- if ( pDevMode && (pDevMode->dmFields & DM_DUPLEX ))
- {
- if ( pDevMode->dmDuplex == DMDUP_SIMPLEX )
- nRet = DUPLEX_OFF;
- else
- nRet = DUPLEX_ON;
- }
- }
- }
- return nRet;
-}
-
-// -----------------------------------------------------------------------
-
int WinSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData )
{
int nRet = ImplDeviceCaps( this, DC_ORIENTATION, NULL, pSetupData );
@@ -1964,7 +1966,9 @@ static int lcl_StartDocA( HDC hDC, DOCINFOA* pInfo, WinSalPrinter* pPrt )
BOOL WinSalPrinter::StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString&,
- ULONG nCopies, BOOL bCollate,
+ ULONG nCopies,
+ bool bCollate,
+ bool /*bDirect*/,
ImplJobSetup* pSetupData )
{
mnError = 0;
diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java
index b26259fc8a47..c23ec5cd2e5a 100644
--- a/wizards/com/sun/star/wizards/db/CommandMetaData.java
+++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java
@@ -644,8 +644,8 @@ public class CommandMetaData extends DBMetaData
rDispatchArguments[1] = Properties.createProperty("ActiveConnection", this.DBConnection);
rDispatchArguments[2] = Properties.createProperty("Command", _commandname);
rDispatchArguments[3] = Properties.createProperty("CommandType", new Integer(_commandtype));
- rDispatchArguments[4] = Properties.createProperty("ShowTreeView", Boolean.FALSE);
- rDispatchArguments[5] = Properties.createProperty("ShowTreeViewButton", Boolean.FALSE);
+ rDispatchArguments[4] = Properties.createProperty("ShowBrowser", Boolean.FALSE);
+ rDispatchArguments[5] = Properties.createProperty("EnableBrowser", Boolean.FALSE);
rDispatchArguments[6] = Properties.createProperty("ShowMenu", Boolean.TRUE);
return showCommandView(".component:DB/DataSourceBrowser", rDispatchArguments,parentFrame);
}
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index 2a7151cd1135..59f63afed114 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -32,9 +32,7 @@ package com.sun.star.wizards.db;
import com.sun.star.awt.XWindow;
import com.sun.star.lang.XInitialization;
import com.sun.star.ui.dialogs.XExecutableDialog;
-import java.util.*;
-// import com.sun.star.io.IOException;
import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.lang.XMultiServiceFactory;
@@ -48,7 +46,6 @@ import com.sun.star.container.XHierarchicalNameAccess;
import com.sun.star.container.XHierarchicalNameContainer;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
-// import com.sun.star.container.XNamed;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XModel;
import com.sun.star.frame.XStorable;
@@ -57,7 +54,6 @@ import com.sun.star.sdbc.DataType;
import com.sun.star.sdb.XOfficeDatabaseDocument;
import com.sun.star.sdb.XDocumentDataSource;
import com.sun.star.sdb.tools.XConnectionTools;
-// import com.sun.star.sdbcx.XAppend;
import com.sun.star.sdbcx.XColumnsSupplier;
import com.sun.star.ucb.XSimpleFileAccess;
@@ -67,14 +63,11 @@ import com.sun.star.uno.AnyConverter;
import com.sun.star.util.XCloseable;
import com.sun.star.util.XNumberFormatsSupplier;
-import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.*;
-// import com.sun.star.wizards.ui.UnoDialog;
import com.sun.star.task.XInteractionHandler;
import com.sun.star.sdb.XFormDocumentsSupplier;
import com.sun.star.sdb.XQueryDefinitionsSupplier;
import com.sun.star.sdb.XReportDocumentsSupplier;
-// import com.sun.star.sdbc.ColumnValue;
import com.sun.star.sdbc.SQLException;
import com.sun.star.sdbc.XDatabaseMetaData;
import com.sun.star.sdbc.XDataSource;
@@ -82,17 +75,22 @@ import com.sun.star.sdbc.XResultSet;
import com.sun.star.sdbc.XRow;
import com.sun.star.sdb.XCompletedConnection;
import com.sun.star.lang.Locale;
-// import com.sun.star.util.XFlushable;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.sdb.XQueriesSupplier;
+import com.sun.star.sdbc.XConnection;
import com.sun.star.sdbcx.XTablesSupplier;
+import com.sun.star.uno.Any;
+import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
public class DBMetaData
{
private XNameAccess xQueryNames;
public XDatabaseMetaData xDBMetaData;
- private XDataSource xDataSource;
+ private XDataSource m_dataSource;
+ private XPropertySet m_dataSourceSettings;
private XOfficeDatabaseDocument xModel;
private XPropertySet xDataSourcePropertySet;
public String[] DataSourceNames;
@@ -150,13 +148,10 @@ public class DBMetaData
private int iMaxColumnNameLength = -1;
private int iMaxTableNameLength = -1;
private boolean bPasswordIsRequired;
- // private boolean bFormatKeysareset = false;
private final static int NOLIMIT = 9999999;
protected final static int RID_DB_COMMON = 1000;
private final static int INVALID = 9999999;
public TypeInspector oTypeInspector;
- private PropertyValue[] aInfoPropertyValues = null;
- private boolean bisSQL92CheckEnabled = false;
private NumberFormatter oNumberFormatter = null;
private long lDateCorrection = INVALID;
private boolean bdisposeConnection = false;
@@ -219,9 +214,9 @@ public class DBMetaData
{
this.xMSF = xMSF;
xDatabaseContext = (XInterface) xMSF.createInstance("com.sun.star.sdb.DatabaseContext");
- xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDatabaseContext);
+ xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, xDatabaseContext);
XInterface xInteractionHandler = (XInterface) xMSF.createInstance("com.sun.star.sdb.InteractionHandler");
- oInteractionHandler = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xInteractionHandler);
+ oInteractionHandler = UnoRuntime.queryInterface(XInteractionHandler.class, xInteractionHandler);
DataSourceNames = xNameAccess.getElementNames();
}
catch (Exception exception)
@@ -330,10 +325,10 @@ public class DBMetaData
{
oCommand = getQueryNamesAsNameAccess().getByName(Name);
}
- XColumnsSupplier xCommandCols = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, oCommand);
- xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oCommand);
+ XColumnsSupplier xCommandCols = UnoRuntime.queryInterface(XColumnsSupplier.class, oCommand);
+ xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, oCommand);
// TODO: Performance leak getColumns() take very long.
- xColumns = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xCommandCols.getColumns());
+ xColumns = UnoRuntime.queryInterface(XNameAccess.class, xCommandCols.getColumns());
}
catch (Exception exception)
{
@@ -379,13 +374,13 @@ public class DBMetaData
public XNameAccess getQueryNamesAsNameAccess()
{
XQueriesSupplier xDBQueries = (XQueriesSupplier) UnoRuntime.queryInterface(XQueriesSupplier.class, DBConnection);
- xQueryNames = (XNameAccess) xDBQueries.getQueries();
+ xQueryNames = xDBQueries.getQueries();
return xQueryNames;
}
public XNameAccess getTableNamesAsNameAccess()
{
- XTablesSupplier xDBTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, DBConnection);
+ XTablesSupplier xDBTables = UnoRuntime.queryInterface(XTablesSupplier.class, DBConnection);
XNameAccess xTableNames = xDBTables.getTables();
return xTableNames;
}
@@ -412,7 +407,7 @@ public class DBMetaData
return TableNames;
}
}
- TableNames = (String[]) getTableNamesAsNameAccess().getElementNames();
+ TableNames = getTableNamesAsNameAccess().getElementNames();
return TableNames;
}
@@ -458,7 +453,7 @@ public class DBMetaData
int itablecount = xDBMetaData.getMaxTablesInSelect();
if (itablecount == 0)
{
- return this.NOLIMIT;
+ return DBMetaData.NOLIMIT;
}
else
{
@@ -487,7 +482,7 @@ public class DBMetaData
iMaxColumnsInSelect = xDBMetaData.getMaxColumnsInSelect();
if (iMaxColumnsInSelect == 0)
{
- iMaxColumnsInSelect = this.NOLIMIT;
+ iMaxColumnsInSelect = DBMetaData.NOLIMIT;
}
}
@@ -496,7 +491,7 @@ public class DBMetaData
iMaxColumnsInGroupBy = xDBMetaData.getMaxColumnsInGroupBy();
if (iMaxColumnsInGroupBy == 0)
{
- iMaxColumnsInGroupBy = this.NOLIMIT;
+ iMaxColumnsInGroupBy = DBMetaData.NOLIMIT;
}
}
@@ -505,7 +500,7 @@ public class DBMetaData
iMaxColumnsInTable = xDBMetaData.getMaxColumnsInTable();
if (iMaxColumnsInTable == 0)
{
- iMaxColumnsInTable = this.NOLIMIT;
+ iMaxColumnsInTable = DBMetaData.NOLIMIT;
}
return iMaxColumnsInTable;
}
@@ -515,8 +510,7 @@ public class DBMetaData
try
{
xDBMetaData = DBConnection.getMetaData();
- XChild xChild = (XChild) UnoRuntime.queryInterface(XChild.class, DBConnection);
- Object oDataSource = xChild.getParent();
+ XChild xChild = UnoRuntime.queryInterface( XChild.class, DBConnection );
getDataSourceInterfaces();
setMaxColumnsInGroupBy();
setMaxColumnsInSelect();
@@ -527,24 +521,28 @@ public class DBMetaData
}
}
+ private void ensureDataSourceSettings() throws UnknownPropertyException, WrappedTargetException
+ {
+ if ( m_dataSourceSettings != null )
+ return;
+
+ XPropertySet dataSourceProperties = UnoRuntime.queryInterface( XPropertySet.class, getDataSource() );
+ m_dataSourceSettings = UnoRuntime.queryInterface( XPropertySet.class, dataSourceProperties.getPropertyValue( "Settings" ) );
+ }
+
public boolean isSQL92CheckEnabled()
{
+ boolean isSQL92CheckEnabled = false;
try
{
- if (aInfoPropertyValues == null)
- {
- aInfoPropertyValues = (PropertyValue[]) AnyConverter.toArray(this.xDataSourcePropertySet.getPropertyValue("Info"));
- if (Properties.hasPropertyValue(aInfoPropertyValues, "EnableSQL92Check"))
- {
- bisSQL92CheckEnabled = AnyConverter.toBoolean(Properties.getPropertyValue(aInfoPropertyValues, "EnableSQL92Check"));
- }
- }
+ ensureDataSourceSettings();
+ isSQL92CheckEnabled = AnyConverter.toBoolean( m_dataSourceSettings.getPropertyValue( "EnableSQL92Check" ) );
}
catch (Exception e)
{
e.printStackTrace();
}
- return bisSQL92CheckEnabled;
+ return isSQL92CheckEnabled;
}
public String verifyName(String _sname, int _maxlen)
@@ -562,12 +560,12 @@ public class DBMetaData
public XDataSource getDataSource()
{
- if (xDataSource == null)
+ if (m_dataSource == null)
{
try
{
Object oDataSource = xNameAccess.getByName(DataSourceName);
- xDataSource = (XDataSource) UnoRuntime.queryInterface(XDataSource.class, oDataSource);
+ m_dataSource = UnoRuntime.queryInterface( XDataSource.class, oDataSource );
}
catch (com.sun.star.container.NoSuchElementException e)
{
@@ -576,7 +574,7 @@ public class DBMetaData
{
}
}
- return xDataSource;
+ return m_dataSource;
}
private void setDataSourceByName(String _DataSourceName, boolean bgetInterfaces)
@@ -585,7 +583,7 @@ public class DBMetaData
{
this.DataSourceName = _DataSourceName;
getDataSourceInterfaces();
- XDocumentDataSource xDocu = (XDocumentDataSource) UnoRuntime.queryInterface(XDocumentDataSource.class, getDataSource());
+ XDocumentDataSource xDocu = UnoRuntime.queryInterface( XDocumentDataSource.class, getDataSource() );
if (xDocu != null)
{
xModel = xDocu.getDatabaseDocument();
@@ -599,8 +597,8 @@ public class DBMetaData
public void getDataSourceInterfaces() throws Exception
{
- xCompleted = (XCompletedConnection) UnoRuntime.queryInterface(XCompletedConnection.class, getDataSource());
- xDataSourcePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, getDataSource());
+ xCompleted = UnoRuntime.queryInterface( XCompletedConnection.class, getDataSource() );
+ xDataSourcePropertySet = UnoRuntime.queryInterface( XPropertySet.class, getDataSource() );
bPasswordIsRequired = ((Boolean) xDataSourcePropertySet.getPropertyValue("IsPasswordRequired")).booleanValue();
}
@@ -608,22 +606,21 @@ public class DBMetaData
{
try
{
- com.sun.star.sdbc.XConnection xConnection = null;
+ XConnection xConnection = null;
if (Properties.hasPropertyValue(curproperties, "ActiveConnection"))
{
- xConnection = (com.sun.star.sdbc.XConnection) AnyConverter.toObject(com.sun.star.sdbc.XConnection.class,
- Properties.getPropertyValue(curproperties, "ActiveConnection"));
+ xConnection = UnoRuntime.queryInterface( XConnection.class, Properties.getPropertyValue( curproperties, "ActiveConnection" ) );
if (xConnection != null)
{
- com.sun.star.container.XChild child = (com.sun.star.container.XChild) UnoRuntime.queryInterface(com.sun.star.container.XChild.class, xConnection);
+ com.sun.star.container.XChild child = UnoRuntime.queryInterface( com.sun.star.container.XChild.class, xConnection );
- xDataSource = (XDataSource) UnoRuntime.queryInterface(XDataSource.class, child.getParent());
- XDocumentDataSource xDocu = (XDocumentDataSource) UnoRuntime.queryInterface(XDocumentDataSource.class, this.xDataSource);
+ m_dataSource = UnoRuntime.queryInterface( XDataSource.class, child.getParent() );
+ XDocumentDataSource xDocu = UnoRuntime.queryInterface( XDocumentDataSource.class, m_dataSource );
if (xDocu != null)
{
xModel = xDocu.getDatabaseDocument();
}
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDataSource);
+ XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, m_dataSource );
if (xPSet != null)
{
DataSourceName = AnyConverter.toString(xPSet.getPropertyValue("Name"));
@@ -646,13 +643,13 @@ public class DBMetaData
}
else if (Properties.hasPropertyValue(curproperties, "DataSource"))
{
- xDataSource = (XDataSource) UnoRuntime.queryInterface(XDataSource.class, Properties.getPropertyValue(curproperties, "DataSource"));
- XDocumentDataSource xDocu = (XDocumentDataSource) UnoRuntime.queryInterface(XDocumentDataSource.class, this.xDataSource);
+ m_dataSource = UnoRuntime.queryInterface( XDataSource.class, Properties.getPropertyValue( curproperties, "DataSource" ) );
+ XDocumentDataSource xDocu = UnoRuntime.queryInterface( XDocumentDataSource.class, this.m_dataSource );
if (xDocu != null)
{
xModel = xDocu.getDatabaseDocument();
}
- return getConnection(xDataSource);
+ return getConnection(m_dataSource);
}
if (Properties.hasPropertyValue(curproperties, "DatabaseLocation"))
{
@@ -692,7 +689,7 @@ public class DBMetaData
try
{
this.DBConnection = _DBConnection;
- this.ConnectionTools = (XConnectionTools) UnoRuntime.queryInterface(XConnectionTools.class, this.DBConnection);
+ this.ConnectionTools = UnoRuntime.queryInterface( XConnectionTools.class, this.DBConnection );
getDataSourceObjects();
return true;
}
@@ -703,7 +700,7 @@ public class DBMetaData
}
}
- private boolean getConnection(XDataSource xDataSource)
+ private boolean getConnection(XDataSource _dataSource)
{
Resource oResource = new Resource(xMSF, "Database", "dbw");
try
@@ -717,20 +714,19 @@ public class DBMetaData
getDataSourceInterfaces();
if (bPasswordIsRequired == false)
{
- DBConnection = xDataSource.getConnection("", "");
+ DBConnection = _dataSource.getConnection("", "");
bgetConnection = true;
}
else
{
- XInterface xInteractionHandler = (XInterface) xMSF.createInstance("com.sun.star.sdb.InteractionHandler");
- XInteractionHandler oInteractionHandler2 = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xInteractionHandler);
+ XInteractionHandler xInteractionHandler = UnoRuntime.queryInterface( XInteractionHandler.class, xMSF.createInstance("com.sun.star.sdb.InteractionHandler") );
boolean bExitLoop = true;
do
{
- XCompletedConnection xCompleted2 = (XCompletedConnection) UnoRuntime.queryInterface(XCompletedConnection.class, xDataSource);
+ XCompletedConnection xCompleted2 = UnoRuntime.queryInterface( XCompletedConnection.class, _dataSource );
try
{
- DBConnection = xCompleted2.connectWithCompletion(oInteractionHandler2);
+ DBConnection = xCompleted2.connectWithCompletion( xInteractionHandler );
bgetConnection = DBConnection != null;
if (bgetConnection == false)
{
@@ -755,8 +751,8 @@ public class DBMetaData
}
else
{
- xConnectionComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, DBConnection);
- ConnectionTools = (XConnectionTools) UnoRuntime.queryInterface(XConnectionTools.class, DBConnection);
+ xConnectionComponent = UnoRuntime.queryInterface( XComponent.class, DBConnection );
+ ConnectionTools = UnoRuntime.queryInterface( XConnectionTools.class, DBConnection );
getDataSourceObjects();
}
return bgetConnection;
@@ -804,6 +800,25 @@ public class DBMetaData
}
}
+ public boolean supportsPrimaryKeys()
+ {
+ boolean supportsPrimaryKeys = false;
+ try
+ {
+ ensureDataSourceSettings();
+ Any primaryKeySupport = (Any)m_dataSourceSettings.getPropertyValue( "PrimaryKeySupport" );
+ if ( AnyConverter.isVoid( primaryKeySupport ) )
+ supportsPrimaryKeys = supportsCoreSQLGrammar();
+ else
+ supportsPrimaryKeys = AnyConverter.toBoolean( primaryKeySupport );
+ }
+ catch ( Exception ex )
+ {
+ Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, ex );
+ }
+ return supportsPrimaryKeys;
+ }
+
public boolean supportsCoreSQLGrammar()
{
try
@@ -831,17 +846,17 @@ public class DBMetaData
{
try
{
- XQueryDefinitionsSupplier xQueryDefinitionsSuppl = (XQueryDefinitionsSupplier) UnoRuntime.queryInterface(XQueryDefinitionsSupplier.class, xDataSource);
+ XQueryDefinitionsSupplier xQueryDefinitionsSuppl = UnoRuntime.queryInterface( XQueryDefinitionsSupplier.class, m_dataSource );
XNameAccess xQueryDefs = xQueryDefinitionsSuppl.getQueryDefinitions();
- XSingleServiceFactory xSSFQueryDefs = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, xQueryDefs);
+ XSingleServiceFactory xSSFQueryDefs = UnoRuntime.queryInterface( XSingleServiceFactory.class, xQueryDefs );
Object oQuery = xSSFQueryDefs.createInstance(); //"com.sun.star.sdb.QueryDefinition"
- XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oQuery);
+ XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, oQuery );
String s = _oSQLQueryComposer.m_xQueryAnalyzer.getQuery();
xPSet.setPropertyValue("Command", s);
- XNameContainer xNameCont = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xQueryDefs);
- XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xQueryDefs);
+ XNameContainer xNameCont = UnoRuntime.queryInterface( XNameContainer.class, xQueryDefs );
+ XNameAccess xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, xQueryDefs );
ConnectionTools.getObjectNames().checkNameForCreate(com.sun.star.sdb.CommandType.QUERY, _QueryName);
xNameCont.insertByName(_QueryName, oQuery);
return true;
@@ -885,23 +900,23 @@ public class DBMetaData
public XHierarchicalNameAccess getReportDocuments()
{
- XReportDocumentsSupplier xReportDocumentSuppl = (XReportDocumentsSupplier) UnoRuntime.queryInterface(XReportDocumentsSupplier.class, this.xModel);
+ XReportDocumentsSupplier xReportDocumentSuppl = UnoRuntime.queryInterface( XReportDocumentsSupplier.class, this.xModel );
xReportDocumentSuppl.getReportDocuments();
- XHierarchicalNameAccess xReportHier = (XHierarchicalNameAccess) UnoRuntime.queryInterface(XHierarchicalNameAccess.class, xReportDocumentSuppl.getReportDocuments());
+ XHierarchicalNameAccess xReportHier = UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xReportDocumentSuppl.getReportDocuments() );
return xReportHier;
}
public XHierarchicalNameAccess getFormDocuments()
{
- XFormDocumentsSupplier xFormDocumentSuppl = (XFormDocumentsSupplier) UnoRuntime.queryInterface(XFormDocumentsSupplier.class, xModel);
- XHierarchicalNameAccess xFormHier = (XHierarchicalNameAccess) UnoRuntime.queryInterface(XHierarchicalNameAccess.class, xFormDocumentSuppl.getFormDocuments());
+ XFormDocumentsSupplier xFormDocumentSuppl = UnoRuntime.queryInterface( XFormDocumentsSupplier.class, xModel );
+ XHierarchicalNameAccess xFormHier = UnoRuntime.queryInterface( XHierarchicalNameAccess.class, xFormDocumentSuppl.getFormDocuments() );
return xFormHier;
}
public boolean hasFormDocumentByName(String _sFormName)
{
- XFormDocumentsSupplier xFormDocumentSuppl = (XFormDocumentsSupplier) UnoRuntime.queryInterface(XFormDocumentsSupplier.class, xModel);
- XNameAccess xFormNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xFormDocumentSuppl.getFormDocuments());
+ XFormDocumentsSupplier xFormDocumentSuppl = UnoRuntime.queryInterface( XFormDocumentsSupplier.class, xModel );
+ XNameAccess xFormNameAccess = UnoRuntime.queryInterface( XNameAccess.class, xFormDocumentSuppl.getFormDocuments() );
return xFormNameAccess.hasByName(_sFormName);
}
@@ -929,10 +944,10 @@ public class DBMetaData
try
{
PropertyValue[] aDocProperties;
- XModel xDocumentModel = (XModel) UnoRuntime.queryInterface(XModel.class, _xComponent);
+ XModel xDocumentModel = UnoRuntime.queryInterface( XModel.class, _xComponent );
String sPath = xDocumentModel.getURL();
String basename = FileAccess.getBasename(sPath, "/");
- XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, _xComponent);
+ XCloseable xCloseable = UnoRuntime.queryInterface( XCloseable.class, _xComponent );
_xComponent.dispose();
xCloseable.close(false);
if (_bcreateTemplate)
@@ -951,13 +966,13 @@ public class DBMetaData
{
aDocProperties[4] = Properties.createProperty("AsTemplate", new Boolean(_bcreateTemplate));
}
- XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, _xDocNameAccess);
+ XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, _xDocNameAccess );
Object oDBDocument = xDocMSF.createInstanceWithArguments("com.sun.star.sdb.DocumentDefinition", aDocProperties);
- XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocNameAccess);
+ XHierarchicalNameContainer xHier = UnoRuntime.queryInterface( XHierarchicalNameContainer.class, _xDocNameAccess );
String sdocname = Desktop.getUniqueName(_xDocNameAccess, basename);
xHier.insertByHierarchicalName(sdocname, oDBDocument);
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface( XSimpleFileAccess.class, xInterface );
xSimpleFileAccess.kill(sPath);
}
catch (Exception e)
@@ -971,16 +986,16 @@ public class DBMetaData
XComponent[] xRetComponent = new XComponent[2];
try
{
- XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, _xDocuments);
+ XComponentLoader xComponentLoader = UnoRuntime.queryInterface( XComponentLoader.class, _xDocuments );
PropertyValue[] aPropertyValues = new PropertyValue[4];
aPropertyValues[0] = Properties.createProperty("OpenMode", _bOpenInDesign ? "openDesign" : "open");
aPropertyValues[1] = Properties.createProperty("ActiveConnection", this.DBConnection);
aPropertyValues[2] = Properties.createProperty("DocumentTitle", _docname);
aPropertyValues[3] = Properties.createProperty("AsTemplate", new Boolean(_bAsTemplate));
- XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocuments);
+ XHierarchicalNameContainer xHier = UnoRuntime.queryInterface( XHierarchicalNameContainer.class, _xDocuments );
if (xHier.hasByHierarchicalName(_docname))
{
- xRetComponent[0] = (XComponent) UnoRuntime.queryInterface(XComponent.class, xHier.getByHierarchicalName(_docname));
+ xRetComponent[0] = UnoRuntime.queryInterface( XComponent.class, xHier.getByHierarchicalName( _docname ) );
xRetComponent[1] = xComponentLoader.loadComponentFromURL(_docname, "", 0, aPropertyValues);
}
}
@@ -1018,7 +1033,7 @@ public class DBMetaData
String[] sColValues = null;
try
{
- XRow xRow = (XRow) UnoRuntime.queryInterface(XRow.class, _xResultSet);
+ XRow xRow = UnoRuntime.queryInterface( XRow.class, _xResultSet );
Vector aColVector = new Vector();
while (_xResultSet.next())
{
@@ -1067,9 +1082,9 @@ public class DBMetaData
try
{
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
- XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(XSimpleFileAccess.class, xInterface);
+ XSimpleFileAccess xSimpleFileAccess = UnoRuntime.queryInterface( XSimpleFileAccess.class, xInterface );
String storepath = FileAccess.getOfficePath(xMSF, "Temp", xSimpleFileAccess) + "/" + _storename;
- XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, _xcomponent);
+ XStorable xStoreable = UnoRuntime.queryInterface( XStorable.class, _xcomponent );
PropertyValue[] oStoreProperties = new PropertyValue[1];
oStoreProperties[0] = Properties.createProperty("FilterName", "writer8");
storepath += ".odt";
@@ -1118,12 +1133,12 @@ public class DBMetaData
try
{
Object oDialog = xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog");
- XInitialization xInitialization = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, oDialog);
+ XInitialization xInitialization = UnoRuntime.queryInterface( XInitialization.class, oDialog );
PropertyValue[] aPropertyValue = new PropertyValue[2];
aPropertyValue[0] = Properties.createProperty("SQLException", oSQLException);
aPropertyValue[1] = Properties.createProperty("ParentWindow", _xWindow);
xInitialization.initialize(aPropertyValue);
- XExecutableDialog xExecutableDialog = (XExecutableDialog) UnoRuntime.queryInterface(XExecutableDialog.class, oDialog);
+ XExecutableDialog xExecutableDialog = UnoRuntime.queryInterface( XExecutableDialog.class, oDialog );
xExecutableDialog.execute();
}
catch (com.sun.star.uno.Exception ex)
@@ -1139,7 +1154,7 @@ public class DBMetaData
xNameAccess = null;
xDatabaseContext = null;
xDBMetaData = null;
- xDataSource = null;
+ m_dataSource = null;
xModel = null;
xCompleted = null;
xDataSourcePropertySet = null;
diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java
index 8b4e0288ef8c..9144dc607a9a 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -251,7 +251,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet
{
curScenarioSelector = new ScenarioSelector(this, this.curTableDescriptor, slblFields, slblSelFields);
curFieldFormatter = new FieldFormatter(this, curTableDescriptor);
- if (this.curTableDescriptor.supportsCoreSQLGrammar())
+ if ( this.curTableDescriptor.supportsPrimaryKeys() )
{
curPrimaryKeyHandler = new PrimaryKeyHandler(this, curTableDescriptor);
}
@@ -265,7 +265,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet
boolean bTableCreated = false;
String schemaname = curFinalizer.getSchemaName();
String catalogname = curFinalizer.getCatalogName();
- if (curTableDescriptor.supportsCoreSQLGrammar())
+ if (curTableDescriptor.supportsPrimaryKeys())
{
String[] keyfieldnames = curPrimaryKeyHandler.getPrimaryKeyFields(curTableDescriptor);
if (keyfieldnames != null)
@@ -360,7 +360,7 @@ public class TableWizard extends WizardDialog implements XTextListener, XComplet
int i = 0;
i = insertRoadmapItem(0, true, m_oResource.getResText(UIConsts.RID_TABLE + 2), SOMAINPAGE);
i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 3), SOFIELDSFORMATPAGE);
- if (this.curTableDescriptor.supportsCoreSQLGrammar())
+ if (this.curTableDescriptor.supportsPrimaryKeys())
{
i = insertRoadmapItem(i, false, m_oResource.getResText(UIConsts.RID_TABLE + 4), SOPRIMARYKEYPAGE);
}