summaryrefslogtreecommitdiffstats
path: root/include/svx
diff options
context:
space:
mode:
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/AccessibilityCheckDialog.hxx59
-rw-r--r--include/svx/AccessibleControlShape.hxx207
-rw-r--r--include/svx/AccessibleGraphicShape.hxx105
-rw-r--r--include/svx/AccessibleOLEShape.hxx112
-rw-r--r--include/svx/AccessibleShape.hxx439
-rw-r--r--include/svx/AccessibleShapeInfo.hxx97
-rw-r--r--include/svx/AccessibleShapeTreeInfo.hxx201
-rw-r--r--include/svx/AccessibleTextHelper.hxx374
-rw-r--r--include/svx/ActionDescriptionProvider.hxx55
-rw-r--r--include/svx/ChildrenManager.hxx214
-rw-r--r--include/svx/ClassificationCommon.hxx65
-rw-r--r--include/svx/ClassificationDialog.hxx99
-rw-r--r--include/svx/ClassificationField.hxx98
-rw-r--r--include/svx/ColorSets.hxx122
-rw-r--r--include/svx/CommonStyleManager.hxx41
-rw-r--r--include/svx/EnhancedCustomShape2d.hxx224
-rw-r--r--include/svx/EnhancedCustomShapeFunctionParser.hxx249
-rw-r--r--include/svx/EnhancedCustomShapeGeometry.hxx105
-rw-r--r--include/svx/EnhancedCustomShapeTypeNames.hxx35
-rw-r--r--include/svx/FileExportedDialog.hxx23
-rw-r--r--include/svx/GenericCheckDialog.hxx104
-rw-r--r--include/svx/IAccessibleParent.hxx103
-rw-r--r--include/svx/IAccessibleViewForwarder.hxx97
-rw-r--r--include/svx/IAccessibleViewForwarderListener.hxx50
-rw-r--r--include/svx/ImageMapInfo.hxx55
-rw-r--r--include/svx/MediaShellHelpers.hxx40
-rw-r--r--include/svx/Palette.hxx67
-rw-r--r--include/svx/PaletteManager.hxx86
-rw-r--r--include/svx/ParaSpacingControl.hxx128
-rw-r--r--include/svx/ParseContext.hxx78
-rw-r--r--include/svx/ShapeTypeHandler.hxx199
-rw-r--r--include/svx/SmartTagItem.hxx82
-rw-r--r--include/svx/SmartTagMgr.hxx231
-rw-r--r--include/svx/SpellDialogChildWindow.hxx115
-rw-r--r--include/svx/SvxColorChildWindow.hxx40
-rw-r--r--include/svx/SvxColorValueSet.hxx51
-rw-r--r--include/svx/SvxNumOptionsTabPageHelper.hxx50
-rw-r--r--include/svx/SvxPresetListBox.hxx66
-rw-r--r--include/svx/SvxShapeTypes.hxx72
-rw-r--r--include/svx/SvxXTextColumns.hxx22
-rw-r--r--include/svx/UnoNamespaceMap.hxx36
-rw-r--r--include/svx/XPropertyEntry.hxx52
-rw-r--r--include/svx/algitem.hxx98
-rw-r--r--include/svx/anchorid.hxx46
-rw-r--r--include/svx/autoformathelper.hxx222
-rw-r--r--include/svx/bmpmask.hxx176
-rw-r--r--include/svx/camera3d.hxx67
-rw-r--r--include/svx/charmap.hxx162
-rw-r--r--include/svx/charthelper.hxx61
-rw-r--r--include/svx/chrtitem.hxx152
-rw-r--r--include/svx/clipboardctl.hxx51
-rw-r--r--include/svx/clipfmtitem.hxx62
-rw-r--r--include/svx/colorbox.hxx100
-rw-r--r--include/svx/colorwindow.hxx136
-rw-r--r--include/svx/compressgraphicdialog.hxx106
-rw-r--r--include/svx/connctrl.hxx68
-rw-r--r--include/svx/contdlg.hxx76
-rw-r--r--include/svx/ctredlin.hxx339
-rw-r--r--include/svx/cube3d.hxx93
-rw-r--r--include/svx/dataaccessdescriptor.hxx131
-rw-r--r--include/svx/databaselocationinput.hxx82
-rw-r--r--include/svx/databaseregistrationui.hxx42
-rw-r--r--include/svx/dbaexchange.hxx277
-rw-r--r--include/svx/dbaobjectex.hxx66
-rw-r--r--include/svx/def3d.hxx43
-rw-r--r--include/svx/deflt3d.hxx97
-rw-r--r--include/svx/diagram/IDiagramHelper.hxx118
-rw-r--r--include/svx/diagram/datamodel.hxx274
-rw-r--r--include/svx/dialcontrol.hxx170
-rw-r--r--include/svx/dialmgr.hxx31
-rw-r--r--include/svx/dialogs.hrc122
-rw-r--r--include/svx/dlgctl3d.hxx183
-rw-r--r--include/svx/dlgctrl.hxx410
-rw-r--r--include/svx/dlgutil.hxx40
-rw-r--r--include/svx/drawitem.hxx201
-rw-r--r--include/svx/e3ditem.hxx49
-rw-r--r--include/svx/e3dsceneupdater.hxx67
-rw-r--r--include/svx/e3dundo.hxx107
-rw-r--r--include/svx/extedit.hxx62
-rw-r--r--include/svx/extrusionbar.hxx56
-rw-r--r--include/svx/f3dchild.hxx42
-rw-r--r--include/svx/fillctrl.hxx109
-rw-r--r--include/svx/flagsdef.hxx126
-rw-r--r--include/svx/float3d.hxx288
-rw-r--r--include/svx/fmdmod.hxx39
-rw-r--r--include/svx/fmdpage.hxx64
-rw-r--r--include/svx/fmgridcl.hxx202
-rw-r--r--include/svx/fmgridif.hxx534
-rw-r--r--include/svx/fmmodel.hxx84
-rw-r--r--include/svx/fmobjfac.hxx39
-rw-r--r--include/svx/fmpage.hxx79
-rw-r--r--include/svx/fmsearch.hxx66
-rw-r--r--include/svx/fmshell.hxx171
-rw-r--r--include/svx/fmsrccfg.hxx145
-rw-r--r--include/svx/fmsrcimp.hxx350
-rw-r--r--include/svx/fmtools.hxx175
-rw-r--r--include/svx/fmview.hxx156
-rw-r--r--include/svx/fntctrl.hxx74
-rw-r--r--include/svx/fontwork.hxx142
-rw-r--r--include/svx/fontworkbar.hxx58
-rw-r--r--include/svx/fontworkgallery.hxx80
-rw-r--r--include/svx/formatpaintbrushctrl.hxx59
-rw-r--r--include/svx/framebordertype.hxx56
-rw-r--r--include/svx/framelink.hxx185
-rw-r--r--include/svx/framelinkarray.hxx326
-rw-r--r--include/svx/frmdirlbox.hxx80
-rw-r--r--include/svx/frmsel.hxx194
-rw-r--r--include/svx/galctrl.hxx119
-rw-r--r--include/svx/gallery.hxx137
-rw-r--r--include/svx/gallery1.hxx146
-rw-r--r--include/svx/gallerybinaryengine.hxx111
-rw-r--r--include/svx/gallerybinaryengineentry.hxx67
-rw-r--r--include/svx/gallerybinarystoragelocations.hxx52
-rw-r--r--include/svx/galleryfilestorage.hxx28
-rw-r--r--include/svx/galleryfilestorageentry.hxx28
-rw-r--r--include/svx/galleryitem.hxx68
-rw-r--r--include/svx/galleryobjectcollection.hxx70
-rw-r--r--include/svx/galleryobjectstorage.hxx32
-rw-r--r--include/svx/gallerystoragelocations.hxx33
-rw-r--r--include/svx/galmisc.hxx202
-rw-r--r--include/svx/galtheme.hxx169
-rw-r--r--include/svx/grafctrl.hxx121
-rw-r--r--include/svx/graphctl.hxx159
-rw-r--r--include/svx/graphichelper.hxx54
-rw-r--r--include/svx/grfcrop.hxx69
-rw-r--r--include/svx/grfflt.hxx43
-rw-r--r--include/svx/gridctrl.hxx600
-rw-r--r--include/svx/hdft.hxx134
-rw-r--r--include/svx/helperhittest3d.hxx99
-rw-r--r--include/svx/hexcolorcontrol.hxx57
-rw-r--r--include/svx/hlnkitem.hxx105
-rw-r--r--include/svx/hyperdlg.hxx50
-rw-r--r--include/svx/ifaceids.hxx36
-rw-r--r--include/svx/imapdlg.hxx145
-rw-r--r--include/svx/insctrl.hxx46
-rw-r--r--include/svx/ipolypolygoneditorcontroller.hxx76
-rw-r--r--include/svx/itemwin.hxx64
-rw-r--r--include/svx/itextprovider.hxx42
-rw-r--r--include/svx/labelitemwindow.hxx30
-rw-r--r--include/svx/langbox.hxx119
-rw-r--r--include/svx/lathe3d.hxx123
-rw-r--r--include/svx/legacyitem.hxx60
-rw-r--r--include/svx/linectrl.hxx92
-rw-r--r--include/svx/linkwarn.hxx38
-rw-r--r--include/svx/measctrl.hxx56
-rw-r--r--include/svx/modctrl.hxx55
-rw-r--r--include/svx/msdffdef.hxx858
-rw-r--r--include/svx/nbdtmg.hxx210
-rw-r--r--include/svx/nbdtmgfact.hxx31
-rw-r--r--include/svx/numfmtsh.hxx229
-rw-r--r--include/svx/numinf.hxx74
-rw-r--r--include/svx/numvset.hxx107
-rw-r--r--include/svx/obj3d.hxx188
-rw-r--r--include/svx/objfac3d.hxx45
-rw-r--r--include/svx/ofaitem.hxx55
-rw-r--r--include/svx/optgenrl.hxx45
-rw-r--r--include/svx/optgrid.hxx136
-rw-r--r--include/svx/pagectrl.hxx153
-rw-r--r--include/svx/pageitem.hxx115
-rw-r--r--include/svx/pagenumberlistbox.hxx42
-rw-r--r--include/svx/papersizelistbox.hxx58
-rw-r--r--include/svx/paraprev.hxx103
-rw-r--r--include/svx/passwd.hxx55
-rw-r--r--include/svx/polypolygoneditor.hxx67
-rw-r--r--include/svx/postattr.hxx100
-rw-r--r--include/svx/pszctrl.hxx48
-rw-r--r--include/svx/rectenum.hxx37
-rw-r--r--include/svx/relfld.hxx70
-rw-r--r--include/svx/rotmodit.hxx61
-rw-r--r--include/svx/rubydialog.hxx140
-rw-r--r--include/svx/ruler.hxx286
-rw-r--r--include/svx/rulritem.hxx236
-rw-r--r--include/svx/samecontentlistbox.hxx32
-rw-r--r--include/svx/scene3d.hxx192
-rw-r--r--include/svx/sdangitm.hxx46
-rw-r--r--include/svx/sdasitm.hxx112
-rw-r--r--include/svx/sderitm.hxx32
-rw-r--r--include/svx/sdgcpitm.hxx45
-rw-r--r--include/svx/sdggaitm.hxx46
-rw-r--r--include/svx/sdgluitm.hxx58
-rw-r--r--include/svx/sdgmoitm.hxx52
-rw-r--r--include/svx/sdmetitm.hxx48
-rw-r--r--include/svx/sdooitm.hxx45
-rw-r--r--include/svx/sdprcitm.hxx59
-rw-r--r--include/svx/sdr/animation/animationstate.hxx58
-rw-r--r--include/svx/sdr/animation/objectanimator.hxx41
-rw-r--r--include/svx/sdr/animation/scheduler.hxx99
-rw-r--r--include/svx/sdr/attribute/sdrallfillattributeshelper.hxx88
-rw-r--r--include/svx/sdr/contact/displayinfo.hxx105
-rw-r--r--include/svx/sdr/contact/objectcontact.hxx176
-rw-r--r--include/svx/sdr/contact/objectcontactofpageview.hxx118
-rw-r--r--include/svx/sdr/contact/viewcontact.hxx154
-rw-r--r--include/svx/sdr/contact/viewcontactofe3dscene.hxx103
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx74
-rw-r--r--include/svx/sdr/contact/viewcontactofsdrobj.hxx80
-rw-r--r--include/svx/sdr/contact/viewcontactofvirtobj.hxx54
-rw-r--r--include/svx/sdr/contact/viewobjectcontact.hxx142
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx64
-rw-r--r--include/svx/sdr/contact/viewobjectcontactredirector.hxx56
-rw-r--r--include/svx/sdr/overlay/overlayanimatedbitmapex.hxx81
-rw-r--r--include/svx/sdr/overlay/overlaybitmapex.hxx61
-rw-r--r--include/svx/sdr/overlay/overlaymanager.hxx130
-rw-r--r--include/svx/sdr/overlay/overlayobject.hxx197
-rw-r--r--include/svx/sdr/overlay/overlayobjectlist.hxx70
-rw-r--r--include/svx/sdr/overlay/overlaypolypolygon.hxx71
-rw-r--r--include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx48
-rw-r--r--include/svx/sdr/overlay/overlayselection.hxx77
-rw-r--r--include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx129
-rw-r--r--include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx57
-rw-r--r--include/svx/sdr/properties/defaultproperties.hxx116
-rw-r--r--include/svx/sdr/properties/properties.hxx190
-rw-r--r--include/svx/sdr/table/tablecontroller.hxx201
-rw-r--r--include/svx/sdr/table/tabledesign.hxx46
-rw-r--r--include/svx/sdrhittesthelper.hxx73
-rw-r--r--include/svx/sdrmasterpagedescriptor.hxx73
-rw-r--r--include/svx/sdrobjectfilter.hxx50
-rw-r--r--include/svx/sdrobjectuser.hxx51
-rw-r--r--include/svx/sdrpageuser.hxx51
-rw-r--r--include/svx/sdrpagewindow.hxx97
-rw-r--r--include/svx/sdrpaintwindow.hxx144
-rw-r--r--include/svx/sdrundomanager.hxx73
-rw-r--r--include/svx/sdshcitm.hxx32
-rw-r--r--include/svx/sdshitm.hxx32
-rw-r--r--include/svx/sdshtitm.hxx32
-rw-r--r--include/svx/sdsxyitm.hxx37
-rw-r--r--include/svx/sdtaaitm.hxx38
-rw-r--r--include/svx/sdtacitm.hxx36
-rw-r--r--include/svx/sdtaditm.hxx50
-rw-r--r--include/svx/sdtagitm.hxx37
-rw-r--r--include/svx/sdtaiitm.hxx51
-rw-r--r--include/svx/sdtaitm.hxx74
-rw-r--r--include/svx/sdtakitm.hxx94
-rw-r--r--include/svx/sdtayitm.hxx35
-rw-r--r--include/svx/sdtcfitm.hxx32
-rw-r--r--include/svx/sdtditm.hxx47
-rw-r--r--include/svx/sdtfchim.hxx44
-rw-r--r--include/svx/sdtfsitm.hxx66
-rw-r--r--include/svx/sdtmfitm.hxx47
-rw-r--r--include/svx/sdynitm.hxx41
-rw-r--r--include/svx/searchcharmap.hxx71
-rw-r--r--include/svx/selctrl.hxx48
-rw-r--r--include/svx/selectioncontroller.hxx87
-rw-r--r--include/svx/shapepropertynotifier.hxx142
-rw-r--r--include/svx/sidebar/AreaPropertyPanelBase.hxx175
-rw-r--r--include/svx/sidebar/AreaTransparencyGradientPopup.hxx66
-rw-r--r--include/svx/sidebar/ContextChangeEventMultiplexer.hxx65
-rw-r--r--include/svx/sidebar/InspectorTextPanel.hxx61
-rw-r--r--include/svx/sidebar/LinePropertyPanelBase.hxx140
-rw-r--r--include/svx/sidebar/LineWidthPopup.hxx71
-rw-r--r--include/svx/sidebar/SelectionAnalyzer.hxx76
-rw-r--r--include/svx/sidebar/SelectionChangeHandler.hxx75
-rw-r--r--include/svx/sidebar/ValueSetWithTextControl.hxx61
-rw-r--r--include/svx/signaturelinehelper.hxx70
-rw-r--r--include/svx/spacinglistbox.hxx41
-rw-r--r--include/svx/sphere3d.hxx89
-rw-r--r--include/svx/srchdlg.hxx270
-rw-r--r--include/svx/strarray.hxx53
-rw-r--r--include/svx/strings.hrc1838
-rw-r--r--include/svx/svdcrtv.hxx168
-rw-r--r--include/svx/svddef.hxx439
-rw-r--r--include/svx/svddrag.hxx177
-rw-r--r--include/svx/svddrgmt.hxx304
-rw-r--r--include/svx/svddrgv.hxx230
-rw-r--r--include/svx/svdedtv.hxx418
-rw-r--r--include/svx/svdedxv.hxx325
-rw-r--r--include/svx/svdetc.hxx211
-rw-r--r--include/svx/svdglev.hxx85
-rw-r--r--include/svx/svdglue.hxx228
-rw-r--r--include/svx/svdhdl.hxx535
-rw-r--r--include/svx/svdhlpln.hxx91
-rw-r--r--include/svx/svditer.hxx74
-rw-r--r--include/svx/svdlayer.hxx164
-rw-r--r--include/svx/svdmark.hxx261
-rw-r--r--include/svx/svdmodel.hxx641
-rw-r--r--include/svx/svdmrkv.hxx469
-rw-r--r--include/svx/svdoashp.hxx253
-rw-r--r--include/svx/svdoattr.hxx66
-rw-r--r--include/svx/svdobj.hxx1036
-rw-r--r--include/svx/svdobjkind.hxx154
-rw-r--r--include/svx/svdocapt.hxx154
-rw-r--r--include/svx/svdocirc.hxx143
-rw-r--r--include/svx/svdoedge.hxx411
-rw-r--r--include/svx/svdograf.hxx301
-rw-r--r--include/svx/svdogrp.hxx122
-rw-r--r--include/svx/svdomeas.hxx203
-rw-r--r--include/svx/svdomedia.hxx83
-rw-r--r--include/svx/svdoole2.hxx213
-rw-r--r--include/svx/svdopage.hxx69
-rw-r--r--include/svx/svdopath.hxx175
-rw-r--r--include/svx/svdorect.hxx127
-rw-r--r--include/svx/svdotable.hxx294
-rw-r--r--include/svx/svdotext.hxx633
-rw-r--r--include/svx/svdouno.hxx145
-rw-r--r--include/svx/svdoutl.hxx51
-rw-r--r--include/svx/svdovirt.hxx156
-rw-r--r--include/svx/svdpage.hxx545
-rw-r--r--include/svx/svdpagv.hxx254
-rw-r--r--include/svx/svdpntv.hxx504
-rw-r--r--include/svx/svdpoev.hxx82
-rw-r--r--include/svx/svdpool.hxx46
-rw-r--r--include/svx/svdsnpv.hxx287
-rw-r--r--include/svx/svdsob.hxx94
-rw-r--r--include/svx/svdtext.hxx81
-rw-r--r--include/svx/svdtrans.hxx286
-rw-r--r--include/svx/svdtypes.hxx90
-rw-r--r--include/svx/svdundo.hxx785
-rw-r--r--include/svx/svdview.hxx281
-rw-r--r--include/svx/svdviter.hxx83
-rw-r--r--include/svx/svdxcgv.hxx113
-rw-r--r--include/svx/svx3ditems.hxx319
-rw-r--r--include/svx/svxdlg.hxx451
-rw-r--r--include/svx/svxdllapi.h41
-rw-r--r--include/svx/svxerr.hxx62
-rw-r--r--include/svx/svxgraphicitem.hxx41
-rw-r--r--include/svx/svxids.hrc1068
-rw-r--r--include/svx/svxitems.hrc95
-rw-r--r--include/svx/swframeexample.hxx94
-rw-r--r--include/svx/swframeposstrings.hxx84
-rw-r--r--include/svx/swframetypes.hxx48
-rw-r--r--include/svx/swframevalidation.hxx85
-rw-r--r--include/svx/sxcecitm.hxx98
-rw-r--r--include/svx/sxcgitm.hxx44
-rw-r--r--include/svx/sxciaitm.hxx37
-rw-r--r--include/svx/sxcllitm.hxx61
-rw-r--r--include/svx/sxctitm.hxx41
-rw-r--r--include/svx/sxekitm.hxx44
-rw-r--r--include/svx/sxelditm.hxx55
-rw-r--r--include/svx/sxenditm.hxx72
-rw-r--r--include/svx/sxmbritm.hxx46
-rw-r--r--include/svx/sxmlhitm.hxx70
-rw-r--r--include/svx/sxmtfitm.hxx70
-rw-r--r--include/svx/sxmtpitm.hxx62
-rw-r--r--include/svx/sxmtritm.hxx54
-rw-r--r--include/svx/sxmuitm.hxx44
-rw-r--r--include/svx/tabarea.hxx37
-rw-r--r--include/svx/tabline.hxx35
-rw-r--r--include/svx/tbcontrl.hxx281
-rw-r--r--include/svx/tbxcolor.hxx59
-rw-r--r--include/svx/tbxctl.hxx54
-rw-r--r--include/svx/transfrmhelper.hxx51
-rw-r--r--include/svx/txencbox.hxx158
-rw-r--r--include/svx/txenctab.hxx35
-rw-r--r--include/svx/ucsubset.hxx74
-rw-r--r--include/svx/uiobject.hxx61
-rw-r--r--include/svx/unoapi.hxx94
-rw-r--r--include/svx/unobrushitemhelper.hxx54
-rw-r--r--include/svx/unodraw/SvxTableShape.hxx44
-rw-r--r--include/svx/unofill.hxx37
-rw-r--r--include/svx/unomaster.hxx76
-rw-r--r--include/svx/unomid.hxx97
-rw-r--r--include/svx/unomod.hxx71
-rw-r--r--include/svx/unomodel.hxx109
-rw-r--r--include/svx/unopage.hxx139
-rw-r--r--include/svx/unopool.hxx98
-rw-r--r--include/svx/unoprov.hxx115
-rw-r--r--include/svx/unoshape.hxx871
-rw-r--r--include/svx/unoshprp.hxx577
-rw-r--r--include/svx/unoshtxt.hxx89
-rw-r--r--include/svx/view3d.hxx120
-rw-r--r--include/svx/viewlayoutitem.hxx51
-rw-r--r--include/svx/viewpt3d.hxx95
-rw-r--r--include/svx/weldeditview.hxx114
-rw-r--r--include/svx/xbitmap.hxx59
-rw-r--r--include/svx/xbtmpit.hxx67
-rw-r--r--include/svx/xcolit.hxx62
-rw-r--r--include/svx/xdash.hxx69
-rw-r--r--include/svx/xdef.hxx151
-rw-r--r--include/svx/xenum.hxx31
-rw-r--r--include/svx/xfillit0.hxx55
-rw-r--r--include/svx/xfilluseslidebackgrounditem.hxx31
-rw-r--r--include/svx/xflasit.hxx42
-rw-r--r--include/svx/xflbckit.hxx49
-rw-r--r--include/svx/xflbmpit.hxx46
-rw-r--r--include/svx/xflbmsli.hxx41
-rw-r--r--include/svx/xflbmsxy.hxx60
-rw-r--r--include/svx/xflbmtit.hxx42
-rw-r--r--include/svx/xflboxy.hxx54
-rw-r--r--include/svx/xflbstit.hxx42
-rw-r--r--include/svx/xflbtoxy.hxx54
-rw-r--r--include/svx/xflclit.hxx56
-rw-r--r--include/svx/xflftrit.hxx63
-rw-r--r--include/svx/xflgrit.hxx64
-rw-r--r--include/svx/xflhtit.hxx63
-rw-r--r--include/svx/xfltrit.hxx46
-rw-r--r--include/svx/xftadit.hxx48
-rw-r--r--include/svx/xftdiit.hxx42
-rw-r--r--include/svx/xftmrit.hxx42
-rw-r--r--include/svx/xftouit.hxx44
-rw-r--r--include/svx/xftshcit.hxx44
-rw-r--r--include/svx/xftshit.hxx48
-rw-r--r--include/svx/xftshxy.hxx57
-rw-r--r--include/svx/xftstit.hxx43
-rw-r--r--include/svx/xgrad.hxx86
-rw-r--r--include/svx/xgrscit.hxx45
-rw-r--r--include/svx/xhatch.hxx59
-rw-r--r--include/svx/xit.hxx70
-rw-r--r--include/svx/xlineit0.hxx48
-rw-r--r--include/svx/xlinjoit.hxx49
-rw-r--r--include/svx/xlnasit.hxx42
-rw-r--r--include/svx/xlncapit.hxx50
-rw-r--r--include/svx/xlnclit.hxx49
-rw-r--r--include/svx/xlndsit.hxx66
-rw-r--r--include/svx/xlnedcit.hxx45
-rw-r--r--include/svx/xlnedit.hxx61
-rw-r--r--include/svx/xlnedwit.hxx48
-rw-r--r--include/svx/xlnstcit.hxx45
-rw-r--r--include/svx/xlnstit.hxx61
-rw-r--r--include/svx/xlnstwit.hxx48
-rw-r--r--include/svx/xlntrit.hxx45
-rw-r--r--include/svx/xlnwtit.hxx46
-rw-r--r--include/svx/xmleohlp.hxx124
-rw-r--r--include/svx/xmlexchg.hxx83
-rw-r--r--include/svx/xmlgrhlp.hxx128
-rw-r--r--include/svx/xmlsecctrl.hxx46
-rw-r--r--include/svx/xoutbmp.hxx74
-rw-r--r--include/svx/xpoly.hxx155
-rw-r--r--include/svx/xpool.hxx50
-rw-r--r--include/svx/xsflclit.hxx40
-rw-r--r--include/svx/xtable.hxx394
-rw-r--r--include/svx/xtextit0.hxx61
-rw-r--r--include/svx/zoom_def.hxx30
-rw-r--r--include/svx/zoomctrl.hxx63
-rw-r--r--include/svx/zoomsliderctrl.hxx56
-rw-r--r--include/svx/zoomslideritem.hxx54
424 files changed, 53145 insertions, 0 deletions
diff --git a/include/svx/AccessibilityCheckDialog.hxx b/include/svx/AccessibilityCheckDialog.hxx
new file mode 100644
index 000000000..e3e1e201f
--- /dev/null
+++ b/include/svx/AccessibilityCheckDialog.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+#define INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+
+#include <sfx2/AccessibilityIssue.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/link.hxx>
+#include <vcl/weld.hxx>
+
+namespace svx
+{
+class AccessibilityCheckEntry final
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<weld::Label> m_xLabel;
+ std::unique_ptr<weld::Button> m_xGotoButton;
+
+ std::shared_ptr<sfx::AccessibilityIssue> const& m_pAccessibilityIssue;
+
+public:
+ AccessibilityCheckEntry(weld::Container* pParent,
+ std::shared_ptr<sfx::AccessibilityIssue> const& pAccessibilityIssue);
+
+ weld::Widget* get_widget() const { return m_xContainer.get(); }
+
+ DECL_LINK(GotoButtonClicked, weld::Button&, void);
+};
+
+class SVX_DLLPUBLIC AccessibilityCheckDialog final : public weld::GenericDialogController
+{
+private:
+ sfx::AccessibilityIssueCollection m_aIssueCollection;
+ std::vector<std::unique_ptr<AccessibilityCheckEntry>> m_aAccessibilityCheckEntries;
+
+ // Controls
+ std::unique_ptr<weld::Box> m_xAccessibilityCheckBox;
+
+public:
+ AccessibilityCheckDialog(weld::Window* pParent,
+ sfx::AccessibilityIssueCollection const& rIssueCollection);
+ virtual ~AccessibilityCheckDialog() override;
+};
+
+} // end svx namespace
+
+#endif // INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleControlShape.hxx b/include/svx/AccessibleControlShape.hxx
new file mode 100644
index 000000000..a90ab5ee9
--- /dev/null
+++ b/include/svx/AccessibleControlShape.hxx
@@ -0,0 +1,207 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBLECONTROLSHAPE_HXX
+#define INCLUDED_SVX_ACCESSIBLECONTROLSHAPE_HXX
+
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/util/XModeChangeListener.hpp>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/AccessibleShape.hxx>
+
+namespace com::sun::star {
+ namespace accessibility { class XAccessible; }
+ namespace accessibility { class XAccessibleContext; }
+ namespace accessibility { struct AccessibleEventObject; }
+ namespace accessibility { class XAccessibleRelationSet; }
+ namespace awt { class XControl; }
+ namespace beans { class XPropertySet; }
+ namespace beans { class XPropertySetInfo; }
+ namespace beans { struct PropertyChangeEvent; }
+ namespace container { struct ContainerEvent; }
+ namespace lang { class XComponent; }
+ namespace lang { class XTypeProvider; }
+ namespace uno { class XAggregation; }
+ namespace util { struct ModeChangeEvent; }
+}
+
+namespace comphelper
+{
+ class OWrappedAccessibleChildrenManager;
+}
+
+namespace accessibility {
+
+ class AccessibleShapeInfo;
+ class AccessibleShapeTreeInfo;
+
+ typedef ::cppu::ImplHelper4 < css::beans::XPropertyChangeListener
+ , css::util::XModeChangeListener
+ , css::container::XContainerListener
+ , css::accessibility::XAccessibleEventListener
+ > AccessibleControlShape_Base;
+/** @descr
+*/
+class SAL_DLLPUBLIC_RTTI AccessibleControlShape final
+ :public AccessibleShape
+ ,public AccessibleControlShape_Base
+{
+public:
+ //===== internal ========================================================
+ AccessibleControlShape(
+ const AccessibleShapeInfo& rShapeInfo,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo);
+ virtual ~AccessibleControlShape( ) override;
+
+ const css::uno::Reference< css::beans::XPropertySet >& GetControlModel( ) const { return m_xControlModel;}
+ AccessibleControlShape* GetLabeledByControlShape();
+
+private:
+ //--- XAccessibleComponent -------------------------------
+ /// forward the focus to the contained control(in alive mode)
+ virtual void SAL_CALL grabFocus( ) override;
+
+ //--- XAccessibleContext ---------------------------------
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
+ virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
+ virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
+
+ //--- XServiceInfo ---------------------------------------
+ virtual OUString SAL_CALL getImplementationName( ) override;
+
+ //--- XInterface -----------------------------------------
+ DECLARE_XINTERFACE( )
+
+ //--- XTypeProvider --------------------------------------
+ DECLARE_XTYPEPROVIDER( )
+
+ //--- XPropertyChangeListener ----------------------------
+ virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& _rEvent ) override;
+
+ //--- XComponent -----------------------------------------
+ virtual void SAL_CALL disposing( ) override;
+
+ //--- XEventListener -------------------------------------
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ //--- XModeChangeListener --------------------------------
+ virtual void SAL_CALL modeChanged( const css::util::ModeChangeEvent& _rSource ) override;
+
+ //--- XAccessibleEventListener ----------------------------
+ virtual void SAL_CALL notifyEvent( const css::accessibility::AccessibleEventObject& aEvent ) override;
+
+ // XVclContainerListener
+ virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
+
+ /** Initialize a new shape. See the documentation of the base' constructor
+ for the reason of this method's existence.
+ */
+ virtual void Init( ) override;
+
+ /// Create a name string that contains the accessible name.
+ virtual OUString
+ CreateAccessibleBaseName( ) override;
+
+ /** Create a unique name string that contains the accessible name. The
+ name consists of the base name and the index.
+ */
+ virtual OUString
+ CreateAccessibleName( ) override;
+
+ /// Create a description string that contains the accessible description.
+ OUString CreateAccessibleDescription();
+
+#ifdef DBG_UTIL
+ /// Set the specified state
+ virtual bool SetState( sal_Int16 _nState ) override;
+#endif // DBG_UTIL
+
+ /// (safely) reads the given property from the model of the UNO control
+ OUString getControlModelStringProperty( const OUString& _rPropertyName ) const;
+
+ /// ensure that our control model exists(will be retrieved upon need only)
+ bool ensureControlModelAccess( );
+
+ /// ensures that we're listening for the given property if(and only if!) necessary
+ bool ensureListeningState( const bool _bCurrentlyListening, const bool _bNeedNewListening,
+ const OUString& _rPropertyName );
+
+ /// starts multiplexing the state changes of our aggregate context
+ void startStateMultiplexing( );
+ /// stops multiplexing the state changes of our aggregate context
+ void stopStateMultiplexing( );
+
+ /** adjusts our AccessibleRole, depending on the control type we're working for
+
+ <p>Only to be called during initialization</p>
+ */
+ void adjustAccessibleRole( );
+
+ /** initializes composed states of the context
+
+ <p>Some of the states of our inner context need to be propagated to the "composed context", too
+ (such as "checked" for check boxes). At lifetime, this is done by multiplexing state changes,
+ at initialization time, this method is used.</p>
+ */
+ void initializeComposedState( );
+
+ AccessibleControlShape(const AccessibleControlShape&) = delete;
+ AccessibleControlShape& operator= (const AccessibleControlShape&) = delete;
+
+ css::uno::Reference< css::beans::XPropertySet >
+ m_xControlModel;
+ css::uno::Reference< css::beans::XPropertySetInfo >
+ m_xModelPropsMeta; // cache this for performance reasons
+ css::uno::Reference< css::awt::XControl >
+ m_xUnoControl; // our UNO control
+
+ css::uno::WeakReference< css::accessibility::XAccessibleContext >
+ m_aControlContext; // the AccessibleContext of the control
+ css::uno::Reference< css::uno::XAggregation >
+ m_xControlContextProxy; // the proxy for "aggregating" the AccessibleContext of the control
+ css::uno::Reference< css::lang::XTypeProvider >
+ m_xControlContextTypeAccess; // cached interface of our aggregate
+ css::uno::Reference< css::lang::XComponent >
+ m_xControlContextComponent; // cached interface of our aggregate
+
+ rtl::Reference<::comphelper::OWrappedAccessibleChildrenManager>
+ m_pChildManager;
+
+ bool m_bListeningForName : 1; // are we currently listening for changes of the "Name" property?
+ bool m_bListeningForDesc : 1; // are we currently listening for changes of the "HelpText" property?
+ bool m_bMultiplexingStates : 1; // are we currently multiplexing state changes of the native context?
+ bool m_bDisposeNativeContext : 1; // do we need to dispose mxNativeContextComponent?
+ bool m_bWaitingForControl : 1; // if we are created before our control exists, we need to wait for it to appear ...
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleGraphicShape.hxx b/include/svx/AccessibleGraphicShape.hxx
new file mode 100644
index 000000000..a81aa130b
--- /dev/null
+++ b/include/svx/AccessibleGraphicShape.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBLEGRAPHICSHAPE_HXX
+#define INCLUDED_SVX_ACCESSIBLEGRAPHICSHAPE_HXX
+
+#include <com/sun/star/accessibility/XAccessibleImage.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/AccessibleShape.hxx>
+#include <svx/svxdllapi.h>
+
+namespace accessibility {
+
+class AccessibleShapeInfo;
+class AccessibleShapeTreeInfo;
+
+/** @descr
+ This class makes graphic shapes accessible. With respect to its
+ base class AccessibleShape it supports the additional
+ XAccessibleImage interface.
+*/
+class SVX_DLLPUBLIC AccessibleGraphicShape
+ : public AccessibleShape,
+ public css::accessibility::XAccessibleImage
+{
+public:
+ //===== internal ========================================================
+ AccessibleGraphicShape (
+ const AccessibleShapeInfo& rShapeInfo,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo);
+
+ virtual ~AccessibleGraphicShape() override;
+
+ //===== XAccessibleImage ================================================
+
+ OUString SAL_CALL getAccessibleImageDescription() override;
+
+ sal_Int32 SAL_CALL getAccessibleImageHeight() override;
+
+ sal_Int32 SAL_CALL getAccessibleImageWidth() override;
+
+ //===== XInterface ======================================================
+
+ virtual css::uno::Any SAL_CALL
+ queryInterface (const css::uno::Type & rType) override;
+
+ virtual void SAL_CALL
+ acquire()
+ noexcept override;
+
+ virtual void SAL_CALL
+ release()
+ noexcept override;
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual OUString SAL_CALL
+ getImplementationName() override;
+
+ virtual css::uno::Sequence< OUString> SAL_CALL
+ getSupportedServiceNames() override;
+
+ //===== XTypeProvider ===================================================
+
+ virtual css::uno::Sequence< css::uno::Type> SAL_CALL
+ getTypes() override;
+
+protected:
+ /// Create a name string that contains the accessible name.
+ virtual OUString
+ CreateAccessibleBaseName () override;
+
+private:
+ AccessibleGraphicShape (const AccessibleGraphicShape&) = delete;
+
+ AccessibleGraphicShape& operator= (const AccessibleGraphicShape&) = delete;
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleOLEShape.hxx b/include/svx/AccessibleOLEShape.hxx
new file mode 100644
index 000000000..5816de245
--- /dev/null
+++ b/include/svx/AccessibleOLEShape.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBLEOLESHAPE_HXX
+#define INCLUDED_SVX_ACCESSIBLEOLESHAPE_HXX
+
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/AccessibleShape.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star {
+ namespace accessibility { class XAccessibleKeyBinding; }
+}
+
+namespace accessibility {
+
+class AccessibleShapeInfo;
+class AccessibleShapeTreeInfo;
+
+/** @descr
+ This class makes OLE objects accessible. With respect to its
+ base class AccessibleShape it supports the additional
+ XAccessibleAction interface.
+*/
+class SVX_DLLPUBLIC AccessibleOLEShape
+ : public AccessibleShape,
+ public css::accessibility::XAccessibleAction
+{
+public:
+ //===== internal ========================================================
+ AccessibleOLEShape (
+ const AccessibleShapeInfo& rShapeInfo,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo);
+ virtual ~AccessibleOLEShape() override;
+
+ //===== XAccessibleAction ===============================================
+
+ sal_Int32 SAL_CALL getAccessibleActionCount() override;
+
+ sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) override;
+
+ OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) override;
+
+ css::uno::Reference<
+ css::accessibility::XAccessibleKeyBinding> SAL_CALL getAccessibleActionKeyBinding (
+ sal_Int32 nIndex) override;
+
+ //===== XInterface ======================================================
+
+ virtual css::uno::Any SAL_CALL
+ queryInterface (const css::uno::Type & rType) override;
+
+ virtual void SAL_CALL
+ acquire()
+ noexcept override;
+
+ virtual void SAL_CALL
+ release()
+ noexcept override;
+
+ //===== XServiceInfo ====================================================
+
+ virtual OUString SAL_CALL
+ getImplementationName() override;
+
+ virtual css::uno::Sequence< OUString> SAL_CALL
+ getSupportedServiceNames() override;
+
+ //===== XTypeProvider ===================================================
+
+ virtual css::uno::Sequence< css::uno::Type> SAL_CALL
+ getTypes() override;
+// ====== XAccessibleExtendedAttributes =====================================
+ virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+protected:
+ /// Create a name string that contains the accessible name.
+ virtual OUString
+ CreateAccessibleBaseName () override;
+
+private:
+ AccessibleOLEShape (const AccessibleOLEShape&) = delete;
+
+ AccessibleOLEShape& operator= (const AccessibleOLEShape&) = delete;
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx
new file mode 100644
index 000000000..082bb72c4
--- /dev/null
+++ b/include/svx/AccessibleShape.hxx
@@ -0,0 +1,439 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#ifndef INCLUDED_SVX_ACCESSIBLESHAPE_HXX
+#define INCLUDED_SVX_ACCESSIBLESHAPE_HXX
+
+#include <com/sun/star/accessibility/AccessibleScrollType.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/document/XShapeEventListener.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
+#include <editeng/AccessibleContextBase.hxx>
+#include <editeng/AccessibleComponentBase.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/AccessibleShapeTreeInfo.hxx>
+#include <svx/IAccessibleViewForwarderListener.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+namespace com::sun::star {
+ namespace accessibility { class XAccessible; }
+ namespace accessibility { class XAccessibleEventListener; }
+ namespace accessibility { class XAccessibleHyperlink; }
+ namespace accessibility { class XAccessibleRelationSet; }
+ namespace accessibility { class XAccessibleStateSet; }
+ namespace beans { struct PropertyValue; }
+ namespace document { struct EventObject; }
+ namespace drawing { class XShape; }
+ namespace uno { class XInterface; }
+}
+
+class SdrObject;
+
+namespace accessibility {
+
+class AccessibleShapeInfo;
+class AccessibleTextHelper;
+class ChildrenManager;
+class IAccessibleParent;
+
+/** This base class provides a base implementation for all shapes. For more
+ detailed documentation about the methods refer to the descriptions of
+ the implemented interfaces. These are, among others,
+ XAccessible, <type>XAccessibleContext</type>,
+ XAccessibleComponent and
+ XAccessibleExtendedComponent.
+
+ <p>The children of a shape can stem from two sources which, in case of
+ SVX and SD shapes, are mutually exclusive. This implementation,
+ however, handles both simultaneously to cope with future extensions or
+ shapes from other projects.
+ <ul>
+ <li>If this shape is a group shape, i.e. a
+ SvxShapeGroup or a <type>Svx3DSceneObject</type>, it
+ can have nested shapes.</li>
+ <li>If this shape is a descendant from SvxShapeText
+ then the text paragraphs are its children.</li>
+ </ul>
+ </p>
+
+ <p>Accessible shapes do not listen for disposing() calls of the UNO
+ shapes they make accessible. This is the task of their owner, usually a
+ container, who can then call dispose() at the accessible object.</p>
+*/
+class SVX_DLLPUBLIC AccessibleShape
+ : public AccessibleContextBase,
+ public AccessibleComponentBase,
+ public css::accessibility::XAccessibleSelection,
+ public css::accessibility::XAccessibleExtendedAttributes,
+ public css::accessibility::XAccessibleGroupPosition,
+ public css::accessibility::XAccessibleHypertext,
+ public IAccessibleViewForwarderListener,
+ public css::document::XShapeEventListener,
+ public css::lang::XUnoTunnel
+{
+public:
+ //===== internal ========================================================
+
+ /** Create a new accessible object that makes the given shape accessible.
+ @param rShapeInfo
+ This object contains all information specific to the new
+ accessible shape. That are e.g. the shape to be made accessible
+ and the accessible object that will become the parent of the new
+ object.
+ @param rShapeTreeInfo
+ Bundle of information passed to this shape and all of its descendants.
+ @attention
+ Always call the <member>init</member> method after creating a
+ new accessible shape. This is one way to overcome the potential
+ problem of registering the new object with e.g. event
+ broadcasters. That would delete the new object if a broadcaster
+ would not keep a strong reference to the new object.
+ */
+ AccessibleShape (
+ const AccessibleShapeInfo& rShapeInfo,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo);
+ //Solution: Overwrite the object's current name.
+ virtual OUString SAL_CALL getAccessibleName() override;
+ virtual OUString SAL_CALL getAccessibleDescription() override;
+ virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet() override;
+//===== XAccessibleSelection ============================================
+
+ virtual void SAL_CALL selectAccessibleChild(
+ sal_Int32 nChildIndex ) override;
+
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+ sal_Int32 nChildIndex ) override;
+
+ virtual void SAL_CALL clearAccessibleSelection( ) override;
+
+ virtual void SAL_CALL selectAllAccessibleChildren( ) override;
+
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) override;
+
+ virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex ) override;
+
+ virtual void SAL_CALL deselectAccessibleChild(
+ sal_Int32 nSelectedChildIndex ) override;
+
+ // ====== XAccessibleExtendedAttributes =====================================
+ virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL getAccessibleRole() override;
+ //===== XAccessibleGroupPosition =========================================
+ virtual css::uno::Sequence< sal_Int32 > SAL_CALL
+ getGroupPosition( const css::uno::Any& rAny ) override;
+ virtual OUString SAL_CALL getObjectLink( const css::uno::Any& accoject ) override;
+ /** The destructor releases its children manager and text engine if
+ still existent. These are responsible to send appropriate events.
+ */
+ virtual ~AccessibleShape() override;
+
+ /** Initialize a new shape. See the documentation of the constructor
+ for the reason of this method's existence.
+ */
+ virtual void Init();
+
+ /** Set the specified state. If the state is <const>FOCUSED</const>
+ then, additionally to the inherited functionality, the focus
+ listeners registered with the XAccessibleComponent
+ interface are called (if that state really changes).
+
+ @param aState
+ The state to turn on.
+
+ @return
+ The returned flag indicates whether the specified state has been
+ changed (<TRUE/>), i.e. it has formerly not been set.
+ */
+ virtual bool SetState (sal_Int16 aState) override;
+
+ /** Reset the specified state. If the state is <const>FOCUSED</const>
+ then, additionally to the inherited functionality, the focus
+ listeners registered with the XAccessibleComponent
+ interface are called (if that state really changes).
+
+ @param aState
+ The state to turn off.
+
+ @return
+ The returned flag indicates whether the specified state has been
+ changed (<TRUE/>), i.e. it has formerly been set.
+ */
+ virtual bool ResetState (sal_Int16 aState) override;
+
+ /** Return the state of the specified state. Take the
+ <const>FOCUSED</const> state from the accessible edit engine.
+
+ @param aState
+ The state for which to return its value.
+ @return
+ A value of <TRUE/> indicates that the state is set. A <FALSE/>
+ value indicates an unset state or the inability to access the
+ entity that manages the state set.
+
+ */
+ bool GetState (sal_Int16 aState);
+
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount() override;
+
+ /** Return the specified child.
+ @param nIndex
+ Index of the requested child.
+ @return
+ Reference of the requested child which is the accessible object
+ of a visible shape.
+ @throws IndexOutOfBoundsException
+ Throws an exception if the index is not valid.
+ */
+ virtual css::uno::Reference<
+ css::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild (sal_Int32 nIndex) override;
+
+
+ /// Return the set of current states.
+ virtual css::uno::Reference<
+ css::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet() override;
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent() override;
+
+ //===== XAccessibleComponent ============================================
+
+ virtual css::uno::Reference<
+ css::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint (const css::awt::Point& aPoint) override;
+
+ virtual css::awt::Rectangle SAL_CALL getBounds() override;
+
+ virtual css::awt::Point SAL_CALL getLocation() override;
+
+ virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
+
+ virtual css::awt::Size SAL_CALL getSize() override;
+
+ virtual sal_Int32 SAL_CALL getForeground() override;
+
+ virtual sal_Int32 SAL_CALL getBackground() override;
+
+ //===== XAccessibleEventBroadcaster =====================================
+
+ /** This call is forwarded to a) the base class and b) to the
+ accessible edit engine if it is present.
+
+ @param rxListener
+ This listener is informed about accessibility events.
+ */
+ virtual void SAL_CALL
+ addAccessibleEventListener (
+ const css::uno::Reference<
+ css::accessibility::XAccessibleEventListener >& rxListener) override;
+
+ /** This call is forwarded to a) the base class and b) to the
+ accessible edit engine if it is present.
+
+ @param rxListener
+ This listener will not be informed about accessibility events
+ anymore.
+ */
+ virtual void SAL_CALL
+ removeAccessibleEventListener (
+ const css::uno::Reference<
+ css::accessibility::XAccessibleEventListener >& rxListener) override;
+
+
+ //===== XInterface ======================================================
+
+ virtual css::uno::Any SAL_CALL
+ queryInterface (const css::uno::Type & rType) override;
+
+ virtual void SAL_CALL
+ acquire()
+ noexcept override;
+
+ virtual void SAL_CALL
+ release()
+ noexcept override;
+
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual OUString SAL_CALL
+ getImplementationName() override;
+
+ virtual css::uno::Sequence< OUString> SAL_CALL
+ getSupportedServiceNames() override;
+
+ //===== XTypeProvider ===================================================
+
+ virtual css::uno::Sequence< css::uno::Type> SAL_CALL
+ getTypes() override;
+
+ //===== IAccessibleViewForwarderListener ================================
+ virtual void ViewForwarderChanged() override;
+
+ /** Listen for disposing events of the model. The accessible shape
+ remains functional when this happens.
+ */
+ void disposing (const css::lang::EventObject& Source);
+
+ //===== document::XShapeEventListener ========================================
+
+ virtual void SAL_CALL
+ notifyShapeEvent (const css::document::EventObject& rEventObject) override;
+
+
+ //===== XUnoTunnel ========================================================
+
+ UNO3_GETIMPLEMENTATION_DECL(AccessibleShape)
+
+ //===== XAccessibleHypertext ========================================================
+ virtual sal_Int32 SAL_CALL getHyperLinkCount() override;
+ virtual css::uno::Reference< css::accessibility::XAccessibleHyperlink >
+ SAL_CALL getHyperLink( sal_Int32 nLinkIndex ) override;
+ virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex ) override;
+ //===== XAccessibleText ==================================================
+ virtual sal_Int32 SAL_CALL getCaretPosition( ) override;
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) override;
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) override;//Shen Zhen Jie changed sal_Unicode to sal_uInt32; change back to sal_Unicode
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
+ virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) override;
+ virtual sal_Int32 SAL_CALL getCharacterCount( ) override;
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) override;
+ virtual OUString SAL_CALL getSelectedText( ) override;
+ virtual sal_Int32 SAL_CALL getSelectionStart( ) override;
+ virtual sal_Int32 SAL_CALL getSelectionEnd( ) override;
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
+ virtual OUString SAL_CALL getText( ) override;
+ virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
+ virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
+ virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
+ virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
+ virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override;
+
+ //===== Misc ========================================================
+
+ const css::uno::Reference< css::drawing::XShape >&
+ GetXShape() const { return mxShape; }
+
+ /** set the index _nIndex at the accessible shape
+ @param _nIndex
+ The new index in parent.
+ */
+ void setIndexInParent(sal_Int32 _nIndex) { m_nIndexInParent = _nIndex; }
+
+protected:
+ /// Children manager. May be empty if there are no children.
+ std::unique_ptr<ChildrenManager> mpChildrenManager;
+
+ /// Reference to the actual shape.
+ css::uno::Reference<
+ css::drawing::XShape> mxShape;
+
+ /** Bundle of information passed to all shapes in a document tree.
+ */
+ AccessibleShapeTreeInfo maShapeTreeInfo;
+
+ /** the index in parent.
+ */
+ sal_Int32 m_nIndexInParent;
+
+ /** The accessible text engine. May be NULL if it can not be created.
+ */
+ std::unique_ptr<AccessibleTextHelper> mpText;
+
+ /** This object can be used to modify the child list of our parent.
+ */
+ IAccessibleParent* mpParent;
+
+ /** This object can be removed when we have an extra interface to ask if the shape is selected
+ */
+ SdrObject* m_pShape;
+
+ /** This method is called from the component helper base class while
+ disposing.
+ */
+ virtual void SAL_CALL disposing() override;
+
+ /** Create a base name string that contains the accessible name.
+
+ @throws css::uno::RuntimeException
+ */
+ virtual OUString
+ CreateAccessibleBaseName();
+
+ /** Create a unique name string that contains the accessible name. The
+ name consists of the base name and the index.
+ */
+ virtual OUString
+ CreateAccessibleName() override;
+
+ /// @throws css::uno::RuntimeException
+ OUString
+ GetFullAccessibleName(AccessibleShape *shape);
+ virtual OUString GetStyle() const;
+ /** Update the <const>OPAQUE</const> and <const>SELECTED</const> state.
+ */
+ void UpdateStates();
+
+private:
+ AccessibleShape (const AccessibleShape&) = delete;
+ AccessibleShape& operator= (const AccessibleShape&) = delete;
+ //Old accessible name
+ OUString aAccName;
+
+ /** Call this method when the title, name, or description of the mxShape
+ member (may) have been changed.
+ This method adapts the name and description members of the
+ AccessibleContextBase base class.
+ */
+ void UpdateNameAndDescription();
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleShapeInfo.hxx b/include/svx/AccessibleShapeInfo.hxx
new file mode 100644
index 000000000..5cb9bfb0d
--- /dev/null
+++ b/include/svx/AccessibleShapeInfo.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBLESHAPEINFO_HXX
+#define INCLUDED_SVX_ACCESSIBLESHAPEINFO_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star {
+ namespace accessibility { class XAccessible; }
+ namespace drawing { class XShape; }
+}
+
+namespace accessibility {
+
+class IAccessibleParent;
+
+/** @descr
+ This class is a container for the information specific for a single
+ shape that is passed to the constructor of that shape. It allows to
+ separate the class definitions of the shapes from the information
+ needed on construction. Only the shapes' implementation has to be
+ adapted to a modified AccessibleShapeInfo definition.
+
+ <p>Note that this class complements the
+ AccessibleShapeTreeInfo interface which contains
+ information that is passed to all shapes in a subtree not just to a
+ single shape. </p>
+*/
+class SVX_DLLPUBLIC AccessibleShapeInfo
+{
+public:
+ /** The shape itself for which an accessible object is to be
+ constructed.
+ */
+ css::uno::Reference<
+ css::drawing::XShape> mxShape;
+
+ /** The accessible parent object of the shape.
+ */
+ css::uno::Reference<
+ css::accessibility::XAccessible> mxParent;
+
+ /** This object that may be realized by the same implementation as that
+ of that of <member>mxParent</member> can be used to modify
+ parent/child relationships with the shape as initiator.
+ Note that NULL is a valid value for this member.
+ */
+ IAccessibleParent* mpChildrenManager;
+
+ /** Copy the given values into the members described above.
+ */
+ AccessibleShapeInfo (
+ const css::uno::Reference<
+ css::drawing::XShape>& rxShape,
+ const css::uno::Reference<
+ css::accessibility::XAccessible>& rxParent,
+ IAccessibleParent* pChildrenManager);
+
+ /** Copy the given values into the members described above.
+ The accessible parent implementation object is set to NULL.
+ */
+ AccessibleShapeInfo (
+ const css::uno::Reference<
+ css::drawing::XShape>& rxShape,
+ const css::uno::Reference<
+ css::accessibility::XAccessible>& rxParent);
+
+ ~AccessibleShapeInfo();
+
+ AccessibleShapeInfo (const AccessibleShapeInfo&);
+private:
+ AccessibleShapeInfo& operator= (const AccessibleShapeInfo&) = delete;
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleShapeTreeInfo.hxx b/include/svx/AccessibleShapeTreeInfo.hxx
new file mode 100644
index 000000000..f50061ad4
--- /dev/null
+++ b/include/svx/AccessibleShapeTreeInfo.hxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBLESHAPETREEINFO_HXX
+#define INCLUDED_SVX_ACCESSIBLESHAPETREEINFO_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/vclptr.hxx>
+
+namespace com::sun::star {
+ namespace accessibility { class XAccessibleComponent; }
+ namespace document { class XShapeEventBroadcaster; }
+ namespace frame { class XController; }
+}
+namespace vcl { class Window; }
+
+class SdrView;
+
+namespace accessibility {
+
+class IAccessibleViewForwarder;
+
+/** This class bundles all information that is passed down the tree of
+ accessible shapes so that each shape has access to that info.
+
+ There are basically four members that can be set and queried:
+ <ul>
+ <li>The model broadcaster is used for getting notified about shape
+ changes. Using this broadcaster makes in unnecessary to register at
+ each shape separately.</li>
+ <li>The view forwarder is responsible for transformation between
+ coordinate systems and for providing the visible area both with respect
+ to a specific window.</li>
+ <li>The SdrView is used for creating accessible edit engines.</li>
+ <li>The Window is used for creating accessible edit engines.</li>
+ </ul>
+*/
+class SVX_DLLPUBLIC AccessibleShapeTreeInfo
+{
+public:
+ /** Use this constructor to create an empty object that is filled later
+ with more meaningful data.
+ */
+ AccessibleShapeTreeInfo();
+
+ /** Create a copy of the given shape info.
+ @param rInfo
+ The shape tree info object to copy.
+ */
+ AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo);
+
+ ~AccessibleShapeTreeInfo();
+
+ AccessibleShapeTreeInfo& operator= (const AccessibleShapeTreeInfo& rInfo);
+
+ void dispose();
+
+ /** Deprecated. Don't use this method.
+ */
+ void SetDocumentWindow (const css::uno::Reference<
+ css::accessibility::XAccessibleComponent>& rxViewWindow);
+
+ /** Deprecated. Don't use this method.
+ */
+ const css::uno::Reference<
+ css::accessibility::XAccessibleComponent>&
+ GetDocumentWindow() const { return mxDocumentWindow;}
+
+ /** Set a new broadcaster that sends events indicating shape changes.
+ The broadcaster usually is or belongs to a document model.
+ @param rxModelBroadcaster
+ The new broadcaster. It replaces the current one. An empty
+ reference may be passed to unset the broadcaster
+ */
+ void SetModelBroadcaster (const css::uno::Reference<
+ css::document::XShapeEventBroadcaster>& rxModelBroadcaster);
+
+ /** Return the current model broadcaster.
+ @return
+ The returned reference may be empty if the broadcaster has not
+ been set or has been set to an empty reference.
+ */
+ const css::uno::Reference<
+ css::document::XShapeEventBroadcaster>&
+ GetModelBroadcaster() const { return mxModelBroadcaster;}
+
+ /** Set the view that will be used to construct SvxTextEditSources which
+ in turn are used to create accessible edit engines.
+ @param pView
+ The new SdrView that replaces the current one. A NULL pointer
+ may be passed to unset the view.
+ */
+ void SetSdrView (SdrView* pView);
+
+ /** Return the current SdrView.
+ @return
+ The returned value may be NULL.
+ */
+ SdrView* GetSdrView() const { return mpView;}
+
+ /** Set a new controller. This will usually but not necessarily
+ correspond to the SdrView.
+ @param rxController
+ The new controller that replaces the current one. An empty
+ reference may be passed to unset the controller.
+ */
+ void SetController (const css::uno::Reference<
+ css::frame::XController>& rxController);
+
+ /** Return the currently set controller.
+ @return
+ The reference to the currently set controller may be empty.
+ */
+ const css::uno::Reference<
+ css::frame::XController>&
+ GetController() const { return mxController;}
+
+ /** Set the window that is used to construct SvxTextEditSources which in
+ turn is used to create accessible edit engines.
+ */
+ void SetWindow(vcl::Window* pWindow);
+
+ /** Return the current Window.
+ @return
+ The returned value may be NULL.
+ */
+ vcl::Window* GetWindow() const
+ {
+ return mpWindow.get();
+ }
+
+ /** The view forwarder allows the transformation between internal
+ and pixel coordinates and can be asked for the visible area.
+ @param pViewForwarder
+ This view forwarder replaces the current one.
+ */
+ void SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder);
+
+ /** Return the current view forwarder.
+ @return
+ The returned pointer may be NULL.
+ */
+ const IAccessibleViewForwarder* GetViewForwarder() const { return mpViewForwarder;}
+
+private:
+ /** Deprecated.
+ */
+ css::uno::Reference<
+ css::accessibility::XAccessibleComponent> mxDocumentWindow;
+
+ /** this broadcaster sends events indicating shape changes.
+ The broadcaster usually is or belongs to a document model.
+
+ This once was named mxControllerBroadcaster.
+ */
+ css::uno::Reference<
+ css::document::XShapeEventBroadcaster> mxModelBroadcaster;
+
+ /** This view is necessary to construct an SvxTextEditSource which in
+ turn is used to create an accessible edit engine.
+ */
+ SdrView* mpView;
+
+ /** The controller is used e.g. for obtaining the selected shapes.
+ */
+ css::uno::Reference<
+ css::frame::XController> mxController;
+
+ /** This window is necessary to construct an SvxTextEditSource which in
+ turn is used to create an accessible edit engine.
+ */
+ VclPtr<vcl::Window> mpWindow;
+
+ /** The view forwarder allows the transformation between internal
+ and pixel coordinates and can be asked for the visible area.
+ */
+ const IAccessibleViewForwarder* mpViewForwarder;
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibleTextHelper.hxx b/include/svx/AccessibleTextHelper.hxx
new file mode 100644
index 000000000..45592748f
--- /dev/null
+++ b/include/svx/AccessibleTextHelper.hxx
@@ -0,0 +1,374 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBLETEXTHELPER_HXX
+#define INCLUDED_SVX_ACCESSIBLETEXTHELPER_HXX
+
+#include <memory>
+#include <vector>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star
+{
+namespace accessibility
+{
+class XAccessible;
+}
+namespace accessibility
+{
+class XAccessibleEventListener;
+}
+namespace awt
+{
+struct Point;
+}
+}
+
+class Point;
+class SvxEditSource;
+
+namespace accessibility
+{
+class AccessibleTextHelper_Impl;
+
+/** Helper class for objects containing EditEngine/Outliner text
+
+ This class provides the methods from the XAccessibleContext,
+ XAccessibleEventBroadcaster and XAccessibleComponent
+ interfaces, that are common to all accessible objects
+ containing an edit engine.
+
+ The text contained in the EditEngine/Outliner is presented as
+ children of this class, namely for every text paragraph a
+ AccessibleEditableTextPara child object is generated. As this
+ class manages these children for itself, it has to send out
+ AccessibleEventId::CHILD events on your
+ behalf. Thus, you must forward every call to your
+ addEventListener()/removeEventListener() methods to the
+ AccessibleTextHelper (methods
+ AddEventListener/RemoveEventListener), otherwise none or not
+ everyone of your event listener will notice child changes.
+
+ You have to implement the SvxEditSource, SvxTextForwarder,
+ SvxViewForwarder and SvxEditViewForwarder interfaces in order
+ to enable your object to cooperate with this
+ class. SvxTextForwarder encapsulates the fact that text
+ objects do not necessarily have an EditEngine at their
+ disposal, SvxViewForwarder and SvxEditViewForwarder do the
+ same for the document and the edit view. The three mentioned
+ forwarder objects are not stored by the AccessibleTextHelper,
+ but fetched every time from the SvxEditSource. So you are best
+ off making your SvxEditSource::Get*Forwarder methods cache the
+ current forwarder.
+
+ To support changes in edit mode or conversion of fixed text
+ into EditEngine text, you can change the SvxEditSource this
+ class is referring to. This might render all children invalid
+ and change the child count, since the AccessibleTextHelper
+ reinitializes itself from scratch.
+
+ This class registers itself at the SvxEditSource as a state
+ listener and manages the state of its children (i.e. the
+ paragraphs). See the method documentation of
+ AccessibleTextHelper::SetEditSource for the expected
+ events. Generally, be prepared that when sending any of these
+ events via SvxEditSource::GetBroadcaster() broadcaster, the
+ AccessibleTextHelper will call the SvxEditSource and their
+ forwarder to update it's state. Avoid being inconsistent in
+ the facts you tell in the events, e.g. when sending a
+ SfxHintId::TextParaInserted event, the
+ SvxEditSource::GetTextForwarder().GetParagraphCount() should
+ already include the newly inserted paragraph.
+
+ @attention All public methods must not be called with any
+ mutex hold, except when calling from the main thread (with
+ holds the solar mutex), unless stated otherwise. This is
+ because they themselves might need the solar mutex in addition
+ to the object mutex, and the ordering of the locking must be:
+ first solar mutex, then object mutex. Furthermore, state
+ change events might be fired internally.
+
+ @derive Use this class in an aggregation and forward, or
+ derive from it and overwrite.
+ too.
+
+ @see SvxEditSource
+ @see SvxTextForwarder
+ @see SvxViewForwarder
+ @see SvxEditViewForwarder
+*/
+class SVX_DLLPUBLIC AccessibleTextHelper final
+{
+public:
+ typedef ::std::vector<sal_Int16> VectorOfStates;
+
+ /** Create accessible text object for given edit source
+
+ @param pEditSource
+ The edit source to use. Object ownership is transferred
+ from the caller to the callee. The object listens on the
+ SvxEditSource for object disposal, so no provisions have
+ to be taken if the caller destroys the data (e.g. the
+ model) contained in the given SvxEditSource.
+
+ */
+ explicit AccessibleTextHelper(::std::unique_ptr<SvxEditSource>&& pEditSource);
+
+ ~AccessibleTextHelper();
+
+ AccessibleTextHelper(const AccessibleTextHelper&) = delete;
+ AccessibleTextHelper& operator=(const AccessibleTextHelper&) = delete;
+
+ /** Query the current edit source
+
+ @attention This method returns by reference, so you are
+ responsible for serialization (typically, you acquired the
+ solar mutex when calling this method). Thus, the method
+ should only be called from the main office thread.
+
+ */
+ const SvxEditSource& GetEditSource() const;
+
+ /** Set the current edit source
+
+ @attention Might fire state change events, therefore,
+ don't hold any mutex except solar mutex, which you are
+ required to lock before. This method should only be called
+ from the main office thread.
+
+ The EditSource set here is required to broadcast out the
+ following hints: SfxHintId::EditSourceParasMoved,
+ SfxHintId::EditSourceSelectionChanged, SfxHintId::TextModified,
+ SfxHintId::TextParaInserted, SfxHintId::TextParaRemoved,
+ SfxHintId::TextHeightChanged,
+ SfxHintId::TextViewScrolled. Otherwise, not all state changes
+ will get noticed by the accessibility object. Further
+ more, when the corresponding core object or the model is
+ dying, either the edit source must be set to NULL or it
+ has to broadcast a SfxHintId::Dying hint.
+
+ If the SvxEditSource's managed text can change between
+ edit/non-edit mode (i.e. there are times when
+ SvxEditSource::GetEditViewForwarder(sal_False) returns
+ NULL), then the two additional hints are required:
+ SdrHintKind::BeginEdit and SdrHintKind::EndEdit. When the
+ AccessibleTextHelper receives a SdrHintKind::BeginEdit, it expects
+ the SvxEditSource already in edit mode. On a SdrHintKind::EndEdit,
+ edit mode must already been left. The rationale for these
+ events are the fact that focus and selection have to be
+ updated in edit mode, and completely relinquished and
+ reset to the parent (for the focus) in non-edit mode.
+
+ This class does not have a dispose method, since it is not
+ a UNO component. Nevertheless, it holds C++ references to
+ several core objects, so you should issue a
+ SetEditSource(::std::unique_ptr<SvxEditSource>()) in
+ your dispose() method.
+
+ @param pEditSource
+ The new edit source to set. Object ownership is transferred
+ from the caller to the callee.
+ */
+ void SetEditSource(::std::unique_ptr<SvxEditSource>&& pEditSource);
+
+ /** Set the event source
+
+ You should set the event source before registering any
+ event listener and before requesting any child. Children
+ of this object receive the event source as their parent
+ accessible object. That is, the event source is best set
+ in your object's init method.
+
+ @attention When setting a reference here, you should call
+ Dispose() when you as the owner are disposing, since until
+ then this object will hold that reference
+
+ @param rInterface
+ The interface that should be set as the source for
+ accessibility events sent by this object.
+ */
+ void SetEventSource(const css::uno::Reference<css::accessibility::XAccessible>& rInterface);
+
+ /** Set offset of EditEngine/Outliner from parent
+
+ If the origin of the underlying EditEngine/Outliner does
+ not correspond to the upper left corner of the object
+ using this class, you have to specify the offset.
+
+ @attention Might fire state change events, therefore,
+ don't hold any mutex except solar mutex, which you are
+ required to lock before. This method should only be called
+ from the main office thread.
+
+ @param rPoint
+ The offset in screen coordinates (i.e. pixel)
+ */
+ void SetOffset(const Point& rPoint);
+
+ /** Set offset the object adds to all children's indices
+
+ This can be used if the owner of this object has children
+ handled by itself. Setting an offset different from 0
+ leads to this object mimicking that all its children are
+ within the range [nOffset, GetChildCount()+nOffset). That
+ means, GetChild() also expects the index to be in this
+ range.
+
+ @attention Might fire state change events, therefore,
+ don't hold any mutex except solar mutex, which you are
+ required to lock before. This method should only be called
+ from the main office thread.
+
+ @param nOffset
+ The offset to add to every children's index.
+ */
+ void SetStartIndex(sal_Int32 nOffset);
+
+ /** Query offset the object adds to all children's indices
+
+ @return the offset to add to every children's index.
+ */
+ sal_Int32 GetStartIndex() const;
+
+ /** Sets a vector of additional accessible states.
+
+ The states are passed to every created child object
+ (text paragraph). The state values are defined in
+ css::accessibility::AccessibleStateType.
+
+ This function has to be called before querying for
+ any children (e.g. with GetChild()).
+ */
+ void SetAdditionalChildStates(VectorOfStates&& rChildStates);
+
+ /** Update the visible children
+
+ @attention Might fire state change events, therefore,
+ don't hold any mutex except solar mutex, which you are
+ required to lock before. This method should only be called
+ from the main office thread.
+
+ This method reevaluates the visibility of all
+ children. Call this method if your visibility state has
+ changed somehow, e.g. if the visible area has changed and
+ the AccessibleTextHelper isn't notified internally
+ (e.g. via SfxHintId::TextViewScrolled). Normally, there should
+ not be a need to call this method.
+ */
+ void UpdateChildren();
+
+ /** Drop all references and enter disposed state
+
+ This method drops all references to external objects (also
+ the event source reference set via SetEventSource()) and
+ sets the object into the disposed state (i.e. the methods
+ return default values or throw a uno::DisposedException
+ exception).
+ */
+ void Dispose();
+
+ /** Set the focus state of the accessibility object
+
+ Since this class handles children which also might get the
+ focus, the user of this class is encouraged to delegate
+ focus handling. Whenever the focus state of the
+ surrounding object changes, this method has to be called.
+
+ The protocol of focus handling for a user of this class is
+ then to call SetFocus() with the appropriate focus state,
+ and HaveFocus() to determine the focus state you tell the
+ outside.
+
+ @attention Might fire state change events, therefore,
+ don't hold any mutex except solar mutex, which you are
+ required to lock before. This method should only be called
+ from the main office thread.
+
+ @param bHaveFocus
+ Whether we got or we lost the focus. Set to true if
+ focus is gotten, false otherwise.
+
+ @see HaveFocus()
+ */
+ void SetFocus(bool bHaveFocus = true);
+
+ /** Query the focus state of the surrounding object
+
+ If focus handling is delegated to this class, determine
+ focus state with this method. Be prepared that even if you
+ set the focus with SetFocus(true), this method might
+ return false. This is the case if one of the children
+ actually got the focus.
+
+ @return the state of the focus ownership
+ */
+ bool HaveFocus();
+
+ // XAccessibleContext child handling methods
+
+ /** Implements getAccessibleChildCount
+
+ @attention Don't call with locked mutexes. You may hold
+ the solar mutex, but this method acquires it anyway.
+ */
+ sal_Int32 GetChildCount() const;
+ /** Implements getAccessibleChild
+
+ @attention Don't call with locked mutexes. You may hold
+ the solar mutex, but this method acquires it anyway.
+ */
+ css::uno::Reference<css::accessibility::XAccessible> GetChild(sal_Int32 i);
+
+ // XAccessibleEventBroadcaster child related methods
+
+ /** Implements addEventListener
+
+ @attention Don't call with locked mutexes
+ */
+ void AddEventListener(
+ const css::uno::Reference<css::accessibility::XAccessibleEventListener>& xListener);
+ /** Implements removeEventListener
+
+ @attention Don't call with locked mutexes
+ */
+ void RemoveEventListener(
+ const css::uno::Reference<css::accessibility::XAccessibleEventListener>& xListener);
+
+ // XAccessibleComponent child related methods
+
+ /** Implements getAccessibleAt
+
+ @attention Don't call with locked mutexes. You may hold
+ the solar mutex, but this method acquires it anyway.
+ */
+ css::uno::Reference<css::accessibility::XAccessible> GetAt(const css::awt::Point& aPoint);
+
+private:
+ /// @dyn
+ const std::unique_ptr<AccessibleTextHelper_Impl> mpImpl;
+};
+
+} // end of namespace accessibility
+
+#endif // INCLUDED_SVX_ACCESSIBLETEXTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ActionDescriptionProvider.hxx b/include/svx/ActionDescriptionProvider.hxx
new file mode 100644
index 000000000..4aa889eb1
--- /dev/null
+++ b/include/svx/ActionDescriptionProvider.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ACTIONDESCRIPTIONPROVIDER_HXX
+#define INCLUDED_SVX_ACTIONDESCRIPTIONPROVIDER_HXX
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+
+
+/** This class provides localized descriptions for some basic actions done with objects.
+The strings are intended to be provided to the user e.g. as description for undo actions in the menu.
+The name of the object acted on and the type of action needs to be given as input parameter.
+*/
+
+class SVX_DLLPUBLIC ActionDescriptionProvider
+{
+public:
+ enum class ActionType
+ {
+ Insert
+ , Delete
+ , Move
+ , Resize
+ , Rotate
+ , Format
+ , MoveToTop
+ , MoveToBottom
+ , PosSize
+ };
+
+public:
+ static OUString createDescription( ActionType eActionType
+ , std::u16string_view rObjectName );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ChildrenManager.hxx b/include/svx/ChildrenManager.hxx
new file mode 100644
index 000000000..0498b43fd
--- /dev/null
+++ b/include/svx/ChildrenManager.hxx
@@ -0,0 +1,214 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CHILDRENMANAGER_HXX
+#define INCLUDED_SVX_CHILDRENMANAGER_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ref.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/long.hxx>
+
+namespace com::sun::star
+{
+namespace accessibility
+{
+class XAccessible;
+}
+namespace drawing
+{
+class XShape;
+}
+namespace drawing
+{
+class XShapes;
+}
+}
+
+namespace accessibility
+{
+class AccessibleContextBase;
+class AccessibleShapeTreeInfo;
+class ChildrenManagerImpl;
+
+/** The AccessibleChildrenManager class acts as a cache of the
+ accessible objects of the currently visible shapes of a draw page and as
+ a factory to create the corresponding accessible object for a given
+ shape.
+
+ <p>There are two sources of shapes. The first is a list of UNO shapes.
+ It is passes to the constructor and can be re-set with a call to
+ <member>SetShapeList</member>. Accessibility objects which represent
+ these shapes are constructed usually on demand. The second source is a
+ set of single AccessibleShape objects added by calls to
+ <member>AddAccessibleShape</member>. These are not modified by this
+ class. They are only copied into the list of visible shapes depending
+ on their visibility. The later list can be cleared by calling
+ <member>ClearAccessibleShapeList</member>. The actual set of children
+ accessible through the <member>GetChildrenCount</member> and
+ <member>GetChild</member> methods are the accessible objects that lie
+ completely or partially inside the visible area obtained from the view
+ forwarder in the shape tree info.</p>
+
+ <p>A children manager registers itself at the broadcaster passed to its
+ constructor and transforms/forwards the received events to the listeners
+ of the also given context base. The transformation process includes
+ interpreting a document::XEventListener, the change from
+ XShape references to the associated XAccessible reference, and the
+ creation of an XAccessibleEventObject. The event object is then passed
+ to the <method>fireEvent</method> method of the context and from there
+ forwarded to all listeners.</p>
+
+ <p>Note that some of the data given to the constructor is passed to the
+ accessible shape objects created by that child manager which in turn
+ pass these data to their child managers. The data is thus propagated
+ down a tree of child managers/accessible shape objects from a top level
+ class that is usually a document/model. This is the way to give all
+ accessible objects access to data normally known only to the top level
+ owner of the shapes.</p>
+*/
+class SVX_DLLPUBLIC ChildrenManager final
+{
+public:
+ /** Create a children manager, which manages the children of the given
+ parent. The parent is used for creating accessible objects. The
+ list of shapes for which to create those objects is not derived from
+ the parent and has to be provided separately by calling one of the
+ update methods.
+ @param rxParent
+ The parent of the accessible objects which will be created
+ on demand at some point of time in the future.
+ @param rxShapeList
+ List of UNO shapes to manage.
+ @param rShapeTreeInfo
+ Bundle of information passed down the shape tree.
+ @param rContext
+ An accessible context object that is called for firing events
+ for new and deleted children, i.e. that holds a list of
+ listeners to be informed.
+ */
+ ChildrenManager(const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
+ const css::uno::Reference<css::drawing::XShapes>& rxShapeList,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo, AccessibleContextBase& rContext);
+
+ /** If there still are managed children these are marked as DEFUNC and
+ released.
+ */
+ ~ChildrenManager();
+
+ /** Return the number of currently visible accessible children.
+ @return
+ If there are no children a 0 is returned.
+ */
+ tools::Long GetChildCount() const noexcept;
+
+ /** Return the requested accessible child or throw and
+ IndexOutOfBoundsException if the given index is invalid.
+ @param nIndex
+ Index of the requested child. Call getChildCount for obtaining
+ the number of children.
+ @return
+ In case of a valid index this method returns a reference to the
+ requested accessible child. This reference is empty if it has
+ not been possible to create the accessible object of the
+ corresponding shape.
+ @throws
+ Throws an IndexOutOfBoundsException if the index is not valid.
+ */
+ css::uno::Reference<css::accessibility::XAccessible> GetChild(tools::Long nIndex);
+ /// @throws css::lang::IndexOutOfBoundsException
+ /// @throws css::uno::RuntimeException
+ css::uno::Reference<css::drawing::XShape> GetChildShape(tools::Long nIndex);
+
+ /** Update the child manager. Take care of a modified set of children
+ and modified visible area. This method can optimize the update
+ process with respect separate updates of a modified children list
+ and visible area.
+ @param bCreateNewObjectsOnDemand
+ If </true> then accessible objects associated with the visible
+ shapes are created only when asked for. No event is sent on
+ creation. If </false> then the accessible objects are created
+ before this method returns and events are sent to inform the
+ listeners of the new object.
+ */
+ void Update(bool bCreateNewObjectsOnDemand = true);
+
+ /** Replace the list of UNO shapes by the specified list.
+ @param xShapeList
+ The new list of shapes.
+ */
+ void SetShapeList(const css::uno::Reference<css::drawing::XShapes>& xShapeList);
+
+ /** Add an accessible shape. The difference to the UNO shapes in the
+ list passed to the constructor the specified object does not have to
+ be created by the shape factory. This gives the caller full control
+ over object creation.
+
+ @param shape must be non-null
+ */
+ void AddAccessibleShape(css::uno::Reference<css::accessibility::XAccessible> const& shape);
+
+ /** Clear the list of accessible shapes which have been added by
+ previous calls to <member>AddAccessibleShape</member>.
+ */
+ void ClearAccessibleShapeList();
+
+ /** Take a new event shape tree info. Call this method to inform the
+ children manager of a change of the info bundle.
+ @param rShapeTreeInfo
+ The new info that replaces the current one.
+ */
+ void SetInfo(AccessibleShapeTreeInfo const& rShapeTreeInfo);
+
+ /** Update the SELECTED and FOCUSED states of all visible children
+ according to the given selection. This includes setting
+ <em>and</em> resetting the states.
+ */
+ void UpdateSelection();
+
+ /** Return whether one of the shapes managed by this object has
+ currently the focus.
+ @return
+ Returns <true/> when there is a shape that has the focus and
+ <false/> when there is no such shape.
+ */
+ bool HasFocus() const;
+
+ /** When there is a shape that currently has the focus,
+ i.e. <member>HasFocus()</member> returns <true/> then remove the
+ focus from that shape. Otherwise nothing changes.
+ */
+ void RemoveFocus();
+
+ void ViewForwarderChanged();
+
+private:
+ rtl::Reference<ChildrenManagerImpl> mpImpl;
+
+ ChildrenManager(const ChildrenManager&) = delete;
+ ChildrenManager& operator=(const ChildrenManager&) = delete;
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ClassificationCommon.hxx b/include/svx/ClassificationCommon.hxx
new file mode 100644
index 000000000..71be4b85c
--- /dev/null
+++ b/include/svx/ClassificationCommon.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_CLASSIFICATIONCOMMON_HXX
+#define INCLUDED_SVX_CLASSIFICATIONCOMMON_HXX
+
+#include <sal/config.h>
+#include <svx/svxdllapi.h>
+#include <vector>
+#include <sfx2/classificationhelper.hxx>
+
+namespace com::sun::star::beans
+{
+class XPropertyContainer;
+}
+namespace com::sun::star::beans
+{
+struct Property;
+}
+namespace svx
+{
+class ClassificationResult;
+}
+
+namespace svx::classification
+{
+SVX_DLLPUBLIC OUString
+convertClassificationResultToString(std::vector<svx::ClassificationResult> const& rResults);
+
+SVX_DLLPUBLIC OUString
+getProperty(css::uno::Reference<css::beans::XPropertyContainer> const& rxPropertyContainer,
+ OUString const& rName);
+
+SVX_DLLPUBLIC bool containsProperty(css::uno::Sequence<css::beans::Property> const& rProperties,
+ std::u16string_view rName);
+
+SVX_DLLPUBLIC void
+removeAllProperties(css::uno::Reference<css::beans::XPropertyContainer> const& rxPropertyContainer);
+
+SVX_DLLPUBLIC bool addOrInsertDocumentProperty(
+ css::uno::Reference<css::beans::XPropertyContainer> const& rxPropertyContainer,
+ OUString const& rsKey, OUString const& rsValue);
+
+SVX_DLLPUBLIC void insertFullTextualRepresentationAsDocumentProperty(
+ css::uno::Reference<css::beans::XPropertyContainer> const& rxPropertyContainer,
+ sfx::ClassificationKeyCreator const& rKeyCreator,
+ std::vector<svx::ClassificationResult> const& rResults);
+
+SVX_DLLPUBLIC void
+insertCreationOrigin(css::uno::Reference<css::beans::XPropertyContainer> const& rxPropertyContainer,
+ sfx::ClassificationKeyCreator const& rKeyCreator,
+ sfx::ClassificationCreationOrigin eOrigin);
+
+} // end svx::classification namespace
+
+#endif // INCLUDED_SVX_CLASSIFICATIONCOMMON_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ClassificationDialog.hxx b/include/svx/ClassificationDialog.hxx
new file mode 100644
index 000000000..2763f6d09
--- /dev/null
+++ b/include/svx/ClassificationDialog.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
+#define INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
+
+#include <sal/config.h>
+#include <vcl/weld.hxx>
+#include <svx/svxdllapi.h>
+#include <sfx2/classificationhelper.hxx>
+#include <svx/ClassificationField.hxx>
+
+namespace svx
+{
+class ClassificationEditView;
+}
+namespace weld
+{
+class CustomWeld;
+}
+
+namespace svx
+{
+class SVX_DLLPUBLIC ClassificationDialog final : public weld::GenericDialogController
+{
+private:
+ SfxClassificationHelper maHelper;
+ SfxClassificationHelper maInternationalHelper;
+
+ const bool m_bPerParagraph;
+ const std::function<void()> m_aParagraphSignHandler;
+
+ ImplSVEvent* m_nAsyncExpandEvent;
+ sal_Int32 m_nCurrentSelectedCategory;
+
+ std::vector<std::vector<ClassificationResult>> m_aRecentlyUsedValuesCollection;
+ std::vector<ClassificationResult> m_aInitialValues;
+
+ std::unique_ptr<weld::Button> m_xOkButton;
+ std::unique_ptr<weld::Button> m_xSignButton;
+ std::unique_ptr<weld::ToggleButton> m_xToolBox;
+ std::unique_ptr<weld::ComboBox> m_xRecentlyUsedListBox;
+ std::unique_ptr<weld::ComboBox> m_xClassificationListBox;
+ std::unique_ptr<weld::ComboBox> m_xInternationalClassificationListBox;
+ std::unique_ptr<weld::Label> m_xMarkingLabel;
+ std::unique_ptr<weld::TreeView> m_xMarkingListBox;
+ std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartListBox;
+ std::unique_ptr<weld::TreeView> m_xIntellectualPropertyPartNumberListBox;
+ std::unique_ptr<weld::Button> m_xIntellectualPropertyPartAddButton;
+ std::unique_ptr<weld::Entry> m_xIntellectualPropertyPartEdit;
+ std::unique_ptr<weld::Expander> m_xIntellectualPropertyExpander;
+ std::unique_ptr<ClassificationEditView> m_xEditWindow;
+ std::unique_ptr<weld::CustomWeld> m_xEditWindowWeld;
+
+ DECL_DLLPRIVATE_LINK(ButtonClicked, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(OkHdl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(SelectToolboxHdl, weld::Toggleable&, void);
+ DECL_DLLPRIVATE_LINK(SelectClassificationHdl, weld::ComboBox&, void);
+ DECL_DLLPRIVATE_LINK(SelectMarkingHdl, weld::TreeView&, bool);
+ DECL_DLLPRIVATE_LINK(SelectIPPartNumbersHdl, weld::TreeView&, bool);
+ DECL_DLLPRIVATE_LINK(SelectRecentlyUsedHdl, weld::ComboBox&, void);
+ DECL_DLLPRIVATE_LINK(SelectIPPartHdl, weld::TreeView&, bool);
+ DECL_DLLPRIVATE_LINK(EditWindowModifiedHdl, LinkParamNone*, void);
+ DECL_DLLPRIVATE_STATIC_LINK(ClassificationDialog, ExpandedHdl, weld::Expander&, void);
+ DECL_DLLPRIVATE_STATIC_LINK(ClassificationDialog, KeyInput, const KeyEvent&, bool);
+ DECL_DLLPRIVATE_LINK(OnAsyncExpandHdl, void*, void);
+
+ void insertField(ClassificationType eType, OUString const& rString, OUString const& rFullString,
+ OUString const& rIdentifier = OUString());
+ void insertCategoryField(sal_Int32 nID);
+
+ void readIn(std::vector<ClassificationResult> const& rInput);
+ void readRecentlyUsed();
+ void writeRecentlyUsed();
+ void toggleWidgetsDependingOnCategory();
+
+public:
+ ClassificationDialog(weld::Window* pParent,
+ const css::uno::Reference<css::document::XDocumentProperties>& rDocProps,
+ bool bPerParagraph,
+ const std::function<void()>& rParagraphSignHandler = []() {});
+ ~ClassificationDialog() override;
+
+ std::vector<ClassificationResult> getResult();
+ void setupValues(std::vector<ClassificationResult>&& rInput);
+};
+
+} // end svx namespace
+
+#endif // INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx
new file mode 100644
index 000000000..8588a3e02
--- /dev/null
+++ b/include/svx/ClassificationField.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_CLASSIFICATIONFIELD_HXX
+#define INCLUDED_SVX_CLASSIFICATIONFIELD_HXX
+
+#include <sal/config.h>
+#include <svx/svxdllapi.h>
+#include <editeng/flditem.hxx>
+
+namespace svx {
+
+enum class ClassificationType
+{
+ CATEGORY,
+ MARKING,
+ TEXT,
+ INTELLECTUAL_PROPERTY_PART,
+ PARAGRAPH,
+};
+
+class SVX_DLLPUBLIC ClassificationResult
+{
+public:
+ ClassificationType meType;
+ OUString msName; //< Display text or 'Name' field (from example.xml).
+ OUString msAbbreviatedName; //< Abbreviated name, displayed instead of Name.
+ OUString msIdentifier; //< The identifier of this entry (from example.xml).
+
+ ClassificationResult(ClassificationType eType, const OUString& sName,
+ const OUString& sAbbreviatedName, const OUString& sIdentifier = "")
+ : meType(eType)
+ , msName(sName)
+ , msAbbreviatedName(sAbbreviatedName)
+ , msIdentifier(sIdentifier)
+ {
+ }
+
+ /// Returns the text to display, which is the Abbreviated Name, if provided, otherwise Name.
+ OUString const & getDisplayText() const
+ {
+ return !msAbbreviatedName.isEmpty() ? msAbbreviatedName : msName;
+ }
+
+ bool operator==(const ClassificationResult& rOther) const
+ {
+ return (meType == rOther.meType &&
+ msName == rOther.msName &&
+ msAbbreviatedName == rOther.msAbbreviatedName &&
+ msIdentifier == rOther.msIdentifier);
+ }
+};
+
+class SVX_DLLPUBLIC ClassificationField final : public SvxFieldData
+{
+public:
+ ClassificationType meType;
+ OUString msDescription;
+ OUString msFullClassName;
+ OUString msIdentifier;
+
+ ClassificationField(ClassificationType eType, OUString const & sDescription, OUString const & sFullClassName, OUString const & sIdentifier)
+ : meType(eType)
+ , msDescription(sDescription)
+ , msFullClassName(sFullClassName)
+ , msIdentifier(sIdentifier)
+ {}
+
+ std::unique_ptr<SvxFieldData> Clone() const override
+ {
+ return std::make_unique<ClassificationField>(meType, msDescription, msFullClassName, msIdentifier);
+ }
+
+ bool operator==(const SvxFieldData& rOther) const override
+ {
+ if (typeid(rOther) != typeid(*this))
+ return false;
+
+ const ClassificationField& rOtherField = static_cast<const ClassificationField&>(rOther);
+ return (meType == rOtherField.meType &&
+ msDescription == rOtherField.msDescription &&
+ msFullClassName == rOtherField.msFullClassName &&
+ msIdentifier == rOtherField.msIdentifier);
+ }
+};
+
+} // end svx namespace
+
+#endif // INCLUDED_SVX_CLASSIFICATIONFIELD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ColorSets.hxx b/include/svx/ColorSets.hxx
new file mode 100644
index 000000000..eace8ca26
--- /dev/null
+++ b/include/svx/ColorSets.hxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_COLORSETS_HXX
+#define INCLUDED_SVX_COLORSETS_HXX
+
+#include <vector>
+
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <tools/color.hxx>
+
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
+class SdrPage;
+
+namespace svx
+{
+
+class ColorSet
+{
+ OUString maColorSetName;
+ std::vector<Color> maColors;
+public:
+ ColorSet(OUString const & aName);
+
+ void add(sal_uInt32 nIndex, ::Color aColorData)
+ {
+ maColors[nIndex] = aColorData;
+ }
+
+ const OUString& getName() const
+ {
+ return maColorSetName;
+ }
+ const Color& getColor(sal_uInt32 nIndex) const
+ {
+ return maColors[nIndex];
+ }
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
+};
+
+class SVXCORE_DLLPUBLIC ColorSets
+{
+ std::vector<ColorSet> maColorSets;
+public:
+ ColorSets();
+ ~ColorSets();
+
+ void init();
+ const std::vector<ColorSet>& getColorSets() const
+ {
+ return maColorSets;
+ }
+
+ const ColorSet& getColorSet(sal_uInt32 nIndex)
+ {
+ return maColorSets[nIndex];
+ }
+
+ const ColorSet& getColorSet(std::u16string_view rName);
+};
+
+/// Offsets into the color list of a theme.
+enum class ThemeColorType
+{
+ DK1 = 0,
+ LT1 = 1,
+ DK2 = 2,
+ LT2 = 3,
+ ACCENT1 = 4,
+ ACCENT2 = 5,
+ ACCENT3 = 6,
+ ACCENT4 = 7,
+ ACCENT5 = 8,
+ ACCENT6 = 9,
+ HLINK = 10,
+ FOLHLINK = 11,
+};
+
+/// A named theme has a named color set.
+class SVXCORE_DLLPUBLIC Theme
+{
+ OUString maName;
+ std::unique_ptr<ColorSet> mpColorSet;
+
+public:
+ Theme(OUString const& rName);
+ ~Theme();
+
+ void SetColorSet(std::unique_ptr<ColorSet> pColorSet);
+ ColorSet* GetColorSet();
+
+ void SetName(const OUString& rName);
+ const OUString& GetName() const;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+ void ToAny(css::uno::Any& rVal) const;
+
+ static std::unique_ptr<Theme> FromAny(const css::uno::Any& rVal);
+
+ void UpdateSdrPage(const SdrPage* pPage);
+
+ std::vector<Color> GetColors() const;
+
+ Color GetColor(ThemeColorType eType) const;
+};
+
+} // end of namespace svx
+
+#endif // INCLUDED_SVX_COLORSETS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/CommonStyleManager.hxx b/include/svx/CommonStyleManager.hxx
new file mode 100644
index 000000000..a7f2a7ae3
--- /dev/null
+++ b/include/svx/CommonStyleManager.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_COMMONSTYLEMANAGER_HXX
+#define INCLUDED_SVX_COMMONSTYLEMANAGER_HXX
+
+#include <sfx2/StyleManager.hxx>
+#include <svx/svxdllapi.h>
+
+namespace sfx2 { class StylePreviewRenderer; }
+
+class OutputDevice;
+class SfxObjectShell;
+class SfxStyleSheetBase;
+
+namespace svx
+{
+
+class SVXCORE_DLLPUBLIC CommonStyleManager final : public sfx2::StyleManager
+{
+public:
+ CommonStyleManager(SfxObjectShell& rShell)
+ : StyleManager(rShell)
+ {}
+
+ virtual std::unique_ptr<sfx2::StylePreviewRenderer> CreateStylePreviewRenderer(
+ OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
+ tools::Long nMaxHeight) override;
+};
+
+} // end namespace svx
+
+#endif // INCLUDED_SVX_COMMONSTYLEMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx
new file mode 100644
index 000000000..abe931940
--- /dev/null
+++ b/include/svx/EnhancedCustomShape2d.hxx
@@ -0,0 +1,224 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ENHANCEDCUSTOMSHAPE2D_HXX
+#define INCLUDED_SVX_ENHANCEDCUSTOMSHAPE2D_HXX
+
+#include <svx/msdffdef.hxx>
+#include <svx/sdasitm.hxx>
+#include <svx/svdotext.hxx>
+#include <tools/degree.hxx>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <svl/itemset.hxx>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+
+#include <svx/EnhancedCustomShapeFunctionParser.hxx>
+#include <tools/gen.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+
+#include <memory>
+#include <vector>
+
+namespace com::sun::star::awt { struct Point; }
+
+class Color;
+class SdrObject;
+class SdrPathObj;
+class SdrObjCustomShape;
+
+enum class HandleFlags
+{
+ NONE = 0x0000,
+ MIRRORED_X = 0x0001,
+ MIRRORED_Y = 0x0002,
+ SWITCHED = 0x0004,
+ POLAR = 0x0008,
+ RANGE_X_MINIMUM = 0x0020,
+ RANGE_X_MAXIMUM = 0x0040,
+ RANGE_Y_MINIMUM = 0x0080,
+ RANGE_Y_MAXIMUM = 0x0100,
+ RADIUS_RANGE_MINIMUM = 0x0200,
+ RADIUS_RANGE_MAXIMUM = 0x0400,
+ REFX = 0x0800,
+ REFY = 0x1000,
+ REFANGLE = 0x2000,
+ REFR = 0x4000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<HandleFlags> : is_typed_flags<HandleFlags, 0x7fef> {};
+}
+
+// MSDFF_HANDLE_FLAGS_RANGE_Y seems to be not defined in
+// escher, but we are using it internally in to differentiate
+// between X_RANGE and Y_RANGE
+
+class SVXCORE_DLLPUBLIC EnhancedCustomShape2d final : public SfxItemSet
+{
+ SdrObjCustomShape& mrSdrObjCustomShape;
+ MSO_SPT eSpType;
+
+ sal_Int32 nCoordLeft;
+ sal_Int32 nCoordTop;
+ sal_Int32 nCoordWidthG;
+ sal_Int32 nCoordHeightG;
+ sal_Int32 nCoordWidth;
+ sal_Int32 nCoordHeight;
+ tools::Rectangle aLogicRect;
+
+ double fXScale;
+ double fYScale;
+ double fXRatio;
+ double fYRatio;
+
+ bool bOOXMLShape;
+
+ sal_Int32 nXRef;
+ sal_Int32 nYRef;
+ sal_uInt32 nColorData;
+
+ /*
+
+ */
+ struct SAL_DLLPRIVATE EquationResult {
+ bool bReady;
+ double fValue;
+ };
+ css::uno::Sequence< OUString > seqEquations;
+ std::vector< std::shared_ptr< EnhancedCustomShape::ExpressionNode > > vNodesSharedPtr;
+ std::vector< EquationResult > vEquationResults;
+
+ css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > seqSegments;
+ css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> seqCoordinates;
+ css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > seqTextFrames;
+ css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> seqGluePoints;
+ css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > seqAdjustmentValues;
+ css::uno::Sequence< css::beans::PropertyValues > seqHandles;
+ css::uno::Sequence< css::awt::Size > seqSubViewSize;
+
+ bool bFilled : 1;
+ bool bStroked : 1;
+
+ bool bFlipH;
+ bool bFlipV;
+ Degree100 nRotateAngle;
+
+ SAL_DLLPRIVATE bool SetAdjustValueAsDouble( const double& rValue, const sal_Int32 nIndex );
+ SAL_DLLPRIVATE Color GetColorData( const Color& rFillColor, sal_uInt32 nIndex, double dBrightness ) const;
+ SAL_DLLPRIVATE void AdaptObjColor(
+ SdrPathObj& rObj,
+ double dBrightness,
+ const SfxItemSet& rCustomShapeSet,
+ sal_uInt32& nColorIndex,
+ sal_uInt32 nColorCount);
+ SAL_DLLPRIVATE Point GetPoint( const css::drawing::EnhancedCustomShapeParameterPair&,
+ const bool bScale = true, const bool bReplaceGeoSize = false ) const;
+ SAL_DLLPRIVATE basegfx::B2DPoint GetPointAsB2DPoint(const css::drawing::EnhancedCustomShapeParameterPair&,
+ const bool bScale = true, const bool bReplaceGeoSize = false ) const;
+
+ SAL_DLLPRIVATE void CreateSubPath(
+ sal_Int32& rSrcPt,
+ sal_Int32& rSegmentInd,
+ std::vector< std::pair< SdrPathObjUniquePtr, double> >& rObjectList,
+ bool bLineGeometryNeededOnly,
+ bool bSortFilledObjectsToBack,
+ sal_Int32 nIndex);
+ SAL_DLLPRIVATE SdrObjectUniquePtr CreatePathObj( bool bLineGeometryNeededOnly );
+ SAL_DLLPRIVATE void ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rItem );
+
+ SAL_DLLPRIVATE void SetPathSize( sal_Int32 nIndex = 0 );
+
+ public:
+
+ struct SAL_DLLPRIVATE Handle
+ {
+ HandleFlags nFlags;
+
+ css::drawing::EnhancedCustomShapeParameterPair aPosition;
+ css::drawing::EnhancedCustomShapeParameterPair aPolar;
+
+ sal_Int32 nRefX;
+ sal_Int32 nRefY;
+ sal_Int32 nRefAngle;
+ sal_Int32 nRefR;
+
+ css::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
+ css::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
+ css::drawing::EnhancedCustomShapeParameter aXRangeMinimum;
+ css::drawing::EnhancedCustomShapeParameter aXRangeMaximum;
+ css::drawing::EnhancedCustomShapeParameter aYRangeMinimum;
+ css::drawing::EnhancedCustomShapeParameter aYRangeMaximum;
+
+ Handle()
+ : nFlags(HandleFlags::NONE)
+ , nRefX( -1 )
+ , nRefY( -1 )
+ , nRefAngle( -1 )
+ , nRefR( -1 )
+ {
+ }
+ };
+
+ sal_Int32 GetLuminanceChange( sal_uInt32 nIndex ) const;
+ SAL_DLLPRIVATE bool IsFlipVert() const { return bFlipV; };
+ SAL_DLLPRIVATE bool IsFlipHorz() const { return bFlipH; };
+ SAL_DLLPRIVATE Degree100 GetRotateAngle() const { return nRotateAngle; };
+
+ SdrObjectUniquePtr CreateLineGeometry();
+ SdrObjectUniquePtr CreateObject( bool bLineGeometryNeededOnly );
+ void ApplyGluePoints( SdrObject* pObj );
+ tools::Rectangle GetTextRect() const;
+ const tools::Rectangle& GetLogicRect() const { return aLogicRect; }
+
+ sal_uInt32 GetHdlCount() const;
+ bool GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const;
+ bool SetHandleControllerPosition( const sal_uInt32 nIndex, const css::awt::Point& rPosition );
+
+ EnhancedCustomShape2d(SdrObjCustomShape& rSdrObjCustomShape);
+ virtual ~EnhancedCustomShape2d() override;
+
+ SAL_DLLPRIVATE double GetEnumFunc( const EnhancedCustomShape::ExpressionFunct eVal ) const;
+
+ void GetParameter( double& rParameterReturnValue, const css::drawing::EnhancedCustomShapeParameter&,
+ const bool bReplaceGeoWidth, const bool bReplaceGeoHeight ) const;
+ SAL_DLLPRIVATE double GetAdjustValueAsDouble( const sal_Int32 nIndex ) const;
+ SAL_DLLPRIVATE double GetEquationValueAsDouble( const sal_Int32 nIndex ) const;
+
+ static OUString GetEquation( const sal_uInt16 nFlags, sal_Int32 nPara1, sal_Int32 nPara2, sal_Int32 nPara3 );
+
+ SAL_DLLPRIVATE static void AppendEnhancedCustomShapeEquationParameter( OUString& rParameter, const sal_Int32 nPara, const bool bIsSpecialValue );
+
+ static void SetEnhancedCustomShapeParameter( css::drawing::EnhancedCustomShapeParameter&
+ rParameter, const sal_Int32 nValue );
+ static void SetEnhancedCustomShapeHandleParameter( css::drawing::EnhancedCustomShapeParameter&
+ rParameter, const sal_Int32 nPara, const bool bIsSpecialValue, bool bHorz );
+ SAL_DLLPRIVATE static bool ConvertSequenceToEnhancedCustomShape2dHandle( const css::beans::PropertyValues& rHandleProperties,
+ EnhancedCustomShape2d::Handle& rDestinationHandle );
+ SAL_DLLPRIVATE static void SwapStartAndEndArrow( SdrObject* pObj );
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/EnhancedCustomShapeFunctionParser.hxx b/include/svx/EnhancedCustomShapeFunctionParser.hxx
new file mode 100644
index 000000000..28d2491c7
--- /dev/null
+++ b/include/svx/EnhancedCustomShapeFunctionParser.hxx
@@ -0,0 +1,249 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX
+#define INCLUDED_SVX_ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX
+
+#include <config_options.h>
+#include <sal/config.h>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
+#include <memory>
+#include <ostream>
+#include <string_view>
+#include <vector>
+
+#include <svx/svxdllapi.h>
+
+struct EnhancedCustomShapeEquation
+{
+ sal_Int32 nOperation;
+ sal_Int32 nPara[ 3 ];
+
+ EnhancedCustomShapeEquation() :
+ nOperation ( 0 )
+ {
+ nPara[ 0 ] = nPara[ 1 ] = nPara[ 2 ] = 0;
+ }
+};
+
+class EnhancedCustomShape2d;
+
+namespace EnhancedCustomShape {
+
+enum class ExpressionFunct
+{
+ Const,
+
+ EnumPi,
+ EnumLeft,
+ EnumTop,
+ EnumRight,
+ EnumBottom,
+ EnumXStretch,
+ EnumYStretch,
+ EnumHasStroke,
+ EnumHasFill,
+ EnumWidth,
+ EnumHeight,
+ EnumLogWidth,
+ EnumLogHeight,
+ EnumAdjustment,
+ EnumEquation,
+
+ UnaryAbs,
+ UnarySqrt,
+ UnarySin,
+ UnaryCos,
+ UnaryTan,
+ UnaryAtan,
+ UnaryNeg,
+
+ BinaryPlus,
+ BinaryMinus,
+ BinaryMul,
+ BinaryDiv,
+ BinaryMin,
+ BinaryMax,
+ BinaryAtan2,
+
+ TernaryIf
+};
+
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const ExpressionFunct& eFunc )
+{
+ switch (eFunc)
+ {
+ case ExpressionFunct::Const : return stream << "const";
+
+ case ExpressionFunct::EnumPi : return stream << "pi";
+ case ExpressionFunct::EnumLeft : return stream << "left";
+ case ExpressionFunct::EnumTop : return stream << "top";
+ case ExpressionFunct::EnumRight : return stream << "right";
+ case ExpressionFunct::EnumBottom : return stream << "bottom";
+ case ExpressionFunct::EnumXStretch : return stream << "xstretch";
+ case ExpressionFunct::EnumYStretch : return stream << "ystretch";
+ case ExpressionFunct::EnumHasStroke : return stream << "hasstroke";
+ case ExpressionFunct::EnumHasFill : return stream << "hasfill";
+ case ExpressionFunct::EnumWidth : return stream << "width";
+ case ExpressionFunct::EnumHeight : return stream << "height";
+ case ExpressionFunct::EnumLogWidth : return stream << "logwidth";
+ case ExpressionFunct::EnumLogHeight : return stream << "logheight";
+ case ExpressionFunct::EnumAdjustment : return stream << "adjustment";
+ case ExpressionFunct::EnumEquation : return stream << "equation";
+
+ case ExpressionFunct::UnaryAbs : return stream << "abs";
+ case ExpressionFunct::UnarySqrt : return stream << "sqrt";
+ case ExpressionFunct::UnarySin : return stream << "sin";
+ case ExpressionFunct::UnaryCos : return stream << "cos";
+ case ExpressionFunct::UnaryTan : return stream << "tan";
+ case ExpressionFunct::UnaryAtan : return stream << "atan";
+ case ExpressionFunct::UnaryNeg : return stream << "neg";
+
+ case ExpressionFunct::BinaryPlus : return stream << "plus";
+ case ExpressionFunct::BinaryMinus : return stream << "minus";
+ case ExpressionFunct::BinaryMul : return stream << "mul";
+ case ExpressionFunct::BinaryDiv : return stream << "div";
+ case ExpressionFunct::BinaryMin : return stream << "min";
+ case ExpressionFunct::BinaryMax : return stream << "max";
+ case ExpressionFunct::BinaryAtan2 : return stream << "atan2";
+
+ case ExpressionFunct::TernaryIf : return stream << "if";
+
+ default: return stream << "?(" << static_cast<int>(eFunc) << ")";
+ }
+}
+
+#define EXPRESSION_FLAG_SUMANGLE_MODE 1
+
+SVXCORE_DLLPUBLIC void FillEquationParameter( const css::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& );
+
+class SAL_DLLPUBLIC_RTTI ExpressionNode
+{
+public:
+ virtual ~ExpressionNode();
+
+ /** Predicate whether this node is constant.
+
+ This predicate returns true, if this node is
+ neither time- nor ViewInfo dependent. This allows
+ for certain optimizations, i.e. not the full
+ expression tree needs be represented by
+ ExpressionNodes.
+
+ @returns true, if the note is constant
+ */
+ virtual bool isConstant() const = 0;
+
+ /** Operator to calculate function value.
+
+ This method calculates the function value.
+ */
+ virtual double operator()() const = 0;
+
+ /** Operator to retrieve the type of expression node
+ */
+ virtual ExpressionFunct getType() const = 0;
+
+ /** Operator to retrieve the ms version of expression
+ */
+ virtual css::drawing::EnhancedCustomShapeParameter fillNode(
+ std::vector< EnhancedCustomShapeEquation >& rEquations, ExpressionNode* pOptionalArg, sal_uInt32 nFlags ) = 0;
+};
+
+/** This exception is thrown, when the arithmetic expression
+ parser failed to parse a string.
+ */
+struct ParseError
+{
+ ParseError( const char* ) {}
+};
+
+class FunctionParser
+{
+public:
+
+ /** Parse a string
+
+ The following grammar is accepted by this method:
+ <code>
+
+ number_digit = '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
+
+ number = number number_digit | number_digit
+
+ identifier = 'pi'|'left'|'top'|'right'|'bottom'|'xstretch'|'ystretch'|
+ 'hasstroke'|'hasfill'|'width'|'height'|'logwidth'|'logheight'
+
+ unary_function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan'
+ binary_function = 'min'|'max'|'atan2'
+ ternary_function = 'if'
+
+ function_reference = '?' 'a-z,A-Z,0-9' ' '
+ modifier_reference = '$' '0-9' ' '
+
+ basic_expression =
+ number |
+ identifier |
+ function_reference |
+ unary_function '(' additive_expression ')' |
+ binary_function '(' additive_expression ',' additive_expression ')' |
+ ternary_function '(' additive_expression ',' additive_expression ',
+ ' additive_expression ')' | '(' additive_expression ')'
+
+ unary_expression = '-' basic_expression
+
+ multiplicative_expression =
+ basic_expression |
+ multiplicative_expression '*' basic_expression |
+ multiplicative_expression '/' basic_expression
+
+ additive_expression =
+ multiplicative_expression |
+ additive_expression '+' multiplicative_expression |
+ additive_expression '-' multiplicative_expression
+
+ </code>
+
+ @param rFunction
+ The string to parse
+
+ @param rCustoShape
+ The CustomShape is required for calculation of dynamic values such
+ "hasstroke", function references and or modifier references ...
+
+ @throws ParseError if an invalid expression is given.
+
+ @return the generated function object.
+ */
+
+ UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) static std::shared_ptr<ExpressionNode> const & parseFunction( std::u16string_view rFunction, const EnhancedCustomShape2d& rCustoShape );
+
+ // this is a singleton
+ FunctionParser() = delete;
+ FunctionParser(const FunctionParser&) = delete;
+ FunctionParser& operator=( const FunctionParser& ) = delete;
+};
+
+}
+
+#endif // INCLUDED_SVX_ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx b/include/svx/EnhancedCustomShapeGeometry.hxx
new file mode 100644
index 000000000..a52dc4820
--- /dev/null
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ENHANCEDCUSTOMSHAPEGEOMETRY_HXX
+#define INCLUDED_SVX_ENHANCEDCUSTOMSHAPEGEOMETRY_HXX
+
+#include <sal/types.h>
+#include <svx/msdffdef.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+
+struct SvxMSDffVertPair
+{
+ sal_Int32 nValA;
+ sal_Int32 nValB;
+};
+struct SvxMSDffCalculationData
+{
+ sal_uInt16 nFlags;
+ sal_Int32 nVal[ 3 ];
+};
+struct SvxMSDffTextRectangles
+{
+ SvxMSDffVertPair nPairA;
+ SvxMSDffVertPair nPairB;
+};
+
+enum class SvxMSDffHandleFlags
+{
+ NONE = 0x0000,
+ MIRRORED_X = 0x0001,
+ MIRRORED_Y = 0x0002,
+ SWITCHED = 0x0004,
+ POLAR = 0x0008,
+ MAP = 0x0010,
+ RANGE = 0x0020,
+ RANGE_X_MIN_IS_SPECIAL = 0x0080,
+ RANGE_X_MAX_IS_SPECIAL = 0x0100,
+ RANGE_Y_MIN_IS_SPECIAL = 0x0200,
+ RANGE_Y_MAX_IS_SPECIAL = 0x0400,
+ CENTER_X_IS_SPECIAL = 0x0800,
+ CENTER_Y_IS_SPECIAL = 0x1000,
+ RADIUS_RANGE = 0x2000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxMSDffHandleFlags> : is_typed_flags<SvxMSDffHandleFlags, 0x3fbf> {};
+}
+
+struct SvxMSDffHandle
+{
+ SvxMSDffHandleFlags nFlags;
+ sal_Int32 nPositionX, nPositionY, nCenterX, nCenterY, nRangeXMin, nRangeXMax, nRangeYMin, nRangeYMax;
+};
+struct mso_CustomShape
+{
+ SvxMSDffVertPair* pVertices;
+ sal_uInt32 nVertices;
+ sal_uInt16* pElements;
+ sal_uInt32 nElements;
+ SvxMSDffCalculationData* pCalculation;
+ sal_uInt32 nCalculation;
+ sal_Int32* pDefData;
+ SvxMSDffTextRectangles* pTextRect;
+ sal_uInt32 nTextRect;
+ sal_Int32 nCoordWidth;
+ sal_Int32 nCoordHeight;
+ sal_Int32 nXRef;
+ sal_Int32 nYRef;
+ SvxMSDffVertPair* pGluePoints;
+ sal_uInt32 nGluePoints;
+ SvxMSDffHandle* pHandles;
+ sal_uInt32 nHandles;
+};
+
+#define MSO_I | sal_Int32(0x80000000)
+
+bool SortFilledObjectsToBackByDefault( MSO_SPT eSpType );
+SVXCORE_DLLPUBLIC bool IsCustomShapeFilledByDefault( MSO_SPT eSpType );
+SVXCORE_DLLPUBLIC sal_Int16 GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType );
+
+// #i28269#
+SVXCORE_DLLPUBLIC bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType );
+
+SVXCORE_DLLPUBLIC const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/EnhancedCustomShapeTypeNames.hxx b/include/svx/EnhancedCustomShapeTypeNames.hxx
new file mode 100644
index 000000000..b369c8c42
--- /dev/null
+++ b/include/svx/EnhancedCustomShapeTypeNames.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ENHANCEDCUSTOMSHAPETYPENAMES_HXX
+#define INCLUDED_SVX_ENHANCEDCUSTOMSHAPETYPENAMES_HXX
+#include <svx/msdffdef.hxx>
+#include <svx/svxdllapi.h>
+#include <rtl/ustring.hxx>
+
+namespace EnhancedCustomShapeTypeNames
+{
+SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString&);
+SVXCORE_DLLPUBLIC OUString Get(const MSO_SPT);
+SVXCORE_DLLPUBLIC const OUString& GetAccName(const OUString&);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/FileExportedDialog.hxx b/include/svx/FileExportedDialog.hxx
new file mode 100644
index 000000000..3ad5ab559
--- /dev/null
+++ b/include/svx/FileExportedDialog.hxx
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <vcl/weld.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC FileExportedDialog final : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Label> m_xFileLabel;
+ std::unique_ptr<weld::Button> m_xButton;
+
+ DECL_DLLPRIVATE_LINK(OpenHdl, weld::Button&, void);
+
+public:
+ explicit FileExportedDialog(weld::Window* pParent, OUString atitle);
+};
diff --git a/include/svx/GenericCheckDialog.hxx b/include/svx/GenericCheckDialog.hxx
new file mode 100644
index 000000000..9878ea9fa
--- /dev/null
+++ b/include/svx/GenericCheckDialog.hxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+#include <tools/link.hxx>
+#include <vcl/weld.hxx>
+
+namespace svx
+{
+/**
+ * Interface for the data of a check, which must be extended by the
+ * check itself, to show the data in the GenericCheckDialog.
+ */
+class CheckData
+{
+public:
+ virtual ~CheckData() {}
+
+ /// check entry text
+ virtual OUString getText() = 0;
+
+ /// true, if we can show the "Mark" button
+ virtual bool canMarkObject() = 0;
+ /// executed, when the "Mark" button is hit
+ virtual void markObject() = 0;
+
+ /// true, if we can show the "Properties" button
+ virtual bool hasProperties() = 0;
+ /// executed, when the "Properties" button is hit
+ virtual void runProperties() = 0;
+};
+
+/**
+ * Check data collection contains all the checks in one data structure,
+ * and also serves to define additional attributes that are used by the
+ * GenericCheckDialog (the title of the check dialog).
+ */
+class CheckDataCollection
+{
+protected:
+ std::vector<std::unique_ptr<CheckData>> m_aCollection;
+
+public:
+ virtual ~CheckDataCollection() {}
+
+ std::vector<std::unique_ptr<CheckData>>& getCollection() { return m_aCollection; }
+
+ virtual OUString getTitle() = 0;
+};
+
+/**
+ * A UI piece to show check result text and other widgets, which are
+ * relevant for the check (various buttons to act on the check result).
+ */
+class GenericCheckEntry final
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<weld::Label> m_xLabel;
+ std::unique_ptr<weld::Button> m_xMarkButton;
+ std::unique_ptr<weld::Button> m_xPropertiesButton;
+
+ std::unique_ptr<CheckData>& m_pCheckData;
+
+public:
+ GenericCheckEntry(weld::Container* pParent, std::unique_ptr<CheckData>& rCheckData);
+
+ weld::Widget* get_widget() const { return m_xContainer.get(); }
+
+ DECL_LINK(MarkButtonClicked, weld::Button&, void);
+ DECL_LINK(PropertiesButtonClicked, weld::Button&, void);
+};
+
+/**
+ * This is a generic dialog, which is used to display results of a
+ * document checks, like for example image size check.
+ */
+class SVX_DLLPUBLIC GenericCheckDialog final : public weld::GenericDialogController
+{
+private:
+ std::vector<std::unique_ptr<GenericCheckEntry>> m_aCheckEntries;
+ CheckDataCollection& m_rCheckDataCollection;
+
+ std::unique_ptr<weld::Box> m_xCheckBox;
+
+public:
+ GenericCheckDialog(weld::Window* pParent, CheckDataCollection& rCheckDataCollection);
+ virtual ~GenericCheckDialog() override;
+ virtual short run() override;
+};
+
+} // end svx namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/IAccessibleParent.hxx b/include/svx/IAccessibleParent.hxx
new file mode 100644
index 000000000..50530c0a0
--- /dev/null
+++ b/include/svx/IAccessibleParent.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_IACCESSIBLEPARENT_HXX
+#define INCLUDED_SVX_IACCESSIBLEPARENT_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <tools/long.hxx>
+
+namespace accessibility { class AccessibleControlShape; }
+namespace com::sun::star::accessibility { class XAccessible; }
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::drawing { class XShape; }
+
+namespace accessibility {
+
+class AccessibleShape;
+class AccessibleShapeTreeInfo;
+
+/** This interface contains methods missing from the
+ XAccessibleContext interface that allow the modification of
+ parent/child relationship.
+*/
+class IAccessibleParent
+{
+public:
+ /** Allow for a virtual destructor.
+ */
+ virtual ~IAccessibleParent(){};
+
+ /** A call to this method requests the implementor to replace one child
+ with another and send the appropriate notifications. That are two
+ child events: One notifying the removal of the current child and one
+ about the existence of the new child. The index of the new child is
+ implementation dependent, i.e. it is not guaranteed that the
+ replacement has the same index as the current child has.
+
+ <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject
+ to let a factory create the new instance with the parameters given, and then
+ place the new shape into the own structures.</p>
+
+ @param pCurrentChild
+ This child is about to be replaced.
+
+ @param _rxShape
+ The UNO shape which the old and new child represent
+
+ @param _nIndex
+ The IndexInParent of the old child. Note that the index in
+ parent of the replacement is not necessarily the same as
+ that of the current child.
+
+ @param _rShapeTreeInfo
+ The TreeInfo for the old child.
+
+ @return
+ If the replacement has taken place successfully <TRUE/> is
+ returned. If the replacement can not be carried out or an error
+ occurs that does not result in an exception then <FALSE/> is
+ returned.
+
+ @throws RuntimeException
+ in case something went heavily wrong
+ */
+ virtual bool ReplaceChild (
+ AccessibleShape* pCurrentChild,
+ const css::uno::Reference< css::drawing::XShape >& _rxShape,
+ const tools::Long _nIndex,
+ const AccessibleShapeTreeInfo& _rShapeTreeInfo
+ ) = 0;
+ //Add this method to support Form Controls
+ /// @throws css::uno::RuntimeException
+ virtual AccessibleControlShape* GetAccControlShapeFromModel
+ (css::beans::XPropertySet*){return nullptr;};
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Reference<
+ css::accessibility::XAccessible>
+ GetAccessibleCaption (const css::uno::Reference<
+ css::drawing::XShape>&){return nullptr;};
+ virtual bool IsDocumentSelAll(){ return false; }
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/IAccessibleViewForwarder.hxx b/include/svx/IAccessibleViewForwarder.hxx
new file mode 100644
index 000000000..fd9a5f638
--- /dev/null
+++ b/include/svx/IAccessibleViewForwarder.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
+#define INCLUDED_SVX_IACCESSIBLEVIEWFORWARDER_HXX
+
+#include <tools/gen.hxx>
+
+namespace accessibility
+{
+/** <p>This interface provides the means to transform between internal
+ coordinates in 100th of mm and screen coordinates without giving direct
+ access to the underlying view. Each view forwarder represents a
+ specific real or virtual window. A call to
+ <method>GetVisibleArea</method> returns the visible rectangle that
+ corresponds to this window.</p>
+
+ <p>This interface is similar to the SvxViewForwarder but
+ differs in two important points: Firstly the <member>GetVisArea</member>
+ method returns a rectangle in internal coordinates and secondly the
+ transformation methods do not require explicit mapmodes. These have to
+ be provided implicitly by the classes that implement this
+ interface. A third, less important, difference are the additional
+ transformation methods for sizes. The reasons for their existence are
+ convenience and improved performance.</p>
+
+ @attention
+ Note, that modifications of the underlying view that lead to
+ different transformations between internal and screen coordinates or
+ change the validity of the forwarder have to be signaled separately.
+*/
+class IAccessibleViewForwarder
+{
+public:
+ IAccessibleViewForwarder() = default;
+ IAccessibleViewForwarder(IAccessibleViewForwarder const&) = default;
+ IAccessibleViewForwarder(IAccessibleViewForwarder&&) = default;
+ IAccessibleViewForwarder& operator=(IAccessibleViewForwarder const&) = default;
+ IAccessibleViewForwarder& operator=(IAccessibleViewForwarder&&) = default;
+
+ virtual ~IAccessibleViewForwarder(){};
+
+ /** Returns the area of the underlying document that is visible in the
+ * corresponding window.
+
+ @return
+ The rectangle of the visible part of the document. The values
+ are, contrary to the base class, in internal coordinates of
+ 100th of mm.
+ */
+ virtual tools::Rectangle GetVisibleArea() const = 0;
+
+ /** Transform the specified point from internal coordinates in 100th of
+ mm to an absolute screen position.
+
+ @param rPoint
+ Point in internal coordinates (100th of mm).
+
+ @return
+ The same point but in screen coordinates relative to the upper
+ left corner of the (current) screen.
+ */
+ virtual Point LogicToPixel(const Point& rPoint) const = 0;
+
+ /** Transform the specified size from internal coordinates in 100th of
+ mm to a screen oriented pixel size.
+
+ @param rSize
+ Size in internal coordinates (100th of mm).
+
+ @return
+ The same size but in screen coordinates.
+ */
+ virtual Size LogicToPixel(const Size& rSize) const = 0;
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/IAccessibleViewForwarderListener.hxx b/include/svx/IAccessibleViewForwarderListener.hxx
new file mode 100644
index 000000000..bd2265b96
--- /dev/null
+++ b/include/svx/IAccessibleViewForwarderListener.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_IACCESSIBLEVIEWFORWARDERLISTENER_HXX
+#define INCLUDED_SVX_IACCESSIBLEVIEWFORWARDERLISTENER_HXX
+
+namespace accessibility
+{
+/** <p>The purpose of this interface is to notify a user of an
+ IAccessibleViewForwarder when that view forwarder changes its
+ properties. Such a change may be one of the following:
+ <ul>
+ <li>Change of the coordinate transformation.</li>
+ <li>Change of the visible area (which in turn results in a change of the
+ coordinate transformation.</li>
+ <li>Change of the validity state of the view forwarder.</li>
+*/
+class IAccessibleViewForwarderListener
+{
+public:
+ /** This method is called to indicate a change of the specified view
+ forwarder, specifically, a change in visible area.
+ */
+ virtual void ViewForwarderChanged() = 0;
+
+protected:
+ ~IAccessibleViewForwarderListener() {}
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ImageMapInfo.hxx b/include/svx/ImageMapInfo.hxx
new file mode 100644
index 000000000..0e12df24d
--- /dev/null
+++ b/include/svx/ImageMapInfo.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdobj.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/imap.hxx>
+
+#define SVX_IMAPINFO_ID 2
+
+class SVXCORE_DLLPUBLIC SvxIMapInfo final : public SdrObjUserData, public SfxListener
+{
+ ImageMap aImageMap;
+
+public:
+ SvxIMapInfo(const ImageMap& rImageMap)
+ : SdrObjUserData(SdrInventor::StarDrawUserData, SVX_IMAPINFO_ID)
+ , aImageMap(rImageMap){};
+
+ SvxIMapInfo(const SvxIMapInfo& rIMapInfo)
+ : SdrObjUserData(SdrInventor::StarDrawUserData, SVX_IMAPINFO_ID)
+ , SfxListener()
+ , aImageMap(rIMapInfo.aImageMap){};
+
+ virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject*) const override
+ {
+ return std::unique_ptr<SdrObjUserData>(new SvxIMapInfo(*this));
+ }
+
+ void SetImageMap(const ImageMap& rIMap) { aImageMap = rIMap; }
+ const ImageMap& GetImageMap() const { return aImageMap; }
+
+ static SvxIMapInfo* GetIMapInfo(const SdrObject* pObject);
+ static IMapObject* GetHitIMapObject(const SdrObject* pObj, const Point& rWinPoint,
+ const OutputDevice* pCmpWnd = nullptr);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/MediaShellHelpers.hxx b/include/svx/MediaShellHelpers.hxx
new file mode 100644
index 000000000..c0d27e37b
--- /dev/null
+++ b/include/svx/MediaShellHelpers.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+
+class SdrMarkView;
+class SfxItemSet;
+class SfxRequest;
+
+namespace avmedia
+{
+class MediaItem;
+}
+
+namespace svx::MediaShellHelpers
+{
+SVX_DLLPUBLIC void GetState(const SdrMarkView* pSdrView, SfxItemSet& rSet);
+SVX_DLLPUBLIC const ::avmedia::MediaItem* Execute(const SdrMarkView* pSdrView,
+ SfxRequest const& rReq);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
new file mode 100644
index 000000000..c23a09f9c
--- /dev/null
+++ b/include/svx/Palette.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PALETTE_HXX
+#define INCLUDED_SVX_PALETTE_HXX
+
+#include <sal/config.h>
+
+#include <functional>
+
+#include <rtl/ustring.hxx>
+#include <tools/color.hxx>
+#include <svx/svxdllapi.h>
+
+class SvxColorValueSet;
+
+typedef std::pair<Color, OUString> NamedColor;
+
+namespace svx
+{
+/// A color with an optional name and other theming-related properties.
+struct SVXCORE_DLLPUBLIC NamedThemedColor
+{
+ Color m_aColor;
+ OUString m_aName;
+ sal_Int16 m_nThemeIndex = -1;
+ sal_Int16 m_nLumMod = 10000;
+ sal_Int16 m_nLumOff = 0;
+
+ static NamedThemedColor FromNamedColor(const NamedColor& rNamedColor);
+
+ NamedColor ToNamedColor() const;
+};
+}
+
+typedef std::function<void(const OUString&, const svx::NamedThemedColor&)> ColorSelectFunction;
+
+class Palette
+{
+public:
+ virtual ~Palette();
+
+ virtual const OUString& GetName() = 0;
+ virtual const OUString& GetPath() = 0;
+ virtual void LoadColorSet(SvxColorValueSet& rColorSet) = 0;
+
+ virtual bool IsValid() = 0;
+};
+
+#endif // INCLUDED_SVX_PALETTE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
new file mode 100644
index 000000000..4e45df001
--- /dev/null
+++ b/include/svx/PaletteManager.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PALETTEMANAGER_HXX
+#define INCLUDED_SVX_PALETTEMANAGER_HXX
+
+#include <svx/Palette.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/xtable.hxx>
+#include <svtools/colrdlg.hxx>
+
+#include <deque>
+#include <vector>
+#include <memory>
+
+namespace com::sun::star::uno { class XComponentContext; }
+namespace svx { class ToolboxButtonColorUpdaterBase; }
+namespace weld { class Window; }
+
+class SVXCORE_DLLPUBLIC PaletteManager
+{
+ const sal_uInt16 mnMaxRecentColors;
+
+ sal_uInt16 mnNumOfPalettes;
+ sal_uInt16 mnCurrentPalette;
+
+ tools::Long mnColorCount;
+ svx::ToolboxButtonColorUpdaterBase* mpBtnUpdater;
+
+ XColorListRef pColorList;
+ std::deque<NamedColor> maRecentColors;
+ std::vector<std::unique_ptr<Palette>> m_Palettes;
+
+ ColorSelectFunction maColorSelectFunction;
+
+ std::unique_ptr<SvColorDialog> m_pColorDlg;
+public:
+ PaletteManager();
+ ~PaletteManager();
+ PaletteManager(const PaletteManager&) = delete;
+ PaletteManager& operator=(const PaletteManager&) = delete;
+ void LoadPalettes();
+ void ReloadColorSet(SvxColorValueSet& rColorSet);
+ void ReloadRecentColorSet(SvxColorValueSet& rColorSet);
+ std::vector<OUString> GetPaletteList();
+ void SetPalette( sal_Int32 nPos );
+ sal_Int32 GetPalette() const;
+ sal_Int32 GetPaletteCount() const { return mnNumOfPalettes; }
+ OUString GetPaletteName();
+ OUString GetSelectedPalettePath();
+
+ tools::Long GetColorCount() const;
+ tools::Long GetRecentColorCount() const;
+ void AddRecentColor(const Color& rRecentColor, const OUString& rColorName, bool bFront = true);
+
+ void SetBtnUpdater(svx::ToolboxButtonColorUpdaterBase* pBtnUpdater);
+ void PopupColorPicker(weld::Window* pParent, const OUString& aCommand, const Color& rInitialColor);
+
+ void SetColorSelectFunction(const ColorSelectFunction& aColorSelectFunction);
+
+ bool IsThemePaletteSelected() const;
+
+ static void GetThemeIndexLumModOff(sal_uInt16 nItemId, sal_Int16& rThemeIndex,
+ sal_Int16& rLumMod, sal_Int16& rLumOff);
+
+ static void DispatchColorCommand(const OUString& aCommand, const svx::NamedThemedColor& rColor);
+};
+
+#endif // INCLUDED_SVX_PALETTEMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ParaSpacingControl.hxx b/include/svx/ParaSpacingControl.hxx
new file mode 100644
index 000000000..3a5c1d0fa
--- /dev/null
+++ b/include/svx/ParaSpacingControl.hxx
@@ -0,0 +1,128 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARASPACINGCONTROL_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARASPACINGCONTROL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/ui/XContextChangeEventListener.hpp>
+
+namespace com::sun::star::ui
+{
+class XContextChangeEventMultiplexer;
+}
+namespace com::sun::star::ui
+{
+struct ContextChangeEventObject;
+}
+namespace vcl
+{
+class Window;
+}
+
+namespace svx
+{
+class ParaULSpacingControl : public SfxToolBoxControl
+{
+public:
+ ParaULSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual ~ParaULSpacingControl() override;
+
+ virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override = 0;
+};
+
+class SVX_DLLPUBLIC ParaAboveSpacingControl final : public ParaULSpacingControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ParaAboveSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+};
+
+class SVX_DLLPUBLIC ParaBelowSpacingControl final : public ParaULSpacingControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ParaBelowSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+};
+
+class ParaLRSpacingControl : public SfxToolBoxControl, public css::ui::XContextChangeEventListener
+{
+public:
+ ParaLRSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual ~ParaLRSpacingControl() override;
+
+ virtual void SAL_CALL dispose() override;
+
+ virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override = 0;
+
+ // XContextChangeEventListener
+ virtual void SAL_CALL
+ notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent) override;
+
+ virtual ::css::uno::Any SAL_CALL queryInterface(const ::css::uno::Type& aType) override;
+
+ virtual void SAL_CALL acquire() noexcept override;
+
+ virtual void SAL_CALL disposing(const ::css::lang::EventObject&) override;
+
+ virtual void SAL_CALL release() noexcept override;
+
+private:
+ css::uno::Reference<css::ui::XContextChangeEventMultiplexer> m_xMultiplexer;
+};
+
+class SVX_DLLPUBLIC ParaLeftSpacingControl final : public ParaLRSpacingControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ParaLeftSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+};
+
+class SVX_DLLPUBLIC ParaRightSpacingControl final : public ParaLRSpacingControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ParaRightSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+};
+
+class SVX_DLLPUBLIC ParaFirstLineSpacingControl final : public ParaLRSpacingControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ParaFirstLineSpacingControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ParseContext.hxx b/include/svx/ParseContext.hxx
new file mode 100644
index 000000000..4b8f451a8
--- /dev/null
+++ b/include/svx/ParseContext.hxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PARSECONTEXT_HXX
+#define INCLUDED_SVX_PARSECONTEXT_HXX
+
+#include <com/sun/star/lang/Locale.hpp>
+
+#include <connectivity/IParseContext.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <vector>
+
+namespace svxform
+{
+
+ //= OSystemParseContext
+
+ class SAL_DLLPUBLIC_RTTI OSystemParseContext final : public ::connectivity::IParseContext
+ {
+ private:
+
+ ::std::vector< OUString > m_aLocalizedKeywords;
+
+ public:
+ SVXCORE_DLLPUBLIC OSystemParseContext();
+ SVXCORE_DLLPUBLIC virtual ~OSystemParseContext();
+
+ // retrieves language specific error messages
+ virtual OUString getErrorMessage(ErrorCode _eCodes) const override;
+
+ // retrieves language specific keyword strings (only ASCII allowed)
+ virtual OString getIntlKeywordAscii(InternationalKeyCode _eKey) const override;
+
+ // finds out, if we have an international keyword (only ASCII allowed)
+ virtual InternationalKeyCode getIntlKeyCode(const OString& rToken) const override;
+
+ /** gets a locale instance which should be used when parsing in the context specified by this instance
+ <p>if this is not overridden by derived classes, it returns the static default locale.</p>
+ */
+ SVXCORE_DLLPUBLIC virtual css::lang::Locale getPreferredLocale( ) const override;
+
+ };
+
+
+ //= OParseContextClient
+
+ /** helper class which needs access to a (shared and ref-counted) OSystemParseContext
+ instance.
+ */
+ class SVXCORE_DLLPUBLIC OParseContextClient
+ {
+ protected:
+ OParseContextClient();
+ virtual ~OParseContextClient();
+
+ const OSystemParseContext* getParseContext() const;
+ };
+}
+#endif // INCLUDED_SVX_PARSECONTEXT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ShapeTypeHandler.hxx b/include/svx/ShapeTypeHandler.hxx
new file mode 100644
index 000000000..26d4aafd3
--- /dev/null
+++ b/include/svx/ShapeTypeHandler.hxx
@@ -0,0 +1,199 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SHAPETYPEHANDLER_HXX
+#define INCLUDED_SVX_SHAPETYPEHANDLER_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/long.hxx>
+#include <unordered_map>
+#include <vector>
+
+namespace accessibility { class AccessibleShape; }
+namespace accessibility { class AccessibleShapeInfo; }
+namespace accessibility { class AccessibleShapeTreeInfo; }
+namespace com::sun::star::drawing { class XShape; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+
+namespace accessibility {
+
+/** Use an integer to represent shape type ids. A ShapeTypeId is unique
+ inside one project but is not over the project boundaries.
+*/
+typedef int ShapeTypeId;
+
+/** Define the function type for creating accessible objects for given
+ service names.
+*/
+typedef rtl::Reference<AccessibleShape> (*tCreateFunction)
+ (const AccessibleShapeInfo& rShapeInfo,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo,
+ ShapeTypeId nId);
+
+/** Each shape type is described by listing its id, its service name and a
+ function which creates a new accessible object that can represent that
+ service. The id has to be unique with respect to the create function.
+*/
+struct ShapeTypeDescriptor
+{
+ ShapeTypeId mnShapeTypeId;
+ OUString msServiceName;
+ tCreateFunction maCreateFunction;
+ ShapeTypeDescriptor (
+ ShapeTypeId nId, const OUString& sName, tCreateFunction aFunction)
+ : mnShapeTypeId (nId),
+ msServiceName (sName),
+ maCreateFunction (aFunction)
+ {}
+ ShapeTypeDescriptor()
+ : mnShapeTypeId (-1),
+ maCreateFunction (nullptr)
+ {}
+};
+
+/** @descr
+ This class is a singleton that has the purpose to transform between
+ service names of shapes and associated enum values and to create new
+ accessible objects for given shapes.
+*/
+class SVX_DLLPUBLIC ShapeTypeHandler final
+{
+public:
+ enum { UNKNOWN_SHAPE_TYPE = 0 };
+
+ /** This function returns a reference to the only instance of this class.
+ Use this instance to retrieve a shape's type and service name.
+ @return
+ Returns a reference to a ShapeTypeHandler object.
+ */
+ static ShapeTypeHandler& Instance();
+
+ /** Determines the type id of a shape with the given service name.
+ @param aServiceName
+ Service name of the shape for which to return the type id.
+ @return
+ Returns the type id of the shape with the given service name or
+ -1 when the service name is not known.
+ */
+ ShapeTypeId GetTypeId (const OUString& aServiceName) const;
+
+ /** Determines the type id of the specified shape.
+ @param xShape
+ Reference to the shape for which to return the type id.
+ @return
+ Returns the type id of the specified shape or
+ -1 when the given reference is either not
+ set or the referenced object does not support the
+ XShapeDescriptor interface.
+ */
+ ShapeTypeId GetTypeId (const css::uno::Reference<
+ css::drawing::XShape>& rxShape) const;
+
+ /** Create a new accessible object for the given shape.
+ @param rShapeInfo
+ Bundle of information passed to the new accessible shape.
+ @param rShapeTreeInfo
+ Bundle of information passed down the shape tree.
+ @return
+ Pointer to the implementation object that implements the
+ <code>XAccessible</code> interface. This pointer may be NULL
+ if the specified shape is of unknown type.
+ */
+ rtl::Reference<AccessibleShape>
+ CreateAccessibleObject (
+ const AccessibleShapeInfo& rShapeInfo,
+ const AccessibleShapeTreeInfo& rShapeTreeInfo) const;
+
+ /** Add new shape types to the internal tables. Each new shape type is
+ described by one shape type descriptor. See
+ ShapeTypeDescriptor for more details.
+
+ @param nDescriptorCount
+ Number of new shape types.
+ @param aDescriptorList
+ Array of new shape type descriptors.
+ */
+ void AddShapeTypeList (int nDescriptorCount,
+ ShapeTypeDescriptor const aDescriptorList[]);
+
+ /// get the accessible base name for an object
+ ///
+ /// @throws css::uno::RuntimeException
+ static OUString CreateAccessibleBaseName (
+ const css::uno::Reference< css::drawing::XShape >& rxShape);
+
+private:
+ // Declare default constructor, copy constructor, destructor, and
+ // assignment operation protected so that no one accidentally creates a
+ // second instance of this singleton class or deletes it.
+ ShapeTypeHandler();
+ ShapeTypeHandler (const ShapeTypeHandler& aHandler); // never implemented, this is a singleton class
+ ShapeTypeHandler& operator= (const ShapeTypeHandler& aHandler); // never implemented, this is a singleton class
+
+ /** This destructor is never called at the moment. But because this
+ class is a singleton this is not a problem.
+ */
+ ~ShapeTypeHandler();
+
+ /// Pointer to the only instance of this class.
+ static ShapeTypeHandler* instance;
+
+ /** List of shape type descriptors. This list is normally build up in
+ several steps when libraries that implement shapes are loaded and
+ call the addShapeTypeList method. After that no modifications of
+ the list take place.
+ */
+ ::std::vector<ShapeTypeDescriptor> maShapeTypeDescriptorList;
+
+ /** This hash map allows the fast look up of a type descriptor for a
+ given service name.
+ */
+ typedef std::unordered_map<OUString,ShapeTypeId> tServiceNameToSlotId;
+ mutable tServiceNameToSlotId maServiceNameToSlotId;
+
+ /** Determine the slot id of the specified shape type. With this id
+ internal methods can access the associated type descriptor.
+ @param aServiceName
+ Service name of the shape for which to return the slot id.
+ @return
+ Returns the slot id of the shape with the given service name or
+ 0 when the service name is not known.
+ */
+ SVX_DLLPRIVATE tools::Long GetSlotId (const OUString& aServiceName) const;
+
+ /** Determine the slot id of the specified shape type. With this id
+ internal methods can access the associated type descriptor.
+ @param rxShape
+ Shape for which to return the slot id.
+ @return
+ Returns the slot id of the shape with the given service name or
+ 0 when the service name is not known.
+ */
+ SVX_DLLPRIVATE tools::Long GetSlotId (const css::uno::Reference<
+ css::drawing::XShape>& rxShape) const;
+};
+
+} // end of namespace accessible
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SmartTagItem.hxx b/include/svx/SmartTagItem.hxx
new file mode 100644
index 000000000..caf0c4551
--- /dev/null
+++ b/include/svx/SmartTagItem.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SMARTTAGITEM_HXX
+#define INCLUDED_SVX_SMARTTAGITEM_HXX
+
+#include <svl/poolitem.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/smarttags/XSmartTagAction.hpp>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star::container {
+ class XStringKeyMap;
+}
+
+namespace com::sun::star::text {
+ class XTextRange;
+}
+
+namespace com::sun::star::frame {
+ class XController;
+}
+class SVX_DLLPUBLIC SvxSmartTagItem final : public SfxPoolItem
+{
+ const css::uno::Sequence < css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > > maActionComponentsSequence;
+ const css::uno::Sequence < css::uno::Sequence< sal_Int32 > > maActionIndicesSequence;
+ const css::uno::Sequence< css::uno::Reference< css::container::XStringKeyMap > > maStringKeyMaps;
+ const css::uno::Reference<css::text::XTextRange> mxRange;
+ const css::uno::Reference<css::frame::XController> mxController;
+ const css::lang::Locale maLocale;
+ const OUString maApplicationName;
+ const OUString maRangeText;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxSmartTagItem( const TypedWhichId<SvxSmartTagItem> nId,
+ const css::uno::Sequence < css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > >& rActionComponentsSequence,
+ const css::uno::Sequence < css::uno::Sequence< sal_Int32 > >& rActionIndicesSequence,
+ const css::uno::Sequence< css::uno::Reference< css::container::XStringKeyMap > >& rStringKeyMaps,
+ const css::uno::Reference<css::text::XTextRange>& rRange,
+ const css::uno::Reference<css::frame::XController>& rController,
+ const css::lang::Locale& rLocale,
+ const OUString& rApplicationName,
+ const OUString& rRangeText );
+
+ // "purely virtual methods" from the SfxPoolItem
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxSmartTagItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const css::uno::Sequence < css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > >& GetActionComponentsSequence() const { return maActionComponentsSequence; }
+ const css::uno::Sequence < css::uno::Sequence< sal_Int32 > >& GetActionIndicesSequence() const { return maActionIndicesSequence; }
+ const css::uno::Sequence< css::uno::Reference< css::container::XStringKeyMap > >& GetStringKeyMaps() const { return maStringKeyMaps; }
+ const css::uno::Reference<css::text::XTextRange>& GetTextRange() const { return mxRange; }
+ const css::uno::Reference<css::frame::XController>& GetController() const { return mxController; }
+ const css::lang::Locale& GetLocale() const { return maLocale; }
+ const OUString& GetApplicationName() const { return maApplicationName; }
+ const OUString& GetRangeText() const { return maRangeText; }
+};
+
+#endif // INCLUDED_SVX_SMARTTAGITEM_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SmartTagMgr.hxx b/include/svx/SmartTagMgr.hxx
new file mode 100644
index 000000000..510f5d53a
--- /dev/null
+++ b/include/svx/SmartTagMgr.hxx
@@ -0,0 +1,231 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SMARTTAGMGR_HXX
+#define INCLUDED_SVX_SMARTTAGMGR_HXX
+
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/util/XChangesListener.hpp>
+#include <svx/svxdllapi.h>
+
+#include <vector>
+#include <map>
+#include <set>
+#include <string_view>
+
+namespace com::sun::star::uno {
+ class XComponentContext;
+}
+
+namespace com::sun::star::smarttags {
+ class XSmartTagRecognizer;
+ class XSmartTagAction;
+}
+
+namespace com::sun::star::text {
+ class XTextMarkup;
+ class XTextRange;
+}
+
+namespace com::sun::star::i18n {
+ class XBreakIterator;
+}
+
+namespace com::sun::star::lang {
+ struct Locale;
+ struct EventObject;
+ struct ChangesEvent;
+}
+
+namespace com::sun::star::beans {
+ class XPropertySet;
+}
+
+namespace com::sun::star::frame {
+ class XController;
+}
+
+/** A reference to a smart tag action
+
+ An action service can support various actions. Therefore an ActionReference
+ consists of a reference to the service and index.
+ */
+struct ActionReference
+{
+ css::uno::Reference< css::smarttags::XSmartTagAction > mxSmartTagAction;
+ sal_Int32 mnSmartTagIndex;
+ ActionReference( css::uno::Reference< css::smarttags::XSmartTagAction > const & xSmartTagAction, sal_Int32 nSmartTagIndex )
+ : mxSmartTagAction( xSmartTagAction), mnSmartTagIndex( nSmartTagIndex ) {}
+};
+
+/** The smart tag manager maintains all installed action and recognizer services
+
+ This class organizes the available smarttag libraries and provides access functions
+ to these libraries. The smart tag manager is a singleton.
+*/
+class SVX_DLLPUBLIC SmartTagMgr : public cppu::WeakImplHelper< css::util::XModifyListener,
+ css::util::XChangesListener >
+{
+private:
+
+ const OUString maApplicationName;
+ std::vector< css::uno::Reference< css::smarttags::XSmartTagRecognizer > > maRecognizerList;
+ std::vector< css::uno::Reference< css::smarttags::XSmartTagAction > > maActionList;
+ std::set< OUString > maDisabledSmartTagTypes;
+ std::multimap < OUString, ActionReference > maSmartTagMap;
+ mutable css::uno::Reference< css::i18n::XBreakIterator > mxBreakIter;
+ css::uno::Reference< css::uno::XComponentContext> mxContext;
+ css::uno::Reference< css::beans::XPropertySet > mxConfigurationSettings;
+ bool mbLabelTextWithSmartTags;
+
+ /** Checks for installed smart tag recognizers/actions and stores them in
+ maRecognizerList and maActionList.
+ */
+ void LoadLibraries();
+
+ /** Prepare configuration access.
+ */
+ void PrepareConfiguration( std::u16string_view rConfigurationGroupName );
+
+ /** Reads the configuration data.
+ */
+ void ReadConfiguration( bool bExcludedTypes, bool bRecognize );
+
+ /** Registers the smart tag manager as listener at the package manager.
+ */
+ void RegisterListener();
+
+ /** Sets up a map that maps smart tag type names to actions references.
+ */
+ void AssociateActionsWithRecognizers();
+
+public:
+
+ SmartTagMgr( const OUString& rApplicationName );
+ virtual ~SmartTagMgr() override;
+
+ /** Triggers configuration reading, library loading and listener registration
+ NOTE: MUST BE CALLED AFTER CONSTRUCTION!
+ */
+ void Init( std::u16string_view rConfigurationGroupName );
+
+ /** Dispatches the recognize call to all installed smart tag recognizers
+
+ @param rText
+ The string to be scanned by the recognizers.
+
+ @param xMarkup
+ The object allows the recognizers to store any found smart tags.
+
+ @param xController
+ The current controller of the document.
+
+ @param rLocale
+ The locale of rText.
+
+ @param nStart
+ The start offset of the text to be scanned in rText.
+
+ @param nLen
+ The length of the text to be scanned.
+
+ */
+
+ void RecognizeString( const OUString& rText,
+ const css::uno::Reference< css::text::XTextMarkup >& rMarkup,
+ const css::uno::Reference< css::frame::XController >& rController,
+ const css::lang::Locale& rLocale,
+ sal_uInt32 nStart, sal_uInt32 nLen ) const;
+
+ void RecognizeTextRange(const css::uno::Reference< css::text::XTextRange>& rRange,
+ const css::uno::Reference< css::text::XTextMarkup >& rMarkup,
+ const css::uno::Reference< css::frame::XController >& rController) const;
+
+ /** Returns all action references associated with a given list of smart tag types
+
+ @param rSmartTagTypes
+ The list of types
+
+ @param rActionComponentsSequence
+ Output parameter
+
+ @param rActionIndicesSequence
+ Output parameter
+ */
+ void GetActionSequences( std::vector< OUString >& rSmartTagTypes,
+ css::uno::Sequence < css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > >& rActionComponentsSequence,
+ css::uno::Sequence < css::uno::Sequence< sal_Int32 > >& rActionIndicesSequence ) const;
+
+ /** Returns the caption for a smart tag type.
+
+ @param rSmartTagType
+ The given smart tag type.
+
+ @param rLocale
+ The locale.
+ */
+ OUString GetSmartTagCaption( const OUString& rSmartTagType, const css::lang::Locale& rLocale ) const;
+
+ /** Returns true if the given smart tag type is enabled.
+ */
+ bool IsSmartTagTypeEnabled( const OUString& rSmartTagType ) const;
+
+ /** Enable or disable smart tags.
+ */
+ bool IsLabelTextWithSmartTags() const { return mbLabelTextWithSmartTags; }
+
+ /** Returns the number of registered recognizers.
+ */
+ sal_uInt32 NumberOfRecognizers() const { return maRecognizerList.size(); }
+
+ /** Returns a recognizer.
+ */
+ css::uno::Reference< css::smarttags::XSmartTagRecognizer > const &
+ GetRecognizer( sal_uInt32 i ) const { return maRecognizerList[i]; }
+
+ /** Is smart tag recognition active?
+ */
+ bool IsSmartTagsEnabled() const { return 0 != NumberOfRecognizers() &&
+ IsLabelTextWithSmartTags(); }
+
+ /** Writes configuration settings.
+ */
+ void WriteConfiguration( const bool* bLabelTextWithSmartTags,
+ const std::vector< OUString >* pDisabledTypes ) const;
+
+ /** Returns the name of the application this instance has been created by.
+ */
+ const OUString& GetApplicationName() const { return maApplicationName; }
+
+ // css::lang::XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+
+ // css::util::XModifyListener
+ virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override;
+
+ // css::util::XChangesListener
+ virtual void SAL_CALL changesOccurred( const css::util::ChangesEvent& Event ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SpellDialogChildWindow.hxx b/include/svx/SpellDialogChildWindow.hxx
new file mode 100644
index 000000000..21ebd227c
--- /dev/null
+++ b/include/svx/SpellDialogChildWindow.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SPELLDIALOGCHILDWINDOW_HXX
+#define INCLUDED_SVX_SPELLDIALOGCHILDWINDOW_HXX
+
+#include <sfx2/childwin.hxx>
+#include <editeng/SpellPortions.hxx>
+#include <svx/svxdllapi.h>
+
+class AbstractSpellDialog;
+
+namespace svx
+{
+/** The child window wrapper of the actual spelling dialog. To use the
+ spelling dialog in an application you have to do the usual things:
+ <ol>
+ <li>Call this class' RegisterChildWindow() method with the module
+ as second argument that you want the dialog included in.</li>
+ <li>In the SFX_IMPL_INTERFACE implementation of the view shell
+ that wants to use the dialog call RegisterChildWindow()
+ with the id returned by this class' GetChildWindowId()
+ method.</li>
+ <li>Include the item associated with this child window to the SDI
+ description of the view shell.</li>
+ </ol>
+*/
+class SVX_DLLPUBLIC SpellDialogChildWindow : public SfxChildWindow
+{
+ friend class SpellDialog;
+ VclPtr<AbstractSpellDialog> m_xAbstractSpellDialog;
+
+public:
+ SpellDialogChildWindow(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings);
+ virtual ~SpellDialogChildWindow() override;
+
+protected:
+ /** This abstract method has to be defined by a derived class. It
+ returns the next wrong sentence.
+ @return
+ returns an empty vector if no error could be found
+ */
+ virtual SpellPortions GetNextWrongSentence(bool bRecheck) = 0;
+
+ /** This abstract method applies the changes made in the spelling dialog
+ to the document.
+ The dialog always updates its settings when it gets the focus. The document
+ can rely on the fact that the methods ApplyChangedSentence() is called for the
+ position that the last GetNextWrongSentence() returned.
+ If 'bRecheck' is set to true then the same sentence should be rechecked once from
+ the start. This should be used to find errors that the user has introduced by
+ manual changes in the edit field, and in order to not miss the still following errors
+ in that sentence.
+ */
+ virtual void ApplyChangedSentence(const SpellPortions& rChanged, bool bRecheck) = 0;
+ /** This methods determines whether the application supports AutoCorrection
+ */
+ virtual bool HasAutoCorrection();
+ /** This method adds a word pair to the AutoCorrection - if available
+ */
+ virtual void AddAutoCorrection(const OUString& rOld, const OUString& rNew,
+ LanguageType eLanguage);
+ /** Return the sfx bindings for this child window. They are
+ retrieved from the dialog so they do not have to be stored in
+ this class as well. The bindings may be necessary to be used
+ by the abstract methods.
+ */
+ /** This method determines if grammar checking is supported
+ */
+ virtual bool HasGrammarChecking();
+ /** determines if grammar checking is switched on
+ */
+ virtual bool IsGrammarChecking();
+ /** switches grammar checking on/off
+ */
+ virtual void SetGrammarChecking(bool bOn);
+
+ SfxBindings& GetBindings() const;
+ /** Set the spell dialog into the 'resume' state. This method should be called
+ to notify the SpellDialog about changes in the document that invalidate the
+ current state which results in disabling most of the dialog controls and presenting
+ a "Resume" button that initiates a reinitialization.
+ */
+ void InvalidateSpellDialog();
+ /** Notifies the ChildWindow about the get focus event. The ChildWindow should no check if
+ the spelling dialog should be set to the 'Resume' state by calling InvalidateSpellDialog()
+ */
+ virtual void GetFocus() = 0;
+ /** Notifies the ChildWindow about the lose focus event. The ChildWindow should use it to save
+ the current selection/state.
+ */
+ virtual void LoseFocus() = 0;
+};
+
+} // end of namespace ::svx
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SvxColorChildWindow.hxx b/include/svx/SvxColorChildWindow.hxx
new file mode 100644
index 000000000..07b44a08f
--- /dev/null
+++ b/include/svx/SvxColorChildWindow.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SVXCOLORCHILDWINDOW_HXX
+#define INCLUDED_SVX_SVXCOLORCHILDWINDOW_HXX
+
+#include <sfx2/childwin.hxx>
+#include <svx/svxdllapi.h>
+
+/**
+ * Child of SfxChildWindow as a "container" for Controller
+ */
+class SVX_DLLPUBLIC SvxColorChildWindow final : public SfxChildWindow
+{
+ public:
+ SvxColorChildWindow( vcl::Window*, sal_uInt16, SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SvxColorChildWindow);
+};
+
+
+#endif // INCLUDED_SVX_SVXCOLORCHILDWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx
new file mode 100644
index 000000000..1872b58fd
--- /dev/null
+++ b/include/svx/SvxColorValueSet.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SVXCOLORVALUESET_HXX
+#define INCLUDED_SVX_SVXCOLORVALUESET_HXX
+
+#include <svtools/valueset.hxx>
+#include <svx/svxdllapi.h>
+#include <set>
+
+class XColorList;
+
+class SVXCORE_DLLPUBLIC SvxColorValueSet : public ValueSet
+{
+public:
+ SvxColorValueSet(std::unique_ptr<weld::ScrolledWindow> pWindow);
+
+ virtual void Resize() override;
+
+ /* Maximum row/line count for the ColorValueSet control. If more lines would be needed, a scrollbar will
+ be used. */
+ static constexpr sal_uInt32 getMaxRowCount() { return 10; }
+ static sal_uInt32 getEntryEdgeLength();
+ static sal_uInt32 getColumnCount();
+
+ void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex = 1);
+ void addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix);
+ Size layoutAllVisible(sal_uInt32 nEntryCount);
+ void layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount);
+
+ virtual FactoryFunction GetUITestFactory() const override;
+};
+
+#endif // INCLUDED_SVX_SVXCOLORVALUESET_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SvxNumOptionsTabPageHelper.hxx b/include/svx/SvxNumOptionsTabPageHelper.hxx
new file mode 100644
index 000000000..98766254d
--- /dev/null
+++ b/include/svx/SvxNumOptionsTabPageHelper.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVXNUMOPTIONSTABPAGEHELPER_HXX
+#define INCLUDED_SVX_SVXNUMOPTIONSTABPAGEHELPER_HXX
+
+#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
+#include <vcl/weld.hxx>
+#include <svx/svxdllapi.h>
+
+using namespace css::uno;
+using namespace css::text;
+
+class SVXCORE_DLLPUBLIC SvxNumOptionsTabPageHelper
+{
+public:
+ static Reference<XDefaultNumberingProvider> GetNumberingProvider();
+
+ /** Get the numberings provided by the i18n framework (CTL, Asian, ...) and
+ add them to the listbox. Extended numbering schemes present in the
+ resource and already in the listbox but not offered by the i18n
+ framework per configuration are removed.
+
+ @param nDoNotRemove
+ A value that shall not be removed, i.e. the ugly 0x88
+ (SVX_NUM_BITMAP|0x80)
+ Pass ::std::numeric_limits<sal_uInt16>::max() if there is no such
+ restriction.
+ */
+ static void GetI18nNumbering(weld::ComboBox& rFmtLB, sal_uInt16 nDoNotRemove);
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SvxPresetListBox.hxx b/include/svx/SvxPresetListBox.hxx
new file mode 100644
index 000000000..ec608c830
--- /dev/null
+++ b/include/svx/SvxPresetListBox.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVXPRESETLISTBOX_HXX
+#define INCLUDED_SVX_SVXPRESETLISTBOX_HXX
+
+#include <svtools/valueset.hxx>
+#include <svx/xtable.hxx>
+#include <tools/gen.hxx>
+
+class SVXCORE_DLLPUBLIC SvxPresetListBox final : public ValueSet
+{
+private:
+ static constexpr sal_uInt32 nColCount = 3;
+ Size aIconSize;
+ Link<SvxPresetListBox*,void> maRenameHdl;
+ Link<SvxPresetListBox*,void> maDeleteHdl;
+
+ void OnMenuItemSelected(std::string_view rIdent);
+
+ template< typename ListType, typename EntryType >
+ void FillPresetListBoxImpl(ListType& pList, sal_uInt32 nStartIndex);
+
+public:
+ SvxPresetListBox(std::unique_ptr<weld::ScrolledWindow> pWindow);
+
+ virtual void Resize() override;
+ virtual bool Command(const CommandEvent& rEvent) override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ Size const & GetIconSize() const { return aIconSize; }
+
+ void SetRenameHdl( const Link<SvxPresetListBox*,void>& rLink )
+ {
+ maRenameHdl = rLink;
+ }
+ void SetDeleteHdl( const Link<SvxPresetListBox*,void>& rLink )
+ {
+ maDeleteHdl = rLink;
+ }
+
+ void FillPresetListBox(XGradientList& pList, sal_uInt32 nStartIndex = 1);
+ void FillPresetListBox(XHatchList& pList, sal_uInt32 nStartIndex = 1);
+ void FillPresetListBox(XBitmapList& pList, sal_uInt32 nStartIndex = 1);
+ void FillPresetListBox(XPatternList& pList, sal_uInt32 nStartIndex = 1);
+ void DrawLayout();
+};
+
+#endif // INCLUDED_SVX_SVXPRESETLISTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SvxShapeTypes.hxx b/include/svx/SvxShapeTypes.hxx
new file mode 100644
index 000000000..84429198b
--- /dev/null
+++ b/include/svx/SvxShapeTypes.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVXSHAPETYPES_HXX
+#define INCLUDED_SVX_SVXSHAPETYPES_HXX
+
+namespace accessibility
+{
+/** Register the SVX draw shape types with the ShapeTypeHandler singleton.
+ This method is usually called from the shape type handler constructor.
+*/
+void RegisterDrawShapeTypes();
+
+/** Enum describing all shape types known in the SVX project.
+*/
+enum SvxShapeTypes
+{
+ DRAWING_RECTANGLE = 1,
+ DRAWING_ELLIPSE,
+ DRAWING_CONTROL,
+ DRAWING_CONNECTOR,
+ DRAWING_MEASURE,
+ DRAWING_LINE,
+ DRAWING_POLY_POLYGON,
+ DRAWING_POLY_LINE,
+ DRAWING_OPEN_BEZIER,
+ DRAWING_CLOSED_BEZIER,
+ DRAWING_OPEN_FREEHAND,
+ DRAWING_CLOSED_FREEHAND,
+ DRAWING_POLY_POLYGON_PATH,
+ DRAWING_POLY_LINE_PATH,
+ DRAWING_GRAPHIC_OBJECT,
+ DRAWING_GROUP,
+ DRAWING_TEXT,
+ DRAWING_OLE,
+ DRAWING_PAGE,
+ DRAWING_CAPTION,
+ DRAWING_FRAME,
+ DRAWING_PLUGIN,
+ DRAWING_APPLET,
+ DRAWING_3D_SCENE,
+ DRAWING_3D_CUBE,
+ DRAWING_3D_SPHERE,
+ DRAWING_3D_LATHE,
+ DRAWING_3D_EXTRUDE,
+ DRAWING_CUSTOM,
+ DRAWING_TABLE, /* = 30 */
+ DRAWING_MEDIA, /* = 31 */
+ DRAWING_END = DRAWING_MEDIA
+};
+
+} // end of namespace accessibility
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/SvxXTextColumns.hxx b/include/svx/SvxXTextColumns.hxx
new file mode 100644
index 000000000..0dbc92ba9
--- /dev/null
+++ b/include/svx/SvxXTextColumns.hxx
@@ -0,0 +1,22 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/XInterface.hpp>
+
+#include <svx/svxdllapi.h>
+
+SVXCORE_DLLPUBLIC css::uno::Reference<css::uno::XInterface>
+SvxXTextColumns_createInstance() noexcept;
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/svx/UnoNamespaceMap.hxx b/include/svx/UnoNamespaceMap.hxx
new file mode 100644
index 000000000..b20cf44a6
--- /dev/null
+++ b/include/svx/UnoNamespaceMap.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNONAMESPACEMAP_HXX
+#define INCLUDED_SVX_UNONAMESPACEMAP_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <svx/svxdllapi.h>
+
+class SfxItemPool;
+
+namespace svx
+{
+SVX_DLLPUBLIC css::uno::Reference<css::uno::XInterface>
+NamespaceMap_createInstance(sal_uInt16* pWhichIds, SfxItemPool* pPool);
+}
+
+#endif // INCLUDED_SVX_UNONAMESPACEMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/XPropertyEntry.hxx b/include/svx/XPropertyEntry.hxx
new file mode 100644
index 000000000..c697ee915
--- /dev/null
+++ b/include/svx/XPropertyEntry.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_XPROPERTYENTRY_HXX
+#define INCLUDED_SVX_XPROPERTYENTRY_HXX
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/bitmapex.hxx>
+
+class SVXCORE_DLLPUBLIC XPropertyEntry
+{
+private:
+ OUString maPropEntryName;
+ BitmapEx maUiBitmap;
+
+protected:
+ XPropertyEntry(const OUString& rPropEntryName);
+
+ XPropertyEntry(XPropertyEntry const&) = default;
+ XPropertyEntry(XPropertyEntry&&) = default;
+
+public:
+ virtual ~XPropertyEntry();
+
+ XPropertyEntry& operator=(XPropertyEntry const&) = default;
+ XPropertyEntry& operator=(XPropertyEntry&&) = default;
+
+ void SetName(const OUString& rPropEntryName) { maPropEntryName = rPropEntryName; }
+ const OUString& GetName() const { return maPropEntryName; }
+ void SetUiBitmap(const BitmapEx& rUiBitmap) { maUiBitmap = rUiBitmap; }
+ const BitmapEx& GetUiBitmap() const { return maUiBitmap; }
+};
+
+#endif // INCLUDED_SVX_XPROPERTYENTRY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/algitem.hxx b/include/svx/algitem.hxx
new file mode 100644
index 000000000..d02454033
--- /dev/null
+++ b/include/svx/algitem.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_ALGITEM_HXX
+#define INCLUDED_SVX_ALGITEM_HXX
+
+#include <editeng/svxenum.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svl/poolitem.hxx>
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/degree.hxx>
+
+class IntlWrapper;
+class SfxItemPool;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxOrientationItem final : public SfxEnumItem<SvxCellOrientation>
+{
+public:
+ SvxOrientationItem(
+ const SvxCellOrientation eOrientation,
+ const TypedWhichId<SvxOrientationItem> nId );
+
+ SvxOrientationItem(
+ Degree100 nRotation, bool bStacked,
+ const TypedWhichId<SvxOrientationItem> nId );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual sal_uInt16 GetValueCount() const override;
+ static OUString GetValueText( SvxCellOrientation nVal );
+ virtual SvxOrientationItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ /** Returns sal_True, if the item represents STACKED state. */
+ bool IsStacked() const;
+ /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */
+ Degree100 GetRotation( Degree100 nStdAngle ) const;
+};
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxMarginItem final : public SfxPoolItem
+{
+ sal_Int16 nLeftMargin;
+ sal_Int16 nTopMargin;
+ sal_Int16 nRightMargin;
+ sal_Int16 nBottomMargin;
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxMarginItem( const TypedWhichId<SvxMarginItem> nId );
+ SvxMarginItem( sal_Int16 nLeft, sal_Int16 nTop /*= 0*/,
+ sal_Int16 nRight /*= 0*/, sal_Int16 nBottom /*= 0*/,
+ const TypedWhichId<SvxMarginItem> nId );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxMarginItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ sal_Int16 GetLeftMargin() const {return nLeftMargin; }
+ void SetLeftMargin(sal_Int16 nLeft);
+ sal_Int16 GetTopMargin() const {return nTopMargin; }
+ void SetTopMargin(sal_Int16 nTop);
+ sal_Int16 GetRightMargin() const {return nRightMargin; }
+ void SetRightMargin(sal_Int16 nRight);
+ sal_Int16 GetBottomMargin() const {return nBottomMargin; }
+ void SetBottomMargin(sal_Int16 nBottom);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/anchorid.hxx b/include/svx/anchorid.hxx
new file mode 100644
index 000000000..da7387010
--- /dev/null
+++ b/include/svx/anchorid.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_ANCHORID_HXX
+#define INCLUDED_SVX_ANCHORID_HXX
+
+#include <o3tl/typed_flags_set.hxx>
+
+enum class SvxAnchorIds
+{
+ NONE = 0x0000,
+ Paragraph = 0x0001, // Frame bound to paragraph
+ Character = 0x0002, // Frame bound to character
+ Page = 0x0004, // Frame bound to page
+ Fly = 0x0008, // Frame bound to other frame
+ /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
+ to disable the size controls */
+ NoResize = 0x0100,
+ /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor
+ to disable the protect controls */
+ NoProtect = 0x0200
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxAnchorIds> : is_typed_flags<SvxAnchorIds, 0x030f> {};
+}
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/autoformathelper.hxx b/include/svx/autoformathelper.hxx
new file mode 100644
index 000000000..2d292b1de
--- /dev/null
+++ b/include/svx/autoformathelper.hxx
@@ -0,0 +1,222 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_AUTOFORMATHELPER_HXX
+#define INCLUDED_SVX_AUTOFORMATHELPER_HXX
+
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class SvStream;
+class SvxFontItem;
+class SvxFontHeightItem;
+class SvxWeightItem;
+class SvxPostureItem;
+class SvxUnderlineItem;
+class SvxOverlineItem;
+class SvxCrossedOutItem;
+class SvxContourItem;
+class SvxShadowedItem;
+class SvxColorItem;
+class SvxBoxItem;
+class SvxLineItem;
+class SvxBrushItem;
+class SvxAdjustItem;
+class SvxHorJustifyItem;
+class SvxVerJustifyItem;
+class SfxBoolItem;
+class SvxMarginItem;
+class SfxInt32Item;
+class SvxRotateModeItem;
+
+//////////////////////////////////////////////////////////////////////////////
+/// Struct with version numbers of the Items
+
+struct SVX_DLLPUBLIC AutoFormatVersions
+{
+public:
+ // BlockA
+ sal_uInt16 nFontVersion;
+ sal_uInt16 nFontHeightVersion;
+ sal_uInt16 nWeightVersion;
+ sal_uInt16 nPostureVersion;
+ sal_uInt16 nUnderlineVersion;
+ sal_uInt16 nOverlineVersion;
+ sal_uInt16 nCrossedOutVersion;
+ sal_uInt16 nContourVersion;
+ sal_uInt16 nShadowedVersion;
+ sal_uInt16 nColorVersion;
+ sal_uInt16 nBoxVersion;
+ sal_uInt16 nLineVersion;
+ sal_uInt16 nBrushVersion;
+ sal_uInt16 nAdjustVersion;
+
+ // BlockB
+ sal_uInt16 nHorJustifyVersion;
+ sal_uInt16 nVerJustifyVersion;
+ sal_uInt16 nOrientationVersion;
+ sal_uInt16 nMarginVersion;
+ sal_uInt16 nBoolVersion;
+ sal_uInt16 nInt32Version;
+ sal_uInt16 nRotateModeVersion;
+ sal_uInt16 nNumFormatVersion;
+
+ AutoFormatVersions();
+
+ void LoadBlockA( SvStream& rStream, sal_uInt16 nVer );
+ void LoadBlockB( SvStream& rStream, sal_uInt16 nVer );
+
+ static void WriteBlockA(SvStream& rStream, sal_uInt16 fileVersion);
+ static void WriteBlockB(SvStream& rStream, sal_uInt16 fileVersion);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC AutoFormatBase
+{
+protected:
+ // common attributes of Calc and Writer
+ // --- from 641 on: CJK and CTL font settings
+ std::unique_ptr<SvxFontItem> m_aFont;
+ std::unique_ptr<SvxFontHeightItem> m_aHeight;
+ std::unique_ptr<SvxWeightItem> m_aWeight;
+ std::unique_ptr<SvxPostureItem> m_aPosture;
+
+ std::unique_ptr<SvxFontItem> m_aCJKFont;
+ std::unique_ptr<SvxFontHeightItem> m_aCJKHeight;
+ std::unique_ptr<SvxWeightItem> m_aCJKWeight;
+ std::unique_ptr<SvxPostureItem> m_aCJKPosture;
+
+ std::unique_ptr<SvxFontItem> m_aCTLFont;
+ std::unique_ptr<SvxFontHeightItem> m_aCTLHeight;
+ std::unique_ptr<SvxWeightItem> m_aCTLWeight;
+ std::unique_ptr<SvxPostureItem> m_aCTLPosture;
+
+ std::unique_ptr<SvxUnderlineItem> m_aUnderline;
+ std::unique_ptr<SvxOverlineItem> m_aOverline;
+ std::unique_ptr<SvxCrossedOutItem> m_aCrossedOut;
+ std::unique_ptr<SvxContourItem> m_aContour;
+ std::unique_ptr<SvxShadowedItem> m_aShadowed;
+ std::unique_ptr<SvxColorItem> m_aColor;
+ std::unique_ptr<SvxBoxItem> m_aBox;
+ std::unique_ptr<SvxLineItem> m_aTLBR;
+ std::unique_ptr<SvxLineItem> m_aBLTR;
+ std::unique_ptr<SvxBrushItem> m_aBackground;
+
+ // Writer specific
+ std::unique_ptr<SvxAdjustItem> m_aAdjust;
+
+ // Calc specific
+ std::unique_ptr<SvxHorJustifyItem> m_aHorJustify;
+ std::unique_ptr<SvxVerJustifyItem> m_aVerJustify;
+ std::unique_ptr<SfxBoolItem> m_aStacked;
+ std::unique_ptr<SvxMarginItem> m_aMargin;
+ std::unique_ptr<SfxBoolItem> m_aLinebreak;
+
+ // from SO5, 504k on, rotated text
+ std::unique_ptr<SfxInt32Item> m_aRotateAngle;
+ std::unique_ptr<SvxRotateModeItem> m_aRotateMode;
+
+ // assignment-op is protected due to this being a tooling
+ // class, so callers need to be aware of what they do
+ AutoFormatBase& operator=(const AutoFormatBase&);
+
+ AutoFormatBase();
+ AutoFormatBase( const AutoFormatBase& rNew );
+ ~AutoFormatBase();
+
+ /// Comparing based of boxes backgrounds.
+ bool operator==(const AutoFormatBase& rRight) const;
+
+public:
+ // The get-methods.
+ const SvxFontItem &GetFont() const { return *m_aFont; }
+ const SvxFontHeightItem &GetHeight() const { return *m_aHeight; }
+ const SvxWeightItem &GetWeight() const { return *m_aWeight; }
+ const SvxPostureItem &GetPosture() const { return *m_aPosture; }
+ const SvxFontItem &GetCJKFont() const { return *m_aCJKFont; }
+ const SvxFontHeightItem &GetCJKHeight() const { return *m_aCJKHeight; }
+ const SvxWeightItem &GetCJKWeight() const { return *m_aCJKWeight; }
+ const SvxPostureItem &GetCJKPosture() const { return *m_aCJKPosture; }
+ const SvxFontItem &GetCTLFont() const { return *m_aCTLFont; }
+ const SvxFontHeightItem &GetCTLHeight() const { return *m_aCTLHeight; }
+ const SvxWeightItem &GetCTLWeight() const { return *m_aCTLWeight; }
+ const SvxPostureItem &GetCTLPosture() const { return *m_aCTLPosture; }
+ const SvxUnderlineItem &GetUnderline() const { return *m_aUnderline; }
+ const SvxOverlineItem &GetOverline() const { return *m_aOverline; }
+ const SvxCrossedOutItem &GetCrossedOut() const { return *m_aCrossedOut; }
+ const SvxContourItem &GetContour() const { return *m_aContour; }
+ const SvxShadowedItem &GetShadowed() const { return *m_aShadowed; }
+ const SvxColorItem &GetColor() const { return *m_aColor; }
+ const SvxBoxItem &GetBox() const { return *m_aBox; }
+ const SvxLineItem& GetTLBR() const { return *m_aTLBR; }
+ const SvxLineItem& GetBLTR() const { return *m_aBLTR; }
+ const SvxBrushItem &GetBackground() const { return *m_aBackground; }
+ const SvxAdjustItem &GetAdjust() const { return *m_aAdjust; }
+ const SvxHorJustifyItem& GetHorJustify() const { return *m_aHorJustify; }
+ const SvxVerJustifyItem& GetVerJustify() const { return *m_aVerJustify; }
+ const SfxBoolItem& GetStacked() const { return *m_aStacked; }
+ const SvxMarginItem& GetMargin() const { return *m_aMargin; }
+ const SfxBoolItem& GetLinebreak() const { return *m_aLinebreak; }
+ const SfxInt32Item& GetRotateAngle() const { return *m_aRotateAngle; }
+ const SvxRotateModeItem& GetRotateMode() const { return *m_aRotateMode; }
+
+ // The set-methods.
+ void SetFont( const SvxFontItem& rNew );
+ void SetHeight( const SvxFontHeightItem& rNew );
+ void SetWeight( const SvxWeightItem& rNew );
+ void SetPosture( const SvxPostureItem& rNew );
+ void SetCJKFont( const SvxFontItem& rNew );
+ void SetCJKHeight( const SvxFontHeightItem& rNew );
+ void SetCJKWeight( const SvxWeightItem& rNew );
+ void SetCJKPosture( const SvxPostureItem& rNew );
+ void SetCTLFont( const SvxFontItem& rNew );
+ void SetCTLHeight( const SvxFontHeightItem& rNew );
+ void SetCTLWeight( const SvxWeightItem& rNew );
+ void SetCTLPosture( const SvxPostureItem& rNew );
+ void SetUnderline( const SvxUnderlineItem& rNew );
+ void SetOverline( const SvxOverlineItem& rNew );
+ void SetCrossedOut( const SvxCrossedOutItem& rNew );
+ void SetContour( const SvxContourItem& rNew );
+ void SetShadowed( const SvxShadowedItem& rNew );
+ void SetColor( const SvxColorItem& rNew );
+ void SetBox( const SvxBoxItem& rNew );
+ void SetTLBR( const SvxLineItem& rNew );
+ void SetBLTR( const SvxLineItem& rNew );
+ void SetBackground( const SvxBrushItem& rNew );
+ void SetAdjust( const SvxAdjustItem& rNew );
+ void SetHorJustify( const SvxHorJustifyItem& rNew );
+ void SetVerJustify( const SvxVerJustifyItem& rNew );
+ void SetStacked( const SfxBoolItem& rNew );
+ void SetMargin( const SvxMarginItem& rNew );
+ void SetLinebreak( const SfxBoolItem& rNew );
+ void SetRotateAngle( const SfxInt32Item& rNew );
+ void SetRotateMode( const SvxRotateModeItem& rNew );
+
+ bool LoadBlockA( SvStream& rStream, const AutoFormatVersions& rVersions, sal_uInt16 nVer );
+ bool LoadBlockB( SvStream& rStream, const AutoFormatVersions& rVersions, sal_uInt16 nVer );
+
+ bool SaveBlockA( SvStream& rStream, sal_uInt16 fileVersion ) const;
+ bool SaveBlockB( SvStream& rStream, sal_uInt16 fileVersion ) const;
+};
+
+#endif // INCLUDED_SVX_AUTOFORMATHELPER_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
new file mode 100644
index 000000000..1500b8d3b
--- /dev/null
+++ b/include/svx/bmpmask.hxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_BMPMASK_HXX
+#define INCLUDED_SVX_BMPMASK_HXX
+
+#include <sal/types.h>
+#include <sfx2/childwin.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/dockwin.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/color.hxx>
+#include <vcl/animate/Animation.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/graph.hxx>
+#include <memory>
+
+namespace vcl { class Window; }
+namespace weld { class CustomWeld; }
+
+class SfxBindings;
+class SfxModule;
+
+/*************************************************************************
+|*
+|* class SvxBmpMaskSelectItem
+|*
+\************************************************************************/
+class SvxBmpMask;
+
+class SvxBmpMaskSelectItem final : public SfxControllerItem
+{
+ SvxBmpMask &rBmpMask;
+
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+
+public:
+ SvxBmpMaskSelectItem( SvxBmpMask& rMask,
+ SfxBindings& rBindings );
+};
+
+/*************************************************************************
+|*
+|* Derivative from SfxChildWindow as 'container' for Float
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMaskChildWindow final : public SfxChildWindow
+{
+ public:
+ SvxBmpMaskChildWindow( vcl::Window*,
+ sal_uInt16, SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SvxBmpMaskChildWindow);
+};
+
+/*************************************************************************
+|*
+|* class SvxBmpMask
+|*
+\************************************************************************/
+
+class MaskData;
+class MaskSet;
+class BmpColorWindow;
+class ColorListBox;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMask final : public SfxDockingWindow
+{
+ friend class MaskData;
+ friend class MaskSet;
+
+ std::unique_ptr<weld::Toolbar> m_xTbxPipette;
+ std::unique_ptr<BmpColorWindow> m_xCtlPipette;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPipetteWin;
+ std::unique_ptr<weld::Button> m_xBtnExec;
+
+ std::unique_ptr<weld::CheckButton> m_xCbx1;
+ std::unique_ptr<MaskSet> m_xQSet1;
+ std::unique_ptr<weld::CustomWeld> m_xQSetWin1;
+ std::unique_ptr<weld::MetricSpinButton> m_xSp1;
+ std::unique_ptr<ColorListBox> m_xLbColor1;
+
+ std::unique_ptr<weld::CheckButton> m_xCbx2;
+ std::unique_ptr<MaskSet> m_xQSet2;
+ std::unique_ptr<weld::CustomWeld> m_xQSetWin2;
+ std::unique_ptr<weld::MetricSpinButton> m_xSp2;
+ std::unique_ptr<ColorListBox> m_xLbColor2;
+
+ std::unique_ptr<weld::CheckButton> m_xCbx3;
+ std::unique_ptr<MaskSet> m_xQSet3;
+ std::unique_ptr<weld::CustomWeld> m_xQSetWin3;
+ std::unique_ptr<weld::MetricSpinButton> m_xSp3;
+ std::unique_ptr<ColorListBox> m_xLbColor3;
+
+ std::unique_ptr<weld::CheckButton> m_xCbx4;
+ std::unique_ptr<MaskSet> m_xQSet4;
+ std::unique_ptr<weld::CustomWeld> m_xQSetWin4;
+ std::unique_ptr<weld::MetricSpinButton> m_xSp4;
+ std::unique_ptr<ColorListBox> m_xLbColor4;
+
+ std::unique_ptr<weld::CheckButton> m_xCbxTrans;
+ std::unique_ptr<ColorListBox> m_xLbColorTrans;
+
+ std::unique_ptr<MaskData> m_xData;
+
+ Color aPipetteColor;
+ SvxBmpMaskSelectItem aSelItem;
+
+ virtual bool Close() override;
+
+ sal_uInt16 InitColorArrays( Color* pSrcCols, Color* pDstCols,
+ sal_uInt8* pTols );
+
+ void ImpMask( BitmapEx& rBitmap );
+ GDIMetaFile ImpMask( const GDIMetaFile& rMtf );
+ Animation ImpMask( const Animation& rAnimation );
+ BitmapEx ImpMaskTransparent( const BitmapEx& rBitmapEx,
+ const Color& rColor,
+ const sal_uInt8 nTol );
+
+ GDIMetaFile GetMetaFile(const Graphic& rGraphic);
+
+ static Animation ImpReplaceTransparency( const Animation& rAnim,
+ const Color& rColor );
+ static GDIMetaFile ImpReplaceTransparency( const GDIMetaFile& rMtf,
+ const Color& rColor );
+
+public:
+
+ SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent);
+ virtual ~SvxBmpMask() override;
+ virtual void dispose() override;
+
+ void SetColor( const Color& rColor );
+ void PipetteClicked();
+
+ void SetExecState( bool bEnable );
+
+ Graphic Mask( const Graphic& rGraphic );
+
+ bool IsEyedropping() const;
+
+ void onSelect( const MaskSet* pSet );
+
+private:
+
+ /** Set names for accessible objects. This is necessary for objects
+ like the source color checkboxes which initially have no name and
+ for which the description would be read by AT.
+ */
+ SVX_DLLPRIVATE void SetAccessibleNames();
+};
+
+#endif // INCLUDED_SVX_BMPMASK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/camera3d.hxx b/include/svx/camera3d.hxx
new file mode 100644
index 000000000..e151f2883
--- /dev/null
+++ b/include/svx/camera3d.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CAMERA3D_HXX
+#define INCLUDED_SVX_CAMERA3D_HXX
+
+#include <basegfx/point/b3dpoint.hxx>
+#include <sal/types.h>
+#include <svx/viewpt3d.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Camera derivative
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC Camera3D final : public Viewport3D
+{
+ basegfx::B3DPoint aPosition;
+ basegfx::B3DPoint aLookAt;
+ double fFocalLength;
+ double fBankAngle;
+
+ bool bAutoAdjustProjection;
+
+public:
+ Camera3D(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt,
+ double fFocalLen = 35.0);
+ Camera3D();
+
+ void SetViewWindow(double fX, double fY, double fW, double fH);
+
+ void SetPosition(const basegfx::B3DPoint& rNewPos);
+ const basegfx::B3DPoint& GetPosition() const { return aPosition; }
+ void SetLookAt(const basegfx::B3DPoint& rNewLookAt);
+ void SetPosAndLookAt(const basegfx::B3DPoint& rNewPos, const basegfx::B3DPoint& rNewLookAt);
+
+ // Focal length in mm
+ void SetFocalLength(double fLen);
+ double GetFocalLength() const { return fFocalLength; }
+
+ // Bank angle left/right
+ void SetBankAngle(double fAngle);
+
+ void SetAutoAdjustProjection(bool bAdjust) { bAutoAdjustProjection = bAdjust; }
+};
+
+#endif // INCLUDED_SVX_CAMERA3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
new file mode 100644
index 000000000..faf5aea9b
--- /dev/null
+++ b/include/svx/charmap.hxx
@@ -0,0 +1,162 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_CHARMAP_HXX
+#define INCLUDED_SVX_CHARMAP_HXX
+
+#include <sal/config.h>
+
+#include <deque>
+#include <map>
+#include <memory>
+
+#include <sal/types.h>
+#include <rtl/ref.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/gen.hxx>
+#include <tools/link.hxx>
+#include <vcl/metric.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+
+namespace com::sun::star {
+ namespace accessibility { class XAccessible; }
+}
+
+namespace com::sun::star::uno { class XComponentContext; }
+
+using namespace ::com::sun::star;
+
+#define COLUMN_COUNT 16
+#define ROW_COUNT 8
+
+namespace svx
+{
+ struct SvxShowCharSetItem;
+ class SvxShowCharSetAcc;
+}
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxShowCharSet : public weld::CustomWidgetController
+{
+protected:
+ VclPtr<VirtualDevice> mxVirDev;
+ vcl::Font maFont;
+ std::unique_ptr<weld::ScrolledWindow> mxScrollArea;
+public:
+ SvxShowCharSet(std::unique_ptr<weld::ScrolledWindow> pScrollArea, const VclPtr<VirtualDevice>& rVirDev);
+ virtual ~SvxShowCharSet() override;
+
+ virtual void RecalculateFont(vcl::RenderContext& rRenderContext);
+
+ void SelectCharacter( sal_UCS4 cNew );
+ virtual sal_UCS4 GetSelectCharacter() const;
+ void createContextMenu();
+
+ void SetDoubleClickHdl( const Link<SvxShowCharSet*,void>& rLink ) { aDoubleClkHdl = rLink; }
+ void SetSelectHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aSelectHdl = rHdl; }
+ void SetHighlightHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aHighHdl = rHdl; }
+ void SetPreSelectHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aPreSelectHdl = rHdl; }
+ void SetFavClickHdl( const Link<SvxShowCharSet*,void>& rHdl ) { aFavClickHdl = rHdl; }
+ static sal_uInt32& getSelectedChar();
+ void SetFont( const vcl::Font& rFont );
+ vcl::Font const & GetFont() const { return maFont; }
+ FontCharMapRef const & GetFontCharMap();
+ bool isFavChar(const OUString& sTitle, const OUString& rFont);
+ void getFavCharacterList(); //gets both Fav char and Fav char font list
+ void updateFavCharacterList(const OUString& rChar, const OUString& rFont);
+
+ virtual svx::SvxShowCharSetItem* ImplGetItem( int _nPos );
+ int FirstInView() const;
+ virtual int LastInView() const;
+ int PixelToMapIndex( const Point&) const;
+ virtual void SelectIndex( int index, bool bFocus = false );
+ void OutputIndex( int index );
+ void DeSelect();
+ static void CopyToClipboard(const OUString& str);
+ bool IsSelected(sal_uInt16 _nPos) const { return _nPos == nSelectedIndex; }
+ sal_uInt16 GetSelectIndexId() const { return sal::static_int_cast<sal_uInt16>(nSelectedIndex); }
+ static sal_uInt16 GetRowPos(sal_uInt16 _nPos);
+ static sal_uInt16 GetColumnPos(sal_uInt16 _nPos);
+
+ virtual sal_Int32 getMaxCharCount() const;
+
+ virtual void Show() override { mxScrollArea->show(); }
+ virtual void Hide() override { mxScrollArea->hide(); }
+
+ uno::Reference<css::accessibility::XAccessible> getAccessibleParent() const { return GetDrawingArea()->get_accessible_parent(); }
+
+private:
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual void Resize() override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+ virtual bool MouseMove(const MouseEvent& rMEvt) override;
+ virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+ virtual bool KeyInput(const KeyEvent&) override;
+
+ virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
+ virtual FactoryFunction GetUITestFactory() const override;
+
+protected:
+ typedef std::map<sal_Int32, std::shared_ptr<svx::SvxShowCharSetItem> > ItemsMap;
+ ItemsMap m_aItems;
+ Link<SvxShowCharSet*,void> aDoubleClkHdl;
+ Link<SvxShowCharSet*,void> aSelectHdl;
+ Link<SvxShowCharSet*,void> aFavClickHdl;
+ Link<SvxShowCharSet*,void> aHighHdl;
+ Link<SvxShowCharSet*,void> aPreSelectHdl;
+
+ std::deque<OUString> maFavCharList;
+ std::deque<OUString> maFavCharFontList;
+
+ rtl::Reference<svx::SvxShowCharSetAcc> m_xAccessible;
+ tools::Long nX;
+ tools::Long nY;
+ tools::Long m_nXGap;
+ tools::Long m_nYGap;
+ bool bDrag;
+
+ sal_Int32 nSelectedIndex;
+
+ FontCharMapRef mxFontCharMap;
+ Size maFontSize;
+ Point maPosition;
+
+ bool mbRecalculateFont : 1;
+ bool mbUpdateForeground : 1;
+ bool mbUpdateBackground : 1;
+
+
+protected:
+ virtual void DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int n2);
+ void InitSettings(vcl::RenderContext& rRenderContext);
+ // abstraction layers are: Unicode<->MapIndex<->Pixel
+ Point MapIndexToPixel( int) const;
+ DECL_DLLPRIVATE_LINK(VscrollHdl, weld::ScrolledWindow&, void);
+ void ContextMenuSelect(std::string_view rIdent);
+
+ void init();
+ tools::Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/charthelper.hxx b/include/svx/charthelper.hxx
new file mode 100644
index 000000000..3ad1fba53
--- /dev/null
+++ b/include/svx/charthelper.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CHARTHELPER_HXX
+#define INCLUDED_SVX_CHARTHELPER_HXX
+
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star {
+ namespace embed { class XEmbeddedObject; }
+ namespace frame { class XModel; }
+ namespace uno { template <typename > class Reference; }
+}
+
+namespace basegfx { class B2DRange; }
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC ChartHelper
+{
+public:
+ /// Use chart's XUpdatable::update() to update values.
+ static void updateChart( const css::uno::Reference< css::frame::XModel >& rXModel );
+
+ // try to access rXModel in case of a chart to get the chart content
+ // as sequence of primitives. Return range of primitives (chart size) in rRange;
+ // it will be used to embed the chart to the SdrObject transformation. This
+ // allows to define possible distances between chart and SDrObject bounds here
+ static drawinglayer::primitive2d::Primitive2DContainer tryToGetChartContentAsPrimitive2DSequence(
+ const css::uno::Reference< css::frame::XModel >& rXModel,
+ basegfx::B2DRange& rRange);
+
+ // #i121334# Allow to switch off line and fill style by setting these as attributes
+ // at the OLE chart object. This is needed to allow fill styles of the covering objects
+ // to make their own fill/line settings work. This should not be done by changing
+ // the defaults at the chart (see StaticPageBackgroundDefaults_Initializer::lcl_AddDefaultsToMap)
+ // since this would not be saved/loaded, thus the compatibility will be better when setting it at
+ // newly created charts using this method
+ static void AdaptDefaultsForChart(
+ const css::uno::Reference < css::embed::XEmbeddedObject > & xEmbObj);
+};
+
+#endif // INCLUDED_SVX_CHARTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/chrtitem.hxx b/include/svx/chrtitem.hxx
new file mode 100644
index 000000000..a8910845d
--- /dev/null
+++ b/include/svx/chrtitem.hxx
@@ -0,0 +1,152 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_CHRTITEM_HXX
+#define INCLUDED_SVX_CHRTITEM_HXX
+
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svl/eitem.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+
+class IntlWrapper;
+class SfxItemPool;
+
+enum class SvxChartTextOrder
+{
+ SideBySide,
+ UpDown,
+ DownUp,
+ Auto
+};
+
+#define CHTXTORDER_COUNT (sal_uInt16(SvxChartTextOrder::Auto) + 1)
+
+enum class SvxChartKindError
+{
+ NONE,
+ Variant,
+ Sigma,
+ Percent,
+ BigError,
+ Const,
+ StdError,
+ Range
+};
+
+#define CHERROR_COUNT (sal_uInt16(SvxChartKindError::Range) + 1)
+
+enum class SvxChartIndicate
+{
+ NONE,
+ Both,
+ Up,
+ Down
+};
+
+#define CHINDICATE_COUNT (sal_uInt16(SvxChartIndicate::Down) + 1)
+
+enum class SvxChartRegress
+{
+ NONE,
+ Linear,
+ Log,
+ Exp,
+ Power,
+ Polynomial,
+ MovingAverage,
+ MeanValue,
+ Unknown
+};
+
+#define CHREGRESS_COUNT (sal_uInt16(SvxChartRegress::Unknown) + 1)
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxChartRegressItem final : public SfxEnumItem<SvxChartRegress>
+{
+public:
+ SvxChartRegressItem(SvxChartRegress eRegress /*= SvxChartRegress::Linear*/,
+ TypedWhichId<SvxChartRegressItem> nId );
+
+ virtual SvxChartRegressItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ sal_uInt16 GetValueCount() const override { return CHREGRESS_COUNT; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxChartTextOrderItem final : public SfxEnumItem<SvxChartTextOrder>
+{
+public:
+ SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= SvxChartTextOrder::SideBySide*/,
+ TypedWhichId<SvxChartTextOrderItem> nId );
+
+ virtual SvxChartTextOrderItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ sal_uInt16 GetValueCount() const override { return CHTXTORDER_COUNT; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxChartKindErrorItem final : public SfxEnumItem<SvxChartKindError>
+{
+public:
+ SvxChartKindErrorItem(SvxChartKindError /*eOrient = SvxChartKindError::NONE*/,
+ TypedWhichId<SvxChartKindErrorItem> nId );
+
+ virtual SvxChartKindErrorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ sal_uInt16 GetValueCount() const override { return CHERROR_COUNT; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxChartIndicateItem final : public SfxEnumItem<SvxChartIndicate>
+{
+public:
+ SvxChartIndicateItem(SvxChartIndicate eOrient /*= SvxChartIndicate::NONE*/,
+ TypedWhichId<SvxChartIndicateItem> nId );
+
+ virtual SvxChartIndicateItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ sal_uInt16 GetValueCount() const override { return CHINDICATE_COUNT; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxDoubleItem final : public SfxPoolItem
+{
+ double fVal;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxDoubleItem(double fValue /*= 0.0*/, TypedWhichId<SvxDoubleItem> nId );
+ SvxDoubleItem(const SvxDoubleItem& rItem);
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper&) const override;
+
+ virtual bool operator == (const SfxPoolItem&) const override;
+ virtual SvxDoubleItem* Clone(SfxItemPool *pPool = nullptr) const override;
+
+ double GetValue() const { return fVal; }
+};
+
+#endif // INCLUDED_SVX_CHRTITEM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/clipboardctl.hxx b/include/svx/clipboardctl.hxx
new file mode 100644
index 000000000..44c79040d
--- /dev/null
+++ b/include/svx/clipboardctl.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CLIPBOARDCTL_HXX
+#define INCLUDED_SVX_CLIPBOARDCTL_HXX
+
+#include <sal/types.h>
+#include <sfx2/tbxctrl.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class SfxModule;
+class ToolBox;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxClipBoardControl final : public SfxToolBoxControl
+{
+ std::unique_ptr<SfxPoolItem> pClipboardFmtItem;
+ bool bDisabled;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxClipBoardControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+ virtual ~SvxClipBoardControl() override;
+
+ void CreatePopupWindow() override;
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/clipfmtitem.hxx b/include/svx/clipfmtitem.hxx
new file mode 100644
index 000000000..eb87aecbb
--- /dev/null
+++ b/include/svx/clipfmtitem.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_CLIPFMTITEM_HXX
+#define INCLUDED_SVX_CLIPFMTITEM_HXX
+
+#include <climits>
+#include <memory>
+
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <sot/formats.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SfxItemPool;
+struct SvxClipboardFormatItem_Impl;
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxClipboardFormatItem final : public SfxPoolItem
+{
+ virtual bool operator==(const SfxPoolItem&) const override;
+ virtual SvxClipboardFormatItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxClipboardFormatItem(TypedWhichId<SvxClipboardFormatItem> nId);
+ SvxClipboardFormatItem(const SvxClipboardFormatItem&);
+ virtual ~SvxClipboardFormatItem() override;
+
+ virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
+ virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
+
+ void AddClipbrdFormat(SotClipboardFormatId nId);
+ void AddClipbrdFormat(SotClipboardFormatId nId, const OUString& rName,
+ sal_uInt16 nPos = USHRT_MAX);
+ sal_uInt16 Count() const;
+
+ SotClipboardFormatId GetClipbrdFormatId(sal_uInt16 nPos) const;
+ OUString const& GetClipbrdFormatName(sal_uInt16 nPos) const;
+
+private:
+ std::unique_ptr<SvxClipboardFormatItem_Impl> pImpl;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
new file mode 100644
index 000000000..3775fc187
--- /dev/null
+++ b/include/svx/colorbox.hxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_COLORBOX_HXX
+#define INCLUDED_SVX_COLORBOX_HXX
+
+#include <memory>
+#include <vcl/weld.hxx>
+#include <svx/colorwindow.hxx>
+
+class ColorListBox;
+
+class ListBoxColorWrapper
+{
+public:
+ ListBoxColorWrapper(ColorListBox* pControl);
+ void operator()(const OUString& rCommand,
+ const svx::NamedThemedColor& rColor); // ColorSelectFunction signature
+private:
+ ColorListBox* mpControl;
+};
+
+class SVXCORE_DLLPUBLIC ColorListBox
+{
+private:
+ friend class ListBoxColorWrapper;
+ std::unique_ptr<ColorWindow> m_xColorWindow;
+ std::unique_ptr<weld::MenuButton> m_xButton;
+ Link<ColorListBox&, void> m_aSelectedLink;
+ ListBoxColorWrapper m_aColorWrapper;
+ Color m_aAutoDisplayColor;
+ Color m_aSaveColor;
+ svx::NamedThemedColor m_aSelectedColor;
+ sal_uInt16 m_nSlotId;
+ bool m_bShowNoneButton;
+ std::shared_ptr<PaletteManager> m_xPaletteManager;
+ TopLevelParentFunction m_aTopLevelParentFunction;
+ ColorStatus m_aColorStatus;
+
+ void Selected(const svx::NamedThemedColor& rNamedColor);
+ void createColorWindow();
+ void LockWidthRequest();
+ ColorWindow* getColorWindow() const;
+
+ DECL_DLLPRIVATE_LINK(ToggleHdl, weld::Toggleable&, void);
+
+public:
+ // rTopLevelParentFunction will be used to get parent for any color picker dialog created
+ ColorListBox(std::unique_ptr<weld::MenuButton> pControl,
+ TopLevelParentFunction const& rTopLevelParentFunction);
+ ~ColorListBox();
+
+ void SetSelectHdl(const Link<ColorListBox&, void>& rLink) { m_aSelectedLink = rLink; }
+
+ void SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton = false);
+
+ Color const& GetSelectEntryColor() const { return m_aSelectedColor.m_aColor; }
+ NamedColor GetSelectedEntry() const { return m_aSelectedColor.ToNamedColor(); }
+ const svx::NamedThemedColor& GetSelectedEntryThemedColor() const { return m_aSelectedColor; }
+
+ void SelectEntry(const NamedColor& rColor);
+ void SelectEntry(const Color& rColor);
+
+ void SetNoSelection() { getColorWindow()->SetNoSelection(); }
+ bool IsNoSelection() const { return getColorWindow()->IsNoSelection(); }
+
+ void SetAutoDisplayColor(const Color& rColor) { m_aAutoDisplayColor = rColor; }
+
+ void ShowPreview(const NamedColor& rColor);
+ void EnsurePaletteManager();
+
+ void SaveValue() { m_aSaveColor = GetSelectEntryColor(); }
+ bool IsValueChangedFromSaved() const { return m_aSaveColor != GetSelectEntryColor(); }
+
+ void set_sensitive(bool sensitive) { m_xButton->set_sensitive(sensitive); }
+ bool get_sensitive() const { return m_xButton->get_sensitive(); }
+ void show() { m_xButton->show(); }
+ void hide() { m_xButton->hide(); }
+ void set_visible(bool bShow) { m_xButton->set_visible(bShow); }
+ void set_help_id(const OString& rHelpId) { m_xButton->set_help_id(rHelpId); }
+ void connect_focus_in(const Link<weld::Widget&, void>& rLink)
+ {
+ m_xButton->connect_focus_in(rLink);
+ }
+ void connect_focus_out(const Link<weld::Widget&, void>& rLink)
+ {
+ m_xButton->connect_focus_out(rLink);
+ }
+ weld::MenuButton& get_widget() { return *m_xButton; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
new file mode 100644
index 000000000..823c819f0
--- /dev/null
+++ b/include/svx/colorwindow.hxx
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svtools/toolbarmenu.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/SvxColorValueSet.hxx>
+#include <svx/Palette.hxx>
+#include <vcl/toolboxid.hxx>
+
+typedef std::function<weld::Window*()> TopLevelParentFunction;
+
+namespace com::sun::star::frame { class XFrame; }
+
+class PaletteManager;
+class ToolBox;
+
+class SVXCORE_DLLPUBLIC ColorStatus
+{
+ Color maColor;
+ Color maTLBRColor;
+ Color maBLTRColor;
+public:
+ ColorStatus();
+ void statusChanged( const css::frame::FeatureStateEvent& rEvent );
+ Color GetColor();
+};
+
+class Button;
+
+#define COL_NONE_COLOR ::Color(ColorTransparency, 0x80, 0xFF, 0xFF, 0xFF)
+
+class SvxColorToolBoxControl;
+
+class SVXCORE_DLLPUBLIC MenuOrToolMenuButton
+{
+private:
+ // either
+ weld::MenuButton* m_pMenuButton;
+ // or
+ weld::Toolbar* m_pToolbar;
+ OString m_aIdent;
+ // or
+ SvxColorToolBoxControl* m_pControl;
+ VclPtr<ToolBox> m_xToolBox;
+ ToolBoxItemId m_nId;
+public:
+ MenuOrToolMenuButton(weld::MenuButton* pMenuButton);
+ MenuOrToolMenuButton(weld::Toolbar* pToolbar, const OString& rIdent);
+ MenuOrToolMenuButton(SvxColorToolBoxControl* pControl, ToolBox* pToolbar, ToolBoxItemId nId);
+ ~MenuOrToolMenuButton();
+
+ MenuOrToolMenuButton(MenuOrToolMenuButton const &) = default;
+ MenuOrToolMenuButton(MenuOrToolMenuButton &&) = default;
+ MenuOrToolMenuButton & operator =(MenuOrToolMenuButton const &) = default;
+ MenuOrToolMenuButton & operator =(MenuOrToolMenuButton &&) = default;
+
+ bool get_active() const;
+ void set_inactive() const;
+ weld::Widget* get_widget() const;
+};
+
+class SVXCORE_DLLPUBLIC ColorWindow final : public WeldToolbarPopup
+{
+private:
+ const sal_uInt16 theSlotId;
+ OUString maCommand;
+ MenuOrToolMenuButton maMenuButton;
+ std::shared_ptr<PaletteManager> mxPaletteManager;
+ ColorStatus& mrColorStatus;
+ TopLevelParentFunction maTopLevelParentFunction;
+ ColorSelectFunction maColorSelectFunction;
+
+ std::unique_ptr<SvxColorValueSet> mxColorSet;
+ std::unique_ptr<SvxColorValueSet> mxRecentColorSet;
+ std::unique_ptr<weld::ComboBox> mxPaletteListBox;
+ std::unique_ptr<weld::Button> mxButtonAutoColor;
+ std::unique_ptr<weld::Button> mxButtonNoneColor;
+ std::unique_ptr<weld::Button> mxButtonPicker;
+ std::unique_ptr<weld::Widget> mxAutomaticSeparator;
+ std::unique_ptr<weld::CustomWeld> mxColorSetWin;
+ std::unique_ptr<weld::CustomWeld> mxRecentColorSetWin;
+ weld::Button* mpDefaultButton;
+
+ Link<const NamedColor&, void> maSelectedLink;
+ DECL_DLLPRIVATE_LINK(SelectHdl, ValueSet*, void);
+ DECL_DLLPRIVATE_LINK(SelectPaletteHdl, weld::ComboBox&, void);
+ DECL_DLLPRIVATE_LINK(AutoColorClickHdl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(OpenPickerClickHdl, weld::Button&, void);
+
+ static bool SelectValueSetEntry(SvxColorValueSet* pColorSet, const Color& rColor);
+ static NamedColor GetSelectEntryColor(ValueSet const * pColorSet);
+ NamedColor GetAutoColor() const;
+
+public:
+ ColorWindow(const OUString& rCommand,
+ std::shared_ptr<PaletteManager> const & rPaletteManager,
+ ColorStatus& rColorStatus,
+ sal_uInt16 nSlotId,
+ const css::uno::Reference<css::frame::XFrame>& rFrame,
+ const MenuOrToolMenuButton &rMenuButton,
+ TopLevelParentFunction const& rTopLevelParentFunction,
+ ColorSelectFunction const& rColorSelectFunction);
+ virtual ~ColorWindow() override;
+ void ShowNoneButton();
+ void SetNoSelection();
+ bool IsNoSelection() const;
+ void SelectEntry(const NamedColor& rColor);
+ void SelectEntry(const Color& rColor);
+ NamedColor GetSelectEntryColor() const;
+
+ virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
+
+ void SetSelectedHdl( const Link<const NamedColor&, void>& rLink ) { maSelectedLink = rLink; }
+
+ virtual void GrabFocus() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
new file mode 100644
index 000000000..87556ecbc
--- /dev/null
+++ b/include/svx/compressgraphicdialog.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_COMPRESSGRAPHICDIALOG_HXX
+#define INCLUDED_SVX_COMPRESSGRAPHICDIALOG_HXX
+
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <tools/gen.hxx>
+#include <tools/link.hxx>
+#include <vcl/weld.hxx>
+#include <vcl/graph.hxx>
+
+class SdrGrafObj;
+class SfxBindings;
+class SvStream;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC CompressGraphicsDialog final : public weld::GenericDialogController
+{
+private:
+ std::unique_ptr<weld::Label> m_xLabelGraphicType;
+ std::unique_ptr<weld::Label> m_xFixedText2;
+ std::unique_ptr<weld::Label> m_xFixedText3;
+ std::unique_ptr<weld::Label> m_xFixedText5;
+ std::unique_ptr<weld::Label> m_xFixedText6;
+
+ std::unique_ptr<weld::CheckButton> m_xReduceResolutionCB;
+ std::unique_ptr<weld::SpinButton> m_xMFNewWidth;
+ std::unique_ptr<weld::SpinButton> m_xMFNewHeight;
+ std::unique_ptr<weld::ComboBox> m_xResolutionLB;
+ std::unique_ptr<weld::RadioButton> m_xLosslessRB;
+ std::unique_ptr<weld::RadioButton> m_xJpegCompRB;
+ std::unique_ptr<weld::SpinButton> m_xCompressionMF;
+ std::unique_ptr<weld::Scale> m_xCompressionSlider;
+ std::unique_ptr<weld::SpinButton> m_xQualityMF;
+ std::unique_ptr<weld::Scale> m_xQualitySlider;
+ std::unique_ptr<weld::Button> m_xBtnCalculate;
+ std::unique_ptr<weld::ComboBox> m_xInterpolationCombo;
+ std::unique_ptr<weld::Button> m_xBtnOkay;
+
+ SdrGrafObj* m_xGraphicObj;
+ Graphic m_aGraphic;
+ Size m_aViewSize100mm;
+ tools::Rectangle m_aCropRectangle;
+ SfxBindings& m_rBindings;
+
+ double m_dResolution;
+ sal_Int32 m_aNativeSize;
+
+ void Initialize();
+ void recallParameter();
+
+ DECL_DLLPRIVATE_LINK( SlideHdl, weld::Scale&, void );
+ DECL_DLLPRIVATE_LINK( NewInterpolationModifiedHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( NewQualityModifiedHdl, weld::Entry&, void );
+ DECL_DLLPRIVATE_LINK( NewCompressionModifiedHdl, weld::Entry&, void );
+ DECL_DLLPRIVATE_LINK( NewWidthModifiedHdl, weld::Entry&, void );
+ DECL_DLLPRIVATE_LINK( NewHeightModifiedHdl, weld::Entry&, void );
+ DECL_DLLPRIVATE_LINK( ResolutionModifiedHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( ToggleCompressionRB, weld::Toggleable&, void );
+ DECL_DLLPRIVATE_LINK( ToggleReduceResolutionRB, weld::Toggleable&, void );
+
+ DECL_DLLPRIVATE_LINK( CalculateClickHdl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK( OkayClickHdl, weld::Button&, void );
+
+ void Update();
+ void UpdateNewWidthMF();
+ void UpdateNewHeightMF();
+ void UpdateResolutionLB();
+
+ void Compress(SvStream& aStream);
+
+ double GetViewWidthInch() const;
+ double GetViewHeightInch() const;
+
+ BmpScaleFlag GetSelectedInterpolationType() const;
+
+public:
+ CompressGraphicsDialog( weld::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings );
+ CompressGraphicsDialog( weld::Window* pParent, Graphic const & rGraphic, Size rViewSize100mm, tools::Rectangle const & rCropRectangle, SfxBindings& rBindings );
+ virtual ~CompressGraphicsDialog() override;
+
+ SdrGrafObj* GetCompressedSdrGrafObj();
+ Graphic GetCompressedGraphic();
+
+ tools::Rectangle GetScaledCropRectangle() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/connctrl.hxx b/include/svx/connctrl.hxx
new file mode 100644
index 000000000..44768922f
--- /dev/null
+++ b/include/svx/connctrl.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_CONNCTRL_HXX
+#define INCLUDED_SVX_CONNCTRL_HXX
+
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <vcl/customweld.hxx>
+#include <vcl/outdev.hxx>
+
+class SfxItemSet;
+class SdrEdgeObj;
+class SdrView;
+class SdrPage;
+
+/*************************************************************************
+|*
+|* SvxXConnectionPreview
+|*
+\************************************************************************/
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXConnectionPreview final : public weld::CustomWidgetController
+{
+ friend class SvxConnectionPage;
+
+private:
+ MapMode aNewMapMode;
+ SdrEdgeObj* pEdgeObj;
+ rtl::Reference<SdrPage> mxSdrPage;
+ const SdrView* pView;
+
+ SVX_DLLPRIVATE void AdaptSize();
+ SVX_DLLPRIVATE void SetMapMode(const MapMode& rNewMapMode) { aNewMapMode = rNewMapMode; }
+ SVX_DLLPRIVATE const MapMode& GetMapMode() const { return aNewMapMode; }
+public:
+ SvxXConnectionPreview();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~SvxXConnectionPreview() override;
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual void Resize() override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+
+ void SetAttributes( const SfxItemSet& rInAttrs );
+ sal_uInt16 GetLineDeltaCount() const;
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
+};
+
+#endif // INCLUDED_SVX_CONNCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx
new file mode 100644
index 000000000..cb3034fd6
--- /dev/null
+++ b/include/svx/contdlg.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CONTDLG_HXX
+#define INCLUDED_SVX_CONTDLG_HXX
+
+#include <sal/types.h>
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/childwin.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/poly.hxx>
+
+class SfxBindings;
+class SfxModule;
+
+/*************************************************************************
+|*
+|* Derivation from SfxChildWindow as "container" for Float
+|*
+\************************************************************************/
+
+class Graphic;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxContourDlgChildWindow final : public SfxChildWindow
+{
+public:
+ SvxContourDlgChildWindow( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo const * );
+
+ SFX_DECL_CHILDWINDOW_WITHID( SvxContourDlgChildWindow );
+};
+
+class SvxSuperContourDlg;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxContourDlg final : public SfxModelessDialogController
+{
+ std::unique_ptr<SvxSuperContourDlg> m_xImpl;
+
+public:
+
+ SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW, weld::Window* pParent);
+ virtual ~SvxContourDlg() override;
+
+ const Graphic& GetGraphic() const;
+ bool IsGraphicChanged() const;
+
+ tools::PolyPolygon GetPolyPolygon();
+
+ const void* GetEditingObject() const;
+
+ void Update( const Graphic& rGraphic, bool bGraphicLinked,
+ const tools::PolyPolygon* pPolyPoly, void* pEditingObj );
+
+ static tools::PolyPolygon CreateAutoContour( const Graphic& rGraphic,
+ const tools::Rectangle* pRect = nullptr );
+};
+
+#endif // INCLUDED_SVX_CONTDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
new file mode 100644
index 000000000..84cf456cb
--- /dev/null
+++ b/include/svx/ctredlin.hxx
@@ -0,0 +1,339 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CTREDLIN_HXX
+#define INCLUDED_SVX_CTREDLIN_HXX
+
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <tools/date.hxx>
+#include <tools/datetime.hxx>
+#include <tools/link.hxx>
+#include <tools/time.hxx>
+#include <vcl/weld.hxx>
+#include <memory>
+
+namespace utl {
+ class SearchParam;
+ class TextSearch;
+}
+
+namespace comphelper::string { class NaturalStringSorter; }
+
+class Point;
+class SvViewDataEntry;
+class SvtCalendarBox;
+
+enum class SvxRedlinDateMode
+{
+ BEFORE, SINCE, EQUAL, NOTEQUAL, BETWEEN, SAVE, NONE
+};
+
+enum class RedlineType : sal_uInt16
+{
+ // Range of RedlineTypes is 0 to 127.
+ Insert = 0x0,// Content has been inserted.
+ Delete = 0x1,// Content has been deleted.
+ Format = 0x2,// Attributes have been applied.
+ Table = 0x3,// Table structure has been altered.
+ FmtColl = 0x4,// Style has been altered (Autoformat!).
+ ParagraphFormat = 0x5,// Paragraph attributes have been changed.
+ TableRowInsert = 0x6,// Table row has been inserted.
+ TableRowDelete = 0x7,// Table row has been deleted.
+ TableCellInsert = 0x8,// Table cell has been inserted.
+ TableCellDelete = 0x9,// Table cell has been deleted.
+ None = USHRT_MAX - 1, // special value to indicate missing redlining in some return value
+ Any = USHRT_MAX // special value to indicate any redline type in some method calls
+};
+
+/// Struct for sorting data.
+class SAL_WARN_UNUSED SVX_DLLPUBLIC RedlinData
+{
+public:
+ RedlinData();
+ virtual ~RedlinData();
+ DateTime aDateTime;
+ void* pData;
+ RedlineType eType;
+ bool bDisabled;
+};
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxRedlinTable
+{
+private:
+ std::unique_ptr<comphelper::string::NaturalStringSorter> xSorter;
+ std::unique_ptr<weld::TreeView> xWriterTreeView;
+ std::unique_ptr<weld::TreeView> xCalcTreeView;
+ weld::TreeView* pTreeView;
+
+ sal_uInt16 nDatePos;
+ bool bAuthor;
+ bool bDate;
+ bool bComment;
+ bool bSorted;
+ SvxRedlinDateMode nDaTiMode;
+ DateTime aDaTiFirst;
+ DateTime aDaTiLast;
+ DateTime aDaTiFilterFirst;
+ DateTime aDaTiFilterLast;
+ OUString aAuthor;
+ std::unique_ptr<utl::TextSearch> pCommentSearcher;
+
+ int ColCompare(const weld::TreeIter& rLeft, const weld::TreeIter& rRight);
+
+public:
+ SvxRedlinTable(std::unique_ptr<weld::TreeView> xWriterControl,
+ std::unique_ptr<weld::TreeView> xCalcControl);
+
+ weld::TreeView& GetWidget() { return *pTreeView; }
+ bool IsSorted() const { return bSorted; }
+
+ ~SvxRedlinTable();
+
+ // For FilterPage only {
+ void SetFilterDate(bool bFlag);
+ void SetDateTimeMode(SvxRedlinDateMode nMode);
+ void SetFirstDate(const Date&);
+ void SetLastDate(const Date&);
+ void SetFirstTime(const tools::Time&);
+ void SetLastTime(const tools::Time&);
+ void SetFilterAuthor(bool bFlag);
+ void SetAuthor(const OUString &);
+ void SetFilterComment(bool bFlag);
+ void SetCommentParams( const utl::SearchParam* pSearchPara );
+
+ void UpdateFilterTest();
+ // } For FilterPage only
+
+ void SetCalcView();
+ void SetWriterView();
+
+ bool IsValidEntry(std::u16string_view rAuthor, const DateTime &rDateTime, const OUString &rComment);
+ bool IsValidEntry(std::u16string_view rAuthor, const DateTime &rDateTime);
+ bool IsValidComment(const OUString &rComment);
+
+ DECL_LINK(HeaderBarClick, int, void);
+};
+
+class SVX_DLLPUBLIC SvxTPage
+{
+protected:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+public:
+ SvxTPage(weld::Container* pParent, const OUString& rUIXMLDescription, const OString& rID);
+ virtual ~SvxTPage();
+ virtual void ActivatePage();
+ void Show() { m_xContainer->show(); }
+};
+
+namespace weld
+{
+ class TimeFormatter;
+}
+
+/// Tabpage with the filter text entries etc.
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxTPFilter final : public SvxTPage
+{
+ Link<SvxTPFilter*,void> aReadyLink;
+ Link<SvxTPFilter*,void> aRefLink;
+
+ bool bModified;
+
+ SvxRedlinTable* m_pRedlinTable;
+ std::unique_ptr<weld::CheckButton> m_xCbDate;
+ std::unique_ptr<weld::ComboBox> m_xLbDate;
+ std::unique_ptr<SvtCalendarBox> m_xDfDate;
+ std::unique_ptr<weld::FormattedSpinButton> m_xTfDate;
+ std::unique_ptr<weld::TimeFormatter> m_xTfDateFormatter;
+ std::unique_ptr<weld::Button> m_xIbClock;
+ std::unique_ptr<weld::Label> m_xFtDate2;
+ std::unique_ptr<SvtCalendarBox> m_xDfDate2;
+ std::unique_ptr<weld::FormattedSpinButton> m_xTfDate2;
+ std::unique_ptr<weld::TimeFormatter> m_xTfDate2Formatter;
+ std::unique_ptr<weld::Button> m_xIbClock2;
+ std::unique_ptr<weld::CheckButton> m_xCbAuthor;
+ std::unique_ptr<weld::ComboBox> m_xLbAuthor;
+ std::unique_ptr<weld::CheckButton> m_xCbRange;
+ std::unique_ptr<weld::Entry> m_xEdRange;
+ std::unique_ptr<weld::Button> m_xBtnRange;
+ std::unique_ptr<weld::CheckButton> m_xCbAction;
+ std::unique_ptr<weld::ComboBox> m_xLbAction;
+ std::unique_ptr<weld::CheckButton> m_xCbComment;
+ std::unique_ptr<weld::Entry> m_xEdComment;
+
+ DECL_DLLPRIVATE_LINK( SelDateHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( RowEnableHdl, weld::Toggleable&, void );
+ DECL_DLLPRIVATE_LINK( TimeHdl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK( ModifyHdl, weld::Entry&, void );
+ DECL_DLLPRIVATE_LINK( ModifyListBoxHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( ModifyDate, SvtCalendarBox&, void );
+ DECL_DLLPRIVATE_LINK( ModifyTime, weld::FormattedSpinButton&, void );
+ DECL_DLLPRIVATE_LINK( RefHandle, weld::Button&, void );
+
+ void EnableDateLine1(bool bFlag);
+ void EnableDateLine2(bool bFlag);
+
+public:
+ SvxTPFilter(weld::Container* pParent);
+ virtual ~SvxTPFilter() override;
+
+ void DeactivatePage();
+ void SetRedlinTable(SvxRedlinTable*);
+
+ Date GetFirstDate() const;
+ void SetFirstDate(const Date &aDate);
+ tools::Time GetFirstTime() const;
+ void SetFirstTime(const tools::Time &aTime);
+
+ Date GetLastDate() const;
+ void SetLastDate(const Date &aDate);
+ tools::Time GetLastTime() const;
+ void SetLastTime(const tools::Time &aTime);
+
+ void SetDateMode(sal_uInt16 nMode);
+ SvxRedlinDateMode GetDateMode() const;
+
+ void ClearAuthors();
+ void InsertAuthor( const OUString& rString );
+ OUString GetSelectedAuthor()const;
+ void SelectedAuthorPos(sal_Int32 nPos);
+ sal_Int32 SelectAuthor(const OUString& aString);
+ void SetComment(const OUString& rComment);
+ OUString GetComment()const;
+
+ // Methods for Calc {
+ void SetRange(const OUString& rString);
+ OUString GetRange() const;
+ void HideRange(bool bHide=true);
+ void SetFocusToRange();
+ // } Methods for Calc
+
+ bool IsDate() const;
+ bool IsAuthor() const;
+ bool IsRange() const;
+ bool IsAction() const;
+ bool IsComment() const;
+
+ void ShowAction(bool bShow=true);
+
+ void CheckDate(bool bFlag);
+ void CheckAuthor(bool bFlag);
+ void CheckRange(bool bFlag);
+ void CheckAction(bool bFlag);
+ void CheckComment(bool bFlag);
+
+ weld::ComboBox* GetLbAction() { return m_xLbAction.get(); }
+
+ void SetReadyHdl( const Link<SvxTPFilter*,void>& rLink ) { aReadyLink= rLink; }
+
+
+ // Methods for Calc {
+ void SetRefHdl( const Link<SvxTPFilter*,void>& rLink ) { aRefLink = rLink; }
+
+ void Enable( bool bEnable = true );
+ // } Methods for Calc
+};
+
+/// Tabpage with the redlining entries.
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxTPView final : public SvxTPage
+{
+private:
+
+ Link<SvxTPView*,void> AcceptClickLk;
+ Link<SvxTPView*,void> AcceptAllClickLk;
+ Link<SvxTPView*,void> RejectClickLk;
+ Link<SvxTPView*,void> RejectAllClickLk;
+ Link<SvxTPView*,void> UndoClickLk;
+
+ bool bEnableAccept;
+ bool bEnableAcceptAll;
+ bool bEnableReject;
+ bool bEnableRejectAll;
+ bool bEnableUndo;
+
+ bool bEnableClearFormat;
+ bool bEnableClearFormatAll;
+
+ std::unique_ptr<weld::Button> m_xAccept;
+ std::unique_ptr<weld::Button> m_xReject;
+ std::unique_ptr<weld::Button> m_xAcceptAll;
+ std::unique_ptr<weld::Button> m_xRejectAll;
+ std::unique_ptr<weld::Button> m_xUndo;
+ std::unique_ptr<SvxRedlinTable> m_xViewData;
+
+ DECL_DLLPRIVATE_LINK( PbClickHdl, weld::Button&, void );
+
+public:
+ SvxTPView(weld::Container* pParent);
+ virtual ~SvxTPView() override;
+
+ SvxRedlinTable* GetTableControl() { return m_xViewData.get(); }
+
+ void EnableAccept(bool bFlag);
+ void EnableAcceptAll(bool bFlag);
+ void EnableReject(bool bFlag);
+ void EnableRejectAll(bool bFlag);
+ void EnableClearFormat(bool bFlag);
+ void EnableClearFormatAll(bool bFlag);
+ void EnableUndo(bool bFlag=true);
+ void DisableUndo() {EnableUndo(false);}
+ void ShowUndo();
+
+ void SetAcceptClickHdl( const Link<SvxTPView*,void>& rLink ) { AcceptClickLk = rLink; }
+
+ void SetAcceptAllClickHdl( const Link<SvxTPView*,void>& rLink ) { AcceptAllClickLk = rLink; }
+
+ void SetRejectClickHdl( const Link<SvxTPView*,void>& rLink ) { RejectClickLk = rLink; }
+
+ void SetRejectAllClickHdl( const Link<SvxTPView*,void>& rLink ) { RejectAllClickLk = rLink; }
+
+ void SetUndoClickHdl( const Link<SvxTPView*,void>& rLink ) { UndoClickLk = rLink; }
+
+ virtual void ActivatePage() override;
+ void DeactivatePage();
+};
+
+// Redlining - Control (Accept- Changes)
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxAcceptChgCtr
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Notebook> m_xTabCtrl;
+
+ std::unique_ptr<SvxTPFilter> m_xTPFilter;
+ std::unique_ptr<SvxTPView> m_xTPView;
+
+ DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void);
+ DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OString&, bool);
+
+public:
+ SvxAcceptChgCtr(weld::Container* pParent);
+ ~SvxAcceptChgCtr();
+
+ void ShowFilterPage();
+
+ SvxTPFilter* GetFilterPage() { return m_xTPFilter.get(); }
+ SvxTPView* GetViewPage() { return m_xTPView.get(); }
+};
+
+#endif // INCLUDED_SVX_CTREDLIN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx
new file mode 100644
index 000000000..9842b26f0
--- /dev/null
+++ b/include/svx/cube3d.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_CUBE3D_HXX
+#define INCLUDED_SVX_CUBE3D_HXX
+
+#include <basegfx/point/b3dpoint.hxx>
+#include <basegfx/vector/b3dvector.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <svx/obj3d.hxx>
+#include <svx/svxdllapi.h>
+
+namespace sdr::contact { class ViewContact; }
+
+class E3dDefaultAttributes;
+
+/*************************************************************************
+|*
+|* |
+|* Create a 3D cuboid; aPos: Center or left, bottom, behind |__
+|* (depending on bPosIsCenter) /
+|* nSideFlags indicates, if only some of the cuboid surfaces can
+|* be created; the corresponding bits are defined in the enum.
+|* The flag bDblSided indicates whether the created surfaces are
+|* two-sided (which only makes sense if not all of the surfaces were
+|* created).
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC E3dCubeObj final : public E3dCompoundObject
+{
+ // Parameter
+ basegfx::B3DPoint aCubePos;
+ basegfx::B3DVector aCubeSize;
+
+ // BOOLeans
+ bool bPosIsCenter : 1;
+
+ void SetDefaultAttributes(const E3dDefaultAttributes& rDefault);
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+private:
+ // protected destructor - due to final, make private
+ virtual ~E3dCubeObj() override;
+
+public:
+ E3dCubeObj(SdrModel& rSdrModel,
+ const E3dDefaultAttributes& rDefault,
+ const basegfx::B3DPoint& aPos,
+ const basegfx::B3DVector& r3DSize);
+ E3dCubeObj(SdrModel& rSdrModel, E3dCubeObj const &);
+ E3dCubeObj(SdrModel& rSdrModel);
+
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual E3dCubeObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ // Set local parameters with geometry recreation
+ void SetCubePos(const basegfx::B3DPoint& rNew);
+ const basegfx::B3DPoint& GetCubePos() const { return aCubePos; }
+
+ void SetCubeSize(const basegfx::B3DVector& rNew);
+ const basegfx::B3DVector& GetCubeSize() const { return aCubeSize; }
+
+ void SetPosIsCenter(bool bNew);
+ bool GetPosIsCenter() const { return bPosIsCenter; }
+
+ // TakeObjName...() is for the display in the UI, for example "3 frames selected".
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+};
+
+#endif // INCLUDED_SVX_CUBE3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dataaccessdescriptor.hxx b/include/svx/dataaccessdescriptor.hxx
new file mode 100644
index 000000000..bc3423999
--- /dev/null
+++ b/include/svx/dataaccessdescriptor.hxx
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DATAACCESSDESCRIPTOR_HXX
+#define INCLUDED_SVX_DATAACCESSDESCRIPTOR_HXX
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::uno { class Any; }
+namespace com::sun::star::uno { template <class E> class Sequence; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+
+namespace svx
+{
+ class ODADescriptorImpl;
+
+ //= DataAccessDescriptorProperty
+ enum class DataAccessDescriptorProperty
+ {
+ DataSource, /// data source name (string)
+ DatabaseLocation, /// database file URL (string)
+ ConnectionResource, /// database driver URL (string)
+ Connection, /// connection (XConnection)
+
+ Command, /// command (string)
+ CommandType, /// command type (long)
+ EscapeProcessing, /// escape processing (boolean)
+ Filter, /// additional filter (string)
+ Cursor, /// the cursor (XResultSet)
+
+ ColumnName, /// column name (string)
+ ColumnObject, /// column object (XPropertySet)
+
+ Selection, /// selection (sequence< any >)
+ BookmarkSelection, /// selection are bookmarks? (boolean)
+
+ Component /// component name (XContent)
+ };
+
+ //= ODataAccessDescriptor
+
+ /** class encapsulating the css::sdb::DataAccessDescriptor service.
+ */
+ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC ODataAccessDescriptor final
+ {
+ std::unique_ptr<ODADescriptorImpl> m_pImpl;
+
+ public:
+ ODataAccessDescriptor();
+ ODataAccessDescriptor( const ODataAccessDescriptor& _rSource );
+ ODataAccessDescriptor(ODataAccessDescriptor&& _rSource) noexcept;
+ ODataAccessDescriptor( const css::uno::Reference< css::beans::XPropertySet >& _rValues );
+ ODataAccessDescriptor( const css::uno::Sequence< css::beans::PropertyValue >& _rValues );
+
+ // allows to construct a descriptor from an Any containing either an XPropertySet or a property value sequence
+ ODataAccessDescriptor( const css::uno::Any& _rValues );
+
+ ODataAccessDescriptor& operator=(const ODataAccessDescriptor& _rSource);
+ ODataAccessDescriptor& operator=(ODataAccessDescriptor&& _rSource) noexcept;
+
+ ~ODataAccessDescriptor();
+
+ /** returns the descriptor as property value sequence
+ <p>If you call this method more than once, without writing any values between both calls, the same object
+ is returned. If you wrote values, a new object is returned.</p>
+ */
+ css::uno::Sequence< css::beans::PropertyValue > const &
+ createPropertyValueSequence();
+
+ /** initialized the descriptor from the property values given
+ The descriptor will clear all its current settings before
+ initializing with the new ones.
+ */
+ void initializeFrom(
+ const css::uno::Sequence< css::beans::PropertyValue >& _rValues);
+
+ /// checks whether or not a given property is present in the descriptor
+ bool has(DataAccessDescriptorProperty _eWhich) const;
+
+ /** erases the given property from the descriptor
+ */
+ void erase(DataAccessDescriptorProperty _eWhich);
+
+ /** empties the descriptor
+ */
+ void clear();
+
+ /// return the value of a given property
+ const css::uno::Any& operator [] ( DataAccessDescriptorProperty _eWhich ) const;
+
+ /** return the (modifiable) value of a given property
+ <p>This operator is not allowed to be called if the descriptor is readonly.</p>
+ */
+ css::uno::Any& operator [] ( DataAccessDescriptorProperty _eWhich );
+
+ /** returns either the data source name if given or the database location
+ */
+ OUString getDataSource() const;
+
+ /** set the data source name, if it is not file URL
+ @param _sDataSourceNameOrLocation
+ the data source name or database location
+ */
+ void setDataSource(const OUString& _sDataSourceNameOrLocation);
+ };
+
+}
+
+#endif // INCLUDED_SVX_DATAACCESSDESCRIPTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/databaselocationinput.hxx b/include/svx/databaselocationinput.hxx
new file mode 100644
index 000000000..edc186b89
--- /dev/null
+++ b/include/svx/databaselocationinput.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DATABASELOCATIONINPUT_HXX
+#define INCLUDED_SVX_DATABASELOCATIONINPUT_HXX
+
+#include <svx/svxdllapi.h>
+#include <rtl/ustring.hxx>
+
+#include <memory>
+
+class SvtURLBox;
+namespace weld { class Button; class Window; }
+namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+
+namespace svx
+{
+ //= DatabaseLocationInputController
+ class DatabaseLocationInputController_Impl;
+ /** helper class to control controls needed to input a database location
+
+ If you allow, in your dialog, to save a database document, then you usually
+ have an URLBox for inputting the actual location, and a push button
+ to browse for a location.
+
+ This helper class controls such two UI elements.
+ */
+ class SAL_WARN_UNUSED SVX_DLLPUBLIC DatabaseLocationInputController
+ {
+ public:
+ DatabaseLocationInputController(
+ const css::uno::Reference<css::uno::XComponentContext>& _rContext,
+ SvtURLBox& _rLocationInput,
+ weld::Button& _rBrowseButton,
+ weld::Window& _rDialog
+ );
+ ~DatabaseLocationInputController();
+
+ /** sets the given URL at the input control, after translating it into a system path
+ */
+ void setURL( const OUString& _rURL );
+
+ /** returns the current database location, in form of a URL (not a system path)
+ */
+ OUString getURL() const;
+
+ /** prepares committing the database location entered in the input field
+
+ Effectively, this method checks whether the file in the location already
+ exists, and if so, it asks the user whether to overwrite it.
+
+ If the method is called multiple times, this check only happens when the location
+ changed since the last call.
+ */
+ bool prepareCommit();
+
+ private:
+ ::std::unique_ptr< DatabaseLocationInputController_Impl >
+ m_pImpl;
+ };
+}
+
+#endif // INCLUDED_SVX_DATABASELOCATIONINPUT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/databaseregistrationui.hxx b/include/svx/databaseregistrationui.hxx
new file mode 100644
index 000000000..7cb5f6c55
--- /dev/null
+++ b/include/svx/databaseregistrationui.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DATABASEREGISTRATIONUI_HXX
+#define INCLUDED_SVX_DATABASEREGISTRATIONUI_HXX
+
+#include <svx/svxdllapi.h>
+#include <svl/solar.hrc>
+
+namespace weld { class Window; }
+
+#define SID_SB_POOLING_ENABLED (RID_OFA_START + 247)
+#define SID_SB_DRIVER_TIMEOUTS (RID_OFA_START + 248)
+#define SID_SB_DB_REGISTER (RID_OFA_START + 249)
+
+namespace svx
+{
+ /** opens a dialog which allows the user to administrate the database registrations
+ */
+ sal_uInt16 SVX_DLLPUBLIC administrateDatabaseRegistration( weld::Window* _parentWindow );
+
+}
+
+#endif // INCLUDED_SVX_DATABASEREGISTRATIONUI_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx
new file mode 100644
index 000000000..c5a0193b8
--- /dev/null
+++ b/include/svx/dbaexchange.hxx
@@ -0,0 +1,277 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DBAEXCHANGE_HXX
+#define INCLUDED_SVX_DBAEXCHANGE_HXX
+
+#include <sal/config.h>
+
+#include <o3tl/typed_flags_set.hxx>
+#include <vcl/transfer.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <svx/dataaccessdescriptor.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star::sdbc { class XConnection; }
+namespace com::sun::star::beans { class XPropertySet; }
+
+// column transfer formats
+enum class ColumnTransferFormatFlags
+{
+ FIELD_DESCRIPTOR = 0x01, // the field descriptor format
+ CONTROL_EXCHANGE = 0x02, // the control exchange format
+ COLUMN_DESCRIPTOR = 0x04, // data access descriptor for a column
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ColumnTransferFormatFlags> : is_typed_flags<ColumnTransferFormatFlags, 0x07> {};
+}
+
+
+namespace svx
+{
+
+
+ //= OColumnTransferable
+
+ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC OColumnTransferable final : public TransferDataContainer
+ {
+ public:
+ OColumnTransferable(ColumnTransferFormatFlags nFormats);
+
+ /** construct the transferable from a data access descriptor
+
+ Note that some of the aspects, in particular all which cannot be represented
+ as string, can only be transported via the CTF_COLUMN_DESCRIPTOR format.
+
+ @param rDescriptor
+ The descriptor for the column. It must contain at least
+ <ul><li>information sufficient to create a connection, that is, either one of DataSource, DatabaseLocation,
+ ConnectionResource, and DataAccessDescriptorProperty::Connection</li>
+ <li>a Command</li>
+ <li>a CommandType</li>
+ <li>a ColumnName or ColumnObject</li>
+ </ul>
+ */
+ void setDescriptor(const ODataAccessDescriptor& rDescriptor);
+
+
+ /** construct the transferable from a DatabaseForm component and a field name
+
+ @param _rxForm
+ the form which is bound to the data source which's field is to be dragged
+
+ @param _rFieldName
+ the name of the field to be dragged
+
+ @param _rxColumn
+ the column object. Won't be used if <arg>_nFormats</arg> does not include the CTF_COLUMN_DESCRIPTOR
+ flag.<br/>
+ May be <NULL/>.
+
+ @param _rxConnection
+ the connection the column belongs to. Won't be used if <arg>_nFormats</arg> does not include the CTF_COLUMN_DESCRIPTOR
+ flag.<br/>
+ May be <NULL/>.
+
+ @param _nFormats
+ supported formats. Must be a combination of the CTF_XXX flags
+ */
+ OColumnTransferable(
+ const css::uno::Reference< css::beans::XPropertySet >& _rxForm,
+ const OUString& _rFieldName,
+ const css::uno::Reference< css::beans::XPropertySet >& _rxColumn,
+ const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
+ ColumnTransferFormatFlags _nFormats
+ );
+
+ /** checks whether or not a column descriptor can be extracted from the data flavor vector given
+ @param _rFlavors
+ available flavors
+ @param _nFormats
+ formats to accept
+ */
+ static bool canExtractColumnDescriptor(const DataFlavorExVector& _rFlavors, ColumnTransferFormatFlags _nFormats);
+
+ /** extracts a column descriptor from the transferable given
+ */
+ static bool extractColumnDescriptor(
+ const TransferableDataHelper& _rData
+ ,OUString& _rDatasource
+ ,OUString& _rDatabaseLocation
+ ,OUString& _rConnectionResource
+ ,sal_Int32& _nCommandType
+ ,OUString& _rCommand
+ ,OUString& _rFieldName
+ );
+
+ /** extracts a column descriptor from the transferable given
+ */
+ static ODataAccessDescriptor
+ extractColumnDescriptor(const TransferableDataHelper& _rData);
+
+ private:
+ // TransferableHelper overridables
+ virtual void AddSupportedFormats() override;
+ virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
+
+ static SotClipboardFormatId getDescriptorFormatId();
+
+ SVX_DLLPRIVATE void implConstruct(
+ const OUString& _rDatasource
+ ,const OUString& _rConnectionResource
+ ,const sal_Int32 _nCommandType
+ ,const OUString& _rCommand
+ ,const OUString& _rFieldName
+ );
+
+ ODataAccessDescriptor m_aDescriptor;
+ OUString m_sCompatibleFormat;
+ ColumnTransferFormatFlags m_nFormatFlags;
+ };
+
+
+ //= ODataAccessObjectTransferable
+
+ /** class for transferring data access objects (tables, queries, statements ...)
+ */
+ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC ODataAccessObjectTransferable : public TransferDataContainer
+ {
+ ODataAccessDescriptor m_aDescriptor;
+ OUString m_sCompatibleObjectDescription;
+ // needed to provide a SotClipboardFormatId::SBA_DATAEXCHANGE format
+
+ public:
+ /** should be used copying and the connection is needed.
+ @param _rDatasource
+ The data source name.
+ @param _nCommandType
+ The kind of command. @see com.sun.star.sdbc.CommandType
+ @param _rCommand
+ The command, either a name of a table or query or a SQL statement.
+ */
+ void Update(
+ const OUString& _rDatasource,
+ const sal_Int32 _nCommandType,
+ const OUString& _rCommand,
+ const css::uno::Reference< css::sdbc::XConnection >& _rxConnection
+ );
+
+ /** should be used when copying a query object and no connection is available.
+ @param _rDatasource
+ The data source name.
+ @param _nCommandType
+ The kind of command. @see com.sun.star.sdbc.CommandType
+ @param _rCommand
+ The command, either a name of a table or query or a SQL statement.
+ */
+ void Update(
+ const OUString& _rDatasource,
+ const sal_Int32 _nCommandType,
+ const OUString& _rCommand
+ );
+
+ /** with this ctor, only the object descriptor format will be provided
+ */
+ ODataAccessObjectTransferable(
+ const css::uno::Reference< css::beans::XPropertySet >& _rxLivingForm
+ );
+
+ ODataAccessObjectTransferable();
+
+ /** checks whether or not an object descriptor can be extracted from the data flavor vector given
+ @param _rFlavors
+ available flavors
+ @param _nFormats
+ formats to accept
+ */
+ static bool canExtractObjectDescriptor(const DataFlavorExVector& _rFlavors);
+
+ /** extracts an object descriptor from the transferable given
+ */
+ static ODataAccessDescriptor
+ extractObjectDescriptor(const TransferableDataHelper& _rData);
+
+ protected:
+ virtual void AddSupportedFormats() override;
+ virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
+ virtual void ObjectReleased() override;
+
+ protected:
+ const ODataAccessDescriptor& getDescriptor() const { return m_aDescriptor; }
+ ODataAccessDescriptor& getDescriptor() { return m_aDescriptor; }
+ protected:
+ void addCompatibleSelectionDescription(
+ const css::uno::Sequence< css::uno::Any >& _rSelRows
+ );
+ // normally, a derived class could simply access getDescriptor[DataAccessDescriptorProperty::Selection] and place the sequence therein
+ // but unfortunately, we have this damned compatible format, and this can't be accessed in
+ // derived classes (our class is the only one which should be contaminated with this)
+
+ private:
+ SVX_DLLPRIVATE void construct( const OUString& _rDatasourceOrLocation
+ ,const OUString& _rConnectionResource
+ ,const sal_Int32 _nCommandType
+ ,const OUString& _rCommand
+ ,const css::uno::Reference< css::sdbc::XConnection >& _rxConnection
+ ,bool _bAddCommand
+ ,const OUString& _sActiveCommand);
+ };
+
+
+ //= OMultiColumnTransferable
+
+ /** class for transferring multiple columns
+ */
+ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC OMultiColumnTransferable final : public TransferDataContainer
+ {
+ public:
+ OMultiColumnTransferable();
+
+ void setDescriptors(const css::uno::Sequence< css::beans::PropertyValue >& rDescriptors);
+
+ /** checks whether or not an object descriptor can be extracted from the data flavor vector given
+ @param _rFlavors
+ available flavors
+ @param _nFormats
+ formats to accept
+ */
+ static bool canExtractDescriptor(const DataFlavorExVector& _rFlavors);
+
+ /** extracts an object descriptor from the transferable given
+ */
+ static css::uno::Sequence< css::beans::PropertyValue > extractDescriptor(const TransferableDataHelper& _rData);
+
+ private:
+ virtual void AddSupportedFormats() override;
+ virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
+ virtual void ObjectReleased() override;
+ static SotClipboardFormatId getDescriptorFormatId();
+
+ css::uno::Sequence< css::beans::PropertyValue > m_aDescriptors;
+ };
+
+
+}
+
+
+#endif // INCLUDED_SVX_DBAEXCHANGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dbaobjectex.hxx b/include/svx/dbaobjectex.hxx
new file mode 100644
index 000000000..2a0d243cc
--- /dev/null
+++ b/include/svx/dbaobjectex.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DBAOBJECTEX_HXX
+#define INCLUDED_SVX_DBAOBJECTEX_HXX
+
+#include <vcl/transfer.hxx>
+#include <svx/dataaccessdescriptor.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star::ucb { class XContent; }
+
+namespace svx
+{
+ //= OComponentTransferable
+ class SAL_WARN_UNUSED SVX_DLLPUBLIC OComponentTransferable final : public TransferDataContainer
+ {
+ public:
+ OComponentTransferable();
+
+ void Update(
+ const OUString& rDatasourceOrLocation,
+ const css::uno::Reference< css::ucb::XContent>& xContent
+ );
+
+ /** checks whether or not a component descriptor can be extracted from the data flavor vector given
+ @param _rFlavors
+ available flavors
+ */
+ static bool canExtractComponentDescriptor(const DataFlavorExVector& _rFlavors, bool _bForm );
+
+ /** extracts a component descriptor from the transferable given
+ */
+ static ODataAccessDescriptor
+ extractComponentDescriptor(const TransferableDataHelper& _rData);
+
+ private:
+ // TransferableHelper overridables
+ virtual void AddSupportedFormats() override;
+ virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
+
+ static SotClipboardFormatId getDescriptorFormatId(bool _bExtractForm);
+
+ ODataAccessDescriptor m_aDescriptor;
+ };
+}
+
+#endif // INCLUDED_SVX_DBAOBJECTEX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/def3d.hxx b/include/svx/def3d.hxx
new file mode 100644
index 000000000..37770602d
--- /dev/null
+++ b/include/svx/def3d.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DEF3D_HXX
+#define INCLUDED_SVX_DEF3D_HXX
+
+#include <o3tl/typed_flags_set.hxx>
+
+// 3D helper functions
+
+enum class E3dDragConstraint
+{
+ X = 0x0001,
+ Y = 0x0002,
+ Z = 0x0004,
+ XYZ = X | Y | Z
+};
+namespace o3tl
+{
+template <> struct typed_flags<E3dDragConstraint> : is_typed_flags<E3dDragConstraint, 0x7>
+{
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/deflt3d.hxx b/include/svx/deflt3d.hxx
new file mode 100644
index 000000000..f3312afd5
--- /dev/null
+++ b/include/svx/deflt3d.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DEFLT3D_HXX
+#define INCLUDED_SVX_DEFLT3D_HXX
+
+#include <config_options.h>
+#include <basegfx/point/b3dpoint.hxx>
+#include <basegfx/vector/b3dvector.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Class for managing the 3D default attributes
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) E3dDefaultAttributes
+{
+private:
+ // Cube object
+ basegfx::B3DPoint aDefaultCubePos;
+ basegfx::B3DVector aDefaultCubeSize;
+ bool bDefaultCubePosIsCenter;
+
+ // Sphere object
+ basegfx::B3DPoint aDefaultSphereCenter;
+ basegfx::B3DVector aDefaultSphereSize;
+
+ // Lathe object
+ bool bDefaultLatheSmoothed;
+ bool bDefaultLatheSmoothFrontBack;
+ bool bDefaultLatheCharacterMode;
+ bool bDefaultLatheCloseFront;
+ bool bDefaultLatheCloseBack;
+
+ // Extrude object
+ bool bDefaultExtrudeSmoothed;
+ bool bDefaultExtrudeSmoothFrontBack;
+ bool bDefaultExtrudeCharacterMode;
+ bool bDefaultExtrudeCloseFront;
+ bool bDefaultExtrudeCloseBack;
+
+public:
+ // Constructor
+ E3dDefaultAttributes();
+
+ // Reset to defaults
+ void Reset();
+
+ // Cube object
+ const basegfx::B3DPoint& GetDefaultCubePos() const { return aDefaultCubePos; }
+ const basegfx::B3DVector& GetDefaultCubeSize() const { return aDefaultCubeSize; }
+ bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; }
+
+ // Sphere object
+ const basegfx::B3DPoint& GetDefaultSphereCenter() const { return aDefaultSphereCenter; }
+ const basegfx::B3DVector& GetDefaultSphereSize() const { return aDefaultSphereSize; }
+
+ // Lathe object
+ bool GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; }
+ bool GetDefaultLatheSmoothFrontBack() const { return bDefaultLatheSmoothFrontBack; }
+ bool GetDefaultLatheCharacterMode() const { return bDefaultLatheCharacterMode; }
+ void SetDefaultLatheCharacterMode(const bool bNew) { bDefaultLatheCharacterMode = bNew; }
+ bool GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; }
+ bool GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; }
+
+ // Extrude object
+ bool GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; }
+ bool GetDefaultExtrudeSmoothFrontBack() const { return bDefaultExtrudeSmoothFrontBack; }
+ bool GetDefaultExtrudeCharacterMode() const { return bDefaultExtrudeCharacterMode; }
+ void SetDefaultExtrudeCharacterMode(const bool bNew) { bDefaultExtrudeCharacterMode = bNew; }
+ bool GetDefaultExtrudeCloseFront() const { return bDefaultExtrudeCloseFront; }
+ void SetDefaultExtrudeCloseFront(const bool bNew) { bDefaultExtrudeCloseFront = bNew; }
+ bool GetDefaultExtrudeCloseBack() const { return bDefaultExtrudeCloseBack; }
+ void SetDefaultExtrudeCloseBack(const bool bNew) { bDefaultExtrudeCloseBack = bNew; }
+};
+
+#endif // INCLUDED_SVX_DEFLT3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/diagram/IDiagramHelper.hxx b/include/svx/diagram/IDiagramHelper.hxx
new file mode 100644
index 000000000..e93056f70
--- /dev/null
+++ b/include/svx/diagram/IDiagramHelper.hxx
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <vector>
+#include <svx/svxdllapi.h>
+#include <rtl/ustring.hxx>
+#include <svx/svdhdl.hxx>
+
+// Forward declarations
+class SdrObjGroup;
+class SdrHdlList;
+
+namespace svx { namespace diagram {
+
+// Helper class to visualize an imminently recognizable
+// additional visualization for DynamicDiagrams that can also
+// be used to show/hide the DiagramDialog by the user
+// Note: is also used as additional drag/move handle
+class SVXCORE_DLLPUBLIC DiagramFrameHdl final : public SdrHdl
+{
+ // object dimensions
+ basegfx::B2DHomMatrix maTransformation;
+
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+public:
+ DiagramFrameHdl(const basegfx::B2DHomMatrix& rTransformation);
+
+ static void clicked(const Point& rPnt);
+};
+
+class DiagramDataState;
+
+// Helper class to allow administer advanced Diagram related
+// data and functionality
+class SVXCORE_DLLPUBLIC IDiagramHelper
+{
+private:
+ // These values define behaviour to where take data from at re-creation time.
+ // Different definitions will have different consequences for re-creation
+ // of Diagram visualization (if needed/triggered).
+ // The style attributes per shape e.g. can be re-stored frm either an
+ // existing Theme, or the preserved key/value list of properties per XShape.
+ // With the current default settings the re-creation uses the preserved
+ // key/value pairs, but re-creation from Theme may also be desirable. It
+ // is also good to preserve both data packages at initial import to allow
+ // alternatively one of these two methods for re-construction
+
+ // If true, the oox::Theme data from ::DiagramData get/set/ThemeDocument()
+ // aka mxThemeDocument - if it exists - will be used to create the style
+ // attributes for the to-be-created XShapes (theoretically allows re-creation
+ // with other Theme)
+ bool mbUseDiagramThemeData; // false
+
+ // If true, the UNO API form of attributes per Point as Key/value list
+ // that was secured after initial XShape creation is used to create the
+ // style attributes for the to-be-created XShapes
+ bool mbUseDiagramModelData; // true
+
+ // If true and mxThemeDocument exists it will be re-imported to
+ // a newly created oox::drawingml::Theme object
+ bool mbForceThemePtrRecreation; // false
+
+protected:
+ void anchorToSdrObjGroup(SdrObjGroup& rTarget);
+
+public:
+ IDiagramHelper();
+ virtual ~IDiagramHelper();
+
+ // re-create XShapes
+ virtual void reLayout(SdrObjGroup& rTarget) = 0;
+
+ // get text representation of data tree
+ virtual OUString getString() const = 0;
+
+ // get children of provided data node
+ // use empty string for top-level nodes
+ // returns vector of (id, text)
+ virtual std::vector<std::pair<OUString, OUString>>
+ getChildren(const OUString& rParentId) const = 0;
+
+ // add/remove new top-level node to data model, returns its id
+ virtual OUString addNode(const OUString& rText) = 0;
+ virtual bool removeNode(const OUString& rNodeId) = 0;
+
+ // Undo/Redo helpers for extracting/restoring Diagram-defining data
+ virtual std::shared_ptr<svx::diagram::DiagramDataState> extractDiagramDataState() const = 0;
+ virtual void applyDiagramDataState(const std::shared_ptr<svx::diagram::DiagramDataState>& rState) = 0;
+
+ bool UseDiagramThemeData() const { return mbUseDiagramThemeData; }
+ bool UseDiagramModelData() const { return mbUseDiagramModelData; }
+ bool ForceThemePtrRecreation() const { return mbForceThemePtrRecreation; };
+
+ static void AddAdditionalVisualization(const SdrObjGroup& rTarget, SdrHdlList& rHdlList);
+};
+
+}} // end of namespace
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/diagram/datamodel.hxx b/include/svx/diagram/datamodel.hxx
new file mode 100644
index 000000000..850cd8f78
--- /dev/null
+++ b/include/svx/diagram/datamodel.hxx
@@ -0,0 +1,274 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DIAGRAM_DATAMODEL_HXX
+#define INCLUDED_SVX_DIAGRAM_DATAMODEL_HXX
+
+#include <vector>
+#include <optional>
+#include <map>
+
+#include <svx/svxdllapi.h>
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include <com/sun/star/xml/dom/XDocument.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+
+namespace svx::diagram {
+
+enum TypeConstant {
+ XML_none = 0,
+ XML_type = 395,
+ XML_asst = 680,
+ XML_doc = 1924,
+ XML_node = 3596,
+ XML_norm = 3609,
+ XML_parOf = 3878,
+ XML_parTrans = 3879,
+ XML_pres = 4085,
+ XML_presOf = 4090,
+ XML_presParOf = 4091,
+ XML_rel = 4298,
+ XML_sibTrans = 4746,
+};
+
+/** A Connection
+ */
+struct SVXCORE_DLLPUBLIC Connection
+{
+ Connection();
+
+ TypeConstant mnXMLType;
+ OUString msModelId;
+ OUString msSourceId;
+ OUString msDestId;
+ OUString msParTransId;
+ OUString msPresId;
+ OUString msSibTransId;
+ sal_Int32 mnSourceOrder;
+ sal_Int32 mnDestOrder;
+
+};
+
+typedef std::vector< Connection > Connections;
+
+/** Text and properties for a point
+ * For proof of concept to make TextData available in svx level this
+ * is in a first run pretty simple, but may need to be extended accordingly
+ * up to similar data as in oox::drawingml::TextBody.
+ */
+struct SVXCORE_DLLPUBLIC TextBody
+{
+ // text from 1st paragraph (1st run)
+ OUString msText;
+
+ // attributes from TextBody::getTextProperties()
+ std::vector< std::pair< OUString, css::uno::Any >> maTextProps;
+};
+
+typedef std::shared_ptr< TextBody > TextBodyPtr;
+
+/** Styles for a Point (FillStyle/LineStyle/...)
+ */
+struct SVXCORE_DLLPUBLIC PointStyle
+{
+ // attributes (LineStyle/FillStyle/...)
+ std::vector< std::pair< OUString, css::uno::Any >> maProperties;
+};
+
+typedef std::shared_ptr< PointStyle > PointStylePtr;
+
+/** A point
+ */
+struct SVXCORE_DLLPUBLIC Point
+{
+ Point();
+
+ // The minimal text data from the imported Diagram
+ // in source format
+ TextBodyPtr msTextBody;
+
+ // The property sequence of pairs<OUString, css::uno::Any>,
+ // interpreted & assigned by the ::addShape(s) creators in the
+ // import filter that created a XShape associated/based on this entry
+ PointStylePtr msPointStylePtr;
+
+ OUString msCnxId;
+ OUString msModelId;
+ OUString msColorTransformCategoryId;
+ OUString msColorTransformTypeId;
+ OUString msLayoutCategoryId;
+ OUString msLayoutTypeId;
+ OUString msPlaceholderText;
+ OUString msPresentationAssociationId;
+ OUString msPresentationLayoutName;
+ OUString msPresentationLayoutStyleLabel;
+ OUString msQuickStyleCategoryId;
+ OUString msQuickStyleTypeId;
+
+ TypeConstant mnXMLType;
+ sal_Int32 mnMaxChildren;
+ sal_Int32 mnPreferredChildren;
+ sal_Int32 mnDirection;
+ std::optional<sal_Int32> moHierarchyBranch;
+ sal_Int32 mnResizeHandles;
+ sal_Int32 mnCustomAngle;
+ sal_Int32 mnPercentageNeighbourWidth;
+ sal_Int32 mnPercentageNeighbourHeight;
+ sal_Int32 mnPercentageOwnWidth;
+ sal_Int32 mnPercentageOwnHeight;
+ sal_Int32 mnIncludeAngleScale;
+ sal_Int32 mnRadiusScale;
+ sal_Int32 mnWidthScale;
+ sal_Int32 mnHeightScale;
+ sal_Int32 mnWidthOverride;
+ sal_Int32 mnHeightOverride;
+ sal_Int32 mnLayoutStyleCount;
+ sal_Int32 mnLayoutStyleIndex;
+
+ bool mbOrgChartEnabled;
+ bool mbBulletEnabled;
+ bool mbCoherent3DOffset;
+ bool mbCustomHorizontalFlip;
+ bool mbCustomVerticalFlip;
+ bool mbCustomText;
+ bool mbIsPlaceholder;
+};
+
+typedef std::vector< Point > Points;
+
+/** Snippet of Diagram ModelData for Diagram-defining data undo/redo
+ */
+class SVXCORE_DLLPUBLIC DiagramDataState
+{
+ Connections maConnections;
+ Points maPoints;
+
+public:
+ DiagramDataState(const Connections& rConnections, const Points& rPoints);
+
+ Connections& getConnections() { return maConnections; }
+ Points& getPoints() { return maPoints; }
+};
+
+typedef std::shared_ptr< DiagramDataState > DiagramDataStatePtr;
+
+/** The collected Diagram ModelData
+ */
+class SVXCORE_DLLPUBLIC DiagramData
+{
+public:
+ typedef std::map< OUString, Point* > PointNameMap;
+ typedef std::map< OUString, std::vector< Point* > > PointsNameMap;
+ typedef std::map< OUString, const Connection* > ConnectionNameMap;
+
+ struct SourceIdAndDepth
+ {
+ OUString msSourceId;
+ sal_Int32 mnDepth = 0;
+ };
+
+ /// Tracks connections: destination id -> {destination order, details} map.
+ typedef std::map< OUString, std::map<sal_Int32, SourceIdAndDepth > > StringMap;
+
+protected:
+ // Make constructor protected to signal that this anyway pure virtual class
+ // shall not be incarnated - target to use is oox::drawingml::DiagramData
+ DiagramData();
+
+public:
+ virtual ~DiagramData();
+
+ // creates temporary processing data from model data
+ virtual void buildDiagramDataModel(bool bClearOoxShapes);
+
+ // dump to readable format
+ virtual void dump() const = 0;
+
+ // read accesses
+ Connections& getConnections() { return maConnections; }
+ Points& getPoints() { return maPoints; }
+ StringMap& getPresOfNameMap() { return maPresOfNameMap; }
+ PointNameMap& getPointNameMap() { return maPointNameMap; }
+ PointsNameMap& getPointsPresNameMap() { return maPointsPresNameMap; }
+ ::std::vector<OUString>& getExtDrawings() { return maExtDrawings; }
+ const Point* getRootPoint() const;
+ OUString getString() const;
+ std::vector<std::pair<OUString, OUString>> getChildren(const OUString& rParentId) const;
+
+ const css::uno::Reference< css::xml::dom::XDocument >& getThemeDocument() const { return mxThemeDocument; }
+ void setThemeDocument( const css::uno::Reference< css::xml::dom::XDocument >& xRef ) { mxThemeDocument = xRef; }
+
+ const OUString& getBackgroundShapeModelID() const { return msBackgroundShapeModelID; }
+ void setBackgroundShapeModelID( const OUString& rModelID ) { msBackgroundShapeModelID = rModelID; }
+
+ // model modifiers
+ OUString addNode(const OUString& rText);
+ bool removeNode(const OUString& rNodeId);
+
+ // Undo/Redo helpers to extract/restore Diagram-defining data
+ DiagramDataStatePtr extractDiagramDataState() const;
+ void applyDiagramDataState(const DiagramDataStatePtr& rState);
+
+protected:
+ // helpers
+ void getChildrenString(OUStringBuffer& rBuf, const Point* pPoint, sal_Int32 nLevel) const;
+ void addConnection(TypeConstant nType, const OUString& sSourceId, const OUString& sDestId);
+
+ // evtl. existing alternative imported visualization identifier
+ ::std::vector<OUString> maExtDrawings;
+
+ // The model definition, the parts available in svx.
+ // See evtl. parts in oox::drawingml::DiagramData that may need t obe accessed
+ // - logic connections/associations
+ Connections maConnections;
+
+ // - data point entries
+ Points maPoints;
+
+ // - style for the BackgroundShape (if used)
+ // this is the property sequence of pairs<OUString, css::uno::Any>,
+ // as interpreted & assigned by the ::addShape(s) creators in the
+ // import filter
+ PointStylePtr maBackgroundShapeStyle;
+
+ // - Theme definition as css::xml::dom::XDocument
+ // Note: I decided to use dom::XDocument which is already in use, instead of a
+ // temp file what is also possible (implemented that for POC) but would
+ // need to be created in PresentationFragmentHandler::importSlide. If
+ // this needs to be written to a File, please refer to
+ // fileDocxExport::WriteTheme(), look for "OOXTheme"
+ css::uno::Reference< css::xml::dom::XDocument > mxThemeDocument;
+
+ // temporary processing data, partially deleted when using build()
+ PointNameMap maPointNameMap;
+ PointsNameMap maPointsPresNameMap;
+ ConnectionNameMap maConnectionNameMap;
+ StringMap maPresOfNameMap;
+ OUString msBackgroundShapeModelID;
+};
+
+typedef std::shared_ptr< DiagramData > DiagramDataPtr;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
new file mode 100644
index 000000000..8fafb3fc0
--- /dev/null
+++ b/include/svx/dialcontrol.hxx
@@ -0,0 +1,170 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DIALCONTROL_HXX
+#define INCLUDED_SVX_DIALCONTROL_HXX
+
+#include <memory>
+#include <vcl/customweld.hxx>
+#include <vcl/virdev.hxx>
+#include <svx/svxdllapi.h>
+
+class Edit;
+
+namespace svx {
+
+
+class SAL_WARN_UNUSED DialControlBmp final : public VirtualDevice
+{
+public:
+ explicit DialControlBmp(OutputDevice& rReference);
+
+ void InitBitmap(const vcl::Font& rFont);
+ void SetSize(const Size& rSize);
+ void CopyBackground( const DialControlBmp& rSrc );
+ void DrawBackground( const Size& rSize, bool bEnabled );
+ void DrawBackground();
+ void DrawElements( const OUString& rText, Degree100 nAngle );
+ Color GetBackgroundColor() const override;
+
+private:
+ const Color& GetTextColor() const;
+ const Color& GetScaleLineColor() const;
+ const Color& GetButtonLineColor() const;
+ const Color& GetButtonFillColor( bool bMain ) const;
+
+ void Init();
+
+ tools::Rectangle maRect;
+ bool mbEnabled;
+ OutputDevice& mrParent;
+ tools::Long mnCenterX;
+ tools::Long mnCenterY;
+};
+
+/** This control allows to input a rotation angle, visualized by a dial.
+
+ Usage: A single click sets a rotation angle rounded to steps of 15 degrees.
+ Dragging with the left mouse button sets an exact rotation angle. Pressing
+ the ESCAPE key during mouse drag cancels the operation and restores the old
+ state of the control.
+
+ It is possible to link a numeric field to this control using the function
+ SetLinkedField(). The DialControl will take full control of this numeric
+ field:
+ - Sets the rotation angle to the numeric field in mouse operations.
+ - Shows the value entered/modified in the numeric field.
+ - Enables/disables/shows/hides the field according to own state changes.
+ */
+class SAL_WARN_UNUSED SVX_DLLPUBLIC DialControl final : public weld::CustomWidgetController
+{
+public:
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+
+ virtual void StyleUpdated() override;
+
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual bool MouseMove( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
+ virtual bool KeyInput(const KeyEvent& rKEvt) override;
+ virtual void LoseFocus() override;
+
+ virtual void Resize() override;
+
+ /** Returns the current rotation angle in 1/100 degrees. */
+ Degree100 GetRotation() const;
+ /** Sets the rotation to the passed value (in 1/100 degrees). */
+ void SetRotation( Degree100 nAngle );
+ /** Returns true, if the control is not in "don't care" state. */
+ bool HasRotation() const;
+ /** Sets the control to "don't care" state. */
+ void SetNoRotation();
+
+ /** Links the passed numeric edit field to the control (bi-directional).
+ * nDecimalPlaces:
+ * field value is unsign given decimal places
+ * default is 0 which means field values are in degrees,
+ * 2 means 100th of degree
+ */
+ void SetLinkedField(weld::MetricSpinButton* pField, sal_Int32 nDecimalPlaces = 0);
+
+ /** Save value for later comparison */
+ void SaveValue();
+
+ /** Compare value with the saved value */
+ bool IsValueModified() const;
+
+ const OUString& GetText() const { return mpImpl->maText; }
+ void SetText(const OUString& rText) { mpImpl->maText = rText; }
+
+ void SetModifyHdl( const Link<DialControl&,void>& rLink );
+
+ void Init( const Size& rWinSize );
+
+ void set_visible(bool bVisible)
+ {
+ if (bVisible)
+ Show();
+ else
+ Hide();
+ }
+private:
+ struct SAL_DLLPRIVATE DialControl_Impl
+ {
+ ScopedVclPtr<DialControlBmp> mxBmpEnabled;
+ ScopedVclPtr<DialControlBmp> mxBmpDisabled;
+ ScopedVclPtr<DialControlBmp> mxBmpBuffered;
+ Link<DialControl&,void> maModifyHdl;
+ OUString maText;
+ weld::MetricSpinButton* mpLinkField;
+ sal_Int32 mnLinkedFieldValueMultiplyer;
+ Size maWinSize;
+ vcl::Font maWinFont;
+ Degree100 mnAngle;
+ Degree100 mnInitialAngle;
+ Degree100 mnOldAngle;
+ tools::Long mnCenterX;
+ tools::Long mnCenterY;
+ bool mbNoRot;
+
+ explicit DialControl_Impl(OutputDevice& rReference);
+ void Init( const Size& rWinSize, const vcl::Font& rWinFont );
+ void SetSize( const Size& rWinSize );
+ };
+ std::unique_ptr< DialControl_Impl > mpImpl;
+
+ void HandleMouseEvent( const Point& rPos, bool bInitial );
+ void HandleEscapeEvent();
+
+ void SetRotation( Degree100 nAngle, bool bBroadcast );
+
+ void Init( const Size& rWinSize, const vcl::Font& rWinFont );
+
+ void InvalidateControl();
+
+ DECL_DLLPRIVATE_LINK(LinkedFieldModifyHdl, weld::MetricSpinButton&, void);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dialmgr.hxx b/include/svx/dialmgr.hxx
new file mode 100644
index 000000000..34681a510
--- /dev/null
+++ b/include/svx/dialmgr.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_DIALMGR_HXX
+#define INCLUDED_SVX_DIALMGR_HXX
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <unotools/resmgr.hxx>
+
+SVXCORE_DLLPUBLIC std::locale SvxResLocale();
+SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
new file mode 100644
index 000000000..d3d7f6d8b
--- /dev/null
+++ b/include/svx/dialogs.hrc
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DIALOGS_HRC
+#define INCLUDED_SVX_DIALOGS_HRC
+
+#include <svl/solar.hrc>
+
+// factory IDs of tabpages implemented in CUI
+#define RID_SVXPAGE_CHAR_TWOLINES (RID_SVX_START + 242)
+#define RID_SVXPAGE_EXT_PARAGRAPH (RID_SVX_START + 7)
+#define RID_SVXPAGE_GRFCROP (RID_SVX_START + 238)
+#define RID_SVXPAGE_CHAR_NAME (RID_SVX_START + 239)
+#define RID_SVXPAGE_CHAR_EFFECTS (RID_SVX_START + 240)
+#define RID_SVXPAGE_CHAR_POSITION (RID_SVX_START + 241)
+#define RID_SVXPAGE_STD_PARAGRAPH (RID_SVX_START + 6)
+#define RID_SVXPAGE_ALIGN_PARAGRAPH (RID_SVX_START + 187)
+#define RID_SVXPAGE_PARA_ASIAN (RID_SVX_START + 245)
+#define RID_SVXPAGE_TABULATOR (RID_SVX_START + 2)
+#define RID_SFXPAGE_DBREGISTER (RID_OFA_START + 123)
+#define RID_SVXPAGE_NUMBERFORMAT (RID_SVX_START + 41)
+#define RID_SVXPAGE_ALIGNMENT (RID_SVX_START + 90)
+#define RID_SVXPAGE_BORDER (RID_SVX_START + 5)
+#define RID_SVXPAGE_PAGE (RID_SVX_START + 25)
+#define RID_SVXPAGE_LINE (RID_SVX_START + 51)
+#define RID_SVXPAGE_AREA (RID_SVX_START + 56)
+#define RID_SVXPAGE_BKG (RID_SVX_START + 57)
+#define RID_SVXPAGE_SHADOW (RID_SVX_START + 61)
+#define RID_SVXPAGE_TRANSPARENCE (RID_SVX_START + 54)
+#define RID_SVXPAGE_THEME (RID_SVX_START + 55)
+#define RID_SVXPAGE_TEXTATTR (RID_SVX_START + 153)
+#define RID_SVXPAGE_TEXTANIMATION (RID_SVX_START + 184)
+#define RID_SVXPAGE_TEXTCOLUMNS (RID_SVX_START + 154)
+#define RID_SVXPAGE_MEASURE (RID_SVX_START + 161)
+#define RID_SVXPAGE_CONNECTION (RID_SVX_START + 191)
+#define RID_SVXPAGE_LINE_DEF (RID_SVX_START + 52)
+#define RID_SVXPAGE_LINEEND_DEF (RID_SVX_START + 53)
+#define RID_SVXPAGE_NUM_OPTIONS (RID_SVX_START + 219)
+#define RID_SVXPAGE_NUM_POSITION (RID_SVX_START + 220)
+#define RID_SVXPAGE_PICK_SINGLE_NUM (RID_SVX_START + 215)
+#define RID_SVXPAGE_PICK_BULLET (RID_SVX_START + 216)
+#define RID_SVXPAGE_PICK_NUM (RID_SVX_START + 217)
+#define RID_SVXPAGE_PICK_BMP (RID_SVX_START + 218)
+#define RID_SVXPAGE_MACROASSIGN (RID_SVX_START + 296)
+
+// ID of tabpages implemented in SVX, but used in CUI
+#define RID_SVXPAGE_GRID (RID_SVX_START + 152)
+
+// IDs of options pages of applications
+#define RID_SW_TP_MAILCONFIG (RID_OFA_START + 102)
+#define RID_SW_TP_STD_FONT_CJK (RID_OFA_START + 247)
+#define RID_SW_TP_STD_FONT_CTL (RID_OFA_START + 251)
+#define RID_SW_TP_OPTLOAD_PAGE (RID_OFA_START + 214)
+#define RID_SW_TP_CONTENT_OPT (RID_OFA_START + 206)
+#define RID_SW_TP_OPTSHDWCRSR (RID_OFA_START + 211)
+#define RID_SW_TP_STD_FONT (RID_OFA_START + 208)
+#define RID_SW_TP_OPTPRINT_PAGE (RID_OFA_START + 209)
+#define RID_SW_TP_OPTTABLE_PAGE (RID_OFA_START + 210)
+#define RID_SW_TP_REDLINE_OPT (RID_OFA_START + 212)
+#define RID_SW_TP_DOC_STAT (RID_OFA_START + 252)
+#define RID_SW_TP_OPTCOMPATIBILITY_PAGE (RID_OFA_START + 255)
+#define RID_SW_TP_COMPARISON_OPT (RID_OFA_START + 257)
+#define RID_SW_TP_HTML_CONTENT_OPT (RID_OFA_START + 240)
+#define RID_SW_TP_HTML_OPTPRINT_PAGE (RID_OFA_START + 242)
+#define RID_SW_TP_HTML_OPTTABLE_PAGE (RID_OFA_START + 243)
+#define RID_SW_TP_HTML_OPTGRID_PAGE (RID_OFA_START + 244)
+#define RID_SW_TP_HTML_OPTSHDWCRSR (RID_OFA_START + 246)
+#define RID_SW_TP_BACKGROUND (RID_OFA_START + 217)
+#define RID_SW_TP_OPTCAPTION_PAGE (RID_OFA_START + 256)
+#define SID_SC_TP_LAYOUT (RID_OFA_START + 218)
+#define SID_SC_TP_CONTENT (RID_OFA_START + 219)
+#define SID_SC_TP_GRID (RID_OFA_START + 221)
+#define SID_SC_TP_USERLISTS (RID_OFA_START + 222)
+#define SID_SC_TP_CALC (RID_OFA_START + 223)
+#define SID_SC_TP_CHANGES (RID_OFA_START + 224)
+#define RID_SC_TP_PRINT (RID_OFA_START + 248)
+#define SID_SI_TP_PRINT (RID_OFA_START + 236)
+#define SID_SI_TP_CONTENTS (RID_OFA_START + 232)
+#define SID_SI_TP_SNAP (RID_OFA_START + 234)
+#define SID_SI_TP_MISC (RID_OFA_START + 237)
+#define SID_SD_TP_PRINT (RID_OFA_START + 220)
+#define SID_SD_TP_CONTENTS (RID_OFA_START + 225)
+#define SID_SD_TP_SNAP (RID_OFA_START + 227)
+#define SID_SD_TP_MISC (RID_OFA_START + 231)
+#define RID_SC_TP_DEFAULTS (RID_OFA_START + 253)
+#define SID_SC_TP_STAT (RID_OFA_START + 254)
+
+// if we have _a_lot_ time, we should group the resource ids by type, instead
+// of grouping them by semantics. The reason is that resource ids have to be
+// unique relative to a fixed type (you can't have two dialogs with the same
+// resource id), but they do not need to be unique globally (means you can have
+// a dialog and a string, both with the same id)
+// I suggest sticking to per-type ids instead of per-semantic ids, this is
+// better maintainable (IMO), and does not waste that much ids
+
+// "ModalDialog" resource ids
+
+// TabPages --------------------------------------------------------------
+
+#define RID_SW_TP_OPTTEST_PAGE (RID_OFA_START + 215)
+#define SID_SC_TP_FORMULA (RID_OFA_START + 259)
+#define SID_SC_TP_COMPATIBILITY (RID_OFA_START + 260)
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx
new file mode 100644
index 000000000..afa246b16
--- /dev/null
+++ b/include/svx/dlgctl3d.hxx
@@ -0,0 +1,183 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DLGCTL3D_HXX
+#define INCLUDED_SVX_DLGCTL3D_HXX
+
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+#include <svl/itemset.hxx>
+#include <svx/svxdllapi.h>
+#include <basegfx/vector/b3dvector.hxx>
+#include <memory>
+
+class FmFormModel;
+class FmFormPage;
+class E3dView;
+class E3dObject;
+class E3dScene;
+
+enum class SvxPreviewObjectType { SPHERE, CUBE };
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DPreviewControl : public weld::CustomWidgetController
+{
+protected:
+ std::unique_ptr<FmFormModel> mpModel;
+ rtl::Reference<FmFormPage> mxFmPage;
+ std::unique_ptr<E3dView> mp3DView;
+ E3dScene* mpScene;
+ E3dObject* mp3DObj;
+ SvxPreviewObjectType mnObjectType;
+
+ void Construct();
+
+public:
+ Svx3DPreviewControl();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~Svx3DPreviewControl() override;
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual void Resize() override;
+
+ virtual void SetObjectType(SvxPreviewObjectType nType);
+ SvxPreviewObjectType GetObjectType() const { return mnObjectType; }
+ SfxItemSet const & Get3DAttributes() const;
+ virtual void Set3DAttributes(const SfxItemSet& rAttr);
+};
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DLightControl final : public Svx3DPreviewControl
+{
+ // Callback for interactive changes
+ Link<Svx3DLightControl*,void> maChangeCallback;
+ Link<Svx3DLightControl*,void> maSelectionChangeCallback;
+
+ // lights
+ sal_uInt32 maSelectedLight;
+
+ // extra objects for light control
+ E3dObject* mpExpansionObject;
+ E3dObject* mpLampBottomObject;
+ E3dObject* mpLampShaftObject;
+ std::vector< E3dObject* > maLightObjects;
+
+ // 3d rotations of object
+ double mfRotateX;
+ double mfRotateY;
+ double mfRotateZ;
+
+ // interaction parameters
+ Point maActionStartPoint;
+ double mfSaveActionStartHor;
+ double mfSaveActionStartVer;
+ double mfSaveActionStartRotZ;
+
+ bool mbMouseMoved : 1;
+ bool mbMouseCaptured : 1;
+ bool mbGeometrySelected : 1;
+
+ void Construct2();
+ void ConstructLightObjects();
+ void AdaptToSelectedLight();
+ void TrySelection(Point aPosPixel);
+
+public:
+ Svx3DLightControl();
+
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual tools::Rectangle GetFocusRect() override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+ virtual bool MouseMove( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
+ virtual void Resize() override;
+
+ virtual void SetObjectType(SvxPreviewObjectType nType) override;
+
+ // register user callback
+ void SetChangeCallback(Link<Svx3DLightControl*,void> aNew) { maChangeCallback = aNew; }
+ void SetSelectionChangeCallback(Link<Svx3DLightControl*,void> aNew) { maSelectionChangeCallback = aNew; }
+
+ // selection checks
+ bool IsSelectionValid();
+ bool IsGeometrySelected() const { return mbGeometrySelected; }
+
+ // get/set position of selected lamp in polar coordinates, Hor:[0..360.0[ and Ver:[-90..90] degrees
+ void GetPosition(double& rHor, double& rVer);
+ void SetPosition(double fHor, double fVer);
+
+ // get/set rotation of 3D object
+ void SetRotation(double fRotX, double fRotY, double fRotZ);
+ void GetRotation(double& rRotX, double& rRotY, double& rRotZ);
+
+ void SelectLight(sal_uInt32 nLightNumber);
+ virtual void Set3DAttributes(const SfxItemSet& rAttr) override;
+ sal_uInt32 GetSelectedLight() const { return maSelectedLight; }
+
+ // light data access
+ bool GetLightOnOff(sal_uInt32 nNum) const;
+ Color GetLightColor(sal_uInt32 nNum) const;
+ basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const;
+};
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxLightCtl3D
+{
+ // local controls
+ Svx3DLightControl& mrLightControl;
+ weld::Scale& mrHorScroller;
+ weld::Scale& mrVerScroller;
+ weld::Button& mrSwitcher;
+
+ // callback for interactive changes
+ Link<SvxLightCtl3D*,void> maUserInteractiveChangeCallback;
+ Link<SvxLightCtl3D*,void> maUserSelectionChangeCallback;
+
+public:
+ SvxLightCtl3D(Svx3DLightControl& rLightControl, weld::Scale& rHori,
+ weld::Scale& rVert, weld::Button& rButton);
+
+ // check the selection for validity
+ void CheckSelection();
+
+ // bring further settings to the outside world
+ Svx3DLightControl& GetSvx3DLightControl() { return mrLightControl; }
+
+ // register user callback
+ void SetUserInteractiveChangeCallback(Link<SvxLightCtl3D*,void> aNew) { maUserInteractiveChangeCallback = aNew; }
+ void SetUserSelectionChangeCallback(Link<SvxLightCtl3D*,void> aNew) { maUserSelectionChangeCallback = aNew; }
+
+private:
+
+ DECL_DLLPRIVATE_LINK(InternalInteractiveChange, Svx3DLightControl*, void);
+ DECL_DLLPRIVATE_LINK(InternalSelectionChange, Svx3DLightControl*, void);
+ DECL_DLLPRIVATE_LINK(ScrollBarMove, weld::Scale&, void);
+ DECL_DLLPRIVATE_LINK(ButtonPress, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(KeyInput, const KeyEvent&, bool);
+ DECL_DLLPRIVATE_LINK(FocusIn, weld::Widget&, void);
+
+ // initialize local parameters
+ void Init();
+
+ void move( double fDeltaHor, double fDeltaVer );
+};
+
+
+#endif // _SCH_DLGCTL3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
new file mode 100644
index 000000000..9787e025f
--- /dev/null
+++ b/include/svx/dlgctrl.hxx
@@ -0,0 +1,410 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_DLGCTRL_HXX
+#define INCLUDED_SVX_DLGCTRL_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/rectenum.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
+#include <vcl/virdev.hxx>
+#include <svx/xtable.hxx>
+#include <rtl/ref.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <memory>
+#include <array>
+
+namespace com::sun::star::awt {
+ struct Point;
+}
+
+/*************************************************************************
+|* Derived from SfxTabPage for being able to get notified through the
+|* virtual method from the control.
+\************************************************************************/
+
+class SAL_WARN_UNUSED SvxTabPage : public SfxTabPage
+{
+
+public:
+ SvxTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet &rAttrSet)
+ : SfxTabPage(pPage, pController, rUIXMLDescription, rID, &rAttrSet)
+ {
+ }
+ virtual void PointChanged(weld::DrawingArea* pArea, RectPoint eRP) = 0;
+};
+
+/*************************************************************************
+|* Control for display and selection of the corner and center points of
+|* an object
+\************************************************************************/
+
+enum class CTL_STATE
+{
+ NONE = 0,
+ NOHORZ = 1, // no horizontal input information is used
+ NOVERT = 2, // no vertical input information is used
+};
+namespace o3tl
+{
+ template<> struct typed_flags<CTL_STATE> : is_typed_flags<CTL_STATE, 0x03> {};
+}
+
+class SvxRectCtlAccessibleContext;
+class SvxPixelCtlAccessible;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxRectCtl : public weld::CustomWidgetController
+{
+private:
+ SvxTabPage* m_pPage;
+
+ SVX_DLLPRIVATE static void InitSettings(vcl::RenderContext& rRenderContext);
+ SVX_DLLPRIVATE void InitRectBitmap();
+ SVX_DLLPRIVATE BitmapEx& GetRectBitmap();
+ SVX_DLLPRIVATE void Resize_Impl(const Size& rSize);
+
+ SvxRectCtl(const SvxRectCtl&) = delete;
+ SvxRectCtl& operator=(const SvxRectCtl&) = delete;
+
+protected:
+ rtl::Reference<SvxRectCtlAccessibleContext> pAccContext;
+ sal_uInt16 nBorderWidth;
+ Point aPtLT, aPtMT, aPtRT;
+ Point aPtLM, aPtMM, aPtRM;
+ Point aPtLB, aPtMB, aPtRB;
+ Point aPtNew;
+ RectPoint eRP, eDefRP;
+ std::unique_ptr<BitmapEx> pBitmap;
+ CTL_STATE m_nState;
+
+ bool mbCompleteDisable : 1;
+
+ RectPoint GetRPFromPoint( Point, bool bRTL = false ) const;
+ const Point& GetPointFromRP( RectPoint ) const;
+ Point SetActualRPWithoutInvalidate( RectPoint eNewRP ); // returns the last point
+
+ Point GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint ) const;
+public:
+ SvxRectCtl(SvxTabPage* pPage);
+ void SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder);
+ virtual ~SvxRectCtl() override;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
+ virtual void Resize() override;
+ virtual bool MouseButtonDown(const MouseEvent&) override;
+ virtual bool KeyInput(const KeyEvent&) override;
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+ virtual tools::Rectangle GetFocusRect() override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual void StyleUpdated() override;
+
+ void Reset();
+ RectPoint GetActualRP() const { return eRP;}
+ void SetActualRP( RectPoint eNewRP );
+
+ void SetState( CTL_STATE nState );
+
+ static const sal_uInt8 NO_CHILDREN = 9; // returns number of usable radio buttons
+
+ tools::Rectangle CalculateFocusRectangle() const;
+ tools::Rectangle CalculateFocusRectangle( RectPoint eRectPoint ) const;
+
+ css::uno::Reference<css::accessibility::XAccessible> getAccessibleParent() const { return GetDrawingArea()->get_accessible_parent(); }
+ virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
+ a11yrelationset get_accessible_relation_set() const { return GetDrawingArea()->get_accessible_relation_set(); }
+
+ RectPoint GetApproxRPFromPixPt( const css::awt::Point& rPixelPoint ) const;
+
+ bool IsCompletelyDisabled() const { return mbCompleteDisable; }
+ void DoCompletelyDisable(bool bNew);
+};
+
+/*************************************************************************
+|* Control for editing bitmaps
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxPixelCtl final : public weld::CustomWidgetController
+{
+private:
+ static sal_uInt16 constexpr nLines = 8;
+ static sal_uInt16 constexpr nSquares = nLines * nLines;
+
+ SvxTabPage* m_pPage;
+
+ Color aPixelColor;
+ Color aBackgroundColor;
+ Size aRectSize;
+ std::array<sal_uInt8,nSquares> maPixelData;
+ bool bPaintable;
+ //Add member identifying position
+ Point aFocusPosition;
+ rtl::Reference<SvxPixelCtlAccessible> m_xAccess;
+
+ tools::Rectangle implCalFocusRect( const Point& aPosition );
+ void ChangePixel( sal_uInt16 nPixel );
+
+ SvxPixelCtl(SvxPixelCtl const&) = delete;
+ SvxPixelCtl(SvxPixelCtl&&) = delete;
+ SvxPixelCtl& operator=(SvxPixelCtl const&) = delete;
+ SvxPixelCtl& operator=(SvxPixelCtl&&) = delete;
+
+public:
+ SvxPixelCtl(SvxTabPage* pPage);
+
+ virtual ~SvxPixelCtl() override;
+
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual void Resize() override;
+ virtual tools::Rectangle GetFocusRect() override;
+
+ void SetXBitmap( const BitmapEx& rBitmapEx );
+
+ void SetPixelColor( const Color& rCol ) { aPixelColor = rCol; }
+ void SetBackgroundColor( const Color& rCol ) { aBackgroundColor = rCol; }
+
+ static sal_uInt16 GetLineCount() { return nLines; }
+
+ sal_uInt8 GetBitmapPixel( const sal_uInt16 nPixelNumber ) const;
+ std::array<sal_uInt8,64> const & GetBitmapPixelPtr() const { return maPixelData; }
+
+ void SetPaintable( bool bTmp ) { bPaintable = bTmp; }
+ void Reset();
+
+ css::uno::Reference<css::accessibility::XAccessible> getAccessibleParent() const { return GetDrawingArea()->get_accessible_parent(); }
+ virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
+ a11yrelationset get_accessible_relation_set() const { return GetDrawingArea()->get_accessible_relation_set(); }
+
+ static tools::Long GetSquares() { return nSquares ; }
+ tools::Long GetWidth() const { return aRectSize.getWidth() ; }
+ tools::Long GetHeight() const { return aRectSize.getHeight() ; }
+
+ //Device Pixel .
+ tools::Long ShowPosition( const Point &pt);
+
+ tools::Long PointToIndex(const Point &pt) const;
+ Point IndexToPoint(tools::Long nIndex) const ;
+ tools::Long GetFocusPosIndex() const ;
+ //Keyboard function for key input and focus handling function
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+};
+
+/************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxLineLB
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+ /// defines if standard fields (none, solid) are added, default is true
+ bool mbAddStandardFields : 1;
+
+public:
+ SvxLineLB(std::unique_ptr<weld::ComboBox> pControl);
+
+ void Fill(const XDashListRef &pList);
+ bool getAddStandardFields() const { return mbAddStandardFields; }
+ void setAddStandardFields(bool bNew);
+
+ void Append(const XDashEntry& rEntry, const BitmapEx& rBitmap );
+ void Modify(const XDashEntry& rEntry, sal_Int32 nPos, const BitmapEx& rBitmap );
+
+ void clear() { m_xControl->clear(); }
+ void remove(int nPos) { m_xControl->remove(nPos); }
+ int get_active() const { return m_xControl->get_active(); }
+ void set_active(int nPos) { m_xControl->set_active(nPos); }
+ void set_active_text(const OUString& rStr) { m_xControl->set_active_text(rStr); }
+ OUString get_active_text() const { return m_xControl->get_active_text(); }
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
+ int get_count() const { return m_xControl->get_count(); }
+ void append_text(const OUString& rStr) { m_xControl->append_text(rStr); }
+ bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); }
+ void save_value() { m_xControl->save_value(); }
+};
+
+/************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxLineEndLB
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+public:
+ SvxLineEndLB(std::unique_ptr<weld::ComboBox> pControl);
+
+ void Fill( const XLineEndListRef &pList, bool bStart = true );
+
+ void Append( const XLineEndEntry& rEntry, const BitmapEx& rBitmap );
+ void Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const BitmapEx& rBitmap );
+
+ void clear() { m_xControl->clear(); }
+ void remove(int nPos) { m_xControl->remove(nPos); }
+ int get_active() const { return m_xControl->get_active(); }
+ void set_active(int nPos) { m_xControl->set_active(nPos); }
+ void set_active_text(const OUString& rStr) { m_xControl->set_active_text(rStr); }
+ OUString get_active_text() const { return m_xControl->get_active_text(); }
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
+ int get_count() const { return m_xControl->get_count(); }
+ void append_text(const OUString& rStr) { m_xControl->append_text(rStr); }
+ bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); }
+ void save_value() { m_xControl->save_value(); }
+ void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
+ bool get_sensitive() const { return m_xControl->get_sensitive(); }
+};
+
+class SdrObject;
+class SdrPathObj;
+class SdrModel;
+
+class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI SvxPreviewBase : public weld::CustomWidgetController
+{
+private:
+ std::unique_ptr<SdrModel> mpModel;
+ VclPtr<VirtualDevice> mpBufferDevice;
+
+protected:
+ void InitSettings();
+
+ tools::Rectangle GetPreviewSize() const;
+
+ // prepare buffered paint
+ void LocalPrePaint(vcl::RenderContext const & rRenderContext);
+
+ // end and output buffered paint
+ void LocalPostPaint(vcl::RenderContext& rRenderContext);
+
+public:
+ SvxPreviewBase();
+ virtual void SetDrawingArea(weld::DrawingArea*) override;
+ virtual ~SvxPreviewBase() override;
+
+ // change support
+ virtual void StyleUpdated() override;
+
+ void SetDrawMode(DrawModeFlags nDrawMode)
+ {
+ mpBufferDevice->SetDrawMode(nDrawMode);
+ }
+
+ Size GetOutputSize() const
+ {
+ return mpBufferDevice->PixelToLogic(GetOutputSizePixel());
+ }
+
+ // dada read access
+ SdrModel& getModel() const
+ {
+ return *mpModel;
+ }
+ OutputDevice& getBufferDevice() const
+ {
+ return *mpBufferDevice;
+ }
+};
+
+
+/*************************************************************************
+|*
+|* SvxLinePreview
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXLinePreview final : public SvxPreviewBase
+{
+private:
+ SdrPathObj* mpLineObjA;
+ SdrPathObj* mpLineObjB;
+ SdrPathObj* mpLineObjC;
+
+ Graphic* mpGraphic;
+ bool mbWithSymbol;
+ Size maSymbolSize;
+
+public:
+ SvxXLinePreview();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~SvxXLinePreview() override;
+
+ void SetLineAttributes(const SfxItemSet& rItemSet);
+
+ void ShowSymbol( bool b ) { mbWithSymbol = b; };
+ void SetSymbol( Graphic* p, const Size& s );
+ void ResizeSymbol( const Size& s );
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual void Resize() override;
+};
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXRectPreview final : public SvxPreviewBase
+{
+private:
+ SdrObject* mpRectangleObject;
+
+public:
+ SvxXRectPreview();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~SvxXRectPreview() override;
+
+ void SetAttributes(const SfxItemSet& rItemSet);
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual void Resize() override;
+};
+
+/*************************************************************************
+|*
+|* SvxXShadowPreview
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXShadowPreview final : public SvxPreviewBase
+{
+private:
+ Point maShadowOffset;
+
+ SdrObject* mpRectangleObject;
+ SdrObject* mpRectangleShadow;
+
+public:
+ SvxXShadowPreview();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~SvxXShadowPreview() override;
+
+ void SetRectangleAttributes(const SfxItemSet& rItemSet);
+ void SetShadowAttributes(const SfxItemSet& rItemSet);
+ void SetShadowPosition(const Point& rPos);
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+};
+
+class SvxRelativeField;
+
+void limitWidthForSidebar(weld::SpinButton& rSpinButton);
+SVX_DLLPUBLIC void limitWidthForSidebar(SvxRelativeField& rMetricSpinButton);
+//tdf#130197 Give this toolbar a width as if it had 5 standard toolbutton entries
+SVX_DLLPUBLIC void padWidthForSidebar(weld::Toolbar& rToolbar, const css::uno::Reference<css::frame::XFrame>& rFrame);
+
+#endif // INCLUDED_SVX_DLGCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/dlgutil.hxx b/include/svx/dlgutil.hxx
new file mode 100644
index 000000000..f8b53c0a5
--- /dev/null
+++ b/include/svx/dlgutil.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_DLGUTIL_HXX
+#define INCLUDED_SVX_DLGUTIL_HXX
+
+#include <tools/fldunit.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/rendercontext/DrawModeFlags.hxx>
+
+class SfxItemSet;
+
+SVXCORE_DLLPUBLIC FieldUnit GetModuleFieldUnit(const SfxItemSet&);
+SVXCORE_DLLPUBLIC FieldUnit GetModuleFieldUnit();
+SVXCORE_DLLPUBLIC bool GetApplyCharUnit(const SfxItemSet&);
+
+constexpr DrawModeFlags OUTPUT_DRAWMODE_COLOR = DrawModeFlags::Default;
+constexpr DrawModeFlags OUTPUT_DRAWMODE_CONTRAST
+ = DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText
+ | DrawModeFlags::SettingsGradient;
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/drawitem.hxx b/include/svx/drawitem.hxx
new file mode 100644
index 000000000..d40848c53
--- /dev/null
+++ b/include/svx/drawitem.hxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_DRAWITEM_HXX
+#define INCLUDED_SVX_DRAWITEM_HXX
+
+#include <svl/poolitem.hxx>
+#include <svx/xtable.hxx>
+#include <svx/svxdllapi.h>
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxColorListItem final : public SfxPoolItem
+{
+ XColorListRef pColorList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxColorListItem();
+ SvxColorListItem( XColorListRef const & pTable,
+ TypedWhichId<SvxColorListItem> nWhich );
+ SvxColorListItem( const SvxColorListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxColorListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XColorListRef& GetColorList() const { return pColorList; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxGradientListItem final : public SfxPoolItem
+{
+ XGradientListRef pGradientList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxGradientListItem();
+ SvxGradientListItem( XGradientListRef const & pList,
+ TypedWhichId<SvxGradientListItem> nWhich );
+ SvxGradientListItem( const SvxGradientListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxGradientListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XGradientListRef& GetGradientList() const { return pGradientList; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxHatchListItem final : public SfxPoolItem
+{
+ XHatchListRef pHatchList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxHatchListItem();
+ SvxHatchListItem( XHatchListRef const & pList,
+ TypedWhichId<SvxHatchListItem> nWhich );
+ SvxHatchListItem( const SvxHatchListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxHatchListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XHatchListRef& GetHatchList() const { return pHatchList; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxBitmapListItem final : public SfxPoolItem
+{
+ XBitmapListRef pBitmapList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxBitmapListItem();
+ SvxBitmapListItem( XBitmapListRef const & pBL,
+ TypedWhichId<SvxBitmapListItem> nWhich );
+ SvxBitmapListItem( const SvxBitmapListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxBitmapListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XBitmapListRef& GetBitmapList() const { return pBitmapList; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxPatternListItem final : public SfxPoolItem
+{
+ XPatternListRef pPatternList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxPatternListItem();
+ SvxPatternListItem( XPatternListRef const & pBL,
+ TypedWhichId<SvxPatternListItem> nWhich );
+ SvxPatternListItem( const SvxPatternListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxPatternListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XPatternListRef& GetPatternList() const { return pPatternList; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxDashListItem final : public SfxPoolItem
+{
+ XDashListRef pDashList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxDashListItem();
+ SvxDashListItem( XDashListRef const & pList,
+ TypedWhichId<SvxDashListItem> nWhich );
+ SvxDashListItem( const SvxDashListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxDashListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XDashListRef& GetDashList() const { return pDashList; }
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxLineEndListItem final : public SfxPoolItem
+{
+ XLineEndListRef pLineEndList;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxLineEndListItem();
+ SvxLineEndListItem( XLineEndListRef const & pList,
+ TypedWhichId<SvxLineEndListItem> nWhich );
+ SvxLineEndListItem( const SvxLineEndListItem& );
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxLineEndListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const XLineEndListRef& GetLineEndList() const { return pLineEndList; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/e3ditem.hxx b/include/svx/e3ditem.hxx
new file mode 100644
index 000000000..3a8ad1690
--- /dev/null
+++ b/include/svx/e3ditem.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_E3DITEM_HXX
+#define INCLUDED_SVX_E3DITEM_HXX
+
+#include <svl/poolitem.hxx>
+#include <basegfx/vector/b3dvector.hxx>
+#include <svx/svxdllapi.h>
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxB3DVectorItem final : public SfxPoolItem
+{
+ basegfx::B3DVector aVal;
+
+public:
+ SvxB3DVectorItem( TypedWhichId<SvxB3DVectorItem> nWhich, const basegfx::B3DVector& rVal );
+ SvxB3DVectorItem( const SvxB3DVectorItem& );
+ virtual ~SvxB3DVectorItem() override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxB3DVectorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const basegfx::B3DVector& GetValue() const { return aVal; }
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/e3dsceneupdater.hxx b/include/svx/e3dsceneupdater.hxx
new file mode 100644
index 000000000..bcb6d92fa
--- /dev/null
+++ b/include/svx/e3dsceneupdater.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_E3DSCENEUPDATER_HXX
+#define INCLUDED_SVX_E3DSCENEUPDATER_HXX
+
+#include <svx/svxdllapi.h>
+#include <drawinglayer/geometry/viewinformation3d.hxx>
+#include <optional>
+
+class SdrObject;
+class E3dScene;
+
+/** Helper for 3d object changes affecting 2d geometry
+
+ This class is a helper to encapsulate 3D object changes which shall
+ change the scene's 2D geometry. E.g. when moving one 3D object in a
+ scene, the visualisation would not change since the scene's 2D
+ attributes are defined by its 2D object transformation and the
+ changed content would be projected to the same 2D bounds as
+ before. To reflect the fact that the 2D positions may 'change' for
+ the user's imagination, it is necessary to calculate a new 2D
+ object transformation of the scene (the SnapRect) using the old 3D
+ transformation stack and the possibly modified 3D content and to
+ use it. This is only desirable if changes to the scene's content
+ are intended to change the scene's 2D geometry attributes
+*/
+class SVXCORE_DLLPUBLIC E3DModifySceneSnapRectUpdater
+{
+ // the scene which may be changed. This gets set to the outmost scene
+ // of the to-be-changed 3D object when the scene has a 3d transformation
+ // stack at construction time. In all other cases it's set to zero and
+ // no action needs to be taken
+ E3dScene* mpScene;
+
+ // the 3d transformation stack at the time of construction, valid when
+ // mpScene is not zero
+ std::optional<drawinglayer::geometry::ViewInformation3D> mpViewInformation3D;
+
+public:
+ // the constructor evaluates and sets the members at construction time
+ E3DModifySceneSnapRectUpdater(const SdrObject* mpObject);
+
+ // the destructor will take action if mpScene is not zero and modify the
+ // 2D geometry of the target scene
+ ~E3DModifySceneSnapRectUpdater();
+};
+
+#endif // INCLUDED_SVX_E3DSCENEUPDATER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/e3dundo.hxx b/include/svx/e3dundo.hxx
new file mode 100644
index 000000000..9c0515b86
--- /dev/null
+++ b/include/svx/e3dundo.hxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_E3DUNDO_HXX
+#define INCLUDED_SVX_E3DUNDO_HXX
+
+#include <svl/itemset.hxx>
+#include <svx/svdundo.hxx>
+#include <svx/obj3d.hxx>
+#include <svx/svxdllapi.h>
+
+/************************************************************************\
+|*
+|* Base class for all 3D undo actions.
+|*
+\************************************************************************/
+class SAL_WARN_UNUSED E3dUndoAction : public SdrUndoAction
+{
+ protected:
+ E3dObject& mrMy3DObj;
+
+ public:
+ E3dUndoAction(E3dObject &r3DObj)
+ : SdrUndoAction(r3DObj.getSdrModelFromSdrObject()),
+ mrMy3DObj(r3DObj)
+ {
+ }
+
+ virtual ~E3dUndoAction () override;
+
+ virtual bool CanRepeat(SfxRepeatTarget&) const override;
+};
+
+/************************************************************************\
+|*
+|* Undo for 3D rotation through the rotation matrices
+|*
+\************************************************************************/
+class SAL_WARN_UNUSED E3dRotateUndoAction final : public E3dUndoAction
+{
+private:
+ basegfx::B3DHomMatrix maMyOldRotation;
+ basegfx::B3DHomMatrix maMyNewRotation;
+
+public:
+ E3dRotateUndoAction(
+ E3dObject& r3DObj,
+ const basegfx::B3DHomMatrix &aOldRotation,
+ const basegfx::B3DHomMatrix &aNewRotation)
+ : E3dUndoAction(r3DObj),
+ maMyOldRotation(aOldRotation),
+ maMyNewRotation(aNewRotation)
+ {
+ }
+
+ virtual ~E3dRotateUndoAction () override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+};
+
+/************************************************************************\
+|*
+|* Undo for 3D attributes (implemented using Set3DAttributes())
+|*
+\************************************************************************/
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC E3dAttributesUndoAction final : public SdrUndoAction
+{
+private:
+ using SdrUndoAction::Repeat;
+
+ SdrObject& mrObject;
+ const SfxItemSet maNewSet;
+ const SfxItemSet maOldSet;
+
+ public:
+ E3dAttributesUndoAction(
+ E3dObject& rInObject,
+ const SfxItemSet& rNewSet,
+ const SfxItemSet& rOldSet);
+
+ virtual ~E3dAttributesUndoAction() override;
+
+ virtual bool CanRepeat(SfxRepeatTarget& rView) const override;
+ virtual void Undo() override;
+ virtual void Redo() override;
+};
+
+#endif // INCLUDED_SVX_E3DUNDO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/extedit.hxx b/include/svx/extedit.hxx
new file mode 100644
index 000000000..0168068f6
--- /dev/null
+++ b/include/svx/extedit.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_EXTEDIT_HXX
+#define INCLUDED_SVX_EXTEDIT_HXX
+
+#include <svx/svxdllapi.h>
+#include <svl/lstner.hxx>
+#include <rtl/ustring.hxx>
+#include <memory>
+
+class Graphic;
+class GraphicObject;
+class FileChangedChecker;
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC ExternalToolEdit
+{
+protected:
+ OUString m_aFileName;
+
+ ::std::unique_ptr<FileChangedChecker> m_pChecker;
+
+public:
+
+ ExternalToolEdit();
+ virtual ~ExternalToolEdit();
+
+ virtual void Update( Graphic& aGraphic ) = 0;
+ void Edit(GraphicObject const*const pGraphic);
+
+ void StartListeningEvent();
+
+ static void HandleCloseEvent( ExternalToolEdit* pData );
+};
+
+class FmFormView;
+class SdrObject;
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SdrExternalToolEdit final
+: public ExternalToolEdit
+ ,public SfxListener
+{
+private:
+ FmFormView* m_pView;
+ SdrObject* m_pObj;
+
+ SAL_DLLPRIVATE virtual void Update(Graphic&) override;
+ SAL_DLLPRIVATE virtual void Notify(SfxBroadcaster&, const SfxHint&) override;
+
+public:
+ SdrExternalToolEdit(
+ FmFormView* pView,
+ SdrObject* pObj);
+};
+
+#endif
diff --git a/include/svx/extrusionbar.hxx b/include/svx/extrusionbar.hxx
new file mode 100644
index 000000000..c3bf86ad0
--- /dev/null
+++ b/include/svx/extrusionbar.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_EXTRUSIONBAR_HXX
+#define INCLUDED_SVX_EXTRUSIONBAR_HXX
+
+#include <sfx2/shell.hxx>
+#include <svx/ifaceids.hxx>
+#include <svx/svxdllapi.h>
+
+class SfxViewShell;
+class SdrView;
+
+/************************************************************************/
+
+namespace svx
+{
+SVXCORE_DLLPUBLIC bool checkForSelectedCustomShapes(SdrView const* pSdrView, bool bOnlyExtruded);
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC ExtrusionBar final : public SfxShell
+{
+public:
+ SFX_DECL_INTERFACE(SVX_INTERFACE_EXTRUSION_BAR)
+
+private:
+ /// SfxInterface initializer.
+ static void InitInterface_Impl();
+
+public:
+ ExtrusionBar(SfxViewShell* pViewShell);
+ virtual ~ExtrusionBar() override;
+
+ static void execute(SdrView* pSdrView, SfxRequest const& rReq, SfxBindings& rBindings);
+ static void getState(SdrView const* pSdrView, SfxItemSet& rSet);
+};
+}
+
+#endif // INCLUDED_SVX_EXTRUSIONBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/f3dchild.hxx b/include/svx/f3dchild.hxx
new file mode 100644
index 000000000..1cd46695b
--- /dev/null
+++ b/include/svx/f3dchild.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_F3DCHILD_HXX
+#define INCLUDED_SVX_F3DCHILD_HXX
+
+#include <sfx2/childwin.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Derived from SfxChildWindow as "container" for 3D Window
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DChildWindow final : public SfxChildWindow
+{
+public:
+ Svx3DChildWindow(vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
+
+ SFX_DECL_CHILDWINDOW_WITHID(Svx3DChildWindow);
+};
+
+#endif // INCLUDED_SVX_F3DCHILD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx
new file mode 100644
index 000000000..978f63e35
--- /dev/null
+++ b/include/svx/fillctrl.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FILLCTRL_HXX
+#define INCLUDED_SVX_FILLCTRL_HXX
+
+#include <memory>
+#include <vcl/InterimItemWindow.hxx>
+#include <sfx2/tbxctrl.hxx>
+#include <sfx2/weldutils.hxx>
+#include <svx/svxdllapi.h>
+
+class XFillStyleItem;
+class XFillColorItem;
+class XFillGradientItem;
+class XFillHatchItem;
+class XFillBitmapItem;
+class FillControl;
+
+/*************************************************************************
+|*
+|* Class for surface attributes (controls and controller)
+|*
+\************************************************************************/
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFillToolBoxControl final : public SfxToolBoxControl
+{
+private:
+ std::unique_ptr< XFillStyleItem > mpStyleItem;
+ std::unique_ptr< XFillColorItem > mpColorItem;
+ std::unique_ptr< XFillGradientItem > mpFillGradientItem;
+ std::unique_ptr< XFillHatchItem > mpHatchItem;
+ std::unique_ptr< XFillBitmapItem > mpBitmapItem;
+
+ VclPtr<FillControl> mxFillControl;
+ weld::ComboBox* mpLbFillType;
+ weld::Toolbar* mpToolBoxColor;
+ weld::ComboBox* mpLbFillAttr;
+
+ sal_Int32 mnLastXFS;
+ sal_Int32 mnLastPosGradient;
+ sal_Int32 mnLastPosHatch;
+ sal_Int32 mnLastPosBitmap;
+ sal_Int32 mnLastPosPattern;
+
+ DECL_DLLPRIVATE_LINK(SelectFillTypeHdl, weld::ComboBox&, void);
+ DECL_DLLPRIVATE_LINK(SelectFillAttrHdl, weld::ComboBox&, void);
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFillToolBoxControl(sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx);
+ virtual ~SvxFillToolBoxControl() override;
+
+ virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) override;
+ void Update();
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
+};
+
+class SAL_WARN_UNUSED FillControl final : public InterimItemWindow
+{
+private:
+ friend class SvxFillToolBoxControl;
+
+ std::unique_ptr<weld::ComboBox> mxLbFillType;
+ std::unique_ptr<weld::Toolbar> mxToolBoxColor;
+ std::unique_ptr<ToolbarUnoDispatcher> mxColorDispatch;
+ std::unique_ptr<weld::ComboBox> mxLbFillAttr;
+ int mnTypeCurPos;
+ int mnAttrCurPos;
+
+ DECL_LINK(AttrKeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(TypeKeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(ColorKeyInputHdl, const KeyEvent&, bool);
+ DECL_STATIC_LINK(FillControl, DumpAsPropertyTreeHdl, tools::JsonWriter&, void);
+ DECL_LINK(AttrFocusHdl, weld::Widget&, void);
+ DECL_LINK(TypeFocusHdl, weld::Widget&, void);
+
+ void SetOptimalSize();
+
+ virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
+
+ static void ReleaseFocus_Impl();
+
+public:
+ FillControl(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame);
+ virtual void dispose() override;
+ virtual ~FillControl() override;
+};
+
+#endif // INCLUDED_SVX_FILLCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
new file mode 100644
index 000000000..3fbb70ca6
--- /dev/null
+++ b/include/svx/flagsdef.hxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FLAGSDEF_HXX
+#define INCLUDED_SVX_FLAGSDEF_HXX
+
+#include <o3tl/typed_flags_set.hxx>
+#include <o3tl/enumarray.hxx>
+#include <o3tl/unit_conversion.hxx>
+#include <tools/long.hxx>
+
+// Border-Modes for SvxBorderTabPage
+enum class SwBorderModes
+{
+ NONE = 0x00,
+ PARA = 0x01,
+ TABLE = 0x02,
+ FRAME = 0x04,
+};
+
+namespace o3tl
+{
+ template<> struct typed_flags<SwBorderModes> : is_typed_flags<SwBorderModes, 0x07> {};
+}
+
+// flags for SvxBackgroundTabPage
+enum class SvxBackgroundTabFlags
+{
+ NONE = 0x00,
+ SHOW_SELECTOR = 0x01,
+ SHOW_TBLCTL = 0x08,
+ SHOW_HIGHLIGHTING = 0x10,
+ SHOW_CHAR_BKGCOLOR = 0x20,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxBackgroundTabFlags> : is_typed_flags<SvxBackgroundTabFlags, 0x39> {};
+}
+
+// flags for SvxBorderTabPage
+#define SVX_HIDESHADOWCTL 0x01
+
+#define DISABLE_CASEMAP (sal_uInt16(0x0001))
+#define DISABLE_HIDE_LANGUAGE (sal_uInt16(0x0020))
+
+// flags for SvxCharBasePage's child class
+#define SVX_PREVIEW_CHARACTER 0x01
+// flags for SvxCharNamePage
+#define SVX_RELATIVE_MODE 0x02
+// flags for SvxCharEffectsPage
+#define SVX_ENABLE_CHAR_TRANSPARENCY 0x08
+
+
+// Default values for Number Format Category List and Preview
+enum class SvxNumValCategory
+{
+ Standard = 0,
+ Percent,
+ Currency,
+ Date,
+ Time,
+ Scientific,
+ Fraction,
+ Boolean,
+ NoValue,
+ LAST = NoValue
+};
+const o3tl::enumarray<SvxNumValCategory, double> fSvxNumValConst = {
+ -1234.56789012345678, // SvxNumValCategory::Standard
+ -0.1295, // SvxNumValCategory::Percent
+ -1234.0, // SvxNumValCategory::Currency
+ 36525.5678935185, // SvxNumValCategory::Date
+ 36525.5678935185, // SvxNumValCategory::Time
+ 12345.67889, // SvxNumValCategory::Scientific
+ 123.456, // SvxNumValCategory::Fraction
+ 1.0, // SvxNumValCategory::Boolean
+ 0.0 // SvxNumValCategory::NoValue
+};
+
+enum SvxModeType
+{
+ SVX_PAGE_MODE_STANDARD,
+ SVX_PAGE_MODE_CENTER,
+ SVX_PAGE_MODE_PRESENTATION
+};
+
+// 1/2 cm in TWIPS
+// Is also used for minimum size of LayFrms of any kind
+constexpr tools::Long MM50 = o3tl::convert(tools::Long(5), o3tl::Length::mm, o3tl::Length::twip);
+
+enum class TabulatorDisableFlags {
+ TypeLeft = 0x0001,
+ TypeRight = 0x0002,
+ TypeCenter = 0x0004,
+ TypeDecimal = 0x0008,
+ TypeMask = 0x000F,
+
+ FillNone = 0x0010,
+ FillPoint = 0x0020,
+ FillDashLine = 0x0040,
+ FillSolidLine = 0x0080,
+ FillSpecial = 0x0100,
+ FillMask = 0x01F0
+};
+namespace o3tl {
+ template<> struct typed_flags<TabulatorDisableFlags> : is_typed_flags<TabulatorDisableFlags, 0x1ff> {};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
new file mode 100644
index 000000000..bf68917be
--- /dev/null
+++ b/include/svx/float3d.hxx
@@ -0,0 +1,288 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FLOAT3D_HXX
+#define INCLUDED_SVX_FLOAT3D_HXX
+
+#include <memory>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/dockwin.hxx>
+#include <vcl/weld.hxx>
+#include <svx/svxdllapi.h>
+
+#include <svx/dlgctl3d.hxx>
+
+
+enum class ViewType3D
+{
+ Geo = 1,
+ Representation,
+ Light,
+ Texture,
+ Material
+};
+
+class FmFormModel;
+class Svx3DCtrlItem;
+class SvxConvertTo3DItem;
+class ColorListBox;
+
+struct Svx3DWinImpl;
+
+class SVX_DLLPUBLIC LightButton final
+{
+public:
+ explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton);
+
+ void switchLightOn(bool bOn);
+ bool isLightOn() const { return m_bLightOn;}
+
+ bool get_active() const { return m_xButton->get_active(); }
+ void set_active(bool bActive) { m_xButton->set_active(bActive); }
+
+ TriState get_state() const { return m_xButton->get_state(); }
+ void set_state(TriState eState) { m_xButton->set_state(eState); }
+
+ weld::ToggleButton* get_widget() const { return m_xButton.get(); }
+
+ void connect_clicked(const Link<weld::Button&, void>& rLink)
+ {
+ m_xButton->connect_clicked(rLink);
+ }
+
+ bool get_prev_active() const { return m_bButtonPrevActive; }
+ void set_prev_active(bool bPrevActive) { m_bButtonPrevActive = bPrevActive; }
+
+private:
+ std::unique_ptr<weld::ToggleButton> m_xButton;
+ bool m_bLightOn;
+ bool m_bButtonPrevActive;
+};
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DWin final : public SfxDockingWindow
+{
+ friend class Svx3DChildWindow;
+ friend class Svx3DCtrlItem;
+
+private:
+ std::unique_ptr<weld::ToggleButton> m_xBtnGeo;
+ std::unique_ptr<weld::ToggleButton> m_xBtnRepresentation;
+ std::unique_ptr<weld::ToggleButton> m_xBtnLight;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexture;
+ std::unique_ptr<weld::ToggleButton> m_xBtnMaterial;
+ std::unique_ptr<weld::ToggleButton> m_xBtnUpdate;
+ std::unique_ptr<weld::Button> m_xBtnAssign;
+
+// geometry
+ std::unique_ptr<weld::Container> m_xFLGeometrie;
+ std::unique_ptr<weld::Label> m_xFtPercentDiagonal;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrPercentDiagonal;
+ std::unique_ptr<weld::Label> m_xFtBackscale;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrBackscale;
+ std::unique_ptr<weld::Label> m_xFtEndAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrEndAngle;
+ std::unique_ptr<weld::Label> m_xFtDepth;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrDepth;
+
+ std::unique_ptr<weld::Container> m_xFLSegments;
+ std::unique_ptr<weld::SpinButton> m_xNumHorizontal;
+ std::unique_ptr<weld::SpinButton> m_xNumVertical;
+
+ std::unique_ptr<weld::Container> m_xFLNormals;
+ std::unique_ptr<weld::ToggleButton> m_xBtnNormalsObj;
+ std::unique_ptr<weld::ToggleButton> m_xBtnNormalsFlat;
+ std::unique_ptr<weld::ToggleButton> m_xBtnNormalsSphere;
+ std::unique_ptr<weld::ToggleButton> m_xBtnNormalsInvert;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTwoSidedLighting;
+ std::unique_ptr<weld::ToggleButton> m_xBtnDoubleSided;
+
+// presentation
+ std::unique_ptr<weld::Container> m_xFLRepresentation;
+ std::unique_ptr<weld::ComboBox> m_xLbShademode;
+
+ std::unique_ptr<weld::Container> m_xFLShadow;
+ std::unique_ptr<weld::ToggleButton> m_xBtnShadow3d;
+ std::unique_ptr<weld::Label> m_xFtSlant;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrSlant;
+
+ std::unique_ptr<weld::Container> m_xFLCamera;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFocalLength;
+
+// lighting
+ std::unique_ptr<weld::Container> m_xFLLight;
+ std::unique_ptr<LightButton> m_xBtnLight1;
+ std::unique_ptr<LightButton> m_xBtnLight2;
+ std::unique_ptr<LightButton> m_xBtnLight3;
+ std::unique_ptr<LightButton> m_xBtnLight4;
+ std::unique_ptr<LightButton> m_xBtnLight5;
+ std::unique_ptr<LightButton> m_xBtnLight6;
+ std::unique_ptr<LightButton> m_xBtnLight7;
+ std::unique_ptr<LightButton> m_xBtnLight8;
+ std::unique_ptr<ColorListBox> m_xLbLight1;
+ std::unique_ptr<ColorListBox> m_xLbLight2;
+ std::unique_ptr<ColorListBox> m_xLbLight3;
+ std::unique_ptr<ColorListBox> m_xLbLight4;
+ std::unique_ptr<ColorListBox> m_xLbLight5;
+ std::unique_ptr<ColorListBox> m_xLbLight6;
+ std::unique_ptr<ColorListBox> m_xLbLight7;
+ std::unique_ptr<ColorListBox> m_xLbLight8;
+ std::unique_ptr<weld::Button> m_xBtnLightColor;
+ std::unique_ptr<ColorListBox> m_xLbAmbientlight; // ListBox
+ std::unique_ptr<weld::Button> m_xBtnAmbientColor; // color button
+
+// Textures
+ std::unique_ptr<weld::Container> m_xFLTexture;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexLuminance;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexColor;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexReplace;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexModulate;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexObjectX;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexParallelX;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexCircleX;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexObjectY;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexParallelY;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexCircleY;
+ std::unique_ptr<weld::ToggleButton> m_xBtnTexFilter;
+
+// material
+// material editor
+ std::unique_ptr<weld::Container> m_xFLMaterial;
+ std::unique_ptr<weld::ComboBox> m_xLbMatFavorites;
+ std::unique_ptr<ColorListBox> m_xLbMatColor;
+ std::unique_ptr<weld::Button> m_xBtnMatColor;
+ std::unique_ptr<ColorListBox> m_xLbMatEmission;
+ std::unique_ptr<weld::Button> m_xBtnEmissionColor;
+
+ std::unique_ptr<weld::Container> m_xFLMatSpecular;
+ std::unique_ptr<ColorListBox> m_xLbMatSpecular;
+ std::unique_ptr<weld::Button> m_xBtnSpecularColor;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrMatSpecularIntensity;
+
+ std::unique_ptr<Svx3DPreviewControl> m_xCtlPreview;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPreviewWin;
+
+ std::unique_ptr<weld::Widget> m_xLightPreviewGrid;
+ std::unique_ptr<weld::Scale> m_xHoriScale;
+ std::unique_ptr<weld::Scale> m_xVertScale;
+ std::unique_ptr<weld::Button> m_xBtn_Corner;
+ std::unique_ptr<Svx3DLightControl> m_xLightPreview;
+ std::unique_ptr<weld::CustomWeld> m_xCtlLightPreviewWin;
+ std::unique_ptr<SvxLightCtl3D> m_xCtlLightPreview;
+
+// bottom part
+ std::unique_ptr<weld::Button> m_xBtnConvertTo3D;
+ std::unique_ptr<weld::Button> m_xBtnLatheObject;
+ std::unique_ptr<weld::ToggleButton> m_xBtnPerspective;
+
+// the rest ...
+ bool bUpdate;
+ ViewType3D eViewType;
+
+ // Model, Page, View etc. for favourites
+ std::unique_ptr<FmFormModel> pModel;
+
+ SfxBindings* pBindings;
+ std::unique_ptr<Svx3DCtrlItem> pControllerItem;
+
+ std::unique_ptr<SvxConvertTo3DItem> pConvertTo3DItem;
+ std::unique_ptr<SvxConvertTo3DItem> pConvertTo3DLatheItem;
+
+ std::unique_ptr<Svx3DWinImpl> mpImpl;
+ MapUnit ePoolUnit;
+ FieldUnit eFUnit;
+
+ // ItemSet used to remember set 2d attributes
+ std::unique_ptr<SfxItemSet> mpRemember2DAttributes;
+
+ DECL_DLLPRIVATE_LINK( ClickViewTypeHdl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK( ClickUpdateHdl, weld::Toggleable&, void );
+ DECL_DLLPRIVATE_LINK( ClickAssignHdl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK( ClickHdl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK( ClickColorHdl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK( SelectHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( SelectColorHdl, ColorListBox&, void );
+ DECL_DLLPRIVATE_LINK( ModifyMetricHdl, weld::MetricSpinButton&, void );
+ DECL_DLLPRIVATE_LINK( ModifySpinHdl, weld::SpinButton&, void );
+ void ClickLight(const LightButton& rBtn);
+
+ DECL_DLLPRIVATE_LINK( ChangeSelectionCallbackHdl, SvxLightCtl3D*, void );
+
+ SVX_DLLPRIVATE void Construct();
+ SVX_DLLPRIVATE void Reset();
+
+ SVX_DLLPRIVATE static void LBSelectColor( ColorListBox* pLb, const Color& rColor );
+ SVX_DLLPRIVATE sal_uInt16 GetLightSource( const LightButton* pBtn ) const;
+ SVX_DLLPRIVATE ColorListBox* GetCLbByButton( const LightButton* pBtn = nullptr );
+ SVX_DLLPRIVATE LightButton* GetLbByButton( const weld::Button* pBtn );
+
+ virtual void Resize() override;
+
+public:
+ Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW,
+ vcl::Window* pParent );
+ virtual ~Svx3DWin() override;
+ virtual void dispose() override;
+
+ void InitColorLB();
+ bool IsUpdateMode() const { return bUpdate; }
+
+ void Update( SfxItemSet const & rSet );
+ void GetAttr( SfxItemSet& rSet );
+
+ void UpdatePreview(); // upward (private)
+ void DocumentReload();
+};
+
+/*************************************************************************
+|*
+|* Controller item for 3D Window (Floating/Docking)
+|*
+\************************************************************************/
+
+class Svx3DCtrlItem final : public SfxControllerItem
+{
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSId, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+
+ public:
+ Svx3DCtrlItem( sal_uInt16, SfxBindings* );
+};
+
+/*************************************************************************
+|*
+|* ControllerItem for State of a Slot
+|* (SID_CONVERT_TO_3D, SID_CONVERT_TO_3D_LATHE_FAST)
+|*
+\************************************************************************/
+
+class SvxConvertTo3DItem final : public SfxControllerItem
+{
+ bool bState;
+
+ virtual void StateChangedAtToolBoxControl(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState) override;
+
+public:
+ SvxConvertTo3DItem(sal_uInt16 nId, SfxBindings* pBindings);
+ bool GetState() const { return bState; }
+};
+
+#endif // INCLUDED_SVX_FLOAT3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmdmod.hxx b/include/svx/fmdmod.hxx
new file mode 100644
index 000000000..69ef27704
--- /dev/null
+++ b/include/svx/fmdmod.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMDMOD_HXX
+#define INCLUDED_SVX_FMDMOD_HXX
+
+#include <svx/unomod.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC SvxFmMSFactory : public SvxUnoDrawMSFactory
+{
+public:
+ SvxFmMSFactory(){};
+
+ virtual ~SvxFmMSFactory() {}
+
+ virtual ::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface>
+ SAL_CALL createInstance(const OUString& ServiceSpecifier) override;
+ virtual ::com::sun::star::uno::Sequence<OUString> SAL_CALL getAvailableServiceNames() override;
+};
+
+#endif // INCLUDED_SVX_FMDMOD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx
new file mode 100644
index 000000000..ae864e611
--- /dev/null
+++ b/include/svx/fmdpage.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMDPAGE_HXX
+#define INCLUDED_SVX_FMDPAGE_HXX
+
+#include <com/sun/star/form/XFormsSupplier2.hpp>
+#include <svx/unopage.hxx>
+#include <comphelper/uno3.hxx>
+#include <svx/svxdllapi.h>
+
+
+// SvxFmDrawPage
+
+class SVXCORE_DLLPUBLIC SvxFmDrawPage :public SvxDrawPage
+ ,public css::form::XFormsSupplier2
+{
+protected:
+
+ // Creating a SdrObject based on a Description. Can be used by derived classes to
+ // support own css::drawing::Shapes (for example Controls)
+ virtual SdrObject *CreateSdrObject_( const css::uno::Reference< css::drawing::XShape > & xShape ) override;
+
+ // The following method is called when a SvxShape object should be created.
+ // Derived classes can create a derivation or an object aggregating SvxShape.
+ virtual css::uno::Reference< css::drawing::XShape > CreateShape( SdrObject *pObj ) const override;
+
+public:
+ SvxFmDrawPage( SdrPage* pPage );
+ virtual ~SvxFmDrawPage() noexcept override;
+
+ // UNO binding
+ DECLARE_UNO3_AGG_DEFAULTS(SvxFmDrawPage, SvxDrawPage)
+
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+
+ // XFormsSupplier
+ virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getForms() override;
+
+ // XFormsSupplier2
+ virtual sal_Bool SAL_CALL hasForms() override;
+};
+
+#endif // INCLUDED_SVX_FMDPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx
new file mode 100644
index 000000000..8f3db081e
--- /dev/null
+++ b/include/svx/fmgridcl.hxx
@@ -0,0 +1,202 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMGRIDCL_HXX
+#define INCLUDED_SVX_FMGRIDCL_HXX
+
+#include <svx/gridctrl.hxx>
+#include <vcl/transfer.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::container { class XIndexContainer; }
+namespace com::sun::star::container { class XNameAccess; }
+namespace weld { class Menu; }
+
+// FmGridHeader
+
+struct FmGridHeaderData;
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmGridHeader
+ :public ::svt::EditBrowserHeader
+ ,public DropTargetHelper
+{
+protected:
+ std::unique_ptr<FmGridHeaderData> m_pImpl;
+
+public:
+ FmGridHeader( BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG );
+ virtual ~FmGridHeader() override;
+ virtual void dispose() override;
+
+public:
+ // trigger context menu execution
+ void triggerColumnContextMenu( const ::Point& _rPreferredPos );
+
+protected:
+ virtual void Command( const CommandEvent& rCEvt ) override;
+ virtual void RequestHelp( const HelpEvent& rHEvt ) override;
+ virtual void Select() override;
+
+ /** the value returned by GetItemPos is meaningless for the grid model if there are hidden columns,
+ so use GetModelColumnPos instead
+ */
+ sal_uInt16 GetModelColumnPos(sal_uInt16 nId) const;
+
+ /** This is called before executing a context menu for a column. rMenu contains the initial entries
+ handled by this base class' method (which always has to be called).
+ Derived classes may alter the menu in any way and handle any additional entries in
+ PostExecuteColumnContextMenu.
+ All disabled entries will be removed before executing the menu, so be careful with separators
+ near entries you probably wish to disable ...
+ */
+ virtual void PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rMenu,
+ weld::Menu& rInsertMenu, weld::Menu& rChangeMenu,
+ weld::Menu& rShowMenu);
+ /** After executing the context menu for a column this method is called.
+ */
+ virtual void PostExecuteColumnContextMenu(sal_uInt16 nColId, const weld::Menu& rMenu, const OString& rExecutionResult);
+
+ // DropTargetHelper
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
+
+ /** selects the column at the selection supplier.
+ @param nColumnId
+ The column id.
+ */
+ void notifyColumnSelect(sal_uInt16 nColumnId);
+private:
+ DECL_DLLPRIVATE_LINK( OnAsyncExecuteDrop, void*, void );
+};
+
+
+// FmGridControl
+
+class FmXGridPeer;
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmGridControl : public DbGridControl
+
+{
+ friend class FmGridHeader;
+ friend class FmXGridPeer;
+
+ FmXGridPeer* m_pPeer;
+ sal_Int32 m_nCurrentSelectedColumn; // this is the column model (not the view) position...
+ sal_uInt16 m_nMarkedColumnId;
+ bool m_bSelecting;
+ bool m_bInColumnMove : 1;
+
+public:
+ FmGridControl(
+ const css::uno::Reference< css::uno::XComponentContext >&,
+ vcl::Window* pParent,
+ FmXGridPeer* _pPeer,
+ WinBits nBits);
+
+ // Window
+ virtual void KeyInput( const KeyEvent& rKEvt ) override;
+
+ // css::beans::XPropertyChangeListener
+ void propertyChange(const css::beans::PropertyChangeEvent& evt);
+
+ // css::form::XPositioningListener
+ void positioned();
+
+ // XBound
+ bool commit();
+
+ // css::form::XInsertListener
+ void inserted();
+
+ void markColumn(sal_uInt16 nId);
+ bool isColumnMarked(sal_uInt16 nId) const;
+
+ sal_Int32 GetSelectedColumn() const { return m_nCurrentSelectedColumn;}
+
+ /** return the name of the specified object.
+ @param eObjType
+ The type to ask for
+ @param _nPosition
+ The position of a tablecell (index position), header bar column/row cell
+ @return
+ The name of the specified object.
+ */
+ virtual OUString GetAccessibleObjectName( AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const override;
+
+ /** return the description of the specified object.
+ @param eObjType
+ The type to ask for
+ @param _nPosition
+ The position of a tablecell (index position), header bar column/row cell
+ @return
+ The description of the specified object.
+ */
+ virtual OUString GetAccessibleObjectDescription( AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const override;
+
+protected:
+ virtual void Command(const CommandEvent& rEvt) override;
+
+ virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
+ virtual tools::Long QueryMinimumRowHeight() override;
+ virtual void RowHeightChanged() override;
+ virtual void ColumnResized(sal_uInt16 nId) override;
+ virtual void ColumnMoved(sal_uInt16 nId) override;
+ virtual void DeleteSelectedRows() override;
+ virtual void SetDesignMode(bool bMode) override;
+ virtual void CellModified() override;
+ virtual void HideColumn(sal_uInt16 nId) override;
+ virtual void ShowColumn(sal_uInt16 nId) override;
+
+ bool IsInColumnMove() const {return m_bInColumnMove;}
+
+ virtual void BeginCursorAction() override;
+ virtual void EndCursorAction() override;
+ virtual void Select() override;
+
+ // Initialize columns
+ // a.) only by column description
+ void InitColumnsByModels(const css::uno::Reference< css::container::XIndexContainer >& xColumns);
+ // b.) during alivemode by database fields
+ virtual void InitColumnsByFields(const css::uno::Reference< css::container::XIndexAccess >& xFields) override;
+
+ // some kind of impl version (for one single column) of our version of InitColumnsByFields
+ static void InitColumnByField(
+ DbGridColumn* _pColumn,
+ const css::uno::Reference< css::beans::XPropertySet >& _rxColumnModel,
+ const css::uno::Reference< css::container::XNameAccess >& _rxFieldsByNames,
+ const css::uno::Reference< css::container::XIndexAccess >& _rxFieldsByIndex
+ );
+
+ FmXGridPeer* GetPeer() const {return m_pPeer;}
+
+ css::uno::Sequence< css::uno::Any>
+ getSelectionBookmarks();
+ bool selectBookmarks(const css::uno::Sequence< css::uno::Any>& _rBookmarks);
+
+ /** returns if a column is selected
+ @param _pColumn
+ The column to compare with.
+ @return
+ <TRUE/> if the column is selected, otherwise <FALSE/>
+ */
+ bool isColumnSelected(DbGridColumn const * _pColumn) const;
+};
+
+#endif // INCLUDED_SVX_FMGRIDCL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmgridif.hxx b/include/svx/fmgridif.hxx
new file mode 100644
index 000000000..668eb1335
--- /dev/null
+++ b/include/svx/fmgridif.hxx
@@ -0,0 +1,534 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMGRIDIF_HXX
+#define INCLUDED_SVX_FMGRIDIF_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#include <com/sun/star/sdb/XRowSetSupplier.hpp>
+#include <com/sun/star/form/XResetListener.hpp>
+#include <com/sun/star/form/XBoundComponent.hpp>
+#include <com/sun/star/form/XLoadListener.hpp>
+#include <com/sun/star/form/XGridControl.hpp>
+#include <com/sun/star/form/XGridPeer.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/util/XModeSelector.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+
+#include <tools/wintypes.hxx>
+#include <toolkit/controls/unocontrol.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
+#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/servicehelper.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase10.hxx>
+#include <memory>
+
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::uno { class XComponentContext; }
+
+class DbGridColumn;
+enum class DbGridControlNavigationBarState;
+
+class SAL_WARN_UNUSED OWeakSubObject : public ::cppu::OWeakObject
+{
+protected:
+ ::cppu::OWeakObject& m_rParent;
+
+public:
+ OWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
+
+ virtual void SAL_CALL acquire() noexcept override { m_rParent.acquire(); }
+ virtual void SAL_CALL release() noexcept override { m_rParent.release(); }
+};
+
+
+// FmXModifyMultiplexer
+
+class SAL_WARN_UNUSED FmXModifyMultiplexer final : public OWeakSubObject
+ ,public ::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener>
+ ,public css::util::XModifyListener
+{
+public:
+ FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer,OWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+// css::util::XModifyListener
+ virtual void SAL_CALL modified(const css::lang::EventObject& Source) override;
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
+ using OWeakSubObject::operator new;
+ using OWeakSubObject::operator delete;
+};
+
+
+// FmXUpdateMultiplexer
+
+class SAL_WARN_UNUSED FmXUpdateMultiplexer final : public OWeakSubObject,
+ public ::comphelper::OInterfaceContainerHelper3<css::form::XUpdateListener>,
+ public css::form::XUpdateListener
+{
+public:
+ FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer,OWeakSubObject)
+
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+// css::form::XUpdateListener
+ virtual sal_Bool SAL_CALL approveUpdate(const css::lang::EventObject &) override;
+ virtual void SAL_CALL updated(const css::lang::EventObject &) override;
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
+ using OWeakSubObject::operator new;
+ using OWeakSubObject::operator delete;
+};
+
+
+// FmXSelectionMultiplexer
+
+class SAL_WARN_UNUSED FmXSelectionMultiplexer final : public OWeakSubObject
+ ,public ::comphelper::OInterfaceContainerHelper3<css::view::XSelectionChangeListener>
+ ,public css::view::XSelectionChangeListener
+{
+public:
+ FmXSelectionMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer, OWeakSubObject)
+
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+// css::view::XSelectionChangeListener
+ virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
+ using OWeakSubObject::operator new;
+ using OWeakSubObject::operator delete;
+};
+
+
+// FmXGridControlMultiplexer
+
+class SAL_WARN_UNUSED FmXGridControlMultiplexer final : public OWeakSubObject
+ ,public ::comphelper::OInterfaceContainerHelper3<css::form::XGridControlListener>
+ ,public css::form::XGridControlListener
+{
+public:
+ FmXGridControlMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer, OWeakSubObject )
+
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+// css::view::XSelectionChangeListener
+ virtual void SAL_CALL columnChanged( const css::lang::EventObject& _event ) override;
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
+ using OWeakSubObject::operator new;
+ using OWeakSubObject::operator delete;
+};
+
+
+// FmXContainerMultiplexer
+
+class SAL_WARN_UNUSED FmXContainerMultiplexer final : public OWeakSubObject,
+ public ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener>,
+ public css::container::XContainerListener
+{
+public:
+ FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer,OWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+// css::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& Event) override;
+ virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& Event) override;
+ virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& Event) override;
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators
+ using OWeakSubObject::operator new;
+ using OWeakSubObject::operator delete;
+};
+
+
+// FmXGridControl
+
+typedef ::cppu::ImplHelper10< css::form::XBoundComponent,
+ css::form::XGridControl,
+ css::util::XModifyBroadcaster,
+ css::container::XIndexAccess,
+ css::container::XEnumerationAccess,
+ css::util::XModeSelector,
+ css::container::XContainer,
+ css::frame::XDispatchProvider,
+ css::frame::XDispatchProviderInterception,
+ css::view::XSelectionSupplier
+ > FmXGridControl_BASE;
+
+class FmXGridPeer;
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmXGridControl :public UnoControl
+ ,public FmXGridControl_BASE
+{
+ FmXModifyMultiplexer m_aModifyListeners;
+ FmXUpdateMultiplexer m_aUpdateListeners;
+ FmXContainerMultiplexer m_aContainerListeners;
+ FmXSelectionMultiplexer m_aSelectionListeners;
+ FmXGridControlMultiplexer m_aGridControlListeners;
+
+protected:
+ bool m_bInDraw;
+
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
+public:
+ FmXGridControl(const css::uno::Reference< css::uno::XComponentContext >&);
+ virtual ~FmXGridControl() override;
+
+ // UNO binding
+ DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl, UnoControl)
+ virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
+
+// XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type> SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override;
+
+// css::lang::XComponent
+ virtual void SAL_CALL dispose() override;
+
+// css::lang::XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+// css::awt::XControl
+ virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit >& _rToolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent) override;
+ virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& Model) override;
+ virtual void SAL_CALL setDesignMode(sal_Bool bOn) override;
+
+// css::awt::XView
+ virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) override;
+
+// css::form::XBoundComponent
+ virtual void SAL_CALL addUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
+ virtual void SAL_CALL removeUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
+ virtual sal_Bool SAL_CALL commit() override;
+
+// css::container::XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) override;
+ virtual sal_Bool SAL_CALL hasElements( ) override;
+
+// css::container::XEnumerationAccess
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
+
+// css::container::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() override;
+ virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override;
+
+// css::form::XGridControl
+ virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
+ virtual void SAL_CALL removeGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
+
+// css::form::XGrid (base of XGridControl)
+ virtual sal_Int16 SAL_CALL getCurrentColumnPosition() override;
+ virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) override;
+
+// css::form::XGridFieldDataSupplier (base of XGridControl)
+ virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const css::uno::Type& xType ) override;
+ virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const css::uno::Type& xType ) override;
+
+// UnoControl
+ virtual OUString GetComponentServiceName() const override;
+
+// css::util::XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
+ virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
+
+// css::util::XModeSelector
+ virtual void SAL_CALL setMode(const OUString& Mode) override;
+ virtual OUString SAL_CALL getMode() override;
+ virtual css::uno::Sequence< OUString> SAL_CALL getSupportedModes() override;
+ virtual sal_Bool SAL_CALL supportsMode(const OUString& Mode) override;
+
+// css::container::XContainer
+ virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
+ virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
+
+// css::frame::XDispatchProvider
+ virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
+
+// css::frame::XDispatchProviderInterception
+ virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
+ virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
+
+// css::view::XSelectionSupplier
+ virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
+ virtual css::uno::Any SAL_CALL getSelection( ) override;
+ virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
+ virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
+
+// css::awt::XWindow
+ virtual void SAL_CALL setFocus() override;
+
+protected:
+ virtual rtl::Reference<FmXGridPeer> imp_CreatePeer(vcl::Window* pParent);
+ // ImplCreatePeer would be better, but doesn't work because it's not exported
+};
+
+// FmXGridPeer -> Peer for the Gridcontrol
+class FmGridControl;
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmXGridPeer:
+ public cppu::ImplInheritanceHelper<
+ VCLXWindow,
+ css::form::XGridPeer,
+ css::form::XBoundComponent,
+ css::form::XGridControl,
+ css::sdb::XRowSetSupplier,
+ css::util::XModifyBroadcaster,
+ css::beans::XPropertyChangeListener,
+ css::container::XContainerListener,
+ css::sdbc::XRowSetListener,
+ css::form::XLoadListener,
+ css::view::XSelectionChangeListener,
+ css::container::XIndexAccess,
+ css::container::XEnumerationAccess,
+ css::util::XModeSelector,
+ css::container::XContainer,
+ css::frame::XStatusListener,
+ css::frame::XDispatchProvider,
+ css::frame::XDispatchProviderInterception,
+ css::form::XResetListener,
+ css::view::XSelectionSupplier>
+{
+protected:
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ ::osl::Mutex m_aMutex;
+
+private:
+ css::uno::Reference< css::container::XIndexContainer > m_xColumns;
+ css::uno::Reference< css::sdbc::XRowSet > m_xCursor;
+ ::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener> m_aModifyListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XUpdateListener> m_aUpdateListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::view::XSelectionChangeListener> m_aSelectionListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::form::XGridControlListener> m_aGridControlListeners;
+
+ OUString m_aMode;
+ sal_Int32 m_nCursorListening;
+
+ css::uno::Reference< css::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor;
+
+ bool m_bInterceptingDispatch;
+
+ std::unique_ptr<bool[]> m_pStateCache;
+ // one bool for each supported url
+ std::unique_ptr<css::uno::Reference< css::frame::XDispatch >[]> m_pDispatchers;
+ // one dispatcher for each supported url
+ // (I would like to have a vector here but including the stl in an exported file seems
+ // very risky to me...)
+
+ class SAL_DLLPRIVATE GridListenerDelegator;
+ friend class GridListenerDelegator;
+ std::unique_ptr<GridListenerDelegator> m_pGridListener;
+
+public:
+ FmXGridPeer(const css::uno::Reference< css::uno::XComponentContext >&);
+ virtual ~FmXGridPeer() override;
+
+ // late constructor, to always be called after the real constructor!
+ void Create(vcl::Window* pParent, WinBits nStyle);
+
+// css::lang::XUnoTunnel
+ UNO3_GETIMPLEMENTATION_DECL(FmXGridPeer)
+
+// css::form::XGridPeer
+ virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getColumns( ) override;
+ virtual void SAL_CALL setColumns( const css::uno::Reference< css::container::XIndexContainer >& aColumns ) override final;
+
+// css::lang::XComponent
+ virtual void SAL_CALL dispose() override;
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+// css::form::XBoundComponent
+ virtual void SAL_CALL addUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
+ virtual void SAL_CALL removeUpdateListener(const css::uno::Reference< css::form::XUpdateListener >& l) override;
+ virtual sal_Bool SAL_CALL commit() override;
+
+// css::container::XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) override;
+ virtual sal_Bool SAL_CALL hasElements( ) override;
+
+// css::container::XEnumerationAccess
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
+
+// css::container::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() override;
+ virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override;
+
+// css::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
+
+// css::form::XLoadListener
+ virtual void SAL_CALL loaded(const css::lang::EventObject& rEvent) override;
+ virtual void SAL_CALL unloaded(const css::lang::EventObject& rEvent) override;
+ virtual void SAL_CALL unloading(const css::lang::EventObject& aEvent) override;
+ virtual void SAL_CALL reloading(const css::lang::EventObject& aEvent) override;
+ virtual void SAL_CALL reloaded(const css::lang::EventObject& aEvent) override;
+
+// css::sdbc::XRowSetListener
+ virtual void SAL_CALL cursorMoved(const css::lang::EventObject& event) override;
+ virtual void SAL_CALL rowChanged(const css::lang::EventObject& event) override;
+ virtual void SAL_CALL rowSetChanged(const css::lang::EventObject& event) override;
+
+// css::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& Event) override;
+ virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& Event) override;
+ virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& Event) override;
+
+// VCLXWindow
+ virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+ virtual css::uno::Reference< css::accessibility::XAccessibleContext >
+ CreateAccessibleContext() override;
+
+// css::form::XGridControl
+ virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
+ virtual void SAL_CALL removeGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override;
+
+// css::form::XGrid (base of XGridControl)
+ virtual sal_Int16 SAL_CALL getCurrentColumnPosition() override;
+ virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) override;
+
+// css::form::XGridFieldDataSupplier (base of XGridControl)
+ virtual css::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const css::uno::Type& xType ) override;
+ virtual css::uno::Sequence< css::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const css::uno::Type& xType ) override;
+
+// css::sdb::XRowSetSupplier
+ virtual css::uno::Reference< css::sdbc::XRowSet > SAL_CALL getRowSet() override;
+ virtual void SAL_CALL setRowSet(const css::uno::Reference< css::sdbc::XRowSet >& xDataSource) override final;
+
+// css::util::XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
+ virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener >& l) override;
+
+// UnoControl
+ virtual void SAL_CALL setDesignMode(sal_Bool bOn) override;
+ virtual sal_Bool SAL_CALL isDesignMode() override;
+
+// css::view::XSelectionChangeListener
+ virtual void SAL_CALL selectionChanged(const css::lang::EventObject& aEvent) override;
+
+ void CellModified();
+
+// PropertyListening
+ void updateGrid(const css::uno::Reference< css::sdbc::XRowSet >& _rDatabaseCursor);
+ void startCursorListening();
+ void stopCursorListening();
+
+// css::util::XModeSelector
+ virtual void SAL_CALL setMode(const OUString& Mode) override;
+ virtual OUString SAL_CALL getMode() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedModes() override;
+ virtual sal_Bool SAL_CALL supportsMode(const OUString& Mode) override;
+
+// css::container::XContainer
+ virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
+ virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener >& l) override;
+
+ void columnVisible(DbGridColumn const * pColumn);
+ void columnHidden(DbGridColumn const * pColumn);
+
+// css::awt::XView
+ virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) override;
+
+// css::frame::XDispatchProvider
+ virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
+
+// css::frame::XDispatchProviderInterception
+ virtual void SAL_CALL registerDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
+ virtual void SAL_CALL releaseDispatchProviderInterceptor(const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& xInterceptor) override;
+
+// css::frame::XStatusListener
+ virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& Event) override;
+
+// css::form::XResetListener
+ virtual sal_Bool SAL_CALL approveReset(const css::lang::EventObject& rEvent) override;
+ virtual void SAL_CALL resetted(const css::lang::EventObject& rEvent) override;
+
+// css::view::XSelectionSupplier
+ virtual sal_Bool SAL_CALL select( const css::uno::Any& aSelection ) override;
+ virtual css::uno::Any SAL_CALL getSelection( ) override;
+ virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
+ virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) override;
+
+protected:
+ virtual VclPtr<FmGridControl> imp_CreateControl(vcl::Window* pParent, WinBits nStyle);
+
+ static css::uno::Sequence< css::util::URL>& getSupportedURLs();
+ static const std::vector<DbGridControlNavigationBarState>& getSupportedGridSlots();
+ void ConnectToDispatcher();
+ void DisConnectFromDispatcher();
+ void UpdateDispatches(); // will connect if not already connected and just update else
+
+ /** If a derived class wants to listen at some column properties, it doesn't have
+ to override all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
+ Instead it may use addColumnListeners and removeColumnListeners which are called in all
+ the cases.
+ */
+ void addColumnListeners(const css::uno::Reference< css::beans::XPropertySet >& xCol);
+ void removeColumnListeners(const css::uno::Reference< css::beans::XPropertySet >& xCol);
+
+ void selectionChanged();
+ void columnChanged();
+
+ DECL_DLLPRIVATE_LINK(OnQueryGridSlotState, DbGridControlNavigationBarState, int);
+ DECL_DLLPRIVATE_LINK(OnExecuteGridSlot, DbGridControlNavigationBarState, bool);
+};
+
+
+#endif // _SVX_FMGRID_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmmodel.hxx b/include/svx/fmmodel.hxx
new file mode 100644
index 000000000..15577d1dc
--- /dev/null
+++ b/include/svx/fmmodel.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMMODEL_HXX
+#define INCLUDED_SVX_FMMODEL_HXX
+
+#include <svx/svdmodel.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class SfxObjectShell;
+class SfxItemPool;
+class FmXUndoEnvironment;
+
+struct FmFormModelImplData;
+class SVXCORE_DLLPUBLIC FmFormModel :
+ public SdrModel
+{
+private:
+ std::unique_ptr<FmFormModelImplData> m_pImpl;
+ SfxObjectShell* m_pObjShell;
+
+ bool m_bOpenInDesignMode : 1;
+ bool m_bAutoControlFocus : 1;
+
+ FmFormModel( const FmFormModel& ) = delete;
+ void operator=(const FmFormModel& rSrcModel) = delete;
+
+public:
+ FmFormModel(
+ SfxItemPool* pPool = nullptr,
+ SfxObjectShell* pPers = nullptr);
+
+ virtual ~FmFormModel() override;
+
+ virtual rtl::Reference<SdrPage> AllocPage(bool bMasterPage) override;
+ virtual void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) override;
+ virtual rtl::Reference<SdrPage> RemovePage(sal_uInt16 nPgNum) override;
+ virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) override;
+ virtual rtl::Reference<SdrPage> RemoveMasterPage(sal_uInt16 nPgNum) override;
+
+ SfxObjectShell* GetObjectShell() const { return m_pObjShell; }
+ void SetObjectShell( SfxObjectShell* pShell );
+
+ bool GetOpenInDesignMode() const { return m_bOpenInDesignMode; }
+ void SetOpenInDesignMode( bool _bOpenDesignMode );
+
+ bool GetAutoControlFocus() const { return m_bAutoControlFocus; }
+ void SetAutoControlFocus( bool _bAutoControlFocus );
+
+ /** check whether the OpenInDesignMode has been set explicitly or been loaded (<FALSE/>)
+ or if it still has the default value from construction (<TRUE/>)
+ */
+ bool OpenInDesignModeIsDefaulted();
+
+ /** determines whether form controls should use the SdrModel's reference device for text rendering
+ */
+ bool ControlsUseRefDevice() const;
+
+ FmXUndoEnvironment& GetUndoEnv();
+
+private:
+ void implSetOpenInDesignMode( bool _bOpenDesignMode );
+};
+
+#endif // _FM_FMMODEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmobjfac.hxx b/include/svx/fmobjfac.hxx
new file mode 100644
index 000000000..f165cf7b2
--- /dev/null
+++ b/include/svx/fmobjfac.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMOBJFAC_HXX
+#define INCLUDED_SVX_FMOBJFAC_HXX
+
+#include <tools/link.hxx>
+#include <svx/svxdllapi.h>
+
+class SdrObject;
+struct SdrObjCreatorParams;
+
+class SVX_DLLPUBLIC FmFormObjFactory
+{
+public:
+ FmFormObjFactory();
+
+ DECL_DLLPRIVATE_STATIC_LINK(FmFormObjFactory, MakeObject, SdrObjCreatorParams, SdrObject*);
+};
+
+#endif // _FM_FMOBJFAC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmpage.hxx b/include/svx/fmpage.hxx
new file mode 100644
index 000000000..f8b3c11cb
--- /dev/null
+++ b/include/svx/fmpage.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMPAGE_HXX
+#define INCLUDED_SVX_FMPAGE_HXX
+
+#include <memory>
+#include <svx/svdpage.hxx>
+#include <svx/svxdllapi.h>
+
+class FmFormModel;
+class FmFormPageImpl; // contains a list of all forms
+
+namespace com::sun::star {
+ namespace form {
+ class XForms;
+ }
+}
+
+class SdrView;
+class HelpEvent;
+
+class SVXCORE_DLLPUBLIC FmFormPage : public SdrPage
+{
+ FmFormPage& operator=(const FmFormPage&) = delete;
+ FmFormPage(const FmFormPage&) = delete;
+
+ friend class FmFormObj;
+ std::unique_ptr<FmFormPageImpl> m_pImpl;
+ OUString m_sPageName;
+
+public:
+
+ explicit FmFormPage(FmFormModel& rModel, bool bMasterPage=false);
+ virtual ~FmFormPage() override;
+
+ virtual rtl::Reference<SdrPage> CloneSdrPage(SdrModel& rTargetModel) const override;
+
+ virtual void InsertObject(SdrObject* pObj, size_t nPos = SAL_MAX_SIZE) override;
+
+ virtual SdrObject* RemoveObject(size_t nObjNum) override;
+
+ // access to all forms
+ const css::uno::Reference< css::form::XForms>& GetForms( bool _bForceCreate = true ) const;
+
+ FmFormPageImpl& GetImpl() const { return *m_pImpl; }
+
+public:
+ const OUString& GetName() const { return m_sPageName; }
+ void SetName( const OUString& rName ) { m_sPageName = rName; }
+ static bool RequestHelp(
+ vcl::Window* pWin,
+ SdrView const * pView,
+ const HelpEvent& rEvt );
+
+protected:
+ // lateInit -> copyValuesToClonedInstance (?)
+ void lateInit(const FmFormPage& rPage);
+};
+
+#endif // INCLUDED_SVX_FMPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmsearch.hxx b/include/svx/fmsearch.hxx
new file mode 100644
index 000000000..bb0d303d1
--- /dev/null
+++ b/include/svx/fmsearch.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMSEARCH_HXX
+#define INCLUDED_SVX_FMSEARCH_HXX
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <vector>
+
+namespace com::sun::star::sdbc { class XResultSet; }
+
+// Helper methods
+
+SVXCORE_DLLPUBLIC bool IsSearchableControl( const css::uno::Reference< css::uno::XInterface>& _xControl,
+ OUString* pCurrentText = nullptr);
+ // check if the control has one of the interfaces we can use for searching
+ // *pCurrentText will be filled with the current text of the control (as used when searching this control)
+
+
+// Helper structs
+
+struct FmFoundRecordInformation
+{
+ css::uno::Any aPosition; // bookmark of the record in which the text was found
+ sal_Int16 nFieldPos; // ditto: the relative position of the column (in the string name of the field list in the constructor)
+ sal_Int16 nContext; // the context in which was searched and found (if the current search knows several contexts)
+};
+
+// FmSearchContext - information for the search in different contexts
+
+struct FmSearchContext
+{
+ // [in]
+ sal_Int16 nContext; // the number of the context
+ // [out]
+ css::uno::Reference< css::sdbc::XResultSet>
+ xCursor; // the iterator for the context
+ OUString strUsedFields; // a list of field names separated by ';'
+ ::std::vector< css::uno::Reference< css::uno::XInterface > >
+ arrFields; // the corresponding text interfaces for the fields in strUsedFields
+ OUString sFieldDisplayNames; // if not empty: names to be displayed for the searchable fields (must have the same token count as strUsedFields!)
+};
+
+#endif // INCLUDED_SVX_FMSEARCH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx
new file mode 100644
index 000000000..765f4eabc
--- /dev/null
+++ b/include/svx/fmshell.hxx
@@ -0,0 +1,171 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMSHELL_HXX
+#define INCLUDED_SVX_FMSHELL_HXX
+
+// ***************************************************************************************************
+// ***************************************************************************************************
+// ***************************************************************************************************
+
+#include <memory>
+#include <rtl/ref.hxx>
+#include <sfx2/shell.hxx>
+#include <vcl/outdev.hxx>
+
+#include <svx/svxdllapi.h>
+#include <svx/ifaceids.hxx>
+#include <svl/hint.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+class FmFormModel;
+class FmFormPage;
+class FmXFormShell;
+class FmFormView;
+class SdrView;
+class SdrUnoObj;
+class LinkParamNone;
+
+namespace com::sun::star::form {
+ class XForm;
+ namespace runtime {
+ class XFormController;
+ }
+}
+
+namespace com::sun::star::awt { class XControl; }
+namespace com::sun::star::awt { class XControlModel; }
+template <typename Arg, typename Ret> class Link;
+
+namespace svx
+{
+ class ISdrObjectFilter;
+}
+
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FmDesignModeChangedHint final : public SfxHint
+{
+ bool m_bDesignMode;
+
+public:
+ FmDesignModeChangedHint( bool bDesMode );
+ virtual ~FmDesignModeChangedHint() override;
+
+ bool GetDesignMode() const { return m_bDesignMode; }
+};
+
+class SVXCORE_DLLPUBLIC FmFormShell final : public SfxShell
+{
+ friend class FmFormView;
+ friend class FmXFormShell;
+
+ rtl::Reference<FmXFormShell> m_pImpl;
+ FmFormView* m_pFormView;
+ FmFormModel* m_pFormModel;
+
+ sal_uInt16 m_nLastSlot;
+ bool m_bDesignMode : 1;
+ bool m_bHasForms : 1; // flag storing if the forms on a page exist,
+ // only for the DesignMode, see UIFeatureChanged!
+
+ // the marks of a FormView have changed...
+ void NotifyMarkListChanged(FmFormView*);
+ // (the FormView itself is not a broadcaster, therefore it can't always correctly notify the
+ // form explorer who is interested in the event)
+
+public:
+ SFX_DECL_INTERFACE(SVX_INTERFACE_FORM_SH)
+
+private:
+ /// SfxInterface initializer.
+ static void InitInterface_Impl();
+
+public:
+ FmFormShell(SfxViewShell* pParent, FmFormView* pView = nullptr);
+ virtual ~FmFormShell() override;
+
+ void Execute( SfxRequest& );
+ void GetState( SfxItemSet& );
+ virtual bool HasUIFeature(SfxShellFeature nFeature) const override;
+
+ void ExecuteTextAttribute( SfxRequest& );
+ void GetTextAttributeState( SfxItemSet& );
+
+ bool GetY2KState(sal_uInt16& nReturn);
+ void SetY2KState(sal_uInt16 n);
+
+ void SetView(FmFormView* pView);
+
+ FmFormView* GetFormView() const { return m_pFormView; }
+ FmFormModel* GetFormModel() const { return m_pFormModel; }
+ FmFormPage* GetCurPage() const;
+ FmXFormShell* GetImpl() const {return m_pImpl.get();};
+
+ bool PrepareClose(bool bUI = true);
+
+ bool IsActiveControl() const;
+ void ForgetActiveControl();
+ void SetControlActivationHandler( const Link<LinkParamNone*,void>& _rHdl );
+
+ virtual void Activate(bool bMDI) override;
+ virtual void Deactivate(bool bMDI) override;
+
+ // helper methods for implementing XFormLayerAccess
+ SdrUnoObj* GetFormControl(
+ const css::uno::Reference< css::awt::XControlModel >& _rxModel,
+ const SdrView& _rView,
+ const OutputDevice& _rDevice,
+ css::uno::Reference< css::awt::XControl >& _out_rxControl
+ ) const;
+
+ static css::uno::Reference< css::form::runtime::XFormController > GetFormController(
+ const css::uno::Reference< css::form::XForm >& _rxForm,
+ const SdrView& _rView,
+ const OutputDevice& _rDevice
+ );
+
+ /** puts the focus into the document window, if current a form control has the focus. Otherwise, moves the focus
+ to the control belonging to the given SdrUnoObj.
+ */
+ void ToggleControlFocus(
+ const SdrUnoObj& i_rNextCandidate,
+ const SdrView& i_rView,
+ const OutputDevice& i_rDevice
+ ) const;
+
+ static ::std::unique_ptr< svx::ISdrObjectFilter >
+ CreateFocusableControlFilter(
+ const SdrView& i_rView,
+ const OutputDevice& i_rDevice
+ );
+
+ virtual bool IsDesignMode() const override { return m_bDesignMode; }
+ void SetDesignMode( bool _bDesignMode );
+
+private:
+ void GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich);
+
+ // is there a form on the current page?
+ void DetermineForms(bool bInvalidate);
+ void impl_setDesignMode( bool bDesign);
+};
+
+#endif // INCLUDED_SVX_FMSHELL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmsrccfg.hxx b/include/svx/fmsrccfg.hxx
new file mode 100644
index 000000000..ea8e80fe7
--- /dev/null
+++ b/include/svx/fmsrccfg.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMSRCCFG_HXX
+#define INCLUDED_SVX_FMSRCCFG_HXX
+
+#include <unotools/configvaluecontainer.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <svx/svxdllapi.h>
+
+enum class TransliterationFlags;
+
+#define MATCHING_ANYWHERE 0
+#define MATCHING_BEGINNING 1
+#define MATCHING_END 2
+#define MATCHING_WHOLETEXT 3
+
+// this constants should NOT be just changed, since the SearchDialog performs no conversion of the settings of
+// its ListBox, but instead just passes them along to the appropriate methods of SearchEngine
+// (so if you change the constants or the order of the listbox entries in the dialog, then the other has
+// to be adapted)
+
+
+namespace svxform
+{
+
+
+ // = struct FmSearchParams - parameters of a search
+
+
+ struct SVX_DLLPUBLIC FmSearchParams
+ {
+ protected:
+ TransliterationFlags
+ nTransliterationFlags;
+ // they're way too sensitive for direct access...
+
+ public:
+ // no bit fields at all (want to pass the addresses to the OConfigurationValueContainer)
+ css::uno::Sequence< OUString >
+ aHistory;
+ OUString sSingleSearchField;
+
+ sal_Int16 nSearchForType;
+ sal_Int16 nPosition;
+ sal_Int16 nLevOther;
+ sal_Int16 nLevShorter;
+ sal_Int16 nLevLonger;
+ bool bLevRelaxed;
+
+ bool bAllFields;
+ bool bUseFormatter;
+ bool bBackwards;
+ bool bWildcard;
+ bool bRegular;
+ bool bApproxSearch;
+ // the last three are mutually exclusive
+
+ bool bSoundsLikeCJK;
+
+
+ FmSearchParams();
+
+ bool isIgnoreWidthCJK( ) const;
+
+ TransliterationFlags
+ getTransliterationFlags( ) const { return nTransliterationFlags; }
+ void setTransliterationFlags( TransliterationFlags _nFlags ) { nTransliterationFlags = _nFlags; }
+
+ bool isCaseSensitive( ) const;
+ void setCaseSensitive( bool _bCase );
+ };
+
+
+ // = class FmSearchConfigItem - a ConfigItem, that remembers search parameters
+
+
+ class SAL_WARN_UNUSED SVX_DLLPUBLIC FmSearchConfigItem
+ :protected FmSearchParams
+ ,public ::utl::OConfigurationValueContainer
+ // order matters!
+ {
+ private:
+ ::osl::Mutex m_aMutex;
+
+ // wrapper properties:
+ // some of the members of FmSearchParams are must be translated to be stored in the configuration
+ OUString m_sSearchForType;
+ OUString m_sSearchPosition;
+
+ bool m_bIsMatchCase;
+ bool m_bIsMatchFullHalfWidthForms;
+ bool m_bIsMatchHiraganaKatakana;
+ bool m_bIsMatchContractions;
+ bool m_bIsMatchMinusDashCho_on;
+ bool m_bIsMatchRepeatCharMarks;
+ bool m_bIsMatchVariantFormKanji;
+ bool m_bIsMatchOldKanaForms;
+ bool m_bIsMatch_DiZi_DuZu;
+ bool m_bIsMatch_BaVa_HaFa;
+ bool m_bIsMatch_TsiThiChi_DhiZi;
+ bool m_bIsMatch_HyuIyu_ByuVyu;
+ bool m_bIsMatch_SeShe_ZeJe;
+ bool m_bIsMatch_IaIya;
+ bool m_bIsMatch_KiKu;
+ bool m_bIsIgnorePunctuation;
+ bool m_bIsIgnoreWhitespace;
+ bool m_bIsIgnoreProlongedSoundMark;
+ bool m_bIsIgnoreMiddleDot;
+
+ public:
+ FmSearchConfigItem();
+ ~FmSearchConfigItem();
+
+ const FmSearchParams& getParams( ) const;
+ void setParams( const FmSearchParams& _rParams );
+
+ private:
+ SVX_DLLPRIVATE void implTranslateFromConfig( );
+ SVX_DLLPRIVATE void implTranslateToConfig( );
+ };
+
+
+}
+
+
+#endif // INCLUDED_SVX_FMSRCCFG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmsrcimp.hxx b/include/svx/fmsrcimp.hxx
new file mode 100644
index 000000000..fdcf12fa3
--- /dev/null
+++ b/include/svx/fmsrcimp.hxx
@@ -0,0 +1,350 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMSRCIMP_HXX
+#define INCLUDED_SVX_FMSRCIMP_HXX
+
+#include <svx/fmtools.hxx>
+#include <svx/svxdllapi.h>
+
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+
+#include <cppuhelper/implbase.hxx>
+#include <unotools/charclass.hxx>
+#include <unotools/collatorwrapper.hxx>
+#include <tools/link.hxx>
+
+#include <atomic>
+#include <deque>
+#include <memory>
+#include <string_view>
+#include <vector>
+
+namespace com::sun::star::awt { class XCheckBox; }
+namespace com::sun::star::awt { class XListBox; }
+namespace com::sun::star::awt { class XTextComponent; }
+namespace com::sun::star::sdb { class XColumn; }
+
+enum class TransliterationFlags;
+
+/**
+ * struct FmSearchProgress - the owner of SearchEngine receives this structure for status updates
+ * (at the end of the search)
+ */
+struct FmSearchProgress
+{
+ enum class State { Progress, ProgressCounting, Canceled, Successful, NothingFound, Error };
+ // (move to new record; progress during counting of records; cancelled; record found; nothing found;
+ // any non-processable error)
+ State aSearchState;
+
+ // current record - always valid (e.g. of interest for continuing search in case of cancellation)
+ sal_uInt32 nCurrentRecord;
+ // Overflow - only valid in case of STATE_PROGRESS
+ bool bOverflow;
+
+ // the position of the search cursor - valid in case of STATE_SUCCESSFUL, STATE_CANCELED and STATE_NOTHING_FOUND
+ css::uno::Any aBookmark;
+ // the field, in which the text was found - valid in case of STATE_SUCCESSFUL
+ sal_Int32 nFieldIndex;
+};
+
+/**
+ * class FmRecordCountListener - utility class for FmSearchEngine, listens at a certain cursor and provides
+ * the differences in RecordCount
+ */
+// workaround for incremental linking bugs in MSVC2019
+class SAL_DLLPUBLIC_TEMPLATE FmRecordCountListener_Base : public cppu::WeakImplHelper< css::beans::XPropertyChangeListener > {};
+class SAL_WARN_UNUSED FmRecordCountListener final : public FmRecordCountListener_Base
+{
+// attribute
+ Link<sal_Int32,void> m_lnkWhoWantsToKnow;
+ css::uno::Reference< css::beans::XPropertySet > m_xListening;
+
+// attribute access
+public:
+ void SetPropChangeHandler(const Link<sal_Int32,void>& lnk);
+
+// methods
+public:
+ FmRecordCountListener(const css::uno::Reference< css::sdbc::XResultSet >& dbcCursor);
+ // the set has to support the sdb::ResultSet service
+ virtual ~FmRecordCountListener() override;
+
+ // DECLARE_UNO3_AGG_DEFAULTS(FmPropertyListener, UsrObject)
+ // virtual sal_Bool queryInterface(css::uno::Uik aUik, css::uno::Reference< css::uno::XInterface >& rOut);
+
+ // css::lang::XEventListener
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ // css::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
+
+ void DisConnect();
+
+private:
+ void NotifyCurrentCount();
+
+};
+
+/**
+ * class FmSearchEngine - Impl class for FmSearchDialog
+ */
+namespace svxform {
+ // We have three possible control types we may search in, determined by the supported interfaces : css::awt::XTextComponent,
+ // css::awt::XListBox, css::awt::XCheckBox.
+ // While searching we don't want to do this distinction for every control in every round. So we need some helpers.
+ class SAL_WARN_UNUSED ControlTextWrapper
+ {
+ // attributes
+ css::uno::Reference< css::uno::XInterface > m_xControl;
+ // attribute access
+ public:
+ const css::uno::Reference< css::uno::XInterface >& getControl() const{ return m_xControl; }
+ public:
+ ControlTextWrapper(const css::uno::Reference< css::uno::XInterface >& _xControl) { m_xControl = _xControl; }
+ virtual ~ControlTextWrapper() { }
+
+ virtual OUString getCurrentText() const = 0;
+ };
+
+ class SAL_WARN_UNUSED SimpleTextWrapper final : public ControlTextWrapper
+ {
+ css::uno::Reference< css::awt::XTextComponent > m_xText;
+ public:
+ SimpleTextWrapper(const css::uno::Reference< css::awt::XTextComponent >& _xText);
+ virtual OUString getCurrentText() const override;
+ };
+
+ class SAL_WARN_UNUSED ListBoxWrapper final : public ControlTextWrapper
+ {
+ css::uno::Reference< css::awt::XListBox > m_xBox;
+ public:
+ ListBoxWrapper(const css::uno::Reference< css::awt::XListBox >& _xBox);
+ virtual OUString getCurrentText() const override;
+ };
+
+ class SAL_WARN_UNUSED CheckBoxWrapper final : public ControlTextWrapper
+ {
+ css::uno::Reference< css::awt::XCheckBox > m_xBox;
+ public:
+ CheckBoxWrapper(const css::uno::Reference< css::awt::XCheckBox >& _xBox);
+ virtual OUString getCurrentText() const override;
+ };
+}
+
+typedef std::vector< css::uno::Reference< css::uno::XInterface> > InterfaceArray;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC FmSearchEngine final
+{
+ friend class FmSearchThread;
+
+ enum class SearchResult { Found, NotFound, Error, Cancelled };
+ enum class SearchFor { String, Null, NotNull };
+
+ CursorWrapper m_xSearchCursor;
+ std::deque<sal_Int32> m_arrFieldMapping;
+ // Since the iterator could have more columns, as managed here (in this field listbox),
+ // a mapping of this css::form keys on the indices of the respective columns is kept in the iterator
+
+ CharClass m_aCharacterClassficator;
+ CollatorWrapper m_aStringCompare;
+
+ // the collection of all interesting fields (or their css::data::XDatabaseVariant interfaces and FormatKeys)
+ struct FieldInfo
+ {
+ css::uno::Reference< css::sdb::XColumn > xContents;
+ };
+
+ typedef std::vector<FieldInfo> FieldCollection;
+ FieldCollection m_arrUsedFields;
+ sal_Int32 m_nCurrentFieldIndex; // the last parameter of RebuildUsedFields, it allows checks in FormatField
+
+ std::vector<std::unique_ptr<svxform::ControlTextWrapper>>
+ m_aControlTexts;
+
+ CursorWrapper m_xOriginalIterator;
+ CursorWrapper m_xClonedIterator;
+
+ // Data for the decision in which field a "Found" is accepted
+ css::uno::Any m_aPreviousLocBookmark; // position of the last finding
+ FieldCollection::iterator m_iterPreviousLocField; // field of the last finding
+
+ // Communication with the thread that does the actual searching
+ OUString m_strSearchExpression; // forward direction
+ SearchFor m_eSearchForType; // ditto
+ SearchResult m_srResult; // backward direction
+
+ // The link we broadcast the progress and the result to
+ Link<const FmSearchProgress*,void> m_aProgressHandler;
+ std::atomic<bool> m_bCancelAsynchRequest; // should be cancelled?
+
+ // parameters for the search
+ bool m_bSearchingCurrently : 1; // is an (asynchronous) search running?
+ bool m_bFormatter : 1; // use field formatting
+ bool m_bForward : 1; // direction
+ bool m_bWildcard : 1; // wildcard search
+ bool m_bRegular : 1; // regular expression
+ bool m_bLevenshtein : 1; // Levenshtein search
+ bool m_bTransliteration : 1; // Levenshtein search
+
+ bool m_bLevRelaxed : 1; // parameters for Levenshtein search
+ sal_uInt16 m_nLevOther;
+ sal_uInt16 m_nLevShorter;
+ sal_uInt16 m_nLevLonger;
+
+ sal_uInt16 m_nPosition; // if not regular or levenshtein, then one of the MATCHING_... values
+
+ TransliterationFlags m_nTransliterationFlags;
+
+
+// member access
+private:
+ SVX_DLLPRIVATE bool CancelRequested(); // provides a through m_aCancelAsynchAccess backed interpretation of m_bCancelAsynchRequest
+
+public:
+ void SetCaseSensitive(bool bSet);
+ bool GetCaseSensitive() const;
+
+ void SetFormatterUsing(bool bSet); // this is somewhat more extensive, so no inline ... here
+ bool GetFormatterUsing() const { return m_bFormatter; }
+
+ void SetDirection(bool bForward) { m_bForward = bForward; }
+ bool GetDirection() const { return m_bForward; }
+
+ void SetWildcard(bool bSet) { m_bWildcard = bSet; }
+ bool GetWildcard() const { return m_bWildcard; }
+
+ void SetRegular(bool bSet) { m_bRegular = bSet; }
+ bool GetRegular() const { return m_bRegular; }
+
+ void SetLevenshtein(bool bSet) { m_bLevenshtein = bSet; }
+ bool GetLevenshtein() const { return m_bLevenshtein; }
+
+ void SetIgnoreWidthCJK(bool bSet);
+ bool GetIgnoreWidthCJK() const;
+
+ void SetTransliteration(bool bSet) { m_bTransliteration = bSet; }
+ bool GetTransliteration() const { return m_bTransliteration; }
+
+ void SetLevRelaxed(bool bSet) { m_bLevRelaxed = bSet; }
+ bool GetLevRelaxed() const { return m_bLevRelaxed; }
+ void SetLevOther(sal_uInt16 nHowMuch) { m_nLevOther = nHowMuch; }
+ sal_uInt16 GetLevOther() const { return m_nLevOther; }
+ void SetLevShorter(sal_uInt16 nHowMuch) { m_nLevShorter = nHowMuch; }
+ sal_uInt16 GetLevShorter() const { return m_nLevShorter; }
+ void SetLevLonger(sal_uInt16 nHowMuch) { m_nLevLonger = nHowMuch; }
+ sal_uInt16 GetLevLonger() const { return m_nLevLonger; }
+ // all Lev. values will only be considered in case of m_bLevenshtein==sal_True
+
+ void SetTransliterationFlags(TransliterationFlags _nFlags) { m_nTransliterationFlags = _nFlags; }
+ TransliterationFlags
+ GetTransliterationFlags() const { return m_nTransliterationFlags; }
+
+ void SetPosition(sal_uInt16 nValue) { m_nPosition = nValue; }
+ sal_uInt16 GetPosition() const { return m_nPosition; }
+ // position will be ignored in case of m_bWildCard==sal_True
+
+public:
+ /** two constructs, both analogical to FmSearchDialog, therefore look this up for explanations...
+ xCursor has to implement css::data::DatabaseCursor service each time.
+ If eMode == SM_USETHREAD, a ProgressHandler should be set, because in this case the result forwarding will be done
+ by this handler.
+ If eMode != SM_USETHREAD, SearchNext and StarOver won't return, until the search has finished (independently of its
+ success), only then the result can be requested. If additionally the ProgressHandler is set, it will be called for
+ every record as well as at the end of the search.
+ */
+ FmSearchEngine(
+ const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
+ const css::uno::Reference< css::sdbc::XResultSet >& xCursor,
+ std::u16string_view strVisibleFields,
+ const InterfaceArray& arrFields);
+
+ /** the link will be called on every record and after the completion of the search, the parameter is a pointer to
+ a FmSearchProgress structure
+ the handler should be in any case thread-safe
+ */
+ void SetProgressHandler(Link<const FmSearchProgress*,void> aHdl) { m_aProgressHandler = aHdl; }
+
+ /// search for the next appearance (for nDirection values check DIRECTION_*-defines)
+ void SearchNext(const OUString& strExpression);
+ /// analogous, search for "NULL" (_bSearchForNull==sal_True) or "not NULL"
+ void SearchNextSpecial(bool _bSearchForNull);
+ /// search for the next appearance, dependent on nDirection from the start or end
+ void StartOver(const OUString& strExpression);
+ /// analogous, search for "NULL" (_bSearchForNull==sal_True) or "not NULL"
+ void StartOverSpecial(bool _bSearchForNull);
+ /// invalidate previous search reference
+ void InvalidatePreviousLoc();
+
+ /** rebuilds m_arrUsedFields (nFieldIndex==-1 means all fields, otherwise it specifies the field index)
+ if bForce is not set, nothing will happen in case of nFieldIndex == m_nCurrentFieldIndex
+ (calls InvalidatePreviousLoc)
+ */
+ void RebuildUsedFields(sal_Int32 nFieldIndex, bool bForce = false);
+ OUString FormatField(sal_Int32 nWhich);
+
+ /// returns directly; once it was really aborted, ProgressHandler is called with STATE_CANCELED
+ void CancelSearch();
+
+ /** only valid, if not an (asynchronous) search is running, the next search will then be executed
+ on top of the new iterator with the new parameter
+ */
+ void SwitchToContext(const css::uno::Reference< css::sdbc::XResultSet >& xCursor, std::u16string_view strVisibleFields, const InterfaceArray& arrFields,
+ sal_Int32 nFieldIndex);
+
+private:
+ void Init(std::u16string_view strVisibleFields);
+
+ void SearchNextImpl();
+ // this Impl method is running in SearchThread
+
+ // start a thread-search (or call SearchNextImpl directly, depending on the search mode)
+ void ImplStartNextSearch();
+
+ SVX_DLLPRIVATE void fillControlTexts(const InterfaceArray& arrFields);
+
+ // three methods implementing a complete search loop (null/not null, wildcard, SearchText)
+ // (they all have some code in common, but with this solution we have to do a distinction only once per search (before
+ // starting the loop), not in every loop step
+ SVX_DLLPRIVATE SearchResult SearchSpecial(bool _bSearchForNull, sal_Int32& nFieldPos, FieldCollection::iterator& iterFieldLoop,
+ const FieldCollection::iterator& iterBegin, const FieldCollection::iterator& iterEnd);
+ SVX_DLLPRIVATE SearchResult SearchWildcard(std::u16string_view strExpression, sal_Int32& nFieldPos, FieldCollection::iterator& iterFieldLoop,
+ const FieldCollection::iterator& iterBegin, const FieldCollection::iterator& iterEnd);
+ SVX_DLLPRIVATE SearchResult SearchRegularApprox(const OUString& strExpression, sal_Int32& nFieldPos, FieldCollection::iterator& iterFieldLoop,
+ const FieldCollection::iterator& iterBegin, const FieldCollection::iterator& iterEnd);
+
+ SVX_DLLPRIVATE void PropagateProgress(bool _bDontPropagateOverflow);
+ // call the ProgressHandler with STATE_PROGRESS and the current position of the search iterator
+
+ // helpers, that are needed several times
+ SVX_DLLPRIVATE bool MoveCursor();
+ // moves m_xSearchIterator with respect to direction/overflow cursor
+ SVX_DLLPRIVATE bool MoveField(sal_Int32& nPos, FieldCollection::iterator& iter, const FieldCollection::iterator& iterBegin, const FieldCollection::iterator& iterEnd);
+ // moves the iterator with respect to the direction/overflow iterator/overflow cursor
+ SVX_DLLPRIVATE void BuildAndInsertFieldInfo(const css::uno::Reference< css::container::XIndexAccess >& xAllFields, sal_Int32 nField);
+
+ void OnSearchTerminated();
+ // is used by SearchThread, after the return from this handler the thread removes itself
+ DECL_DLLPRIVATE_LINK(OnNewRecordCount, sal_Int32, void);
+};
+
+#endif // INCLUDED_SVX_FMSRCIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
new file mode 100644
index 000000000..10f52d474
--- /dev/null
+++ b/include/svx/fmtools.hxx
@@ -0,0 +1,175 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMTOOLS_HXX
+#define INCLUDED_SVX_FMTOOLS_HXX
+
+#include <config_options.h>
+#include <svx/svxdllapi.h>
+
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+
+#include <rtl/ref.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <o3tl/sorted_vector.hxx>
+#include <mutex>
+
+namespace com::sun::star::awt { class XWindow; }
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::container { class XIndexAccess; }
+namespace com::sun::star::container { class XNameAccess; }
+namespace com::sun::star::lang { class XComponent; }
+namespace com::sun::star::lang { class XServiceInfo; }
+namespace com::sun::star::sdbc { class SQLException; }
+namespace com::sun::star::sdbc { class XRowSet; }
+namespace com::sun::star::sdb { class SQLContext; }
+namespace com::sun::star::sdb { struct SQLErrorEvent; }
+enum class SdrObjKind : sal_uInt16;
+
+// common types
+
+// displaying a database exception for the user
+// display info about a simple css::sdbc::SQLException
+void displayException(const css::sdbc::SQLException&, const css::uno::Reference<css::awt::XWindow>& rParent);
+SVXCORE_DLLPUBLIC void displayException(const css::sdb::SQLContext&, const css::uno::Reference<css::awt::XWindow>& rParent);
+void displayException(const css::sdb::SQLErrorEvent&, const css::uno::Reference<css::awt::XWindow>& rParent);
+void displayException(const css::uno::Any&, const css::uno::Reference<css::awt::XWindow>& rParent);
+
+sal_Int32 getElementPos(const css::uno::Reference< css::container::XIndexAccess>& xCont, const css::uno::Reference< css::uno::XInterface>& xElement);
+
+SVXCORE_DLLPUBLIC OUString getLabelName(const css::uno::Reference< css::beans::XPropertySet>& xControlModel);
+
+
+// = class CursorWrapper - a helper class which works in common with a css::uno::Reference<XDatabaseUpdateCursor>,
+// XDatabaseBookmarkCursor and XDatabaseDirectCursor each
+
+
+class SAL_WARN_UNUSED CursorWrapper
+{
+private:
+ css::uno::Reference< css::uno::XInterface> m_xGeneric;
+ css::uno::Reference< css::sdbc::XResultSet> m_xMoveOperations;
+ css::uno::Reference< css::sdbcx::XRowLocate> m_xBookmarkOperations;
+ css::uno::Reference< css::sdbcx::XColumnsSupplier> m_xColumnsSupplier;
+ css::uno::Reference< css::beans::XPropertySet> m_xPropertyAccess;
+
+public:
+ // Construction/Destruction
+ CursorWrapper(const css::uno::Reference< css::sdbc::XRowSet>& _rxCursor, bool bUseCloned = false);
+ UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) CursorWrapper(const css::uno::Reference< css::sdbc::XResultSet>& _rxCursor, bool bUseCloned = false);
+ // if bUseCloned == sal_True, the cursor is first doubled over the XCloneable interface (which it must implement)
+ // and then used
+
+ friend bool operator==(const CursorWrapper& lhs, const CursorWrapper& rhs)
+ {
+ return lhs.m_xGeneric.get() == rhs.m_xGeneric.get();
+ }
+
+ bool is() const { return m_xMoveOperations.is(); }
+ bool Is() const { return m_xMoveOperations.is(); }
+
+ operator const css::uno::Reference< css::uno::XInterface>& () const{ return m_xGeneric; }
+
+ // 'Conversions'
+ CursorWrapper& operator=(const css::uno::Reference< css::sdbc::XRowSet>& xCursor);
+ operator const css::uno::Reference< css::sdbc::XResultSet>& () const { return m_xMoveOperations; }
+
+ const css::uno::Reference< css::beans::XPropertySet >& getPropertySet() const { return m_xPropertyAccess; }
+
+ // css::uno::Reference< css::sdbcx::XRowLocate>
+ /// @throws css::sdbc::SQLException
+ /// @throws css::uno::RuntimeException
+ css::uno::Any getBookmark()
+ { return m_xBookmarkOperations->getBookmark(); }
+ /// @throws css::sdbc::SQLException
+ /// @throws css::uno::RuntimeException
+ bool moveToBookmark(const css::uno::Any& bookmark) { return m_xBookmarkOperations->moveToBookmark(bookmark); }
+
+ // css::sdbc::XResultSet
+ bool isBeforeFirst() const { return m_xMoveOperations->isBeforeFirst(); }
+ bool isAfterLast() const { return m_xMoveOperations->isAfterLast(); }
+ bool isFirst() const { return m_xMoveOperations->isFirst(); }
+ bool isLast() const { return m_xMoveOperations->isLast(); }
+ void beforeFirst() { m_xMoveOperations->beforeFirst(); }
+ bool first() { return m_xMoveOperations->first(); }
+ bool last() { return m_xMoveOperations->last(); }
+ sal_Int32 getRow() const { return m_xMoveOperations->getRow(); }
+ bool absolute(sal_Int32 nPosition) { return m_xMoveOperations->absolute(nPosition); }
+ bool relative(sal_Int32 nCount) { return m_xMoveOperations->relative(nCount); }
+ bool previous() { return m_xMoveOperations->previous(); }
+ bool next() { return m_xMoveOperations->next(); }
+ void refreshRow() { m_xMoveOperations->refreshRow(); }
+ bool rowDeleted() { return m_xMoveOperations->rowDeleted(); }
+ // css::sdbcx::XColumnsSupplier
+ /// @throws css::uno::RuntimeException
+ css::uno::Reference< css::container::XNameAccess> getColumns() const { return m_xColumnsSupplier->getColumns(); }
+private:
+ void ImplConstruct(const css::uno::Reference< css::sdbc::XResultSet>& _rxCursor, bool bUseCloned);
+};
+
+
+class FmXDisposeMultiplexer;
+class SAL_WARN_UNUSED FmXDisposeListener
+{
+ friend class FmXDisposeMultiplexer;
+
+ rtl::Reference<FmXDisposeMultiplexer> m_pAdapter;
+ std::mutex m_aMutex;
+
+public:
+ virtual ~FmXDisposeListener();
+
+ /// @throws css::uno::RuntimeException
+ virtual void disposing(sal_Int16 _nId) = 0;
+
+protected:
+ void setAdapter(FmXDisposeMultiplexer* pAdapter);
+};
+
+class SAL_WARN_UNUSED FmXDisposeMultiplexer final : public cppu::WeakImplHelper< css::lang::XEventListener >
+{
+ css::uno::Reference< css::lang::XComponent> m_xObject;
+ FmXDisposeListener* m_pListener;
+
+ virtual ~FmXDisposeMultiplexer() override;
+public:
+ FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const css::uno::Reference< css::lang::XComponent>& _rxObject);
+
+// css::lang::XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+
+ void dispose();
+};
+
+SdrObjKind getControlTypeByObject(const css::uno::Reference< css::lang::XServiceInfo>& _rxObject);
+ // get the object type (OBJ_FM_...) from the services the object supports
+
+
+bool isRowSetAlive(const css::uno::Reference< css::uno::XInterface>& _rxRowSet);
+ // checks if the css::sdbcx::XColumnsSupplier provided by _rxRowSet supplies any columns
+
+
+typedef ::o3tl::sorted_vector< css::uno::Reference< css::uno::XInterface > > InterfaceBag;
+
+#endif // INCLUDED_SVX_FMTOOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
new file mode 100644
index 000000000..77928837d
--- /dev/null
+++ b/include/svx/fmview.hxx
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FMVIEW_HXX
+#define INCLUDED_SVX_FMVIEW_HXX
+
+#include <svx/view3d.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star {
+ namespace beans {
+ class XPropertySet;
+ }
+ namespace util {
+ class XNumberFormats;
+ }
+}
+
+class OutputDevice;
+class FmFormObj;
+class FmFormPage;
+class FmFormShell;
+class FmXFormView;
+
+namespace svx {
+ class ODataAccessDescriptor;
+ struct OXFormsDescriptor;
+}
+
+class SdrUnoObj;
+namespace com::sun::star::form {
+ class XForm;
+ namespace runtime {
+ class XFormController;
+ }
+}
+
+class SVXCORE_DLLPUBLIC FmFormView : public E3dView
+{
+ rtl::Reference<FmXFormView> pImpl;
+ FmFormShell* pFormShell;
+
+ void Init();
+
+public:
+ FmFormView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~FmFormView() override;
+
+ /** create a control pair (label/bound control) for the database field description given.
+ @param rFieldDesc
+ description of the field. see clipboard format SBA-FIELDFORMAT
+ @deprecated
+ This method is deprecated. Use the version with an ODataAccessDescriptor instead.
+ */
+ SdrObjectUniquePtr CreateFieldControl(std::u16string_view rFieldDesc) const;
+
+ /** create a control pair (label/bound control) for the database field description given.
+ */
+ SdrObjectUniquePtr CreateFieldControl( const svx::ODataAccessDescriptor& _rColumnDescriptor );
+
+ /** create a control pair (label/bound control) for the xforms description given.
+ */
+ SdrObjectUniquePtr CreateXFormsControl( const svx::OXFormsDescriptor &_rDesc );
+
+ virtual void MarkListHasChanged() override;
+ virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) override;
+ virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin) override;
+
+ static void createControlLabelPair(
+ OutputDevice const * _pOutDev,
+ sal_Int32 _nXOffsetMM,
+ sal_Int32 _nYOffsetMM,
+ const css::uno::Reference< css::beans::XPropertySet >& _rxField,
+ const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
+ SdrObjKind _nControlObjectID,
+ SdrInventor _nInventor,
+ SdrObjKind _nLabelObjectID,
+
+ // tdf#118963 Need a SdrModel for SdrObject creation. To make the
+ // demand clear, hand over a SdrMldel&
+ SdrModel& _rModel,
+
+ std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,
+ std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl
+ );
+
+ virtual SdrPageView* ShowSdrPage(SdrPage* pPage) override;
+ virtual void HideSdrPage() override;
+
+ virtual bool MouseButtonDown( const MouseEvent& _rMEvt, OutputDevice* _pWin ) override;
+
+ /** grab the focus to the first form control on the view
+ */
+ SVX_DLLPRIVATE void GrabFirstControlFocus();
+
+ /** returns the form controller for a given form and a given device
+ */
+ SVX_DLLPRIVATE css::uno::Reference< css::form::runtime::XFormController >
+ GetFormController( const css::uno::Reference< css::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;
+
+ // SdrView
+ bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
+
+ /// shortcut to "GetSdrPageView() ? PTR_CAST( FmFormPage, GetSdrPageView() ) : NULL"
+ FmFormPage* GetCurPage();
+
+ SVX_DLLPRIVATE void ActivateControls(SdrPageView const *);
+ SVX_DLLPRIVATE void DeactivateControls(SdrPageView const *);
+
+ SVX_DLLPRIVATE void ChangeDesignMode(bool bDesign);
+
+ SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl.get(); }
+ SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return pFormShell; }
+
+ struct FormShellAccess { friend class FmFormShell; private: FormShellAccess() { } };
+ void SetFormShell( FmFormShell* pShell, FormShellAccess ) { pFormShell = pShell; }
+
+ struct ImplAccess { friend class FmXFormView; private: ImplAccess() { } };
+ void SetMoveOutside( bool _bMoveOutside, ImplAccess ) { E3dView::SetMoveOutside( _bMoveOutside ); }
+ void InsertControlContainer(const css::uno::Reference< css::awt::XControlContainer >& xCC);
+ void RemoveControlContainer(const css::uno::Reference< css::awt::XControlContainer >& xCC);
+
+ virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut) override;
+ virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer) override;
+
+ SVX_DLLPRIVATE const OutputDevice* GetActualOutDev() const {return mpActualOutDev;}
+ SVX_DLLPRIVATE bool checkUnMarkAll(const css::uno::Reference< css::uno::XInterface >& _xSource);
+
+private:
+ SVX_DLLPRIVATE FmFormObj* getMarkedGrid() const;
+ protected:
+ using E3dView::SetMoveOutside;
+};
+
+#endif // _FML_FMVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx
new file mode 100644
index 000000000..1751c3ac8
--- /dev/null
+++ b/include/svx/fntctrl.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FNTCTRL_HXX
+#define INCLUDED_SVX_FNTCTRL_HXX
+
+#include <memory>
+#include <editeng/svxfont.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/customweld.hxx>
+
+class SfxItemSet;
+class FontPrevWin_Impl;
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontPrevWindow final : public weld::CustomWidgetController
+{
+private:
+ std::unique_ptr<FontPrevWin_Impl> pImpl;
+
+ SVX_DLLPRIVATE static void ApplySettings(vcl::RenderContext& rRenderContext);
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ SVX_DLLPRIVATE static void SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
+ SVX_DLLPRIVATE static void SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
+
+public:
+ SvxFontPrevWindow();
+ virtual ~SvxFontPrevWindow() override;
+
+ SvxFont& GetFont();
+ const SvxFont& GetFont() const;
+ void SetFont( const SvxFont& rNormalFont, const SvxFont& rCJKFont, const SvxFont& rCTLFont );
+ SvxFont& GetCJKFont();
+ SvxFont& GetCTLFont();
+ void SetColor( const Color& rColor );
+ void ResetColor();
+ void SetTextLineColor(const Color& rColor);
+ void SetOverlineColor(const Color& rColor);
+ void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override;
+
+ bool IsTwoLines() const;
+ void SetTwoLines(bool bSet);
+
+ void SetBrackets(sal_Unicode cStart, sal_Unicode cEnd);
+
+ void SetFontWidthScale( sal_uInt16 nScaleInPercent );
+
+ void AutoCorrectFontColor();
+
+ void SetPreviewText( const OUString& rString );
+ void SetFontNameAsPreviewText();
+
+ void SetFromItemSet( const SfxItemSet &rSet,
+ bool bPreviewBackgroundToCharacter );
+};
+
+#endif // INCLUDED_SVX_FNTCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx
new file mode 100644
index 000000000..7fe65fd45
--- /dev/null
+++ b/include/svx/fontwork.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FONTWORK_HXX
+#define INCLUDED_SVX_FONTWORK_HXX
+
+#include <sfx2/dockwin.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/idle.hxx>
+#include <vcl/weld.hxx>
+
+class ColorListBox;
+
+class XFormTextAdjustItem;
+class XFormTextDistanceItem;
+class XFormTextStartItem;
+class XFormTextStyleItem;
+class XFormTextMirrorItem;
+class XFormTextHideFormItem;
+class XFormTextOutlineItem;
+class XFormTextShadowItem;
+class XFormTextShadowColorItem;
+class XFormTextShadowXValItem;
+class XFormTextShadowYValItem;
+
+/** ControllerItem for Fontwork
+ */
+
+
+class SvxFontWorkDialog;
+
+class SvxFontWorkControllerItem final : public SfxControllerItem
+{
+ SvxFontWorkDialog &rFontWorkDlg;
+
+ virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+
+public:
+ SvxFontWorkControllerItem(sal_uInt16 nId, SvxFontWorkDialog&, SfxBindings&);
+};
+
+/** Derived from SfxChildWindow as "container" for fontwork dialog
+ */
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkChildWindow final : public SfxChildWindow
+{
+ public:
+ SvxFontWorkChildWindow(vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
+ SFX_DECL_CHILDWINDOW_WITHID(SvxFontWorkChildWindow);
+};
+
+/** Floating window for setting attributes of text effects
+ */
+
+class SAL_WARN_UNUSED SvxFontWorkDialog final : public SfxDockingWindow
+{
+#define CONTROLLER_COUNT 11
+
+ SfxBindings& rBindings;
+ Idle aInputIdle;
+
+ OString m_sLastStyleTbxId;
+ OString m_sLastAdjustTbxId;
+ OString m_sLastShadowTbxId;
+
+ tools::Long nSaveShadowX;
+ tools::Long nSaveShadowY;
+ tools::Long nSaveShadowAngle;
+ tools::Long nSaveShadowSize;
+
+ SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
+
+ std::unique_ptr<weld::Toolbar> m_xTbxStyle;
+ std::unique_ptr<weld::Toolbar> m_xTbxAdjust;
+
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldDistance;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTextStart;
+
+ std::unique_ptr<weld::Toolbar> m_xTbxShadow;
+
+ std::unique_ptr<weld::Image> m_xFbShadowX;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldShadowX;
+ std::unique_ptr<weld::Image> m_xFbShadowY;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldShadowY;
+
+ std::unique_ptr<ColorListBox> m_xShadowColorLB;
+
+ friend class SvxFontWorkChildWindow;
+ friend class SvxFontWorkControllerItem;
+
+ DECL_LINK( SelectStyleHdl_Impl, const OString&, void );
+ DECL_LINK( SelectAdjustHdl_Impl, const OString&, void );
+ DECL_LINK( SelectShadowHdl_Impl, const OString&, void );
+
+ DECL_LINK( ModifyInputHdl_Impl, weld::MetricSpinButton&, void );
+ DECL_LINK( InputTimeoutHdl_Impl, Timer*, void );
+
+ DECL_LINK( ColorSelectHdl_Impl, ColorListBox&, void );
+
+ void SetStyle_Impl(const XFormTextStyleItem*);
+ void SetAdjust_Impl(const XFormTextAdjustItem*);
+ void SetDistance_Impl(const XFormTextDistanceItem*);
+ void SetStart_Impl(const XFormTextStartItem*);
+ void SetMirror_Impl(const XFormTextMirrorItem*);
+ void SetShowForm_Impl(const XFormTextHideFormItem*);
+ void SetOutline_Impl(const XFormTextOutlineItem*);
+ void SetShadow_Impl(const XFormTextShadowItem*, bool bRestoreValues = false);
+ void SetShadowColor_Impl(const XFormTextShadowColorItem*);
+ void SetShadowXVal_Impl(const XFormTextShadowXValItem*);
+ void SetShadowYVal_Impl(const XFormTextShadowYValItem*);
+
+ void ApplyImageList();
+
+ virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign,
+ SfxChildAlignment eAlign ) override;
+public:
+ SvxFontWorkDialog(SfxBindings *pBinding, SfxChildWindow *pCW,
+ vcl::Window* pParent);
+ virtual ~SvxFontWorkDialog() override;
+ virtual void dispose() override;
+};
+
+#endif // INCLUDED_SVX_FONTWORK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fontworkbar.hxx b/include/svx/fontworkbar.hxx
new file mode 100644
index 000000000..3b60c7b89
--- /dev/null
+++ b/include/svx/fontworkbar.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FONTWORKBAR_HXX
+#define INCLUDED_SVX_FONTWORKBAR_HXX
+
+#include <sfx2/shell.hxx>
+#include <svx/ifaceids.hxx>
+#include <svx/svxdllapi.h>
+
+class SfxViewShell;
+class SdrView;
+class SdrObject;
+
+/************************************************************************/
+
+namespace svx
+{
+bool SVXCORE_DLLPUBLIC checkForSelectedFontWork(SdrView const* pSdrView);
+bool SVXCORE_DLLPUBLIC checkForFontWork(const SdrObject* pObj);
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FontworkBar final : public SfxShell
+{
+public:
+ SFX_DECL_INTERFACE(SVX_INTERFACE_FONTWORK_BAR)
+
+private:
+ /// SfxInterface initializer.
+ static void InitInterface_Impl();
+
+public:
+ FontworkBar(SfxViewShell* pViewShell);
+ virtual ~FontworkBar() override;
+
+ static void execute(SdrView& rSdrView, SfxRequest const& rReq, SfxBindings& rBindings);
+ static void getState(SdrView const* pSdrView, SfxItemSet& rSet);
+};
+}
+
+#endif // INCLUDED_SVX_FONTWORKBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
new file mode 100644
index 000000000..78e0370db
--- /dev/null
+++ b/include/svx/fontworkgallery.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#ifndef INCLUDED_SVX_FONTWORKGALLERY_HXX
+#define INCLUDED_SVX_FONTWORKGALLERY_HXX
+
+#include <svx/svxdllapi.h>
+#include <vcl/weld.hxx>
+#include <vector>
+
+class SdrView;
+class SdrObject;
+class SdrModel;
+
+namespace svx
+{
+
+class SAL_WARN_UNUSED FontworkCharacterSpacingDialog final : public weld::GenericDialogController
+{
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrScale;
+
+public:
+ FontworkCharacterSpacingDialog(weld::Window* pParent, sal_Int32 nScale);
+ virtual ~FontworkCharacterSpacingDialog() override;
+
+ sal_Int32 getScale() const;
+};
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FontWorkGalleryDialog final : public weld::GenericDialogController
+{
+ sal_uInt16 mnThemeId;
+ SdrView& mrSdrView;
+
+ bool mbInsertIntoPage;
+ SdrObject* mpSdrObject;
+ SdrModel* mpDestModel;
+
+ std::vector<VclPtr< VirtualDevice >> maFavoritesHorizontal;
+
+ std::unique_ptr<weld::IconView> maCtlFavorites;
+ std::unique_ptr<weld::Button> mxOKButton;
+
+ void initFavorites(sal_uInt16 nThemeId);
+ void insertSelectedFontwork();
+ void fillFavorites(sal_uInt16 nThemeId);
+
+ DECL_DLLPRIVATE_LINK(DoubleClickFavoriteHdl, weld::IconView&, bool);
+ DECL_DLLPRIVATE_LINK(ClickOKHdl, weld::Button&, void );
+
+public:
+ FontWorkGalleryDialog(weld::Window* pParent, SdrView& rView);
+ virtual ~FontWorkGalleryDialog() override;
+
+ // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog
+ void SetSdrObjectRef( SdrModel* pModel );
+ SdrObject* GetSdrObjectRef() { return mpSdrObject; }
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/formatpaintbrushctrl.hxx b/include/svx/formatpaintbrushctrl.hxx
new file mode 100644
index 000000000..300483595
--- /dev/null
+++ b/include/svx/formatpaintbrushctrl.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FORMATPAINTBRUSHCTRL_HXX
+#define INCLUDED_SVX_FORMATPAINTBRUSHCTRL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+#include <vcl/timer.hxx>
+#include <svx/svxdllapi.h>
+
+
+namespace svx
+{
+
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC FormatPaintBrushToolBoxControl final : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ FormatPaintBrushToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+ virtual ~FormatPaintBrushToolBoxControl() override;
+
+ virtual void DoubleClick() override;
+ virtual void Click() override;
+ virtual void Select(sal_uInt16 nSelectModifier) override;
+
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+private:
+ DECL_DLLPRIVATE_LINK( WaitDoubleClickHdl, Timer*, void );
+ void impl_executePaintBrush();
+
+private:
+ bool m_bPersistentCopy;//indicates that the content of the format clipboard should not be erased after paste
+ Timer m_aDoubleClickTimer;
+};
+
+
+} //namespace svx
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/framebordertype.hxx b/include/svx/framebordertype.hxx
new file mode 100644
index 000000000..2eda99606
--- /dev/null
+++ b/include/svx/framebordertype.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FRAMEBORDERTYPE_HXX
+#define INCLUDED_SVX_FRAMEBORDERTYPE_HXX
+
+#include <svx/svxdllapi.h>
+
+namespace svx {
+
+
+/** Enumerates all borders a frame selection control can contain. */
+enum class FrameBorderType
+{
+ NONE, /// No border (special state).
+ Left, /// Left frame border.
+ Right, /// Right frame border.
+ Top, /// Top frame border.
+ Bottom, /// Bottom frame border.
+ Horizontal, /// Inner horizontal frame border.
+ Vertical, /// Inner vertical frame border.
+ TLBR, /// Top-left to bottom-right frame border.
+ BLTR /// Bottom-left to top-right frame border.
+};
+
+/** The number of valid frame border types (excluding FrameBorderType::NONE). */
+const int FRAMEBORDERTYPE_COUNT = 8;
+
+/** Returns the frame border type from a 0-based integer index. */
+SVX_DLLPUBLIC FrameBorderType GetFrameBorderTypeFromIndex( size_t nIndex );
+
+/** Returns the zero-based index of a valid frame border type. */
+size_t GetIndexFromFrameBorderType( FrameBorderType eBorder );
+
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx
new file mode 100644
index 000000000..ae35185a4
--- /dev/null
+++ b/include/svx/framelink.hxx
@@ -0,0 +1,185 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FRAMELINK_HXX
+#define INCLUDED_SVX_FRAMELINK_HXX
+
+#include <sal/types.h>
+#include <tools/color.hxx>
+#include <svx/svxdllapi.h>
+#include <editeng/borderline.hxx>
+
+namespace svx::frame {
+
+
+// Enums
+
+
+/** Specifies how the reference points for frame borders are used.
+ */
+enum class RefMode : sal_uInt8
+{
+ /** Frame borders are drawn centered to the reference points. */
+ Centered,
+
+ /** The reference points specify the begin of the frame border width.
+
+ The result is that horizontal lines are drawn below, and vertical lines
+ are drawn right of the reference points.
+ */
+ Begin,
+
+ /** The reference points specify the end of the frame border width.
+
+ The result is that horizontal lines are drawn above, and vertical lines
+ are drawn left of the reference points.
+ */
+ End
+};
+
+
+// Classes
+
+
+/** Contains the widths of primary and secondary line of a frame style.
+
+ In the following, "frame style" is a complete style of one frame border,
+ i.e. the double line at the left side of the frame. A "line" is always a
+ trivial single line, i.e. the first line of a double frame style.
+
+ The following states of the members of this struct are valid:
+
+ mnPrim mnDist mnSecn frame style
+ -------------------------------------------------
+ 0 0 0 invisible
+ >0 0 0 single
+ >0 >0 >0 double
+
+ The behaviour of the member functions for other states is not defined.
+
+ Per definition the primary line in double frame styles is:
+ - The top line for horizontal frame borders.
+ - The left line for vertical frame borders.
+ - The bottom-left line for top-left to bottom-right diagonal frame borders.
+ - The top-left line for bottom-left to top-right diagonal frame borders.
+
+ The following picture shows the upper end of a vertical double frame
+ border.
+
+ |<---------------- GetWidth() ----------------->|
+ | |
+ |<----- mnPrim ----->||<- mnDist ->||<- mnSecn >|
+ | || || |
+ ###################### #############
+ ###################### #############
+ ###################### #############
+ ###################### #############
+ ###################### | #############
+ ###################### | #############
+ |
+ |<- middle of the frame border
+ */
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC Style
+{
+private:
+ Color maColorPrim;
+ Color maColorSecn;
+ Color maColorGap;
+ double mfPrim; /// Width of primary (single, left, or top) line.
+ double mfDist; /// Distance between primary and secondary line.
+ double mfSecn; /// Width of secondary (right or bottom) line.
+ double mfPatternScale; /// Scale used for line pattern spacing.
+ RefMode meRefMode; /// Reference point handling for this frame border.
+ SvxBorderLineStyle mnType;
+ bool mbWordTableCell : 1;
+ bool mbUseGapColor : 1;
+
+public:
+ /** Constructs an invisible frame style. */
+ explicit Style();
+ /** Constructs a frame style with passed line widths. */
+ explicit Style( double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale );
+ /** Constructs a frame style with passed color and line widths. */
+ explicit Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor, double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale );
+ /** Constructs a frame style from the passed SvxBorderLine struct. */
+ explicit Style( const editeng::SvxBorderLine* pBorder, double fScale );
+
+ RefMode GetRefMode() const { return meRefMode; }
+ Color GetColorPrim() const { return maColorPrim; }
+ Color GetColorSecn() const { return maColorSecn; }
+ Color GetColorGap() const { return maColorGap; }
+ bool UseGapColor() const { return mbUseGapColor; }
+ double Prim() const { return mfPrim; }
+ double Dist() const { return mfDist; }
+ double Secn() const { return mfSecn; }
+ double PatternScale() const { return mfPatternScale;}
+ SvxBorderLineStyle Type() const { return mnType; }
+
+ /// Check if this style is used - this depends on it having any width definition.
+ /// As can be seen in the definition comment above, Prim() *must* be non zero to have a width
+ bool IsUsed() const { return 0.0 != mfPrim; }
+
+ /** Returns the total width of this frame style. */
+ double GetWidth() const { return mfPrim + mfDist + mfSecn; }
+
+ /** Sets the frame style to invisible state. */
+ void Clear();
+ /** Sets the frame style to the passed line widths. */
+ void Set( double nP, double nD, double nS );
+ /** Sets the frame style to the passed line widths. */
+ void Set( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor, double nP, double nD, double nS );
+ /** Sets the frame style to the passed SvxBorderLine struct. If nullptr, resets the style */
+ void Set( const editeng::SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 );
+
+ /** Sets a new reference point handling mode, does not modify other settings. */
+ void SetRefMode( RefMode eRefMode ) { meRefMode = eRefMode; }
+ /** Sets a new color, does not modify other settings. */
+ void SetColorPrim( const Color& rColor ) { maColorPrim = rColor; }
+ void SetColorSecn( const Color& rColor ) { maColorSecn = rColor; }
+ /** Sets whether to use dotted style for single hair lines. */
+ void SetType( SvxBorderLineStyle nType ) { mnType = nType; }
+
+ /** Mirrors this style (exchanges primary and secondary), if it is a double frame style. */
+ Style& MirrorSelf();
+
+ /** Enables the Word-compatible Style comparison code. */
+ void SetWordTableCell(bool bWordTableCell) { mbWordTableCell = bWordTableCell; }
+
+ bool operator==( const Style& rOther) const;
+ bool operator<( const Style& rOther) const;
+};
+
+inline bool operator>( const Style& rL, const Style& rR ) { return rR.operator<(rL); }
+
+inline Style::Style()
+ : mfPrim(0)
+ , mfDist(0)
+ , mfSecn(0)
+ , mfPatternScale(1.0)
+ , meRefMode(RefMode::Centered)
+ , mnType(SvxBorderLineStyle::SOLID)
+ , mbWordTableCell(false)
+ , mbUseGapColor(false)
+{}
+
+}
+
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/framelinkarray.hxx b/include/svx/framelinkarray.hxx
new file mode 100644
index 000000000..10c8f4da2
--- /dev/null
+++ b/include/svx/framelinkarray.hxx
@@ -0,0 +1,326 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FRAMELINKARRAY_HXX
+#define INCLUDED_SVX_FRAMELINKARRAY_HXX
+
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/rotmodit.hxx>
+#include <memory>
+
+class Color;
+
+namespace svx::frame {
+
+struct ArrayImpl;
+class Style;
+
+/** Stores frame styles of an array of cells, supports merged ranges.
+
+ This class is able to store the frame styles of an array of cells and to
+ draw the entire array or parts of it to any output device.
+
+ Every cell contains the style of the left, right, top, bottom, top-left to
+ bottom-right, and bottom-left to top-right frame border.
+
+ On drawing, the thicker frame border of neighbored cells is selected
+ automatically. All borders are drawn "connected", that means, the correct
+ start and end coordinates of all lines of the borders are calculated,
+ especially, if they are drawn together with diagonal frame borders.
+
+ This array fully supports merged cell ranges. In a merged range, the frame
+ borders of the top-left cell is extended to the entire range, and all other
+ cells in that range are overlapped. Again, all connected frame borders,
+ also diagonals and frame borders from adjacent merged ranges, are handled
+ automatically.
+
+ Additionally, a clipping range can be set. If such a range is used, all
+ frame borders outside this range are completely ignored, and are not used
+ in the connected border calculation anymore.
+
+ The array can be mirrored in both directions. It is possible to specify,
+ whether to mirror the double frame styles, and whether to swap diagonal
+ frame borders.
+ */
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC Array
+{
+public:
+ /** Constructs an empty array. */
+ explicit Array();
+
+ /** Destructs the array. */
+ ~Array();
+
+ // array size and column/row indexes
+
+ /** Reinitializes the array with the specified size. Clears all styles. */
+ void Initialize( sal_Int32 nWidth, sal_Int32 nHeight );
+
+ /** Returns the number of columns in the array. */
+ sal_Int32 GetColCount() const;
+
+ /** Returns the number of rows in the array. */
+ sal_Int32 GetRowCount() const;
+
+ /** Returns the number of cells in the array. */
+ sal_Int32 GetCellCount() const;
+
+ /** Returns the cell index from the cell address (nCol,nRow). */
+ sal_Int32 GetCellIndex( sal_Int32 nCol, sal_Int32 nRow, bool bRTL) const;
+
+ // cell border styles
+
+ /** Sets the left frame style of the cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleLeft( sal_Int32 nCol, sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the right frame style of the cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleRight( sal_Int32 nCol, sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the top frame style of the cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleTop( sal_Int32 nCol, sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the bottom frame style of the specified cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleBottom( sal_Int32 nCol, sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the top-left to bottom-right frame style of the cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleTLBR( sal_Int32 nCol, sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the bottom-left to top-right frame style of the cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleBLTR( sal_Int32 nCol, sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets both diagonal frame styles of the specified cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellStyleDiag( sal_Int32 nCol, sal_Int32 nRow, const Style& rTLBR, const Style& rBLTR );
+
+ /** Sets the left frame style of the specified column. Ignores merged ranges. */
+ void SetColumnStyleLeft( sal_Int32 nCol, const Style& rStyle );
+
+ /** Sets the right frame style of the specified column. Ignores merged ranges. */
+ void SetColumnStyleRight( sal_Int32 nCol, const Style& rStyle );
+
+ /** Sets the top frame style of the specified row. Ignores merged ranges. */
+ void SetRowStyleTop( sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the bottom frame style of the specified row. Ignores merged ranges. */
+ void SetRowStyleBottom( sal_Int32 nRow, const Style& rStyle );
+
+ /** Sets the rotation parameters of the cell (nCol,nRow). Ignores merged ranges. */
+ void SetCellRotation(sal_Int32 nCol, sal_Int32 nRow, SvxRotateMode eRotMode, double fOrientation);
+
+ /** Check if at least one cell is rotated */
+ bool HasCellRotation() const;
+
+ /** Returns the left frame style of the cell (nCol,nRow).
+ Returns thicker of own left style or right style of the cell to the left.
+ Returns the style only if visible (i.e. at left border of a merged range).
+ @return
+ The left frame style or an invisible style for invalid cell addresses. */
+ const Style& GetCellStyleLeft( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the right frame style of the cell (nCol,nRow).
+ Returns thicker of own right style or left style of the cell to the right.
+ Returns the style only if visible (i.e. at right border of a merged range).
+ @return
+ The left frame style or an invisible style for invalid cell addresses. */
+ const Style& GetCellStyleRight( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the top frame style of the cell (nCol,nRow).
+ Returns thicker of own top style or bottom style of the cell above.
+ Returns the style only if visible (i.e. at top border of a merged range).
+ @return
+ The top frame style or an invisible style for invalid cell addresses. */
+ const Style& GetCellStyleTop( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the top frame style of the cell (nCol,nRow).
+ Returns thicker of own top style or bottom style of the cell above.
+ Returns the style only if visible (i.e. at top border of a merged range).
+ @return
+ The top frame style or an invisible style for invalid cell addresses. */
+ const Style& GetCellStyleBottom( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the top-left to bottom-right frame style of the cell (nCol,nRow).
+ Ignores merged ranges;
+ @return
+ The top-left to bottom-right frame style or an invisible style for invalid cell addresses. */
+ const Style& GetCellStyleTLBR( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the bottom-left to top-right frame style of the cell (nCol,nRow).
+ Ignores merged ranges;
+ @return
+ The bottom-left to top-right frame style or an invisible style for invalid cell addresses. */
+ const Style& GetCellStyleBLTR( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the top-left to bottom-right frame style of the cell (nCol,nRow).
+ @return
+ The top-left to bottom-right frame style, if the cell is not part of
+ a merged range, or if (nCol,nRow) is the top-left corner of a merged
+ range (useful to find connected frame styles).
+ An invisible style for invalid cell addresses. */
+ const Style& GetCellStyleTL( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the top-left to bottom-right frame style of the cell (nCol,nRow).
+ @return
+ The top-left to bottom-right frame style, if the cell is not part of
+ a merged range, or if (nCol,nRow) is the bottom-right corner of a
+ merged range (useful to find connected frame styles).
+ An invisible style for invalid cell addresses. */
+ const Style& GetCellStyleBR( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the bottom-left to top-right frame style of the cell (nCol,nRow).
+ @return
+ The bottom-left to top-right frame style, if the cell is not part of
+ a merged range, or if (nCol,nRow) is the bottom-left corner of a
+ merged range (useful to find connected frame styles).
+ An invisible style for invalid cell addresses. */
+ const Style& GetCellStyleBL( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the bottom-left to top-right frame style of the cell (nCol,nRow).
+ @return
+ The bottom-left to top-right frame style, if the cell is not part of
+ a merged range, or if (nCol,nRow) is the top-right corner of a
+ merged range (useful to find connected frame styles).
+ An invisible style for invalid cell addresses. */
+ const Style& GetCellStyleTR( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ // cell merging
+
+ /** Inserts a new merged cell range.
+ @precond The range must not intersect other merged ranges. */
+ void SetMergedRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow );
+
+ /** Sets an additional left width for the merged range that contains (nCol,nRow).
+ @descr Useful to handle merged ranges that are not completely part of the array.
+ @precond The merged range must be at the left border of the array. */
+ void SetAddMergedLeftSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAddSize );
+
+ /** Sets an additional right width for the merged range that contains (nCol,nRow).
+ @descr Useful to handle merged ranges that are not completely part of the array.
+ @precond The merged range must be at the right border of the array. */
+ void SetAddMergedRightSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAddSize );
+
+ /** Sets an additional top height for the merged range that contains (nCol,nRow).
+ @descr Useful to handle merged ranges that are not completely part of the array.
+ @precond The merged range must be at the top border of the array. */
+ void SetAddMergedTopSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAddSize );
+
+ /** Sets an additional bottom height for the merged range that contains (nCol,nRow).
+ @descr Useful to handle merged ranges that are not completely part of the array.
+ @precond The merged range must be at the bottom border of the array. */
+ void SetAddMergedBottomSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAddSize );
+
+ /** Returns true, if the cell (nCol,nRow) is part of a merged range. */
+ bool IsMerged( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the address of the top-left cell of the merged range that contains (nCol,nRow). */
+ void GetMergedOrigin( sal_Int32& rnFirstCol, sal_Int32& rnFirstRow, sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ /** Returns the top-left and bottom-right address of the merged range that contains (nCol,nRow). */
+ void GetMergedRange( sal_Int32& rnFirstCol, sal_Int32& rnFirstRow,
+ sal_Int32& rnLastCol, sal_Int32& rnLastRow, sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ // clipping
+
+ /** Sets a clipping range.
+ @descr
+ No cell borders outside of this clipping range will be drawn. In
+ difference to simply using the CreateB2DPrimitiveRange() function with the same
+ range, a clipping range causes the drawing functions to completely
+ ignore the frame styles connected from outside. This is used i.e.
+ in Calc to print single pages and to draw the print preview.
+ Partly visible diagonal frame borders in merged ranges are correctly
+ clipped too. This array can handle only one clip range at a time. */
+ void SetClipRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow );
+
+ // cell coordinates
+
+ /** Sets the X output coordinate of the left column. */
+ void SetXOffset( sal_Int32 nXOffset );
+
+ /** Sets the Y output coordinate of the top row. */
+ void SetYOffset( sal_Int32 nYOffset );
+
+ /** Sets the output width of the specified column. */
+ void SetColWidth( sal_Int32 nCol, sal_Int32 nWidth );
+
+ /** Sets the output height of the specified row. */
+ void SetRowHeight( sal_Int32 nRow, sal_Int32 nHeight );
+
+ /** Sets the same output width for all columns. */
+ void SetAllColWidths( sal_Int32 nWidth );
+
+ /** Sets the same output height for all rows. */
+ void SetAllRowHeights( sal_Int32 nHeight );
+
+ /** Returns the X output coordinate of the left border of the specified column.
+ @descr The column index <array-width> returns the X output coordinate
+ of the right array border. */
+ sal_Int32 GetColPosition( sal_Int32 nCol ) const;
+
+ /** Returns the Y output coordinate of the top border of the specified row.
+ @descr The row index <array-height> returns the Y output coordinate
+ of the bottom array border. */
+ sal_Int32 GetRowPosition( sal_Int32 nRow ) const;
+
+ /** Returns the output width of the specified range of columns. */
+ sal_Int32 GetColWidth( sal_Int32 nFirstCol, sal_Int32 nLastCol ) const;
+
+ /** Returns the output height of the specified range of rows. */
+ sal_Int32 GetRowHeight( sal_Int32 nFirstRow, sal_Int32 nLastRow ) const;
+
+ /** Returns the output width of the entire array. */
+ sal_Int32 GetWidth() const;
+
+ /** Returns the output height of the entire array. */
+ sal_Int32 GetHeight() const;
+
+ /** Returns the output range of the cell (nCol,nRow).
+ Returns total output range of merged ranges. */
+ basegfx::B2DRange GetCellRange( sal_Int32 nCol, sal_Int32 nRow ) const;
+
+ // return output range of given row/col range in logical coordinates
+ basegfx::B2DRange GetB2DRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ) const;
+
+ // mirroring
+
+ /** Mirrors the entire array horizontally. */
+ void MirrorSelfX();
+
+ // drawing
+
+ /** Draws the part of the specified range, that is inside the clipping range.
+ @param pForceColor
+ If not NULL, only this color will be used to draw all frame borders. */
+ drawinglayer::primitive2d::Primitive2DContainer CreateB2DPrimitiveRange(
+ sal_Int32 nFirstCol, sal_Int32 nFirstRow,
+ sal_Int32 nLastCol, sal_Int32 nLastRow,
+ const Color* pForceColor ) const;
+
+ /** Draws the part of the array, that is inside the clipping range. */
+ drawinglayer::primitive2d::Primitive2DContainer CreateB2DPrimitiveArray() const;
+
+private:
+ std::unique_ptr<ArrayImpl> mxImpl;
+};
+
+}
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx
new file mode 100644
index 000000000..84160d846
--- /dev/null
+++ b/include/svx/frmdirlbox.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FRMDIRLBOX_HXX
+#define INCLUDED_SVX_FRMDIRLBOX_HXX
+
+#include <vcl/weld.hxx>
+#include <editeng/frmdir.hxx>
+#include <svx/svxdllapi.h>
+
+namespace svx
+{
+/** This listbox contains entries to select horizontal text direction.
+
+ The control works on the SvxFrameDirection enumeration (i.e. left-to-right,
+ right-to-left), used i.e. in conjunction with the SvxFrameDirectionItem.
+ */
+class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameDirectionListBox
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+public:
+ explicit FrameDirectionListBox(std::unique_ptr<weld::ComboBox> pControl);
+ virtual ~FrameDirectionListBox();
+ bool get_visible() const { return m_xControl->get_visible(); }
+ void save_value() { m_xControl->save_value(); }
+ bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); }
+ SvxFrameDirection get_active_id() const
+ {
+ return static_cast<SvxFrameDirection>(m_xControl->get_active_id().toUInt32());
+ }
+ void set_active_id(SvxFrameDirection eDir)
+ {
+ m_xControl->set_active_id(OUString::number(static_cast<sal_uInt32>(eDir)));
+ }
+ void remove_id(SvxFrameDirection eDir)
+ {
+ int nPos = m_xControl->find_id(OUString::number(static_cast<sal_uInt32>(eDir)));
+ if (nPos != -1)
+ m_xControl->remove(nPos);
+ }
+ void set_active(int pos) { m_xControl->set_active(pos); }
+ int get_active() const { return m_xControl->get_active(); }
+ void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
+ void hide() { m_xControl->hide(); }
+ void set_visible(bool bVisible) { m_xControl->set_visible(bVisible); }
+ void show() { m_xControl->show(); }
+ int get_count() const { return m_xControl->get_count(); }
+ /** Inserts a string with corresponding direction enum into the listbox. */
+ void append(SvxFrameDirection eDirection, const OUString& rString)
+ {
+ m_xControl->append(OUString::number(static_cast<sal_uInt32>(eDirection)), rString);
+ }
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink)
+ {
+ m_xControl->connect_changed(rLink);
+ }
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx
new file mode 100644
index 000000000..498b4857c
--- /dev/null
+++ b/include/svx/frmsel.hxx
@@ -0,0 +1,194 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_FRMSEL_HXX
+#define INCLUDED_SVX_FRMSEL_HXX
+
+#include <memory>
+#include <vcl/customweld.hxx>
+#include <editeng/borderline.hxx>
+#include <svx/framebordertype.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+
+class Color;
+
+enum class FrameSelFlags
+{
+ NONE = 0x0000,
+ /** If set, the left frame border is enabled. */
+ Left = 0x0001,
+ /** If set, the right frame border is enabled. */
+ Right = 0x0002,
+ /** If set, the top frame border is enabled. */
+ Top = 0x0004,
+ /** If set, the bottom frame border is enabled. */
+ Bottom = 0x0008,
+ /** If set, the inner horizontal frame border is enabled. */
+ InnerHorizontal = 0x0010,
+ /** If set, the inner vertical frame border is enabled. */
+ InnerVertical = 0x0020,
+ /** If set, the top-left to bottom-right diagonal frame border is enabled. */
+ DiagonalTLBR = 0x0040,
+ /** If set, the bottom-left to top-right diagonal frame border is enabled. */
+ DiagonalBLTR = 0x0080,
+
+ /** If set, all four outer frame borders are enabled. */
+ Outer = Left | Right | Top | Bottom,
+
+ /** If set, all frame borders will support the don't care state. */
+ DontCare = 0x0100
+};
+namespace o3tl
+{
+ template<> struct typed_flags<FrameSelFlags> : is_typed_flags<FrameSelFlags, 0x1ff> {};
+}
+
+namespace svx {
+
+struct FrameSelectorImpl;
+namespace a11y { class AccFrameSelectorChild; }
+
+/** All possible states of a frame border. */
+enum class FrameBorderState
+{
+ Show, /// Frame border has a visible style.
+ Hide, /// Frame border is hidden (off).
+ DontCare /// Frame border is in don't care state (if enabled).
+};
+
+
+namespace a11y
+{
+ class AccFrameSelector;
+}
+
+class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameSelector final : public weld::CustomWidgetController
+{
+public:
+ FrameSelector();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~FrameSelector() override;
+
+ /** Initializes the control, enables/disables frame borders according to flags. */
+ void Initialize( FrameSelFlags nFlags );
+
+ // enabled frame borders
+
+ /** Returns true, if the specified frame border is enabled. */
+ bool IsBorderEnabled( FrameBorderType eBorder ) const;
+ /** Returns the number of enabled frame borders. */
+ sal_Int32 GetEnabledBorderCount() const;
+ /** Returns the border type from the passed index (counts only enabled frame borders). */
+ FrameBorderType GetEnabledBorderType( sal_Int32 nIndex ) const;
+
+ // frame border state and style
+
+ /** Returns true, if the control supports the "don't care" frame border state. */
+ bool SupportsDontCareState() const;
+
+ /** Returns the state (visible/hidden/don't care) of the specified frame border. */
+ FrameBorderState GetFrameBorderState( FrameBorderType eBorder ) const;
+ /** Returns the style of the specified frame border, if it is visible. */
+ const editeng::SvxBorderLine* GetFrameBorderStyle( FrameBorderType eBorder ) const;
+
+ /** Shows the specified frame border using the passed style, or hides it, if pStyle is 0. */
+ void ShowBorder( FrameBorderType eBorder, const editeng::SvxBorderLine* pStyle );
+ /** Sets the specified frame border to "don't care" state. */
+ void SetBorderDontCare( FrameBorderType eBorder );
+
+ /** Returns true, if any enabled frame border has a visible style (not "don't care"). */
+ bool IsAnyBorderVisible() const;
+ /** Hides all enabled frame borders. */
+ void HideAllBorders();
+
+ /** Returns true, if all visible frame borders have equal widths.
+ @descr Ignores hidden and "don't care" frame borders. On success,
+ returns the width in the passed parameter. */
+ bool GetVisibleWidth( tools::Long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
+ /** Returns true, if all visible frame borders have equal color.
+ @descr Ignores hidden and "don't care" frame borders. On success,
+ returns the color in the passed parameter. */
+ bool GetVisibleColor( Color& rColor ) const;
+
+ // frame border selection
+
+ /** Returns the current selection handler. */
+ const Link<LinkParamNone*,void>& GetSelectHdl() const;
+ /** Sets the passed handler that is called if the selection of the control changes. */
+ void SetSelectHdl( const Link<LinkParamNone*,void>& rHdl );
+
+ /** Returns true, if the specified frame border is selected. */
+ bool IsBorderSelected( FrameBorderType eBorder ) const;
+ /** Selects or deselects the specified frame border. */
+ void SelectBorder( FrameBorderType eBorder );
+ /** Returns true, if any of the enabled frame borders is selected. */
+ bool IsAnyBorderSelected() const;
+ /** Selects or deselects all frame borders. */
+ void SelectAllBorders( bool bSelect );
+ /** Deselects all frame borders. */
+ void DeselectAllBorders() { SelectAllBorders( false ); }
+
+ /** Selects or deselects all visible frame borders (ignores hidden and "don't care" borders). */
+ void SelectAllVisibleBorders();
+
+ /** Sets the passed line widths to all selected frame borders (in twips). */
+ void SetStyleToSelection( tools::Long nWidth, SvxBorderLineStyle nStyle );
+ /** Sets the passed color to all selected frame borders. */
+ void SetColorToSelection( const Color& rColor );
+
+ SvxBorderLineStyle getCurrentStyleLineStyle() const;
+
+ // accessibility
+
+ css::uno::Reference<css::accessibility::XAccessible> getAccessibleParent() const { return GetDrawingArea()->get_accessible_parent(); }
+ virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
+ a11yrelationset get_accessible_relation_set() const { return GetDrawingArea()->get_accessible_relation_set(); }
+
+ /** Returns the accessibility child object of the specified frame border (if enabled). */
+ rtl::Reference< a11y::AccFrameSelectorChild >
+ GetChildAccessible( FrameBorderType eBorder );
+ /** Returns the accessibility child object with specified index (counts enabled frame borders only). */
+ css::uno::Reference< css::accessibility::XAccessible >
+ GetChildAccessible( sal_Int32 nIndex );
+ /** Returns the accessibility child object at the specified position (relative to control). */
+ css::uno::Reference< css::accessibility::XAccessible >
+ GetChildAccessible( const Point& rPos );
+
+ /** Returns the bounding rectangle of the specified frame border (if enabled). */
+ tools::Rectangle GetClickBoundRect( FrameBorderType eBorder ) const;
+
+private:
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+ virtual void StyleUpdated() override;
+ virtual void Resize() override;
+
+ rtl::Reference<a11y::AccFrameSelector> mxAccess; /// Pointer to accessibility object of the control.
+ std::unique_ptr< FrameSelectorImpl > mxImpl;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx
new file mode 100644
index 000000000..61fd62927
--- /dev/null
+++ b/include/svx/galctrl.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GALCTRL_HXX
+#define INCLUDED_SVX_GALCTRL_HXX
+
+#include <vcl/graph.hxx>
+#include <vcl/customweld.hxx>
+#include <svtools/valueset.hxx>
+#include <vcl/GraphicObject.hxx>
+#include <svx/svxdllapi.h>
+
+class GalleryDragDrop;
+class GalleryTheme;
+class GalleryBrowser2;
+class INetURLObject;
+
+class GalleryPreview final : public weld::CustomWidgetController
+{
+private:
+
+ std::unique_ptr<GalleryDragDrop> mxDragDropTargetHelper;
+ std::unique_ptr<weld::ScrolledWindow> mxScrolledWindow;
+ GraphicObject aGraphicObj;
+ tools::Rectangle aPreviewRect;
+ GalleryBrowser2* mpParent;
+ GalleryTheme* mpTheme;
+
+ bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const;
+
+ // Window
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+ virtual bool Command(const CommandEvent& rCEvt) override;
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
+
+public:
+
+ GalleryPreview(GalleryBrowser2* pParent, std::unique_ptr<weld::ScrolledWindow> xScrolledWindow);
+ void SetTheme(GalleryTheme* pTheme) { mpTheme = pTheme; }
+ virtual ~GalleryPreview() override;
+
+ virtual bool StartDrag() override;
+
+ virtual void Show() override;
+ virtual void Hide() override;
+
+ void SetGraphic( const Graphic& rGraphic ) { aGraphicObj.SetGraphic( rGraphic ); }
+ static void PreviewMedia( const INetURLObject& rURL );
+};
+
+class SVXCORE_DLLPUBLIC DialogGalleryPreview final : public weld::CustomWidgetController
+{
+private:
+ GraphicObject aGraphicObj;
+ tools::Rectangle aPreviewRect;
+
+ SVX_DLLPRIVATE bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const;
+
+ SVX_DLLPRIVATE virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+
+public:
+
+ DialogGalleryPreview();
+
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ void SetGraphic( const Graphic& rGraphic ) { aGraphicObj.SetGraphic( rGraphic ); }
+ bool SetGraphic( const INetURLObject& );
+};
+
+class GalleryIconView final : public ValueSet
+{
+private:
+ std::unique_ptr<GalleryDragDrop> mxDragDropTargetHelper;
+
+ GalleryBrowser2* mpParent;
+ GalleryTheme* mpTheme;
+
+ // ValueSet
+ virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
+
+ // Window
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual bool Command( const CommandEvent& rCEvt ) override;
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
+
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+
+public:
+
+ GalleryIconView(GalleryBrowser2* pParent, std::unique_ptr<weld::ScrolledWindow> xScrolledWindow);
+ void SetTheme(GalleryTheme* pTheme) { mpTheme = pTheme; }
+ virtual ~GalleryIconView() override;
+
+ virtual bool StartDrag() override;
+
+ static void drawTransparenceBackground(vcl::RenderContext& rOut, const Point& rPos, const Size& rSize);
+};
+
+#endif // INCLUDED_SVX_GALCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx
new file mode 100644
index 000000000..d668bf9e6
--- /dev/null
+++ b/include/svx/gallery.hxx
@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GALLERY_HXX
+#define INCLUDED_SVX_GALLERY_HXX
+
+#include <svx/svxdllapi.h>
+#include <rtl/ustring.hxx>
+#include <vector>
+
+// Defines for preinstalled themes
+#define GALLERY_THEME_3D 1
+#define GALLERY_THEME_BULLETS 3
+#define GALLERY_THEME_HOMEPAGE 10
+#define GALLERY_THEME_HTMLBUTTONS 15
+#define GALLERY_THEME_POWERPOINT 16
+#define GALLERY_THEME_RULERS 17
+#define GALLERY_THEME_SOUNDS 18
+#define GALLERY_THEME_MYTHEME 20
+#define GALLERY_THEME_USERSOUNDS 21
+#define GALLERY_THEME_DUMMY5 36
+#define GALLERY_THEME_FONTWORK 37
+#define GALLERY_THEME_FONTWORK_VERTICAL 38
+
+#define RID_GALLERY_THEME_START (6000)
+
+// ATTENTION: This list has to be in sync with
+// * share/gallery (theme files are identified by id)
+//
+// Since galleries may be copied from older offices to newer, do *never* change
+// these IDs except adding new ones (and adapting GALLERY_THEME_LAST). The ID
+// *is* written into the binary file *.thm (which is a gallery theme combined
+// of three files, *.thm, *.sdv and *.sdg)
+
+#define RID_GALLERY_THEME_3D (RID_GALLERY_THEME_START + 1)
+#define RID_GALLERY_THEME_ANIMATIONS (RID_GALLERY_THEME_START + 2)
+#define RID_GALLERY_THEME_BULLETS (RID_GALLERY_THEME_START + 3)
+#define RID_GALLERY_THEME_OFFICE (RID_GALLERY_THEME_START + 4)
+#define RID_GALLERY_THEME_FLAGS (RID_GALLERY_THEME_START + 5)
+#define RID_GALLERY_THEME_FLOWCHARTS (RID_GALLERY_THEME_START + 6)
+#define RID_GALLERY_THEME_EMOTICONS (RID_GALLERY_THEME_START + 7)
+#define RID_GALLERY_THEME_PHOTOS (RID_GALLERY_THEME_START + 8)
+#define RID_GALLERY_THEME_BACKGROUNDS (RID_GALLERY_THEME_START + 9)
+#define RID_GALLERY_THEME_HOMEPAGE (RID_GALLERY_THEME_START + 10)
+#define RID_GALLERY_THEME_INTERACTION (RID_GALLERY_THEME_START + 11)
+#define RID_GALLERY_THEME_MAPS (RID_GALLERY_THEME_START + 12)
+#define RID_GALLERY_THEME_PEOPLE (RID_GALLERY_THEME_START + 13)
+#define RID_GALLERY_THEME_SURFACES (RID_GALLERY_THEME_START + 14)
+
+#define RID_GALLERY_THEME_SOUNDS (RID_GALLERY_THEME_START + 18)
+#define RID_GALLERY_THEME_SYMBOLS (RID_GALLERY_THEME_START + 19)
+#define RID_GALLERY_THEME_MYTHEME (RID_GALLERY_THEME_START + 20)
+
+#define RID_GALLERY_THEME_ARROWS (RID_GALLERY_THEME_START + 22)
+#define RID_GALLERY_THEME_BALLOONS (RID_GALLERY_THEME_START + 23)
+#define RID_GALLERY_THEME_KEYBOARD (RID_GALLERY_THEME_START + 24)
+#define RID_GALLERY_THEME_TIME (RID_GALLERY_THEME_START + 25)
+#define RID_GALLERY_THEME_PRESENTATION (RID_GALLERY_THEME_START + 26)
+#define RID_GALLERY_THEME_CALENDAR (RID_GALLERY_THEME_START + 27)
+#define RID_GALLERY_THEME_NAVIGATION (RID_GALLERY_THEME_START + 28)
+#define RID_GALLERY_THEME_COMMUNICATION (RID_GALLERY_THEME_START + 29)
+#define RID_GALLERY_THEME_FINANCES (RID_GALLERY_THEME_START + 30)
+#define RID_GALLERY_THEME_COMPUTER (RID_GALLERY_THEME_START + 31)
+#define RID_GALLERY_THEME_CLIMA (RID_GALLERY_THEME_START + 32)
+#define RID_GALLERY_THEME_EDUCATION (RID_GALLERY_THEME_START + 33)
+#define RID_GALLERY_THEME_TROUBLE (RID_GALLERY_THEME_START + 34)
+#define RID_GALLERY_THEME_SCREENBEANS (RID_GALLERY_THEME_START + 35)
+
+#define RID_GALLERY_THEME_COMPUTERS (RID_GALLERY_THEME_START + 39)
+#define RID_GALLERY_THEME_DIAGRAMS (RID_GALLERY_THEME_START + 40)
+#define RID_GALLERY_THEME_ENVIRONMENT (RID_GALLERY_THEME_START + 41)
+#define RID_GALLERY_THEME_FINANCE (RID_GALLERY_THEME_START + 42)
+#define RID_GALLERY_THEME_TRANSPORT (RID_GALLERY_THEME_START + 43)
+#define RID_GALLERY_THEME_TXTSHAPES (RID_GALLERY_THEME_START + 44)
+
+#define RID_GALLERY_THEME_FIRST RID_GALLERY_THEME_3D
+#define RID_GALLERY_THEME_LAST RID_GALLERY_THEME_TXTSHAPES
+
+class SdrModel;
+class Graphic;
+class BitmapEx;
+
+class SVXCORE_DLLPUBLIC GalleryExplorer
+{
+public:
+
+ static bool FillThemeList( std::vector<OUString>& rThemeList );
+
+ // FillObjList is filling rObjList with Strings of the internal Gallery Object URL
+ static bool FillObjList( std::u16string_view rThemeName, std::vector<OUString> &rObjList );
+ static bool FillObjList( const sal_uInt32 nThemeId, std::vector<OUString> &rObjList );
+
+ // FillObjTitleList is filling the rList with the title for each gallery object
+ static bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList );
+
+ static bool InsertURL( std::u16string_view rThemeName, std::u16string_view rURL );
+ static bool InsertURL( sal_uInt32 nThemeId, std::u16string_view rURL );
+
+ static bool GetGraphicObj( std::u16string_view rThemeName, sal_uInt32 nPos,
+ Graphic* pGraphic );
+ static bool GetGraphicObj( sal_uInt32 nThemeId, sal_uInt32 nPos,
+ Graphic* pGraphic );
+
+ static sal_uInt32 GetSdrObjCount( std::u16string_view rThemeName );
+ static sal_uInt32 GetSdrObjCount( sal_uInt32 nThemeId );
+
+ static bool GetSdrObj( std::u16string_view rThemeName, sal_uInt32 nSdrModelPos,
+ SdrModel* pModel, BitmapEx* pThumb = nullptr );
+ static bool GetSdrObj( sal_uInt32 nThemeId, sal_uInt32 nSdrModelPos,
+ SdrModel* pModel, BitmapEx* pThumb = nullptr );
+
+ static bool BeginLocking( std::u16string_view rThemeName );
+ static bool BeginLocking( sal_uInt32 nThemeId );
+
+ static bool EndLocking( std::u16string_view rThemeName );
+ static bool EndLocking( sal_uInt32 nThemeId );
+};
+
+#endif // INCLUDED_SVX_GALLERY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx
new file mode 100644
index 000000000..708d6fa0d
--- /dev/null
+++ b/include/svx/gallery1.hxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GALLERY1_HXX
+#define INCLUDED_SVX_GALLERY1_HXX
+
+#include <rtl/ustring.hxx>
+#include <svl/SfxBroadcaster.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/urlobj.hxx>
+#include <svx/gallerybinaryengineentry.hxx>
+#include <svx/gallerybinaryengine.hxx>
+
+#include <cstdio>
+#include <memory>
+#include <vector>
+
+class GalleryBinaryEngineEntry;
+class GalleryStorageLocations;
+class GalleryTheme;
+
+class GalleryThemeEntry
+{
+private:
+
+ std::unique_ptr<GalleryBinaryEngineEntry> mpGalleryStorageEngineEntry;
+ OUString aName;
+ sal_uInt32 nId;
+ bool bReadOnly;
+ bool bModified;
+ bool bThemeNameFromResource;
+
+public:
+ GalleryThemeEntry( bool bCreateUniqueURL,
+ const INetURLObject& rBaseURL,
+ const OUString& rName,
+ bool bReadOnly, bool bNewFile,
+ sal_uInt32 nId, bool bThemeNameFromResource );
+
+ const std::unique_ptr<GalleryBinaryEngineEntry>& getGalleryStorageEngineEntry() const { return mpGalleryStorageEngineEntry; }
+
+ GalleryStorageLocations& getGalleryStorageLocations() const { return *mpGalleryStorageEngineEntry->getGalleryStorageLocations(); }
+
+ GalleryTheme* createGalleryTheme(Gallery* pGallery);
+
+ std::unique_ptr<GalleryBinaryEngine> createGalleryStorageEngine(GalleryObjectCollection& mrGalleryObjectCollection);
+
+ const OUString& GetThemeName() const { return aName; }
+
+ bool IsReadOnly() const { return bReadOnly; }
+ bool IsDefault() const;
+
+ bool IsHidden() const { return aName.match("private://gallery/hidden/"); }
+
+ bool IsModified() const { return bModified; }
+ void SetModified( bool bSet ) { bModified = ( bSet && !IsReadOnly() ); }
+
+ void SetName( const OUString& rNewName );
+ bool IsNameFromResource() const { return bThemeNameFromResource; }
+
+ sal_uInt32 GetId() const { return nId; }
+ void SetId( sal_uInt32 nNewId, bool bResetThemeName );
+
+
+ void removeTheme();
+
+ std::unique_ptr<GalleryTheme> getCachedTheme(Gallery* pGallery);
+
+ void setStorageLocations(INetURLObject& rURL);
+};
+
+class SfxListener;
+class GalleryTheme;
+class GalleryThemeCacheEntry;
+
+
+class SVXCORE_DLLPUBLIC Gallery final : public SfxBroadcaster
+{
+ typedef std::vector<GalleryThemeCacheEntry*> GalleryCacheThemeList;
+
+private:
+
+ std::vector< std::unique_ptr<GalleryThemeEntry> > aThemeList;
+ GalleryCacheThemeList aThemeCache;
+ INetURLObject aRelURL;
+ INetURLObject aUserURL;
+ bool bMultiPath;
+
+ SAL_DLLPRIVATE void ImplLoad( std::u16string_view rMultiPath );
+ SAL_DLLPRIVATE void ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbIsReadOnly );
+
+ GalleryThemeEntry* ImplGetThemeEntry( std::u16string_view rThemeName );
+
+ SAL_DLLPRIVATE GalleryTheme* ImplGetCachedTheme( GalleryThemeEntry* pThemeEntry );
+ SAL_DLLPRIVATE void ImplDeleteCachedTheme( GalleryTheme const * pTheme );
+
+ Gallery& operator=( Gallery const & ) = delete; // MSVC2015 workaround
+ Gallery( Gallery const & ) = delete; // MSVC2015 workaround
+
+public:
+ // only for gengal utility!
+ Gallery( std::u16string_view rMultiPath );
+ virtual ~Gallery() override;
+
+ static Gallery* GetGalleryInstance();
+
+ size_t GetThemeCount() const { return aThemeList.size(); }
+ SAL_DLLPRIVATE const GalleryThemeEntry* GetThemeInfo( size_t nPos )
+ { return nPos < aThemeList.size() ? aThemeList[ nPos ].get() : nullptr; }
+ const GalleryThemeEntry* GetThemeInfo( std::u16string_view rThemeName ) { return ImplGetThemeEntry( rThemeName ); }
+
+ bool HasTheme( std::u16string_view rThemeName );
+ SAL_DLLPRIVATE OUString GetThemeName( sal_uInt32 nThemeId ) const;
+
+ bool CreateTheme( const OUString& rThemeName );
+ void RenameTheme( const OUString& rOldName, const OUString& rNewName );
+ bool RemoveTheme( const OUString& rThemeName );
+
+ GalleryTheme* AcquireTheme( std::u16string_view rThemeName, SfxListener& rListener );
+ void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener );
+
+public:
+
+ SAL_DLLPRIVATE const INetURLObject& GetUserURL() const { return aUserURL; }
+ SAL_DLLPRIVATE const INetURLObject& GetRelativeURL() const { return aRelURL; }
+};
+
+#endif // INCLUDED_SVX_GALLERY1_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallerybinaryengine.hxx b/include/svx/gallerybinaryengine.hxx
new file mode 100644
index 000000000..5e89b5dd7
--- /dev/null
+++ b/include/svx/gallerybinaryengine.hxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/galmisc.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/fmmodel.hxx>
+#include <svx/gallerybinarystoragelocations.hxx>
+#include <svx/galleryfilestorage.hxx>
+#include <tools/urlobj.hxx>
+#include <sot/storage.hxx>
+#include <vcl/salctype.hxx>
+
+#include <tools/datetime.hxx>
+
+#include <memory>
+
+class GalleryStorageLocations;
+class GalleryBinaryStorageLocations;
+class GalleryObjectCollection;
+class SgaObjectSvDraw;
+class SgaObjectBmp;
+class SgaObject;
+class SotStorage;
+struct GalleryObject;
+class FmFormModel;
+class GalleryTheme;
+class GalleryThemeEntry;
+
+class SVXCORE_DLLPUBLIC GalleryBinaryEngine final : public GalleryFileStorage
+{
+private:
+ tools::SvRef<SotStorage> m_aSvDrawStorageRef;
+ const GalleryBinaryStorageLocations& maGalleryStorageLocations;
+ GalleryObjectCollection& mrGalleryObjectCollection;
+ bool mbReadOnly;
+ OUString m_aDestDir;
+ bool m_bDestDirRelative;
+
+ const INetURLObject& GetSdgURL() const { return maGalleryStorageLocations.GetSdgURL(); }
+ const INetURLObject& GetSdvURL() const { return maGalleryStorageLocations.GetSdvURL(); }
+ const INetURLObject& GetStrURL() const { return maGalleryStorageLocations.GetStrURL(); }
+ const INetURLObject& GetThmURL() const { return maGalleryStorageLocations.GetThmURL(); }
+
+public:
+ GalleryBinaryEngine(const GalleryBinaryStorageLocations& rGalleryStorageLocations,
+ GalleryObjectCollection& rGalleryObjectCollection, bool bReadOnly);
+ SAL_DLLPRIVATE ~GalleryBinaryEngine();
+
+ void clearSotStorage();
+
+ void setDestDir(const OUString& rDestDir, bool bRelative);
+
+ SAL_DLLPRIVATE void ImplCreateSvDrawStorage();
+ SAL_DLLPRIVATE const tools::SvRef<SotStorage>& GetSvDrawStorage() const;
+
+ const INetURLObject& getThemeURL() const { return maGalleryStorageLocations.getThemeURL(); }
+
+ SAL_DLLPRIVATE bool implWrite(const GalleryTheme& rTheme, const GalleryThemeEntry* pThm);
+
+ void insertObject(const SgaObject& rObj, GalleryObject* pFoundEntry, sal_uInt32 nInsertPos);
+ void removeObject(const std::unique_ptr<GalleryObject>& pEntry);
+
+ std::unique_ptr<SgaObject> implReadSgaObject(GalleryObject const* pEntry);
+ bool implWriteSgaObject(const SgaObject& rObj, sal_uInt32 nPos, GalleryObject* pExistentEntry);
+
+ bool readModel(const GalleryObject* pObject, SdrModel& rModel);
+ SgaObjectSvDraw insertModel(const FmFormModel& rModel, const INetURLObject& rUserURL);
+
+ bool readModelStream(const GalleryObject* pObject,
+ tools::SvRef<SotTempStream> const& rxModelStream);
+ SgaObjectSvDraw insertModelStream(const tools::SvRef<SotTempStream>& rxModelStream,
+ const INetURLObject& rUserURL);
+
+ INetURLObject implCreateUniqueURL(SgaObjKind eObjKind, const INetURLObject& rUserURL,
+ ConvertDataFormat nFormat = ConvertDataFormat::Unknown);
+
+ SgaObjectBmp insertGraphic(const Graphic& rGraphic, const GfxLink& aGfxLink,
+ const ConvertDataFormat& nExportFormat,
+ const INetURLObject& rUserURL);
+
+ SgaObjectSvDraw updateSvDrawObject(const GalleryObject* pEntry);
+
+ void updateTheme();
+ static void insertFileOrDirURL(const INetURLObject& rFileOrDirURL,
+ std::vector<INetURLObject>& rURLVector);
+
+ SvStream& writeGalleryTheme(SvStream& rOStm, const GalleryTheme& rTheme,
+ const GalleryThemeEntry* pThm);
+
+ DateTime getModificationDate() const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallerybinaryengineentry.hxx b/include/svx/gallerybinaryengineentry.hxx
new file mode 100644
index 000000000..f624e9177
--- /dev/null
+++ b/include/svx/gallerybinaryengineentry.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <tools/urlobj.hxx>
+#include <svx/galtheme.hxx>
+#include <svx/gallerybinaryengine.hxx>
+#include <svx/gallerybinarystoragelocations.hxx>
+#include <svx/galleryfilestorageentry.hxx>
+
+class GalleryBinaryStorageLocations;
+class GalleryObjectCollection;
+class GalleryBinaryEngine;
+
+class GalleryBinaryEngineEntry final : public GalleryFileStorageEntry
+{
+private:
+ std::unique_ptr<GalleryBinaryStorageLocations> mpGalleryStorageLocations;
+
+public:
+ GalleryBinaryEngineEntry();
+ static void CreateUniqueURL(const INetURLObject& rBaseURL, INetURLObject& aURL);
+
+ OUString ReadStrFromIni(std::u16string_view aKeyName) const;
+
+ const INetURLObject& GetThmURL() const { return mpGalleryStorageLocations->GetThmURL(); }
+ const INetURLObject& GetSdgURL() const { return mpGalleryStorageLocations->GetSdgURL(); }
+ const INetURLObject& GetSdvURL() const { return mpGalleryStorageLocations->GetSdvURL(); }
+ const INetURLObject& GetStrURL() const { return mpGalleryStorageLocations->GetStrURL(); }
+
+ const std::unique_ptr<GalleryBinaryStorageLocations>& getGalleryStorageLocations() const
+ {
+ return mpGalleryStorageLocations;
+ }
+
+ static GalleryThemeEntry* CreateThemeEntry(const INetURLObject& rURL, bool bReadOnly);
+
+ void removeTheme();
+
+ std::unique_ptr<GalleryTheme>& getCachedTheme(std::unique_ptr<GalleryTheme>& pNewTheme);
+
+ void setStorageLocations(INetURLObject& rURL);
+
+ std::unique_ptr<GalleryBinaryEngine>
+ createGalleryStorageEngine(GalleryObjectCollection& mrGalleryObjectCollection, bool& bReadOnly);
+};
+
+SvStream& ReadGalleryTheme(SvStream& rIn, GalleryTheme& rTheme);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallerybinarystoragelocations.hxx b/include/svx/gallerybinarystoragelocations.hxx
new file mode 100644
index 000000000..6876c64a2
--- /dev/null
+++ b/include/svx/gallerybinarystoragelocations.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <tools/urlobj.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/gallerystoragelocations.hxx>
+
+class SVXCORE_DLLPUBLIC GalleryBinaryStorageLocations final : public GalleryStorageLocations
+{
+private:
+ INetURLObject maThmURL;
+ INetURLObject maSdgURL;
+ INetURLObject maSdvURL;
+ INetURLObject maStrURL;
+
+ void SetThmExtension(INetURLObject& aURL);
+ void SetSdgExtension(INetURLObject& aURL);
+ void SetSdvExtension(INetURLObject& aURL);
+ void SetStrExtension(INetURLObject& aURL);
+
+public:
+ static INetURLObject ImplGetURLIgnoreCase(const INetURLObject& rURL);
+
+ const INetURLObject& GetThmURL() const { return maThmURL; }
+ const INetURLObject& GetSdgURL() const { return maSdgURL; }
+ const INetURLObject& GetSdvURL() const { return maSdvURL; }
+ const INetURLObject& GetStrURL() const { return maStrURL; }
+
+ void SetStorageLocations(INetURLObject& aURL);
+
+ const INetURLObject& getThemeURL() const { return maSdgURL; }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galleryfilestorage.hxx b/include/svx/galleryfilestorage.hxx
new file mode 100644
index 000000000..fee632e9b
--- /dev/null
+++ b/include/svx/galleryfilestorage.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+class GalleryFileStorage
+{
+public:
+ virtual ~GalleryFileStorage() = 0;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galleryfilestorageentry.hxx b/include/svx/galleryfilestorageentry.hxx
new file mode 100644
index 000000000..0f00cfb5a
--- /dev/null
+++ b/include/svx/galleryfilestorageentry.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+class GalleryFileStorageEntry
+{
+public:
+ virtual ~GalleryFileStorageEntry() = 0;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galleryitem.hxx b/include/svx/galleryitem.hxx
new file mode 100644
index 000000000..de16c6f24
--- /dev/null
+++ b/include/svx/galleryitem.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_GALLERYITEM_HXX
+#define INCLUDED_SVX_GALLERYITEM_HXX
+
+#include <svx/svxdllapi.h>
+#include <svl/poolitem.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace com::sun::star::graphic { class XGraphic; }
+namespace com::sun::star::lang { class XComponent; }
+
+// property names map those from css::gallery::GalleryItem
+// with exception of "AsLink" and "FilterName"
+inline constexpr OUStringLiteral SVXGALLERYITEM_TYPE = u"GalleryItemType";
+inline constexpr OUStringLiteral SVXGALLERYITEM_URL = u"URL";
+inline constexpr OUStringLiteral SVXGALLERYITEM_FILTER = u"FilterName";
+inline constexpr OUStringLiteral SVXGALLERYITEM_DRAWING = u"Drawing";
+inline constexpr OUStringLiteral SVXGALLERYITEM_GRAPHIC = u"Graphic";
+#define SVXGALLERYITEM_PARAMS 5
+inline constexpr OUStringLiteral SVXGALLERYITEM_ARGNAME = u"GalleryItem";
+
+class SVXCORE_DLLPUBLIC SvxGalleryItem final : public SfxPoolItem
+{
+ sal_Int8 m_nType;
+ OUString m_aURL;
+ css::uno::Reference< css::lang::XComponent > m_xDrawing;
+ css::uno::Reference< css::graphic::XGraphic > m_xGraphic;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxGalleryItem();
+ SvxGalleryItem( const SvxGalleryItem& );
+ virtual ~SvxGalleryItem() override;
+
+ sal_Int8 GetType() const { return m_nType; }
+ const OUString& GetURL() const { return m_aURL; }
+ const css::uno::Reference< css::graphic::XGraphic >& GetGraphic() const { return m_xGraphic; }
+
+ // pure virtual methods from SfxPoolItem
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxGalleryItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ // bridge to UNO
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galleryobjectcollection.hxx b/include/svx/galleryobjectcollection.hxx
new file mode 100644
index 000000000..07a952b59
--- /dev/null
+++ b/include/svx/galleryobjectcollection.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+#include <svx/galmisc.hxx>
+#include <svx/galleryobjectstorage.hxx>
+
+#include <vcl/bitmapex.hxx>
+#include <tools/urlobj.hxx>
+#include <memory>
+#include <vector>
+
+struct GalleryObject
+{
+ std::unique_ptr<GalleryObjectStorage> m_pGalleryObjectStorage;
+ sal_uInt32 nOffset;
+ SgaObjKind eObjKind;
+ bool mbDelete;
+
+ //UI visualization buffering
+ BitmapEx maPreviewBitmapEx;
+ Size maPreparedSize;
+ OUString maTitle;
+ OUString maPath;
+
+ const INetURLObject& getURL() const { return m_pGalleryObjectStorage->getURL(); }
+};
+
+class SVXCORE_DLLPUBLIC GalleryObjectCollection
+{
+private:
+ std::vector<std::unique_ptr<GalleryObject>> m_aObjectList;
+
+public:
+ GalleryObjectCollection();
+ std::vector<std::unique_ptr<GalleryObject>>& getObjectList() { return m_aObjectList; }
+ std::unique_ptr<GalleryObject>& get(sal_uInt32 nPos) { return m_aObjectList[nPos]; }
+ const std::unique_ptr<GalleryObject>& get(sal_uInt32 nPos) const { return m_aObjectList[nPos]; }
+ sal_uInt32 size() const { return m_aObjectList.size(); }
+
+ const GalleryObject* searchObjectWithURL(const INetURLObject& rURL);
+ const GalleryObject* getForPosition(sal_uInt32 nPos) const;
+ sal_uInt32 searchPosWithObject(const GalleryObject* pObj);
+ const INetURLObject& getURLForPosition(sal_uInt32 nPos) const;
+
+ void clear();
+
+ GalleryObjectCollection(GalleryObjectCollection const&) = delete;
+ void operator=(GalleryObjectCollection const&) = delete;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galleryobjectstorage.hxx b/include/svx/galleryobjectstorage.hxx
new file mode 100644
index 000000000..cdca68b14
--- /dev/null
+++ b/include/svx/galleryobjectstorage.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <tools/urlobj.hxx>
+
+class GalleryObjectStorage
+{
+public:
+ virtual ~GalleryObjectStorage() = 0;
+ virtual const INetURLObject& getURL() const = 0;
+ virtual void setURL(INetURLObject aURL) = 0;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gallerystoragelocations.hxx b/include/svx/gallerystoragelocations.hxx
new file mode 100644
index 000000000..343ed0b7e
--- /dev/null
+++ b/include/svx/gallerystoragelocations.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+#include <tools/urlobj.hxx>
+
+class SVXCORE_DLLPUBLIC GalleryStorageLocations
+{
+public:
+ virtual ~GalleryStorageLocations() = 0;
+ virtual void SetStorageLocations(INetURLObject& aURL) = 0;
+ virtual const INetURLObject& getThemeURL() const = 0;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx
new file mode 100644
index 000000000..6c45f7de6
--- /dev/null
+++ b/include/svx/galmisc.hxx
@@ -0,0 +1,202 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GALMISC_HXX
+#define INCLUDED_SVX_GALMISC_HXX
+
+#include <vcl/imap.hxx>
+#include <svl/hint.hxx>
+#include <vcl/transfer.hxx>
+#include <svx/svdobj.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <svx/svxdllapi.h>
+#include <tools/date.hxx>
+#include <tools/time.hxx>
+#include <memory>
+
+namespace com::sun::star::awt { class XProgressBar; }
+
+class INetURLObject;
+class GalleryTheme;
+class SotStorageStream;
+class SotTempStream;
+
+struct ExchangeData
+{
+ GalleryTheme* pTheme;
+ OUString aEditedTitle;
+ Date aThemeChangeDate;
+ tools::Time aThemeChangeTime;
+
+ ExchangeData()
+ : pTheme(nullptr)
+ , aThemeChangeDate( Date::EMPTY )
+ , aThemeChangeTime( tools::Time::EMPTY )
+ {
+ }
+};
+
+enum class SgaObjKind
+{
+ NONE = 0, // abstract object
+ Bitmap = 1, // bitmap object
+ Sound = 2, // sound object
+ Animation = 4, // animation object
+ SvDraw = 5, // Svdraw object
+ Inet = 6 // graphics from the internet
+};
+
+#define ID_IMAPINFO 2
+
+#define STREAMBUF_SIZE 16384L
+
+enum class GalleryGraphicImportRet
+{
+ IMPORT_NONE, IMPORT_FILE
+};
+
+#define GALLERY_PROGRESS_RANGE 10000
+
+#define GALLERY_FG_COLOR Application::GetSettings().GetStyleSettings().GetWindowTextColor()
+#define GALLERY_BG_COLOR Application::GetSettings().GetStyleSettings().GetWindowColor()
+#define GALLERY_DLG_COLOR Application::GetSettings().GetStyleSettings().GetDialogColor()
+
+class SvStream;
+class Graphic;
+class FmFormModel;
+
+GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName );
+bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel );
+bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap );
+SVXCORE_DLLPUBLIC OUString
+ GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen );
+OUString GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL );
+
+bool FileExists( const INetURLObject& rURL );
+bool CreateDir( const INetURLObject& rURL );
+bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL );
+bool KillFile( const INetURLObject& rURL );
+
+class SgaIMapInfo final : public SdrObjUserData, public SfxListener
+{
+ ImageMap aImageMap;
+
+public:
+ SgaIMapInfo() : SdrObjUserData( SdrInventor::SgaImap, ID_IMAPINFO ) {};
+
+ SgaIMapInfo( const ImageMap& rImageMap) :
+ SdrObjUserData( SdrInventor::SgaImap, ID_IMAPINFO ),
+ aImageMap( rImageMap ) {};
+
+ virtual std::unique_ptr<SdrObjUserData> Clone( SdrObject* ) const override
+ {
+ SgaIMapInfo* pInfo = new SgaIMapInfo;
+ pInfo->aImageMap = aImageMap;
+ return std::unique_ptr<SdrObjUserData>(pInfo);
+ }
+
+ const ImageMap& GetImageMap() const { return aImageMap; }
+};
+
+class GraphicFilter;
+
+class SVXCORE_DLLPUBLIC GalleryProgress
+{
+ css::uno::Reference< css::awt::XProgressBar > mxProgressBar;
+
+ public:
+
+ GalleryProgress( const GraphicFilter* pFilter = nullptr );
+ ~GalleryProgress();
+
+ void Update( sal_Int32 nVal, sal_Int32 nMaxVal );
+};
+
+class GalleryTheme;
+class GraphicObject;
+
+class GalleryTransferable final : public TransferDataContainer
+{
+friend class GalleryTheme;
+using TransferableHelper::CopyToClipboard;
+
+ GalleryTheme* mpTheme;
+ SgaObjKind meObjectKind;
+ sal_uInt32 mnObjectPos;
+ tools::SvRef<SotTempStream> mxModelStream;
+ std::unique_ptr<GraphicObject> mpGraphicObject;
+ std::unique_ptr<INetURLObject> mpURL;
+
+ void InitData( bool bLazy );
+
+public:
+ GalleryTransferable( GalleryTheme* pTheme, sal_uInt32 nObjectPos, bool bLazy );
+ virtual ~GalleryTransferable() override;
+
+ void SelectObject(sal_uInt32 nObjectPos);
+
+ // TransferableHelper
+ virtual void AddSupportedFormats() override;
+ virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
+ virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
+ virtual void DragFinished( sal_Int8 nDropAction ) override;
+ virtual void ObjectReleased() override;
+
+ bool StartDrag();
+};
+
+enum class GalleryHintType
+{
+ CLOSE_THEME,
+ THEME_REMOVED,
+ THEME_RENAMED,
+ THEME_CREATED,
+ THEME_UPDATEVIEW,
+ CLOSE_OBJECT
+};
+
+class GalleryHint final : public SfxHint
+{
+private:
+
+ GalleryHintType mnType;
+ OUString maThemeName;
+ OUString maStringData;
+ void* mnData1;
+
+public:
+
+ GalleryHint( GalleryHintType nType, const OUString& rThemeName, void* nData1 = nullptr ) :
+ mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ) {}
+
+ GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData ) :
+ mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nullptr ) {}
+
+ GalleryHintType GetType() const { return mnType; }
+ const OUString& GetThemeName() const { return maThemeName; }
+ const OUString& GetStringData() const { return maStringData; }
+ void* GetData1() const { return mnData1; }
+};
+
+struct GalleryObject;
+
+INetURLObject ImplGetURL(const GalleryObject* pObject);
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
new file mode 100644
index 000000000..585293be0
--- /dev/null
+++ b/include/svx/galtheme.hxx
@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GALTHEME_HXX
+#define INCLUDED_SVX_GALTHEME_HXX
+
+#include <svx/svxdllapi.h>
+#include <svx/galleryobjectcollection.hxx>
+#include <svx/gallerybinaryengine.hxx>
+
+#include <tools/debug.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/datetime.hxx>
+#include <vcl/bitmapex.hxx>
+#include <svl/SfxBroadcaster.hxx>
+#include <svx/galmisc.hxx>
+#include <memory>
+
+namespace weld { class ComboBox; }
+
+class SotStorageStream;
+
+class GalleryThemeEntry;
+class SgaObject;
+class FmFormModel;
+class Gallery;
+
+namespace unogallery
+{
+ class GalleryTheme;
+ class GalleryItem;
+}
+
+class SVXCORE_DLLPUBLIC GalleryTheme final : public SfxBroadcaster
+{
+ friend class Gallery;
+ friend class GalleryThemeCacheEntry;
+ friend class ::unogallery::GalleryTheme;
+ friend class ::unogallery::GalleryItem;
+
+private:
+
+ std::unique_ptr<GalleryBinaryEngine> mpGalleryStorageEngine;
+ GalleryObjectCollection maGalleryObjectCollection;
+ Gallery* pParent;
+ GalleryThemeEntry* pThm;
+ sal_uInt32 mnThemeLockCount;
+ sal_uInt32 mnBroadcasterLockCount;
+ sal_uInt32 nDragPos;
+ bool bDragging;
+ bool bAbortActualize;
+
+ const std::unique_ptr<GalleryBinaryEngine>& getGalleryStorageEngine() const { return mpGalleryStorageEngine; }
+
+ SAL_DLLPRIVATE void ImplSetModified( bool bModified );
+ SAL_DLLPRIVATE void ImplBroadcast(sal_uInt32 nUpdatePos);
+
+ GalleryTheme(GalleryTheme const &) = delete;
+ void operator =(GalleryTheme const &) = delete;
+
+public:
+ SAL_DLLPRIVATE GalleryTheme(Gallery* pGallery, GalleryThemeEntry* pThemeEntry);
+
+ SAL_DLLPRIVATE virtual ~GalleryTheme() override;
+
+ SAL_DLLPRIVATE sal_uInt32 GetObjectCount() const { return maGalleryObjectCollection.size(); }
+
+ std::unique_ptr<SgaObject> AcquireObject(sal_uInt32 nPos);
+
+ bool InsertObject(const SgaObject& rObj, sal_uInt32 nPos = SAL_MAX_UINT32);
+ void RemoveObject(sal_uInt32 nPos);
+ bool ChangeObjectPos(sal_uInt32 nOldPos, sal_uInt32 nNewPos);
+
+ const OUString& GetName() const;
+
+ // used for building gallery themes during compilation:
+ void SetDestDir(const OUString& rDestDir, bool bRelative);
+
+ sal_uInt32 GetId() const;
+ SAL_DLLPRIVATE void SetId( sal_uInt32 nNewId, bool bResetThemeName );
+
+ SAL_DLLPRIVATE void SetDragging( bool bSet ) { bDragging = bSet; }
+ SAL_DLLPRIVATE bool IsDragging() const { return bDragging; }
+
+ SAL_DLLPRIVATE void LockTheme() { ++mnThemeLockCount; }
+ SAL_DLLPRIVATE bool UnlockTheme();
+
+ SAL_DLLPRIVATE void LockBroadcaster() { mnBroadcasterLockCount++; }
+ void UnlockBroadcaster();
+ SAL_DLLPRIVATE bool IsBroadcasterLocked() const { return mnBroadcasterLockCount > 0; }
+
+ SAL_DLLPRIVATE void SetDragPos(sal_uInt32 nPos) { nDragPos = nPos; }
+ SAL_DLLPRIVATE sal_uInt32 GetDragPos() const { return nDragPos; }
+
+ bool IsReadOnly() const;
+ bool IsDefault() const;
+
+ void Actualize( const Link<const INetURLObject&, void>& rActualizeLink, GalleryProgress* pProgress = nullptr );
+ SAL_DLLPRIVATE void AbortActualize() { bAbortActualize = true; }
+
+ SAL_DLLPRIVATE Gallery* GetParent() const { return pParent; }
+
+public:
+
+ SAL_DLLPRIVATE SgaObjKind GetObjectKind(sal_uInt32 nPos) const
+ {
+ if (nPos < GetObjectCount())
+ return maGalleryObjectCollection.getForPosition( nPos )->eObjKind;
+ return SgaObjKind::NONE;
+ }
+
+ SAL_DLLPRIVATE const INetURLObject& GetObjectURL(sal_uInt32 nPos) const
+ {
+ DBG_ASSERT(nPos < GetObjectCount(), "Position out of range");
+ return maGalleryObjectCollection.getURLForPosition(nPos);
+ }
+
+ SAL_DLLPRIVATE bool GetThumb(sal_uInt32 nPos, BitmapEx& rBmp);
+
+ bool GetGraphic(sal_uInt32 nPos, Graphic& rGraphic);
+ bool InsertGraphic(const Graphic& rGraphic, sal_uInt32 nInsertPos);
+
+ bool GetModel(sal_uInt32 nPos, SdrModel& rModel);
+ bool InsertModel(const FmFormModel& rModel, sal_uInt32 nInsertPos);
+
+ SAL_DLLPRIVATE bool GetModelStream(sal_uInt32 nPos, tools::SvRef<SotTempStream> const & rModelStreamRef);
+ SAL_DLLPRIVATE bool InsertModelStream(const tools::SvRef<SotTempStream>& rModelStream, sal_uInt32 nInsertPos);
+
+ SAL_DLLPRIVATE bool GetURL(sal_uInt32 nPos, INetURLObject& rURL);
+ bool InsertURL(const INetURLObject& rURL, sal_uInt32 nInsertPos = SAL_MAX_UINT32);
+ SAL_DLLPRIVATE bool InsertFileOrDirURL(const INetURLObject& rFileOrDirURL, sal_uInt32 nInsertPos);
+
+ SAL_DLLPRIVATE bool InsertTransferable(const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable, sal_uInt32 nInsertPos);
+
+ SAL_DLLPRIVATE void CopyToClipboard(const weld::Widget& rWidget, sal_uInt32 nPos);
+
+ DateTime getModificationDate() const;
+
+ const INetURLObject& getThemeURL() const { return mpGalleryStorageEngine->getThemeURL(); }
+
+public:
+
+ SAL_DLLPRIVATE SvStream& ReadData( SvStream& rIn );
+ static void InsertAllThemes(weld::ComboBox& rListBox);
+
+ // for buffering PreviewBitmaps and strings for object and path
+ SAL_DLLPRIVATE void GetPreviewBitmapExAndStrings(sal_uInt32 nPos, BitmapEx& rBitmapEx, Size& rSize, OUString& rTitle, OUString& rPath);
+ SAL_DLLPRIVATE void SetPreviewBitmapExAndStrings(sal_uInt32 nPos, const BitmapEx& rBitmapEx, const Size& rSize, const OUString& rTitle, const OUString& rPath);
+};
+
+#endif // INCLUDED_SVX_GALTHEME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/grafctrl.hxx b/include/svx/grafctrl.hxx
new file mode 100644
index 000000000..bdb49f323
--- /dev/null
+++ b/include/svx/grafctrl.hxx
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GRAFCTRL_HXX
+#define INCLUDED_SVX_GRAFCTRL_HXX
+
+#include <svl/lstner.hxx>
+#include <sfx2/tbxctrl.hxx>
+#include <svx/svxdllapi.h>
+
+
+class SvxGrafToolBoxControl : public SfxToolBoxControl
+{
+public:
+ SvxGrafToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+ virtual ~SvxGrafToolBoxControl() override;
+
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window *pParent ) override;
+};
+
+
+class SVX_DLLPUBLIC SvxGrafRedToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafRedToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafGreenToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafGreenToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafBlueToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafBlueToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafLuminanceToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafLuminanceToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafContrastToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafContrastToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafGammaToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafGammaToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafTransparenceToolBoxControl final : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafTransparenceToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+};
+
+
+class SVX_DLLPUBLIC SvxGrafModeToolBoxControl final : public SfxToolBoxControl, public SfxListener
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafModeToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+ virtual ~SvxGrafModeToolBoxControl() override;
+
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window *pParent ) override;
+};
+
+
+class SdrView;
+class SfxRequest;
+
+
+class SVX_DLLPUBLIC SvxGrafAttrHelper
+{
+public:
+
+ static void ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView );
+ static void GetGrafAttrState( SfxItemSet& rSet, SdrView const & rView );
+};
+
+#endif // INCLUDED_SVX_GRAFCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
new file mode 100644
index 000000000..10f5b26fe
--- /dev/null
+++ b/include/svx/graphctl.hxx
@@ -0,0 +1,159 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_GRAPHCTL_HXX
+#define INCLUDED_SVX_GRAPHCTL_HXX
+
+#include <vcl/graph.hxx>
+#include <vcl/customweld.hxx>
+#include <svx/svxdllapi.h>
+
+#include <svx/svdview.hxx>
+#include <svx/svdobj.hxx>
+
+class GraphCtrl;
+
+class GraphCtrlUserCall final : public SdrObjUserCall
+{
+ GraphCtrl& rWin;
+
+public:
+
+ GraphCtrlUserCall(GraphCtrl& rGraphWin)
+ : rWin(rGraphWin)
+ {}
+
+ virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override;
+};
+
+class SvxGraphCtrlAccessibleContext;
+
+class SVX_DLLPUBLIC GraphCtrl : public weld::CustomWidgetController
+{
+ friend class GraphCtrlView;
+ friend class GraphCtrlUserCall;
+
+ Graphic aGraphic;
+ ScopedVclPtrInstance<VirtualDevice> xVD;
+ Idle aUpdateIdle;
+ Link<GraphCtrl*,void> aMousePosLink;
+ Link<GraphCtrl*,void> aGraphSizeLink;
+ Link<GraphCtrl*,void> aUpdateLink;
+ MapMode aMap100;
+ Size aGraphSize;
+ Point aMousePos;
+ std::unique_ptr<GraphCtrlUserCall> pUserCall;
+ SdrObjKind eObjKind;
+ sal_uInt16 nPolyEdit;
+ bool bEditMode;
+ bool mbSdrMode;
+ bool mbInIdleUpdate;
+ weld::Dialog* mpDialog;
+
+ DECL_DLLPRIVATE_LINK( UpdateHdl, Timer*, void );
+
+ rtl::Reference<SvxGraphCtrlAccessibleContext> mpAccContext;
+
+protected:
+
+ std::unique_ptr<SdrModel> pModel;
+ std::unique_ptr<SdrView> pView;
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual void Resize() override;
+ virtual bool KeyInput(const KeyEvent& rKEvt) override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+ virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
+ virtual bool MouseMove(const MouseEvent& rMEvt) override;
+
+ virtual void InitSdrModel();
+
+ virtual void SdrObjCreated( const SdrObject& rObj );
+ virtual void SdrObjChanged( const SdrObject& rObj );
+ virtual void MarkListHasChanged();
+
+ void GraphicToVD();
+
+ SdrObjUserCall* GetSdrUserCall() { return pUserCall.get(); }
+
+public:
+
+ GraphCtrl(weld::Dialog* pDialog);
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~GraphCtrl() override;
+
+ void SetGraphic( const Graphic& rGraphic, bool bNewModel = true );
+ const Graphic& GetGraphic() const { return aGraphic; }
+ const Size& GetGraphicSize() const { return aGraphSize; }
+
+ const Point& GetMousePos() const { return aMousePos; }
+
+ void SetEditMode( const bool bEditMode );
+
+ void SetPolyEditMode( const sal_uInt16 nPolyEdit );
+ sal_uInt16 GetPolyEditMode() const { return nPolyEdit; }
+
+ void SetObjKind( const SdrObjKind eObjKind );
+
+ SdrModel* GetSdrModel() const { return pModel.get(); }
+ SdrView* GetSdrView() const { return pView.get(); }
+ SdrObject* GetSelectedSdrObject() const;
+ bool IsChanged() const { return mbSdrMode && pModel->IsChanged(); }
+
+ void SetMousePosLink( const Link<GraphCtrl*,void>& rLink ) { aMousePosLink = rLink; }
+
+ void SetGraphSizeLink( const Link<GraphCtrl*,void>& rLink ) { aGraphSizeLink = rLink; }
+
+ void SetUpdateLink( const Link<GraphCtrl*,void>& rLink ) { aUpdateLink = rLink; }
+ void QueueIdleUpdate();
+
+ void SetSdrMode(bool b);
+
+ Point GetPositionInDialog() const;
+ virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
+};
+
+class GraphCtrlView final : public SdrView
+{
+ GraphCtrl& rGraphCtrl;
+
+ virtual void MarkListHasChanged() override
+ {
+ SdrView::MarkListHasChanged();
+ rGraphCtrl.MarkListHasChanged();
+ }
+
+public:
+ GraphCtrlView(SdrModel& rSdrModel, GraphCtrl* pWindow)
+ : SdrView(rSdrModel, &pWindow->GetDrawingArea()->get_ref_device())
+ , rGraphCtrl(*pWindow)
+ {
+ }
+
+ virtual ~GraphCtrlView() override;
+
+ // override these so we can get the occasions SdrPaintView would call Window::Invalidate on its vcl::Window
+ // if it had one, and route to WidgetController::Invalidate instead
+ virtual rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const override;
+ virtual void InvalidateOneWin(OutputDevice& rWin) override;
+ virtual void InvalidateOneWin(OutputDevice& rWin, const tools::Rectangle& rRect) override;
+};
+
+#endif // INCLUDED_SVX_GRAPHCTL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/graphichelper.hxx b/include/svx/graphichelper.hxx
new file mode 100644
index 000000000..1d3c6ee58
--- /dev/null
+++ b/include/svx/graphichelper.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GRAPHICHELPER_HXX
+#define INCLUDED_SVX_GRAPHICHELPER_HXX
+
+#include <vcl/graph.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star::drawing { class XShape; }
+namespace com::sun::star::lang
+{
+class XComponent;
+}
+namespace weld { class Widget; }
+namespace weld { class Window; }
+
+class SVXCORE_DLLPUBLIC GraphicHelper
+{
+
+public:
+ static void GetPreferredExtension( OUString& rExtension, const Graphic& rGraphic );
+ static OUString GetImageType(const Graphic& rGraphic);
+ static OUString ExportGraphic(weld::Window* pWin, const Graphic& rGraphic, const OUString& rGraphicName);
+ static void
+ SaveShapeAsGraphicToPath(const css::uno::Reference<css::lang::XComponent>& xComponent,
+ const css::uno::Reference<css::drawing::XShape>& xShape,
+ const OUString& rMimeType, const OUString& rPath);
+ static void SaveShapeAsGraphic(weld::Window* pWin,
+ const css::uno::Reference<css::lang::XComponent>& xComponent,
+ const css::uno::Reference<css::drawing::XShape>& xShape);
+ static short HasToSaveTransformedImage(weld::Widget* pWin);
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/grfcrop.hxx b/include/svx/grfcrop.hxx
new file mode 100644
index 000000000..de0cfef5b
--- /dev/null
+++ b/include/svx/grfcrop.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GRFCROP_HXX
+#define INCLUDED_SVX_GRFCROP_HXX
+
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+
+#define GRFCROP_VERSION_SWDEFAULT 0
+#define GRFCROP_VERSION_MOVETOSVX 1
+
+class SVXCORE_DLLPUBLIC SvxGrfCrop : public SfxPoolItem
+{
+ sal_Int32 nLeft, nRight, nTop, nBottom;
+public:
+ SvxGrfCrop( TypedWhichId<SvxGrfCrop> );
+ SvxGrfCrop( sal_Int32 nLeft, sal_Int32 nRight,
+ sal_Int32 nTop, sal_Int32 nBottom,
+ TypedWhichId<SvxGrfCrop> );
+ virtual ~SvxGrfCrop() override;
+
+ SvxGrfCrop(SvxGrfCrop const &) = default;
+ SvxGrfCrop(SvxGrfCrop &&) = default;
+ SvxGrfCrop & operator =(SvxGrfCrop const &) = delete; // due to SfxPoolItem
+ SvxGrfCrop & operator =(SvxGrfCrop &&) = delete; // due to SfxPoolItem
+
+ // "pure virtual methods" from SfxPoolItem
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText,
+ const IntlWrapper& rIntl ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal,
+ sal_uInt8 nMemberId ) override;
+
+ void SetLeft( sal_Int32 nVal ) { nLeft = nVal; }
+ void SetRight( sal_Int32 nVal ) { nRight = nVal; }
+ void SetTop( sal_Int32 nVal ) { nTop = nVal; }
+ void SetBottom( sal_Int32 nVal ) { nBottom = nVal; }
+
+ sal_Int32 GetLeft() const { return nLeft; }
+ sal_Int32 GetRight() const { return nRight; }
+ sal_Int32 GetTop() const { return nTop; }
+ sal_Int32 GetBottom() const { return nBottom; }
+};
+
+#endif // INCLUDED_SVX_GRFCROP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/grfflt.hxx b/include/svx/grfflt.hxx
new file mode 100644
index 000000000..7c24bcd38
--- /dev/null
+++ b/include/svx/grfflt.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_GRFFLT_HXX
+#define INCLUDED_SVX_GRFFLT_HXX
+
+#include <svx/svxdllapi.h>
+
+enum class SvxGraphicFilterResult {
+ NONE, UnsupportedGraphicType, UnsupportedSlot
+};
+
+class GraphicObject;
+class SfxRequest;
+class SfxItemSet;
+
+class SVX_DLLPUBLIC SvxGraphicFilter
+{
+public:
+
+ static SvxGraphicFilterResult ExecuteGrfFilterSlot( SfxRequest const & rReq, GraphicObject& rFilterObject );
+ static void DisableGraphicFilterSlots( SfxItemSet& rSet );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
new file mode 100644
index 000000000..e029b8e23
--- /dev/null
+++ b/include/svx/gridctrl.hxx
@@ -0,0 +1,600 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_GRIDCTRL_HXX
+#define INCLUDED_SVX_GRIDCTRL_HXX
+
+#include <com/sun/star/util/Date.hpp>
+
+#include <tools/ref.hxx>
+#include <svtools/editbrowsebox.hxx>
+#include <svtools/recorditemwindow.hxx>
+#include <osl/mutex.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+#include <memory>
+#include <vector>
+
+namespace comphelper { class OPropertyChangeMultiplexer; }
+namespace com::sun::star::beans { struct PropertyChangeEvent; }
+namespace com::sun::star::container { class XIndexAccess; }
+namespace com::sun::star::sdbc { class XRowSet; }
+namespace com::sun::star::sdb { class XRowsChangeListener; }
+namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::util { class XNumberFormatter; }
+namespace weld { class Menu; }
+
+class CursorWrapper;
+
+bool CompareBookmark(const css::uno::Any& aLeft, const css::uno::Any& aRight);
+
+namespace svxform
+{
+ class DataColumn;
+}
+
+enum class GridRowStatus
+{
+ Clean,
+ Modified,
+ Deleted,
+ Invalid
+};
+
+
+// DbGridRow, description of rows
+
+
+class SAL_DLLPUBLIC_RTTI DbGridRow final : public SvRefBase
+{
+ css::uno::Any m_aBookmark; // Bookmark of the row, can be set
+ ::std::vector< std::unique_ptr<::svxform::DataColumn> >
+ m_aVariants;
+ GridRowStatus m_eStatus;
+ bool m_bIsNew;
+ // row is no longer valid
+ // is removed on the next positioning
+public:
+ DbGridRow();
+ DbGridRow(CursorWrapper* pCur, bool bPaintCursor);
+ void SetState(CursorWrapper* pCur, bool bPaintCursor);
+
+ virtual ~DbGridRow() override;
+
+ bool HasField(sal_uInt32 nPos) const { return nPos < m_aVariants.size(); }
+ const ::svxform::DataColumn& GetField(sal_uInt32 nPos) const { return *m_aVariants[ nPos ]; }
+
+ void SetStatus(GridRowStatus _eStat) { m_eStatus = _eStat; }
+ GridRowStatus GetStatus() const { return m_eStatus; }
+ void SetNew(bool _bNew) { m_bIsNew = _bNew; }
+ bool IsNew() const { return m_bIsNew; }
+
+ const css::uno::Any& GetBookmark() const { return m_aBookmark; }
+
+ bool IsValid() const { return m_eStatus == GridRowStatus::Clean || m_eStatus == GridRowStatus::Modified; }
+ bool IsModified() const { return m_eStatus == GridRowStatus::Modified; }
+};
+
+typedef tools::SvRef<DbGridRow> DbGridRowRef;
+
+
+// DbGridControl
+
+class DbGridColumn;
+
+class FmGridListener
+{
+public:
+ virtual void selectionChanged() = 0;
+ virtual void columnChanged() = 0;
+
+protected:
+ ~FmGridListener() {}
+};
+
+#define GRID_COLUMN_NOT_FOUND SAL_MAX_UINT16
+
+
+// InitWindowFacet, describing which aspect of a column's Window to (re-)initialize
+
+enum class InitWindowFacet
+{
+ Font = 0x01,
+ Foreground = 0x02,
+ Background = 0x04,
+ WritingMode = 0x08,
+ All = 0x0F
+};
+namespace o3tl
+{
+ template<> struct typed_flags<InitWindowFacet> : is_typed_flags<InitWindowFacet, 0x0f> {};
+}
+
+
+// these options are or'ed and indicate, which of the single
+// features can be released, default is readonly which means 0
+enum class DbGridControlOptions
+{
+ Readonly = 0x00,
+ Insert = 0x01,
+ Update = 0x02,
+ Delete = 0x04
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DbGridControlOptions> : is_typed_flags<DbGridControlOptions, 0x07> {};
+}
+
+// StatusIds for Controls of the Bar
+// important for invalidation
+enum class DbGridControlNavigationBarState
+{
+ NONE,
+ Text,
+ Absolute,
+ Of,
+ Count,
+ First,
+ Next,
+ Prev,
+ Last,
+ New,
+ Undo // related to SID_FM_RECORD_UNDO
+};
+
+class FmXGridSourcePropListener;
+class DisposeListenerGridBridge;
+
+// NavigationBar
+class NavigationBar final : public InterimItemWindow
+{
+ class AbsolutePos final : public RecordItemWindowBase
+ {
+ public:
+ AbsolutePos(std::unique_ptr<weld::Entry> xEntry, NavigationBar* pBar);
+
+ virtual bool DoKeyInput(const KeyEvent& rEvt) override;
+ virtual void PositionFired(sal_Int64 nRecord) override;
+
+ weld::Entry* GetWidget() { return m_xWidget.get(); }
+ private:
+ VclPtr<NavigationBar> m_xParent;
+ };
+
+ friend class NavigationBar::AbsolutePos;
+
+ // additional controls
+ std::unique_ptr<weld::Label> m_xRecordText;
+ std::unique_ptr<AbsolutePos> m_xAbsolute; // absolute positioning
+ std::unique_ptr<weld::Label> m_xRecordOf;
+ std::unique_ptr<weld::Label> m_xRecordCount;
+
+ std::unique_ptr<weld::Button> m_xFirstBtn; // Button for 'go to the first record'
+ std::unique_ptr<weld::Button> m_xPrevBtn; // Button for 'go to the previous record'
+ std::unique_ptr<weld::Button> m_xNextBtn; // Button for 'go to the next record'
+ std::unique_ptr<weld::Button> m_xLastBtn; // Button for 'go to the last record'
+ std::unique_ptr<weld::Button> m_xNewBtn; // Button for 'go to a new record'
+
+ std::shared_ptr<weld::ButtonPressRepeater> m_xPrevRepeater;
+ std::shared_ptr<weld::ButtonPressRepeater> m_xNextRepeater;
+
+ sal_Int32 m_nCurrentPos;
+
+ bool m_bPositioning; // protect PositionDataSource against recursion
+
+public:
+ NavigationBar(vcl::Window* pParent);
+ virtual ~NavigationBar() override;
+ virtual void dispose() override;
+
+ // Status methods for Controls
+ void InvalidateAll(sal_Int32 nCurrentPos, bool bAll = false);
+ void InvalidateState(DbGridControlNavigationBarState nWhich) {SetState(nWhich);}
+ void SetState(DbGridControlNavigationBarState nWhich);
+ bool GetState(DbGridControlNavigationBarState nWhich) const;
+ sal_uInt16 ArrangeControls();
+
+private:
+
+ DECL_LINK(OnClick, weld::Button&, void);
+
+ void PositionDataSource(sal_Int32 nRecord);
+};
+
+class SVXCORE_DLLPUBLIC DbGridControl : public svt::EditBrowseBox
+{
+ friend class FmXGridSourcePropListener;
+ friend class GridFieldValueListener;
+ friend class DisposeListenerGridBridge;
+
+public:
+
+ friend class NavigationBar;
+
+private:
+ Link<DbGridControlNavigationBarState,int> m_aMasterStateProvider;
+ Link<DbGridControlNavigationBarState,bool> m_aMasterSlotExecutor;
+
+ css::uno::Reference< css::util::XNumberFormatter > m_xFormatter;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
+ std::vector< std::unique_ptr<DbGridColumn> > m_aColumns; // Column description
+ VclPtr<NavigationBar> m_aBar;
+ DbGridRowRef m_xDataRow; // Row which can be modified
+ // comes from the data cursor
+ DbGridRowRef m_xSeekRow, // Row to which the iterator can set
+ // comes from the data cursor
+
+ m_xEmptyRow; // record set to insert
+
+ ImplSVEvent * m_nAsynAdjustEvent;
+
+ // if we modify the row for the new record, we automatically insert a "new new row".
+ // But if somebody else inserts a new record into the data source, we have to do the same.
+ // For that reason we have to listen to some properties of our data source.
+ rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pDataSourcePropMultiplexer;
+ FmXGridSourcePropListener* m_pDataSourcePropListener;
+ css::uno::Reference< css::sdb::XRowsChangeListener>
+ m_xRowSetListener; // get notification when rows were changed
+
+ void* m_pFieldListeners;
+ // property listeners for field values
+
+ std::unique_ptr<DisposeListenerGridBridge> m_pCursorDisposeListener;
+ // need to know about the disposing of the seek cursor
+ // construct analogous to the data source proplistener/multiplexer above :
+ // DisposeListenerGridBridge is a bridge from FmXDisposeListener which I don't want to be derived from
+
+ FmGridListener* m_pGridListener;
+
+protected:
+ std::unique_ptr<CursorWrapper> m_pDataCursor; // Cursor for Updates
+ std::unique_ptr<CursorWrapper> m_pSeekCursor; // Cursor for Seeking
+
+private:
+ // iteration variables
+ DbGridRowRef m_xCurrentRow;
+ DbGridRowRef m_xPaintRow; // Row to be displayed
+ sal_Int32 m_nSeekPos; // Position of the SeekCursor
+ sal_Int32 m_nTotalCount; // is set when the data cursor finished counting the
+ // records. Initial value is -1
+ osl::Mutex m_aDestructionSafety;
+ osl::Mutex m_aAdjustSafety;
+
+ css::util::Date
+ m_aNullDate; // NullDate of the Numberformatter;
+
+ BrowserMode m_nMode;
+ sal_Int32 m_nCurrentPos; // Current position;
+ ImplSVEvent * m_nDeleteEvent; // EventId for asynchronous deletion of rows
+ DbGridControlOptions m_nOptions; // What is the able to do (Insert, Update, Delete)
+ // default readonly
+ DbGridControlOptions m_nOptionMask; // the mask of options to be enabled in setDataSource
+ // (with respect to the data source capabilities)
+ // defaults to (insert | update | delete)
+ sal_uInt16 m_nLastColId;
+ sal_Int32 m_nLastRowId;
+
+ bool m_bDesignMode : 1; // default = sal_False
+ bool m_bRecordCountFinal : 1;
+ bool m_bNavigationBar : 1;
+
+ bool m_bSynchDisplay : 1;
+ bool m_bHandle : 1;
+ bool m_bFilterMode : 1;
+ bool m_bWantDestruction : 1;
+ bool m_bPendingAdjustRows : 1; // if an async adjust is pending, is it for AdjustRows or AdjustDataSource ?
+ bool m_bHideScrollbars : 1;
+
+protected:
+ bool m_bUpdating : 1; // are any updates being executed right now?
+
+protected:
+ virtual bool SeekRow(sal_Int32 nRow) override;
+ virtual void VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nNumRows) override;
+ virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
+ virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
+ virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
+ virtual void CursorMoved() override;
+ virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) override;
+ virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
+ virtual void Command(const CommandEvent& rEvt) override;
+ virtual bool PreNotify(NotifyEvent& rEvt) override;
+ virtual void KeyInput(const KeyEvent& rEvt) override;
+ virtual void StateChanged( StateChangedType nType ) override;
+ virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
+ virtual void Select() override;
+
+ virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
+
+ virtual void CellModified() override;
+ virtual bool SaveModified() override;
+ virtual bool IsModified() const override;
+
+ virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = sal_uInt16(-1)) override;
+ void RemoveColumn(sal_uInt16 nId);
+ std::unique_ptr<DbGridColumn> CreateColumn(sal_uInt16 nId);
+ virtual void ColumnMoved(sal_uInt16 nId) override;
+ virtual bool SaveRow() override;
+ virtual bool IsTabAllowed(bool bForward) const override;
+
+ /// hide a column
+ virtual void HideColumn(sal_uInt16 nId);
+ /// show a column
+ virtual void ShowColumn(sal_uInt16 nId);
+
+ /** This is called before executing a context menu for a row. rMenu contains the initial entries
+ handled by this base class' method (which always has to be called).
+ Derived classes may alter the menu in any way and handle any additional entries in
+ PostExecuteColumnContextMenu.
+ All disabled entries will be removed before executing the menu, so be careful with separators
+ near entries you probably wish to disable ...
+ */
+ virtual void PreExecuteRowContextMenu(weld::Menu& rMenu);
+ /** After executing the context menu for a row this method is called.
+ */
+ virtual void PostExecuteRowContextMenu(const OString& rExecutionResult);
+
+ /// @throws css::uno::RuntimeException
+ void DataSourcePropertyChanged(const css::beans::PropertyChangeEvent& evt);
+
+ void FieldValueChanged(sal_uInt16 _nId);
+ void FieldListenerDisposing(sal_uInt16 _nId);
+
+ void disposing(sal_uInt16 _nId);
+
+ // own overridables
+ /// called when the current row changed
+ virtual void onRowChange();
+ /// called when the current column changed
+ virtual void onColumnChange();
+
+ // DragSourceHelper overridables
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
+
+ void executeRowContextMenu(const Point& _rPreferredPos);
+
+public:
+ DbGridControl(
+ css::uno::Reference< css::uno::XComponentContext > const & _rxContext,
+ vcl::Window* pParent,
+ WinBits nBits);
+
+ virtual ~DbGridControl() override;
+ virtual void dispose() override;
+
+ virtual void Init() override;
+ virtual void InitColumnsByFields(const css::uno::Reference< css::container::XIndexAccess >& xFields) = 0;
+ virtual void RemoveRows() override;
+
+ /** GetCellText returns the text at the given position
+ @param _nRow
+ the number of the row
+ @param _nColId
+ the ID of the column
+ @return
+ the text out of the cell
+ */
+ virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const override;
+
+ void RemoveRows(bool bNewCursor);
+
+ const css::uno::Reference< css::util::XNumberFormatter >& getNumberFormatter() const {return m_xFormatter;}
+
+ // the data source
+ // the options can restrict but not extend the update abilities
+ void setDataSource(const css::uno::Reference< css::sdbc::XRowSet >& rCursor,
+ DbGridControlOptions nOpts = DbGridControlOptions::Insert | DbGridControlOptions::Update | DbGridControlOptions::Delete);
+ virtual void Dispatch(sal_uInt16 nId) override;
+
+ CursorWrapper* getDataSource() const {return m_pDataCursor.get();}
+ const std::vector< std::unique_ptr<DbGridColumn> >& GetColumns() const {return m_aColumns;}
+
+ void EnableHandle(bool bEnable);
+ bool HasHandle() const {return m_bHandle;}
+ void InsertHandleColumn();
+
+ // which position does the column with the id in the View have, the handle column doesn't count
+ sal_uInt16 GetViewColumnPos( sal_uInt16 nId ) const { sal_uInt16 nPos = GetColumnPos(nId); return (nPos==BROWSER_INVALIDID) ? GRID_COLUMN_NOT_FOUND : nPos-1; }
+
+ // which position does the column with the id in m_aColumns have, that means the css::sdbcx::Container
+ // returned from the GetColumns (may be different from the position returned by GetViewColumnPos
+ // if there are hidden columns)
+ sal_uInt16 GetModelColumnPos( sal_uInt16 nId ) const;
+
+ // the number of columns in the model
+ sal_uInt16 GetViewColCount() const { return ColCount() - 1; }
+ sal_uInt16 GetModelColCount() const { return static_cast<sal_uInt16>(m_aColumns.size()); }
+ // reverse to GetViewColumnPos: Id of position, the first non-handle column has position 0
+ sal_uInt16 GetColumnIdFromViewPos( sal_uInt16 nPos ) const { return GetColumnId(nPos + 1); }
+ sal_uInt16 GetColumnIdFromModelPos( sal_uInt16 nPos ) const;
+
+ virtual void SetDesignMode(bool bMode);
+ bool IsDesignMode() const {return m_bDesignMode;}
+ bool IsOpen() const {return m_pSeekCursor != nullptr;}
+
+ void SetFilterMode(bool bMode);
+ bool IsFilterMode() const {return m_bFilterMode;}
+ bool IsFilterRow(sal_Int32 nRow) const {return m_bFilterMode && nRow == 0;}
+
+ void EnableNavigationBar(bool bEnable);
+ bool HasNavigationBar() const {return m_bNavigationBar;}
+
+ DbGridControlOptions GetOptions() const {return m_nOptions;}
+ NavigationBar& GetNavigationBar() {return *m_aBar;}
+ DbGridControlOptions SetOptions(DbGridControlOptions nOpt);
+ // The new options are interpreted with respect to the current data source. If it is unable
+ // to update, to insert or to restore, the according options are ignored. If the grid isn't
+ // connected to a data source, all options except OPT_READONLY are ignored.
+
+ const css::util::Date& getNullDate() const {return m_aNullDate;}
+
+ // positioning
+ void MoveToPosition(sal_uInt32 nPos);
+ void MoveToFirst();
+ void MoveToNext();
+ void MoveToPrev();
+ void MoveToLast();
+ void AppendNew();
+
+ // adjustment of the cursors in case the data cursor has been
+ // moved from the outside.
+ // the flag indicates if an adjustment of the row count should be
+ // done as well
+ void AdjustDataSource(bool bFull = false);
+ void Undo();
+
+ virtual void BeginCursorAction();
+ virtual void EndCursorAction();
+
+ // is the current line being updated
+ bool IsUpdating() const {return m_bUpdating;}
+
+ void RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
+ void RowInserted( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
+ void RowModified( sal_Int32 nRow );
+
+ void resetCurrentRow();
+
+ bool getDisplaySynchron() const { return m_bSynchDisplay; }
+ void setDisplaySynchron(bool bSync);
+ // when set to sal_False, the display is no longer in sync with the current cursor position
+ // (means that in AdjustDataSource we are jumping to a row not belonging to CursorPosition)
+ // when using this, you should know what you are doing, because for example entering data
+ // in a row in the display that is not in sync with the position of the cursor can be very critical
+
+ const DbGridRowRef& GetCurrentRow() const {return m_xCurrentRow;}
+
+ void SetStateProvider(const Link<DbGridControlNavigationBarState,int>& rProvider) { m_aMasterStateProvider = rProvider; }
+ // if this link is set the given provider will be asked for the state of my items.
+ // the return values are interpreted as follows :
+ // <0 -> not specified (use default mechanism to determine the state)
+ // ==0 -> the item is disabled
+ // >0 -> the item is enabled
+ void SetSlotExecutor(const Link<DbGridControlNavigationBarState,bool>& rExecutor) { m_aMasterSlotExecutor = rExecutor; }
+ // analogous : if this link is set, all nav-bar slots will be routed through it when executed
+ // if the handler returns nonzero, no further handling of the slot occurs
+
+ void EnablePermanentCursor(bool bEnable);
+ bool IsPermanentCursorEnabled() const;
+
+ /** forces both scrollbars to be hidden
+
+ For the horizontal scrollbar, this is overruled by enabling the navigation bar: A navigation
+ bar <b>always</b> implies a horizontal scroll bar
+ @seealso EnableNavigationBar
+ */
+ void ForceHideScrollbars();
+
+ const css::uno::Reference< css::uno::XComponentContext >&
+ getContext() const { return m_xContext; }
+
+ /// returns <TRUE/> if the text of the given cell can be copied into the clipboard
+ bool canCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
+ /// copies the text of the given cell into the clipboard
+ void copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
+
+ // select in listener handling
+ void setGridListener( FmGridListener* _pListener ) { m_pGridListener = _pListener; }
+
+ // helper class to grant access to selected methods from within the DbCellControl class
+ struct GrantControlAccess final
+ {
+ friend class DbCellControl;
+ friend class RowSetEventListener;
+ };
+
+ /// called when a controller needs to be re-initialized
+ void refreshController(sal_uInt16 _nColId, GrantControlAccess _aAccess);
+
+ CursorWrapper* GetSeekCursor(GrantControlAccess /*_aAccess*/) const { return m_pSeekCursor.get(); }
+ const DbGridRowRef& GetSeekRow(GrantControlAccess /*_aAccess*/) const { return m_xSeekRow; }
+ void SetSeekPos(sal_Int32 nPos,GrantControlAccess /*_aAccess*/) {m_nSeekPos = nPos;}
+
+ /**
+ @return
+ The count of additional controls of the control area.
+ */
+ virtual sal_Int32 GetAccessibleControlCount() const override;
+
+ /** Creates the accessible object of an additional control.
+ @param _nIndex
+ The 0-based index of the control.
+ @return
+ The XAccessible interface of the specified control.
+ */
+ virtual css::uno::Reference<
+ css::accessibility::XAccessible >
+ CreateAccessibleControl( sal_Int32 _nIndex ) override;
+
+ // IAccessibleTableProvider
+ /** Creates the accessible object of a data table cell.
+ @param nRow The row index of the cell.
+ @param nColumnId The column ID of the cell.
+ @return The XAccessible interface of the specified cell. */
+ virtual css::uno::Reference<
+ css::accessibility::XAccessible >
+ CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
+
+protected:
+ void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
+ bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
+ void RemoveColumns(); // cleaning of own structures
+ void AdjustRows();
+ sal_Int32 AlignSeekCursor();
+ bool SetCurrent(sal_Int32 nNewRow);
+
+ OUString GetCurrentRowCellText(DbGridColumn const * pCol,const DbGridRowRef& _rRow) const;
+ virtual void DeleteSelectedRows();
+ static bool IsValid(const DbGridRowRef& _xRow) { return _xRow.is() && _xRow->IsValid(); }
+
+ // row which is currently being appended
+ bool IsCurrentAppending() const;
+
+ // empty row for insertion
+ bool IsInsertionRow(sal_Int32 nRow) const;
+
+ void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;}
+ sal_Int32 GetCurrentPos() const {return m_nCurrentPos;}
+ 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; }
+ const DbGridRowRef& GetPaintRow() const { return m_xPaintRow; }
+
+ void ConnectToFields();
+ void DisconnectFromFields();
+
+ void implAdjustInSolarThread(bool _bRows);
+ // calls AdjustRows or AdjustDataSource, synchron if the caller is running in the solar thread, else asynchron
+
+protected:
+ void ImplInitWindow( const InitWindowFacet _eInitWhat );
+ DECL_DLLPRIVATE_LINK(OnDelete, void*, void);
+
+ DECL_DLLPRIVATE_LINK(OnAsyncAdjust, void*, void);
+ // if the param is != NULL, AdjustRows will be called, else AdjustDataSource
+
+private:
+ using BrowseBox::InsertHandleColumn;
+};
+
+#endif // INCLUDED_SVX_GRIDCTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
new file mode 100644
index 000000000..8eadfa366
--- /dev/null
+++ b/include/svx/hdft.hxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_HDFT_HXX
+#define INCLUDED_SVX_HDFT_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/weld.hxx>
+
+#include <svx/pagectrl.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+namespace weld { class CustomWeld; }
+
+namespace svx
+{
+ SVX_DLLPUBLIC bool ShowBorderBackgroundDlg(weld::Window* pParent, SfxItemSet* pBBSet);
+}
+
+class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage
+{
+public:
+
+ virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ virtual ~SvxHFPage() override;
+
+ void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
+
+ virtual void PageCreated(const SfxAllItemSet&) override;
+
+ void EnableDynamicSpacing();
+
+protected:
+ static const WhichRangesContainer pRanges;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+ SvxHFPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet, sal_uInt16 nSetId);
+
+ sal_uInt16 nId;
+ std::unique_ptr<SfxItemSet> pBBSet;
+ bool mbDisableQueryBox : 1;
+ bool mbEnableDrawingLayerFillStyles : 1;
+
+ SvxPageWindow m_aBspWin;
+ std::unique_ptr<weld::Label> m_xPageLbl;
+ std::unique_ptr<weld::CheckButton> m_xTurnOnBox;
+ std::unique_ptr<weld::CheckButton> m_xCntSharedBox;
+ std::unique_ptr<weld::CheckButton> m_xCntSharedFirstBox;
+ std::unique_ptr<weld::Label> m_xLMLbl;
+ std::unique_ptr<weld::MetricSpinButton>m_xLMEdit;
+ std::unique_ptr<weld::Label> m_xRMLbl;
+ std::unique_ptr<weld::MetricSpinButton> m_xRMEdit;
+ std::unique_ptr<weld::Label> m_xDistFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xDistEdit;
+ std::unique_ptr<weld::CheckButton> m_xDynSpacingCB;
+ std::unique_ptr<weld::Label> m_xHeightFT;
+ std::unique_ptr<weld::MetricSpinButton> m_xHeightEdit;
+ std::unique_ptr<weld::CheckButton> m_xHeightDynBtn;
+ std::unique_ptr<weld::Button> m_xBackgroundBtn;
+ std::unique_ptr<weld::CustomWeld> m_xBspWin;
+
+ void InitHandler();
+ void TurnOn(const weld::Toggleable* pButton);
+ DECL_LINK(TurnOnHdl, weld::Toggleable&, void);
+ DECL_DLLPRIVATE_LINK(BackgroundHdl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(ValueChangeHdl, weld::MetricSpinButton&, void);
+ void RangeHdl();
+ void UpdateExample();
+
+private:
+ SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
+};
+
+class SVX_DLLPUBLIC SvxHeaderPage final : public SvxHFPage
+{
+public:
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ // returns the Which values to the range
+ static WhichRangesContainer GetRanges() { return pRanges; }
+ SVX_DLLPRIVATE SvxHeaderPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+};
+
+class SVX_DLLPUBLIC SvxFooterPage final : public SvxHFPage
+{
+public:
+ static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
+ static WhichRangesContainer GetRanges() { return pRanges; }
+ SVX_DLLPRIVATE SvxFooterPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+};
+
+class SVX_DLLPUBLIC DeleteHeaderDialog final : public weld::MessageDialogController
+{
+public:
+ DeleteHeaderDialog(weld::Widget* pParent)
+ : MessageDialogController(pParent, "svx/ui/deleteheaderdialog.ui",
+ "DeleteHeaderDialog")
+ {
+ }
+};
+
+class SVX_DLLPUBLIC DeleteFooterDialog final : public weld::MessageDialogController
+{
+public:
+ DeleteFooterDialog(weld::Widget* pParent)
+ : MessageDialogController(pParent, "svx/ui/deletefooterdialog.ui",
+ "DeleteFooterDialog")
+ {
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/helperhittest3d.hxx b/include/svx/helperhittest3d.hxx
new file mode 100644
index 000000000..f262564b9
--- /dev/null
+++ b/include/svx/helperhittest3d.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_HELPERHITTEST3D_HXX
+#define INCLUDED_SVX_HELPERHITTEST3D_HXX
+
+#include <svx/svxdllapi.h>
+#include <vector>
+
+
+// predefines
+
+namespace basegfx {
+ class B2DPoint;
+}
+
+namespace drawinglayer::geometry {
+ class ViewInformation3D;
+}
+
+class E3dCompoundObject;
+class E3dScene;
+
+
+/** support for getting a ViewInformation3D for a given CompoudObject3D
+ with correct ObjectTransformation filled out
+
+ @param o_rViewInformation3D
+ The ViewInformation3D created which will be overwritten
+
+ @param rCandidate
+ The E3dCompoundObject for which the ViewInformation3D shall be
+ prepared
+
+ @return
+ A pointer to the found and used root scene. This is also a hint
+ if the operation succeeded or not, since when object has no root
+ scene (is not inserted to a model), an empty ViewInformation3D
+ will be used
+*/
+E3dScene* fillViewInformation3DForCompoundObject(
+ drawinglayer::geometry::ViewInformation3D& o_rViewInformation3D,
+ const E3dCompoundObject& rCandidate);
+
+/** support for getting all from a 2d position hit objects in a 3d scene
+ in a depth sorted array
+
+ @param rPoint
+ 2D Point in view coordinates
+
+ @param rScene
+ The 3D Scene for HitTest
+
+ @param o_rResult
+ Output parameter which contains all hit 3D objects inside rScene. This
+ vector will be changed in any case. If it's empty, no hit exists. If it's
+ not empty, the first object is the object closest to the viewer
+
+*/
+SVXCORE_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack(
+ const basegfx::B2DPoint& rPoint,
+ const E3dScene& rScene,
+ ::std::vector< const E3dCompoundObject* >& o_rResult);
+
+/** support for checking if the single given 3d object is hit at position
+
+ @param rPoint
+ 2D Point in view coordinates
+
+ @param rCandidate
+ The 3D Object which needs checking
+
+ @return
+ true if hit, false if not
+*/
+bool checkHitSingle3DObject(
+ const basegfx::B2DPoint& rPoint,
+ const E3dCompoundObject& rCandidate);
+
+
+#endif // INCLUDED_SVX_HELPERHITTEST3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
new file mode 100644
index 000000000..e1470c982
--- /dev/null
+++ b/include/svx/hexcolorcontrol.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_HEXCOLOR_HXX
+#define INCLUDED_SVX_HEXCOLOR_HXX
+
+#include <svx/svxdllapi.h>
+#include <tools/color.hxx>
+#include <tools/link.hxx>
+
+namespace weld { class Entry; }
+
+struct ImplSVEvent;
+
+namespace weld {
+
+class SVXCORE_DLLPUBLIC HexColorControl
+{
+private:
+ std::unique_ptr<weld::Entry> m_xEntry;
+ Link<weld::Entry&, void> m_aModifyHdl;
+ ImplSVEvent* m_nAsyncModifyEvent;
+
+ DECL_DLLPRIVATE_STATIC_LINK(HexColorControl, ImplProcessInputHdl, OUString&, bool);
+ DECL_DLLPRIVATE_LINK(ImplProcessModifyHdl, weld::Entry&, void);
+ DECL_DLLPRIVATE_LINK(OnAsyncModifyHdl, void*, void);
+public:
+ HexColorControl(std::unique_ptr<weld::Entry> pEdit);
+ ~HexColorControl();
+
+ void connect_changed(const Link<weld::Entry&, void>& rLink) { m_aModifyHdl = rLink; }
+
+ void SetColor( ::Color nColor );
+ ::Color GetColor() const;
+};
+
+}
+
+#endif // INCLUDED_SVX_HEXCOLOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/hlnkitem.hxx b/include/svx/hlnkitem.hxx
new file mode 100644
index 000000000..a129cc720
--- /dev/null
+++ b/include/svx/hlnkitem.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_HLNKITEM_HXX
+#define INCLUDED_SVX_HLNKITEM_HXX
+
+#include <rtl/ustring.hxx>
+#include <svl/poolitem.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <svl/macitem.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+#include <memory>
+
+enum class HyperDialogEvent {
+ NONE = 0x0000,
+ MouseOverObject = 0x0001,
+ MouseClickObject = 0x0002,
+ MouseOutObject = 0x0004,
+};
+namespace o3tl {
+ template<> struct typed_flags<HyperDialogEvent> : is_typed_flags<HyperDialogEvent, 0x07> {};
+}
+
+enum SvxLinkInsertMode
+{
+ HLINK_DEFAULT,
+ HLINK_FIELD,
+ HLINK_BUTTON,
+ HLINK_HTMLMODE = 0x0080
+};
+
+class SVX_DLLPUBLIC SvxHyperlinkItem final : public SfxPoolItem
+{
+ OUString sName;
+ OUString sURL;
+ OUString sTarget;
+ SvxLinkInsertMode eType;
+
+ OUString sIntName;
+ std::unique_ptr<SvxMacroTableDtor> pMacroTable;
+
+ HyperDialogEvent nMacroEvents;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> _nWhich = SID_HYPERLINK_GETLINK ):
+ SfxPoolItem(_nWhich) { eType = HLINK_DEFAULT; nMacroEvents=HyperDialogEvent::NONE; };
+ SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem );
+ SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> nWhich, const OUString& rName, const OUString& rURL,
+ const OUString& rTarget, const OUString& rIntName,
+ SvxLinkInsertMode eTyp,
+ HyperDialogEvent nEvents,
+ SvxMacroTableDtor const *pMacroTbl );
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxHyperlinkItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const OUString& GetName() const { return sName; }
+ void SetName(const OUString& rName) { sName = rName; }
+
+ const OUString& GetURL() const { return sURL; }
+ void SetURL(const OUString& rURL) { sURL = rURL; }
+
+ const OUString& GetIntName () const { return sIntName; }
+ void SetIntName(const OUString& rIntName) { sIntName = rIntName; }
+
+ const OUString& GetTargetFrame() const { return sTarget; }
+ void SetTargetFrame(const OUString& rTarget) { sTarget = rTarget; }
+
+ SvxLinkInsertMode GetInsertMode() const { return eType; }
+ void SetInsertMode( SvxLinkInsertMode eNew ) { eType = eNew; }
+
+ void SetMacro( HyperDialogEvent nEvent, const SvxMacro& rMacro );
+
+ void SetMacroTable( const SvxMacroTableDtor& rTbl );
+ const SvxMacroTableDtor* GetMacroTable() const { return pMacroTable.get(); }
+
+ void SetMacroEvents (const HyperDialogEvent nEvents) { nMacroEvents = nEvents; }
+ HyperDialogEvent GetMacroEvents() const { return nMacroEvents; }
+
+};
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/hyperdlg.hxx b/include/svx/hyperdlg.hxx
new file mode 100644
index 000000000..d86a65d22
--- /dev/null
+++ b/include/svx/hyperdlg.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_HYPERDLG_HXX
+#define INCLUDED_SVX_HYPERDLG_HXX
+
+#include <sfx2/childwin.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Hyperlink-Dialog
+|*
+\************************************************************************/
+
+class AbstractSvxHpLinkDlg;
+
+class SVX_DLLPUBLIC SvxHlinkDlgWrapper final : public SfxChildWindow
+{
+private:
+ VclPtr<AbstractSvxHpLinkDlg> mpDlg;
+
+public:
+ SvxHlinkDlgWrapper( vcl::Window*pParent, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo );
+ virtual ~SvxHlinkDlgWrapper() override;
+
+ SFX_DECL_CHILDWINDOW_WITHID(SvxHlinkDlgWrapper);
+ virtual bool QueryClose() override;
+};
+
+#endif // INCLUDED_SVX_HYPERDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ifaceids.hxx b/include/svx/ifaceids.hxx
new file mode 100644
index 000000000..f9942e3f1
--- /dev/null
+++ b/include/svx/ifaceids.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_IFACEIDS_HXX
+#define INCLUDED_SVX_IFACEIDS_HXX
+
+
+#include <sfx2/shell.hxx>
+
+#define SVX_INTERFACE_BASIDE_DOCSH (SFX_INTERFACE_IDE_START)
+#define SVX_INTERFACE_BASIDE_VIEWSH (SFX_INTERFACE_IDE_START + SfxInterfaceId(1))
+#define SVX_INTERFACE_EXTRUSION_BAR (SFX_INTERFACE_IDE_START + SfxInterfaceId(2))
+#define SVX_INTERFACE_FONTWORK_BAR (SFX_INTERFACE_IDE_START + SfxInterfaceId(3))
+
+
+#define SVX_INTERFACE_FORM_SH (SFX_INTERFACE_IDE_END + SfxInterfaceId(1))
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
new file mode 100644
index 000000000..e3586e290
--- /dev/null
+++ b/include/svx/imapdlg.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_IMAPDLG_HXX
+#define INCLUDED_SVX_IMAPDLG_HXX
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+#include <vector>
+
+namespace vcl { class Window; }
+namespace weld { class Button; }
+namespace weld { class ComboBox; }
+namespace weld { class CustomWeld; }
+namespace weld { class Entry; }
+namespace weld { class Label; }
+namespace weld { class Toolbar; }
+namespace weld { class Widget; }
+namespace weld { class Window; }
+
+class ImageMap;
+class SvtURLBox;
+
+/*************************************************************************
+|*
+|* Derivation from SfxChildWindow as "container" for float
+|*
+\************************************************************************/
+
+class Graphic;
+typedef ::std::vector< OUString > TargetList;
+
+class SVX_DLLPUBLIC SvxIMapDlgChildWindow final : public SfxChildWindow
+{
+ public:
+
+ SvxIMapDlgChildWindow( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo const * );
+
+ SFX_DECL_CHILDWINDOW_WITHID( SvxIMapDlgChildWindow );
+
+ static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap,
+ const TargetList* pTargetList, void* pEditingObj );
+};
+
+
+class SvxIMapDlg;
+
+class SvxIMapDlgItem final : public SfxControllerItem
+{
+ SvxIMapDlg& rIMap;
+
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+
+
+public:
+
+ SvxIMapDlgItem( SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
+};
+
+class IMapOwnData;
+class IMapWindow;
+class GraphCtrl;
+
+class SVX_DLLPUBLIC SvxIMapDlg final : public SfxModelessDialogController
+{
+ friend class IMapOwnData;
+ friend class IMapWindow;
+
+ std::unique_ptr<IMapOwnData> pOwnData;
+ void* pCheckObj;
+ SvxIMapDlgItem aIMapItem;
+
+ std::unique_ptr<IMapWindow> m_xIMapWnd;
+ std::unique_ptr<weld::Toolbar> m_xTbxIMapDlg1;
+ std::unique_ptr<weld::Label> m_xFtURL;
+ std::unique_ptr<SvtURLBox> m_xURLBox;
+ std::unique_ptr<weld::Label> m_xFtText;
+ std::unique_ptr<weld::Entry> m_xEdtText;
+ std::unique_ptr<weld::Label> m_xFtTarget;
+ std::unique_ptr<weld::ComboBox> m_xCbbTarget;
+ std::unique_ptr<weld::Button> m_xCancelBtn;
+ std::unique_ptr<weld::Label> m_xStbStatus1;
+ std::unique_ptr<weld::Label> m_xStbStatus2;
+ std::unique_ptr<weld::Label> m_xStbStatus3;
+ std::unique_ptr<weld::CustomWeld> m_xIMapWndWeld;
+
+ DECL_DLLPRIVATE_LINK( TbxClickHdl, const OString&, void );
+ DECL_DLLPRIVATE_LINK( InfoHdl, IMapWindow&, void );
+ DECL_DLLPRIVATE_LINK( MousePosHdl, GraphCtrl*, void );
+ DECL_DLLPRIVATE_LINK( GraphSizeHdl, GraphCtrl*, void );
+ DECL_DLLPRIVATE_LINK( URLModifyHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( EntryModifyHdl, weld::Entry&, void );
+ DECL_DLLPRIVATE_LINK( URLLoseFocusHdl, weld::Widget&, void );
+ DECL_DLLPRIVATE_LINK( UpdateHdl, Timer *, void );
+ DECL_DLLPRIVATE_LINK( StateHdl, GraphCtrl*, void );
+ DECL_DLLPRIVATE_LINK( CancelHdl, weld::Button&, void );
+
+ void URLModify();
+ void DoOpen();
+ bool DoSave();
+ void SetActiveTool(std::string_view rId);
+
+public:
+
+ SvxIMapDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
+ weld::Window* pParent);
+ virtual ~SvxIMapDlg() override;
+
+ void SetExecState( bool bEnable );
+
+ const void* GetEditingObject() const { return pCheckObj; }
+
+ const ImageMap& GetImageMap() const;
+
+ void SetTargetList( const TargetList& rTargetList );
+
+ void UpdateLink( const Graphic& rGraphic, const ImageMap* pImageMap,
+ const TargetList* pTargetList, void* pEditingObj );
+};
+
+SVX_DLLPUBLIC SvxIMapDlg* GetIMapDlg();
+
+#endif // INCLUDED_SVX_IMAPDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/insctrl.hxx b/include/svx/insctrl.hxx
new file mode 100644
index 000000000..b2a5102ca
--- /dev/null
+++ b/include/svx/insctrl.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_INSCTRL_HXX
+#define INCLUDED_SVX_INSCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxInsertStatusBarControl final : public SfxStatusBarControl
+{
+public:
+ virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual void Paint(const UserDrawEvent& rEvt) override;
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxInsertStatusBarControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+ virtual ~SvxInsertStatusBarControl() override;
+
+private:
+ bool bInsert;
+
+ SVX_DLLPRIVATE void DrawItemText_Impl();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ipolypolygoneditorcontroller.hxx b/include/svx/ipolypolygoneditorcontroller.hxx
new file mode 100644
index 000000000..22f787121
--- /dev/null
+++ b/include/svx/ipolypolygoneditorcontroller.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_IPOLYPOLYGONEDITORCONTROLLER_HXX
+#define INCLUDED_SVX_IPOLYPOLYGONEDITORCONTROLLER_HXX
+
+#include <sal/config.h>
+
+#include <sal/types.h>
+
+// Defines
+
+enum class SdrPathSmoothKind
+{
+ DontCare, // only for status query
+ Angular, // angular
+ Asymmetric, // asymmetric, normal Smooth
+ Symmetric // symmetric
+};
+enum class SdrPathSegmentKind
+{
+ DontCare, // only for status query
+ Line, // straight path segment
+ Curve, // curve path segment (Bezier)
+ Toggle // only for Set: Toggle
+};
+enum class SdrObjClosedKind
+{
+ DontCare, // only for status query
+ Open, // non-closed object (line, polyline, ...)
+ Closed // closed object (polygon, ...)
+};
+
+class SAL_DLLPUBLIC_RTTI IPolyPolygonEditorController
+{
+public:
+ virtual void DeleteMarkedPoints() = 0;
+ virtual bool IsDeleteMarkedPointsPossible() const = 0;
+
+ virtual void RipUpAtMarkedPoints() = 0;
+ virtual bool IsRipUpAtMarkedPointsPossible() const = 0;
+
+ virtual bool IsSetMarkedSegmentsKindPossible() const = 0;
+ virtual SdrPathSegmentKind GetMarkedSegmentsKind() const = 0;
+ virtual void SetMarkedSegmentsKind(SdrPathSegmentKind eKind) = 0;
+
+ virtual bool IsSetMarkedPointsSmoothPossible() const = 0;
+ virtual SdrPathSmoothKind GetMarkedPointsSmooth() const = 0;
+ virtual void SetMarkedPointsSmooth(SdrPathSmoothKind eKind) = 0;
+
+ virtual bool IsOpenCloseMarkedObjectsPossible() const = 0;
+ virtual SdrObjClosedKind GetMarkedObjectsClosedState() const = 0;
+
+protected:
+ ~IPolyPolygonEditorController() {}
+};
+
+#endif // INCLUDED_SVX_IPOLYPOLYGONEDITORCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx
new file mode 100644
index 000000000..5d434d1ae
--- /dev/null
+++ b/include/svx/itemwin.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_ITEMWIN_HXX
+#define INCLUDED_SVX_ITEMWIN_HXX
+
+#include <svtools/toolbarmenu.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/xtable.hxx>
+#include <vcl/customweld.hxx>
+
+class SfxObjectShell;
+class ValueSet;
+class SvxLineStyleToolBoxControl;
+
+class SvxLineBox final : public WeldToolbarPopup
+{
+ rtl::Reference<SvxLineStyleToolBoxControl> mxControl;
+ std::unique_ptr<ValueSet> mxLineStyleSet;
+ std::unique_ptr<weld::CustomWeld> mxLineStyleSetWin;
+
+ void FillControl();
+ void Fill(const XDashListRef& pList);
+
+ DECL_LINK(SelectHdl, ValueSet*, void);
+
+ virtual void GrabFocus() override;
+
+public:
+ SvxLineBox(SvxLineStyleToolBoxControl* pControl, weld::Widget* pParent, int nInitialIndex);
+ virtual ~SvxLineBox() override;
+};
+
+namespace SvxFillTypeBox
+{
+SVX_DLLPUBLIC void Fill(weld::ComboBox& rListBox);
+}
+
+namespace SvxFillAttrBox
+{
+SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XHatchListRef& pList);
+SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XGradientListRef& pList);
+SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XBitmapListRef& pList);
+SVX_DLLPUBLIC void Fill(weld::ComboBox&, const XPatternListRef& pList);
+}
+
+#endif // INCLUDED_SVX_ITEMWIN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/itextprovider.hxx b/include/svx/itextprovider.hxx
new file mode 100644
index 000000000..361b2293e
--- /dev/null
+++ b/include/svx/itextprovider.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_ITEXTPROVIDER_HXX
+#define INCLUDED_SVX_ITEXTPROVIDER_HXX
+
+#include <sal/types.h>
+
+#include <svx/svxdllapi.h>
+
+class SdrText;
+
+namespace svx
+{
+
+ /** This interface provides access to text object(s) in an SdrObject.
+
+ */
+ class SVXCORE_DLLPUBLIC ITextProvider
+ {
+ public:
+ /** Return the number of texts available for this object. */
+ virtual sal_Int32 getTextCount() const = 0;
+
+ /** Return the nth available text. */
+ virtual SdrText* getText(sal_Int32 nIndex) const = 0;
+
+ protected:
+ ~ITextProvider() {}
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/labelitemwindow.hxx b/include/svx/labelitemwindow.hxx
new file mode 100644
index 000000000..5271482b1
--- /dev/null
+++ b/include/svx/labelitemwindow.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <vcl/InterimItemWindow.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC LabelItemWindow final : public InterimItemWindow
+{
+private:
+ std::unique_ptr<weld::Label> m_xLabel;
+
+public:
+ LabelItemWindow(vcl::Window* pParent, const OUString& rLabel);
+ void set_label(const OUString& rLabel);
+ OUString get_label() const;
+
+ void SetOptimalSize();
+ virtual void dispose() override;
+ virtual ~LabelItemWindow() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
new file mode 100644
index 000000000..a3d74adba
--- /dev/null
+++ b/include/svx/langbox.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_LANGBOX_HXX
+#define INCLUDED_SVX_LANGBOX_HXX
+
+#include <memory>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <svx/svxdllapi.h>
+#include <vcl/weld.hxx>
+#include <o3tl/typed_flags_set.hxx>
+
+enum class SvxLanguageListFlags
+{
+ EMPTY = 0x0000,
+ ALL = 0x0001,
+ WESTERN = 0x0002,
+ CTL = 0x0004,
+ CJK = 0x0008,
+ FBD_CHARS = 0x0010,
+ ONLY_KNOWN = 0x0020, // list only locales provided by I18N
+ SPELL_USED = 0x0040,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxLanguageListFlags> : is_typed_flags<SvxLanguageListFlags, 0x007f> {};
+}
+
+// load language strings from resource
+SVXCORE_DLLPUBLIC OUString GetDicInfoStr( std::u16string_view rName, const LanguageType nLang, bool bNeg );
+
+class SVXCORE_DLLPUBLIC
+SvxLanguageBox
+{
+public:
+ enum class EditedAndValid
+ {
+ No,
+ Valid,
+ Invalid
+ };
+
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+ Link<weld::ComboBox&, void> m_aChangeHdl;
+ OUString m_aAllString;
+ std::unique_ptr<css::uno::Sequence<sal_Int16>> m_xSpellUsedLang;
+ LanguageType m_eSavedLanguage;
+ EditedAndValid m_eEditedAndValid;
+ bool m_bHasLangNone;
+ bool m_bLangNoneIsLangAll;
+ bool m_bWithCheckmark;
+
+ SVX_DLLPRIVATE weld::ComboBoxEntry BuildEntry(const LanguageType nLangType, sal_Int16 nType = css::i18n::ScriptType::WEAK);
+ SVX_DLLPRIVATE void AddLanguages(const std::vector< LanguageType >& rLanguageTypes, SvxLanguageListFlags nLangList,
+ std::vector<weld::ComboBoxEntry>& rEntries);
+ SVX_DLLPRIVATE void InsertLanguage(const LanguageType nLangType, sal_Int16 nType);
+
+ SVX_DLLPRIVATE int ImplTypeToPos(LanguageType eType) const;
+ DECL_DLLPRIVATE_LINK(ChangeHdl, weld::ComboBox&, void);
+public:
+ SvxLanguageBox(std::unique_ptr<weld::ComboBox> pControl);
+ void SetLanguageList( SvxLanguageListFlags nLangList,
+ bool bHasLangNone, bool bLangNoneIsLangAll = false,
+ bool bCheckSpellAvail = false, bool bDefaultLangExist = false,
+ LanguageType eDefaultLangType = LANGUAGE_NONE,
+ sal_Int16 nDefaultType = 0 );
+ void InsertLanguage(const LanguageType nLangType);
+
+ EditedAndValid GetEditedAndValid() const { return m_eEditedAndValid;}
+ sal_Int32 SaveEditedAsEntry();
+
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_aChangeHdl = rLink; }
+ void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_xControl->connect_focus_in(rLink); }
+ void grab_focus() { m_xControl->grab_focus(); }
+ void save_active_id() { m_eSavedLanguage = get_active_id(); }
+ LanguageType get_saved_active_id() const { return m_eSavedLanguage; }
+ bool get_active_id_changed_from_saved() const { return m_eSavedLanguage != get_active_id(); }
+ void hide() { m_xControl->hide(); }
+ void set_visible(bool bShow) { m_xControl->set_visible(bShow); }
+ void set_size_request(int nWidth, int nHeight) { m_xControl->set_size_request(nWidth, nHeight); }
+ void set_width_chars(int nChars) { m_xControl->set_entry_width_chars(nChars); }
+ void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
+ void set_active(int nPos) { m_xControl->set_active(nPos); }
+ int get_active() const { return m_xControl->get_active(); }
+ void set_active_id(const LanguageType eLangType);
+ OUString get_active_text() const { return m_xControl->get_active_text(); }
+ bool get_visible() const { return m_xControl->get_visible(); }
+ LanguageType get_active_id() const;
+ int find_id(const LanguageType eLangType) const;
+ LanguageType get_id(int nPos) const;
+ void set_id(int nPos, const LanguageType eLangType);
+ void remove_id(const LanguageType eLangType);
+ void append(const LanguageType eLangType, const OUString& rStr);
+ int find_text(const OUString& rStr) const { return m_xControl->find_text(rStr); }
+ OUString get_text(int nPos) const { return m_xControl->get_text(nPos); }
+ int get_count() const { return m_xControl->get_count(); }
+ weld::ComboBox* get_widget() { return m_xControl.get(); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx
new file mode 100644
index 000000000..4bd2fea31
--- /dev/null
+++ b/include/svx/lathe3d.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_LATHE3D_HXX
+#define INCLUDED_SVX_LATHE3D_HXX
+
+#include <svl/intitem.hxx>
+#include <svl/itemset.hxx>
+#include <svx/obj3d.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svddef.hxx>
+#include <svx/svx3ditems.hxx>
+
+class E3dDefaultAttributes;
+
+/*************************************************************************
+|*
+|* Create a 3D rotation object from a passed 2D polygon
+|*
+|* The aPolyPoly3D is rotated around its axis in nHSegments steps.
+|* nVSegments contains the number of lines of aPolyPoly3D and therefore
+|* is effectively a vertical segmentation.
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC E3dLatheObj final : public E3dCompoundObject
+{
+ basegfx::B2DPolyPolygon maPolyPoly2D;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+ void SetDefaultAttributes(const E3dDefaultAttributes& rDefault);
+
+private:
+ // protected destructor - due to final, make private
+ virtual ~E3dLatheObj() override;
+
+public:
+ E3dLatheObj(
+ SdrModel& rSdrModel,
+ const E3dDefaultAttributes& rDefault,
+ const basegfx::B2DPolyPolygon& rPoly2D);
+ E3dLatheObj(SdrModel& rSdrModel, E3dLatheObj const & rSource);
+ E3dLatheObj(SdrModel& rSdrModel);
+
+ // HorizontalSegments:
+ sal_uInt32 GetHorizontalSegments() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS).GetValue(); }
+
+ // VerticalSegments:
+ sal_uInt32 GetVerticalSegments() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue(); }
+
+ // PercentDiagonal: 0..100, before 0.0..0.5
+ sal_uInt16 GetPercentDiagonal() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL).GetValue(); }
+
+ // BackScale: 0..100, before 0.0..1.0
+ sal_uInt16 GetBackScale() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE).GetValue(); }
+
+ // EndAngle: 0..10000
+ sal_uInt32 GetEndAngle() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE).GetValue(); }
+
+ // #107245# GetSmoothNormals() for bLatheSmoothed
+ bool GetSmoothNormals() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS).GetValue(); }
+
+ // #107245# GetSmoothLids() for bLatheSmoothFrontBack
+ bool GetSmoothLids() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS).GetValue(); }
+
+ // #107245# GetCharacterMode() for bLatheCharacterMode
+ bool GetCharacterMode() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE).GetValue(); }
+
+ // #107245# GetCloseFront() for bLatheCloseFront
+ bool GetCloseFront() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT).GetValue(); }
+
+ // #107245# GetCloseBack() for bLatheCloseBack
+ bool GetCloseBack() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK).GetValue(); }
+
+ virtual SdrObjKind GetObjIdentifier() const override;
+
+ virtual E3dLatheObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ // TakeObjName...() is for the display in the UI, for example "3 frames selected".
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ // set/get local parameters with geometry recreation
+ void SetPolyPoly2D(const basegfx::B2DPolyPolygon& rNew);
+ const basegfx::B2DPolyPolygon& GetPolyPoly2D() const { return maPolyPoly2D; }
+
+ // break up
+ virtual bool IsBreakObjPossible() override;
+ virtual std::unique_ptr<SdrAttrObj,SdrObjectFreeOp> GetBreakObj() override;
+};
+
+#endif // INCLUDED_SVX_LATHE3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/legacyitem.hxx b/include/svx/legacyitem.hxx
new file mode 100644
index 000000000..b8d1362b4
--- /dev/null
+++ b/include/svx/legacyitem.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_LEGACYITEM_HXX
+#define INCLUDED_SVX_LEGACYITEM_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// // svx
+// SvxOrientationItem aOrientation( aRotateAngle.GetValue(), aStacked.GetValue(), 0 );
+// SvxMarginItem aMargin;
+// SvxRotateModeItem aRotateMode;
+//////////////////////////////////////////////////////////////////////////////
+
+class SvStream;
+class SvxOrientationItem;
+class SvxMarginItem;
+class SvxRotateModeItem;
+
+namespace legacy
+{
+ namespace SvxOrientation
+ {
+ sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion);
+ void Create(SvxOrientationItem& rItem, SvStream& rStrm, sal_uInt16 nItemVersion);
+ SvStream& Store(const SvxOrientationItem& rItem, SvStream& rStrm, sal_uInt16 nItemVersion);
+ }
+ namespace SvxMargin
+ {
+ sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion);
+ void Create(SvxMarginItem& rItem, SvStream& rStrm, sal_uInt16 nItemVersion);
+ SvStream& Store(const SvxMarginItem& rItem, SvStream& rStrm, sal_uInt16 nItemVersion);
+ }
+ namespace SvxRotateMode
+ {
+ sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion);
+ void Create(SvxRotateModeItem& rItem, SvStream& rStrm, sal_uInt16 nItemVersion);
+ SvStream& Store(const SvxRotateModeItem& rItem, SvStream& rStrm, sal_uInt16 nItemVersion);
+ }
+}
+
+#endif // INCLUDED_SVX_LEGACYITEM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx
new file mode 100644
index 000000000..e2cd9e6c8
--- /dev/null
+++ b/include/svx/linectrl.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_LINECTRL_HXX
+#define INCLUDED_SVX_LINECTRL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+#include <svtools/popupwindowcontroller.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+namespace svx {
+ class ToolboxButtonLineStyleUpdater;
+}
+
+class XLineStyleItem;
+class XLineDashItem;
+
+typedef std::function<bool(const OUString&, const css::uno::Any&)> LineStyleSelectFunction;
+typedef std::function<void(bool)> LineStyleIsNoneFunction;
+
+// SvxLineStyleController:
+class SVXCORE_DLLPUBLIC SvxLineStyleToolBoxControl final : public svt::PopupWindowController
+{
+private:
+ std::unique_ptr<svx::ToolboxButtonLineStyleUpdater> m_xBtnUpdater;
+
+ LineStyleSelectFunction m_aLineStyleSelectFunction;
+ LineStyleIsNoneFunction m_aLineStyleIsNoneFunction;
+
+public:
+ SvxLineStyleToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence<css::uno::Any>& rArguments ) override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+ virtual void SAL_CALL execute(sal_Int16 nKeyModifier) override;
+ virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
+
+ virtual ~SvxLineStyleToolBoxControl() override;
+
+ // called when the user selects a line style
+ void setLineStyleSelectFunction(const LineStyleSelectFunction& aLineStyleSelectFunction);
+ // called when the line style changes, can be used to trigger disabling the arrows if the none line style is selected
+ void setLineStyleIsNoneFunction(const LineStyleIsNoneFunction& aLineStyleIsNoneFunction);
+ void dispatchLineStyleCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
+
+private:
+ virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
+ virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
+
+};
+
+// SvxLineWidthController:
+
+class SVX_DLLPUBLIC SvxLineWidthToolBoxControl final : public SfxToolBoxControl
+{
+ static MapUnit GetCoreMetric();
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxLineWidthToolBoxControl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+ virtual ~SvxLineWidthToolBoxControl() override;
+
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window *pParent ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/linkwarn.hxx b/include/svx/linkwarn.hxx
new file mode 100644
index 000000000..c72f7f85e
--- /dev/null
+++ b/include/svx/linkwarn.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_LINKWARN_HXX
+#define INCLUDED_SVX_LINKWARN_HXX
+
+#include <vcl/weld.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxLinkWarningDialog final : public weld::MessageDialogController
+{
+private:
+ std::unique_ptr<weld::CheckButton> m_xWarningOnBox;
+
+public:
+ SvxLinkWarningDialog(weld::Widget* pParent, const OUString& _rFileName);
+ virtual ~SvxLinkWarningDialog() override;
+};
+
+#endif // INCLUDED_SVX_LINKWARN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/measctrl.hxx b/include/svx/measctrl.hxx
new file mode 100644
index 000000000..ccdcab46f
--- /dev/null
+++ b/include/svx/measctrl.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_MEASCTRL_HXX
+#define INCLUDED_SVX_MEASCTRL_HXX
+
+#include <vcl/customweld.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdobj.hxx>
+#include <memory>
+
+class SfxItemSet;
+class SdrMeasureObj;
+class SdrModel;
+
+class SVX_DLLPUBLIC SvxXMeasurePreview final : public weld::CustomWidgetController
+{
+ friend class SvxMeasurePage;
+
+private:
+ MapMode m_aMapMode;
+ std::unique_ptr<SdrModel> pModel;
+ std::unique_ptr<SdrMeasureObj, SdrObjectFreeOp> pMeasureObj;
+
+ void ResizeImpl(const Size& rSize);
+
+public:
+ SvxXMeasurePreview();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~SvxXMeasurePreview() override;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual void Resize() override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+
+ void SetAttributes(const SfxItemSet& rInAttrs);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/modctrl.hxx b/include/svx/modctrl.hxx
new file mode 100644
index 000000000..d0b02ec98
--- /dev/null
+++ b/include/svx/modctrl.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_MODCTRL_HXX
+#define INCLUDED_SVX_MODCTRL_HXX
+
+#include <tools/link.hxx>
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+
+#include <memory>
+
+class Timer;
+
+class SVX_DLLPUBLIC SvxModifyControl final : public SfxStatusBarControl
+{
+public:
+ virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual void Paint(const UserDrawEvent& rUsrEvt) override;
+ virtual void Click() override;
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxModifyControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+
+private: // Links
+ DECL_DLLPRIVATE_LINK(OnTimer, Timer*, void);
+
+private: // Functions
+ void _repaint();
+
+private:
+ struct ImplData;
+ std::shared_ptr<ImplData> mxImpl;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/msdffdef.hxx b/include/svx/msdffdef.hxx
new file mode 100644
index 000000000..373974e67
--- /dev/null
+++ b/include/svx/msdffdef.hxx
@@ -0,0 +1,858 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <limits.h>
+#include <sal/types.h>
+
+#define DFF_COMMON_RECORD_HEADER_SIZE 8
+
+const sal_uInt32 nMaxLegalDffRecordLength =
+ SAL_MAX_UINT32 - DFF_COMMON_RECORD_HEADER_SIZE;
+
+#define DFF_PSFLAG_CONTAINER 0x0F // If the version field of a record
+ // header takes on this value, the
+ // record header marks the start of
+ // a container.
+
+#define DFF_PST_TextHeaderAtom 3999
+#define DFF_PST_TextCharsAtom 4000
+#define DFF_PST_TextBytesAtom 4008
+#define DFF_PST_ExOleObjStg 4113
+
+// Record Name FBT-Value Instance Contents Wrd Exl Ppt Ver
+
+#define DFF_msofbtDggContainer 0xF000 // per-document data X X X
+#define DFF_msofbtDgg 0xF006 // an FDGG and several FIDCLs X X X 0
+#define DFF_msofbtCLSID 0xF016 // the CLSID of the application that put the data on the clipboard C C C 0
+#define DFF_msofbtOPT 0xF00B // count of properties the document-wide default shape properties X X X 3
+#define DFF_msofbtColorMRU 0xF11A // count of colors the colors in the MRU swatch X X X 0
+#define DFF_msofbtSplitMenuColors 0xF11E // count of colors the colors in the top-level split menus X X X 0
+#define DFF_msofbtBstoreContainer 0xF001 // count of BLIPs all images in the document (JPEGs, metafiles, etc.) X X X
+#define DFF_msofbtBSE 0xF007 // BLIP type an FBSE (one per BLIP) X X X 2
+#define DFF_msofbtBlipFirst 0xF018 // range of fbts reserved for various kinds of BLIPs X X X
+#define DFF_msofbtBlipLast 0xF117 // range of fbts reserved for various kinds of BLIPs X X X
+
+#define DFF_msofbtDgContainer 0xF002 // per-sheet/page/slide data X X X
+#define DFF_msofbtDg 0xF008 // drawing ID an FDG X X X 0
+#define DFF_msofbtRegroupItems 0xF118 // count of regroup entries several FRITs X X X 0
+#define DFF_msofbtColorScheme 0xF120 // count of colors the colors of the source host's color scheme C C 0
+#define DFF_msofbtSpgrContainer 0xF003 // several SpContainers, the first of which is the group shape itself X X X
+#define DFF_msofbtSpContainer 0xF004 // a shape X X X
+#define DFF_msofbtSpgr 0xF009 // an FSPGR; only present if the shape is a group shape X X X 1
+#define DFF_msofbtSp 0xF00A // shape type an FSP X X X 2
+#define DFF_msofbtTextbox 0xF00C // RTF text C C C 0
+#define DFF_msofbtClientTextbox 0xF00D // host-defined the text in the textbox, in host-defined format X X X
+#define DFF_msofbtAnchor 0xF00E // a RECT, in 100000ths of an inch C C C 0
+#define DFF_msofbtChildAnchor 0xF00F // a RECT, in units relative to the parent group X X X 0
+#define DFF_msofbtClientAnchor 0xF010 // host-defined the location of the shape, in a host-defined format X X X
+#define DFF_msofbtClientData 0xF011 // host-defined host-specific data X X X
+#define DFF_msofbtOleObject 0xF11F // a serialized IStorage for an OLE object C C C 0
+#define DFF_msofbtDeletedPspl 0xF11D // an FPSPL; only present in top-level deleted shapes X 0
+#define DFF_msofbtUDefProp 0xF122 // range of fbts reserved for various kinds of BLIPs X X X
+#define DFF_msofbtSolverContainer 0xF005 // count of rules the rules governing shapes X X X
+#define DFF_msofbtConnectorRule 0xF012 // an FConnectorRule X X 1
+#define DFF_msofbtAlignRule 0xF013 // an FAlignRule X X X 0
+#define DFF_msofbtArcRule 0xF014 // an FARCRU X X X 0
+#define DFF_msofbtClientRule 0xF015 // host-defined host-defined
+#define DFF_msofbtCalloutRule 0xF017 // an FCORU X X X 0
+
+
+// Values for the ULONG in DFF_PST_TextHeaderAtom
+enum DFF_TextHeader {
+ DFFTH_TITLE,
+ DFFTH_BODY,
+ DFFTH_NOTES,
+ DFFTH_NOTUSED,
+ DFFTH_OTHER, // Text in a Shape
+ DFFTH_CENTERBODY, // Subtitle in Title-Slide
+ DFFTH_CENTERTITLE, // Title in Title-Slide
+ DFFTH_HALFBODY, // Body in two-column slide
+ DFFTH_QUARTERBODY // Body in four-body slide
+};
+
+
+// Shape Properties
+// 1pt = 12700 EMU (English Metric Units)
+// 1pt = 20 Twip = 20/1440" = 1/72"
+// 1twip=635 EMU
+// 1" = 12700*72 = 914400 EMU
+// 1" = 25.4mm
+// 1mm = 36000 EMU
+
+
+// Record Name FBT-Value Instance Contents Wrd Exl Ppt Ver
+// Transform
+#define DFF_Prop_Rotation 4 // Fixed Point 16.16 degrees
+// Protection
+#define DFF_Prop_LockAgainstGrouping 127 // sal_Bool Do not group this shape
+// Text
+#define DFF_Prop_lTxid 128 // LONG id for the text, value determined by the host
+#define DFF_Prop_dxTextLeft 129 // LONG margins relative to shape's inscribed text rectangle (in EMUs)
+#define DFF_Prop_dyTextTop 130 // LONG
+#define DFF_Prop_dxTextRight 131 // LONG
+#define DFF_Prop_dyTextBottom 132 // LONG
+#define DFF_Prop_WrapText 133 // MSO_WRAPMODE Wrap text at shape margins
+#define DFF_Prop_anchorText 135 // MSO_ANCHOR How to anchor the text
+#define DFF_Prop_txflTextFlow 136 // MSO_TXFL Text flow
+#define DFF_Prop_cdirFont 137 // MSO_CDIR Font rotation
+#define DFF_Prop_hspNext 138 // MSO_HSP ID of the next shape (used by Word for linked textboxes)
+#define DFF_Prop_AutoTextMargin 188 // sal_Bool use host's margin calculations
+#define DFF_Prop_RotateText 189 // sal_Bool Rotate text with shape
+#define DFF_Prop_FitTextToShape 191 // sal_Bool Size text to fit shape size
+// GeoText
+#define DFF_Prop_gtextUNICODE 192 // WCHAR* UNICODE text string
+#define DFF_Prop_gtextAlign 194 // MSO_GEOTEXTALIGN alignment on curve
+#define DFF_Prop_gtextSize 195 // LONG default point size
+#define DFF_Prop_gtextSpacing 196 // LONG fixed point 16.16
+#define DFF_Prop_gtextFont 197 // WCHAR* font family name
+#define DFF_Prop_gtextFStretch 245 // sal_Bool 400 Stretch to fit shape
+#define DFF_Prop_gtextFBold 250 // sal_Bool 20 Bold font
+#define DFF_Prop_gtextFItalic 251 // sal_Bool 10 Italic font
+#define DFF_Prop_gtextFStrikethrough 255 // sal_Bool 1 Strike through font
+// Blip
+#define DFF_Prop_cropFromTop 256 // LONG 16.16 fraction times total image width or height, as appropriate.
+#define DFF_Prop_cropFromBottom 257 // LONG
+#define DFF_Prop_cropFromLeft 258 // LONG
+#define DFF_Prop_cropFromRight 259 // LONG
+#define DFF_Prop_pib 260 // IMsoBlip* Blip to display
+#define DFF_Prop_pibName 261 // WCHAR* Blip file name
+#define DFF_Prop_pibFlags 262 // MSO_BLIPFLAGS Blip flags
+#define DFF_Prop_pictureTransparent 263 // LONG transparent color (none if ~0UL)
+#define DFF_Prop_pictureContrast 264 // LONG contrast setting
+#define DFF_Prop_pictureBrightness 265 // LONG brightness setting
+#define DFF_Prop_pictureGamma 266 // LONG 16.16 gamma
+#define DFF_Prop_pictureId 267 // LONG Host-defined ID for OLE objects (usually a pointer)
+#define DFF_Prop_pictureActive 319 // sal_Bool Server is active (OLE objects only)
+// Geometry
+#define DFF_Prop_geoLeft 320 // LONG Defines the G (geometry) coordinate space.
+#define DFF_Prop_geoTop 321 // LONG
+#define DFF_Prop_geoRight 322 // LONG
+#define DFF_Prop_geoBottom 323 // LONG
+#define DFF_Prop_pVertices 325 // IMsoArray An array of points, in G units.
+#define DFF_Prop_pSegmentInfo 326 // IMsoArray
+#define DFF_Prop_adjustValue 327 // LONG Adjustment values corresponding to the positions of the
+#define DFF_Prop_adjust2Value 328 // LONG adjust handles of the shape. The number of values used
+#define DFF_Prop_adjust3Value 329 // LONG and their allowable ranges vary from shape type to shape type.
+#define DFF_Prop_adjust4Value 330 // LONG
+#define DFF_Prop_adjust5Value 331 // LONG
+#define DFF_Prop_adjust6Value 332 // LONG
+#define DFF_Prop_adjust7Value 333 // LONG
+#define DFF_Prop_adjust8Value 334 // LONG
+#define DFF_Prop_adjust9Value 335 // LONG
+#define DFF_Prop_adjust10Value 336 // LONG
+#define DFF_Prop_connectorPoints 337 // IMsoArray
+#define DFF_Prop_stretchPointX 339 // LONG
+#define DFF_Prop_stretchPointY 340 // LONG
+#define DFF_Prop_Handles 341 // H*
+#define DFF_Prop_pFormulas 342 // LONG
+#define DFF_Prop_textRectangles 343 // LONG
+#define DFF_Prop_connectorType 344 // LONG ->0=none, 1=segments, 2=custom, 3=rect
+#define DFF_Prop_f3DOK 379 // sal_Bool 3D may be set
+#define DFF_Prop_fGtextOK 381 // sal_Bool Text effect (FontWork) supported
+#define DFF_Prop_fFillShadeShapeOK 382 // BOOL
+#define DFF_Prop_fFillOK 383 // sal_Bool OK to fill the shape through the UI or VBA?
+// FillStyle
+#define DFF_Prop_fillType 384 // MSO_FILLTYPE Type of fill
+#define DFF_Prop_fillColor 385 // MSO_CLR Foreground color
+#define DFF_Prop_fillOpacity 386 // LONG Fixed 16.16
+#define DFF_Prop_fillBackColor 387 // MSO_CLR Background color
+#define DFF_Prop_fillBackOpacity 388 // LONG Shades only
+#define DFF_Prop_fillBlip 390 // IMsoBlip* Pattern/texture
+#define DFF_Prop_fillWidth 393 // LONG How big (A units) to make a metafile texture.
+#define DFF_Prop_fillHeight 394 // LONG
+#define DFF_Prop_fillAngle 395 // LONG Fade angle - degrees in 16.16
+#define DFF_Prop_fillFocus 396 // LONG Linear shaded fill focus percent
+#define DFF_Prop_fillToRight 399 // LONG Fraction 16.16
+#define DFF_Prop_fillToBottom 400 // LONG Fraction 16.16
+#define DFF_Prop_fillShadeColors 407 // IMsoArray a preset array of colors
+#define DFF_Prop_fFilled 443 // sal_Bool Is shape filled?
+#define DFF_Prop_fNoFillHitTest 447 // sal_Bool Hit test a shape as though filled
+// LineStyle
+#define DFF_Prop_lineColor 448 // MSO_CLR Color of line
+#define DFF_Prop_lineOpacity 449 // LONG Not implemented
+#define DFF_Prop_lineBackColor 450 // MSO_CLR Background color
+#define DFF_Prop_lineWidth 459 // LONG A units; 1pt == 12700 EMUs
+#define DFF_Prop_lineStyle 461 // MSO_LINESTYLE Draw parallel lines?
+#define DFF_Prop_lineDashing 462 // MSO_LINEDASHING Can be overridden by:
+#define DFF_Prop_lineDashStyle 463 // IMsoArray As Win32 ExtCreatePen
+#define DFF_Prop_lineStartArrowhead 464 // MSO_LINEEND Arrow at start
+#define DFF_Prop_lineEndArrowhead 465 // MSO_LINEEND Arrow at end
+#define DFF_Prop_lineStartArrowWidth 466 // MSO_LINEENDWIDTH Arrow at start
+#define DFF_Prop_lineStartArrowLength 467 // MSO_LINEENDLENGTH Arrow at end
+#define DFF_Prop_lineEndArrowWidth 468 // MSO_LINEENDWIDTH Arrow at start
+#define DFF_Prop_lineEndArrowLength 469 // MSO_LINEENDLENGTH Arrow at end
+#define DFF_Prop_lineJoinStyle 470 // MSO_LINEJOIN How to join lines
+#define DFF_Prop_lineEndCapStyle 471 // MSO_LINECAP How to end lines
+#define DFF_Prop_fLine 508 // sal_Bool Any line?
+#define DFF_Prop_fNoLineDrawDash 511 // sal_Bool Draw a dashed line if no line
+// ShadowStyle
+#define DFF_Prop_shadowType 512 // MSO_SHADOWTYPE Type of effect
+#define DFF_Prop_shadowColor 513 // MSO_CLR Foreground color
+#define DFF_Prop_shadowOpacity 516 // LONG Fixed 16.16
+#define DFF_Prop_shadowOffsetX 517 // LONG Offset shadow
+#define DFF_Prop_shadowOffsetY 518 // LONG Offset shadow
+#define DFF_Prop_fshadowObscured 575 // sal_Bool Excel5-style shadow
+// PerspectiveStyle
+#define DFF_Prop_fPerspective 639 // sal_Bool On/off
+// 3D Object
+#define DFF_Prop_c3DSpecularAmt 640 // LONG Fixed-point 16.16
+#define DFF_Prop_c3DDiffuseAmt 641 // LONG Fixed-point 16.16
+#define DFF_Prop_c3DShininess 642 // LONG Default gives OK results
+#define DFF_Prop_c3DExtrudeForward 644 // LONG Distance of extrusion in EMUs
+#define DFF_Prop_c3DExtrudeBackward 645 // LONG
+#define DFF_Prop_c3DExtrusionColor 647 // MSO_CLR Basic color of extruded part of shape; the lighting model used will determine the exact shades used when rendering.
+#define DFF_Prop_fc3DLightFace 703 // BOOL
+// 3D Style
+#define DFF_Prop_c3DYRotationAngle 704 // LONG degrees (16.16) about y axis
+#define DFF_Prop_c3DXRotationAngle 705 // LONG degrees (16.16) about x axis
+#define DFF_Prop_c3DRotationCenterX 710 // LONG rotation center x (16.16 or g-units)
+#define DFF_Prop_c3DRotationCenterY 711 // LONG rotation center y (16.16 or g-units)
+#define DFF_Prop_c3DRotationCenterZ 712 // LONG rotation center z (absolute (emus))
+#define DFF_Prop_c3DRenderMode 713 // MSO_3DRENDERMODE Full,wireframe, or bcube
+#define DFF_Prop_c3DTolerance 714 // LONG pixels (16.16)
+#define DFF_Prop_c3DXViewpoint 715 // LONG X view point (emus)
+#define DFF_Prop_c3DYViewpoint 716 // LONG Y view point (emus)
+#define DFF_Prop_c3DZViewpoint 717 // LONG Z view distance (emus)
+#define DFF_Prop_c3DOriginX 718 // LONG
+#define DFF_Prop_c3DOriginY 719 // LONG
+#define DFF_Prop_c3DSkewAngle 720 // LONG degree (16.16) skew angle
+#define DFF_Prop_c3DSkewAmount 721 // LONG Percentage skew amount
+#define DFF_Prop_c3DAmbientIntensity 722 // LONG Fixed point intensity
+#define DFF_Prop_c3DKeyX 723 // LONG Key light source direc-
+#define DFF_Prop_c3DKeyY 724 // LONG tion; only their relative
+#define DFF_Prop_c3DKeyZ 725 // LONG magnitudes matter
+#define DFF_Prop_c3DKeyIntensity 726 // LONG Fixed point intensity
+#define DFF_Prop_c3DFillX 727 // LONG Fill light source direc-
+#define DFF_Prop_c3DFillY 728 // LONG tion; only their relative
+#define DFF_Prop_c3DFillZ 729 // LONG magnitudes matter
+#define DFF_Prop_c3DFillIntensity 730 // LONG Fixed point intensity
+#define DFF_Prop_fc3DFillHarsh 767 // sal_Bool Is fill lighting harsh?
+// Shape
+#define DFF_Prop_hspMaster 769 // MSO_HSP master shape
+#define DFF_Prop_cxstyle 771 // MSO_CXSTYLE Type of connector
+#define DFF_Prop_fBackground 831 // sal_Bool If sal_True, this is the background shape.
+
+// Callout
+#define DFF_Prop_fCalloutLengthSpecified 895 // sal_Bool if true, we look at dxyCalloutLengthSpecified
+
+// GroupShape
+#define DFF_Prop_wzName 896 // WCHAR* Shape Name (present only if explicitly set)
+#define DFF_Prop_wzDescription 897 // WCHAR* alternate text
+#define DFF_Prop_pihlShape 898 // IHlink* The hyperlink in the shape.
+#define DFF_Prop_pWrapPolygonVertices 899 // IMsoArray The polygon that text will be wrapped around (Word)
+#define DFF_Prop_dxWrapDistLeft 900 // LONG Left wrapping distance from text (Word)
+#define DFF_Prop_dyWrapDistTop 901 // LONG Top wrapping distance from text (Word)
+#define DFF_Prop_dxWrapDistRight 902 // LONG Right wrapping distance from text (Word)
+#define DFF_Prop_dyWrapDistBottom 903 // LONG Bottom wrapping distance from text (Word)
+#define DFF_Prop_tableProperties 927 // LONG
+#define DFF_Prop_tableRowProperties 928 // LONG*
+#define DFF_Prop_fHidden 958 // sal_Bool Do not display
+#define DFF_Prop_fPrint 959 // sal_Bool Print this shape
+
+// properties of the second property set
+#define DFF_Prop_metroBlob 937 // XML ZipPackage*
+
+// linchpin: the shape type
+enum MSO_SPT: sal_Int32 {
+ mso_sptMin = 0,
+ mso_sptNotPrimitive = mso_sptMin,
+ mso_sptRectangle = 1,
+ mso_sptRoundRectangle = 2,
+ mso_sptEllipse = 3,
+ mso_sptDiamond = 4,
+ mso_sptIsocelesTriangle = 5,
+ mso_sptRightTriangle = 6,
+ mso_sptParallelogram = 7,
+ mso_sptTrapezoid = 8,
+ mso_sptHexagon = 9,
+ mso_sptOctagon = 10,
+ mso_sptPlus = 11,
+ mso_sptStar = 12,
+ mso_sptArrow = 13,
+ mso_sptThickArrow = 14,
+ mso_sptHomePlate = 15,
+ mso_sptCube = 16,
+ mso_sptBalloon = 17,
+ mso_sptSeal = 18,
+ mso_sptArc = 19,
+ mso_sptLine = 20,
+ mso_sptPlaque = 21,
+ mso_sptCan = 22,
+ mso_sptDonut = 23,
+ mso_sptTextSimple = 24,
+ mso_sptTextOctagon = 25,
+ mso_sptTextHexagon = 26,
+ mso_sptTextCurve = 27,
+ mso_sptTextWave = 28,
+ mso_sptTextRing = 29,
+ mso_sptTextOnCurve = 30,
+ mso_sptTextOnRing = 31,
+ mso_sptStraightConnector1 = 32,
+ mso_sptBentConnector2 = 33,
+ mso_sptBentConnector3 = 34,
+ mso_sptBentConnector4 = 35,
+ mso_sptBentConnector5 = 36,
+ mso_sptCurvedConnector2 = 37,
+ mso_sptCurvedConnector3 = 38,
+ mso_sptCurvedConnector4 = 39,
+ mso_sptCurvedConnector5 = 40,
+ mso_sptCallout1 = 41,
+ mso_sptCallout2 = 42,
+ mso_sptCallout3 = 43,
+ mso_sptAccentCallout1 = 44,
+ mso_sptAccentCallout2 = 45,
+ mso_sptAccentCallout3 = 46,
+ mso_sptBorderCallout1 = 47,
+ mso_sptBorderCallout2 = 48,
+ mso_sptBorderCallout3 = 49,
+ mso_sptAccentBorderCallout1 = 50,
+ mso_sptAccentBorderCallout2 = 51,
+ mso_sptAccentBorderCallout3 = 52,
+ mso_sptRibbon = 53,
+ mso_sptRibbon2 = 54,
+ mso_sptChevron = 55,
+ mso_sptPentagon = 56,
+ mso_sptNoSmoking = 57,
+ mso_sptSeal8 = 58,
+ mso_sptSeal16 = 59,
+ mso_sptSeal32 = 60,
+ mso_sptWedgeRectCallout = 61,
+ mso_sptWedgeRRectCallout = 62,
+ mso_sptWedgeEllipseCallout = 63,
+ mso_sptWave = 64,
+ mso_sptFoldedCorner = 65,
+ mso_sptLeftArrow = 66,
+ mso_sptDownArrow = 67,
+ mso_sptUpArrow = 68,
+ mso_sptLeftRightArrow = 69,
+ mso_sptUpDownArrow = 70,
+ mso_sptIrregularSeal1 = 71,
+ mso_sptIrregularSeal2 = 72,
+ mso_sptLightningBolt = 73,
+ mso_sptHeart = 74,
+ mso_sptPictureFrame = 75,
+ mso_sptQuadArrow = 76,
+ mso_sptLeftArrowCallout = 77,
+ mso_sptRightArrowCallout = 78,
+ mso_sptUpArrowCallout = 79,
+ mso_sptDownArrowCallout = 80,
+ mso_sptLeftRightArrowCallout = 81,
+ mso_sptUpDownArrowCallout = 82,
+ mso_sptQuadArrowCallout = 83,
+ mso_sptBevel = 84,
+ mso_sptLeftBracket = 85,
+ mso_sptRightBracket = 86,
+ mso_sptLeftBrace = 87,
+ mso_sptRightBrace = 88,
+ mso_sptLeftUpArrow = 89,
+ mso_sptBentUpArrow = 90,
+ mso_sptBentArrow = 91,
+ mso_sptSeal24 = 92,
+ mso_sptStripedRightArrow = 93,
+ mso_sptNotchedRightArrow = 94,
+ mso_sptBlockArc = 95,
+ mso_sptSmileyFace = 96,
+ mso_sptVerticalScroll = 97,
+ mso_sptHorizontalScroll = 98,
+ mso_sptCircularArrow = 99,
+ mso_sptNotchedCircularArrow = 100,
+ mso_sptUturnArrow = 101,
+ mso_sptCurvedRightArrow = 102,
+ mso_sptCurvedLeftArrow = 103,
+ mso_sptCurvedUpArrow = 104,
+ mso_sptCurvedDownArrow = 105,
+ mso_sptCloudCallout = 106,
+ mso_sptEllipseRibbon = 107,
+ mso_sptEllipseRibbon2 = 108,
+ mso_sptFlowChartProcess = 109,
+ mso_sptFlowChartDecision = 110,
+ mso_sptFlowChartInputOutput = 111,
+ mso_sptFlowChartPredefinedProcess = 112,
+ mso_sptFlowChartInternalStorage = 113,
+ mso_sptFlowChartDocument = 114,
+ mso_sptFlowChartMultidocument = 115,
+ mso_sptFlowChartTerminator = 116,
+ mso_sptFlowChartPreparation = 117,
+ mso_sptFlowChartManualInput = 118,
+ mso_sptFlowChartManualOperation = 119,
+ mso_sptFlowChartConnector = 120,
+ mso_sptFlowChartPunchedCard = 121,
+ mso_sptFlowChartPunchedTape = 122,
+ mso_sptFlowChartSummingJunction = 123,
+ mso_sptFlowChartOr = 124,
+ mso_sptFlowChartCollate = 125,
+ mso_sptFlowChartSort = 126,
+ mso_sptFlowChartExtract = 127,
+ mso_sptFlowChartMerge = 128,
+ mso_sptFlowChartOfflineStorage = 129,
+ mso_sptFlowChartOnlineStorage = 130,
+ mso_sptFlowChartMagneticTape = 131,
+ mso_sptFlowChartMagneticDisk = 132,
+ mso_sptFlowChartMagneticDrum = 133,
+ mso_sptFlowChartDisplay = 134,
+ mso_sptFlowChartDelay = 135,
+ mso_sptTextPlainText = 136,
+ mso_sptTextStop = 137,
+ mso_sptTextTriangle = 138,
+ mso_sptTextTriangleInverted = 139,
+ mso_sptTextChevron = 140,
+ mso_sptTextChevronInverted = 141,
+ mso_sptTextRingInside = 142,
+ mso_sptTextRingOutside = 143,
+ mso_sptTextArchUpCurve = 144,
+ mso_sptTextArchDownCurve = 145,
+ mso_sptTextCircleCurve = 146,
+ mso_sptTextButtonCurve = 147,
+ mso_sptTextArchUpPour = 148,
+ mso_sptTextArchDownPour = 149,
+ mso_sptTextCirclePour = 150,
+ mso_sptTextButtonPour = 151,
+ mso_sptTextCurveUp = 152,
+ mso_sptTextCurveDown = 153,
+ mso_sptTextCascadeUp = 154,
+ mso_sptTextCascadeDown = 155,
+ mso_sptTextWave1 = 156,
+ mso_sptTextWave2 = 157,
+ mso_sptTextWave3 = 158,
+ mso_sptTextWave4 = 159,
+ mso_sptTextInflate = 160,
+ mso_sptTextDeflate = 161,
+ mso_sptTextInflateBottom = 162,
+ mso_sptTextDeflateBottom = 163,
+ mso_sptTextInflateTop = 164,
+ mso_sptTextDeflateTop = 165,
+ mso_sptTextDeflateInflate = 166,
+ mso_sptTextDeflateInflateDeflate = 167,
+ mso_sptTextFadeRight = 168,
+ mso_sptTextFadeLeft = 169,
+ mso_sptTextFadeUp = 170,
+ mso_sptTextFadeDown = 171,
+ mso_sptTextSlantUp = 172,
+ mso_sptTextSlantDown = 173,
+ mso_sptTextCanUp = 174,
+ mso_sptTextCanDown = 175,
+ mso_sptFlowChartAlternateProcess = 176,
+ mso_sptFlowChartOffpageConnector = 177,
+ mso_sptCallout90 = 178,
+ mso_sptAccentCallout90 = 179,
+ mso_sptBorderCallout90 = 180,
+ mso_sptAccentBorderCallout90 = 181,
+ mso_sptLeftRightUpArrow = 182,
+ mso_sptSun = 183,
+ mso_sptMoon = 184,
+ mso_sptBracketPair = 185,
+ mso_sptBracePair = 186,
+ mso_sptSeal4 = 187,
+ mso_sptDoubleWave = 188,
+ mso_sptActionButtonBlank = 189,
+ mso_sptActionButtonHome = 190,
+ mso_sptActionButtonHelp = 191,
+ mso_sptActionButtonInformation = 192,
+ mso_sptActionButtonForwardNext = 193,
+ mso_sptActionButtonBackPrevious = 194,
+ mso_sptActionButtonEnd = 195,
+ mso_sptActionButtonBeginning = 196,
+ mso_sptActionButtonReturn = 197,
+ mso_sptActionButtonDocument = 198,
+ mso_sptActionButtonSound = 199,
+ mso_sptActionButtonMovie = 200,
+ mso_sptHostControl = 201,
+ mso_sptTextBox = 202,
+ //for pptx shape which doesn't exist in ppt
+ mso_sptTearDrop = 203,
+ mso_sptMax = 0x0FFF,
+ mso_sptNil = mso_sptMax
+};
+
+// different enums from the OfficeDraw documentation, Appendix D - beginning
+
+// note: in opposite to the MS documentation, they all
+// start with "mso_" instead of "mso"
+
+enum MSO_ShapePath {
+ mso_shapeLines, // A line of straight segments
+ mso_shapeLinesClosed, // A closed polygonal object
+ mso_shapeCurves, // A line of Bezier curve segments
+ mso_shapeCurvesClosed, // A closed shape with curved edges
+ mso_shapeComplex // pSegmentInfo must be non-empty
+};
+
+enum MSO_WrapMode {
+ mso_wrapSquare,
+ mso_wrapByPoints,
+ mso_wrapNone,
+ mso_wrapTopBottom,
+ mso_wrapThrough
+};
+
+enum MSO_BWMode {
+ mso_bwColor, // only used for predefined shades
+ mso_bwAutomatic, // depends on object type
+ mso_bwGrayScale, // shades of gray only
+ mso_bwLightGrayScale, // shades of light gray only
+ mso_bwInverseGray, // dark gray mapped to light gray, etc.
+ mso_bwGrayOutline, // pure gray and white
+ mso_bwBlackTextLine, // black text and lines, all else grayscale
+ mso_bwHighContrast, // pure black and white mode (no grays)
+ mso_bwBlack, // solid black
+ mso_bwWhite, // solid white
+ mso_bwDontShow, // object not drawn
+ mso_bwNumModes // number of Black and white modes
+};
+
+enum MSO_Anchor {
+ mso_anchorTop,
+ mso_anchorMiddle,
+ mso_anchorBottom,
+ mso_anchorTopCentered,
+ mso_anchorMiddleCentered,
+ mso_anchorBottomCentered,
+ mso_anchorTopBaseline,
+ mso_anchorBottomBaseline,
+ mso_anchorTopCenteredBaseline,
+ mso_anchorBottomCenteredBaseline
+};
+
+enum MSO_CDir {
+ mso_cdir0, // Right
+ mso_cdir90, // Down
+ mso_cdir180, // Left
+ mso_cdir270 // Up
+};
+
+// connector style
+enum MSO_ConnectorStyle {
+ mso_cxstyleStraight = 0,
+ mso_cxstyleBent,
+ mso_cxstyleCurved,
+ mso_cxstyleNone
+};
+
+// MSO_TXFL -- text flow
+enum MSO_TextFlow {
+ mso_txflHorzN, // Horizontal non-@
+ mso_txflTtoBA, // Top to Bottom @-font
+ mso_txflBtoT, // Bottom to Top non-@
+ mso_txflTtoBN, // Top to Bottom non-@
+ mso_txflHorzA, // Horizontal @-font
+ mso_txflVertN // Vertical, non-@
+};
+
+// MSO_TXDIR - text direction (needed for Bi-Di support)
+enum MSO_TextDir {
+ mso_txdirLTR, // left-to-right text direction
+ mso_txdirRTL, // right-to-left text direction
+ mso_txdirContext // context text direction
+};
+
+// MSO_SPCOT -- Callout Type
+enum MSO_SPCalloutType {
+ mso_spcotRightAngle = 1,
+ mso_spcotOneSegment = 2,
+ mso_spcotTwoSegment = 3,
+ mso_spcotThreeSegment = 4
+};
+
+// MSO_SPCOA -- Callout Angle
+enum MSO_SPCalloutAngle {
+ mso_spcoaAny,
+ mso_spcoa30,
+ mso_spcoa45,
+ mso_spcoa60,
+ mso_spcoa90,
+ mso_spcoa0
+};
+
+// MSO_SPCOD -- Callout Drop
+enum MSO_SPCalloutDrop {
+ mso_spcodTop,
+ mso_spcodCenter,
+ mso_spcodBottom,
+ mso_spcodSpecified
+};
+
+// MSO_GEOTEXTALIGN - FontWork alignment
+enum MSO_GeoTextAlign {
+ mso_alignTextStretch, /* Stretch each line of text to fit width. */
+ mso_alignTextCenter, /* Center text on width. */
+ mso_alignTextLeft, /* Left justify. */
+ mso_alignTextRight, /* Right justify. */
+ mso_alignTextLetterJust, /* Spread letters out to fit width. */
+ mso_alignTextWordJust, /* Spread words out to fit width. */
+ mso_alignTextInvalid /* Invalid */
+};
+
+// MSO_BLIPFLAGS - flags for pictures
+enum MSO_BlipFlags {
+ mso_blipflagDefault = 0,
+ mso_blipflagComment = 0, // Blip name is a comment
+ mso_blipflagFile, // Blip name is a file name
+ mso_blipflagURL, // Blip name is a full URL
+ mso_blipflagType = 3, // Mask to extract type
+ /* Or the following flags with any of the above. */
+ mso_blipflagDontSave = 4, // A "dont" is the depression in the metal
+ // body work of an automobile caused when a
+ // cyclist violently trusts his or her nose
+ // at it, thus a DontSave is another name for
+ // a cycle lane.
+ mso_blipflagDoNotSave = 4, // For those who prefer English
+ mso_blipflagLinkToFile = 8
+};
+
+enum MSO_3DRenderMode {
+ mso_FullRender, // Generate a full rendering
+ mso_Wireframe, // Generate a wireframe
+ mso_BoundingCube // Generate a bounding cube
+};
+
+enum MSO_XFormType {
+ mso_xformAbsolute, // Apply transform in absolute space centered on shape
+ mso_xformShape, // Apply transform to shape geometry
+ mso_xformDrawing // Apply transform in drawing space
+};
+
+enum MSO_ShadowType {
+ mso_shadowOffset, // N pixel offset shadow
+ mso_shadowDouble, // Use second offset too
+ mso_shadowRich, // Rich perspective shadow (cast relative to shape)
+ mso_shadowShape, // Rich perspective shadow (cast in shape space)
+ mso_shadowDrawing, // Perspective shadow cast in drawing space
+ mso_shadowEmbossOrEngrave
+};
+
+// MSO_DZTYPE - the type of a (length) measurement
+enum MSO_DZType {
+ mso_dztypeMin = 0,
+ mso_dztypeDefault = 0, // Default size, ignore the values
+ mso_dztypeA = 1, // Values are in EMUs
+ mso_dztypeV = 2, // Values are in pixels
+ mso_dztypeShape = 3, // Values are 16.16 fractions of shape size
+ mso_dztypeFixedAspect = 4, // Aspect ratio is fixed
+ mso_dztypeAFixed = 5, // EMUs, fixed aspect ratio
+ mso_dztypeVFixed = 6, // Pixels, fixed aspect ratio
+ mso_dztypeShapeFixed = 7, // Proportion of shape, fixed aspect ratio
+ mso_dztypeFixedAspectEnlarge
+ = 8, // Aspect ratio is fixed, favor larger size
+ mso_dztypeAFixedBig = 9, // EMUs, fixed aspect ratio
+ mso_dztypeVFixedBig = 10, // Pixels, fixed aspect ratio
+ mso_dztypeShapeFixedBig= 11, // Proportion of shape, fixed aspect ratio
+ mso_dztypeMax = 11
+};
+
+enum MSO_FillType {
+ mso_fillSolid, // Fill with a solid color
+ mso_fillPattern, // Fill with a pattern (bitmap)
+ mso_fillTexture, // A texture (pattern with its own color map)
+ mso_fillPicture, // Center a picture in the shape
+ mso_fillShade, // Shade from start to end points
+ mso_fillShadeCenter, // Shade from bounding rectangle to end point
+ mso_fillShadeShape, // Shade from shape outline to end point
+ mso_fillShadeScale, // Similar to mso_fillShade, but the fillAngle
+ // is additionally scaled by the aspect ratio of
+ // the shape. If shape is square, it is the
+ // same as mso_fillShade.
+ mso_fillShadeTitle, // special type - shade to title --- for PP
+ mso_fillBackground // Use the background fill color/pattern
+};
+
+// MSOLINESTYLE - compound line style
+enum MSO_LineStyle {
+ mso_lineSimple, // Single line (of width lineWidth)
+ mso_lineDouble, // Double lines of equal width
+ mso_lineThickThin, // Double lines, one thick, one thin
+ mso_lineThinThick, // Double lines, reverse order
+ mso_lineTriple, // Three lines, thin, thick, thin
+ MSO_LineStyle_NONE = USHRT_MAX
+};
+
+// MSO_LINETYPE - how to "fill" the line contour
+enum MSO_LineType {
+ mso_lineSolidType, // Fill with a solid color
+ mso_linePattern, // Fill with a pattern (bitmap)
+ mso_lineTexture, // A texture (pattern with its own color map)
+ mso_linePicture // Center a picture in the shape
+};
+
+// MSO_LINEDASHING - dashed line style
+enum MSO_LineDashing {
+ mso_lineSolid, // Solid (continuous) pen
+ mso_lineDashSys, // PS_DASH system dash style
+ mso_lineDotSys, // PS_DOT system dash style
+ mso_lineDashDotSys, // PS_DASHDOT system dash style
+ mso_lineDashDotDotSys, // PS_DASHDOTDOT system dash style
+ mso_lineDotGEL, // square dot style
+ mso_lineDashGEL, // dash style
+ mso_lineLongDashGEL, // long dash style
+ mso_lineDashDotGEL, // dash short dash
+ mso_lineLongDashDotGEL, // long dash short dash
+ mso_lineLongDashDotDotGEL // long dash short dash short dash
+};
+
+// MSO_LINEEND - line end effect
+enum MSO_LineEnd {
+ mso_lineNoEnd,
+ mso_lineArrowEnd,
+ mso_lineArrowStealthEnd,
+ mso_lineArrowDiamondEnd,
+ mso_lineArrowOvalEnd,
+ mso_lineArrowOpenEnd
+};
+
+// MSO_LINEENDWIDTH - size of arrowhead
+enum MSO_LineEndWidth {
+ mso_lineNarrowArrow,
+ mso_lineMediumWidthArrow,
+ mso_lineWideArrow
+};
+
+// MSO_LINEENDLENGTH - size of arrowhead
+enum MSO_LineEndLength {
+ mso_lineShortArrow,
+ mso_lineMediumLenArrow,
+ mso_lineLongArrow
+};
+
+// MSO_LINEJOIN - line join style.
+enum MSO_LineJoin {
+ mso_lineJoinBevel, // Join edges by a straight line
+ mso_lineJoinMiter, // Extend edges until they join
+ mso_lineJoinRound // Draw an arc between the two edges
+};
+
+// MSO_LINECAP - line cap style (applies to ends of dash segments too).
+enum MSO_LineCap {
+ mso_lineEndCapRound, // Rounded ends - the default
+ mso_lineEndCapSquare, // Square protrudes by half line width
+ mso_lineEndCapFlat // Line ends at end point
+};
+// Various enums from the OfficeDraw documentation Appendix D - End
+
+// BStore-Container
+
+
+enum MSO_BLIPUSAGE {
+ mso_blipUsageDefault, // All non-texture fill blips get this.
+ mso_blipUsageTexture,
+ mso_blipUsageMax = 255 // Since this is stored in a byte
+};
+
+enum MSO_BLIPTYPE { // GEL provided types...
+ mso_blipERROR = 0, // An error occurred during loading
+ mso_blipUNKNOWN, // An unknown blip type
+ mso_blipEMF, // Windows Enhanced Metafile
+ mso_blipWMF, // Windows Metafile
+ mso_blipPICT, // Macintosh PICT
+ mso_blipJPEG, // JFIF
+ mso_blipPNG, // PNG
+ mso_blipDIB, // Windows DIB
+ mso_blipFirstClient = 32, // First client defined blip type
+ mso_blipLastClient = 255 // Last client defined blip type
+};
+
+enum MSO_BI {
+ mso_biUNKNOWN = 0,
+ mso_biWMF = 0x216, // Metafile header then compressed WMF
+ mso_biEMF = 0x3D4, // Metafile header then compressed EMF
+ mso_biPICT = 0x542, // Metafile header then compressed PICT
+ mso_biPNG = 0x6E0, // One byte tag then PNG data
+ mso_biJFIF = 0x46A, // One byte tag then JFIF data
+ mso_biJPEG = mso_biJFIF,
+ mso_biDIB = 0x7A8, // One byte tag then DIB data
+ mso_biClient=0x800 // Clients should set this bit
+}; // Blip signature as encoded in the MSO_FBH.inst
+
+enum MSO_BLIPCOMPRESSION {
+ mso_compressionDeflate = 0,
+ mso_compressionNone = 254, // Used only if compression fails
+ mso_compressionTest = 255 // For testing only
+};
+
+enum MSO_BLIPFILTER {
+ mso_filterAdaptive = 0, // PNG type - not used/supported for metafile
+ mso_filterNone = 254,
+ mso_filterTest = 255 // For testing only
+};
+
+enum MSO_SYSCOLORINDEX {
+ mso_syscolorButtonFace, // COLOR_BTNFACE
+ mso_syscolorWindowText, // COLOR_WINDOWTEXT
+ mso_syscolorMenu, // COLOR_MENU
+ mso_syscolorHighlight, // COLOR_HIGHLIGHT
+ mso_syscolorHighlightText, // COLOR_HIGHLIGHTTEXT
+ mso_syscolorCaptionText, // COLOR_CAPTIONTEXT
+ mso_syscolorActiveCaption, // COLOR_ACTIVECAPTION
+ mso_syscolorButtonHighlight, // COLOR_BTNHIGHLIGHT
+ mso_syscolorButtonShadow, // COLOR_BTNSHADOW
+ mso_syscolorButtonText, // COLOR_BTNTEXT
+ mso_syscolorGrayText, // COLOR_GRAYTEXT
+ mso_syscolorInactiveCaption, // COLOR_INACTIVECAPTION
+ mso_syscolorInactiveCaptionText, // COLOR_INACTIVECAPTIONTEXT
+ mso_syscolorInfoBackground, // COLOR_INFOBK
+ mso_syscolorInfoText, // COLOR_INFOTEXT
+ mso_syscolorMenuText, // COLOR_MENUTEXT
+ mso_syscolorScrollbar, // COLOR_SCROLLBAR
+ mso_syscolorWindow, // COLOR_WINDOW
+ mso_syscolorWindowFrame, // COLOR_WINDOWFRAME
+ mso_syscolor3DLight, // COLOR_3DLIGHT
+ mso_syscolorMax, // Count of system colors
+
+ mso_colorFillColor = 0xF0, // Use the fillColor property
+ mso_colorLineOrFillColor, // Use the line color only if there is a line
+ mso_colorLineColor, // Use the lineColor property
+ mso_colorShadowColor, // Use the shadow color
+ mso_colorThis, // Use this color (only valid as described below)
+ mso_colorFillBackColor, // Use the fillBackColor property
+ mso_colorLineBackColor, // Use the lineBackColor property
+ mso_colorFillThenLine, // Use the fillColor unless no fill and line
+ mso_colorIndexMask = 0xFF, // Extract the color index
+
+ mso_colorProcessMask =0xFFFF00,// All the processing bits
+ mso_colorModificationMask =0x0F00, // Just the function
+ mso_colorModFlagMask =0xF000, // Just the additional flags
+ mso_colorDarken =0x0100, // Darken color by parameter/255
+ mso_colorLighten =0x0200, // Lighten color by parameter/255
+ mso_colorAdd =0x0300, // Add grey level RGB(param,param,param)
+ mso_colorSubtract =0x0400, // Subtract grey level RGB(p,p,p)
+ mso_colorReverseSubtract =0x0500, // Subtract from grey level RGB(p,p,p)
+ /* In the following "black" means maximum component value, white minimum.
+ The operation is per component, to guarantee white combine with
+ mso_colorGray */
+ mso_colorBlackWhite =0x0600, // Black if < uParam, else white (>=)
+ mso_colorInvert =0x2000, // Invert color (at the *end*)
+ mso_colorInvert128 =0x4000, // Invert by toggling the top bit
+ mso_colorGray =0x8000, // Make the color gray (before the above!)
+ mso_colorBParamMask =0xFF0000,// Parameter used as above
+ mso_colorBParamShift = 16 // To extract the parameter value
+};
+
+enum MSO_TextGeometryProperties {
+ use_gtextFBestFit = 0x00000100,
+ use_gtextFShrinkFit = 0x00000200,
+ use_gtextFStretch = 0x00000400,
+ gtextFBestFit = 0x01000000,
+ gtextFShrinkFit = 0x02000000,
+ gtextFStretch = 0x04000000
+};
+
+//ALT_TXT_MSINTEROP
+#define MSPROP_DESCRIPTION_MAX_LEN 4096
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
new file mode 100644
index 000000000..7d397687a
--- /dev/null
+++ b/include/svx/nbdtmg.hxx
@@ -0,0 +1,210 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_NBDTMG_HXX
+#define INCLUDED_SVX_NBDTMG_HXX
+#include <svx/svxdllapi.h>
+#include <memory>
+#include <vector>
+#include <editeng/numitem.hxx>
+#include <vcl/font.hxx>
+
+namespace svx::sidebar {
+
+#define DEFAULT_BULLET_TYPES 8
+#define DEFAULT_NUM_VALUSET_COUNT 8
+#define DEFAULT_NUMBERING_CACHE_FORMAT_VERSION 0x10
+
+enum class NBOType
+{
+ Bullets = 1, Numbering, Outline
+};
+
+class SVX_DLLPUBLIC NumSettings_Impl
+{
+ public:
+ SvxNumType nNumberType;
+ short nParentNumbering;
+ SvxNumberFormat::LabelFollowedBy eLabelFollowedBy;
+ tools::Long nTabValue;
+ SvxAdjust eNumAlign;
+ tools::Long nNumAlignAt;
+ tools::Long nNumIndentAt;
+ OUString sPrefix;
+ OUString sSuffix;
+ OUString sBulletChar;
+ OUString sBulletFont;
+ SvxBrushItem *pBrushItem;
+ Size aSize;
+
+ public:
+ NumSettings_Impl()
+ : nNumberType(SVX_NUM_CHARS_UPPER_LETTER)
+ , nParentNumbering(0)
+ , eLabelFollowedBy(SvxNumberFormat::NOTHING)
+ , nTabValue (0)
+ , eNumAlign(SvxAdjust::Left)
+ , nNumAlignAt(0)
+ , nNumIndentAt(0)
+ , pBrushItem(nullptr)
+ , aSize(0,0)
+ {}
+};
+
+typedef std::vector< std::shared_ptr<NumSettings_Impl> > NumSettingsArr_Impl;
+
+class SVX_DLLPUBLIC BulletsSettings
+{
+public:
+ vcl::Font aFont;
+ OUString sDescription;
+ sal_UCS4 cBulletChar;
+ bool bIsCustomized;
+ BulletsSettings() : cBulletChar(0), bIsCustomized(false) {}
+};
+
+
+class SVX_DLLPUBLIC NumberSettings_Impl
+{
+ public:
+ bool bIsCustomized;
+ OUString sDescription;
+ NumSettings_Impl* pNumSetting;
+ public:
+ NumberSettings_Impl() :
+ bIsCustomized(false),
+ pNumSetting(nullptr)
+ {}
+};
+
+typedef std::vector< std::shared_ptr<NumberSettings_Impl> > NumberSettingsArr_Impl;
+
+class SVX_DLLPUBLIC OutlineSettings_Impl
+{
+ public:
+ bool bIsCustomized;
+ OUString sDescription;
+ NumSettingsArr_Impl *pNumSettingsArr;
+ public:
+ OutlineSettings_Impl() :
+ bIsCustomized(false),
+ pNumSettingsArr(nullptr)
+ {}
+};
+
+class SVX_DLLPUBLIC NBOTypeMgrBase
+{
+ private:
+ const SfxItemSet* pSet;
+ MapUnit eCoreUnit;
+ // store the attributes passed from pSet
+ OUString aBulletCharFmtName;
+ OUString aNumCharFmtName;
+ bool bIsLoading;
+
+ NBOTypeMgrBase(const NBOTypeMgrBase&) = delete;
+
+ public:
+ NBOTypeMgrBase()
+ : pSet(nullptr)
+ , eCoreUnit(MapUnit::MapTwip)
+ , bIsLoading(false)
+ {}
+ virtual ~NBOTypeMgrBase() {}
+ virtual void Init()=0;
+ virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) = 0;
+ virtual void RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) = 0;
+ virtual void ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false,bool isResetSize=false) = 0;
+ virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault)=0;
+ virtual bool IsCustomized(sal_uInt16 nIndex)=0;
+ static sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel);
+ // store the attributes passed from pSet
+ void SetItems(const SfxItemSet* pArg);
+ protected:
+ const OUString& GetBulletCharFmtName() const { return aBulletCharFmtName;}
+ const OUString& GetNumCharFmtName() const { return aNumCharFmtName;}
+ MapUnit GetMapUnit() const { return eCoreUnit;}
+ protected:
+ void ImplLoad(std::u16string_view filename);
+ void ImplStore(std::u16string_view filename);
+
+};
+
+
+class BulletsTypeMgr final : public NBOTypeMgrBase
+{
+ friend class OutlineTypeMgr;
+ friend class NumberingTypeMgr;
+ private:
+ BulletsTypeMgr(const BulletsTypeMgr&) = delete;
+ public:
+ static sal_Unicode aDynamicBulletTypes[DEFAULT_BULLET_TYPES];
+ static sal_Unicode aDynamicRTLBulletTypes[DEFAULT_BULLET_TYPES];
+ static BulletsSettings* pActualBullets[DEFAULT_BULLET_TYPES];
+ public:
+ BulletsTypeMgr();
+ virtual void Init() override;
+ virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override;
+ virtual void RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override;
+ virtual void ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false,bool isResetSize=false) override;
+ virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) override;
+ virtual bool IsCustomized(sal_uInt16 nIndex) override;
+ static BulletsTypeMgr& GetInstance();
+};
+
+
+class NumberingTypeMgr final : public NBOTypeMgrBase
+{
+ private:
+ NumberingTypeMgr(const NumberingTypeMgr&) = delete;
+ public:
+ NumberSettingsArr_Impl maNumberSettingsArr;
+ NumberSettingsArr_Impl maDefaultNumberSettingsArr;
+ public:
+ NumberingTypeMgr();
+ virtual ~NumberingTypeMgr() override;
+ virtual void Init() override;
+ virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override;
+ virtual void RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override;
+ virtual void ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false,bool isResetSize=false) override;
+ virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) override;
+ virtual bool IsCustomized(sal_uInt16 nIndex) override;
+ static NumberingTypeMgr& GetInstance();
+};
+
+class OutlineTypeMgr final : public NBOTypeMgrBase
+{
+ private:
+ OutlineTypeMgr(const OutlineTypeMgr&) = delete;
+ public:
+ OutlineSettings_Impl* pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT];
+ OutlineSettings_Impl* pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT];
+ public:
+ OutlineTypeMgr();
+ virtual void Init() override;
+ virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override;
+ virtual void RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override;
+ virtual void ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false,bool isResetSize=false) override;
+ virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) override;
+ virtual bool IsCustomized(sal_uInt16 nIndex) override;
+ static OutlineTypeMgr& GetInstance();
+};
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/nbdtmgfact.hxx b/include/svx/nbdtmgfact.hxx
new file mode 100644
index 000000000..5b7ff5bf4
--- /dev/null
+++ b/include/svx/nbdtmgfact.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_NBDTMGFACT_HXX
+#define INCLUDED_SVX_NBDTMGFACT_HXX
+
+#include <svx/nbdtmg.hxx>
+
+namespace svx::sidebar::NBOutlineTypeMgrFact
+{
+SVX_DLLPUBLIC NBOTypeMgrBase* CreateInstance(const NBOType aType);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
new file mode 100644
index 000000000..360a067e0
--- /dev/null
+++ b/include/svx/numfmtsh.hxx
@@ -0,0 +1,229 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_NUMFMTSH_HXX
+#define INCLUDED_SVX_NUMFMTSH_HXX
+
+#include <i18nlangtag/lang.h>
+
+#include <svx/svxdllapi.h>
+
+#include <svl/zforlist.hxx>
+
+#include <vector>
+
+class Color;
+class SvNumberFormatter;
+
+enum class SvxNumberValueType
+{
+ Undefined,
+ Number,
+ String
+};
+
+// sort order of the category ListBox entries in the TabPage
+#define CAT_ALL 0
+#define CAT_USERDEFINED 1
+#define CAT_NUMBER 2
+#define CAT_PERCENT 3
+#define CAT_CURRENCY 4
+#define CAT_DATE 5
+#define CAT_TIME 6
+#define CAT_SCIENTIFIC 7
+#define CAT_FRACTION 8
+#define CAT_BOOLEAN 9
+#define CAT_TEXT 10
+
+#define SELPOS_NONE -1
+
+#define NUMBERFORMAT_ENTRY_NEW_CURRENCY NUMBERFORMAT_ENTRY_NOT_FOUND-1
+
+
+class SVX_DLLPUBLIC SvxNumberFormatShell
+{
+public:
+ SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ const OUString& rNumStr );
+
+ SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ double nNumVal,
+ const OUString* pNumStr );
+
+ ~SvxNumberFormatShell();
+
+
+ static SvxNumberFormatShell* Create( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ const OUString& rNumStr );
+
+ static SvxNumberFormatShell* Create( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ double nNumVal,
+ const OUString* pNumStr );
+
+
+ void GetInitSettings( sal_uInt16& nCatLbPos,
+ LanguageType& rLangType,
+ sal_uInt16& nFmtLbSelPos,
+ std::vector<OUString>& rFmtEntries,
+ OUString& rPrevString,
+ const Color*& rpPrevColor );
+
+ void CategoryChanged( sal_uInt16 nCatLbPos,
+ short& rFmtSelPos,
+ std::vector<OUString>& rFmtEntries );
+
+ void LanguageChanged( LanguageType eLangType,
+ short& rFmtSelPos,
+ std::vector<OUString>& rFmtEntries );
+
+ void FormatChanged( sal_uInt16 nFmtLbPos,
+ OUString& rPreviewStr,
+ const Color*& rpFontColor );
+
+ bool AddFormat( OUString& rFormat,
+ sal_Int32& rErrPos,
+ sal_uInt16& rCatLbSelPos,
+ short& rFmtSelPos,
+ std::vector<OUString>& rFmtEntries );
+
+ void RemoveFormat( std::u16string_view rFormat,
+ sal_uInt16& rCatLbSelPos,
+ short& rFmtSelPos,
+ std::vector<OUString>& rFmtEntries );
+
+ void MakeFormat( OUString& rFormat,
+ bool bThousand,
+ bool bNegRed,
+ sal_uInt16 nPrecision,
+ sal_uInt16 nLeadingZeroes,
+ sal_uInt16 nCurrencyEntryPos);
+
+ void GetOptions( const OUString& rFormat,
+ bool& rThousand,
+ bool& rNegRed,
+ sal_uInt16& rPrecision,
+ sal_uInt16& rLeadingZeroes,
+ sal_uInt16& rCatLbPos );
+
+ sal_uInt16 GetFormatIntegerDigits( std::u16string_view rFormat ) const;
+
+ void MakePreviewString( const OUString& rFormatStr,
+ OUString& rPreviewStr,
+ const Color*& rpFontColor );
+
+ void MakePrevStringFromVal( const OUString& rFormatStr,
+ OUString& rPreviewStr,
+ const Color*& rpFontColor,
+ double nValue);
+
+ bool IsUserDefined( const OUString& rFmtString );
+ bool IsTmpCurrencyFormat( const OUString& rFmtString );
+ bool FindEntry( const OUString& rFmtString, sal_uInt32* pAt = nullptr );
+
+ void ValidateNewEntries() { bUndoAddList = false; }
+ std::vector<sal_uInt32> const & GetUpdateData() const;
+
+ void SetCurNumFmtKey( sal_uInt32 nNew ) { nCurFormatKey = nNew; }
+ sal_uInt32 GetCurNumFmtKey() const { return nCurFormatKey; }
+ LanguageType GetCurLanguage() const { return eCurLanguage; }
+
+ /** Returns the name of Standard, General, ... for the
+ current language. */
+ OUString GetStandardName() const;
+
+ OUString GetComment4Entry(short nEntry);
+ short GetCategory4Entry(short nEntry) const;
+ bool GetUserDefined4Entry(short nEntry);
+ OUString GetFormat4Entry(short nEntry);
+ void SetComment4Entry(short nEntry, const OUString& aCommentString);
+
+ void SetCurrencySymbol(sal_uInt32 nPos);
+ sal_uInt32 GetCurrencySymbol() const { return nCurCurrencyEntryPos;}
+ sal_uInt16 FindCurrencyFormat( const OUString& rFmtString );
+ sal_uInt16 FindCurrencyFormat(const NfCurrencyEntry* pTmpCurrencyEntry,bool bTmpBanking);
+ void SetCurCurrencyEntry(NfCurrencyEntry*);
+ short GetListPos4Entry( sal_uInt32 nIdx, std::u16string_view rFmtString );
+
+ void GetCurrencySymbols(std::vector<OUString>& rList, sal_uInt16* pPos );
+
+ sal_uInt16 FindCurrencyTableEntry( const OUString& rFmtString, bool &bTestBanking );
+ bool IsInTable(sal_uInt16 nPos, bool bTmpBanking,
+ std::u16string_view rFmtString) const;
+
+ void SetUseStarFormat( bool bUse ) { bUseStarFormat = bUse; }
+private:
+ SvNumberFormatter* pFormatter;
+ SvNumberFormatTable* pCurFmtTable;
+ SvxNumberValueType eValType;
+ OUString aValStr;
+ double nValNum;
+ bool bUndoAddList;
+ std::vector<sal_uInt32> aAddList;
+ std::vector<sal_uInt32> aDelList;
+ std::vector<sal_uInt32> aCurEntryList;
+ sal_uInt32 nCurFormatKey;
+ SvNumFormatType nCurCategory;
+ LanguageType eCurLanguage;
+ std::vector<sal_uInt16> aCurCurrencyList;
+ NfCurrencyEntry* pCurCurrencyEntry;
+ bool bBankingSymbol;
+ sal_uInt32 nCurCurrencyEntryPos;
+ std::vector<OUString> aCurrencyFormatList;
+ bool bUseStarFormat;
+ bool bIsDefaultValNum;
+
+ SVX_DLLPRIVATE short FillEntryList_Impl( std::vector<OUString>& rList );
+ SVX_DLLPRIVATE void FillEListWithStd_Impl( std::vector<OUString>& rList, SvNumFormatType eCategory, short &Pos,
+ bool bSuppressDuplicates = false );
+ SVX_DLLPRIVATE short FillEListWithFormats_Impl( std::vector<OUString>& rList,short nSelPos,
+ NfIndexTableOffset eOffsetStart,
+ NfIndexTableOffset eOffsetEnd,
+ bool bSuppressDuplicates );
+ SVX_DLLPRIVATE short FillEListWithDateTime_Impl( std::vector<OUString>& rList,short nSelPos,
+ bool bSuppressDuplicates );
+ SVX_DLLPRIVATE void FillEListWithOneFormat_Impl( std::vector<OUString>& rList, short & nSelPos,
+ bool bSuppressDuplicates, NfIndexTableOffset nOffset,
+ bool bSuppressIsoDateTime );
+ SVX_DLLPRIVATE short FillEListWithCurrency_Impl( std::vector<OUString>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithSysCurrencys( std::vector<OUString>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithUserCurrencys( std::vector<OUString>& rList,short nSelPos);
+ SVX_DLLPRIVATE short FillEListWithUsD_Impl( std::vector<OUString>& rList, SvNumFormatType eCategory, short Pos );
+
+ SVX_DLLPRIVATE bool IsEssentialFormat_Impl( SvNumFormatType eType, sal_uInt32 nKey );
+
+ SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetRemoved_Impl( size_t nKey );
+ SVX_DLLPRIVATE bool IsRemoved_Impl( size_t nKey );
+ SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetAdded_Impl( size_t nKey );
+
+ SVX_DLLPRIVATE void GetPreviewString_Impl( OUString& rString,
+ const Color*& rpColor );
+ SVX_DLLPRIVATE static void PosToCategory_Impl(sal_uInt16 nPos, SvNumFormatType& rCategory);
+ SVX_DLLPRIVATE static void CategoryToPos_Impl(SvNumFormatType nCategory, sal_uInt16& rPos);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/numinf.hxx b/include/svx/numinf.hxx
new file mode 100644
index 000000000..4d4b07478
--- /dev/null
+++ b/include/svx/numinf.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_NUMINF_HXX
+#define INCLUDED_SVX_NUMINF_HXX
+
+#include <svl/poolitem.hxx>
+#include <svx/numfmtsh.hxx>
+#include <svx/svxdllapi.h>
+
+/** This item is used as a transport medium for a number formatter
+ */
+
+class SVX_DLLPUBLIC SvxNumberInfoItem final : public SfxPoolItem
+{
+public:
+
+ SvxNumberInfoItem( const TypedWhichId<SvxNumberInfoItem> nId );
+ SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
+ const TypedWhichId<SvxNumberInfoItem> nId );
+ SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const OUString& rVal,
+ const TypedWhichId<SvxNumberInfoItem> nId );
+ SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal,
+ const TypedWhichId<SvxNumberInfoItem> nId );
+ // if both double and String are supplied, String is used for text formats
+ SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal,
+ const OUString& rValueStr, const TypedWhichId<SvxNumberInfoItem> nId );
+ SvxNumberInfoItem( const SvxNumberInfoItem& );
+ virtual ~SvxNumberInfoItem() override;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxNumberInfoItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ SvNumberFormatter* GetNumberFormatter() const { return pFormatter; }
+ const OUString& GetValueString() const { return aStringVal; }
+ double GetValueDouble() const { return nDoubleVal; }
+
+ const std::vector<sal_uInt32> & GetDelFormats() const { return mvDelFormats; }
+ void SetDelFormats( std::vector<sal_uInt32> && );
+
+ SvxNumberValueType GetValueType() const { return eValueType; }
+
+private:
+ SvNumberFormatter* pFormatter;
+ SvxNumberValueType eValueType;
+ OUString aStringVal;
+ double nDoubleVal;
+
+ std::vector<sal_uInt32> mvDelFormats;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
new file mode 100644
index 000000000..059d6b7bc
--- /dev/null
+++ b/include/svx/numvset.hxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_NUMVSET_HXX
+#define INCLUDED_SVX_NUMVSET_HXX
+
+#include <vcl/idle.hxx>
+#include <svtools/valueset.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/lang/Locale.hpp>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star {
+ namespace container{
+ class XIndexAccess;
+ }
+ namespace beans{
+ struct PropertyValue;
+ }
+ namespace text{
+ class XNumberingFormatter;
+ }
+}
+
+enum class NumberingPageType
+{
+ BULLET,
+ SINGLENUM,
+ OUTLINE,
+ BITMAP
+};
+
+class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
+{
+ NumberingPageType ePageType;
+ tools::Rectangle aOrgRect;
+ VclPtr<VirtualDevice> pVDev;
+
+ css::uno::Reference<css::text::XNumberingFormatter> xFormatter;
+ css::lang::Locale aLocale;
+
+ css::uno::Sequence<
+ css::uno::Sequence<
+ css::beans::PropertyValue> > aNumSettings;
+
+ css::uno::Sequence<
+ css::uno::Reference<
+ css::container::XIndexAccess> > aOutlineSettings;
+
+public:
+ SvxNumValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow);
+ void init(NumberingPageType eType);
+ virtual ~SvxNumValueSet() override;
+
+ virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
+
+ void SetNumberingSettings(
+ const css::uno::Sequence<
+ css::uno::Sequence<css::beans::PropertyValue> >& aNum,
+ css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter,
+ const css::lang::Locale& rLocale );
+
+ void SetOutlineNumberingSettings(
+ css::uno::Sequence<
+ css::uno::Reference<css::container::XIndexAccess> > const & rOutline,
+ css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter,
+ const css::lang::Locale& rLocale);
+
+ virtual FactoryFunction GetUITestFactory() const override;
+
+};
+
+
+class SVX_DLLPUBLIC SvxBmpNumValueSet final : public SvxNumValueSet
+{
+ Idle aFormatIdle;
+ bool bGrfNotFound;
+
+ DECL_DLLPRIVATE_LINK(FormatHdl_Impl, Timer *, void);
+
+public:
+ SvxBmpNumValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow);
+ void init();
+ virtual ~SvxBmpNumValueSet() override;
+
+ virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
new file mode 100644
index 000000000..29feec983
--- /dev/null
+++ b/include/svx/obj3d.hxx
@@ -0,0 +1,188 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_OBJ3D_HXX
+#define INCLUDED_SVX_OBJ3D_HXX
+
+#include <svx/svdoattr.hxx>
+#include <svx/svdobj.hxx>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/range/b3drange.hxx>
+#include <basegfx/polygon/b3dpolypolygon.hxx>
+#include <svx/svxdllapi.h>
+
+// Forward declarations
+class E3dScene;
+
+namespace sdr::properties {
+ class BaseProperties;
+ class E3dCompoundProperties;
+ class E3dExtrudeProperties;
+ class E3dLatheProperties;
+ class E3dSphereProperties;
+}
+
+/*************************************************************************
+|*
+|* GeoData relevant for undo actions
+|*
+\************************************************************************/
+
+class E3DObjGeoData : public SdrObjGeoData
+{
+public:
+ basegfx::B3DRange maLocalBoundVol; // surrounding volume of the object
+ basegfx::B3DHomMatrix maTransformation; // local transformations
+
+ E3DObjGeoData() {}
+};
+
+/*************************************************************************
+|*
+|* Base class for 3D objects
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC E3dObject : public SdrAttrObj
+{
+private:
+ // Allow everything for E3dObjList and E3dDragMethod
+ friend class E3dDragMethod;
+
+ protected:
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ basegfx::B3DRange maLocalBoundVol; // surrounding volume of the object (from the geometry generation)
+ basegfx::B3DHomMatrix maTransformation; // local transformation
+ basegfx::B3DHomMatrix maFullTransform; // global transformation (including. parents)
+
+ // Flags
+ bool mbTfHasChanged : 1;
+ bool mbIsSelected : 1;
+
+protected:
+ virtual basegfx::B3DRange RecalcBoundVolume() const;
+
+ // E3dObject is only a helper class (for E3DScene and E3DCompoundObject)
+ // and no instances should be created from anyone, so i move the constructors
+ // to protected area
+ E3dObject(SdrModel& rSdrModel);
+ E3dObject(SdrModel& rSdrModel, E3dObject const & rSource);
+
+ // protected destructor
+ virtual ~E3dObject() override;
+
+public:
+ virtual void StructureChanged();
+ virtual void SetTransformChanged();
+ virtual void RecalcSnapRect() override;
+
+ virtual SdrInventor GetObjInventor() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual void NbcMove(const Size& rSize) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+
+ E3dScene* getParentE3dSceneFromE3dObject() const;
+ virtual E3dScene* getRootE3dSceneFromE3dObject() const;
+
+ const basegfx::B3DRange& GetBoundVolume() const;
+ void InvalidateBoundVolume();
+
+ // calculate complete transformation including all parents
+ const basegfx::B3DHomMatrix& GetFullTransform() const;
+
+ // get and (re)set transformation matrix
+ const basegfx::B3DHomMatrix& GetTransform() const { return maTransformation;}
+ virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix);
+ virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix);
+
+ // 2D rotations, are implemented as a rotation around the Z axis
+ // which is vertical to the screen, plus a shift of the scene.
+ // This means that also the scene (E3dScene) must define this
+ // routine as virtual in its class.
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+
+ // get wireframe polygon for local object. No transform is applied.
+ basegfx::B3DPolyPolygon CreateWireframe() const;
+
+ // TakeObjName...() is for the display in the UI, for example "3 frames selected".
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+ virtual E3dObject* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ // get/set the selection
+ bool GetSelected() const { return mbIsSelected; }
+ virtual void SetSelected(bool bNew);
+
+ // break up
+ virtual bool IsBreakObjPossible();
+ virtual std::unique_ptr<SdrAttrObj,SdrObjectFreeOp> GetBreakObj();
+};
+
+/*************************************************************************
+|*
+|* Class for all compound objects (Cube, Lathe, Scene, Extrude)
+|* This class saves some ISA queries and accelerates the behaviour
+|* significantly, because all the attributes etc. are kept through this.
+|* The polygons may only keep attributes if they are directly
+|* subordinated to the scene.
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC E3dCompoundObject : public E3dObject
+{
+private:
+ // to allow sdr::properties::E3dCompoundProperties access to SetGeometryValid()
+ friend class sdr::properties::E3dCompoundProperties;
+ friend class sdr::properties::E3dExtrudeProperties;
+ friend class sdr::properties::E3dLatheProperties;
+ friend class sdr::properties::E3dSphereProperties;
+
+protected:
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+protected:
+ // convert given basegfx::B3DPolyPolygon to screen coor
+ basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate) const;
+
+ // protected destructor
+ virtual ~E3dCompoundObject() override;
+
+public:
+ E3dCompoundObject(SdrModel& rSdrModel, E3dCompoundObject const & rSource);
+ E3dCompoundObject(SdrModel& rSdrModel);
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void RecalcSnapRect() override;
+
+ virtual E3dCompoundObject* CloneSdrObject(SdrModel& rTargetModel) const override;
+};
+
+#endif // INCLUDED_SVX_OBJ3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/objfac3d.hxx b/include/svx/objfac3d.hxx
new file mode 100644
index 000000000..24b14de5a
--- /dev/null
+++ b/include/svx/objfac3d.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_OBJFAC3D_HXX
+#define INCLUDED_SVX_OBJFAC3D_HXX
+
+#include <svx/svxdllapi.h>
+#include <tools/link.hxx>
+
+/*************************************************************************
+|*
+|* Factory for chart-specific objects
+|*
+\************************************************************************/
+
+class SdrObject;
+struct SdrObjCreatorParams;
+
+class SVXCORE_DLLPUBLIC E3dObjFactory
+{
+public:
+ E3dObjFactory();
+
+ DECL_DLLPRIVATE_STATIC_LINK(E3dObjFactory, MakeObject, SdrObjCreatorParams, SdrObject*);
+};
+
+#endif // INCLUDED_SVX_OBJFAC3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ofaitem.hxx b/include/svx/ofaitem.hxx
new file mode 100644
index 000000000..5e9e52b92
--- /dev/null
+++ b/include/svx/ofaitem.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_OFAITEM_HXX
+#define INCLUDED_SVX_OFAITEM_HXX
+
+#include <svl/poolitem.hxx>
+#include <rtl/ref.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC OfaPtrItem final : public SfxPoolItem
+{
+private:
+ void* pPtr;
+
+public:
+ OfaPtrItem( sal_uInt16 nWhich, void *pPtr );
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual OfaPtrItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ void* GetValue() const { return pPtr; }
+};
+
+class XColorList;
+class SVX_DLLPUBLIC OfaXColorListItem final : public SfxPoolItem
+{
+ private:
+ rtl::Reference<XColorList> mxRef;
+public:
+ OfaXColorListItem( sal_uInt16 _nWhich, const rtl::Reference<XColorList> &xRef );
+
+ virtual bool operator==( const SfxPoolItem& rItem ) const override;
+
+ virtual OfaXColorListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/optgenrl.hxx b/include/svx/optgenrl.hxx
new file mode 100644
index 000000000..2ee463d9d
--- /dev/null
+++ b/include/svx/optgenrl.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_OPTGENRL_HXX
+#define INCLUDED_SVX_OPTGENRL_HXX
+
+// Defines for setting the focus of an Edit via a slot from external.
+enum class EditPosition
+{
+ UNKNOWN = 0,
+ COMPANY = 1,
+ FIRSTNAME = 2,
+ LASTNAME = 3,
+ STREET = 4,
+ COUNTRY = 5,
+ PLZ = 6,
+ CITY = 7,
+ STATE = 8,
+ TITLE = 9,
+ POSITION = 10,
+ SHORTNAME = 11,
+ TELPRIV = 12,
+ TELCOMPANY = 13,
+ FAX = 14,
+ EMAIL = 15,
+};
+
+#endif // INCLUDED_SVX_OPTGENRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
new file mode 100644
index 000000000..97ec7a228
--- /dev/null
+++ b/include/svx/optgrid.hxx
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_OPTGRID_HXX
+#define INCLUDED_SVX_OPTGRID_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/svxdllapi.h>
+
+namespace weld { class CheckButton; }
+namespace weld { class MetricSpinButton; }
+namespace weld { class SpinButton; }
+namespace weld { class ToggleButton; }
+namespace weld { class Widget; }
+
+class SVX_DLLPUBLIC SvxOptionsGrid
+{
+protected:
+ sal_uInt32 nFldDrawX;
+ sal_uInt32 nFldDivisionX;
+ sal_uInt32 nFldDrawY;
+ sal_uInt32 nFldDivisionY;
+ sal_uInt32 nFldSnapX;
+ sal_uInt32 nFldSnapY;
+ bool bUseGridsnap:1;
+ bool bSynchronize:1;
+ bool bGridVisible:1;
+ bool bEqualGrid: 1;
+
+public:
+ SvxOptionsGrid();
+
+ void SetFieldDrawX( sal_uInt32 nSet){nFldDrawX = nSet;}
+ void SetFieldDivisionX(sal_uInt32 nSet){nFldDivisionX = nSet;}
+ void SetFieldDrawY ( sal_uInt32 nSet){nFldDrawY = nSet;}
+ void SetFieldDivisionY(sal_uInt32 nSet){nFldDivisionY = nSet;}
+ void SetFieldSnapX( sal_uInt32 nSet){nFldSnapX = nSet;}
+ void SetFieldSnapY ( sal_uInt32 nSet){nFldSnapY = nSet;}
+ void SetUseGridSnap( bool bSet ) {bUseGridsnap = bSet;}
+ void SetSynchronize( bool bSet ) {bSynchronize = bSet;}
+ void SetGridVisible( bool bSet ) {bGridVisible = bSet;}
+ void SetEqualGrid( bool bSet ) {bEqualGrid = bSet;}
+
+ sal_uInt32 GetFieldDrawX( ) const { return nFldDrawX; }
+ sal_uInt32 GetFieldDivisionX() const { return nFldDivisionX;}
+ sal_uInt32 GetFieldDrawY ( ) const { return nFldDrawY; }
+ sal_uInt32 GetFieldDivisionY() const { return nFldDivisionY;}
+ sal_uInt32 GetFieldSnapX( ) const { return nFldSnapX; }
+ sal_uInt32 GetFieldSnapY ( ) const { return nFldSnapY; }
+ bool GetUseGridSnap( ) const { return bUseGridsnap; }
+ bool GetSynchronize( ) const { return bSynchronize; }
+ bool GetGridVisible( ) const { return bGridVisible; }
+ bool GetEqualGrid() const { return bEqualGrid; }
+};
+
+class SVX_DLLPUBLIC SvxGridItem : public SvxOptionsGrid, public SfxPoolItem
+{
+ // #i9076#
+ friend class SvxGridTabPage;
+
+public:
+ SvxGridItem( TypedWhichId<SvxGridItem> _nWhich) : SfxPoolItem(_nWhich){};
+
+ virtual SvxGridItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool operator==( const SfxPoolItem& ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+};
+
+class SVX_DLLPUBLIC SvxGridTabPage : public SfxTabPage
+{
+public:
+ SvxGridTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
+ virtual ~SvxGridTabPage() override;
+
+ static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet);
+
+ virtual bool FillItemSet( SfxItemSet* rSet ) override;
+ virtual void Reset( const SfxItemSet* rSet ) override;
+
+ virtual void ActivatePage( const SfxItemSet& rSet ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+
+private:
+ bool bAttrModified;
+
+ std::unique_ptr<weld::CheckButton> m_xCbxUseGridsnap;
+ std::unique_ptr<weld::CheckButton> m_xCbxGridVisible;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldDrawX;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldDrawY;
+ std::unique_ptr<weld::SpinButton> m_xNumFldDivisionX;
+ std::unique_ptr<weld::SpinButton> m_xNumFldDivisionY;
+ std::unique_ptr<weld::CheckButton> m_xCbxSynchronize;
+protected:
+ //these controls are used in draw and impress
+ std::unique_ptr<weld::Widget> m_xSnapFrames;
+ std::unique_ptr<weld::CheckButton> m_xCbxSnapHelplines;
+ std::unique_ptr<weld::CheckButton> m_xCbxSnapBorder;
+ std::unique_ptr<weld::CheckButton> m_xCbxSnapFrame;
+ std::unique_ptr<weld::CheckButton> m_xCbxSnapPoints;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldSnapArea;
+ std::unique_ptr<weld::CheckButton> m_xCbxOrtho;
+ std::unique_ptr<weld::CheckButton> m_xCbxBigOrtho;
+ std::unique_ptr<weld::CheckButton> m_xCbxRotate;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldAngle;
+ std::unique_ptr<weld::MetricSpinButton> m_xMtrFldBezAngle;
+
+ DECL_LINK(ClickRotateHdl_Impl, weld::Toggleable&, void);
+private:
+ DECL_DLLPRIVATE_LINK(ChangeDrawHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_DLLPRIVATE_LINK(ChangeGridsnapHdl_Impl, weld::Toggleable&, void);
+ DECL_DLLPRIVATE_LINK(ChangeDivisionHdl_Impl, weld::SpinButton&, void);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
new file mode 100644
index 000000000..07186afdd
--- /dev/null
+++ b/include/svx/pagectrl.hxx
@@ -0,0 +1,153 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PAGECTRL_HXX
+#define INCLUDED_SVX_PAGECTRL_HXX
+
+#include <vcl/customweld.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
+
+enum class SvxPageUsage;
+enum class SvxFrameDirection;
+
+class SVX_DLLPUBLIC SvxPageWindow : public weld::CustomWidgetController
+{
+private:
+ Size aWinSize;
+ Size aSize;
+
+ tools::Long nTop;
+ tools::Long nBottom;
+ tools::Long nLeft;
+ tools::Long nRight;
+
+ bool bResetBackground;
+ bool bFrameDirection;
+ SvxFrameDirection nFrameDirection;
+
+ tools::Long nHdLeft;
+ tools::Long nHdRight;
+ tools::Long nHdDist;
+ tools::Long nHdHeight;
+
+ tools::Long nFtLeft;
+ tools::Long nFtRight;
+ tools::Long nFtDist;
+ tools::Long nFtHeight;
+
+ drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes;
+ drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes;
+ drawinglayer::attribute::SdrAllFillAttributesHelperPtr maPageFillAttributes;
+
+ bool bFooter : 1;
+ bool bHeader : 1;
+ bool bTable : 1;
+ bool bHorz : 1;
+ bool bVert : 1;
+
+ SvxPageUsage eUsage;
+
+protected:
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+
+ virtual void DrawPage(vcl::RenderContext& rRenderContext, const Point& rPoint,
+ const bool bSecond, const bool bEnabled);
+
+ static void drawFillAttributes(vcl::RenderContext& rRenderContext,
+ const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
+ const tools::Rectangle& rPaintRange, const tools::Rectangle& rDefineRange);
+
+public:
+ SvxPageWindow();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~SvxPageWindow() override;
+
+ void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
+ {
+ maHeaderFillAttributes = rFillAttributes;
+ }
+ void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
+ {
+ maFooterFillAttributes = rFillAttributes;
+ }
+ void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes)
+ {
+ maPageFillAttributes = rFillAttributes;
+ }
+ const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const
+ {
+ return maPageFillAttributes;
+ }
+ void SetSize(const Size& rSize)
+ {
+ aSize = rSize;
+ }
+ const Size& GetSize() const
+ {
+ return aSize;
+ }
+
+ void SetTop(tools::Long nNew) { nTop = nNew; }
+ void SetBottom(tools::Long nNew) { nBottom = nNew; }
+ void SetLeft(tools::Long nNew) { nLeft = nNew; }
+ void SetRight(tools::Long nNew) { nRight = nNew; }
+
+ tools::Long GetTop() const { return nTop; }
+ tools::Long GetBottom() const { return nBottom; }
+ tools::Long GetLeft() const { return nLeft; }
+ tools::Long GetRight() const { return nRight; }
+
+ void SetHdLeft(tools::Long nNew) { nHdLeft = nNew; }
+ void SetHdRight(tools::Long nNew) { nHdRight = nNew; }
+ void SetHdDist(tools::Long nNew) { nHdDist = nNew; }
+ void SetHdHeight(tools::Long nNew) { nHdHeight = nNew; }
+
+ tools::Long GetHdLeft() const { return nHdLeft; }
+ tools::Long GetHdRight() const { return nHdRight; }
+ tools::Long GetHdDist() const { return nHdDist; }
+ tools::Long GetHdHeight() const { return nHdHeight; }
+
+ void SetFtLeft(tools::Long nNew) { nFtLeft = nNew; }
+ void SetFtRight(tools::Long nNew) { nFtRight = nNew; }
+ void SetFtDist(tools::Long nNew) { nFtDist = nNew; }
+ void SetFtHeight(tools::Long nNew) { nFtHeight = nNew; }
+
+ tools::Long GetFtLeft() const { return nFtLeft; }
+ tools::Long GetFtRight() const { return nFtRight; }
+ tools::Long GetFtDist() const { return nFtDist; }
+ tools::Long GetFtHeight() const { return nFtHeight; }
+
+ void SetUsage(SvxPageUsage eU) { eUsage = eU; }
+ SvxPageUsage GetUsage() const { return eUsage; }
+
+ void SetHeader( bool bNew ) { bHeader = bNew; }
+ void SetFooter( bool bNew ) { bFooter = bNew; }
+ void SetTable( bool bNew ) { bTable = bNew; }
+ void SetHorz( bool bNew ) { bHorz = bNew; }
+ void SetVert( bool bNew ) { bVert = bNew; }
+
+ void EnableFrameDirection(bool bEnable);
+ void SetFrameDirection(SvxFrameDirection nDirection);
+
+ void ResetBackground();
+};
+
+#endif // INCLUDED_SVX_PAGECTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/pageitem.hxx b/include/svx/pageitem.hxx
new file mode 100644
index 000000000..32702fe80
--- /dev/null
+++ b/include/svx/pageitem.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PAGEITEM_HXX
+#define INCLUDED_SVX_PAGEITEM_HXX
+
+#include <sal/config.h>
+
+#include <svl/setitem.hxx>
+#include <svx/svxdllapi.h>
+#include <editeng/svxenum.hxx>
+
+/*--------------------------------------------------------------------
+ usage of the page
+ --------------------------------------------------------------------*/
+
+enum class SvxPageUsage
+{
+ NONE = 0,
+ Left = 1,
+ Right = 2,
+ All = 3,
+ Mirror = 7
+};
+
+/*--------------------------------------------------------------------
+ parts of the page description
+ --------------------------------------------------------------------*/
+
+/*
+This item describes a page attribute (name of the template, enumeration,
+portrait or landscape, layout)
+*/
+
+class SVX_DLLPUBLIC SvxPageItem final : public SfxPoolItem
+{
+private:
+ OUString aDescName; // name of the template
+ SvxNumType eNumType;
+ bool bLandscape; // Portrait / Landscape
+ SvxPageUsage eUse; // Layout
+
+public:
+
+ static SfxPoolItem* CreateDefault();
+ SvxPageItem( const TypedWhichId<SvxPageItem> nId );
+ SvxPageItem( const SvxPageItem& rItem );
+
+ virtual ~SvxPageItem() override;
+
+ virtual SvxPageItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool operator==( const SfxPoolItem& ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ // orientation
+ SvxPageUsage GetPageUsage() const { return eUse; }
+ void SetPageUsage(SvxPageUsage eU) { eUse= eU; }
+
+ bool IsLandscape() const { return bLandscape; }
+ void SetLandscape(bool bL) { bLandscape = bL; }
+
+ // enumeration
+ SvxNumType GetNumType() const { return eNumType; }
+ void SetNumType(SvxNumType eNum) { eNumType = eNum; }
+
+ // name of the descriptor
+ void SetDescName(const OUString& rStr) { aDescName = rStr; }
+};
+
+
+/*--------------------------------------------------------------------
+ container for header/footer attributes
+ --------------------------------------------------------------------*/
+
+class SVX_DLLPUBLIC SvxSetItem final : public SfxSetItem
+{
+public:
+ SvxSetItem( const TypedWhichId<SvxSetItem> nId, const SfxItemSet& rSet );
+ SvxSetItem( const SvxSetItem& rItem );
+ SvxSetItem( const TypedWhichId<SvxSetItem> nId, SfxItemSet&& pSet );
+
+ virtual SvxSetItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/pagenumberlistbox.hxx b/include/svx/pagenumberlistbox.hxx
new file mode 100644
index 000000000..9885d9822
--- /dev/null
+++ b/include/svx/pagenumberlistbox.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_PAGENUMBERINGHELPER_HXX
+#define INCLUDED_SVX_PAGENUMBERINGHELPER_HXX
+
+#include <editeng/svxenum.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/weld.hxx>
+
+class SVXCORE_DLLPUBLIC SvxPageNumberListBox
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+public:
+ SvxPageNumberListBox(std::unique_ptr<weld::ComboBox> pControl);
+ SvxNumType get_active_id() const { return static_cast<SvxNumType>(m_xControl->get_active_id().toInt32()); }
+ void set_active_id(SvxNumType eId) const { m_xControl->set_active_id(OUString::number(static_cast<sal_Int32>(eId))); }
+ void save_value() { m_xControl->save_value(); }
+ bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); }
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
+ weld::ComboBox& get_widget() const { return *m_xControl; }
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/papersizelistbox.hxx b/include/svx/papersizelistbox.hxx
new file mode 100644
index 000000000..589dccda3
--- /dev/null
+++ b/include/svx/papersizelistbox.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_PAGESIZEHELPER_HXX
+#define INCLUDED_SVX_PAGESIZEHELPER_HXX
+
+#include <i18nutil/paper.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/weld.hxx>
+
+enum class PaperSizeApp
+{
+ Std,
+ Draw
+};
+
+class SVXCORE_DLLPUBLIC SvxPaperSizeListBox
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+public:
+ SvxPaperSizeListBox(std::unique_ptr<weld::ComboBox> pControl);
+
+ void FillPaperSizeEntries(PaperSizeApp eApp);
+ void set_active_id(Paper eSize);
+ Paper get_active_id() const;
+
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink)
+ {
+ m_xControl->connect_changed(rLink);
+ }
+ int get_active() const { return m_xControl->get_active(); }
+ void clear() { m_xControl->clear(); }
+ void save_value() { return m_xControl->save_value(); }
+ bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); }
+
+ weld::ComboBox& get_widget() const { return *m_xControl; }
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/paraprev.hxx b/include/svx/paraprev.hxx
new file mode 100644
index 000000000..bb6607318
--- /dev/null
+++ b/include/svx/paraprev.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PARAPREV_HXX
+#define INCLUDED_SVX_PARAPREV_HXX
+
+#include <vcl/customweld.hxx>
+#include <editeng/svxenum.hxx>
+#include <svx/svxdllapi.h>
+
+enum class SvxPrevLineSpace
+{
+ N1 = 0,
+ N115,
+ N15,
+ N2,
+ Prop,
+ Min,
+ Leading
+};
+
+class SVX_DLLPUBLIC SvxParaPrevWindow final : public weld::CustomWidgetController
+{
+ Size aSize;
+
+ // indentation
+ tools::Long nLeftMargin;
+ tools::Long nRightMargin;
+ short nFirstLineOffset;
+ // distances
+ sal_uInt16 nUpper;
+ sal_uInt16 nLower;
+ // adjustment
+ SvxAdjust eAdjust;
+ // last line in justification
+ SvxAdjust eLastLine;
+ // line distance
+ SvxPrevLineSpace eLine;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ void DrawParagraph(vcl::RenderContext& rRenderContext);
+
+public:
+ SvxParaPrevWindow();
+
+ void SetFirstLineOffset( short nNew )
+ {
+ nFirstLineOffset = nNew;
+ }
+ void SetLeftMargin( tools::Long nNew )
+ {
+ nLeftMargin = nNew;
+ }
+ void SetRightMargin( tools::Long nNew )
+ {
+ nRightMargin = nNew;
+ }
+ void SetUpper( sal_uInt16 nNew )
+ {
+ nUpper = nNew;
+ }
+ void SetLower( sal_uInt16 nNew )
+ {
+ nLower = nNew;
+ }
+ void SetAdjust( SvxAdjust eNew )
+ {
+ eAdjust = eNew;
+ }
+ void SetLastLine( SvxAdjust eNew )
+ {
+ eLastLine = eNew;
+ }
+ void SetLineSpace( SvxPrevLineSpace eNew )
+ {
+ eLine = eNew;
+ }
+ void SetSize( Size aNew )
+ {
+ aSize = aNew;
+ }
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx
new file mode 100644
index 000000000..c6342df0d
--- /dev/null
+++ b/include/svx/passwd.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PASSWD_HXX
+#define INCLUDED_SVX_PASSWD_HXX
+
+#include <config_options.h>
+#include <sfx2/basedlgs.hxx>
+#include <svx/svxdllapi.h>
+
+class UNLESS_MERGELIBS(SVX_DLLPUBLIC) SvxPasswordDialog final : public SfxDialogController
+{
+private:
+ OUString m_aOldPasswdErrStr;
+ OUString m_aRepeatPasswdErrStr;
+ Link<SvxPasswordDialog*,bool> m_aCheckPasswordHdl;
+
+ std::unique_ptr<weld::Label> m_xOldFL;
+ std::unique_ptr<weld::Label> m_xOldPasswdFT;
+ std::unique_ptr<weld::Entry> m_xOldPasswdED;
+ std::unique_ptr<weld::Entry> m_xNewPasswdED;
+ std::unique_ptr<weld::Entry> m_xRepeatPasswdED;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+
+ DECL_DLLPRIVATE_LINK(ButtonHdl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(EditModifyHdl, weld::Entry&, void);
+
+public:
+ SvxPasswordDialog(weld::Window* pParent, bool bDisableOldPassword);
+ virtual ~SvxPasswordDialog() override;
+
+ OUString GetOldPassword() const { return m_xOldPasswdED->get_text(); }
+ OUString GetNewPassword() const { return m_xNewPasswdED->get_text(); }
+
+ void SetCheckPasswordHdl( const Link<SvxPasswordDialog*,bool>& rLink ) { m_aCheckPasswordHdl = rLink; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/polypolygoneditor.hxx b/include/svx/polypolygoneditor.hxx
new file mode 100644
index 000000000..57110b414
--- /dev/null
+++ b/include/svx/polypolygoneditor.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_POLYPOLYGONEDITOR_HXX
+#define INCLUDED_SVX_POLYPOLYGONEDITOR_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <svx/ipolypolygoneditorcontroller.hxx>
+
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <o3tl/sorted_vector.hxx>
+
+namespace sdr
+{
+
+/** this class implements some helper functions to edit a B2DPolyPolygon */
+class SVXCORE_DLLPUBLIC PolyPolygonEditor
+{
+public:
+ PolyPolygonEditor( const basegfx::B2DPolyPolygon& rPolyPolygon);
+
+ const basegfx::B2DPolyPolygon& GetPolyPolygon() const { return maPolyPolygon; }
+
+ /** returns true if the B2DPolyPolygon was changed.
+ Warning: B2DPolyPolygon can be empty after this operation!
+ */
+ bool DeletePoints( const o3tl::sorted_vector< sal_uInt16 >& rAbsPoints );
+
+ /** returns true if the B2DPolyPolygon was changed.
+ */
+ bool SetSegmentsKind(SdrPathSegmentKind eKind, const o3tl::sorted_vector< sal_uInt16 >& rAbsPoints);
+
+ /** returns true if the B2DPolyPolygon was changed.
+ */
+ bool SetPointsSmooth( basegfx::B2VectorContinuity eFlags, const o3tl::sorted_vector< sal_uInt16 >& rAbsPoints);
+
+ /** Outputs the relative position ( polygon number and point number in that polygon ) from the absolute point number.
+ False is returned if the given absolute point is greater not inside this B2DPolyPolygon
+ */
+ static bool GetRelativePolyPoint( const basegfx::B2DPolyPolygon& rPoly, sal_uInt32 nAbsPnt, sal_uInt32& rPolyNum, sal_uInt32& rPointNum );
+
+private:
+ basegfx::B2DPolyPolygon maPolyPolygon;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/postattr.hxx b/include/svx/postattr.hxx
new file mode 100644
index 000000000..af980a3e5
--- /dev/null
+++ b/include/svx/postattr.hxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_POSTATTR_HXX
+#define INCLUDED_SVX_POSTATTR_HXX
+
+#include <svl/stritem.hxx>
+#include <svx/svxdllapi.h>
+
+/** The author shorthand symbol of a note
+ */
+
+class SVX_DLLPUBLIC SvxPostItAuthorItem final : public SfxStringItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxPostItAuthorItem( TypedWhichId<SvxPostItAuthorItem> nWhich );
+
+ SvxPostItAuthorItem( const OUString& rAuthor, TypedWhichId<SvxPostItAuthorItem> nWhich );
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual SvxPostItAuthorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+};
+
+
+/** The date of a note
+ */
+
+class SVX_DLLPUBLIC SvxPostItDateItem final : public SfxStringItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxPostItDateItem( TypedWhichId<SvxPostItDateItem> nWhich );
+
+ SvxPostItDateItem( const OUString& rDate, TypedWhichId<SvxPostItDateItem> nWhich );
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual SvxPostItDateItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+};
+
+/** The text of a note
+ */
+
+class SVX_DLLPUBLIC SvxPostItTextItem final : public SfxStringItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxPostItTextItem( TypedWhichId<SvxPostItTextItem> nWhich );
+
+ SvxPostItTextItem( const OUString& rText, TypedWhichId<SvxPostItTextItem> nWhich );
+ // "pure virtual methods" from SfxPoolItem
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual SvxPostItTextItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+};
+
+
+/** The internal id of a note
+ */
+
+class SVX_DLLPUBLIC SvxPostItIdItem final : public SfxStringItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxPostItIdItem( TypedWhichId<SvxPostItIdItem> nWhich );
+
+ virtual SvxPostItIdItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/pszctrl.hxx b/include/svx/pszctrl.hxx
new file mode 100644
index 000000000..e22b18096
--- /dev/null
+++ b/include/svx/pszctrl.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_PSZCTRL_HXX
+#define INCLUDED_SVX_PSZCTRL_HXX
+
+#include <memory>
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+
+struct SvxPosSizeStatusBarControl_Impl;
+
+class SVX_DLLPUBLIC SvxPosSizeStatusBarControl final : public SfxStatusBarControl
+{
+private:
+ std::unique_ptr<SvxPosSizeStatusBarControl_Impl> pImpl;
+ SVX_DLLPRIVATE OUString GetMetricStr_Impl( tools::Long nVal ) const;
+public:
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxPosSizeStatusBarControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
+ virtual ~SvxPosSizeStatusBarControl() override;
+
+ virtual void StateChangedAtStatusBarControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual void Paint( const UserDrawEvent& rEvt ) override;
+ virtual void Command( const CommandEvent& rCEvt ) override;
+private:
+ void ImplUpdateItemText();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/rectenum.hxx b/include/svx/rectenum.hxx
new file mode 100644
index 000000000..5a67dfbbb
--- /dev/null
+++ b/include/svx/rectenum.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_RECTENUM_HXX
+#define INCLUDED_SVX_RECTENUM_HXX
+
+enum class RectPoint
+{
+ LT, // top left
+ MT, // top center
+ RT, // top right
+ LM, // left center
+ MM, // center
+ RM, // right center
+ LB, // bottom left
+ MB, // bottom center
+ RB // bottom right
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/relfld.hxx b/include/svx/relfld.hxx
new file mode 100644
index 000000000..8bc4c0558
--- /dev/null
+++ b/include/svx/relfld.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_RELFLD_HXX
+#define INCLUDED_SVX_RELFLD_HXX
+
+#include <tools/fldunit.hxx>
+#include <svtools/unitconv.hxx>
+#include <vcl/weld.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxRelativeField
+{
+private:
+ std::unique_ptr<weld::MetricSpinButton> m_xSpinButton;
+
+ sal_uInt16 nRelMin;
+ sal_uInt16 nRelMax;
+ bool bRelativeMode;
+ bool bRelative;
+ bool bNegativeEnabled;
+
+ DECL_DLLPRIVATE_LINK(ModifyHdl, weld::Entry&, void);
+
+public:
+ SvxRelativeField(std::unique_ptr<weld::MetricSpinButton> pControl);
+
+ void EnableRelativeMode( sal_uInt16 nMin, sal_uInt16 nMax );
+ void SetRelative( bool bRelative );
+ bool IsRelative() const { return bRelative; }
+ void EnableNegativeMode() {bNegativeEnabled = true;}
+
+ void set_sensitive(bool sensitive) { m_xSpinButton->set_sensitive(sensitive); }
+ void set_value(int nValue, FieldUnit eValueUnit) { m_xSpinButton->set_value(nValue, eValueUnit); }
+ int get_value(FieldUnit eDestUnit) const { return m_xSpinButton->get_value(eDestUnit); }
+ int get_min(FieldUnit eValueUnit) const { return m_xSpinButton->get_min(eValueUnit); }
+ void set_min(int min, FieldUnit eValueUnit) { m_xSpinButton->set_min(min, eValueUnit); }
+ void set_max(int max, FieldUnit eValueUnit) { m_xSpinButton->set_max(max, eValueUnit); }
+ int normalize(int nValue) const { return m_xSpinButton->normalize(nValue); }
+ int denormalize(int nValue) const { return m_xSpinButton->denormalize(nValue); }
+ void connect_value_changed(const Link<weld::MetricSpinButton&, void>& rLink) { m_xSpinButton->connect_value_changed(rLink); }
+ OUString get_text() const { return m_xSpinButton->get_text(); }
+ void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
+ void save_value() { m_xSpinButton->save_value(); }
+ bool get_value_changed_from_saved() const { return m_xSpinButton->get_value_changed_from_saved(); }
+ weld::SpinButton& get_widget() { return m_xSpinButton->get_widget(); }
+
+ int GetCoreValue(MapUnit eUnit) const { return ::GetCoreValue(*m_xSpinButton, eUnit); }
+ void SetFieldUnit(FieldUnit eUnit, bool bAll = false) { ::SetFieldUnit(*m_xSpinButton, eUnit, bAll); }
+ void SetMetricValue(int lCoreValue, MapUnit eUnit) { ::SetMetricValue(*m_xSpinButton, lCoreValue, eUnit); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/rotmodit.hxx b/include/svx/rotmodit.hxx
new file mode 100644
index 000000000..fa8510e50
--- /dev/null
+++ b/include/svx/rotmodit.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ROTMODIT_HXX
+#define INCLUDED_SVX_ROTMODIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+// Alignment with rotated text
+
+enum SvxRotateMode
+{
+ SVX_ROTATE_MODE_STANDARD,
+ SVX_ROTATE_MODE_TOP,
+ SVX_ROTATE_MODE_CENTER,
+ SVX_ROTATE_MODE_BOTTOM
+};
+
+class SVX_DLLPUBLIC SvxRotateModeItem final : public SfxEnumItem<SvxRotateMode>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxRotateModeItem( SvxRotateMode eMode, TypedWhichId<SvxRotateModeItem> nWhich);
+ SvxRotateModeItem( const SvxRotateModeItem& rItem );
+ virtual ~SvxRotateModeItem() override;
+
+ virtual sal_uInt16 GetValueCount() const override;
+ virtual SvxRotateModeItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString& rText, const IntlWrapper& ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+private:
+ static OUString GetValueText(SvxRotateMode nVal);
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx
new file mode 100644
index 000000000..12593c73f
--- /dev/null
+++ b/include/svx/rubydialog.hxx
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#ifndef INCLUDED_SVX_RUBYDIALOG_HXX
+#define INCLUDED_SVX_RUBYDIALOG_HXX
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <vcl/customweld.hxx>
+#include <svx/svxdllapi.h>
+#include <rtl/ref.hxx>
+
+class SvxRubyDialog;
+class RubyPreview final : public weld::CustomWidgetController
+{
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ SvxRubyDialog* m_pParentDlg;
+
+public:
+ RubyPreview();
+ virtual ~RubyPreview() override;
+ void setRubyDialog(SvxRubyDialog* pParentDlg)
+ {
+ m_pParentDlg = pParentDlg;
+ }
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+};
+
+class SVX_DLLPUBLIC SvxRubyChildWindow final : public SfxChildWindow
+{
+public:
+ SvxRubyChildWindow( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo const * );
+ SFX_DECL_CHILDWINDOW( SvxRubyChildWindow );
+};
+
+class SvxRubyData_Impl;
+
+class SvxRubyDialog final : public SfxModelessDialogController
+{
+ friend class RubyPreview;
+
+
+ tools::Long nLastPos;
+ tools::Long nCurrentEdit;
+ bool bModified;
+ SfxBindings* pBindings;
+ rtl::Reference<SvxRubyData_Impl> m_pImpl;
+ weld::Entry* aEditArr[8];
+
+ std::unique_ptr<weld::Label> m_xLeftFT;
+ std::unique_ptr<weld::Label> m_xRightFT;
+ std::unique_ptr<weld::Entry> m_xLeft1ED;
+ std::unique_ptr<weld::Entry> m_xRight1ED;
+ std::unique_ptr<weld::Entry> m_xLeft2ED;
+ std::unique_ptr<weld::Entry> m_xRight2ED;
+ std::unique_ptr<weld::Entry> m_xLeft3ED;
+ std::unique_ptr<weld::Entry> m_xRight3ED;
+ std::unique_ptr<weld::Entry> m_xLeft4ED;
+ std::unique_ptr<weld::Entry> m_xRight4ED;
+
+ std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
+
+ std::unique_ptr<weld::ComboBox> m_xAdjustLB;
+
+ std::unique_ptr<weld::ComboBox> m_xPositionLB;
+
+ std::unique_ptr<weld::Label> m_xCharStyleFT;
+ std::unique_ptr<weld::ComboBox> m_xCharStyleLB;
+ std::unique_ptr<weld::Button> m_xStylistPB;
+
+ std::unique_ptr<weld::Button> m_xApplyPB;
+ std::unique_ptr<weld::Button> m_xClosePB;
+
+ std::unique_ptr<weld::Container> m_xContentArea;
+ std::unique_ptr<weld::Widget> m_xGrid;
+
+ std::unique_ptr<RubyPreview> m_xPreviewWin;
+ std::unique_ptr<weld::CustomWeld> m_xPreview;
+
+ DECL_LINK(ApplyHdl_Impl, weld::Button&, void);
+ DECL_LINK(CloseHdl_Impl, weld::Button&, void);
+ DECL_LINK(StylistHdl_Impl, weld::Button&, void);
+ DECL_LINK(ScrollHdl_Impl, weld::ScrolledWindow&, void);
+ DECL_LINK(PositionHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(AdjustHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(CharStyleHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void);
+ DECL_LINK(EditFocusHdl_Impl, weld::Widget&, void);
+ DECL_LINK(KeyUpDownHdl_Impl, const KeyEvent&, bool);
+ DECL_LINK(KeyUpDownTabHdl_Impl, const KeyEvent&, bool);
+
+ bool EditScrollHdl_Impl(sal_Int32 nParam);
+ bool EditJumpHdl_Impl(sal_Int32 nParam);
+
+ void SetRubyText(sal_Int32 nPos, weld::Entry& rLeft, weld::Entry& rRight);
+ void GetRubyText();
+ void ClearCharStyleList();
+ void AssertOneEntry();
+
+ void Update();
+ virtual void Close() override;
+
+ tools::Long GetLastPos() const {return nLastPos;}
+ void SetLastPos(tools::Long nSet) {nLastPos = nSet;}
+
+ bool IsModified() const {return bModified;}
+ void SetModified(bool bSet) {bModified = bSet;}
+
+ void EnableControls(bool bEnable);
+
+ void GetCurrentText(OUString& rBase, OUString& rRuby);
+
+public:
+ SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW, weld::Window* pParent);
+ virtual ~SvxRubyDialog() override;
+
+ virtual void Activate() override;
+};
+
+#endif // INCLUDED_SVX_RUBYDIALOG_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
new file mode 100644
index 000000000..58b9e0a5c
--- /dev/null
+++ b/include/svx/ruler.hxx
@@ -0,0 +1,286 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_RULER_HXX
+#define INCLUDED_SVX_RULER_HXX
+
+#include <svtools/ruler.hxx>
+#include <svl/lstner.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+
+#include <memory>
+
+class Menu;
+class SvxProtectItem;
+class SvxRulerItem;
+class SfxBindings;
+class SvxLongLRSpaceItem;
+class SvxLongULSpaceItem;
+class SvxTabStopItem;
+class SvxLRSpaceItem;
+class SvxPagePosSizeItem;
+class SvxColumnItem;
+class SfxRectangleItem;
+class SvxObjectItem;
+class SfxBoolItem;
+struct SvxRuler_Impl;
+
+enum class RulerChangeType
+{
+ MARGIN1,
+ MARGIN2
+};
+
+enum class SvxRulerDragFlags
+{
+ NONE = 0x00,
+ OBJECT = 0x01,
+ // reduce size of the last column, shift
+ OBJECT_SIZE_LINEAR = 0x02,
+ OBJECT_SIZE_PROPORTIONAL = 0x04, // proportional, Ctrl
+ // only current line (table; Shift-Ctrl)
+ OBJECT_ACTLINE_ONLY = 0x08,
+ // currently same key assignment
+ OBJECT_LEFT_INDENT_ONLY = OBJECT_SIZE_PROPORTIONAL,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxRulerDragFlags> : is_typed_flags<SvxRulerDragFlags, 0x0f> {};
+}
+
+enum class SvxRulerSupportFlags
+{
+ TABS = 0x0001,
+ PARAGRAPH_MARGINS = 0x0002,
+ BORDERS = 0x0004,
+ OBJECT = 0x0008,
+ SET_NULLOFFSET = 0x0010,
+ NEGATIVE_MARGINS = 0x0020,
+ PARAGRAPH_MARGINS_VERTICAL = 0x0040,
+ REDUCED_METRIC = 0x0080, //shorten the context menu to select metric
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxRulerSupportFlags> : is_typed_flags<SvxRulerSupportFlags, 0x00ff> {};
+}
+
+class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
+{
+ friend class SvxRulerItem;
+
+ std::vector<std::unique_ptr<SvxRulerItem> > pCtrlItems;
+
+ std::unique_ptr<SvxLongLRSpaceItem> mxLRSpaceItem; // left and right edge
+ std::unique_ptr<SfxRectangleItem> mxMinMaxItem; // maxima for dragging
+ std::unique_ptr<SvxLongULSpaceItem> mxULSpaceItem; // upper and lower edge
+ std::unique_ptr<SvxTabStopItem> mxTabStopItem; // tab stops
+ std::unique_ptr<SvxLRSpaceItem> mxParaItem; // paragraphs
+ std::unique_ptr<SvxLRSpaceItem> mxBorderItem; // border distance
+ std::unique_ptr<SvxPagePosSizeItem> mxPagePosItem; // page distance to the rule
+ std::unique_ptr<SvxColumnItem> mxColumnItem; // columns
+ std::unique_ptr<SvxObjectItem> mxObjectItem; // object
+
+ VclPtr<vcl::Window> pEditWin;
+
+ std::unique_ptr<SvxRuler_Impl> mxRulerImpl;
+
+ bool bAppSetNullOffset :1;
+ bool bHorz :1;
+ tools::Long lLogicNullOffset; // in logic coordinates
+ tools::Long lAppNullOffset; // in logic coordinates
+ tools::Long lInitialDragPos;
+ SvxRulerSupportFlags nFlags;
+ SvxRulerDragFlags nDragType;
+ sal_uInt16 nDefTabType;
+ sal_uInt16 nTabCount;
+ sal_uInt16 nTabBufSize;
+ tools::Long lDefTabDist;
+ tools::Long lTabPos;
+
+ std::vector<RulerTab> mpTabs; // tab positions in pixel
+ std::vector<RulerIndent> mpIndents; // paragraph margins in pixel
+ std::vector<RulerBorder> mpBorders;
+ std::vector<RulerBorder> mpObjectBorders;
+
+ SfxBindings* pBindings;
+ tools::Long nDragOffset;
+ tools::Long nMaxLeft;
+ tools::Long nMaxRight;
+ bool bValid;
+ bool bListening;
+ bool bActive;
+
+ bool mbCoarseSnapping;
+ bool mbSnapping;
+
+ void StartListening_Impl();
+ tools::Long GetCorrectedDragPos(bool bLeft = true, bool bRight = true );
+ void DrawLine_Impl(tools::Long &lTabPos, int, bool Horizontal);
+ sal_uInt16 GetObjectBordersOff(sal_uInt16 nIdx) const;
+
+ // page borders or surrounding frame
+ void UpdateFrame(const SvxLongLRSpaceItem* pItem);
+ void UpdateFrame(const SvxLongULSpaceItem* pItem);
+ void UpdateFrameMinMax(const SfxRectangleItem* pItem);
+ // paragraph indentations
+ void UpdatePara(const SvxLRSpaceItem* pItem);
+ // Border distance
+ void UpdateBorder(const SvxLRSpaceItem* pItem);
+ // Tabs
+ void Update(const SvxTabStopItem* pItem);
+ // page position and width
+ void Update(const SvxPagePosSizeItem* pItem);
+ // columns
+ void Update(const SvxColumnItem* pItem, sal_uInt16 nSID);
+ // object selection
+ void Update(const SvxObjectItem* pItem);
+ // protect
+ void Update(const SvxProtectItem* pItem );
+ // left-to-right text
+ void UpdateTextRTL(const SfxBoolItem* pItem);
+ // paragraph indentations
+ void UpdatePara();
+ void UpdateTabs();
+ void UpdatePage();
+ void UpdateFrame();
+ void UpdateColumns();
+ void UpdateObject();
+
+ // Convert position to stick to ruler ticks
+ tools::Long MakePositionSticky(tools::Long rValue, tools::Long aPointOfReference, bool aSnapToFrameMargin = true) const;
+
+ tools::Long PixelHAdjust(tools::Long lPos, tools::Long lPos2) const;
+ tools::Long PixelVAdjust(tools::Long lPos, tools::Long lPos2) const;
+ tools::Long PixelAdjust(tools::Long lPos, tools::Long lPos2) const;
+
+ tools::Long ConvertHPosPixel(tools::Long lPos) const;
+ tools::Long ConvertVPosPixel(tools::Long lPos) const;
+ tools::Long ConvertHSizePixel(tools::Long lSize) const;
+ tools::Long ConvertVSizePixel(tools::Long lSize) const;
+
+ tools::Long ConvertPosPixel(tools::Long lPos) const;
+ tools::Long ConvertSizePixel(tools::Long lSize) const;
+
+ tools::Long ConvertHPosLogic(tools::Long lPos) const;
+ tools::Long ConvertVPosLogic(tools::Long lPos) const;
+ tools::Long ConvertHSizeLogic(tools::Long lSize) const;
+ tools::Long ConvertVSizeLogic(tools::Long lSize) const;
+
+ tools::Long ConvertPosLogic(tools::Long lPos) const;
+ tools::Long ConvertSizeLogic(tools::Long lSize) const;
+
+ tools::Long RoundToCurrentMapMode(tools::Long lValue) const;
+
+ tools::Long GetFirstLineIndent() const;
+ tools::Long GetLeftIndent() const;
+ tools::Long GetRightIndent() const;
+ tools::Long GetLogicRightIndent() const;
+
+ tools::Long GetLeftFrameMargin() const;
+ tools::Long GetRightFrameMargin() const;
+
+ void CalcMinMax();
+
+ void EvalModifier();
+ void DragMargin1();
+ //adjust the left margin either after DragMargin1() or after DragBorders()
+ void AdjustMargin1(tools::Long lDiff);
+ void DragMargin2();
+ void DragIndents();
+ void DragTabs();
+ void DragBorders();
+ void DragObjectBorder();
+
+ void ApplyMargins();
+ void ApplyIndents();
+ void ApplyTabs();
+ void ApplyBorders();
+ void ApplyObject();
+
+ tools::Long GetFrameLeft() const;
+
+ tools::Long GetLeftMin() const;
+ tools::Long GetRightMax() const;
+
+ void TabMenuSelect(std::string_view rIdent);
+ void MenuSelect(std::string_view ident);
+ void PrepareProportional_Impl(RulerType);
+
+ enum class UpdateType
+ {
+ MoveLeft,
+ MoveRight
+ };
+ void UpdateParaContents_Impl(tools::Long lDiff, UpdateType);
+
+protected:
+ virtual void Command( const CommandEvent& rCEvt ) override;
+ virtual void Click() override;
+ virtual bool StartDrag() override;
+ virtual void Drag() override;
+ virtual void EndDrag() override;
+ virtual void ExtraDown() override;
+ virtual void MouseMove( const MouseEvent& rMEvt ) override;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
+
+ virtual void Update();
+
+ bool IsActLastColumn(
+ bool bForceDontConsiderHidden = false,
+ sal_uInt16 nAct=USHRT_MAX) const;
+ bool IsActFirstColumn(
+ bool bForceDontConsiderHidden = false,
+ sal_uInt16 nAct=USHRT_MAX) const;
+ sal_uInt16 GetActLeftColumn(
+ bool bForceDontConsiderHidden = false,
+ sal_uInt16 nAct=USHRT_MAX ) const;
+ sal_uInt16 GetActRightColumn (
+ bool bForceDontConsiderHidden = false,
+ sal_uInt16 nAct=USHRT_MAX ) const;
+ tools::Long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
+
+public:
+
+ SvxRuler(vcl::Window* pParent, vcl::Window *pEditWin, SvxRulerSupportFlags nRulerFlags,
+ SfxBindings &rBindings, WinBits nWinStyle);
+ virtual ~SvxRuler() override;
+ virtual void dispose() override;
+
+ void SetDefTabDist(tools::Long);
+
+ // set/get NullOffset in logic units
+ void SetNullOffsetLogic(tools::Long lOff);
+
+ void SetActive(bool bOn = true);
+
+ void ForceUpdate()
+ {
+ Update();
+ }
+
+ //#i24363# tab stops relative to indent
+ void SetTabsRelativeToIndent( bool bRel );
+ void SetValues(RulerChangeType type, tools::Long value);
+ tools::Long GetPageWidth() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/rulritem.hxx b/include/svx/rulritem.hxx
new file mode 100644
index 000000000..b45683d31
--- /dev/null
+++ b/include/svx/rulritem.hxx
@@ -0,0 +1,236 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_RULRITEM_HXX
+#define INCLUDED_SVX_RULRITEM_HXX
+
+#include <tools/gen.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+#include <vector>
+
+class SVX_DLLPUBLIC SvxLongLRSpaceItem final : public SfxPoolItem
+{
+ tools::Long mlLeft; // nLeft or the negative first-line indentation
+ tools::Long mlRight; // the unproblematic right edge
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ const SvxLongLRSpaceItem& operator=(const SvxLongLRSpaceItem &) = delete;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxLongLRSpaceItem(tools::Long lLeft, tools::Long lRight, TypedWhichId<SvxLongLRSpaceItem> nId);
+ SvxLongLRSpaceItem();
+ SvxLongLRSpaceItem(SvxLongLRSpaceItem const &) = default;
+
+ virtual SvxLongLRSpaceItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ tools::Long GetLeft() const { return mlLeft;}
+ tools::Long GetRight() const { return mlRight;}
+ void SetLeft(tools::Long lArgLeft);
+ void SetRight(tools::Long lArgRight);
+};
+
+class SVX_DLLPUBLIC SvxLongULSpaceItem final : public SfxPoolItem
+{
+ tools::Long mlLeft; // nLeft or the negative first-line indentation
+ tools::Long mlRight; // the unproblematic right edge
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ const SvxLongULSpaceItem& operator=(const SvxLongULSpaceItem &) = delete;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxLongULSpaceItem(tools::Long lUpper, tools::Long lLower, TypedWhichId<SvxLongULSpaceItem> nId);
+ SvxLongULSpaceItem();
+ SvxLongULSpaceItem(SvxLongULSpaceItem const &) = default;
+
+ virtual SvxLongULSpaceItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ tools::Long GetUpper() const { return mlLeft;}
+ tools::Long GetLower() const { return mlRight;}
+ void SetUpper(tools::Long lArgLeft);
+ void SetLower(tools::Long lArgRight);
+};
+
+class SVX_DLLPUBLIC SvxPagePosSizeItem final : public SfxPoolItem
+{
+ Point aPos;
+ tools::Long lWidth;
+ tools::Long lHeight;
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual SvxPagePosSizeItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+private:
+ const SvxPagePosSizeItem& operator=(const SvxPagePosSizeItem &) = delete;
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxPagePosSizeItem(const Point &rPos, tools::Long lWidth, tools::Long lHeight);
+ SvxPagePosSizeItem();
+ SvxPagePosSizeItem(SvxPagePosSizeItem const &) = default;
+
+ const Point &GetPos() const { return aPos; }
+ tools::Long GetWidth() const { return lWidth; }
+ tools::Long GetHeight() const { return lHeight; }
+};
+
+struct SVX_DLLPUBLIC SvxColumnDescription
+{
+ tools::Long nStart; /* Start of the column */
+ tools::Long nEnd; /* End of the column */
+ bool bVisible; /* Visibility */
+
+ tools::Long nEndMin; //min. possible position of end
+ tools::Long nEndMax; //max. possible position of end
+
+ SvxColumnDescription(tools::Long start, tools::Long end, bool bVis);
+
+ SvxColumnDescription(tools::Long start, tools::Long end,
+ tools::Long endMin, tools::Long endMax, bool bVis);
+
+ bool operator==(const SvxColumnDescription &rCmp) const;
+ bool operator!=(const SvxColumnDescription &rCmp) const;
+ tools::Long GetWidth() const;
+};
+
+template<typename charT, typename traits>
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, SvxColumnDescription const& dsc)
+{
+ return stream << "{ nStart " << dsc.nStart << " nEnd " << dsc.nEnd
+ << " bVisible " << dsc.bVisible << " nEndMin " << dsc.nEndMin
+ << " nEndMax " << dsc.nEndMax << " }";
+}
+
+
+class SVX_DLLPUBLIC SvxColumnItem final : public SfxPoolItem
+{
+ std::vector<SvxColumnDescription> aColumns; // Column array
+
+ tools::Long nLeft; // Left edge for the table
+ tools::Long nRight; // Right edge for the table; for columns always
+ // equal to the surrounding frame
+ sal_uInt16 nActColumn; // the current column
+ bool bTable; // table?
+ bool bOrtho; // evenly spread columns
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText,
+ const IntlWrapper& ) const override;
+
+ virtual SvxColumnItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ // right edge of the surrounding frame
+ // nLeft, nRight each the distance to the surrounding frame
+ SvxColumnItem(sal_uInt16 nAct = 0);
+ SvxColumnItem(sal_uInt16 nActCol, sal_uInt16 nLeft, sal_uInt16 nRight); // Table with borders
+
+ SvxColumnDescription& operator[](sal_uInt16 index);
+ const SvxColumnDescription& operator[](sal_uInt16 index) const;
+ SvxColumnDescription& At(sal_uInt16 index);
+ SvxColumnDescription& GetActiveColumnDescription();
+
+ sal_uInt16 Count() const;
+ void Append(const SvxColumnDescription& rDesc);
+ void SetLeft(tools::Long aLeft);
+ void SetRight(tools::Long aRight);
+ sal_uInt16 GetActColumn() const { return nActColumn;}
+ bool IsFirstAct() const;
+ bool IsLastAct() const;
+ tools::Long GetLeft() const { return nLeft;}
+ tools::Long GetRight() const { return nRight;}
+ bool IsTable() const { return bTable;}
+ bool CalcOrtho() const;
+ void SetOrtho(bool bVal);
+ bool IsConsistent() const;
+};
+
+class SVX_DLLPUBLIC SvxObjectItem final : public SfxPoolItem
+{
+ tools::Long nStartX; /* Start in x direction */
+ tools::Long nEndX; /* End in x direction */
+ tools::Long nStartY; /* Start in y direction */
+ tools::Long nEndY; /* End in y direction */
+ bool bLimits; /* boundary limit control by the application */
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual SvxObjectItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ const SvxObjectItem &operator=(const SvxObjectItem &) = delete;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ SvxObjectItem(tools::Long nStartX, tools::Long nEndX,
+ tools::Long nStartY, tools::Long nEndY);
+ SvxObjectItem(SvxObjectItem const &) = default;
+
+ tools::Long GetStartX() const { return nStartX;}
+ tools::Long GetEndX() const { return nEndX;}
+ tools::Long GetStartY() const { return nStartY;}
+ tools::Long GetEndY() const { return nEndY;}
+
+ void SetStartX(tools::Long lValue);
+ void SetEndX(tools::Long lValue);
+ void SetStartY(tools::Long lValue);
+ void SetEndY(tools::Long lValue);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/samecontentlistbox.hxx b/include/svx/samecontentlistbox.hxx
new file mode 100644
index 000000000..f3553d43e
--- /dev/null
+++ b/include/svx/samecontentlistbox.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SAMECONTENTLISTBOXHELPER_HXX
+#define INCLUDED_SVX_SAMECONTENTLISTBOXHELPER_HXX
+
+#include <svx/svxdllapi.h>
+#include <vcl/weld.hxx>
+
+namespace SameContentListBox
+{
+void SVXCORE_DLLPUBLIC Fill(weld::ComboBox& rComboBox);
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
new file mode 100644
index 000000000..8903e3bd4
--- /dev/null
+++ b/include/svx/scene3d.hxx
@@ -0,0 +1,192 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SCENE3D_HXX
+#define INCLUDED_SVX_SCENE3D_HXX
+
+#include <svx/camera3d.hxx>
+#include <tools/b3dtrans.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/obj3d.hxx>
+#include <svx/svx3ditems.hxx>
+#include <memory>
+
+namespace sdr::properties {
+ class BaseProperties;
+}
+
+/*************************************************************************
+|*
+|* GeoData relevant for undo actions
+|*
+\************************************************************************/
+
+class E3DSceneGeoData final : public E3DObjGeoData
+{
+public:
+ Camera3D aCamera;
+
+ E3DSceneGeoData() {}
+};
+
+class Imp3DDepthRemapper;
+
+/*************************************************************************
+|*
+|* base class for 3D scenes
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC E3dScene final : public E3dObject, public SdrObjList
+{
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+ // transformations
+ B3dCamera aCameraSet;
+ Camera3D aCamera;
+
+ mutable std::unique_ptr<Imp3DDepthRemapper> mp3DDepthRemapper;
+
+ // Flag to determine if only selected objects should be drawn
+ bool bDrawOnlySelected : 1;
+
+ bool mbSkipSettingDirty : 1;
+
+ void RebuildLists();
+
+ virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override;
+
+ void SetDefaultAttributes();
+ void ImpCleanup3DDepthMapper();
+
+ // protected destructor
+ virtual ~E3dScene() override;
+
+public:
+ E3dScene(SdrModel& rSdrModel);
+ E3dScene(SdrModel& rSdrModel, E3dScene const &);
+
+ virtual void StructureChanged() override;
+
+ // derived from SdrObjList
+ virtual SdrPage* getSdrPageFromSdrObjList() const override;
+ virtual SdrObject* getSdrObjectFromSdrObjList() const override;
+
+ // derived from SdrObject
+ virtual SdrObjList* getChildrenOfSdrObject() const override;
+
+ virtual void SetBoundRectDirty() override;
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+
+ sal_uInt32 RemapOrdNum(sal_uInt32 nOrdNum) const;
+
+ // Perspective: enum ProjectionType { ProjectionType::Parallel, ProjectionType::Perspective }
+ ProjectionType GetPerspective() const
+ { return static_cast<ProjectionType>(GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue()); }
+
+ // Distance:
+ double GetDistance() const
+ { return static_cast<double>(GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE).GetValue()); }
+
+ // Focal length: before cm, now 1/10th mm (*100)
+ double GetFocalLength() const
+ { return GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue(); }
+
+ // set flag to draw only selected
+ void SetDrawOnlySelected(bool bNew) { bDrawOnlySelected = bNew; }
+ bool GetDrawOnlySelected() const { return bDrawOnlySelected; }
+ virtual SdrObjKind GetObjIdentifier() const override;
+
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcMove(const Size& rSize) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& rXFact,
+ const Fraction& rYFact) override;
+ virtual void RecalcSnapRect() override;
+
+ virtual E3dScene* getRootE3dSceneFromE3dObject() const override;
+ void SetCamera(const Camera3D& rNewCamera);
+ const Camera3D& GetCamera() const { return aCamera; }
+ void removeAllNonSelectedObjects();
+
+ virtual E3dScene* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix) override;
+ virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix) override;
+
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ void RotateScene(const Point& rRef, double sn, double cs);
+
+ // TakeObjName...() is for the display in the UI, for example "3 frames selected".
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ // get transformations
+ B3dCamera& GetCameraSet() { return aCameraSet; }
+ const B3dCamera& GetCameraSet() const { return aCameraSet; }
+
+ // break up
+ virtual bool IsBreakObjPossible() override;
+
+ // polygon which is built during creation
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+
+ // create moves
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override; // true=Xor must be repainted
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+
+ void SuspendReportingDirtyRects();
+ void ResumeReportingDirtyRects();
+ void SetAllSceneRectsDirty();
+
+ // set selection from E3dObject (temporary flag for 3D actions)
+ virtual void SetSelected(bool bNew) override;
+
+ // derived from SdrObjList
+ virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
+ virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
+ virtual SdrObject* NbcRemoveObject(size_t nObjNum) override;
+ virtual SdrObject* RemoveObject(size_t nObjNum) override;
+
+ // needed for group functionality
+ virtual void SetBoundAndSnapRectsDirty(bool bNotMyself = false, bool bRecursive = true) override;
+ virtual void NbcSetLayer(SdrLayerID nLayer) override;
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ virtual SdrObjList* GetSubList() const override;
+ virtual void SetTransformChanged() override;
+
+private:
+ virtual basegfx::B3DRange RecalcBoundVolume() const override;
+};
+
+#endif // INCLUDED_SVX_SCENE3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdangitm.hxx b/include/svx/sdangitm.hxx
new file mode 100644
index 000000000..ee4af385a
--- /dev/null
+++ b/include/svx/sdangitm.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDANGITM_HXX
+#define INCLUDED_SVX_SDANGITM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/degree.hxx>
+
+
+
+class SVXCORE_DLLPUBLIC SdrAngleItem: public SfxInt32Item {
+public:
+ SdrAngleItem(TypedWhichId<SdrAngleItem> nId, Degree100 nAngle): SfxInt32Item(nId,nAngle.get()) {}
+ virtual SdrAngleItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString& rText,
+ const IntlWrapper& rIntlWrapper) const override;
+
+ Degree100 GetValue() const { return Degree100(SfxInt32Item::GetValue()); }
+ void SetValue(Degree100 nTheValue) { SfxInt32Item::SetValue(nTheValue.get()); }
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
new file mode 100644
index 000000000..ee1c05ebc
--- /dev/null
+++ b/include/svx/sdasitm.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDASITM_HXX
+#define INCLUDED_SVX_SDASITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdooitm.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <unordered_map>
+
+namespace com::sun::star::uno { class Any; }
+
+class SVXCORE_DLLPUBLIC SdrCustomShapeGeometryItem final : public SfxPoolItem
+{
+public:
+ typedef std::pair < const OUString, const OUString > PropertyPair;
+
+private:
+ struct PropertyPairHash
+ {
+ inline size_t operator()( const SdrCustomShapeGeometryItem::PropertyPair& ) const;
+ };
+ typedef std::unordered_map <PropertyPair, sal_Int32, PropertyPairHash> PropertyPairHashMap;
+ typedef std::unordered_map<OUString, sal_Int32> PropertyHashMap;
+
+ PropertyHashMap aPropHashMap;
+ PropertyPairHashMap aPropPairHashMap;
+
+ css::uno::Sequence< css::beans::PropertyValue > aPropSeq;
+
+ // For fast comparisons keep a hash of the content, computed on demand
+ // (unusable state is if anyToHash() returns no hash).
+ enum HashState { Unknown, Valid, Unusable };
+ mutable HashState aHashState = HashState::Unknown;
+ mutable size_t aHash = 0xdeadbeef;
+
+ void SetPropSeq( const css::uno::Sequence< css::beans::PropertyValue >& rPropSeq );
+ inline void UpdateHash() const;
+ inline void InvalidateHash();
+
+ public:
+
+ SdrCustomShapeGeometryItem();
+ SdrCustomShapeGeometryItem( const css::uno::Sequence< css::beans::PropertyValue >& );
+ virtual ~SdrCustomShapeGeometryItem() override;
+
+ SdrCustomShapeGeometryItem(SdrCustomShapeGeometryItem const &) = default;
+ SdrCustomShapeGeometryItem(SdrCustomShapeGeometryItem &&) = default;
+ SdrCustomShapeGeometryItem & operator =(SdrCustomShapeGeometryItem const &) = delete; // due to SfxPoolItem
+ SdrCustomShapeGeometryItem & operator =(SdrCustomShapeGeometryItem &&) = delete; // due to SfxPoolItem
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual bool operator<( const SfxPoolItem& ) const override;
+ virtual bool IsSortable() const override { return true; }
+
+ virtual bool GetPresentation(SfxItemPresentation ePresentation,
+ MapUnit eCoreMetric, MapUnit ePresentationMetric,
+ OUString &rText, const IntlWrapper&) const override;
+
+ virtual SdrCustomShapeGeometryItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ css::uno::Any* GetPropertyValueByName( const OUString& rPropName );
+ const css::uno::Any* GetPropertyValueByName( const OUString& rPropName ) const;
+ css::uno::Any* GetPropertyValueByName( const OUString& rPropName, const OUString& rPropName2 );
+ const css::uno::Any* GetPropertyValueByName( const OUString& rPropName, const OUString& rPropName2 ) const;
+
+ void SetPropertyValue( const css::beans::PropertyValue& rPropVal );
+ void SetPropertyValue( const OUString& rSequenceName, const css::beans::PropertyValue& rPropVal );
+
+ void ClearPropertyValue( const OUString& rPropertyName );
+};
+
+inline SdrOnOffItem makeSdrTextWordWrapItem( bool bAuto ) {
+ return SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, bAuto );
+}
+
+// some useful inline methods
+
+size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const
+{
+ size_t hash = 17;
+ hash = hash * 37 + r1.first.hashCode();
+ hash = hash * 37 + r1.second.hashCode();
+ return hash;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sderitm.hxx b/include/svx/sderitm.hxx
new file mode 100644
index 000000000..2afd50ef8
--- /dev/null
+++ b/include/svx/sderitm.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDERITM_HXX
+#define INCLUDED_SVX_SDERITM_HXX
+
+#include <svx/sdmetitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrMetricItem makeSdrEckenradiusItem(tools::Long nRadius)
+{
+ return SdrMetricItem(SDRATTR_CORNER_RADIUS, nRadius);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdgcpitm.hxx b/include/svx/sdgcpitm.hxx
new file mode 100644
index 000000000..a9712a156
--- /dev/null
+++ b/include/svx/sdgcpitm.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDGCPITM_HXX
+#define INCLUDED_SVX_SDGCPITM_HXX
+
+#include <config_options.h>
+#include <svx/grfcrop.hxx>
+#include <svx/svddef.hxx>
+
+
+// SdrGrafCropItem -
+
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrGrafCropItem final : public SvxGrfCrop
+{
+public:
+
+
+ SdrGrafCropItem( sal_Int32 nLeftCrop = 0, sal_Int32 nTopCrop = 0,
+ sal_Int32 nRightCrop = 0, sal_Int32 nBottomCrop = 0 ) :
+ SvxGrfCrop( nLeftCrop, nRightCrop, nTopCrop, nBottomCrop, SDRATTR_GRAFCROP ) {}
+
+ virtual SdrGrafCropItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+};
+
+#endif // INCLUDED_SVX_SDGCPITM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdggaitm.hxx b/include/svx/sdggaitm.hxx
new file mode 100644
index 000000000..345082fca
--- /dev/null
+++ b/include/svx/sdggaitm.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDGGAITM_HXX
+#define INCLUDED_SVX_SDGGAITM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+
+// SdrGrafGamma100Item -
+
+
+class SVXCORE_DLLPUBLIC SdrGrafGamma100Item final : public SfxUInt32Item
+{
+public:
+
+
+ SdrGrafGamma100Item( sal_uInt32 nGamma100 = 100 ) : SfxUInt32Item( SDRATTR_GRAFGAMMA, nGamma100 ) {}
+
+ virtual SdrGrafGamma100Item* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+#endif // INCLUDED_SVX_SDGGAITM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdgluitm.hxx b/include/svx/sdgluitm.hxx
new file mode 100644
index 000000000..4ef5e69e9
--- /dev/null
+++ b/include/svx/sdgluitm.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDGLUITM_HXX
+#define INCLUDED_SVX_SDGLUITM_HXX
+
+#include <svx/sdprcitm.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+
+// SdrGrafLuminanceItem -
+
+
+class SVXCORE_DLLPUBLIC SdrGrafLuminanceItem final : public SdrSignedPercentItem
+{
+public:
+
+
+ SdrGrafLuminanceItem( short nLuminancePercent = 0 ) : SdrSignedPercentItem(
+ SDRATTR_GRAFLUMINANCE, nLuminancePercent ) {}
+
+ virtual SdrGrafLuminanceItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+};
+
+
+// SdrGrafContrastItem -
+
+
+class SVXCORE_DLLPUBLIC SdrGrafContrastItem final : public SdrSignedPercentItem
+{
+public:
+
+
+ SdrGrafContrastItem( short nContrastPercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFCONTRAST, nContrastPercent ) {}
+
+ virtual SdrGrafContrastItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+};
+
+#endif // INCLUDED_SVX_SDGLUITM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdgmoitm.hxx b/include/svx/sdgmoitm.hxx
new file mode 100644
index 000000000..fa205b6db
--- /dev/null
+++ b/include/svx/sdgmoitm.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDGMOITM_HXX
+#define INCLUDED_SVX_SDGMOITM_HXX
+
+#include <vcl/GraphicAttributes.hxx>
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+// MSVC hack:
+class SAL_DLLPUBLIC_RTTI SdrGrafModeItem_Base: public SfxEnumItem<GraphicDrawMode> {
+protected:
+ SdrGrafModeItem_Base(GraphicDrawMode eMode):
+ SfxEnumItem(SDRATTR_GRAFMODE, eMode) {}
+};
+
+class SVXCORE_DLLPUBLIC SdrGrafModeItem final : public SdrGrafModeItem_Base
+{
+public:
+ SdrGrafModeItem( GraphicDrawMode eMode = GraphicDrawMode::Standard ) : SdrGrafModeItem_Base( eMode ) {}
+
+ virtual SdrGrafModeItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+
+ static OUString GetValueTextByPos( sal_uInt16 nPos );
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString& rText, const IntlWrapper& ) const override;
+};
+
+#endif // INCLUDED_SVX_SDGMOITM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdmetitm.hxx b/include/svx/sdmetitm.hxx
new file mode 100644
index 000000000..934c24034
--- /dev/null
+++ b/include/svx/sdmetitm.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDMETITM_HXX
+#define INCLUDED_SVX_SDMETITM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+// class SdrAngleItem
+// For all metrics. GetPresentation returns for example for
+// Value=2500 a "25mm".
+
+class SVXCORE_DLLPUBLIC SdrMetricItem: public SfxInt32Item {
+public:
+ SdrMetricItem(TypedWhichId<SdrMetricItem> nId, sal_Int32 nVal): SfxInt32Item(nId,nVal) {}
+ virtual SdrMetricItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual bool HasMetrics() const override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString& rText, const IntlWrapper&) const override;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdooitm.hxx b/include/svx/sdooitm.hxx
new file mode 100644
index 000000000..befd67f74
--- /dev/null
+++ b/include/svx/sdooitm.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDOOITM_HXX
+#define INCLUDED_SVX_SDOOITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+// class SdrOnOffItem
+// here GetValueTextByVal() returns "on" or "off" instead
+// of "TRUE" or "FALSE"
+
+class SVXCORE_DLLPUBLIC SdrOnOffItem: public SfxBoolItem {
+public:
+ SdrOnOffItem(TypedWhichId<SdrOnOffItem> nId, bool bOn): SfxBoolItem(nId,bOn) {}
+ virtual SdrOnOffItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ virtual OUString GetValueTextByVal(bool bVal) const override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdprcitm.hxx b/include/svx/sdprcitm.hxx
new file mode 100644
index 000000000..f00c8d514
--- /dev/null
+++ b/include/svx/sdprcitm.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDPRCITM_HXX
+#define INCLUDED_SVX_SDPRCITM_HXX
+
+#include <config_options.h>
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+// class SdrPercentItem
+// Integer percents of 0
+
+
+class SVXCORE_DLLPUBLIC SdrPercentItem : public SfxUInt16Item
+{
+public:
+ SdrPercentItem(TypedWhichId<SdrPercentItem> nId, sal_uInt16 nVal): SfxUInt16Item(nId,nVal) {}
+ virtual SdrPercentItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+
+// class SdrSignedPercentItem
+// Integer percents of +/-
+
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrSignedPercentItem : public SfxInt16Item
+{
+public:
+ SdrSignedPercentItem( sal_uInt16 nId, sal_Int16 nVal ) : SfxInt16Item( nId,nVal ) {}
+ virtual SdrSignedPercentItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/animation/animationstate.hxx b/include/svx/sdr/animation/animationstate.hxx
new file mode 100644
index 000000000..92878897e
--- /dev/null
+++ b/include/svx/sdr/animation/animationstate.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_ANIMATION_ANIMATIONSTATE_HXX
+#define INCLUDED_SVX_SDR_ANIMATION_ANIMATIONSTATE_HXX
+
+#include <sal/types.h>
+#include <svx/sdr/animation/scheduler.hxx>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
+namespace sdr::contact { class ViewObjectContact; }
+
+namespace sdr::animation
+ {
+ class PrimitiveAnimation final : public Event
+ {
+ // the animated VOC
+ sdr::contact::ViewObjectContact& mrVOContact;
+
+ // the vetor of animated primitives
+ drawinglayer::primitive2d::Primitive2DContainer maAnimatedPrimitives;
+
+ // local helpers
+ double getSmallestNextTime(double fCurrentTime);
+ void prepareNextEvent();
+
+ public:
+ // basic constructor.
+ PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, drawinglayer::primitive2d::Primitive2DContainer&& rAnimatedPrimitives);
+
+ // destructor
+ virtual ~PrimitiveAnimation() override;
+
+ // execute event, from base class Event
+ virtual void Trigger(sal_uInt32 nTime) override;
+ };
+
+} // end of namespace sdr::animation
+
+#endif // INCLUDED_SVX_SDR_ANIMATION_ANIMATIONSTATE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/animation/objectanimator.hxx b/include/svx/sdr/animation/objectanimator.hxx
new file mode 100644
index 000000000..a0e199932
--- /dev/null
+++ b/include/svx/sdr/animation/objectanimator.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_ANIMATION_OBJECTANIMATOR_HXX
+#define INCLUDED_SVX_SDR_ANIMATION_OBJECTANIMATOR_HXX
+
+#include <config_options.h>
+#include <svx/sdr/animation/scheduler.hxx>
+
+
+namespace sdr::animation
+{
+ class primitiveAnimator final : public Scheduler
+ {
+ public:
+ // basic constructor and destructor
+ primitiveAnimator();
+ UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) virtual ~primitiveAnimator() override;
+ };
+} // end of namespace sdr::animation
+
+
+#endif // INCLUDED_SVX_SDR_ANIMATION_OBJECTANIMATOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/animation/scheduler.hxx b/include/svx/sdr/animation/scheduler.hxx
new file mode 100644
index 000000000..312083b68
--- /dev/null
+++ b/include/svx/sdr/animation/scheduler.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_ANIMATION_SCHEDULER_HXX
+#define INCLUDED_SVX_SDR_ANIMATION_SCHEDULER_HXX
+
+#include <sal/types.h>
+#include <vcl/timer.hxx>
+#include <svx/svxdllapi.h>
+#include <vector>
+
+
+namespace sdr::animation
+ {
+
+ class SVXCORE_DLLPUBLIC Event
+ {
+ // time of event in ms
+ sal_uInt32 mnTime;
+
+ public:
+ // constructor/destructor
+ SAL_DLLPRIVATE explicit Event();
+ virtual ~Event();
+
+ // get/set time
+ SAL_DLLPRIVATE sal_uInt32 GetTime() const { return mnTime; }
+ void SetTime(sal_uInt32 nNew);
+
+ // execute event
+ virtual void Trigger(sal_uInt32 nTime) = 0;
+ };
+
+ class SVXCORE_DLLPUBLIC Scheduler : public Timer
+ {
+ // time in ms
+ sal_uInt32 mnTime;
+
+ // next delta time
+ sal_uInt32 mnDeltaTime;
+
+ // list of events, sorted by time
+ std::vector<Event*> mvEvents;
+
+ // Flag which remembers if this timer is paused. Default
+ // is false.
+ bool mbIsPaused;
+
+ public:
+ // constructor/destructor
+ SAL_DLLPRIVATE Scheduler();
+ virtual ~Scheduler() override;
+
+ // From baseclass Timer, the timeout call
+ virtual void Invoke() override;
+
+ // get time
+ SAL_DLLPRIVATE sal_uInt32 GetTime() const { return mnTime; }
+
+ // #i38135#
+ SAL_DLLPRIVATE void SetTime(sal_uInt32 nTime);
+
+ // execute all ripe events, removes executed ones from the scheduler
+ SAL_DLLPRIVATE void triggerEvents();
+
+ // re-start or stop timer according to event list
+ SAL_DLLPRIVATE void checkTimeout();
+
+ // insert/remove events, wrapper to EventList methods
+ void InsertEvent(Event& rNew);
+ SAL_DLLPRIVATE void RemoveEvent(Event* pOld);
+
+ // get/set pause
+ SAL_DLLPRIVATE bool IsPaused() const { return mbIsPaused; }
+ SAL_DLLPRIVATE void SetPaused(bool bNew);
+ };
+
+} // end of namespace sdr::animation
+
+
+#endif // INCLUDED_SVX_SDR_ANIMATION_SCHEDULER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx b/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
new file mode 100644
index 000000000..c9bb786a8
--- /dev/null
+++ b/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX
+#define INCLUDED_SVX_SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX
+
+#include <svx/svxdllapi.h>
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
+#include <drawinglayer/attribute/sdrfillattribute.hxx>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+#include <svl/itemset.hxx>
+#include <optional>
+
+//////////////////////////////////////////////////////////////////////////////
+
+class Color;
+
+namespace drawinglayer::attribute
+ {
+ class SVXCORE_DLLPUBLIC SdrAllFillAttributesHelper
+ {
+ private:
+ basegfx::B2DRange maLastPaintRange;
+ basegfx::B2DRange maLastDefineRange;
+ std::optional<drawinglayer::attribute::SdrFillAttribute> maFillAttribute;
+ std::optional<drawinglayer::attribute::FillGradientAttribute> maFillGradientAttribute;
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitives;
+
+ void createPrimitive2DSequence(
+ const basegfx::B2DRange& rPaintRange,
+ const basegfx::B2DRange& rDefineRange);
+
+ public:
+ SdrAllFillAttributesHelper(const Color& rColor);
+ SdrAllFillAttributesHelper(const SfxItemSet& rSet);
+ ~SdrAllFillAttributesHelper();
+
+ bool isUsed() const;
+ bool hasSdrFillAttribute() const { return bool(maFillAttribute); }
+ bool isTransparent() const;
+
+ const drawinglayer::attribute::SdrFillAttribute& getFillAttribute() const;
+ const drawinglayer::attribute::FillGradientAttribute& getFillGradientAttribute() const;
+ const drawinglayer::primitive2d::Primitive2DContainer& getPrimitive2DSequence(
+ const basegfx::B2DRange& rPaintRange,
+ const basegfx::B2DRange& rDefineRange) const;
+
+ // get average fill color; tries to calculate a 'medium' color
+ // which e.g. may be used as comparison to decide if other
+ // colors are visible
+ basegfx::BColor getAverageColor(const basegfx::BColor& rFallback) const;
+
+ // return if a repaint of this content needs a complete repaint. This
+ // is e.g. not needed for no fill or color fill (a partial repaint
+ // will do the trick), but necessary for everything that is not top-left
+ // oriented
+ bool needCompleteRepaint() const;
+ };
+
+} // end of namespace drawinglayer::attribute
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer::attribute
+{
+ typedef std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
+} // end of namespace drawinglayer::attribute
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/displayinfo.hxx b/include/svx/sdr/contact/displayinfo.hxx
new file mode 100644
index 000000000..7075b04cc
--- /dev/null
+++ b/include/svx/sdr/contact/displayinfo.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
+#define INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
+
+#include <svx/svdsob.hxx>
+#include <vcl/region.hxx>
+#include <svx/svxdllapi.h>
+#include <basegfx/range/b2irectangle.hxx>
+
+namespace sdr::contact
+ {
+ class SVXCORE_DLLPUBLIC DisplayInfo final
+ {
+ // The Layers which shall be processed (visible)
+ SdrLayerIDSet maProcessLayers;
+
+ // The redraw area, in logical coordinates of OutputDevice. If Region
+ // is empty, everything needs to be redrawn
+ vcl::Region maRedrawArea;
+
+ /// only for Writer: current page being painted
+ basegfx::B2IRectangle m_WriterPageFrame;
+
+ // Internal flag to know when the control layer is painted. Default is
+ // false. If set to true, painting of the page, page borders and
+ // the rasters will be suppressed as if mbPageProcessingActive is set (see there).
+ // This flag is set internally from the processing mechanism to avoid double page
+ // painting when the control layer needs to be painted as last layer
+ bool mbControlLayerProcessingActive : 1;
+
+ // Internal flag to decide if page stuff (background, border, MasterPage, grid, etc...)
+ // will be processed at all. This flag is user-defined and will not be changed from the
+ // processing mechanism. Default is true, thus set to false if PagePainting should be suppressed.
+ // For more granular switching page stuff painting on and off, use the according flags at the
+ // view (->Is*Visible())
+ bool mbPageProcessingActive : 1;
+
+ // Internal flag to remember if EnteredGroupDrawMode is active. Default is true
+ // since this mode starts activated and gets switched off when reaching
+ // the current group level. Should only be changed by instances which do
+ // primitive processing
+ bool mbGhostedDrawModeActive : 1;
+
+ // Internal flag to know if a MasterPage is processed as SubContent of another
+ // page. Initialized to false, this should only be changed from the instance which
+ // is processing the MasterPage asSubContent and knows what it does
+ bool mbSubContentActive : 1;
+
+ public:
+ // basic constructor.
+ DisplayInfo();
+
+ // access to ProcessLayers
+ void SetProcessLayers(const SdrLayerIDSet& rSet);
+ const SdrLayerIDSet& GetProcessLayers() const { return maProcessLayers; }
+
+ // access to RedrawArea
+ void SetRedrawArea(const vcl::Region& rRegion);
+ const vcl::Region& GetRedrawArea() const { return maRedrawArea; }
+
+ void SetWriterPageFrame(basegfx::B2IRectangle const& rPageFrame);
+ basegfx::B2IRectangle const& GetWriterPageFrame() const { return m_WriterPageFrame; }
+
+ // Access to ControlLayerProcessingActive flag
+ void SetControlLayerProcessingActive(bool bDoPaint);
+ bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; }
+
+ // Access to PageProcessingActive flag
+ void SetPageProcessingActive(bool bDoPaint);
+ bool GetPageProcessingActive() const { return mbPageProcessingActive; }
+
+ // Save the original DrawMode from outdev
+ void ClearGhostedDrawMode();
+ void SetGhostedDrawMode();
+ bool IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; }
+
+ // access to master page painting flag
+ bool GetSubContentActive() const { return mbSubContentActive; }
+ void SetSubContentActive(bool bNew);
+ };
+
+} // end of namespace sdr::contact
+
+
+#endif // INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/objectcontact.hxx b/include/svx/sdr/contact/objectcontact.hxx
new file mode 100644
index 000000000..3e9b1b76d
--- /dev/null
+++ b/include/svx/sdr/contact/objectcontact.hxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_OBJECTCONTACT_HXX
+#define INCLUDED_SVX_SDR_CONTACT_OBJECTCONTACT_HXX
+
+#include <svx/sdr/animation/objectanimator.hxx>
+#include <svx/sdr/animation/animationstate.hxx>
+#include <svx/svxdllapi.h>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+class SdrLayerIDSet;
+namespace tools { class Rectangle; }
+class SdrPageView;
+class OutputDevice;
+
+namespace basegfx {
+ class B2DRange;
+ class B2DHomMatrix;
+}
+
+namespace sdr::contact {
+
+class DisplayInfo;
+class ViewContact;
+class ViewObjectContactRedirector;
+
+class SVXCORE_DLLPUBLIC ObjectContact
+{
+private:
+ // make ViewObjectContact a friend to exclusively allow it to use
+ // AddViewObjectContact/RemoveViewObjectContact
+ friend class ViewObjectContact;
+
+ // All VOCs which are created using this OC, thus remembering this OC
+ // as a reference. All those VOCs need to be deleted when the OC goes down.
+ // Registering and de-registering is done in the VOC constructors/destructors.
+ std::vector< ViewObjectContact* > maViewObjectContactVector;
+
+ // A new ViewObjectContact was created and shall be remembered.
+ void AddViewObjectContact(ViewObjectContact& rVOContact);
+
+ // A ViewObjectContact was deleted and shall be forgotten.
+ void RemoveViewObjectContact(ViewObjectContact& rVOContact);
+
+ // the primitiveAnimator which is used if this View and/or the contained primitives
+ // support animatedSwitchPrimitives
+ sdr::animation::primitiveAnimator maPrimitiveAnimator;
+
+ // The redirector. If set it is used to pipe all supported calls
+ // to the redirector
+ ViewObjectContactRedirector* mpViewObjectContactRedirector;
+
+ // the Primitive2DParameters containing view information
+ drawinglayer::geometry::ViewInformation2D maViewInformation2D;
+
+ // flag for preview renderer
+ bool mbIsPreviewRenderer : 1;
+
+protected:
+ // Interface to allow derivates to travel over the registered VOC's
+ sal_uInt32 getViewObjectContactCount() const { return maViewObjectContactVector.size(); }
+ ViewObjectContact* getViewObjectContact(sal_uInt32 a) const { return maViewObjectContactVector[a]; }
+
+ // interface to allow derivates to set PreviewRenderer flag
+ void setPreviewRenderer(bool bNew) { mbIsPreviewRenderer = bNew; }
+
+ // interface to allow derivates to set ViewInformation2D
+ void updateViewInformation2D(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D) { maViewInformation2D = rViewInformation2D; }
+
+public:
+ // basic constructor
+ ObjectContact();
+ virtual ~ObjectContact() COVERITY_NOEXCEPT_FALSE;
+
+ // LazyInvalidate request. This is used from the VOCs to mark that they
+ // got invalidated by an ActionChanged() call. An active view needs to remember
+ // this and take action on it. Default implementation directly calls back
+ // triggerLazyInvalidate() which promptly handles the request
+ virtual void setLazyInvalidate(ViewObjectContact& rVOC);
+
+ // call this to support evtl. preparations for repaint. Default does nothing
+ virtual void PrepareProcessDisplay();
+
+ // Process the whole displaying
+ virtual void ProcessDisplay(DisplayInfo& rDisplayInfo);
+
+ // test if visualizing of entered groups is switched on at all. Default
+ // implementation returns sal_False.
+ virtual bool DoVisualizeEnteredGroup() const;
+
+ // get active group's (the entered group) ViewContact
+ virtual const ViewContact* getActiveViewContact() const;
+
+ // Invalidate given rectangle at the window/output which is represented by
+ // this ObjectContact. Default does nothing.
+ virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const;
+
+ // Get info about the need to visualize GluePoints. The default
+ // is that it is not necessary.
+ virtual bool AreGluePointsVisible() const;
+
+ // method to get the primitiveAnimator
+ sdr::animation::primitiveAnimator& getPrimitiveAnimator() { return maPrimitiveAnimator; }
+
+ // check if text animation is allowed. Default is sal_true.
+ virtual bool IsTextAnimationAllowed() const;
+
+ // check if graphic animation is allowed. Default is sal_true.
+ virtual bool IsGraphicAnimationAllowed() const;
+
+ // access to ViewObjectContactRedirector
+ ViewObjectContactRedirector* GetViewObjectContactRedirector() const { return mpViewObjectContactRedirector; }
+ void SetViewObjectContactRedirector(ViewObjectContactRedirector* pNew);
+
+ // print? Default is false
+ virtual bool isOutputToPrinter() const;
+
+ // recording MetaFile? Default is false
+ virtual bool isOutputToRecordingMetaFile() const;
+
+ // pdf export? Default is false
+ virtual bool isOutputToPDFFile() const;
+ virtual bool isExportTaggedPDF() const;
+
+ // gray display mode
+ virtual bool isDrawModeGray() const;
+
+ // high contrast display mode
+ virtual bool isDrawModeHighContrast() const;
+
+ // check if this is a preview renderer. Default is sal_False.
+ bool IsPreviewRenderer() const { return mbIsPreviewRenderer; }
+
+ // get Primitive2DParameters for this view
+ const drawinglayer::geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; }
+
+ /// access to SdrPageView. May return 0L like the default implementations do. Override as needed.
+ virtual SdrPageView* TryToGetSdrPageView() const;
+
+ /// access to OutputDevice. May return 0L like the default implementations do. Override as needed.
+ virtual OutputDevice* TryToGetOutputDevice() const;
+
+ // interface to support GridOffset for non-linear ViewToDevice transformation (calc)
+ virtual bool supportsGridOffsets() const;
+ virtual void calculateGridOffsetForViewOjectContact(
+ basegfx::B2DVector& rTarget,
+ const ViewObjectContact& rClient) const;
+ virtual void calculateGridOffsetForB2DRange(
+ basegfx::B2DVector& rTarget,
+ const basegfx::B2DRange& rB2DRange) const;
+ void resetAllGridOffsets();
+};
+
+}
+
+
+#endif // INCLUDED_SVX_SDR_CONTACT_OBJECTCONTACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/objectcontactofpageview.hxx b/include/svx/sdr/contact/objectcontactofpageview.hxx
new file mode 100644
index 000000000..8d18083b9
--- /dev/null
+++ b/include/svx/sdr/contact/objectcontactofpageview.hxx
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
+#define INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
+
+#include <svx/sdr/contact/objectcontact.hxx>
+#include <vcl/idle.hxx>
+
+class SdrPageWindow;
+class SdrPage;
+
+namespace sdr::contact
+ {
+ class SVXCORE_DLLPUBLIC ObjectContactOfPageView : public ObjectContact, public Idle
+ {
+ // the owner of this ObjectContactOfPageView. Set from constructor and not
+ // to be changed in any way.
+ SdrPageWindow& mrPageWindow;
+
+ // Process the whole displaying, the real version
+ void DoProcessDisplay(DisplayInfo& rDisplayInfo);
+
+ public:
+ // access to SdrPageWindow
+ SdrPageWindow& GetPageWindow() const { return mrPageWindow; }
+
+ // access to SdrPage of PageView
+ SdrPage* GetSdrPage() const;
+
+ // basic constructor, used from SdrPageView.
+ explicit ObjectContactOfPageView(SdrPageWindow& rPageWindow,
+ const char *pDebugName);
+ virtual ~ObjectContactOfPageView() override;
+
+ // LazyInvalidate request. This is used from the VOCs to mark that they
+ // got invalidated by an ActionChanged() call. An active view needs to remember
+ // this and take action on it. Default implementation directly calls back
+ // triggerLazyInvalidate() which promptly handles the request
+ virtual void setLazyInvalidate(ViewObjectContact& rVOC) override;
+
+ // call this to support evtl. preparations for repaint
+ virtual void PrepareProcessDisplay() override;
+
+ // From baseclass Timer, the timeout call triggered by the LazyInvalidate mechanism
+ virtual void Invoke() final override;
+
+ // Process the whole displaying
+ virtual void ProcessDisplay(DisplayInfo& rDisplayInfo) override;
+
+ // test if visualizing of entered groups is switched on at all
+ virtual bool DoVisualizeEnteredGroup() const override;
+
+ // get active group's (the entered group) ViewContact
+ virtual const ViewContact* getActiveViewContact() const override;
+
+ // Invalidate given rectangle at the window/output which is represented by
+ // this ObjectContact.
+ virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const override;
+
+ // Get info about the need to visualize GluePoints. The default
+ // is that it is not necessary.
+ virtual bool AreGluePointsVisible() const override;
+
+ // check if text animation is allowed.
+ virtual bool IsTextAnimationAllowed() const override;
+
+ // check if graphic animation is allowed.
+ virtual bool IsGraphicAnimationAllowed() const override;
+
+ // print? Default is false
+ virtual bool isOutputToPrinter() const override;
+
+ // recording MetaFile? Default is false
+ virtual bool isOutputToRecordingMetaFile() const override;
+
+ // pdf export? Default is false
+ virtual bool isOutputToPDFFile() const override;
+ virtual bool isExportTaggedPDF() const override;
+
+ // gray display mode
+ virtual bool isDrawModeGray() const override;
+
+ // high contrast display mode
+ virtual bool isDrawModeHighContrast() const override;
+
+ // override access to SdrPageView
+ virtual SdrPageView* TryToGetSdrPageView() const override;
+
+ // access to OutputDevice. May return 0L like the default implementations do. Override as needed.
+ virtual OutputDevice* TryToGetOutputDevice() const override;
+
+ /** sets all UNO controls which are associated with this ObjectContact to
+ design or alive mode.
+ */
+ void SetUNOControlsDesignMode( bool _bDesignMode ) const;
+ };
+} // end of namespace sdr::contact
+
+#endif // INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx
new file mode 100644
index 000000000..ffdc6d055
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontact.hxx
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACT_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACT_HXX
+
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
+class SdrLayerIDSet;
+class SdrPage;
+class SdrObject;
+
+namespace sdr::contact
+{
+class ObjectContact;
+class ViewObjectContact;
+
+class SVXCORE_DLLPUBLIC ViewContact
+{
+private:
+ // make ViewObjectContact a friend to exclusively allow it to use
+ // AddViewObjectContact/RemoveViewObjectContact
+ friend class ViewObjectContact;
+
+ // List of ViewObjectContacts. This contains all VOCs which were constructed
+ // with this VC. Since the VOCs remember a reference to this VC, this list needs
+ // to be kept and is used e.g. at destructor to destroy all VOCs.
+ // Registering and de-registering is done in the VOC constructors/destructors.
+ std::vector<ViewObjectContact*> maViewObjectContactVector;
+
+ // Primitive2DContainer of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all VCs which
+ // can be visualized.
+ drawinglayer::primitive2d::Primitive2DContainer mxViewIndependentPrimitive2DSequence;
+
+ // A new ViewObjectContact was created and shall be remembered.
+ void AddViewObjectContact(ViewObjectContact& rVOContact);
+
+ // A ViewObjectContact was deleted and shall be forgotten.
+ void RemoveViewObjectContact(ViewObjectContact& rVOContact);
+
+ // internal tooling to delete VOCs
+ void deleteAllVOCs();
+
+protected:
+ // Interface to allow derivates to travel over the registered VOC's
+ sal_uInt32 getViewObjectContactCount() const { return maViewObjectContactVector.size(); }
+ ViewObjectContact* getViewObjectContact(sal_uInt32 a) const
+ {
+ return maViewObjectContactVector[a];
+ }
+
+ // Create an Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something. Default is to create
+ // a standard ViewObjectContact containing the given ObjectContact and *this
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
+ // This method is responsible for creating the graphical visualisation data derived ONLY from
+ // the model data. It will be stored/buffered in mxViewIndependentPrimitive2DSequence. The default implementation
+ // creates a yellow replacement rectangle (1000, 1000, 5000, 3000) to visualize missing
+ // implementations. All implementations have to provide basic geometry here, this is the central
+ // visualisation method and will also be used for BoundRect computations in the long run.
+ // This means it's always an error when the default implementation is called and thus gets
+ // asserted there
+ virtual void createViewIndependentPrimitive2DSequence(
+ drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const;
+
+ // basic constructor. Since this is a base class only, it shall
+ // never be called directly
+ ViewContact();
+
+public:
+ // basic destructor with needed cleanups
+ virtual ~ViewContact();
+
+ // get an Object-specific ViewObjectContact for a specific
+ // ObjectContact (->View). Always needs to return something.
+ ViewObjectContact& GetViewObjectContact(ObjectContact& rObjectContact);
+
+ // Test if this ViewContact has ViewObjectContacts(excluding previews) at all. This can
+ // be used to test if this ViewContact is visualized ATM or not
+ bool HasViewObjectContacts() const;
+
+ // Check if this primitive is animated in any OC (View) which means it has
+ // generated a PrimitiveAnimation in its VOC
+ bool isAnimatedInAnyViewObjectContact() const;
+
+ // Access to possible sub-hierarchy and parent. GetObjectCount() default is 0L
+ // and GetViewContact default pops up an assert since it's an error if
+ // GetObjectCount has a result != 0 and it's not overridden.
+ virtual sal_uInt32 GetObjectCount() const;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
+ virtual ViewContact* GetParentContact() const;
+
+ // React on insertion of a child into DRawHierarchy starting
+ // from this object
+ void ActionChildInserted(ViewContact& rChild);
+
+ // access to SdrObject. May return 0L like the default
+ // implementations do. Override as needed.
+ virtual SdrObject* TryToGetSdrObject() const;
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // access to the local primitive. This will ensure that the primitive is
+ // current in comparing the local one with a fresh created incarnation
+ void getViewIndependentPrimitive2DContainer(
+ drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const;
+
+ // add Gluepoints (if available)
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ createGluePointPrimitive2DSequence() const;
+
+ // Allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
+ // is a helper normally used from getViewIndependentPrimitive2DContainer(), but there is one exception
+ // for 3D scenes.
+ // We take the param by value, since, for the common case, we can just std::move into the param, and
+ // std::move the result out, avoiding copying.
+ virtual drawinglayer::primitive2d::Primitive2DContainer
+ embedToObjectSpecificInformation(drawinglayer::primitive2d::Primitive2DContainer rSource) const;
+
+ virtual basegfx::B2DRange
+ getRange(const drawinglayer::geometry::ViewInformation2D& rViewInfo2D) const;
+
+ // delete all existing VOCs including DrawHierarchy which will invalidate all
+ // visualisations, too. Used mostly at object removal from DrawHierarchy to
+ // delete all existing VOCs by purpose, but can also be used for other purposes.
+ // It is always possible to delete the VOCs, these are re-created on demand
+ void flushViewObjectContacts(bool bWithHierarchy = true);
+};
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofe3dscene.hxx b/include/svx/sdr/contact/viewcontactofe3dscene.hxx
new file mode 100644
index 000000000..82de5435e
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofe3dscene.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
+
+#include <svx/scene3d.hxx>
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
+#include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
+#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
+#include <drawinglayer/geometry/viewinformation3d.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+
+namespace basegfx {
+ class B3DRange;
+}
+
+namespace sdr::contact {
+
+class SVXCORE_DLLPUBLIC ViewContactOfE3dScene final : public ViewContactOfSdrObj
+{
+public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfE3dScene(E3dScene& rScene);
+
+ // access to SdrObject
+ const E3dScene& GetE3dScene() const
+ {
+ return static_cast<const E3dScene&>(GetSdrObject());
+ }
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged() override;
+
+ // access to ViewInformation3D and ObjectTransformation
+ const drawinglayer::geometry::ViewInformation3D& getViewInformation3D(const ::basegfx::B3DRange& rContentRange) const;
+ const drawinglayer::geometry::ViewInformation3D& getViewInformation3D() const;
+ const basegfx::B2DHomMatrix& getObjectTransformation() const;
+
+ // attribute providers
+ const drawinglayer::attribute::SdrSceneAttribute& getSdrSceneAttribute() const;
+ const drawinglayer::attribute::SdrLightingAttribute& getSdrLightingAttribute() const;
+
+ // scene primitive creators. If pLayerVisibility is given, a visibility test with the LayerID and the
+ // given SdrLayerIDSet is done.
+ drawinglayer::primitive2d::Primitive2DContainer createScenePrimitive2DSequence(const SdrLayerIDSet* pLayerVisibility) const;
+
+ // helpers to get the sequence of all contained 3D primitives and its range,
+ // regardless of layer or visibility constraints and using a neutral ViewInformation3D
+ drawinglayer::primitive3d::Primitive3DContainer getAllPrimitive3DContainer() const;
+ basegfx::B3DRange getAllContentRange3D() const;
+
+private:
+ // Create an Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something. Default is to create
+ // a standard ViewObjectContact containing the given ObjectContact and *this
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
+
+ // create methods for ViewInformation3D and ObjectTransformation
+ void createViewInformation3D(const ::basegfx::B3DRange& rContentRange);
+ void createObjectTransformation();
+
+ // attribute creators
+ void createSdrSceneAttribute();
+ void createSdrLightingAttribute();
+
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual void createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override;
+
+ // the 3d transformation stack
+ drawinglayer::geometry::ViewInformation3D maViewInformation3D;
+
+ // the object transformation
+ basegfx::B2DHomMatrix maObjectTransformation;
+
+ // attributes
+ drawinglayer::attribute::SdrSceneAttribute maSdrSceneAttribute;
+ drawinglayer::attribute::SdrLightingAttribute maSdrLightingAttribute;
+};
+
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
new file mode 100644
index 000000000..4490818a0
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdomedia.hxx>
+#include <tools/gen.hxx>
+
+namespace avmedia
+{
+class MediaItem;
+}
+
+namespace sdr::contact
+{
+class SVXCORE_DLLPUBLIC ViewContactOfSdrMediaObj final : public ViewContactOfSdrObj
+{
+ friend class ViewObjectContactOfSdrMediaObj;
+
+public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrMediaObj(SdrMediaObj& rMediaObj);
+ virtual ~ViewContactOfSdrMediaObj() override;
+
+public:
+ // access to SdrMediaObj
+ const SdrMediaObj& GetSdrMediaObj() const
+ {
+ return static_cast<const SdrMediaObj&>(GetSdrObject());
+ }
+
+ Size getPreferredSize() const;
+
+ void updateMediaItem(::avmedia::MediaItem& rItem) const;
+ void executeMediaItem(const ::avmedia::MediaItem& rItem);
+
+private:
+ // Create an Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact&
+ CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
+
+ // get notified if some properties have changed
+ void mediaPropertiesChanged(const ::avmedia::MediaItem& rNewState);
+
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual void createViewIndependentPrimitive2DSequence(
+ drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override;
+};
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofsdrobj.hxx b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
new file mode 100644
index 000000000..788c8058d
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofsdrobj.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
+
+#include <sal/types.h>
+#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/svxdllapi.h>
+
+class SdrObject;
+
+namespace sdr::contact {
+
+class SVXCORE_DLLPUBLIC ViewContactOfSdrObj : public ViewContact
+{
+protected:
+ // the owner of this ViewContact. Set from constructor and not
+ // to be changed in any way.
+ SdrObject& mrObject;
+
+ // Create an Object-Specific ViewObjectContact, set ViewContact and
+ // ObjectContact. Always needs to return something.
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override;
+
+public:
+ // access to SdrObject
+ SdrObject& GetSdrObject() const
+ {
+ return mrObject;
+ }
+
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfSdrObj(SdrObject& rObj);
+ virtual ~ViewContactOfSdrObj() override;
+
+ // Access to possible sub-hierarchy
+ virtual sal_uInt32 GetObjectCount() const override;
+ virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const override;
+ virtual ViewContact* GetParentContact() const override;
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged() override;
+
+ /// override for accessing the SdrObject
+ virtual SdrObject* TryToGetSdrObject() const override;
+
+
+ // primitive stuff
+
+ // add Gluepoints (if available)
+ virtual drawinglayer::primitive2d::Primitive2DContainer createGluePointPrimitive2DSequence() const override;
+
+ // allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This
+ // is a helper normally used from getViewIndependentPrimitive2DContainer(), but there is one exception
+ // for 3D scenes
+ virtual drawinglayer::primitive2d::Primitive2DContainer embedToObjectSpecificInformation(drawinglayer::primitive2d::Primitive2DContainer aSource) const override;
+};
+
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewcontactofvirtobj.hxx b/include/svx/sdr/contact/viewcontactofvirtobj.hxx
new file mode 100644
index 000000000..3054e63f3
--- /dev/null
+++ b/include/svx/sdr/contact/viewcontactofvirtobj.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
+
+#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
+
+class SdrVirtObj;
+
+namespace sdr::contact
+{
+class SVXCORE_DLLPUBLIC ViewContactOfVirtObj : public ViewContactOfSdrObj
+{
+protected:
+ // internal access to SdrObject. Implementation in *.cxx to avoid
+ // including SdrVirtObj here.
+ SdrVirtObj& GetVirtObj() const;
+
+public:
+ // basic constructor, used from SdrObject.
+ explicit ViewContactOfVirtObj(SdrVirtObj& rObj);
+ virtual ~ViewContactOfVirtObj() override;
+
+ // Access to possible sub-hierarchy
+ virtual sal_uInt32 GetObjectCount() const override;
+
+protected:
+ // This method is responsible for creating the graphical visualisation data
+ // ONLY based on model data
+ virtual void createViewIndependentPrimitive2DSequence(
+ drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override;
+};
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx b/include/svx/sdr/contact/viewobjectcontact.hxx
new file mode 100644
index 000000000..1be4cac81
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACT_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACT_HXX
+
+#include <memory>
+#include <svx/svxdllapi.h>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
+namespace vcl { class Region; }
+
+namespace sdr::animation {
+ class PrimitiveAnimation;
+}
+namespace drawinglayer::primitive2d { class Primitive2DDecompositionVisitor; }
+
+namespace sdr::contact {
+
+class DisplayInfo;
+class ObjectContact;
+class ViewContact;
+class ViewObjectContactRedirector;
+
+class SVXCORE_DLLPUBLIC ViewObjectContact
+{
+private:
+ // must-exist and constant contacts
+ ObjectContact& mrObjectContact;
+ ViewContact& mrViewContact;
+
+ // This range defines the object's BoundRect
+ basegfx::B2DRange maObjectRange;
+
+ // PrimitiveSequence of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all VCs which
+ // can be visualized.
+ drawinglayer::primitive2d::Primitive2DContainer mxPrimitive2DSequence;
+
+ // the PrimitiveAnimation if Primitive2DContainer contains animations
+ std::unique_ptr<sdr::animation::PrimitiveAnimation> mpPrimitiveAnimation;
+
+ // possible on-demand calculated GridOffset for non-linear ViewToDevice transformation (calc)
+ basegfx::B2DVector maGridOffset;
+
+ // used to detect ActionChanged() during primitive construction
+ int mnActionChangedCount;
+
+ // This bool gets set when the object gets invalidated by ActionChanged() and
+ // can be used from the OC to late-invalidates
+ bool mbLazyInvalidate : 1;
+
+protected:
+ // make redirector a protected friend, it needs to call createPrimitives as default action
+ friend class ViewObjectContactRedirector;
+
+ // Called from getPrimitive2DSequence() when vector has changed. Evaluate object animation
+ // and setup accordingly
+ void checkForPrimitive2DAnimations();
+
+ // This method is responsible for creating the graphical visualisation data which is
+ // stored/cached in the local primitive. Default gets view-independent Primitive
+ // from the ViewContact using ViewContact::getViewIndependentPrimitive2DContainer(), takes care of
+ // visibility, handles glue and ghosted.
+ // This method will not handle included hierarchies and not check geometric visibility.
+ virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const;
+
+ // method for flushing Primitive2DContainer for VOC implementations
+ void flushPrimitive2DSequence() { mxPrimitive2DSequence.clear(); }
+
+public:
+ // basic constructor.
+ ViewObjectContact(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContact();
+
+ // access to ObjectContact
+ ObjectContact& GetObjectContact() const { return mrObjectContact; }
+
+ // access to ViewContact
+ ViewContact& GetViewContact() const { return mrViewContact; }
+
+ // get the object size range
+ const basegfx::B2DRange& getObjectRange() const;
+
+ // React on changes of the object of this ViewContact
+ virtual void ActionChanged();
+
+ // LazyInvalidate handling
+ void triggerLazyInvalidate();
+
+ // Check if this primitive is animated in any OC (View) which means it has
+ // generated a PrimitiveAnimation
+ bool isAnimated() const { return (nullptr != mpPrimitiveAnimation); }
+
+ // Take some action when new objects are inserted
+ void ActionChildInserted(ViewContact& rChild);
+
+ // access to the local primitive. This will ensure that the local primitive is
+ // current in comparing the local one with a fresh created incarnation
+ // This method will not handle included hierarchies and not check visibility.
+ drawinglayer::primitive2d::Primitive2DContainer const & getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+
+ // test this VOC for visibility concerning model-view stuff like e.g. Layer
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;
+
+ // test this VOC for ghosted mode
+ virtual bool isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const;
+
+ // process this primitive: Eventually also recursively travel an existing hierarchy,
+ // e.g. for group objects, scenes or pages. This method will test geometrical visibility.
+ virtual void getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const;
+
+ // just process the sub-hierarchy, used as tooling from getPrimitive2DSequenceHierarchy
+ void getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const;
+
+ // interface to support GridOffset for non-linear ViewToDevice transformation (calc)
+ const basegfx::B2DVector& getGridOffset() const;
+ void resetGridOffset();
+};
+
+}
+
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx b/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx
new file mode 100644
index 000000000..5989559c7
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
+
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+
+class SdrObject;
+class SdrLayerIDSet;
+class OutputDevice;
+
+namespace sdr::contact
+{
+class SVXCORE_DLLPUBLIC ViewObjectContactOfSdrObj : public ViewObjectContact
+{
+ /** Test whether the primitive is visible on any layer from @c aLayers
+
+ This should be overridden by ViewObjectContacts of SDR classes
+ that have subparts which can be on different layers (that is,
+ SdrObjGroup .-)
+ */
+ virtual bool isPrimitiveVisibleOnAnyLayer(const SdrLayerIDSet& aLayers) const;
+
+protected:
+ const SdrObject& getSdrObject() const;
+
+public:
+ ViewObjectContactOfSdrObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfSdrObj() override;
+
+ virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override;
+
+ /** retrieves the device which a PageView belongs to, starting from its ObjectContactOfPageView
+
+ Since #i72752#, the PaintWindow (and thus the OutputDevice) associated with a PageView is not
+ constant over its lifetime. Instead, during some paint operations, the PaintWindow/OutputDevice
+ might be temporarily patched.
+
+ This method cares for this, by retrieving the very original OutputDevice.
+ */
+ const OutputDevice* getPageViewOutputDevice() const;
+};
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/contact/viewobjectcontactredirector.hxx b/include/svx/sdr/contact/viewobjectcontactredirector.hxx
new file mode 100644
index 000000000..100d2ad87
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactredirector.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
+
+#include <svx/svxdllapi.h>
+#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
+
+namespace sdr::contact {
+
+class DisplayInfo;
+class ViewObjectContact;
+
+// This class provides a mechanism to redirect the paint mechanism for all or
+// single ViewObjectContacts. An own derivation may be set at single ViewContacts
+// or at the ObjectContact for redirecting all. If both is used, the one at single
+// objects will have priority.
+class SVXCORE_DLLPUBLIC ViewObjectContactRedirector
+{
+public:
+ // basic constructor.
+ ViewObjectContactRedirector();
+
+ // The destructor.
+ virtual ~ViewObjectContactRedirector();
+
+ // all default implementations just call the same methods at the original. To do something
+ // different, override the method and at least do what the method does.
+ virtual void createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo,
+ drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor);
+};
+
+}
+
+#endif // INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
new file mode 100644
index 000000000..cf1b41136
--- /dev/null
+++ b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYANIMATEDBITMAPEX_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYANIMATEDBITMAPEX_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <vcl/bitmapex.hxx>
+
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayAnimatedBitmapEx final : public OverlayObjectWithBasePosition
+ {
+ // the Bitmaps
+ BitmapEx maBitmapEx1;
+ BitmapEx maBitmapEx2;
+
+ // position of the basePosition inside the Bitmaps, in pixels
+ sal_uInt16 mnCenterX1;
+ sal_uInt16 mnCenterY1;
+ sal_uInt16 mnCenterX2;
+ sal_uInt16 mnCenterY2;
+
+ // #i53216# added CursorBlinkTime (in ms)
+ sal_uInt32 mnBlinkTime;
+
+ // optional shear and rotation
+ double mfShearX;
+ double mfRotation;
+
+ // Flag to remember which state to draw. Inited with false (0)
+ bool mbOverlayState : 1;
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
+
+ public:
+ OverlayAnimatedBitmapEx(
+ const basegfx::B2DPoint& rBasePos,
+ const BitmapEx& rBitmapEx1,
+ const BitmapEx& rBitmapEx2,
+ sal_uInt64 nBlinkTime,
+ sal_uInt16 nCenX1 = 0,
+ sal_uInt16 nCenY1 = 0,
+ sal_uInt16 nCenX2 = 0,
+ sal_uInt16 nCenY2 = 0,
+ double fShearX = 0.0,
+ double fRotation = 0.0);
+ virtual ~OverlayAnimatedBitmapEx() override;
+
+ // execute event from base class sdr::animation::Event. Default
+ // implementation does nothing and does not create a new event.
+ virtual void Trigger(sal_uInt32 nTime) override;
+
+ // get shearX and rotation
+ double getShearX() const { return mfShearX; }
+ double getRotation() const { return mfRotation; }
+ };
+} // end of namespace sdr::overlay
+
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYANIMATEDBITMAPEX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlaybitmapex.hxx b/include/svx/sdr/overlay/overlaybitmapex.hxx
new file mode 100644
index 000000000..42de7d653
--- /dev/null
+++ b/include/svx/sdr/overlay/overlaybitmapex.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYBITMAPEX_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYBITMAPEX_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <vcl/bitmapex.hxx>
+
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayBitmapEx final : public OverlayObjectWithBasePosition
+ {
+ // the Bitmap itself
+ BitmapEx maBitmapEx;
+
+ // position of the basePosition inside the Bitmap, in pixels
+ sal_uInt16 mnCenterX;
+ sal_uInt16 mnCenterY;
+
+ // optional transparency, shear and rotation
+ double mfAlpha;
+ double mfShearX;
+ double mfRotation;
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
+
+ public:
+ OverlayBitmapEx(
+ const basegfx::B2DPoint& rBasePos,
+ const BitmapEx& rBitmapEx,
+ sal_uInt16 nCenX = 0,
+ sal_uInt16 nCenY = 0,
+ double fAlpha = 0.0,
+ double fShearX = 0.0,
+ double fRotation = 0.0);
+ virtual ~OverlayBitmapEx() override;
+ };
+} // end of namespace sdr::overlay
+
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYBITMAPEX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlaymanager.hxx b/include/svx/sdr/overlay/overlaymanager.hxx
new file mode 100644
index 000000000..696cf5c99
--- /dev/null
+++ b/include/svx/sdr/overlay/overlaymanager.hxx
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYMANAGER_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYMANAGER_HXX
+
+#include <rtl/ref.hxx>
+#include <svx/sdr/animation/scheduler.hxx>
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <tools/color.hxx>
+#include <tools/gen.hxx>
+#include <svx/svxdllapi.h>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+
+class OutputDevice;
+class SdrModel;
+namespace vcl { class Region; }
+
+namespace sdr::overlay {
+ class OverlayObject;
+}
+
+namespace basegfx {
+ class B2DRange;
+}
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayManager
+ : protected sdr::animation::Scheduler
+ , public salhelper::SimpleReferenceObject
+ {
+ private:
+ OverlayManager(const OverlayManager&) = delete;
+ OverlayManager& operator=(const OverlayManager&) = delete;
+
+ protected:
+ // the OutputDevice to work on, set on construction and not to be changed
+ OutputDevice& mrOutputDevice;
+
+ // the vector of registered OverlayObjects
+ OverlayObjectVector maOverlayObjects;
+
+ // Stripe support. All striped OverlayObjects use these stripe
+ // values. Changes change all those objects.
+ Color maStripeColorA; // defaults to COL_BLACK
+ Color maStripeColorB; // defaults to COL_WHITE
+ sal_uInt32 mnStripeLengthPixel; // defaults to 4L
+
+ // hold buffered the logic length of discrete vector (1.0, 0.0) and the
+ // view transformation belonging to it. Update happens in getDiscreteOne()
+ basegfx::B2DHomMatrix maViewTransformation;
+ drawinglayer::geometry::ViewInformation2D maViewInformation2D;
+ double mfDiscreteOne;
+
+ // internal
+ void ImpDrawMembers(const basegfx::B2DRange& rRange, OutputDevice& rDestinationDevice) const;
+ void ImpStripeDefinitionChanged();
+ void impApplyRemoveActions(OverlayObject& rTarget);
+ void impApplyAddActions(OverlayObject& rTarget);
+
+ // return mfDiscreteOne to derivations, but also check for buffered local
+ // ViewTransformation and evtl. correct mfDiscreteOne
+ double getDiscreteOne() const;
+
+ tools::Rectangle RangeToInvalidateRectangle(const basegfx::B2DRange& rRange) const;
+
+ OverlayManager(OutputDevice& rOutputDevice);
+ virtual ~OverlayManager() override;
+
+ public:
+ static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice);
+
+ // access to current ViewInformation2D; this call checks and evtl. updates ViewInformation2D
+ drawinglayer::geometry::ViewInformation2D const & getCurrentViewInformation2D() const;
+
+ // complete redraw
+ virtual void completeRedraw(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice = nullptr) const;
+
+ // flush. Do buffered updates.
+ virtual void flush();
+
+ // get the OutputDevice
+ OutputDevice& getOutputDevice() const { return mrOutputDevice; }
+
+ // add and remove OverlayObjects
+ void add(OverlayObject& rOverlayObject);
+ void remove(OverlayObject& rOverlayObject);
+
+ // invalidate the given range at local OutputDevice
+ virtual void invalidateRange(const basegfx::B2DRange& rRange);
+
+ // stripe support ColA
+ const Color& getStripeColorA() const { return maStripeColorA; }
+ void setStripeColorA(Color aNew);
+
+ // stripe support ColB
+ const Color& getStripeColorB() const { return maStripeColorB; }
+ void setStripeColorB(Color aNew);
+
+ // stripe support StripeLengthPixel
+ sal_uInt32 getStripeLengthPixel() const { return mnStripeLengthPixel; }
+ void setStripeLengthPixel(sal_uInt32 nNew);
+
+ void InsertEvent(sdr::animation::Event& rNew) { Scheduler::InsertEvent(rNew); }
+ };
+
+} // end of namespace sdr::overlay
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlayobject.hxx b/include/svx/sdr/overlay/overlayobject.hxx
new file mode 100644
index 000000000..d4ef56646
--- /dev/null
+++ b/include/svx/sdr/overlay/overlayobject.hxx
@@ -0,0 +1,197 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYOBJECT_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYOBJECT_HXX
+
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <tools/color.hxx>
+#include <svx/sdr/animation/scheduler.hxx>
+#include <svx/svxdllapi.h>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
+#include <vector>
+
+class OutputDevice;
+
+namespace sdr::overlay
+{
+ class OverlayManager;
+}
+namespace basegfx
+{
+ class B2DPolygon;
+ class B2DPolyPolygon;
+ class B2DRange;
+}
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayObject : public sdr::animation::Event
+ {
+ private:
+ OverlayObject(const OverlayObject&) = delete;
+ OverlayObject& operator=(const OverlayObject&) = delete;
+
+ // Manager is allowed access to private Member mpOverlayManager
+ friend class OverlayManager;
+
+ // pointer to OverlayManager, if object is added. Changed by
+ // OverlayManager, do not change Yourself.
+ OverlayManager* mpOverlayManager;
+
+ // Primitive2DContainer of the OverlayObject
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence;
+
+ // Possible Offset added to the geometry (automatically in
+ // createOverlayObjectPrimitive2DSequence()). Usually zero, may
+ // be used e.g. from calc when GridOffset is needed
+ basegfx::B2DVector maOffset;
+
+ protected:
+ // access methods to maPrimitive2DSequence. The usage of this methods may allow
+ // later thread-safe stuff to be added if needed. Only to be used by getPrimitive2DSequence()
+ // implementations for buffering the last decomposition.
+ // Resetting is allowed e.g. in ::getOverlayObjectPrimitive2DSequence() implementations
+ // if the conditions have changed to force a re-creation in calling the base implementation.
+ // The only allowed setter of maPrimitive2DSequence is
+ // OverlayObject::getOverlayObjectPrimitive2DSequence() which should be called by calling
+ // the base implementation in derived functions. That one will use the result of
+ // createOverlayObjectPrimitive2DSequence() to provide the geometry.
+ const drawinglayer::primitive2d::Primitive2DContainer& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ void resetPrimitive2DSequence() { maPrimitive2DSequence.clear(); }
+
+ // the creation method for Primitive2DContainer. Called when getPrimitive2DSequence()
+ // sees that maPrimitive2DSequence is empty. Needs to be supported by all
+ // OverlayObject implementations. Default implementation will assert
+ // a missing implementation
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence();
+
+ // #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000)
+ static sal_uInt32 impCheckBlinkTimeValueRange(sal_uInt64 nBlinkTime);
+
+ // region in logical coordinates
+ basegfx::B2DRange maBaseRange;
+
+ // base color of this OverlayObject
+ Color maBaseColor;
+
+ // Flag for visibility
+ bool mbIsVisible : 1;
+
+ // Flag to control hittability
+ bool mbIsHittable : 1;
+
+ // Flag to hold info if this objects supports animation. Default is
+ // false. If true, the Trigger() method should be overridden
+ // to implement the animation effect and to re-initiate the event.
+ bool mbAllowsAnimation : 1;
+
+ // Flag to control if this OverlayObject allows AntiAliased visualisation.
+ // Default is true, but e.g. for selection visualisation in SC and SW,
+ // it is switched to false
+ bool mbAllowsAntiAliase : 1;
+
+ // set changed flag. Call after change, since the old range is invalidated
+ // and then the new one is calculated and invalidated, too. This will only
+ // work after the change.
+ void objectChange();
+
+ // write access to AntiAliase flag. This is protected since
+ // only implementations are allowed to change this, preferably in their
+ // constructor
+ void allowAntiAliase(bool bNew);
+
+ public:
+ explicit OverlayObject(Color aBaseColor);
+ virtual ~OverlayObject() override;
+
+ // get OverlayManager
+ OverlayManager* getOverlayManager() const { return mpOverlayManager; }
+
+ // the access method for Primitive2DContainer. Will use createPrimitive2DSequence and
+ // setPrimitive2DSequence if needed. Overriding may be used to allow disposal of last
+ // created primitives to react on changed circumstances and to re-create primitives
+ virtual drawinglayer::primitive2d::Primitive2DContainer getOverlayObjectPrimitive2DSequence() const;
+
+ // access to visibility state
+ bool isVisible() const { return mbIsVisible; }
+ void setVisible(bool bNew);
+
+ // access to hittable flag
+ bool isHittable() const { return mbIsHittable; }
+ void setHittable(bool bNew);
+
+ // read access to AntiAliase flag
+ bool allowsAntiAliase() const { return mbAllowsAntiAliase; }
+
+ // read access to baseRange. This may trigger createBaseRange() if
+ // object is changed.
+ const basegfx::B2DRange& getBaseRange() const;
+
+ // access to baseColor
+ const Color& getBaseColor() const { return maBaseColor; }
+ void setBaseColor(Color aNew);
+
+ // access to Offset
+ const basegfx::B2DVector& getOffset() const { return maOffset; }
+ void setOffset(const basegfx::B2DVector& rOffset);
+
+ // execute event from base class sdr::animation::Event. Default
+ // implementation does nothing and does not create a new event.
+ virtual void Trigger(sal_uInt32 nTime) override;
+
+ // access to AllowsAnimation flag
+ bool allowsAnimation() const { return mbAllowsAnimation; }
+
+ // stripe definition has changed. The OverlayManager does have
+ // support data to draw graphics in two colors striped. This
+ // method notifies the OverlayObject if that change takes place.
+ // Default implementation does nothing.
+ virtual void stripeDefinitionHasChanged();
+ };
+
+ // typedefs for a vector of OverlayObjects
+ typedef ::std::vector< OverlayObject* > OverlayObjectVector;
+
+} // end of namespace sdr::overlay
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayObjectWithBasePosition : public OverlayObject
+ {
+ protected:
+ // base position in logical coordinates
+ basegfx::B2DPoint maBasePosition;
+
+ public:
+ OverlayObjectWithBasePosition(const basegfx::B2DPoint& rBasePos, Color aBaseColor);
+ virtual ~OverlayObjectWithBasePosition() override;
+
+ // access to basePosition
+ const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
+ void setBasePosition(const basegfx::B2DPoint& rNew);
+ };
+
+} // end of namespace sdr::overlay
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYOBJECT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlayobjectlist.hxx b/include/svx/sdr/overlay/overlayobjectlist.hxx
new file mode 100644
index 000000000..6985a1b5a
--- /dev/null
+++ b/include/svx/sdr/overlay/overlayobjectlist.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYOBJECTLIST_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYOBJECTLIST_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <memory>
+#include <vector>
+
+
+class Point;
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayObjectList final
+ {
+ // the vector of OverlayObjects
+ ::std::vector< std::unique_ptr<OverlayObject> > maVector;
+
+ public:
+ OverlayObjectList() {}
+ OverlayObjectList(const OverlayObjectList&) = delete;
+ OverlayObjectList& operator=(const OverlayObjectList&) = delete;
+ ~OverlayObjectList();
+
+ // clear list, this includes deletion of all contained objects
+ void clear();
+
+ // append objects (takes ownership)
+ void append(std::unique_ptr<OverlayObject> pOverlayObject);
+
+ // access to objects
+ sal_uInt32 count() const { return maVector.size(); }
+ OverlayObject& getOverlayObject(sal_uInt32 nIndex) const { return *(maVector[nIndex]); }
+
+ // Hittest with logical coordinates
+ bool isHitLogic(const basegfx::B2DPoint& rLogicPosition, double fLogicTolerance = 0.0) const;
+
+ // Hittest with pixel coordinates
+ bool isHitPixel(const Point& rDiscretePosition) const;
+
+ // calculate BaseRange of all included OverlayObjects and return
+ basegfx::B2DRange getBaseRange() const;
+ };
+
+} // end of namespace sdr::overlay
+
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYOBJECTLIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlaypolypolygon.hxx b/include/svx/sdr/overlay/overlaypolypolygon.hxx
new file mode 100644
index 000000000..d3aa2074d
--- /dev/null
+++ b/include/svx/sdr/overlay/overlaypolypolygon.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYPOLYPOLYGON_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYPOLYPOLYGON_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+
+
+namespace sdr::overlay
+{
+ class SVXCORE_DLLPUBLIC OverlayPolyPolygon final : public OverlayObject
+ {
+ private:
+ basegfx::B2DPolyPolygon maLinePolyPolygon;
+ double mfLineWidth;
+ Color maFillColor;
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
+
+ public:
+ explicit OverlayPolyPolygon(const basegfx::B2DPolyPolygon& rLinePolyPolygon,
+ Color const & rLineColor,
+ double mfLineWidth,
+ Color const & rFillColor);
+ virtual ~OverlayPolyPolygon() override;
+ };
+
+ class SVXCORE_DLLPUBLIC OverlayPolyPolygonStripedAndFilled final : public OverlayObject
+ {
+ // geometry
+ basegfx::B2DPolyPolygon maLinePolyPolygon;
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
+
+ public:
+ explicit OverlayPolyPolygonStripedAndFilled(
+ const basegfx::B2DPolyPolygon& rLinePolyPolygon);
+ virtual ~OverlayPolyPolygonStripedAndFilled() override;
+
+ // change geometry
+ const basegfx::B2DPolyPolygon& getLinePolyPolygon() const { return maLinePolyPolygon; }
+
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged() override;
+ };
+
+} // end of namespace sdr::overlay
+
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYPOLYPOLYGON_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx b/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
new file mode 100644
index 000000000..06e7428de
--- /dev/null
+++ b/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYPRIMITIVE2DSEQUENCEOBJECT_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYPRIMITIVE2DSEQUENCEOBJECT_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+
+
+namespace sdr::overlay
+ {
+ class SVXCORE_DLLPUBLIC OverlayPrimitive2DSequenceObject final : public OverlayObjectWithBasePosition
+ {
+ // the sequence of primitives to show
+ const drawinglayer::primitive2d::Primitive2DContainer maSequence;
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
+
+ public:
+ explicit OverlayPrimitive2DSequenceObject(drawinglayer::primitive2d::Primitive2DContainer&& rSequence);
+
+ virtual ~OverlayPrimitive2DSequenceObject() override;
+ };
+
+} // end of namespace sdr::overlay
+
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYPRIMITIVE2DSEQUENCEOBJECT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlayselection.hxx b/include/svx/sdr/overlay/overlayselection.hxx
new file mode 100644
index 000000000..d456ac6bf
--- /dev/null
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYSELECTION_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYSELECTION_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+
+
+namespace sdr::overlay
+ {
+ // overlay type definition
+ enum class OverlayType
+ {
+ Invert,
+ Solid,
+ Transparent
+ };
+
+ class SVXCORE_DLLPUBLIC OverlaySelection final : public OverlayObject
+ {
+ // type of overlay
+ OverlayType meOverlayType;
+
+ // geometry of overlay
+ std::vector< basegfx::B2DRange > maRanges;
+
+ // Values of last primitive creation. These are checked in getOverlayObjectPrimitive2DSequence
+ // to evtl. get rid of last Primitive2DContainer. This ensures that these values are up-to-date
+ // and are usable when creating primitives
+ OverlayType maLastOverlayType;
+ sal_uInt16 mnLastTransparence;
+
+ bool mbBorder : 1;
+
+ // geometry creation for OverlayObject, can use local *Last* values
+ virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override;
+
+ public:
+ OverlaySelection(
+ OverlayType eType,
+ const Color& rColor,
+ std::vector< basegfx::B2DRange >&& rRanges,
+ bool bBorder);
+ virtual ~OverlaySelection() override;
+
+ // data read access
+ const std::vector< basegfx::B2DRange >& getRanges() const { return maRanges; }
+
+ /// override to check conditions for last createOverlayObjectPrimitive2DSequence
+ virtual drawinglayer::primitive2d::Primitive2DContainer getOverlayObjectPrimitive2DSequence() const override;
+
+ // data write access
+ void setRanges(std::vector< basegfx::B2DRange >&& rNew);
+ };
+} // end of namespace sdr::overlay
+
+
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYSELECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx b/include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx
new file mode 100644
index 000000000..40638aa9d
--- /dev/null
+++ b/include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
+#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
+
+#include <drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx>
+#include <svx/framelink.hxx>
+
+#include <memory>
+
+// predefines
+
+namespace drawinglayer::primitive2d
+ {
+ class SVXCORE_DLLPUBLIC SdrFrameBorderData
+ {
+ private:
+ basegfx::B2DPoint maOrigin; /// start point of borderline
+ basegfx::B2DVector maX; /// X-Axis of borderline with length
+ svx::frame::Style maStyle; /// Style of borderline
+ Color maColor;
+ bool mbForceColor;
+
+ class SdrConnectStyleData
+ {
+ private:
+ svx::frame::Style maStyle;
+ basegfx::B2DVector maNormalizedPerpendicular;
+ bool mbStyleMirrored;
+
+ public:
+ SdrConnectStyleData(
+ const svx::frame::Style& rStyle,
+ const basegfx::B2DVector& rNormalizedPerpendicular,
+ bool bStyleMirrored);
+
+ const svx::frame::Style& getStyle() const { return maStyle; }
+ const basegfx::B2DVector& getNormalizedPerpendicular() const { return maNormalizedPerpendicular; }
+ bool getStyleMirrored() const { return mbStyleMirrored; }
+ bool operator==(const SdrConnectStyleData& rCompare) const;
+ };
+
+ std::vector<SdrConnectStyleData> maStart;
+ std::vector<SdrConnectStyleData> maEnd;
+
+ public:
+ SdrFrameBorderData(
+ const basegfx::B2DPoint& rOrigin,
+ const basegfx::B2DVector& rX,
+ const svx::frame::Style& rStyle,
+ const Color* pForceColor);
+
+ void addSdrConnectStyleData(
+ bool bStart,
+ const svx::frame::Style& rStyle,
+ const basegfx::B2DVector& rNormalizedPerpendicular,
+ bool bStyleMirrored);
+
+ void create2DDecomposition(
+ Primitive2DContainer& rContainer,
+ double fMinDiscreteUnit) const;
+
+ double getMinimalNonZeroBorderWidth() const;
+ bool operator==(const SdrFrameBorderData& rCompare) const;
+ };
+
+ typedef std::vector<SdrFrameBorderData> SdrFrameBorderDataVector;
+
+} // end of namespace drawinglayer::primitive2d
+
+namespace drawinglayer::primitive2d
+ {
+ class SVXCORE_DLLPUBLIC SdrFrameBorderPrimitive2D final : public BufferedDecompositionPrimitive2D
+ {
+ private:
+ std::shared_ptr<SdrFrameBorderDataVector> maFrameBorders;
+ double mfMinimalNonZeroBorderWidth;
+ double mfMinimalNonZeroBorderWidthUsedForDecompose;
+ bool mbForceToSingleDiscreteUnit;
+
+ // local decomposition.
+ virtual void create2DDecomposition(
+ Primitive2DContainer& rContainer,
+ const geometry::ViewInformation2D& aViewInformation) const override;
+
+ public:
+ SdrFrameBorderPrimitive2D(
+ std::shared_ptr<SdrFrameBorderDataVector>& rFrameBorders,
+ bool bForceToSingleDiscreteUnit);
+
+ // compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
+
+ // override to get view-dependent
+ virtual void get2DDecomposition(
+ Primitive2DDecompositionVisitor& rVisitor,
+ const geometry::ViewInformation2D& rViewInformation) const override;
+
+ // data access
+ const std::shared_ptr<SdrFrameBorderDataVector>& getFrameBorders() const { return maFrameBorders; }
+ bool doForceToSingleDiscreteUnit() const { return mbForceToSingleDiscreteUnit; }
+
+ // provide unique ID
+ virtual sal_uInt32 getPrimitive2DID() const override;
+ };
+
+} // end of namespace drawinglayer::primitive2d
+
+
+#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx b/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
new file mode 100644
index 000000000..917d22f14
--- /dev/null
+++ b/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_PRIMITIVE2D_SVX_PRIMITIVETYPES2D_HXX
+#define INCLUDED_SVX_SDR_PRIMITIVE2D_SVX_PRIMITIVETYPES2D_HXX
+
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+
+
+#define PRIMITIVE2D_ID_SDRCAPTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 0)
+#define PRIMITIVE2D_ID_SDRCONNECTORPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 1)
+#define PRIMITIVE2D_ID_SDRCUSTOMSHAPEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 2)
+#define PRIMITIVE2D_ID_SDRELLIPSEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 3)
+#define PRIMITIVE2D_ID_SDRELLIPSESEGMENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 4)
+#define PRIMITIVE2D_ID_SDRGRAFPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 5)
+#define PRIMITIVE2D_ID_SDRMEASUREPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 6)
+#define PRIMITIVE2D_ID_SDROLE2PRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 7)
+#define PRIMITIVE2D_ID_SDRPATHPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 8)
+#define PRIMITIVE2D_ID_SDRRECTANGLEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 9)
+#define PRIMITIVE2D_ID_SDRCONTOURTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 10)
+#define PRIMITIVE2D_ID_SDRPATHTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 11)
+#define PRIMITIVE2D_ID_SDRBLOCKTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 12)
+#define PRIMITIVE2D_ID_SDRSTRETCHTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 13)
+#define PRIMITIVE2D_ID_SDRCELLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 14)
+#define PRIMITIVE2D_ID_OVERLAYBITMAPEXPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 15)
+#define PRIMITIVE2D_ID_OVERLAYCROSSHAIRPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 16)
+#define PRIMITIVE2D_ID_OVERLAYRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 17)
+#define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 18)
+#define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 19)
+#define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 20)
+#define PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 21)
+#define PRIMITIVE2D_ID_SDRAUTOFITTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 22)
+#define PRIMITIVE2D_ID_SDRCHAINEDTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 23)
+#define PRIMITIVE2D_ID_SDRFRAMEBORDERTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 24)
+#define PRIMITIVE2D_ID_OVERLAYDIAGRAMPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 25)
+#define PRIMITIVE2D_ID_SLIDEBACKGROUNDFILLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 26)
+
+
+#endif // INCLUDED_SVX_SDR_PRIMITIVE2D_SVX_PRIMITIVETYPES2D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx
new file mode 100644
index 000000000..bae37df27
--- /dev/null
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_PROPERTIES_DEFAULTPROPERTIES_HXX
+#define INCLUDED_SVX_SDR_PROPERTIES_DEFAULTPROPERTIES_HXX
+
+#include <sal/config.h>
+
+#include <optional>
+
+#include <svx/sdr/properties/properties.hxx>
+#include <svx/svxdllapi.h>
+#include <svl/itemset.hxx>
+#include <o3tl/span.hxx>
+
+struct _xmlTextWriter;
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
+
+namespace sdr::properties
+ {
+ class SVXCORE_DLLPUBLIC DefaultProperties : public BaseProperties
+ {
+ protected:
+ // the to be used ItemSet
+ mutable std::optional<SfxItemSet> mxItemSet;
+
+ // create a new object specific itemset with object specific ranges.
+ virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override;
+
+ // Test changeability for a single item. If an implementation wants to prevent
+ // changing an item it should override this method.
+ virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const;
+
+ // Do the internal ItemChange. If only nWhich is given, the item needs to be cleared.
+ // Also needs to handle if nWhich and pNewItem is 0, which means to clear all items.
+ virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr);
+
+ // Called after ItemChange() is done for all items. Allows local reactions on
+ // specific item changes
+ virtual void PostItemChange(const sal_uInt16 nWhich);
+
+ // Internally react on ItemSet changes. The given span contains changed items.
+ // If nDeletedWhich is not 0, it indicates a deleted item.
+ virtual void ItemSetChanged(o3tl::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich);
+
+ // check if SfxItemSet exists
+ bool HasSfxItemSet() const { return bool(mxItemSet); }
+
+ public:
+ // basic constructor
+ explicit DefaultProperties(SdrObject& rObj);
+
+ // constructor for copying, but using new object
+ DefaultProperties(const DefaultProperties& rProps, SdrObject& rObj);
+
+ // destructor
+ virtual ~DefaultProperties() override;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+
+ // Clone() operator, normally just calls the local copy constructor
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
+
+ // get itemset
+ virtual const SfxItemSet& GetObjectItemSet() const override;
+
+ // set single item
+ virtual void SetObjectItem(const SfxPoolItem& rItem) override;
+
+ // set single item direct, do not do any notifies or things like that
+ virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override;
+
+ // clear single item
+ virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
+
+ // clear single item direct, do not do any notifies or things like that.
+ // Also supports complete deletion of items when default parameter 0 is used.
+ virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override;
+
+ // set complete item set
+ virtual void SetObjectItemSet(const SfxItemSet& rSet) override;
+
+ // set a new StyleSheet and broadcast
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
+
+ // get the installed StyleSheet
+ virtual SfxStyleSheet* GetStyleSheet() const override;
+
+ // force default attributes for a specific object type, called from
+ // DefaultProperties::GetObjectItemSet() if a new ItemSet is created.
+ // Default implementation does nothing.
+ virtual void ForceDefaultAttributes();
+ };
+
+} // end of namespace sdr::properties
+
+#endif // INCLUDED_SVX_SDR_PROPERTIES_DEFAULTPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx
new file mode 100644
index 000000000..d793753c6
--- /dev/null
+++ b/include/svx/sdr/properties/properties.hxx
@@ -0,0 +1,190 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_PROPERTIES_PROPERTIES_HXX
+#define INCLUDED_SVX_SDR_PROPERTIES_PROPERTIES_HXX
+
+#include <sal/config.h>
+
+#include <memory>
+
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <svl/typedwhich.hxx>
+
+struct _xmlTextWriter;
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
+class SdrObject;
+class SfxItemSet;
+class SfxPoolItem;
+class SfxStyleSheet;
+class Fraction;
+class SfxItemPool;
+class SdrModel;
+
+namespace sdr::properties
+{
+ class ItemChangeBroadcaster;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// BaseProperties
+// DefaultProperties ->SfxItemSet
+// AttributeProperties ->SfxStyleSheet
+// E3dProperties
+// E3dCompoundProperties
+// E3dExtrudeProperties
+// E3dLatheProperties
+// E3dSphereProperties
+// E3dSceneProperties
+// TextProperties ->maVersion
+// ConnectorProperties
+// CustomShapeProperties
+// MeasureProperties
+// RectangleProperties
+// CaptionProperties
+// CircleProperties
+// GraphicProperties
+// OleProperties
+// CellProperties
+// TableProperties
+// GroupProperties
+// EmptyProperties
+// PageProperties
+
+namespace sdr::properties
+ {
+ class SVXCORE_DLLPUBLIC BaseProperties
+ {
+ private:
+ // the owner of this Properties. Set from constructor and not
+ // to be changed in any way.
+ SdrObject& mrObject;
+
+ protected:
+ // internal access to SdrObject
+ const SdrObject& GetSdrObject() const;
+
+ SdrObject& GetSdrObject();
+
+ public:
+ // basic constructor, used from SdrObject.
+ explicit BaseProperties(SdrObject& rObj);
+
+ // destructor
+ virtual ~BaseProperties();
+
+ virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) = 0;
+
+ // Clone() operator, normally just calls the local copy constructor,
+ // see above.
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const = 0;
+
+ // Get the local ItemSet. This directly returns the local ItemSet of the object. No
+ // merging of ItemSets is done for e.g. Group objects.
+ virtual const SfxItemSet& GetObjectItemSet() const = 0;
+
+ // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may
+ // be overridden e.g for group objects to return a merged ItemSet of the object.
+ // When using this method the returned ItemSet may contain items in the state
+ // SfxItemState::DONTCARE which means there were several such items with different
+ // values.
+ virtual const SfxItemSet& GetMergedItemSet() const;
+
+ // Sets all items which are on state SfxItemState::SET in rSet at the local ItemSet.
+ // Uses AllowItemChange(), ItemChange(), PostItemChange() and ItemSetChanged() calls.
+ virtual void SetObjectItemSet(const SfxItemSet& rSet) = 0;
+
+ // Set merged ItemSet. Normally, this maps to SetObjectItemSet().
+ virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false);
+
+ // Set single item at the local ItemSet. Uses AllowItemChange(),
+ // ItemChange(), PostItemChange() and ItemSetChanged() calls.
+ virtual void SetObjectItem(const SfxPoolItem& rItem) = 0;
+
+ // Set a single item direct. Only uses AllowItemChange() and ItemChange(),
+ // but not PostItemChange() and ItemSetChanged() calls.
+ virtual void SetObjectItemDirect(const SfxPoolItem& rItem) = 0;
+
+ // Clear a single local item. Uses AllowItemChange(),
+ // ItemChange(), PostItemChange() and ItemSetChanged() calls.
+ virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) = 0;
+
+ // Set a single item, iterate over hierarchies if necessary. Default
+ // Implementation falls back to ClearObjectItem().
+ virtual void SetMergedItem(const SfxPoolItem& rItem);
+
+ // Clear a single item, iterate over hierarchies if necessary. Default
+ // Implementation falls back to ClearObjectItem().
+ virtual void ClearMergedItem(const sal_uInt16 nWhich);
+
+ // Clear single item direct. Only uses AllowItemChange() and ItemChange(),
+ // but not PostItemChange() and ItemSetChanged() calls.
+ // Also supports complete deletion of items when default parameter 0 is used.
+ virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) = 0;
+
+ // Set a new StyleSheet. Registers as listener at the StyleSheet to get knowledge
+ // of StyleSheet changes.
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) = 0;
+
+ // Get the installed StyleSheet.
+ virtual SfxStyleSheet* GetStyleSheet() const = 0;
+
+ // force all attributes which come from styles to hard attributes
+ // to be able to live without the style.
+ virtual void ForceStyleToHardAttributes();
+
+ // syntactical sugar for ItemSet accesses. Broadcasts before and after the changes
+ // to invalidate views in old and new BoundRects. As soon as the repaint mechanism
+ // will be changed these broadcasts will no longer be needed.
+ //void SetItemAndBroadcast(const SfxPoolItem& rItem);
+ //void ClearItemAndBroadcast(const sal_uInt16 nWhich = 0);
+ void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems = false);
+
+ // Just a convenient shortcut for GetObjectItemSet().Get(nWhich).
+ const SfxPoolItem& GetItem(const sal_uInt16 nWhich) const;
+ template<class T> const T& GetItem(TypedWhichId<T> nWhich) const
+ {
+ return static_cast<const T&>(GetItem(sal_uInt16(nWhich)));
+ }
+
+ // support for convenient broadcasting. Used from SetMergedItemAndBroadcast(),
+ // ClearItemAndBroadcast() and SetItemSetAndBroadcast(), see above.
+ // But also from inside SdrObjects.
+ void BroadcastItemChange(const ItemChangeBroadcaster& rChange);
+
+ // #i101556# add versioning mechanism; used from e.g. text attribute set to
+ // allow detection of e.g. style sheet or single text attribute changes. The
+ // default implementation returns 0 (zero)
+ virtual sal_uInt32 getVersion() const;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+ };
+
+ // checks the FillStyle item and removes unneeded Gradient, FillBitmap and Hatch items
+ void SVXCORE_DLLPUBLIC CleanupFillProperties( SfxItemSet& rItemSet );
+
+} // end of namespace sdr::properties
+
+#endif // INCLUDED_SVX_SDR_PROPERTIES_PROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
new file mode 100644
index 000000000..ab9f1d28f
--- /dev/null
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_TABLE_TABLECONTROLLER_HXX
+#define INCLUDED_SVX_SDR_TABLE_TABLECONTROLLER_HXX
+
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <rtl/ref.hxx>
+
+#include <svx/sdr/overlay/overlayobjectlist.hxx>
+#include <svx/selectioncontroller.hxx>
+#include <svx/svdotable.hxx>
+#include <svx/svdview.hxx>
+#include <optional>
+
+struct ImplSVEvent;
+class SdrView;
+class SdrObject;
+class SfxItemSet;
+class SvxBoxInfoItem;
+class SvxBoxItem;
+
+namespace sdr::table {
+
+class TableModel;
+
+class SVXCORE_DLLPUBLIC SvxTableController final : public sdr::SelectionController
+{
+public:
+ SVX_DLLPRIVATE SvxTableController(
+ SdrView& rView,
+ const SdrTableObj& rObj);
+ SVX_DLLPRIVATE virtual ~SvxTableController() override;
+
+ // from sdr::SelectionController
+ SVX_DLLPRIVATE virtual bool onKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
+ SVX_DLLPRIVATE virtual bool onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin) override;
+ SVX_DLLPRIVATE virtual bool onMouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) override;
+ SVX_DLLPRIVATE virtual bool onMouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
+
+ SVX_DLLPRIVATE bool HasMarked() const;
+ SVX_DLLPRIVATE virtual bool DeleteMarked() override;
+
+ SVX_DLLPRIVATE virtual void onSelectionHasChanged() override;
+ SVX_DLLPRIVATE virtual void onSelectAll() override;
+
+ SVX_DLLPRIVATE virtual void GetState( SfxItemSet& rSet ) override;
+ virtual void Execute( SfxRequest& rReq ) override;
+
+ SVX_DLLPRIVATE virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const override;
+ SVX_DLLPRIVATE virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ) override;
+
+ SVX_DLLPRIVATE virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats ) override;
+
+ // slots
+ SVX_DLLPRIVATE void onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs = nullptr );
+ SVX_DLLPRIVATE void onDelete( sal_uInt16 nSId );
+ SVX_DLLPRIVATE void onSelect( sal_uInt16 nSId );
+ SVX_DLLPRIVATE void onFormatTable(const SfxRequest& rReq);
+ SVX_DLLPRIVATE void MergeMarkedCells();
+ SVX_DLLPRIVATE void SplitMarkedCells(const SfxRequest& rReq);
+ SVX_DLLPRIVATE void DistributeColumns( const bool bOptimize, const bool bMinimize );
+ SVX_DLLPRIVATE void DistributeRows( const bool bOptimize, const bool bMinimize );
+ SVX_DLLPRIVATE void SetVertical( sal_uInt16 nSId );
+ SVX_DLLPRIVATE void changeTableEdge(const SfxRequest& rReq);
+
+ SVX_DLLPRIVATE static rtl::Reference< sdr::SelectionController > create(
+ SdrView& rView,
+ const SdrTableObj& rObj,
+ const rtl::Reference< sdr::SelectionController >& xRefController);
+
+ SVX_DLLPRIVATE void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const;
+ SVX_DLLPRIVATE void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll);
+ void SetAttrToSelectedShape(const SfxItemSet& rAttr);
+ /** Fill the values that are common for all selected cells.
+ *
+ * This lets the Borders dialog to display the line arrangement
+ * properly.
+ */
+ SVX_DLLPRIVATE void FillCommonBorderAttrFromSelectedCells(SvxBoxItem& rBox, SvxBoxInfoItem& rBoxInfo) const;
+
+ SVX_DLLPRIVATE virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const override;
+ SVX_DLLPRIVATE virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) override;
+
+ SVX_DLLPRIVATE virtual SdrObject* GetMarkedSdrObjClone( SdrModel& rTargetModel ) override;
+ SVX_DLLPRIVATE virtual bool PasteObjModel( const SdrModel& rModel ) override;
+
+ SVX_DLLPRIVATE virtual bool hasSelectedCells() const override { return mbCellSelectionMode || mrView.IsTextEdit(); }
+ /// @see sdr::SelectionController::setCursorLogicPosition().
+ SVX_DLLPRIVATE virtual bool setCursorLogicPosition(const Point& rPosition, bool bPoint) override;
+
+ /// @see sdr::SelectionController::getSelectedCells().
+ void getSelectedCells( CellPos& rFirstPos, CellPos& rLastPos ) override;
+ void setSelectedCells( const CellPos& rFirstPos, const CellPos& rLastPos );
+
+ virtual bool ChangeFontSize(bool bGrow, const FontList* pFontList) override;
+
+ void clearSelection();
+ void selectAll();
+
+ SVX_DLLPRIVATE void onTableModified();
+
+ bool selectRow( sal_Int32 row );
+ bool selectColumn( sal_Int32 column );
+ bool deselectRow( sal_Int32 row );
+ bool deselectColumn( sal_Int32 column );
+ bool isRowSelected( sal_Int32 nRow );
+ bool isColumnSelected( sal_Int32 nColumn );
+ bool isRowHeader();
+ bool isColumnHeader();
+ sdr::table::SdrTableObj* GetTableObj() { return mxTableObj.get(); }
+private:
+ SvxTableController(SvxTableController const &) = delete;
+ SvxTableController& operator =(SvxTableController const &) = delete;
+
+ // internals
+ enum class TblAction
+ {
+ NONE,
+ GotoFirstCell, GotoFirstColumn, GotoFirstRow,
+ GotoLeftCell, GotoUpCell, GotoRightCell, GotoDownCell,
+ GotoLastCell, GotoLastColumn, GotoLastRow,
+ EditCell, StopTextEdit,
+ RemoveSelection,
+ HandledByView, Tab
+ };
+ SVX_DLLPRIVATE void ApplyBorderAttr( const SfxItemSet& rAttr );
+ SVX_DLLPRIVATE void UpdateTableShape();
+
+ SVX_DLLPRIVATE void SetTableStyle( const SfxItemSet* pArgs );
+ SVX_DLLPRIVATE void SetTableStyleSettings( const SfxItemSet* pArgs );
+
+ SVX_DLLPRIVATE bool PasteObject( SdrTableObj const * pPasteTableObj );
+
+ SVX_DLLPRIVATE bool checkTableObject();
+ SVX_DLLPRIVATE const CellPos& getSelectionStart();
+ SVX_DLLPRIVATE void setSelectionStart( const CellPos& rPos );
+ SVX_DLLPRIVATE const CellPos& getSelectionEnd();
+ SVX_DLLPRIVATE void checkCell( CellPos& rPos ) const;
+
+ SVX_DLLPRIVATE void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow );
+
+ SVX_DLLPRIVATE void EditCell(const CellPos& rPos, vcl::Window* pWindow, TblAction nAction);
+ SVX_DLLPRIVATE void StopTextEdit();
+
+ SVX_DLLPRIVATE TblAction getKeyboardAction(const KeyEvent& rKEvt);
+ SVX_DLLPRIVATE bool executeAction(TblAction nAction, bool bSelect, vcl::Window* pWindow);
+ SVX_DLLPRIVATE void gotoCell(const CellPos& rCell, bool bSelect, vcl::Window* pWindow, TblAction nAction = TblAction::NONE);
+
+ SVX_DLLPRIVATE void StartSelection( const CellPos& rPos );
+ SVX_DLLPRIVATE void UpdateSelection( const CellPos& rPos );
+ SVX_DLLPRIVATE void RemoveSelection();
+ SVX_DLLPRIVATE void updateSelectionOverlay();
+ SVX_DLLPRIVATE void destroySelectionOverlay();
+
+ SVX_DLLPRIVATE void findMergeOrigin( CellPos& rPos );
+
+ DECL_DLLPRIVATE_LINK( UpdateHdl, void *, void );
+
+ //TableModelRef mxTable;
+ rtl::Reference< TableModel > mxTable;
+
+ CellPos maCursorFirstPos;
+ CellPos maCursorLastPos;
+ bool mbCellSelectionMode;
+ bool mbHasJustMerged;
+ CellPos maMouseDownPos;
+ bool mbLeftButtonDown;
+ std::optional<sdr::overlay::OverlayObjectList> mpSelectionOverlay;
+ SdrView& mrView;
+ tools::WeakReference<SdrTableObj> mxTableObj;
+ css::uno::Reference< css::util::XModifyListener > mxModifyListener;
+ ImplSVEvent * mnUpdateEvent;
+};
+
+rtl::Reference< sdr::SelectionController > CreateTableController(
+ SdrView& rView,
+ const SdrTableObj& rObj,
+ const rtl::Reference< sdr::SelectionController >& xRefController );
+
+}
+
+#endif // INCLUDED_SVX_SDR_TABLE_TABLECONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/table/tabledesign.hxx b/include/svx/sdr/table/tabledesign.hxx
new file mode 100644
index 000000000..118ebefcc
--- /dev/null
+++ b/include/svx/sdr/table/tabledesign.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDR_TABLE_TABLEDESIGN_HXX
+#define INCLUDED_SVX_SDR_TABLE_TABLEDESIGN_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <com/sun/star/container/XNameAccess.hpp>
+
+namespace sdr::table
+{
+const sal_Int32 first_row_style = 0;
+const sal_Int32 last_row_style = 1;
+const sal_Int32 first_column_style = 2;
+const sal_Int32 last_column_style = 3;
+const sal_Int32 even_rows_style = 4;
+const sal_Int32 odd_rows_style = 5;
+const sal_Int32 even_columns_style = 6;
+const sal_Int32 odd_columns_style = 7;
+const sal_Int32 body_style = 8;
+const sal_Int32 background_style = 9;
+const sal_Int32 style_count = 10;
+
+extern SVX_DLLPUBLIC css::uno::Reference<css::container::XNameAccess> CreateTableDesignFamily();
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrhittesthelper.hxx b/include/svx/sdrhittesthelper.hxx
new file mode 100644
index 000000000..87cf1afbe
--- /dev/null
+++ b/include/svx/sdrhittesthelper.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDRHITTESTHELPER_HXX
+#define INCLUDED_SVX_SDRHITTESTHELPER_HXX
+
+#include <svx/svxdllapi.h>
+
+
+// #i101872# new Object HitTest as View-tooling
+
+
+class Point;
+class SdrObject;
+class SdrPageView;
+class SdrLayerIDSet;
+class SdrObjList;
+namespace sdr::contact { class ViewObjectContact; }
+namespace basegfx { class B2DPoint; }
+namespace drawinglayer::primitive2d { class Primitive2DContainer; }
+
+
+// Wrappers for classic Sdr* Mode/View classes
+
+SVXCORE_DLLPUBLIC SdrObject* SdrObjectPrimitiveHit(
+ const SdrObject& rObject,
+ const Point& rPnt,
+ sal_uInt16 nTol,
+ const SdrPageView& rSdrPageView,
+ const SdrLayerIDSet* pVisiLayer,
+ bool bTextOnly,
+ /// allow getting back an evtl. resulting primitive stack which lead to a hit
+ drawinglayer::primitive2d::Primitive2DContainer* pHitContainer = nullptr);
+
+SVXCORE_DLLPUBLIC SdrObject* SdrObjListPrimitiveHit(
+ const SdrObjList& rList,
+ const Point& rPnt,
+ sal_uInt16 nTol,
+ const SdrPageView& rSdrPageView,
+ const SdrLayerIDSet* pVisiLayer,
+ bool bTextOnly);
+
+
+// the pure HitTest based on a VOC
+
+bool ViewObjectContactPrimitiveHit(
+ const sdr::contact::ViewObjectContact& rVOC,
+ const basegfx::B2DPoint& rHitPosition,
+ double fLogicHitTolerance,
+ bool bTextOnly,
+ /// allow to get back the stack of primitives that lead to the hit
+ drawinglayer::primitive2d::Primitive2DContainer* pHitContainer);
+
+
+#endif // INCLUDED_SVX_SDRHITTESTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrmasterpagedescriptor.hxx b/include/svx/sdrmasterpagedescriptor.hxx
new file mode 100644
index 000000000..d7eac22a1
--- /dev/null
+++ b/include/svx/sdrmasterpagedescriptor.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDRMASTERPAGEDESCRIPTOR_HXX
+#define INCLUDED_SVX_SDRMASTERPAGEDESCRIPTOR_HXX
+
+#include <svx/sdrpageuser.hxx>
+#include <svx/svdsob.hxx>
+#include <memory>
+
+class SdrPageProperties;
+namespace sdr::contact { class ViewContact; }
+
+
+namespace sdr
+{
+ class MasterPageDescriptor final : public sdr::PageUser
+ {
+ private:
+ SdrPage& maOwnerPage;
+ SdrPage& maUsedPage;
+ SdrLayerIDSet maVisibleLayers;
+
+ // ViewContact part
+ mutable std::unique_ptr<sdr::contact::ViewContact> mpViewContact;
+
+ void operator=(const MasterPageDescriptor& rCandidate) = delete;
+
+ public:
+ MasterPageDescriptor(SdrPage& aOwnerPage, SdrPage& aUsedPage);
+ virtual ~MasterPageDescriptor();
+
+ // ViewContact part
+ sdr::contact::ViewContact& GetViewContact() const;
+
+ // this method is called from the destructor of the referenced page.
+ // do all necessary action to forget the page. It is not necessary to call
+ // RemovePageUser(), that is done from the destructor.
+ virtual void PageInDestruction(const SdrPage& rPage) override;
+
+ // member access to UsedPage
+ SdrPage& GetUsedPage() const { return maUsedPage; }
+
+ // member access to OwnerPage
+ SdrPage& GetOwnerPage() const { return maOwnerPage; }
+
+ // member access to VisibleLayers
+ const SdrLayerIDSet& GetVisibleLayers() const { return maVisibleLayers; }
+ void SetVisibleLayers(const SdrLayerIDSet& rNew);
+
+ const SdrPageProperties* getCorrectSdrPageProperties() const;
+ };
+} // end of namespace sdr
+
+#endif // INCLUDED_SVX_SDRMASTERPAGEDESCRIPTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrobjectfilter.hxx b/include/svx/sdrobjectfilter.hxx
new file mode 100644
index 000000000..497bf51a2
--- /dev/null
+++ b/include/svx/sdrobjectfilter.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDROBJECTFILTER_HXX
+#define INCLUDED_SVX_SDROBJECTFILTER_HXX
+
+#include <svx/svxdllapi.h>
+
+class SdrObject;
+
+
+namespace svx
+{
+
+
+ //= SdrObjectFilter
+
+ /** specifies a boolean predicate on the set of all SdrObjects - vulgo a filter.
+ */
+ class SVXCORE_DLLPUBLIC SAL_NO_VTABLE ISdrObjectFilter
+ {
+ public:
+ virtual bool includeObject( const SdrObject& i_rObject ) const = 0;
+
+ virtual ~ISdrObjectFilter() = 0;
+ };
+
+
+}
+
+
+#endif // INCLUDED_SVX_SDROBJECTFILTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrobjectuser.hxx b/include/svx/sdrobjectuser.hxx
new file mode 100644
index 000000000..f13beeb42
--- /dev/null
+++ b/include/svx/sdrobjectuser.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDROBJECTUSER_HXX
+#define INCLUDED_SVX_SDROBJECTUSER_HXX
+
+#include <vector>
+
+class SdrObject;
+
+// To make things more safe, allow users of an object to register at it. The users need to be derived
+// from sdr::ObjectUser to get a call. The users do not need to call RemoveObjectUser() at the page
+// when they get called from ObjectInDestruction().
+
+namespace sdr
+{
+ class ObjectUser
+ {
+ public:
+ // this method is called from the destructor of the referenced page.
+ // do all necessary action to forget the page. It is not necessary to call
+ // RemovePageUser(), that is done from the destructor.
+ virtual void ObjectInDestruction(const SdrObject& rObject) = 0;
+
+ protected:
+ ~ObjectUser() {}
+ };
+
+ // typedef for ObjectUserVector
+ typedef ::std::vector< ObjectUser* > ObjectUserVector;
+} // end of namespace sdr
+
+#endif // INCLUDED_SVX_SDROBJECTUSER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrpageuser.hxx b/include/svx/sdrpageuser.hxx
new file mode 100644
index 000000000..8c31a2936
--- /dev/null
+++ b/include/svx/sdrpageuser.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDRPAGEUSER_HXX
+#define INCLUDED_SVX_SDRPAGEUSER_HXX
+
+#include <vector>
+
+class SdrPage;
+
+// To make things more safe, allow users of the page to register at it. The users need to be derived
+// from sdr::PageUser to get a call. The users do not need to call RemovePageUser() at the page
+// when they get called from PageInDestruction().
+
+namespace sdr
+{
+ class PageUser
+ {
+ public:
+ // this method is called from the destructor of the referenced page.
+ // do all necessary action to forget the page. It is not necessary to call
+ // RemovePageUser(), that is done from the destructor.
+ virtual void PageInDestruction(const SdrPage& rPage) = 0;
+
+ protected:
+ ~PageUser() {}
+ };
+
+ // typedef for PageUserVector
+ typedef ::std::vector< PageUser* > PageUserVector;
+} // end of namespace sdr
+
+#endif // INCLUDED_SVX_SDRPAGEUSER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrpagewindow.hxx b/include/svx/sdrpagewindow.hxx
new file mode 100644
index 000000000..c7278233c
--- /dev/null
+++ b/include/svx/sdrpagewindow.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDRPAGEWINDOW_HXX
+#define INCLUDED_SVX_SDRPAGEWINDOW_HXX
+
+#include <basegfx/range/b2irectangle.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+namespace com::sun::star::awt { class XControlContainer; }
+namespace com::sun::star::uno { template <class interface_type> class Reference; }
+namespace rtl { template <class reference_type> class Reference; }
+namespace sdr::overlay { class OverlayManager; }
+namespace vcl { class Region; }
+
+namespace sdr::contact
+{
+ class ObjectContact;
+ class ViewObjectContactRedirector;
+}
+
+
+namespace basegfx { class B2DRange; }
+
+class SdrPaintWindow;
+class SdrPageView;
+
+class SVXCORE_DLLPUBLIC SdrPageWindow
+{
+ struct Impl;
+
+ std::unique_ptr<Impl> mpImpl;
+
+ SdrPageWindow( const SdrPageWindow& ) = delete;
+ SdrPageWindow& operator= ( const SdrPageWindow& ) = delete;
+
+public:
+ SdrPageWindow(SdrPageView& rNewPageView, SdrPaintWindow& rPaintWindow);
+ ~SdrPageWindow();
+
+ // data read accesses
+ SdrPageView& GetPageView() const;
+ SdrPaintWindow& GetPaintWindow() const;
+ const SdrPaintWindow* GetOriginalPaintWindow() const;
+ css::uno::Reference<css::awt::XControlContainer> const & GetControlContainer( bool _bCreateIfNecessary = true ) const;
+
+ // OVERLAYMANAGER
+ rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const;
+
+ // #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed
+ [[nodiscard]] SdrPaintWindow* patchPaintWindow(SdrPaintWindow& rPaintWindow);
+ void unpatchPaintWindow(SdrPaintWindow* pPreviousPaintWindow);
+
+ // the repaint method. For migration from pPaintProc, use one more parameter
+ void PrePaint();
+ void PrepareRedraw(const vcl::Region& rReg);
+ void RedrawAll( sdr::contact::ViewObjectContactRedirector* pRedirector );
+ void RedrawLayer( const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector, basegfx::B2IRectangle const*);
+
+ // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...)
+ void InvalidatePageWindow(const basegfx::B2DRange& rRange);
+
+ // #110094# ObjectContact section
+ const sdr::contact::ObjectContact& GetObjectContact() const;
+ sdr::contact::ObjectContact& GetObjectContact();
+ /// determines whether there already exists an ObjectContact
+ bool HasObjectContact() const;
+
+ // #i26631#
+ void ResetObjectContact();
+
+ /** sets all elements in the view which support a design and an alive mode into the given mode
+ */
+ void SetDesignMode( bool _bDesignMode ) const;
+};
+
+#endif // INCLUDED_SVX_SDRPAGEWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx
new file mode 100644
index 000000000..d6dee79a9
--- /dev/null
+++ b/include/svx/sdrpaintwindow.hxx
@@ -0,0 +1,144 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SDRPAINTWINDOW_HXX
+#define INCLUDED_SVX_SDRPAINTWINDOW_HXX
+
+#include <rtl/ref.hxx>
+#include <vcl/virdev.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class SdrPaintView;
+namespace sdr::overlay { class OverlayManager; }
+
+
+#ifdef _MSC_VER // broken msvc template instantiation
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#endif
+
+/// paint the transparent children of rWin that overlap rPixelRect
+/// (for example, transparent form controls like check boxes)
+void SVXCORE_DLLPUBLIC
+PaintTransparentChildren(vcl::Window const & rWindow, tools::Rectangle const& rPixelRect);
+
+class SdrPreRenderDevice
+{
+ // The original OutputDevice
+ VclPtr<OutputDevice> mpOutputDevice;
+
+ // The VirtualDevice for PreRendering
+ VclPtr<VirtualDevice> mpPreRenderDevice;
+
+public:
+ explicit SdrPreRenderDevice(OutputDevice& rOriginal);
+ ~SdrPreRenderDevice();
+
+ void PreparePreRenderDevice();
+ void OutputPreRenderDevice(const vcl::Region& rExpandedRegion);
+
+ OutputDevice& GetPreRenderDevice() { return *mpPreRenderDevice; }
+};
+
+class SVXCORE_DLLPUBLIC SdrPaintWindow
+{
+private:
+ // the OutputDevice this window represents
+ VclPtr<OutputDevice> mpOutputDevice;
+
+ /// In case mrOutputDevice is a buffer for a vcl::Window, this is the window.
+ VclPtr<vcl::Window> mpWindow;
+
+ // the SdrPaintView this window belongs to
+ SdrPaintView& mrPaintView;
+
+ // the new OverlayManager for the new OverlayObjects. Test add here, will
+ // replace the IAOManager as soon as it works.
+ rtl::Reference< sdr::overlay::OverlayManager > mxOverlayManager;
+
+ // The PreRenderDevice for PreRendering
+ std::unique_ptr<SdrPreRenderDevice> mpPreRenderDevice;
+
+ // The RedrawRegion used for rendering
+ vcl::Region maRedrawRegion;
+
+ // #i72889# flag if this is only a temporary target for repaint, default is false
+ bool mbTemporaryTarget : 1;
+
+ bool mbOutputToWindow : 1;
+
+ // ref to patched
+ SdrPaintWindow* mpPatched;
+
+ // helpers
+ void impCreateOverlayManager();
+
+public:
+ SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut, vcl::Window* pWindow = nullptr);
+ ~SdrPaintWindow();
+
+ // allow reference to patched, see patchPaintWindow/unpatchPaintWindow
+ void setPatched(SdrPaintWindow* pPaintWindow) { mpPatched = pPaintWindow; }
+ SdrPaintWindow* getPatched() const { return mpPatched; }
+
+ // data read accesses
+ OutputDevice& GetOutputDevice() const { return *mpOutputDevice; }
+ vcl::Window* GetWindow() const { return mpWindow; }
+
+ // OVERLAYMANAGER
+ rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const;
+
+ // #i73602# add flag if buffer shall be used
+ void DrawOverlay(const vcl::Region& rRegion);
+
+ // calculate visible area and return
+ tools::Rectangle GetVisibleArea() const;
+
+ // Is OutDev a printer?
+ bool OutputToPrinter() const { return (OUTDEV_PRINTER == mpOutputDevice->GetOutDevType()); }
+
+ // Is OutDev a window?
+ bool OutputToWindow() const { return mbOutputToWindow; }
+
+ void SetOutputToWindow(bool bOutputToWindow) { mbOutputToWindow = bOutputToWindow; }
+
+ // Is OutDev a recording MetaFile?
+ bool OutputToRecordingMetaFile() const;
+
+ // prepare PreRendering (evtl.)
+ void PreparePreRenderDevice();
+ void DestroyPreRenderDevice();
+ void OutputPreRenderDevice(const vcl::Region& rExpandedRegion);
+ SdrPreRenderDevice* GetPreRenderDevice() const { return mpPreRenderDevice.get(); }
+
+ // RedrawRegion
+ const vcl::Region& GetRedrawRegion() const { return maRedrawRegion;}
+ void SetRedrawRegion(const vcl::Region& rNew);
+
+ // #i72889# read/write access to TemporaryTarget
+ bool getTemporaryTarget() const { return mbTemporaryTarget; }
+ void setTemporaryTarget(bool bNew) { mbTemporaryTarget = bNew; }
+
+ // #i72889# get target output device, take into account output buffering
+ OutputDevice& GetTargetOutputDevice() { if(mpPreRenderDevice) return mpPreRenderDevice->GetPreRenderDevice(); else return *mpOutputDevice; }
+};
+
+#endif // INCLUDED_SVX_SDRPAINTWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx
new file mode 100644
index 000000000..9ff23e441
--- /dev/null
+++ b/include/svx/sdrundomanager.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDRUNDOMANAGER_HXX
+#define INCLUDED_SVX_SDRUNDOMANAGER_HXX
+
+#include <svx/svxdllapi.h>
+#include <editeng/editund2.hxx>
+#include <tools/link.hxx>
+
+class SfxObjectShell;
+
+class SVXCORE_DLLPUBLIC SdrUndoManager : public EditUndoManager
+{
+private:
+ using EditUndoManager::Undo;
+ using EditUndoManager::Redo;
+
+ Link<SdrUndoManager*, void> maEndTextEditHdl;
+ SfxUndoAction* mpLastUndoActionBeforeTextEdit;
+ size_t mnRedoActionCountBeforeTextEdit;
+ bool mbEndTextEditTriggeredFromUndo;
+
+ SfxObjectShell* m_pDocSh;
+
+protected:
+ // call to check for TextEdit active
+ bool isTextEditActive() const;
+ virtual void EmptyActionsChanged() override;
+
+public:
+ SdrUndoManager();
+ virtual ~SdrUndoManager() override;
+
+ /// react depending on edit mode and if no more undo is possible
+ virtual bool Undo() override;
+ virtual bool Redo() override;
+
+ // #i123350#
+ virtual void Clear() override;
+
+ // Call for the view which starts the interactive text edit. Use link to
+ // activate (start text edit) and empty link to reset (end text edit). On
+ // reset all text edit actions will be removed from this undo manager to
+ // restore the state before activation
+ void SetEndTextEditHdl(const Link<SdrUndoManager*, void>& rLink);
+
+ // check from outside if we are inside a callback for ending text edit. This
+ // is needed to detect inside end text edit if it is a regular one or triggered
+ // by a last undo during text edit
+ bool isEndTextEditTriggeredFromUndo() const { return mbEndTextEditTriggeredFromUndo; }
+ void SetDocShell(SfxObjectShell* pDocShell);
+ size_t GetRedoActionCountBeforeTextEdit() const { return mnRedoActionCountBeforeTextEdit; }
+};
+
+#endif // INCLUDED_SVX_SDRUNDOMANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdshcitm.hxx b/include/svx/sdshcitm.hxx
new file mode 100644
index 000000000..a35b8988c
--- /dev/null
+++ b/include/svx/sdshcitm.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDSHCITM_HXX
+#define INCLUDED_SVX_SDSHCITM_HXX
+
+#include <svx/xcolit.hxx>
+#include <svx/svddef.hxx>
+
+inline XColorItem makeSdrShadowColorItem(const Color& rTheColor)
+{
+ return XColorItem(SDRATTR_SHADOWCOLOR, rTheColor);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdshitm.hxx b/include/svx/sdshitm.hxx
new file mode 100644
index 000000000..7dcbecc30
--- /dev/null
+++ b/include/svx/sdshitm.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDSHITM_HXX
+#define INCLUDED_SVX_SDSHITM_HXX
+
+#include <svx/sdooitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrOnOffItem makeSdrShadowItem(bool bShadow)
+{
+ return SdrOnOffItem(SDRATTR_SHADOW, bShadow);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdshtitm.hxx b/include/svx/sdshtitm.hxx
new file mode 100644
index 000000000..2287e9703
--- /dev/null
+++ b/include/svx/sdshtitm.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDSHTITM_HXX
+#define INCLUDED_SVX_SDSHTITM_HXX
+
+#include <svx/sdprcitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrPercentItem makeSdrShadowTransparenceItem(sal_uInt16 nTransp)
+{
+ return SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, nTransp);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdsxyitm.hxx b/include/svx/sdsxyitm.hxx
new file mode 100644
index 000000000..a0baac5d3
--- /dev/null
+++ b/include/svx/sdsxyitm.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDSXYITM_HXX
+#define INCLUDED_SVX_SDSXYITM_HXX
+
+#include <svx/sdmetitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist)
+{
+ return SdrMetricItem(SDRATTR_SHADOWXDIST, nDist);
+}
+
+inline SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
+{
+ return SdrMetricItem(SDRATTR_SHADOWYDIST, nDist);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtaaitm.hxx b/include/svx/sdtaaitm.hxx
new file mode 100644
index 000000000..1a4a51c0e
--- /dev/null
+++ b/include/svx/sdtaaitm.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTAAITM_HXX
+#define INCLUDED_SVX_SDTAAITM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC SdrTextAniAmountItem final : public SfxInt16Item {
+public:
+ SdrTextAniAmountItem(sal_Int16 nVal=0): SfxInt16Item(SDRATTR_TEXT_ANIAMOUNT,nVal) {}
+ virtual SdrTextAniAmountItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual bool HasMetrics() const override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtacitm.hxx b/include/svx/sdtacitm.hxx
new file mode 100644
index 000000000..820aee926
--- /dev/null
+++ b/include/svx/sdtacitm.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTACITM_HXX
+#define INCLUDED_SVX_SDTACITM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svddef.hxx>
+
+// Number of loops. 0=infinite.
+class SAL_DLLPUBLIC_RTTI SdrTextAniCountItem final : public SfxUInt16Item {
+public:
+ SdrTextAniCountItem(sal_uInt16 nVal=0): SfxUInt16Item(SDRATTR_TEXT_ANICOUNT,nVal) {}
+
+ virtual SdrTextAniCountItem* Clone(SfxItemPool * = nullptr) const override
+ { return new SdrTextAniCountItem(*this); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtaditm.hxx b/include/svx/sdtaditm.hxx
new file mode 100644
index 000000000..79ae6bc01
--- /dev/null
+++ b/include/svx/sdtaditm.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTADITM_HXX
+#define INCLUDED_SVX_SDTADITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+
+
+
+enum class SdrTextAniDirection
+{
+ Left, Right, Up, Down
+};
+
+class SVXCORE_DLLPUBLIC SdrTextAniDirectionItem final : public SfxEnumItem<SdrTextAniDirection> {
+public:
+ SdrTextAniDirectionItem(SdrTextAniDirection eDir=SdrTextAniDirection::Left): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION, eDir) {}
+ virtual SdrTextAniDirectionItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtagitm.hxx b/include/svx/sdtagitm.hxx
new file mode 100644
index 000000000..88cf77bf1
--- /dev/null
+++ b/include/svx/sdtagitm.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTAGITM_HXX
+#define INCLUDED_SVX_SDTAGITM_HXX
+
+#include <svx/sdooitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
+{
+ return SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, bAuto);
+}
+
+inline SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
+{
+ return SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, bAuto);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtaiitm.hxx b/include/svx/sdtaiitm.hxx
new file mode 100644
index 000000000..d847208a6
--- /dev/null
+++ b/include/svx/sdtaiitm.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTAIITM_HXX
+#define INCLUDED_SVX_SDTAIITM_HXX
+
+#include <svx/sdynitm.hxx>
+#include <svx/svddef.hxx>
+
+class SVXCORE_DLLPUBLIC SdrTextAniStartInsideItem final : public SdrYesNoItem {
+public:
+ SdrTextAniStartInsideItem(bool bOn=false): SdrYesNoItem(SDRATTR_TEXT_ANISTARTINSIDE,bOn) {}
+ virtual ~SdrTextAniStartInsideItem() override;
+ virtual SdrTextAniStartInsideItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrTextAniStartInsideItem(SdrTextAniStartInsideItem const &) = default;
+ SdrTextAniStartInsideItem(SdrTextAniStartInsideItem &&) = default;
+ SdrTextAniStartInsideItem & operator =(SdrTextAniStartInsideItem const &) = delete; // due to SdrYesNoItem
+ SdrTextAniStartInsideItem & operator =(SdrTextAniStartInsideItem &&) = delete; // due to SdrYesNoItem
+};
+
+class SVXCORE_DLLPUBLIC SdrTextAniStopInsideItem final : public SdrYesNoItem {
+public:
+ SdrTextAniStopInsideItem(bool bOn=false): SdrYesNoItem(SDRATTR_TEXT_ANISTOPINSIDE,bOn) {}
+ virtual ~SdrTextAniStopInsideItem() override;
+ virtual SdrTextAniStopInsideItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrTextAniStopInsideItem(SdrTextAniStopInsideItem const &) = default;
+ SdrTextAniStopInsideItem(SdrTextAniStopInsideItem &&) = default;
+ SdrTextAniStopInsideItem & operator =(SdrTextAniStopInsideItem const &) = delete; // due to SdrYesNoItem
+ SdrTextAniStopInsideItem & operator =(SdrTextAniStopInsideItem &&) = delete; // due to SdrYesNoItem
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtaitm.hxx b/include/svx/sdtaitm.hxx
new file mode 100644
index 000000000..716f703ec
--- /dev/null
+++ b/include/svx/sdtaitm.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTAITM_HXX
+#define INCLUDED_SVX_SDTAITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+
+
+
+enum SdrTextVertAdjust {SDRTEXTVERTADJUST_TOP, // aligned to top (normally used)
+ SDRTEXTVERTADJUST_CENTER, // centered (for example for the title texts in Draw)
+ SDRTEXTVERTADJUST_BOTTOM, // aligned to bottom
+ SDRTEXTVERTADJUST_BLOCK // support vertical full with supported now
+ /*,SDRTEXTVERTADJUST_STRETCH*/}; // also stretch letters in their height (ni)
+
+class SVXCORE_DLLPUBLIC SdrTextVertAdjustItem final : public SfxEnumItem<SdrTextVertAdjust> {
+public:
+ SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): SfxEnumItem(SDRATTR_TEXT_VERTADJUST, eAdj) {}
+ SdrTextVertAdjustItem(SdrTextVertAdjust eAdj, TypedWhichId<SdrTextVertAdjustItem> nWhich): SfxEnumItem(nWhich, eAdj) {}
+ virtual SdrTextVertAdjustItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 5; }
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+
+
+
+enum SdrTextHorzAdjust {SDRTEXTHORZADJUST_LEFT, // left adjusted
+ SDRTEXTHORZADJUST_CENTER, // centered (for example for title texts in Draw)
+ SDRTEXTHORZADJUST_RIGHT, // right adjusted
+ SDRTEXTHORZADJUST_BLOCK // use the whole text frame width
+ /*,SDRTEXTHORZADJUST_STRETCH*/}; // FitToSize in X direction (ni).
+
+class SVXCORE_DLLPUBLIC SdrTextHorzAdjustItem final : public SfxEnumItem<SdrTextHorzAdjust> {
+public:
+ SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): SfxEnumItem(SDRATTR_TEXT_HORZADJUST, eAdj) {}
+ virtual SdrTextHorzAdjustItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtakitm.hxx b/include/svx/sdtakitm.hxx
new file mode 100644
index 000000000..0d86e517b
--- /dev/null
+++ b/include/svx/sdtakitm.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTAKITM_HXX
+#define INCLUDED_SVX_SDTAKITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+/**
+ * Animation type for text frame.
+ */
+enum class SdrTextAniKind {
+ NONE, /// no animation
+ Blink, /// blinking
+ Scroll, /// scroll through
+ Alternate, /// scroll back and forth
+ Slide /// scroll in
+};
+
+// - SdrTextAniKind::Blink:
+// Just blink. Direction and Amount don't effect things.
+// Frequency delay: 0 = 0.5Hz (Delay = 250).
+// Count = number of blinks. (0 = forever)
+// start inside: sal_False = begin with the blinker off, sal_True = begin with the blinker on
+// stop inside: sal_False = end with the blinker off, sal_True = end with the blinker on
+// (Only if count! = 0)
+// - SdrTextAniKind::Scroll:
+// Text just scrolls all the way through, and starts over when it is done.
+
+// Delay in ms: (except delay = 0 means 50ms (20Hz) default)
+// Count = number of passes (0 = go forever)
+// Direction: the direction to scroll
+// StartInside: sal_False = on the first pass, scroll the text in (not initially visible)
+// sal_True = on the first pass, the left part of the text is already visible
+// in the scroll area before starting.
+// StopInside: sal_False = on the last pass, scroll the text all the way out.
+// sal_True = on the last pass, keep the right part of the text visible.
+// (Only if count! = 0)
+// Amount: Step size in logical units. Negative values = use Pixels instead
+// of logical units. If Amount = 0, then default to 1 Pixel.
+// - SdrTextAniKind::Alternate:
+// Like SdrTextAniKind::Scroll, except don't scroll until all of the text is out,
+// but just until the last part is visible. Then, change direction and
+// scroll the text the other way.
+// Count = number of passes (number of direction changes minus 1)
+// If count = 1, this is the same as SdrTextAniKind::Scroll
+// Direction = the starting direction.
+// All Other Parameters: just like SdrTextAniKind::Scroll
+// - SdrTextAniKind::Slide:
+// Text will slide into the original position.
+// -> same as SCROLL with StartInside = sal_False, StopInside = sal_True
+// and Count = 1 (Count = 0 is interpreted as count = 1).
+// For each count > 1, the text, will be slid out backwards
+// (much like ALTERNATE) and then slid back in again.
+// StopInside is not evaluated, because inside is always stopped.
+// StartInside is not evaluated, because outside is always started.
+// All other parameters are like SdrTextAniKind::Scroll
+// StartInside, StopInside: When sal_True, the starting / final position
+// of the text depends on the anchor of the drawing object. This
+// corresponds to the position of the text in normal Paint (without scrolling).
+
+class SVXCORE_DLLPUBLIC SdrTextAniKindItem final : public SfxEnumItem<SdrTextAniKind> {
+public:
+ SdrTextAniKindItem(SdrTextAniKind eKind=SdrTextAniKind::NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND, eKind) {}
+ virtual SdrTextAniKindItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 5; }
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtayitm.hxx b/include/svx/sdtayitm.hxx
new file mode 100644
index 000000000..7308991d0
--- /dev/null
+++ b/include/svx/sdtayitm.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTAYITM_HXX
+#define INCLUDED_SVX_SDTAYITM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC SdrTextAniDelayItem final : public SfxUInt16Item {
+public:
+ SdrTextAniDelayItem(sal_uInt16 nVal=0): SfxUInt16Item(SDRATTR_TEXT_ANIDELAY,nVal) {}
+ virtual SdrTextAniDelayItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtcfitm.hxx b/include/svx/sdtcfitm.hxx
new file mode 100644
index 000000000..7b4ef6e2a
--- /dev/null
+++ b/include/svx/sdtcfitm.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTCFITM_HXX
+#define INCLUDED_SVX_SDTCFITM_HXX
+
+#include <svx/sdooitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrOnOffItem makeSdrTextContourFrameItem(bool bOn)
+{
+ return SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME, bOn);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtditm.hxx b/include/svx/sdtditm.hxx
new file mode 100644
index 000000000..6fe41a437
--- /dev/null
+++ b/include/svx/sdtditm.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTDITM_HXX
+#define INCLUDED_SVX_SDTDITM_HXX
+
+#include <svx/sdmetitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
+{
+ return SdrMetricItem(SDRATTR_TEXT_LEFTDIST, mnHeight);
+}
+
+inline SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
+{
+ return SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, mnHeight);
+}
+
+inline SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
+{
+ return SdrMetricItem(SDRATTR_TEXT_UPPERDIST, mnHeight);
+}
+
+inline SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
+{
+ return SdrMetricItem(SDRATTR_TEXT_LOWERDIST, mnHeight);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtfchim.hxx b/include/svx/sdtfchim.hxx
new file mode 100644
index 000000000..2fe5427c5
--- /dev/null
+++ b/include/svx/sdtfchim.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTFCHIM_HXX
+#define INCLUDED_SVX_SDTFCHIM_HXX
+
+#include <config_options.h>
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrTextFixedCellHeightItem final : public SfxBoolItem
+{
+public:
+
+ SdrTextFixedCellHeightItem( bool bUseFixedCellHeight = false );
+
+ SVX_DLLPRIVATE virtual bool GetPresentation(SfxItemPresentation ePresentation,
+ MapUnit eCoreMetric, MapUnit ePresentationMetric,
+ OUString &rText, const IntlWrapper&) const override;
+
+ SVX_DLLPRIVATE virtual SdrTextFixedCellHeightItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtfsitm.hxx b/include/svx/sdtfsitm.hxx
new file mode 100644
index 000000000..d98e431da
--- /dev/null
+++ b/include/svx/sdtfsitm.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTFSITM_HXX
+#define INCLUDED_SVX_SDTFSITM_HXX
+
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+
+// No automatic line breaks for AutoGrowingWidth as well (only if
+// TextMaxFrameWidth is reached).
+
+
+class SVXCORE_DLLPUBLIC SdrTextFitToSizeTypeItem final
+ : public SfxEnumItem<css::drawing::TextFitToSizeType>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ SdrTextFitToSizeTypeItem(
+ css::drawing::TextFitToSizeType const eFit = css::drawing::TextFitToSizeType_NONE)
+ : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, eFit) {}
+ SdrTextFitToSizeTypeItem(const SdrTextFitToSizeTypeItem& rItem)
+ : SfxEnumItem(rItem),
+ m_nMaxScale(rItem.GetMaxScale())
+ {
+ }
+ virtual SdrTextFitToSizeTypeItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ bool operator==(const SfxPoolItem& rItem) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+ virtual bool HasBoolValue() const override;
+ virtual bool GetBoolValue() const override;
+ virtual void SetBoolValue(bool bVal) override;
+ void SetMaxScale(sal_Int16 nMaxScale) { m_nMaxScale = nMaxScale; }
+ sal_Int16 GetMaxScale() const { return m_nMaxScale; }
+private:
+ sal_Int16 m_nMaxScale = 0;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdtmfitm.hxx b/include/svx/sdtmfitm.hxx
new file mode 100644
index 000000000..23046442b
--- /dev/null
+++ b/include/svx/sdtmfitm.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDTMFITM_HXX
+#define INCLUDED_SVX_SDTMFITM_HXX
+
+#include <svx/sdmetitm.hxx>
+#include <svx/svddef.hxx>
+
+inline SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight)
+{
+ return SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, mnHeight);
+}
+
+inline SdrMetricItem makeSdrTextMaxFrameHeightItem(tools::Long mnHeight)
+{
+ return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, mnHeight);
+}
+
+inline SdrMetricItem makeSdrTextMinFrameWidthItem(tools::Long mnWidth)
+{
+ return SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, mnWidth);
+};
+
+inline SdrMetricItem makeSdrTextMaxFrameWidthItem(tools::Long mnWidth)
+{
+ return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, mnWidth);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdynitm.hxx b/include/svx/sdynitm.hxx
new file mode 100644
index 000000000..970956a42
--- /dev/null
+++ b/include/svx/sdynitm.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SDYNITM_HXX
+#define INCLUDED_SVX_SDYNITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+// class SdrYesNoItem
+// GetValueTextByVal() returns "yes" or "no"
+// instead of "TRUE" and "FALSE"
+//-------------------------------------------------- ----------
+class SVXCORE_DLLPUBLIC SdrYesNoItem: public SfxBoolItem {
+public:
+ SdrYesNoItem(TypedWhichId<SdrYesNoItem> nId, bool bOn): SfxBoolItem(nId,bOn) {}
+ virtual SdrYesNoItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual OUString GetValueTextByVal(bool bVal) const override;
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/searchcharmap.hxx b/include/svx/searchcharmap.hxx
new file mode 100644
index 000000000..1af4ce5fe
--- /dev/null
+++ b/include/svx/searchcharmap.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SEARCHCHARMAP_HXX
+#define INCLUDED_SVX_SEARCHCHARMAP_HXX
+
+#include <memory>
+
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <svx/charmap.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/vclptr.hxx>
+#include <unordered_map>
+
+namespace svx { struct SvxShowCharSetItem; }
+namespace tools { class Rectangle; }
+namespace weld { class ScrolledWindow; }
+
+class Subset;
+
+class SVX_DLLPUBLIC SvxSearchCharSet final : public SvxShowCharSet
+{
+public:
+ SvxSearchCharSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow, const VclPtr<VirtualDevice> &rDevice);
+ virtual ~SvxSearchCharSet() override;
+
+ virtual void RecalculateFont(vcl::RenderContext& rRenderContext) override;
+
+ void SelectCharacter( const Subset* sub);
+ virtual sal_UCS4 GetSelectCharacter() const override;
+
+ virtual svx::SvxShowCharSetItem* ImplGetItem( int _nPos ) override;
+ virtual int LastInView() const override;
+ virtual void SelectIndex( int index, bool bFocus = false ) override;
+ void AppendCharToList(sal_UCS4 cChar);
+ void ClearPreviousData();
+ void UpdateScrollRange();
+
+ virtual sal_Int32 getMaxCharCount() const override;
+
+private:
+ sal_Int32 nCount;
+
+ //index to char code mapping for the search
+ //to uniquely identify each appended element
+ std::unordered_map<sal_Int32, sal_UCS4> m_aItemList;
+private:
+ virtual void DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int n2) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual bool KeyInput(const KeyEvent& rKEvt) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/selctrl.hxx b/include/svx/selctrl.hxx
new file mode 100644
index 000000000..8136418e6
--- /dev/null
+++ b/include/svx/selctrl.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SELCTRL_HXX
+#define INCLUDED_SVX_SELCTRL_HXX
+
+#include <vcl/image.hxx>
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+
+/// Status bar control that indicates or changes the selection mode (standard / block / etc.)
+class SVX_DLLPUBLIC SvxSelectionModeControl final : public SfxStatusBarControl
+{
+public:
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxSelectionModeControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+
+ virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual bool MouseButtonDown(const MouseEvent& rEvt) override;
+ virtual void Paint(const UserDrawEvent& rEvt) override;
+ virtual void Click() override;
+
+private:
+ sal_uInt16 mnState;
+ Image maImages[4];
+ bool mbFeatureEnabled;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/selectioncontroller.hxx b/include/svx/selectioncontroller.hxx
new file mode 100644
index 000000000..57dec07b9
--- /dev/null
+++ b/include/svx/selectioncontroller.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SELECTIONCONTROLLER_HXX
+#define INCLUDED_SVX_SELECTIONCONTROLLER_HXX
+
+#include <svx/svxdllapi.h>
+#include <cppuhelper/weak.hxx>
+
+class KeyEvent;
+class MouseEvent;
+namespace vcl { class Window; }
+class SfxItemSet;
+class SfxRequest;
+class SfxStyleSheet;
+class SdrModel;
+class Point;
+class FontList;
+class SdrObject;
+
+namespace sdr
+{
+
+namespace table { struct CellPos; }
+
+class SVXCORE_DLLPUBLIC SelectionController: public cppu::OWeakObject
+{
+public:
+ virtual bool onKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
+ virtual bool onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin);
+ virtual bool onMouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin);
+ virtual bool onMouseMove(const MouseEvent& rMEvt, vcl::Window* pWin);
+
+ virtual void onSelectionHasChanged();
+
+ virtual void onSelectAll();
+
+ virtual void GetState( SfxItemSet& rSet );
+ virtual void Execute( SfxRequest& rReq );
+
+ virtual bool DeleteMarked();
+
+ virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+ virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+
+ virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const;
+ virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr );
+
+ virtual SdrObject* GetMarkedSdrObjClone( SdrModel& rTargetModel );
+ virtual bool PasteObjModel( const SdrModel& rModel );
+
+ /** applies a format paint brush set from the current selection.
+ if bNoCharacterFormats is true, no character attributes are changed.
+ if bNoParagraphFormats is true, no paragraph attributes are changed.
+ */
+ virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
+ /// This is a table object, and one or more of its cells are selected.
+ virtual bool hasSelectedCells() const;
+ /// Allows adjusting the point or mark of the selection to a document coordinate.
+ virtual bool setCursorLogicPosition(const Point& rPosition, bool bPoint);
+ /// Get the position of the first and the last selected cell.
+ virtual void getSelectedCells(table::CellPos& rFirstPos, table::CellPos& rLastPos);
+ /// Changes the font (grow/shrink) according to the input parameters.
+ virtual bool ChangeFontSize(bool bGrow, const FontList* pFontList);
+};
+
+}
+
+#endif // INCLUDED_SVX_SELECTIONCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/shapepropertynotifier.hxx b/include/svx/shapepropertynotifier.hxx
new file mode 100644
index 000000000..bcc6c357f
--- /dev/null
+++ b/include/svx/shapepropertynotifier.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SHAPEPROPERTYNOTIFIER_HXX
+#define INCLUDED_SVX_SHAPEPROPERTYNOTIFIER_HXX
+
+#include <svx/svxdllapi.h>
+#include <comphelper/multiinterfacecontainer3.hxx>
+#include <rtl/ustring.hxx>
+#include <o3tl/enumarray.hxx>
+
+#include <memory>
+#include <unordered_map>
+
+namespace com::sun::star::beans { class XPropertyChangeListener; }
+namespace com::sun::star::uno { class Any; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+namespace osl { class Mutex; }
+
+namespace cppu
+{
+ class OWeakObject;
+}
+
+
+namespace svx
+{
+
+ //= ShapeProperty
+
+ enum class ShapePropertyProviderId
+ {
+ // generic (UNO) shape properties
+ Position,
+ Size,
+ // text doc shape properties
+ TextDocAnchor,
+ LAST = TextDocAnchor
+ };
+
+ //= PropertyValueProvider
+
+ /** Default provider for a property value
+
+ This default implementation queries the object which it is constructed with for the XPropertySet interface,
+ and calls the getPropertyValue method.
+ */
+ class SVXCORE_DLLPUBLIC PropertyValueProvider
+ {
+ public:
+ PropertyValueProvider( ::cppu::OWeakObject& _rContext, OUString _aPropertyName )
+ :m_rContext( _rContext )
+ ,m_sPropertyName( std::move( _aPropertyName ) )
+ {
+ }
+ virtual ~PropertyValueProvider();
+
+ /** returns the name of the property which this provider is responsible for
+ */
+ const OUString & getPropertyName() const;
+ /** returns the current value of the property which the provider is responsible for
+ */
+ virtual void getCurrentValue( css::uno::Any& _out_rValue ) const;
+
+ protected:
+ ::cppu::OWeakObject& getContext() const { return m_rContext; }
+ PropertyValueProvider(const PropertyValueProvider&) = delete;
+ PropertyValueProvider& operator=(const PropertyValueProvider&) = delete;
+
+ private:
+ ::cppu::OWeakObject& m_rContext;
+ const OUString m_sPropertyName;
+ };
+
+
+ /** helper class for notifying XPropertyChangeListeners
+
+ The class is intended to be held as member of the class which does the property change broadcasting.
+ */
+ class SVXCORE_DLLPUBLIC PropertyChangeNotifier
+ {
+ public:
+ /** constructs a notifier instance
+
+ @param _rOwner
+ the owner instance of the notifier. Will be used as css.lang.EventObject.Source when
+ notifying events.
+ */
+ PropertyChangeNotifier( ::cppu::OWeakObject& _rOwner, ::osl::Mutex& _rMutex );
+ ~PropertyChangeNotifier();
+
+ // listener maintenance
+ void addPropertyChangeListener( const OUString& _rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener );
+ void removePropertyChangeListener( const OUString& _rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener );
+
+ /** registers an PropertyValueProvider
+ */
+ void registerProvider( const ShapePropertyProviderId _eProperty, std::unique_ptr<PropertyValueProvider> _rProvider );
+
+ /** notifies changes in the given property to all registered listeners
+
+ If no property value provider for the given property ID is registered, this is worth an assertion in a
+ non-product build, and otherwise ignored.
+ */
+ void notifyPropertyChange( const ShapePropertyProviderId _eProperty ) const;
+
+ /** is called to dispose the instance
+ */
+ void disposing();
+
+ private:
+ PropertyChangeNotifier(const PropertyChangeNotifier&) = delete;
+ PropertyChangeNotifier& operator=(const PropertyChangeNotifier&) = delete;
+
+ ::cppu::OWeakObject& m_rContext;
+ o3tl::enumarray<ShapePropertyProviderId, std::unique_ptr<PropertyValueProvider>> m_aProviders;
+ comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString> m_aPropertyChangeListeners;
+ };
+
+
+}
+
+
+#endif // INCLUDED_SVX_SHAPEPROPERTYNOTIFIER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
new file mode 100644
index 000000000..ed028d7b8
--- /dev/null
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -0,0 +1,175 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANELBASE_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANELBASE_HXX
+
+#include <memory>
+#include <svx/sidebar/AreaTransparencyGradientPopup.hxx>
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <svx/colorbox.hxx>
+#include <svx/xgrad.hxx>
+#include <svx/xfilluseslidebackgrounditem.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xflclit.hxx>
+#include <svx/xflgrit.hxx>
+#include <svx/xflhtit.hxx>
+#include <svx/xbtmpit.hxx>
+#include <sfx2/sidebar/PanelLayout.hxx>
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+class ToolbarUnoDispatcher;
+class XFillFloatTransparenceItem;
+class XFillUseSlideBackgroundItem;
+class XFillTransparenceItem;
+class XFillStyleItem;
+class XFillGradientItem;
+class XFillColorItem;
+class XFillHatchItem;
+class XFillBitmapItem;
+
+namespace svx::sidebar {
+
+class SVX_DLLPUBLIC AreaPropertyPanelBase
+: public PanelLayout,
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+{
+public:
+
+ virtual void NotifyItemUpdate(
+ const sal_uInt16 nSId,
+ const SfxItemState eState,
+ const SfxPoolItem* pState) override;
+
+ virtual void GetControlState(
+ const sal_uInt16 /*nSId*/,
+ boost::property_tree::ptree& /*rState*/) override {};
+
+ const static sal_Int32 DEFAULT_CENTERX;
+ const static sal_Int32 DEFAULT_CENTERY;
+ const static sal_Int32 DEFAULT_ANGLE;
+ const static sal_Int32 DEFAULT_STARTVALUE;
+ const static sal_Int32 DEFAULT_ENDVALUE;
+ const static sal_Int32 DEFAULT_BORDER;
+
+ const XGradient& GetGradient (const css::awt::GradientStyle eStyle) const;
+ void SetGradient (const XGradient& rGradient);
+ sal_Int32 GetSelectedTransparencyTypeIndex() const;
+
+ // constructor/destructor
+ AreaPropertyPanelBase(
+ weld::Widget* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+ virtual ~AreaPropertyPanelBase() override;
+
+ virtual void setFillTransparence(const XFillTransparenceItem& rItem) = 0;
+ virtual void setFillFloatTransparence(const XFillFloatTransparenceItem& rItem) = 0;
+ virtual void setFillStyle(const XFillStyleItem& rItem) = 0;
+ virtual void setFillStyleAndColor(const XFillStyleItem* pStyleItem, const XFillColorItem& aColorItem) = 0;
+ virtual void setFillStyleAndGradient(const XFillStyleItem* pStyleItem, const XFillGradientItem& aGradientItem) = 0;
+ virtual void setFillStyleAndHatch(const XFillStyleItem* pStyleItem, const XFillHatchItem& aHatchItem) = 0;
+ virtual void setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, const XFillBitmapItem& aHatchItem) = 0;
+ virtual void setFillUseBackground(const XFillStyleItem* pStyleItem, const XFillUseSlideBackgroundItem& rItem) = 0;
+
+ void updateFillTransparence(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillFloatTransparence(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillStyle(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillGradient(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillHatch(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillColor(bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillBitmap(bool BDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+ void updateFillUseBackground(bool BDisabled, bool bDefaultOrSet, const SfxPoolItem* pState);
+
+private:
+ void Initialize();
+
+protected:
+ const css::uno::Reference<css::frame::XFrame>& mxFrame;
+
+ sal_uInt16 meLastXFS;
+
+ sal_Int32 mnLastPosHatch;
+ sal_Int32 mnLastPosBitmap;
+ sal_Int32 mnLastPosPattern;
+ sal_uInt16 mnLastTransSolid;
+
+ XGradient maGradientLinear;
+ XGradient maGradientAxial;
+ XGradient maGradientRadial;
+ XGradient maGradientElliptical;
+ XGradient maGradientSquare;
+ XGradient maGradientRect;
+
+ //ui controls
+ std::unique_ptr<weld::Label> mxColorTextFT;
+ std::unique_ptr<weld::ComboBox> mxLbFillType;
+ std::unique_ptr<weld::ComboBox> mxLbFillAttr;
+ std::unique_ptr<ColorListBox> mxLbFillGradFrom;
+ std::unique_ptr<ColorListBox> mxLbFillGradTo;
+ std::unique_ptr<weld::Toolbar> mxToolBoxColor; // for new color picker
+ std::unique_ptr<ToolbarUnoDispatcher> mxColorDispatch;
+ std::unique_ptr<weld::Label> mxTrspTextFT;
+ std::unique_ptr<weld::ComboBox> mxLBTransType;
+ std::unique_ptr<weld::MetricSpinButton> mxMTRTransparent;
+ std::unique_ptr<weld::Scale> mxSldTransparent;
+ std::unique_ptr<weld::Toolbar> mxBTNGradient;
+ std::unique_ptr<weld::MetricSpinButton> mxMTRAngle;
+ std::unique_ptr<weld::ComboBox> mxGradientStyle;
+ std::unique_ptr<weld::Button> mxBmpImport;
+ std::unique_ptr<AreaTransparencyGradientPopup> mxTrGrPopup;
+
+ std::unique_ptr< XFillStyleItem > mpStyleItem;
+ std::unique_ptr< XFillColorItem > mpColorItem;
+ std::unique_ptr< XFillGradientItem > mpFillGradientItem;
+ std::unique_ptr< XFillHatchItem > mpHatchItem;
+ std::unique_ptr< XFillBitmapItem > mpBitmapItem;
+
+ OUString maImgAxial;
+ OUString maImgElli;
+ OUString maImgQuad;
+ OUString maImgRadial;
+ OUString maImgSquare;
+ OUString maImgLinear;
+
+ std::unique_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem;
+ std::unique_ptr< XFillUseSlideBackgroundItem > mpUseSlideBackgroundItem;
+ std::unique_ptr< SfxUInt16Item > mpTransparenceItem;
+
+ DECL_DLLPRIVATE_LINK(SelectFillTypeHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK(SelectFillAttrHdl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK(SelectFillColorHdl, ColorListBox&, void);
+ DECL_DLLPRIVATE_LINK(ChangeGradientAngle, weld::MetricSpinButton&, void);
+ DECL_DLLPRIVATE_LINK(ChangeTrgrTypeHdl_Impl, weld::ComboBox&, void);
+ DECL_DLLPRIVATE_LINK(ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_DLLPRIVATE_LINK(ModifyTransSliderHdl, weld::Scale&, void);
+ DECL_DLLPRIVATE_LINK(ClickImportBitmapHdl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(ToolbarHdl_Impl, const OString&, void);
+
+ void ImpUpdateTransparencies();
+ void SetTransparency(sal_uInt16 nVal);
+ void SelectFillAttrHdl_Impl();
+ void FillStyleChanged(bool bUpdateModel);
+};
+
+} // end of namespace svx::sidebar
+
+#endif // INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
new file mode 100644
index 000000000..3383884a8
--- /dev/null
+++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
+
+#include <vcl/weld.hxx>
+#include <svtools/toolbarmenu.hxx>
+
+class XFillFloatTransparenceItem;
+
+namespace svx::sidebar
+{
+class AreaTransparencyGradientControl;
+class AreaPropertyPanelBase;
+
+class AreaTransparencyGradientPopup final : public WeldToolbarPopup
+{
+private:
+ AreaPropertyPanelBase& mrAreaPropertyPanel;
+ std::unique_ptr<weld::Widget> mxCenterGrid;
+ std::unique_ptr<weld::Widget> mxAngleGrid;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrCenterX;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrCenterY;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrAngle;
+ std::unique_ptr<weld::Toolbar> mxBtnLeft45;
+ std::unique_ptr<weld::Toolbar> mxBtnRight45;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrStartValue;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrEndValue;
+ std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrBorder;
+
+ void InitStatus(XFillFloatTransparenceItem const* pGradientItem);
+ void ExecuteValueModify(sal_uInt8 nStartCol, sal_uInt8 nEndCol);
+ DECL_LINK(ModifiedTrgrHdl_Impl, weld::MetricSpinButton&, void);
+ DECL_LINK(Left_Click45_Impl, const OString&, void);
+ DECL_LINK(Right_Click45_Impl, const OString&, void);
+
+public:
+ AreaTransparencyGradientPopup(const css::uno::Reference<css::frame::XFrame>& rFrame,
+ AreaPropertyPanelBase& rPanel, weld::Widget* pParent);
+ ~AreaTransparencyGradientPopup();
+
+ void Rearrange(XFillFloatTransparenceItem const* pItem);
+ virtual void GrabFocus() override;
+};
+
+} // end of namespace svx::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/ContextChangeEventMultiplexer.hxx b/include/svx/sidebar/ContextChangeEventMultiplexer.hxx
new file mode 100644
index 000000000..1c8f58d1c
--- /dev/null
+++ b/include/svx/sidebar/ContextChangeEventMultiplexer.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SIDEBAR_CONTEXTCHANGEEVENTMULTIPLEXER_HXX
+#define INCLUDED_SVX_SIDEBAR_CONTEXTCHANGEEVENTMULTIPLEXER_HXX
+
+#include <svx/svxdllapi.h>
+#include <vcl/EnumContext.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+
+class SfxViewShell;
+
+/** Convenience frontend for css::ui::ContextChangeEventMultiplexer
+*/
+class SVX_DLLPUBLIC ContextChangeEventMultiplexer
+{
+public:
+ /** Notify the activation of a context.
+ @param rxController
+ This controller is used to determine the module (ie
+ application like Writer or Calc).
+ @param eContext
+ The activated context.
+ */
+ static void NotifyContextChange (
+ const css::uno::Reference<css::frame::XController>& rxController,
+ const vcl::EnumContext::Context eContext);
+
+ /** Notify the activation of a context.
+ @param pViewShell
+ This view shell is used to determine the module (ie
+ application like Writer or Calc). When <NULL/> then no
+ notification is made.
+ @param eContext
+ The activated context.
+ */
+ static void NotifyContextChange (
+ const SfxViewShell* pViewShell,
+ const vcl::EnumContext::Context eContext);
+
+private:
+ static OUString GetModuleName (
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/InspectorTextPanel.hxx b/include/svx/sidebar/InspectorTextPanel.hxx
new file mode 100644
index 000000000..f6ef0234a
--- /dev/null
+++ b/include/svx/sidebar/InspectorTextPanel.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#pragma once
+
+#include <sfx2/sidebar/PanelLayout.hxx>
+#include <svx/svxdllapi.h>
+
+namespace svx::sidebar
+{
+struct TreeNode
+{
+ OUString sNodeName;
+ css::uno::Any aValue;
+ bool isGrey;
+ enum
+ {
+ Category,
+ ComplexProperty,
+ SimpleProperty
+ } NodeType;
+ std::vector<TreeNode> children;
+ TreeNode()
+ : isGrey(false)
+ , NodeType(SimpleProperty)
+ {
+ }
+};
+class SVX_DLLPUBLIC InspectorTextPanel : public PanelLayout
+{
+public:
+ virtual ~InspectorTextPanel() override;
+
+ static std::unique_ptr<PanelLayout> Create(weld::Widget* pParent);
+
+ InspectorTextPanel(weld::Widget* pParent);
+
+ void updateEntries(const std::vector<TreeNode>& rStore, const sal_Int32 nParIdx);
+
+private:
+ std::unique_ptr<weld::TreeView> mpListBoxStyles;
+};
+
+} // end of namespace svx::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx
new file mode 100644
index 000000000..e94612ff2
--- /dev/null
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANELBASE_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANELBASE_HXX
+
+#include <vcl/weld.hxx>
+#include <memory>
+#include <svl/poolitem.hxx>
+#include <sfx2/sidebar/PanelLayout.hxx>
+#include <svx/sidebar/LineWidthPopup.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/frame/XFrame.hpp>
+
+class ToolbarUnoDispatcher;
+class XLineStyleItem;
+class XLineDashItem;
+class XLineStartItem;
+class XLineWidthItem;
+class XLineEndItem;
+class XLineEndList;
+class XLineJointItem;
+class XLineCapItem;
+class XLineTransparenceItem;
+class XDashList;
+
+namespace svx::sidebar
+{
+class LineStyleNoneChange;
+
+class SVX_DLLPUBLIC LinePropertyPanelBase : public PanelLayout
+{
+public:
+ virtual ~LinePropertyPanelBase() override;
+
+ void SetWidth(tools::Long nWidth);
+ void SetWidthIcon(int n);
+ void SetWidthIcon();
+
+ void EndLineWidthPopup();
+
+ // constructor/destructor
+ LinePropertyPanelBase(weld::Widget* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+ virtual void setLineWidth(const XLineWidthItem& rItem) = 0;
+
+ void SetNoneLineStyle(bool bNoneLineStyle)
+ {
+ if (bNoneLineStyle != mbNoneLineStyle)
+ {
+ mbNoneLineStyle = bNoneLineStyle;
+ ActivateControls();
+ }
+ }
+
+protected:
+ void ActivateControls();
+
+ virtual void setLineTransparency(const XLineTransparenceItem& rItem) = 0;
+ virtual void setLineJoint(const XLineJointItem* pItem) = 0;
+ virtual void setLineCap(const XLineCapItem* pItem) = 0;
+
+ void updateLineTransparence(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem);
+ virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem);
+ void updateLineJoint(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem);
+ void updateLineCap(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem);
+
+ void setMapUnit(MapUnit eMapUnit);
+
+ void enableArrowHead();
+ void disableArrowHead();
+
+protected:
+ std::unique_ptr<weld::Toolbar> mxTBColor;
+ std::unique_ptr<ToolbarUnoDispatcher> mxColorDispatch;
+
+ std::unique_ptr<weld::Toolbar> mxLineStyleTB;
+ std::unique_ptr<ToolbarUnoDispatcher> mxLineStyleDispatch;
+
+ sal_Int32 mnWidthCoreValue;
+
+private:
+ //ui controls
+ std::unique_ptr<weld::Label> mxFTWidth;
+ std::unique_ptr<weld::Toolbar> mxTBWidth;
+ std::unique_ptr<weld::Label> mxFTTransparency;
+ std::unique_ptr<weld::MetricSpinButton> mxMFTransparent;
+ std::unique_ptr<weld::Label> mxFTEdgeStyle;
+ std::unique_ptr<weld::ComboBox> mxLBEdgeStyle;
+ std::unique_ptr<weld::Label> mxFTCapStyle;
+ std::unique_ptr<weld::ComboBox> mxLBCapStyle;
+ std::unique_ptr<weld::Widget> mxGridLineProps;
+ std::unique_ptr<weld::Widget> mxBoxArrowProps;
+ //popup windows
+ std::unique_ptr<LineWidthPopup> mxLineWidthPopup;
+
+ std::unique_ptr<LineStyleNoneChange> mxLineStyleNoneChange;
+
+ sal_uInt16 mnTrans;
+ MapUnit meMapUnit;
+
+ // images from resource
+ OUString maIMGNone;
+
+ // multi-images
+ OUString maIMGWidthIcon[8];
+
+ bool mbWidthValuable : 1;
+ bool mbArrowSupported;
+ bool mbNoneLineStyle;
+
+ void Initialize();
+
+ DECL_DLLPRIVATE_LINK(ToolboxWidthSelectHdl, const OString&, void);
+ DECL_DLLPRIVATE_LINK(ChangeTransparentHdl, weld::MetricSpinButton&, void);
+ DECL_DLLPRIVATE_LINK(ChangeEdgeStyleHdl, weld::ComboBox&, void);
+ DECL_DLLPRIVATE_LINK(ChangeCapStyleHdl, weld::ComboBox&, void);
+};
+
+} // end of namespace svx::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx
new file mode 100644
index 000000000..262f35409
--- /dev/null
+++ b/include/svx/sidebar/LineWidthPopup.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX
+
+#include <tools/mapunit.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/image.hxx>
+#include <vcl/weld.hxx>
+#include <svtools/toolbarmenu.hxx>
+#include <array>
+
+class ValueSet;
+
+namespace svx::sidebar
+{
+class LinePropertyPanelBase;
+class LineWidthValueSet;
+
+class LineWidthPopup final : public WeldToolbarPopup
+{
+public:
+ LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent);
+ ~LineWidthPopup();
+
+ void SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit);
+
+ weld::Container* getTopLevel() const { return m_xTopLevel.get(); }
+
+ virtual void GrabFocus() override;
+
+private:
+ LinePropertyPanelBase& m_rParent;
+ std::array<OUString, 9> maStrUnits;
+ OUString m_sPt;
+ MapUnit m_eMapUnit;
+ bool m_bVSFocus;
+ bool m_bCustom;
+ tools::Long m_nCustomWidth;
+ Image m_aIMGCus;
+ Image m_aIMGCusGray;
+
+ std::unique_ptr<weld::MetricSpinButton> m_xMFWidth;
+ std::unique_ptr<LineWidthValueSet> m_xVSWidth;
+ std::unique_ptr<weld::CustomWeld> m_xVSWidthWin;
+
+ DECL_LINK(VSSelectHdl, ValueSet*, void);
+ DECL_LINK(MFModifyHdl, weld::MetricSpinButton&, void);
+};
+
+} // end of namespace svx::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/SelectionAnalyzer.hxx b/include/svx/sidebar/SelectionAnalyzer.hxx
new file mode 100644
index 000000000..349db8851
--- /dev/null
+++ b/include/svx/sidebar/SelectionAnalyzer.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SIDEBAR_SELECTIONANALYZER_HXX
+#define INCLUDED_SVX_SIDEBAR_SELECTIONANALYZER_HXX
+
+#include <vcl/EnumContext.hxx>
+#include <svx/svxdllapi.h>
+
+class SdrMarkList;
+class SdrObject;
+enum class SdrInventor : sal_uInt32;
+enum class SdrObjKind : sal_uInt16;
+
+namespace svx::sidebar {
+
+/** Analyze the current selection of Calc or Draw/Impress documents
+ and return the associated sidebar context.
+
+ The decision is based on heuristics. Do not expect pretty code.
+*/
+class SVX_DLLPUBLIC SelectionAnalyzer
+{
+public:
+ static vcl::EnumContext::Context GetContextForSelection_SC (
+ const SdrMarkList& rMarkList);
+
+ enum class ViewType
+ {
+ Standard,
+ Master,
+ Handout,
+ Notes,
+ };
+ static vcl::EnumContext::Context GetContextForSelection_SD (
+ const SdrMarkList& rMarkList,
+ const ViewType eViewType);
+
+private:
+ static vcl::EnumContext::Context GetContextForObjectId_SC (
+ const SdrObjKind nObjectId);
+ static vcl::EnumContext::Context GetContextForObjectId_SD (
+ const SdrObjKind nObjectId,
+ const ViewType eViewType);
+ static SdrInventor GetInventorTypeFromMark (
+ const SdrMarkList& rMarkList);
+ static SdrObjKind GetObjectTypeFromMark (
+ const SdrMarkList& rMarkList);
+ static SdrObjKind GetObjectTypeFromGroup (
+ const SdrObject* pObj);
+ static bool IsShapeType (
+ const SdrObjKind nType);
+ static bool IsTextObjType (
+ const SdrObjKind nType);
+};
+
+} // end of namespace svx::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/SelectionChangeHandler.hxx b/include/svx/sidebar/SelectionChangeHandler.hxx
new file mode 100644
index 000000000..a4d5dbc32
--- /dev/null
+++ b/include/svx/sidebar/SelectionChangeHandler.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SIDEBAR_SELECTIONCHANGEHANDLER_HXX
+#define INCLUDED_SVX_SIDEBAR_SELECTIONCHANGEHANDLER_HXX
+
+#include <svx/svxdllapi.h>
+#include <vcl/EnumContext.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+
+#include <comphelper/compbase.hxx>
+
+#include <functional>
+
+class SdrMarkView;
+
+
+namespace svx::sidebar {
+
+typedef comphelper::WeakComponentImplHelper<
+ css::view::XSelectionChangeListener
+ > SelectionChangeHandlerInterfaceBase;
+
+class SVX_DLLPUBLIC SelectionChangeHandler final
+ : public SelectionChangeHandlerInterfaceBase
+{
+public:
+ SelectionChangeHandler (
+ const std::function<OUString ()>& rSelectionChangeCallback,
+ const css::uno::Reference<css::frame::XController>& rxController,
+ const vcl::EnumContext::Context eDefaultContext);
+ virtual ~SelectionChangeHandler() override;
+
+ virtual void SAL_CALL selectionChanged (const css::lang::EventObject& rEvent) override;
+
+ virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override;
+
+ virtual void disposing(std::unique_lock<std::mutex>&) override;
+
+ void Connect();
+ void Disconnect();
+
+private:
+ SelectionChangeHandler(const SelectionChangeHandler&) = delete;
+ SelectionChangeHandler& operator=(const SelectionChangeHandler&) = delete;
+
+ const std::function<OUString ()> maSelectionChangeCallback;
+ css::uno::Reference<css::frame::XController> mxController;
+ const vcl::EnumContext::Context meDefaultContext;
+ bool mbIsConnected;
+};
+
+
+} // end of namespace svx::sidebar
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx
new file mode 100644
index 000000000..ac397f9fd
--- /dev/null
+++ b/include/svx/sidebar/ValueSetWithTextControl.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SIDEBAR_VALUESETWITHTEXTCONTROL_HXX
+#define INCLUDED_SVX_SIDEBAR_VALUESETWITHTEXTCONTROL_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <svtools/valueset.hxx>
+
+#include <vector>
+
+namespace svx::sidebar
+{
+/** Specialization of class <ValueSet>.
+ This specialization allows is a one-columned ValueSet which allow
+ items containing an image and a text or a text and a second text.
+
+ Especially, used for sidebar related controls.
+*/
+class SVX_DLLPUBLIC ValueSetWithTextControl final : public ValueSet
+{
+public:
+ ValueSetWithTextControl();
+
+ SVX_DLLPRIVATE virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+
+ void AddItem(const OUString& rItemText, const OUString& rItemText2);
+
+ SVX_DLLPRIVATE virtual void UserDraw(const UserDrawEvent& rUDEvt) override;
+
+private:
+ struct ValueSetWithTextItem
+ {
+ OUString maItemText;
+ OUString maItemText2;
+ };
+
+ ::std::vector<ValueSetWithTextItem> maItems;
+};
+
+} // end of namespace svx::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/signaturelinehelper.hxx b/include/svx/signaturelinehelper.hxx
new file mode 100644
index 000000000..9a10a09a2
--- /dev/null
+++ b/include/svx/signaturelinehelper.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_SIGNATURELINEHELPER_HXX
+#define INCLUDED_SVX_SIGNATURELINEHELPER_HXX
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/security/XCertificate.hpp>
+
+namespace weld
+{
+class Window;
+}
+class SdrView;
+class SfxObjectShell;
+
+namespace svx::SignatureLineHelper
+{
+/**
+ * Returns an SVG template. Once placeholders are replaced with real content, the result can be used
+ * as the graphic of a signature line shape.
+ */
+SVX_DLLPUBLIC OUString getSignatureImage(const OUString& rType = OUString());
+
+/**
+ * Choose a signature for signature line purposes.
+ */
+SVX_DLLPUBLIC css::uno::Reference<css::security::XCertificate>
+getSignatureCertificate(SfxObjectShell* pShell, weld::Window* pParent);
+
+/**
+ * Get a signer name out of a certificate.
+ */
+SVX_DLLPUBLIC OUString
+getSignerName(const css::uno::Reference<css::security::XCertificate>& xCertificate);
+
+/**
+ * Gets a localized date string.
+ */
+SVX_DLLPUBLIC OUString getLocalizedDate();
+
+/**
+ * Interprets rSVG as a graphic and gives back the resulting UNO wrapper.
+ */
+SVX_DLLPUBLIC css::uno::Reference<css::graphic::XGraphic> importSVG(std::u16string_view rSVG);
+
+/**
+ * Sets xCertificate as the signing certificate of the selected shape on pView.
+ */
+SVX_DLLPUBLIC void
+setShapeCertificate(const SdrView* pView,
+ const css::uno::Reference<css::security::XCertificate>& xCertificate);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/spacinglistbox.hxx b/include/svx/spacinglistbox.hxx
new file mode 100644
index 000000000..125da36d0
--- /dev/null
+++ b/include/svx/spacinglistbox.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SPACINGLISTBOXHELPER_HXX
+#define INCLUDED_SVX_SPACINGLISTBOXHELPER_HXX
+
+#include <svx/svxdllapi.h>
+#include <vcl/weld.hxx>
+
+enum class SpacingType
+{
+ SPACING_INCH,
+ MARGINS_INCH,
+ SPACING_CM,
+ MARGINS_CM
+};
+
+/// Custom Widget ListBox to hold entries for Spacing & Margin settings of Header/Footer
+namespace SpacingListBox
+{
+void SVXCORE_DLLPUBLIC Fill(SpacingType eType, weld::ComboBox&);
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx
new file mode 100644
index 000000000..4de73c1aa
--- /dev/null
+++ b/include/svx/sphere3d.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SPHERE3D_HXX
+#define INCLUDED_SVX_SPHERE3D_HXX
+
+#include <svl/intitem.hxx>
+#include <svl/itemset.hxx>
+#include <svx/obj3d.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svddef.hxx>
+
+class E3dDefaultAttributes;
+
+/**
+ * SphereObject with diameter r3DSize.
+ * The count of planes depends on the horizontal and vertical segment count.
+ */
+class SVXCORE_DLLPUBLIC E3dSphereObj final : public E3dCompoundObject
+{
+private:
+ basegfx::B3DPoint aCenter;
+ basegfx::B3DVector aSize;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+ void SetDefaultAttributes(const E3dDefaultAttributes& rDefault);
+
+private:
+ // protected destructor - due to final, make private
+ virtual ~E3dSphereObj() override;
+
+public:
+ E3dSphereObj(
+ SdrModel& rSdrModel,
+ const E3dDefaultAttributes& rDefault,
+ const basegfx::B3DPoint& rCenter,
+ const basegfx::B3DVector& r3DSize);
+
+ // FG: This constructor is only called from MakeObject from the 3d-Objectfactory
+ // when a document with a sphere is loaded. This constructor does not call
+ // CreateSphere, or create any spheres.
+ E3dSphereObj(SdrModel& rSdrModel);
+ E3dSphereObj(SdrModel& rSdrModel, E3dSphereObj const & rSource);
+
+ // horizontal segments:
+ sal_uInt32 GetHorizontalSegments() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS).GetValue(); }
+
+ // VerticalSegments:
+ sal_uInt32 GetVerticalSegments() const
+ { return GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue(); }
+
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual E3dSphereObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ const basegfx::B3DPoint& Center() const { return aCenter; }
+ const basegfx::B3DVector& Size() const { return aSize; }
+
+ // set local parameters when the geometry is recreated
+ void SetCenter(const basegfx::B3DPoint& rNew);
+ void SetSize(const basegfx::B3DVector& rNew);
+
+ // TakeObjName...() is for displaying in the UI, eg "3 selected frames."
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+};
+
+#endif // INCLUDED_SVX_SPHERE3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
new file mode 100644
index 000000000..2b975e435
--- /dev/null
+++ b/include/svx/srchdlg.hxx
@@ -0,0 +1,270 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SRCHDLG_HXX
+#define INCLUDED_SVX_SRCHDLG_HXX
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/srchdefs.hxx>
+#include <svl/srchitem.hxx>
+#include <svx/svxdllapi.h>
+#include <vcl/timer.hxx>
+#include <memory>
+#include <vector>
+
+class SvxSearchItem;
+class SfxStyleSheetBasePool;
+class SvxJSearchOptionsPage;
+class SvxSearchController;
+class VclAbstractDialog;
+struct SearchDlg_Impl;
+enum class ModifyFlags;
+enum class TransliterationFlags;
+
+struct SearchAttrItem
+{
+ sal_uInt16 nSlot;
+ SfxPoolItem* pItem;
+};
+
+typedef std::vector<SearchAttrItem> SrchAttrItemList;
+
+class SVX_DLLPUBLIC SearchAttrItemList : private SrchAttrItemList
+{
+public:
+ SearchAttrItemList() {}
+ SearchAttrItemList( const SearchAttrItemList& rList );
+ SearchAttrItemList( SearchAttrItemList&& rList );
+ ~SearchAttrItemList();
+
+ void Put( const SfxItemSet& rSet );
+ SfxItemSet& Get( SfxItemSet& rSet );
+ void Clear();
+ sal_uInt16 Count() const { return SrchAttrItemList::size(); }
+ SearchAttrItem& operator[](sal_uInt16 nPos)
+ { return SrchAttrItemList::operator[]( nPos ); }
+ SearchAttrItem& GetObject( sal_uInt16 nPos )
+ { return SrchAttrItemList::operator[]( nPos ); }
+
+ // the pointer to the item is not being copied, so don't delete
+ void Insert( const SearchAttrItem& rItem )
+ { SrchAttrItemList::push_back( rItem ); }
+ // deletes the pointer to the items
+ void Remove(size_t nPos);
+};
+
+enum class SearchLabel
+{
+ Empty,
+ End,
+ Start,
+ EndSheet,
+ NotFound,
+ StartWrapped,
+ EndWrapped,
+ NavElementNotFound,
+ ReminderStartWrapped,
+ ReminderEndWrapped
+};
+
+class SvxSearchDialog;
+class SVX_DLLPUBLIC SvxSearchDialogWrapper final : public SfxChildWindow
+{
+ std::shared_ptr<SvxSearchDialog> dialog;
+public:
+ SvxSearchDialogWrapper( vcl::Window*pParent, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo const * pInfo );
+
+ virtual ~SvxSearchDialogWrapper () override;
+ SvxSearchDialog *getDialog () { return dialog.get();}
+ static void SetSearchLabel(const SearchLabel& rSL);
+ static void SetSearchLabel(const OUString& sStr);
+ static OUString GetSearchLabel();
+ SFX_DECL_CHILDWINDOW_WITHID(SvxSearchDialogWrapper);
+};
+
+/**
+ In this modeless dialog the attributes for a search are configured
+ and a search is started from it. Several search types
+ (search, search all, replace, replace all) are possible.
+
+ */
+
+class SVX_DLLPUBLIC SvxSearchDialog final : public SfxModelessDialogController
+{
+friend class SvxSearchController;
+friend class SvxSearchDialogWrapper;
+friend class SvxJSearchOptionsDialog;
+
+public:
+ SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind );
+ virtual ~SvxSearchDialog() override;
+
+ virtual void ChildWinDispose() override;
+ virtual void Close() override;
+
+ // Window
+ virtual void Activate() override;
+
+ const SearchAttrItemList* GetSearchItemList() const
+ { return pSearchList.get(); }
+ const SearchAttrItemList* GetReplaceItemList() const
+ { return pReplaceList.get(); }
+
+ TransliterationFlags GetTransliterationFlags() const;
+
+ void SetSaveToModule(bool b);
+
+ void SetSearchLabel(const OUString& rStr);
+
+ // bring this window back to the foreground
+ void Present();
+
+private:
+ SfxBindings& rBindings;
+ Timer m_aPresentIdle;
+ bool bWriter;
+ bool bSearch;
+ bool bFormat;
+ bool bReplaceBackwards;
+ SearchOptionFlags nOptions;
+ bool bSet;
+ bool bConstruct;
+ ModifyFlags nModifyFlag;
+ OUString aStylesStr;
+ OUString aLayoutStr;
+ OUString aLayoutWriterStr;
+ OUString aLayoutCalcStr;
+ OUString aCalcStr;
+ sal_uInt16 nRememberSize;
+
+ std::vector<OUString> aSearchStrings;
+ std::vector<OUString> aReplaceStrings;
+
+ std::unique_ptr<SearchDlg_Impl> pImpl;
+ std::unique_ptr<SearchAttrItemList> pSearchList;
+ std::unique_ptr<SearchAttrItemList> pReplaceList;
+ std::unique_ptr<SvxSearchItem> pSearchItem;
+
+ std::unique_ptr<SvxSearchController> pSearchController;
+ std::unique_ptr<SvxSearchController> pOptionsController;
+ std::unique_ptr<SvxSearchController> pFamilyController;
+
+ mutable TransliterationFlags
+ nTransliterationFlags;
+
+ bool m_executingSubDialog = false;
+
+ std::unique_ptr<weld::Frame> m_xSearchFrame;
+ std::unique_ptr<weld::ComboBox> m_xSearchLB;
+ std::unique_ptr<weld::ComboBox> m_xSearchTmplLB;
+ std::unique_ptr<weld::Label> m_xSearchAttrText;
+ std::unique_ptr<weld::Label> m_xSearchLabel;
+
+ std::unique_ptr<weld::Frame> m_xReplaceFrame;
+ std::unique_ptr<weld::ComboBox> m_xReplaceLB;
+ std::unique_ptr<weld::ComboBox> m_xReplaceTmplLB;
+ std::unique_ptr<weld::Label> m_xReplaceAttrText;
+
+ std::unique_ptr<weld::Button> m_xSearchBtn;
+ std::unique_ptr<weld::Button> m_xBackSearchBtn;
+ std::unique_ptr<weld::Button> m_xSearchAllBtn;
+ std::unique_ptr<weld::Button> m_xReplaceBtn;
+ std::unique_ptr<weld::Button> m_xReplaceAllBtn;
+
+ std::unique_ptr<weld::Frame> m_xComponentFrame;
+ std::unique_ptr<weld::Button> m_xSearchComponent1PB;
+ std::unique_ptr<weld::Button> m_xSearchComponent2PB;
+
+ std::unique_ptr<weld::CheckButton> m_xMatchCaseCB;
+ std::unique_ptr<weld::CheckButton> m_xSearchFormattedCB;
+ std::unique_ptr<weld::CheckButton> m_xWordBtn;
+
+ std::unique_ptr<weld::Button> m_xCloseBtn;
+ std::unique_ptr<weld::CheckButton> m_xIncludeDiacritics;
+ std::unique_ptr<weld::CheckButton> m_xIncludeKashida;
+ std::unique_ptr<weld::Expander> m_xOtherOptionsExpander;
+ std::unique_ptr<weld::CheckButton> m_xSelectionBtn;
+ std::unique_ptr<weld::CheckButton> m_xRegExpBtn;
+ std::unique_ptr<weld::CheckButton> m_xWildcardBtn;
+ std::unique_ptr<weld::CheckButton> m_xSimilarityBox;
+ std::unique_ptr<weld::Button> m_xSimilarityBtn;
+ std::unique_ptr<weld::CheckButton> m_xLayoutBtn;
+ std::unique_ptr<weld::CheckButton> m_xNotesBtn;
+ std::unique_ptr<weld::CheckButton> m_xJapMatchFullHalfWidthCB;
+ std::unique_ptr<weld::CheckButton> m_xJapOptionsCB;
+ std::unique_ptr<weld::CheckButton> m_xReplaceBackwardsCB;
+ std::unique_ptr<weld::Button> m_xJapOptionsBtn;
+
+ std::unique_ptr<weld::Button> m_xAttributeBtn;
+ std::unique_ptr<weld::Button> m_xFormatBtn;
+ std::unique_ptr<weld::Button> m_xNoFormatBtn;
+
+ std::unique_ptr<weld::Widget> m_xCalcGrid;
+ std::unique_ptr<weld::Label> m_xCalcSearchInFT;
+ std::unique_ptr<weld::ComboBox> m_xCalcSearchInLB;
+ std::unique_ptr<weld::Label> m_xCalcSearchDirFT;
+ std::unique_ptr<weld::RadioButton> m_xRowsBtn;
+ std::unique_ptr<weld::RadioButton> m_xColumnsBtn;
+ std::unique_ptr<weld::CheckButton> m_xAllSheetsCB;
+ std::unique_ptr<weld::Label> m_xCalcStrFT;
+
+ DECL_DLLPRIVATE_LINK( ModifyHdl_Impl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK( FlagHdl_Impl, weld::Toggleable&, void );
+ DECL_DLLPRIVATE_LINK( CommandHdl_Impl, weld::Button&, void );
+ DECL_DLLPRIVATE_LINK(TemplateHdl_Impl, weld::Toggleable&, void);
+ DECL_DLLPRIVATE_LINK( FocusHdl_Impl, weld::Widget&, void );
+ DECL_DLLPRIVATE_LINK( LBSelectHdl_Impl, weld::ComboBox&, void );
+ DECL_DLLPRIVATE_LINK(LoseFocusHdl_Impl, weld::Widget&, void);
+ DECL_DLLPRIVATE_LINK(FormatHdl_Impl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(NoFormatHdl_Impl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK(AttributeHdl_Impl, weld::Button&, void);
+ DECL_DLLPRIVATE_LINK( TimeoutHdl_Impl, Timer*, void );
+ SVX_DLLPRIVATE void ClickHdl_Impl(const weld::Widget* pCtrl);
+
+ SVX_DLLPRIVATE void Construct_Impl();
+ SVX_DLLPRIVATE void InitControls_Impl();
+ SVX_DLLPRIVATE void ShowOptionalControls_Impl();
+ SVX_DLLPRIVATE void Init_Impl( bool bHasItemSet );
+ SVX_DLLPRIVATE void InitAttrList_Impl( const SfxItemSet* pSSet,
+ const SfxItemSet* pRSet );
+ SVX_DLLPRIVATE void Remember_Impl( const OUString &rStr, bool bSearch );
+ SVX_DLLPRIVATE void PaintAttrText_Impl();
+ SVX_DLLPRIVATE OUString& BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const;
+
+ SVX_DLLPRIVATE void TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool );
+ SVX_DLLPRIVATE void EnableControls_Impl( const SearchOptionFlags nFlags );
+ SVX_DLLPRIVATE void EnableControl_Impl(const weld::Widget& rCtrl);
+ SVX_DLLPRIVATE void SetItem_Impl( const SvxSearchItem* pItem );
+
+ SVX_DLLPRIVATE void SetModifyFlag_Impl(const weld::Widget* pCtrl);
+ SVX_DLLPRIVATE void SaveToModule_Impl();
+
+ SVX_DLLPRIVATE void ApplyTransliterationFlags_Impl( TransliterationFlags nSettings );
+ SVX_DLLPRIVATE bool IsOtherOptionsExpanded() const;
+
+ SVX_DLLPRIVATE short executeSubDialog(VclAbstractDialog * dialog);
+
+ DECL_DLLPRIVATE_LINK(PresentTimeoutHdl_Impl, Timer*, void);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/strarray.hxx b/include/svx/strarray.hxx
new file mode 100644
index 000000000..f0cc28a38
--- /dev/null
+++ b/include/svx/strarray.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_STRARRAY_HXX
+#define INCLUDED_SVX_STRARRAY_HXX
+
+#include <rtl/ustring.hxx>
+#include <tools/fldunit.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxFieldUnitTable
+{
+public:
+ static OUString GetString(sal_uInt32 i);
+ static sal_uInt32 Count();
+ static FieldUnit GetValue(sal_uInt32 i);
+};
+
+class SVX_DLLPUBLIC SvxNumberingTypeTable
+{
+public:
+ static OUString GetString(sal_uInt32 i);
+ static sal_uInt32 Count();
+ static int GetValue(sal_uInt32 i);
+ static sal_uInt32 FindIndex(int nValue);
+};
+
+class SVX_DLLPUBLIC SvxAttrNameTable
+{
+public:
+ static OUString GetString(sal_uInt32 i);
+ static sal_uInt32 Count();
+ static sal_uInt32 FindIndex(int nValue);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
new file mode 100644
index 000000000..747e3fdcd
--- /dev/null
+++ b/include/svx/strings.hrc
@@ -0,0 +1,1838 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_INC_STRINGS_HRC
+#define INCLUDED_SVX_INC_STRINGS_HRC
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+#define STR_ObjNameSingulNONE NC_("STR_ObjNameSingulNONE", "Drawing object")
+#define STR_ObjNamePluralNONE NC_("STR_ObjNamePluralNONE", "Drawing objects")
+#define STR_ObjNameSingulGRUP NC_("STR_ObjNameSingulGRUP", "Group object")
+#define STR_ObjNameSingulDIAGRAM NC_("STR_ObjNameSingulDIAGRAM", "Diagram")
+#define STR_ObjNamePluralGRUP NC_("STR_ObjNamePluralGRUP", "Group objects")
+#define STR_ObjNameSingulGRUPEMPTY NC_("STR_ObjNameSingulGRUPEMPTY", "Blank group object")
+#define STR_ObjNamePluralGRUPEMPTY NC_("STR_ObjNamePluralGRUPEMPTY", "Blank group objects")
+#define STR_ObjNameSingulLINE NC_("STR_ObjNameSingulLINE", "Line")
+#define STR_ObjNameSingulLINE_Hori NC_("STR_ObjNameSingulLINE_Hori", "Horizontal line")
+#define STR_ObjNameSingulLINE_Vert NC_("STR_ObjNameSingulLINE_Vert", "Vertical line")
+#define STR_ObjNameSingulLINE_Diag NC_("STR_ObjNameSingulLINE_Diag", "Diagonal line")
+#define STR_ObjNamePluralLINE NC_("STR_ObjNamePluralLINE", "Lines")
+#define STR_ObjNameSingulRECT NC_("STR_ObjNameSingulRECT", "Rectangle")
+#define STR_ObjNamePluralRECT NC_("STR_ObjNamePluralRECT", "Rectangles")
+#define STR_ObjNameSingulQUAD NC_("STR_ObjNameSingulQUAD", "Square")
+#define STR_ObjNamePluralQUAD NC_("STR_ObjNamePluralQUAD", "Squares")
+#define STR_ObjNameSingulPARAL NC_("STR_ObjNameSingulPARAL", "Parallelogram")
+#define STR_ObjNamePluralPARAL NC_("STR_ObjNamePluralPARAL", "Parallelograms")
+#define STR_ObjNameSingulRECTRND NC_("STR_ObjNameSingulRECTRND", "Rounded rectangle")
+#define STR_ObjNamePluralRECTRND NC_("STR_ObjNamePluralRECTRND", "Rounded Rectangles")
+#define STR_ObjNameSingulQUADRND NC_("STR_ObjNameSingulQUADRND", "rounded square")
+#define STR_ObjNamePluralQUADRND NC_("STR_ObjNamePluralQUADRND", "Rounded Squares")
+#define STR_ObjNameSingulPARALRND NC_("STR_ObjNameSingulPARALRND", "Rounded Parallelogram")
+#define STR_ObjNamePluralPARALRND NC_("STR_ObjNamePluralPARALRND", "Rounded parallelograms")
+#define STR_ObjNameSingulCIRC NC_("STR_ObjNameSingulCIRC", "Circle")
+#define STR_ObjNamePluralCIRC NC_("STR_ObjNamePluralCIRC", "Circles")
+#define STR_ObjNameSingulSECT NC_("STR_ObjNameSingulSECT", "Circle sector")
+#define STR_ObjNamePluralSECT NC_("STR_ObjNamePluralSECT", "Circle sectors")
+#define STR_ObjNameSingulCARC NC_("STR_ObjNameSingulCARC", "Arc")
+#define STR_ObjNamePluralCARC NC_("STR_ObjNamePluralCARC", "Arcs")
+#define STR_ObjNameSingulCCUT NC_("STR_ObjNameSingulCCUT", "Circle segment")
+#define STR_ObjNamePluralCCUT NC_("STR_ObjNamePluralCCUT", "Circle segments")
+#define STR_ObjNameSingulCIRCE NC_("STR_ObjNameSingulCIRCE", "Ellipse")
+#define STR_ObjNamePluralCIRCE NC_("STR_ObjNamePluralCIRCE", "Ellipses")
+#define STR_ObjNameSingulSECTE NC_("STR_ObjNameSingulSECTE", "Ellipse Pie")
+#define STR_ObjNamePluralSECTE NC_("STR_ObjNamePluralSECTE", "Ellipse Pies")
+#define STR_ObjNameSingulCARCE NC_("STR_ObjNameSingulCARCE", "Elliptical arc")
+#define STR_ObjNamePluralCARCE NC_("STR_ObjNamePluralCARCE", "Elliptical arcs")
+#define STR_ObjNameSingulCCUTE NC_("STR_ObjNameSingulCCUTE", "Ellipse Segment")
+#define STR_ObjNamePluralCCUTE NC_("STR_ObjNamePluralCCUTE", "Ellipse Segments")
+#define STR_ObjNameSingulPOLY NC_("STR_ObjNameSingulPOLY", "Polygon")
+#define STR_ObjNameSingulPOLY_PointCount NC_("STR_ObjNameSingulPOLY_PointCount", "Polygon %2 corners")
+#define STR_ObjNamePluralPOLY NC_("STR_ObjNamePluralPOLY", "Polygons")
+#define STR_ObjNameSingulPLIN NC_("STR_ObjNameSingulPLIN", "Polyline")
+#define STR_ObjNameSingulPLIN_PointCount NC_("STR_ObjNameSingulPLIN_PointCount", "Polyline with %2 corners")
+#define STR_ObjNamePluralPLIN NC_("STR_ObjNamePluralPLIN", "Polylines")
+#define STR_ObjNameSingulPATHLINE NC_("STR_ObjNameSingulPATHLINE", "Bézier curve")
+#define STR_ObjNamePluralPATHLINE NC_("STR_ObjNamePluralPATHLINE", "Bézier curves")
+#define STR_ObjNameSingulPATHFILL NC_("STR_ObjNameSingulPATHFILL", "Bézier curve")
+#define STR_ObjNamePluralPATHFILL NC_("STR_ObjNamePluralPATHFILL", "Bézier curves")
+#define STR_ObjNameSingulFREELINE NC_("STR_ObjNameSingulFREELINE", "Freeform Line")
+#define STR_ObjNamePluralFREELINE NC_("STR_ObjNamePluralFREELINE", "Freeform Lines")
+#define STR_ObjNameSingulFREEFILL NC_("STR_ObjNameSingulFREEFILL", "Freeform Line")
+#define STR_ObjNamePluralFREEFILL NC_("STR_ObjNamePluralFREEFILL", "Freeform Lines")
+#define STR_ObjNameSingulCOMBLINE NC_("STR_ObjNameSingulCOMBLINE", "Curve")
+#define STR_ObjNameSingulNATSPLN NC_("STR_ObjNameSingulNATSPLN", "Natural Spline")
+#define STR_ObjNamePluralNATSPLN NC_("STR_ObjNamePluralNATSPLN", "Natural Splines")
+#define STR_ObjNameSingulPERSPLN NC_("STR_ObjNameSingulPERSPLN", "Periodic Spline")
+#define STR_ObjNamePluralPERSPLN NC_("STR_ObjNamePluralPERSPLN", "Periodic Splines")
+#define STR_ObjNameSingulTEXT NC_("STR_ObjNameSingulTEXT", "Text Frame")
+#define STR_ObjNamePluralTEXT NC_("STR_ObjNamePluralTEXT", "Text Frame")
+#define STR_ObjNameSingulTEXTLNK NC_("STR_ObjNameSingulTEXTLNK", "Linked text frame")
+#define STR_ObjNamePluralTEXTLNK NC_("STR_ObjNamePluralTEXTLNK", "Linked text frames")
+#define STR_ObjNameSingulTITLETEXT NC_("STR_ObjNameSingulTITLETEXT", "Title text")
+#define STR_ObjNamePluralTITLETEXT NC_("STR_ObjNamePluralTITLETEXT", "Title texts")
+#define STR_ObjNameSingulOUTLINETEXT NC_("STR_ObjNameSingulOUTLINETEXT", "Outline Text")
+#define STR_ObjNamePluralOUTLINETEXT NC_("STR_ObjNamePluralOUTLINETEXT", "Outline Texts")
+#define STR_ObjNameSingulGRAF NC_("STR_ObjNameSingulGRAF", "Image")
+#define STR_ObjNamePluralGRAF NC_("STR_ObjNamePluralGRAF", "Images")
+#define STR_ObjNameSingulGRAFLNK NC_("STR_ObjNameSingulGRAFLNK", "Linked image")
+#define STR_ObjNamePluralGRAFLNK NC_("STR_ObjNamePluralGRAFLNK", "Linked images")
+#define STR_ObjNameSingulGRAFNONE NC_("STR_ObjNameSingulGRAFNONE", "Blank image object")
+#define STR_ObjNamePluralGRAFNONE NC_("STR_ObjNamePluralGRAFNONE", "Blank image objects")
+#define STR_ObjNameSingulGRAFNONELNK NC_("STR_ObjNameSingulGRAFNONELNK", "Blank linked image")
+#define STR_ObjNamePluralGRAFNONELNK NC_("STR_ObjNamePluralGRAFNONELNK", "Blank linked images")
+#define STR_ObjNameSingulGRAFMTF NC_("STR_ObjNameSingulGRAFMTF", "Metafile")
+#define STR_ObjNamePluralGRAFMTF NC_("STR_ObjNamePluralGRAFMTF", "Metafiles")
+#define STR_ObjNameSingulGRAFMTFLNK NC_("STR_ObjNameSingulGRAFMTFLNK", "Linked Metafile")
+#define STR_ObjNamePluralGRAFMTFLNK NC_("STR_ObjNamePluralGRAFMTFLNK", "Linked Metafiles")
+#define STR_ObjNameSingulGRAFBMP NC_("STR_ObjNameSingulGRAFBMP", "Image")
+#define STR_ObjNameSingulGRAFBMPTRANS NC_("STR_ObjNameSingulGRAFBMPTRANS", "Image with transparency")
+#define STR_ObjNameSingulGRAFBMPLNK NC_("STR_ObjNameSingulGRAFBMPLNK", "Linked Image")
+#define STR_ObjNameSingulGRAFBMPTRANSLNK NC_("STR_ObjNameSingulGRAFBMPTRANSLNK", "Linked image with transparency")
+#define STR_ObjNamePluralGRAFBMP NC_("STR_ObjNamePluralGRAFBMP", "Images")
+#define STR_ObjNamePluralGRAFBMPTRANS NC_("STR_ObjNamePluralGRAFBMPTRANS", "Images with transparency")
+#define STR_ObjNamePluralGRAFBMPLNK NC_("STR_ObjNamePluralGRAFBMPLNK", "Linked images")
+#define STR_ObjNamePluralGRAFBMPTRANSLNK NC_("STR_ObjNamePluralGRAFBMPTRANSLNK", "Linked images with transparency")
+#define STR_ObjNameSingulCUSTOMSHAPE NC_("STR_ObjNameSingulCUSTOMSHAPE", "Shape")
+#define STR_ObjNamePluralCUSTOMSHAPE NC_("STR_ObjNamePluralCUSTOMSHAPE", "Shapes")
+#define STR_ObjNameSingulGRAFSVG NC_("STR_ObjNameSingulGRAFSVG", "SVG")
+#define STR_ObjNamePluralGRAFSVG NC_("STR_ObjNamePluralGRAFSVG", "SVGs")
+#define STR_ObjNameSingulGRAFWMF NC_("STR_ObjNameSingulGRAFWMF", "WMF")
+#define STR_ObjNamePluralGRAFWMF NC_("STR_ObjNamePluralGRAFWMF", "WMFs")
+#define STR_ObjNameSingulGRAFEMF NC_("STR_ObjNameSingulGRAFEMF", "EMF")
+#define STR_ObjNamePluralGRAFEMF NC_("STR_ObjNamePluralGRAFEMF", "EMFs")
+#define STR_ObjNameSingulGRAFPDF NC_("STR_ObjNameSingulGRAFEMF", "PDF")
+#define STR_ObjNamePluralGRAFPDF NC_("STR_ObjNamePluralGRAFEMF", "PDFs")
+#define STR_ObjNameSingulOLE2 NC_("STR_ObjNameSingulOLE2", "embedded object (OLE)")
+#define STR_ObjNamePluralOLE2 NC_("STR_ObjNamePluralOLE2", "Embedded objects (OLE)")
+#define STR_ObjNameSingulUno NC_("STR_ObjNameSingulUno", "Control")
+#define STR_ObjNamePluralUno NC_("STR_ObjNamePluralUno", "Controls")
+#define STR_ObjNameSingulFrame NC_("STR_ObjNameSingulFrame", "Frame")
+#define STR_ObjNamePluralFrame NC_("STR_ObjNamePluralFrame", "Frames")
+#define STR_ObjNameSingulEDGE NC_("STR_ObjNameSingulEDGE", "Object Connectors")
+#define STR_ObjNamePluralEDGE NC_("STR_ObjNamePluralEDGE", "Object Connectors")
+#define STR_ObjNameSingulCAPTION NC_("STR_ObjNameSingulCAPTION", "Callout")
+#define STR_ObjNamePluralCAPTION NC_("STR_ObjNamePluralCAPTION", "Callouts")
+#define STR_ObjNameSingulPAGE NC_("STR_ObjNameSingulPAGE", "Preview object")
+#define STR_ObjNamePluralPAGE NC_("STR_ObjNamePluralPAGE", "Preview objects")
+#define STR_ObjNameSingulMEASURE NC_("STR_ObjNameSingulMEASURE", "Dimension line")
+#define STR_ObjNamePluralMEASURE NC_("STR_ObjNamePluralMEASURE", "Dimensioning objects")
+#define STR_ObjNamePlural NC_("STR_ObjNamePlural", "Drawing objects")
+#define STR_ObjNameNoObj NC_("STR_ObjNameNoObj", "No draw object")
+#define STR_ObjNameSingulPlural NC_("STR_ObjNameSingulPlural", "Draw object(s)")
+#define STR_ObjNameSingulCube3d NC_("STR_ObjNameSingulCube3d", "3D cube")
+#define STR_ObjNamePluralCube3d NC_("STR_ObjNamePluralCube3d", "3D cubes")
+#define STR_ObjNameSingulExtrude3d NC_("STR_ObjNameSingulExtrude3d", "Extrusion object")
+#define STR_ObjNamePluralExtrude3d NC_("STR_ObjNamePluralExtrude3d", "Extrusion objects")
+#define STR_ObjNameSingulLathe3d NC_("STR_ObjNameSingulLathe3d", "Rotation object")
+#define STR_ObjNamePluralLathe3d NC_("STR_ObjNamePluralLathe3d", "Rotation objects")
+#define STR_ObjNameSingulObj3d NC_("STR_ObjNameSingulObj3d", "3D object")
+#define STR_ObjNamePluralObj3d NC_("STR_ObjNamePluralObj3d", "3D objects")
+#define STR_ObjNameSingulScene3d NC_("STR_ObjNameSingulScene3d", "3D scene")
+#define STR_ObjNamePluralScene3d NC_("STR_ObjNamePluralScene3d", "3D scenes")
+#define STR_ObjNameSingulSphere3d NC_("STR_ObjNameSingulSphere3d", "Sphere")
+#define STR_ObjNamePluralSphere3d NC_("STR_ObjNamePluralSphere3d", "Spheres")
+#define STR_EditWithCopy NC_("STR_EditWithCopy", "with copy")
+#define STR_EditPosSize NC_("STR_EditPosSize", "Set position and size for %1")
+#define STR_EditDelete NC_("STR_EditDelete", "Delete %1")
+#define STR_EditMovToTop NC_("STR_EditMovToTop", "Move %1 forward")
+#define STR_EditMovToBtm NC_("STR_EditMovToBtm", "Move %1 further back")
+#define STR_EditPutToTop NC_("STR_EditPutToTop", "Move %1 to front")
+#define STR_EditPutToBtm NC_("STR_EditPutToBtm", "Move %1 to back")
+#define STR_EditRevOrder NC_("STR_EditRevOrder", "Reverse order of %1")
+#define STR_SortShapes NC_("STR_SortShapes", "Sort shapes")
+#define STR_EditMove NC_("STR_EditMove", "Move %1")
+#define STR_EditResize NC_("STR_EditResize", "Resize %1")
+#define STR_EditRotate NC_("STR_EditRotate", "Rotate %1")
+#define STR_EditMirrorHori NC_("STR_EditMirrorHori", "Flip %1 horizontal")
+#define STR_EditMirrorVert NC_("STR_EditMirrorVert", "Flip %1 vertical")
+#define STR_EditMirrorDiag NC_("STR_EditMirrorDiag", "Flip %1 diagonal")
+#define STR_EditMirrorFree NC_("STR_EditMirrorFree", "Flip %1 freehand")
+#define STR_EditShear NC_("STR_EditShear", "Distort %1 (slant)")
+#define STR_EditCrook NC_("STR_EditCrook", "Arrange %1 in circle")
+#define STR_EditCrookContortion NC_("STR_EditCrookContortion", "Curve %1 in circle")
+#define STR_EditDistort NC_("STR_EditDistort", "Distort %1")
+#define STR_EditRipUp NC_("STR_EditRipUp", "Undo %1")
+#define STR_EditSetPointsSmooth NC_("STR_EditSetPointsSmooth", "Modify bézier properties of %1")
+#define STR_EditSetSegmentsKind NC_("STR_EditSetSegmentsKind", "Modify bézier properties of %1")
+#define STR_EditSetGlueEscDir NC_("STR_EditSetGlueEscDir", "Set exit direction for %1")
+#define STR_EditSetGluePercent NC_("STR_EditSetGluePercent", "Set relative attribute at %1")
+#define STR_EditSetGlueAlign NC_("STR_EditSetGlueAlign", "Set reference point for %1")
+#define STR_EditGroup NC_("STR_EditGroup", "Group %1")
+#define STR_EditUngroup NC_("STR_EditUngroup", "Ungroup %1")
+#define STR_EditSetAttributes NC_("STR_EditSetAttributes", "Apply attributes to %1")
+#define STR_EditSetStylesheet NC_("STR_EditSetStylesheet", "Apply Styles to %1")
+#define STR_EditDelStylesheet NC_("STR_EditDelStylesheet", "Remove Style from %1")
+#define STR_EditConvToPoly NC_("STR_EditConvToPoly", "Convert %1 to polygon")
+#define STR_EditConvToPolys NC_("STR_EditConvToPolys", "Convert %1 to polygons")
+#define STR_EditConvToCurve NC_("STR_EditConvToCurve", "Convert %1 to curve")
+#define STR_EditConvToCurves NC_("STR_EditConvToCurves", "Convert %1 to curves")
+#define STR_EditConvToContour NC_("STR_EditConvToContour", "Convert %1 to contour")
+#define STR_EditConvToContours NC_("STR_EditConvToContours", "Convert %1 to contours")
+#define STR_EditAlign NC_("STR_EditAlign", "Align %1")
+#define STR_EditAlignVTop NC_("STR_EditAlignVTop", "Align %1 to top")
+#define STR_EditAlignVBottom NC_("STR_EditAlignVBottom", "Align %1 to bottom")
+#define STR_EditAlignVCenter NC_("STR_EditAlignVCenter", "Horizontally center %1")
+#define STR_EditAlignHLeft NC_("STR_EditAlignHLeft", "Align %1 to left")
+#define STR_EditAlignHRight NC_("STR_EditAlignHRight", "Align %1 to right")
+#define STR_EditAlignHCenter NC_("STR_EditAlignHCenter", "Vertically center %1")
+#define STR_EditAlignCenter NC_("STR_EditAlignCenter", "Center %1")
+#define STR_EditTransform NC_("STR_EditTransform", "Transform %1")
+#define STR_EditCombine_PolyPoly NC_("STR_EditCombine_PolyPoly", "Combine %1")
+#define STR_EditMergeMergePoly NC_("STR_EditMergeMergePoly", "Merge %1")
+#define STR_EditMergeSubstractPoly NC_("STR_EditMergeSubstractPoly", "Subtract %1")
+#define STR_EditMergeIntersectPoly NC_("STR_EditMergeIntersectPoly", "Intersect %1")
+#define STR_DistributeMarkedObjects NC_("STR_DistributeMarkedObjects", "Distribute selected objects")
+#define STR_EqualizeWidthMarkedObjects NC_("STR_EqualizeWidthMarkedObjects", "Equalize Width %1")
+#define STR_EqualizeHeightMarkedObjects NC_("STR_EqualizeHeightMarkedObjects", "Equalize Height %1")
+#define STR_EditCombine_OnePoly NC_("STR_EditCombine_OnePoly", "Combine %1")
+#define STR_EditDismantle_Polys NC_("STR_EditDismantle_Polys", "Split %1")
+#define STR_EditDismantle_Lines NC_("STR_EditDismantle_Lines", "Split %1")
+#define STR_EditImportMtf NC_("STR_EditImportMtf", "Split %1")
+#define STR_ExchangePaste NC_("STR_ExchangePaste", "Insert object(s)")
+#define STR_DragInsertPoint NC_("STR_DragInsertPoint", "Insert point to %1")
+#define STR_DragInsertGluePoint NC_("STR_DragInsertGluePoint", "Insert gluepoint to %1")
+#define STR_DragMethMovHdl NC_("STR_DragMethMovHdl", "Move reference-point")
+#define STR_DragMethObjOwn NC_("STR_DragMethObjOwn", "Geometrically change %1")
+#define STR_DiagramModelDataChange NC_("STR_DiagramModelDataChange", "Diagram change %1")
+#define STR_DragMethMove NC_("STR_DragMethMove", "Move %1")
+#define STR_DragMethResize NC_("STR_DragMethResize", "Resize %1")
+#define STR_DragMethRotate NC_("STR_DragMethRotate", "Rotate %1")
+#define STR_DragMethMirrorHori NC_("STR_DragMethMirrorHori", "Flip %1 horizontal")
+#define STR_DragMethMirrorVert NC_("STR_DragMethMirrorVert", "Flip %1 vertical")
+#define STR_DragMethMirrorDiag NC_("STR_DragMethMirrorDiag", "Flip %1 diagonal")
+#define STR_DragMethMirrorFree NC_("STR_DragMethMirrorFree", "Flip %1 freehand")
+#define STR_DragMethGradient NC_("STR_DragMethGradient", "Interactive gradient for %1")
+#define STR_DragMethTransparence NC_("STR_DragMethTransparence", "Interactive transparency for %1")
+#define STR_DragMethShear NC_("STR_DragMethShear", "Distort %1 (slant)")
+#define STR_DragMethCrook NC_("STR_DragMethCrook", "Arrange %1 in circle")
+#define STR_DragMethCrookContortion NC_("STR_DragMethCrookContortion", "Curve %1 in circle")
+#define STR_DragMethDistort NC_("STR_DragMethDistort", "Distort %1")
+#define STR_DragMethCrop NC_("STR_DragMethCrop", "Crop %1")
+#define STR_DragRectEckRad NC_("STR_DragRectEckRad", "Alter radius by %1")
+#define STR_DragPathObj NC_("STR_DragPathObj", "Change %1")
+#define STR_DragRectResize NC_("STR_DragRectResize", "Resize %1")
+#define STR_DragCaptFram NC_("STR_DragCaptFram", "Move %1")
+#define STR_DragCaptTail NC_("STR_DragCaptTail", "Move end point of %1")
+#define STR_DragCircAngle NC_("STR_DragCircAngle", "Adjust angle by %1")
+#define STR_DragEdgeTail NC_("STR_DragEdgeTail", "Change %1")
+#define STR_ViewTextEdit NC_("STR_ViewTextEdit", "TextEdit: Paragraph %1, Row %2, Column %3")
+#define STR_ViewMarked NC_("STR_ViewMarked", "%1 selected")
+#define STR_ViewMarkedPoint NC_("STR_ViewMarkedPoint", "Point from %1")
+#define STR_ViewMarkedPoints NC_("STR_ViewMarkedPoints", "%2 points from %1")
+#define STR_ViewMarkedGluePoint NC_("STR_ViewMarkedGluePoint", "Gluepoint from %1")
+#define STR_ViewMarkedGluePoints NC_("STR_ViewMarkedGluePoints", "%2 gluepoints from %1")
+#define STR_ViewMarkObjs NC_("STR_ViewMarkObjs", "Mark objects")
+#define STR_ViewMarkMoreObjs NC_("STR_ViewMarkMoreObjs", "Mark additional objects")
+#define STR_ViewMarkPoints NC_("STR_ViewMarkPoints", "Mark points")
+#define STR_ViewMarkMorePoints NC_("STR_ViewMarkMorePoints", "Mark additional points")
+#define STR_ViewMarkGluePoints NC_("STR_ViewMarkGluePoints", "Mark gluepoints")
+#define STR_ViewMarkMoreGluePoints NC_("STR_ViewMarkMoreGluePoints", "Mark additional gluepoints")
+#define STR_ViewCreateObj NC_("STR_ViewCreateObj", "Create %1")
+#define STR_UndoInsertObj NC_("STR_UndoInsertObj", "Insert %1")
+#define STR_UndoCopyObj NC_("STR_UndoCopyObj", "Copy %1")
+#define STR_UndoObjOrdNum NC_("STR_UndoObjOrdNum", "Change object order of %1")
+#define STR_UndoObjSetText NC_("STR_UndoObjSetText", "Edit text of %1")
+#define STR_UndoNewPage NC_("STR_UndoNewPage", "Insert page")
+#define STR_UndoDelPage NC_("STR_UndoDelPage", "Delete page")
+#define STR_UndoCopPage NC_("STR_UndoCopPage", "Copy page")
+#define STR_UndoMovPage NC_("STR_UndoMovPage", "Change order of pages")
+#define STR_UndoDelPageMasterDscr NC_("STR_UndoDelPageMasterDscr", "Clear background page assignment")
+#define STR_UndoChgPageMasterDscr NC_("STR_UndoChgPageMasterDscr", "Change background page assignment")
+#define STR_UndoMergeModel NC_("STR_UndoMergeModel", "Insert document")
+#define STR_UndoNewLayer NC_("STR_UndoNewLayer", "Insert Layer")
+#define STR_UndoDelLayer NC_("STR_UndoDelLayer", "Delete layer")
+// Undo/Redo for setting object's name (#i73249#)
+#define STR_UndoObjName NC_("STR_UndoObjName", "Change object name of %1 to")
+#define STR_UndoObjTitle NC_("STR_UndoObjTitle", "Change object title of %1")
+#define STR_UndoObjDescription NC_("STR_UndoObjDescription", "Change object description of %1")
+#define STR_ItemValON NC_("STR_ItemValON", "on")
+#define STR_ItemValOFF NC_("STR_ItemValOFF", "off")
+#define STR_ItemValYES NC_("STR_ItemValYES", "yes")
+#define STR_ItemValNO NC_("STR_ItemValNO", "No")
+#define STR_ItemValCAPTIONTYPE1 NC_("STR_ItemValCAPTIONTYPE1", "Type 1")
+#define STR_ItemValCAPTIONTYPE2 NC_("STR_ItemValCAPTIONTYPE2", "Type 2")
+#define STR_ItemValCAPTIONTYPE3 NC_("STR_ItemValCAPTIONTYPE3", "Type 3")
+#define STR_ItemValCAPTIONTYPE4 NC_("STR_ItemValCAPTIONTYPE4", "Type 4")
+#define STR_ItemValCAPTIONESCHORI NC_("STR_ItemValCAPTIONESCHORI", "Horizontal")
+#define STR_ItemValCAPTIONESCVERT NC_("STR_ItemValCAPTIONESCVERT", "Vertical")
+#define STR_ItemValCAPTIONESCBESTFIT NC_("STR_ItemValCAPTIONESCBESTFIT", "Automatic")
+#define STR_ItemValFITTOSIZENONE NC_("STR_ItemValFITTOSIZENONE", "Off")
+#define STR_ItemValFITTOSIZEPROP NC_("STR_ItemValFITTOSIZEPROP", "Proportional")
+#define STR_ItemValFITTOSIZEALLLINES NC_("STR_ItemValFITTOSIZEALLLINES", "Fit to size (all rows separately) ")
+#define STR_ItemValFITTOSIZERESIZEAT NC_("STR_ItemValFITTOSIZERESIZEAT", "Use hard attributes")
+#define STR_ItemValTEXTVADJTOP NC_("STR_ItemValTEXTVADJTOP", "Top")
+#define STR_ItemValTEXTVADJCENTER NC_("STR_ItemValTEXTVADJCENTER", "Center")
+#define STR_ItemValTEXTVADJBOTTOM NC_("STR_ItemValTEXTVADJBOTTOM", "Bottom")
+#define STR_ItemValTEXTVADJBLOCK NC_("STR_ItemValTEXTVADJBLOCK", "Use entire height")
+#define STR_ItemValTEXTVADJSTRETCH NC_("STR_ItemValTEXTVADJSTRETCH", "Stretched")
+#define STR_ItemValTEXTHADJLEFT NC_("STR_ItemValTEXTHADJLEFT", "Left")
+#define STR_ItemValTEXTHADJCENTER NC_("STR_ItemValTEXTHADJCENTER", "Center")
+#define STR_ItemValTEXTHADJRIGHT NC_("STR_ItemValTEXTHADJRIGHT", "Right")
+#define STR_ItemValTEXTHADJBLOCK NC_("STR_ItemValTEXTHADJBLOCK", "Use entire width")
+#define STR_ItemValTEXTHADJSTRETCH NC_("STR_ItemValTEXTHADJSTRETCH", "Stretched")
+#define STR_ItemValTEXTANI_NONE NC_("STR_ItemValTEXTANI_NONE", "off")
+#define STR_ItemValTEXTANI_BLINK NC_("STR_ItemValTEXTANI_BLINK", "flash")
+#define STR_ItemValTEXTANI_SCROLL NC_("STR_ItemValTEXTANI_SCROLL", "Scroll Through")
+#define STR_ItemValTEXTANI_ALTERNATE NC_("STR_ItemValTEXTANI_ALTERNATE", "alternating")
+#define STR_ItemValTEXTANI_SLIDE NC_("STR_ItemValTEXTANI_SLIDE", "Scroll In")
+#define STR_ItemValTEXTANI_LEFT NC_("STR_ItemValTEXTANI_LEFT", "left")
+#define STR_ItemValTEXTANI_UP NC_("STR_ItemValTEXTANI_UP", "up")
+#define STR_ItemValTEXTANI_RIGHT NC_("STR_ItemValTEXTANI_RIGHT", "right")
+#define STR_ItemValTEXTANI_DOWN NC_("STR_ItemValTEXTANI_DOWN", "down")
+#define STR_ItemValEDGE_ORTHOLINES NC_("STR_ItemValEDGE_ORTHOLINES", "Standard Connector")
+#define STR_ItemValEDGE_THREELINES NC_("STR_ItemValEDGE_THREELINES", "Line Connector")
+#define STR_ItemValEDGE_ONELINE NC_("STR_ItemValEDGE_ONELINE", "Straight Connector")
+#define STR_ItemValEDGE_BEZIER NC_("STR_ItemValEDGE_BEZIER", "Curved Connector")
+#define STR_ItemValMEASURE_STD NC_("STR_ItemValMEASURE_STD", "Standard")
+#define STR_ItemValMEASURE_RADIUS NC_("STR_ItemValMEASURE_RADIUS", "Radius")
+#define STR_ItemValMEASURE_TEXTVAUTO NC_("STR_ItemValMEASURE_TEXTVAUTO", "automatic")
+#define STR_ItemValMEASURE_ABOVE NC_("STR_ItemValMEASURE_ABOVE", "on the line")
+#define STR_ItemValMEASURETEXT_BREAKEDLINE NC_("STR_ItemValMEASURETEXT_BREAKEDLINE", "broken line")
+#define STR_ItemValMEASURE_BELOW NC_("STR_ItemValMEASURE_BELOW", "below the line")
+#define STR_ItemValMEASURETEXT_VERTICALCEN NC_("STR_ItemValMEASURETEXT_VERTICALCEN", "centered")
+#define STR_ItemValCIRC_FULL NC_("STR_ItemValCIRC_FULL", "full circle")
+#define STR_ItemValCIRC_SECT NC_("STR_ItemValCIRC_SECT", "Circle Pie")
+#define STR_ItemValCIRC_CUT NC_("STR_ItemValCIRC_CUT", "Circle segment")
+#define STR_ItemValCIRC_ARC NC_("STR_ItemValCIRC_ARC", "Arc")
+// Strings for the templates dialog
+#define SIP_UNKNOWN_ATTR NC_("SIP_UNKNOWN_ATTR", "Unknown attribute")
+// Strings for the templates dialog
+#define SIP_XA_LINESTYLE NC_("SIP_XA_LINESTYLE", "Line style")
+#define SIP_XA_LINEDASH NC_("SIP_XA_LINEDASH", "Line pattern")
+#define SIP_XA_LINEWIDTH NC_("SIP_XA_LINEWIDTH", "Line width")
+#define SIP_XA_LINECOLOR NC_("SIP_XA_LINECOLOR", "Line color")
+#define SIP_XA_LINESTART NC_("SIP_XA_LINESTART", "Line head")
+#define SIP_XA_LINEEND NC_("SIP_XA_LINEEND", "Line end")
+#define SIP_XA_LINESTARTWIDTH NC_("SIP_XA_LINESTARTWIDTH", "Line head width")
+#define SIP_XA_LINEENDWIDTH NC_("SIP_XA_LINEENDWIDTH", "Line end width")
+#define SIP_XA_LINESTARTCENTER NC_("SIP_XA_LINESTARTCENTER", "Center arrowhead")
+#define SIP_XA_LINEENDCENTER NC_("SIP_XA_LINEENDCENTER", "Center arrowend")
+#define SIP_XA_LINETRANSPARENCE NC_("SIP_XA_LINETRANSPARENCE", "Line transparency")
+#define SIP_XA_LINEJOINT NC_("SIP_XA_LINEJOINT", "Line joint")
+#define SIP_XATTRSET_LINE NC_("SIP_XATTRSET_LINE", "Line attributes")
+#define SIP_XA_FILLSTYLE NC_("SIP_XA_FILLSTYLE", "Fill style")
+#define SIP_XA_FILLCOLOR NC_("SIP_XA_FILLCOLOR", "Fillcolor")
+#define SIP_XA_FILLGRADIENT NC_("SIP_XA_FILLGRADIENT", "Gradient")
+#define SIP_XA_FILLHATCH NC_("SIP_XA_FILLHATCH", "Hatching")
+#define SIP_XA_FILLBITMAP NC_("SIP_XA_FILLBITMAP", "Fillbitmap")
+#define SIP_XA_FILLTRANSPARENCE NC_("SIP_XA_FILLTRANSPARENCE", "Transparency")
+#define SIP_XA_GRADIENTSTEPCOUNT NC_("SIP_XA_GRADIENTSTEPCOUNT", "Number of gradient steps")
+#define SIP_XA_FILLBMP_TILE NC_("SIP_XA_FILLBMP_TILE", "Tile fill")
+#define SIP_XA_FILLBMP_POS NC_("SIP_XA_FILLBMP_POS", "Fillbitmap position")
+#define SIP_XA_FILLBMP_SIZEX NC_("SIP_XA_FILLBMP_SIZEX", "Fillbitmap width")
+#define SIP_XA_FILLBMP_SIZEY NC_("SIP_XA_FILLBMP_SIZEY", "Height of fillbitmap")
+#define SIP_XA_FILLFLOATTRANSPARENCE NC_("SIP_XA_FILLFLOATTRANSPARENCE", "Transparent gradient")
+#define SIP_XA_SECONDARYFILLCOLOR NC_("SIP_XA_SECONDARYFILLCOLOR", "Fill reserved for 2")
+#define SIP_XA_FILLBMP_SIZELOG NC_("SIP_XA_FILLBMP_SIZELOG", "Tile size not in %")
+#define SIP_XA_FILLBMP_TILEOFFSETX NC_("SIP_XA_FILLBMP_TILEOFFSETX", "Tile offset X in %")
+#define SIP_XA_FILLBMP_TILEOFFSETY NC_("SIP_XA_FILLBMP_TILEOFFSETY", "Tile offset Y in %")
+#define SIP_XA_FILLBMP_STRETCH NC_("SIP_XA_FILLBMP_STRETCH", "Bitmap scaling")
+#define SIP_XA_FILLBMP_POSOFFSETX NC_("SIP_XA_FILLBMP_POSOFFSETX", "Tile position X in %")
+#define SIP_XA_FILLBMP_POSOFFSETY NC_("SIP_XA_FILLBMP_POSOFFSETY", "Tile position Y in %")
+#define SIP_XA_FILLBACKGROUND NC_("SIP_XA_FILLBACKGROUND", "Background fill")
+#define SIP_XA_FILLUSESLIDEBACKGROUND NC_("SIP_XA_FILLUSESLIDEBACKGROUND", "Use slide background fill")
+#define SIP_XATTRSET_FILL NC_("SIP_XATTRSET_FILL", "Area attributes")
+#define SIP_XA_FORMTXTSTYLE NC_("SIP_XA_FORMTXTSTYLE", "Fontwork style")
+#define SIP_XA_FORMTXTADJUST NC_("SIP_XA_FORMTXTADJUST", "Fontwork alignment")
+#define SIP_XA_FORMTXTDISTANCE NC_("SIP_XA_FORMTXTDISTANCE", "Fontwork spacing")
+#define SIP_XA_FORMTXTSTART NC_("SIP_XA_FORMTXTSTART", "Fontwork font begin")
+#define SIP_XA_FORMTXTMIRROR NC_("SIP_XA_FORMTXTMIRROR", "Fontwork mirror")
+#define SIP_XA_FORMTXTOUTLINE NC_("SIP_XA_FORMTXTOUTLINE", "Fontwork outline")
+#define SIP_XA_FORMTXTSHADOW NC_("SIP_XA_FORMTXTSHADOW", "Fontwork shadow")
+#define SIP_XA_FORMTXTSHDWCOLOR NC_("SIP_XA_FORMTXTSHDWCOLOR", "Fontwork shadow color")
+#define SIP_XA_FORMTXTSHDWXVAL NC_("SIP_XA_FORMTXTSHDWXVAL", "Fontwork shadow offset X")
+#define SIP_XA_FORMTXTSHDWYVAL NC_("SIP_XA_FORMTXTSHDWYVAL", "Fontwork shadow offset Y")
+#define SIP_XA_FORMTXTHIDEFORM NC_("SIP_XA_FORMTXTHIDEFORM", "Hide fontwork outline")
+#define SIP_XA_FORMTXTSHDWTRANSP NC_("SIP_XA_FORMTXTSHDWTRANSP", "Fontwork shadow transparency")
+#define SIP_SA_SHADOW NC_("SIP_SA_SHADOW", "Shadow")
+#define SIP_SA_SHADOWCOLOR NC_("SIP_SA_SHADOWCOLOR", "Shadow color")
+#define SIP_SA_SHADOWXDIST NC_("SIP_SA_SHADOWXDIST", "Shadow spacing X")
+#define SIP_SA_SHADOWYDIST NC_("SIP_SA_SHADOWYDIST", "Shadow spacing Y")
+#define SIP_SA_SHADOWTRANSPARENCE NC_("SIP_SA_SHADOWTRANSPARENCE", "Shadow transparency")
+#define SIP_SA_SHADOWBLUR NC_("SIP_SA_SHADOWBLUR", "Shadow blur")
+#define SIP_SA_SHADOW3D NC_("SIP_SA_SHADOW3D", "3D shadow")
+#define SIP_SA_SHADOWPERSP NC_("SIP_SA_SHADOWPERSP", "Perspective shadow")
+#define SIP_SA_CAPTIONTYPE NC_("SIP_SA_CAPTIONTYPE", "Type of legend")
+#define SIP_SA_CAPTIONFIXEDANGLE NC_("SIP_SA_CAPTIONFIXEDANGLE", "Fixed legend angle")
+#define SIP_SA_CAPTIONANGLE NC_("SIP_SA_CAPTIONANGLE", "Legend angle")
+#define SIP_SA_CAPTIONGAP NC_("SIP_SA_CAPTIONGAP", "Legend lines spacing")
+#define SIP_SA_CAPTIONESCDIR NC_("SIP_SA_CAPTIONESCDIR", "Legend exit alignment")
+#define SIP_SA_CAPTIONESCISREL NC_("SIP_SA_CAPTIONESCISREL", "Relative exit legend")
+#define SIP_SA_CAPTIONESCREL NC_("SIP_SA_CAPTIONESCREL", "Relative exit legend")
+#define SIP_SA_CAPTIONESCABS NC_("SIP_SA_CAPTIONESCABS", "Absolute exit of legend")
+#define SIP_SA_CAPTIONLINELEN NC_("SIP_SA_CAPTIONLINELEN", "Legend line length")
+#define SIP_SA_CAPTIONFITLINELEN NC_("SIP_SA_CAPTIONFITLINELEN", "AutoLength of legend lines")
+#define SIP_SA_CORNER_RADIUS NC_("SIP_SA_CORNER_RADIUS", "Corner radius")
+#define SIP_SA_TEXT_MINFRAMEHEIGHT NC_("SIP_SA_TEXT_MINFRAMEHEIGHT", "Minimal frame height")
+#define SIP_SA_TEXT_AUTOGROWHEIGHT NC_("SIP_SA_TEXT_AUTOGROWHEIGHT", "AutoFit height")
+#define SIP_SA_TEXT_FITTOSIZE NC_("SIP_SA_TEXT_FITTOSIZE", "Fit text to frame")
+#define SIP_SA_TEXT_LEFTDIST NC_("SIP_SA_TEXT_LEFTDIST", "Left text frame spacing")
+#define SIP_SA_TEXT_RIGHTDIST NC_("SIP_SA_TEXT_RIGHTDIST", "Right text frame spacing")
+#define SIP_SA_TEXT_UPPERDIST NC_("SIP_SA_TEXT_UPPERDIST", "Upper text frame spacing")
+#define SIP_SA_TEXT_LOWERDIST NC_("SIP_SA_TEXT_LOWERDIST", "Lower text frame spacing")
+#define SIP_SA_TEXT_VERTADJUST NC_("SIP_SA_TEXT_VERTADJUST", "Vertical text anchor")
+#define SIP_SA_TEXT_MAXFRAMEHEIGHT NC_("SIP_SA_TEXT_MAXFRAMEHEIGHT", "Maximal frame height")
+#define SIP_SA_TEXT_MINFRAMEWIDTH NC_("SIP_SA_TEXT_MINFRAMEWIDTH", "Minimal frame width")
+#define SIP_SA_TEXT_MAXFRAMEWIDTH NC_("SIP_SA_TEXT_MAXFRAMEWIDTH", "Maximal frame width")
+#define SIP_SA_TEXT_AUTOGROWWIDTH NC_("SIP_SA_TEXT_AUTOGROWWIDTH", "AutoFit width")
+#define SIP_SA_TEXT_HORZADJUST NC_("SIP_SA_TEXT_HORZADJUST", "Horizontal text anchor")
+#define SIP_SA_TEXT_ANIKIND NC_("SIP_SA_TEXT_ANIKIND", "Ticker")
+#define SIP_SA_TEXT_ANIDIRECTION NC_("SIP_SA_TEXT_ANIDIRECTION", "Ticker direction")
+#define SIP_SA_TEXT_ANISTARTINSIDE NC_("SIP_SA_TEXT_ANISTARTINSIDE", "Ticker start inside")
+#define SIP_SA_TEXT_ANISTOPINSIDE NC_("SIP_SA_TEXT_ANISTOPINSIDE", "Ticker stop inside")
+#define SIP_SA_TEXT_ANICOUNT NC_("SIP_SA_TEXT_ANICOUNT", "Number of ticker runs")
+#define SIP_SA_TEXT_ANIDELAY NC_("SIP_SA_TEXT_ANIDELAY", "Speed of ticker")
+#define SIP_SA_TEXT_ANIAMOUNT NC_("SIP_SA_TEXT_ANIAMOUNT", "Ticker step size")
+#define SIP_SA_TEXT_CONTOURFRAME NC_("SIP_SA_TEXT_CONTOURFRAME", "Outline text flow")
+#define SIP_SA_TEXTCOLUMNS_NUMBER NC_("SIP_SA_TEXTCOLUMNS_NUMBER", "Columns number")
+#define SIP_SA_TEXTCOLUMNS_SPACING NC_("SIP_SA_TEXTCOLUMNS_SPACING", "Columns spacing")
+#define SIP_SA_XMLATTRIBUTES NC_("SIP_SA_XMLATTRIBUTES", "User-defined attributes")
+#define SIP_SA_TEXT_USEFIXEDCELLHEIGHT NC_("SIP_SA_TEXT_USEFIXEDCELLHEIGHT", "Use font-independent line spacing")
+#define SIP_SA_WORDWRAP NC_("SIP_SA_WORDWRAP", "Word wrap text in shape")
+#define SIP_SA_CHAINNEXTNAME NC_("SIP_SA_CHAINNEXTNAME", "Next link in text chain")
+#define SIP_SA_EDGEKIND NC_("SIP_SA_EDGEKIND", "Type of connector")
+#define SIP_SA_EDGENODE1HORZDIST NC_("SIP_SA_EDGENODE1HORZDIST", "Horz. spacing object 1")
+#define SIP_SA_EDGENODE1VERTDIST NC_("SIP_SA_EDGENODE1VERTDIST", "Vert. spacing object 1")
+#define SIP_SA_EDGENODE2HORZDIST NC_("SIP_SA_EDGENODE2HORZDIST", "Horz. spacing object 2")
+#define SIP_SA_EDGENODE2VERTDIST NC_("SIP_SA_EDGENODE2VERTDIST", "Vert. spacing object 2")
+#define SIP_SA_EDGENODE1GLUEDIST NC_("SIP_SA_EDGENODE1GLUEDIST", "Glue spacing object 1")
+#define SIP_SA_EDGENODE2GLUEDIST NC_("SIP_SA_EDGENODE2GLUEDIST", "Glue spacing object 2")
+#define SIP_SA_EDGELINEDELTACOUNT NC_("SIP_SA_EDGELINEDELTACOUNT", "Number of movable lines")
+#define SIP_SA_EDGELINE1DELTA NC_("SIP_SA_EDGELINE1DELTA", "Offset line 1")
+#define SIP_SA_EDGELINE2DELTA NC_("SIP_SA_EDGELINE2DELTA", "Offset line 2")
+#define SIP_SA_EDGELINE3DELTA NC_("SIP_SA_EDGELINE3DELTA", "Offset line 3")
+#define SIP_SA_MEASUREKIND NC_("SIP_SA_MEASUREKIND", "Type of dimensioning")
+#define SIP_SA_MEASURETEXTHPOS NC_("SIP_SA_MEASURETEXTHPOS", "Dimension value - horizontal position")
+#define SIP_SA_MEASURETEXTVPOS NC_("SIP_SA_MEASURETEXTVPOS", "Dimension value - vertical position")
+#define SIP_SA_MEASURELINEDIST NC_("SIP_SA_MEASURELINEDIST", "Dimension line space")
+#define SIP_SA_MEASUREHELPLINEOVERHANG NC_("SIP_SA_MEASUREHELPLINEOVERHANG", "Dimension help line overhang")
+#define SIP_SA_MEASUREHELPLINEDIST NC_("SIP_SA_MEASUREHELPLINEDIST", "Dimension help line spacing")
+#define SIP_SA_MEASUREHELPLINE1LEN NC_("SIP_SA_MEASUREHELPLINE1LEN", "Backlog of dimension help line 1")
+#define SIP_SA_MEASUREHELPLINE2LEN NC_("SIP_SA_MEASUREHELPLINE2LEN", "Backlog of dimension help line 2")
+#define SIP_SA_MEASUREBELOWREFEDGE NC_("SIP_SA_MEASUREBELOWREFEDGE", "Lower edge dimensioning")
+#define SIP_SA_MEASURETEXTROTA90 NC_("SIP_SA_MEASURETEXTROTA90", "Dimension value across dimension line")
+#define SIP_SA_MEASURETEXTUPSIDEDOWN NC_("SIP_SA_MEASURETEXTUPSIDEDOWN", "Rotate dimension value by 180 degree")
+#define SIP_SA_MEASUREOVERHANG NC_("SIP_SA_MEASUREOVERHANG", "Dimension line overhang")
+#define SIP_SA_MEASUREUNIT NC_("SIP_SA_MEASUREUNIT", "Measure unit")
+#define SIP_SA_MEASURESCALE NC_("SIP_SA_MEASURESCALE", "Additional scale factor")
+#define SIP_SA_MEASURESHOWUNIT NC_("SIP_SA_MEASURESHOWUNIT", "Measure unit display")
+#define SIP_SA_MEASUREFORMATSTRING NC_("SIP_SA_MEASUREFORMATSTRING", "Dimension value format")
+#define SIP_SA_MEASURETEXTAUTOANGLE NC_("SIP_SA_MEASURETEXTAUTOANGLE", "AutoPositioning of the dimension value")
+#define SIP_SA_MEASURETEXTAUTOANGLEVIEW NC_("SIP_SA_MEASURETEXTAUTOANGLEVIEW", "Angle for the automatic positioning of the dimension value")
+#define SIP_SA_MEASURETEXTISFIXEDANGLE NC_("SIP_SA_MEASURETEXTISFIXEDANGLE", "Determination of the dimension value angle")
+#define SIP_SA_MEASURETEXTFIXEDANGLE NC_("SIP_SA_MEASURETEXTFIXEDANGLE", "Angle of the dimension value")
+#define SIP_SA_MEASUREDECIMALPLACES NC_("SIP_SA_MEASUREDECIMALPLACES", "Decimal places")
+#define SIP_SA_CIRCKIND NC_("SIP_SA_CIRCKIND", "Type of circle")
+#define SIP_SA_CIRCSTARTANGLE NC_("SIP_SA_CIRCSTARTANGLE", "Start angle")
+#define SIP_SA_CIRCENDANGLE NC_("SIP_SA_CIRCENDANGLE", "End angle")
+#define SIP_SA_OBJMOVEPROTECT NC_("SIP_SA_OBJMOVEPROTECT", "Protected object position")
+#define SIP_SA_OBJSIZEPROTECT NC_("SIP_SA_OBJSIZEPROTECT", "Protected object size")
+#define SIP_SA_OBJPRINTABLE NC_("SIP_SA_OBJPRINTABLE", "Object, printable")
+#define SIP_SA_OBJVISIBLE NC_("SIP_SA_OBJVISIBLE", "Object, visible")
+#define SIP_SA_LAYERID NC_("SIP_SA_LAYERID", "Level ID")
+#define SIP_SA_LAYERNAME NC_("SIP_SA_LAYERNAME", "Layer")
+#define SIP_SA_OBJECTNAME NC_("SIP_SA_OBJECTNAME", "Object name")
+#define SIP_SA_ALLPOSITIONX NC_("SIP_SA_ALLPOSITIONX", "Position X, complete")
+#define SIP_SA_ALLPOSITIONY NC_("SIP_SA_ALLPOSITIONY", "Position Y, complete")
+#define SIP_SA_ALLSIZEWIDTH NC_("SIP_SA_ALLSIZEWIDTH", "Total Width")
+#define SIP_SA_ALLSIZEHEIGHT NC_("SIP_SA_ALLSIZEHEIGHT", "Height, complete")
+#define SIP_SA_ONEPOSITIONX NC_("SIP_SA_ONEPOSITIONX", "Single position X")
+#define SIP_SA_ONEPOSITIONY NC_("SIP_SA_ONEPOSITIONY", "Single position Y")
+#define SIP_SA_ONESIZEWIDTH NC_("SIP_SA_ONESIZEWIDTH", "Single width")
+#define SIP_SA_ONESIZEHEIGHT NC_("SIP_SA_ONESIZEHEIGHT", "Single height")
+#define SIP_SA_LOGICSIZEWIDTH NC_("SIP_SA_LOGICSIZEWIDTH", "Logical width")
+#define SIP_SA_LOGICSIZEHEIGHT NC_("SIP_SA_LOGICSIZEHEIGHT", "Logical height")
+#define SIP_SA_ROTATEANGLE NC_("SIP_SA_ROTATEANGLE", "Single rotation angle")
+#define SIP_SA_SHEARANGLE NC_("SIP_SA_SHEARANGLE", "Single shear angle")
+#define SIP_SA_MOVEX NC_("SIP_SA_MOVEX", "Move horizontally")
+#define SIP_SA_MOVEY NC_("SIP_SA_MOVEY", "Move vertically")
+#define SIP_SA_RESIZEXONE NC_("SIP_SA_RESIZEXONE", "Resize X, single")
+#define SIP_SA_RESIZEYONE NC_("SIP_SA_RESIZEYONE", "Resize Y, single")
+#define SIP_SA_ROTATEONE NC_("SIP_SA_ROTATEONE", "Single rotation")
+#define SIP_SA_HORZSHEARONE NC_("SIP_SA_HORZSHEARONE", "Single horizontal shear")
+#define SIP_SA_VERTSHEARONE NC_("SIP_SA_VERTSHEARONE", "Single vertical shear")
+#define SIP_SA_RESIZEXALL NC_("SIP_SA_RESIZEXALL", "Resize X, complete")
+#define SIP_SA_RESIZEYALL NC_("SIP_SA_RESIZEYALL", "Resize Y, complete")
+#define SIP_SA_ROTATEALL NC_("SIP_SA_ROTATEALL", "Rotate all")
+#define SIP_SA_HORZSHEARALL NC_("SIP_SA_HORZSHEARALL", "Shear horizontal, complete")
+#define SIP_SA_VERTSHEARALL NC_("SIP_SA_VERTSHEARALL", "Shear vertical, complete")
+#define SIP_SA_TRANSFORMREF1X NC_("SIP_SA_TRANSFORMREF1X", "Reference point 1 X")
+#define SIP_SA_TRANSFORMREF1Y NC_("SIP_SA_TRANSFORMREF1Y", "Reference point 1 Y")
+#define SIP_SA_TRANSFORMREF2X NC_("SIP_SA_TRANSFORMREF2X", "Reference point 2 X")
+#define SIP_SA_TRANSFORMREF2Y NC_("SIP_SA_TRANSFORMREF2Y", "Reference point 2 Y")
+#define SIP_EE_PARA_HYPHENATE NC_("SIP_EE_PARA_HYPHENATE", "Hyphenation")
+#define SIP_EE_PARA_BULLETSTATE NC_("SIP_EE_PARA_BULLETSTATE", "Display bullets")
+#define SIP_EE_PARA_OUTLLRSPACE NC_("SIP_EE_PARA_OUTLLRSPACE", "Numbering indents")
+#define SIP_EE_PARA_OUTLLEVEL NC_("SIP_EE_PARA_OUTLLEVEL", "Numbering level")
+#define SIP_EE_PARA_BULLET NC_("SIP_EE_PARA_BULLET", "Bullets and Numberings")
+#define SIP_EE_PARA_LRSPACE NC_("SIP_EE_PARA_LRSPACE", "Indents")
+#define SIP_EE_PARA_ULSPACE NC_("SIP_EE_PARA_ULSPACE", "Paragraph spacing")
+#define SIP_EE_PARA_SBL NC_("SIP_EE_PARA_SBL", "Line spacing")
+#define SIP_EE_PARA_JUST NC_("SIP_EE_PARA_JUST", "Paragraph alignment")
+#define SIP_EE_PARA_TABS NC_("SIP_EE_PARA_TABS", "Tabulators")
+#define SIP_EE_CHAR_COLOR NC_("SIP_EE_CHAR_COLOR", "Font color")
+#define SIP_EE_CHAR_FONTINFO NC_("SIP_EE_CHAR_FONTINFO", "Character set")
+#define SIP_EE_CHAR_FONTHEIGHT NC_("SIP_EE_CHAR_FONTHEIGHT", "Font size")
+#define SIP_EE_CHAR_FONTWIDTH NC_("SIP_EE_CHAR_FONTWIDTH", "Font width")
+#define SIP_EE_CHAR_WEIGHT NC_("SIP_EE_CHAR_WEIGHT", "Bold (thickness)")
+#define SIP_EE_CHAR_UNDERLINE NC_("SIP_EE_CHAR_UNDERLINE", "Underline")
+#define SIP_EE_CHAR_OVERLINE NC_("SIP_EE_CHAR_OVERLINE", "Overline")
+#define SIP_EE_CHAR_STRIKEOUT NC_("SIP_EE_CHAR_STRIKEOUT", "Strikethrough")
+#define SIP_EE_CHAR_ITALIC NC_("SIP_EE_CHAR_ITALIC", "Italic")
+#define SIP_EE_CHAR_OUTLINE NC_("SIP_EE_CHAR_OUTLINE", "Outline")
+#define SIP_EE_CHAR_SHADOW NC_("SIP_EE_CHAR_SHADOW", "Font shadow")
+#define SIP_EE_CHAR_ESCAPEMENT NC_("SIP_EE_CHAR_ESCAPEMENT", "Superscript/subscript")
+#define SIP_EE_CHAR_PAIRKERNING NC_("SIP_EE_CHAR_PAIRKERNING", "Kerning")
+#define SIP_EE_CHAR_KERNING NC_("SIP_EE_CHAR_KERNING", "Manual kerning")
+#define SIP_EE_CHAR_WLM NC_("SIP_EE_CHAR_WLM", "No underline for spaces")
+#define SIP_EE_FEATURE_TAB NC_("SIP_EE_FEATURE_TAB", "Tabulator")
+#define SIP_EE_FEATURE_LINEBR NC_("SIP_EE_FEATURE_LINEBR", "Optional line break")
+#define SIP_EE_FEATURE_NOTCONV NC_("SIP_EE_FEATURE_NOTCONV", "Non-convertible character")
+#define SIP_EE_FEATURE_FIELD NC_("SIP_EE_FEATURE_FIELD", "Fields")
+#define SIP_SA_GRAFRED NC_("SIP_SA_GRAFRED", "Red")
+#define SIP_SA_GRAFGREEN NC_("SIP_SA_GRAFGREEN", "Green")
+#define SIP_SA_GRAFBLUE NC_("SIP_SA_GRAFBLUE", "Blue")
+#define SIP_SA_GRAFLUMINANCE NC_("SIP_SA_GRAFLUMINANCE", "Brightness")
+#define SIP_SA_GRAFCONTRAST NC_("SIP_SA_GRAFCONTRAST", "Contrast")
+#define SIP_SA_GRAFGAMMA NC_("SIP_SA_GRAFGAMMA", "Gamma")
+#define SIP_SA_GRAFTRANSPARENCE NC_("SIP_SA_GRAFTRANSPARENCE", "Transparency")
+#define SIP_SA_GRAFINVERT NC_("SIP_SA_GRAFINVERT", "Invert")
+#define SIP_SA_GRAFMODE NC_("SIP_SA_GRAFMODE", "Image mode")
+#define SIP_SA_GRAFCROP NC_("SIP_SA_GRAFCROP", "Crop")
+#define SIP_SA_GLOW_RADIUS NC_("SIP_SA_GLOW_RADIUS", "Radius of glow effect")
+#define SIP_SA_GLOW_COLOR NC_("SIP_SA_GLOW_COLOR", "Color of glow effect")
+#define SIP_SA_GLOW_TRANSPARENCY NC_("SIP_SA_GLOW_TRANSPARENCY", "Transparency of glow effect")
+#define SIP_SA_SOFTEDGE_RADIUS NC_("SIP_SA_SOFTEDGE_RADIUS", "Radius of soft edge effect")
+#define STR_ObjNameSingulMEDIA NC_("STR_ObjNameSingulMEDIA", "Media object")
+#define STR_ObjNamePluralMEDIA NC_("STR_ObjNamePluralMEDIA", "Media objects")
+// drawing layer table strings
+#define STR_TABLE_INSCOL NC_("STR_TABLE_INSCOL", "Insert column")
+#define STR_TABLE_INSROW NC_("STR_TABLE_INSROW", "Insert row")
+#define STR_UNDO_COL_DELETE NC_("STR_UNDO_COL_DELETE", "Delete column")
+#define STR_UNDO_ROW_DELETE NC_("STR_UNDO_ROW_DELETE", "Delete row")
+#define STR_TABLE_SPLIT NC_("STR_TABLE_SPLIT", "Split cells")
+#define STR_TABLE_MERGE NC_("STR_TABLE_MERGE", "Merge cells")
+#define STR_TABLE_NUMFORMAT NC_("STR_TABLE_NUMFORMAT", "Format cell")
+#define STR_TABLE_DISTRIBUTE_ROWS NC_("STR_TABLE_DISTRIBUTE_ROWS", "Distribute rows")
+#define STR_TABLE_DISTRIBUTE_COLUMNS NC_("STR_TABLE_DISTRIBUTE_COLUMNS", "Distribute columns")
+#define STR_TABLE_DELETE_CELL_CONTENTS NC_("STR_TABLE_DELETE_CELL_CONTENTS", "Delete cell contents")
+#define STR_TABLE_STYLE NC_("STR_TABLE_STYLE", "Table style")
+#define STR_TABLE_STYLE_SETTINGS NC_("STR_TABLE_STYLE_SETTINGS", "Table style settings")
+#define STR_ObjNameSingulTable NC_("STR_ObjNameSingulTable", "Table")
+#define STR_ObjNamePluralTable NC_("STR_ObjNamePluralTable", "Tables")
+#define STR_ObjNameSingulFONTWORK NC_("STR_ObjNameSingulFONTWORK", "Font work")
+// Strings for the Draw-Dialog --------------------------------------------
+#define RID_SVXSTR_SOLID NC_("RID_SVXSTR_SOLID", "Continuous")
+#define RID_SVXSTR_GRADIENT NC_("RID_SVXSTR_GRADIENT", "Gradient")
+#define RID_SVXSTR_BITMAP NC_("RID_SVXSTR_BITMAP", "Bitmap")
+#define RID_SVXSTR_PATTERN NC_("RID_SVXSTR_PATTERN", "Pattern")
+#define RID_SVXSTR_USE_BACKGROUND NC_("RID_SVXSTR_USE_BACKGROUND", "Use Slide Background")
+#define RID_SVXSTR_PATTERN_UNTITLED NC_("RID_SVXSTR_PATTERN_UNTITLED", "Untitled Pattern")
+#define RID_SVXSTR_LINESTYLE NC_("RID_SVXSTR_LINESTYLE", "Line Style")
+#define RID_SVXSTR_INVISIBLE NC_("RID_SVXSTR_INVISIBLE", "None")
+#define RID_SVXSTR_COLOR NC_("RID_SVXSTR_COLOR", "Color")
+#define RID_SVXSTR_HATCH NC_("RID_SVXSTR_HATCH", "Hatching")
+#define RID_SVXSTR_LINEEND NC_("RID_SVXSTR_LINEEND", "Arrowheads")
+#define RID_SVXSTR_ARROW NC_("RID_SVXSTR_ARROW", "Arrow")
+#define RID_SVXSTR_SQUARE NC_("RID_SVXSTR_SQUARE", "Square")
+#define RID_SVXSTR_CIRCLE NC_("RID_SVXSTR_CIRCLE", "Circle")
+#define RID_SVXSTR_NONE NC_("RID_SVXSTR_NONE", "- none -")
+#define RID_SVXSTR_TRANSPARENCE NC_("RID_SVXSTR_TRANSPARENCE", "Transparency")
+#define RID_SVXSTR_CENTERED NC_("RID_SVXSTR_CENTERED", "Centered")
+#define RID_SVXSTR_NOTCENTERED NC_("RID_SVXSTR_NOTCENTERED", "Not centered")
+#define RID_SVXSTR_GRAFMODE_STANDARD NC_("RID_SVXSTR_GRAFMODE_STANDARD", "Default")
+#define RID_SVXSTR_GRAFMODE_GREYS NC_("RID_SVXSTR_GRAFMODE_GREYS", "Grayscale")
+#define RID_SVXSTR_GRAFMODE_MONO NC_("RID_SVXSTR_GRAFMODE_MONO", "Black/White")
+#define RID_SVXSTR_GRAFMODE_WATERMARK NC_("RID_SVXSTR_GRAFMODE_WATERMARK", "Watermark")
+#define RID_SVXSTR_COLORBAR NC_("RID_SVXSTR_COLORBAR", "Left click to apply as background color, right click to set line color")
+// Default colors
+#define RID_SVXSTR_COLOR_DEFAULT_FONT NC_("RID_SVXSTR_COLOR_DEFAULT_FONTCOLOR", "Dark Red 2")
+#define RID_SVXSTR_COLOR_DEFAULT_FRAMELINE NC_("RID_SVXSTR_COLOR_DEFAULT_FRAMELINE", "Blue")
+#define RID_SVXSTR_COLOR_DEFAULT_HIGHLIGHT NC_("RID_SVXSTR_COLOR_DEFAULT_HIGHLIGHT", "Yellow")
+#define RID_SVXSTR_COLOR_DEFAULT_SHAPE_STROKE NC_("RID_SVXSTR_COLOR_DEFAULT_SHAPE_STROKE", "Dark Blue 1")
+#define RID_SVXSTR_COLOR_DEFAULT_SHAPE_FILLING NC_("RID_SVXSTR_COLOR_DEFAULT_SHAPE_FILLING", "Light Blue 2")
+// Elements of the standard color palette
+#define RID_SVXSTR_COLOR_BLACK NC_("RID_SVXSTR_COLOR_BLACK", "Black")
+#define RID_SVXSTR_COLOR_GREY NC_("RID_SVXSTR_COLOR_GREY", "Gray")
+#define RID_SVXSTR_COLOR_WHITE NC_("RID_SVXSTR_COLOR_WHITE", "White")
+#define RID_SVXSTR_COLOR_YELLOW NC_("RID_SVXSTR_COLOR_YELLOW", "Yellow")
+#define RID_SVXSTR_COLOR_GOLD NC_("RID_SVXSTR_COLOR_GOLD", "Gold")
+#define RID_SVXSTR_COLOR_ORANGE NC_("RID_SVXSTR_COLOR_ORANGE", "Orange")
+#define RID_SVXSTR_COLOR_BRICK NC_("RID_SVXSTR_COLOR_BRICK", "Brick")
+#define RID_SVXSTR_COLOR_RED NC_("RID_SVXSTR_COLOR_RED", "Red")
+#define RID_SVXSTR_COLOR_MAGENTA NC_("RID_SVXSTR_COLOR_MAGENTA", "Magenta")
+#define RID_SVXSTR_COLOR_PURPLE NC_("RID_SVXSTR_COLOR_PURPLE", "Purple")
+#define RID_SVXSTR_COLOR_INDIGO NC_("RID_SVXSTR_COLOR_INDIGO", "Indigo")
+#define RID_SVXSTR_COLOR_BLUE NC_("RID_SVXSTR_COLOR_BLUE", "Blue")
+#define RID_SVXSTR_COLOR_TEAL NC_("RID_SVXSTR_COLOR_TEAL", "Teal")
+#define RID_SVXSTR_COLOR_GREEN NC_("RID_SVXSTR_COLOR_GREEN", "Green")
+#define RID_SVXSTR_COLOR_LIME NC_("RID_SVXSTR_COLOR_LIME", "Lime")
+// Light variants of the standard color palette
+#define RID_SVXSTR_COLOR_LIGHTGRAY NC_("RID_SVXSTR_COLOR_LIGHTGRAY", "Light Gray")
+#define RID_SVXSTR_COLOR_LIGHTYELLOW NC_("RID_SVXSTR_COLOR_LIGHTYELLOW", "Light Yellow")
+#define RID_SVXSTR_COLOR_LIGHTGOLD NC_("RID_SVXSTR_COLOR_LIGHTGOLD", "Light Gold")
+#define RID_SVXSTR_COLOR_LIGHTORANGE NC_("RID_SVXSTR_COLOR_LIGHTORANGE", "Light Orange")
+#define RID_SVXSTR_COLOR_LIGHTBRICK NC_("RID_SVXSTR_COLOR_LIGHTBRICK", "Light Brick")
+#define RID_SVXSTR_COLOR_LIGHTRED NC_("RID_SVXSTR_COLOR_LIGHTRED", "Light Red")
+#define RID_SVXSTR_COLOR_LIGHTMAGENTA NC_("RID_SVXSTR_COLOR_LIGHTMAGENTA", "Light Magenta")
+#define RID_SVXSTR_COLOR_LIGHTPURPLE NC_("RID_SVXSTR_COLOR_LIGHTPURPLE", "Light Purple")
+#define RID_SVXSTR_COLOR_LIGHTINDIGO NC_("RID_SVXSTR_COLOR_LIGHTINDIGO", "Light Indigo")
+#define RID_SVXSTR_COLOR_LIGHTBLUE NC_("RID_SVXSTR_COLOR_LIGHTBLUE", "Light Blue")
+#define RID_SVXSTR_COLOR_LIGHTTEAL NC_("RID_SVXSTR_COLOR_LIGHTTEAL", "Light Teal")
+#define RID_SVXSTR_COLOR_LIGHTGREEN NC_("RID_SVXSTR_COLOR_LIGHTGREEN", "Light Green")
+#define RID_SVXSTR_COLOR_LIGHTLIME NC_("RID_SVXSTR_COLOR_LIGHTLIME", "Light Lime")
+// Dark variants of the standard color palette
+#define RID_SVXSTR_COLOR_DARKGRAY NC_("RID_SVXSTR_COLOR_DARKGRAY", "Dark Gray")
+#define RID_SVXSTR_COLOR_DARKYELLOW NC_("RID_SVXSTR_COLOR_DARKYELLOW", "Dark Yellow")
+#define RID_SVXSTR_COLOR_DARKGOLD NC_("RID_SVXSTR_COLOR_DARKGOLD", "Dark Gold")
+#define RID_SVXSTR_COLOR_DARKORANGE NC_("RID_SVXSTR_COLOR_DARKORANGE", "Dark Orange")
+#define RID_SVXSTR_COLOR_DARKBRICK NC_("RID_SVXSTR_COLOR_DARKBRICK", "Dark Brick")
+#define RID_SVXSTR_COLOR_DARKRED NC_("RID_SVXSTR_COLOR_DARKRED", "Dark Red")
+#define RID_SVXSTR_COLOR_DARKMAGENTA NC_("RID_SVXSTR_COLOR_DARKMAGENTA", "Dark Magenta")
+#define RID_SVXSTR_COLOR_DARKPURPLE NC_("RID_SVXSTR_COLOR_DARKPURPLE", "Dark Purple")
+#define RID_SVXSTR_COLOR_DARKINDIGO NC_("RID_SVXSTR_COLOR_DARKINDIGO", "Dark Indigo")
+#define RID_SVXSTR_COLOR_DARKBLUE NC_("RID_SVXSTR_COLOR_DARKBLUE", "Dark Blue")
+#define RID_SVXSTR_COLOR_DARKTEAL NC_("RID_SVXSTR_COLOR_DARKTEAL", "Dark Teal")
+#define RID_SVXSTR_COLOR_DARKGREEN NC_("RID_SVXSTR_COLOR_DARKGREEN", "Dark Green")
+#define RID_SVXSTR_COLOR_DARKLIME NC_("RID_SVXSTR_COLOR_DARKLIME", "Dark Lime")
+// Elements of the Tonal color palette
+#define RID_SVXSTR_COLOR_VIOLET NC_("RID_SVXSTR_COLOR_VIOLET", "Violet")
+#define RID_SVXSTR_COLOR_VIOLET_OUG NC_("RID_SVXSTR_COLOR_VIOLET_OUG", "Violet (Out of Gamut)")
+#define RID_SVXSTR_COLOR_BLUE_OUG NC_("RID_SVXSTR_COLOR_BLUE_OUG", "Blue (Out of Gamut)")
+#define RID_SVXSTR_COLOR_AZURE_OUG NC_("RID_SVXSTR_COLOR_AZURE_OUG", "Azure (Out of Gamut)")
+#define RID_SVXSTR_COLOR_SPRINGGREEN_OUG NC_("RID_SVXSTR_COLOR_SPRINGGREEN_OUG", "Spring Green (Out of Gamut)")
+#define RID_SVXSTR_COLOR_GREEN_OUG NC_("RID_SVXSTR_COLOR_GREEN_OUG", "Green (Out of Gamut)")
+#define RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG NC_("RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG", "Chartreuse Green (Out of Gamut)")
+#define RID_SVXSTR_COLOR_ORANGE_OUG NC_("RID_SVXSTR_COLOR_ORANGE_OUG", "Orange (Out of Gamut)")
+#define RID_SVXSTR_COLOR_RED_OUG NC_("RID_SVXSTR_COLOR_RED_OUG", "Red (Out of Gamut)")
+#define RID_SVXSTR_COLOR_ROSE_OUG NC_("RID_SVXSTR_COLOR_ROSE_OUG", "Rose (Out of Gamut)")
+#define RID_SVXSTR_COLOR_AZURE NC_("RID_SVXSTR_COLOR_AZURE", "Azure")
+#define RID_SVXSTR_COLOR_CYAN NC_("RID_SVXSTR_COLOR_CYAN", "Cyan")
+#define RID_SVXSTR_COLOR_SPRINGGREEN NC_("RID_SVXSTR_COLOR_SPRINGGREEN", "Spring Green")
+#define RID_SVXSTR_COLOR_CHARTREUSEGREEN NC_("RID_SVXSTR_COLOR_CHARTREUSEGREEN", "Chartreuse Green")
+#define RID_SVXSTR_COLOR_ROSE NC_("RID_SVXSTR_COLOR_ROSE", "Rose")
+//Elements of the Material color palette
+#define RID_SVXSTR_COLOR_MATERIAL_GRAY_A NC_("RID_SVXSTR_COLOR_MATERIAL_GRAY_A", "Gray A")
+#define RID_SVXSTR_COLOR_MATERIAL_YELLOW_A NC_("RID_SVXSTR_COLOR_MATERIAL_YELLOW_A", "Yellow A")
+#define RID_SVXSTR_COLOR_MATERIAL_AMBER_A NC_("RID_SVXSTR_COLOR_MATERIAL_AMBER_A", "Amber A")
+#define RID_SVXSTR_COLOR_MATERIAL_AMBER NC_("RID_SVXSTR_COLOR_MATERIAL_AMBER", "Amber")
+#define RID_SVXSTR_COLOR_MATERIAL_ORANGE_A NC_("RID_SVXSTR_COLOR_MATERIAL_ORANGE_A", "Orange A")
+#define RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A NC_("RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A", "Deep Orange A")
+#define RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE NC_("RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE", "Deep Orange")
+#define RID_SVXSTR_COLOR_MATERIAL_RED_A NC_("RID_SVXSTR_COLOR_MATERIAL_RED_A", "Red A")
+#define RID_SVXSTR_COLOR_MATERIAL_PINK_A NC_("RID_SVXSTR_COLOR_MATERIAL_PINK_A", "Pink A")
+#define RID_SVXSTR_COLOR_MATERIAL_PURPLE_A NC_("RID_SVXSTR_COLOR_MATERIAL_PURPLE_A", "Purple A")
+#define RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A NC_("RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A", "Deep Purple A")
+#define RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE NC_("RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE", "Deep Purple")
+#define RID_SVXSTR_COLOR_MATERIAL_INDIGO_A NC_("RID_SVXSTR_COLOR_MATERIAL_INDIGO_A", "Indigo A")
+#define RID_SVXSTR_COLOR_MATERIAL_BLUE_A NC_("RID_SVXSTR_COLOR_MATERIAL_BLUE_A", "Blue A")
+#define RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A NC_("RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A", "Light Blue A")
+#define RID_SVXSTR_COLOR_MATERIAL_CYAN_A NC_("RID_SVXSTR_COLOR_MATERIAL_CYAN_A", "Cyan A")
+#define RID_SVXSTR_COLOR_MATERIAL_TEAL_A NC_("RID_SVXSTR_COLOR_MATERIAL_TEAL_A", "Teal A")
+#define RID_SVXSTR_COLOR_MATERIAL_GREEN_A NC_("RID_SVXSTR_COLOR_MATERIAL_GREEN_A", "Green A")
+#define RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A NC_("RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A", "Light Green A")
+#define RID_SVXSTR_COLOR_MATERIAL_LIME_A NC_("RID_SVXSTR_COLOR_MATERIAL_LIME_A", "Lime A")
+#define RID_SVXSTR_COLOR_MATERIAL_BROWN_A NC_("RID_SVXSTR_COLOR_MATERIAL_BROWN_A", "Brown A")
+#define RID_SVXSTR_COLOR_MATERIAL_BROWN NC_("RID_SVXSTR_COLOR_MATERIAL_BROWN", "Brown")
+#define RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A NC_("RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A", "Blue Gray A")
+#define RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY NC_("RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY", "Blue Gray")
+/* Old default color names, probably often used in saved files */
+#define RID_SVXSTR_COLOR_BLUE_CLASSIC NC_("RID_SVXSTR_COLOR_BLUE_CLASSIC", "Blue classic")
+#define RID_SVXSTR_COLOR_BLUEGREY NC_("RID_SVXSTR_COLOR_BLUEGREY", "Blue gray")
+#define RID_SVXSTR_COLOR_BORDEAUX NC_("RID_SVXSTR_COLOR_BORDEAUX", "Bordeaux")
+#define RID_SVXSTR_COLOR_PALE_YELLOW NC_("RID_SVXSTR_COLOR_PALE_YELLOW", "Pale yellow")
+#define RID_SVXSTR_COLOR_PALE_GREEN NC_("RID_SVXSTR_COLOR_PALE_GREEN", "Pale green")
+#define RID_SVXSTR_COLOR_DARKVIOLET NC_("RID_SVXSTR_COLOR_DARKVIOLET", "Dark violet")
+#define RID_SVXSTR_COLOR_SALMON NC_("RID_SVXSTR_COLOR_SALMON", "Salmon")
+#define RID_SVXSTR_COLOR_SEABLUE NC_("RID_SVXSTR_COLOR_SEABLUE", "Sea blue")
+#define RID_SVXSTR_COLOR_CHART NC_("RID_SVXSTR_COLOR_CHART", "Chart")
+#define RID_SVXSTR_COLOR_SKYBLUE NC_("RID_SVXSTR_COLOR_SKYBLUE", "Sky blue")
+#define RID_SVXSTR_COLOR_YELLOWGREEN NC_("RID_SVXSTR_COLOR_YELLOWGREEN", "Yellow green")
+#define RID_SVXSTR_COLOR_PINK NC_("RID_SVXSTR_COLOR_PINK", "Pink")
+#define RID_SVXSTR_COLOR_TURQUOISE NC_("RID_SVXSTR_COLOR_TURQUOISE", "Turquoise")
+/* 16 old AutoFormat Table Styles */
+#define RID_SVXSTR_TBLAFMT_3D NC_("RID_SVXSTR_TBLAFMT_3D", "3D")
+#define RID_SVXSTR_TBLAFMT_BLACK1 NC_("RID_SVXSTR_TBLAFMT_BLACK1", "Black 1")
+#define RID_SVXSTR_TBLAFMT_BLACK2 NC_("RID_SVXSTR_TBLAFMT_BLACK2", "Black 2")
+#define RID_SVXSTR_TBLAFMT_BLUE NC_("RID_SVXSTR_TBLAFMT_BLUE", "Blue")
+#define RID_SVXSTR_TBLAFMT_BROWN NC_("RID_SVXSTR_TBLAFMT_BROWN", "Brown")
+#define RID_SVXSTR_TBLAFMT_CURRENCY NC_("RID_SVXSTR_TBLAFMT_CURRENCY", "Currency")
+#define RID_SVXSTR_TBLAFMT_CURRENCY_3D NC_("RID_SVXSTR_TBLAFMT_CURRENCY_3D", "Currency 3D")
+#define RID_SVXSTR_TBLAFMT_CURRENCY_GRAY NC_("RID_SVXSTR_TBLAFMT_CURRENCY_GRAY", "Currency Gray")
+#define RID_SVXSTR_TBLAFMT_CURRENCY_LAVENDER NC_("RID_SVXSTR_TBLAFMT_CURRENCY_LAVENDER", "Currency Lavender")
+#define RID_SVXSTR_TBLAFMT_CURRENCY_TURQUOISE NC_("RID_SVXSTR_TBLAFMT_CURRENCY_TURQUOISE", "Currency Turquoise")
+#define RID_SVXSTR_TBLAFMT_GRAY NC_("RID_SVXSTR_TBLAFMT_GRAY", "Gray")
+#define RID_SVXSTR_TBLAFMT_GREEN NC_("RID_SVXSTR_TBLAFMT_GREEN", "Green")
+#define RID_SVXSTR_TBLAFMT_LAVENDER NC_("RID_SVXSTR_TBLAFMT_LAVENDER", "Lavender")
+#define RID_SVXSTR_TBLAFMT_RED NC_("RID_SVXSTR_TBLAFMT_RED", "Red")
+#define RID_SVXSTR_TBLAFMT_TURQUOISE NC_("RID_SVXSTR_TBLAFMT_TURQUOISE", "Turquoise")
+#define RID_SVXSTR_TBLAFMT_YELLOW NC_("RID_SVXSTR_TBLAFMT_YELLOW", "Yellow")
+/* 10 new AutoFormat Table Styles since LibreOffice 6.0 */
+#define RID_SVXSTR_TBLAFMT_LO6_ACADEMIC NC_("RID_SVXSTR_TBLAFMT_LO6_ACADEMIC", "Academic")
+#define RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_BLUE NC_("RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_BLUE", "Box List Blue")
+#define RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_GREEN NC_("RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_GREEN", "Box List Green")
+#define RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_RED NC_("RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_RED", "Box List Red")
+#define RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_YELLOW NC_("RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_YELLOW", "Box List Yellow")
+#define RID_SVXSTR_TBLAFMT_LO6_ELEGANT NC_("RID_SVXSTR_TBLAFMT_LO6_ELEGANT", "Elegant")
+#define RID_SVXSTR_TBLAFMT_LO6_FINANCIAL NC_("RID_SVXSTR_TBLAFMT_LO6_FINANCIAL", "Financial")
+#define RID_SVXSTR_TBLAFMT_LO6_SIMPLE_GRID_COLUMNS NC_("RID_SVXSTR_TBLAFMT_LO6_SIMPLE_GRID_COLUMNS", "Simple Grid Columns")
+#define RID_SVXSTR_TBLAFMT_LO6_SIMPLE_GRID_ROWS NC_("RID_SVXSTR_TBLAFMT_LO6_SIMPLE_GRID_ROWS", "Simple Grid Rows")
+#define RID_SVXSTR_TBLAFMT_LO6_SIMPLE_LIST_SHADED NC_("RID_SVXSTR_TBLAFMT_LO6_SIMPLE_LIST_SHADED", "Simple List Shaded")
+#define RID_SVXSTR_LINEJOINT_MIDDLE NC_("RID_SVXSTR_LINEJOINT_MIDDLE", "Line joint averaged")
+#define RID_SVXSTR_LINEJOINT_BEVEL NC_("RID_SVXSTR_LINEJOINT_BEVEL", "Line joint bevel")
+#define RID_SVXSTR_LINEJOINT_MITER NC_("RID_SVXSTR_LINEJOINT_MITER", "Line joint miter")
+#define RID_SVXSTR_LINEJOINT_ROUND NC_("RID_SVXSTR_LINEJOINT_ROUND", "Line joint round")
+// the familiar name for it
+#define RID_SVXSTR_LINECAP_BUTT NC_("RID_SVXSTR_LINECAP_BUTT", "Line cap flat")
+#define RID_SVXSTR_LINECAP_ROUND NC_("RID_SVXSTR_LINECAP_ROUND", "Line cap round")
+#define RID_SVXSTR_LINECAP_SQUARE NC_("RID_SVXSTR_LINECAP_SQUARE", "Line cap square")
+#define RID_SVXSTR_GRDT0 NC_("RID_SVXSTR_GRDT0", "Gradient")
+#define RID_SVXSTR_GRDT1 NC_("RID_SVXSTR_GRDT1", "Linear blue/white")
+#define RID_SVXSTR_GRDT2 NC_("RID_SVXSTR_GRDT2", "Linear magenta/green")
+#define RID_SVXSTR_GRDT3 NC_("RID_SVXSTR_GRDT3", "Linear yellow/brown")
+#define RID_SVXSTR_GRDT4 NC_("RID_SVXSTR_GRDT4", "Radial green/black")
+#define RID_SVXSTR_GRDT5 NC_("RID_SVXSTR_GRDT5", "Radial red/yellow")
+#define RID_SVXSTR_GRDT6 NC_("RID_SVXSTR_GRDT6", "Rectangular red/white")
+#define RID_SVXSTR_GRDT7 NC_("RID_SVXSTR_GRDT7", "Square yellow/white")
+#define RID_SVXSTR_GRDT8 NC_("RID_SVXSTR_GRDT8", "Ellipsoid blue gray/light blue")
+#define RID_SVXSTR_GRDT9 NC_("RID_SVXSTR_GRDT9", "Axial light red/white")
+// l means left
+#define RID_SVXSTR_GRDT10 NC_("RID_SVXSTR_GRDT10", "Diagonal 1l")
+// r means right
+#define RID_SVXSTR_GRDT11 NC_("RID_SVXSTR_GRDT11", "Diagonal 1r")
+// l means left
+#define RID_SVXSTR_GRDT12 NC_("RID_SVXSTR_GRDT12", "Diagonal 2l")
+// r means right
+#define RID_SVXSTR_GRDT13 NC_("RID_SVXSTR_GRDT13", "Diagonal 2r")
+// l means left
+#define RID_SVXSTR_GRDT14 NC_("RID_SVXSTR_GRDT14", "Diagonal 3l")
+// r means right
+#define RID_SVXSTR_GRDT15 NC_("RID_SVXSTR_GRDT15", "Diagonal 3r")
+// l means left
+#define RID_SVXSTR_GRDT16 NC_("RID_SVXSTR_GRDT16", "Diagonal 4l")
+// r means right
+#define RID_SVXSTR_GRDT17 NC_("RID_SVXSTR_GRDT17", "Diagonal 4r")
+#define RID_SVXSTR_GRDT18 NC_("RID_SVXSTR_GRDT18", "Diagonal Blue")
+#define RID_SVXSTR_GRDT19 NC_("RID_SVXSTR_GRDT19", "Diagonal Green")
+#define RID_SVXSTR_GRDT20 NC_("RID_SVXSTR_GRDT20", "Diagonal Orange")
+#define RID_SVXSTR_GRDT21 NC_("RID_SVXSTR_GRDT21", "Diagonal Red")
+#define RID_SVXSTR_GRDT22 NC_("RID_SVXSTR_GRDT22", "Diagonal Turquoise")
+#define RID_SVXSTR_GRDT23 NC_("RID_SVXSTR_GRDT23", "Diagonal Violet")
+#define RID_SVXSTR_GRDT24 NC_("RID_SVXSTR_GRDT24", "From a Corner")
+#define RID_SVXSTR_GRDT25 NC_("RID_SVXSTR_GRDT25", "From a Corner, Blue")
+#define RID_SVXSTR_GRDT26 NC_("RID_SVXSTR_GRDT26", "From a Corner, Green")
+#define RID_SVXSTR_GRDT27 NC_("RID_SVXSTR_GRDT27", "From a Corner, Orange")
+#define RID_SVXSTR_GRDT28 NC_("RID_SVXSTR_GRDT28", "From a Corner, Red")
+#define RID_SVXSTR_GRDT29 NC_("RID_SVXSTR_GRDT29", "From a Corner, Turquoise")
+#define RID_SVXSTR_GRDT30 NC_("RID_SVXSTR_GRDT30", "From a Corner, Violet")
+#define RID_SVXSTR_GRDT31 NC_("RID_SVXSTR_GRDT31", "From the Middle")
+#define RID_SVXSTR_GRDT32 NC_("RID_SVXSTR_GRDT32", "From the Middle, Blue")
+#define RID_SVXSTR_GRDT33 NC_("RID_SVXSTR_GRDT33", "From the Middle, Green")
+#define RID_SVXSTR_GRDT34 NC_("RID_SVXSTR_GRDT34", "From the Middle, Orange")
+#define RID_SVXSTR_GRDT35 NC_("RID_SVXSTR_GRDT35", "From the Middle, Red")
+#define RID_SVXSTR_GRDT36 NC_("RID_SVXSTR_GRDT36", "From the Middle, Turquoise")
+#define RID_SVXSTR_GRDT37 NC_("RID_SVXSTR_GRDT37", "From the Middle, Violet")
+#define RID_SVXSTR_GRDT38 NC_("RID_SVXSTR_GRDT38", "Horizontal")
+#define RID_SVXSTR_GRDT39 NC_("RID_SVXSTR_GRDT39", "Horizontal Blue")
+#define RID_SVXSTR_GRDT40 NC_("RID_SVXSTR_GRDT40", "Horizontal Green")
+#define RID_SVXSTR_GRDT41 NC_("RID_SVXSTR_GRDT41", "Horizontal Orange")
+#define RID_SVXSTR_GRDT42 NC_("RID_SVXSTR_GRDT42", "Horizontal Red")
+#define RID_SVXSTR_GRDT43 NC_("RID_SVXSTR_GRDT43", "Horizontal Turquoise")
+#define RID_SVXSTR_GRDT44 NC_("RID_SVXSTR_GRDT44", "Horizontal Violet")
+#define RID_SVXSTR_GRDT45 NC_("RID_SVXSTR_GRDT45", "Radial")
+#define RID_SVXSTR_GRDT46 NC_("RID_SVXSTR_GRDT46", "Radial Blue")
+#define RID_SVXSTR_GRDT47 NC_("RID_SVXSTR_GRDT47", "Radial Green")
+#define RID_SVXSTR_GRDT48 NC_("RID_SVXSTR_GRDT48", "Radial Orange")
+#define RID_SVXSTR_GRDT49 NC_("RID_SVXSTR_GRDT49", "Radial Red")
+#define RID_SVXSTR_GRDT50 NC_("RID_SVXSTR_GRDT50", "Radial Turquoise")
+#define RID_SVXSTR_GRDT51 NC_("RID_SVXSTR_GRDT51", "Radial Violet")
+#define RID_SVXSTR_GRDT52 NC_("RID_SVXSTR_GRDT52", "Vertical")
+#define RID_SVXSTR_GRDT53 NC_("RID_SVXSTR_GRDT53", "Vertical Blue")
+#define RID_SVXSTR_GRDT54 NC_("RID_SVXSTR_GRDT54", "Vertical Green")
+#define RID_SVXSTR_GRDT55 NC_("RID_SVXSTR_GRDT55", "Vertical Orange")
+#define RID_SVXSTR_GRDT56 NC_("RID_SVXSTR_GRDT56", "Vertical Red")
+#define RID_SVXSTR_GRDT57 NC_("RID_SVXSTR_GRDT57", "Vertical Turquoise")
+#define RID_SVXSTR_GRDT58 NC_("RID_SVXSTR_GRDT58", "Vertical Violet")
+//gradients of unknown provenience
+#define RID_SVXSTR_GRDT59 NC_("RID_SVXSTR_GRDT59", "Gray Gradient")
+#define RID_SVXSTR_GRDT60 NC_("RID_SVXSTR_GRDT60", "Yellow Gradient")
+#define RID_SVXSTR_GRDT61 NC_("RID_SVXSTR_GRDT61", "Orange Gradient")
+#define RID_SVXSTR_GRDT62 NC_("RID_SVXSTR_GRDT62", "Red Gradient")
+#define RID_SVXSTR_GRDT63 NC_("RID_SVXSTR_GRDT63", "Pink Gradient")
+#define RID_SVXSTR_GRDT64 NC_("RID_SVXSTR_GRDT64", "Sky")
+#define RID_SVXSTR_GRDT65 NC_("RID_SVXSTR_GRDT65", "Cyan Gradient")
+#define RID_SVXSTR_GRDT66 NC_("RID_SVXSTR_GRDT66", "Blue Gradient")
+#define RID_SVXSTR_GRDT67 NC_("RID_SVXSTR_GRDT67", "Purple Pipe")
+#define RID_SVXSTR_GRDT68 NC_("RID_SVXSTR_GRDT68", "Night")
+#define RID_SVXSTR_GRDT69 NC_("RID_SVXSTR_GRDT69", "Green Gradient")
+//actual gradients defined for 6.1
+#define RID_SVXSTR_GRDT70 NC_("RID_SVXSTR_GRDT70", "Pastel Bouquet")
+#define RID_SVXSTR_GRDT71 NC_("RID_SVXSTR_GRDT71", "Pastel Dream")
+#define RID_SVXSTR_GRDT72 NC_("RID_SVXSTR_GRDT72", "Blue Touch")
+#define RID_SVXSTR_GRDT73 NC_("RID_SVXSTR_GRDT73", "Blank with Gray")
+#define RID_SVXSTR_GRDT74 NC_("RID_SVXSTR_GRDT74", "Spotted Gray")
+#define RID_SVXSTR_GRDT75 NC_("RID_SVXSTR_GRDT75", "London Mist")
+#define RID_SVXSTR_GRDT76 NC_("RID_SVXSTR_GRDT76", "Teal to Blue")
+#define RID_SVXSTR_GRDT77 NC_("RID_SVXSTR_GRDT77", "Midnight")
+#define RID_SVXSTR_GRDT78 NC_("RID_SVXSTR_GRDT78", "Deep Ocean")
+#define RID_SVXSTR_GRDT79 NC_("RID_SVXSTR_GRDT79", "Submarine")
+#define RID_SVXSTR_GRDT80 NC_("RID_SVXSTR_GRDT80", "Green Grass")
+#define RID_SVXSTR_GRDT81 NC_("RID_SVXSTR_GRDT81", "Neon Light")
+#define RID_SVXSTR_GRDT82 NC_("RID_SVXSTR_GRDT82", "Sunshine")
+#define RID_SVXSTR_GRDT83 NC_("RID_SVXSTR_GRDT83", "Present")
+#define RID_SVXSTR_GRDT84 NC_("RID_SVXSTR_GRDT84", "Mahogany")
+// /gradients
+#define RID_SVXSTR_HATCH0 NC_("RID_SVXSTR_HATCH0", "Black 0 Degrees")
+#define RID_SVXSTR_HATCH1 NC_("RID_SVXSTR_HATCH1", "Black 90 Degrees")
+#define RID_SVXSTR_HATCH2 NC_("RID_SVXSTR_HATCH2", "Black 180 Degrees Crossed")
+#define RID_SVXSTR_HATCH3 NC_("RID_SVXSTR_HATCH3", "Blue 45 Degrees")
+#define RID_SVXSTR_HATCH4 NC_("RID_SVXSTR_HATCH4", "Blue -45 Degrees")
+#define RID_SVXSTR_HATCH5 NC_("RID_SVXSTR_HATCH5", "Blue 45 Degrees Crossed")
+#define RID_SVXSTR_HATCH6 NC_("RID_SVXSTR_HATCH6", "Green 30 Degrees")
+#define RID_SVXSTR_HATCH7 NC_("RID_SVXSTR_HATCH7", "Green 60 Degrees")
+#define RID_SVXSTR_HATCH8 NC_("RID_SVXSTR_HATCH8", "Green 90 Degrees Triple")
+#define RID_SVXSTR_HATCH9 NC_("RID_SVXSTR_HATCH9", "Red 45 Degrees")
+#define RID_SVXSTR_HATCH10 NC_("RID_SVXSTR_HATCH10", "Red 90 Degrees Crossed")
+#define RID_SVXSTR_HATCH11 NC_("RID_SVXSTR_HATCH11", "Red -45 Degrees Triple")
+#define RID_SVXSTR_HATCH12 NC_("RID_SVXSTR_HATCH12", "Yellow 45 Degrees")
+#define RID_SVXSTR_HATCH13 NC_("RID_SVXSTR_HATCH13", "Yellow 45 Degrees Crossed")
+#define RID_SVXSTR_HATCH14 NC_("RID_SVXSTR_HATCH14", "Yellow 45 Degrees Triple")
+#define RID_SVXSTR_HATCH15 NC_("RID_SVXSTR_HATCH15", "Hatching")
+#define RID_SVXSTR_BMP0 NC_("RID_SVXSTR_BMP0", "Empty")
+#define RID_SVXSTR_BMP1 NC_("RID_SVXSTR_BMP1", "Painted White")
+#define RID_SVXSTR_BMP2 NC_("RID_SVXSTR_BMP2", "Paper Texture")
+#define RID_SVXSTR_BMP3 NC_("RID_SVXSTR_BMP3", "Paper Crumpled")
+#define RID_SVXSTR_BMP4 NC_("RID_SVXSTR_BMP4", "Paper Graph")
+#define RID_SVXSTR_BMP5 NC_("RID_SVXSTR_BMP5", "Parchment Paper")
+#define RID_SVXSTR_BMP6 NC_("RID_SVXSTR_BMP6", "Fence")
+#define RID_SVXSTR_BMP7 NC_("RID_SVXSTR_BMP7", "Wooden Board")
+#define RID_SVXSTR_BMP8 NC_("RID_SVXSTR_BMP8", "Maple Leaves")
+#define RID_SVXSTR_BMP9 NC_("RID_SVXSTR_BMP9", "Lawn")
+#define RID_SVXSTR_BMP10 NC_("RID_SVXSTR_BMP10", "Colorful Pebbles")
+#define RID_SVXSTR_BMP11 NC_("RID_SVXSTR_BMP11", "Coffee Beans")
+#define RID_SVXSTR_BMP12 NC_("RID_SVXSTR_BMP12", "Little Clouds")
+#define RID_SVXSTR_BMP13 NC_("RID_SVXSTR_BMP13", "Bathroom Tiles")
+#define RID_SVXSTR_BMP14 NC_("RID_SVXSTR_BMP14", "Wall of Rock")
+#define RID_SVXSTR_BMP15 NC_("RID_SVXSTR_BMP15", "Zebra")
+#define RID_SVXSTR_BMP16 NC_("RID_SVXSTR_BMP16", "Color Stripes")
+#define RID_SVXSTR_BMP17 NC_("RID_SVXSTR_BMP17", "Gravel")
+#define RID_SVXSTR_BMP18 NC_("RID_SVXSTR_BMP18", "Parchment Studio")
+#define RID_SVXSTR_BMP19 NC_("RID_SVXSTR_BMP19", "Night Sky")
+#define RID_SVXSTR_BMP20 NC_("RID_SVXSTR_BMP20", "Pool")
+#define RID_SVXSTR_BMP21 NC_("RID_SVXSTR_BMP21", "Bitmap")
+#define RID_SVXSTR_BMP79 NC_("RID_SVXSTR_BMP79", "Invoice Paper")
+#define RID_SVXSTR_BMP80 NC_("RID_SVXSTR_BMP80", "Concrete")
+#define RID_SVXSTR_BMP81 NC_("RID_SVXSTR_BMP81", "Brick Wall")
+#define RID_SVXSTR_BMP82 NC_("RID_SVXSTR_BMP82", "Stone Wall")
+#define RID_SVXSTR_BMP83 NC_("RID_SVXSTR_BMP83", "Floral")
+#define RID_SVXSTR_BMP84 NC_("RID_SVXSTR_BMP84", "Space")
+#define RID_SVXSTR_BMP85 NC_("RID_SVXSTR_BMP85", "Ice light")
+#define RID_SVXSTR_BMP86 NC_("RID_SVXSTR_BMP86", "Marble")
+#define RID_SVXSTR_BMP87 NC_("RID_SVXSTR_BMP87", "Sand light")
+#define RID_SVXSTR_BMP88 NC_("RID_SVXSTR_BMP88", "Stone")
+#define RID_SVXSTR_BMP89 NC_("RID_SVXSTR_BMP89", "White Diffusion")
+#define RID_SVXSTR_BMP90 NC_("RID_SVXSTR_BMP90", "Surface")
+#define RID_SVXSTR_BMP91 NC_("RID_SVXSTR_BMP91", "Cardboard")
+#define RID_SVXSTR_BMP92 NC_("RID_SVXSTR_BMP92", "Studio")
+#define RID_SVXSTR_BMP22 NC_("RID_SVXSTR_BMP22", "5 Percent")
+#define RID_SVXSTR_BMP23 NC_("RID_SVXSTR_BMP23", "10 Percent")
+#define RID_SVXSTR_BMP24 NC_("RID_SVXSTR_BMP24", "20 Percent")
+#define RID_SVXSTR_BMP25 NC_("RID_SVXSTR_BMP25", "25 Percent")
+#define RID_SVXSTR_BMP26 NC_("RID_SVXSTR_BMP26", "30 Percent")
+#define RID_SVXSTR_BMP27 NC_("RID_SVXSTR_BMP27", "40 Percent")
+#define RID_SVXSTR_BMP28 NC_("RID_SVXSTR_BMP28", "50 Percent")
+#define RID_SVXSTR_BMP29 NC_("RID_SVXSTR_BMP29", "60 Percent")
+#define RID_SVXSTR_BMP30 NC_("RID_SVXSTR_BMP30", "70 Percent")
+#define RID_SVXSTR_BMP31 NC_("RID_SVXSTR_BMP31", "75 Percent")
+#define RID_SVXSTR_BMP32 NC_("RID_SVXSTR_BMP32", "80 Percent")
+#define RID_SVXSTR_BMP33 NC_("RID_SVXSTR_BMP33", "90 Percent")
+#define RID_SVXSTR_BMP34 NC_("RID_SVXSTR_BMP34", "Light Downward Diagonal")
+#define RID_SVXSTR_BMP35 NC_("RID_SVXSTR_BMP35", "Light Upward Diagonal")
+#define RID_SVXSTR_BMP36 NC_("RID_SVXSTR_BMP36", "Dark Downward Diagonal")
+#define RID_SVXSTR_BMP37 NC_("RID_SVXSTR_BMP37", "Dark Upward Diagonal")
+#define RID_SVXSTR_BMP38 NC_("RID_SVXSTR_BMP38", "Wide Downward Diagonal")
+#define RID_SVXSTR_BMP39 NC_("RID_SVXSTR_BMP39", "Wide Upward Diagonal")
+#define RID_SVXSTR_BMP40 NC_("RID_SVXSTR_BMP40", "Light Vertical")
+#define RID_SVXSTR_BMP41 NC_("RID_SVXSTR_BMP41", "Light Horizontal")
+#define RID_SVXSTR_BMP42 NC_("RID_SVXSTR_BMP42", "Narrow Vertical")
+#define RID_SVXSTR_BMP43 NC_("RID_SVXSTR_BMP43", "Narrow Horizontal")
+#define RID_SVXSTR_BMP44 NC_("RID_SVXSTR_BMP44", "Dark Vertical")
+#define RID_SVXSTR_BMP45 NC_("RID_SVXSTR_BMP45", "Dark Horizontal")
+#define RID_SVXSTR_BMP46 NC_("RID_SVXSTR_BMP46", "Dashed Downward Diagonal")
+#define RID_SVXSTR_BMP47 NC_("RID_SVXSTR_BMP47", "Dashed Upward Diagonal")
+#define RID_SVXSTR_BMP48 NC_("RID_SVXSTR_BMP48", "Dashed Horizontal")
+#define RID_SVXSTR_BMP49 NC_("RID_SVXSTR_BMP49", "Dashed Vertical")
+#define RID_SVXSTR_BMP50 NC_("RID_SVXSTR_BMP50", "Small Confetti")
+#define RID_SVXSTR_BMP51 NC_("RID_SVXSTR_BMP51", "Large Confetti")
+#define RID_SVXSTR_BMP52 NC_("RID_SVXSTR_BMP52", "Zig Zag")
+#define RID_SVXSTR_BMP53 NC_("RID_SVXSTR_BMP53", "Wave")
+#define RID_SVXSTR_BMP54 NC_("RID_SVXSTR_BMP54", "Diagonal Brick")
+#define RID_SVXSTR_BMP55 NC_("RID_SVXSTR_BMP55", "Horizontal Brick")
+#define RID_SVXSTR_BMP56 NC_("RID_SVXSTR_BMP56", "Weave")
+#define RID_SVXSTR_BMP57 NC_("RID_SVXSTR_BMP57", "Plaid")
+#define RID_SVXSTR_BMP58 NC_("RID_SVXSTR_BMP58", "Divot")
+#define RID_SVXSTR_BMP59 NC_("RID_SVXSTR_BMP59", "Dotted Grid")
+#define RID_SVXSTR_BMP60 NC_("RID_SVXSTR_BMP60", "Dotted Diamond")
+#define RID_SVXSTR_BMP61 NC_("RID_SVXSTR_BMP61", "Shingle")
+#define RID_SVXSTR_BMP62 NC_("RID_SVXSTR_BMP62", "Trellis")
+#define RID_SVXSTR_BMP63 NC_("RID_SVXSTR_BMP63", "Sphere")
+#define RID_SVXSTR_BMP64 NC_("RID_SVXSTR_BMP64", "Small Grid")
+#define RID_SVXSTR_BMP65 NC_("RID_SVXSTR_BMP65", "Large Grid")
+#define RID_SVXSTR_BMP66 NC_("RID_SVXSTR_BMP66", "Small Checker Board")
+#define RID_SVXSTR_BMP67 NC_("RID_SVXSTR_BMP67", "Large Checker Board")
+#define RID_SVXSTR_BMP68 NC_("RID_SVXSTR_BMP68", "Outlined Diamond")
+#define RID_SVXSTR_BMP69 NC_("RID_SVXSTR_BMP69", "Solid Diamond")
+#define RID_SVXSTR_BMP70 NC_("RID_SVXSTR_BMP70", "Vertical")
+#define RID_SVXSTR_BMP71 NC_("RID_SVXSTR_BMP71", "Horizontal")
+#define RID_SVXSTR_BMP72 NC_("RID_SVXSTR_BMP72", "Downward Diagonal")
+#define RID_SVXSTR_BMP73 NC_("RID_SVXSTR_BMP73", "Upward Diagonal")
+#define RID_SVXSTR_BMP74 NC_("RID_SVXSTR_BMP74", "Cross")
+#define RID_SVXSTR_BMP75 NC_("RID_SVXSTR_BMP75", "Diagonal Cross")
+#define RID_SVXSTR_BMP76 NC_("RID_SVXSTR_BMP76", "Dashed Dotted")
+#define RID_SVXSTR_BMP77 NC_("RID_SVXSTR_BMP77", "Dashed Dotted Upward Diagonal")
+#define RID_SVXSTR_BMP78 NC_("RID_SVXSTR_BMP78", "Solid Dotted")
+#define RID_SVXSTR_DASH0 NC_("RID_SVXSTR_DASH0", "Dot")
+#define RID_SVXSTR_DASH1 NC_("RID_SVXSTR_DASH1", "Long Dot")
+#define RID_SVXSTR_DASH2 NC_("RID_SVXSTR_DASH2", "Dot (Rounded)")
+#define RID_SVXSTR_DASH3 NC_("RID_SVXSTR_DASH3", "Dash")
+#define RID_SVXSTR_DASH4 NC_("RID_SVXSTR_DASH4", "Long Dash")
+#define RID_SVXSTR_DASH5 NC_("RID_SVXSTR_DASH5", "Double Dash")
+#define RID_SVXSTR_DASH6 NC_("RID_SVXSTR_DASH6", "Long Dash Dot")
+#define RID_SVXSTR_DASH7 NC_("RID_SVXSTR_DASH7", "Double Dash Dot")
+#define RID_SVXSTR_DASH8 NC_("RID_SVXSTR_DASH8", "Double Dash Dot Dot")
+#define RID_SVXSTR_DASH9 NC_("RID_SVXSTR_DASH9", "Ultrafine Dotted")
+#define RID_SVXSTR_DASH10 NC_("RID_SVXSTR_DASH10", "Fine Dotted")
+#define RID_SVXSTR_DASH11 NC_("RID_SVXSTR_DASH11", "Ultrafine Dashed")
+#define RID_SVXSTR_DASH12 NC_("RID_SVXSTR_DASH12", "Fine Dashed")
+#define RID_SVXSTR_DASH13 NC_("RID_SVXSTR_DASH13", "Fine Dashed")
+#define RID_SVXSTR_DASH14 NC_("RID_SVXSTR_DASH14", "Dashed")
+#define RID_SVXSTR_DASH15 NC_("RID_SVXSTR_DASH15", "Line Style 9")
+#define RID_SVXSTR_DASH16 NC_("RID_SVXSTR_DASH16", "3 Dashes 3 Dots")
+#define RID_SVXSTR_DASH17 NC_("RID_SVXSTR_DASH17", "Ultrafine 2 Dots 3 Dashes")
+#define RID_SVXSTR_DASH18 NC_("RID_SVXSTR_DASH18", "2 Dots 1 Dash")
+#define RID_SVXSTR_DASH19 NC_("RID_SVXSTR_DASH19", "Line with Fine Dots")
+#define RID_SVXSTR_DASH20 NC_("RID_SVXSTR_DASH20", "Dash Dot")
+#define RID_SVXSTR_DASH21 NC_("RID_SVXSTR_DASH21", "Long Dot (Rounded)")
+#define RID_SVXSTR_DASH22 NC_("RID_SVXSTR_DASH22", "Dash Dot Dot")
+#define RID_SVXSTR_DASH23 NC_("RID_SVXSTR_DASH23", "Dash (Rounded)")
+#define RID_SVXSTR_DASH24 NC_("RID_SVXSTR_DASH24", "Long Dash (Rounded)")
+#define RID_SVXSTR_DASH25 NC_("RID_SVXSTR_DASH25", "Double Dash (Rounded)")
+#define RID_SVXSTR_DASH26 NC_("RID_SVXSTR_DASH26", "Dash Dot (Rounded)")
+#define RID_SVXSTR_DASH27 NC_("RID_SVXSTR_DASH27", "Long Dash Dot (Rounded)")
+#define RID_SVXSTR_DASH28 NC_("RID_SVXSTR_DASH28", "Double Dash Dot (Rounded)")
+#define RID_SVXSTR_DASH29 NC_("RID_SVXSTR_DASH29", "Dash Dot Dot (Rounded)")
+#define RID_SVXSTR_DASH30 NC_("RID_SVXSTR_DASH30", "Double Dash Dot Dot (Rounded)")
+
+#define RID_SVXSTR_IMAP_ALL_FILTER NC_("RID_SVXSTR_IMAP_ALL_FILTER", "All formats")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND0 NC_("RID_SVXSTR_LEND0", "Concave short")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND1 NC_("RID_SVXSTR_LEND1", "Square 45")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND2 NC_("RID_SVXSTR_LEND2", "Arrow short")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND3 NC_("RID_SVXSTR_LEND3", "Dimension Lines")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND4 NC_("RID_SVXSTR_LEND4", "Double Arrow")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND5 NC_("RID_SVXSTR_LEND5", "Triangle")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND6 NC_("RID_SVXSTR_LEND6", "Concave")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND7 NC_("RID_SVXSTR_LEND7", "Arrow large")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND8 NC_("RID_SVXSTR_LEND8", "Dimension Line")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND9 NC_("RID_SVXSTR_LEND9", "Circle")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND10 NC_("RID_SVXSTR_LEND10", "Square")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND11 NC_("RID_SVXSTR_LEND11", "Arrow")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND12 NC_("RID_SVXSTR_LEND12", "Half Circle")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND13 NC_("RID_SVXSTR_LEND13", "Triangle unfilled")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND14 NC_("RID_SVXSTR_LEND14", "Diamond unfilled")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND15 NC_("RID_SVXSTR_LEND15", "Diamond")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND16 NC_("RID_SVXSTR_LEND16", "Circle unfilled")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND17 NC_("RID_SVXSTR_LEND17", "Square 45 unfilled")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND18 NC_("RID_SVXSTR_LEND18", "Square unfilled")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND19 NC_("RID_SVXSTR_LEND19", "Half Circle unfilled")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND20 NC_("RID_SVXSTR_LEND20", "Dimension Line Arrow")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND21 NC_("RID_SVXSTR_LEND21", "Line short")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND22 NC_("RID_SVXSTR_LEND22", "Line")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND23 NC_("RID_SVXSTR_LEND23", "Half Arrow left")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND24 NC_("RID_SVXSTR_LEND24", "Half Arrow right")
+// To translators: this is an arrow head style
+#define RID_SVXSTR_LEND25 NC_("RID_SVXSTR_LEND25", "Reversed Arrow")
+// To translators: this is an arrow head style, CF is Crow's Foot, of Crow's Foot Notation
+#define RID_SVXSTR_LEND26 NC_("RID_SVXSTR_LEND26", "CF One")
+// To translators: this is an arrow head style, CF is Crow's Foot, of Crow's Foot Notation
+#define RID_SVXSTR_LEND27 NC_("RID_SVXSTR_LEND27", "CF Only One")
+// To translators: this is an arrow head style, CF is Crow's Foot, of Crow's Foot Notation
+#define RID_SVXSTR_LEND28 NC_("RID_SVXSTR_LEND28", "CF Many")
+// To translators: this is an arrow head style, CF is Crow's Foot, of Crow's Foot Notation
+#define RID_SVXSTR_LEND29 NC_("RID_SVXSTR_LEND29", "CF Many One")
+// To translators: this is an arrow head style, CF is Crow's Foot, of Crow's Foot Notation
+#define RID_SVXSTR_LEND30 NC_("RID_SVXSTR_LEND30", "CF Zero One")
+// To translators: this is an arrow head style, CF is Crow's Foot, of Crow's Foot Notation
+#define RID_SVXSTR_LEND31 NC_("RID_SVXSTR_LEND31", "CF Zero Many")
+#define RID_SVXSTR_TRASNGR0 NC_("RID_SVXSTR_TRASNGR0", "Transparency")
+#define RID_SVXSTR_COLOR_LIBRE_GREEN_1 NC_("RID_SVXSTR_COLOR_LIBRE_GREEN_1", "Green 1 (%PRODUCTNAME Main Color)")
+#define RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT NC_("RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT", "Green Accent")
+#define RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT NC_("RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT", "Blue Accent")
+#define RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT NC_("RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT", "Orange Accent")
+#define RID_SVXSTR_COLOR_LIBRE_PURPLE NC_("RID_SVXSTR_COLOR_LIBRE_PURPLE", "Purple")
+#define RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT NC_("RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT", "Purple Accent")
+#define RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT NC_("RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT", "Yellow Accent")
+
+#define RID_SVXSTR_GALLERYPROPS_GALTHEME NC_("RID_SVXSTR_GALLERYPROPS_GALTHEME", "Gallery Theme")
+#define RID_SVXSTR_SUCCESSRECOV NC_("RID_SVXSTR_SUCCESSRECOV", "Successfully recovered")
+#define RID_SVXSTR_ORIGDOCRECOV NC_("RID_SVXSTR_ORIGDOCRECOV", "Original document recovered")
+#define RID_SVXSTR_RECOVFAILED NC_("RID_SVXSTR_RECOVFAILED", "Recovery failed")
+#define RID_SVXSTR_RECOVINPROGR NC_("RID_SVXSTR_RECOVINPROGR", "Recovery in progress")
+#define RID_SVXSTR_NOTRECOVYET NC_("RID_SVXSTR_NOTRECOVYET", "Not recovered yet")
+#define RID_SVXSTR_RECOVERY_INPROGRESS NC_("RID_SVXSTR_RECOVERY_INPROGRESS", "%PRODUCTNAME %PRODUCTVERSION has begun recovering your documents. Depending on the size of the documents this process can take some time.")
+#define RID_SVXSTR_RECOVERYONLY_FINISH_DESCR NC_("RID_SVXSTR_RECOVERYONLY_FINISH_DESCR", "Recovery of your documents was finished. Click 'Finish' to see your documents.")
+#define RID_SVXSTR_RECOVERYONLY_FINISH NC_("RID_SVXSTR_RECOVERYONLY_FINISH", "~Finish")
+#define RID_SVXSTR_WIDTH_LAST_CUSTOM NC_("RID_SVXSTR_WIDTH_LAST_CUSTOM", "Last Custom Value")
+#define RID_SVXSTR_PT NC_("RID_SVXSTR_PT", "pt")
+
+#define RID_SVXSTR_EXPORT_GRAPHIC_TITLE NC_("RID_SVXSTR_EXPORT_GRAPHIC_TITLE", "Image Export")
+#define RID_SVXSTR_SAVEAS_IMAGE NC_("RID_SVXSTR_SAVEAS_IMAGE", "Save as Image")
+
+// Strings for the Draw Dialog --------------------------------------------
+#define RID_SVX_3D_UNDO_EXCHANGE_PASTE NC_("RID_SVX_3D_UNDO_EXCHANGE_PASTE", "Insert object(s)")
+#define RID_SVX_3D_UNDO_ROTATE NC_("RID_SVX_3D_UNDO_ROTATE", "Rotate 3D object")
+#define RID_SVX_3D_UNDO_EXTRUDE NC_("RID_SVX_3D_UNDO_EXTRUDE", "Create extrusion object")
+#define RID_SVX_3D_UNDO_LATHE NC_("RID_SVX_3D_UNDO_LATHE", "Create rotation object")
+#define RID_SVX_3D_UNDO_BREAK_LATHE NC_("RID_SVX_3D_UNDO_BREAK_LATHE", "Split 3D object")
+
+// Language-Strings ------------------------------------------------------
+#define RID_SVXSTR_LANGUAGE_ALL NC_("RID_SVXSTR_LANGUAGE_ALL", "[All]")
+
+#define RID_SVXSTR_GALLERY_FILTER NC_("RID_SVXSTR_GALLERY_FILTER", "Graphics filter")
+#define RID_SVXSTR_GALLERY_NEWTHEME NC_("RID_SVXSTR_GALLERY_NEWTHEME", "New Theme")
+
+#define RID_GALLERYSTR_THEME_3D NC_("RID_GALLERYSTR_THEME_3D", "3D Effects")
+#define RID_GALLERYSTR_THEME_ANIMATIONS NC_("RID_GALLERYSTR_THEME_ANIMATIONS", "Animations")
+#define RID_GALLERYSTR_THEME_BULLETS NC_("RID_GALLERYSTR_THEME_BULLETS", "Bullets")
+#define RID_GALLERYSTR_THEME_OFFICE NC_("RID_GALLERYSTR_THEME_OFFICE", "Office")
+#define RID_GALLERYSTR_THEME_FLAGS NC_("RID_GALLERYSTR_THEME_FLAGS", "Flags")
+#define RID_GALLERYSTR_THEME_FLOWCHARTS NC_("RID_GALLERYSTR_THEME_FLOWCHARTS", "Flow Charts")
+#define RID_GALLERYSTR_THEME_EMOTICONS NC_("RID_GALLERYSTR_THEME_EMOTICONS", "Emoticons")
+#define RID_GALLERYSTR_THEME_PHOTOS NC_("RID_GALLERYSTR_THEME_PHOTOS", "Images")
+#define RID_GALLERYSTR_THEME_BACKGROUNDS NC_("RID_GALLERYSTR_THEME_BACKGROUNDS", "Backgrounds")
+#define RID_GALLERYSTR_THEME_HOMEPAGE NC_("RID_GALLERYSTR_THEME_HOMEPAGE", "Homepage")
+#define RID_GALLERYSTR_THEME_INTERACTION NC_("RID_GALLERYSTR_THEME_INTERACTION", "Interaction")
+#define RID_GALLERYSTR_THEME_MAPS NC_("RID_GALLERYSTR_THEME_MAPS", "Maps")
+#define RID_GALLERYSTR_THEME_PEOPLE NC_("RID_GALLERYSTR_THEME_PEOPLE", "People")
+#define RID_GALLERYSTR_THEME_SURFACES NC_("RID_GALLERYSTR_THEME_SURFACES", "Surfaces")
+#define RID_GALLERYSTR_THEME_COMPUTERS NC_("RID_GALLERYSTR_THEME_COMPUTERS", "Computers")
+#define RID_GALLERYSTR_THEME_DIAGRAMS NC_("RID_GALLERYSTR_THEME_DIAGRAMS", "Diagrams")
+#define RID_GALLERYSTR_THEME_ENVIRONMENT NC_("RID_GALLERYSTR_THEME_ENVIRONMENT", "Environment")
+#define RID_GALLERYSTR_THEME_FINANCE NC_("RID_GALLERYSTR_THEME_FINANCE", "Finance")
+#define RID_GALLERYSTR_THEME_TRANSPORT NC_("RID_GALLERYSTR_THEME_TRANSPORT", "Transport")
+#define RID_GALLERYSTR_THEME_TXTSHAPES NC_("RID_GALLERYSTR_THEME_TXTSHAPES", "Textshapes")
+#define RID_GALLERYSTR_THEME_SOUNDS NC_("RID_GALLERYSTR_THEME_SOUNDS", "Sounds")
+#define RID_GALLERYSTR_THEME_SYMBOLS NC_("RID_GALLERYSTR_THEME_SYMBOLS", "Symbols")
+#define RID_GALLERYSTR_THEME_MYTHEME NC_("RID_GALLERYSTR_THEME_MYTHEME", "My Theme")
+#define RID_GALLERYSTR_THEME_ARROWS NC_("RID_GALLERYSTR_THEME_ARROWS", "Arrows")
+#define RID_GALLERYSTR_THEME_BALLOONS NC_("RID_GALLERYSTR_THEME_BALLOONS", "Balloons")
+#define RID_GALLERYSTR_THEME_KEYBOARD NC_("RID_GALLERYSTR_THEME_KEYBOARD", "Keyboard")
+#define RID_GALLERYSTR_THEME_TIME NC_("RID_GALLERYSTR_THEME_TIME", "Time")
+#define RID_GALLERYSTR_THEME_PRESENTATION NC_("RID_GALLERYSTR_THEME_PRESENTATION", "Presentation")
+#define RID_GALLERYSTR_THEME_CALENDAR NC_("RID_GALLERYSTR_THEME_CALENDAR", "Calendar")
+#define RID_GALLERYSTR_THEME_NAVIGATION NC_("RID_GALLERYSTR_THEME_NAVIGATION", "Navigation")
+#define RID_GALLERYSTR_THEME_COMMUNICATION NC_("RID_GALLERYSTR_THEME_COMMUNICATION", "Communication")
+#define RID_GALLERYSTR_THEME_FINANCES NC_("RID_GALLERYSTR_THEME_FINANCES", "Finances")
+#define RID_GALLERYSTR_THEME_COMPUTER NC_("RID_GALLERYSTR_THEME_COMPUTER", "Computers")
+#define RID_GALLERYSTR_THEME_CLIMA NC_("RID_GALLERYSTR_THEME_CLIMA", "Climate")
+#define RID_GALLERYSTR_THEME_EDUCATION NC_("RID_GALLERYSTR_THEME_EDUCATION", "School & University")
+#define RID_GALLERYSTR_THEME_TROUBLE NC_("RID_GALLERYSTR_THEME_TROUBLE", "Problem Solving")
+#define RID_GALLERYSTR_THEME_SCREENBEANS NC_("RID_GALLERYSTR_THEME_SCREENBEANS", "Screen Beans")
+
+#define RID_SVXSTR_QRY_PRINT_TITLE NC_("RID_SVXSTR_QRY_PRINT_TITLE", "Printing selection")
+#define RID_SVXSTR_QRY_PRINT_MSG NC_("RID_SVXSTR_QRY_PRINT_MSG", "Do you want to print the selection or the entire document?")
+#define RID_SVXSTR_QRY_PRINT_ALL NC_("RID_SVXSTR_QRY_PRINT_ALL", "~All")
+#define RID_SVXSTR_QRY_PRINT_SELECTION NC_("RID_SVXSTR_QRY_PRINT_SELECTION", "~Selection")
+
+#define RID_SVXSTR_DIRECTION_NW NC_("RID_SVXSTR_DIRECTION_NW", "Extrusion North-West")
+#define RID_SVXSTR_DIRECTION_N NC_("RID_SVXSTR_DIRECTION_N", "Extrusion North")
+#define RID_SVXSTR_DIRECTION_NE NC_("RID_SVXSTR_DIRECTION_NE", "Extrusion North-East")
+#define RID_SVXSTR_DIRECTION_W NC_("RID_SVXSTR_DIRECTION_W", "Extrusion West")
+#define RID_SVXSTR_DIRECTION_NONE NC_("RID_SVXSTR_DIRECTION_NONE", "Extrusion Backwards")
+#define RID_SVXSTR_DIRECTION_E NC_("RID_SVXSTR_DIRECTION_E", "Extrusion East")
+#define RID_SVXSTR_DIRECTION_SW NC_("RID_SVXSTR_DIRECTION_SW", "Extrusion South-West")
+#define RID_SVXSTR_DIRECTION_S NC_("RID_SVXSTR_DIRECTION_S", "Extrusion South")
+#define RID_SVXSTR_DIRECTION_SE NC_("RID_SVXSTR_DIRECTION_SE", "Extrusion South-East")
+#define RID_SVXSTR_DEPTH_0 NC_("RID_SVXSTR_DEPTH_0", "~0 cm")
+#define RID_SVXSTR_DEPTH_1 NC_("RID_SVXSTR_DEPTH_1", "~1 cm")
+#define RID_SVXSTR_DEPTH_2 NC_("RID_SVXSTR_DEPTH_2", "~2.5 cm")
+#define RID_SVXSTR_DEPTH_3 NC_("RID_SVXSTR_DEPTH_3", "~5 cm")
+#define RID_SVXSTR_DEPTH_4 NC_("RID_SVXSTR_DEPTH_4", "10 ~cm")
+#define RID_SVXSTR_DEPTH_0_INCH NC_("RID_SVXSTR_DEPTH_0_INCH", "0 inch")
+#define RID_SVXSTR_DEPTH_1_INCH NC_("RID_SVXSTR_DEPTH_1_INCH", "0.~5 inch")
+#define RID_SVXSTR_DEPTH_2_INCH NC_("RID_SVXSTR_DEPTH_2_INCH", "~1 inch")
+#define RID_SVXSTR_DEPTH_3_INCH NC_("RID_SVXSTR_DEPTH_3_INCH", "~2 inch")
+#define RID_SVXSTR_DEPTH_4_INCH NC_("RID_SVXSTR_DEPTH_4_INCH", "~4 inch")
+
+#define RID_SVXSTR_NOFILL NC_("RID_SVXSTR_NOFILL", "No Fill")
+#define RID_SVXSTR_TRANSPARENT NC_("RID_SVXSTR_TRANSPARENT", "Transparent")
+#define RID_SVXSTR_DEFAULT NC_("RID_SVXSTR_DEFAULT", "Default")
+#define RID_SVXSTR_FRAME NC_("RID_SVXSTR_FRAME", "Borders")
+#define RID_SVXSTR_FRAME_STYLE NC_("RID_SVXSTR_FRAME_STYLE", "Border Style")
+#define RID_SVXSTR_MORENUMBERING NC_("RID_SVXSTR_MORENUMBERING", "More Numbering...")
+#define RID_SVXSTR_MOREBULLETS NC_("RID_SVXSTR_MOREBULLETS", "More Bullets...")
+#define RID_SVXSTR_BY_AUTHOR NC_("RID_SVXSTR_BY_AUTHOR", "By author")
+#define RID_SVXSTR_PAGES NC_("RID_SVXSTR_PAGES", "Pages")
+#define RID_SVXSTR_CLEARFORM NC_("RID_SVXSTR_CLEARFORM", "Clear formatting")
+#define RID_SVXSTR_MORE_STYLES NC_("RID_SVXSTR_MORE_STYLES", "More Styles...")
+#define RID_SVXSTR_MORE NC_("RID_SVXSTR_MORE", "More Options...")
+// This is duplicated in GenericCommands.xcu in officecfg.
+#define RID_SVXSTR_CHARFONTNAME NC_("RID_SVXSTR_CHARFONTNAME", "Font Name")
+#define RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE NC_("RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE", "Font Name. The current font is not available and will be substituted.")
+#define RID_SVXSTR_CUSTOM_PAL NC_("RID_SVXSTR_CUSTOM_PAL", "custom")
+#define RID_SVXSTR_DOC_COLORS NC_("RID_SVXSTR_DOC_COLORS", "Document colors")
+#define RID_SVXSTR_THEME_COLORS NC_("RID_SVXSTR_THEME_COLORS", "Theme colors")
+#define RID_SVXSTR_DOC_COLOR_PREFIX NC_("RID_SVXSTR_DOC_COLOR_PREFIX", "Document Color")
+#define RID_SVXSTR_THEME_COLOR1 NC_("RID_SVXSTR_THEME_COLOR1", "Background - Dark 1")
+#define RID_SVXSTR_THEME_COLOR2 NC_("RID_SVXSTR_THEME_COLOR2", "Text - Light 1")
+#define RID_SVXSTR_THEME_COLOR3 NC_("RID_SVXSTR_THEME_COLOR3", "Background - Dark 2")
+#define RID_SVXSTR_THEME_COLOR4 NC_("RID_SVXSTR_THEME_COLOR4", "Text - Light 2")
+#define RID_SVXSTR_THEME_COLOR5 NC_("RID_SVXSTR_THEME_COLOR5", "Accent 1")
+#define RID_SVXSTR_THEME_COLOR6 NC_("RID_SVXSTR_THEME_COLOR6", "Accent 2")
+#define RID_SVXSTR_THEME_COLOR7 NC_("RID_SVXSTR_THEME_COLOR7", "Accent 3")
+#define RID_SVXSTR_THEME_COLOR8 NC_("RID_SVXSTR_THEME_COLOR8", "Accent 4")
+#define RID_SVXSTR_THEME_COLOR9 NC_("RID_SVXSTR_THEME_COLOR9", "Accent 5")
+#define RID_SVXSTR_THEME_COLOR10 NC_("RID_SVXSTR_THEME_COLOR10", "Accent 6")
+#define RID_SVXSTR_THEME_COLOR11 NC_("RID_SVXSTR_THEME_COLOR11", "Hyperlink")
+#define RID_SVXSTR_THEME_COLOR12 NC_("RID_SVXSTR_THEME_COLOR12", "Followed Hyperlink")
+#define RID_SVXSTR_THEME_EFFECT1 NC_("RID_SVXSTR_THEME_EFFECT1", "%1, 80% Lighter")
+#define RID_SVXSTR_THEME_EFFECT2 NC_("RID_SVXSTR_THEME_EFFECT2", "%1, 60% Lighter")
+#define RID_SVXSTR_THEME_EFFECT3 NC_("RID_SVXSTR_THEME_EFFECT3", "%1, 40% Lighter")
+#define RID_SVXSTR_THEME_EFFECT4 NC_("RID_SVXSTR_THEME_EFFECT4", "%1, 25% Darker")
+#define RID_SVXSTR_THEME_EFFECT5 NC_("RID_SVXSTR_THEME_EFFECT5", "%1, 50% Darker")
+
+#define RID_SVX_EXTRUSION_BAR NC_("RID_SVX_EXTRUSION_BAR", "Extrusion")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF", "Apply Extrusion On/Off")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_DOWN NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_DOWN", "Tilt Down")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_UP NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_UP", "Tilt Up")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_LEFT NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_LEFT", "Tilt Left")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_RIGHT NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_RIGHT", "Tilt Right")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_DEPTH NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_DEPTH", "Change Extrusion Depth")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ORIENTATION NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ORIENTATION", "Change Orientation")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_PROJECTION NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_PROJECTION", "Change Projection Type")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_LIGHTING NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_LIGHTING", "Change Lighting")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_BRIGHTNESS NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_BRIGHTNESS", "Change Brightness")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_SURFACE NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_SURFACE", "Change Extrusion Surface")
+#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_COLOR NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_COLOR", "Change Extrusion Color")
+
+#define RID_SVXFLOAT3D_FIX_R NC_("RID_SVXFLOAT3D_FIX_R", "R:")
+#define RID_SVXFLOAT3D_FIX_G NC_("RID_SVXFLOAT3D_FIX_G", "G:")
+#define RID_SVXFLOAT3D_FIX_B NC_("RID_SVXFLOAT3D_FIX_B", "B:")
+
+#define RID_SVX_FONTWORK_BAR NC_("RID_SVX_FONTWORK_BAR", "Fontwork")
+#define RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE NC_("RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE", "Apply Fontwork Shape")
+#define RID_SVXSTR_UNDO_APPLY_FONTWORK_SAME_LETTER_HEIGHT NC_("RID_SVXSTR_UNDO_APPLY_FONTWORK_SAME_LETTER_HEIGHT", "Apply Fontwork Same Letter Heights")
+#define RID_SVXSTR_UNDO_APPLY_FONTWORK_ALIGNMENT NC_("RID_SVXSTR_UNDO_APPLY_FONTWORK_ALIGNMENT", "Apply Fontwork Alignment")
+#define RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING NC_("RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING", "Apply Fontwork Character Spacing")
+
+#define RID_SVXSTR_A11Y_WITH NC_("RID_SVXSTR_A11Y_WITH", "with")
+#define RID_SVXSTR_A11Y_STYLE NC_("RID_SVXSTR_A11Y_STYLE", "Style")
+#define RID_SVXSTR_A11Y_AND NC_("RID_SVXSTR_A11Y_AND", "and")
+// SvxRectCtl
+#define RID_SVXSTR_RECTCTL_ACC_CORN_NAME NC_("RID_SVXSTR_RECTCTL_ACC_CORN_NAME", "Corner control")
+#define RID_SVXSTR_RECTCTL_ACC_CORN_DESCR NC_("RID_SVXSTR_RECTCTL_ACC_CORN_DESCR", "Selection of a corner point.")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_LT NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_LT", "Top left")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_MT NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_MT", "Top middle")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_RT NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_RT", "Top right")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_LM NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_LM", "Left center")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_MM NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_MM", "Center")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_RM NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_RM", "Right center")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_LB NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_LB", "Bottom left")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_MB NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_MB", "Bottom middle")
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_RB NC_("RID_SVXSTR_RECTCTL_ACC_CHLD_RB", "Bottom right")
+// SvxGraphCtrlAccessibleContext
+#define RID_SVXSTR_GRAPHCTRL_ACC_NAME NC_("RID_SVXSTR_GRAPHCTRL_ACC_NAME", "Contour control")
+#define RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION NC_("RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION", "This is where you can edit the contour.")
+#define RID_SVXSTR_CHARACTER_SELECTION NC_("RID_SVXSTR_CHARACTER_SELECTION", "Special character selection")
+#define RID_SVXSTR_CHAR_SEL_DESC NC_("RID_SVXSTR_CHAR_SEL_DESC", "Select special characters in this area.")
+// The space behind is a must.
+#define RID_SVXSTR_CHARACTER_CODE NC_("RID_SVXSTR_CHARACTER_CODE", "Character code ")
+
+#define RID_ERR_FIELDREQUIRED NC_("RID_ERR_FIELDREQUIRED", "Input required in field '#'. Please enter a value.")
+#define RID_STR_FORMS NC_("RID_STR_FORMS", "Forms")
+#define RID_STR_NO_PROPERTIES NC_("RID_STR_NO_PROPERTIES", "No control selected")
+#define RID_STR_PROPERTIES_CONTROL NC_("RID_STR_PROPERTIES_CONTROL", "Properties: ")
+#define RID_STR_PROPERTIES_FORM NC_("RID_STR_PROPERTIES_FORM", "Form Properties")
+#define RID_STR_FMEXPLORER NC_("RID_STR_FMEXPLORER", "Form Navigator")
+#define RID_STR_FORM NC_("RID_STR_FORM", "Form")
+#define RID_STR_HIDDEN NC_("RID_STR_HIDDEN", "Hidden")
+#define RID_STR_STDFORMNAME NC_("RID_STR_STDFORMNAME", "Form")
+#define RID_STR_PROPTITLE_HIDDEN NC_("RID_STR_PROPTITLE_HIDDEN", "Hidden Control")
+#define RID_STR_CONTROL NC_("RID_STR_CONTROL", "Control")
+#define RID_STR_REC_TEXT NC_("RID_STR_REC_TEXT", "Record")
+#define RID_STR_REC_FROM_TEXT NC_("RID_STR_REC_FROM_TEXT", "of")
+#define RID_STR_FIELDSELECTION NC_("RID_STR_FIELDSELECTION", "Add field:")
+#define RID_STR_WRITEERROR NC_("RID_STR_WRITEERROR", "Error writing data to database")
+#define RID_STR_SYNTAXERROR NC_("RID_STR_SYNTAXERROR", "Syntax error in query expression")
+#define RID_STR_DELETECONFIRM_RECORD NC_("RID_STR_DELETECONFIRM_RECORD", "You intend to delete 1 record.")
+#define RID_STR_DELETECONFIRM_RECORDS NC_("RID_STR_DELETECONFIRM_RECORDS", "# records will be deleted.")
+#define RID_STR_DELETECONFIRM NC_("RID_STR_DELETECONFIRM", "If you click Yes, you won't be able to undo this operation.\nDo you want to continue anyway?")
+#define RID_STR_NAVIGATIONBAR NC_("RID_STR_NAVIGATIONBAR", "Navigation bar")
+#define RID_STR_COLUMN NC_("RID_STR_COLUMN", "Col")
+#define RID_STR_UNDO_PROPERTY NC_("RID_STR_UNDO_PROPERTY", "Set property '#'")
+#define RID_STR_UNDO_CONTAINER_INSERT NC_("RID_STR_UNDO_CONTAINER_INSERT", "Insert in container")
+#define RID_STR_UNDO_CONTAINER_REMOVE NC_("RID_STR_UNDO_CONTAINER_REMOVE", "Delete #")
+#define RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE NC_("RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE", "Delete # objects")
+#define RID_STR_UNDO_CONTAINER_REPLACE NC_("RID_STR_UNDO_CONTAINER_REPLACE", "Replace a container element")
+#define RID_STR_UNDO_MODEL_REPLACE NC_("RID_STR_UNDO_MODEL_REPLACE", "Replace Control")
+
+#define RID_STR_PROPTITLE_EDIT NC_("RID_STR_PROPTITLE_EDIT", "Text Box")
+#define RID_STR_PROPTITLE_CHECKBOX NC_("RID_STR_PROPTITLE_CHECKBOX", "Check Box")
+#define RID_STR_PROPTITLE_COMBOBOX NC_("RID_STR_PROPTITLE_COMBOBOX", "Combo Box")
+#define RID_STR_PROPTITLE_LISTBOX NC_("RID_STR_PROPTITLE_LISTBOX", "List Box")
+#define RID_STR_PROPTITLE_DATEFIELD NC_("RID_STR_PROPTITLE_DATEFIELD", "Date Field")
+#define RID_STR_PROPTITLE_TIMEFIELD NC_("RID_STR_PROPTITLE_TIMEFIELD", "Time Field")
+#define RID_STR_PROPTITLE_NUMERICFIELD NC_("RID_STR_PROPTITLE_NUMERICFIELD", "Numeric Field")
+#define RID_STR_PROPTITLE_CURRENCYFIELD NC_("RID_STR_PROPTITLE_CURRENCYFIELD", "Currency Field")
+#define RID_STR_PROPTITLE_PATTERNFIELD NC_("RID_STR_PROPTITLE_PATTERNFIELD", "Pattern Field")
+#define RID_STR_PROPTITLE_FORMATTED NC_("RID_STR_PROPTITLE_FORMATTED", "Formatted Field")
+
+#define RID_STR_PROPTITLE_PUSHBUTTON NC_("RID_STR_PROPTITLE_PUSHBUTTON", "Push Button")
+#define RID_STR_PROPTITLE_RADIOBUTTON NC_("RID_STR_PROPTITLE_RADIOBUTTON", "Option Button")
+#define RID_STR_PROPTITLE_FIXEDTEXT NC_("RID_STR_PROPTITLE_FIXEDTEXT", "Label Field")
+#define RID_STR_PROPTITLE_GROUPBOX NC_("RID_STR_PROPTITLE_GROUPBOX", "Group Box")
+#define RID_STR_PROPTITLE_IMAGEBUTTON NC_("RID_STR_PROPTITLE_IMAGEBUTTON", "Image Button")
+#define RID_STR_PROPTITLE_IMAGECONTROL NC_("RID_STR_PROPTITLE_IMAGECONTROL", "Image Control")
+#define RID_STR_PROPTITLE_FILECONTROL NC_("RID_STR_PROPTITLE_FILECONTROL", "File Selection")
+#define RID_STR_PROPTITLE_DBGRID NC_("RID_STR_PROPTITLE_DBGRID", "Table Control ")
+#define RID_STR_PROPTITLE_SCROLLBAR NC_("RID_STR_PROPTITLE_SCROLLBAR", "Scrollbar")
+#define RID_STR_PROPTITLE_SPINBUTTON NC_("RID_STR_PROPTITLE_SPINBUTTON", "Spin Button")
+#define RID_STR_PROPTITLE_NAVBAR NC_("RID_STR_PROPTITLE_NAVBAR", "Navigation Bar")
+#define RID_STR_PROPTITLE_MULTISELECT NC_("RID_STR_PROPTITLE_MULTISELECT", "Multiselection")
+
+#define RID_STR_DATE_AND_TIME NC_("RID_STR_DATE_AND_TIME", "Date and Time Field")
+
+#define RID_STR_NODATACONTROLS NC_("RID_STR_NODATACONTROLS", "No data-related controls in the current form!")
+#define RID_STR_POSTFIX_DATE NC_("RID_STR_POSTFIX_DATE", " (Date)")
+#define RID_STR_POSTFIX_TIME NC_("RID_STR_POSTFIX_TIME", " (Time)")
+#define RID_STR_FILTER_NAVIGATOR NC_("RID_STR_FILTER_NAVIGATOR", "Filter navigator")
+#define RID_STR_FILTER_FILTER_FOR NC_("RID_STR_FILTER_FILTER_FOR", "Filter for")
+#define RID_STR_FILTER_FILTER_OR NC_("RID_STR_FILTER_FILTER_OR", "Or")
+#define RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY NC_("RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY", "Valid bound controls which can be used in the table view do not exist in the current form.")
+#define RID_STR_AUTOFIELD NC_("RID_STR_AUTOFIELD", "<AutoField>")
+#define RID_STR_SVT_SQL_SYNTAX_ERROR NC_("RID_STR_SVT_SQL_SYNTAX_ERROR", "Syntax error in SQL statement")
+#define RID_STR_SVT_SQL_SYNTAX_VALUE_NO_LIKE NC_("RID_STR_SVT_SQL_SYNTAX_VALUE_NO_LIKE", "The value #1 cannot be used with LIKE.")
+#define RID_STR_SVT_SQL_SYNTAX_FIELD_NO_LIKE NC_("RID_STR_SVT_SQL_SYNTAX_FIELD_NO_LIKE", "LIKE cannot be used with this field.")
+#define RID_STR_SVT_SQL_SYNTAX_ACCESS_DAT_NO_VALID NC_("RID_STR_SVT_SQL_SYNTAX_ACCESS_DAT_NO_VALID", "The value entered is not a valid date. Please enter a date in a valid format, for example, MM/DD/YY.")
+#define RID_STR_SVT_SQL_SYNTAX_INT_NO_VALID NC_("RID_STR_SVT_SQL_SYNTAX_INT_NO_VALID", "The field cannot be compared with an integer.")
+#define RID_STR_SVT_SQL_SYNTAX_TABLE NC_("RID_STR_SVT_SQL_SYNTAX_TABLE", "The database does not contain a table named \"#\".")
+#define RID_STR_SVT_SQL_SYNTAX_TABLE_OR_QUERY NC_("RID_STR_SVT_SQL_SYNTAX_TABLE_OR_QUERY", "The database does contain neither a table nor a query named \"#\".")
+#define RID_STR_SVT_SQL_SYNTAX_TABLE_EXISTS NC_("RID_STR_SVT_SQL_SYNTAX_TABLE_EXISTS", "The database already contains a table or view with name \"#\".")
+#define RID_STR_SVT_SQL_SYNTAX_QUERY_EXISTS NC_("RID_STR_SVT_SQL_SYNTAX_QUERY_EXISTS", "The database already contains a query with name \"#\".")
+#define RID_STR_SVT_SQL_SYNTAX_COLUMN NC_("RID_STR_SVT_SQL_SYNTAX_COLUMN", "The column \"#1\" is unknown in the table \"#2\".")
+#define RID_STR_SVT_SQL_SYNTAX_REAL_NO_VALID NC_("RID_STR_SVT_SQL_SYNTAX_REAL_NO_VALID", "The field cannot be compared with a floating point number.")
+#define RID_STR_SVT_SQL_SYNTAX_CRIT_NO_COMPARE NC_("RID_STR_SVT_SQL_SYNTAX_CRIT_NO_COMPARE", "The entered criterion cannot be compared with this field.")
+#define RID_STR_DATANAVIGATOR NC_("RID_STR_DATANAVIGATOR", "Data Navigator")
+#define RID_STR_READONLY_VIEW NC_("RID_STR_READONLY_VIEW", " (read-only)")
+#define RID_STR_ALREADYEXISTOVERWRITE NC_("RID_STR_ALREADYEXISTOVERWRITE", "The file already exists. Overwrite?")
+#define RID_STR_OBJECT_LABEL NC_("RID_STR_OBJECT_LABEL", "#object# label")
+
+#define RID_STR_QRY_REMOVE_MODEL NC_("RID_STR_QRY_REMOVE_MODEL", "Deleting the model '$MODELNAME' affects all controls currently bound to this model.\nDo you really want to delete this model?")
+#define RID_STR_QRY_REMOVE_INSTANCE NC_("RID_STR_QRY_REMOVE_INSTANCE", "Deleting the instance '$INSTANCENAME' affects all controls currently bound to this instance.\nDo you really want to delete this instance?")
+#define RID_STR_QRY_REMOVE_ELEMENT NC_("RID_STR_QRY_REMOVE_ELEMENT", "Deleting the element '$ELEMENTNAME' affects all controls currently bound to this element.\nDo you really want to delete this element?")
+#define RID_STR_QRY_REMOVE_ATTRIBUTE NC_("RID_STR_QRY_REMOVE_ATTRIBUTE", "Do you really want to delete the attribute '$ATTRIBUTENAME'?")
+#define RID_STR_QRY_REMOVE_SUBMISSION NC_("RID_STR_QRY_REMOVE_SUBMISSION", "Deleting the submission '$SUBMISSIONNAME' affects all controls currently bound to this submission.\n\nDo you really want to delete this submission?")
+#define RID_STR_QRY_REMOVE_BINDING NC_("RID_STR_QRY_REMOVE_BINDING", "Deleting the binding '$BINDINGNAME' affects all controls currently bound to this binding.\n\nDo you really want to delete this binding?")
+#define RID_STR_INVALID_XMLNAME NC_("RID_STR_INVALID_XMLNAME", "The name '%1' is not valid in XML. Please enter a different name.")
+#define RID_STR_INVALID_XMLPREFIX NC_("RID_STR_INVALID_XMLPREFIX", "The prefix '%1' is not valid in XML. Please enter a different prefix.")
+#define RID_STR_DOUBLE_MODELNAME NC_("RID_STR_DOUBLE_MODELNAME", "The name '%1' already exists. Please enter a new name.")
+#define RID_STR_EMPTY_SUBMISSIONNAME NC_("RID_STR_EMPTY_SUBMISSIONNAME", "The submission must have a name.")
+#define RID_STR_METHOD_POST NC_("RID_STR_METHOD_POST", "Post")
+#define RID_STR_METHOD_PUT NC_("RID_STR_METHOD_PUT", "Put")
+#define RID_STR_METHOD_GET NC_("RID_STR_METHOD_GET", "Get")
+#define RID_STR_REPLACE_NONE NC_("RID_STR_REPLACE_NONE", "None")
+#define RID_STR_REPLACE_INST NC_("RID_STR_REPLACE_INST", "Instance")
+#define RID_STR_REPLACE_DOC NC_("RID_STR_REPLACE_DOC", "Document")
+#define RID_STR_DATANAV_SUBM_BIND NC_("RID_STR_DATANAV_SUBM_BIND", "Binding: ")
+#define RID_STR_DATANAV_SUBM_REF NC_("RID_STR_DATANAV_SUBM_REF", "Reference: ")
+#define RID_STR_DATANAV_SUBM_ACTION NC_("RID_STR_DATANAV_SUBM_ACTION", "Action: ")
+#define RID_STR_DATANAV_SUBM_METHOD NC_("RID_STR_DATANAV_SUBM_METHOD", "Method: ")
+#define RID_STR_DATANAV_SUBM_REPLACE NC_("RID_STR_DATANAV_SUBM_REPLACE", "Replace: ")
+#define RID_STR_DATANAV_ADD_ELEMENT NC_("RID_STR_DATANAV_ADD_ELEMENT", "Add Element")
+#define RID_STR_DATANAV_EDIT_ELEMENT NC_("RID_STR_DATANAV_EDIT_ELEMENT", "Edit Element")
+#define RID_STR_DATANAV_REMOVE_ELEMENT NC_("RID_STR_DATANAV_REMOVE_ELEMENT", "Delete Element")
+#define RID_STR_DATANAV_ADD_ATTRIBUTE NC_("RID_STR_DATANAV_ADD_ATTRIBUTE", "Add Attribute")
+#define RID_STR_DATANAV_EDIT_ATTRIBUTE NC_("RID_STR_DATANAV_EDIT_ATTRIBUTE", "Edit Attribute")
+#define RID_STR_DATANAV_REMOVE_ATTRIBUTE NC_("RID_STR_DATANAV_REMOVE_ATTRIBUTE", "Delete Attribute")
+#define RID_STR_DATANAV_ADD_BINDING NC_("RID_STR_DATANAV_ADD_BINDING", "Add Binding")
+#define RID_STR_DATANAV_EDIT_BINDING NC_("RID_STR_DATANAV_EDIT_BINDING", "Edit Binding")
+#define RID_STR_DATANAV_REMOVE_BINDING NC_("RID_STR_DATANAV_REMOVE_BINDING", "Delete Binding")
+#define RID_STR_DATANAV_ADD_SUBMISSION NC_("RID_STR_DATANAV_ADD_SUBMISSION", "Add Submission")
+#define RID_STR_DATANAV_EDIT_SUBMISSION NC_("RID_STR_DATANAV_EDIT_SUBMISSION", "Edit Submission")
+#define RID_STR_DATANAV_REMOVE_SUBMISSION NC_("RID_STR_DATANAV_REMOVE_SUBMISSION", "Delete Submission")
+#define RID_STR_ELEMENT NC_("RID_STR_ELEMENT", "Element")
+#define RID_STR_ATTRIBUTE NC_("RID_STR_ATTRIBUTE", "Attribute")
+#define RID_STR_BINDING NC_("RID_STR_BINDING", "Binding")
+#define RID_STR_BINDING_EXPR NC_("RID_STR_BINDING_EXPR", "Binding expression")
+
+#define RID_SVXSTR_QUERY_EXIT_RECOVERY NC_("RID_SVXSTR_QUERY_EXIT_RECOVERY", "Are you sure you want to discard the %PRODUCTNAME document recovery data?")
+
+#define RID_SVXSTR_RULER_TAB_LEFT NC_("RID_SVXSTR_RULER_TAB_LEFT", "Left")
+#define RID_SVXSTR_RULER_TAB_RIGHT NC_("RID_SVXSTR_RULER_TAB_RIGHT", "Right")
+#define RID_SVXSTR_RULER_TAB_CENTER NC_("RID_SVXSTR_RULER_TAB_CENTER", "Center")
+#define RID_SVXSTR_RULER_TAB_DECIMAL NC_("RID_SVXSTR_RULER_TAB_DECIMAL", "Decimal")
+
+#define RID_SVXSTR_INSERT_HELPTEXT NC_("RID_SVXSTR_INSERT_HELPTEXT", "Insert mode. Click to change to overwrite mode.")
+#define RID_SVXSTR_OVERWRITE_HELPTEXT NC_("RID_SVXSTR_OVERWRITE_HELPTEXT", "Overwrite mode. Click to change to insert mode.")
+// To be shown in the status bar when in overwrite mode, please try to make it not longer than the word 'Overwrite'.
+#define RID_SVXSTR_OVERWRITE_TEXT NC_("RID_SVXSTR_OVERWRITE_TEXT", "Overwrite")
+#define RID_SVXSTR_INSERT_TEXT NC_("RID_SVXSTR_INSERT_TEXT", "Insert")
+#define RID_SVXSTR_SELECTIONMODE_HELPTEXT NC_("RID_SVXSTR_SELECTIONMODE_HELPTEXT", "%1. Click to change selection mode.")
+#define RID_SVXSTR_XMLSEC_SIG_OK NC_("RID_SVXSTR_XMLSEC_SIG_OK", "Digital Signature: The document signature is OK.")
+#define RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY NC_("RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY", "Digital Signature: The document signature is OK, but the certificates could not be validated.")
+#define RID_SVXSTR_XMLSEC_SIG_NOT_OK NC_("RID_SVXSTR_XMLSEC_SIG_NOT_OK", "Digital Signature: The document signature does not match the document content. We strongly recommend you not to trust this document.")
+#define RID_SVXSTR_XMLSEC_NO_SIG NC_("RID_SVXSTR_XMLSEC_NO_SIG", "Digital Signature: The document is not signed.")
+#define RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG NC_("RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG", "Digital Signature: The document signature and the certificate are OK, but not all parts of the document are signed.")
+#define RID_SVXSTR_DOC_MODIFIED_YES NC_("RID_SVXSTR_DOC_MODIFIED_YES", "The document has been modified. Click to save the document.")
+#define RID_SVXSTR_DOC_MODIFIED_NO NC_("RID_SVXSTR_DOC_MODIFIED_NO", "The document has not been modified since the last save.")
+#define RID_SVXSTR_DOC_LOAD NC_("RID_SVXSTR_DOC_LOAD", "Loading document...")
+#define RID_SVXSTR_FIT_SLIDE NC_("RID_SVXSTR_FIT_SLIDE", "Fit slide to current window.")
+#define RID_SVXSTR_WARN_MISSING_SMARTART NC_("RID_SVXSTR_WARN_MISSING_SMARTART", "Could not load all SmartArt objects. Saving in Microsoft Office 2010 or later would avoid this issue.")
+#define RID_SVXSTR_ZOOMTOOL_HINT NC_("RID_SVXSTR_ZOOMTOOL_HINT", "Zoom factor. Right-click to change zoom factor or click to open Zoom dialog.")
+#define RID_SVXSTR_ZOOM_IN NC_("RID_SVXSTR_ZOOM_IN", "Zoom In")
+#define RID_SVXSTR_ZOOM_OUT NC_("RID_SVXSTR_ZOOM_OUT", "Zoom Out")
+#define RID_SVXSTR_ZOOM_25 NC_("RID_SVXSTR_ZOOM_25", "25%")
+#define RID_SVXSTR_ZOOM_50 NC_("RID_SVXSTR_ZOOM_50", "50%")
+#define RID_SVXSTR_ZOOM_75 NC_("RID_SVXSTR_ZOOM_75", "75%")
+#define RID_SVXSTR_ZOOM_100 NC_("RID_SVXSTR_ZOOM_100", "100%")
+#define RID_SVXSTR_ZOOM_150 NC_("RID_SVXSTR_ZOOM_150", "150%")
+#define RID_SVXSTR_ZOOM_200 NC_("RID_SVXSTR_ZOOM_200", "200%")
+#define RID_SVXSTR_ZOOM_WHOLE_PAGE NC_("RID_SVXSTR_ZOOM_WHOLE_PAGE", "Entire Page")
+#define RID_SVXSTR_ZOOM_PAGE_WIDTH NC_("RID_SVXSTR_ZOOM_PAGE_WIDTH", "Page Width")
+#define RID_SVXSTR_ZOOM_OPTIMAL_VIEW NC_("RID_SVXSTR_ZOOM_OPTIMAL_VIEW", "Optimal View")
+
+#define RID_SVXSTR_SEARCH_STYLES NC_("RID_SVXSTR_SEARCH_STYLES", "Including Styles")
+#define RID_SVXSTR_WRITER_STYLES NC_("RID_SVXSTR_WRITER_STYLES", "Paragraph St~yles")
+#define RID_SVXSTR_CALC_STYLES NC_("RID_SVXSTR_CALC_STYLES", "Cell St~yles")
+#define RID_SVXSTR_SEARCH NC_("RID_SVXSTR_SEARCH", "Search for formatting")
+#define RID_SVXSTR_REPLACE NC_("RID_SVXSTR_REPLACE", "Replace with formatting")
+#define RID_SVXSTR_SEARCH_END NC_("RID_SVXSTR_SEARCH_END", "Reached the end of the document")
+#define RID_SVXSTR_SEARCH_END_WRAPPED NC_("RID_SVXSTR_SEARCH_END_WRAPPED", "Reached the end of the document, continued from the beginning")
+#define RID_SVXSTR_SEARCH_END_SHEET NC_("RID_SVXSTR_SEARCH_END_SHEET", "Reached the end of the sheet")
+#define RID_SVXSTR_SEARCH_NOT_FOUND NC_("RID_SVXSTR_SEARCH_NOT_FOUND", "Search key not found")
+#define RID_SVXSTR_SEARCH_NAV_ELEMENT_NOT_FOUND NC_("RID_SVXSTR_SEARCH_NAV_ELEMENT_NOT_FOUND", "Navigation Element not found")
+#define RID_SVXSTR_SEARCH_START NC_("RID_SVXSTR_SEARCH_START", "Reached the beginning of the document")
+#define RID_SVXSTR_SEARCH_START_WRAPPED NC_("RID_SVXSTR_SEARCH_START_WRAPPED", "Reached the beginning of the document, continued from the end")
+#define RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED NC_("RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED", "Reached the first reminder, continued from the last")
+#define RID_SVXSTR_SEARCH_REMINDER_END_WRAPPED NC_("RID_SVXSTR_SEARCH_REMINDER_END_WRAPPED", "Reached the last reminder, continued from the first")
+
+#define RID_SVXDLG_BMPMASK_STR_PALETTE NC_("RID_SVXDLG_BMPMASK_STR_PALETTE", "Color Palette")
+#define RID_SVXDLG_BMPMASK_STR_TITLE NC_("RID_SVXDLG_BMPMASK_STR_TITLE", "Color Replacer")
+
+#define RID_SVXDLG_FLOAT3D_STR_TITLE NC_("RID_SVXDLG_FLOAT3D_STR_TITLE", "3D Effects")
+
+#define RID_SVXSTR_ERR_OLD_PASSWD NC_("RID_SVXSTR_ERR_OLD_PASSWD", "Invalid password")
+#define RID_SVXSTR_ERR_REPEAT_PASSWD NC_("RID_SVXSTR_ERR_REPEAT_PASSWD", "Passwords do not match")
+
+#define RID_SVXSTR_BULLET_DESCRIPTION_0 NC_("RID_SVXSTR_BULLET_DESCRIPTION_0", "Solid small circular bullets")
+#define RID_SVXSTR_BULLET_DESCRIPTION_1 NC_("RID_SVXSTR_BULLET_DESCRIPTION_1", "Solid large circular bullets")
+#define RID_SVXSTR_BULLET_DESCRIPTION_2 NC_("RID_SVXSTR_BULLET_DESCRIPTION_2", "Solid diamond bullets")
+#define RID_SVXSTR_BULLET_DESCRIPTION_3 NC_("RID_SVXSTR_BULLET_DESCRIPTION_3", "Solid large square bullets")
+#define RID_SVXSTR_BULLET_DESCRIPTION_4 NC_("RID_SVXSTR_BULLET_DESCRIPTION_4", "Right pointing arrow bullets filled out")
+#define RID_SVXSTR_BULLET_DESCRIPTION_5 NC_("RID_SVXSTR_BULLET_DESCRIPTION_5", "Right pointing arrow bullets")
+#define RID_SVXSTR_BULLET_DESCRIPTION_6 NC_("RID_SVXSTR_BULLET_DESCRIPTION_6", "Cross mark bullets")
+#define RID_SVXSTR_BULLET_DESCRIPTION_7 NC_("RID_SVXSTR_BULLET_DESCRIPTION_7", "Check mark bullets")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_0 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_0", "Number 1) 2) 3)")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_1 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_1", "Number 1. 2. 3.")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_2 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_2", "Number (1) (2) (3)")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_3 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_3", "Uppercase Roman number I. II. III.")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_4 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_4", "Uppercase letter A) B) C)")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_5 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_5", "Lowercase letter a) b) c)")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_6 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_6", "Lowercase letter (a) (b) (c)")
+#define RID_SVXSTR_SINGLENUM_DESCRIPTION_7 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_7", "Lowercase Roman number i. ii. iii.")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_0", "Numeric, numeric, lowercase letters, solid small circular bullet")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_1 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_1", "Numeric, lowercase letters, solid small circular bullet")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_2 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_2", "Numeric, lowercase letters, lowercase Roman, uppercase letters, solid small circular bullet")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_3 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_3", "Numeric")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_4 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_4", "Uppercase Roman, uppercase letters, lowercase Roman, lowercase letters, solid small circular bullet")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_5 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_5", "Uppercase letters, uppercase Roman, lowercase letters, lowercase Roman, solid small circular bullet")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_6 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_6", "Numeric with all sublevels")
+#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_7 NC_("RID_SVXSTR_OUTLINENUM_DESCRIPTION_7", "Right pointing bullet, right pointing arrow bullet, solid diamond bullet, solid small circular bullet")
+
+#define RID_SVXSTR_SAFEMODE_ZIP_FAILURE NC_("RID_SVXSTR_SAFEMODE_ZIP_FAILURE", "The zip file could not be created.")
+
+#define RID_SVXSTR_STYLEFAMILY_TABLEDESIGN NC_("RID_SVXSTR_STYLEFAMILY_TABLEDESIGN", "Table Design Styles")
+
+#define RID_SVXSTR_NUM_UNDO_ACTIONS NC_("RID_SVXSTR_NUM_UNDO_ACTIONS", "Actions to undo: $(ARG1)")
+#define RID_SVXSTR_NUM_UNDO_ACTION NC_("RID_SVXSTR_NUM_UNDO_ACTION", "Actions to undo: $(ARG1)")
+#define RID_SVXSTR_NUM_REDO_ACTIONS NC_("RID_SVXSTR_NUM_REDO_ACTIONS", "Actions to redo: $(ARG1)")
+#define RID_SVXSTR_NUM_REDO_ACTION NC_("RID_SVXSTR_NUM_REDO_ACTION", "Actions to redo: $(ARG1)")
+
+#define RID_SVXSTR_FINDBAR_FIND NC_("RID_SVXSTR_FINDBAR_FIND", "Find")
+#define RID_SVXSTR_FINDBAR_MATCHCASE NC_("RID_SVXSTR_FINDBAR_MATCHCASE", "Match Case")
+#define RID_SVXSTR_FINDBAR_SEARCHFORMATTED NC_("RID_SVXSTR_FINDBAR_SEARCHFORMATTED", "Formatted Display")
+
+#define STR_IMAGE_ORIGINAL_SIZE NC_("STR_IMAGE_ORIGINAL_SIZE", "$(WIDTH) × $(HEIGHT) ($(WIDTH_IN_PX) × $(HEIGHT_IN_PX) px)")
+#define STR_IMAGE_VIEW_SIZE NC_("STR_IMAGE_VIEW_SIZE", "$(WIDTH) × $(HEIGHT) at $(DPI) DPI")
+#define STR_IMAGE_CAPACITY NC_("STR_IMAGE_CAPACITY", "$(CAPACITY) KiB")
+#define STR_IMAGE_CAPACITY_WITH_REDUCTION NC_("STR_IMAGE_CAPACITY_WITH_REDUCTION", "$(CAPACITY) KiB ($(REDUCTION)% reduction)")
+#define STR_IMAGE_GIF NC_("STR_IMAGE_GIF", "GIF image")
+#define STR_IMAGE_JPEG NC_("STR_IMAGE_JPEG", "JPEG image")
+#define STR_IMAGE_PNG NC_("STR_IMAGE_PNG", "PNG image")
+#define STR_IMAGE_TIFF NC_("STR_IMAGE_TIFF", "TIFF image")
+#define STR_IMAGE_WMF NC_("STR_IMAGE_WMF", "WMF image")
+#define STR_IMAGE_MET NC_("STR_IMAGE_MET", "MET image")
+#define STR_IMAGE_PCT NC_("STR_IMAGE_PCT", "PCT image")
+#define STR_IMAGE_SVG NC_("STR_IMAGE_SVG", "SVG image")
+#define STR_IMAGE_BMP NC_("STR_IMAGE_BMP", "BMP image")
+#define STR_IMAGE_WEBP NC_("STR_IMAGE_WEBP", "WebP image")
+#define STR_IMAGE_UNKNOWN NC_("STR_IMAGE_UNKNOWN", "Unknown")
+
+#define STR_SWITCH NC_("STR_SWITCH", "Switch")
+
+#define RID_SVXSTR_UNDO_GRAFMODE NC_("RID_SVXSTR_UNDO_GRAFMODE", "Image Mode")
+#define RID_SVXSTR_UNDO_GRAFRED NC_("RID_SVXSTR_UNDO_GRAFRED", "Red")
+#define RID_SVXSTR_UNDO_GRAFGREEN NC_("RID_SVXSTR_UNDO_GRAFGREEN", "Green")
+#define RID_SVXSTR_UNDO_GRAFBLUE NC_("RID_SVXSTR_UNDO_GRAFBLUE", "Blue")
+#define RID_SVXSTR_UNDO_GRAFLUMINANCE NC_("RID_SVXSTR_UNDO_GRAFLUMINANCE", "Brightness")
+#define RID_SVXSTR_UNDO_GRAFCONTRAST NC_("RID_SVXSTR_UNDO_GRAFCONTRAST", "Contrast")
+#define RID_SVXSTR_UNDO_GRAFGAMMA NC_("RID_SVXSTR_UNDO_GRAFGAMMA", "Gamma")
+#define RID_SVXSTR_UNDO_GRAFTRANSPARENCY NC_("RID_SVXSTR_UNDO_GRAFTRANSPARENCY", "Transparency")
+#define RID_SVXSTR_GRAFCROP NC_("RID_SVXSTR_GRAFCROP", "Crop")
+
+#define RID_SVXITEMS_ORI_STANDARD NC_("RID_SVXITEMS_ORI_STANDARD", "Default orientation")
+#define RID_SVXITEMS_ORI_TOPBOTTOM NC_("RID_SVXITEMS_ORI_TOPBOTTOM", "From top to bottom")
+#define RID_SVXITEMS_ORI_BOTTOMTOP NC_("RID_SVXITEMS_ORI_BOTTOMTOP", "Bottom to Top")
+#define RID_SVXITEMS_ORI_STACKED NC_("RID_SVXITEMS_ORI_STACKED", "Stacked")
+#define RID_SVXITEMS_MARGIN_LEFT NC_("RID_SVXITEMS_MARGIN_LEFT", "Left margin: ")
+#define RID_SVXITEMS_MARGIN_TOP NC_("RID_SVXITEMS_MARGIN_TOP", "Top margin: ")
+#define RID_SVXITEMS_MARGIN_RIGHT NC_("RID_SVXITEMS_MARGIN_RIGHT", "Right margin: ")
+#define RID_SVXITEMS_MARGIN_BOTTOM NC_("RID_SVXITEMS_MARGIN_BOTTOM", "Bottom margin: ")
+#define RID_SVXITEMS_PAGE_COMPLETE NC_("RID_SVXITEMS_PAGE_COMPLETE", "Page Description: ")
+#define RID_SVXITEMS_PAGE_NUM_CHR_UPPER NC_("RID_SVXITEMS_PAGE_NUM_CHR_UPPER", "Capitals")
+#define RID_SVXITEMS_PAGE_NUM_CHR_LOWER NC_("RID_SVXITEMS_PAGE_NUM_CHR_LOWER", "Lowercase")
+#define RID_SVXITEMS_PAGE_NUM_ROM_UPPER NC_("RID_SVXITEMS_PAGE_NUM_ROM_UPPER", "Uppercase Roman")
+#define RID_SVXITEMS_PAGE_NUM_ROM_LOWER NC_("RID_SVXITEMS_PAGE_NUM_ROM_LOWER", "Lowercase Roman")
+#define RID_SVXITEMS_PAGE_NUM_ARABIC NC_("RID_SVXITEMS_PAGE_NUM_ARABIC", "Arabic")
+#define RID_SVXITEMS_PAGE_NUM_NONE NC_("RID_SVXITEMS_PAGE_NUM_NONE", "None")
+#define RID_SVXITEMS_PAGE_LAND_TRUE NC_("RID_SVXITEMS_PAGE_LAND_TRUE", "Landscape")
+#define RID_SVXITEMS_PAGE_LAND_FALSE NC_("RID_SVXITEMS_PAGE_LAND_FALSE", "Portrait")
+#define RID_SVXITEMS_PAGE_USAGE_LEFT NC_("RID_SVXITEMS_PAGE_USAGE_LEFT", "Left")
+#define RID_SVXITEMS_PAGE_USAGE_RIGHT NC_("RID_SVXITEMS_PAGE_USAGE_RIGHT", "Right")
+#define RID_SVXITEMS_PAGE_USAGE_ALL NC_("RID_SVXITEMS_PAGE_USAGE_ALL", "All")
+#define RID_SVXITEMS_PAGE_USAGE_MIRROR NC_("RID_SVXITEMS_PAGE_USAGE_MIRROR", "Mirrored")
+#define RID_SVXITEMS_AUTHOR_COMPLETE NC_("RID_SVXITEMS_AUTHOR_COMPLETE", "Author: ")
+#define RID_SVXITEMS_DATE_COMPLETE NC_("RID_SVXITEMS_DATE_COMPLETE", "Date: ")
+#define RID_SVXITEMS_TEXT_COMPLETE NC_("RID_SVXITEMS_TEXT_COMPLETE", "Text: ")
+#define RID_SVXITEMS_BRUSH_CHAR NC_("RID_SVXITEMS_BRUSH_CHAR", "Character background")
+
+#define STR_COLORTABLE NC_("STR_COLORTABLE", "Color Palette")
+
+// Used in the Slide Setup dialog of Impress
+#define STR_SLIDE_NUMBERS NC_("STR_SLIDE_NUMBERS", "Slide numbers:")
+
+// String for saving modified image (instead of original)
+#define RID_SVXSTR_SAVE_MODIFIED_IMAGE NC_("RID_SVXSTR_SAVE_MODIFIED_IMAGE", "The image has been modified. By default the original image will be saved.\nDo you want to save the modified version instead?")
+
+#define RID_SUBSETSTR_BASIC_LATIN NC_("RID_SUBSETMAP", "Basic Latin")
+#define RID_SUBSETSTR_LATIN_1 NC_("RID_SUBSETMAP", "Latin-1")
+#define RID_SUBSETSTR_LATIN_EXTENDED_A NC_("RID_SUBSETMAP", "Latin Extended-A")
+#define RID_SUBSETSTR_LATIN_EXTENDED_B NC_("RID_SUBSETMAP", "Latin Extended-B")
+#define RID_SUBSETSTR_IPA_EXTENSIONS NC_("RID_SUBSETMAP", "IPA Extensions")
+#define RID_SUBSETSTR_SPACING_MODIFIERS NC_("RID_SUBSETMAP", "Spacing Modifier Letters")
+#define RID_SUBSETSTR_COMB_DIACRITICAL NC_("RID_SUBSETMAP", "Combining Diacritical Marks")
+#define RID_SUBSETSTR_BASIC_GREEK NC_("RID_SUBSETMAP", "Basic Greek")
+#define RID_SUBSETSTR_GREEK_SYMS_COPTIC NC_("RID_SUBSETMAP", "Greek Symbols And Coptic")
+#define RID_SUBSETSTR_CYRILLIC NC_("RID_SUBSETMAP", "Cyrillic")
+#define RID_SUBSETSTR_ARMENIAN NC_("RID_SUBSETMAP", "Armenian")
+#define RID_SUBSETSTR_BASIC_HEBREW NC_("RID_SUBSETMAP", "Basic Hebrew")
+#define RID_SUBSETSTR_HEBREW_EXTENDED NC_("RID_SUBSETMAP", "Hebrew Extended")
+#define RID_SUBSETSTR_BASIC_ARABIC NC_("RID_SUBSETMAP", "Basic Arabic")
+#define RID_SUBSETSTR_ARABIC_EXTENDED NC_("RID_SUBSETMAP", "Arabic Extended")
+#define RID_SUBSETSTR_DEVANAGARI NC_("RID_SUBSETMAP", "Devanagari")
+#define RID_SUBSETSTR_BENGALI NC_("RID_SUBSETMAP", "Bengali")
+#define RID_SUBSETSTR_GURMUKHI NC_("RID_SUBSETMAP", "Gurmukhi")
+#define RID_SUBSETSTR_GUJARATI NC_("RID_SUBSETMAP", "Gujarati")
+#define RID_SUBSETSTR_ODIA NC_("RID_SUBSETMAP", "Odia")
+#define RID_SUBSETSTR_TAMIL NC_("RID_SUBSETMAP", "Tamil")
+#define RID_SUBSETSTR_TELUGU NC_("RID_SUBSETMAP", "Telugu")
+#define RID_SUBSETSTR_KANNADA NC_("RID_SUBSETMAP", "Kannada")
+#define RID_SUBSETSTR_MALAYALAM NC_("RID_SUBSETMAP", "Malayalam")
+#define RID_SUBSETSTR_THAI NC_("RID_SUBSETMAP", "Thai")
+#define RID_SUBSETSTR_LAO NC_("RID_SUBSETMAP", "Lao")
+#define RID_SUBSETSTR_BASIC_GEORGIAN NC_("RID_SUBSETMAP", "Basic Georgian")
+#define RID_SUBSETSTR_GEORGIAN_EXTENDED NC_("RID_SUBSETMAP", "Georgian Extended")
+#define RID_SUBSETSTR_HANGUL_JAMO NC_("RID_SUBSETMAP", "Hangul Jamo")
+#define RID_SUBSETSTR_LATIN_EXTENDED_ADDS NC_("RID_SUBSETMAP", "Latin Extended Additionals")
+#define RID_SUBSETSTR_GREEK_EXTENDED NC_("RID_SUBSETMAP", "Greek Extended")
+#define RID_SUBSETSTR_GENERAL_PUNCTUATION NC_("RID_SUBSETMAP", "General punctuation")
+#define RID_SUBSETSTR_SUB_SUPER_SCRIPTS NC_("RID_SUBSETMAP", "Superscripts and Subscripts")
+#define RID_SUBSETSTR_CURRENCY_SYMBOLS NC_("RID_SUBSETMAP", "Currency Symbols")
+#define RID_SUBSETSTR_COMB_DIACRITIC_SYMS NC_("RID_SUBSETMAP", "Combining Diacritical Symbols")
+#define RID_SUBSETSTR_LETTERLIKE_SYMBOLS NC_("RID_SUBSETMAP", "Letterlike Symbols")
+#define RID_SUBSETSTR_NUMBER_FORMS NC_("RID_SUBSETMAP", "Number Forms")
+#define RID_SUBSETSTR_ARROWS NC_("RID_SUBSETMAP", "Arrows")
+#define RID_SUBSETSTR_MATH_OPERATORS NC_("RID_SUBSETMAP", "Mathematical Operators")
+#define RID_SUBSETSTR_MISC_TECHNICAL NC_("RID_SUBSETMAP", "Miscellaneous Technical")
+#define RID_SUBSETSTR_CONTROL_PICTURES NC_("RID_SUBSETMAP", "Control Pictures")
+#define RID_SUBSETSTR_OPTICAL_CHAR_REC NC_("RID_SUBSETMAP", "Optical Character Recognition")
+#define RID_SUBSETSTR_ENCLOSED_ALPHANUM NC_("RID_SUBSETMAP", "Enclosed Alphanumerics")
+#define RID_SUBSETSTR_BOX_DRAWING NC_("RID_SUBSETMAP", "Box Drawing")
+#define RID_SUBSETSTR_BLOCK_ELEMENTS NC_("RID_SUBSETMAP", "Block Elements")
+#define RID_SUBSETSTR_GEOMETRIC_SHAPES NC_("RID_SUBSETMAP", "Geometric Shapes")
+#define RID_SUBSETSTR_MISC_DINGBATS NC_("RID_SUBSETMAP", "Miscellaneous Symbols")
+#define RID_SUBSETSTR_DINGBATS NC_("RID_SUBSETMAP", "Dingbats")
+#define RID_SUBSETSTR_CJK_SYMS_PUNCTUATION NC_("RID_SUBSETMAP", "CJK Symbols And Punctuation")
+#define RID_SUBSETSTR_HIRAGANA NC_("RID_SUBSETMAP", "Hiragana")
+#define RID_SUBSETSTR_KATAKANA NC_("RID_SUBSETMAP", "Katakana")
+#define RID_SUBSETSTR_BOPOMOFO NC_("RID_SUBSETMAP", "Bopomofo")
+#define RID_SUBSETSTR_HANGUL_COMPAT_JAMO NC_("RID_SUBSETMAP", "Hangul Compatibility Jamo")
+#define RID_SUBSETSTR_CJK_MISC NC_("RID_SUBSETMAP", "CJK Miscellaneous")
+#define RID_SUBSETSTR_ENCLOSED_CJK_LETTERS NC_("RID_SUBSETMAP", "Enclosed CJK Letters And Months")
+#define RID_SUBSETSTR_CJK_COMPATIBILITY NC_("RID_SUBSETMAP", "CJK Compatibility")
+#define RID_SUBSETSTR_HANGUL NC_("RID_SUBSETMAP", "Hangul")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDGRAPH NC_("RID_SUBSETMAP", "CJK Unified Ideographs")
+#define RID_SUBSETSTR_CJK_EXT_A_UNIFIED_IDGRAPH NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension A")
+#define RID_SUBSETSTR_PRIVATE_USE_AREA NC_("RID_SUBSETMAP", "Private Use Area")
+#define RID_SUBSETSTR_CJK_COMPAT_IDGRAPHS NC_("RID_SUBSETMAP", "CJK Compatibility Ideographs")
+#define RID_SUBSETSTR_ALPHA_PRESENTATION NC_("RID_SUBSETMAP", "Alphabetic Presentation Forms")
+#define RID_SUBSETSTR_ARABIC_PRESENT_A NC_("RID_SUBSETMAP", "Arabic Presentation Forms-A")
+#define RID_SUBSETSTR_COMBINING_HALF_MARKS NC_("RID_SUBSETMAP", "Combining Half Marks")
+#define RID_SUBSETSTR_CJK_COMPAT_FORMS NC_("RID_SUBSETMAP", "CJK Compatibility Forms")
+#define RID_SUBSETSTR_SMALL_FORM_VARIANTS NC_("RID_SUBSETMAP", "Small Form Variants")
+#define RID_SUBSETSTR_ARABIC_PRESENT_B NC_("RID_SUBSETMAP", "Arabic Presentation Forms-B")
+#define RID_SUBSETSTR_HALFW_FULLW_FORMS NC_("RID_SUBSETMAP", "Half-width and Full-width Forms")
+#define RID_SUBSETSTR_SPECIALS NC_("RID_SUBSETMAP", "Specials")
+#define RID_SUBSETSTR_YI_SYLLABLES NC_("RID_SUBSETMAP", "Yi Syllables")
+#define RID_SUBSETSTR_YI_RADICALS NC_("RID_SUBSETMAP", "Yi Radicals")
+#define RID_SUBSETSTR_OLD_ITALIC NC_("RID_SUBSETMAP", "Old Italic")
+#define RID_SUBSETSTR_GOTHIC NC_("RID_SUBSETMAP", "Gothic")
+#define RID_SUBSETSTR_DESERET NC_("RID_SUBSETMAP", "Deseret")
+#define RID_SUBSETSTR_BYZANTINE_MUSICAL_SYMBOLS NC_("RID_SUBSETMAP", "Byzantine Musical Symbols")
+#define RID_SUBSETSTR_MUSICAL_SYMBOLS NC_("RID_SUBSETMAP", "Musical Symbols")
+#define RID_SUBSETSTR_MATHEMATICAL_ALPHANUMERIC_SYMBOLS NC_("RID_SUBSETMAP", "Mathematical Alphanumeric Symbols")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension B")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension C")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension D")
+#define RID_SUBSETSTR_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT NC_("RID_SUBSETMAP", "CJK Compatibility Ideographs Supplement")
+#define RID_SUBSETSTR_TAGS NC_("RID_SUBSETMAP", "Tags")
+#define RID_SUBSETSTR_CYRILLIC_SUPPLEMENTARY NC_("RID_SUBSETMAP", "Cyrillic Supplement")
+#define RID_SUBSETSTR_VARIATION_SELECTORS NC_("RID_SUBSETMAP", "Variation Selectors")
+#define RID_SUBSETSTR_SUPPLEMENTARY_PRIVATE_USE_AREA_A NC_("RID_SUBSETMAP", "Supplementary Private Use Area-A")
+#define RID_SUBSETSTR_SUPPLEMENTARY_PRIVATE_USE_AREA_B NC_("RID_SUBSETMAP", "Supplementary Private Use Area-B")
+#define RID_SUBSETSTR_LIMBU NC_("RID_SUBSETMAP", "Limbu")
+#define RID_SUBSETSTR_TAI_LE NC_("RID_SUBSETMAP", "Tai Le")
+#define RID_SUBSETSTR_KHMER_SYMBOLS NC_("RID_SUBSETMAP", "Khmer Symbols")
+#define RID_SUBSETSTR_PHONETIC_EXTENSIONS NC_("RID_SUBSETMAP", "Phonetic Extensions")
+#define RID_SUBSETSTR_MISCELLANEOUS_SYMBOLS_AND_ARROWS NC_("RID_SUBSETMAP", "Miscellaneous Symbols And Arrows")
+#define RID_SUBSETSTR_YIJING_HEXAGRAM_SYMBOLS NC_("RID_SUBSETMAP", "Yijing Hexagram Symbols")
+#define RID_SUBSETSTR_LINEAR_B_SYLLABARY NC_("RID_SUBSETMAP", "Linear B Syllabary")
+#define RID_SUBSETSTR_LINEAR_B_IDEOGRAMS NC_("RID_SUBSETMAP", "Linear B Ideograms")
+#define RID_SUBSETSTR_AEGEAN_NUMBERS NC_("RID_SUBSETMAP", "Aegean Numbers")
+#define RID_SUBSETSTR_UGARITIC NC_("RID_SUBSETMAP", "Ugaritic")
+#define RID_SUBSETSTR_SHAVIAN NC_("RID_SUBSETMAP", "Shavian")
+#define RID_SUBSETSTR_OSMANYA NC_("RID_SUBSETMAP", "Osmanya")
+#define RID_SUBSETSTR_SINHALA NC_("RID_SUBSETMAP", "Sinhala")
+#define RID_SUBSETSTR_TIBETAN NC_("RID_SUBSETMAP", "Tibetan")
+#define RID_SUBSETSTR_MYANMAR NC_("RID_SUBSETMAP", "Myanmar")
+#define RID_SUBSETSTR_KHMER NC_("RID_SUBSETMAP", "Khmer")
+#define RID_SUBSETSTR_OGHAM NC_("RID_SUBSETMAP", "Ogham")
+#define RID_SUBSETSTR_RUNIC NC_("RID_SUBSETMAP", "Runic")
+#define RID_SUBSETSTR_SYRIAC NC_("RID_SUBSETMAP", "Syriac")
+#define RID_SUBSETSTR_THAANA NC_("RID_SUBSETMAP", "Thaana")
+#define RID_SUBSETSTR_ETHIOPIC NC_("RID_SUBSETMAP", "Ethiopic")
+#define RID_SUBSETSTR_CHEROKEE NC_("RID_SUBSETMAP", "Cherokee")
+#define RID_SUBSETSTR_CANADIAN_ABORIGINAL NC_("RID_SUBSETMAP", "Canadian Aboriginal Syllables")
+#define RID_SUBSETSTR_MONGOLIAN NC_("RID_SUBSETMAP", "Mongolian")
+#define RID_SUBSETSTR_MISC_MATH_SYMS_A NC_("RID_SUBSETMAP", "Miscellaneous Mathematical Symbols-A")
+#define RID_SUBSETSTR_SUPPL_ARROWS_A NC_("RID_SUBSETMAP", "Supplemental Arrows-A")
+#define RID_SUBSETSTR_BRAILLE_PATTERNS NC_("RID_SUBSETMAP", "Braille Patterns")
+#define RID_SUBSETSTR_SUPPL_ARROWS_B NC_("RID_SUBSETMAP", "Supplemental Arrows-B")
+#define RID_SUBSETSTR_MISC_MATH_SYMS_B NC_("RID_SUBSETMAP", "Miscellaneous Mathematical Symbols-B")
+#define RID_SUBSETSTR_CJK_RADICAL_SUPPL NC_("RID_SUBSETMAP", "CJK Radical Supplement")
+#define RID_SUBSETSTR_KANGXI_RADICALS NC_("RID_SUBSETMAP", "Kangxi Radicals")
+#define RID_SUBSETSTR_IDEO_DESC_CHARS NC_("RID_SUBSETMAP", "Ideographic Description Characters")
+#define RID_SUBSETSTR_TAGALOG NC_("RID_SUBSETMAP", "Tagalog")
+#define RID_SUBSETSTR_HANUNOO NC_("RID_SUBSETMAP", "Hanunoo")
+#define RID_SUBSETSTR_TAGBANWA NC_("RID_SUBSETMAP", "Tagbanwa")
+#define RID_SUBSETSTR_BUHID NC_("RID_SUBSETMAP", "Buhid")
+#define RID_SUBSETSTR_KANBUN NC_("RID_SUBSETMAP", "Kanbun")
+#define RID_SUBSETSTR_BOPOMOFO_EXTENDED NC_("RID_SUBSETMAP", "Bopomofo Extended")
+#define RID_SUBSETSTR_KATAKANA_PHONETIC NC_("RID_SUBSETMAP", "Katakana Phonetics")
+#define RID_SUBSETSTR_CJK_STROKES NC_("RID_SUBSETMAP", "CJK Strokes")
+#define RID_SUBSETSTR_CYPRIOT_SYLLABARY NC_("RID_SUBSETMAP", "Cypriot Syllabary")
+#define RID_SUBSETSTR_TAI_XUAN_JING_SYMBOLS NC_("RID_SUBSETMAP", "Tai Xuan Jing Symbols")
+#define RID_SUBSETSTR_VARIATION_SELECTORS_SUPPLEMENT NC_("RID_SUBSETMAP", "Variation Selectors Supplement")
+#define RID_SUBSETSTR_ANCIENT_GREEK_MUSICAL_NOTATION NC_("RID_SUBSETMAP", "Ancient Greek Musical Notation")
+#define RID_SUBSETSTR_ANCIENT_GREEK_NUMBERS NC_("RID_SUBSETMAP", "Ancient Greek Numbers")
+#define RID_SUBSETSTR_ARABIC_SUPPLEMENT NC_("RID_SUBSETMAP", "Arabic Supplement")
+#define RID_SUBSETSTR_BUGINESE NC_("RID_SUBSETMAP", "Buginese")
+#define RID_SUBSETSTR_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT NC_("RID_SUBSETMAP", "Combining Diacritical Marks Supplement")
+#define RID_SUBSETSTR_COPTIC NC_("RID_SUBSETMAP", "Coptic")
+#define RID_SUBSETSTR_ETHIOPIC_EXTENDED NC_("RID_SUBSETMAP", "Ethiopic Extended")
+#define RID_SUBSETSTR_ETHIOPIC_SUPPLEMENT NC_("RID_SUBSETMAP", "Ethiopic Supplement")
+#define RID_SUBSETSTR_GEORGIAN_SUPPLEMENT NC_("RID_SUBSETMAP", "Georgian Supplement")
+#define RID_SUBSETSTR_GLAGOLITIC NC_("RID_SUBSETMAP", "Glagolitic")
+#define RID_SUBSETSTR_KHAROSHTHI NC_("RID_SUBSETMAP", "Kharoshthi")
+#define RID_SUBSETSTR_MODIFIER_TONE_LETTERS NC_("RID_SUBSETMAP", "Modifier Tone Letters")
+#define RID_SUBSETSTR_NEW_TAI_LUE NC_("RID_SUBSETMAP", "New Tai Lue")
+#define RID_SUBSETSTR_OLD_PERSIAN NC_("RID_SUBSETMAP", "Old Persian")
+#define RID_SUBSETSTR_PHONETIC_EXTENSIONS_SUPPLEMENT NC_("RID_SUBSETMAP", "Phonetic Extensions Supplement")
+#define RID_SUBSETSTR_SUPPLEMENTAL_PUNCTUATION NC_("RID_SUBSETMAP", "Supplemental Punctuation")
+#define RID_SUBSETSTR_SYLOTI_NAGRI NC_("RID_SUBSETMAP", "Syloti Nagri")
+#define RID_SUBSETSTR_TIFINAGH NC_("RID_SUBSETMAP", "Tifinagh")
+#define RID_SUBSETSTR_VERTICAL_FORMS NC_("RID_SUBSETMAP", "Vertical Forms")
+#define RID_SUBSETSTR_NKO NC_("RID_SUBSETMAP", "Nko")
+#define RID_SUBSETSTR_BALINESE NC_("RID_SUBSETMAP", "Balinese")
+#define RID_SUBSETSTR_LATIN_EXTENDED_C NC_("RID_SUBSETMAP", "Latin Extended-C")
+#define RID_SUBSETSTR_LATIN_EXTENDED_D NC_("RID_SUBSETMAP", "Latin Extended-D")
+#define RID_SUBSETSTR_PHAGS_PA NC_("RID_SUBSETMAP", "Phags-Pa")
+#define RID_SUBSETSTR_PHOENICIAN NC_("RID_SUBSETMAP", "Phoenician")
+#define RID_SUBSETSTR_CUNEIFORM NC_("RID_SUBSETMAP", "Cuneiform")
+#define RID_SUBSETSTR_CUNEIFORM_NUMBERS_AND_PUNCTUATION NC_("RID_SUBSETMAP", "Cuneiform Numbers And Punctuation")
+#define RID_SUBSETSTR_COUNTING_ROD_NUMERALS NC_("RID_SUBSETMAP", "Counting Rod Numerals")
+#define RID_SUBSETSTR_SUNDANESE NC_("RID_SUBSETMAP", "Sundanese")
+#define RID_SUBSETSTR_LEPCHA NC_("RID_SUBSETMAP", "Lepcha")
+#define RID_SUBSETSTR_OL_CHIKI NC_("RID_SUBSETMAP", "Ol Chiki")
+#define RID_SUBSETSTR_CYRILLIC_EXTENDED_A NC_("RID_SUBSETMAP", "Cyrillic Extended-A")
+#define RID_SUBSETSTR_VAI NC_("RID_SUBSETMAP", "Vai")
+#define RID_SUBSETSTR_CYRILLIC_EXTENDED_B NC_("RID_SUBSETMAP", "Cyrillic Extended-B")
+#define RID_SUBSETSTR_SAURASHTRA NC_("RID_SUBSETMAP", "Saurashtra")
+#define RID_SUBSETSTR_KAYAH_LI NC_("RID_SUBSETMAP", "Kayah Li")
+#define RID_SUBSETSTR_REJANG NC_("RID_SUBSETMAP", "Rejang")
+#define RID_SUBSETSTR_CHAM NC_("RID_SUBSETMAP", "Cham")
+#define RID_SUBSETSTR_ANCIENT_SYMBOLS NC_("RID_SUBSETMAP", "Ancient Symbols")
+#define RID_SUBSETSTR_PHAISTOS_DISC NC_("RID_SUBSETMAP", "Phaistos Disc")
+#define RID_SUBSETSTR_LYCIAN NC_("RID_SUBSETMAP", "Lycian")
+#define RID_SUBSETSTR_CARIAN NC_("RID_SUBSETMAP", "Carian")
+#define RID_SUBSETSTR_LYDIAN NC_("RID_SUBSETMAP", "Lydian")
+#define RID_SUBSETSTR_MAHJONG_TILES NC_("RID_SUBSETMAP", "Mahjong Tiles")
+#define RID_SUBSETSTR_DOMINO_TILES NC_("RID_SUBSETMAP", "Domino Tiles")
+#define RID_SUBSETSTR_SAMARITAN NC_("RID_SUBSETMAP", "Samaritan")
+#define RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED NC_("RID_SUBSETMAP", "Canadian Aboriginal Syllabics Extended")
+#define RID_SUBSETSTR_TAI_THAM NC_("RID_SUBSETMAP", "Tai Tham")
+#define RID_SUBSETSTR_VEDIC_EXTENSIONS NC_("RID_SUBSETMAP", "Vedic Extensions")
+#define RID_SUBSETSTR_LISU NC_("RID_SUBSETMAP", "Lisu")
+#define RID_SUBSETSTR_BAMUM NC_("RID_SUBSETMAP", "Bamum")
+#define RID_SUBSETSTR_COMMON_INDIC_NUMBER_FORMS NC_("RID_SUBSETMAP", "Common Indic Number Forms")
+#define RID_SUBSETSTR_DEVANAGARI_EXTENDED NC_("RID_SUBSETMAP", "Devanagari Extended")
+#define RID_SUBSETSTR_HANGUL_JAMO_EXTENDED_A NC_("RID_SUBSETMAP", "Hangul Jamo Extended-A")
+#define RID_SUBSETSTR_JAVANESE NC_("RID_SUBSETMAP", "Javanese")
+#define RID_SUBSETSTR_MYANMAR_EXTENDED_A NC_("RID_SUBSETMAP", "Myanmar Extended-A")
+#define RID_SUBSETSTR_TAI_VIET NC_("RID_SUBSETMAP", "Tai Viet")
+#define RID_SUBSETSTR_MEETEI_MAYEK NC_("RID_SUBSETMAP", "Meetei Mayek")
+#define RID_SUBSETSTR_HANGUL_JAMO_EXTENDED_B NC_("RID_SUBSETMAP", "Hangul Jamo Extended-B")
+#define RID_SUBSETSTR_IMPERIAL_ARAMAIC NC_("RID_SUBSETMAP", "Imperial Aramaic")
+#define RID_SUBSETSTR_OLD_SOUTH_ARABIAN NC_("RID_SUBSETMAP", "Old South Arabian")
+#define RID_SUBSETSTR_AVESTAN NC_("RID_SUBSETMAP", "Avestan")
+#define RID_SUBSETSTR_INSCRIPTIONAL_PARTHIAN NC_("RID_SUBSETMAP", "Inscriptional Parthian")
+#define RID_SUBSETSTR_INSCRIPTIONAL_PAHLAVI NC_("RID_SUBSETMAP", "Inscriptional Pahlavi")
+#define RID_SUBSETSTR_OLD_TURKIC NC_("RID_SUBSETMAP", "Old Turkic")
+#define RID_SUBSETSTR_RUMI_NUMERAL_SYMBOLS NC_("RID_SUBSETMAP", "Rumi Numeral Symbols")
+#define RID_SUBSETSTR_KAITHI NC_("RID_SUBSETMAP", "Kaithi")
+#define RID_SUBSETSTR_EGYPTIAN_HIEROGLYPHS NC_("RID_SUBSETMAP", "Egyptian Hieroglyphs")
+#define RID_SUBSETSTR_ENCLOSED_ALPHANUMERIC_SUPPLEMENT NC_("RID_SUBSETMAP", "Enclosed Alphanumeric Supplement")
+#define RID_SUBSETSTR_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT NC_("RID_SUBSETMAP", "Enclosed Ideographic Supplement")
+#define RID_SUBSETSTR_MANDAIC NC_("RID_SUBSETMAP", "Mandaic")
+#define RID_SUBSETSTR_BATAK NC_("RID_SUBSETMAP", "Batak")
+#define RID_SUBSETSTR_ETHIOPIC_EXTENDED_A NC_("RID_SUBSETMAP", "Ethiopic Extended-A")
+#define RID_SUBSETSTR_BRAHMI NC_("RID_SUBSETMAP", "Brahmi")
+#define RID_SUBSETSTR_BAMUM_SUPPLEMENT NC_("RID_SUBSETMAP", "Bamum Supplement")
+#define RID_SUBSETSTR_KANA_SUPPLEMENT NC_("RID_SUBSETMAP", "Kana Supplement")
+#define RID_SUBSETSTR_PLAYING_CARDS NC_("RID_SUBSETMAP", "Playing Cards")
+#define RID_SUBSETSTR_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS NC_("RID_SUBSETMAP", "Miscellaneous Symbols And Pictographs")
+#define RID_SUBSETSTR_EMOTICONS NC_("RID_SUBSETMAP", "Emoticons")
+#define RID_SUBSETSTR_TRANSPORT_AND_MAP_SYMBOLS NC_("RID_SUBSETMAP", "Transport And Map Symbols")
+#define RID_SUBSETSTR_ALCHEMICAL_SYMBOLS NC_("RID_SUBSETMAP", "Alchemical Symbols")
+#define RID_SUBSETSTR_ARABIC_EXTENDED_A NC_("RID_SUBSETMAP", "Arabic Extended-A")
+#define RID_SUBSETSTR_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS NC_("RID_SUBSETMAP", "Arabic Mathematical Alphabetic Symbols")
+#define RID_SUBSETSTR_CHAKMA NC_("RID_SUBSETMAP", "Chakma")
+#define RID_SUBSETSTR_MEETEI_MAYEK_EXTENSIONS NC_("RID_SUBSETMAP", "Meetei Mayek Extensions")
+#define RID_SUBSETSTR_MEROITIC_CURSIVE NC_("RID_SUBSETMAP", "Meroitic Cursive")
+#define RID_SUBSETSTR_MEROITIC_HIEROGLYPHS NC_("RID_SUBSETMAP", "Meroitic Hieroglyphs")
+#define RID_SUBSETSTR_MIAO NC_("RID_SUBSETMAP", "Miao")
+#define RID_SUBSETSTR_SHARADA NC_("RID_SUBSETMAP", "Sharada")
+#define RID_SUBSETSTR_SORA_SOMPENG NC_("RID_SUBSETMAP", "Sora Sompeng")
+#define RID_SUBSETSTR_SUNDANESE_SUPPLEMENT NC_("RID_SUBSETMAP", "Sundanese Supplement")
+#define RID_SUBSETSTR_TAKRI NC_("RID_SUBSETMAP", "Takri")
+#define RID_SUBSETSTR_BASSA_VAH NC_("RID_SUBSETMAP", "Bassa Vah")
+#define RID_SUBSETSTR_CAUCASIAN_ALBANIAN NC_("RID_SUBSETMAP", "Caucasian Albanian")
+#define RID_SUBSETSTR_COPTIC_EPACT_NUMBERS NC_("RID_SUBSETMAP", "Coptic Epact Numbers")
+#define RID_SUBSETSTR_COMBINING_DIACRITICAL_MARKS_EXTENDED NC_("RID_SUBSETMAP", "Combining Diacritical Marks Extended")
+#define RID_SUBSETSTR_DUPLOYAN NC_("RID_SUBSETMAP", "Duployan")
+#define RID_SUBSETSTR_ELBASAN NC_("RID_SUBSETMAP", "Elbasan")
+#define RID_SUBSETSTR_GEOMETRIC_SHAPES_EXTENDED NC_("RID_SUBSETMAP", "Geometric Shapes Extended")
+#define RID_SUBSETSTR_GRANTHA NC_("RID_SUBSETMAP", "Grantha")
+#define RID_SUBSETSTR_KHOJKI NC_("RID_SUBSETMAP", "Khojki")
+#define RID_SUBSETSTR_KHUDAWADI NC_("RID_SUBSETMAP", "Khudawadi")
+#define RID_SUBSETSTR_LATIN_EXTENDED_E NC_("RID_SUBSETMAP", "Latin Extended-E")
+#define RID_SUBSETSTR_LINEAR_A NC_("RID_SUBSETMAP", "Linear A")
+#define RID_SUBSETSTR_MAHAJANI NC_("RID_SUBSETMAP", "Mahajani")
+#define RID_SUBSETSTR_MANICHAEAN NC_("RID_SUBSETMAP", "Manichaean")
+#define RID_SUBSETSTR_MENDE_KIKAKUI NC_("RID_SUBSETMAP", "Mende Kikakui")
+#define RID_SUBSETSTR_MODI NC_("RID_SUBSETMAP", "Modi")
+#define RID_SUBSETSTR_MRO NC_("RID_SUBSETMAP", "Mro")
+#define RID_SUBSETSTR_MYANMAR_EXTENDED_B NC_("RID_SUBSETMAP", "Myanmar Extended-B")
+#define RID_SUBSETSTR_NABATAEAN NC_("RID_SUBSETMAP", "Nabataean")
+#define RID_SUBSETSTR_OLD_NORTH_ARABIAN NC_("RID_SUBSETMAP", "Old North Arabian")
+#define RID_SUBSETSTR_OLD_PERMIC NC_("RID_SUBSETMAP", "Old Permic")
+#define RID_SUBSETSTR_ORNAMENTAL_DINGBATS NC_("RID_SUBSETMAP", "Ornamental Dingbats")
+#define RID_SUBSETSTR_PAHAWH_HMONG NC_("RID_SUBSETMAP", "Pahawh Hmong")
+#define RID_SUBSETSTR_PALMYRENE NC_("RID_SUBSETMAP", "Palmyrene")
+#define RID_SUBSETSTR_PAU_CIN_HAU NC_("RID_SUBSETMAP", "Pau Cin Hau")
+#define RID_SUBSETSTR_PSALTER_PAHLAVI NC_("RID_SUBSETMAP", "Psalter Pahlavi")
+#define RID_SUBSETSTR_SHORTHAND_FORMAT_CONTROLS NC_("RID_SUBSETMAP", "Shorthand Format Controls")
+#define RID_SUBSETSTR_SIDDHAM NC_("RID_SUBSETMAP", "Siddham")
+#define RID_SUBSETSTR_SINHALA_ARCHAIC_NUMBERS NC_("RID_SUBSETMAP", "Sinhala Archaic Numbers")
+#define RID_SUBSETSTR_SUPPLEMENTAL_ARROWS_C NC_("RID_SUBSETMAP", "Supplemental Arrows-C")
+#define RID_SUBSETSTR_TIRHUTA NC_("RID_SUBSETMAP", "Tirhuta")
+#define RID_SUBSETSTR_WARANG_CITI NC_("RID_SUBSETMAP", "Warang Citi")
+#define RID_SUBSETSTR_AHOM NC_("RID_SUBSETMAP", "Ahom")
+#define RID_SUBSETSTR_ANATOLIAN_HIEROGLYPHS NC_("RID_SUBSETMAP", "Anatolian Hieroglyphs")
+#define RID_SUBSETSTR_CHEROKEE_SUPPLEMENT NC_("RID_SUBSETMAP", "Cherokee Supplement")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension E")
+#define RID_SUBSETSTR_EARLY_DYNASTIC_CUNEIFORM NC_("RID_SUBSETMAP", "Early Dynastic Cuneiform")
+#define RID_SUBSETSTR_HATRAN NC_("RID_SUBSETMAP", "Hatran")
+#define RID_SUBSETSTR_MULTANI NC_("RID_SUBSETMAP", "Multani")
+#define RID_SUBSETSTR_OLD_HUNGARIAN NC_("RID_SUBSETMAP", "Old Hungarian")
+#define RID_SUBSETSTR_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS NC_("RID_SUBSETMAP", "Supplemental Symbols And Pictographs")
+#define RID_SUBSETSTR_SUTTON_SIGNWRITING NC_("RID_SUBSETMAP", "Sutton Signwriting")
+#define RID_SUBSETSTR_ADLAM NC_("RID_SUBSETMAP", "Adlam")
+#define RID_SUBSETSTR_BHAIKSUKI NC_("RID_SUBSETMAP", "Bhaiksuki")
+#define RID_SUBSETSTR_CYRILLIC_EXTENDED_C NC_("RID_SUBSETMAP", "Cyrillic Extended-C")
+#define RID_SUBSETSTR_GLAGOLITIC_SUPPLEMENT NC_("RID_SUBSETMAP", "Glagolitic Supplement")
+#define RID_SUBSETSTR_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION NC_("RID_SUBSETMAP", "Ideographic Symbols and Punctuation")
+#define RID_SUBSETSTR_MARCHEN NC_("RID_SUBSETMAP", "Marchen")
+#define RID_SUBSETSTR_MONGOLIAN_SUPPLEMENT NC_("RID_SUBSETMAP", "Mongolian Supplement")
+#define RID_SUBSETSTR_NEWA NC_("RID_SUBSETMAP", "Newa")
+#define RID_SUBSETSTR_OSAGE NC_("RID_SUBSETMAP", "Osage")
+#define RID_SUBSETSTR_TANGUT NC_("RID_SUBSETMAP", "Tangut")
+#define RID_SUBSETSTR_TANGUT_COMPONENTS NC_("RID_SUBSETMAP", "Tangut Components")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension F")
+#define RID_SUBSETSTR_KANA_EXTENDED_A NC_("RID_SUBSETMAP", "Kana Extended-A")
+#define RID_SUBSETSTR_MASARAM_GONDI NC_("RID_SUBSETMAP", "Masaram Gondi")
+#define RID_SUBSETSTR_NUSHU NC_("RID_SUBSETMAP", "Nushu")
+#define RID_SUBSETSTR_SOYOMBO NC_("RID_SUBSETMAP", "Soyombo")
+#define RID_SUBSETSTR_SYRIAC_SUPPLEMENT NC_("RID_SUBSETMAP", "Syriac Supplement")
+#define RID_SUBSETSTR_ZANABAZAR_SQUARE NC_("RID_SUBSETMAP", "Zanabazar Square")
+#define RID_SUBSETSTR_CHESS_SYMBOLS NC_("RID_SUBSETMAP", "Chess Symbols")
+#define RID_SUBSETSTR_DOGRA NC_("RID_SUBSETMAP", "Dogra")
+#define RID_SUBSETSTR_GUNJALA_GONDI NC_("RID_SUBSETMAP", "Gunjala Gondi")
+#define RID_SUBSETSTR_HANIFI_ROHINGYA NC_("RID_SUBSETMAP", "Hanifi Rohingya")
+#define RID_SUBSETSTR_INDIC_SIYAQ_NUMBERS NC_("RID_SUBSETMAP", "Indic Siyaq Numbers")
+#define RID_SUBSETSTR_MAKASAR NC_("RID_SUBSETMAP", "Makasar")
+#define RID_SUBSETSTR_MAYAN_NUMERALS NC_("RID_SUBSETMAP", "Mayan Numerals")
+#define RID_SUBSETSTR_MEDEFAIDRIN NC_("RID_SUBSETMAP", "Medefaidrin")
+#define RID_SUBSETSTR_OLD_SOGDIAN NC_("RID_SUBSETMAP", "Old Sogdian")
+#define RID_SUBSETSTR_SOGDIAN NC_("RID_SUBSETMAP", "Sogdian")
+#define RID_SUBSETSTR_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS NC_("RID_SUBSETMAP", "Egyptian Hieroglyph Format Controls")
+#define RID_SUBSETSTR_ELYMAIC NC_("RID_SUBSETMAP", "Elymaic")
+#define RID_SUBSETSTR_NANDINAGARI NC_("RID_SUBSETMAP", "Nandinagari")
+#define RID_SUBSETSTR_NYIAKENG_PUACHUE_HMONG NC_("RID_SUBSETMAP", "Nyiakeng Puachue Hmong")
+#define RID_SUBSETSTR_OTTOMAN_SIYAQ_NUMBERS NC_("RID_SUBSETMAP", "Ottoman Siyaq Numbers")
+#define RID_SUBSETSTR_SMALL_KANA_EXTENSION NC_("RID_SUBSETMAP", "Small Kana Extension")
+#define RID_SUBSETSTR_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A NC_("RID_SUBSETMAP", "Symbols and Pictographs Extended-A")
+#define RID_SUBSETSTR_TAMIL_SUPPLEMENT NC_("RID_SUBSETMAP", "Tamil Supplement")
+#define RID_SUBSETSTR_WANCHO NC_("RID_SUBSETMAP", "Wancho")
+#define RID_SUBSETSTR_CHORASMIAN NC_("RID_SUBSETMAP", "Chorasmian")
+#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension G")
+#define RID_SUBSETSTR_DIVES_AKURU NC_("RID_SUBSETMAP", "Dhives Akuru")
+#define RID_SUBSETSTR_KHITAN_SMALL_SCRIPT NC_("RID_SUBSETMAP", "Khitan small script")
+#define RID_SUBSETSTR_LISU_SUPPLEMENT NC_("RID_SUBSETMAP", "Lisu Supplement")
+#define RID_SUBSETSTR_SYMBOLS_FOR_LEGACY_COMPUTING NC_("RID_SUBSETMAP", "Symbols for Legacy Computing")
+#define RID_SUBSETSTR_TANGUT_SUPPLEMENT NC_("RID_SUBSETMAP", "Tangut Supplement")
+#define RID_SUBSETSTR_YEZIDI NC_("RID_SUBSETMAP", "Yezidi")
+#define RID_SUBSETSTR_ARABIC_EXTENDED_B NC_("RID_SUBSETMAP", "Arabic Extended-B")
+#define RID_SUBSETSTR_CYPRO_MINOAN NC_("RID_SUBSETMAP", "Cypro-Minoan")
+#define RID_SUBSETSTR_ETHIOPIC_EXTENDED_B NC_("RID_SUBSETMAP", "Ethiopic Extended-B")
+#define RID_SUBSETSTR_KANA_EXTENDED_B NC_("RID_SUBSETMAP", "Kana Extended-B")
+#define RID_SUBSETSTR_LATIN_EXTENDED_F NC_("RID_SUBSETMAP", "Latin Extended-F")
+#define RID_SUBSETSTR_LATIN_EXTENDED_G NC_("RID_SUBSETMAP", "Latin Extended-G")
+#define RID_SUBSETSTR_OLD_UYGHUR NC_("RID_SUBSETMAP", "Old Uyghur")
+#define RID_SUBSETSTR_TANGSA NC_("RID_SUBSETMAP", "Tangsa")
+#define RID_SUBSETSTR_TOTO NC_("RID_SUBSETMAP", "Toto")
+#define RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A NC_("RID_SUBSETMAP", "Canadian Aboriginal Syllabics Extended-A")
+#define RID_SUBSETSTR_VITHKUQI NC_("RID_SUBSETMAP", "Vithkuqi")
+#define RID_SUBSETSTR_ZNAMENNY_MUSICAL_NOTATION NC_("RID_SUBSETMAP", "Znamenny Musical Notation")
+
+#define RID_SVXSTR_FRAMEDIR_LTR NC_("RID_SVXSTR_FRAMEDIR_LTR", "Left-to-right (LTR)")
+#define RID_SVXSTR_FRAMEDIR_RTL NC_("RID_SVXSTR_FRAMEDIR_RTL", "Right-to-left (RTL)")
+#define RID_SVXSTR_FRAMEDIR_SUPER NC_("RID_SVXSTR_FRAMEDIR_SUPER", "Use superordinate object settings")
+// page direction
+#define RID_SVXSTR_PAGEDIR_LTR_HORI NC_("RID_SVXSTR_PAGEDIR_LTR_HORI", "Left-to-right (horizontal)")
+#define RID_SVXSTR_PAGEDIR_RTL_HORI NC_("RID_SVXSTR_PAGEDIR_RTL_HORI", "Right-to-left (horizontal)")
+#define RID_SVXSTR_PAGEDIR_RTL_VERT NC_("RID_SVXSTR_PAGEDIR_RTL_VERT", "Right-to-left (vertical)")
+#define RID_SVXSTR_PAGEDIR_LTR_VERT NC_("RID_SVXSTR_PAGEDIR_LTR_VERT", "Left-to-right (vertical)")
+#define RID_SVXSTR_PAGEDIR_LTR_BTT_VERT NC_("RID_SVXSTR_PAGEDIR_LTR_BTT_VERT", "Bottom-to-top, left-to-right (vertical)")
+
+#define RID_SVXSTR_FONTWORK NC_("RID_SVXSTR_FONTWORK", "Fontwork")
+
+#define RID_SVXSTR_SIGNATURELINE_DSIGNED_BY NC_("RID_SVXSTR_SIGNATURELINE_DSIGNED_BY", "Digitally signed by:")
+#define RID_SVXSTR_SIGNATURELINE_DATE NC_("RID_SVXSTR_SIGNATURELINE_DATE", "Date: %1")
+
+#define RID_SVXSTR_TRANSPARENCY NC_("RID_SVXSTR_TRANSPARENCY", "Transparency:")
+
+
+// strings related to borders
+#define RID_SVXSTR_TABLE_PRESET_NONE NC_("RID_SVXSTR_TABLE_PRESET_NONE", "No Borders")
+#define RID_SVXSTR_TABLE_PRESET_ONLYOUTER NC_("RID_SVXSTR_TABLE_PRESET_ONLYOUTER", "Outer Border Only")
+#define RID_SVXSTR_TABLE_PRESET_OUTERHORI NC_("RID_SVXSTR_TABLE_PRESET_OUTERHORI", "Outer Border and Horizontal Lines")
+#define RID_SVXSTR_TABLE_PRESET_OUTERALL NC_("RID_SVXSTR_TABLE_PRESET_OUTERALL", "Outer Border and All Inner Lines")
+#define RID_SVXSTR_TABLE_PRESET_OUTERVERI NC_("RID_SVXSTR_TABLE_PRESET_OUTERVERI", "Outer Border and Vertical Lines")
+#define RID_SVXSTR_TABLE_PRESET_OUTERINNER NC_("RID_SVXSTR_TABLE_PRESET_OUTERINNER", "Outer Border Without Changing Inner Lines")
+#define RID_SVXSTR_PARA_PRESET_DIAGONAL NC_("RID_SVXSTR_PARA_PRESET_DIAGONAL", "Diagonal Lines Only")
+#define RID_SVXSTR_PARA_PRESET_DIAGONALDOWN NC_("RID_SVXSTR_PARA_PRESET_DIAGONALDOWN", "Diagonal Down Border")
+#define RID_SVXSTR_PARA_PRESET_DIAGONALUP NC_("RID_SVXSTR_PARA_PRESET_DIAGONALUP", "Diagonal Up Border")
+#define RID_SVXSTR_PARA_PRESET_CRISSCROSS NC_("RID_SVXSTR_PARA_PRESET_CRISSCROSS", "Criss-Cross Border")
+#define RID_SVXSTR_PARA_PRESET_ALL NC_("RID_SVXSTR_PARA_PRESET_ALL", "All Four Borders")
+#define RID_SVXSTR_PARA_PRESET_LEFTRIGHT NC_("RID_SVXSTR_PARA_PRESET_LEFTRIGHT", "Left and Right Borders Only")
+#define RID_SVXSTR_PARA_PRESET_TOPBOTTOM NC_("RID_SVXSTR_PARA_PRESET_TOPBOTTOM", "Top and Bottom Borders Only")
+#define RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI NC_("RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI", "Top and Bottom Borders, and All Horizontal Lines")
+#define RID_SVXSTR_PARA_PRESET_ONLYLEFT NC_("RID_SVXSTR_PARA_PRESET_ONLYLEFT", "Left Border Only")
+#define RID_SVXSTR_PARA_PRESET_ONLYRIGHT NC_("RID_SVXSTR_PARA_PRESET_ONLYRIGHT", "Right Border Only")
+#define RID_SVXSTR_PARA_PRESET_ONLYTOP NC_("RID_SVXSTR_PARA_PRESET_ONLYTOP", "Top Border Only")
+#define RID_SVXSTR_PARA_PRESET_ONLYTBOTTOM NC_("RID_SVXSTR_PARA_PRESET_ONLYTBOTTOM", "Bottom Border Only")
+#define RID_SVXSTR_HOR_PRESET_ONLYHOR NC_("RID_SVXSTR_HOR_PRESET_ONLYHOR", "Top and Bottom Borders, and All Inner Lines")
+#define RID_SVXSTR_VER_PRESET_ONLYVER NC_("RID_SVXSTR_VER_PRESET_ONLYVER", "Left and Right Borders, and All Inner Lines")
+
+/*--------------------------------------------------------------------
+ Description: GraphicSizeCheck strings
+ --------------------------------------------------------------------*/
+#define STR_GRAPHIC_SIZE_CHECK_DIALOG_TITLE NC_("STR_GRAPHIC_SIZE_CHECK_DIALOG_TITLE", "Graphic Size Check")
+#define STR_WARNING_GRAPHIC_PIXEL_COUNT_LOW NC_("STR_WARNING_GRAPHIC_PIXEL_COUNT_LOW", "Image '%NAME%' has too few pixels for the current size (%DPIX% x %DPIY% DPI)")
+#define STR_WARNING_GRAPHIC_PIXEL_COUNT_HIGH NC_("STR_WARNING_GRAPHIC_PIXEL_COUNT_HIGH", "Image '%NAME%' has too many pixels for the current size (%DPIX% x %DPIY% DPI)")
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
new file mode 100644
index 000000000..b7f7a5938
--- /dev/null
+++ b/include/svx/svdcrtv.hxx
@@ -0,0 +1,168 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDCRTV_HXX
+#define INCLUDED_SVX_SVDCRTV_HXX
+
+#include <svx/svddrgv.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class XLineAttrSetItem;
+class XFillAttrSetItem;
+class SdrEdgeObj;
+class SdrObjConnection;
+
+class ImplConnectMarkerOverlay;
+class ImpSdrCreateViewExtraData;
+
+class SVXCORE_DLLPUBLIC SdrCreateView : public SdrDragView
+{
+ friend class SdrPageView;
+
+protected:
+ SdrObject* mpCurrentCreate; // The currently being created object
+ SdrPageView* mpCreatePV; // Here, the creation is started
+ std::unique_ptr<ImplConnectMarkerOverlay> mpCoMaOverlay;
+
+ // for migrating stuff from XOR, use ImpSdrCreateViewExtraData ATM to not need to
+ // compile the apps all the time
+ std::unique_ptr<ImpSdrCreateViewExtraData> mpCreateViewExtraData;
+
+ PointerStyle maCurrentCreatePointer;
+
+ sal_Int32 mnAutoCloseDistPix;
+ sal_Int32 mnFreeHandMinDistPix;
+ SdrInventor mnCurrentInvent; // set the current ones
+ SdrObjKind mnCurrentIdent; // Obj for re-creating
+
+ bool mb1stPointAsCenter : 1;
+ bool mbUseIncompatiblePathCreateInterface : 1;
+
+ void ImpClearConnectMarker();
+
+protected:
+ bool ImpBegCreateObj(SdrInventor nInvent, SdrObjKind nIdent, const Point& rPnt, OutputDevice* pOut,
+ sal_Int16 nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject);
+
+ void ShowCreateObj(/*OutputDevice* pOut, bool bFull*/);
+ void HideCreateObj(/*OutputDevice* pOut, bool bFull*/);
+ bool CheckEdgeMode();
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrCreateView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrCreateView() override;
+
+public:
+ virtual bool IsAction() const override;
+ virtual void MovAction(const Point& rPnt) override;
+ virtual void EndAction() override;
+ virtual void BckAction() override;
+ virtual void BrkAction() override;
+ virtual void TakeActionRect(tools::Rectangle& rRect) const override;
+
+ virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+
+ void SetMeasureLayer(const OUString& rName) { maMeasureLayer=rName; }
+
+ // If the MeasureLayer is not set (empty string), then use the active layer for measuring.
+ void SetEditMode(SdrViewEditMode eMode) { SdrDragView::SetEditMode(eMode); CheckEdgeMode(); }
+ void SetEditMode(bool bOn=true) { SdrDragView::SetEditMode(bOn); CheckEdgeMode(); }
+ void SetCreateMode(bool bOn=true) { SdrDragView::SetCreateMode(bOn); CheckEdgeMode(); }
+ void SetGluePointEditMode(bool bOn=true) { SdrDragView::SetGluePointEditMode(bOn); CheckEdgeMode(); }
+
+ // Determine whether a text tool is activated
+ bool IsTextTool() const;
+
+ // Determine whether an object connector tool activated
+ bool IsEdgeTool() const;
+
+ // Determine whether a measurement tool activated
+ bool IsMeasureTool() const;
+
+ void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default);
+ void TakeCurrentObj(SdrObjKind& nIdent, SdrInventor& nInvent) const
+ {
+ nInvent = mnCurrentInvent;
+ nIdent = mnCurrentIdent;
+ }
+ SdrInventor GetCurrentObjInventor() const { return mnCurrentInvent; }
+ SdrObjKind GetCurrentObjIdentifier() const { return mnCurrentIdent; }
+
+ // Beginning the regular Create
+ bool BegCreateObj(const Point& rPnt, OutputDevice* pOut=nullptr, short nMinMov=-3);
+ bool BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject);
+ void MovCreateObj(const Point& rPnt);
+ bool EndCreateObj(SdrCreateCmd eCmd);
+ void BckCreateObj(); // go back one polygon point
+ void BrkCreateObj();
+ bool IsCreateObj() const { return mpCurrentCreate != nullptr; }
+ SdrObject* GetCreateObj() const { return mpCurrentCreate; }
+
+ /// Setup layer (eg. foreground / background) of the given object.
+ static void SetupObjLayer(const SdrPageView* pPageView, const OUString& aActiveLayer, SdrObject* pObj);
+
+ // BegCreateCaptionObj() creates a SdrCaptionObj (legend item).
+ // rObjSiz is the initial size of the legend text frame.
+ // Only the length of the tip is dragged
+ bool BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz, OutputDevice* pOut=nullptr, short nMinMov=-3);
+
+ // Create a circle/rectangle/text frame with the first Point being
+ // the center of the object instead of the upper-left corner.
+ // Persistent flag. Default = FALSE.
+ bool IsCreate1stPointAsCenter() const { return mb1stPointAsCenter; }
+ void SetCreate1stPointAsCenter(bool bOn) { mb1stPointAsCenter = bOn; }
+
+ // Default = 5 Pixel
+ sal_uInt16 GetAutoCloseDistPix() const { return sal_uInt16(mnAutoCloseDistPix); }
+
+ // Setting for the minimum distance in pixels between 2 bezier points when
+ // creating a freehand line.
+ // Default = 10 Pixel
+ sal_uInt16 GetFreeHandMinDistPix() const { return sal_uInt16(mnFreeHandMinDistPix); }
+
+ // FIXME: Whoever wants to keep the Create Interface for the PathObj which is
+ // incompatible with the rest of the Create functionality of SvDraw, needs
+ // to set the following flag. It affects the following object types:
+ // OBJ_POLY, OBJ_PLIN, OBJ_PATHLINE, OBJ_PATHFILL
+
+ // This flag should be regarded as temporary. The affected applications should
+ // be changed soon.
+ // Default = sal_False;
+ bool IsUseIncompatiblePathCreateInterface() const { return mbUseIncompatiblePathCreateInterface; }
+ void SetUseIncompatiblePathCreateInterface(bool bOn) { mbUseIncompatiblePathCreateInterface = bOn; }
+ void SetConnectMarker(const SdrObjConnection& rCon);
+ void HideConnectMarker();
+
+ // Attributes of the object that is in the process of being created
+ /* new interface src537 */
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+
+ bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+};
+
+#endif // INCLUDED_SVX_SVDCRTV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
new file mode 100644
index 000000000..9332dc65a
--- /dev/null
+++ b/include/svx/svddef.hxx
@@ -0,0 +1,439 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDDEF_HXX
+#define INCLUDED_SVX_SVDDEF_HXX
+
+#include <svx/xdef.hxx>
+#include <svl/typedwhich.hxx>
+
+/*************************************************************************/
+// SdrItemPool V2, 09-11-1995:
+// 7 new Items for XLineAttrSetItem
+// 7 new Items for XFillAttrSetItem
+// 8 new Items for SdrShadowSetItem
+// 5 new Items for SdrCaptionSetItem
+// 25 new Items for SdrMiscSetItem
+// 6 new Items for SdrNotPersist
+// SdrItemPool V3, 29-02-1996
+// 17 new Items for XFillAttrSetItem (Bitmapfill)
+// SdrItemPool V4, 10-08-1996
+// 45 new Items for Edge and Measure (Connector and Measuring object)
+// SdrItemPool V4+, 18-10-1996
+// 8 new Items for CircItems
+// 18 new Items for NotPersist + Refactoring there
+// SdrItemPool V4++, 13-11-1996
+// 2 new Items for NotPersist+(MoveX/Y)
+// SdrItemPool V4+++, 07-06-1999
+// 15 new Items for NotPersist (Reserve)
+// 15 new Items for GrafItems
+
+// WhichMapping:
+// V1 Range = 1000..1065 (66)
+// V2 Range = 1000..1123 (124) (58 new Whiches)
+// V3 Range = 1000..1140 (141) (17 new Whiches)
+// V4 Range = 1000..1185 (186) (45 new Whiches)
+// Map V2: 10 6 20 4 11 6 9
+// V1: 1000..1009, 1010..1015, 1016..1035, 1036..1039, 1040..1050, 1051..1056 1057..1065
+// V2: 1000..1009, 1017..1022, 1030..1049, 1050..1053, 1062..1072, 1078..1083, 1109..1117, and 6 new ones appended at the end
+// |<------------ XOut ------------>| |<----------- SvDraw ----------->
+// Map V3:
+// V2: 1000..1029, 1030..1123
+// V3: 1000..1029, 1047..1140
+// Map V4:
+// V3: 1000..1126, 1127..1140
+// V4: 1000..1126, 1172..1185
+
+class SdrAllPositionXItem;
+class SdrAllPositionYItem;
+class SdrAllSizeHeightItem;
+class SdrAllSizeWidthItem;
+class SdrAngleItem;
+class SdrCaptionEscAbsItem;
+class SdrCaptionEscDirItem;
+class SdrCaptionEscIsRelItem;
+class SdrCaptionEscRelItem;
+class SdrCaptionFitLineLenItem;
+class SdrCaptionLineLenItem;
+class SdrCaptionTypeItem;
+class SdrCircKindItem;
+class SdrCustomShapeGeometryItem;
+class SdrEdgeKindItem;
+class SdrEdgeLineDeltaCountItem;
+class SdrEdgeNode1GlueDistItem;
+class SdrEdgeNode1HorzDistItem;
+class SdrEdgeNode1VertDistItem;
+class SdrEdgeNode2GlueDistItem;
+class SdrEdgeNode2HorzDistItem;
+class SdrEdgeNode2VertDistItem;
+class SdrGrafBlueItem;
+class SdrGrafContrastItem;
+class SdrGrafCropItem;
+class SdrGrafGamma100Item;
+class SdrGrafGreenItem;
+class SdrGrafInvertItem;
+class SdrGrafLuminanceItem;
+class SdrGrafModeItem;
+class SdrGrafRedItem;
+class SdrGrafTransparenceItem;
+class SdrHorzShearAllItem;
+class SdrHorzShearOneItem;
+class SdrLayerIdItem;
+class SdrLayerNameItem;
+class SdrLogicSizeHeightItem;
+class SdrLogicSizeWidthItem;
+class SdrMeasureBelowRefEdgeItem;
+class SdrMeasureDecimalPlacesItem;
+class SdrMeasureFormatStringItem;
+class SdrMeasureKindItem;
+class SdrMeasureOverhangItem;
+class SdrMeasureTextAutoAngleItem;
+class SdrMeasureTextFixedAngleItem;
+class SdrMeasureTextHPosItem;
+class SdrMeasureTextIsFixedAngleItem;
+class SdrMeasureTextRota90Item;
+class SdrMeasureTextVPosItem;
+class SdrMeasureUnitItem;
+class SdrMetricItem;
+class SdrMoveXItem;
+class SdrMoveYItem;
+class SdrObjPrintableItem;
+class SdrObjVisibleItem;
+class SdrOnOffItem;
+class SdrOnePositionXItem;
+class SdrOnePositionYItem;
+class SdrOneSizeHeightItem;
+class SdrOneSizeWidthItem;
+class SdrPercentItem;
+class SdrResizeXAllItem;
+class SdrResizeXOneItem;
+class SdrResizeYAllItem;
+class SdrResizeYOneItem;
+class SdrRotateOneItem;
+class SdrShearAngleItem;
+class SdrTextFitToSizeTypeItem;
+class SdrTextFixedCellHeightItem;
+class SdrTextVertAdjustItem;
+class SdrTransformRef1XItem;
+class SdrTransformRef1YItem;
+class SdrTransformRef2XItem;
+class SdrTransformRef2YItem;
+class SdrVertShearAllItem;
+class SdrVertShearOneItem;
+class SdrYesNoItem;
+class SfxBoolItem;
+class SfxInt16Item;
+class SfxUInt16Item;
+class SfxUInt32Item;
+class SfxStringItem;
+class SfxVoidItem;
+class Svx3DCharacterModeItem;
+class Svx3DCloseBackItem;
+class Svx3DCloseFrontItem;
+class Svx3DNormalsKindItem;
+class Svx3DPerspectiveItem;
+class Svx3DReducedLineGeometryItem;
+class Svx3DShadeModeItem;
+class Svx3DSmoothLidsItem;
+class Svx3DSmoothNormalsItem;
+class Svx3DTextureProjectionXItem;
+class Svx3DTextureProjectionYItem;
+class SvxB3DVectorItem;
+class SvxBoxInfoItem;
+class SvxBoxItem;
+class SvxColorItem;
+class SvxLineItem;
+class SvxTextRotateItem;
+class SvxWritingModeItem;
+class XColorItem;
+class SdrTextAniDirectionItem;
+class SdrTextAniKindItem;
+class SdrTextHorzAdjustItem;
+class SdrTextAniAmountItem;
+class SdrTextAniCountItem;
+class SdrTextAniStartInsideItem;
+class SdrTextAniStopInsideItem;
+class SdrTextAniDelayItem;
+class SdrMeasureScaleItem;
+class SdrRotateAllItem;
+class Svx3DTextureKindItem;
+class Svx3DTextureModeItem;
+class SvXMLAttrContainerItem;
+
+constexpr sal_uInt16 SDRATTR_START (XATTR_START); /* 1000 */
+ /* Pool V4*/ /* Pool V3*/ /* Pool V2*/
+constexpr sal_uInt16 SDRATTR_SHADOW_FIRST (XATTR_END + 1); /* 1067 */ /* 1067 */ /* 1050 */ /* Pool V1: 1036 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_SHADOW (SDRATTR_SHADOW_FIRST+ 0); /* 1067 */ /* 1067 */ /* 1050 */
+constexpr TypedWhichId<XColorItem> SDRATTR_SHADOWCOLOR (SDRATTR_SHADOW_FIRST+ 1); /* 1068 */ /* 1068 */ /* 1051 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_SHADOWXDIST (SDRATTR_SHADOW_FIRST+ 2); /* 1069 */ /* 1069 */ /* 1052 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_SHADOWYDIST (SDRATTR_SHADOW_FIRST+ 3); /* 1070 */ /* 1070 */ /* 1053 */
+constexpr TypedWhichId<SdrPercentItem> SDRATTR_SHADOWTRANSPARENCE (SDRATTR_SHADOW_FIRST+ 4); /* 1071 */ /* 1071 */ /* 1054 */ /* Pool V2 */
+constexpr TypedWhichId<SfxVoidItem> SDRATTR_SHADOW3D (SDRATTR_SHADOW_FIRST+ 5); /* 1072 */ /* 1072 */ /* 1055 */ /* Pool V2 */
+constexpr TypedWhichId<SfxVoidItem> SDRATTR_SHADOWPERSP (SDRATTR_SHADOW_FIRST+ 6); /* 1073 */ /* 1073 */ /* 1056 */ /* Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_SHADOWSIZEX (SDRATTR_SHADOW_FIRST+ 7);
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_SHADOWSIZEY (SDRATTR_SHADOW_FIRST+ 8);
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_SHADOWBLUR (SDRATTR_SHADOW_FIRST+ 9);
+constexpr sal_uInt16 SDRATTR_SHADOW_LAST (SDRATTR_SHADOWBLUR); /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */
+
+constexpr sal_uInt16 SDRATTR_CAPTION_FIRST (SDRATTR_SHADOW_LAST + 1); /* 1080 */ /* 1080 */ /* 1063 */ /* Pool V1: 1041 */
+constexpr TypedWhichId<SdrCaptionTypeItem> SDRATTR_CAPTIONTYPE (SDRATTR_CAPTION_FIRST+ 0); /* 1080 */ /* 1080 */ /* 1063 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_CAPTIONFIXEDANGLE (SDRATTR_CAPTION_FIRST+ 1); /* 1081 */ /* 1081 */ /* 1064 */
+constexpr TypedWhichId<SdrAngleItem> SDRATTR_CAPTIONANGLE (SDRATTR_CAPTION_FIRST+ 2); /* 1082 */ /* 1082 */ /* 1065 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_CAPTIONGAP (SDRATTR_CAPTION_FIRST+ 3); /* 1083 */ /* 1083 */ /* 1066 */
+constexpr TypedWhichId<SdrCaptionEscDirItem> SDRATTR_CAPTIONESCDIR (SDRATTR_CAPTION_FIRST+ 4); /* 1084 */ /* 1084 */ /* 1067 */
+constexpr TypedWhichId<SdrCaptionEscIsRelItem> SDRATTR_CAPTIONESCISREL (SDRATTR_CAPTION_FIRST+ 5); /* 1085 */ /* 1085 */ /* 1068 */
+constexpr TypedWhichId<SdrCaptionEscRelItem> SDRATTR_CAPTIONESCREL (SDRATTR_CAPTION_FIRST+ 6); /* 1086 */ /* 1086 */ /* 1069 */
+constexpr TypedWhichId<SdrCaptionEscAbsItem> SDRATTR_CAPTIONESCABS (SDRATTR_CAPTION_FIRST+ 7); /* 1087 */ /* 1087 */ /* 1070 */
+constexpr TypedWhichId<SdrCaptionLineLenItem> SDRATTR_CAPTIONLINELEN (SDRATTR_CAPTION_FIRST+ 8); /* 1088 */ /* 1088 */ /* 1071 */
+constexpr TypedWhichId<SdrCaptionFitLineLenItem> SDRATTR_CAPTIONFITLINELEN (SDRATTR_CAPTION_FIRST+ 9); /* 1089 */ /* 1089 */ /* 1072 */
+constexpr sal_uInt16 SDRATTR_CAPTION_LAST (SDRATTR_CAPTIONFITLINELEN); /* 1094 */ /* 1094 */ /* 1077 */ /* Pool V1: 1050 */
+
+constexpr sal_uInt16 SDRATTR_MISC_FIRST (SDRATTR_CAPTION_LAST + 1); /* 1097 */ /* 1097 */ /* 1080 */ /* Pool V1: 1053 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_CORNER_RADIUS (SDRATTR_MISC_FIRST + 0); /* 1097 */ /* 1097 */ /* 1080 long, def=0 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_MINFRAMEHEIGHT (SDRATTR_MISC_FIRST + 1); /* 1098 */ /* 1098 */ /* 1081 long, def=0 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_TEXT_AUTOGROWHEIGHT (SDRATTR_MISC_FIRST + 2); /* 1099 */ /* 1099 */ /* 1082 sal_Bool, def=sal_True */
+constexpr TypedWhichId<SdrTextFitToSizeTypeItem> SDRATTR_TEXT_FITTOSIZE (SDRATTR_MISC_FIRST + 3); /* 1100 */ /* 1100 */ /* 1083 enum, def=css::drawing::TextFitToSizeType_NONE */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_LEFTDIST (SDRATTR_MISC_FIRST + 4); /* 1101 */ /* 1101 */ /* 1084 long, def=0 */ /* Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_RIGHTDIST (SDRATTR_MISC_FIRST + 5); /* 1102 */ /* 1102 */ /* 1085 long, def=0 */ /* Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_UPPERDIST (SDRATTR_MISC_FIRST + 6); /* 1103 */ /* 1103 */ /* 1086 long, def=0 */ /* Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_LOWERDIST (SDRATTR_MISC_FIRST + 7); /* 1104 */ /* 1104 */ /* 1087 long, def=0 */ /* Pool V2 */
+constexpr TypedWhichId<SdrTextVertAdjustItem> SDRATTR_TEXT_VERTADJUST (SDRATTR_MISC_FIRST + 8); /* 1105 */ /* 1105 */ /* 1088 enum, def=SDRTEXTVERTADJUST_TOP */ /* Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_MAXFRAMEHEIGHT (SDRATTR_MISC_FIRST + 9); /* 1106 */ /* 1106 */ /* 1089 long, def=0 - Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_MINFRAMEWIDTH (SDRATTR_MISC_FIRST +10); /* 1107 */ /* 1107 */ /* 1090 long, def=0 - Pool V2 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXT_MAXFRAMEWIDTH (SDRATTR_MISC_FIRST +11); /* 1108 */ /* 1108 */ /* 1091 long, def=0 - Pool V2 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_TEXT_AUTOGROWWIDTH (SDRATTR_MISC_FIRST +12); /* 1109 */ /* 1109 */ /* 1092 sal_Bool, def=sal_False - Pool V2 */
+constexpr TypedWhichId<SdrTextHorzAdjustItem> SDRATTR_TEXT_HORZADJUST (SDRATTR_MISC_FIRST +13); /* 1110 */ /* 1110 */ /* 1093 enum, def=SDRTEXTHORZADJUST_LEFT */ /* Pool V2+ (04-12-1995) */
+constexpr TypedWhichId<SdrTextAniKindItem> SDRATTR_TEXT_ANIKIND (SDRATTR_MISC_FIRST +14); /* 1111 */ /* 1111 */ /* 1094 enum, def=SdrTextAniKind::NONE - Pool V2/V4 */
+constexpr TypedWhichId<SdrTextAniDirectionItem> SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15); /* 1112 */ /* 1112 */ /* 1095 enum, def=SdrTextAniDirection::Left - Pool V2/V4 */
+constexpr TypedWhichId<SdrTextAniStartInsideItem> SDRATTR_TEXT_ANISTARTINSIDE (SDRATTR_MISC_FIRST +16); /* 1113 */ /* 1113 */ /* 1096 sal_Bool, def=sal_False - Pool V2/V4 */
+constexpr TypedWhichId<SdrTextAniStopInsideItem> SDRATTR_TEXT_ANISTOPINSIDE (SDRATTR_MISC_FIRST +17); /* 1114 */ /* 1114 */ /* 1097 sal_Bool, def=sal_False - Pool V2/V4 */
+constexpr TypedWhichId<SdrTextAniCountItem> SDRATTR_TEXT_ANICOUNT (SDRATTR_MISC_FIRST +18); /* 1115 */ /* 1115 */ /* 1098 sal_uInt16, def=0 - Pool V2/V4 */
+constexpr TypedWhichId<SdrTextAniDelayItem> SDRATTR_TEXT_ANIDELAY (SDRATTR_MISC_FIRST +19); /* 1116 */ /* 1116 */ /* 1099 sal_uInt16, def=0 - Pool V2/V4 */
+constexpr TypedWhichId<SdrTextAniAmountItem> SDRATTR_TEXT_ANIAMOUNT (SDRATTR_MISC_FIRST +20); /* 1117 */ /* 1117 */ /* 1100 sal_uInt16, def=0 - Pool V2/V4 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_TEXT_CONTOURFRAME (SDRATTR_MISC_FIRST +21); /* 1118 */ /* 1118 */ /* 1101 */ /* Pool V2 */
+constexpr TypedWhichId<SvXMLAttrContainerItem> SDRATTR_XMLATTRIBUTES (SDRATTR_MISC_FIRST +22); /* 1120 */ /* 1120 */ /* 1103 */ /* Pool V2 */
+constexpr TypedWhichId<SdrTextFixedCellHeightItem> SDRATTR_TEXT_USEFIXEDCELLHEIGHT (SDRATTR_MISC_FIRST +23); /* 1121 */ /* 1121 */ /* 1104 */ /* Pool V2 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_TEXT_WORDWRAP (SDRATTR_MISC_FIRST +24); /* 1122 */ /* 1122 */ /* 1105 */ /* Pool V2 */
+constexpr TypedWhichId<SfxStringItem> SDRATTR_TEXT_CHAINNEXTNAME (SDRATTR_MISC_FIRST +25); /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */
+constexpr sal_uInt16 SDRATTR_MISC_LAST (SDRATTR_TEXT_CHAINNEXTNAME); /* 1125 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */
+
+constexpr sal_uInt16 SDRATTR_EDGE_FIRST (SDRATTR_MISC_LAST + 1); /* 1127 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeKindItem> SDRATTR_EDGEKIND (SDRATTR_EDGE_FIRST + 0); /* 1127 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeNode1HorzDistItem> SDRATTR_EDGENODE1HORZDIST (SDRATTR_EDGE_FIRST + 1); /* 1128 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeNode1VertDistItem> SDRATTR_EDGENODE1VERTDIST (SDRATTR_EDGE_FIRST + 2); /* 1129 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeNode2HorzDistItem> SDRATTR_EDGENODE2HORZDIST (SDRATTR_EDGE_FIRST + 3); /* 1130 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeNode2VertDistItem> SDRATTR_EDGENODE2VERTDIST (SDRATTR_EDGE_FIRST + 4); /* 1131 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeNode1GlueDistItem> SDRATTR_EDGENODE1GLUEDIST (SDRATTR_EDGE_FIRST + 5); /* 1132 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeNode2GlueDistItem> SDRATTR_EDGENODE2GLUEDIST (SDRATTR_EDGE_FIRST + 6); /* 1133 */ /* Pool V4 */
+constexpr TypedWhichId<SdrEdgeLineDeltaCountItem> SDRATTR_EDGELINEDELTACOUNT (SDRATTR_EDGE_FIRST + 7); /* 1134 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_EDGELINE1DELTA (SDRATTR_EDGE_FIRST + 8); /* 1135 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_EDGELINE2DELTA (SDRATTR_EDGE_FIRST + 9); /* 1136 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_EDGELINE3DELTA (SDRATTR_EDGE_FIRST +10); /* 1137 */ /* Pool V4 */
+constexpr sal_uInt16 SDRATTR_EDGE_LAST (SDRATTR_EDGELINE3DELTA); /* 1145 */ /* Pool V4 */
+
+constexpr sal_uInt16 SDRATTR_MEASURE_FIRST (SDRATTR_EDGE_LAST + 1); /* 1147 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureKindItem> SDRATTR_MEASUREKIND (SDRATTR_MEASURE_FIRST+ 0); /* 1147 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureTextHPosItem> SDRATTR_MEASURETEXTHPOS (SDRATTR_MEASURE_FIRST+ 1); /* 1148 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureTextVPosItem> SDRATTR_MEASURETEXTVPOS (SDRATTR_MEASURE_FIRST+ 2); /* 1149 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_MEASURELINEDIST (SDRATTR_MEASURE_FIRST+ 3); /* 1150 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_MEASUREHELPLINEOVERHANG (SDRATTR_MEASURE_FIRST+ 4); /* 1151 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_MEASUREHELPLINEDIST (SDRATTR_MEASURE_FIRST+ 5); /* 1152 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_MEASUREHELPLINE1LEN (SDRATTR_MEASURE_FIRST+ 6); /* 1153 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_MEASUREHELPLINE2LEN (SDRATTR_MEASURE_FIRST+ 7); /* 1154 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureBelowRefEdgeItem> SDRATTR_MEASUREBELOWREFEDGE (SDRATTR_MEASURE_FIRST+ 8); /* 1155 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureTextRota90Item> SDRATTR_MEASURETEXTROTA90 (SDRATTR_MEASURE_FIRST+ 9); /* 1156 */ /* Pool V4 */
+constexpr TypedWhichId<SdrYesNoItem> SDRATTR_MEASURETEXTUPSIDEDOWN (SDRATTR_MEASURE_FIRST+10); /* 1157 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureOverhangItem> SDRATTR_MEASUREOVERHANG (SDRATTR_MEASURE_FIRST+11); /* 1158 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureUnitItem> SDRATTR_MEASUREUNIT (SDRATTR_MEASURE_FIRST+12); /* 1159 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureScaleItem> SDRATTR_MEASURESCALE (SDRATTR_MEASURE_FIRST+13); /* 1160 */ /* Pool V4 */
+constexpr TypedWhichId<SdrYesNoItem> SDRATTR_MEASURESHOWUNIT (SDRATTR_MEASURE_FIRST+14); /* 1161 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureFormatStringItem> SDRATTR_MEASUREFORMATSTRING (SDRATTR_MEASURE_FIRST+15); /* 1162 */ /* Pool V4 */
+constexpr TypedWhichId<SdrMeasureTextAutoAngleItem> SDRATTR_MEASURETEXTAUTOANGLE (SDRATTR_MEASURE_FIRST+16); /* 1163 */ /* Pool V4, Correction 25-9-1996 */
+constexpr TypedWhichId<SdrAngleItem> SDRATTR_MEASURETEXTAUTOANGLEVIEW (SDRATTR_MEASURE_FIRST+17); /* 1164 */ /* Pool V4, Correction 25-9-1996 */
+constexpr TypedWhichId<SdrMeasureTextIsFixedAngleItem> SDRATTR_MEASURETEXTISFIXEDANGLE (SDRATTR_MEASURE_FIRST+18); /* 1165 */ /* Pool V4, Correction 25-9-1996 */
+constexpr TypedWhichId<SdrMeasureTextFixedAngleItem> SDRATTR_MEASURETEXTFIXEDANGLE (SDRATTR_MEASURE_FIRST+19); /* 1166 */ /* Pool V4, Correction 25-9-1996 */
+constexpr TypedWhichId<SdrMeasureDecimalPlacesItem> SDRATTR_MEASUREDECIMALPLACES (SDRATTR_MEASURE_FIRST+20); /* 1167 */ /* Pool V4 */
+constexpr sal_uInt16 SDRATTR_MEASURE_LAST (SDRATTR_MEASUREDECIMALPLACES); /* 1170 */ /* Pool V4 */
+
+constexpr sal_uInt16 SDRATTR_CIRC_FIRST (SDRATTR_MEASURE_LAST+ 1); /* 1172 */ /* Pool V4+ */
+constexpr TypedWhichId<SdrCircKindItem> SDRATTR_CIRCKIND (SDRATTR_CIRC_FIRST+ 0); /* 1172 */ /* Pool V4+ */
+constexpr TypedWhichId<SdrAngleItem> SDRATTR_CIRCSTARTANGLE (SDRATTR_CIRC_FIRST+ 1); /* 1173 */ /* Pool V4+ */
+constexpr TypedWhichId<SdrAngleItem> SDRATTR_CIRCENDANGLE (SDRATTR_CIRC_FIRST+ 2); /* 1174 */ /* Pool V4+ */
+constexpr sal_uInt16 SDRATTR_CIRC_LAST (SDRATTR_CIRCENDANGLE); /* 1178 */ /* Pool V4+ */
+
+// Only for Interfacing, not yet implemented. / * + * V4 /
+constexpr sal_uInt16 SDRATTR_NOTPERSIST_FIRST (SDRATTR_CIRC_LAST + 1); /* 1180 */ /* 1172 */ /* 1127 */ /* 1110 */ /* Pool V1: 1058 */
+constexpr TypedWhichId<SdrYesNoItem> SDRATTR_OBJMOVEPROTECT (SDRATTR_NOTPERSIST_FIRST+ 0); /* 1180 sal_Bool, def=sal_False */
+constexpr TypedWhichId<SdrYesNoItem> SDRATTR_OBJSIZEPROTECT (SDRATTR_NOTPERSIST_FIRST+ 1); /* 1181 sal_Bool, def=sal_False */
+constexpr TypedWhichId<SdrObjPrintableItem> SDRATTR_OBJPRINTABLE (SDRATTR_NOTPERSIST_FIRST+ 2); /* 1182 sal_Bool, def=sal_True */
+constexpr TypedWhichId<SdrLayerIdItem> SDRATTR_LAYERID (SDRATTR_NOTPERSIST_FIRST+ 3); /* 1183 sal_uInt16, def=0 */
+constexpr TypedWhichId<SdrLayerNameItem> SDRATTR_LAYERNAME (SDRATTR_NOTPERSIST_FIRST+ 4); /* 1184 String, def="" */
+constexpr TypedWhichId<SfxStringItem> SDRATTR_OBJECTNAME (SDRATTR_NOTPERSIST_FIRST+ 5); /* 1185 String, def="" */
+constexpr TypedWhichId<SdrAllPositionXItem> SDRATTR_ALLPOSITIONX (SDRATTR_NOTPERSIST_FIRST+ 6); /* 1186 long, def=0 */
+constexpr TypedWhichId<SdrAllPositionYItem> SDRATTR_ALLPOSITIONY (SDRATTR_NOTPERSIST_FIRST+ 7); /* 1187 long, def=0 */
+constexpr TypedWhichId<SdrAllSizeWidthItem> SDRATTR_ALLSIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+ 8); /* 1188 long, def=0 */
+constexpr TypedWhichId<SdrAllSizeHeightItem> SDRATTR_ALLSIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+ 9); /* 1189 long, def=0 */
+constexpr TypedWhichId<SdrOnePositionXItem> SDRATTR_ONEPOSITIONX (SDRATTR_NOTPERSIST_FIRST+10); /* 1190 long, def=0 */
+constexpr TypedWhichId<SdrOnePositionYItem> SDRATTR_ONEPOSITIONY (SDRATTR_NOTPERSIST_FIRST+11); /* 1191 long, def=0 */
+constexpr TypedWhichId<SdrOneSizeWidthItem> SDRATTR_ONESIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+12); /* 1192 long, def=0 */
+constexpr TypedWhichId<SdrOneSizeHeightItem> SDRATTR_ONESIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+13); /* 1193 long, def=0 */
+constexpr TypedWhichId<SdrLogicSizeWidthItem> SDRATTR_LOGICSIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+14); /* 1194 long, def=0 */
+constexpr TypedWhichId<SdrLogicSizeHeightItem> SDRATTR_LOGICSIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+15); /* 1195 long, def=0 */
+constexpr TypedWhichId<SdrAngleItem> SDRATTR_ROTATEANGLE (SDRATTR_NOTPERSIST_FIRST+16); /* 1196 long, def=0 */
+constexpr TypedWhichId<SdrShearAngleItem> SDRATTR_SHEARANGLE (SDRATTR_NOTPERSIST_FIRST+17); /* 1197 long, def=0 */
+constexpr TypedWhichId<SdrMoveXItem> SDRATTR_MOVEX (SDRATTR_NOTPERSIST_FIRST+18); /* 1198 long, def=0 */
+constexpr TypedWhichId<SdrMoveYItem> SDRATTR_MOVEY (SDRATTR_NOTPERSIST_FIRST+19); /* 1199 long, def=0 */
+constexpr TypedWhichId<SdrResizeXOneItem> SDRATTR_RESIZEXONE (SDRATTR_NOTPERSIST_FIRST+20); /* 1200 long, def=0 */
+constexpr TypedWhichId<SdrResizeYOneItem> SDRATTR_RESIZEYONE (SDRATTR_NOTPERSIST_FIRST+21); /* 1201 long, def=0 */
+constexpr TypedWhichId<SdrRotateOneItem> SDRATTR_ROTATEONE (SDRATTR_NOTPERSIST_FIRST+22); /* 1202 long, def=0 */
+constexpr TypedWhichId<SdrHorzShearOneItem> SDRATTR_HORZSHEARONE (SDRATTR_NOTPERSIST_FIRST+23); /* 1203 long, def=0 */
+constexpr TypedWhichId<SdrVertShearOneItem> SDRATTR_VERTSHEARONE (SDRATTR_NOTPERSIST_FIRST+24); /* 1204 long, def=0 */
+constexpr TypedWhichId<SdrResizeXAllItem> SDRATTR_RESIZEXALL (SDRATTR_NOTPERSIST_FIRST+25); /* 1205 long, def=0 */
+constexpr TypedWhichId<SdrResizeYAllItem> SDRATTR_RESIZEYALL (SDRATTR_NOTPERSIST_FIRST+26); /* 1206 long, def=0 */
+constexpr TypedWhichId<SdrRotateAllItem> SDRATTR_ROTATEALL (SDRATTR_NOTPERSIST_FIRST+27); /* 1207 long, def=0 */
+constexpr TypedWhichId<SdrHorzShearAllItem> SDRATTR_HORZSHEARALL (SDRATTR_NOTPERSIST_FIRST+28); /* 1208 long, def=0 */
+constexpr TypedWhichId<SdrVertShearAllItem> SDRATTR_VERTSHEARALL (SDRATTR_NOTPERSIST_FIRST+29); /* 1209 long, def=0 */
+constexpr TypedWhichId<SdrTransformRef1XItem> SDRATTR_TRANSFORMREF1X (SDRATTR_NOTPERSIST_FIRST+30); /* 1210 long, def=0 */
+constexpr TypedWhichId<SdrTransformRef1YItem> SDRATTR_TRANSFORMREF1Y (SDRATTR_NOTPERSIST_FIRST+31); /* 1211 long, def=0 */
+constexpr TypedWhichId<SdrTransformRef2XItem> SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32); /* 1212 long, def=0 */
+constexpr TypedWhichId<SdrTransformRef2YItem> SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33); /* 1213 long, def=0 */
+constexpr TypedWhichId<SvxWritingModeItem> SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34); /* 1214 V4+++ long, def=0 */
+constexpr TypedWhichId<SdrObjVisibleItem> SDRATTR_OBJVISIBLE (SDRATTR_NOTPERSIST_FIRST+35);
+constexpr sal_uInt16 SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE); /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */
+// no SetItem for this
+
+constexpr sal_uInt16 SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1); /* 1229 V4+++*/
+constexpr TypedWhichId<SdrGrafRedItem> SDRATTR_GRAFRED (SDRATTR_GRAF_FIRST+0); /* 1229 V4+++*/
+constexpr TypedWhichId<SdrGrafGreenItem> SDRATTR_GRAFGREEN (SDRATTR_GRAF_FIRST+1); /* 1230 V4+++*/
+constexpr TypedWhichId<SdrGrafBlueItem> SDRATTR_GRAFBLUE (SDRATTR_GRAF_FIRST+2); /* 1231 V4+++*/
+constexpr TypedWhichId<SdrGrafLuminanceItem> SDRATTR_GRAFLUMINANCE (SDRATTR_GRAF_FIRST+3); /* 1232 V4+++*/
+constexpr TypedWhichId<SdrGrafContrastItem> SDRATTR_GRAFCONTRAST (SDRATTR_GRAF_FIRST+4); /* 1233 V4+++*/
+constexpr TypedWhichId<SdrGrafGamma100Item> SDRATTR_GRAFGAMMA (SDRATTR_GRAF_FIRST+5); /* 1234 V4+++*/
+constexpr TypedWhichId<SdrGrafTransparenceItem> SDRATTR_GRAFTRANSPARENCE (SDRATTR_GRAF_FIRST+6); /* 1235 V4+++*/
+constexpr TypedWhichId<SdrGrafInvertItem> SDRATTR_GRAFINVERT (SDRATTR_GRAF_FIRST+7); /* 1236 V4+++*/
+constexpr TypedWhichId<SdrGrafModeItem> SDRATTR_GRAFMODE (SDRATTR_GRAF_FIRST+8); /* 1237 V4+++*/
+constexpr TypedWhichId<SdrGrafCropItem> SDRATTR_GRAFCROP (SDRATTR_GRAF_FIRST+9); /* 1238 V4+++*/
+constexpr sal_uInt16 SDRATTR_GRAF_LAST (SDRATTR_GRAFCROP); /* 1242 V4+++*/
+
+constexpr sal_uInt16 SDRATTR_3D_FIRST (SDRATTR_GRAF_LAST + 1); /* 1244 V4+++*/
+
+constexpr sal_uInt16 SDRATTR_3DOBJ_FIRST (SDRATTR_3D_FIRST); /* 1244 V4+++*/
+constexpr TypedWhichId<SfxUInt16Item> SDRATTR_3DOBJ_PERCENT_DIAGONAL (SDRATTR_3DOBJ_FIRST + 0); /* 1244 V4+++*/
+constexpr TypedWhichId<SfxUInt16Item> SDRATTR_3DOBJ_BACKSCALE (SDRATTR_3DOBJ_FIRST + 1); /* 1245 V4+++*/
+constexpr TypedWhichId<SfxUInt32Item> SDRATTR_3DOBJ_DEPTH (SDRATTR_3DOBJ_FIRST + 2); /* 1246 V4+++*/
+constexpr TypedWhichId<SfxUInt32Item> SDRATTR_3DOBJ_HORZ_SEGS (SDRATTR_3DOBJ_FIRST + 3); /* 1247 V4+++*/
+constexpr TypedWhichId<SfxUInt32Item> SDRATTR_3DOBJ_VERT_SEGS (SDRATTR_3DOBJ_FIRST + 4); /* 1248 V4+++*/
+constexpr TypedWhichId<SfxUInt32Item> SDRATTR_3DOBJ_END_ANGLE (SDRATTR_3DOBJ_FIRST + 5); /* 1249 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DOBJ_DOUBLE_SIDED (SDRATTR_3DOBJ_FIRST + 6); /* 1250 V4+++*/
+constexpr TypedWhichId<Svx3DNormalsKindItem> SDRATTR_3DOBJ_NORMALS_KIND (SDRATTR_3DOBJ_FIRST + 7); /* 1251 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DOBJ_NORMALS_INVERT (SDRATTR_3DOBJ_FIRST + 8); /* 1252 V4+++*/
+constexpr TypedWhichId<Svx3DTextureProjectionXItem> SDRATTR_3DOBJ_TEXTURE_PROJ_X (SDRATTR_3DOBJ_FIRST + 9); /* 1253 V4+++*/
+constexpr TypedWhichId<Svx3DTextureProjectionYItem> SDRATTR_3DOBJ_TEXTURE_PROJ_Y (SDRATTR_3DOBJ_FIRST + 10); /* 1254 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DOBJ_SHADOW_3D (SDRATTR_3DOBJ_FIRST + 11); /* 1255 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DOBJ_MAT_COLOR (SDRATTR_3DOBJ_FIRST + 12); /* 1256 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DOBJ_MAT_EMISSION (SDRATTR_3DOBJ_FIRST + 13); /* 1257 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DOBJ_MAT_SPECULAR (SDRATTR_3DOBJ_FIRST + 14); /* 1258 V4+++*/
+constexpr TypedWhichId<SfxUInt16Item> SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY (SDRATTR_3DOBJ_FIRST + 15); /* 1259 V4+++*/
+constexpr TypedWhichId<Svx3DTextureKindItem> SDRATTR_3DOBJ_TEXTURE_KIND (SDRATTR_3DOBJ_FIRST + 16); /* 1260 V4+++*/
+constexpr TypedWhichId<Svx3DTextureModeItem> SDRATTR_3DOBJ_TEXTURE_MODE (SDRATTR_3DOBJ_FIRST + 17); /* 1261 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DOBJ_TEXTURE_FILTER (SDRATTR_3DOBJ_FIRST + 18); /* 1262 V4+++*/
+
+// #107245# New items for 3d objects use former range SDRATTR_3DOBJ_RESERVED_01
+// up to SDRATTR_3DOBJ_RESERVED_05
+constexpr TypedWhichId<Svx3DSmoothNormalsItem> SDRATTR_3DOBJ_SMOOTH_NORMALS (SDRATTR_3DOBJ_FIRST + 19); /* 1263 V4+++*/
+constexpr TypedWhichId<Svx3DSmoothLidsItem> SDRATTR_3DOBJ_SMOOTH_LIDS (SDRATTR_3DOBJ_FIRST + 20); /* 1264 V4+++*/
+constexpr TypedWhichId<Svx3DCharacterModeItem> SDRATTR_3DOBJ_CHARACTER_MODE (SDRATTR_3DOBJ_FIRST + 21); /* 1265 V4+++*/
+constexpr TypedWhichId<Svx3DCloseFrontItem> SDRATTR_3DOBJ_CLOSE_FRONT (SDRATTR_3DOBJ_FIRST + 22); /* 1266 V4+++*/
+constexpr TypedWhichId<Svx3DCloseBackItem> SDRATTR_3DOBJ_CLOSE_BACK (SDRATTR_3DOBJ_FIRST + 23); /* 1267 V4+++*/
+
+// #i28528#
+// Added extra Item (Bool) for chart2 to be able to show reduced line geometry
+constexpr TypedWhichId<Svx3DReducedLineGeometryItem> SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY (SDRATTR_3DOBJ_FIRST + 24); /* 1268 V4+++*/
+
+constexpr sal_uInt16 SDRATTR_3DOBJ_LAST (SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY); /* 1282 V4+++*/
+
+constexpr sal_uInt16 SDRATTR_3DSCENE_FIRST (SDRATTR_3DOBJ_LAST + 1); /* 1283 V4+++*/
+constexpr TypedWhichId<Svx3DPerspectiveItem> SDRATTR_3DSCENE_PERSPECTIVE (SDRATTR_3DSCENE_FIRST + 0); /* 1283 V4+++*/
+constexpr TypedWhichId<SfxUInt32Item> SDRATTR_3DSCENE_DISTANCE (SDRATTR_3DSCENE_FIRST + 1); /* 1284 V4+++*/
+constexpr TypedWhichId<SfxUInt32Item> SDRATTR_3DSCENE_FOCAL_LENGTH (SDRATTR_3DSCENE_FIRST + 2); /* 1285 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_TWO_SIDED_LIGHTING (SDRATTR_3DSCENE_FIRST + 3); /* 1286 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_1 (SDRATTR_3DSCENE_FIRST + 4); /* 1287 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_2 (SDRATTR_3DSCENE_FIRST + 5); /* 1288 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_3 (SDRATTR_3DSCENE_FIRST + 6); /* 1289 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_4 (SDRATTR_3DSCENE_FIRST + 7); /* 1290 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_5 (SDRATTR_3DSCENE_FIRST + 8); /* 1291 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_6 (SDRATTR_3DSCENE_FIRST + 9); /* 1292 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_7 (SDRATTR_3DSCENE_FIRST + 10); /* 1293 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_LIGHTCOLOR_8 (SDRATTR_3DSCENE_FIRST + 11); /* 1294 V4+++*/
+constexpr TypedWhichId<SvxColorItem> SDRATTR_3DSCENE_AMBIENTCOLOR (SDRATTR_3DSCENE_FIRST + 12); /* 1295 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_1 (SDRATTR_3DSCENE_FIRST + 13); /* 1296 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_2 (SDRATTR_3DSCENE_FIRST + 14); /* 1297 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_3 (SDRATTR_3DSCENE_FIRST + 15); /* 1298 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_4 (SDRATTR_3DSCENE_FIRST + 16); /* 1299 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_5 (SDRATTR_3DSCENE_FIRST + 17); /* 1300 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_6 (SDRATTR_3DSCENE_FIRST + 18); /* 1301 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_7 (SDRATTR_3DSCENE_FIRST + 19); /* 1302 V4+++*/
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_3DSCENE_LIGHTON_8 (SDRATTR_3DSCENE_FIRST + 20); /* 1303 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_1 (SDRATTR_3DSCENE_FIRST + 21); /* 1304 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_2 (SDRATTR_3DSCENE_FIRST + 22); /* 1305 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_3 (SDRATTR_3DSCENE_FIRST + 23); /* 1306 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_4 (SDRATTR_3DSCENE_FIRST + 24); /* 1307 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_5 (SDRATTR_3DSCENE_FIRST + 25); /* 1308 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_6 (SDRATTR_3DSCENE_FIRST + 26); /* 1309 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_7 (SDRATTR_3DSCENE_FIRST + 27); /* 1310 V4+++*/
+constexpr TypedWhichId<SvxB3DVectorItem> SDRATTR_3DSCENE_LIGHTDIRECTION_8 (SDRATTR_3DSCENE_FIRST + 28); /* 1311 V4+++*/
+constexpr TypedWhichId<SfxUInt16Item> SDRATTR_3DSCENE_SHADOW_SLANT (SDRATTR_3DSCENE_FIRST + 29); /* 1312 V4+++*/
+constexpr TypedWhichId<Svx3DShadeModeItem> SDRATTR_3DSCENE_SHADE_MODE (SDRATTR_3DSCENE_FIRST + 30); /* 1313 V4+++*/
+constexpr sal_uInt16 SDRATTR_3DSCENE_LAST (SDRATTR_3DSCENE_SHADE_MODE); /* 1333 V4+++*/
+constexpr sal_uInt16 SDRATTR_3D_LAST (SDRATTR_3DSCENE_LAST); /* 1333 V4+++*/
+
+constexpr sal_uInt16 SDRATTR_CUSTOMSHAPE_FIRST (SDRATTR_3D_LAST + 1); /* 1334 V4+++*/
+constexpr TypedWhichId<SfxStringItem> SDRATTR_CUSTOMSHAPE_ENGINE (SDRATTR_CUSTOMSHAPE_FIRST + 0); /* 1334 V4+++*/
+constexpr TypedWhichId<SfxStringItem> SDRATTR_CUSTOMSHAPE_DATA (SDRATTR_CUSTOMSHAPE_FIRST + 1); /* 1335 V4+++*/
+constexpr TypedWhichId<SdrCustomShapeGeometryItem> SDRATTR_CUSTOMSHAPE_GEOMETRY (SDRATTR_CUSTOMSHAPE_FIRST + 2); /* 1336 V4+++*/
+constexpr sal_uInt16 SDRATTR_CUSTOMSHAPE_LAST (SDRATTR_CUSTOMSHAPE_GEOMETRY); /* 1357 V4+++*/
+
+constexpr sal_uInt16 SDRATTR_TABLE_FIRST (SDRATTR_CUSTOMSHAPE_LAST+1);
+constexpr TypedWhichId<SvxBoxItem> SDRATTR_TABLE_BORDER (SDRATTR_TABLE_FIRST+0);
+constexpr TypedWhichId<SvxBoxInfoItem> SDRATTR_TABLE_BORDER_INNER (SDRATTR_TABLE_FIRST+1);
+constexpr TypedWhichId<SvxLineItem> SDRATTR_TABLE_BORDER_TLBR (SDRATTR_TABLE_FIRST+2);
+constexpr TypedWhichId<SvxLineItem> SDRATTR_TABLE_BORDER_BLTR (SDRATTR_TABLE_FIRST+3);
+constexpr TypedWhichId<SvxTextRotateItem> SDRATTR_TABLE_TEXT_ROTATION (SDRATTR_TABLE_FIRST+4);
+constexpr sal_uInt16 SDRATTR_TABLE_LAST (SDRATTR_TABLE_TEXT_ROTATION);
+
+constexpr sal_uInt16 SDRATTR_GLOW_FIRST (SDRATTR_TABLE_LAST+1);
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_GLOW_RADIUS (SDRATTR_GLOW_FIRST+0);
+constexpr TypedWhichId<XColorItem> SDRATTR_GLOW_COLOR (SDRATTR_GLOW_FIRST+1);
+constexpr TypedWhichId<SdrPercentItem> SDRATTR_GLOW_TRANSPARENCY(SDRATTR_GLOW_FIRST + 2);
+constexpr sal_uInt16 SDRATTR_GLOW_LAST (SDRATTR_GLOW_TRANSPARENCY);
+
+constexpr sal_uInt16 SDRATTR_SOFTEDGE_FIRST(SDRATTR_GLOW_LAST + 1);
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_SOFTEDGE_RADIUS(SDRATTR_SOFTEDGE_FIRST + 0);
+constexpr sal_uInt16 SDRATTR_SOFTEDGE_LAST(SDRATTR_SOFTEDGE_RADIUS);
+
+constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_FIRST(SDRATTR_SOFTEDGE_LAST + 1);
+constexpr TypedWhichId<SfxInt16Item> SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST + 0);
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST + 1);
+constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_LAST(SDRATTR_TEXTCOLUMNS_SPACING);
+
+constexpr sal_uInt16 SDRATTR_END (SDRATTR_TEXTCOLUMNS_LAST); /* 1357 */ /* 1333 V4+++*/ /* 1243 V4+++*/ /*1213*/ /*1085*/ /*1040*/ /*Pool V2: 1123,V1: 1065 */
+
+#endif // INCLUDED_SVX_SVDDEF_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx
new file mode 100644
index 000000000..5a1d8d16a
--- /dev/null
+++ b/include/svx/svddrag.hxx
@@ -0,0 +1,177 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDDRAG_HXX
+#define INCLUDED_SVX_SVDDRAG_HXX
+
+
+#include <tools/gen.hxx>
+#include <tools/fract.hxx>
+#include <svx/svxdllapi.h>
+
+#include <memory>
+#include <vector>
+
+// Status information for specialized object dragging. In order for the model
+// to stay status free, the status data is kept on the View
+// and handed over to the object at the appropriate time as a parameter.
+// This also includes the status of the operation and Interactive
+// Object creation. In this case, pHdl is null.
+class SdrHdl;
+class SdrView;
+class SdrPageView;
+class SdrDragMethod;
+
+struct SdrDragStatUserData
+{
+ virtual ~SdrDragStatUserData() = 0;
+};
+
+class SVXCORE_DLLPUBLIC SdrDragStat final
+{
+ SdrHdl* pHdl; // The Handle for the User
+ SdrView* pView;
+ SdrPageView* pPageView;
+ std::vector<Point> mvPnts; // All previous Points: [0]=Start, [Count()-2]=Prev
+ Point aRef1; // Referencepoint: Resize fixed point, (axis of rotation,
+ Point aRef2; // axis of reflection, ...)
+ Point aPos0; // Position at the last Event
+ Point aRealNow; // Current dragging position without Snap, Ortho and Limit
+ tools::Rectangle aActionRect;
+
+ bool bEndDragChangesAttributes;
+ bool bEndDragChangesGeoAndAttributes;
+ /// Table row drag: table will re-layout itself later.
+ bool mbEndDragChangesLayout;
+ bool bMouseIsUp;
+
+ bool bShown; // Xor visible?
+ sal_uInt16 nMinMov; // So much has to be minimally moved first
+ bool bMinMoved; // MinMove surpassed?
+
+ bool bHorFixed; // Dragging only vertical
+ bool bVerFixed; // Dragging only horizontal
+ bool bWantNoSnap; // To decide if pObj-> MovCreate () should use NoSnapPos or not.
+ // Therefore, NoSnapPos is written into the buffer.
+ bool bOrtho4;
+ bool bOrtho8;
+
+ SdrDragMethod* pDragMethod;
+ std::unique_ptr<SdrDragStatUserData> mpUserData; // Userdata
+
+ void Clear();
+
+ sal_Int32 GetPrevPos() const { return mvPnts.size()-(mvPnts.size()>1 ? 2 : 1); }
+
+ // This is passed all the way through to ApplySpecialDrag of the Edge Object
+ // For LOK, we cannot really specify which gluepoint to select by default
+ // It selects the nearest gluepoints after DragEnd event.
+ // When multiple objects are on top of each other or somehow their gluepoints
+ // collide, the gluepoint is selected from the lowest order numbered object
+ // We can pass the ord number information inside the draginfo and choose the correct shape
+ struct {
+ sal_Int32 objectOrdNum = -1;
+ } mGlueOptions;
+
+public:
+ SdrDragStat() { Reset(); }
+ ~SdrDragStat();
+ void Reset();
+ SdrView* GetView() const { return pView; }
+ void SetView(SdrView* pV) { pView=pV; }
+ SdrPageView* GetPageView() const { return pPageView; }
+ void SetPageView(SdrPageView* pPV) { pPageView=pPV; }
+ const Point& GetPoint(sal_Int32 nNum) const { return mvPnts[nNum]; }
+ sal_Int32 GetPointCount() const { return mvPnts.size(); }
+ const Point& GetStart() const { return mvPnts[0]; }
+ const Point& GetPrev() const { return mvPnts[GetPrevPos()]; }
+ const Point& GetPos0() const { return aPos0; }
+ const Point& GetNow() const { return mvPnts.back(); }
+ void SetNow(Point const &pt) { mvPnts.back() = pt; }
+ const Point& GetRef1() const { return aRef1; }
+ void SetRef1(const Point &pt) { aRef1 = pt; }
+ const Point& GetRef2() const { return aRef2; }
+ void SetRef2(const Point &pt) { aRef2 = pt; }
+ const SdrHdl* GetHdl() const { return pHdl; }
+ void SetHdl(SdrHdl* pH) { pHdl=pH; }
+ SdrDragStatUserData* GetUser() const { return mpUserData.get(); }
+ void SetUser(std::unique_ptr<SdrDragStatUserData> pU) { mpUserData = std::move(pU); }
+ bool IsShown() const { return bShown; }
+ void SetShown(bool bOn) { bShown=bOn; }
+
+ bool IsMinMoved() const { return bMinMoved; }
+ void SetMinMoved() { bMinMoved=true; }
+ void ResetMinMoved() { bMinMoved=false; }
+ void SetMinMove(sal_uInt16 nDist) { nMinMov=nDist; if (nMinMov<1) nMinMov=1; }
+
+ bool IsHorFixed() const { return bHorFixed; }
+ void SetHorFixed(bool bOn) { bHorFixed=bOn; }
+ bool IsVerFixed() const { return bVerFixed; }
+ void SetVerFixed(bool bOn) { bVerFixed=bOn; }
+
+ // Here, the object can say: "I do not want to snap to coordinates!"
+ // for example, the angle of the arc ...
+ bool IsNoSnap() const { return bWantNoSnap; }
+ void SetNoSnap(bool bOn = true) { bWantNoSnap=bOn; }
+
+ // And here the Obj say which Ortho (if there is one) can be usefully applied to him.
+ // Ortho4 means Ortho in four directions (for Rect and CIRT)
+ bool IsOrtho4Possible() const { return bOrtho4; }
+ void SetOrtho4Possible(bool bOn = true) { bOrtho4=bOn; }
+ // Ortho8 means Ortho in 8 directions (for lines)
+ bool IsOrtho8Possible() const { return bOrtho8; }
+ void SetOrtho8Possible(bool bOn = true) { bOrtho8=bOn; }
+
+ // Is set by an object that was dragged.
+ bool IsEndDragChangesAttributes() const { return bEndDragChangesAttributes; }
+ void SetEndDragChangesAttributes(bool bOn) { bEndDragChangesAttributes=bOn; }
+ bool IsEndDragChangesGeoAndAttributes() const { return bEndDragChangesGeoAndAttributes; }
+ void SetEndDragChangesGeoAndAttributes(bool bOn) { bEndDragChangesGeoAndAttributes=bOn; }
+ bool IsEndDragChangesLayout() const { return mbEndDragChangesLayout; }
+ void SetEndDragChangesLayout(bool bOn) { mbEndDragChangesLayout=bOn; }
+
+ // Is set by the view and can be evaluated by Obj
+ bool IsMouseDown() const { return !bMouseIsUp; }
+ void SetMouseDown(bool bDown) { bMouseIsUp=!bDown; }
+
+ void Reset(const Point& rPnt);
+ void NextMove(const Point& rPnt);
+ void NextPoint();
+ void PrevPoint();
+ bool CheckMinMoved(const Point& rPnt);
+ tools::Long GetDX() const { return GetNow().X()-GetPrev().X(); }
+ tools::Long GetDY() const { return GetNow().Y()-GetPrev().Y(); }
+ Fraction GetXFact() const;
+ Fraction GetYFact() const;
+
+ SdrDragMethod* GetDragMethod() const { return pDragMethod; }
+ void SetDragMethod(SdrDragMethod* pMth) { pDragMethod=pMth; }
+
+ const tools::Rectangle& GetActionRect() const { return aActionRect; }
+ void SetActionRect(const tools::Rectangle& rR) { aActionRect=rR; }
+
+ // Also considering 1stPointAsCenter
+ void TakeCreateRect(tools::Rectangle& rRect) const;
+
+ auto& GetGlueOptions() { return mGlueOptions; }
+};
+
+#endif // INCLUDED_SVX_SVDDRAG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
new file mode 100644
index 000000000..fe71ad5d6
--- /dev/null
+++ b/include/svx/svddrgmt.hxx
@@ -0,0 +1,304 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDDRGMT_HXX
+#define INCLUDED_SVX_SVDDRGMT_HXX
+
+#include <svx/svddrgv.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/sdr/contact/objectcontact.hxx>
+#include <memory>
+
+class SdrDragView;
+class SdrDragStat;
+
+class SAL_DLLPUBLIC_RTTI SdrDragEntry
+{
+private:
+ bool mbAddToTransparent : 1;
+
+protected:
+ // access for derived classes
+ void setAddToTransparent(bool bNew) { mbAddToTransparent = bNew; }
+
+public:
+ SdrDragEntry();
+ virtual ~SdrDragEntry();
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) = 0;
+
+ // data read access
+ bool getAddToTransparent() const { return mbAddToTransparent; }
+};
+
+
+class SVXCORE_DLLPUBLIC SdrDragEntryPolyPolygon final : public SdrDragEntry
+{
+private:
+ basegfx::B2DPolyPolygon maOriginalPolyPolygon;
+
+public:
+ SdrDragEntryPolyPolygon(const basegfx::B2DPolyPolygon& rOriginalPolyPolygon);
+ virtual ~SdrDragEntryPolyPolygon() override;
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+};
+
+
+class SdrDragEntrySdrObject final : public SdrDragEntry
+{
+private:
+ const SdrObject& maOriginal;
+ SdrObjectUniquePtr mxClone;
+ bool mbModify;
+
+public:
+ SdrDragEntrySdrObject(
+ const SdrObject& rOriginal,
+ bool bModify);
+ virtual ~SdrDragEntrySdrObject() override;
+
+ // #i54102# Split createPrimitive2DSequenceInCurrentState in prepareCurrentState and processing,
+ // added accessors to original and clone
+ void prepareCurrentState(SdrDragMethod& rDragMethod);
+ const SdrObject& getOriginal() const { return maOriginal; }
+ SdrObject* getClone() { return mxClone.get(); }
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+};
+
+
+class SdrDragEntryPrimitive2DSequence final : public SdrDragEntry
+{
+private:
+ drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence;
+
+public:
+ SdrDragEntryPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DContainer&& rSequence);
+ virtual ~SdrDragEntryPrimitive2DSequence() override;
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+};
+
+
+class SdrDragEntryPointGlueDrag final : public SdrDragEntry
+{
+private:
+ std::vector< basegfx::B2DPoint > maPositions;
+ bool mbIsPointDrag;
+
+public:
+ SdrDragEntryPointGlueDrag(std::vector< basegfx::B2DPoint >&& rPositions, bool bIsPointDrag);
+ virtual ~SdrDragEntryPointGlueDrag() override;
+
+ virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override;
+};
+
+
+class SVXCORE_DLLPUBLIC SdrDragMethod
+{
+private:
+ std::vector< std::unique_ptr<SdrDragEntry> > maSdrDragEntries;
+ sdr::overlay::OverlayObjectList maOverlayObjectList;
+ SdrDragView& mrSdrDragView;
+
+ bool mbMoveOnly : 1;
+ bool mbSolidDraggingActive : 1;
+ bool mbShiftPressed : 1;
+
+protected:
+ // access for derivated classes to maSdrDragEntries
+ void clearSdrDragEntries();
+ void addSdrDragEntry(std::unique_ptr<SdrDragEntry> pNew);
+ virtual void createSdrDragEntries();
+ virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal);
+
+ // Helper to support inserting a new OverlayObject. It will do all
+ // necessary stuff involved with that:
+ // - add GridOffset for non-linear ViewToDevice transformation (calc)
+ // - add to OverlayManager
+ // - add to local OverlayObjectList - ownership change (!)
+ // It is centralized here (and protected) to avoid that new usages/
+ // implementations forget one of these needed steps.
+ void insertNewlyCreatedOverlayObjectForSdrDragMethod(
+ std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject,
+ const sdr::contact::ObjectContact& rObjectContact,
+ sdr::overlay::OverlayManager& rOverlayManager);
+
+ // access for derivated classes to mrSdrDragView
+ SdrDragView& getSdrDragView() { return mrSdrDragView; }
+ const SdrDragView& getSdrDragView() const { return mrSdrDragView; }
+
+ // access for derivated classes for bools
+ void setMoveOnly(bool bNew) { mbMoveOnly = bNew; }
+ void setSolidDraggingActive(bool bNew) { mbSolidDraggingActive = bNew; }
+
+ // internal helpers for creation of standard drag entries
+ void createSdrDragEntries_SolidDrag();
+ void createSdrDragEntries_PolygonDrag();
+ void createSdrDragEntries_PointDrag();
+ void createSdrDragEntries_GlueDrag();
+
+ // old call forwarders to the SdrDragView
+ OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const;
+ SdrHdl* GetDragHdl() const { return getSdrDragView().mpDragHdl; }
+ SdrHdlKind GetDragHdlKind() const { return getSdrDragView().meDragHdl; }
+ SdrDragStat& DragStat() { return getSdrDragView().maDragStat; }
+ const SdrDragStat& DragStat() const { return getSdrDragView().maDragStat; }
+ Point& Ref1() const { return mrSdrDragView.maRef1; }
+ Point& Ref2() const { return mrSdrDragView.maRef2; }
+ const SdrHdlList& GetHdlList() const { return getSdrDragView().GetHdlList(); }
+ void AddUndo(std::unique_ptr<SdrUndoAction> pUndo) { getSdrDragView().AddUndo(std::move(pUndo)); }
+ bool IsDragLimit() { return getSdrDragView().mbDragLimit; }
+ const tools::Rectangle& GetDragLimitRect() { return getSdrDragView().maDragLimit; }
+ const SdrMarkList& GetMarkedObjectList() { return getSdrDragView().GetMarkedObjectList(); }
+ Point GetSnapPos(const Point& rPt) const { return getSdrDragView().GetSnapPos(rPt,getSdrDragView().mpMarkedPV); }
+ SdrSnap SnapPos(Point& rPt) const { return getSdrDragView().SnapPos(rPt,getSdrDragView().mpMarkedPV); }
+ inline const tools::Rectangle& GetMarkedRect() const;
+ SdrPageView* GetDragPV() const;
+ SdrObject* GetDragObj() const;
+ bool IsDraggingPoints() const { return getSdrDragView().IsDraggingPoints(); }
+ bool IsDraggingGluePoints() const { return getSdrDragView().IsDraggingGluePoints(); }
+
+ bool DoAddConnectorOverlays();
+ drawinglayer::primitive2d::Primitive2DContainer AddConnectorOverlays();
+
+public:
+
+ void resetSdrDragEntries();
+ basegfx::B2DRange getCurrentRange() const;
+
+ // #i58950# also moved constructor implementation to cxx
+ SdrDragMethod(SdrDragView& rNewView);
+
+ // #i58950# virtual destructor was missing
+ virtual ~SdrDragMethod();
+
+ void Show();
+ void Hide();
+ bool IsShiftPressed() const { return mbShiftPressed; }
+ void SetShiftPressed(bool bShiftPressed) { mbShiftPressed = bShiftPressed; }
+ virtual OUString GetSdrDragComment() const=0;
+ virtual bool BeginSdrDrag()=0;
+ virtual void MoveSdrDrag(const Point& rPnt)=0;
+ virtual bool EndSdrDrag(bool bCopy)=0;
+ virtual void CancelSdrDrag();
+ virtual PointerStyle GetSdrDragPointer() const=0;
+
+ virtual void CreateOverlayGeometry(
+ sdr::overlay::OverlayManager& rOverlayManager,
+ const sdr::contact::ObjectContact& rObjectContact);
+ void destroyOverlayGeometry();
+
+ virtual basegfx::B2DHomMatrix getCurrentTransformation() const;
+ virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget);
+ virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon& rTarget);
+
+ // data read access
+ bool getMoveOnly() const { return mbMoveOnly; }
+ bool getSolidDraggingActive() const { return mbSolidDraggingActive; }
+};
+
+inline const tools::Rectangle& SdrDragMethod::GetMarkedRect() const
+{
+ return getSdrDragView().meDragHdl==SdrHdlKind::Poly ? getSdrDragView().GetMarkedPointsRect() :
+ getSdrDragView().meDragHdl==SdrHdlKind::Glue ? getSdrDragView().GetMarkedGluePointsRect() :
+ getSdrDragView().GetMarkedObjRect();
+}
+
+
+// SdrDragMove
+
+class SVXCORE_DLLPUBLIC SdrDragMove : public SdrDragMethod
+{
+private:
+ tools::Long nBestXSnap;
+ tools::Long nBestYSnap;
+ bool bXSnapped;
+ bool bYSnapped;
+
+ void ImpCheckSnap(const Point& rPt);
+
+protected:
+ virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal) override;
+
+public:
+ SdrDragMove(SdrDragView& rNewView);
+
+ virtual OUString GetSdrDragComment() const override;
+ virtual bool BeginSdrDrag() override;
+ virtual void MoveSdrDrag(const Point& rPnt) override;
+ virtual bool EndSdrDrag(bool bCopy) override;
+ virtual PointerStyle GetSdrDragPointer() const override;
+
+ virtual basegfx::B2DHomMatrix getCurrentTransformation() const override;
+ virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) override;
+};
+
+
+// SdrDragResize
+
+class SVXCORE_DLLPUBLIC SdrDragResize : public SdrDragMethod
+{
+protected:
+ Fraction aXFact;
+ Fraction aYFact;
+
+public:
+ SdrDragResize(SdrDragView& rNewView);
+
+ virtual OUString GetSdrDragComment() const override;
+ virtual bool BeginSdrDrag() override;
+ virtual void MoveSdrDrag(const Point& rPnt) override;
+ virtual bool EndSdrDrag(bool bCopy) override;
+ virtual PointerStyle GetSdrDragPointer() const override;
+
+ virtual basegfx::B2DHomMatrix getCurrentTransformation() const override;
+ virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) override;
+};
+
+
+// SdrDragObjOwn
+
+class SVXCORE_DLLPUBLIC SdrDragObjOwn : public SdrDragMethod
+{
+private:
+ // SdrDragObjOwn always works on a clone since it has no transformation
+ // mechanism to modify wireframe visualisations, but uses the
+ // SdrObject::applySpecialDrag() method to change a clone of the
+ // SdrObject
+ SdrObjectUniquePtr mxClone;
+
+protected:
+ virtual void createSdrDragEntries() override;
+
+public:
+ SdrDragObjOwn(SdrDragView& rNewView);
+ virtual ~SdrDragObjOwn() override;
+
+ virtual OUString GetSdrDragComment() const override;
+ virtual bool BeginSdrDrag() override;
+ virtual void MoveSdrDrag(const Point& rPnt) override;
+ virtual bool EndSdrDrag(bool bCopy) override;
+ virtual PointerStyle GetSdrDragPointer() const override;
+};
+
+#endif // INCLUDED_SVX_SVDDRGMT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx
new file mode 100644
index 000000000..c88cf0b30
--- /dev/null
+++ b/include/svx/svddrgv.hxx
@@ -0,0 +1,230 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDDRGV_HXX
+#define INCLUDED_SVX_SVDDRGV_HXX
+
+#include <svx/svxdllapi.h>
+#include <svx/svdxcgv.hxx>
+#include <memory>
+
+class SdrUndoGeoObj;
+
+class SVXCORE_DLLPUBLIC SdrDragView : public SdrExchangeView
+{
+ friend class SdrPageView;
+ friend class SdrDragMethod;
+
+ // See GetDragXorPolyLimit/GetDragXorPointLimit
+ enum : size_t {
+ eDragXorPolyLimit = 100,
+ eDragXorPointLimit = 500
+ };
+
+protected:
+ SdrHdl* mpDragHdl;
+ std::unique_ptr<SdrDragMethod> mpCurrentSdrDragMethod;
+ SdrUndoGeoObj* mpInsPointUndo;
+ tools::Rectangle maDragLimit;
+ OUString maInsPointUndoStr;
+ SdrHdlKind meDragHdl;
+
+ bool mbFramDrag : 1; // currently frame dragging
+ bool mbMarkedHitMovesAlways : 1; // Persistent
+ bool mbDragLimit : 1; // Limit on SnapRect instead of BoundRect
+ bool mbDragHdl : 1; // TRUE: RefPt is slid
+ bool mbDragStripes : 1; // Persistent
+ bool mbSolidDragging : 1; // allow solid create/drag of objects
+ bool mbResizeAtCenter : 1;
+ bool mbCrookAtCenter : 1;
+ bool mbDragWithCopy : 1;
+ bool mbInsGluePoint : 1;
+ bool mbInsObjPointMode : 1;
+ bool mbInsGluePointMode : 1;
+ bool mbNoDragXorPolys : 1;
+
+protected:
+ virtual void SetMarkHandles(SfxViewShell* pOtherShell) override;
+ void ShowDragObj();
+ void HideDragObj();
+ bool ImpBegInsObjPoint(bool bIdxZwang, const Point& rPnt, bool bNewObj, OutputDevice* pOut);
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrDragView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrDragView() override;
+
+public:
+ virtual bool IsAction() const override;
+ virtual void MovAction(const Point& rPnt) override;
+ virtual void EndAction() override;
+ virtual void BckAction() override;
+ virtual void BrkAction() override;
+ virtual void TakeActionRect(tools::Rectangle& rRect) const override;
+
+ // special implementation for Writer:
+ // TakeDragObjAnchorPos() returns the position at which an object
+ // approximately ends up during dragging when it is "released"
+ // (EndDrag).
+ // As a general rule, this is the left upper corner of the expected
+ // new SnapRect. Exception: CaptionObj. There, it is the position
+ // of the "tail end".
+ // In case of return value 'false', the position could not be
+ // determined (e.g. point shift, multiple selection, shift of the
+ // mirror axis,...)
+ bool TakeDragObjAnchorPos(Point& rPos, bool bTopRight ) const;
+
+ // If pForcedMeth is passed, then pHdl, ... is not evaluated, but this Drag
+ // method is used. In this, the ownership of the instance passes
+ // to the View and is destroyed at the end of the dragging.
+ virtual bool BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl, short nMinMov=-3, SdrDragMethod* pForcedMeth=nullptr);
+ void MovDragObj(const Point& rPnt);
+ bool EndDragObj(bool bCopy=false);
+ void BrkDragObj();
+ bool IsDragObj() const { return mpCurrentSdrDragMethod && !mbInsPolyPoint && !mbInsGluePoint; }
+ SdrHdl* GetDragHdl() const { return mpDragHdl; }
+ SdrDragMethod* GetDragMethod() const { return mpCurrentSdrDragMethod.get(); }
+ bool IsDraggingPoints() const { return meDragHdl==SdrHdlKind::Poly; }
+ bool IsDraggingGluePoints() const { return meDragHdl==SdrHdlKind::Glue; }
+
+ // If you want to define that already during BegDrag
+ // or in the middle.
+ // (Is reset to 'false' on each BegDrag, so set it after BegDrag.)
+ void SetDragWithCopy(bool bOn) { mbDragWithCopy = bOn; }
+ bool IsDragWithCopy() const { return mbDragWithCopy; }
+
+ void SetInsertGluePoint(bool bOn) { mbInsGluePoint = bOn; }
+ bool IsInsertGluePoint() const { return mbInsGluePoint; }
+
+ // Interactive insertion of a new point. nIdx=0 => in front of the first point
+ bool IsInsObjPointPossible() const;
+ bool BegInsObjPoint(const Point& rPnt, bool bNewObj) { return ImpBegInsObjPoint(false, rPnt, bNewObj, nullptr); }
+ void MovInsObjPoint(const Point& rPnt) { MovDragObj(rPnt); }
+ bool EndInsObjPoint(SdrCreateCmd eCmd);
+ bool IsInsObjPoint() const { return mpCurrentSdrDragMethod && mbInsPolyPoint; }
+
+ // For the app to manage the status. GetPreferredPointer() is
+ // possibly going to deliver a matching pointer for it.
+ void SetInsObjPointMode(bool bOn) { mbInsObjPointMode = bOn; }
+ bool IsInsObjPointMode() const { return mbInsObjPointMode; }
+
+ bool IsInsGluePointPossible() const;
+ bool BegInsGluePoint(const Point& rPnt);
+ bool IsInsGluePoint() const { return mpCurrentSdrDragMethod && mbInsGluePoint; }
+
+ // For the app to manage the status. GetPreferredPointer() is
+ // possibly going to deliver a matching pointer for it.
+ void SetInsGluePointMode(bool bOn) { mbInsGluePointMode = bOn; }
+ bool IsInsGluePointMode() const { return mbInsGluePointMode; }
+
+ // border lines over the whole win persistent during the
+ // whole dragging. Default=FALSE.
+ void SetDragStripes(bool bOn);
+ bool IsDragStripes() const { return mbDragStripes; }
+
+ // As a general rule, the contours of the selected objects
+ // are displayed as Xor-polygons. If this flag is set, only one
+ // Xor-Frame is drawn (e.g. in case of multiple selection).
+ // In case of object-specific dragging (polygon points, corner radius,...),
+ // this setting has no influence.
+ // Also changeable during the dragging.
+ // Default=Off
+ void SetNoDragXorPolys(bool bOn);
+ bool IsNoDragXorPolys() const { return mbNoDragXorPolys; }
+
+ // If the number of selected objects exceeds the value set here,
+ // NoDragPolys is (temporarily) activated implicitly.
+ // PolyPolygons etc. are regarded as multiple objects respectively.
+ static size_t GetDragXorPolyLimit() { return eDragXorPolyLimit; }
+
+ // Like DragXorPolyLimit, but in respect to the total number of
+ // all polygons.
+ // NoDragPolys is (temporarily) activated, if one of the limits
+ // is exceeded.
+ static size_t GetDragXorPointLimit() { return eDragXorPointLimit; }
+
+ void SetSolidDragging(bool bOn);
+ bool IsSolidDragging() const;
+
+ // Connector handling is thus as follows (when using default settings):
+ // - If at most 10 Connectors are affected, they are recalculated
+ // on each MouseMove.
+ // - If 11 to 100 Connectors are affected, the connections
+ // are shown as straight lines while dragging.
+ // - In case of more than 100 affected Connectors, nothing that refers
+ // to the Connectors is drawn while dragging.
+
+ // If a special drag mode like Rotate, Mirror or Crook is enabled,
+ // then a Hit on the selected object triggers exactly this dragging.
+ // If MarkedHitMovesAlways is set to 'true', a Hit on the selected
+ // object always triggers a Move, independent of the DragMode that is
+ // set. This flag is persistent and should be configurable in the app
+ // by the user!
+ void SetMarkedHitMovesAlways(bool bOn) { mbMarkedHitMovesAlways = bOn; }
+ bool IsMarkedHitMovesAlways() const { return mbMarkedHitMovesAlways; }
+
+ bool IsOrthoDesired() const;
+
+ // center as reference on Resize
+ // Default=FALSE.
+ bool IsResizeAtCenter() const { return mbResizeAtCenter; }
+ void SetResizeAtCenter(bool bOn) { mbResizeAtCenter = bOn; }
+
+ // symmetric Crook
+ // Default=FALSE.
+ bool IsCrookAtCenter() const { return mbCrookAtCenter; }
+ void SetCrookAtCenter(bool bOn) { mbCrookAtCenter = bOn; }
+
+ // Limitation of the working area. The limitation refers to the View,
+ // not to the single PageViews. This limitation is only evaluated by
+ // the View on interactions like Dragging and Create.
+ // In case of actions controlled by the app through algorithms or
+ // UI-controlled actions (SetGeoAttr, MoveMarkedObj, ...), the
+ // app must honor this limit itself.
+ // Furthermore, this limit is to be seen as a rough limit. In certain
+ // cases (e.g. while rotating), objects cannot be dragged exactly
+ // up to this limit, objects can overlap a bit because of rounding
+ // errors,...
+ // Default=EmptyRect=no limitation
+ // only partially implemented
+ void SetWorkArea(const tools::Rectangle& rRect) { maMaxWorkArea=rRect; }
+ const tools::Rectangle& GetWorkArea() const { return maMaxWorkArea; }
+
+
+ // The DragLimit refers to the Page of the object.
+ // (TODO or to the View?? - must be researched...)
+ // 'false' = no limit
+ // The return Rect must contain absolute coordinates. The maximum
+ // drag area is then selected by the View in a way that the object's
+ // SnapRect is moved or resized at most up to the corner of the
+ // LimitRect. For objects like Bezier curves, rotated rectangles,
+ // it must be taken into account that because of subsequent
+ // recalculation of the SnapRect (on Resize), rounding errors can
+ // occur, because of which the LimitRect might be exceeded by a
+ // very small extent...
+ // Implemented for Move and Resize
+ virtual bool TakeDragLimit(SdrDragMode eMode, tools::Rectangle& rRect) const;
+};
+
+#endif // INCLUDED_SVX_SVDDRGV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
new file mode 100644
index 000000000..d2c9b3816
--- /dev/null
+++ b/include/svx/svdedtv.hxx
@@ -0,0 +1,418 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDEDTV_HXX
+#define INCLUDED_SVX_SVDEDTV_HXX
+
+#include <svx/svdmrkv.hxx>
+#include <svx/xpoly.hxx>
+#include <svx/svdmodel.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdundo.hxx>
+#include <o3tl/typed_flags_set.hxx>
+
+class SfxUndoAction;
+class SdrUndoAction;
+class SdrUndoGroup;
+class SfxStyleSheet;
+class SdrLayer;
+class SvdProgressInfo;
+
+enum class SdrHorAlign {
+ NONE,
+ Left,
+ Right,
+ Center
+};
+
+enum class SdrVertAlign {
+ NONE,
+ Top,
+ Bottom,
+ Center
+};
+
+enum class SdrMergeMode {
+ Merge,
+ Subtract,
+ Intersect
+};
+
+// Options for InsertObject()
+enum class SdrInsertFlags
+{
+ NONE = 0x0000,
+ DONTMARK = 0x0001, /* object will not be marked (the actual marking remains) */
+ ADDMARK = 0x0002, /* object will be added an existing selection */
+ SETDEFATTR = 0x0004, /* actual attributes (+StyleSheet) are assigned to the object */
+ SETDEFLAYER = 0x0008, /* actual layer is assigned to the object */
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrInsertFlags> : is_typed_flags<SdrInsertFlags, 0x0f> {};
+}
+
+class SVXCORE_DLLPUBLIC SdrEditView : public SdrMarkView
+{
+ friend class SdrPageView;
+ friend class SdrDragDistort;
+ friend class SdrDragCrook;
+
+protected:
+
+ // cache the transformation queries, etc. a little
+ bool m_bPossibilitiesDirty : 1;
+ bool m_bReadOnly : 1;
+ bool m_bGroupPossible : 1;
+ bool m_bUnGroupPossible : 1;
+ bool m_bGrpEnterPossible : 1;
+ bool m_bToTopPossible : 1;
+ bool m_bToBtmPossible : 1;
+ bool m_bReverseOrderPossible : 1;
+ bool m_bImportMtfPossible : 1;
+ bool m_bCombinePossible : 1;
+ bool m_bDismantlePossible : 1;
+ bool m_bCombineNoPolyPolyPossible : 1;
+ bool m_bDismantleMakeLinesPossible : 1;
+ bool m_bOrthoDesiredOnMarked : 1;
+ bool m_bOneOrMoreMovable : 1; // at least one object is moveable
+ bool m_bMoreThanOneNoMovRot : 1; // more than one object is not movable nor turnable (Crook)
+ bool m_bContortionPossible : 1; // all polygones (grouped if necessary)
+ bool m_bMoveAllowed : 1;
+ bool m_bResizeFreeAllowed : 1;
+ bool m_bResizePropAllowed : 1;
+ bool m_bRotateFreeAllowed : 1;
+ bool m_bRotate90Allowed : 1;
+ bool m_bMirrorFreeAllowed : 1;
+ bool m_bMirror45Allowed : 1;
+ bool m_bMirror90Allowed : 1;
+ bool m_bShearAllowed : 1;
+ bool m_bEdgeRadiusAllowed : 1;
+ bool m_bTransparenceAllowed : 1;
+ bool m_bCropAllowed : 1;
+ bool m_bGradientAllowed : 1;
+ bool m_bCanConvToPath : 1;
+ bool m_bCanConvToPoly : 1;
+ bool m_bCanConvToContour : 1;
+ bool m_bMoveProtect : 1;
+ bool m_bResizeProtect : 1;
+
+private:
+ SVX_DLLPRIVATE void ImpResetPossibilityFlags();
+
+protected:
+ void ImpBroadcastEdgesOfMarkedNodes();
+
+ // convert the objects marked in poly resp. bezier
+ void ImpConvertTo(bool bPath, bool bLineToArea);
+
+ // converts an object, when positive it removes the old one from its List
+ // and inserts the new one instead. including Undo.
+ // Nor MarkEntry nor ModelChgBroadcast is created.
+ SdrObject* ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLineToArea);
+
+ // set both flags: bToTopPossible and bToBtmPossible.
+ // bToTopPossibleDirty and bToBtmPossibleDirty are reset at the same time
+ void ImpCheckToTopBtmPossible();
+
+ // for CombineMarkedObjects and DismantleMarkedObjects
+ void ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) const;
+
+ // for CombineMarkedObjects
+ static bool ImpCanConvertForCombine1(const SdrObject* pObj);
+ static bool ImpCanConvertForCombine(const SdrObject* pObj);
+ static basegfx::B2DPolyPolygon ImpGetPolyPolygon1(const SdrObject* pObj);
+ static basegfx::B2DPolyPolygon ImpGetPolyPolygon(const SdrObject* pObj);
+ static basegfx::B2DPolygon ImpCombineToSinglePolygon(const basegfx::B2DPolyPolygon& rPolyPolygon);
+
+ // for DismantleMarkedObjects
+ static bool ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPpolygon, bool bMakeLines);
+ static bool ImpCanDismantle(const SdrObject* pObj, bool bMakeLines);
+ void ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, size_t& rPos, SdrPageView* pPV, bool bMakeLines);
+ static void ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad, SdrCrookMode eMode,
+ bool bVertical, bool bNoContortion, bool bRotate, const tools::Rectangle& rMarkRect);
+ static void ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion);
+ bool ImpDelLayerCheck(SdrObjList const * pOL, SdrLayerID nDelID) const;
+ void ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID);
+
+ // Removes all objects of the MarkList from their ObjLists including Undo.
+ // The entries in rMark remain.
+ // @return a list of objects that must be deleted after the outermost EndUndo
+ std::vector<SdrObject *> DeleteMarkedList(SdrMarkList const& rMark); // DeleteMarked -> DeleteMarkedList
+
+ // Check possibilities of all marked objects
+ virtual void CheckPossibilities();
+ void ForcePossibilities() const { if (m_bPossibilitiesDirty || mbSomeObjChgdFlag) const_cast<SdrEditView*>(this)->CheckPossibilities(); }
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrEditView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrEditView() override;
+
+public:
+ // each call of an undo-capable method from its view, generates an undo action.
+ // If one wishes to group method calls into one, these calls should be put
+ // between BegUndo() and EndUndo() calls (unlimited).
+ // The comment used for the UndoAction is the first BegUndo(String).
+ // In this case NotifyNewUndoAction is called at the last EndUndo().
+ // NotifyNewUndoAction() is not called for an empty group.
+ void BegUndo() { mpModel->BegUndo(); } // open undo-grouping
+ void BegUndo(const OUString& rComment) { mpModel->BegUndo(rComment); } // open undo-grouping
+ void BegUndo(const OUString& rComment, const OUString& rObjDescr, SdrRepeatFunc eFunc=SdrRepeatFunc::NONE) { mpModel->BegUndo(rComment,rObjDescr,eFunc); } // open undo-grouping
+ void EndUndo(); // close undo-grouping (incl. BroadcastEdges)
+ void AddUndo(std::unique_ptr<SdrUndoAction> pUndo) { mpModel->AddUndo(std::move(pUndo)); } // add action
+ // only after first BegUndo or before last EndUndo:
+ void SetUndoComment(const OUString& rComment, const OUString& rObjDescr) { mpModel->SetUndoComment(rComment,rObjDescr); }
+ bool IsUndoEnabled() const;
+
+ /**
+ * Checks if this or other views have an active text edit, if true, end them.
+ */
+ void EndTextEditAllViews() const;
+ void EndTextEditCurrentView(bool bDontDeleteReally = false);
+
+ std::vector< std::unique_ptr<SdrUndoAction> > CreateConnectorUndo( const SdrObject& rO );
+ void AddUndoActions( std::vector< std::unique_ptr<SdrUndoAction> > );
+
+ // Layermanagement with Undo.
+ void InsertNewLayer(const OUString& rName, sal_uInt16 nPos);
+ // Delete a layer including all objects contained
+ void DeleteLayer(const OUString& rName);
+
+ // Marked objects which are outside a page
+ // are assigned to another page; at the moment without undo!!!
+ void ForceMarkedObjToAnotherPage();
+ void ForceMarkedToAnotherPage() { ForceMarkedObjToAnotherPage(); }
+
+ // delete all marked objects
+ void DeleteMarkedObj();
+
+ // Set a logical enclosing rectangle for all marked objects.
+ // It is not guaranteed if this succeeds, as a horizontal
+ // line has always a height of 0
+ void SetMarkedObjRect(const tools::Rectangle& rRect);
+ void MoveMarkedObj(const Size& rSiz, bool bCopy=false);
+ void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
+ void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bWdh, const bool bHgt);
+ Degree100 GetMarkedObjRotate() const;
+ void RotateMarkedObj(const Point& rRef, Degree100 nAngle, bool bCopy=false);
+ void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false);
+ void MirrorMarkedObjHorizontal();
+ void MirrorMarkedObjVertical();
+ Degree100 GetMarkedObjShear() const;
+ void ShearMarkedObj(const Point& rRef, Degree100 nAngle, bool bVShear=false, bool bCopy=false);
+ void CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy=false);
+ void DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy=false);
+
+ // copy marked objects and mark them instead of the old ones
+ void CopyMarkedObj();
+ void SetAllMarkedRect(const tools::Rectangle& rRect) { SetMarkedObjRect(rRect); }
+ void MoveAllMarked(const Size& rSiz, bool bCopy=false) { MoveMarkedObj(rSiz,bCopy); }
+ void ResizeAllMarked(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { ResizeMarkedObj(rRef,xFact,yFact); }
+ void RotateAllMarked(const Point& rRef, Degree100 nAngle) { RotateMarkedObj(rRef,nAngle); }
+ void MirrorAllMarkedHorizontal() { MirrorMarkedObjHorizontal(); }
+ void MirrorAllMarkedVertical() { MirrorMarkedObjVertical(); }
+ void CopyMarked() { CopyMarkedObj(); }
+ bool IsMoveAllowed() const { ForcePossibilities(); return m_bMoveAllowed && !m_bMoveProtect; }
+ bool IsResizeAllowed(bool bProp=false) const;
+ bool IsRotateAllowed(bool b90Deg=false) const;
+ bool IsMirrorAllowed(bool b45Deg=false, bool b90Deg=false) const;
+ bool IsTransparenceAllowed() const;
+ bool IsGradientAllowed() const;
+ bool IsShearAllowed() const;
+ bool IsEdgeRadiusAllowed() const;
+ bool IsCrookAllowed(bool bNoContortion=false) const;
+ bool IsCropAllowed() const;
+ bool IsDistortAllowed(bool bNoContortion=false) const;
+
+ // Consolidate the text from multiple, selected TextObjects,
+ // attempting to identify paragraph fragments and join them together
+ void CombineMarkedTextObjects();
+
+ // Unite several objects to a polygon:
+ // - rectangles/circles/text... are implicitly converted.
+ // - polygones are closed automatically
+ // - attributes and layer are taken from the first object marked
+ // (thus from lowest Z-order).
+ // - group objects are included when all (!) member objects of
+ // the group can be changed. If a group includes for example
+ // a bitmap or an OLE-object, the complete group is not considered.
+ // bNoPolyPoly=TRUE: all is grouped to one single polygon
+ void CombineMarkedObjects(bool bNoPolyPoly = true);
+
+ // for combining multiple polygons, with direct support of the modes
+ // SID_POLY_MERGE, SID_POLY_SUBSTRACT, SID_POLY_INTERSECT
+ void MergeMarkedObjects(SdrMergeMode eMode);
+
+ // for distribution dialog function
+ void DistributeMarkedObjects(sal_uInt16 SlotID);
+
+ // for setting either the width or height of all selected
+ // objects to the width/height of the last selected object
+ // of the selection
+ void EqualizeMarkedObjects(bool bWidth);
+
+ // Decompose marked polypolygon objects into polygons.
+ // Grouped objects are searched and decomposed, if all member objects are PathObjs.
+ // bMakeLines=TRUE: all polygones are decomposed into single lines resp. bezier segments
+ void DismantleMarkedObjects(bool bMakeLines=false);
+ bool IsCombinePossible(bool bNoPolyPoly=false) const;
+ bool IsDismantlePossible(bool bMakeLines=false) const;
+
+ // Inserts a new, completely constructed object. Subsequently the object belongs to
+ // the model. After insertion the object is marked (if not prevented by nOptions).
+ // Sometimes the object is not inserted, but deleted, this is the case when
+ // the target layer is locked or not visible. In this case
+ // the method returns FALSE.
+ // Amongst others the method does not create an undo-action.
+ bool InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE);
+
+ // Replace one drawing object by another.
+ // *pNewObj belongs to me, *pOldObj is changed into Undo.
+ // In any case an undo grouping is required and should be applied, e.g.:
+ // aStr+=" replace";
+ // BegUndo(aStr);
+ // ReplaceObject(...);
+
+ // EndUndo();
+ void ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrObject* pNewObj, bool bMark=true);
+
+ void SetNotPersistAttrToMarked(const SfxItemSet& rAttr);
+ void MergeNotPersistAttrFromMarked(SfxItemSet& rAttr) const;
+ void MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) const;
+ SfxItemSet GetAttrFromMarked(bool bOnlyHardAttr) const;
+ void SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll);
+
+ // geometrical attribute (position, size, rotation angle)
+ // A PageOrigin set at a position is taken into account.
+ SfxItemSet GetGeoAttrFromMarked() const;
+ // In LOK, interactive shape movement uses this function
+ // in that case, margin is not taken into account
+ // and the final position of the shape becomes incorrect
+ // However, "Position and Size" dialog and other cases already add the margins.
+ void SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin = false);
+
+ // Returns NULL if:
+ // - nothing is marked,
+ // - no stylesheet is set at the marked object
+ // - point the marked objects to different StyleSheets for multiple selections
+ SfxStyleSheet* GetStyleSheetFromMarked() const;
+
+ // at the moment without undo :(
+ void SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+
+ /* new interface src537 */
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+
+ void SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+
+ // Group all marked objects to a single group.
+ // Subsequently mark the new group . If the group spawns multiple
+ // pages a group is created per page.
+ // All groups created are subsequently marked.
+ // The method creates SdrObjGroup-instances.
+ void GroupMarked();
+
+ // All marked object groups are dissolved (1 level).
+ // Now all previously marked member objects are marked.
+ // Previously marked objects, which are not group objects, remain marked.
+ void UnGroupMarked();
+
+ bool IsGroupPossible() const { ForcePossibilities(); return m_bGroupPossible; }
+ bool IsUnGroupPossible() const { ForcePossibilities(); return m_bUnGroupPossible; }
+ bool IsGroupEnterPossible() const { ForcePossibilities(); return m_bGrpEnterPossible; }
+
+ // Convert marked objects to polygones/Beziercurves. The bool-functions
+ // return sal_True, if at least one marked object could be converted.
+ // Also member objects of group objects are converted.
+ // For a better description see: SdrObj.HXX
+ bool IsConvertToPathObjPossible() const { ForcePossibilities(); return m_bCanConvToPath; }
+ bool IsConvertToPolyObjPossible() const { ForcePossibilities(); return m_bCanConvToPoly; }
+ bool IsConvertToContourPossible() const { ForcePossibilities(); return m_bCanConvToContour; }
+ void ConvertMarkedToPathObj(bool bLineToArea);
+ void ConvertMarkedToPolyObj();
+
+ // Align all marked objects vertically. Normally the SnapRect of an object is used.
+ void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert);
+ bool IsAlignPossible() const;
+
+ // move marked objects "up"
+ void MovMarkedToTop();
+
+ // move marked objects "down"
+ void MovMarkedToBtm();
+
+ // move marked objects "at top"
+ void PutMarkedToTop();
+
+ // move marked objects "at bottom"
+ void PutMarkedToBtm();
+
+ // move marked immediately before the object passed
+ // NULL -> as PutMarkedToTop();
+ void PutMarkedInFrontOfObj(const SdrObject* pRefObj);
+
+ // move marked immediately after object passed
+ // NULL -> as PutMarkedToBtm();
+ void PutMarkedBehindObj(const SdrObject* pRefObj);
+
+ // swap Z-Order of marked objects
+ void ReverseOrderOfMarked();
+
+ // Check if forward, backward is possible.
+ // GetMaxToBtmObj() is only partly taken into account by these methods.
+ // Which means it can happen that IsToTopPossible() returns sal_True,
+ // but MovMarkedToTop() changes nothing (e.g. for multiple selections),
+ // as restriction derived via a view by GetMaxToTopObj() prevents this.
+ bool IsToTopPossible() const { ForcePossibilities(); return m_bToTopPossible; }
+ bool IsToBtmPossible() const { ForcePossibilities(); return m_bToBtmPossible; }
+ bool IsReverseOrderPossible() const { ForcePossibilities(); return m_bReverseOrderPossible; }
+
+ // Using this method the view determines how far an object
+ // can be moved forward or backward (Z-order).
+ // The object returned is not "obsolete". When NULL is
+ // returned there is not such a restriction.
+ virtual SdrObject* GetMaxToTopObj(SdrObject* pObj) const;
+ virtual SdrObject* GetMaxToBtmObj(SdrObject* pObj) const;
+
+ // Next method is called, if via ToTop, ToBtm, ... the
+ // sequence of object has been changed. It is called after
+ // each SdrObjList::SetObjectOrdNum(nOldPos,nNewPos);
+ virtual void ObjOrderChanged(SdrObject* pObj, size_t nOldPos, size_t nNewPos);
+
+ // If one or more objects of the type SdrGrafObj or SdrOle2Obj
+ // are marked and these are capable to deliver a StarView-metafile,
+ // this methods converts the metafile to a drawing object.
+ // The SdrGrafObjs/SdrOle2Objs are replaced by the new objects.
+ void DoImportMarkedMtf(SvdProgressInfo *pProgrInfo=nullptr);
+ bool IsImportMtfPossible() const { ForcePossibilities(); return m_bImportMtfPossible; }
+
+ // override SdrMarkView, for internal use
+ virtual void MarkListHasChanged() override;
+ virtual void ModelHasChanged() override;
+};
+
+#endif // INCLUDED_SVX_SVDEDTV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
new file mode 100644
index 000000000..cbdecfea5
--- /dev/null
+++ b/include/svx/svdedxv.hxx
@@ -0,0 +1,325 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDEDXV_HXX
+#define INCLUDED_SVX_SVDEDXV_HXX
+
+#include <rtl/ref.hxx>
+#include <svl/languageoptions.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdglev.hxx>
+#include <svx/selectioncontroller.hxx>
+#include <editeng/editview.hxx>
+#include <memory>
+
+class SdrOutliner;
+class OutlinerView;
+class EditStatus;
+class EditFieldInfo;
+class ImpSdrEditPara;
+struct PasteOrDropInfos;
+class SdrUndoManager;
+class TextChainCursorManager;
+
+namespace com::sun::star::uno {
+ class Any;
+}
+
+namespace sdr {
+ class SelectionController;
+}
+
+enum class SdrEndTextEditKind
+{
+ Unchanged, // textobject unchanged
+ Changed, // textobject changed
+ Deleted, // textobject implicitly deleted
+ ShouldBeDeleted // for writer: textobject should be deleted
+};
+
+// - general edit for objectspecific properties
+// - textedit for all drawobjects, inherited from SdrTextObj
+// - macromode
+
+
+class SVXCORE_DLLPUBLIC SdrObjEditView : public SdrGlueEditView, public EditViewCallbacks
+{
+ friend class SdrPageView;
+ friend class ImpSdrEditPara;
+
+ // Now derived from EditViewCallbacks and overriding these callbacks to
+ // allow own EditText visualization
+ virtual void EditViewInvalidate(const tools::Rectangle& rRect) override;
+ virtual void EditViewSelectionChange() override;
+ virtual OutputDevice& EditViewOutputDevice() const override;
+ virtual Point EditViewPointerPosPixel() const override;
+ virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard> GetClipboard() const override;
+ virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> GetDropTarget() override;
+ virtual void EditViewInputContext(const InputContext& rInputContext) override;
+ virtual void EditViewCursorRect(const tools::Rectangle& rRect, int nExtTextInputWidth) override;
+
+ // The OverlayObjects used for visualizing active TextEdit (currently
+ // using TextEditOverlayObject, but not limited to it
+ sdr::overlay::OverlayObjectList maTEOverlayGroup;
+
+protected:
+ // TextEdit
+ tools::WeakReference<SdrTextObj> mxWeakTextEditObj; // current object in TextEdit
+ SdrPageView* mpTextEditPV;
+ std::unique_ptr<SdrOutliner> mpTextEditOutliner; // outliner for the TextEdit
+ OutlinerView* mpTextEditOutlinerView; // current view of the outliners
+ VclPtr<vcl::Window> mpTextEditWin; // matching window to pTextEditOutlinerView
+
+ vcl::Cursor* pTextEditCursorBuffer; // to restore the cursor in each window
+ SdrObject* pMacroObj;
+ SdrPageView* pMacroPV;
+ VclPtr<vcl::Window> pMacroWin;
+
+ tools::Rectangle aTextEditArea;
+ tools::Rectangle aMinTextEditArea;
+ Link<EditFieldInfo*,void> aOldCalcFieldValueLink; // for call the old handler
+ Point aMacroDownPos;
+
+ sal_uInt16 nMacroTol;
+
+ bool mbTextEditDontDelete : 1; // do not delete outliner and view of SdrEndTextEdit (f. spellchecking)
+ bool mbTextEditOnlyOneView : 1; // a single OutlinerView (f. spellchecking)
+ bool mbTextEditNewObj : 1; // current edited object was just recreated
+ bool mbQuickTextEditMode : 1; // persistent(->CrtV). Default=TRUE
+ bool mbMacroDown : 1;
+
+ rtl::Reference< sdr::SelectionController > mxSelectionController;
+ rtl::Reference< sdr::SelectionController > mxLastSelectionController;
+
+private:
+ SfxUndoManager* mpOldTextEditUndoManager;
+ std::unique_ptr<SdrUndoManager> mpLocalTextEditUndoManager;
+
+protected:
+ // Create a local UndoManager that is used for text editing.
+ virtual std::unique_ptr<SdrUndoManager> createLocalTextUndoManager();
+
+ void ImpMoveCursorAfterChainingEvent(TextChainCursorManager *pCursorManager);
+ std::unique_ptr<TextChainCursorManager> ImpHandleMotionThroughBoxesKeyInput(const KeyEvent& rKEvt, bool *bOutHandled);
+
+ OutlinerView* ImpFindOutlinerView(vcl::Window const * pWin) const;
+
+ // Create a new OutlinerView at the heap and initialize all required parameters.
+ // pTextEditObj, pTextEditPV and pTextEditOutliner have to be initialized
+ OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, OutlinerView* pGivenView, SfxViewShell* pViewShell = nullptr) const;
+ void ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::Rectangle& rRect, OutputDevice& rTargetDevice) const;
+ void ImpInvalidateOutlinerView(OutlinerView const & rOutlView) const;
+
+ // Chaining
+ void ImpChainingEventHdl();
+ DECL_DLLPRIVATE_LINK(ImpAfterCutOrPasteChainingEventHdl, LinkParamNone*, void);
+
+
+ // Check if the whole text is selected.
+ // Still returns sal_True if there is no text present.
+ bool ImpIsTextEditAllSelected() const;
+ void ImpMakeTextCursorAreaVisible();
+
+ // handler for AutoGrowing text with active Outliner
+ DECL_DLLPRIVATE_LINK(ImpOutlinerStatusEventHdl, EditStatus&, void);
+ DECL_DLLPRIVATE_LINK(ImpOutlinerCalcFieldValueHdl, EditFieldInfo*, void);
+
+ // link for EndTextEditHdl
+ DECL_DLLPRIVATE_LINK(EndTextEditHdl, SdrUndoManager*, void);
+
+ void ImpMacroUp(const Point& rUpPos);
+ void ImpMacroDown(const Point& rDownPos);
+
+ DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos*, void );
+ DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos*, void );
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrObjEditView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrObjEditView() override;
+
+public:
+
+ // used to call the old ImpPaintOutlinerView. Will be replaced when the
+ // outliner will be displayed on the overlay in edit mode.
+ void TextEditDrawing(SdrPaintWindow& rPaintWindow);
+
+ // Actionhandling for macromode
+ virtual bool IsAction() const override;
+ virtual void MovAction(const Point& rPnt) override;
+ virtual void EndAction() override;
+ virtual void BrkAction() override;
+ virtual void BckAction() override;
+ virtual void TakeActionRect(tools::Rectangle& rRect) const override;
+
+ SdrPageView* ShowSdrPage(SdrPage* pPage) override;
+ void HideSdrPage() override;
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+ virtual void ModelHasChanged() override;
+
+ const std::unique_ptr<SdrUndoManager>& getViewLocalUndoManager() const
+ {
+ return mpLocalTextEditUndoManager;
+ }
+
+ // TextEdit over an outliner
+
+ // QuickTextEditMode = edit the text straight after selection. Default=TRUE. Persistent.
+ void SetQuickTextEditMode(bool bOn)
+ {
+ mbQuickTextEditMode = bOn;
+ }
+ bool IsQuickTextEditMode() const
+ {
+ return mbQuickTextEditMode;
+ }
+
+ // Start the TextEditMode. If pWin==NULL, use the first window, which is logged at the View.
+ // The cursor of the currently edited window is stored with SdrBeginTextEdit()
+ // and restored with SdrEndTextEdit().
+ // The app has to ensure, that the BegEdit of the window logged cursor is still valid,
+ // when SdrEndTextEdit is called.
+ // With the parameter pEditOutliner, the app has the possibility to specify his own outliner,
+ // which is used for editing. After the SdrBeginTextEdit call, the outliner belongs to
+ // SdrObjEditView, and is also later destroyed by this via delete (if bDontDeleteOutliner=sal_False).
+ // Afterwards the SdrObjEditView sets the modflag (EditEngine/Outliner) at this instance and also the
+ // StatusEventHdl.
+ // Similarly a specific OutlinerView can be specified.
+
+ virtual bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = nullptr, vcl::Window* pWin = nullptr, bool bIsNewObj = false,
+ SdrOutliner* pGivenOutliner = nullptr, OutlinerView* pGivenOutlinerView = nullptr,
+ bool bDontDeleteOutliner = false, bool bOnlyOneView = false, bool bGrabFocus = true);
+ // bDontDeleteReally is a special parameter for writer
+ // If this flag is set, then a maybe empty textobject is not deleted.
+ // Instead you get a return code SdrEndTextEditKind::ShouldBeDeleted
+ // (in place of SDRENDTEXTEDIT_BEDELETED), which says, the obj should be
+ // deleted.
+ virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally = false);
+ virtual bool IsTextEdit() const final override;
+
+ // This method returns sal_True, if the point rHit is inside the
+ // objectspace or the OutlinerView.
+ bool IsTextEditHit(const Point& rHit) const;
+
+ // This method returns sal_True, if the point rHit is inside the
+ // handle-thick frame, which surrounds the OutlinerView at TextFrames.
+ bool IsTextEditFrameHit(const Point& rHit) const;
+
+ // At active selection, between MouseButtonDown and
+ // MouseButtonUp, this method always returns TRUE.
+ bool IsTextEditInSelectionMode() const;
+
+ // If sb needs the object out of the TextEdit:
+ SdrTextObj* GetTextEditObject() const { return mxWeakTextEditObj.get(); }
+
+ // info about TextEditPageView. Default is 0L.
+ SdrPageView* GetTextEditPageView() const;
+
+ // Current window of the outliners.
+ void SetTextEditWin(vcl::Window* pWin);
+
+ // Now at this outliner, events can be send, attributes can be set,
+ // call Cut/Copy/Paste, call Undo/Redo, and so on...
+ const SdrOutliner* GetTextEditOutliner() const
+ {
+ return mpTextEditOutliner.get();
+ }
+ SdrOutliner* GetTextEditOutliner()
+ {
+ return mpTextEditOutliner.get();
+ }
+ const OutlinerView* GetTextEditOutlinerView() const
+ {
+ return mpTextEditOutlinerView;
+ }
+ OutlinerView* GetTextEditOutlinerView()
+ {
+ return mpTextEditOutlinerView;
+ }
+
+ virtual bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ virtual bool MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ virtual bool Command(const CommandEvent& rCEvt, vcl::Window* pWin) override;
+
+ // #97766# make virtual to change implementation e.g. for SdOutlineView
+ virtual SvtScriptType GetScriptType() const;
+
+ /* new interface src537 */
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+
+ bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+
+ // Intern: at mounting new OutlinerView...
+ virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) override;
+ virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin) override;
+
+ sal_uInt16 GetSelectionLevel() const;
+
+
+ // Object MacroMode (e.g. rect as button or sth. like that):
+
+ void BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin);
+ void BegMacroObj(const Point& rPnt, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin) { BegMacroObj(rPnt,-2,pObj,pPV,pWin); }
+ void MovMacroObj(const Point& rPnt);
+ void BrkMacroObj();
+ bool EndMacroObj();
+ bool IsMacroObj() const { return pMacroObj!=nullptr; }
+
+ /** fills the given any with a XTextCursor for the current text selection.
+ Leaves the any untouched if there currently is no text selected */
+ void getTextSelection( css::uno::Any& rSelection );
+
+ virtual void MarkListHasChanged() override;
+
+ const rtl::Reference< sdr::SelectionController >& getSelectionController() const { return mxSelectionController; }
+
+ /** returns true if the shape identified by its inventor and identifier supports format paint brush operation */
+ static bool SupportsFormatPaintbrush( SdrInventor nObjectInventor, SdrObjKind nObjectIdentifier );
+
+ /** returns a format paint brush set from the current selection */
+ void TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet );
+
+ /** applies a format paint brush set from the current selection.
+ if bNoCharacterFormats is true, no character attributes are changed.
+ if bNoParagraphFormats is true, no paragraph attributes are changed.
+ */
+ void ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
+
+ /** helper function for selections with multiple SdrText for one SdrTextObj (f.e. tables ) */
+ static void ApplyFormatPaintBrushToText( SfxItemSet const & rFormatSet, SdrTextObj& rTextObj, SdrText* pText, bool bNoCharacterFormats, bool bNoParagraphFormats );
+
+ void DisposeUndoManager();
+
+protected:
+ virtual void OnBeginPasteOrDrop( PasteOrDropInfos* pInfo );
+ virtual void OnEndPasteOrDrop( PasteOrDropInfos* pInfo );
+
+};
+
+#endif // INCLUDED_SVX_SVDEDXV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
new file mode 100644
index 000000000..8bd6b744e
--- /dev/null
+++ b/include/svx/svdetc.hxx
@@ -0,0 +1,211 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDETC_HXX
+#define INCLUDED_SVX_SVDETC_HXX
+
+#include <editeng/outliner.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/link.hxx>
+#include <tools/fract.hxx>
+#include <svx/svdobj.hxx>
+#include <svl/whichranges.hxx>
+#include <memory>
+
+
+/**
+ * Get ExchangeFormatID of the DrawingEngine.
+ * The data can then be made available via
+ * static bool CopyData(pData,nLen,nFormat);
+ *
+ * However, pData/nLen describe an SvMemoryStream in which an SdrModel is
+ * streamed. For its lifetime, the flag SdrModel::SetStreamingSdrModel(true)
+ * is set.
+ */
+
+class SdrOutliner;
+class SdrModel;
+class SvtSysLocale;
+class LocaleDataWrapper;
+
+namespace com::sun::star::lang {
+ struct Locale;
+}
+
+/**
+ * Create an Outliner with the engine-global default settings on the heap.
+ * If pMod != nullptr, the MapMode of the passed model is used.
+ * The resulting default font height, however, stays the same (the logical
+ * font height is converted).
+ */
+SVXCORE_DLLPUBLIC std::unique_ptr<SdrOutliner> SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rMod);
+
+/**
+ * Global default settings for the DrawingEngine.
+ *
+ * One should set these default settings as the first
+ * thing at program start, before any other method is called.
+ */
+namespace SdrEngineDefaults
+{
+ // Default FontColor is COL_AUTO
+ inline Color GetFontColor() { return COL_AUTO; }
+
+ // Default FontHeight is 847. The font height uses logical units (MapUnit/MapFraction
+ // see below for further details). The default setting 847/100mm corresponds to about
+ // 24 Point. If e.g. one would use Twips (SetMapUnit(MapUnit::MapTwip)) (20 Twip = 1 Point)
+ // instead, one would need to set the font height to 480, in order to get a 24 Point height.
+ inline size_t GetFontHeight() { return 847; }
+
+ // The MapMode is needed for the global Outliner.
+ // Incidentally, every newly instantiated SdrModel is assigned this MapMode by default.
+ // Default MapUnit is MapUnit::Map100thMM
+ inline MapUnit GetMapUnit() { return MapUnit::Map100thMM; }
+
+ // Default MapFraction is 1/1.
+ inline Fraction GetMapFraction() { return Fraction(1, 1); }
+};
+
+class SfxItemSet;
+
+/**
+ * Returns a replacement for an XFillStyle
+ *
+ * @returns false for XFILL_NONE and rCol remains unchanged
+ */
+SVXCORE_DLLPUBLIC bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol);
+
+
+/**
+ * Search an ItemSet for Outliner/EditEngine Items
+ *
+ * @returns true, if the set contains such items
+ */
+bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* pbOnlyEE=nullptr);
+
+/**
+ * @returns a new WhichTable, which we need to squash at some point with a delete
+ */
+WhichRangesContainer RemoveWhichRange(const WhichRangesContainer& pOldWhichTable, sal_uInt16 nRangeBeg, sal_uInt16 nRangeEnd);
+
+/**
+ * Helper class for the communication between the dialog
+ * In order to break open Metafiles (sd/source/ui/dlg/brkdlg.cxx),
+ * SdrEditView::DoImportMarkedMtf() and ImpSdrGDIMetaFileImport::DoImport()
+ */
+class SVXCORE_DLLPUBLIC SvdProgressInfo
+{
+private:
+ size_t m_nSumCurAction; // Sum of all handled Actions
+
+ size_t m_nActionCount; // Count of Actions in the current object
+ size_t m_nCurAction; // Count of handled Actions in the current object
+
+ size_t m_nInsertCount; // Count of to-be-inserted Actions in the current object
+ size_t m_nCurInsert; // Count of already inserted Actions
+
+ size_t m_nObjCount; // Count of selected objects
+ size_t m_nCurObj; // Current object
+
+ Link<void*,bool> maLink;
+
+public:
+ SvdProgressInfo( const Link<void*,bool>& _pLink );
+
+ void Init( size_t _nObjCount );
+
+ void SetNextObject();
+
+ void SetActionCount( size_t _nActionCount );
+ void SetInsertCount( size_t _nInsertCount );
+
+ bool ReportActions( size_t nActionCount );
+ void ReportInserts( size_t nInsertCount );
+
+ size_t GetSumCurAction() const { return m_nSumCurAction; };
+ size_t GetObjCount() const { return m_nObjCount; };
+ size_t GetCurObj() const { return m_nCurObj; };
+
+ size_t GetActionCount() const { return m_nActionCount; };
+ size_t GetCurAction() const { return m_nCurAction; };
+
+ size_t GetInsertCount() const { return m_nInsertCount; };
+ size_t GetCurInsert() const { return m_nCurInsert; };
+
+ void ReportRescales( size_t nRescaleCount );
+};
+
+
+std::vector<Link<SdrObjCreatorParams, SdrObject*>>& ImpGetUserMakeObjHdl();
+
+class SdrOle2Obj;
+class AutoTimer;
+
+class OLEObjCache
+{
+ std::vector<SdrOle2Obj*> maObjs;
+
+ size_t nSize;
+ std::unique_ptr<AutoTimer> pTimer;
+
+ static bool UnloadObj(SdrOle2Obj& rObj);
+ DECL_LINK( UnloadCheckHdl, Timer*, void );
+
+public:
+ OLEObjCache();
+ SVXCORE_DLLPUBLIC ~OLEObjCache();
+
+ void InsertObj(SdrOle2Obj* pObj);
+ void RemoveObj(SdrOle2Obj* pObj);
+
+ SVXCORE_DLLPUBLIC size_t size() const;
+ SVXCORE_DLLPUBLIC SdrOle2Obj* operator[](size_t nPos);
+ SVXCORE_DLLPUBLIC const SdrOle2Obj* operator[](size_t nPos) const;
+};
+
+
+class SVXCORE_DLLPUBLIC SdrGlobalData
+{
+ const SvtSysLocale* pSysLocale; // follows always locale settings
+public:
+ std::vector<Link<SdrObjCreatorParams, SdrObject*>>
+ aUserMakeObjHdl;
+ OLEObjCache aOLEObjCache;
+
+
+ const SvtSysLocale* GetSysLocale(); // follows always locale settings
+ const LocaleDataWrapper* GetLocaleData(); // follows always SysLocale
+public:
+ SdrGlobalData();
+
+ OLEObjCache& GetOLEObjCache() { return aOLEObjCache; }
+};
+
+SVXCORE_DLLPUBLIC SdrGlobalData & GetSdrGlobalData();
+
+
+// #i101872# isolated GetTextEditBackgroundColor for tooling
+class SdrObjEditView;
+
+SVXCORE_DLLPUBLIC Color GetTextEditBackgroundColor(const SdrObjEditView& rView);
+
+
+#endif // INCLUDED_SVX_SVDETC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdglev.hxx b/include/svx/svdglev.hxx
new file mode 100644
index 000000000..5a7d3a2eb
--- /dev/null
+++ b/include/svx/svdglev.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDGLEV_HXX
+#define INCLUDED_SVX_SVDGLEV_HXX
+
+#include <svx/svxdllapi.h>
+#include <svx/svdpoev.hxx>
+
+class SdrGluePoint;
+
+
+// Edit GluePoints at the objects (GluePoints for connector)
+
+
+class SVXCORE_DLLPUBLIC SdrGlueEditView : public SdrPolyEditView
+{
+ // copy marked GluePoints and mark instead of the old ones
+ void ImpCopyMarkedGluePoints();
+ typedef void (*PGlueDoFunc)(SdrGluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*);
+ typedef void (*PGlueTrFunc)(Point&, const void*, const void*, const void*, const void*);
+ void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr);
+ void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr);
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrGlueEditView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrGlueEditView() override;
+
+public:
+ // the parameter nThisEsc is used to hand over the direction,
+ // which one wished to check,set or delete
+ // possible values for nThisEsc are:
+ // SdrEscapeDirection::LEFT, SdrEscapeDirection::RIGHT, SdrEscapeDirection::TOP and SdrEscapeDirection::BOTTOM
+ TriState IsMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc) const;
+ void SetMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc, bool bOn);
+
+ // check/set, if the GluePoints are relative to the
+ // object size (Percent=sal_True) or not (Percent=sal_False)
+ TriState IsMarkedGluePointsPercent() const;
+ void SetMarkedGluePointsPercent(bool bOn);
+
+ // bVert=FALSE: check/set horizontal alignment
+ // SdrAlign::HORZ_CENTER
+ // SdrAlign::HORZ_LEFT
+ // SdrAlign::HORZ_RIGHT
+ // SdrAlign::HORZ_DONTCARE (only at Get())
+ // bVert=TRUE: check/set vertical alignment
+ // SdrAlign::VERT_CENTER
+ // SdrAlign::VERT_TOP
+ // SdrAlign::VERT_BOTTOM
+ // SdrAlign::VERT_DONTCARE (only at Get())
+ SdrAlign GetMarkedGluePointsAlign(bool bVert) const;
+ void SetMarkedGluePointsAlign(bool bVert, SdrAlign nAlign);
+
+ // delete all marked GluePoints
+ void DeleteMarkedGluePoints();
+
+ void MoveMarkedGluePoints (const Size& rSiz, bool bCopy);
+ void ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy);
+ void RotateMarkedGluePoints(const Point& rRef, Degree100 nAngle, bool bCopy);
+};
+
+#endif // INCLUDED_SVX_SVDGLEV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx
new file mode 100644
index 000000000..3c70ebeac
--- /dev/null
+++ b/include/svx/svdglue.hxx
@@ -0,0 +1,228 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDGLUE_HXX
+#define INCLUDED_SVX_SVDGLUE_HXX
+
+#include <tools/gen.hxx>
+#include <tools/degree.hxx>
+#include <svx/svxdllapi.h>
+#include <vector>
+#include <o3tl/typed_flags_set.hxx>
+
+namespace vcl { class Window; }
+class OutputDevice;
+class SdrObject;
+
+
+enum class SdrEscapeDirection
+{
+ SMART = 0x0000,
+ LEFT = 0x0001,
+ RIGHT = 0x0002,
+ TOP = 0x0004,
+ BOTTOM = 0x0008,
+ HORZ = LEFT | RIGHT,
+ VERT = TOP | BOTTOM,
+ ALL = 0x00ff,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrEscapeDirection> : is_typed_flags<SdrEscapeDirection, 0x00ff> {};
+}
+
+enum class SdrAlign
+{
+ NONE = 0x0000,
+ HORZ_CENTER = 0x0000,
+ HORZ_LEFT = 0x0001,
+ HORZ_RIGHT = 0x0002,
+ HORZ_DONTCARE = 0x0010,
+ VERT_CENTER = 0x0000,
+ VERT_TOP = 0x0100,
+ VERT_BOTTOM = 0x0200,
+ VERT_DONTCARE = 0x1000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrAlign> : is_typed_flags<SdrAlign, 0x1313> {};
+}
+
+class SVXCORE_DLLPUBLIC SdrGluePoint {
+ // Reference Point is SdrObject::GetSnapRect().Center()
+ // bNoPercent=false: position is -5000..5000 (1/100)% or 0..10000 (depending on align)
+ // bNoPercent=true : position is in log unit, relative to the reference point
+ Point aPos;
+ SdrEscapeDirection nEscDir;
+ sal_uInt16 nId;
+ SdrAlign nAlign;
+ bool bNoPercent:1;
+ bool bReallyAbsolute:1; // temp for transformations on the reference object
+ bool bUserDefined:1; // #i38892#
+public:
+ SdrGluePoint()
+ : nEscDir(SdrEscapeDirection::SMART)
+ , nId(0)
+ , nAlign(SdrAlign::NONE)
+ , bNoPercent(false)
+ , bReallyAbsolute(false)
+ , bUserDefined(true)
+ {}
+ SdrGluePoint(const Point& rNewPos)
+ : aPos(rNewPos)
+ , nEscDir(SdrEscapeDirection::SMART)
+ , nId(0)
+ , nAlign(SdrAlign::NONE)
+ , bNoPercent(false)
+ , bReallyAbsolute(false)
+ , bUserDefined(true)
+ {}
+ const Point& GetPos() const
+ {
+ return aPos;
+ }
+ void SetPos(const Point& rNewPos)
+ {
+ aPos = rNewPos;
+ }
+ SdrEscapeDirection GetEscDir() const
+ {
+ return nEscDir;
+ }
+ void SetEscDir(SdrEscapeDirection nNewEsc)
+ {
+ nEscDir = nNewEsc;
+ }
+ sal_uInt16 GetId() const
+ {
+ return nId;
+ }
+ void SetId(sal_uInt16 nNewId)
+ {
+ nId = nNewId;
+ }
+ bool IsPercent() const
+ {
+ return !bNoPercent;
+ }
+ void SetPercent(bool bOn)
+ {
+ bNoPercent = !bOn;
+ }
+ // temp for transformations on the reference object
+ void SetReallyAbsolute(bool bOn, const SdrObject& rObj);
+
+ // #i38892#
+ bool IsUserDefined() const
+ {
+ return bUserDefined;
+ }
+ void SetUserDefined(bool bNew)
+ {
+ bUserDefined = bNew;
+ }
+
+ SdrAlign GetAlign() const
+ {
+ return nAlign;
+ }
+ void SetAlign(SdrAlign nAlg)
+ {
+ nAlign = nAlg;
+ }
+ SdrAlign GetHorzAlign() const
+ {
+ return nAlign & static_cast<SdrAlign>(0x00FF);
+ }
+ void SetHorzAlign(SdrAlign nAlg)
+ {
+ assert((nAlg & static_cast<SdrAlign>(0xFF00)) == SdrAlign::NONE);
+ nAlign = SdrAlign(nAlign & static_cast<SdrAlign>(0xFF00)) | (nAlg & static_cast<SdrAlign>(0x00FF));
+ }
+ SdrAlign GetVertAlign() const
+ {
+ return nAlign & static_cast<SdrAlign>(0xFF00);
+ }
+ void SetVertAlign(SdrAlign nAlg)
+ {
+ assert((nAlg & static_cast<SdrAlign>(0x00FF)) == SdrAlign::NONE);
+ nAlign = SdrAlign(nAlign & static_cast<SdrAlign>(0x00FF)) | (nAlg & static_cast<SdrAlign>(0xFF00));
+ }
+
+ bool IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const;
+ void Invalidate(vcl::Window& rWin, const SdrObject* pObj) const;
+ Point GetAbsolutePos(const SdrObject& rObj) const;
+ void SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj);
+ Degree100 GetAlignAngle() const;
+ void SetAlignAngle(Degree100 nAngle);
+ static Degree100 EscDirToAngle(SdrEscapeDirection nEsc);
+ static SdrEscapeDirection EscAngleToDir(Degree100 nAngle);
+ void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs, const SdrObject* pObj);
+ void Mirror(const Point& rRef1, const Point& rRef2, Degree100 nAngle, const SdrObject* pObj);
+ void Shear (const Point& rRef, double tn, bool bVShear, const SdrObject* pObj);
+};
+
+#define SDRGLUEPOINT_NOTFOUND 0xFFFF
+
+class SVXCORE_DLLPUBLIC SdrGluePointList
+{
+ std::vector<SdrGluePoint> aList;
+public:
+ SdrGluePointList() {};
+ SdrGluePointList(const SdrGluePointList& rSrcList)
+ {
+ *this = rSrcList;
+ }
+
+ SdrGluePointList& operator=(const SdrGluePointList& rSrcList);
+ sal_uInt16 GetCount() const
+ {
+ return sal_uInt16(aList.size());
+ }
+ // At insert, the object (GluePoint) automatically gets an ID assigned.
+ // Return value is the index of the new GluePoint in the list.
+ sal_uInt16 Insert(const SdrGluePoint& rGP);
+ void Delete(sal_uInt16 nPos)
+ {
+ aList.erase(aList.begin() + nPos);
+ }
+ SdrGluePoint& operator[](sal_uInt16 nPos)
+ {
+ return aList[nPos];
+ }
+ const SdrGluePoint& operator[](sal_uInt16 nPos) const
+ {
+ return aList[nPos];
+ }
+ sal_uInt16 FindGluePoint(sal_uInt16 nId) const;
+ sal_uInt16 HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const;
+ void Invalidate(vcl::Window& rWin, const SdrObject* pObj) const;
+
+ // temp for transformations on the reference object
+ void SetReallyAbsolute(bool bOn, const SdrObject& rObj);
+ void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs, const SdrObject* pObj);
+ void Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj);
+ void Mirror(const Point& rRef1, const Point& rRef2, Degree100 nAngle, const SdrObject* pObj);
+ void Shear(const Point& rRef, double tn, bool bVShear, const SdrObject* pObj);
+};
+
+
+#endif // INCLUDED_SVX_SVDGLUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
new file mode 100644
index 000000000..461937c05
--- /dev/null
+++ b/include/svx/svdhdl.hxx
@@ -0,0 +1,535 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDHDL_HXX
+#define INCLUDED_SVX_SVDHDL_HXX
+
+#include <tools/gen.hxx>
+#include <vcl/graph.hxx>
+
+#include <svx/svdoedge.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdr/overlay/overlayobjectlist.hxx>
+#include <svx/svxdllapi.h>
+#include <deque>
+
+class OutputDevice;
+class SdrHdlList;
+class SdrMarkView;
+class SdrObject;
+class SdrPageView;
+class MouseEvent;
+class HelpEvent;
+
+namespace sdr::contact {
+ class ObjectContact;
+}
+
+// Every object must be able to create its handles. They will be fetched on
+// selection, registered at the View and made visible.
+// When a handle is touched by the mouse (IsHit()), from the view the matching mouse pointer
+// is picked up from the handle and passed to the app (on demand) to be switched on
+// Handles like e.g. rotation center or the mirror axis are generated by
+// the view if the correct transformation mode was selected by the controller.
+// SdrHdlKind::Move...SdrHdlKind::LowerRight should always be consecutive in the enum!
+
+enum class SdrHdlKind
+{
+ Move, // Handle to move the object
+ UpperLeft, // Upper left
+ Upper, // Upper
+ UpperRight, // Upper right
+ Left, // Left
+ Right, // Right
+ LowerLeft, // Bottom left
+ Lower, // Bottom
+ LowerRight, // Bottom right
+ Poly, // Select point in polygon or beziercurve
+ BezierWeight, // Weight of a beziercurve
+ Circle, // Angle to circle segment, corner radius to rectangle
+ Ref1, // Reference point 1, e.g. rotation center
+ Ref2, // Reference point 2, e.g. endpoint of mirror axis
+ MirrorAxis, // Mirror axis
+ Glue, // GluePoint
+ Anchor, // Anchor symbol (SD, SW)
+ Transparence, // Interactive transparence
+ Gradient, // Interactive gradient
+ Color, // Interactive color
+ User,
+ Anchor_TR, // #101688# Anchor handle with (0,0) at top right for SW
+
+ // for SJ and the CustomShapeHandles:
+ CustomShape1,
+
+ SmartTag
+};
+
+
+enum class BitmapColorIndex
+{
+ LightGreen = 0,
+ Cyan = 1,
+ LightCyan = 2,
+ Red = 3,
+ LightRed = 4,
+ Yellow = 5,
+};
+
+
+enum class BitmapMarkerKind
+{
+ Rect_7x7,
+ Rect_9x9,
+ Rect_11x11,
+ Rect_13x13,
+ Circ_7x7,
+ Circ_9x9,
+ Circ_11x11,
+ Elli_7x9,
+ Elli_9x11,
+ Elli_9x7,
+ Elli_11x9,
+ RectPlus_7x7,
+ RectPlus_9x9,
+ RectPlus_11x11,
+ Crosshair,
+ Glue,
+ Glue_Deselected,
+ Anchor,
+
+ // #98388# add AnchorPressed to be able to animate anchor control, too.
+ AnchorPressed,
+
+ // #101688# AnchorTR for SW
+ AnchorTR,
+ AnchorPressedTR,
+
+ // for SJ and the CustomShapeHandles:
+ Customshape_7x7,
+ Customshape_9x9,
+ Customshape_11x11
+};
+
+
+class SVXCORE_DLLPUBLIC SdrHdl
+{
+ friend class SdrMarkView; // for the access to nObjHdlNum
+ friend class SdrHdlList;
+
+protected:
+ SdrObject* pObj; // does handle belong to an object?
+ SdrPageView* pPV; // does handle belong to an object in certain pageview?
+ SdrHdlList* pHdlList; // to store the handlesize
+ // OVERLAYMANAGER
+ sdr::overlay::OverlayObjectList maOverlayGroup;
+
+ Point aPos;
+
+ SdrHdlKind eKind;
+
+ Degree100 nRotationAngle; // turn handle or mousepointer
+ sal_uInt32 nObjHdlNum; // required by MarkView
+ sal_uInt32 nPolyNum; // Polygonpoint
+ sal_uInt32 nPPntNum; // Point number of the polygon
+ sal_uInt32 nSourceHdlNum; // still to implement
+
+ bool bSelect : 1; // is a polygon point selected?
+ bool b1PixMore : 1; // True=handle is shown 1 pixel larger
+ bool bPlusHdl : 1; // for Hld-Paint optimisation at MarkPoint/UnmarkPoint, and other ...
+
+ bool mbMoveOutside; // forces this handle to be moved outside of the selection rectangle
+
+ // create marker for this kind
+ virtual void CreateB2dIAObject();
+
+ // cleanup marker if one exists
+ void GetRidOfIAObject();
+
+private:
+ bool mbMouseOver; // is true if the mouse is over this handle
+
+protected:
+ std::unique_ptr<sdr::overlay::OverlayObject> CreateOverlayObject(
+ const basegfx::B2DPoint& rPos,
+ BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker,
+ Point aMoveOutsideOffset = Point());
+ static BitmapMarkerKind GetNextBigger(BitmapMarkerKind eKnd);
+
+ // Helper to support inserting a new OverlayObject. It will do all
+ // necessary stuff involved with that:
+ // - add GridOffset for non-linear ViewToDevice transformation (calc)
+ // - add to OverlayManager
+ // - add to local OverlayObjectList - ownership change (!)
+ // It is centralized here (and protected) to avoid that new usages/
+ // implementations forget one of these needed steps.
+ void insertNewlyCreatedOverlayObjectForSdrHdl(
+ std::unique_ptr<sdr::overlay::OverlayObject> pOverlayObject,
+ const sdr::contact::ObjectContact& rObjectContact,
+ sdr::overlay::OverlayManager& rOverlayManager);
+
+public:
+ SdrHdl();
+ explicit SdrHdl(const Point& rPnt, SdrHdlKind eNewKind);
+ virtual ~SdrHdl();
+
+ const sdr::overlay::OverlayObjectList& getOverlayObjectList() const { return maOverlayGroup; }
+
+ void SetHdlList(SdrHdlList* pList);
+ SdrHdlKind GetKind() const { return eKind; }
+ void Touch();
+
+ const Point& GetPos() const { return aPos; }
+ void SetPos(const Point& rPnt);
+
+ SdrPageView* GetPageView() const { return pPV; }
+ void SetPageView(SdrPageView* pNewPV) { pPV=pNewPV; }
+
+ SdrObject* GetObj() const { return pObj; }
+ void SetObj(SdrObject* pNewObj);
+
+ bool IsSelected() const { return bSelect; }
+ void SetSelected(bool bJa=true);
+
+ void Set1PixMore(bool bJa=true);
+ void SetRotationAngle(Degree100 n);
+
+ bool IsCornerHdl() const { return eKind==SdrHdlKind::UpperLeft || eKind==SdrHdlKind::UpperRight || eKind==SdrHdlKind::LowerLeft || eKind==SdrHdlKind::LowerRight; }
+ bool IsVertexHdl() const { return eKind==SdrHdlKind::Upper || eKind==SdrHdlKind::Lower || eKind==SdrHdlKind::Left || eKind==SdrHdlKind::Right; }
+
+ void SetObjHdlNum(sal_uInt32 nNum) { nObjHdlNum=nNum; }
+ sal_uInt32 GetObjHdlNum() const { return nObjHdlNum; }
+
+ void SetPolyNum(sal_uInt32 nNum) { nPolyNum=nNum; }
+ sal_uInt32 GetPolyNum() const { return nPolyNum; }
+
+ void SetPointNum(sal_uInt32 nNum) { nPPntNum=nNum; }
+ sal_uInt32 GetPointNum() const { return nPPntNum; }
+
+ void SetPlusHdl(bool bOn) { bPlusHdl=bOn; }
+ bool IsPlusHdl() const { return bPlusHdl; }
+
+ void SetSourceHdlNum(sal_uInt32 nNum) { nSourceHdlNum=nNum; }
+ sal_uInt32 GetSourceHdlNum() const { return nSourceHdlNum; }
+
+ virtual PointerStyle GetPointer() const;
+ bool IsHdlHit(const Point& rPnt) const;
+
+ virtual bool IsFocusHdl() const;
+
+ void SetMoveOutside( bool bMoveOutside );
+
+ /** is called when the mouse enters the area of this handle. If the handle changes his
+ visualisation during mouse over it must override this method and call Touch(). */
+ virtual void onMouseEnter(const MouseEvent& rMEvt);
+
+ /** is called when help is requested for the area of this handle */
+ virtual void onHelpRequest();
+
+ /** is called when the mouse leaves the area of this handle. If the handle changes his
+ visualisation during mouse over it must override this method and call Touch(). */
+ virtual void onMouseLeave();
+
+ static BitmapEx createGluePointBitmap();
+};
+
+
+#define SDR_HANDLE_COLOR_SIZE_NORMAL Size(13, 13)
+#define SDR_HANDLE_COLOR_SIZE_SELECTED Size(17, 17)
+
+class SVXCORE_DLLPUBLIC SdrHdlColor final : public SdrHdl
+{
+ // size of colr markers
+ Size aMarkerSize;
+
+ // color
+ Color aMarkerColor;
+
+ // callback link when value changed
+ Link<SdrHdlColor*,void> aColorChangeHdl;
+
+ // use luminance values only
+ bool bUseLuminance : 1;
+
+ // create marker for this kind
+ SVX_DLLPRIVATE virtual void CreateB2dIAObject() override;
+
+ // help functions
+ SVX_DLLPRIVATE BitmapEx CreateColorDropper(Color aCol);
+ SVX_DLLPRIVATE static Color GetLuminance(const Color& rCol);
+
+public:
+ explicit SdrHdlColor(const Point& rRef, Color aCol, const Size& rSize, bool bLuminance);
+ virtual ~SdrHdlColor() override;
+
+ bool IsUseLuminance() const { return bUseLuminance; }
+
+ const Color& GetColor() const { return aMarkerColor; }
+ void SetColor(Color aNew, bool bCallLink = false);
+
+ void SetSize(const Size& rNew);
+
+ void SetColorChangeHdl(const Link<SdrHdlColor*,void>& rLink) { aColorChangeHdl = rLink; }
+};
+
+
+class SdrHdlGradient final : public SdrHdl
+{
+private:
+ // pointer to used color handles
+ SdrHdlColor* pColHdl1;
+ SdrHdlColor* pColHdl2;
+
+ // 2nd position
+ Point a2ndPos;
+
+ // is this a gradient or a transparence
+ bool bGradient : 1;
+
+ // select which handle to move
+ bool bMoveSingleHandle : 1;
+ bool bMoveFirstHandle : 1;
+
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+public:
+ SdrHdlGradient(const Point& rRef1, const Point& rRef2, bool bGrad);
+ virtual ~SdrHdlGradient() override;
+
+ bool IsGradient() const { return bGradient; }
+
+ // set the associated color handles
+ void SetColorHandles(SdrHdlColor* pL1, SdrHdlColor* pL2) { pColHdl1 = pL1; pColHdl2 = pL2; }
+ SdrHdlColor* GetColorHdl1() const { return pColHdl1; }
+ SdrHdlColor* GetColorHdl2() const { return pColHdl2; }
+
+ const Point& Get2ndPos() const { return a2ndPos; }
+ void Set2ndPos(const Point& rPnt);
+
+ // the link called by the color handles
+ DECL_LINK(ColorChangeHdl, SdrHdlColor*, void);
+
+ // transformation call, create gradient from this handle
+ void FromIAOToItem(SdrObject* pObj, bool bSetItemOnObject, bool bUndo);
+
+ // selection flags for interaction
+ bool IsMoveSingleHandle() const { return bMoveSingleHandle; }
+ void SetMoveSingleHandle(bool bNew) { bMoveSingleHandle = bNew; }
+ bool IsMoveFirstHandle() const { return bMoveFirstHandle; }
+ void SetMoveFirstHandle(bool bNew) { bMoveFirstHandle = bNew; }
+};
+
+
+// Mirror axis
+class SdrHdlLine final : public SdrHdl
+{
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+ SdrHdl* pHdl1;
+ SdrHdl* pHdl2;
+
+public:
+ SdrHdlLine(SdrHdl& rHdl1, SdrHdl& rHdl2, SdrHdlKind eNewKind) { eKind=eNewKind; pHdl1=&rHdl1; pHdl2=&rHdl2; }
+ virtual ~SdrHdlLine() override;
+
+ virtual PointerStyle GetPointer() const override;
+};
+
+// a SdrHdlBezWgt knows about its "base handle". Its draw method
+// draws additionally a line from its position to the position
+// of the base handle
+class SdrHdlBezWgt final : public SdrHdl
+{
+public:
+ // this is not a Copy-Ctor!!!
+ SdrHdlBezWgt(const SdrHdl* pRefHdl1, SdrHdlKind eNewKind=SdrHdlKind::BezierWeight) { eKind=eNewKind; pHdl1=pRefHdl1; }
+ virtual ~SdrHdlBezWgt() override;
+
+private:
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+ const SdrHdl* pHdl1;
+};
+
+
+class E3dVolumeMarker final : public SdrHdl
+{
+ basegfx::B2DPolyPolygon aWireframePoly;
+
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+public:
+ explicit E3dVolumeMarker(const basegfx::B2DPolyPolygon& rWireframePoly);
+};
+
+
+class ImpEdgeHdl final : public SdrHdl
+{
+ SdrEdgeLineCode eLineCode;
+
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+public:
+ ImpEdgeHdl(const Point& rPnt, SdrHdlKind eNewKind): SdrHdl(rPnt,eNewKind),eLineCode(SdrEdgeLineCode::MiddleLine) {}
+ virtual ~ImpEdgeHdl() override;
+
+ void SetLineCode(SdrEdgeLineCode eCode);
+ SdrEdgeLineCode GetLineCode() const { return eLineCode; }
+ bool IsHorzDrag() const;
+ virtual PointerStyle GetPointer() const override;
+};
+
+
+class ImpMeasureHdl final : public SdrHdl
+{
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+public:
+ ImpMeasureHdl(const Point& rPnt, SdrHdlKind eNewKind): SdrHdl(rPnt,eNewKind) {}
+ virtual ~ImpMeasureHdl() override;
+
+ virtual PointerStyle GetPointer() const override;
+};
+
+
+class ImpTextframeHdl final : public SdrHdl
+{
+ const tools::Rectangle maRect;
+
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+public:
+ explicit ImpTextframeHdl(const tools::Rectangle& rRect);
+};
+
+
+class SVXCORE_DLLPUBLIC SdrHdlList
+{
+ size_t mnFocusIndex;
+ SdrMarkView* pView;
+ std::deque<std::unique_ptr<SdrHdl>> maList;
+ sal_uInt16 nHdlSize;
+
+ bool bRotateShear : 1;
+ bool bDistortShear : 1;
+ bool bMoveOutside : 1; // move handles outwards (for TextEdit)
+
+ SVX_DLLPRIVATE SdrHdlList(const SdrHdlList&) = delete;
+ SVX_DLLPRIVATE void operator=(const SdrHdlList&) = delete;
+
+public:
+ explicit SdrHdlList(SdrMarkView* pV);
+ ~SdrHdlList();
+ void Clear();
+
+ void TravelFocusHdl(bool bForward);
+ SdrHdl* GetFocusHdl() const;
+ void SetFocusHdl(SdrHdl* pNew);
+ void ResetFocusHdl();
+
+ // Access to View
+ SdrMarkView* GetView() const { return pView;}
+
+ // Sorting: 1.Level first reference point handle, then normal handles, next Glue, then User then Plushandles
+ // 2.Level PageView (Pointer)
+ // 3.Level Position (x+y)
+ void Sort();
+ size_t GetHdlCount() const { return maList.size(); }
+ SdrHdl* GetHdl(size_t nNum) const { return nNum < maList.size() ? maList[nNum].get() : nullptr; }
+ size_t GetHdlNum(const SdrHdl* pHdl) const;
+ void SetHdlSize(sal_uInt16 nSiz);
+ sal_uInt16 GetHdlSize() const { return nHdlSize; }
+ void SetMoveOutside(bool bOn);
+ bool IsMoveOutside() const { return bMoveOutside; }
+ void SetRotateShear(bool bOn);
+ bool IsRotateShear() const { return bRotateShear; }
+ void SetDistortShear(bool bOn);
+ bool IsDistortShear() const { return bDistortShear; }
+
+ // AddHdl takes ownership of the handle. It should be on the Heap
+ // as Clear() deletes it.
+ void AddHdl(std::unique_ptr<SdrHdl> pHdl);
+ std::unique_ptr<SdrHdl> RemoveHdl(size_t nNum);
+ void RemoveAllByKind(SdrHdlKind eKind);
+
+ // move the ownership of all the SdrHdl to rOther
+ void MoveTo(SdrHdlList& rOther);
+
+ // Last inserted handles are likely hit (if the handles are above each other)
+ SdrHdl* IsHdlListHit(const Point& rPnt) const;
+ SdrHdl* GetHdl(SdrHdlKind eKind1) const;
+};
+
+
+class SVXCORE_DLLPUBLIC SdrCropHdl final : public SdrHdl
+{
+public:
+ SdrCropHdl(
+ const Point& rPnt,
+ SdrHdlKind eNewKind,
+ double fShearX,
+ double fRotation);
+
+private:
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+
+ BitmapEx GetBitmapForHandle( const BitmapEx& rBitmap, int nSize );
+
+ // evtl. shear and rotation, equal to the object's one to allow adaptation of
+ // the visualization handles
+ double mfShearX;
+ double mfRotation;
+};
+
+
+class SdrCropViewHdl final : public SdrHdl
+{
+private:
+ basegfx::B2DHomMatrix maObjectTransform;
+ Graphic maGraphic;
+ double mfCropLeft;
+ double mfCropTop;
+ double mfCropRight;
+ double mfCropBottom;
+
+public:
+ SdrCropViewHdl(
+ const basegfx::B2DHomMatrix& rObjectTransform,
+ const Graphic& rGraphic,
+ double fCropLeft,
+ double fCropTop,
+ double fCropRight,
+ double fCropBottom);
+
+private:
+ // create marker for this kind
+ virtual void CreateB2dIAObject() override;
+};
+
+
+#endif // INCLUDED_SVX_SVDHDL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdhlpln.hxx b/include/svx/svdhlpln.hxx
new file mode 100644
index 000000000..aa850773c
--- /dev/null
+++ b/include/svx/svdhlpln.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDHLPLN_HXX
+#define INCLUDED_SVX_SVDHLPLN_HXX
+
+#include <sal/types.h>
+#include <tools/gen.hxx>
+
+#include <svx/svxdllapi.h>
+
+#include <vector>
+#include <memory>
+
+class OutputDevice;
+enum class PointerStyle;
+
+enum class SdrHelpLineKind { Point, Vertical, Horizontal };
+
+#define SDRHELPLINE_POINT_PIXELSIZE 15 /* actual size = PIXELSIZE*2+1 */
+
+class SdrHelpLine {
+ Point aPos; // X or Y may be unimportant, depending on the value of eKind
+ SdrHelpLineKind eKind;
+
+public:
+ explicit SdrHelpLine(SdrHelpLineKind eNewKind=SdrHelpLineKind::Point): eKind(eNewKind) {}
+ SdrHelpLine(SdrHelpLineKind eNewKind, const Point& rNewPos): aPos(rNewPos), eKind(eNewKind) {}
+ bool operator==(const SdrHelpLine& rCmp) const { return aPos==rCmp.aPos && eKind==rCmp.eKind; }
+ bool operator!=(const SdrHelpLine& rCmp) const { return !operator==(rCmp); }
+
+ void SetKind(SdrHelpLineKind eNewKind) { eKind=eNewKind; }
+ SdrHelpLineKind GetKind() const { return eKind; }
+ void SetPos(const Point& rPnt) { aPos=rPnt; }
+ const Point& GetPos() const { return aPos; }
+
+ PointerStyle GetPointer() const;
+ bool IsHit(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevice& rOut) const;
+ // OutputDevice is required because capture points have a fixed pixel size
+ tools::Rectangle GetBoundRect(const OutputDevice& rOut) const;
+};
+
+#define SDRHELPLINE_NOTFOUND 0xFFFF
+
+class SVXCORE_DLLPUBLIC SdrHelpLineList {
+ std::vector<std::unique_ptr<SdrHelpLine>> aList;
+
+public:
+ SdrHelpLineList() {}
+ SdrHelpLineList(const SdrHelpLineList& rSrcList) { *this=rSrcList; }
+ SdrHelpLineList& operator=(const SdrHelpLineList& rSrcList);
+ bool operator==(const SdrHelpLineList& rCmp) const;
+ bool operator!=(const SdrHelpLineList& rCmp) const { return !operator==(rCmp); }
+ sal_uInt16 GetCount() const { return sal_uInt16(aList.size()); }
+ void Insert(const SdrHelpLine& rHL) { aList.emplace_back(new SdrHelpLine(rHL)); }
+ void Insert(const SdrHelpLine& rHL, sal_uInt16 nPos)
+ {
+ if(nPos==0xFFFF)
+ aList.emplace_back(new SdrHelpLine(rHL));
+ else
+ aList.emplace(aList.begin() + nPos, new SdrHelpLine(rHL));
+ }
+ void Delete(sal_uInt16 nPos)
+ {
+ aList.erase(aList.begin() + nPos);
+ }
+ SdrHelpLine& operator[](sal_uInt16 nPos) { return *aList[nPos]; }
+ const SdrHelpLine& operator[](sal_uInt16 nPos) const { return *aList[nPos]; }
+ sal_uInt16 HitTest(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevice& rOut) const;
+};
+
+
+#endif // INCLUDED_SVX_SVDHLPLN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svditer.hxx b/include/svx/svditer.hxx
new file mode 100644
index 000000000..9b43b5637
--- /dev/null
+++ b/include/svx/svditer.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDITER_HXX
+#define INCLUDED_SVX_SVDITER_HXX
+
+#include <vector>
+
+#include <svx/svxdllapi.h>
+
+class SdrObjList;
+class SdrObject;
+class SdrPage;
+class SdrMarkList;
+
+// SdrObjListIter methods:
+// SdrIterMode::Flat : Flat over the list
+// SdrIterMode::DeepWithGroups : With recursive descent parser, Next() also returns group objects
+// SdrIterMode::DeepNoGroups : With recursive descent parser, Next() returns no group objects
+enum class SdrIterMode { Flat, DeepWithGroups, DeepNoGroups };
+
+class SVXCORE_DLLPUBLIC SdrObjListIter
+{
+ std::vector< const SdrObject* > maObjList;
+ size_t mnIndex;
+ bool mbReverse;
+ bool mbUseZOrder;
+
+ void ImpProcessObjectList(const SdrObjList& rSdrObjList, SdrIterMode eMode);
+ void ImpProcessMarkList(const SdrMarkList& rMarkList, SdrIterMode eMode);
+ void ImpProcessObj(const SdrObject& rSdrObject, SdrIterMode eMode);
+
+public:
+ explicit SdrObjListIter(const SdrObjList* pObjList, SdrIterMode eMode = SdrIterMode::DeepNoGroups, bool bReverse = false);
+ explicit SdrObjListIter(const SdrObjList* pObjList, bool bUseZOrder, SdrIterMode eMode = SdrIterMode::DeepNoGroups, bool bReverse = false);
+
+ /* SJ: the following function can now be used with every
+ SdrObject and is no longer limited to group objects */
+ explicit SdrObjListIter(const SdrObject& rSdrObject, SdrIterMode eMode = SdrIterMode::DeepNoGroups, bool bReverse = false);
+ explicit SdrObjListIter(const SdrPage* pSdrPage, SdrIterMode eMode = SdrIterMode::DeepNoGroups, bool bReverse = false);
+
+ /** Iterates over a list of marked objects received from the SdrMarkView. TTTT used in sc */
+ explicit SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = SdrIterMode::DeepNoGroups);
+
+ void Reset() { mnIndex = (mbReverse ? maObjList.size() : 0L); }
+ bool IsMore() const { return (mbReverse ? mnIndex != 0 : ( mnIndex < maObjList.size())); }
+ SdrObject* Next()
+ {
+ const size_t idx(mbReverse ? --mnIndex : mnIndex++);
+ return (idx < maObjList.size()) ? const_cast< SdrObject* >(maObjList[idx]) : nullptr;
+ }
+
+ size_t Count() const { return maObjList.size(); }
+};
+
+#endif // INCLUDED_SVX_SVDITER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx
new file mode 100644
index 000000000..40cac55d9
--- /dev/null
+++ b/include/svx/svdlayer.hxx
@@ -0,0 +1,164 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDLAYER_HXX
+#define INCLUDED_SVX_SVDLAYER_HXX
+
+#include <svx/svdsob.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+#include <vector>
+
+/**
+ * Note on the layer mix with symbolic/ID-based interface:
+ * You create a new layer with
+ * pLayerAdmin->NewLayer("A new layer");
+ * This layer is automatically appended to the end of the list.
+ *
+ * The same holds true for layer sets.
+ *
+ * The interface for SdrLayerSet is based on LayerIDs. The app must get
+ * an ID for it at the SdrLayerAdmin, like so:
+ * SdrLayerID nLayerID=pLayerAdmin->GetLayerID("A new layer");
+ *
+ * If the layer cannot be found, SDRLAYER_NOTFOUND is returned.
+ * The methods with the ID interface usually handle that error in a
+ * meaningful way.
+ * If you not only got a name, but even a SdrLayer*, you can get the ID
+ * much faster via the layer directly.
+ *
+ * @param bInherited:
+ * TRUE If the layer/layer set cannot be found, we examine the parent layer admin,
+ * whether there's a corresponding definition
+ * FALSE We only search this layer admin
+ *
+ * Every page's layer admin has a parent layer admin (the model's). The model
+ * itself does not have a parent.
+ */
+
+class SdrModel;
+
+class SVXCORE_DLLPUBLIC SdrLayer
+{
+ friend class SdrLayerAdmin;
+
+ OUString maName;
+ OUString maTitle;
+ OUString maDescription;
+ SdrModel* pModel; // For broadcasting
+ bool mbVisibleODF; // corresponds to ODF draw:display
+ bool mbPrintableODF; // corresponds to ODF draw:display
+ bool mbLockedODF; // corresponds to ODF draw:protected
+ SdrLayerID nID;
+
+ SdrLayer(SdrLayerID nNewID, const OUString& rNewName);
+
+public:
+ bool operator==(const SdrLayer& rCmpLayer) const;
+
+ void SetName(const OUString& rNewName);
+ const OUString& GetName() const { return maName; }
+
+ void SetTitle(const OUString& rTitle) { maTitle = rTitle; }
+ const OUString& GetTitle() const { return maTitle; }
+
+ void SetDescription(const OUString& rDesc) { maDescription = rDesc; }
+ const OUString& GetDescription() const { return maDescription; }
+
+ void SetVisibleODF(bool bVisibleODF) { mbVisibleODF = bVisibleODF; }
+ bool IsVisibleODF() const { return mbVisibleODF; }
+
+ void SetPrintableODF(bool bPrintableODF) { mbPrintableODF = bPrintableODF; }
+ bool IsPrintableODF() const { return mbPrintableODF; }
+
+ void SetLockedODF(bool bLockedODF) { mbLockedODF = bLockedODF; }
+ bool IsLockedODF() const { return mbLockedODF; }
+
+ SdrLayerID GetID() const { return nID; }
+ void SetModel(SdrModel* pNewModel) { pModel=pNewModel; }
+};
+
+#define SDRLAYER_MAXCOUNT 255
+#define SDRLAYERPOS_NOTFOUND 0xffff
+
+// When Changing the layer data you currently have to set the Modify flag manually
+class SVXCORE_DLLPUBLIC SdrLayerAdmin {
+friend class SdrView;
+friend class SdrModel;
+friend class SdrPage;
+
+ std::vector<std::unique_ptr<SdrLayer>> maLayers;
+ SdrLayerAdmin* pParent; // The page's admin knows the doc's admin
+ SdrModel* pModel; // For broadcasting
+ OUString maControlLayerName;
+ // Find a LayerID which is not in use yet. If all have been used up,
+ // we return 0.
+ // If you want to play safe, check GetLayerCount()<SDRLAYER_MAXCOUNT
+ // first, else all are given away already.
+ SdrLayerID GetUniqueLayerID() const;
+ void Broadcast() const;
+public:
+ explicit SdrLayerAdmin(SdrLayerAdmin* pNewParent=nullptr);
+ SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin);
+ ~SdrLayerAdmin();
+ SdrLayerAdmin& operator=(const SdrLayerAdmin& rSrcLayerAdmin);
+
+ void SetModel(SdrModel* pNewModel);
+
+ void InsertLayer(std::unique_ptr<SdrLayer> pLayer, sal_uInt16 nPos);
+ std::unique_ptr<SdrLayer> RemoveLayer(sal_uInt16 nPos);
+
+ // Delete all layers
+ void ClearLayers();
+
+ // New layer is created and inserted
+ SdrLayer* NewLayer(const OUString& rName, sal_uInt16 nPos=0xFFFF);
+
+ // Iterate over all layers
+ sal_uInt16 GetLayerCount() const { return sal_uInt16(maLayers.size()); }
+
+ SdrLayer* GetLayer(sal_uInt16 i) { return maLayers[i].get(); }
+ const SdrLayer* GetLayer(sal_uInt16 i) const { return maLayers[i].get(); }
+
+ sal_uInt16 GetLayerPos(const SdrLayer* pLayer) const;
+
+ SdrLayer* GetLayer(const OUString& rName);
+ const SdrLayer* GetLayer(const OUString& rName) const;
+ SdrLayerID GetLayerID(const OUString& rName) const;
+ SdrLayer* GetLayerPerID(SdrLayerID nID) { return const_cast<SdrLayer*>(const_cast<const SdrLayerAdmin*>(this)->GetLayerPerID(nID)); }
+ const SdrLayer* GetLayerPerID(SdrLayerID nID) const;
+
+ void SetControlLayerName(const OUString& rNewName);
+ const OUString& GetControlLayerName() const { return maControlLayerName; }
+
+ // Removes all elements in rOutSet and then adds all IDs of layers from member aLayer
+ // that fulfill the criterion visible, printable, or locked respectively.
+ void getVisibleLayersODF( SdrLayerIDSet& rOutSet) const;
+ void getPrintableLayersODF( SdrLayerIDSet& rOutSet) const;
+ void getLockedLayersODF( SdrLayerIDSet& rOutSet) const;
+
+ // Generates a bitfield for settings.xml from the SdrLayerIDSet.
+ // Output is a UNO sequence of BYTE (which is 'short' in API).
+ void QueryValue(const SdrLayerIDSet& rViewLayerSet, css::uno::Any& rAny);
+};
+
+#endif // INCLUDED_SVX_SVDLAYER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx
new file mode 100644
index 000000000..041602600
--- /dev/null
+++ b/include/svx/svdmark.hxx
@@ -0,0 +1,261 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVDMARK_HXX
+#define INCLUDED_SVX_SVDMARK_HXX
+
+#include <config_options.h>
+#include <o3tl/sorted_vector.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/sdrobjectuser.hxx>
+
+#include <memory>
+#include <vector>
+
+namespace tools { class Rectangle; }
+class SdrPage;
+class SdrObjList;
+class SdrObject;
+class SdrPageView;
+
+typedef o3tl::sorted_vector<sal_uInt16> SdrUShortCont;
+
+
+/**
+ * Everything a View needs to know about a selected object
+ */
+class SVXCORE_DLLPUBLIC SdrMark final : public sdr::ObjectUser
+{
+ sal_Int64 mnTimeStamp;
+ SdrObject* mpSelectedSdrObject; // the selected object
+ SdrPageView* mpPageView;
+ SdrUShortCont maPoints; // Selected Points
+ SdrUShortCont maGluePoints; // Selected Gluepoints (their Id's)
+ bool mbCon1; // for Connectors
+ bool mbCon2; // for Connectors
+ sal_uInt16 mnUser; // E.g. for CopyObjects, also copy Edges
+
+ void setTime();
+
+public:
+ explicit SdrMark(SdrObject* pNewObj = nullptr, SdrPageView* pNewPageView = nullptr);
+ SdrMark(const SdrMark& rMark);
+ virtual ~SdrMark();
+
+ // Derived from ObjectUser
+ virtual void ObjectInDestruction(const SdrObject& rObject) override;
+
+ SdrMark& operator=(const SdrMark& rMark);
+
+ void SetMarkedSdrObj(SdrObject* pNewObj);
+ SdrObject* GetMarkedSdrObj() const { return mpSelectedSdrObject;}
+
+ SdrPageView* GetPageView() const
+ {
+ return mpPageView;
+ }
+
+ void SetPageView(SdrPageView* pNewPageView)
+ {
+ mpPageView = pNewPageView;
+ }
+
+ void SetCon1(bool bOn)
+ {
+ mbCon1 = bOn;
+ }
+
+ bool IsCon1() const
+ {
+ return mbCon1;
+ }
+
+ void SetCon2(bool bOn)
+ {
+ mbCon2 = bOn;
+ }
+
+ bool IsCon2() const
+ {
+ return mbCon2;
+ }
+
+ void SetUser(sal_uInt16 nVal)
+ {
+ mnUser = nVal;
+ }
+
+ sal_uInt16 GetUser() const
+ {
+ return mnUser;
+ }
+
+ const SdrUShortCont& GetMarkedPoints() const
+ {
+ return maPoints;
+ }
+
+ const SdrUShortCont& GetMarkedGluePoints() const
+ {
+ return maGluePoints;
+ }
+
+ SdrUShortCont& GetMarkedPoints()
+ {
+ return maPoints;
+ }
+
+ SdrUShortCont& GetMarkedGluePoints()
+ {
+ return maGluePoints;
+ }
+
+ sal_Int64 getTimeStamp() const
+ {
+ return mnTimeStamp;
+ }
+};
+
+class SVXCORE_DLLPUBLIC SdrMarkList final
+{
+ std::vector<std::unique_ptr<SdrMark>> maList;
+
+ OUString maMarkName;
+ OUString maPointName;
+ OUString maGluePointName;
+
+ bool mbPointNameOk;
+ bool mbGluePointNameOk;
+ bool mbNameOk;
+ bool mbSorted;
+
+ SVX_DLLPRIVATE void ImpForceSort();
+ SVX_DLLPRIVATE const OUString& GetPointMarkDescription(bool bGlue) const;
+
+public:
+ SdrMarkList()
+ : mbPointNameOk(false),
+ mbGluePointNameOk(false),
+ mbNameOk(false),
+ mbSorted(true)
+ {
+ }
+
+ SdrMarkList(const SdrMarkList& rLst)
+ {
+ *this = rLst;
+ }
+
+ ~SdrMarkList()
+ {
+ Clear();
+ }
+
+ void Clear();
+ void ForceSort() const;
+ void SetUnsorted()
+ {
+ mbSorted = false;
+ }
+
+ size_t GetMarkCount() const
+ {
+ return maList.size();
+ }
+
+ SdrMark* GetMark(size_t nNum) const;
+ // returns SAL_MAX_SIZE if not found
+ size_t FindObject(const SdrObject* pObj) const;
+ void InsertEntry(const SdrMark& rMark, bool bChkSort = true);
+ void DeleteMark(size_t nNum);
+ void ReplaceMark(const SdrMark& rNewMark, size_t nNum);
+ void Merge(const SdrMarkList& rSrcList, bool bReverse = false);
+ bool DeletePageView(const SdrPageView& rPV);
+ bool InsertPageView(const SdrPageView& rPV);
+
+ void SetNameDirty()
+ {
+ mbNameOk = false;
+ mbPointNameOk = false;
+ mbGluePointNameOk = false;
+ }
+
+ // A verbal description of selected objects e.g.:
+ // "27 Lines", "12 Objects", "Polygon" or even "Not an object"
+ const OUString& GetMarkDescription() const;
+ const OUString& GetPointMarkDescription() const
+ {
+ return GetPointMarkDescription(false);
+ }
+
+ const OUString& GetGluePointMarkDescription() const
+ {
+ return GetPointMarkDescription(true);
+ }
+
+ // pPage=0: Selection of everything! Respect Pages
+ bool TakeBoundRect(SdrPageView const * pPageView, tools::Rectangle& rRect) const;
+ bool TakeSnapRect(SdrPageView const * pPageView, tools::Rectangle& rRect) const;
+
+ // All Entries are copied!
+ SdrMarkList& operator=(const SdrMarkList& rLst);
+};
+
+
+// migrate selections
+
+namespace sdr
+{
+ class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) ViewSelection
+ {
+ SdrMarkList maMarkedObjectList;
+ SdrMarkList maEdgesOfMarkedNodes;
+ SdrMarkList maMarkedEdgesOfMarkedNodes;
+ std::vector<SdrObject*> maAllMarkedObjects;
+
+ bool mbEdgesOfMarkedNodesDirty : 1;
+
+ SVX_DLLPRIVATE void ImpForceEdgesOfMarkedNodes();
+ SVX_DLLPRIVATE void ImplCollectCompleteSelection(SdrObject* pObj);
+
+ public:
+ ViewSelection();
+
+ void SetEdgesOfMarkedNodesDirty();
+
+ const SdrMarkList& GetMarkedObjectList() const
+ {
+ return maMarkedObjectList;
+ }
+
+ const SdrMarkList& GetEdgesOfMarkedNodes() const;
+ const SdrMarkList& GetMarkedEdgesOfMarkedNodes() const;
+ const std::vector<SdrObject*>& GetAllMarkedObjects() const;
+
+ SdrMarkList& GetMarkedObjectListWriteAccess()
+ {
+ return maMarkedObjectList;
+ }
+ };
+} // end of namespace sdr
+
+#endif // INCLUDED_SVX_SVDMARK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
new file mode 100644
index 000000000..62c9be034
--- /dev/null
+++ b/include/svx/svdmodel.hxx
@@ -0,0 +1,641 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <functional>
+#include <memory>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <editeng/forbiddencharacterstable.hxx>
+#include <editeng/outliner.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/weakbase.h>
+#include <svl/SfxBroadcaster.hxx>
+#include <tools/degree.hxx>
+#include <tools/fldunit.hxx>
+#include <tools/fract.hxx>
+#include <svl/hint.hxx>
+#include <o3tl/enumarray.hxx>
+
+#include <svl/style.hxx>
+#include <svx/xtable.hxx>
+
+#include <svx/svdtypes.hxx>
+#include <svx/svxdllapi.h>
+
+#include <rtl/ref.hxx>
+#include <deque>
+
+#ifdef DBG_UTIL
+// SdrObjectLifetimeWatchDog
+#include <unordered_set>
+#endif
+
+class OutputDevice;
+class SdrOutliner;
+class SdrLayerAdmin;
+class SdrObjList;
+class SdrObject;
+class SdrPage;
+class SdrPageView;
+class SdrTextObj;
+class SdrUndoAction;
+class SdrUndoGroup;
+class AutoTimer;
+class SfxItemPool;
+class SfxItemSet;
+class SfxRepeatTarget;
+class SfxStyleSheet;
+class SfxUndoAction;
+class SfxUndoManager;
+class XBitmapList;
+class XColorList;
+class XDashList;
+class XGradientList;
+class XHatchList;
+class XLineEndList;
+class SvxForbiddenCharactersTable;
+class SvNumberFormatter;
+class SdrOutlinerCache;
+class SdrUndoFactory;
+class ImageMap;
+class TextChain;
+enum class CharCompressType;
+namespace comphelper
+{
+ class IEmbeddedHelper;
+ class LifecycleProxy;
+}
+namespace sfx2
+{
+ class LinkManager;
+}
+namespace com::sun::star::beans {
+ struct PropertyValue;
+}
+
+namespace svx
+{
+class Theme;
+}
+
+constexpr const sal_Unicode DEGREE_CHAR = u'\x00B0'; /* U+00B0 DEGREE SIGN */
+
+
+enum class SdrHintKind
+{
+ LayerChange, // changed layer definition
+ LayerOrderChange, // order of layer changed (Insert/Remove/ChangePos)
+ PageOrderChange, // order of pages (object pages or master pages) changed (Insert/Remove/ChangePos)
+ ObjectChange, // object changed
+ ObjectInserted, // new object inserted
+ ObjectRemoved, // symbol object removed from list
+ ModelCleared, // deleted the whole model (no pages exist anymore). not impl.
+ RefDeviceChange, // RefDevice changed
+ DefaultTabChange, // Default tabulator width changed
+ SwitchToPage, // #94278# UNDO/REDO at an object evtl. on another page
+ BeginEdit, // Is called after the object has entered text edit mode
+ EndEdit // Is called after the object has left text edit mode
+};
+
+class SVXCORE_DLLPUBLIC SdrHint final : public SfxHint
+{
+private:
+ SdrHintKind meHint;
+ const SdrObject* mpObj;
+ const SdrPage* mpPage;
+
+public:
+ explicit SdrHint(SdrHintKind eNewHint);
+ explicit SdrHint(SdrHintKind eNewHint, const SdrObject& rNewObj);
+ explicit SdrHint(SdrHintKind eNewHint, const SdrPage* pPage);
+ explicit SdrHint(SdrHintKind eNewHint, const SdrObject& rNewObj, const SdrPage* pPage);
+
+ const SdrPage* GetPage() const { return mpPage;}
+ const SdrObject* GetObject() const { return mpObj;}
+ SdrHintKind GetKind() const { return meHint;}
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// SdrModel
+// DlgEdModel
+// FmFormModel
+// ScDrawLayer
+// SdDrawDocument
+// SwDrawModel
+// OReportModel
+
+struct SdrModelImpl;
+
+class SVXCORE_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase
+{
+private:
+#ifdef DBG_UTIL
+ // SdrObjectLifetimeWatchDog:
+ // Use maAllIncarnatedObjects to keep track of all SdrObjects incarnated using this SdrModel
+ // (what is now possible after the paradigm change that a SdrObject stays at a single SdrModel
+ // for it's whole lifetime).
+ // The two methods are exclusive, debug-only, only-accessible-by SdrObject accesses to else
+ // hidden/non-existing maAllIncarnatedObjects.
+ // SdrObject::SdrObject uses impAddIncarnatedSdrObjectToSdrModel, while SdrObject::~SdrObject
+ // uses impRemoveIncarnatedSdrObjectToSdrModel.
+ // There are two places which may trigger SAL_WARN warnings:
+ // - impRemoveIncarnatedSdrObjectToSdrModel when the to-be-removed SdrObject is not member of SdrModel
+ // - SdrModel::~SdrModel after all SdrObjects *should* be cleaned-up.
+ // SdrModel::~SdrModel will also - for convenience - Free the non-deleted SdrObjects if there
+ // are any.
+ // Using std::unordered_set will use quasi constant access times, so this watchdog will not
+ // be expensive. Nonetheless, only use with debug code. It may be seductive to use this in
+ // product code, too, especially if it will indeed trigger - but its intention is clearly
+ // to find/identify MemoryLeaks caused by SdrObjects
+ friend void impAddIncarnatedSdrObjectToSdrModel(const SdrObject& rSdrObject, SdrModel& rSdrModel);
+ friend void impRemoveIncarnatedSdrObjectToSdrModel(const SdrObject& rSdrObject, SdrModel& rSdrModel);
+ std::unordered_set< const SdrObject* > maAllIncarnatedObjects;
+#endif
+protected:
+ std::vector<rtl::Reference<SdrPage>> maMasterPages;
+ std::vector<rtl::Reference<SdrPage>> maPages;
+ std::function<void(std::unique_ptr<SdrUndoAction>)> m_aUndoLink; // link to a NotifyUndo-Handler
+ Size m_aMaxObjSize; // e.g. for auto-growing text
+ Fraction m_aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ...
+ MapUnit m_eObjUnit; // see above
+ FieldUnit m_eUIUnit; // unit, scale (e.g. 1/1000) for the UI (status bar) is set by ImpSetUIUnit()
+ Fraction m_aUIScale; // see above
+ OUString m_aUIUnitStr; // see above
+ Fraction m_aUIUnitFact; // see above
+ int m_nUIUnitDecimalMark; // see above
+
+ std::unique_ptr<SdrLayerAdmin> m_pLayerAdmin;
+ rtl::Reference<SfxItemPool> m_pItemPool;
+ comphelper::IEmbeddedHelper* m_pEmbeddedHelper; // helper for embedded objects to get rid of the SfxObjectShell
+ std::unique_ptr<SdrOutliner> m_pDrawOutliner; // an Outliner for outputting text
+ std::unique_ptr<SdrOutliner> m_pHitTestOutliner;// an Outliner for the HitTest
+ std::unique_ptr<SdrOutliner> m_pChainingOutliner; // an Outliner for chaining overflowing text
+ sal_Int32 mnDefTextHgt; // Default text height in logical units
+ VclPtr<OutputDevice> m_pRefOutDev; // ReferenceDevice for the EditEngine
+ rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool;
+ SfxStyleSheet* m_pDefaultStyleSheet;
+ SfxStyleSheet* mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj; // #i119287#
+ sfx2::LinkManager* m_pLinkManager; // LinkManager
+ std::deque<std::unique_ptr<SfxUndoAction>> m_aUndoStack;
+ std::deque<std::unique_ptr<SfxUndoAction>> m_aRedoStack;
+ std::unique_ptr<SdrUndoGroup> m_pCurrentUndoGroup; // For multi-level
+ sal_uInt16 m_nUndoLevel; // undo nesting
+ bool m_bIsWriter:1; // to clean up pMyPool from 303a
+ bool mbUndoEnabled:1; // If false no undo is recorded or we are during the execution of an undo action
+ bool mbChanged:1;
+ bool m_bPagNumsDirty:1;
+ bool m_bMPgNumsDirty:1;
+ bool m_bTransportContainer:1; // doc is temporary object container, no display (e.g. clipboard)
+ bool m_bReadOnly:1;
+ bool m_bTransparentTextFrames:1;
+ bool m_bSwapGraphics:1;
+ bool m_bPasteResize:1; // Objects are being resized due to Paste with different MapMode
+ bool m_bStarDrawPreviewMode:1;
+ bool mbDisableTextEditUsesCommonUndoManager:1;
+ bool mbVOCInvalidationIsReliable:1; // does the app reliably invalidate the VOC, or do we need to rebuild the primitives on every render?
+ sal_uInt16 m_nDefaultTabulator;
+ sal_uInt32 m_nMaxUndoCount;
+
+ std::unique_ptr<TextChain> m_pTextChain;
+
+
+public:
+ std::shared_ptr<SvxForbiddenCharactersTable> mpForbiddenCharactersTable;
+
+ std::unique_ptr<SdrOutlinerCache> mpOutlinerCache;
+ //get a vector of all the SdrOutliner belonging to the model
+ std::vector<SdrOutliner*> GetActiveOutliners() const;
+ std::unique_ptr<SdrModelImpl> mpImpl;
+ CharCompressType mnCharCompressType;
+ sal_uInt16 mnHandoutPageCount;
+ bool mbModelLocked;
+ bool mbKernAsianPunctuation;
+ bool mbAddExtLeading;
+ bool mbInDestruction;
+
+ // Color, Dash, Line-End, Hatch, Gradient, Bitmap property lists ...
+ o3tl::enumarray<XPropertyListType, XPropertyListRef> maProperties;
+
+ sal_uInt16 getHandoutPageCount() const { return mnHandoutPageCount; }
+ void setHandoutPageCount( sal_uInt16 nHandoutPageCount ) { mnHandoutPageCount = nHandoutPageCount; }
+
+ // Adapt to given Size and Borders scaling all contained data, maybe
+ // including PresObj's in higher derivations
+ virtual void adaptSizeAndBorderForAllPages(
+ const Size& rNewSize,
+ tools::Long nLeft = 0,
+ tools::Long nRight = 0,
+ tools::Long nUpper = 0,
+ tools::Long nLower = 0);
+
+protected:
+ virtual css::uno::Reference< css::uno::XInterface > createUnoModel();
+
+private:
+ SdrModel(const SdrModel& rSrcModel) = delete;
+ void operator=(const SdrModel& rSrcModel) = delete;
+ bool operator==(const SdrModel& rCmpModel) const = delete;
+ SVX_DLLPRIVATE void ImpPostUndoAction(std::unique_ptr<SdrUndoAction> pUndo);
+ SVX_DLLPRIVATE void ImpSetUIUnit();
+ SVX_DLLPRIVATE void ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit = false );
+ SVX_DLLPRIVATE void ImpReformatAllTextObjects();
+ SVX_DLLPRIVATE void ImpReformatAllEdgeObjects();
+ SVX_DLLPRIVATE void ImpCreateTables(bool bDisablePropertyFiles);
+
+ // this is a weak reference to a possible living api wrapper for this model
+ css::uno::Reference< css::uno::XInterface > mxUnoModel;
+
+ // used to disable unique name checking during page move
+ bool mbMakePageObjectsNamesUnique = true;
+
+public:
+ SVX_DLLPRIVATE virtual bool IsCreatingDataObj() const { return false; }
+ bool IsTransportContainer() const { return m_bTransportContainer; }
+ bool IsPasteResize() const { return m_bPasteResize; }
+ void SetPasteResize(bool bOn) { m_bPasteResize=bOn; }
+ // If a custom Pool is put here, the class will call methods
+ // on it (Put(), Remove()). On disposal of SdrModel the pool
+ // will be deleted with delete.
+ // If you give NULL instead, it will create an own pool (SdrItemPool)
+ // which will also be disposed in the destructor.
+ // If you do use a custom Pool, make sure you inherit from SdrItemPool,
+ // if you want to use symbol objects inherited from SdrAttrObj.
+ // If, however, you use objects inheriting from SdrObject you are free
+ // to choose a pool of your liking.
+ //
+ // tdf#118731 a bDisablePropertyFiles of true will disable ability to load
+ // XPropertyFiles describing defaults. Useful for UI preview widgets
+ explicit SdrModel(
+ SfxItemPool* pPool = nullptr,
+ ::comphelper::IEmbeddedHelper* pPers = nullptr,
+ bool bDisablePropertyFiles = false);
+ virtual ~SdrModel() override;
+ void ClearModel(bool bCalledFromDestructor);
+
+ // Override this to enable the Swap/LoadOnDemand of graphics.
+ // If rbDeleteAfterUse is set to sal_True the SvStream instance from
+ // the caller will be disposed after use.
+ // If this method returns NULL, a temporary file will be allocated for
+ // swapping.
+ // The stream from which the model was loaded or in which is was saved last
+ // needs to be delivered
+ virtual css::uno::Reference<
+ css::embed::XStorage> GetDocumentStorage() const;
+ css::uno::Reference<
+ css::io::XInputStream >
+ GetDocumentStream(OUString const& rURL,
+ ::comphelper::LifecycleProxy const & rProxy) const;
+ // Change the template attributes of the symbol objects to hard attributes
+ void BurnInStyleSheetAttributes();
+ // If you inherit from SdrPage you also need to inherit from SdrModel
+ // and implement both VM AllocPage() and AllocModel()...
+ virtual rtl::Reference<SdrPage> AllocPage(bool bMasterPage);
+ virtual SdrModel* AllocModel() const;
+
+ // Changes on the layers set the modified flag and broadcast on the model!
+ const SdrLayerAdmin& GetLayerAdmin() const { return *m_pLayerAdmin; }
+ SdrLayerAdmin& GetLayerAdmin() { return *m_pLayerAdmin; }
+
+ const SfxItemPool& GetItemPool() const { return *m_pItemPool; }
+ SfxItemPool& GetItemPool() { return *m_pItemPool; }
+
+ SdrOutliner& GetDrawOutliner(const SdrTextObj* pObj=nullptr) const;
+
+ SdrOutliner& GetHitTestOutliner() const { return *m_pHitTestOutliner; }
+ const SdrTextObj* GetFormattingTextObj() const;
+ // put the TextDefaults (Font,Height,Color) in a Set
+ void SetTextDefaults() const;
+ static void SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt );
+
+ SdrOutliner& GetChainingOutliner(const SdrTextObj* pObj) const;
+ TextChain * GetTextChain() const;
+
+ // ReferenceDevice for the EditEngine
+ void SetRefDevice(OutputDevice* pDev);
+ OutputDevice* GetRefDevice() const { return m_pRefOutDev.get(); }
+ // If a new MapMode is set on the RefDevice (or similar)
+ void RefDeviceChanged(); // not yet implemented
+ // default font height in logical units
+ void SetDefaultFontHeight(sal_Int32 nVal);
+ // default tabulator width for the EditEngine
+ void SetDefaultTabulator(sal_uInt16 nVal);
+ sal_uInt16 GetDefaultTabulator() const { return m_nDefaultTabulator; }
+
+ // The DefaultStyleSheet will be used in every symbol object which is inserted
+ // in this model and does not have a StyleSheet set.
+ SfxStyleSheet* GetDefaultStyleSheet() const { return m_pDefaultStyleSheet; }
+ void SetDefaultStyleSheet(SfxStyleSheet* pDefSS) { m_pDefaultStyleSheet = pDefSS; }
+
+ // #i119287# default StyleSheet for SdrGrafObj and SdrOle2Obj
+ SfxStyleSheet* GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj() const { return mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj; }
+ void SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(SfxStyleSheet* pDefSS) { mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj = pDefSS; }
+
+ sfx2::LinkManager* GetLinkManager() { return m_pLinkManager; }
+ void SetLinkManager( sfx2::LinkManager* pLinkMgr ) { m_pLinkManager = pLinkMgr; }
+
+ ::comphelper::IEmbeddedHelper* GetPersist() const { return m_pEmbeddedHelper; }
+ void SetPersist( ::comphelper::IEmbeddedHelper *p ) { m_pEmbeddedHelper = p; }
+
+ // Unit for the symbol coordination
+ // Default is 1 logical unit = 1/100mm (Unit=MapUnit::Map100thMM, Fract=(1,1)).
+ // Examples:
+ // MapUnit::MapPoint, Fraction(72,1) : 1 log Einh = 72 Point = 1 Inch
+ // MapUnit::MapPoint, Fraction(1,20) : 1 log Einh = 1/20 Point = 1 Twip
+ // MapUnit::MapTwip, Fraction(1,1) : 1 log Einh = 1 Twip
+ // MapUnit::Map100thMM, Fraction(1,10) : 1 log Einh = 1/1000mm
+ // MapUnit::MapMM, Fraction(1000,1) : 1 log Einh = 1000mm = 1m
+ // MapUnit::MapCM, Fraction(100,1) : 1 log Einh = 100cm = 1m
+ // MapUnit::MapCM, Fraction(100000,1): 1 log Einh = 100000cm = 1km
+ // (FWIW: you cannot represent light years).
+ // The scaling unit is needed for the Engine to serve the Clipboard
+ // with the correct sizes.
+ MapUnit GetScaleUnit() const { return m_eObjUnit; }
+ void SetScaleUnit(MapUnit eMap);
+ const Fraction& GetScaleFraction() const { return m_aObjUnit; }
+ void SetScaleFraction(const Fraction& rFrac);
+ // Setting both simultaneously performs a little better
+ void SetScaleUnit(MapUnit eMap, const Fraction& rFrac);
+
+ // maximal size e.g. for auto growing texts
+ const Size& GetMaxObjSize() const { return m_aMaxObjSize; }
+ void SetMaxObjSize(const Size& rSiz) { m_aMaxObjSize=rSiz; }
+
+ // For the View! to display sane numbers in the status bar: Default is mm.
+ void SetUIUnit(FieldUnit eUnit);
+ FieldUnit GetUIUnit() const { return m_eUIUnit; }
+ // The scale of the drawing. Default 1/1.
+ void SetUIScale(const Fraction& rScale);
+ const Fraction& GetUIScale() const { return m_aUIScale; }
+ // Setting both simultaneously performs a little better
+ void SetUIUnit(FieldUnit eUnit, const Fraction& rScale);
+
+ static OUString GetUnitString(FieldUnit eUnit);
+ OUString GetMetricString(tools::Long nVal, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const;
+ static OUString GetAngleString(Degree100 nAngle);
+ static OUString GetPercentString(const Fraction& rVal);
+
+ // RecalcPageNums is ordinarily only called by the Page.
+ bool IsPagNumsDirty() const { return m_bPagNumsDirty; };
+ bool IsMPgNumsDirty() const { return m_bMPgNumsDirty; };
+ void RecalcPageNums(bool bMaster);
+ // After the Insert the Page belongs to the SdrModel.
+ virtual void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
+ virtual void DeletePage(sal_uInt16 nPgNum);
+ // Remove means transferring ownership to the caller (opposite of Insert)
+ virtual rtl::Reference<SdrPage> RemovePage(sal_uInt16 nPgNum);
+ virtual void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
+ const SdrPage* GetPage(sal_uInt16 nPgNum) const;
+ SdrPage* GetPage(sal_uInt16 nPgNum);
+ sal_uInt16 GetPageCount() const;
+ virtual void PageListChanged();
+
+ // Masterpages
+ virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
+ void DeleteMasterPage(sal_uInt16 nPgNum);
+ // Remove means transferring ownership to the caller (opposite of Insert)
+ virtual rtl::Reference<SdrPage> RemoveMasterPage(sal_uInt16 nPgNum);
+ void MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
+ const SdrPage* GetMasterPage(sal_uInt16 nPgNum) const;
+ SdrPage* GetMasterPage(sal_uInt16 nPgNum);
+ sal_uInt16 GetMasterPageCount() const;
+ virtual void MasterPageListChanged();
+
+ // modified flag. Is set automatically when something changes on the Pages
+ // symbol objects. You need to reset it yourself, however, e.g. on Save().
+ bool IsChanged() const { return mbChanged; }
+ virtual void SetChanged(bool bFlg = true);
+
+ // If set to sal_True, graphics from graphics objects will:
+ // - not be loaded immediately when loading a document,
+ // but only once they are needed (e.g. displayed).
+ // - be pruned from memory if they are not needed.
+ // For that to work, override the virtual method GetDocumentStream().
+ // Default=FALSE. Flag is not persistent.
+ bool IsSwapGraphics() const { return m_bSwapGraphics; }
+ void SetSwapGraphics();
+
+ // Text frames without filling can be select with a mouse click by default (sal_False).
+ // With this flag set to true you can hit them only in the area in which text is to be
+ // found.
+ bool IsPickThroughTransparentTextFrames() const { return m_bTransparentTextFrames; }
+ void SetPickThroughTransparentTextFrames(bool bOn) { m_bTransparentTextFrames=bOn; }
+
+ // Can the model be changed at all?
+ // Is only evaluated by the possibility methods of the View.
+ // Direct manipulations on the model, ... do not respect this flag.
+ // Override this and return the appropriate ReadOnly status
+ // of the files, i.e. true or false. (Method is called multiple
+ // times, so use one flag only!)
+ virtual bool IsReadOnly() const;
+ void SetReadOnly(bool bYes);
+
+ // Mixing two SdrModels. Mind that rSourceModel is not const.
+ // The pages will not be copied but moved, when inserted.
+ // rSourceModel may very well be empty afterwards.
+ // nFirstPageNum,nLastPageNum: The pages to take from rSourceModel
+ // nDestPos..................: position to insert
+ // bMergeMasterPages.........: sal_True = needed MasterPages will be taken
+ // from rSourceModel
+ // sal_False= the MasterPageDescriptors of
+ // the pages of the rSourceModel will be
+ // mapped on the existing MasterPages.
+ // bUndo.....................: An undo action is generated for the merging.
+ // Undo is only for the target model, not for the
+ // rSourceModel.
+ // bTreadSourceAsConst.......: sal_True=the SourceModel will not be changed,
+ // so pages will be copied.
+ virtual void Merge(SdrModel& rSourceModel,
+ sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
+ sal_uInt16 nDestPos,
+ bool bMergeMasterPages, bool bAllMasterPages,
+ bool bUndo = true, bool bTreadSourceAsConst = false);
+
+ // Behaves like Merge(SourceModel=DestModel,nFirst,nLast,nDest,sal_False,sal_False,bUndo,!bMoveNoCopy);
+ void CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
+ sal_uInt16 nDestPos,
+ bool bUndo, bool bMoveNoCopy);
+
+ // BegUndo() / EndUndo() enables you to group arbitrarily many UndoActions
+ // arbitrarily deeply. As comment for the UndoAction the first BegUndo(String) of all
+ // nestings will be used.
+ // In that case the NotifyUndoActionHdl will be called on the last EndUndo().
+ // No UndoAction will be generated for an empty group.
+ // All direct modifications on the SdrModel do not create an UndoActions.
+ // Actions on the SdrView however do generate those.
+ void BegUndo(); // open Undo group
+ void BegUndo(const OUString& rComment); // open Undo group
+ void BegUndo(const OUString& rComment, const OUString& rObjDescr, SdrRepeatFunc eFunc); // open Undo group
+ void EndUndo(); // close Undo group
+ void AddUndo(std::unique_ptr<SdrUndoAction> pUndo);
+ sal_uInt16 GetUndoBracketLevel() const { return m_nUndoLevel; }
+ // only after the first BegUndo or before the last EndUndo:
+ void SetUndoComment(const OUString& rComment);
+ void SetUndoComment(const OUString& rComment, const OUString& rObjDescr);
+
+ // The Undo management is only done if NotifyUndoAction-Handler is not set.
+ // Default is 16. Minimal MaxUndoActionCount is 1.
+ void SetMaxUndoActionCount(sal_uInt32 nCount);
+ void ClearUndoBuffer();
+
+ bool HasUndoActions() const;
+ bool HasRedoActions() const;
+ void Undo();
+ void Redo();
+ void Repeat(SfxRepeatTarget&);
+
+ // The application can set a handler here which collects the UndoActions einsammelt.
+ // The handler has the following signature:
+ // void NotifyUndoActionHdl(SfxUndoAction* pUndoAction);
+ // When calling the handler ownership is transferred;
+ // The UndoAction belongs to the Handler, not the SdrModel.
+ void SetNotifyUndoActionHdl(const std::function<void(std::unique_ptr<SdrUndoAction>)>& rLink) { m_aUndoLink=rLink; }
+
+ /** application can set its own undo manager, BegUndo, EndUndo and AddUndoAction
+ calls are routed to this interface if given */
+ void SetSdrUndoManager( SfxUndoManager* pUndoManager );
+ SfxUndoManager* GetSdrUndoManager() const;
+
+ /** applications can set their own undo factory to override creation of
+ undo actions. The SdrModel will become owner of the given SdrUndoFactory
+ and delete it upon its destruction. */
+ void SetSdrUndoFactory( SdrUndoFactory* pUndoFactory );
+
+ /** returns the models undo factory. This must be used to create
+ undo actions for this model. */
+ SdrUndoFactory& GetSdrUndoFactory() const;
+
+ // Accessor methods for Palettes, Lists and Tables
+ // FIXME: this badly needs re-factoring...
+ const XPropertyListRef& GetPropertyList( XPropertyListType t ) const { return maProperties[ t ]; }
+ void SetPropertyList( XPropertyListRef const & p ) { maProperties[ p->Type() ] = p; }
+
+ // friendlier helpers
+ XDashListRef GetDashList() const { return XPropertyList::AsDashList(GetPropertyList( XPropertyListType::Dash )); }
+ XHatchListRef GetHatchList() const { return XPropertyList::AsHatchList(GetPropertyList( XPropertyListType::Hatch )); }
+ XColorListRef GetColorList() const { return XPropertyList::AsColorList(GetPropertyList( XPropertyListType::Color )); }
+ XBitmapListRef GetBitmapList() const { return XPropertyList::AsBitmapList(GetPropertyList( XPropertyListType::Bitmap )); }
+ XPatternListRef GetPatternList() const { return XPropertyList::AsPatternList(GetPropertyList( XPropertyListType::Pattern )); }
+ XLineEndListRef GetLineEndList() const { return XPropertyList::AsLineEndList(GetPropertyList( XPropertyListType::LineEnd )); }
+ XGradientListRef GetGradientList() const { return XPropertyList::AsGradientList(GetPropertyList( XPropertyListType::Gradient )); }
+
+ // The DrawingEngine only references the StyleSheetPool, whoever
+ // made it needs to delete it.
+ SfxStyleSheetBasePool* GetStyleSheetPool() const { return mxStyleSheetPool.get(); }
+ void SetStyleSheetPool(SfxStyleSheetBasePool* pPool) { mxStyleSheetPool=pPool; }
+
+ void SetTheme(std::unique_ptr<svx::Theme> pTheme);
+ svx::Theme* GetTheme();
+
+ void SetStarDrawPreviewMode(bool bPreview);
+ bool IsStarDrawPreviewMode() const { return m_bStarDrawPreviewMode; }
+
+ bool GetDisableTextEditUsesCommonUndoManager() const { return mbDisableTextEditUsesCommonUndoManager; }
+ void SetDisableTextEditUsesCommonUndoManager(bool bNew) { mbDisableTextEditUsesCommonUndoManager = bNew; }
+
+ css::uno::Reference< css::uno::XInterface > const & getUnoModel();
+ void setUnoModel( const css::uno::Reference< css::uno::XInterface >& xModel );
+
+ // these functions are used by the api to disable repaints during a
+ // set of api calls.
+ bool isLocked() const { return mbModelLocked; }
+ void setLock( bool bLock );
+
+ void SetForbiddenCharsTable( const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars );
+ const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharsTable() const { return mpForbiddenCharactersTable;}
+
+ void SetCharCompressType( CharCompressType nType );
+ CharCompressType GetCharCompressType() const { return mnCharCompressType; }
+
+ void SetKernAsianPunctuation( bool bEnabled );
+ bool IsKernAsianPunctuation() const { return mbKernAsianPunctuation; }
+
+ void SetAddExtLeading( bool bEnabled );
+ bool IsAddExtLeading() const { return mbAddExtLeading; }
+
+ // tdf#99729 compatibility flag
+ void SetAnchoredTextOverflowLegacy(bool bEnabled);
+ bool IsAnchoredTextOverflowLegacy() const;
+
+ void ReformatAllTextObjects();
+
+ std::unique_ptr<SdrOutliner> createOutliner( OutlinerMode nOutlinerMode );
+ void disposeOutliner( std::unique_ptr<SdrOutliner> pOutliner );
+
+ bool IsWriter() const { return m_bIsWriter; }
+
+ // Used as a fallback in *::ReadUserDataSequence() to process common properties
+ void ReadUserDataSequenceValue(const css::beans::PropertyValue *pValue);
+ void WriteUserDataSequence(css::uno::Sequence < css::beans::PropertyValue >& rValues);
+
+ /** returns the numbering type that is used to format page fields in drawing shapes */
+ virtual SvxNumType GetPageNumType() const;
+
+ /** copies the items from the source set to the destination set. Both sets must have
+ same ranges but can have different pools. */
+ static void MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModel );
+
+ bool IsInDestruction() const { return mbInDestruction;}
+
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ /** enables (true) or disables (false) recording of undo actions
+ If undo actions are added while undo is disabled, they are deleted.
+ Disabling undo does not clear the current undo buffer! */
+ void EnableUndo( bool bEnable );
+
+ /** returns true if undo is currently enabled
+ This returns false if undo was disabled using EnableUndo( false ) and
+ also during the runtime of the Undo() and Redo() methods. */
+ bool IsUndoEnabled() const;
+
+ // used to prevent object name change during page move
+ bool DoesMakePageObjectsNamesUnique() const { return mbMakePageObjectsNamesUnique; }
+ void DoMakePageObjectsNamesUnique(bool bDo) { mbMakePageObjectsNamesUnique = bDo; }
+
+ virtual sal_Int32 getImagePreferredDPI() const { return 0; }
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+ bool IsVOCInvalidationIsReliable() const { return mbVOCInvalidationIsReliable; }
+ void SetVOCInvalidationIsReliable(bool b) { mbVOCInvalidationIsReliable = b; }
+};
+
+/*
+ +-----------+
+ | SdrModel |
+ +--+------+-+
+ | +-----------+
+ +----+-----+ |
+ | ... | |
+ +----+---+ +----+---+ +-----+--------+
+ |SdrPage | |SdrPage | |SdrLayerAdmin |
+ +---+----+ +-+--+--++ +---+-------+--+
+ | | | | | +-------------------+
+ +----+----+ +-----+-----+ +-------+-------+
+ | ... | | ... | | ... |
++---+---+ +---+---+ +----+----+ +----+----+ +-----+------+ +------+-----+
+|SdrObj | |SdrObj | |SdrLayer | |SdrLayer | |SdrLayerSet | |SdrLayerSet |
++-------+ +-------+ +---------+ +---------+ +------------+ +------------+
+This class: SdrModel is the head of the data models for the StarView Drawing Engine.
+
+///////////////////////////////////////////////////////////////////////////////////////////////// */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
new file mode 100644
index 000000000..ec9055711
--- /dev/null
+++ b/include/svx/svdmrkv.hxx
@@ -0,0 +1,469 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdmark.hxx>
+#include <svx/svdhdl.hxx>
+#include <svx/svdsnpv.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+#include <basegfx/range/b2drectangle.hxx>
+#include <unotools/resmgr.hxx>
+
+class SfxViewShell;
+
+// The following is not yet implemented, or just partially:
+enum class SdrSearchOptions
+{
+ NONE = 0x0000,
+ DEEP = 0x0001, /* recursive into group objects */
+ ALSOONMASTER = 0x0002, /* MasterPages are also scanned */
+ WHOLEPAGE = 0x0004, /* Not just the ObjList of PageView */
+ TESTMARKABLE = 0x0008, /* just markable objects/points/handles/... */
+ TESTMACRO = 0x0010, /* Just objects with macro */
+ TESTTEXTEDIT = 0x0020, /* Just TextEdit-enabled objects */
+ MARKED = 0x0040, /* Just marked objects/points/... */
+ PASS2BOUND = 0x0080, /* In case of empty search results, then 2nd. try with BoundRectHit */
+ BEFOREMARK = 0x0100, /* if one marked one found, ignore all behind that */
+
+ IMPISMASTER = 0x0200, /* MasterPage is being searched right now */
+ PICKMARKABLE = TESTMARKABLE,
+ PICKTEXTEDIT = DEEP | TESTMARKABLE | TESTTEXTEDIT,
+ PICKMACRO = DEEP | ALSOONMASTER | WHOLEPAGE | TESTMACRO,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrSearchOptions> : is_typed_flags<SdrSearchOptions, 0x03ff> {};
+}
+
+enum class SdrHitKind
+{
+ NONE, // No hit
+ Object, // Hit
+ Handle, // Marking handle
+ HelpLine, // Reference line
+ Gluepoint, // Gluepoint
+ TextEdit, // Open OutlinerView was hit
+ TextEditObj, // Object for SdrBeginTextEdit (Textbereich)
+ UrlField, // Field in TextObj was hit (while it is currently not edited)
+ Macro, // Object for BegMacroObj
+ MarkedObject, // Marked object (e.g. for dragging)
+ UnmarkedObject, // non-marked Object (e.g. for marking)
+ Cell // hit on a cell inside a table shape (outside of the cells text area)
+};
+
+enum class SdrViewEditMode {
+ Edit, // Also known as arrow or pointer mode
+ Create, // Tool for object creation
+ GluePointEdit // Gluepoint editing mode
+};
+
+/** options for ImpGetDescriptionString() */
+enum class ImpGetDescriptionOptions
+{
+ NONE = 0,
+ POINTS = 1,
+ GLUEPOINTS = 2,
+};
+
+class ImplMarkingOverlay;
+class MarkingSubSelectionOverlay;
+
+class SVXCORE_DLLPUBLIC SdrMarkView : public SdrSnapView
+{
+ friend class SdrPageView;
+
+ // #114409#-3 Migrate selections
+ std::unique_ptr<ImplMarkingOverlay> mpMarkObjOverlay;
+ std::unique_ptr<ImplMarkingOverlay> mpMarkPointsOverlay;
+ std::unique_ptr<ImplMarkingOverlay> mpMarkGluePointsOverlay;
+
+ std::unique_ptr<MarkingSubSelectionOverlay> mpMarkingSubSelectionOverlay;
+
+protected:
+ SdrObject* mpMarkedObj; // If not just one object ( i.e. More than one object ) is marked.
+ SdrPageView* mpMarkedPV; // If all marked objects are situated on the same PageView.
+
+ Point maRef1; // Persistent - Rotation center / axis of reflection
+ Point maRef2; // Persistent
+ SdrHdlList maHdlList;
+
+ sdr::ViewSelection maSdrViewSelection;
+
+ std::vector<basegfx::B2DRectangle> maSubSelectionList;
+ tools::Rectangle maMarkedObjRect;
+ tools::Rectangle maMarkedPointsRect;
+ tools::Rectangle maMarkedGluePointsRect;
+
+ static constexpr sal_uInt16 mnFrameHandlesLimit = 50;
+
+ SdrDragMode meDragMode; // Persistent
+ SdrViewEditMode meEditMode; // Persistent
+ SdrViewEditMode meEditMode0; // Persistent
+
+ bool mbDesignMode : 1; // DesignMode for SdrUnoObj
+ bool mbForceFrameHandles : 1; // Persistent - FrameDrag also for single objects
+ bool mbPlusHdlAlways : 1; // Persistent
+ bool mbInsPolyPoint : 1; // at this time InsPolyPointDragging
+ bool mbMarkedObjRectDirty : 1;
+ bool mbMrkPntDirty : 1;
+ bool mbMarkedPointsRectsDirty : 1;
+
+ // flag to completely disable handles at the view
+ bool mbMarkHandlesHidden : 1;
+
+ // flag indicating whether all x coordinates are negated or not
+ bool mbNegativeX : 1;
+
+ // Helper to get a possible GridOffset from SdrObject
+ bool getPossibleGridOffsetForSdrObject(
+ basegfx::B2DVector& rOffset,
+ const SdrObject* pObj,
+ const SdrPageView* pPV) const;
+
+ // Helper to get a possible GridOffset from Position
+ bool getPossibleGridOffsetForPosition(
+ basegfx::B2DVector& rOffset,
+ const basegfx::B2DPoint& rPoint,
+ const SdrPageView* pPV) const;
+
+private:
+ SVX_DLLPRIVATE void ImpSetPointsRects() const;
+ void UndirtyMrkPnt() const;
+
+ void SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const SfxViewShell* pOtherShell);
+ bool dumpGluePointsToJSON(boost::property_tree::ptree& rTree);
+
+protected:
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+ virtual void ModelHasChanged() override; // Is called by the PaintView
+ virtual void SetMarkHandles(SfxViewShell* pOtherShell); // maHdlList - fill (List of handles)
+ void modelHasChangedLOKit();
+ void SetMarkRects(); // Rects at the PageViews
+ void CheckMarked(); // Scan MarkList after Del and Lock Layer ...
+ void AddDragModeHdl(SdrDragMode eMode);
+ virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ virtual bool RequestHelp(const HelpEvent& rHEvt) override;
+
+ // add custom handles (used by other apps, e.g. AnchorPos)
+ virtual void AddCustomHdl();
+
+ void ForceRefToMarked();
+ void ForceUndirtyMrkPnt() const { if (mbMrkPntDirty) UndirtyMrkPnt(); }
+
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const;
+ SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList const * pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj) const;
+ SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList const * pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
+ bool ImpIsFrameHandles() const;
+ OUString ImpGetDescriptionString(TranslateId pStrCacheID, ImpGetDescriptionOptions nOpt=ImpGetDescriptionOptions::NONE) const;
+
+ // Generates a string including degrees symbol, from an angel specification in 1/100deg
+ bool ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark);
+ virtual bool MarkPoints(const tools::Rectangle* pRect, bool bUnmark);
+ bool MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark);
+
+ void SetMoveOutside(bool bOn);
+ bool MarkableObjectsExceed( int n ) const;
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrMarkView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrMarkView() override;
+
+public:
+ virtual bool IsAction() const override;
+ virtual void MovAction(const Point& rPnt) override;
+ virtual void EndAction() override;
+ virtual void BckAction() override;
+ virtual void BrkAction() override;
+ virtual void TakeActionRect(tools::Rectangle& rRect) const override;
+
+ virtual void ClearPageView() override;
+ virtual void HideSdrPage() override;
+ bool IsObjMarkable(SdrObject const * pObj, SdrPageView const * pPV) const;
+
+ // Returns sal_True if objects, points or gluepoints are selected by drawing a frame
+ // (as long as the frame is drawn).
+ bool IsMarking() const { return IsMarkObj() || IsMarkPoints() || IsMarkGluePoints(); }
+
+ // Marking objects by drawing of a selection frame
+ void BegMarkObj(const Point& rPnt, bool bUnmark = false);
+ void MovMarkObj(const Point& rPnt);
+ bool EndMarkObj();
+ void BrkMarkObj();
+ bool IsMarkObj() const { return (nullptr != mpMarkObjOverlay); }
+
+ // DragModes: SDRDRAG_CREATE,SdrDragMode::Move,SdrDragMode::Resize,SdrDragMode::Rotate,SdrDragMode::Mirror,SdrDragMode::Shear,SdrDragMode::Crook
+ // Move==Resize
+ // The interface might maybe be changed in the future because of Ortho-Drag
+ void SetDragMode(SdrDragMode eMode);
+ SdrDragMode GetDragMode() const { return meDragMode; }
+ void SetFrameHandles(bool bOn);
+ bool IsFrameHandles() const { return mbForceFrameHandles; }
+
+ // returns true if number of markable objects is greater than 1
+ bool HasMultipleMarkableObjects() const { return MarkableObjectsExceed(1); };
+
+ void SetEditMode(SdrViewEditMode eMode);
+ SdrViewEditMode GetEditMode() const { return meEditMode; }
+
+ void SetEditMode(bool bOn) { SetEditMode(bOn?SdrViewEditMode::Edit:SdrViewEditMode::Create); }
+ bool IsEditMode() const { return meEditMode==SdrViewEditMode::Edit; }
+ void SetCreateMode(bool bOn) { SetEditMode(bOn?SdrViewEditMode::Create:SdrViewEditMode::Edit); }
+ bool IsCreateMode() const { return meEditMode==SdrViewEditMode::Create; }
+ void SetGluePointEditMode(bool bOn) { SetEditMode(bOn?SdrViewEditMode::GluePointEdit:meEditMode0); }
+ bool IsGluePointEditMode() const { return meEditMode==SdrViewEditMode::GluePointEdit; }
+
+ void SetDesignMode(bool bOn = true);
+ bool IsDesignMode() const { return mbDesignMode; }
+
+ void SetFrameDragSingles(bool bOn=true) { SetFrameHandles(bOn); }
+ bool IsFrameDragSingles() const { return IsFrameHandles(); }
+
+ bool HasMarkableObj() const { return MarkableObjectsExceed(0); };
+
+ /// whether all x coordinates in use are negated or not
+ void SetNegativeX(bool bOn) { mbNegativeX = bOn; }
+ bool IsNegativeX() const { return mbNegativeX; }
+
+// migrate selections
+
+protected:
+ // all available changing methods
+ SdrMarkList& GetMarkedObjectListWriteAccess() { return maSdrViewSelection.GetMarkedObjectListWriteAccess(); }
+
+public:
+ // all available const methods for read access to selection
+ const SdrMarkList& GetMarkedObjectList() const { return maSdrViewSelection.GetMarkedObjectList(); }
+ // returns SAL_MAX_SIZE if not found
+ size_t TryToFindMarkedObject(const SdrObject* pObj) const { return GetMarkedObjectList().FindObject(pObj); }
+ SdrPageView* GetSdrPageViewOfMarkedByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetPageView(); }
+ SdrMark* GetSdrMarkByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum); }
+ SdrObject* GetMarkedObjectByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetMarkedSdrObj(); }
+ size_t GetMarkedObjectCount() const { return GetMarkedObjectList().GetMarkCount(); }
+ void SortMarkedObjects() const { GetMarkedObjectList().ForceSort(); }
+ bool AreObjectsMarked() const { return 0 != GetMarkedObjectList().GetMarkCount(); }
+ OUString const & GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); }
+ OUString const & GetDescriptionOfMarkedPoints() const { return GetMarkedObjectList().GetPointMarkDescription(); }
+ OUString const & GetDescriptionOfMarkedGluePoints() const { return GetMarkedObjectList().GetGluePointMarkDescription(); }
+
+ // Get a list of all those links which are connected to marked nodes,
+ // but which are not marked themselves.
+ const SdrMarkList& GetEdgesOfMarkedNodes() const { return maSdrViewSelection.GetEdgesOfMarkedNodes(); }
+ const SdrMarkList& GetMarkedEdgesOfMarkedNodes() const { return maSdrViewSelection.GetMarkedEdgesOfMarkedNodes(); }
+ const std::vector<SdrObject*>& GetTransitiveHullOfMarkedObjects() const { return maSdrViewSelection.GetAllMarkedObjects(); }
+
+
+ // mechanism to complete disable handles at the view. Handles will be hidden and deleted
+ // when set, no new ones created, no interaction allowed. Handles will be recreated and shown
+ // when reset. Default is false.
+ void hideMarkHandles();
+ void showMarkHandles();
+ bool areMarkHandlesHidden() const { return mbMarkHandlesHidden; }
+
+ bool IsMarkedHit(const Point& rPnt, short nTol=-2) const { return IsMarkedObjHit(rPnt,nTol); }
+ bool IsMarkedObjHit(const Point& rPnt, short nTol=-2) const;
+
+ SdrHdl* PickHandle(const Point& rPnt) const;
+
+ // Pick: Supported options for nOptions are:
+ // SdrSearchOptions::DEEP SdrSearchOptions::ALSOONMASTER SdrSearchOptions::TESTMARKABLE SdrSearchOptions::TESTTEXTEDIT
+ // SdrSearchOptions::MARKED
+ // SdrSearchOptions::WHOLEPAGE
+ SdrObject* PickObj(const Point& rPnt, short nTol, SdrPageView*& rpPV, SdrSearchOptions nOptions, SdrObject** ppRootObj, bool* pbHitPassDirect=nullptr) const;
+ SdrObject* PickObj(const Point& rPnt, short nTol, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const;
+ bool MarkObj(const Point& rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false);
+
+ // Pick: Supported options for nOptions are SdrSearchOptions::PASS2BOUND
+ bool PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const;
+
+ // Selects the most upper of the marked objects (O1) and scans from there
+ // towards bottom direction, selecting the first non-marked object (O2).
+ // In case of success the marking of O1 is deleted, a marking is created at
+ // O2 and TRUE is returned. With the parameter bPrev=sal_True the scan
+ // direction is turned to the other direction.
+ bool MarkNextObj(bool bPrev=false);
+
+ // Selects the most upper of the marked objects which is hit by rPnt/nTol
+ // and scans from there to bottom direction, selecting the first non-marked
+ // object (O2). In case of success the marking of O1 is deleted, a marking
+ // is created at O2 and sal_True is returned. With the parameter
+ // bPrev=sal_True the scan direction is turned to the other direction.
+ bool MarkNextObj(const Point& rPnt, short nTol, bool bPrev);
+
+ // Mark all objects within a rectangular area
+ // Just objects are marked which are inclosed completely
+ void MarkObj(const tools::Rectangle& rRect, bool bUnmark);
+ void MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark = false, bool bDoNoSetMarkHdl = false,
+ std::vector<basegfx::B2DRectangle> && rSubSelections = std::vector<basegfx::B2DRectangle>());
+ void MarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages
+ void UnmarkAllObj(SdrPageView const * pPV=nullptr); // pPage=NULL => all displayed pages
+
+ // This function is time-consuming intensive, as the MarkList has to be scanned.
+ bool IsObjMarked(SdrObject const * pObj) const;
+ void UnMarkAll(SdrPageView const * pPV=nullptr) { UnmarkAllObj(pPV); }
+
+ // Request/set the size of the marking handles. Declaration in Pixel.
+ // The value is meant to be the edge length ( link length ).
+ // Pair values are round up to impair values: 3->3, 4->5, 5->5, 6->7, 7->7, ...
+ // Default value is 7, minimum value is 3 Pixels.
+ sal_uInt16 GetMarkHdlSizePixel() const;
+ void SetMarkHdlSizePixel(sal_uInt16 nSiz);
+
+ virtual bool HasMarkablePoints() const;
+ virtual sal_Int32 GetMarkablePointCount() const;
+ virtual bool HasMarkedPoints() const;
+
+ // There might be points which can't be marked:
+ bool IsPointMarkable(const SdrHdl& rHdl) const;
+ virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark=false);
+
+ /** should only be used from outside svx for special ui elements */
+ bool MarkPointHelper(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark);
+
+ bool UnmarkPoint(SdrHdl& rHdl) { return MarkPoint(rHdl,true); }
+ bool IsPointMarked(const SdrHdl& rHdl) const { ForceUndirtyMrkPnt(); return rHdl.IsSelected(); }
+ bool MarkAllPoints() { return MarkPoints(nullptr,false); }
+ bool UnmarkAllPoints() { return MarkPoints(nullptr,true); }
+
+ // Selects the first marked point (P1) which is hit by rPnt
+ // and from there it searches the first non-marked point(P2).
+ // In case of success the marking of
+ // P1 is deleted, a mark is set at P2.
+ void MarkNextPoint();
+
+ // Search for the number of the suitable handle. In case of empty search result,
+ // SAL_MAX_SIZE is returned.
+ size_t GetHdlNum(SdrHdl const * pHdl) const { return maHdlList.GetHdlNum(pHdl); }
+ SdrHdl* GetHdl(size_t nHdlNum) const { return maHdlList.GetHdl(nHdlNum); }
+ const SdrHdlList& GetHdlList() const { return maHdlList; }
+
+ // Draw a selection frame for marking of points.
+ // This routine will just be started in case that HasMarkablePoints() returns sal_True.
+ bool BegMarkPoints(const Point& rPnt, bool bUnmark = false);
+ void MovMarkPoints(const Point& rPnt);
+ bool EndMarkPoints();
+ void BrkMarkPoints();
+ bool IsMarkPoints() const { return (nullptr != mpMarkPointsOverlay); }
+
+ // Select that additional handles are displayed permanently.
+ void SetPlusHandlesAlwaysVisible(bool bOn);
+ bool IsPlusHandlesAlwaysVisible() const { return mbPlusHdlAlways; }
+
+ bool HasMarkableGluePoints() const;
+ bool HasMarkedGluePoints() const;
+
+ // A gluepoint is clearly identified by the SdrObject
+ // (to which it belongs) as well as by a sal_uInt16 nId (as each SdrObject may consist of
+ // several gluepoints. Here at the View there is an additional
+ // SdrPageView, which should be defined correctly always.
+ // Alternatively a gluepoint may be characterized by a SdrHdl.
+ // In this case the SdrHdl instance consists of all required information.
+ // And in this case, the gluepoint are always is marked by enforcement
+ // (Handlers are just situated at marked gluepoints )
+ // Attention: With each change of the gluepoint status the handle list is re-calculated.
+ // All previously saved SdrHdl* became invalid by this, the same with the point IDs!
+ bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV) const;
+ bool MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, bool bUnmark);
+ void UnmarkGluePoint(const SdrObject* pObj, sal_uInt16 nId) { MarkGluePoint(pObj,nId,true); }
+ bool IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const;
+
+ // Get the Hdl (handle) of a marked GluePoint. Non-marked
+ // GluePoints don`t have handles
+ SdrHdl* GetGluePointHdl(const SdrObject* pObj, sal_uInt16 nId) const;
+
+ // Mark all points within this rectangular (View coordinates)
+ bool MarkAllGluePoints() { return MarkGluePoints(nullptr,false); }
+ bool UnmarkAllGluePoints() { return MarkGluePoints(nullptr,true); }
+
+ // Selects the first marked point (P1) which is hit by rPnt
+ // and from there it searches the first non-marked point(P2).
+ // In case of success the marking of
+ // P1 is deleted, a mark is set at P2.
+ void MarkNextGluePoint();
+
+ // Draw a selection frame for gluepoint marking.
+ // This routine will just be started in case that HasMarkablePoints() returns sal_True.
+ // The GlueEditMode sal_True is disregarded.
+ // bool BegMarkGluePoints(const Point& rPnt, OutputDevice* pOut);
+ bool BegMarkGluePoints(const Point& rPnt, bool bUnmark = false);
+ void MovMarkGluePoints(const Point& rPnt);
+ void EndMarkGluePoints();
+ void BrkMarkGluePoints();
+ bool IsMarkGluePoints() const { return (nullptr != mpMarkGluePointsOverlay); }
+
+ // bRestraintPaint=sal_False causes the handles not to be drawn immediately.
+ // AdjustMarkHdl is just called in case of changes; usually this causes an Invalidate
+ // At the end of a redraw the handles are drawn automatically.
+ // The purpose is to avoid unnecessary flickering. -> This does not yet work, that's why sal_True!
+ void AdjustMarkHdl(SfxViewShell* pOtherShell = nullptr); //HMHBOOL bRestraintPaint=sal_True);
+
+ const tools::Rectangle& GetMarkedObjRect() const; // SnapRects of Objects, without line width
+ tools::Rectangle GetMarkedObjBoundRect() const; // incl. line width, overlapping rags, ...
+ const tools::Rectangle& GetMarkedPointsRect() const; // Enclosing rectangle of all marked points
+ const tools::Rectangle& GetMarkedGluePointsRect() const; // Enclosing rectangle of all marked gluepoints
+ const tools::Rectangle& GetAllMarkedRect() const { return GetMarkedObjRect(); }
+ tools::Rectangle GetAllMarkedBoundRect() const { return GetMarkedObjBoundRect(); }
+
+ // Will be always called, if the list of marked objects might be changed.
+ // If you override this method, be sure that you call the
+ // methods of the base class!
+ virtual void MarkListHasChanged();
+
+ // Entering (Editing) of a maybe marked object group. If there are several
+ // object groups marked, the most upper group is selected. After that
+ // all member objects of the group are directly accessible. All other
+ // objects may not be processed in the meantime (until the next
+ // LeaveGroup()). With markings which overlaps pages, every page is processed
+ // separately. The method returns sal_True, if at least one group was entered.
+ void EnterMarkedGroup();
+
+ // Rotation center point and start point of the axis of reflection, respectively
+ const Point& GetRef1() const { return maRef1; }
+ void SetRef1(const Point& rPt);
+
+ // End point of the axis of reflection
+ const Point& GetRef2() const { return maRef2; }
+ void SetRef2(const Point& rPt);
+ /// Get access to the view shell owning this draw view, if any.
+ virtual SfxViewShell* GetSfxViewShell() const;
+};
+
+
+// - Hit tolerances:
+// It has to be declared in logical coordinates. So please translate the
+// wanted pixel value with PixelToLogic in Logical values.
+// Taking as example a logical value of 100:
+// - For a horizontal hairline (Object with height 0), the generated data is +/-100, i.e.
+// a vertical area of 200 logical units is sensitive.
+// - For a polygon, a rectangular of the size (200,200) is generated and a
+// touch test between Poly and this Rect is processed.
+// - Objects which respond SdrObject::HasEdit()==TRUE ( e.g. a text frame ),
+// are specially treated: An additional sensitive area with a width of
+// 2*Tol (200 units for this example) is created around the object.
+// When an object is directly hit, the Edit method is called.
+// In opposite, a hit in the surrounding sensitive area enables Dragging.
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
new file mode 100644
index 000000000..e161db2a7
--- /dev/null
+++ b/include/svx/svdoashp.hxx
@@ -0,0 +1,253 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdobj.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdhdl.hxx>
+#include <vector>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/drawing/XCustomShapeEngine.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+
+namespace sdr
+{
+ namespace properties
+ {
+ class CustomShapeProperties;
+ }
+}
+
+class SdrAShapeObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ bool bMirroredX;
+ bool bMirroredY;
+ double fObjectRotation;
+
+ css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
+};
+
+enum class CustomShapeHandleModes
+{
+ NONE = 0,
+ RESIZE_FIXED = 1,
+ CREATE_FIXED = 2,
+ RESIZE_ABSOLUTE_X = 4,
+ RESIZE_ABSOLUTE_Y = 8,
+ MOVE_SHAPE = 16,
+ ORTHO4 = 32,
+ RESIZE_ABSOLUTE_NEGX = 64
+};
+
+namespace o3tl
+{
+ template<> struct typed_flags<CustomShapeHandleModes> : is_typed_flags<CustomShapeHandleModes, 127> {};
+}
+
+struct SdrCustomShapeInteraction
+{
+ css::uno::Reference< css::drawing::XCustomShapeHandle > xInteraction;
+ css::awt::Point aPosition;
+ CustomShapeHandleModes nMode;
+};
+
+class SVXCORE_DLLPUBLIC SdrObjCustomShape : public SdrTextObj
+{
+private:
+ // fObjectRotation is containing the object rotation in degrees.
+ double fObjectRotation;
+ bool mbAdjustingTextFrameWidthAndHeight;
+
+protected:
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual void setUnoShape(const css::uno::Reference<css::drawing::XShape>& rxUnoShape) override;
+
+public:
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ // to allow sdr::properties::CustomShapeProperties access
+ friend class sdr::properties::CustomShapeProperties;
+
+ css::uno::Reference< css::drawing::XShape > mXRenderedCustomShape;
+
+ mutable css::uno::Reference< css::drawing::XCustomShapeEngine > mxCustomShapeEngine;
+
+ // #i37011# render geometry shadow
+ SdrObject* mpLastShadowGeometry;
+
+ css::uno::Reference< css::drawing::XCustomShapeEngine > const & GetCustomShapeEngine() const;
+
+ std::vector< SdrCustomShapeInteraction > GetInteractionHandles() const; // needed in unit test
+ SVX_DLLPRIVATE void DragCreateObject( SdrDragStat& rDrag );
+ SVX_DLLPRIVATE void DragResizeCustomShape( const tools::Rectangle& rNewRect );
+ void DragMoveCustomShapeHdl( const Point& rDestination,
+ const sal_uInt16 nCustomShapeHdlNum, bool bMoveCalloutRectangle ); // needed in unit test
+
+ // #i37011# centralize throw-away of render geometry
+ void InvalidateRenderGeometry();
+
+ // #i38892#
+ void ImpCheckCustomGluePointsAreAdded();
+
+ // returns the new text rect that corresponds to the current logic rect, the return value can be empty if nothing changed.
+ tools::Rectangle ImpCalculateTextFrame( const bool bHgt, const bool bWdt );
+
+public:
+ // #i37011#
+ const SdrObject* GetSdrObjectFromCustomShape() const;
+ const SdrObject* GetSdrObjectShadowFromCustomShape() const;
+ bool GetTextBounds( tools::Rectangle& rTextBound ) const;
+ bool IsTextPath() const;
+ basegfx::B2DPolyPolygon GetLineGeometry( const bool bBezierAllowed ) const;
+
+protected:
+ // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
+ // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
+ // and object sizes
+ virtual void AdaptTextMinSize() override;
+
+ Size m_aSuggestedTextFrameSize;
+
+ // protected destructor
+ virtual ~SdrObjCustomShape() override;
+
+ virtual void InternalSetStyleSheet( SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast ) override;
+
+public:
+ bool UseNoFillStyle() const;
+
+ bool IsMirroredX() const;
+ bool IsMirroredY() const;
+ void SetMirroredX( const bool bMirroredX );
+ void SetMirroredY( const bool bMirroredY );
+
+ double GetObjectRotation() const { return fObjectRotation;}
+ double GetExtraTextRotation( const bool bPreRotation = false ) const;
+
+ SdrObjCustomShape(SdrModel& rSdrModel);
+ SdrObjCustomShape(SdrModel& rSdrModel, SdrObjCustomShape const & rSource);
+
+ /* is merging default attributes from type-shape into the SdrCustomShapeGeometryItem. If pType
+ is NULL then the type is being taken from the "Type" property of the SdrCustomShapeGeometryItem.
+ MergeDefaultAttributes is called when creating CustomShapes via UI and after importing */
+ void MergeDefaultAttributes( const OUString* pType = nullptr );
+
+ /* the method is checking if the geometry data is unchanged/default, in this case the data might not be stored */
+ enum class DefaultType
+ {
+ Path,
+ Viewbox,
+ Segments,
+ Gluepoints,
+ StretchX,
+ StretchY,
+ Equations,
+ TextFrames
+ };
+ bool IsDefaultGeometry( const DefaultType eDefaultType ) const;
+
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+
+ virtual void Move(const Size& rSiz) override;
+ virtual void Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+ virtual void SetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void SetLogicRect(const tools::Rectangle& rRect) override;
+ virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+
+ virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+
+ virtual bool MovCreate(SdrDragStat& rStat) override; // #i37448#
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+
+ /**
+ * Allows suggesting the text frame size: in case the application has its
+ * own text associated to the shape, instead of using the shape's editeng
+ * text.
+ */
+ void SuggestTextFrameSize(Size aSuggestedTextFrameSize);
+ virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const override;
+ virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true) override;
+ virtual bool AdjustTextFrameWidthAndHeight() override;
+ virtual bool IsAutoGrowHeight() const override;
+ virtual bool IsAutoGrowWidth() const override;
+ virtual void SetVerticalWriting(bool bVertical) override;
+ virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override;
+ virtual void EndTextEdit( SdrOutliner& rOutl ) override;
+ virtual void TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) const override;
+ virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
+ tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override;
+ virtual SdrObjCustomShape* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly( const SdrDragStat& rDrag) const override;
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual basegfx::B2DPolyPolygon TakeContour() const override;
+
+ virtual void NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject) override;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData &rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override;
+
+ // need to take fObjectRotation instead of aGeo.nAngle, replace it temporary
+ virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
+
+ virtual const SdrGluePointList* GetGluePointList() const override;
+ //virtual SdrGluePointList* GetGluePointList();
+ virtual SdrGluePointList* ForceGluePointList() override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // #i33136#
+ static bool doConstructOrthogonal(std::u16string_view rName);
+
+ using SdrTextObj::NbcSetOutlinerParaObject;
+
+ OUString GetCustomShapeName() const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoattr.hxx b/include/svx/svdoattr.hxx
new file mode 100644
index 000000000..3933caa3f
--- /dev/null
+++ b/include/svx/svdoattr.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdobj.hxx>
+#include <svx/svxdllapi.h>
+
+// Initial Declarations
+class SfxPoolItem;
+class SfxSetItem;
+class SdrOutliner;
+class SfxItemSet;
+class SfxItemPool;
+
+// SdrAttrObj
+class SVXCORE_DLLPUBLIC SdrAttrObj : public SdrObject
+{
+private:
+ friend class SdrOutliner;
+
+protected:
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ tools::Rectangle maSnapRect;
+
+protected:
+ /// Detects the width of the line. No line ->0.
+ sal_Int32 ImpGetLineWdt() const;
+
+ /// Detects when a stylesheet is changed
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+ SdrAttrObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrAttrObj(SdrModel& rSdrModel, SdrAttrObj const &);
+ virtual ~SdrAttrObj() override;
+
+public:
+
+ // Detects if bFilledObj && Fill != FillNone
+ bool HasFill() const;
+
+ // Detects if Line != LineNone
+ bool HasLine() const;
+
+ virtual const tools::Rectangle& GetSnapRect() const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
new file mode 100644
index 000000000..4c8fce88b
--- /dev/null
+++ b/include/svx/svdobj.hxx
@@ -0,0 +1,1036 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <com/sun/star/uno/Any.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <rtl/ustring.hxx>
+#include <vcl/outdev.hxx>
+#include <svl/lstner.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/typedwhich.hxx>
+#include <tools/degree.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svdobjkind.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/link.hxx>
+#include <tools/weakbase.h>
+#include <tools/gen.hxx>
+#include <unotools/resmgr.hxx>
+
+#include <unordered_set>
+
+class SfxBroadcaster;
+class AutoTimer;
+class OutlinerParaObject;
+class Outliner;
+class SdrOutliner;
+class SdrDragStat;
+class SdrHdl;
+class SdrHdlList;
+class SdrItemPool;
+class SdrModel;
+class SdrObjList;
+class SdrObject;
+class SdrPage;
+class SdrPageView;
+class SdrView;
+class SfxItemSet;
+class SfxGrabBagItem;
+class SfxSetItem;
+class SfxStyleSheet;
+class SfxUndoAction;
+class XFillAttrSetItem;
+class XLineAttrSetItem;
+class SfxItemPool;
+namespace tools { class PolyPolygon; }
+class SfxPoolItem;
+class SdrVirtObj;
+class SdrDragView;
+class SdrObjUserDataList;
+class SdrObjPlusData;
+class SdrGluePoint;
+class SdrGluePointList;
+class SdrLayerIDSet;
+class Fraction;
+enum class PointerStyle;
+class Graphic;
+class SvxShape;
+namespace svx { enum class ShapePropertyProviderId; }
+
+namespace basegfx
+{
+ class B2DPoint;
+ class B2DPolyPolygon;
+ class B2DHomMatrix;
+}
+
+namespace sdr { class ObjectUser; }
+namespace sdr::properties { class BaseProperties; }
+namespace sdr::contact { class ViewContact; }
+
+namespace svx { class PropertyChangeNotifier; }
+namespace com::sun::star::drawing { class XShape; }
+namespace svx::diagram { class IDiagramHelper; }
+
+
+struct SVXCORE_DLLPUBLIC SdrObjectFreeOp;
+
+// helper for constructing std::unique_ptr for SdrObjects where a
+// deleter is needed - here, SdrObject::Free needs to be used.
+typedef std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr;
+
+enum class SdrInventor : sal_uInt32 {
+ Unknown = 0,
+ BasicDialog = sal_uInt32( 'D' | ('L' << 8) | ('G' << 16) | ('1' << 24) ),
+ Default = sal_uInt32( 'S' | ('V' << 8) | ('D' << 16) | ('r' << 24) ),
+ E3d = sal_uInt32( 'E' | ('3' << 8) | ('D' << 16) | ('1' << 24) ),
+ FmForm = sal_uInt32( 'F' | ('M' << 8) | ('0' << 16) | ('1' << 24) ),
+ IMap = sal_uInt32( 'I' | ('M' << 8) | ('A' << 16) | ('P' << 24) ),
+ ReportDesign = sal_uInt32( 'R' | ('P' << 8) | ('T' << 16) | ('1' << 24) ),
+ ScOrSwDraw = sal_uInt32( 'S' | ('C' << 8) | ('3' << 16) | ('0' << 24) ), // Used in sc/ and sw/
+ SgaImap = sal_uInt32( 'S' | ('D' << 8) | ('U' << 16) | ('D' << 24) ),
+ StarDrawUserData = sal_uInt32( 'S' | ('D' << 8) | ('U' << 16) | ('D' << 24) ),
+ Swg = sal_uInt32( 'S' | ('W' << 8) | ('G' << 16) ),
+};
+
+enum class SdrUserCallType {
+ MoveOnly, // only moved, size unchanged
+ Resize, // size and maybe position changed
+ ChangeAttr, // attribute changed. Eventually new size, because of line width
+ Delete, // object is going to be deleted soon, no attributes anymore
+ Inserted, // inserted into an object list (e.g. Page)
+ Removed, // removed from an object list
+ ChildMoveOnly, // a child within a group has changed
+ ChildResize, // a child within a group has changed
+ ChildChangeAttr, // a child within a group has changed
+ ChildDelete, // a child within a group has changed
+ ChildInserted, // a child within a group has changed
+ ChildRemoved // a child within a group has changed
+};
+
+class SVXCORE_DLLPUBLIC SdrObjUserCall
+{
+public:
+ virtual ~SdrObjUserCall();
+ virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect);
+ virtual sal_Int32 GetPDFAnchorStructureElementId(SdrObject const& rObj, OutputDevice const&);
+};
+
+class SVXCORE_DLLPUBLIC SdrObjMacroHitRec
+{
+public:
+ Point aPos;
+ const SdrLayerIDSet* pVisiLayer;
+ const SdrPageView* pPageView;
+ sal_uInt16 nTol;
+
+ SdrObjMacroHitRec();
+};
+
+/**
+ * User data of a drawing object, e.g. application specific data.
+ * Every drawing object can have an arbitrary amount of such records (SV list).
+ * Whoever wants to save data here, must inherit from this and set a corresponding link in the factory.
+ */
+class SVXCORE_DLLPUBLIC SdrObjUserData
+{
+ SdrInventor nInventor;
+ sal_uInt16 nIdentifier;
+
+ void operator=(const SdrObjUserData& rData) = delete;
+ bool operator==(const SdrObjUserData& rData) const = delete;
+ bool operator!=(const SdrObjUserData& rData) const = delete;
+
+public:
+ SdrObjUserData(SdrInventor nInv, sal_uInt16 nId);
+ SdrObjUserData(const SdrObjUserData& rData);
+ virtual ~SdrObjUserData();
+
+ virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const = 0; // #i71039# NULL -> 0
+ SdrInventor GetInventor() const { return nInventor;}
+ sal_uInt16 GetId() const { return nIdentifier;}
+};
+
+/**
+ * All geometrical data of an arbitrary object for use in undo/redo
+ */
+class SVXCORE_DLLPUBLIC SdrObjGeoData
+{
+public:
+ tools::Rectangle aBoundRect;
+ Point aAnchor;
+ std::unique_ptr<SdrGluePointList>
+ pGPL;
+ bool bMovProt;
+ bool bSizProt;
+ bool bNoPrint;
+ bool bClosedObj;
+ bool mbVisible;
+ SdrLayerID mnLayerID;
+
+public:
+ SdrObjGeoData();
+ virtual ~SdrObjGeoData();
+};
+
+/**
+ * Provides information about various ZObject properties
+ */
+class SVXCORE_DLLPUBLIC SdrObjTransformInfoRec
+{
+public:
+ bool bMoveAllowed : 1; // if false, object cannot be moved
+ bool bResizeFreeAllowed : 1; // if false, object cannot be resized freely
+ bool bResizePropAllowed : 1; // if false, object cannot even be resized proportionally
+ bool bRotateFreeAllowed : 1; // if false, object cannot be rotated freely
+ bool bRotate90Allowed : 1; // if false, object cannot even be rotated in 90 degree steps
+ bool bMirrorFreeAllowed : 1; // if false, object cannot be mirrored freely
+ bool bMirror45Allowed : 1; // if false, object cannot even be mirrored over axes in a 45 degree raster
+ bool bMirror90Allowed : 1; // if false, object cannot even be mirrored over axes in a 90 degree raster
+ bool bTransparenceAllowed : 1; // if false, object does not have an interactive transparence control
+ bool bShearAllowed : 1; // if false, object cannot be sheared
+ bool bEdgeRadiusAllowed : 1;
+ bool bNoOrthoDesired : 1; // is true for Rect; is false for BMP, MTF
+ bool bNoContortion : 1; // if false, contortion not possible (for crook, only true for PathObj and grouped PathObjs)
+ bool bCanConvToPath : 1; // if false, no conversion into PathObj possible
+ bool bCanConvToPoly : 1; // if false, no conversion into PolyObj possible
+ bool bCanConvToContour : 1; // if false, no conversion down to whole contour possible
+ bool bCanConvToPathLineToArea : 1; // if false, no conversion into PathObj with transformation from LineToArea possible
+ bool bCanConvToPolyLineToArea : 1; // if false, no conversion into PolyObj with transformation from LineToArea possible
+
+ SdrObjTransformInfoRec();
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// SdrObject
+// SdrAttrObj
+// E3dObject
+// E3dCompoundObject
+// E3dCubeObj
+// E3dExtrudeObj
+// E3dLatheObj
+// E3dPolygonObj
+// E3dSphereObj
+// E3dScene
+// SdrTextObj
+// SdrObjCustomShape
+// OCustomShape
+// SdrEdgeObj
+// SdrMeasureObj
+// SdrPathObj
+// SdrRectObj
+// SdrCaptionObj
+// SdrCircObj
+// SdrGrafObj
+// SdrMediaObj
+// SdrOle2Obj
+// OOle2Obj
+// SdrUnoObj
+// DlgEdObj
+// DlgEdForm
+// OUnoObject
+// FmFormObj
+// SdrTableObj
+// SdrObjGroup
+// SdrPageObj
+// SdrVirtObj
+// SwDrawVirtObj
+// SwVirtFlyDrawObj
+// SwFlyDrawObj
+
+/// Abstract DrawObject
+class SVXCORE_DLLPUBLIC SdrObject : public SfxListener, public tools::WeakBase
+{
+public:
+ // Basic DiagramHelper support
+ virtual const std::shared_ptr< svx::diagram::IDiagramHelper >& getDiagramHelper() const;
+ bool isDiagram() const { return bool(getDiagramHelper()); }
+
+private:
+ friend class SdrObjListIter;
+ friend class SdrObjList;
+ friend class SdrVirtObj;
+ friend class SdrRectObj;
+
+ // OperationSmiley: Allow at each SdrObject to set a FillGeometryDefiningShape,
+ // so that for SdrObjects where this is set, the definition of a defined FillStyle
+ // will use this, but the local geometry will be filled. This allows to fill
+ // multiple shapes with a unified fill, e.g think about CustomShapes.
+ // Currently this is *only* used for CustomShapes, but may be developed to get a
+ // common mechanism - usages for it are easy to be found. The current limitation
+ // to CustomShapes allows to think about these SdrObjects to 'vanish' during the
+ // lifetime of 'this' - the SdrObjects without SdrPage and SdrModel are used as helper
+ // objects for SdrObjCustomShape and thus their lifetime is limited to the lifetime
+ // of this local object. For unifying this mechanism, some weak reference of
+ // SdrObjects would have to be thought about (not easy with the current implementation).
+ // So - allow *only* EnhancedCustomShape2d (which creates the visualizations for
+ // SdrObjCustomShape) to set this. Already allow unified read to use it - thus already
+ // allowing to implement as standard case for all kinds of SdrObjects.
+ friend class EnhancedCustomShape2d;
+ const SdrObject* mpFillGeometryDefiningShape;
+ void setFillGeometryDefiningShape(const SdrObject* pNew) { mpFillGeometryDefiningShape = pNew; }
+public:
+ const SdrObject* getFillGeometryDefiningShape() const { return mpFillGeometryDefiningShape; }
+
+private:
+ // the SdrModel this objects was created with, unchanged during SdrObject lifetime
+ SdrModel& mrSdrModelFromSdrObject;
+
+public:
+ // A SdrObject always needs a SdrModel for lifetime (Pool, ...)
+ SdrObject(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrObject(SdrModel& rSdrModel, SdrObject const & rSource);
+
+ // SdrModel/SdrPage access on SdrObject level
+ SdrPage* getSdrPageFromSdrObject() const;
+ SdrModel& getSdrModelFromSdrObject() const;
+
+ // access to possible children (SdrObjGroup/E3dScene)
+ virtual SdrObjList* getChildrenOfSdrObject() const;
+
+ // access to parent
+ SdrObjList* getParentSdrObjListFromSdrObject() const;
+ SdrObject* getParentSdrObjectFromSdrObject() const;
+
+private:
+ SVX_DLLPRIVATE void setParentOfSdrObject(SdrObjList* pNew);
+
+public:
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage);
+
+ void AddObjectUser(sdr::ObjectUser& rNewUser);
+ void RemoveObjectUser(sdr::ObjectUser& rOldUser);
+
+ sdr::contact::ViewContact& GetViewContact() const;
+
+ virtual sdr::properties::BaseProperties& GetProperties() const;
+
+ // DrawContact support: Methods for handling Object changes
+ void ActionChanged() const;
+
+ static SdrItemPool& GetGlobalDrawObjectItemPool();
+ void SetRelativeWidth( double nValue );
+ void SetRelativeWidthRelation( sal_Int16 eValue );
+ void SetRelativeHeight( double nValue );
+ void SetRelativeHeightRelation( sal_Int16 eValue );
+ const double* GetRelativeWidth() const;
+ sal_Int16 GetRelativeWidthRelation() const;
+ const double* GetRelativeHeight() const;
+ sal_Int16 GetRelativeHeightRelation() const;
+
+ /// @param bNotMyself = true: set only ObjList to dirty, don't mark this object as dirty.
+ ///
+ /// This is needed for instance for NbcMove, because usually one moves SnapRect and aOutRect
+ /// at the same time to avoid recomputation.
+ virtual void SetBoundAndSnapRectsDirty(bool bNotMyself = false, bool bRecursive = true);
+
+ // frees the SdrObject pointed to by the argument
+ // In case the object has an SvxShape, which has the ownership of the object, it
+ // is actually *not* deleted.
+ static void Free( SdrObject*& _rpObject );
+
+ // this method is only for access from Property objects
+ virtual void SetBoundRectDirty();
+
+ SfxItemPool & GetObjectItemPool() const;
+
+ void AddListener(SfxListener& rListener);
+ void RemoveListener(SfxListener& rListener);
+
+ void AddReference(SdrVirtObj& rVrtObj);
+ void DelReference(SdrVirtObj& rVrtObj);
+ virtual SdrInventor GetObjInventor() const;
+ virtual SdrObjKind GetObjIdentifier() const;
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
+
+ // Layer interface
+ virtual SdrLayerID GetLayer() const;
+ virtual void NbcSetLayer(SdrLayerID nLayer);
+ virtual void SetLayer(SdrLayerID nLayer);
+ // renaming GetSdrLayerIDSet -> getMergedHierarchySdrLayerIDSet to make clear what happens here. rSet needs to be empty.
+ void getMergedHierarchySdrLayerIDSet(SdrLayerIDSet& rSet) const;
+
+ void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& rBoundRect) const;
+
+ // #i68101#
+ // An object may have a user-set Name (Get/SetName()), e.g SdrGrafObj, SdrObjGroup
+ // or SdrOle2Obj.
+ // It may also have a Title and a Description for accessibility purposes.
+ virtual void SetName(const OUString& rStr, const bool bSetChanged = true);
+ virtual const OUString & GetName() const;
+ void MakeNameUnique();
+ void MakeNameUnique(std::unordered_set<OUString>& rNameSet);
+ virtual void SetTitle(const OUString& rStr);
+ virtual OUString GetTitle() const;
+ virtual void SetDescription(const OUString& rStr);
+ virtual OUString GetDescription() const;
+
+ // for group objects
+ bool IsGroupObject() const;
+ virtual SdrObjList* GetSubList() const;
+
+ /// The order number (aka ZOrder, aka z-index) determines whether a
+ /// SdrObject is located above or below another. Objects are painted from
+ /// lowest to highest order number. If the order of SdrObjects in the
+ /// SdrObjList is changed, the bObjOrdNumsDirty flag is set on the SdrPage
+ /// and the next GetOrdNum() call recalculates the order number of all
+ /// SdrObjects in the SdrObjList.
+ sal_uInt32 GetOrdNum() const;
+
+ // setting the order number should only happen from the model or from the page
+ void SetOrdNum(sal_uInt32 nNum);
+
+ // GrabBagItem for interim interop purposes
+ void GetGrabBagItem(css::uno::Any& rVal) const;
+
+ virtual void SetGrabBagItem(const css::uno::Any& rVal);
+
+ // Return the position in the navigation order for the called object.
+ // Note that this method may update the navigation position of the
+ // called and of other SdrObjects. Therefore this method can not be
+ // const.
+ // @return
+ // If no navigation position has been explicitly defined then the
+ // result of GetOrdNum() is returned.
+ sal_uInt32 GetNavigationPosition() const;
+
+ // To make clearer that this method may trigger RecalcBoundRect and thus may be
+ // expensive and sometimes problematic (inside a bigger object change You will get
+ // non-useful BoundRects sometimes) i rename that method from GetBoundRect() to
+ // GetCurrentBoundRect().
+ virtual const tools::Rectangle& GetCurrentBoundRect() const;
+
+ // To have a possibility to get the last calculated BoundRect e.g for producing
+ // the first rectangle for repaints (old and new need to be used) without forcing
+ // a RecalcBoundRect (which may be problematical and expensive sometimes) i add here
+ // a new method for accessing the last BoundRect.
+ virtual const tools::Rectangle& GetLastBoundRect() const;
+
+ virtual void RecalcBoundRect();
+
+ void BroadcastObjectChange() const;
+
+ const SfxBroadcaster* GetBroadcaster() const;
+
+ // set modified-flag in the model
+ virtual void SetChanged();
+
+ // Tooling for painting a single object to an OutputDevice. This will be needed as long
+ // as not all painting is changed to use DrawContact objects.
+ void SingleObjectPainter(OutputDevice& rOut) const;
+ bool LineGeometryUsageIsNecessary() const;
+
+ // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation, that
+ // means no change of the rotation point (only centered) and no shear allowed
+ virtual bool HasLimitedRotation() const;
+
+ // Returns a copy of the object. Every inherited class must reimplement this.
+ virtual SdrObject* CloneSdrObject(SdrModel& rTargetModel) const;
+
+ // Overwriting this object makes no sense, it is too complicated for that
+ SdrObject& operator=(const SdrObject& rObj) = delete;
+ SdrObject& operator=(SdrObject&& rObj) = delete;
+
+ // TakeObjName...() is for the display in the UI, e.g. "3 frames selected"
+ virtual OUString TakeObjNameSingul() const;
+ virtual OUString TakeObjNamePlural() const;
+
+ /// The Xor-Polygon is required by the View to drag the object.
+ /// All polygons within the PolyPolygon are interpreted as PolyLine.
+ /// To get a closed Polygon, close it explicitly.
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
+
+ /// contour for TextToContour
+ virtual basegfx::B2DPolyPolygon TakeContour() const;
+
+ /// Via GetHdlCount the number of Handles can be retrieved.
+ /// Normally 8, if it's a line 2.
+ /// For Polygon objects (Polygon/Spline/Bezier) the number may be much
+ /// larger. Polygon objects are also allowed to select a point of a
+ /// selected object. The handle of that point will then be replaced by
+ /// a new set of handles (PlusHdl). For a Polygon this would be a simple
+ /// selection Handle, for a Bezier curve this may be up to 3 Handles
+ /// (including Weights).
+ /// GetHdl() and GetPlusHdl() must create Handle instances with new!
+ /// An object that returns true from HasSpacialDrag() must provide these
+ /// methods (incl. FillHdlList()).
+ virtual sal_uInt32 GetHdlCount() const;
+ virtual void AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const;
+ virtual void addCropHandles(SdrHdlList& rTarget) const;
+
+ /// The standard transformations (Move,Resize,Rotate,Mirror,Shear) are
+ /// taken over by the View (TakeXorPoly(),...).
+ /// Object type specific dragging like corner radius of Rectangle,
+ /// control points of Splines, weights of Bezier curves, pointer of
+ /// Label objects must be handled by the object itself.
+ /// To keep the Model free of state, the state is kept in the View
+ /// and then passed to the object. EndDrag usually returns true for success,
+ /// false may be returned if the dragging did not modify the object,
+ /// where the View already handles the case that the pointer was not
+ /// moved at all.
+ virtual bool hasSpecialDrag() const;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag);
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const;
+ virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const;
+
+ // FullDrag support. This is for standard interactions and for SdrObjOwn
+ // support. If supportsFullDrag() returns true, getFullDragClone has to
+ // return a cloned SdrObject (who's ownership it loses) at which modifications
+ // like Move(), Scale(), etc or applySpecialDrag() will be executed. That
+ // object will be visualized on overlay for full drag, but should not be
+ // part of the model, thus not changing anything since it's only a temporary
+ // helper object for interaction
+ virtual bool supportsFullDrag() const;
+ virtual SdrObjectUniquePtr getFullDragClone() const;
+
+ /// Every object must be able to create itself interactively.
+ /// On MouseDown first an object is created, and its BegCreate() method
+ /// is called. On every MouseMove, MovCreate() is called. BrkCreate()
+ /// is called if the user cancels the interactive object creation.
+ /// EndCreate() is called on the MouseUp event. If EndCreate() returns
+ /// true, the creation is finished; the object is inserted into the
+ /// corresponding list. Otherwise it is assumed that further points
+ /// are necessary to create the object (Polygon, ...). The parameter
+ /// eCmd contains the number of mouse clicks (if the application
+ /// provides it).
+ /// BckCreate() will undo the previous EndCreate(), e.g. to delete the
+ /// last point of the Polygon. If BckCreate() returns false, creation
+ /// is cancelled.
+ virtual bool BegCreate(SdrDragStat& rStat);
+ virtual bool MovCreate(SdrDragStat& rStat); // if true, Xor needs to be repainted
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+ virtual bool BckCreate(SdrDragStat& rStat);
+ virtual void BrkCreate(SdrDragStat& rStat);
+
+ /// get the cursor/pointer that signals creating this object
+ virtual PointerStyle GetCreatePointer() const;
+
+ /// Polygon dragged by the user when creating the object
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const;
+
+ /// The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and
+ /// SetLogicRect call the corresponding Nbc-methods, send a Repaint
+ /// broadcast and set the Modified state on the Model.
+ /// Derived classes should usually only override the Nbc methods.
+ /// Nbc means "no broadcast".
+ virtual void NbcMove (const Size& rSiz);
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual void NbcCrop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs);
+ // Utility for call sites that don't have sin and cos handy
+ void NbcRotate(const Point& rRef, Degree100 nAngle);
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
+ virtual void NbcShear (const Point& rRef, Degree100 nAngle, double tn, bool bVShear);
+
+ virtual void Move (const Size& rSiz);
+ virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true);
+ virtual void Crop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
+ virtual void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs);
+ virtual void Mirror(const Point& rRef1, const Point& rRef2);
+ virtual void Shear (const Point& rRef, Degree100 nAngle, double tn, bool bVShear);
+
+ /// The relative position of a SdrObject is the distance of the upper
+ /// left corner of the logic bounding rectangle (SnapRect) to the anchor.
+ virtual void NbcSetRelativePos(const Point& rPnt);
+ virtual void SetRelativePos(const Point& rPnt);
+ virtual Point GetRelativePos() const;
+ void ImpSetAnchorPos(const Point& rPnt);
+ virtual void NbcSetAnchorPos(const Point& rPnt);
+ virtual void SetAnchorPos(const Point& rPnt);
+
+ /// Snap is not done on the BoundRect but if possible on logic coordinates
+ /// (i.e. without considering stroke width, ...)
+ /// SetSnapRect() tries to size the Object so that it fits into the
+ /// passed Rect (without stroke width, ...)
+ virtual void RecalcSnapRect();
+ virtual const tools::Rectangle& GetSnapRect() const;
+ virtual void SetSnapRect(const tools::Rectangle& rRect);
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect);
+
+ // Logic Rect: for the Rect for instance without regard to rotation angle, shear, ...
+ virtual const tools::Rectangle& GetLogicRect() const;
+ virtual void SetLogicRect(const tools::Rectangle& rRect);
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect);
+
+ // the default is to set the logic rect to the given rectangle rMaxRect. If the shape
+ // has an intrinsic aspect ratio it may set the logic rect so the aspect
+ // ratio is kept but still inside the rectangle rMaxRect.
+ // If bShrinkOnly is set to true, the size of the current logic rect will not
+ // be changed if it is smaller than the given rectangle rMaxRect.
+ virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false );
+
+ // rotation and shear angle
+ virtual Degree100 GetRotateAngle() const;
+ virtual Degree100 GetShearAngle(bool bVertical = false) const;
+
+ /// snap to special points of an Object (polygon points, center of circle)
+ virtual sal_uInt32 GetSnapPointCount() const;
+ virtual Point GetSnapPoint(sal_uInt32 i) const;
+
+ // For objects, whose points can be moved individually.
+ // (e.g. polygons, polylines, lines)
+ // The points of those objects are selected (if necessary multiselection),
+ // deleted, inserted, or as a multiselection moved or rotated...
+ // Only such objects can have PlusHandles (e.g. the weights of a Bezier curve).
+ virtual bool IsPolyObj() const;
+ virtual sal_uInt32 GetPointCount() const;
+ virtual Point GetPoint(sal_uInt32 i) const;
+ void SetPoint(const Point& rPnt, sal_uInt32 i);
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
+
+ // get all geometrical data for undo/redo
+ virtual std::unique_ptr<SdrObjGeoData> GetGeoData() const;
+ virtual void SetGeoData(const SdrObjGeoData& rGeo);
+
+ // ItemSet access
+ const SfxItemSet& GetMergedItemSet() const;
+ void SetMergedItem(const SfxPoolItem& rItem);
+ void ClearMergedItem(const sal_uInt16 nWhich = 0);
+ void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false);
+ const SfxPoolItem& GetMergedItem(const sal_uInt16 nWhich) const;
+ template<class T>
+ const T& GetMergedItem( TypedWhichId<T> nWhich ) const
+ {
+ return static_cast<const T&>(GetMergedItem(sal_uInt16(nWhich)));
+ }
+
+ // syntactical sugar for ItemSet accesses
+ void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems = false);
+
+ // NotPersistAttr for Layer, ObjName, geometrical transformations etc.
+ void TakeNotPersistAttr(SfxItemSet& rAttr) const;
+ void ApplyNotPersistAttr(const SfxItemSet& rAttr);
+ void NbcApplyNotPersistAttr(const SfxItemSet& rAttr);
+
+ // if bDontRemoveHardAttr is false, set all attributes, which were set in the style sheet, to their default value
+ // if true, all hard attributes keep their values
+ void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr);
+ void NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr);
+ SfxStyleSheet* GetStyleSheet() const;
+
+ virtual bool HasTextEdit() const;
+
+ // keep text in outliner's format
+ // SetOutlinerParaObject: transfer ownership of *pTextObject!
+ void SetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject);
+ virtual void NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject);
+ virtual OutlinerParaObject* GetOutlinerParaObject() const;
+ virtual void NbcReformatText();
+
+ void BurnInStyleSheetAttributes();
+
+ // macro abilities, e.g. a rectangle as PushButton.
+ virtual bool HasMacro() const;
+ virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const;
+ virtual PointerStyle GetMacroPointer (const SdrObjMacroHitRec& rRec) const;
+ virtual void PaintMacro (OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const;
+ virtual bool DoMacro (const SdrObjMacroHitRec& rRec);
+ bool IsMacroHit(const SdrObjMacroHitRec& rRec) const;
+
+ // Connectors
+ // (see also documentation in SvdoEdge.hxx, SdrEdgeObj, as well as SvdGlue.hxx and SvdGlEV.hxx)
+ //
+ // There are nodes and edges. In theory an edge can also be a node, but this isn't implemented yet.
+ // A node has a number of gluepoints, onto which edges can glued to
+ // An edge can be either
+ // - without any connection to any node,
+ // - or connected on one end to a node, while the other end is not connected,
+ // - or connected on both ends with exactly one node each.
+ // The edge is listener for its up to two nodes.
+ // Whenever a node is moved or resized, all its connected edges follow.
+ // This is also true for SetGluePoint()... on the node.
+ // On the other hand, moving/resizing an edge breaks the connection.
+
+ // automatic gluepoints:
+ // a node object must provide four vertex and corner positions
+ // usually 0: top, 1: right, 2: bottom, 3: left
+ virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const;
+
+ // usually:
+ // 0: top-left, 1: top-right, 2: bottom-right, 3: bottom-left
+ virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const;
+
+ // list of all gluepoints, can be NULL
+ virtual const SdrGluePointList* GetGluePointList() const;
+
+ // after changing the GluePointList, one has to call the object's SendRepaintBroadcast!
+ virtual SdrGluePointList* ForceGluePointList();
+
+ // to be set temporarily when transforming related object(?)
+ void SetGlueReallyAbsolute(bool bOn);
+ void NbcRotateGluePoints(const Point& rRef, Degree100 nAngle, double sn, double cs);
+ void NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2);
+ void NbcShearGluePoints (const Point& rRef, double tn, bool bVShear);
+
+ // if bTail1 is true, line start, otherwise line end
+ // if pObj is null disconnect
+ virtual void ConnectToNode(bool bTail1, SdrObject* pObj);
+ virtual void DisconnectFromNode(bool bTail1);
+ virtual SdrObject* GetConnectedNode(bool bTail1) const;
+
+ // sets the writing mode of the object's context
+ // Objects which itself do not support different writing modes will ignore this call.
+ // Objects which support different writing modes, but have an own, explicit writing mode set,
+ // will also ignore this call.
+ // Objects which support different writing modes, and whose own mode is set to css.text.WritingMode2.CONTEXT,
+ // will use the given writing mode to calculate their "effective writing mode".
+ // The behaviour of this method is undefined if you pass css.text.WritingMode2.CONTEXT.
+ // @param _nContextWritingMode
+ // the effective writing mode of the context of the object
+ virtual void SetContextWritingMode( const sal_Int16 _nContextWritingMode );
+
+ // If an object is able to convert itself into a polygon or into a Bezier curve (or into both),
+ // then the following methods should be overridden.
+ // E.g., convert a RectObj with line width 10, SOLID_PEN into a polygon:
+ // In the bLineToArea=false mode a PolyObj with four supporting points,
+ // line width 10 and SOLID_PEN shall be created.
+ // On the contrary in the bLineToArea=true mode the generated object should
+ // still have a line attribute NULL_PEN, and the line (also line pattern)
+ // itself should be emulated by the polygon area, which thereby can be
+ // manipulated by the user afterwards.
+ // The RectObj therefore can only convert correctly if it has an area attribute NULL_BRUSH.
+ // In this case it would have to:
+ // - set SOLID_BRUSH with the color of the given pen,
+ // - set NULL_PEN, and
+ // - generate tools::PolyPolygon with two polygons with four supporting points each.
+ // In each case the return value is a SdrObject*, because it is also
+ // allowed to return group objects (e.g. for SdrTextObj).
+ // In the case of the conversion from TextObj to PathObj,
+ // both modi (bLineToArea=true/false) would be identical.
+ // The methods' default implementations report "I'm unable to do this" (false/null).
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const;
+ SdrObjectUniquePtr ConvertToPolyObj(bool bBezier, bool bLineToArea) const;
+
+ // convert this path object to contour object; bForceLineDash converts even
+ // when there is no filled new polygon created from line-to-polygon conversion,
+ // specially used for XLINE_DASH and 3D conversion
+ SdrObject* ConvertToContourObj(SdrObject* pRet, bool bForceLineDash = false) const;
+private:
+ SdrObject* ImpConvertToContourObj(bool bForceLineDash);
+public:
+
+ // if true, reference onto an object
+ bool IsVirtualObj() const { return m_bVirtObj;}
+
+ // is true, if object can probably be filled
+ // is false, if object has probably line ends
+ // is invalid, if this is a group object
+ bool IsClosedObj() const { return m_bClosedObj;}
+
+ // tdf#118662 reorganize inserted state, no local bool needed anymore,
+ // it depends on being a member of a SdrObjList
+ void InsertedStateChange();
+ bool IsInserted() const { return nullptr != getParentSdrObjListFromSdrObject(); }
+
+ bool IsEdgeObj() const { return m_bIsEdge;}
+ bool Is3DObj() const { return m_bIs3DObj;}
+ bool IsUnoObj() const { return m_bIsUnoObj;}
+ void SetMoveProtect(bool bProt);
+ bool IsMoveProtect() const { return m_bMovProt;}
+ void SetResizeProtect(bool bProt);
+ bool IsResizeProtect() const { return m_bSizProt;}
+ void SetPrintable(bool bPrn);
+ bool IsPrintable() const { return !m_bNoPrint;}
+ void SetVisible(bool bVisible);
+ bool IsVisible() const { return mbVisible;}
+ void SetMarkProtect(bool bProt);
+ bool IsMarkProtect() const { return m_bMarkProt;}
+
+ /// Whether the aspect ratio should be kept by default when resizing.
+ virtual bool shouldKeepAspectRatio() const { return false; }
+
+ // application specific data
+ sal_uInt16 GetUserDataCount() const;
+ SdrObjUserData* GetUserData(sal_uInt16 nNum) const;
+
+ void AppendUserData(std::unique_ptr<SdrObjUserData> pData);
+
+ // removes the record from the list and performs delete (FreeMem+Dtor).
+ void DeleteUserData(sal_uInt16 nNum);
+
+ // access to the UNO representation of the shape
+ virtual css::uno::Reference< css::drawing::XShape > getUnoShape();
+
+ static SdrObject* getSdrObjectFromXShape( const css::uno::Reference< css::uno::XInterface >& xInt );
+
+ // retrieves the instance responsible for notifying changes in the properties of the shape associated with
+ // the SdrObject
+ //
+ // @precond
+ // There already exists an SvxShape instance associated with the SdrObject
+ // @throws css::uno::RuntimeException
+ // if there does nt yet exists an SvxShape instance associated with the SdrObject.
+ svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
+
+ // notifies a change in the given property, to all applicable listeners registered at the associated SvxShape
+ //
+ // This method is equivalent to calling getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty ),
+ // exception that it is allowed to be called when there does not yet exist an associated SvxShape - in which
+ // case the method will silently return without doing anything.
+ void notifyShapePropertyChange( const svx::ShapePropertyProviderId _eProperty ) const;
+
+ // transformation interface for StarOfficeAPI. This implements support for
+ // homogen 3x3 matrices containing the transformation of the SdrObject. At the
+ // moment it contains a shearX, rotation and translation, but for setting all linear
+ // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
+ //
+ // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
+ // with the base geometry and returns TRUE. Otherwise it returns FALSE.
+ virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const;
+
+ // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+ // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
+ // to use (0,0) as upper left and will be scaled to the given size in the matrix.
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon);
+
+ // give info if object is in destruction
+ bool IsInDestruction() const;
+
+ // return if fill is != XFILL_NONE
+ bool HasFillStyle() const;
+ bool HasLineStyle() const;
+
+ // on import of OLE object from MS documents the BLIP size might be retrieved,
+ // the following methods are used to control it;
+ // usually this data makes no sense after the import is finished, since the object
+ // might be resized
+ const tools::Rectangle& GetBLIPSizeRectangle() const { return maBLIPSizeRectangle;}
+ void SetBLIPSizeRectangle( const tools::Rectangle& aRect );
+
+ // #i121917#
+ virtual bool HasText() const;
+
+ bool Equals(const SdrObject&) const;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+ /// Is this a textbox of a drawinglayer shape?
+ virtual bool IsTextBox() const;
+
+ void SetEmptyPresObj(bool bEpt);
+ bool IsEmptyPresObj() const { return m_bEmptyPresObj;}
+ void SetNotVisibleAsMaster(bool bFlg);
+ bool IsNotVisibleAsMaster() const { return m_bNotVisibleAsMaster;}
+ void SetUserCall(SdrObjUserCall* pUser);
+ SdrObjUserCall* GetUserCall() const { return m_pUserCall;}
+ /// @see mbDoNotInsertIntoPageAutomatically
+ void SetDoNotInsertIntoPageAutomatically(bool bSet);
+ /// @see mbDoNotInsertIntoPageAutomatically
+ bool IsDoNotInsertIntoPageAutomatically() const { return mbDoNotInsertIntoPageAutomatically;}
+
+ // Warning: this method should only be used if you really know what you're doing
+ sal_uInt32 GetOrdNumDirect() const { return m_nOrdNum;}
+
+ // #i25616#
+ bool DoesSupportTextIndentingOnLineWidthChange() const { return mbSupportTextIndentingOnLineWidthChange;}
+
+ const Point& GetAnchorPos() const;
+
+ // #i25616#
+ bool LineIsOutsideGeometry() const { return mbLineIsOutsideGeometry;}
+
+ // Set the position in the navigation position to the given value.
+ // This method is typically used only by the model after a change to
+ // the navigation order.
+ // This method does not change the navigation position of other
+ // objects.
+ // Use SdrObjList::SetObjectNavigationPosition() instead.
+ void SetNavigationPosition (const sal_uInt32 nPosition);
+
+ /// Sets a new UNO representation of the shape
+ ///
+ /// Calling this function is only allowed for the UNO representation
+ /// itself!
+ ///
+ /// The default implementation of this function sets the new UNO
+ /// shape. Derived classes should override the function to handle
+ /// any other actions that are needed when the shape is being
+ /// changed.
+ ///
+ /// The implementation _must_ call the same method of its parent
+ /// class (preferably as the first step)!
+ virtual void setUnoShape( const css::uno::Reference< css::drawing::XShape >& _rxUnoShape );
+
+ const css::uno::WeakReference< css::drawing::XShape >& getWeakUnoShape() const { return maWeakUnoShape; }
+
+ // return true if a bg was set, false otherwise
+ bool setSuitableOutlinerBg(Outliner& rOutliner) const;
+ // If fillstyle is drawing::FillStyle_BITMAP, returns the graphic.
+ const Graphic* getFillGraphic() const;
+
+ const OUString& getHyperlink() const { return msHyperlink; }
+ void setHyperlink(const OUString& sHyperlink) { msHyperlink = sHyperlink; }
+
+ void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const noexcept;
+
+protected:
+ mutable tools::Rectangle m_aOutRect; // surrounding rectangle for Paint (incl. LineWidth, ...)
+ Point m_aAnchor; // anchor position (Writer)
+ SdrObjUserCall* m_pUserCall;
+ std::unique_ptr<SdrObjPlusData>
+ m_pPlusData; // Broadcaster, UserData, connectors, ... (this is the Bitsack)
+ // object is only pointing to another one
+ bool m_bVirtObj : 1;
+ bool m_bSnapRectDirty : 1;
+ // the following flags will be streamed
+ bool m_bMovProt : 1; // if true, the position is protected
+ bool m_bSizProt : 1; // if true, the size is protected
+ // If bEmptyPresObj is true, it is a presentation object that has no content yet.
+ // The flag's default value is false.
+ // The management is done by the application.
+ // Neither assign operator nor cloning copies the flag!
+ // The flag is persistent.
+ bool m_bEmptyPresObj : 1; // empty presentation object (Draw)
+ // if true, object is invisible as object of the MasterPage
+ bool m_bNotVisibleAsMaster : 1;
+ // if true, the object is closed, i.e. no line, arc...
+ bool m_bClosedObj : 1;
+ bool m_bIsEdge : 1;
+ bool m_bIs3DObj : 1;
+ bool m_bIsUnoObj : 1;
+ // #i25616#
+ bool mbLineIsOutsideGeometry : 1;
+ // #i25616#
+ bool mbSupportTextIndentingOnLineWidthChange : 1;
+
+ virtual ~SdrObject() override;
+
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties();
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
+
+ tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
+
+ // for GetDragComment
+ OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const;
+
+ void ImpForcePlusData();
+
+ OUString GetMetrStr(tools::Long nVal) const;
+
+ /// A derived class must override these 3 methods if it has own geometric
+ /// data that must be saved for Undo.
+ /// NewGeoData() creates an empty instance of a class derived from
+ /// SdrObjGeoData.
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo);
+
+ // internal versions
+ const SfxItemSet& GetObjectItemSet() const;
+ void SetObjectItem(const SfxPoolItem& rItem);
+ void SetObjectItemSet(const SfxItemSet& rSet);
+ const SfxPoolItem& GetObjectItem(const sal_uInt16 nWhich) const;
+ template<class T> const T& GetObjectItem( TypedWhichId<T> nWhich ) const
+ {
+ return static_cast<const T&>(GetObjectItem(sal_uInt16(nWhich)));
+ }
+
+ const SfxItemSet* getBackgroundFillSet() const;
+
+ virtual void InternalSetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast);
+
+private:
+ struct Impl;
+ std::unique_ptr<Impl> mpImpl;
+ SdrObjList* mpParentOfSdrObject; // list that includes this object
+ sal_uInt32 m_nOrdNum; // order number of the object in the list
+ std::unique_ptr<SfxGrabBagItem> m_pGrabBagItem; // holds the GrabBagItem property
+ // Position in the navigation order. SAL_MAX_UINT32 when not used.
+ sal_uInt32 mnNavigationPosition;
+ SdrLayerID mnLayerID;
+ bool m_bNoPrint : 1; // if true, the object is not printed.
+ bool mbVisible : 1; // if false, the object is not visible on screen (but maybe on printer, depending on bNoprint
+ bool m_bMarkProt : 1; // marking forbidden, persistent
+ // on import of OLE object from MS documents the BLIP size might be retrieved,
+ // in this case the following member is initialized as nonempty rectangle
+ tools::Rectangle maBLIPSizeRectangle;
+ std::unique_ptr<sdr::properties::BaseProperties>
+ mpProperties;
+ std::unique_ptr<sdr::contact::ViewContact>
+ mpViewContact;
+
+ // do not use directly, always use getSvxShape() if you have to!
+ SvxShape* mpSvxShape;
+ css::uno::WeakReference< css::drawing::XShape >
+ maWeakUnoShape;
+ // HACK: Do not automatically insert newly created object into a page.
+ // The user needs to do it manually later.
+ bool mbDoNotInsertIntoPageAutomatically;
+ // Hyperlink for the whole shape
+ OUString msHyperlink;
+
+ // only for internal use!
+ SvxShape* getSvxShape();
+
+ SdrObject( const SdrObject& ) = delete;
+};
+
+struct SVXCORE_DLLPUBLIC SdrObjectFreeOp
+{
+ void operator()(SdrObject* obj)
+ {
+ SdrObject::Free(obj);
+ }
+};
+
+struct SdrObjCreatorParams
+{
+ SdrInventor nInventor;
+ SdrObjKind nObjIdentifier;
+ SdrModel& rSdrModel;
+};
+
+/**
+ * Whoever creates his own objects must set a link in the SdrObjFactory class.
+ * The handler must have the following signature:
+ * void Hdl(SdrObjFactory*)
+ * He must take a look at the referenced instance's nInventor and nIdentifier values,
+ * and must create a new drawing object instance accordingly.
+ * He must also make the pNewObj pointer reference to this instance.
+ */
+class SVXCORE_DLLPUBLIC SdrObjFactory
+{
+public:
+ static SdrObject* MakeNewObject(
+ SdrModel& rSdrModel,
+ SdrInventor nInventor,
+ SdrObjKind nObjIdentifier,
+ const tools::Rectangle* pSnapRect = nullptr);
+
+ static void InsertMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink);
+ static void RemoveMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink);
+
+private:
+ static SVX_DLLPRIVATE SdrObject* CreateObjectFromFactory(
+ SdrModel& rSdrModel,
+ SdrInventor nInventor,
+ SdrObjKind nIdentifier);
+
+ SdrObjFactory() = delete;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdobjkind.hxx b/include/svx/svdobjkind.hxx
new file mode 100644
index 000000000..187fd0d6f
--- /dev/null
+++ b/include/svx/svdobjkind.hxx
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/form/FormComponentType.hpp>
+
+enum class SdrObjKind : sal_uInt16
+{
+ NONE = 0, /// abstract object (SdrObject)
+ Group = 1, /// object group
+ Line = 2, /// line
+ Rectangle = 3, /// rectangle (round corners optional)
+ CircleOrEllipse = 4, /// circle, ellipse
+ CircleSection = 5, /// circle section
+ CircleArc = 6, /// circle arc
+ CircleCut = 7, /// circle cut
+ Polygon = 8, /// polygon, PolyPolygon
+ PolyLine = 9, /// PolyLine
+ PathLine = 10, /// open Bezier-curve
+ PathFill = 11, /// closed Bezier-curve
+ FreehandLine = 12, /// open free-hand line
+ FreehandFill = 13, /// closed free-hand line
+ SplineLine = 14, /// natural cubic Spline (ni)
+ SplineFill = 15, /// periodic cubic Spline (ni)
+ Text = 16, /// text object
+ TitleText = 20, /// TitleText, special text object for StarDraw
+ OutlineText = 21, /// OutlineText, special text object for StarDraw
+ Graphic = 22, /// foreign graphic (StarView Graphic)
+ OLE2 = 23, /// OLE object
+ Edge = 24, /// connector object
+ Caption = 25, /// caption object
+ PathPoly = 26, /// Polygon/PolyPolygon represented by SdrPathObj
+ PathPolyLine = 27, /// Polyline represented by SdrPathObj
+ Page = 28, /// object that represents a SdrPage
+ Measure = 29, /// measurement object
+ OLEPluginFrame = 31, /// continuously activated OLE (PlugIn-Frame or similar)
+ UNO = 32, /// Universal Network Object packed into SvDraw object
+ CustomShape = 33, /// custom shape
+ Media = 34, /// media shape
+ Table = 35, /// table
+
+ OLE2Applet = 100,
+ OLE2Plugin = 101,
+
+ // engine3d, arbitrarily place at 200
+ E3D_Scene = 202,
+ // E3D_OBJECT_ID should not be used, it's only a helper class for E3DScene and E3DCompoundObject
+ E3D_Object = 203,
+ E3D_Cube = 204,
+ E3D_Sphere = 205,
+ E3D_Extrusion = 206,
+ E3D_Lathe = 207,
+ E3D_CompoundObject = 208,
+ E3D_Polygon = 209,
+ E3D_INVENTOR_FIRST = E3D_Scene,
+ E3D_INVENTOR_LAST = E3D_Polygon,
+
+ // for form components, arbitrarily place at 300
+ FormControl = 300 + css::form::FormComponentType::CONTROL,
+ FormEdit = 300 + css::form::FormComponentType::TEXTFIELD,
+ FormButton = 300 + css::form::FormComponentType::COMMANDBUTTON,
+ FormFixedText = 300 + css::form::FormComponentType::FIXEDTEXT,
+ FormListbox = 300 + css::form::FormComponentType::LISTBOX,
+ FormCheckbox = 300 + css::form::FormComponentType::CHECKBOX,
+ FormCombobox = 300 + css::form::FormComponentType::COMBOBOX,
+ FormRadioButton = 300 + css::form::FormComponentType::RADIOBUTTON,
+ FormGroupBox = 300 + css::form::FormComponentType::GROUPBOX,
+ FormGrid = 300 + css::form::FormComponentType::GRIDCONTROL,
+ FormImageButton = 300 + css::form::FormComponentType::IMAGEBUTTON,
+ FormFileControl = 300 + css::form::FormComponentType::FILECONTROL,
+ FormDateField = 300 + css::form::FormComponentType::DATEFIELD,
+ FormTimeField = 300 + css::form::FormComponentType::TIMEFIELD,
+ FormNumericField = 300 + css::form::FormComponentType::NUMERICFIELD,
+ FormCurrencyField = 300 + css::form::FormComponentType::CURRENCYFIELD,
+ FormPatternField = 300 + css::form::FormComponentType::PATTERNFIELD,
+ FormHidden = 300 + css::form::FormComponentType::HIDDENCONTROL,
+ FormImageControl = 300 + css::form::FormComponentType::IMAGECONTROL,
+ FormFormattedField = 300 + css::form::FormComponentType::PATTERNFIELD + 1,
+ FormScrollbar = 300 + css::form::FormComponentType::PATTERNFIELD + 2,
+ FormSpinButton = 300 + css::form::FormComponentType::PATTERNFIELD + 3,
+ FormNavigationBar = 300 + css::form::FormComponentType::PATTERNFIELD + 4,
+
+ // basctl, arbitrarily place at 400
+ BasicDialogControl = 401,
+ BasicDialogDialog = 402,
+ BasicDialogPushButton = 403,
+ BasicDialogRadioButton = 404,
+ BasicDialogCheckbox = 405,
+ BasicDialogListbox = 406,
+ BasicDialogCombobox = 407,
+ BasicDialogGroupBox = 408,
+ BasicDialogEdit = 409,
+ BasicDialogFixedText = 410,
+ BasicDialogImageControl = 411,
+ BasicDialogProgressbar = 412,
+ BasicDialogHorizontalScrollbar = 413,
+ BasicDialogVerticalScrollbar = 414,
+ BasicDialogHorizontalFixedLine = 415,
+ BasicDialogVerticalFixedLine = 416,
+ BasicDialogDateField = 417,
+ BasicDialogTimeField = 418,
+ BasicDialogNumericField = 419,
+ BasicDialogCurencyField = 420,
+ BasicDialogFormattedField = 421,
+ BasicDialogPatternField = 422,
+ BasicDialogFileControl = 423,
+ BasicDialogTreeControl = 424,
+ BasicDialogSpinButton = 425,
+ BasicDialogGridControl = 426,
+ BasicDialogHyperlinkControl = 427,
+
+ BasicDialogFormRadio = 428,
+ BasicDialogFormCheck = 429,
+ BasicDialogFormList = 430,
+ BasicDialogFormCombo = 431,
+ BasicDialogFormSpin = 432,
+ BasicDialogFormVerticalScroll = 433,
+ BasicDialogFormHorizontalScroll = 434,
+
+ // reportdesign, arbitrarily place at 500
+ ReportDesignFixedText = 501,
+ ReportDesignImageControl = 502,
+ ReportDesignFormattedField = 503,
+ ReportDesignHorizontalFixedLine = 504,
+ ReportDesignVerticalFixedLine = 505,
+ ReportDesignSubReport = 506,
+
+ // writer, arbitrarily place at 600
+ SwFlyDrawObjIdentifier = 601
+};
+
+inline constexpr bool IsInventorE3D(SdrObjKind e)
+{
+ return e >= SdrObjKind::E3D_INVENTOR_FIRST && e <= SdrObjKind::E3D_INVENTOR_LAST;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
new file mode 100644
index 000000000..28337b663
--- /dev/null
+++ b/include/svx/svdocapt.hxx
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdorect.hxx>
+#include <svx/svxdllapi.h>
+
+
+// Forward Declarations
+class ImpCaptParams;
+
+namespace sdr::properties {
+ class CaptionProperties;
+}
+
+// Helper Class SdrCaptObjGeoData
+class SdrCaptObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ tools::Polygon aTailPoly;
+};
+
+// SdrCaptionObj
+class SVXCORE_DLLPUBLIC SdrCaptionObj final : public SdrRectObj
+{
+private:
+ // to allow sdr::properties::CaptionProperties access to ImpRecalcTail()
+ friend class sdr::properties::CaptionProperties;
+ friend class SdrTextObj; // for ImpRecalcTail() during AutoGrow
+
+ // tdf#118662 exclusive friend function and setter for SuppressGetBitmap
+ friend void setSuppressGetBitmapFromXclObjComment(SdrCaptionObj* pSdrCaptionObj, bool bValue);
+ void setSuppressGetBitmap(bool bNew)
+ {
+ mbSuppressGetBitmap = bNew;
+ }
+
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+ tools::Polygon aTailPoly; // the whole tail polygon
+ bool mbSpecialTextBoxShadow; // for calc special shadow, default FALSE
+ bool mbFixedTail; // for calc note box fixed tail, default FALSE
+ bool mbSuppressGetBitmap; // tdf#118662
+ Point maFixedTailPos; // for calc note box fixed tail position.
+
+ SVX_DLLPRIVATE void ImpGetCaptParams(ImpCaptParams& rPara) const;
+ SVX_DLLPRIVATE static void ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle const & rRect);
+ SVX_DLLPRIVATE static void ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle const & rRect);
+ SVX_DLLPRIVATE static void ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle const & rRect);
+ SVX_DLLPRIVATE static void ImpCalcTail (const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle const & rRect);
+ SVX_DLLPRIVATE void ImpRecalcTail();
+
+ // protected destructor
+ virtual ~SdrCaptionObj() override;
+
+public:
+ SdrCaptionObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrCaptionObj(SdrModel& rSdrModel, SdrCaptionObj const & rSource);
+ SdrCaptionObj(
+ SdrModel& rSdrModel,
+ const tools::Rectangle& rRect,
+ const Point& rTail);
+
+ // tdf#118662 getter for SuppressGetBitmap
+ bool isSuppressGetBitmap() const { return mbSuppressGetBitmap; }
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual SdrCaptionObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ // for calc: special shadow only for text box
+ void SetSpecialTextBoxShadow() { mbSpecialTextBoxShadow = true; }
+ bool GetSpecialTextBoxShadow() const { return mbSpecialTextBoxShadow; }
+
+ // for calc: fixed note tail position.
+ void SetFixedTail() { mbFixedTail = true; }
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+
+ virtual void NbcSetRelativePos(const Point& rPnt) override;
+ virtual Point GetRelativePos() const override;
+
+ virtual const tools::Rectangle& GetLogicRect() const override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+
+private:
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+public:
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ const Point& GetTailPos() const;
+ void SetTailPos(const Point& rPos);
+ void NbcSetTailPos(const Point& rPos);
+
+ // #i32599#
+ // Add own implementation for TRSetBaseGeometry to handle TailPos over changes
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
+
+ const Point& GetFixedTailPos() const {return maFixedTailPos;}
+
+ // geometry access
+ ::basegfx::B2DPolygon getTailPolygon() const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx
new file mode 100644
index 000000000..5da739068
--- /dev/null
+++ b/include/svx/svdocirc.hxx
@@ -0,0 +1,143 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdorect.hxx>
+#include <svx/svxdllapi.h>
+
+namespace sdr::properties {
+ class CircleProperties;
+}
+
+// Helper class SdrCircObjGeoData
+
+class SdrCircObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ Degree100 nStartAngle;
+ Degree100 nEndAngle;
+};
+
+enum class SdrCircKind { Full, Section, Cut, Arc };
+
+extern SVXCORE_DLLPUBLIC SdrCircKind ToSdrCircKind(SdrObjKind);
+
+
+class SVXCORE_DLLPUBLIC SdrCircObj final : public SdrRectObj
+{
+private:
+ // to allow sdr::properties::CircleProperties access to ImpSetAttrToCircInfo()
+ friend class sdr::properties::CircleProperties;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ SdrCircKind meCircleKind;
+ Degree100 nStartAngle;
+ Degree100 nEndAngle;
+
+ SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrCircKind eKind, const tools::Rectangle& rRect1, Degree100 nStart, Degree100 nEnd) const;
+ SVX_DLLPRIVATE static void ImpSetCreateParams(SdrDragStat& rStat);
+ SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // copy values from pool
+ SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // copy values into pool
+
+ // returns sal_True if paint requires a XPolygon
+ SVX_DLLPRIVATE bool PaintNeedsXPolyCirc() const; // PaintNeedsXPoly-> PaintNeedsXPolyCirc
+ SVX_DLLPRIVATE virtual void RecalcXPoly() override;
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+private:
+ // protected destructor - due to final, make private
+ virtual ~SdrCircObj() override;
+
+public:
+ SdrCircObj(
+ SdrModel& rSdrModel,
+ SdrCircKind eNewKind);
+ SdrCircObj(
+ SdrModel& rSdrModel,
+ SdrCircKind eNewKind,
+ const tools::Rectangle& rRect);
+ // Copy constructor
+ SdrCircObj(SdrModel& rSdrModel, SdrCircObj const & rSource);
+
+ // 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h
+ // The circle is build up from StartAngle to EndWink anti-clockwise.
+ // If nNewStartAngle==nNewEndWink, then arc has an angle of 0 degrees.
+ // If nNewStartAngle+36000==nNewEndWink, then the arc has angle of 360 degrees.
+ SdrCircObj(
+ SdrModel& rSdrModel,
+ SdrCircKind eNewKind,
+ const tools::Rectangle& rRect,
+ Degree100 nNewStartAngle,
+ Degree100 nNewEndAngle);
+
+ SdrCircKind GetCircleKind() const { return meCircleKind; }
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual SdrCircObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual void RecalcSnapRect() override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+ virtual void NbcMove(const Size& aSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear (const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+private:
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+public:
+ Degree100 GetStartAngle() const { return nStartAngle; }
+ Degree100 GetEndAngle() const { return nEndAngle; }
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
new file mode 100644
index 000000000..6e3acb339
--- /dev/null
+++ b/include/svx/svdoedge.hxx
@@ -0,0 +1,411 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <optional>
+#include <svx/svdotext.hxx>
+#include <svx/svdglue.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/xpoly.hxx>
+
+
+class SdrDragMethod;
+class SdrPageView;
+
+namespace sdr::properties {
+ class ConnectorProperties;
+}
+
+
+/// Utility class SdrObjConnection
+class SdrObjConnection final
+{
+ friend class SdrEdgeObj;
+ friend class ImpEdgeHdl;
+ friend class SdrCreateView;
+
+ Point aObjOfs; // set during dragging of a node
+ SdrObject* pObj; // referenced object
+ sal_uInt16 nConId; // connector number
+
+ bool bBestConn : 1; // true -> the best-matching connector is searched for
+ bool bBestVertex : 1; // true -> the best-matching vertex to connect is searched for
+ bool bAutoVertex : 1; // autoConnector at apex nCon
+ bool bAutoCorner : 1; // autoConnector at corner nCon
+
+public:
+ SdrObjConnection() { ResetVars(); }
+
+ void ResetVars();
+ bool TakeGluePoint(SdrGluePoint& rGP) const;
+
+ void SetBestConnection( bool rB ) { bBestConn = rB; };
+ void SetBestVertex( bool rB ) { bBestVertex = rB; };
+ void SetAutoVertex( bool rB ) { bAutoVertex = rB; };
+ void SetConnectorId( sal_uInt16 nId ) { nConId = nId; };
+
+ bool IsBestConnection() const { return bBestConn; };
+ bool IsAutoVertex() const { return bAutoVertex; };
+ sal_uInt16 GetConnectorId() const { return nConId; };
+ SdrObject* GetObject() const { return pObj; }
+};
+
+
+enum class SdrEdgeLineCode { Obj1Line2, Obj1Line3, Obj2Line2, Obj2Line3, MiddleLine };
+
+/// Utility class SdrEdgeInfoRec
+class SdrEdgeInfoRec
+{
+public:
+ // The 5 distances are set on dragging or via SetAttr and are
+ // evaluated by ImpCalcEdgeTrack. Only 0-3 longs are transported
+ // via Get/SetAttr/Get/SetStyleSh though.
+ Point aObj1Line2;
+ Point aObj1Line3;
+ Point aObj2Line2;
+ Point aObj2Line3;
+ Point aMiddleLine;
+
+ // Following values are set by ImpCalcEdgeTrack
+ tools::Long nAngle1; // exit angle at Obj1
+ tools::Long nAngle2; // exit angle at Obj2
+ sal_uInt16 nObj1Lines; // 1..3
+ sal_uInt16 nObj2Lines; // 1..3
+ sal_uInt16 nMiddleLine; // 0xFFFF=none, otherwise point number of the beginning of the line
+
+public:
+ SdrEdgeInfoRec()
+ : nAngle1(0),
+ nAngle2(0),
+ nObj1Lines(0),
+ nObj2Lines(0),
+ nMiddleLine(0xFFFF)
+ {}
+
+ Point& ImpGetLineOffsetPoint(SdrEdgeLineCode eLineCode);
+ sal_uInt16 ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
+ bool ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
+ void ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, tools::Long nVal);
+ tools::Long ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
+};
+
+
+/// Utility class SdrEdgeObjGeoData
+class SdrEdgeObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ SdrObjConnection aCon1; // connection status of the beginning of the line
+ SdrObjConnection aCon2; // connection status of the end of the line
+ std::optional<XPolygon> pEdgeTrack;
+ bool bEdgeTrackDirty; // true -> connector track needs to be recalculated
+ bool bEdgeTrackUserDefined;
+ SdrEdgeInfoRec aEdgeInfo;
+
+public:
+ SdrEdgeObjGeoData();
+ virtual ~SdrEdgeObjGeoData() override;
+};
+
+
+/// Utility class SdrEdgeObj
+class SVXCORE_DLLPUBLIC SdrEdgeObj final : public SdrTextObj
+{
+private:
+ // to allow sdr::properties::ConnectorProperties access to ImpSetAttrToEdgeInfo()
+ friend class sdr::properties::ConnectorProperties;
+
+ friend class SdrCreateView;
+ friend class ImpEdgeHdl;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ SdrObjConnection aCon1; // Connection status of the beginning of the line
+ SdrObjConnection aCon2; // Connection status of the end of the line
+
+ std::optional<XPolygon> pEdgeTrack;
+ sal_uInt16 nNotifyingCount; // Locking
+ SdrEdgeInfoRec aEdgeInfo;
+
+ bool bEdgeTrackDirty : 1; // true -> Connection track needs to be recalculated
+ bool bEdgeTrackUserDefined : 1;
+
+ // Bool to allow suppression of default connects at object
+ // inside test (HitTest) and object center test (see ImpFindConnector())
+ bool mbSuppressDefaultConnect : 1;
+
+ // Flag value for avoiding infinite loops when calculating
+ // BoundRects from ring-connected connectors. A coloring algorithm
+ // is used here. When the GetCurrentBoundRect() calculation of a
+ // SdrEdgeObj is running, the flag is set, else it is always
+ // false.
+ bool mbBoundRectCalculationRunning : 1;
+
+ // #i123048# need to remember if layouting was suppressed before to get
+ // to a correct state for first real layouting
+ bool mbSuppressed : 1;
+
+public:
+ // Interface to default connect suppression
+ void SetSuppressDefaultConnect(bool bNew) { mbSuppressDefaultConnect = bNew; }
+ bool GetSuppressDefaultConnect() const { return mbSuppressDefaultConnect; }
+
+private:
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+ static XPolygon ImpCalcObjToCenter(const Point& rStPt, tools::Long nEscAngle, const tools::Rectangle& rRect, const Point& rCenter);
+ void ImpRecalcEdgeTrack(); // recalculation of the connection track
+ XPolygon ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const;
+ XPolygon ImpCalcEdgeTrack(const Point& rPt1, tools::Long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
+ const Point& rPt2, tools::Long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
+ sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const;
+ static bool ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=nullptr, SdrDragStat* pDragStat = nullptr);
+ static SdrEscapeDirection ImpCalcEscAngle(SdrObject const * pObj, const Point& aPt2);
+ void ImpSetTailPoint(bool bTail1, const Point& rPt);
+ void ImpUndirtyEdgeTrack(); // potential recalculation of the connection track
+ void ImpDirtyEdgeTrack(); // invalidate connector path, so it will be recalculated next time
+ void ImpSetAttrToEdgeInfo(); // copying values from the pool to aEdgeInfo
+ void ImpSetEdgeInfoToAttr(); // copying values from the aEdgeInfo to the pool
+
+ // protected destructor
+ virtual ~SdrEdgeObj() override;
+
+public:
+ SdrEdgeObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrEdgeObj(SdrModel& rSdrModel, SdrEdgeObj const & rSource);
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ SdrObjConnection& GetConnection(bool bTail1) { return *(bTail1 ? &aCon1 : &aCon2); }
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual const tools::Rectangle& GetCurrentBoundRect() const override;
+ virtual const tools::Rectangle& GetSnapRect() const override;
+ virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
+ virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const override;
+ virtual const SdrGluePointList* GetGluePointList() const override;
+ virtual SdrGluePointList* ForceGluePointList() override;
+
+ // * for all of the below: bTail1=true: beginning of the line,
+ // otherwise end of the line
+ // * pObj=NULL: disconnect connector
+ void SetEdgeTrackDirty() { bEdgeTrackDirty=true; }
+ void ConnectToNode(bool bTail1, SdrObject* pObj) override;
+ void DisconnectFromNode(bool bTail1) override;
+ SdrObject* GetConnectedNode(bool bTail1) const override;
+ const SdrObjConnection& GetConnection(bool bTail1) const { return *(bTail1 ? &aCon1 : &aCon2); }
+ bool CheckNodeConnection(bool bTail1) const;
+
+ virtual void RecalcSnapRect() override;
+ virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
+ virtual SdrEdgeObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ void SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly );
+ basegfx::B2DPolyPolygon GetEdgeTrackPath() const;
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+
+ // FullDrag support
+ virtual SdrObjectUniquePtr getFullDragClone() const override;
+
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcMove(const Size& aSize) override;
+ virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override;
+
+ // #i54102# added rotate, mirror and shear support
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+
+ // #102344# Added missing implementation
+ virtual void NbcSetAnchorPos(const Point& rPnt) override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+ virtual bool IsPolyObj() const override;
+ virtual sal_uInt32 GetPointCount() const override;
+ virtual Point GetPoint(sal_uInt32 i) const override;
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ /** updates edges that are connected to the edges of this object
+ as if the connected objects send a repaint broadcast
+ #103122#
+ */
+ void Reformat();
+
+ // helper methods for the StarOffice api
+ Point GetTailPoint( bool bTail ) const;
+ void SetTailPoint( bool bTail, const Point& rPt );
+ void setGluePointIndex( bool bTail, sal_Int32 nId = -1 );
+ sal_Int32 getGluePointIndex( bool bTail );
+
+ virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
+
+ // for geometry access
+ ::basegfx::B2DPolygon getEdgeTrack() const;
+
+ // helper method for SdrDragMethod::AddConnectorOverlays. Adds an overlay polygon for
+ // this connector to rResult.
+ basegfx::B2DPolygon ImplAddConnectorOverlay(const SdrDragMethod& rDragMethod, bool bTail1, bool bTail2, bool bDetail) const;
+};
+
+ // The following item parameters of the SdrItemPool are used to
+ // determine the actual connector line routing:
+ //
+ // sal_uInt16 EdgeFlowAngle default 9000 (= 90.00 deg), min 0, max 9000
+ // Clearance angle.
+ // The angle at which the connecting line may run.
+ //
+ // sal_uInt16 EdgeEscAngle default 9000 (= 90.00 Deg), min 0, max 9000
+ // Object exit angle.
+ // The angle at which the connection line may exit from the object.
+ //
+ // bool EdgeEscAsRay default false
+ // true -> the connecting line emerges from the object radially.
+ // Thus, angle specification by the line ObjCenter / connector.
+ //
+ // bool EdgeEscUseObjAngle default false
+ // Object rotation angle is considered
+ // true -> when determining the connector exit angle, angle for
+ // object rotation is taken as an offset.
+ //
+ // sal_uIntPtr EdgeFlowDefDist default 0, min 0, max ?
+ // This is the default minimum distance on calculation of the
+ // connection Line to the docked objects is in logical units.
+ // This distance is overridden within the object, as soon as the
+ // user drags on the lines. When docking onto a new object,
+ // however, this default is used again.
+ //
+ //
+ // General Information About Connectors:
+ //
+ // There are nodes and edge objects. Two nodes can be joined by an
+ // edge. If a connector is connected to a node only at one end, the
+ // other end is fixed to an absolute position in the document. It is
+ // of course also possible for a connector to be "free" at both ends,
+ // i.e. not connected to a node object on each side.
+ //
+ // A connector object can also theoretically be a node object at the
+ // same time. In the first version, however, this will not yet be
+ // realized.
+ //
+ // A connection between node and connector edge can be established by:
+ // - Interactive creation of a new edge object at the SdrView where
+ // the beginning or end point of the edge is placed on a connector
+ // (glueing point) of an already existing node object.
+ // - Interactive dragging of the beginning or end point of an
+ // existing connector edge object on the SdrView to a connector
+ // (glueing point) of an already existing node object.
+ // - Undo/Redo
+ // Moving node objects does not make any connections. Also not the
+ // direct shifting of edge endpoints on the SdrModel... Connections
+ // can also be established, if the connectors are not configured to
+ // be visible in the view.
+ //
+ // An existing connection between node and edge is retained for:
+ // - Dragging (Move/Resize/Rotate/...) of the node object
+ // - Moving a connector position in the node object
+ // - Simultaneous dragging (Move/Resize/Rotate/...) of the node and the
+ // edge
+ //
+ // A connection between node and edge can be removed by:
+ // - Deleting one of the objects
+ // - Dragging the edge object without simultaneously dragging the node
+ // - Deleting the connector at the node object
+ // - Undo/Redo/Repeat
+ // When dragging, the request to remove the connection must be
+ // requested from outside of the model (for example, from the
+ // SdrView). SdrEdgeObj::Move() itself does not remove the
+ // connection.
+ //
+ // Each node object can have connectors, so-called gluepoints. These
+ // are the geometric points at which the connecting edge object ends
+ // when the connection is established. By default, each object has no
+ // connectors. Nevertheless, one can dock an edge in certain view
+ // settings since then, e.g., connectors can be automatically
+ // generated at the 4 vertices of the node object when needed. Each
+ // object provides 2x4 so-called default connector positions, 4 at
+ // the vertices and 4 at the corner positions. In the normal case,
+ // these are located at the 8 handle positions; exceptions here are
+ // ellipses, parallelograms, ... . In addition, user-specific
+ // connectors can be set for each node object.
+ //
+ // Then there is also the possibility to dock an edge on an object
+ // with the attribute "bUseBestConnector". The best-matching
+ // connector position for the routing of the connection line is then
+ // used from the offering of connectors of the object or/and of the
+ // vertices. The user assigns this attribute by docking the node in
+ // its center (see, e.g., Visio).
+ // 09-06-1996: bUseBestConnector uses vertex gluepoints only.
+ //
+ // And here is some terminology:
+ // Connector : The connector object (edge object)
+ // Node : Any object to which a connector can be glued to, e.g., a rectangle,
+ // etc.
+ // Gluepoint: The point at which the connector is glued to the node object.
+ // There are:
+ // Vertex gluepoints: Each node object presents these glue
+ // points inherently. Perhaps there is already the option
+ // "automatically glue to object vertex" in Draw (default is
+ // on).
+ // Corner gluepoints: These gluepoints, too, are already
+ // auto-enabled on objects. Similar to the ones above,
+ // there may already be an option for them in Draw (default is
+ // off).
+ // In contrast to Visio, vertex gluepoints and corner glue
+ // points are not displayed in the UI; they are simply there (if
+ // the option is activated).
+ // Custom gluepoints: Any number of them are present on each
+ // node object. They can be made visible using the option
+ // (always visible when editing). At the moment, however, they
+ // are not yet fully implemented.
+ // Automatic gluepoint selection: If the connector is docked
+ // to the node object so that the black frame encompasses the
+ // entire object, then the connector tries to find the most
+ // convenient of the 4 vertex gluepoints (and only of those).
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
new file mode 100644
index 000000000..7c6f98650
--- /dev/null
+++ b/include/svx/svdograf.hxx
@@ -0,0 +1,301 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/drawing/BarCode.hpp>
+#include <vcl/graph.hxx>
+#include <svx/svdorect.hxx>
+#include <vcl/GraphicObject.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+#include <memory>
+
+namespace sdr::properties { class GraphicProperties; }
+namespace sdr::contact { class ViewObjectContactOfGraphic; }
+
+/**
+ * Options for GetTransformedGraphic()
+ */
+enum class SdrGrafObjTransformsAttrs
+{
+ NONE = 0x00,
+ MIRROR = 0x01,
+ ROTATE = 0x02,
+ ALL = 0x03,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrGrafObjTransformsAttrs> : is_typed_flags<SdrGrafObjTransformsAttrs, 0x03> {};
+}
+
+class SdrGrafObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ bool bMirrored;
+
+ SdrGrafObjGeoData()
+ : bMirrored(false)
+ {
+ }
+};
+
+class GraphicObject;
+class SdrGraphicLink;
+
+/**
+ * This class represents an embedded or linked bitmap graphic object.
+ */
+class SVXCORE_DLLPUBLIC SdrGrafObj final : public SdrRectObj
+{
+private:
+ // to allow sdr::properties::GraphicProperties access to SetXPolyDirty()
+ friend class sdr::properties::GraphicProperties;
+
+ // to allow sdr::contact::ViewObjectContactOfGraphic access to ImpUpdateGraphicLink()
+ friend class sdr::contact::ViewObjectContactOfGraphic;
+ friend class SdrExchangeView; // Only for a ForceSwapIn() call.
+ friend class SdrGraphicLink;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ void ImpSetAttrToGrafInfo(); // Copy values from the pool
+ GraphicAttr aGrafInfo;
+
+ OUString aFileName; // If it's a Link, the filename can be found in here
+ OUString aFilterName;
+ std::unique_ptr<GraphicObject> mpGraphicObject; // In order to speed up output of bitmaps, especially rotated ones
+ std::unique_ptr<GraphicObject> mpReplacementGraphicObject;
+ SdrGraphicLink* pGraphicLink; // And here a pointer for linked graphics
+ bool bMirrored:1; // True: the graphic is horizontal, which means it's mirrored along the y-axis
+
+ // Flag for allowing text animation. Default is true.
+ bool mbGrafAnimationAllowed:1;
+
+ bool mbIsSignatureLine;
+ OUString maSignatureLineId;
+ OUString maSignatureLineSuggestedSignerName;
+ OUString maSignatureLineSuggestedSignerTitle;
+ OUString maSignatureLineSuggestedSignerEmail;
+ OUString maSignatureLineSigningInstructions;
+ bool mbIsSignatureLineShowSignDate;
+ bool mbIsSignatureLineCanAddComment;
+ bool mbSignatureLineIsSigned;
+ css::uno::Reference<css::graphic::XGraphic> mpSignatureLineUnsignedGraphic;
+
+ std::unique_ptr<css::drawing::BarCode> mpBarCode;
+ void ImpRegisterLink();
+ void ImpDeregisterLink();
+ void ImpSetLinkedGraphic( const Graphic& rGraphic );
+ void onGraphicChanged();
+ GDIMetaFile GetMetaFile(GraphicType &rGraphicType) const;
+
+ // protected destructor
+ virtual ~SdrGrafObj() override;
+
+public:
+ SdrGrafObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrGrafObj(SdrModel& rSdrModel, SdrGrafObj const & rSource);
+ SdrGrafObj(
+ SdrModel& rSdrModel,
+ const Graphic& rGrf);
+ SdrGrafObj(
+ SdrModel& rSdrModel,
+ const Graphic& rGrf,
+ const tools::Rectangle& rRect);
+
+ void SetGraphicObject( const GraphicObject& rGrfObj );
+ const GraphicObject& GetGraphicObject(bool bForceSwapIn = false) const;
+ const GraphicObject* GetReplacementGraphicObject() const;
+
+ void NbcSetGraphic(const Graphic& rGrf);
+ void SetGraphic(const Graphic& rGrf);
+ const Graphic& GetGraphic() const;
+
+ Graphic GetTransformedGraphic( SdrGrafObjTransformsAttrs nTransformFlags = SdrGrafObjTransformsAttrs::ALL ) const;
+
+ GraphicType GetGraphicType() const;
+
+ GraphicAttr GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlags = SdrGrafObjTransformsAttrs::ALL ) const;
+
+ // Keep ATM for SD.
+ bool IsAnimated() const;
+ bool IsEPS() const;
+
+ MapMode GetGrafPrefMapMode() const;
+ Size GetGrafPrefSize() const;
+
+ void SetGrafStreamURL( const OUString& rGraphicStreamURL );
+ OUString const & GetGrafStreamURL() const;
+ Size getOriginalSize() const;
+
+private:
+ void ForceSwapIn() const;
+
+public:
+ void SetGraphicLink(const OUString& rFileName);
+ void ReleaseGraphicLink();
+ bool IsLinkedGraphic() const;
+
+ const OUString& GetFileName() const { return aFileName;}
+
+ void StartAnimation();
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual SdrGrafObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ bool HasGDIMetaFile() const;
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ bool isEmbeddedVectorGraphicData() const;
+ GDIMetaFile getMetafileFromEmbeddedVectorGraphicData() const;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
+
+ bool IsMirrored() const { return bMirrored;}
+ void SetMirrored( bool _bMirrored );
+
+ virtual bool shouldKeepAspectRatio() const override { return true; }
+
+ // Access to GrafAnimationAllowed flag
+ void SetGrafAnimationAllowed(bool bNew);
+
+ css::uno::Reference< css::io::XInputStream > getInputStream() const;
+
+ // #i103116# FullDrag support
+ virtual SdrObjectUniquePtr getFullDragClone() const override;
+
+ // add handles for crop mode when selected
+ virtual void addCropHandles(SdrHdlList& rTarget) const override;
+
+ // Signature Line
+ void setIsSignatureLine(bool bIsSignatureLine) { mbIsSignatureLine = bIsSignatureLine; }
+ bool isSignatureLine() const { return mbIsSignatureLine; }
+
+ void setSignatureLineId(const OUString& rSignatureLineId)
+ {
+ maSignatureLineId = rSignatureLineId;
+ }
+
+ const OUString& getSignatureLineId() const { return maSignatureLineId; }
+
+ void setSignatureLineSuggestedSignerName(const OUString& rSuggestedSignerName)
+ {
+ maSignatureLineSuggestedSignerName = rSuggestedSignerName;
+ }
+
+ const OUString& getSignatureLineSuggestedSignerName() const
+ {
+ return maSignatureLineSuggestedSignerName;
+ }
+
+ void setSignatureLineSuggestedSignerTitle(const OUString& rSuggestedSignerTitle)
+ {
+ maSignatureLineSuggestedSignerTitle = rSuggestedSignerTitle;
+ }
+
+ const OUString& getSignatureLineSuggestedSignerTitle() const
+ {
+ return maSignatureLineSuggestedSignerTitle;
+ }
+
+ void setSignatureLineSuggestedSignerEmail(const OUString& rSuggestedSignerEmail)
+ {
+ maSignatureLineSuggestedSignerEmail = rSuggestedSignerEmail;
+ }
+ const OUString& getSignatureLineSuggestedSignerEmail() const
+ {
+ return maSignatureLineSuggestedSignerEmail;
+ }
+
+ void setSignatureLineSigningInstructions(const OUString& rSigningInstructions)
+ {
+ maSignatureLineSigningInstructions = rSigningInstructions;
+ }
+
+ const OUString& getSignatureLineSigningInstructions() const
+ {
+ return maSignatureLineSigningInstructions;
+ }
+
+ void setSignatureLineShowSignDate(bool bIsSignatureLineShowSignDate)
+ {
+ mbIsSignatureLineShowSignDate = bIsSignatureLineShowSignDate;
+ }
+
+ bool isSignatureLineShowSignDate() const { return mbIsSignatureLineShowSignDate; }
+
+ void setSignatureLineCanAddComment(bool bIsSignatureCanAddComment)
+ {
+ mbIsSignatureLineCanAddComment = bIsSignatureCanAddComment;
+ }
+
+ bool isSignatureLineCanAddComment() const { return mbIsSignatureLineCanAddComment; }
+
+ css::uno::Reference<css::graphic::XGraphic> const & getSignatureLineUnsignedGraphic() const
+ {
+ return mpSignatureLineUnsignedGraphic;
+ }
+
+ void setSignatureLineUnsignedGraphic(css::uno::Reference<css::graphic::XGraphic> rGraphic)
+ {
+ mpSignatureLineUnsignedGraphic = rGraphic;
+ }
+
+ bool isSignatureLineSigned() const { return mbSignatureLineIsSigned; }
+
+ void setSignatureLineIsSigned(bool bIsSigned) { mbSignatureLineIsSigned = bIsSigned; }
+
+ // Qr Code
+ void setQrCode(css::drawing::BarCode& rBarCode)
+ {
+ mpBarCode = std::make_unique<css::drawing::BarCode>(rBarCode);
+ }
+
+ css::drawing::BarCode* getQrCode() const
+ {
+ return mpBarCode.get();
+ }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
new file mode 100644
index 000000000..4322d56df
--- /dev/null
+++ b/include/svx/svdogrp.hxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <svx/svdobj.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdpage.hxx>
+
+// SdrObjGroup
+class SVXCORE_DLLPUBLIC SdrObjGroup final : public SdrObject, public SdrObjList
+{
+public:
+ // Basic DiagramHelper support
+ virtual const std::shared_ptr< svx::diagram::IDiagramHelper >& getDiagramHelper() const override;
+
+private:
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties>
+ CreateObjectSpecificProperties() override;
+
+ Point maRefPoint; // Reference point inside the object group
+
+ // Allow *only* DiagramHelper itself to set this internal reference to
+ // tightly control usage
+ friend class svx::diagram::IDiagramHelper;
+ std::shared_ptr< svx::diagram::IDiagramHelper > mp_DiagramHelper;
+
+ // protected destructor - due to final, make private
+ virtual ~SdrObjGroup() override;
+
+public:
+ SdrObjGroup(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrObjGroup(SdrModel& rSdrModel, SdrObjGroup const& rSource);
+
+ // derived from SdrObjList
+ virtual SdrPage* getSdrPageFromSdrObjList() const override;
+ virtual SdrObject* getSdrObjectFromSdrObjList() const override;
+
+ // derived from SdrObject
+ virtual SdrObjList* getChildrenOfSdrObject() const override;
+
+ virtual void SetBoundRectDirty() override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrLayerID GetLayer() const override;
+ virtual void NbcSetLayer(SdrLayerID nLayer) override;
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ virtual SdrObjList* GetSubList() const override;
+ virtual void SetGrabBagItem(const css::uno::Any& rVal) override;
+
+ virtual const tools::Rectangle& GetCurrentBoundRect() const override;
+ virtual const tools::Rectangle& GetSnapRect() const override;
+
+ virtual SdrObjGroup* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual void RecalcSnapRect() override;
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+
+ // special drag methods
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+
+ virtual Degree100 GetRotateAngle() const override;
+ virtual Degree100 GetShearAngle(bool bVertical = false) const override;
+
+ virtual void Move(const Size& rSiz) override;
+ virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact,
+ bool bUnsetRelative = true) override;
+ virtual void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+ virtual void SetAnchorPos(const Point& rPnt) override;
+ virtual void SetRelativePos(const Point& rPnt) override;
+ virtual void SetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void SetLogicRect(const tools::Rectangle& rRect) override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact,
+ const Fraction& yFact) override;
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+ virtual void NbcSetAnchorPos(const Point& rPnt) override;
+ virtual void NbcSetRelativePos(const Point& rPnt) override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+
+ virtual void NbcReformatText() override;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
new file mode 100644
index 000000000..cd00b7d26
--- /dev/null
+++ b/include/svx/svdomeas.hxx
@@ -0,0 +1,203 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdotext.hxx>
+#include <svx/svxdllapi.h>
+#include <editeng/measfld.hxx>
+
+class SdrOutliner;
+struct ImpMeasureRec;
+struct ImpMeasurePoly;
+
+namespace sdr::properties {
+ class MeasureProperties;
+}
+
+class SdrMeasureObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ Point aPt1;
+ Point aPt2;
+
+public:
+ SdrMeasureObjGeoData();
+ virtual ~SdrMeasureObjGeoData() override;
+};
+
+class SVXCORE_DLLPUBLIC SdrMeasureObj final : public SdrTextObj
+{
+private:
+ // to allow sdr::properties::MeasureProperties access to SetTextDirty()
+ friend class sdr::properties::MeasureProperties;
+ friend class SdrMeasureField;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ Point aPt1;
+ Point aPt2;
+ bool bTextDirty;
+
+ void ImpTakeAttr(ImpMeasureRec& rRec) const;
+ OUString TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind) const;
+ void ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol) const;
+ static basegfx::B2DPolyPolygon ImpCalcXPoly(const ImpMeasurePoly& rPol);
+ void ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) const;
+ void SetTextDirty()
+ {
+ bTextDirty=true;
+ SetTextSizeDirty();
+ if (!m_aOutRect.IsEmpty())
+ {
+ SetBoundRectDirty();
+ SetBoundAndSnapRectsDirty(/*bNotMyself*/true);
+ }
+ }
+ void UndirtyText() const;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ // protected destructor
+ virtual ~SdrMeasureObj() override;
+
+public:
+ SdrMeasureObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrMeasureObj(SdrModel& rSdrModel, SdrMeasureObj const & rSource);
+ SdrMeasureObj(
+ SdrModel& rSdrModel,
+ const Point& rPt1,
+ const Point& rPt2);
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
+ virtual SdrMeasureObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+ virtual Degree100 GetRotateAngle() const override;
+ virtual void RecalcSnapRect() override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+
+ virtual bool IsPolyObj() const override;
+ virtual sal_uInt32 GetPointCount() const override;
+ virtual Point GetPoint(sal_uInt32 i) const override;
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual bool BegTextEdit(SdrOutliner& rOutl) override;
+ virtual const Size& GetTextSize() const override;
+ virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
+ tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override;
+ virtual void TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const override;
+ virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override;
+ virtual EEAnchorMode GetOutlinerViewAnchorMode() const override;
+ virtual void NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject) override;
+ virtual OutlinerParaObject* GetOutlinerParaObject() const override;
+
+ virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
+ bool bEdit, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, OUString& rRet) const override;
+
+ // #i97878#
+ virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
+};
+
+// Creating:
+// ~~~~~~~~~
+// dragging reference point 1 to reference point 2 -> reference edge
+//
+// Defaults:
+// ~~~~~~~~~~~~~
+// dimension line and auxiliary dimension lines: solid black hairlines
+// arrows : 2mm x 4mm
+// text size
+// ___
+// | dimension | 2mm
+// |<--------------------->|---
+// | | 8mm
+// | |
+// Pt1============# Pt2-- <----reference edge (from Pt1 to Pt2)
+// # # |___ <-excess length of the auxiliary dimension line(s)
+// # #=========#
+// # objected to be dimensioned #
+// #=======================#
+//
+// Attributes:
+// ~~~~~~~~~~
+// 1. Where is the text: middle, right or left (default=automatic)
+// 2. Text above or below the line or line broken by text (default=automatic)
+// Default=8mm
+// 3. The distance from the dimension line to the reference edge (= to the dimensioned object)
+// 4. dimension line below the reference edge (default=no))
+// 5. excess length of the auxiliary dimension lines beyond the reference edge (2x, default=0)
+// 6. excess length of the auxiliary dimension lines past the dimension line (default=2mm)
+// 7. distance between the auxiliary dimension line and the reference edge
+//
+// Dragging: Handle Shift
+// ~~~~~~~~~
+// - reference points SolidQuadHdl only the length
+// 1.+2. Seizing the text
+// 3.+4. Hdl on arrow (2x) SolidQuadHdl only the Bool
+// 5. Hdl one end point CircHdl both lengths ?
+// 6.+7. no dragging
+//
+// Open:
+// ~~~~~~
+// - radiuses (anchor as type immediately)
+//
+// Special:
+// ~~~~~~~~
+// Connecting to a maximum of two objects
+// -> during Copy, etc. use the respective code of the connectors?!?
+// this probably will be pretty complicated ...
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
new file mode 100644
index 000000000..d80ec5a57
--- /dev/null
+++ b/include/svx/svdomedia.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <svx/svdorect.hxx>
+#include <avmedia/mediaitem.hxx>
+#include <svx/svxdllapi.h>
+
+class Graphic;
+
+namespace sdr::contact { class ViewContactOfSdrMediaObj; }
+namespace com::sun::star::graphic { class XGraphic; }
+
+
+class SVXCORE_DLLPUBLIC SdrMediaObj final : public SdrRectObj
+{
+ friend class sdr::contact::ViewContactOfSdrMediaObj;
+
+private:
+ // protected destructor - due to final, make private
+ virtual ~SdrMediaObj() override;
+
+public:
+ SdrMediaObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrMediaObj(SdrModel& rSdrModel, SdrMediaObj const & rSource);
+ SdrMediaObj(
+ SdrModel& rSdrModel,
+ const tools::Rectangle& rRect);
+
+ virtual bool HasTextEdit() const override;
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual SdrMediaObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
+
+ void setURL( const OUString& rURL, const OUString& rReferer, const OUString& rMimeType = OUString() );
+ const OUString& getURL() const;
+
+ void setMediaProperties( const ::avmedia::MediaItem& rState );
+ const ::avmedia::MediaItem& getMediaProperties() const;
+
+ css::uno::Reference< css::graphic::XGraphic > const &
+ getSnapshot() const;
+ css::uno::Reference< css::io::XInputStream>
+ GetInputStream() const;
+ void SetInputStream(css::uno::Reference<css::io::XInputStream> const&);
+
+ virtual bool shouldKeepAspectRatio() const override { return true; }
+
+private:
+ void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+ struct Impl;
+ std::unique_ptr<Impl> m_xImpl;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
new file mode 100644
index 000000000..522bead95
--- /dev/null
+++ b/include/svx/svdoole2.hxx
@@ -0,0 +1,213 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <svx/svdorect.hxx>
+#include <svx/svxdllapi.h>
+#include <sfx2/lnkbase.hxx>
+
+#include <com/sun/star/uno/Reference.h>
+
+namespace com::sun::star {
+
+namespace awt { class XWindow; }
+
+namespace datatransfer { class XTransferable; }
+
+namespace embed { class XEmbeddedObject; }
+
+namespace frame { class XModel; }
+
+namespace io { class XInputStream; }
+}
+
+namespace svt { class EmbeddedObjectRef; }
+
+class SdrOle2ObjImpl;
+class SvxOle2Shape;
+
+class SVXCORE_DLLPUBLIC SdrOle2Obj : public SdrRectObj
+{
+private:
+ std::unique_ptr<SdrOle2ObjImpl> mpImpl;
+
+private:
+ SVX_DLLPRIVATE void Connect_Impl(SvxOle2Shape* pCreator = nullptr);
+ SVX_DLLPRIVATE void Disconnect_Impl();
+ SVX_DLLPRIVATE void AddListeners_Impl();
+ SVX_DLLPRIVATE void RemoveListeners_Impl();
+ SVX_DLLPRIVATE void GetObjRef_Impl();
+
+ // #i118485# helper added
+ SVX_DLLPRIVATE SdrObjectUniquePtr createSdrGrafObjReplacement(bool bAddText) const;
+ SVX_DLLPRIVATE void ImpSetVisAreaSize();
+
+ SVX_DLLPRIVATE void Init();
+
+protected:
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ // protected destructor
+ virtual ~SdrOle2Obj() override;
+
+public:
+ OUString GetStyleString();
+
+ SdrOle2Obj(
+ SdrModel& rSdrModel,
+ bool bFrame_ = false);
+ // Copy constructor
+ SdrOle2Obj(SdrModel& rSdrModel, SdrOle2Obj const & rSource);
+ SdrOle2Obj(
+ SdrModel& rSdrModel,
+ const svt::EmbeddedObjectRef& rNewObjRef,
+ const OUString& rNewObjName,
+ const tools::Rectangle& rNewRect);
+
+ const svt::EmbeddedObjectRef& getEmbeddedObjectRef() const;
+
+ sal_Int64 GetAspect() const;
+ bool isInplaceActive() const;
+ bool isUiActive() const;
+ void SetAspect( sal_Int64 nAspect );
+
+ // An OLE graphic object can contain a StarView graphic,
+ // which will be displayed if the OLE object is empty.
+ void SetGraphic(const Graphic& rGrf);
+ void ClearGraphic();
+ const Graphic* GetGraphic() const;
+ void GetNewReplacement();
+
+ // The original size of the object (size of the icon for iconified object)
+ // no conversion is done if no target mode is provided
+ Size GetOrigObjSize( MapMode const * pTargetMapMode = nullptr ) const;
+
+ // #i118524# Allow suppress SetVisAreaSize in changing methods when call
+ // comes from OLE client
+ void setSuppressSetVisAreaSize( bool bNew );
+
+ // OLE object has got a separate PersistName member now;
+ // !!! use ::SetPersistName( ... ) only, if you know what you do !!!
+ const OUString& GetPersistName() const;
+ void SetPersistName( const OUString& rPersistName, SvxOle2Shape* pCreator = nullptr );
+
+ // One can add an application name to a SdrOle2Obj, which can be queried for
+ // later on (SD needs this for presentation objects).
+ void SetProgName( const OUString& rName );
+ const OUString& GetProgName() const;
+ bool IsEmpty() const;
+
+ void SetObjRef(const css::uno::Reference < css::embed::XEmbeddedObject >& rNewObjRef);
+ css::uno::Reference < css::embed::XEmbeddedObject > const & GetObjRef() const;
+
+ SVX_DLLPRIVATE css::uno::Reference < css::embed::XEmbeddedObject > const & GetObjRef_NoInit() const;
+
+ void AbandonObject();
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ /** Change the IsClosedObj attribute
+
+ @param bIsClosed
+ Whether the OLE object is closed, i.e. has opaque background
+ */
+ void SetClosedObj( bool bIsClosed );
+
+ // FullDrag support
+ virtual SdrObjectUniquePtr getFullDragClone() const override;
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual SdrOle2Obj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual void NbcMove(const Size& rSize) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+ virtual void SetGeoData(const SdrObjGeoData& rGeo) override;
+
+ static bool CanUnloadRunningObj( const css::uno::Reference< css::embed::XEmbeddedObject >& xObj,
+ sal_Int64 nAspect );
+ static bool Unload( const css::uno::Reference< css::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
+ bool Unload();
+ void Connect(SvxOle2Shape* pCreator = nullptr);
+ void Disconnect();
+ void ObjectLoaded();
+
+ css::uno::Reference< css::frame::XModel > getXModel() const;
+
+ bool IsChart() const;
+ bool IsCalc() const;
+
+ bool UpdateLinkURL_Impl();
+ void BreakFileLink_Impl();
+ void DisconnectFileLink_Impl();
+ void CheckFileLink_Impl();
+
+ // allows to transfer the graphics to the object helper
+ void SetGraphicToObj( const Graphic& aGraphic );
+ void SetGraphicToObj( const css::uno::Reference< css::io::XInputStream >& xGrStream,
+ const OUString& aMediaType );
+
+ css::uno::Reference< css::frame::XModel > GetParentXModel() const;
+ bool CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize );
+ bool AddOwnLightClient();
+
+ // handy to get the empty replacement graphic without accessing all the old stuff
+ static Graphic GetEmptyOLEReplacementGraphic();
+
+ void SetWindow(const css::uno::Reference < css::awt::XWindow >& _xWindow);
+
+ // #i118485# missing converter added
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+};
+
+class SVXCORE_DLLPUBLIC SdrEmbedObjectLink final : public sfx2::SvBaseLink
+{
+ SdrOle2Obj* pObj;
+
+public:
+ explicit SdrEmbedObjectLink(SdrOle2Obj* pObj);
+ virtual ~SdrEmbedObjectLink() override;
+
+ virtual void Closed() override;
+ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const OUString& rMimeType, const css::uno::Any & rValue ) override;
+
+ void Connect() { GetRealObject(); }
+};
+
+class SVXCORE_DLLPUBLIC SdrIFrameLink final : public sfx2::SvBaseLink
+{
+ SdrOle2Obj* m_pObject;
+
+public:
+ explicit SdrIFrameLink(SdrOle2Obj* pObject);
+ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const OUString& rMimeType, const css::uno::Any & rValue ) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx
new file mode 100644
index 000000000..3f521ca7a
--- /dev/null
+++ b/include/svx/svdopage.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdobj.hxx>
+#include <svx/sdrpageuser.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC SdrPageObj final : public SdrObject, public sdr::PageUser
+{
+public:
+ // this method is called from the destructor of the referenced page.
+ // do all necessary action to forget the page. It is not necessary to call
+ // RemovePageUser(), that is done from the destructor.
+ virtual void PageInDestruction(const SdrPage& rPage) override;
+
+private:
+ // To make things more safe, remember the page, not a number
+ SdrPage* mpShownPage;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ // protected destructor
+ virtual ~SdrPageObj() override;
+
+public:
+ SdrPageObj(
+ SdrModel& rSdrModel,
+ SdrPage* pNewPage = nullptr);
+ // Copy constructor
+ SdrPageObj(SdrModel& rSdrModel, SdrPageObj const & rSource);
+ SdrPageObj(
+ SdrModel& rSdrModel,
+ const tools::Rectangle& rRect,
+ SdrPage* pNewPage = nullptr);
+
+ SdrPage* GetReferencedPage() const { return mpShownPage;}
+ void SetReferencedPage(SdrPage* pNewPage);
+
+ // #i96598#
+ virtual void SetBoundRectDirty() override;
+
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrPageObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx
new file mode 100644
index 000000000..dd854468b
--- /dev/null
+++ b/include/svx/svdopath.hxx
@@ -0,0 +1,175 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdotext.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class ImpPathForDragAndCreate;
+
+// Helper class SdrPathObjGeoData
+// used for undo/redo
+
+class SdrPathObjGeoData final : public SdrTextObjGeoData
+{
+public:
+ basegfx::B2DPolyPolygon maPathPolygon;
+ SdrObjKind meKind;
+
+ SdrPathObjGeoData();
+ virtual ~SdrPathObjGeoData() override;
+};
+
+
+class SVXCORE_DLLPUBLIC SdrPathObj final : public SdrTextObj
+{
+private:
+ friend class ImpPathForDragAndCreate;
+
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+ basegfx::B2DPolyPolygon maPathPolygon;
+ SdrObjKind meKind;
+ bool mbHandleScale = false;
+
+ // for isolation of old Drag/Create code
+ std::unique_ptr<ImpPathForDragAndCreate> mpDAC;
+
+ // helper functions for GET, SET, INS etc. PNT
+ void ImpSetClosed(bool bClose);
+ void ImpForceKind();
+ void ImpForceLineAngle();
+ ImpPathForDragAndCreate& impGetDAC() const;
+
+private:
+ // protected destructor - due to final, make private
+ virtual ~SdrPathObj() override;
+
+public:
+ SdrPathObj(
+ SdrModel& rSdrModel,
+ SdrObjKind eNewKind);
+ // Copy constructor
+ SdrPathObj(SdrModel& rSdrModel, SdrPathObj const & rSource);
+ SdrPathObj(
+ SdrModel& rSdrModel,
+ SdrObjKind eNewKind,
+ const basegfx::B2DPolyPolygon& rPathPoly);
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
+ virtual SdrPathObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual void RecalcSnapRect() override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+ virtual void AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const override;
+ virtual const tools::Rectangle& GetLogicRect() const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+ virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ PointerStyle GetCreatePointer() const override;
+
+ // during drag or create, allow accessing the so-far created/modified polyPolygon
+ basegfx::B2DPolyPolygon getObjectPolyPolygon(const SdrDragStat& rDrag) const;
+ basegfx::B2DPolyPolygon getDragPolyPolygon(const SdrDragStat& rDrag) const;
+
+ virtual void NbcMove(const Size& aSize) override;
+ virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override;
+ virtual void NbcRotate(const Point& rRefPnt, Degree100 nAngle, double fSin, double fCos) override;
+ virtual void NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) override;
+ virtual void NbcShear(const Point& rRefPnt, Degree100 nAngle, double fTan, bool bVShear) override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+
+ virtual bool IsPolyObj() const override;
+ virtual sal_uInt32 GetPointCount() const override;
+ virtual Point GetPoint(sal_uInt32 nHdlNum) const override;
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 nHdlNum) override;
+
+ // insert point
+ sal_uInt32 NbcInsPointOld(const Point& rPos, bool bNewObj);
+ sal_uInt32 NbcInsPoint(const Point& rPos, bool bNewObj);
+
+ // rip at given point
+ SdrObject* RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index);
+
+private:
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+public:
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ // Bezier-polygon getter/setter
+ const basegfx::B2DPolyPolygon& GetPathPoly() const { return maPathPolygon; }
+ void SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly);
+ void NbcSetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly);
+
+ // special functions for Bezier-polygon handling
+ bool IsClosed() const { return meKind==SdrObjKind::Polygon || meKind==SdrObjKind::PathPoly || meKind==SdrObjKind::PathFill || meKind==SdrObjKind::FreehandFill || meKind==SdrObjKind::SplineFill; }
+ bool IsLine() const { return meKind==SdrObjKind::PolyLine || meKind==SdrObjKind::PathPolyLine || meKind==SdrObjKind::PathLine || meKind==SdrObjKind::FreehandLine || meKind==SdrObjKind::SplineLine || meKind==SdrObjKind::Line; }
+ bool IsBezier() const { return meKind==SdrObjKind::PathLine || meKind==SdrObjKind::PathFill; }
+ bool IsSpline() const { return meKind==SdrObjKind::SplineLine || meKind==SdrObjKind::SplineFill; }
+
+ // close/open path
+ // if opening, move end point by "nOpenDistance"
+ void ToggleClosed(); // long nOpenDistance);
+
+ // transformation interface for StarOfficeAPI. This implements support for
+ // homogen 3x3 matrices containing the transformation of the SdrObject. At the
+ // moment it contains a shearX, rotation and translation, but for setting all linear
+ // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
+ //
+ // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
+ // with the base geometry and returns TRUE. Otherwise it returns FALSE.
+ virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
+ // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+ // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
+ // to use (0,0) as upper left and will be scaled to the given size in the matrix.
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
+
+ /**
+ * Scaling is ignored from the transform matrix by default, to not break compatibility. One can
+ * opt in to handle scaling if matching ODF behavior is more important.
+ */
+ void SetHandleScale(bool bHandleScale);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx
new file mode 100644
index 000000000..ac7879cb5
--- /dev/null
+++ b/include/svx/svdorect.hxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <optional>
+#include <svx/svdotext.hxx>
+#include <svx/xpoly.hxx>
+#include <svx/svxdllapi.h>
+
+
+// Forward declaration
+namespace sdr::properties {
+ class RectangleProperties;
+}
+
+
+// SdrRectObj
+
+/// Rectangle objects (rectangle, circle, ...)
+class SVXCORE_DLLPUBLIC SdrRectObj : public SdrTextObj
+{
+private:
+ // to allow sdr::properties::RectangleProperties access to SetXPolyDirty()
+ friend class sdr::properties::RectangleProperties;
+ friend class SdrTextObj; // Due to SetXPolyDirty for GrowAdjust
+
+protected:
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+
+ std::optional<XPolygon> mpXPoly;
+
+protected:
+ XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, tools::Long nRad1) const;
+ void SetXPolyDirty();
+
+ /// Subclasses should override RecalcXPoly() by creating an XPolygon
+ /// instance with new and assigning it to mpXPoly.
+ virtual void RecalcXPoly();
+ const XPolygon& GetXPoly() const;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ // protected destructor
+ virtual ~SdrRectObj() override;
+
+public:
+ /**
+ * The corner radius parameter is dropped at some point.
+ * We need to set the corner radius via SfxItems later on, using SetAttributes()
+ *
+ * Constructor of a rectangular drawing object
+ */
+ SdrRectObj(SdrModel& rSdrModel);
+ SdrRectObj(
+ SdrModel& rSdrModel,
+ const tools::Rectangle& rRect);
+
+ // Constructor of a text frame
+ SdrRectObj(
+ SdrModel& rSdrModel,
+ SdrObjKind eNewTextKind);
+ SdrRectObj(
+ SdrModel& rSdrModel,
+ SdrObjKind eNewTextKind,
+ const tools::Rectangle& rRect);
+
+ // Copy constructor
+ SdrRectObj(SdrModel& rSdrModel, SdrRectObj const & rSource);
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual SdrRectObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+ virtual void RecalcSnapRect() override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // Special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+
+ virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
+ virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const override;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
new file mode 100644
index 000000000..a5f60e692
--- /dev/null
+++ b/include/svx/svdotable.hxx
@@ -0,0 +1,294 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/table/XTable.hpp>
+#include <rtl/ref.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svxdllapi.h>
+#include <boost/property_tree/ptree_fwd.hpp>
+
+class SvStream;
+class SfxStyleSheet;
+class SdrUndoAction;
+
+namespace sdr::contact {
+ class ViewContactOfTableObj;
+}
+
+namespace sdr::table {
+
+class TableLayouter;
+struct ImplTableShadowPaintInfo;
+
+#ifndef CellRef
+ class Cell;
+ typedef rtl::Reference< Cell > CellRef;
+#endif
+
+
+/// SdrTableHitKind
+enum class TableHitKind
+{
+ NONE,
+ Cell,
+ CellTextArea,
+ HorizontalBorder,
+ VerticallBorder
+};
+
+
+struct CellPos
+{
+ sal_Int32 mnCol;
+ sal_Int32 mnRow;
+
+ CellPos() : mnCol( 0 ), mnRow( 0 ) {}
+ CellPos( sal_Int32 nCol, sal_Int32 nRow ) { mnCol = nCol; mnRow = nRow; }
+
+ bool operator==( const CellPos& r ) const { return (r.mnCol == mnCol) && (r.mnRow == mnRow); }
+ bool operator!=( const CellPos& r ) const { return (r.mnCol != mnCol) || (r.mnRow != mnRow); }
+};
+
+
+/// TableStyleSettings
+struct TableStyleSettings
+{
+ bool mbUseFirstRow;
+ bool mbUseLastRow;
+ bool mbUseFirstColumn;
+ bool mbUseLastColumn;
+ bool mbUseRowBanding;
+ bool mbUseColumnBanding;
+
+ TableStyleSettings();
+ TableStyleSettings( const TableStyleSettings& rStyle );
+ TableStyleSettings& operator=(const TableStyleSettings& rStyle);
+
+ bool operator==( const TableStyleSettings& r ) const;
+};
+
+/// SdrTableObj
+class SdrTableObjImpl;
+
+class SVXCORE_DLLPUBLIC SdrTableObj final : public ::SdrTextObj
+{
+ friend class Cell;
+ friend class SdrTableObjImpl;
+
+ // protected destructor
+ virtual ~SdrTableObj() override;
+
+public:
+ SdrTableObj(SdrModel& rSdrModel);
+ // Copy constructor
+ SdrTableObj(SdrModel& rSdrModel, SdrTableObj const & rSource);
+ SdrTableObj(
+ SdrModel& rSdrModel,
+ const ::tools::Rectangle& rNewRect,
+ sal_Int32 nColumns,
+ sal_Int32 nRows);
+
+ // helper to limit existing TableModel to a given selection
+ void CropTableModelToSelection(const CellPos& rStart, const CellPos& rEnd);
+
+ // Table stuff
+ void DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColumn, const bool bOptimize, const bool bMinimize );
+ void DistributeRows( sal_Int32 nFirstRow, sal_Int32 nLastRow, const bool bOptimize, const bool bMinimize );
+
+ css::uno::Reference< css::table::XTable > getTable() const;
+
+ bool isValid( const sdr::table::CellPos& rPos ) const;
+ static CellPos getFirstCell();
+ CellPos getLastCell() const;
+ CellPos getLeftCell( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getRightCell( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getUpCell( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getDownCell( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getPreviousCell( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getNextCell( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getPreviousRow( const CellPos& rPos, bool bEdgeTravel ) const;
+ CellPos getNextRow( const CellPos& rPos, bool bEdgeTravel ) const;
+
+ void createCell( sdr::table::CellRef& xCell );
+
+ const sdr::table::TableStyleSettings& getTableStyleSettings() const;
+ void setTableStyleSettings( const sdr::table::TableStyleSettings& rStyle );
+
+ TableHitKind CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY, const sal_uInt16 aTol = 0 ) const;
+
+ void uno_lock();
+ void uno_unlock();
+
+ /** The active table has the focus or is currently edited */
+ const sdr::table::CellRef& getActiveCell() const;
+
+ void setActiveCell( const sdr::table::CellPos& rPos );
+ void getActiveCellPos( sdr::table::CellPos& rPos ) const;
+ sal_Int32 getColumnCount() const;
+ sal_Int32 getRowCount() const;
+
+ bool createTableEdgesJson(boost::property_tree::ptree & rJsonRoot);
+ void changeEdge(bool bHorizontal, int nEdge, sal_Int32 nOffset);
+
+ void getCellBounds( const sdr::table::CellPos& rPos, ::tools::Rectangle& rCellRect );
+
+ const SfxItemSet& GetActiveCellItemSet() const;
+
+ void setTableStyle( const css::uno::Reference< css::container::XIndexAccess >& xAutoFormatStyle );
+ const css::uno::Reference< css::container::XIndexAccess >& getTableStyle() const;
+
+ // Text stuff
+
+ /** Returns the currently active text */
+ virtual SdrText* getActiveText() const override;
+
+ /** Returns the nth available text */
+ virtual SdrText* getText( sal_Int32 nIndex ) const override;
+
+ /** Returns the number of texts available for this object */
+ virtual sal_Int32 getTextCount() const override;
+
+ /** Changes the current active text */
+ virtual void setActiveText( sal_Int32 nIndex ) override;
+
+ /** Returns the index of the text that contains the given point or -1 */
+ virtual sal_Int32 CheckTextHit(const Point& rPnt) const override;
+
+ // #i121917#
+ virtual bool HasText() const override;
+
+ bool IsTextEditActive() const { return mpEditingOutliner != nullptr; }
+ bool IsTextEditActive( const sdr::table::CellPos& rPos );
+
+ /** Returns true only if we are in edit mode and the user actually changed anything */
+ virtual bool IsReallyEdited() const override;
+
+ /** At the same time, we set the text in the outliner (if applicable the EditOutliners')
+ * as well as the PaperSize
+ */
+ void TakeTextRect( const sdr::table::CellPos& rPos, SdrOutliner& rOutliner, ::tools::Rectangle& rTextRect, bool bNoEditText, ::tools::Rectangle* pAnchorRect ) const;
+ virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override;
+ void TakeTextAnchorRect(const sdr::table::CellPos& rPos, ::tools::Rectangle& rAnchorRect ) const;
+ virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const override;
+
+ virtual bool IsAutoGrowHeight() const override;
+ virtual bool IsAutoGrowWidth() const override;
+
+ virtual bool IsFontwork() const override;
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual void SetChanged() override;
+
+ virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const override;
+ virtual bool AdjustTextFrameWidthAndHeight() override;
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+ virtual SdrTableObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+ virtual void RecalcSnapRect() override;
+ virtual const tools::Rectangle& GetSnapRect() const override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+
+ virtual const tools::Rectangle& GetLogicRect() const override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+ virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // Special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+
+ virtual bool BegTextEdit(SdrOutliner& rOutl) override;
+ virtual void EndTextEdit(SdrOutliner& rOutl) override;
+ virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override;
+ void TakeTextEditArea(const sdr::table::CellPos& rPos, Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
+ virtual EEAnchorMode GetOutlinerViewAnchorMode() const override;
+
+ virtual void NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject) override;
+
+ virtual OutlinerParaObject* GetOutlinerParaObject() const override;
+
+ virtual void NbcReformatText() override;
+
+ virtual bool IsVerticalWriting() const override;
+ virtual void SetVerticalWriting(bool bVertical) override;
+
+ css::text::WritingMode GetWritingMode() const;
+
+ /// Add an undo action that should be on the undo stack after ending text edit.
+ void AddUndo(SdrUndoAction* pUndo);
+
+ /// Next time layouting would be done, skip it (to layout at the end of multiple actions).
+ void SetSkipChangeLayout(bool bSkipChangeLayout);
+
+ /** Tries to get table height if rows with sizes less then the minimum size were expanded
+
+ (i.e. Table height layouted without fitting to an area)
+ Helper for OOXML import
+ */
+ sal_Int32 getHeightWithoutFitting();
+
+ virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus ) override;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+
+ const TableLayouter& getTableLayouter() const;
+
+private:
+ void init( sal_Int32 nColumns, sal_Int32 nRows );
+
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ SdrOutliner* GetCellTextEditOutliner( const sdr::table::Cell& rCell ) const;
+
+ tools::Rectangle maLogicRect;
+ rtl::Reference<SdrTableObjImpl> mpImpl;
+};
+
+/** Hack for clipboard with calc and writer, export and import table content as rtf table */
+SVX_DLLPUBLIC void ExportAsRTF( SvStream& rStrm, SdrTableObj& rObj );
+SVX_DLLPUBLIC void ImportAsRTF( SvStream& rStrm, SdrTableObj& rObj );
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
new file mode 100644
index 000000000..03c828db7
--- /dev/null
+++ b/include/svx/svdotext.hxx
@@ -0,0 +1,633 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/itextprovider.hxx>
+#include <svx/svdoattr.hxx>
+#include <svx/sdtaitm.hxx>
+#include <svx/sdtakitm.hxx>
+#include <svx/sdtaditm.hxx>
+#include <svx/svdtrans.hxx>
+#include <tools/datetime.hxx>
+#include <svl/style.hxx>
+#include <svx/svdtext.hxx>
+#include <svx/svxdllapi.h>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
+#include <memory>
+#include <vector>
+
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+
+// forward declarations
+
+class OutlinerParaObject;
+class OverflowingText;
+class SdrOutliner;
+class SdrPathObj;
+class SdrTextObj;
+class SdrTextObjTest;
+class SvxFieldItem;
+class ImpSdrObjTextLink;
+class EditStatus;
+class TextChain;
+class TextChainFlow;
+
+enum class EEAnchorMode;
+enum class EETextFormat;
+
+namespace sdr::properties {
+ class TextProperties;
+}
+
+namespace drawinglayer::primitive2d {
+ class SdrContourTextPrimitive2D;
+ class SdrPathTextPrimitive2D;
+ class SdrBlockTextPrimitive2D;
+ class SdrAutoFitTextPrimitive2D;
+ class SdrStretchTextPrimitive2D;
+ class SdrChainedTextPrimitive2D;
+}
+
+namespace drawinglayer::animation {
+ class AnimationEntryList;
+}
+
+namespace drawinglayer::geometry {
+ class ViewInformation2D;
+}
+
+namespace sdr::table {
+ class Cell;
+ class SdrTableRtfExporter;
+ class SdrTableRTFParser;
+}
+
+
+// Defines
+constexpr const sal_uInt16 SDRUSERDATA_OBJTEXTLINK = 1;
+
+
+// helper class SdrTextObjGeoData
+class SdrTextObjGeoData : public SdrObjGeoData
+{
+public:
+ tools::Rectangle maRect;
+ GeoStat maGeo;
+};
+
+
+// helper class ImpSdrObjTextLinkUserData
+class ImpSdrObjTextLinkUserData final : public SdrObjUserData
+{
+ friend class SdrTextObj;
+ friend class ImpSdrObjTextLink;
+
+ OUString maFileName; // name of the referenced document
+ OUString maFilterName; // a filter, if need be
+ DateTime maFileDate0; // avoiding unnecessary reload
+ tools::SvRef<ImpSdrObjTextLink> mpLink;
+ rtl_TextEncoding meCharSet;
+
+public:
+ ImpSdrObjTextLinkUserData();
+ virtual ~ImpSdrObjTextLinkUserData() override;
+
+ virtual std::unique_ptr<SdrObjUserData> Clone(SdrObject* pObj1) const override;
+};
+
+namespace sdr::properties
+{
+ class CustomShapeProperties;
+ class CellProperties;
+}
+
+// SdrTextObj
+
+typedef std::unique_ptr<SdrPathObj, SdrObjectFreeOp> SdrPathObjUniquePtr;
+
+class SVXCORE_DLLPUBLIC SdrTextObj : public SdrAttrObj, public svx::ITextProvider
+{
+private:
+ // Cell needs access to ImpGetDrawOutliner();
+ friend class sdr::table::Cell;
+ friend class sdr::table::SdrTableRtfExporter;
+ friend class sdr::table::SdrTableRTFParser;
+ friend class TextChain;
+ friend class TextChainFlow;
+ friend class EditingTextChainFlow;
+
+ // CustomShapeproperties need to access the "bTextFrame" member:
+ friend class sdr::properties::CustomShapeProperties;
+
+protected:
+ virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+private:
+ // This method is only allowed for sdr::properties::TextProperties
+ SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
+ {
+ return mpEditingOutliner;
+ }
+
+ // to allow sdr::properties::TextProperties access to SetPortionInfoChecked()
+ // and GetTextEditOutliner()
+ friend class sdr::properties::TextProperties;
+ friend class sdr::properties::CellProperties;
+
+ friend class ImpSdrObjTextLink;
+ friend class ImpSdrObjTextLinkUserData;
+ friend class SdrPowerPointImport; // for PowerPointImport
+ friend class SdrExchangeView; // for ImpGetDrawOutliner
+ friend class SdrView; // for ImpGetDrawOutliner
+ friend class SdrObjEditView; // for TextEdit
+ friend class SdrMeasureObj; // for ImpGetDrawOutliner
+ friend class SvxMSDffManager; // for ImpGetDrawOutliner
+ friend class SdrObjCustomShape; // for ImpGetDrawOutliner
+ friend class SdrText; // for ImpGetDrawOutliner
+
+protected:
+ // The "aRect" is also the rect of RectObj and CircObj.
+ // When bTextFrame=sal_True the text will be formatted into this rect
+ // When bTextFrame=sal_False the text will be centered around its middle
+ tools::Rectangle maRect;
+
+ // The GeoStat contains the rotation and shear angles
+ GeoStat maGeo;
+
+ // this is the active text
+ std::unique_ptr<SdrText> mpText;
+
+ // This contains the dimensions of the text
+ Size maTextSize;
+
+ // an Outliner*, so that
+ // 1. the TextObj won't be edited simultaneously by multiple views, and
+ // 2. when streaming while editing Flush() can be done
+ SdrOutliner* mpEditingOutliner;
+
+ // Possible values for eTextKind are:
+ // SdrObjKind::Text regular text frame
+ // SdrObjKind::TitleText TitleText for presentations
+ // SdrObjKind::OutlineText OutlineText for presentations
+ // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
+ // we're dealing with a labeled graphical object
+ SdrObjKind meTextKind;
+
+ // For text editing in SW Header/Footer it is necessary to be
+ // able to set an offset for the text edit to allow text editing at the
+ // position of the virtual object. This offset is used when setting up
+ // and maintaining the OutlinerView.
+ Point maTextEditOffset;
+
+ virtual SdrObjectUniquePtr getFullDragClone() const override;
+
+
+public:
+ const Point& GetTextEditOffset() const { return maTextEditOffset; }
+ void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
+
+protected:
+ bool mbIsUnchainableClone = false;
+
+ // the successor in a chain
+ SdrTextObj* mpNextInChain = nullptr;
+ SdrTextObj* mpPrevInChain = nullptr;
+
+ // For labeled graphical objects bTextFrame is FALSE. The block of text
+ // will then be centered horizontally and vertically on aRect.
+ // For bTextFalse=sal_True the text will be formatted into aRect.
+ // The actual text frame is realized by an SdrRectObj with
+ // bTextFrame=sal_True.
+ bool mbTextFrame : 1;
+ bool mbNoShear : 1; // disable shearing (->graphic+Ole+TextFrame)
+ bool mbTextSizeDirty : 1;
+
+ bool mbInEditMode : 1; // Is this text object in edit mode?
+
+ // For objects with free size (flow text). The flag is set by the
+ // application on create. If the object width is later resized,
+ // AutoGrowWidth will be disabled (set to sal_False). This flag will
+ // then also be set to sal_False, so that the object behaves like a
+ // normal text object.
+ // Width resize can result from:
+ // - Interactive Resize in single or multiple selections
+ // - position/size dialog
+ bool mbDisableAutoWidthOnDragging : 1;
+
+ // Flag for allowing text animation. Default is sal_true.
+ bool mbTextAnimationAllowed : 1;
+
+ // flag for preventing recursive onEditOutlinerStatusEvent calls
+ bool mbInDownScale : 1;
+
+ SdrOutliner& ImpGetDrawOutliner() const;
+
+private:
+ // #101029#: Extracted from ImpGetDrawOutliner()
+ SVX_DLLPRIVATE void ImpInitDrawOutliner( SdrOutliner& rOutl ) const;
+ // #101029#: Extracted from Paint()
+ SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint( bool bContourFrame,
+ SdrOutliner& rOutliner,
+ tools::Rectangle& rTextRect,
+ tools::Rectangle& rAnchorRect,
+ tools::Rectangle& rPaintRect,
+ Fraction& aFitXCorrection ) const;
+ void ImpAutoFitText( SdrOutliner& rOutliner ) const;
+ void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ) const;
+ SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
+ SVX_DLLPRIVATE void ImpRegisterLink();
+ SVX_DLLPRIVATE void ImpDeregisterLink();
+ SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const;
+
+ /** Appends the style family to a provided style name */
+ static void AppendFamilyToStyleName(OUString& styleName, SfxStyleFamily family);
+
+ /** Reads the style family from a style name to which the family has been appended. */
+ static SfxStyleFamily ReadFamilyFromStyleName(const OUString& styleName);
+
+protected:
+ bool ImpCanConvTextToCurve() const;
+ SdrPathObjUniquePtr ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const;
+ SdrObjectUniquePtr ImpConvertAddText(SdrObjectUniquePtr pObj, bool bBezier) const;
+ void ImpSetTextStyleSheetListeners();
+ static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection);
+ static void ImpJustifyRect(tools::Rectangle& rRect);
+ void ImpCheckShear();
+ tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
+ void ImpSetTextEditParams() const;
+ void SetTextSizeDirty() { mbTextSizeDirty = true; }
+
+ // rAnchorRect is InOut-Parameter!
+ void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+ void NbcSetEckenradius(tools::Long nRad);
+
+ // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
+ // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
+ // and object sizes
+ virtual void AdaptTextMinSize();
+
+ // constructors for labeled graphical objects
+ SdrTextObj(SdrModel& rSdrModel);
+ SdrTextObj(
+ SdrModel& rSdrModel,
+ const tools::Rectangle& rNewRect);
+
+ // constructors for text frames
+ SdrTextObj(
+ SdrModel& rSdrModel,
+ SdrObjKind eNewTextKind);
+ SdrTextObj(
+ SdrModel& rSdrModel,
+ SdrObjKind eNewTextKind,
+ const tools::Rectangle& rNewRect);
+
+ // copy constructor
+ SdrTextObj(SdrModel& rSdrModel, SdrTextObj const & rSource);
+
+ // protected destructor
+ virtual ~SdrTextObj() override;
+
+public:
+
+ bool IsInEditMode() const { return mbInEditMode; }
+
+ // Currently ASCII and RTF are supported and the differentiation is done
+ // internally.
+ // rFilterName has no meaning and must be empty
+ // Normally the application only has to call SetTextLink() - the
+ // remainder is automatic (SfxLinkManager).
+ // The LoadText() method can also be used to load a file into a text
+ // object (without linking.)
+ // TextLinks can't be edited (if needed later could be ReadOnly).
+ // Setting attributes can only be done on the text frame.
+ void SetTextLink(const OUString& rFileName, const OUString& rFilterName);
+ void ReleaseTextLink();
+ bool IsLinkedText() const { return m_pPlusData != nullptr && GetLinkUserData() != nullptr; }
+ bool ReloadLinkedText(bool bForceLoad);
+ bool LoadText(const OUString& rFileName, rtl_TextEncoding eCharSet);
+
+ virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const;
+ virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true);
+ virtual bool AdjustTextFrameWidthAndHeight();
+ bool IsTextFrame() const { return mbTextFrame; }
+ bool IsOutlText() const { return mbTextFrame && (meTextKind==SdrObjKind::OutlineText || meTextKind==SdrObjKind::TitleText); }
+ /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
+ bool IsAutoFit() const;
+ /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
+ bool IsFitToSize() const;
+
+ // Chaining
+ SdrTextObj *GetNextLinkInChain() const;
+ void SetNextLinkInChain(SdrTextObj *);
+ SdrTextObj *GetPrevLinkInChain() const;
+ bool IsChainable() const;
+ bool GetPreventChainable() const;
+ TextChain *GetTextChain() const;
+
+ SdrObjKind GetTextKind() const { return meTextKind; }
+
+ // #i121917#
+ virtual bool HasText() const override;
+
+ bool IsTextEditActive() const { return mpEditingOutliner != nullptr; }
+
+ /** returns the currently active text. */
+ virtual SdrText* getActiveText() const;
+
+ /** returns the nth available text. */
+ virtual SdrText* getText( sal_Int32 nIndex ) const override;
+
+ /** returns the number of texts available for this object. */
+ virtual sal_Int32 getTextCount() const override;
+
+ /** returns true only if we are in edit mode and the user actually changed anything */
+ virtual bool IsReallyEdited() const;
+
+ /** changes the current active text */
+ virtual void setActiveText( sal_Int32 nIndex );
+
+ /** returns the index of the text that contains the given point or -1 */
+ virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
+
+ void SetDisableAutoWidthOnDragging(bool bOn) { mbDisableAutoWidthOnDragging=bOn; }
+ void NbcSetText(const OUString& rStr);
+ void SetText(const OUString& rStr);
+ void NbcSetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
+ void SetText(SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat);
+
+ // FitToSize and Fontwork are not taken into account in GetTextSize()!
+ virtual const Size& GetTextSize() const;
+ void FitFrameToTextSize();
+ sal_uInt16 GetFontScaleY() const;
+
+ // Simultaneously sets the text into the Outliner (possibly
+ // the one of the EditOutliner) and sets the PaperSize.
+ virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText,
+ tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const;
+ // Takes writing direction into account when adjusting the rectangle
+ void AdjustRectToTextDistance(tools::Rectangle& rAnchorRect) const;
+ virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const;
+ const GeoStat& GetGeoStat() const { return maGeo; }
+
+ // get corner radius
+ tools::Long GetEckenradius() const;
+ virtual bool IsAutoGrowHeight() const;
+ tools::Long GetMinTextFrameHeight() const;
+ tools::Long GetMaxTextFrameHeight() const;
+ virtual bool IsAutoGrowWidth() const;
+ tools::Long GetMinTextFrameWidth() const;
+ tools::Long GetMaxTextFrameWidth() const;
+
+ css::drawing::TextFitToSizeType GetFitToSize() const;
+ const tools::Rectangle &GetGeoRect() const;
+
+ // check if it's a TextFontwork
+ virtual bool IsFontwork() const;
+
+ // should the Fontwork contour be hidden?
+ bool IsHideContour() const;
+
+ // text flow within contour
+ bool IsContourTextFrame() const;
+
+ SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const;
+ SdrTextHorzAdjust GetTextHorizontalAdjust() const;
+
+ SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet& rSet) const;
+ SdrTextVertAdjust GetTextVerticalAdjust() const;
+
+ /** Left inner spacing to borders */
+ tools::Long GetTextLeftDistance() const;
+ /** Right inner spacing to borders */
+ tools::Long GetTextRightDistance() const;
+ /** Top inner spacing to borders */
+ tools::Long GetTextUpperDistance() const;
+ /** Bottom inner spacing to borders */
+ tools::Long GetTextLowerDistance() const;
+ SdrTextAniKind GetTextAniKind() const;
+ SdrTextAniDirection GetTextAniDirection() const;
+
+ bool HasTextColumnsNumber() const;
+ sal_Int16 GetTextColumnsNumber() const;
+ void SetTextColumnsNumber(sal_Int16 nColumns);
+ bool HasTextColumnsSpacing() const;
+ sal_Int32 GetTextColumnsSpacing() const;
+ void SetTextColumnsSpacing(sal_Int32 nSpacing);
+
+ // react on model/page change
+ virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+
+ // needed to determine text anchor area
+ virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const;
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+ virtual SdrTextObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual basegfx::B2DPolyPolygon TakeContour() const override;
+ virtual void RecalcSnapRect() override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+ virtual const tools::Rectangle& GetLogicRect() const override;
+ virtual Degree100 GetRotateAngle() const override;
+ virtual Degree100 GetShearAngle(bool bVertical = false) const override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+ virtual PointerStyle GetCreatePointer() const override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+
+ virtual bool HasTextEdit() const override;
+ // returns true if TextEditMode started
+ virtual bool BegTextEdit(SdrOutliner& rOutl);
+ virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const;
+ virtual void EndTextEdit(SdrOutliner& rOutl);
+ virtual EEAnchorMode GetOutlinerViewAnchorMode() const;
+
+ virtual void NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject) override;
+ void NbcSetOutlinerParaObjectForText( std::optional<OutlinerParaObject> pTextObject, SdrText* pText );
+ virtual OutlinerParaObject* GetOutlinerParaObject() const override;
+ bool CanCreateEditOutlinerParaObject() const;
+ std::optional<OutlinerParaObject> CreateEditOutlinerParaObject() const;
+
+ virtual void NbcReformatText() override;
+
+ virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
+ bool bEdit, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, OUString& rRet) const;
+
+ virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
+
+ void SetTextEditOutliner(SdrOutliner* pOutl) { mpEditingOutliner = pOutl; }
+
+ /** Setup given Outliner equivalently to SdrTextObj::Paint()
+
+ To setup an arbitrary Outliner in the same way as the draw
+ outliner on SdrTextObj::Paint(). Among others, the paper size,
+ control word and character stretching are initialized, such
+ that the formatting should match the screen representation.
+ The textual content of the outliner is not touched, i.e. no
+ Init() or Clear() is called on the Outliner.
+
+ @param rOutl
+ The Outliner to setup.
+
+ @param rPaintRect
+ The region to paint the outliner content into. This is useful
+ to e.g. determine the top, left position of text in shapes.
+ */
+ void SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
+
+ /** Update given Outliner equivalently to SdrTextObj::Paint()
+
+ Same functionality as in SetupOutlinerFormatting(), except
+ that the outliner content is not cleared.
+
+ @param rOutl
+ The Outliner to update.
+
+ @param rPaintRect
+ The region to paint the outliner content into. This is useful
+ to e.g. determine the top, left position of text in shapes.
+ */
+ void UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const;
+ void ForceOutlinerParaObject();
+ virtual bool IsVerticalWriting() const;
+ virtual void SetVerticalWriting(bool bVertical);
+ bool IsTopToBottom() const;
+
+ /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */
+ virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus );
+
+ /** called from the SdrObjEditView during text edit when a chain of boxes is to be updated */
+ void onChainingEvent();
+
+
+ // transformation interface for StarOfficeAPI. This implements support for
+ // homogen 3x3 matrices containing the transformation of the SdrObject. At the
+ // moment it contains a shearX, rotation and translation, but for setting all linear
+ // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
+
+
+ // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
+ // with the base geometry and returns TRUE. Otherwise it returns FALSE.
+ virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
+
+ // sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+ // If it's an SdrPathObj it will use the provided geometry information. The Polygon has
+ // to use (0,0) as upper left and will be scaled to the given size in the matrix.
+ virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon) override;
+
+ // #103836# iterates over the paragraphs of a given SdrObject and removes all
+ // hard set character attributes with the which ids contained in the
+ // given vector
+ void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds );
+
+ // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a
+ // painting rectangle. Rotation is taken from the object.
+ GDIMetaFile* GetTextScrollMetaFileAndRectangle(tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle);
+
+ // Access to TextAnimationAllowed flag
+ void SetTextAnimationAllowed(bool bNew);
+
+ // #i8824#
+ // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
+ // ItemChange(), PostItemChange() and ItemSetChanged() calls.
+ void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
+ double GetCameraZRotation() const;
+
+public:
+
+ // text primitive decomposition helpers
+ void impDecomposeContourTextPrimitive(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
+ const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
+ void impDecomposePathTextPrimitive(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
+ const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
+ void impDecomposeBlockTextPrimitive(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
+ const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
+ void impDecomposeAutoFitTextPrimitive(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
+ const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
+ void impDecomposeStretchTextPrimitive(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
+ const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
+ void impDecomposeChainedTextPrimitive(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& rSdrChainedTextPrimitive,
+ const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
+ void impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutliner) const;
+
+ // timing generators
+ void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
+ void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const;
+
+ // Direct decomposer for text visualization when you already have a prepared
+ // Outliner containing all the needed information
+ static void impDecomposeBlockTextPrimitiveDirect(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget,
+ SdrOutliner& rOutliner,
+ const basegfx::B2DHomMatrix& rNewTransformA,
+ const basegfx::B2DHomMatrix& rNewTransformB,
+ const basegfx::B2DRange& rClipRange);
+
+ /** returns false if the given pointer is NULL
+ or if the given SdrOutliner contains no text.
+ Also checks for one empty paragraph.
+ */
+ static bool HasTextImpl( SdrOutliner const * pOutliner );
+
+ friend class ::SdrTextObjTest;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx
new file mode 100644
index 000000000..2c81f47a1
--- /dev/null
+++ b/include/svx/svdouno.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <svx/svxdllapi.h>
+#include <svx/svdorect.hxx>
+#include <memory>
+
+
+// Forward declaration
+class SdrView;
+class SdrPageWindow;
+class SdrControlEventListenerImpl;
+
+namespace sdr::contact {
+ class ViewContactOfUnoControl;
+}
+
+
+// SdrUnoObj
+struct SdrUnoObjDataHolder;
+class SVXCORE_DLLPUBLIC SdrUnoObj : public SdrRectObj
+{
+ friend class SdrPageView;
+ friend class SdrControlEventListenerImpl;
+
+ std::unique_ptr<SdrUnoObjDataHolder> m_pImpl;
+
+ OUString aUnoControlModelTypeName;
+ OUString aUnoControlTypeName;
+
+protected:
+ css::uno::Reference< css::awt::XControlModel > xUnoControlModel; // Can also be set from outside
+
+private:
+ SVX_DLLPRIVATE void CreateUnoControlModel(const OUString& rModelName);
+ SVX_DLLPRIVATE void CreateUnoControlModel(const OUString& rModelName,
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rxSFac );
+
+protected:
+ // protected destructor
+ virtual ~SdrUnoObj() override;
+
+public:
+ explicit SdrUnoObj(
+ SdrModel& rSdrModel,
+ const OUString& rModelName);
+ // Copy constructor
+ SdrUnoObj(SdrModel& rSdrModel, SdrUnoObj const & rSource);
+ SdrUnoObj(
+ SdrModel& rSdrModel,
+ const OUString& rModelName,
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rxSFac);
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+
+ virtual SdrUnoObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
+ virtual void NbcSetLayer(SdrLayerID nLayer) override;
+
+ // SpecialDrag support
+ virtual bool hasSpecialDrag() const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ virtual void SetContextWritingMode( const sal_Int16 _nContextWritingMode ) override;
+
+ const css::uno::Reference< css::awt::XControlModel >& GetUnoControlModel() const {return xUnoControlModel;}
+ css::uno::Reference< css::awt::XControl > GetUnoControl(const SdrView& _rView, const OutputDevice& _rOut) const;
+
+ /** Retrieves a temporary XControl instance for a given output device
+
+ The method GetUnoControl, used to retrieve the XControl whose parent is a given device, only works
+ if the SdrUnoObj has already been painted at least once onto this device. However, there are valid
+ scenarios where you need certain information on how a control is painted onto a window, without
+ actually painting it. For example, you might be interested in the DeviceInfo of a UNO control.
+
+ For those cases, you can contain an XControl which behaves as the control which *would* be used to
+ paint onto a window.
+
+ @param _rWindow
+ the window for which should act as parent for the temporary control
+ @param _inout_ControlContainer
+ the control container belonging to the window, necessary as context
+ for the newly created control. A control container is usually created by calling
+ VCLUnoHelper::CreateControlContainer.
+ If _inout_ControlContainer is <NULL/>, it will be created internally, and passed to the caller.
+ In this case, the caller also takes ownership of the control container, and is responsible for
+ disposing it when not needed anymore.
+ @return
+ The requested control. This control is temporary only, and the caller is responsible for it.
+ In particular, the caller is required to dispose it when it's not needed anymore.
+
+ */
+ css::uno::Reference< css::awt::XControl >
+ GetTemporaryControlForWindow(
+ const vcl::Window& _rWindow,
+ css::uno::Reference< css::awt::XControlContainer >& _inout_ControlContainer
+ ) const;
+
+ const OUString& GetUnoControlTypeName() const { return aUnoControlTypeName; }
+ const OUString& getUnoControlModelTypeName() const { return aUnoControlModelTypeName; }
+
+ virtual void SetUnoControlModel( const css::uno::Reference< css::awt::XControlModel >& xModel );
+
+protected:
+ // SdrObject overridables
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+private:
+ /** Retrieves the typed ViewContact for the object
+ @param _out_rpContact
+ Upon successful return, ->_out_rpContact contains the ViewContact.
+ @return
+ <TRUE/> if and only if the contact was successfully retrieved. In this case,
+ ->_out_rpContact contains a pointer to this contact.
+ A failure to retrieve the contact object fires an assertion in non-product builds.
+ */
+ SVX_DLLPRIVATE bool impl_getViewContact( sdr::contact::ViewContactOfUnoControl*& _out_rpContact ) const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
new file mode 100644
index 000000000..f706d85bd
--- /dev/null
+++ b/include/svx/svdoutl.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <editeng/outliner.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/weakbase.h>
+
+class SdrTextObj;
+class SdrPage;
+
+class SVXCORE_DLLPUBLIC SdrOutliner : public Outliner
+{
+ tools::WeakReference<SdrTextObj> mxWeakTextObj;
+ const SdrPage* mpVisualizedPage;
+
+public:
+ SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode );
+ virtual ~SdrOutliner() override ;
+
+ void SetTextObj( const SdrTextObj* pObj );
+ void SetTextObjNoInit( const SdrTextObj* pObj );
+ const SdrTextObj* GetTextObj() const;
+
+ void setVisualizedPage(const SdrPage* pPage) { if(pPage != mpVisualizedPage) mpVisualizedPage = pPage; }
+ const SdrPage* getVisualizedPage() const { return mpVisualizedPage; }
+
+ virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor) override;
+
+ bool hasEditViewCallbacks() const;
+};
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
new file mode 100644
index 000000000..1114d858a
--- /dev/null
+++ b/include/svx/svdovirt.hxx
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdobj.hxx>
+#include <svx/svxdllapi.h>
+
+/**
+ * FIXME: The virtual object is not yet fully implemented and tested.
+ * At the moment we only use it in a derived class in Writer.
+ */
+class SVXCORE_DLLPUBLIC SdrVirtObj : public SdrObject
+{
+ SdrVirtObj(const SdrVirtObj&) = delete;
+
+public:
+ virtual sdr::properties::BaseProperties& GetProperties() const override;
+
+protected:
+ virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
+
+ SdrObject& rRefObj; // Referenced drawing object
+ tools::Rectangle aSnapRect;
+
+protected:
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
+ virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
+ virtual void RestoreGeoData(const SdrObjGeoData& rGeo) override;
+
+ // protected destructor
+ virtual ~SdrVirtObj() override;
+
+public:
+ SdrVirtObj(SdrModel& rSdrModel, SdrObject& rNewObj);
+ // Copy constructor
+ SdrVirtObj(SdrModel& rSdrModel, SdrVirtObj const& rSource);
+
+ SdrObject& ReferencedObj();
+ const SdrObject& GetReferencedObj() const;
+ virtual void NbcSetAnchorPos(const Point& rAnchorPos) override;
+
+ virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
+ virtual SdrInventor GetObjInventor() const override;
+ virtual SdrObjKind GetObjIdentifier() const override;
+ virtual SdrObjList* GetSubList() const override;
+ virtual void SetName(const OUString& rStr, const bool bSetChanged = true) override;
+ virtual const OUString& GetName() const override;
+ virtual void SetTitle(const OUString& rStr) override;
+ virtual OUString GetTitle() const override;
+ virtual void SetDescription(const OUString& rStr) override;
+ virtual OUString GetDescription() const override;
+
+ virtual const tools::Rectangle& GetCurrentBoundRect() const override;
+ virtual const tools::Rectangle& GetLastBoundRect() const override;
+ virtual void RecalcBoundRect() override;
+ virtual SdrVirtObj* CloneSdrObject(SdrModel& rTargetModel) const override;
+
+ virtual OUString TakeObjNameSingul() const override;
+ virtual OUString TakeObjNamePlural() const override;
+
+ // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
+ virtual bool HasLimitedRotation() const override;
+
+ virtual basegfx::B2DPolyPolygon TakeXorPoly() const override;
+ virtual sal_uInt32 GetHdlCount() const override;
+ virtual void AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const override;
+ virtual void AddToHdlList(SdrHdlList& rHdlList) const override;
+
+ // special drag methods
+ virtual bool hasSpecialDrag() const override;
+ virtual bool beginSpecialDrag(SdrDragStat& rDrag) const override;
+ virtual bool applySpecialDrag(SdrDragStat& rDrag) override;
+ virtual OUString getSpecialDragComment(const SdrDragStat& rDrag) const override;
+ virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const override;
+
+ // FullDrag support
+ virtual bool supportsFullDrag() const override;
+ virtual SdrObjectUniquePtr getFullDragClone() const override;
+
+ virtual bool BegCreate(SdrDragStat& rStat) override;
+ virtual bool MovCreate(SdrDragStat& rStat) override;
+ virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
+ virtual bool BckCreate(SdrDragStat& rStat) override;
+ virtual void BrkCreate(SdrDragStat& rStat) override;
+ virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const override;
+
+ virtual void NbcMove(const Size& rSiz) override;
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact,
+ const Fraction& yFact) override;
+ virtual void NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+
+ virtual void Move(const Size& rSiz) override;
+ virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact,
+ bool bUnsetRelative = true) override;
+ virtual void Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs) override;
+ virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
+ virtual void Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) override;
+
+ virtual void RecalcSnapRect() override;
+ virtual const tools::Rectangle& GetSnapRect() const override;
+ virtual void SetSnapRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+
+ virtual const tools::Rectangle& GetLogicRect() const override;
+ virtual void SetLogicRect(const tools::Rectangle& rRect) override;
+ virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+
+ virtual Degree100 GetRotateAngle() const override;
+ virtual Degree100 GetShearAngle(bool bVertical = false) const override;
+
+ virtual sal_uInt32 GetSnapPointCount() const override;
+ virtual Point GetSnapPoint(sal_uInt32 i) const override;
+
+ virtual bool IsPolyObj() const override;
+ virtual sal_uInt32 GetPointCount() const override;
+ virtual Point GetPoint(sal_uInt32 i) const override;
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
+
+ virtual std::unique_ptr<SdrObjGeoData> GetGeoData() const override;
+ virtual void SetGeoData(const SdrObjGeoData& rGeo) override;
+
+ virtual void NbcReformatText() override;
+
+ virtual bool HasMacro() const override;
+ virtual SdrObject* CheckMacroHit(const SdrObjMacroHitRec& rRec) const override;
+ virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec& rRec) const override;
+ virtual void PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect,
+ const SdrObjMacroHitRec& rRec) const override;
+ virtual bool DoMacro(const SdrObjMacroHitRec& rRec) override;
+
+ // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0)
+ virtual Point GetOffset() const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
new file mode 100644
index 000000000..2ba7017a0
--- /dev/null
+++ b/include/svx/svdpage.hxx
@@ -0,0 +1,545 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <cppuhelper/weak.hxx>
+#include <svl/stylesheetuser.hxx>
+#include <vcl/prntypes.hxx>
+#include <svl/itemset.hxx>
+#include <svx/sdrpageuser.hxx>
+#include <svx/sdr/contact/viewobjectcontactredirector.hxx>
+#include <svx/sdrmasterpagedescriptor.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <svx/svdobj.hxx>
+#include <svx/ColorSets.hxx>
+#include <memory>
+#include <optional>
+#include <vector>
+#include <deque>
+
+
+// predefines
+namespace reportdesign { class OSection; }
+namespace sdr::contact { class ViewContact; }
+class SdrPage;
+class SdrModel;
+class SfxItemPool;
+class SdrPageView;
+class SdrLayerAdmin;
+class SdrLayerIDSet;
+class Color;
+class SfxStyleSheet;
+class SvxUnoDrawPagesAccess;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// SdrObjList
+// E3dObjList
+// SdrPage -> see continuation there
+
+// class SdrObjList
+class SVXCORE_DLLPUBLIC SdrObjList
+{
+friend class SdrObjListIter;
+friend class SdrEditView;
+
+private:
+ SdrObjList(const SdrObjList& rSrcList) = delete;
+ SdrObjList &operator=(const SdrObjList& rSrcList) = delete;
+
+protected:
+ void RecalcRects();
+
+private:
+ /// simple ActionChildInserted forwarder to have it on a central place
+ static void impChildInserted(SdrObject const & rChild);
+
+ // tdf#116879 Clear SdrObjList, no Undo done. Used from destructor, but also
+ // from other places. When used from destructor, suppress broadcasts
+ // to not get callbacks to evtl. derived objects already in destruction
+ // (e.g. SdrPage)
+ void impClearSdrObjList(bool bBroadcast);
+
+protected:
+ // protected constructor to make clear that this class should only
+ // be used as base for derivations, not naked. See getSdrModelFromSdrObjList
+ // which is pure virtual to force this, too
+ SdrObjList();
+ virtual ~SdrObjList();
+
+public:
+ // SdrModel/SdrPage access on SdrObjList level
+ virtual SdrPage* getSdrPageFromSdrObjList() const;
+ virtual SdrObject* getSdrObjectFromSdrObjList() const;
+
+ void CopyObjects(const SdrObjList& rSrcList);
+
+ // tdf#116879 clean up everything (without Undo), plus broadcasting
+ // changes. Split to this call and a private one (impClearSdrObjList)
+ // that allows cleanup without broadcasting in the destructor
+ void ClearSdrObjList();
+
+ /// recalculate order numbers / ZIndex
+ void RecalcObjOrdNums();
+ bool IsObjOrdNumsDirty() const { return mbObjOrdNumsDirty; }
+ virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE);
+ virtual void InsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE);
+ void sort( std::vector<sal_Int32>& sortOrder );
+
+ void InsertObjectThenMakeNameUnique(SdrObject* pObj);
+ void InsertObjectThenMakeNameUnique(SdrObject* pObj, std::unordered_set<rtl::OUString>& rNameSet, size_t nPos=SAL_MAX_SIZE);
+
+ /// remove from list without delete
+ virtual SdrObject* NbcRemoveObject(size_t nObjNum);
+ virtual SdrObject* RemoveObject(size_t nObjNum);
+
+ /// Replace existing object by different one.
+ /// Same as Remove(old)+Insert(new) but faster because the order numbers
+ /// do not have to be set dirty.
+ virtual SdrObject* ReplaceObject(SdrObject* pNewObj, size_t nObjNum);
+
+ /// Modify ZOrder of an SdrObject
+ virtual SdrObject* SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
+
+ /// Modify ZOrder of an SdrObject, object must already be in the list
+ void SetExistingObjectOrdNum(SdrObject* pExistingObj, size_t nNewObjNum);
+
+ void SetSdrObjListRectsDirty();
+
+ const tools::Rectangle& GetAllObjSnapRect() const;
+ const tools::Rectangle& GetAllObjBoundRect() const;
+
+ /// reformat all text objects, e.g. when changing printer
+ void NbcReformatAllTextObjects();
+ void ReformatAllTextObjects();
+
+ /** #103122# reformats all edge objects that are connected to other objects */
+ void ReformatAllEdgeObjects();
+
+ /// convert attributes of the style to hard formatting
+ void BurnInStyleSheetAttributes();
+
+ size_t GetObjCount() const;
+ SdrObject* GetObj(size_t nNum) const;
+
+ /// linked page or linked group object
+ virtual bool IsReadOnly() const;
+
+ /** Makes the object list flat, i.e. the object list content are
+ then tree leaves
+
+ This method travels recursively over all group objects in this
+ list, extracts the content, inserts it flat to the list and
+ removes the group object afterwards.
+ */
+ void FlattenGroups();
+
+ /** Ungroup the object at the given index
+
+ This method ungroups the content of the group object at the
+ given index, i.e. the content is put flat into the object list
+ (if the object at the given index is no group, this method is
+ a no-op). If the group itself contains group objects, the
+ operation is performed recursively, such that the content of
+ the given object contains no groups afterwards.
+ */
+ void UnGroupObj( size_t nObjNum );
+
+ /** Return whether there is an explicit, user defined, object navigation
+ order. When there is one this method returns <TRUE/> and the
+ GetObjectForNavigationPosition() and
+ SdrObject::GetNavigationPosition() methods will return values
+ different from those returned by SdrObject::GetOrdNum() and
+ GetObj().
+ */
+ bool HasObjectNavigationOrder() const;
+
+ /** Set the navigation position of the given object to the specified
+ value. Note that this changes the navigation position for all
+ objects on or following the old or new position.
+ */
+ void SetObjectNavigationPosition (
+ SdrObject& rObject,
+ const sal_uInt32 nNewNavigationPosition);
+
+ /** Return the object for the given navigation position. When there is
+ a user defined navigation order, i.e. mxNavigationOrder is not NULL,
+ then that is used to look up the object. Otherwise the z-order is
+ used by looking up the object in maList.
+ @param nNavigationPosition
+ Valid values include 0 and are smaller than the number of
+ objects as returned by GetObjCount().
+ @return
+ The returned pointer is NULL for invalid positions.
+ */
+ SdrObject* GetObjectForNavigationPosition (const sal_uInt32 nNavigationPosition) const;
+
+ /** Restore the navigation order to that defined by the z-order.
+ */
+ void ClearObjectNavigationOrder();
+
+ /** Set the navigation position of all SdrObjects to their position in
+ the mxNavigationOrder list. This method returns immediately when no
+ update is necessary.
+ @return
+ This method returns <TRUE/> when the navigation positions stored
+ in SdrObjects are up to date.
+ It returns <FALSE/> when the navigation positions are not valid,
+ for example because no explicit navigation order has been
+ defined, i.e. HasObjectNavigationOrder() would return <FALSE/>.
+ */
+ bool RecalcNavigationPositions();
+
+ /** Set the navigation order to the one defined by the given list of
+ XShape objects.
+ @param rxOrder
+ When this is an empty reference then the navigation order is
+ reset to the z-order. The preferred way to do this, however, is
+ to call ClearObjectNavigationOrder().
+ Otherwise this list is expected to contain all the shapes in the
+ called SdrObjList.
+ */
+ void SetNavigationOrder (const css::uno::Reference<
+ css::container::XIndexAccess>& rxOrder);
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+private:
+ tools::Rectangle maSdrObjListOutRect;
+ tools::Rectangle maSdrObjListSnapRect;
+ std::deque<SdrObject*> maList;
+ /// This list, if it exists, defines the navigation order. If it does
+ /// not exist then maList defines the navigation order.
+ std::optional<std::vector<tools::WeakReference<SdrObject>>> mxNavigationOrder;
+ bool mbObjOrdNumsDirty;
+ bool mbRectsDirty;
+ /// This flag is <TRUE/> when the mpNavigation list has been changed but
+ /// the indices of the referenced SdrObjects still have their old values.
+ bool mbIsNavigationOrderDirty;
+
+ /** Insert an SdrObject into maList. Do not modify the maList member
+ directly.
+ @param rObject
+ The object to insert into the object list.
+ @param nInsertPosition
+ The given object is inserted before the object at this
+ position. Valid values include 0 (the object is inserted at the
+ head of the list) and the number of objects in the list as
+ returned by GetObjCount() (the object is inserted at the end of
+ the list.)
+ */
+ void InsertObjectIntoContainer (
+ SdrObject& rObject,
+ const sal_uInt32 nInsertPosition);
+
+ /** Replace an object in the object list.
+ @param rObject
+ The new object that replaces the one in the list at the
+ specified position.
+ @param nObjectPosition
+ The object at this position in the object list is replaced by
+ the given object. Valid values include 0 and are smaller than
+ the number of objects in the list.
+ */
+ void ReplaceObjectInContainer (
+ SdrObject& rObject,
+ const sal_uInt32 nObjectPosition);
+
+ /** Remove an object from the object list.
+ The object list has to contain at least one element.
+ @param nObjectPosition
+ The object at this position is removed from the object list.
+ Valid values include 0 and are smaller than the number of
+ objects in the list.
+ */
+ void RemoveObjectFromContainer (
+ const sal_uInt32 nObjectPosition);
+};
+
+// Used for all methods which return a page number
+#define SDRPAGE_NOTFOUND 0xFFFF
+
+/// for the snap-to-grid in Writer
+class SdrPageGridFrame
+{
+ tools::Rectangle aPaper;
+ tools::Rectangle aUserArea;
+public:
+ SdrPageGridFrame(const tools::Rectangle& rPaper, const tools::Rectangle& rUser): aPaper(rPaper), aUserArea(rUser) {}
+ const tools::Rectangle& GetPaperRect() const { return aPaper; }
+ const tools::Rectangle& GetUserArea() const { return aUserArea; }
+};
+
+class SVXCORE_DLLPUBLIC SdrPageGridFrameList final
+{
+ std::vector<SdrPageGridFrame*> aList;
+
+ SdrPageGridFrameList(const SdrPageGridFrameList& rSrcList) = delete;
+ void operator=(const SdrPageGridFrameList& rSrcList) = delete;
+ SdrPageGridFrame* GetObject(sal_uInt16 i) const { return aList[i]; }
+
+public:
+ SdrPageGridFrameList() {}
+ ~SdrPageGridFrameList() { Clear(); }
+ void Clear();
+ sal_uInt16 GetCount() const { return sal_uInt16(aList.size()); }
+ void Insert(const SdrPageGridFrame& rGF) { aList.push_back(new SdrPageGridFrame(rGF)); }
+ SdrPageGridFrame& operator[](sal_uInt16 nPos) { return *GetObject(nPos); }
+ const SdrPageGridFrame& operator[](sal_uInt16 nPos) const { return *GetObject(nPos); }
+};
+
+// class SdrPageProperties
+class SVXCORE_DLLPUBLIC SdrPageProperties final : public SfxListener, public svl::StyleSheetUser
+{
+private:
+ // data
+ SdrPage* mpSdrPage;
+ SfxStyleSheet* mpStyleSheet;
+ std::unique_ptr<svx::Theme> mpTheme;
+ SfxItemSet maProperties;
+
+ // internal helpers
+ void ImpRemoveStyleSheet();
+ void ImpAddStyleSheet(SfxStyleSheet& rNewStyleSheet);
+
+ SdrPageProperties& operator=(const SdrPageProperties& rCandidate) = delete;
+
+public:
+ // construct/destruct
+ SdrPageProperties(SdrPage& rSdrPage);
+ virtual ~SdrPageProperties() override;
+
+ // Notify(...) from baseclass SfxListener
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+
+ virtual bool isUsedByModel() const override;
+
+ // data read/write
+ const SfxItemSet& GetItemSet() const { return maProperties;}
+ void PutItemSet(const SfxItemSet& rSet);
+ void PutItem(const SfxPoolItem& rItem);
+ void ClearItem(const sal_uInt16 nWhich = 0);
+
+ // StyleSheet access
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet);
+ SfxStyleSheet* GetStyleSheet() const { return mpStyleSheet;}
+
+ void SetTheme(std::unique_ptr<svx::Theme> pTheme);
+ svx::Theme* GetTheme();
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
+};
+
+
+/**
+ A SdrPage contains exactly one SdrObjList and a description of the physical
+ page dimensions (size / margins). The latter is required to "catch" objects
+ during drag-and-drop.
+ The SdrPage allows (via SdrObjList) inserting and removing SdrObjects,
+ as well as moving them into the foreground or background.
+ Also it's possible to request and directly set the order number (ZOrder)
+ of SdrObjects.
+*/
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// SdrPage
+// DlgEdPage
+// FmFormPage
+// ScDrawPage
+// SdPage
+// SwDPage
+// OReportPage
+
+class SVXCORE_DLLPUBLIC SdrPage : public SdrObjList, public cppu::OWeakObject
+{
+ // #i9076#
+ friend class SdrModel;
+ friend class SvxUnoDrawPagesAccess;
+
+ // this class uses its own UNO wrapper
+ // and thus has to set mxUnoPage (it also relies on mxUnoPage not being WeakRef)
+ friend class reportdesign::OSection;
+
+ SdrPage& operator=(const SdrPage&) = delete;
+ SdrPage(const SdrPage&) = delete;
+
+ // start PageUser section
+private:
+ // #111111# PageUser section
+ sdr::PageUserVector maPageUsers;
+
+ std::unique_ptr<sdr::contact::ViewContact> mpViewContact;
+
+public:
+ void AddPageUser(sdr::PageUser& rNewUser);
+ void RemovePageUser(sdr::PageUser& rOldUser);
+
+ // SdrModel access on SdrPage level
+ SdrModel& getSdrModelFromSdrPage() const { return mrSdrModelFromSdrPage; }
+
+protected:
+ std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact();
+public:
+ const sdr::contact::ViewContact& GetViewContact() const;
+ sdr::contact::ViewContact& GetViewContact();
+
+ // #110094# DrawContact support: Methods for handling Page changes
+ void ActionChanged();
+
+private:
+ // the SdrModel this page was created with, unchanged during SdrPage lifetime
+ SdrModel& mrSdrModelFromSdrPage;
+
+private:
+ tools::Long mnWidth; // page size
+ tools::Long mnHeight; // page size
+ sal_Int32 mnBorderLeft; // left page margin
+ sal_Int32 mnBorderUpper; // top page margin
+ sal_Int32 mnBorderRight; // right page margin
+ sal_Int32 mnBorderLower; // bottom page margin
+ bool mbBackgroundFullSize = false; ///< Background object to represent the whole page.
+
+ std::unique_ptr<SdrLayerAdmin> mpLayerAdmin;
+ std::unique_ptr<SdrPageProperties> mpSdrPageProperties;
+ css::uno::Reference< css::uno::XInterface > mxUnoPage;
+
+public:
+ SdrPageProperties& getSdrPageProperties();
+ const SdrPageProperties& getSdrPageProperties() const;
+ const SdrPageProperties* getCorrectSdrPageProperties() const;
+
+protected:
+ // new MasterPageDescriptorVector
+ std::unique_ptr<sdr::MasterPageDescriptor> mpMasterPageDescriptor;
+
+ sal_uInt16 nPageNum;
+
+ bool mbMaster : 1; // flag if this is a MasterPage
+ bool mbInserted : 1;
+ bool mbObjectsNotPersistent : 1;
+
+ // #i93597#
+ bool mbPageBorderOnlyLeftRight : 1;
+
+ void SetUnoPage(css::uno::Reference<css::drawing::XDrawPage> const&);
+ virtual css::uno::Reference< css::uno::XInterface > createUnoPage();
+
+ // Copying of pages is split into two parts: construction and copying of page objects,
+ // because the copying might need access to fully initialized page. CloneSdrPage() is responsible
+ // to call lateInit() after copy-construction of a new object. Any initialization in derived
+ // classes that needs access to the page objects must be deferred to lateInit. And it must
+ // call lateInit() of its parent class.
+ void lateInit(const SdrPage& rSrcPage);
+
+public:
+ explicit SdrPage(SdrModel& rModel, bool bMasterPage=false);
+ virtual ~SdrPage() override;
+
+ virtual rtl::Reference<SdrPage> CloneSdrPage(SdrModel& rTargetModel) const;
+ bool IsMasterPage() const { return mbMaster; }
+ void SetInserted(bool bNew = true);
+ bool IsInserted() const { return mbInserted; }
+ void SetChanged();
+
+ // derived from SdrObjList, returns this
+ virtual SdrPage* getSdrPageFromSdrObjList() const override;
+
+ // #i68775# React on PageNum changes (from Model in most cases)
+ void SetPageNum(sal_uInt16 nNew);
+ sal_uInt16 GetPageNum() const;
+
+ // #i93597# Allow page border definition to not be the full rectangle but to
+ // use only the left and right vertical edges (reportdesigner)
+ void setPageBorderOnlyLeftRight(bool bNew) { mbPageBorderOnlyLeftRight = bNew; }
+ bool getPageBorderOnlyLeftRight() const { return mbPageBorderOnlyLeftRight; }
+
+ virtual void SetSize(const Size& aSiz);
+ Size GetSize() const;
+ virtual void SetOrientation(Orientation eOri);
+ virtual Orientation GetOrientation() const;
+ tools::Long GetWidth() const;
+ tools::Long GetHeight() const;
+ virtual void SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr);
+ virtual void SetLeftBorder(sal_Int32 nBorder);
+ virtual void SetUpperBorder(sal_Int32 nBorder);
+ virtual void SetRightBorder(sal_Int32 nBorder);
+ virtual void SetLowerBorder(sal_Int32 nBorder);
+ sal_Int32 GetLeftBorder() const;
+ sal_Int32 GetUpperBorder() const;
+ sal_Int32 GetRightBorder() const;
+ sal_Int32 GetLowerBorder() const;
+ void SetBackgroundFullSize(bool bIn);
+ bool IsBackgroundFullSize() const;
+
+ // New MasterPage interface
+ bool TRG_HasMasterPage() const { return (nullptr != mpMasterPageDescriptor); }
+ void TRG_SetMasterPage(SdrPage& rNew);
+ void TRG_ClearMasterPage();
+ SdrPage& TRG_GetMasterPage() const;
+ const SdrLayerIDSet& TRG_GetMasterPageVisibleLayers() const;
+ void TRG_SetMasterPageVisibleLayers(const SdrLayerIDSet& rNew);
+ sdr::contact::ViewContact& TRG_GetMasterPageDescriptorViewContact() const;
+
+ void MakePageObjectsNamesUnique();
+
+protected:
+ void TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage);
+public:
+
+ /// changing the layers does not set the modified-flag!
+ const SdrLayerAdmin& GetLayerAdmin() const;
+ SdrLayerAdmin& GetLayerAdmin();
+
+ virtual OUString GetLayoutName() const;
+
+ /// for snap-to-grid in Writer, also for AlignObjects if 1 object is marked
+ /// if pRect != null, then the pages that are intersected by this Rect,
+ /// otherwise the visible pages
+ virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, const tools::Rectangle* pRect) const;
+
+ css::uno::Reference< css::uno::XInterface > const & getUnoPage();
+
+ virtual SfxStyleSheet* GetTextStyleSheetForObject( SdrObject* pObj ) const;
+
+ /** *deprecated* returns an averaged background color of this page */
+ // #i75566# GetBackgroundColor -> GetPageBackgroundColor
+ Color GetPageBackgroundColor() const;
+
+ /** *deprecated* returns an averaged background color of this page */
+ // #i75566# GetBackgroundColor -> GetPageBackgroundColor and bScreenDisplay hint value
+ Color GetPageBackgroundColor( SdrPageView const * pView, bool bScreenDisplay = true) const;
+
+ /** this method returns true if the object from the ViewObjectContact should
+ be visible on this page while rendering.
+ bEdit selects if visibility test is for an editing view or a final render,
+ like printing.
+ */
+ virtual bool checkVisibility(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo,
+ bool bEdit );
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
new file mode 100644
index 000000000..2f77dfa66
--- /dev/null
+++ b/include/svx/svdpagv.hxx
@@ -0,0 +1,254 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <rtl/ustring.hxx>
+#include <tools/color.hxx>
+#include <svx/svdhlpln.hxx>
+#include <svx/svdsob.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svxdllapi.h>
+
+#include <memory>
+#include <vector>
+#include <basegfx/range/b2irectangle.hxx>
+
+
+namespace vcl { class Region; }
+class SdrObjList;
+class SdrObject;
+class SdrPage;
+class SdrUnoObj;
+class SdrPaintWindow;
+class SdrView;
+class SdrPageObj;
+class SdrPageView;
+
+namespace sdr::contact
+{
+ class ViewObjectContactRedirector;
+ class DisplayInfo;
+ class ViewObjectContactRedirector;
+}
+
+// typedefs for a list of SdrPageWindow
+class SdrPageWindow;
+
+class SVXCORE_DLLPUBLIC SdrPageView
+{
+private:
+ SdrView& mrView;
+ SdrPage* mpPage;
+ Point aPgOrg; // The Page's point of origin
+
+ tools::Rectangle aMarkBound;
+ tools::Rectangle aMarkSnap;
+ bool mbHasMarked;
+ bool mbVisible;
+
+ SdrLayerIDSet aLayerVisi; // Set of visible Layers
+ SdrLayerIDSet aLayerLock; // Set of non-editable Layers
+ SdrLayerIDSet aLayerPrn; // Set of printable Layers
+
+ SdrObjList* pCurrentList; // Current List, usually the Page
+ SdrObject* pCurrentGroup; // Current Group; nullptr means none
+
+ SdrHelpLineList aHelpLines; // Helper lines and points
+
+ // #103911# Use one reserved slot (bReserveBool2) for the document color
+ Color maDocumentColor;
+
+ // #103834# Use one reserved slot (bReserveBool1) for the background color
+ Color maBackgroundColor;
+
+ std::vector< std::unique_ptr<SdrPageWindow> > maPageWindows;
+
+ // #i72752# member to remember with which SdrPageWindow the BeginDrawLayer
+ // was done
+ SdrPageWindow* mpPreparedPageWindow;
+
+public:
+ sal_uInt32 PageWindowCount() const { return maPageWindows.size(); }
+ SdrPageWindow* FindPageWindow( const SdrPaintWindow& rPaintWindow ) const;
+ SdrPageWindow* FindPageWindow( const OutputDevice& rOutDev ) const;
+ SdrPageWindow* GetPageWindow(sal_uInt32 nIndex) const;
+
+ /**
+ * Finds the page window whose PaintWindow belongs to the given output device
+ * In opposite to FindPageWindow, this method also cares possibly patched PaintWindow instances.
+ * That is, a SdrPageWindow might have an original, and a patched SdrPaintWindow instance - if
+ * this is the case, then the original SdrPaintWindow is examined before the patched one.
+ */
+ const SdrPageWindow* FindPatchedPageWindow( const OutputDevice& rOutDev ) const;
+
+private:
+ void ImpInvalidateHelpLineArea(sal_uInt16 nNum) const;
+
+ void SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa);
+ bool IsLayer(const OUString& rName, const SdrLayerIDSet& rBS) const;
+
+ /// Let's see if the current Group (pCurrentGroup) is still inserted
+ void CheckCurrentGroup();
+
+ void AdjHdl();
+
+public:
+ SdrPageView(SdrPage* pPage1, SdrView& rNewView);
+ ~SdrPageView();
+
+ SdrPageView& operator=( SdrPageView const & ) = delete; // MSVC2017 workaround
+ SdrPageView( SdrPageView const & ) = delete; // MSVC2017 workaround
+
+
+ /// Is called by PaintView, when modal changes have finished
+ void ModelHasChanged();
+
+ void Show();
+ void Hide();
+
+ void AddPaintWindowToPageView(SdrPaintWindow& rPaintWindow);
+ void RemovePaintWindowFromPageView(SdrPaintWindow& rPaintWindow);
+
+ SdrView& GetView() { return mrView; }
+ const SdrView& GetView() const { return mrView; }
+
+ /**
+ * Looks up the control container belonging to given output device
+ * @return
+ * If the given output device belongs to one of the SdrPageViewWinRecs associated with this
+ * SdrPageView instance, the XControlContainer for this output device is returned, <NULL/>
+ * otherwise.
+ */
+ css::uno::Reference< css::awt::XControlContainer >
+ GetControlContainer( const OutputDevice& _rDevice ) const;
+
+ /// Sets all elements in the view which support a design and an alive mode into the given mode
+ void SetDesignMode( bool _bDesignMode ) const;
+
+ bool IsVisible() const { return mbVisible; }
+
+ /// Invalidates the Page's whole area
+ void InvalidateAllWin();
+
+ /// PrePaint call forwarded from app windows
+ void PrePaint();
+
+ /// @param rReg refers to the OutDev and not to the Page
+ void CompleteRedraw( SdrPaintWindow& rPaintWindow, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector );
+
+ /// Write access to mpPreparedPageWindow
+ void setPreparedPageWindow(SdrPageWindow* pKnownTarget);
+
+ void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr,
+ const tools::Rectangle& rRect = tools::Rectangle(),
+ basegfx::B2IRectangle const* pPageFrame = nullptr);
+ void DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor = COL_BLACK );
+
+ tools::Rectangle GetPageRect() const;
+ SdrPage* GetPage() const { return mpPage; }
+
+ /// Return current List
+ SdrObjList* GetObjList() const { return pCurrentList; }
+
+ /// Return current Group
+ SdrObject* GetCurrentGroup() const { return pCurrentGroup; }
+
+ /// Set current Group and List
+ void SetCurrentGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList);
+
+ bool HasMarkedObjPageView() const { return mbHasMarked; }
+ void SetHasMarkedObj(bool bOn) { mbHasMarked = bOn; }
+
+ const tools::Rectangle& MarkBound() const { return aMarkBound; }
+ const tools::Rectangle& MarkSnap() const { return aMarkSnap; }
+ tools::Rectangle& MarkBound() { return aMarkBound; }
+ tools::Rectangle& MarkSnap() { return aMarkSnap; }
+
+ void SetLayerVisible(const OUString& rName, bool bShow) {
+ SetLayer(rName, aLayerVisi, bShow);
+ if(!bShow) AdjHdl();
+ InvalidateAllWin();
+ }
+ bool IsLayerVisible(const OUString& rName) const { return IsLayer(rName, aLayerVisi); }
+
+ void SetLayerLocked(const OUString& rName, bool bLock) { SetLayer(rName, aLayerLock, bLock); if(bLock) AdjHdl(); }
+ bool IsLayerLocked(const OUString& rName) const { return IsLayer(rName,aLayerLock); }
+
+ void SetLayerPrintable(const OUString& rName, bool bPrn) { SetLayer(rName, aLayerPrn, bPrn); }
+ bool IsLayerPrintable(const OUString& rName) const { return IsLayer(rName, aLayerPrn); }
+
+ /// PV represents a RefPage or a SubList of a RefObj, or the Model is ReadOnly
+ bool IsReadOnly() const;
+
+ /// The Origin always refers to the upper left corner of the Page
+ const Point& GetPageOrigin() const { return aPgOrg; }
+ void SetPageOrigin(const Point& rOrg);
+
+ void LogicToPagePos(Point& rPnt) const { rPnt-=aPgOrg; }
+ void LogicToPagePos(tools::Rectangle& rRect) const { rRect.Move(-aPgOrg.X(),-aPgOrg.Y()); }
+ void PagePosToLogic(Point& rPnt) const { rPnt+=aPgOrg; }
+
+ void SetVisibleLayers(const SdrLayerIDSet& rSet) { aLayerVisi=rSet; }
+ const SdrLayerIDSet& GetVisibleLayers() const { return aLayerVisi; }
+ void SetPrintableLayers(const SdrLayerIDSet& rSet) { aLayerPrn=rSet; }
+ const SdrLayerIDSet& GetPrintableLayers() const { return aLayerPrn; }
+ void SetLockedLayers(const SdrLayerIDSet& rSet) { aLayerLock=rSet; }
+ const SdrLayerIDSet& GetLockedLayers() const { return aLayerLock; }
+
+ const SdrHelpLineList& GetHelpLines() const { return aHelpLines; }
+ void SetHelpLines(const SdrHelpLineList& rHLL);
+ //void SetHelpLinePos(sal_uInt16 nNum, const Point& rNewPos);
+ void SetHelpLine(sal_uInt16 nNum, const SdrHelpLine& rNewHelpLine);
+ void DeleteHelpLine(sal_uInt16 nNum);
+ void InsertHelpLine(const SdrHelpLine& rHL);
+
+ /// At least one member must be visible for the Group object and
+ /// it must not be locked
+ /// @returns
+ /// true, if the object's layer is visible and not locked
+ bool IsObjMarkable(SdrObject const * pObj) const;
+
+ /// Entering (editing) an object group
+ /// After that, we have direct access to all member objects of the group.
+ /// All other objects are not editable in the meantime (until the next
+ /// LeaveGroup())
+ bool EnterGroup(SdrObject* pObj);
+
+ /// Leave an object group we entered previously
+ void LeaveOneGroup();
+
+ /// Leave all object groups we entered previously
+ void LeaveAllGroup();
+
+ /// Determine, how deep we descended (0 = Root(Page))
+ sal_uInt16 GetEnteredLevel() const;
+
+ // #103834# Set background color for svx at SdrPageViews
+ void SetApplicationBackgroundColor(Color aBackgroundColor);
+
+ const Color& GetApplicationBackgroundColor() const { return maBackgroundColor;}
+
+ // #103911# Set/Get document color for svx at SdrPageViews
+ void SetApplicationDocumentColor(Color aDocumentColor);
+ const Color& GetApplicationDocumentColor() const { return maDocumentColor;}
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
new file mode 100644
index 000000000..557846fe0
--- /dev/null
+++ b/include/svx/svdpntv.hxx
@@ -0,0 +1,504 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svl/SfxBroadcaster.hxx>
+#include <svl/lstner.hxx>
+#include <svl/undo.hxx>
+#include <svx/svddrag.hxx>
+#include <svx/svdlayer.hxx>
+#include <svtools/colorcfg.hxx>
+#include <svl/itemset.hxx>
+#include <svx/svxdllapi.h>
+#include <unotools/options.hxx>
+#include <vcl/event.hxx>
+#include <vcl/idle.hxx>
+#include <vcl/timer.hxx>
+#include <memory>
+
+
+// Pre defines
+class SdrPageWindow;
+
+namespace com::sun::star::awt {
+ class XControlContainer;
+}
+namespace sdr::overlay { class OverlayManager; }
+
+class SdrPage;
+class SdrView;
+class SfxItemSet;
+class SfxStyleSheet;
+class SdrOle2Obj;
+class SdrModel;
+class SdrObject;
+enum class GraphicManagerDrawFlags;
+
+namespace sdr::contact {
+ class ViewObjectContactRedirector;
+}
+
+// Defines for AnimationMode
+enum class SdrAnimationMode
+{
+ Animate,
+ Disable
+};
+
+class SdrPaintView;
+namespace sdr::contact { class ViewObjectContactRedirector; }
+
+namespace vcl {
+ class Window;
+}
+
+
+class SvxViewChangedHint final : public SfxHint
+{
+public:
+ explicit SvxViewChangedHint();
+};
+
+class SdrPaintWindow;
+
+/**
+ * Helper to convert any GDIMetaFile to a good quality BitmapEx,
+ * using default parameters and graphic::XPrimitive2DRenderer
+ */
+BitmapEx convertMetafileToBitmapEx(
+ const GDIMetaFile& rMtf,
+ const basegfx::B2DRange& rTargetRange,
+ const sal_uInt32 nMaximumQuadraticPixels);
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// SdrPaintView
+// SdrSnapView
+// SdrMarkView
+// SdrEditView
+// SdrPolyEditView
+// SdrGlueEditView
+// SdrObjEditView
+// SdrExchangeView
+// SdrDragView
+// SdrCreateView
+// SdrView
+// DlgEdView
+// GraphCtrlView
+// E3dView
+// DrawViewWrapper
+// FmFormView
+// ScDrawView
+// sd::View (may have more?)
+// sd::DrawView
+// SwDrawView
+// OSectionView
+
+class SVXCORE_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, public SfxBroadcaster, public ::utl::ConfigurationListener
+{
+private:
+ friend class SdrPageView;
+ friend class SdrGrafObj;
+
+ // the SdrModel this view was created with, unchanged during lifetime
+ SdrModel& mrSdrModelFromSdrView;
+
+ std::unique_ptr<SdrPageView> mpPageView;
+protected:
+ SdrModel* mpModel;
+ VclPtr<OutputDevice> mpActualOutDev; // Only for comparison
+ VclPtr<OutputDevice> mpDragWin;
+ SfxStyleSheet* mpDefaultStyleSheet;
+
+ OUString maActualLayer; // Current drawing layer
+ OUString maMeasureLayer; // Current layer for measurements
+
+// Container aPagV; // List of SdrPageViews
+
+ // All windows this view is displayed on
+ std::vector< std::unique_ptr<SdrPaintWindow> > maPaintWindows;
+
+ Size maGridBig; // FIXME: We need to get rid of this eventually
+ Size maGridFin; // FIXME: We need to get rid of this eventually
+ SdrDragStat maDragStat;
+ tools::Rectangle maMaxWorkArea;
+ SfxItemSet maDefaultAttr;
+ Idle maComeBackIdle;
+
+ SdrAnimationMode meAnimationMode;
+
+ sal_uInt16 mnHitTolPix;
+ sal_uInt16 mnMinMovPix;
+ sal_uInt16 mnHitTolLog;
+ sal_uInt16 mnMinMovLog;
+
+ bool mbPageVisible : 1;
+ bool mbPageShadowVisible : 1;
+ bool mbPageBorderVisible : 1;
+ bool mbBordVisible : 1;
+ bool mbGridVisible : 1;
+ bool mbGridFront : 1;
+ bool mbHlplVisible : 1;
+ bool mbHlplFront : 1;
+ bool mbGlueVisible : 1; // Persistent; show gluepoints
+ bool mbGlueVisible2 : 1; // Also show gluepoints for GluePointEdit
+ bool mbGlueVisible3 : 1; // Also show gluepoints for EdgeTool
+ bool mbGlueVisible4 : 1; // Show gluepoints, if one edge is selected
+ bool mbSomeObjChgdFlag : 1;
+ bool mbSwapAsynchron : 1;
+ bool mbPrintPreview : 1;
+
+ // These bools manage, the status that is displayed
+ //
+ bool mbAnimationPause : 1;
+
+ // Flag which decides if buffered output for this view is allowed. When
+ // set, PreRendering for PageView rendering will be used. Default is sal_False
+ bool mbBufferedOutputAllowed : 1;
+
+ // Flag which decides if buffered overlay for this view is allowed. When
+ // set, the output will be buffered in an overlay vdev. When not, overlay is
+ // directly painted to OutDev. Default is sal_False.
+ bool mbBufferedOverlayAllowed : 1;
+
+ // Allow page painting at all?
+ bool mbPagePaintingAllowed : 1;
+
+ // Is this a preview renderer?
+ bool mbPreviewRenderer : 1;
+
+ // Flags for calc and sw for suppressing OLE, CHART or DRAW objects
+ bool mbHideOle : 1;
+ bool mbHideChart : 1;
+ bool mbHideDraw : 1; // hide draw objects other than form controls
+ bool mbHideFormControl : 1; // hide form controls only
+
+public:
+ // Interface for PagePaintingAllowed flag
+ bool IsBufferedOutputAllowed() const;
+ void SetBufferedOutputAllowed(bool bNew);
+
+ // Interface for BufferedOverlayAllowed flag
+ bool IsBufferedOverlayAllowed() const;
+ void SetBufferedOverlayAllowed(bool bNew);
+
+ // Allow page painting at all?
+ bool IsPagePaintingAllowed() const { return mbPagePaintingAllowed;}
+ void SetPagePaintingAllowed(bool bNew);
+
+ virtual rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const;
+
+protected:
+ svtools::ColorConfig maColorConfig;
+ Color maGridColor;
+
+ // Interface to SdrPaintWindow
+ void DeletePaintWindow(const SdrPaintWindow& rOld);
+ void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
+ static void InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager);
+
+public:
+ sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
+ SdrPaintWindow* FindPaintWindow(const OutputDevice& rOut) const;
+ SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const;
+ // Replacement for GetWin(0), may return 0L (!)
+ OutputDevice* GetFirstOutputDevice() const;
+
+private:
+ DECL_DLLPRIVATE_LINK(ImpComeBackHdl, Timer*, void);
+
+protected:
+ sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const;
+ sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const;
+
+ // If one does not want to wait for the IdleState of the system (cheated as const)
+ void FlushComeBackTimer() const;
+ void TheresNewMapMode();
+ void ImpSetGlueVisible2(bool bOn) { if (mbGlueVisible2!=bOn) { mbGlueVisible2=bOn; if (!mbGlueVisible && !mbGlueVisible3 && !mbGlueVisible4) GlueInvalidate(); } }
+ void ImpSetGlueVisible3(bool bOn) { if (mbGlueVisible3!=bOn) { mbGlueVisible3=bOn; if (!mbGlueVisible && !mbGlueVisible2 && !mbGlueVisible4) GlueInvalidate(); } }
+ void ImpSetGlueVisible4(bool bOn) { if (mbGlueVisible4!=bOn) { mbGlueVisible4=bOn; if (!mbGlueVisible && !mbGlueVisible2 && !mbGlueVisible3) GlueInvalidate(); } }
+
+public:
+ bool ImpIsGlueVisible() const { return mbGlueVisible || mbGlueVisible2 || mbGlueVisible3 || mbGlueVisible4; }
+
+protected:
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+ void GlueInvalidate() const;
+
+ // ModelHasChanged is called, as soon as the system is idle again after many SdrHintKind::ObjectChange.
+ //
+ // Any sub-class override this method, MUST call the base class' ModelHasChanged() method
+ virtual void ModelHasChanged();
+
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ // A SdrView always needs a SdrModel for lifetime (Pool, ...)
+ SdrPaintView(SdrModel& rSdrModel, OutputDevice* pOut);
+ virtual ~SdrPaintView() override;
+
+public:
+ // SdrModel access on SdrView level
+ SdrModel& getSdrModelFromSdrView() const { return mrSdrModelFromSdrView; }
+
+ virtual void ClearPageView();
+ SdrModel* GetModel() const { return mpModel; }
+
+ virtual bool IsAction() const;
+ virtual void MovAction(const Point& rPnt);
+ virtual void EndAction();
+ virtual void BckAction();
+ virtual void BrkAction(); // Cancel all Actions (e.g. cancel dragging)
+ virtual void TakeActionRect(tools::Rectangle& rRect) const;
+
+ // Info about TextEdit. Default is sal_False.
+ virtual bool IsTextEdit() const;
+
+ // Must be called for every Window change as well as MapMode (Scaling) change:
+ // If the SdrView is shown in multiple windows at the same time (e.g.
+ // using the split pane), so that I can convert my pixel values to logical
+ // values.
+ void SetActualWin(const OutputDevice* pWin);
+ void SetMinMoveDistancePixel(sal_uInt16 nVal) { mnMinMovPix=nVal; TheresNewMapMode(); }
+ void SetHitTolerancePixel(sal_uInt16 nVal) { mnHitTolPix=nVal; TheresNewMapMode(); }
+ sal_uInt16 GetHitTolerancePixel() const { return mnHitTolPix; }
+
+ // Data read access on logic HitTolerance and MinMoveTolerance
+ sal_uInt16 getHitTolLog() const { return mnHitTolLog; }
+
+ // Using the DragState we can tell e.g. which distance was
+ // already dragged
+ const SdrDragStat& GetDragStat() const { return maDragStat; }
+
+ // Registering/de-registering a PageView at a View
+ //
+ // The same Page cannot be registered multiple times.
+ //
+ // Methods ending in PgNum expect being passed a Page number.
+ // Methods ending in PvNum, instead, expect the number of the
+ // PageView at the SdrView (iterating over all registered Pages).
+ virtual SdrPageView* ShowSdrPage(SdrPage* pPage);
+ virtual void HideSdrPage();
+
+ // Iterate over all registered PageViews
+ SdrPageView* GetSdrPageView() const { return mpPageView.get(); }
+
+ // A SdrView can be displayed on multiple Windows at the same time
+ virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow);
+ virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
+
+ void SetLayerVisible(const OUString& rName, bool bShow);
+ bool IsLayerVisible(const OUString& rName) const;
+
+ void SetLayerLocked(const OUString& rName, bool bLock=true);
+ bool IsLayerLocked(const OUString& rName) const;
+
+ void SetLayerPrintable(const OUString& rName, bool bPrn);
+ bool IsLayerPrintable(const OUString& rName) const;
+
+ // PrePaint call forwarded from app windows
+ void PrePaint();
+
+
+ // Used internally for Draw/Impress/sch/chart2
+ virtual void CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr);
+
+ // #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps
+
+ // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow which will then be used as the
+ // target for paints. Since paints may be buffered, use its GetTargetOutputDevice() method which will
+ // return the buffer in case it's buffered.
+ //
+ // DoCompleteRedraw then draws the DrawingLayer hierarchy
+ // EndCompleteRedraw does the necessary refreshes, paints text edit and overlay as well as destroys the
+ // SdrPaintWindow again, if needed.
+ // This means: the SdrPaintWindow is no longer safe after this closing call.
+ virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut);
+ void DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr);
+ virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
+
+
+ // Used for the other applications basctl/sc/sw which call DrawLayer at PageViews
+ // #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
+ // #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
+ SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect = false);
+
+ // Used when the region passed to BeginDrawLayers needs to be changed
+ void UpdateDrawLayersRegion(const OutputDevice* pOut, const vcl::Region& rReg);
+ void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
+
+protected:
+
+ // Used to paint the form layer after the PreRender device is flushed (painted) to the window.
+ void ImpFormLayerDrawing( SdrPaintWindow& rPaintWindow );
+
+ static vcl::Region OptimizeDrawLayersRegion(const OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect);
+
+public:
+ /// Draw Page as a white area or not
+ bool IsPageVisible() const { return mbPageVisible; }
+
+ /// Draw Page shadow or not
+ bool IsPageShadowVisible() const { return mbPageShadowVisible; }
+
+ /// Draw Page as a white area or not
+ bool IsPageBorderVisible() const { return mbPageBorderVisible; }
+
+ /// Draw Border line or not
+ bool IsBordVisible() const { return mbBordVisible; }
+
+ /// Draw Grid or not
+ bool IsGridVisible() const { return mbGridVisible; }
+
+ /// Draw Grid in front of objects or behind them
+ bool IsGridFront() const { return mbGridFront ; }
+
+ /// Draw Help line of the Page or not
+ bool IsHlplVisible() const { return mbHlplVisible; }
+
+ /// Draw Help line in front of the objects or behind them
+ bool IsHlplFront() const { return mbHlplFront ; }
+
+ const Color& GetGridColor() const { return maGridColor;}
+ void SetPageVisible(bool bOn = true) { mbPageVisible=bOn; InvalidateAllWin(); }
+ void SetPageShadowVisible(bool bOn) { mbPageShadowVisible=bOn; InvalidateAllWin(); }
+ void SetPageBorderVisible(bool bOn = true) { mbPageBorderVisible=bOn; InvalidateAllWin(); }
+ void SetBordVisible(bool bOn = true) { mbBordVisible=bOn; InvalidateAllWin(); }
+ void SetGridVisible(bool bOn) { mbGridVisible=bOn; InvalidateAllWin(); }
+ void SetGridFront(bool bOn) { mbGridFront =bOn; InvalidateAllWin(); }
+ void SetHlplVisible(bool bOn = true) { mbHlplVisible=bOn; InvalidateAllWin(); }
+ void SetHlplFront(bool bOn) { mbHlplFront =bOn; InvalidateAllWin(); }
+ void SetGlueVisible(bool bOn = true) { if (mbGlueVisible!=bOn) { mbGlueVisible=bOn; if (!mbGlueVisible2 && !mbGlueVisible3 && !mbGlueVisible4) GlueInvalidate(); } }
+
+ bool IsPreviewRenderer() const { return mbPreviewRenderer; }
+ void SetPreviewRenderer(bool bOn) { mbPreviewRenderer=bOn; }
+
+ // 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 != mbHideOle) mbHideOle = bNew; }
+ void setHideChart(bool bNew) { if(bNew != mbHideChart) mbHideChart = bNew; }
+ void setHideDraw(bool bNew) { if(bNew != mbHideDraw) mbHideDraw = bNew; }
+ void setHideFormControl(bool bNew) { if(bNew != mbHideFormControl) mbHideFormControl = bNew; }
+
+ void SetGridCoarse(const Size& rSiz) { maGridBig=rSiz; }
+ void SetGridFine(const Size& rSiz) {
+ maGridFin=rSiz;
+ if (maGridFin.Height()==0) maGridFin.setHeight(maGridFin.Width());
+ if (mbGridVisible) InvalidateAllWin();
+ }
+ const Size& GetGridCoarse() const { return maGridBig; }
+ const Size& GetGridFine() const { return maGridFin; }
+
+ void InvalidateAllWin();
+ void InvalidateAllWin(const tools::Rectangle& rRect);
+
+ /// If the View should not call Invalidate() on the windows, override
+ /// the following 2 methods and do something else.
+ virtual void InvalidateOneWin(OutputDevice& rWin);
+ virtual void InvalidateOneWin(OutputDevice& rWin, const tools::Rectangle& rRect);
+
+ void SetActiveLayer(const OUString& rName) { maActualLayer=rName; }
+ const OUString& GetActiveLayer() const { return maActualLayer; }
+
+ /// Leave an object group of all visible Pages (like `chdir ..` in MS-DOS)
+ void LeaveOneGroup();
+
+ /// Leave all entered object groups of all visible Pages (like `chdir \` in MS-DOS)
+ void LeaveAllGroup();
+
+ /// Determine, whether Leave is useful or not
+ bool IsGroupEntered() const;
+
+ /// Default attributes at the View
+ /// Newly created objects are assigned these attributes by default when they are created.
+ void SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll);
+ const SfxItemSet& GetDefaultAttr() const { return maDefaultAttr; }
+ void SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+
+ void SetNotPersistDefaultAttr(const SfxItemSet& rAttr);
+ void MergeNotPersistDefaultAttr(SfxItemSet& rAttr) const;
+
+ /// Execute a swap-in of e.g. graphics asynchronously.
+ /// This does not reload all graphics like Paint does, but kicks off
+ /// the loading there. When such an object is done loading, it is displayed.
+ /// TODO: Only works at the moment, if SwapGraphics is enabled in the model.
+ /// The default = false flag is non-persistent
+ bool IsSwapAsynchron() const { return mbSwapAsynchron; }
+ void SetSwapAsynchron(bool bJa=true) { mbSwapAsynchron=bJa; }
+ virtual bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
+
+ virtual bool MouseButtonDown(const MouseEvent& /*rMEvt*/, OutputDevice* /*pWin*/) { return false; }
+ virtual bool MouseButtonUp(const MouseEvent& /*rMEvt*/, OutputDevice* /*pWin*/) { return false; }
+ virtual bool MouseMove(const MouseEvent& /*rMEvt*/, OutputDevice* /*pWin*/) { return false; }
+ virtual bool RequestHelp(const HelpEvent& /*rHEvt*/) { return false; }
+ virtual bool Command(const CommandEvent& /*rCEvt*/, vcl::Window* /*pWin*/) { return false; }
+
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+
+ void SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+
+ virtual void MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin);
+
+ /// For Plugins
+ /// Is called by the Paint of the OLE object
+ virtual void DoConnect(SdrOle2Obj* pOleObj);
+
+ /// Enable/disable animations for ::Paint
+ /// Is used by e.g. SdrGrafObj, if it contains an animation
+ /// Preventing automatic animation is needed for e.g. the presentation view
+ bool IsAnimationEnabled() const { return ( SdrAnimationMode::Animate == meAnimationMode ); }
+ void SetAnimationEnabled( bool bEnable=true );
+
+ /// Set/unset pause state for animations
+ void SetAnimationPause( bool bSet );
+
+ /// Mode when starting an animation in the Paint Handler:
+ /// 1. SdrAnimationMode::Animate (default): start animation normally
+ /// 2. SDR_ANIMATION_DONT_ANIMATE: only show the replacement picture
+ /// 3. SdrAnimationMode::Disable: don't start and don't show any replacement
+ void SetAnimationMode( const SdrAnimationMode eMode );
+
+ /// Must be called by the App when scrolling etc. in order for
+ /// an active FormControl to be moved too
+ void VisAreaChanged(const OutputDevice* pOut);
+ void VisAreaChanged();
+
+ bool IsPrintPreview() const { return mbPrintPreview; }
+ void SetPrintPreview(bool bOn = true) { mbPrintPreview=bOn; }
+
+ const svtools::ColorConfig& getColorConfig() const { return maColorConfig;}
+
+ void onChangeColorConfig();
+
+ // #103834# Set background color for svx at SdrPageViews
+ void SetApplicationBackgroundColor(Color aBackgroundColor);
+
+ // #103911# Set document color for svx at SdrPageViews
+ void SetApplicationDocumentColor(Color aDocumentColor);
+
+ // #i38135#
+ // Sets the timer for Object animations and restarts.
+ void SetAnimationTimer(sal_uInt32 nTime);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx
new file mode 100644
index 000000000..8c0c8947c
--- /dev/null
+++ b/include/svx/svdpoev.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+#include <svx/svdedtv.hxx>
+
+#include <svx/ipolypolygoneditorcontroller.hxx>
+
+class SVXCORE_DLLPUBLIC SdrPolyEditView : public SdrEditView, public IPolyPolygonEditorController
+{
+ friend class SdrEditView;
+
+ bool bSetMarkedPointsSmoothPossible : 1;
+ bool bSetMarkedSegmentsKindPossible : 1;
+
+ SdrPathSmoothKind eMarkedPointsSmooth;
+ SdrPathSegmentKind eMarkedSegmentsKind;
+
+private:
+ SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags();
+ SVX_DLLPRIVATE void ImpCheckPolyPossibilities();
+
+ typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*);
+ SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr);
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrPolyEditView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrPolyEditView() override;
+
+public:
+ bool IsSetMarkedPointsSmoothPossible() const override;
+ SdrPathSmoothKind GetMarkedPointsSmooth() const override;
+ void SetMarkedPointsSmooth(SdrPathSmoothKind eKind) override;
+
+ // A PolySegment can either be a segment or a Bézier curve
+ bool IsSetMarkedSegmentsKindPossible() const override;
+ SdrPathSegmentKind GetMarkedSegmentsKind() const override;
+ void SetMarkedSegmentsKind(SdrPathSegmentKind eKind) override;
+
+ // Probably Obj has been deleted afterwards
+ void DeleteMarkedPoints() override;
+ bool IsDeleteMarkedPointsPossible() const override;
+
+ void MoveMarkedPoints(const Size& rSiz);
+ void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ void RotateMarkedPoints(const Point& rRef, Degree100 nAngle);
+
+ // This probably creates an arbitrary amount of new objects
+ void RipUpAtMarkedPoints() override;
+ bool IsRipUpAtMarkedPointsPossible() const override;
+
+ // All marked Polylines are turned into polygons
+ // All open Bézier curves are turned into closed ones
+ bool IsOpenCloseMarkedObjectsPossible() const override;
+ SdrObjClosedKind GetMarkedObjectsClosedState() const override;
+
+ void CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth );
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpool.hxx b/include/svx/svdpool.hxx
new file mode 100644
index 000000000..e61b6fe97
--- /dev/null
+++ b/include/svx/svdpool.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/xpool.hxx>
+#include <svx/svxdllapi.h>
+
+class XLineAttrSetItem;
+class XFillAttrSetItem;
+
+class SVXCORE_DLLPUBLIC SdrItemPool final : public XOutdevItemPool
+{
+public:
+ SdrItemPool(SfxItemPool* pMaster = nullptr);
+ SdrItemPool(const SdrItemPool& rPool);
+private:
+ virtual ~SdrItemPool() override;
+public:
+
+ virtual rtl::Reference<SfxItemPool> Clone() const override;
+ virtual bool GetPresentation(const SfxPoolItem& rItem,
+ MapUnit ePresentationMetric,
+ OUString& rText,
+ const IntlWrapper& rIntlWrapper) const override;
+
+ static OUString GetItemName(sal_uInt16 nWhich);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx
new file mode 100644
index 000000000..1fd8fce3b
--- /dev/null
+++ b/include/svx/svdsnpv.hxx
@@ -0,0 +1,287 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdpntv.hxx>
+#include <svx/svdhlpln.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/degree.hxx>
+#include <o3tl/typed_flags_set.hxx>
+
+/**
+ * Definition:
+ * - snap something means e.g. the mouse pointer or some marked objects in drag can be snapped
+ * - snap on something means you can e.g. snap on the grid or on auxiliary lines
+ *
+ *
+ * Basically, we only catch visible elements (borders, helper lines, connectors),
+ * with the exception of the grid. Likewise, we can only catch visible elements (i.e. connectors).
+ * We only catch on the grid, if nothing else is close by (magnetic behaviour).
+ *
+ * The cursor which is used during creation of objects, while dragging polygon points
+ * etc. (i.e. the mouse cursor) is always caught on all enabled catch alternatives (max 6).
+ *
+ * This is different, when moving selected objects. Instead of one mouse cursor, there are
+ * four alternatives, which can be caught at the selected objects:
+ * 1. the logically enclosing frame of every single object
+ * 2. the logically enclosing frame of all selected objects
+ * 3. highlighted points of all selected objects (polygon points, ...)
+ * 4. the connectors of the selected objects
+ *
+ * As the first and second case exclude each other (the second is a refinement of the first one)
+ * three alternatives remain, which are independent from each other. For 6 possible values for the
+ * caught ones, we would end up with max. 18 different possible combinations!
+ *
+ * Therefore, we introduce the following simplifications:
+ * 1. Connectors only catch on connectors
+ *
+ * Only max. 2*5+1 = 11 combinations remain for MoveDrag:
+ * 1-3. enclosing frame on grid/border/helper lines
+ * 4. enclosing frame on highlighted object points
+ * 5. enclosing frame on enclosing frame
+ * 6-8. highlighted points on grid/border/helper lines
+ * 7. highlighted points on highlighted object points
+ * 8-10. highlighted points on enclosing frame
+ * 11. connectors on connectors
+ *
+ * We test for all of these possible 11 combinations in the MouseMove event in the DragMove
+ * and those with the least need of correction are carried out.
+ *
+ * In the Resize() etc. methods we only catch the logically enclosing frame of the highlighted objects.
+ */
+
+/** Return value for SnapPos() method */
+enum class SdrSnap
+{
+ NOTSNAPPED = 0x00,
+ XSNAPPED = 0x01,
+ YSNAPPED = 0x02
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrSnap> : is_typed_flags<SdrSnap, 3> {};
+}
+
+// TODO SdrCrookMode::Stretch is not implemented yet!
+enum class SdrCrookMode {
+ Rotate,
+ Slant,
+ Stretch
+};
+
+
+// #114409#-1 Migrate PageOrigin
+class ImplPageOriginOverlay;
+
+class SVXCORE_DLLPUBLIC SdrSnapView : public SdrPaintView
+{
+protected:
+ // #114409#-1 Migrate PageOrigin
+ class ImplPageOriginOverlay* mpPageOriginOverlay;
+
+ // #114409#-2 Migrate HelpLine
+ class ImplHelpLineOverlay* mpHelpLineOverlay;
+
+ Size aMagnSiz;
+ Fraction aSnapWdtX;
+ Fraction aSnapWdtY;
+
+ sal_uInt16 nMagnSizPix;
+ Degree100 nSnapAngle;
+ Degree100 nEliminatePolyPointLimitAngle;
+
+ SdrCrookMode eCrookMode;
+
+ bool bSnapEnab : 1;
+ bool bGridSnap : 1;
+ bool bBordSnap : 1;
+ bool bHlplSnap : 1;
+ bool bOFrmSnap : 1;
+ bool bOPntSnap : 1;
+ bool bOConSnap : 1;
+ bool bMoveSnapOnlyTopLeft : 1; // Special for dialogeditor
+ bool bOrtho : 1;
+ bool bBigOrtho : 1;
+ bool bAngleSnapEnab : 1;
+ bool bMoveOnlyDragging : 1; // only move objects while Resize/Rotate/...
+ bool bSlantButShear : 1; // use slant instead of shear
+ bool bCrookNoContortion : 1; // no contorsion while Crook
+ bool bEliminatePolyPoints : 1;
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrSnapView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~SdrSnapView() override;
+
+public:
+ virtual bool IsAction() const override;
+ virtual void MovAction(const Point& rPnt) override;
+ virtual void EndAction() override;
+ virtual void BckAction() override;
+ virtual void BrkAction() override; // break actions for derived classes e.g. interrupt dragging.
+ virtual void TakeActionRect(tools::Rectangle& rRect) const override;
+
+ void SetSnapGridWidth(const Fraction& rX, const Fraction& rY) { aSnapWdtX=rX; aSnapWdtY=rY; }
+ const Fraction& GetSnapGridWidthX() const { return aSnapWdtX; }
+ const Fraction& GetSnapGridWidthY() const { return aSnapWdtY; }
+
+ void SetSnapMagnetic(const Size& rSiz) { if (rSiz!=aMagnSiz) { aMagnSiz=rSiz; } }
+ void SetSnapMagneticPixel(sal_uInt16 nPix) { nMagnSizPix=nPix; }
+ sal_uInt16 GetSnapMagneticPixel() const { return nMagnSizPix; }
+
+ // RecalcLogicSnapMagnetic has to be called for every change of OutputDevices and every change of the MapMode!
+ void RecalcLogicSnapMagnetic(const OutputDevice& rOut) { SetSnapMagnetic(rOut.PixelToLogic(Size(nMagnSizPix,nMagnSizPix))); }
+ void SetActualWin(const OutputDevice* pWin) { SdrPaintView::SetActualWin(pWin); if (pWin!=nullptr) RecalcLogicSnapMagnetic(*pWin); }
+
+ // Coordinates referred to the view!
+ // Returnvalues are SdrSnap::NOTSNAPPED,SdrSnap::XSNAPPED,
+ // SdrSnap::YSNAPPED or SdrSnap::XYSNAPPED
+ SdrSnap SnapPos(Point& rPnt, const SdrPageView* pPV) const;
+ Point GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const;
+ void CheckSnap(const Point& rPt, tools::Long& nBestXSnap, tools::Long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const;
+
+ // All attitudes to snap are persistent.
+ bool IsSnapEnabled() const { return bSnapEnab; }
+ bool IsGridSnap() const { return bGridSnap; } // Snap to grid
+ bool IsBordSnap() const { return bBordSnap; } // Snap to border
+ bool IsHlplSnap() const { return bHlplSnap; } // Snap to auxiliary line
+ bool IsOFrmSnap() const { return bOFrmSnap; } // Snap to LogFram from surrounding drawing objects
+ bool IsOPntSnap() const { return bOPntSnap; } // Snap to distinct points from surrounding drawing objects
+ bool IsOConSnap() const { return bOConSnap; } // Snap to connectors of the drawing objects
+ void SetSnapEnabled(bool bOn) { bSnapEnab=bOn; }
+ void SetGridSnap(bool bOn) { bGridSnap=bOn; }
+ void SetBordSnap(bool bOn) { bBordSnap=bOn; }
+ void SetHlplSnap(bool bOn) { bHlplSnap=bOn; }
+ void SetOFrmSnap(bool bOn) { bOFrmSnap=bOn; }
+ void SetOPntSnap(bool bOn) { bOPntSnap=bOn; }
+ void SetOConSnap(bool bOn) { bOConSnap=bOn; }
+
+ // Usually every 4 corners of Object-SnapRects are snapped for Move-Dragging.
+ // The following attitudes e.g. if you only want to snap the left corner on the top (e.g. DialogEditor)
+ // persistent, Default=FALSE.
+ void SetMoveSnapOnlyTopLeft(bool bOn) { bMoveSnapOnlyTopLeft=bOn; }
+ bool IsMoveSnapOnlyTopLeft() const { return bMoveSnapOnlyTopLeft; }
+
+ // #114409#-1 Migrate PageOrigin
+ void BegSetPageOrg(const Point& rPnt);
+ void MovSetPageOrg(const Point& rPnt);
+ void EndSetPageOrg();
+ void BrkSetPageOrg();
+ bool IsSetPageOrg() const { return (nullptr != mpPageOriginOverlay); }
+
+ // HitTest. If sal_True, in rnHelpLineNum is the number of the auxiliary line and in rpPv
+ // the appended PageView.
+ bool PickHelpLine(const Point& rPnt, short nTol, const OutputDevice& rOut, sal_uInt16& rnHelpLineNum, SdrPageView*& rpPV) const;
+
+ // Move of an available auxiliary line. Use nHelpLineNum and pPV from PickHelpLine.
+ bool BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView* pPV);
+ // interactive insertion of a new auxiliary line
+ void BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind);
+ PointerStyle GetDraggedHelpLinePointer() const;
+
+ // change the type of auxiliary line while dragging
+ // void SetDraggedHelpLineKind(SdrHelpLineKind eNewKind);
+ void MovDragHelpLine(const Point& rPnt);
+ bool EndDragHelpLine();
+ void BrkDragHelpLine();
+ bool IsDragHelpLine() const { return (nullptr != mpHelpLineOverlay); }
+
+ // SnapAngle is for angles in circle, RotateDragging, ...
+ // The snapping of an angle is beared down, if it is switched off
+ // with SetAngleSnapEnabled(sal_False)
+ // The snapping angles is independent of snapping coordinates
+ // and so independent of the attitude IsSnapEnabled()
+ // Only values should be specified for them is applied:
+ // 36000 modulo nAngle = 0
+ // Implemented for:
+ // - Rotate (Dragging)
+ // - Shear (Dragging)
+ // - circular arc/-sector/-section angle (Create and Dragging)
+ // persistent.
+ void SetAngleSnapEnabled(bool bOn) { bAngleSnapEnab=bOn; }
+ bool IsAngleSnapEnabled() const { return bAngleSnapEnab; }
+ void SetSnapAngle(Degree100 nAngle) { nSnapAngle=nAngle; }
+ Degree100 GetSnapAngle() const { return nSnapAngle; }
+
+ // different effects from Ortho (depending on the context):
+ // - Create
+ // - only lines in 45deg grid
+ // - instead of rectangles squares are created
+ // - instead of ellipse circles are created
+ // - Dragging
+ // - general Dragging
+ // - Move only horizontal, vertical or 45deg
+ // - Resize proportional
+ // - Mirror: nothing
+ // - Shear without Resize
+ // - Crook without Resize
+ // - move handles
+ // - mirror axis only 45deg grid
+ // - object-specific Dragging
+ // - rectangle corner radius: nothing
+ // - circle object angle: nothing
+ // - line keeps while Dragging the angle and is only stretched/ contracted
+ // Default value for Ortho is off. persistent.
+ void SetOrtho(bool bOn) { bOrtho=bOn; } // incomplete
+ bool IsOrtho() const { return bOrtho; }
+
+ // BigOrtho is only relevant if Ortho is switched on.
+ // Example: rectangle is created and ortho is switched on (--> square)
+ // and the Mouse was dragged from zero to the coordinates
+ // (80,30). Now there are 2 alternatives to determine the edge length
+ // of the square: 30 and 80.
+ // The standard Ortho-Function took 30 (every time the smaller length)
+ // If BigOrtho is switched on, you get a square with edge length of 80.
+ // The same also applies to Resize.
+ // Default value for BigOrtho is on. persistent.
+ void SetBigOrtho(bool bOn) { bBigOrtho=bOn; }
+ bool IsBigOrtho() const { return bBigOrtho; }
+
+ // If MoveOnlyDragging=sal_True only the center of the marked objects is
+ // transformed when Resize/Rotate/Shear/Mirror/Crook is executed.
+ // Size, form and rotation angle of the objects are conserved only their positions
+ // are changed. persistent. Default=FALSE. (ni)
+ void SetMoveOnlyDragging(bool bOn) { bMoveOnlyDragging=bOn; }
+ bool IsMoveOnlyDragging() const { return bMoveOnlyDragging; }
+
+ // Use Slant instead of Shear. persistent. Default=FALSE.
+ void SetSlantButShear(bool bOn) { bSlantButShear=bOn; }
+ bool IsSlantButShear() const { return bSlantButShear; }
+
+ // Don't contort objecte while Crook. persistent. Default=FALSE. (ni)
+ void SetCrookNoContortion(bool bOn) { bCrookNoContortion=bOn; }
+ bool IsCrookNoContortion() const { return bCrookNoContortion; }
+
+ // Crook-Mode. persistent. Default=SdrCrookMode::Rotate. (ni)
+ void SetCrookMode(SdrCrookMode eMode) { eCrookMode=eMode; }
+ SdrCrookMode GetCrookMode() const { return eCrookMode; }
+
+ // Special for IBM: While Dragging of a traverse station, it is deleted
+ // if its adjacent lines are almost a solid line.
+ void SetEliminatePolyPoints(bool bOn) { bEliminatePolyPoints=bOn; }
+ bool IsEliminatePolyPoints() const { return bEliminatePolyPoints; }
+ void SetEliminatePolyPointLimitAngle(Degree100 nAngle) { nEliminatePolyPointLimitAngle=nAngle; }
+ Degree100 GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdsob.hxx b/include/svx/svdsob.hxx
new file mode 100644
index 000000000..7e2b8578e
--- /dev/null
+++ b/include/svx/svdsob.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/uno/Any.hxx>
+
+#include <svx/svxdllapi.h>
+#include <svx/svdtypes.hxx>
+
+/*
+ Stores a bitfield of the layer values that have been set.
+*/
+
+class SVXCORE_DLLPUBLIC SdrLayerIDSet final
+{
+ // For now, have up to 256 layers
+ sal_uInt8 aData[32];
+
+public:
+ explicit SdrLayerIDSet(bool bInitVal = false)
+ {
+ memset(aData, bInitVal ? 0xFF : 0x00, sizeof(aData));
+ }
+
+ bool operator!=(const SdrLayerIDSet& rCmpSet) const
+ {
+ return (memcmp(aData, rCmpSet.aData, sizeof(aData))!=0);
+ }
+
+ void Set(SdrLayerID a)
+ {
+ const sal_Int16 nId = a.get();
+ if (nId >= 0 && nId < 256)
+ aData[nId / 8] |= 1 << (nId % 8);
+ }
+
+ void Clear(SdrLayerID a)
+ {
+ const sal_Int16 nId = a.get();
+ if (nId >= 0 && nId < 256)
+ aData[nId / 8] &= ~(1 << (nId % 8));
+ }
+
+ void Set(SdrLayerID a, bool b)
+ {
+ if(b)
+ Set(a);
+ else
+ Clear(a);
+ }
+
+ bool IsSet(SdrLayerID a) const
+ {
+ const sal_Int16 nId = a.get();
+ return nId >= 0 && nId < 256 && (aData[nId / 8] & 1 << nId % 8) != 0;
+ }
+
+ void SetAll()
+ {
+ memset(aData, 0xFF, sizeof(aData));
+ }
+
+ void ClearAll()
+ {
+ memset(aData, 0x00, sizeof(aData));
+ }
+
+ bool IsEmpty() const;
+
+ void operator&=(const SdrLayerIDSet& r2ndSet);
+
+ // initialize this set with a UNO sequence of sal_Int8 (e.g. as stored in settings.xml)
+ void PutValue(const css::uno::Any & rAny);
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx
new file mode 100644
index 000000000..f8e6a40da
--- /dev/null
+++ b/include/svx/svdtext.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <editeng/outlobj.hxx>
+#include <svx/sdr/properties/defaultproperties.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/weakbase.hxx>
+
+class OutlinerParaObject;
+class SdrOutliner;
+class SdrTextObj;
+class SdrModel;
+class SfxItemSet;
+enum class OutlinerMode;
+
+namespace sdr::properties
+{
+class TextProperties;
+}
+
+/** This class stores information about one text inside a shape.
+*/
+
+class SfxStyleSheet;
+class SVXCORE_DLLPUBLIC SdrText : public tools::WeakBase
+{
+public:
+ explicit SdrText(SdrTextObj& rObject);
+ virtual ~SdrText() override;
+
+ void ForceOutlinerParaObject(OutlinerMode nOutlMode);
+
+ virtual void SetOutlinerParaObject(std::optional<OutlinerParaObject> pTextObject);
+ OutlinerParaObject* GetOutlinerParaObject();
+ const OutlinerParaObject* GetOutlinerParaObject() const;
+
+ void CheckPortionInfo(const SdrOutliner& rOutliner);
+ void ReformatText();
+
+ // default uses GetObjectItemSet, but may be overridden to
+ // return a text-specific ItemSet
+ const SfxItemSet& GetItemSet() const;
+
+ // This class does not need an own SdrModel reference - always
+ // has the SdrTextObj working with so can use SdrModel::getSdrModelFromSdrObject()
+ SdrTextObj& GetObject() const { return mrObject; }
+
+ /** returns the current OutlinerParaObject and removes it from this instance */
+ std::optional<OutlinerParaObject> RemoveOutlinerParaObject();
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
+
+protected:
+ virtual const SfxItemSet& GetObjectItemSet();
+ virtual SfxStyleSheet* GetStyleSheet() const;
+
+private:
+ std::optional<OutlinerParaObject> mpOutlinerParaObject;
+ SdrTextObj& mrObject;
+ bool mbPortionInfoChecked;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
new file mode 100644
index 000000000..67741e777
--- /dev/null
+++ b/include/svx/svdtrans.hxx
@@ -0,0 +1,286 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/degree.hxx>
+#include <tools/fldunit.hxx>
+#include <tools/fract.hxx>
+#include <tools/gen.hxx>
+#include <tools/helpers.hxx>
+#include <tools/mapunit.hxx>
+#include <tools/poly.hxx>
+
+// That maximum shear angle
+constexpr Degree100 SDRMAXSHEAR(8900);
+
+class XPolygon;
+class XPolyPolygon;
+
+inline void MovePoly(tools::Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); }
+void MoveXPoly(XPolygon& rPoly, const Size& S);
+
+SVXCORE_DLLPUBLIC void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+inline void ResizePoint(Point& rPnt, const Point& rRef, const Fraction& xFract, const Fraction& yFract);
+void ResizePoly(tools::Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+
+inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs);
+SVXCORE_DLLPUBLIC void RotatePoly(tools::Polygon& rPoly, const Point& rRef, double sn, double cs);
+void RotateXPoly(XPolygon& rPoly, const Point& rRef, double sn, double cs);
+void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs);
+
+void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2);
+void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2);
+
+inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, bool bVShear = false);
+SVXCORE_DLLPUBLIC void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn);
+void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, bool bVShear = false);
+
+/**
+ * rPnt.X/rPnt.Y is set to rCenter.X or rCenter.Y!
+ * We then only need to rotate rPnt by rCenter.
+ *
+ * @return the returned angle is in rad
+ */
+inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad, bool bVertical);
+
+/**
+ * The following methods accept a point of an XPolygon, whereas the neighbouring
+ * control points of the actual point are passed in pC1/pC2.
+ * Via rSin/rCos, sin(nAngle) and cos(nAngle) are returned.
+ *
+ * @return the returned angle is in rad
+ */
+double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
+ const Point& rRad, double& rSin, double& rCos, bool bVert);
+double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
+ const Point& rRad, double& rSin, double& rCos, bool bVert);
+double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
+ const Point& rRad, double& rSin, double& rCos, bool bVert,
+ const tools::Rectangle& rRefRect);
+
+void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert);
+void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert);
+void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect);
+
+void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert);
+void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert);
+void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect);
+
+/**************************************************************************************************/
+/* Inline */
+/**************************************************************************************************/
+
+inline void ResizePoint(Point& rPnt, const Point& rRef, const Fraction& xFract, const Fraction& yFract)
+{
+ double nxFract = xFract.IsValid() ? static_cast<double>(xFract) : 1.0;
+ double nyFract = yFract.IsValid() ? static_cast<double>(yFract) : 1.0;
+ rPnt.setX(rRef.X() + FRound( (rPnt.X() - rRef.X()) * nxFract ));
+ rPnt.setY(rRef.Y() + FRound( (rPnt.Y() - rRef.Y()) * nyFract ));
+}
+
+inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs)
+{
+ tools::Long dx=rPnt.X()-rRef.X();
+ tools::Long dy=rPnt.Y()-rRef.Y();
+ rPnt.setX(FRound(rRef.X()+dx*cs+dy*sn));
+ rPnt.setY(FRound(rRef.Y()+dy*cs-dx*sn));
+}
+
+inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, bool bVShear)
+{
+ if (!bVShear) { // Horizontal
+ if (rPnt.Y()!=rRef.Y()) { // else not needed
+ rPnt.AdjustX(-FRound((rPnt.Y()-rRef.Y())*tn));
+ }
+ } else { // or else vertical
+ if (rPnt.X()!=rRef.X()) { // else not needed
+ rPnt.AdjustY(-FRound((rPnt.X()-rRef.X())*tn));
+ }
+ }
+}
+
+inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad, bool bVertical)
+{
+ double nAngle;
+ if (bVertical) {
+ tools::Long dy=rPnt.Y()-rCenter.Y();
+ nAngle=static_cast<double>(dy)/static_cast<double>(rRad.Y());
+ rPnt.setY(rCenter.Y());
+ } else {
+ tools::Long dx=rCenter.X()-rPnt.X();
+ nAngle=static_cast<double>(dx)/static_cast<double>(rRad.X());
+ rPnt.setX(rCenter.X());
+ }
+ return nAngle;
+}
+
+/**************************************************************************************************/
+/**************************************************************************************************/
+
+/**
+ * The Y axis points down!
+ * The function negates the Y axis, when calculating the angle, such
+ * that GetAngle(Point(0,-1))=90 deg.
+ * GetAngle(Point(0,0)) returns 0.
+ *
+ * @return the returned value is in the range of -180.00..179.99 deg
+ * and is in 1/100 deg units
+ */
+SVXCORE_DLLPUBLIC Degree100 GetAngle(const Point& rPnt);
+
+Degree100 NormAngle18000(Degree100 a); /// Normalize angle to -180.00..179.99
+
+SVXCORE_DLLPUBLIC Degree100 NormAngle36000(Degree100 a); /// Normalize angle to 0.00..359.99
+
+sal_uInt16 GetAngleSector(Degree100 nAngle); /// Determine sector within the cartesian coordinate system
+
+/**
+ * Calculates the length of (0,0) via a^2 + b^2 = c^2
+ * In order to avoid overflows, we ignore some decimal places.
+ */
+tools::Long GetLen(const Point& rPnt);
+
+/**
+ * The transformation of a rectangle into a polygon, by
+ * using angle parameters from GeoStat. ------------
+ * The point of reference is always the Point 0, meaning /1 2/
+ * the upper left corner of the initial rectangle. / /
+ * When calculating the polygon, the order is first / /
+ * shear and then the rotation. / /
+ * / / \
+ * / / |
+ * A) Initial rectangle aRect B) After applying Shear /0 3/ Rot|
+ * +------------------+ -------------------- ------------------
+ * |0 1| \0 1\ C) After applying Rotate
+ * | | \ \
+ * | | | \ \
+ * |3 2| | \3 2\
+ * +------------------+ | --------------------
+ * |Shr
+ *
+ * When converting the polygon back into a rect, the order is necessarily the
+ * other way around:
+ * - Calculating the rotation angle: angle of the line 0-1 in figure C) to the horizontal
+ * - Turning the sheared rect back (we get figure B)
+ * - Determining the width of the rect = length of the line 0-1 in figure B)
+ * - Determining the height of the rect = vertical distance between the points 0 and 3
+ * of figure B)
+ * - Determining the shear angle from the line 0-3 to the perpendicular line.
+ *
+ * We need to keep in mind that the polygon can be mirrored when it was
+ * transformed in the meantime (e.g. mirror or resize with negative factor).
+ * In that case, we first need to normalize, by swapping points (0 with 3 and 1
+ * with 2), so that it has the right orientation.
+ *
+ * Note: a positive shear angle means a shear with a positive visible curvature
+ * on the screen. Mathematically, that would be a negative curvature, as the
+ * Y axis runs from top to bottom on the screen.
+ * Rotation angle: positive means a visible left rotation.
+ */
+
+class GeoStat { // Geometric state for a rect
+public:
+ Degree100 nRotationAngle;
+ Degree100 nShearAngle;
+ double mfTanShearAngle; // tan(nShearAngle)
+ double mfSinRotationAngle; // sin(nRotationAngle)
+ double mfCosRotationAngle; // cos(nRotationAngle)
+
+ GeoStat(): nRotationAngle(0),nShearAngle(0),mfTanShearAngle(0.0),mfSinRotationAngle(0.0),mfCosRotationAngle(1.0) {}
+ void RecalcSinCos();
+ void RecalcTan();
+};
+
+tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo);
+void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo);
+
+void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho);
+void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho);
+
+// Multiplication and subsequent division
+// Calculation and intermediate values are in BigInt
+SVXCORE_DLLPUBLIC tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv);
+
+class FrPair {
+ Fraction aX;
+ Fraction aY;
+public:
+ FrPair(const Fraction& rBoth) : aX(rBoth),aY(rBoth) {}
+ FrPair(const Fraction& rX, const Fraction& rY) : aX(rX),aY(rY) {}
+ FrPair(tools::Long nMul, tools::Long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {}
+ FrPair(tools::Long xMul, tools::Long xDiv, tools::Long yMul, tools::Long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {}
+ const Fraction& X() const { return aX; }
+ const Fraction& Y() const { return aY; }
+ Fraction& X() { return aX; }
+ Fraction& Y() { return aY; }
+};
+
+// To convert units of measurement
+SVXCORE_DLLPUBLIC FrPair GetMapFactor(MapUnit eS, MapUnit eD);
+FrPair GetMapFactor(FieldUnit eS, FieldUnit eD);
+
+inline bool IsMetric(MapUnit eU) {
+ return (eU==MapUnit::Map100thMM || eU==MapUnit::Map10thMM || eU==MapUnit::MapMM || eU==MapUnit::MapCM);
+}
+
+inline bool IsInch(MapUnit eU) {
+ return (eU==MapUnit::Map1000thInch || eU==MapUnit::Map100thInch || eU==MapUnit::Map10thInch || eU==MapUnit::MapInch ||
+ eU==MapUnit::MapPoint || eU==MapUnit::MapTwip);
+}
+
+inline bool IsMetric(FieldUnit eU) {
+ return (eU == FieldUnit::MM || eU == FieldUnit::CM || eU == FieldUnit::M
+ || eU == FieldUnit::KM || eU == FieldUnit::MM_100TH);
+}
+
+inline bool IsInch(FieldUnit eU) {
+ return (eU == FieldUnit::TWIP || eU == FieldUnit::POINT
+ || eU == FieldUnit::PICA || eU == FieldUnit::INCH
+ || eU == FieldUnit::FOOT || eU == FieldUnit::MILE);
+}
+
+class SVXCORE_DLLPUBLIC SdrFormatter {
+ tools::Long nMul_;
+ tools::Long nDiv_;
+ short nComma_;
+ bool bDirty;
+ MapUnit eSrcMU;
+ MapUnit eDstMU;
+private:
+ SVX_DLLPRIVATE void Undirty();
+public:
+ SdrFormatter(MapUnit eSrc, MapUnit eDst)
+ : nMul_(0)
+ , nDiv_(0)
+ , nComma_(0)
+ , bDirty(true)
+ , eSrcMU(eSrc)
+ , eDstMU(eDst)
+ {
+ }
+ OUString GetStr(tools::Long nVal) const;
+ static OUString GetUnitStr(MapUnit eUnit);
+ static OUString GetUnitStr(FieldUnit eUnit);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdtypes.hxx b/include/svx/svdtypes.hxx
new file mode 100644
index 000000000..1009b0314
--- /dev/null
+++ b/include/svx/svdtypes.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <sal/types.h>
+#include <o3tl/strong_int.hxx>
+
+// commands for EndCreate()
+enum class SdrCreateCmd
+{
+ NextPoint, // next traverse station, segment of a circle: next coordinate
+ NextObject, // next polygon in PolyPolygon
+ ForceEnd // forced end
+};
+
+enum class SdrDragMode
+{
+ Move,
+ Resize,
+ Rotate,
+ Mirror,
+ Shear,
+ Crook,
+
+ // new modes for interactive transparence and gradient tools
+ Transparence,
+ Gradient,
+
+ // new mode for interactive cropping of graphics
+ Crop
+};
+
+/*
+ * Layer
+ */
+// You can use this value in the methods of SdrLayerSet, but false is returned
+// every time or the method does nothing.
+// type declaration for Layer-IDs
+typedef o3tl::strong_int<sal_Int16, struct SdrLayerIDTag> SdrLayerID;
+
+// If there is no layer when it should be identified, then
+// SdrLayerAdmin::GetLayerID(const String&) returns a value.
+constexpr SdrLayerID SDRLAYER_NOTFOUND(-1);
+
+/*
+ * Repeat
+ */
+enum class SdrRepeatFunc
+{
+ NONE,
+ // with parameter
+ Move, // distance
+ Resize, // factor, reference(%) related to MarkRect
+ Rotate, // rotation angle, reference(%) related to MarkRect
+ // Without parameter
+ Delete,
+ CombinePolyPoly,
+ CombineOnePoly,
+ DismantlePolys,
+ DismantleLines,
+ ConvertToPoly,
+ ConvertToPath,
+ Group,
+ Ungroup,
+ PutToTop,
+ PutToBottom,
+ MoveToTop,
+ MoveToBottom,
+ ReverseOrder,
+ ImportMtf,
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
new file mode 100644
index 000000000..01b4f6749
--- /dev/null
+++ b/include/svx/svdundo.hxx
@@ -0,0 +1,785 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <config_options.h>
+#include <sal/config.h>
+
+#include <memory>
+#include <vector>
+
+#include <editeng/outlobj.hxx>
+#include <svl/itemset.hxx>
+#include <svl/undo.hxx>
+#include <svl/style.hxx>
+#include <tools/gen.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svdsob.hxx>
+#include <svx/svxdllapi.h>
+#include <unotools/resmgr.hxx>
+
+class SfxItemSet;
+class SfxPoolItem;
+class SfxStyleSheet;
+class SdrView;
+class SdrPageView;
+class SdrModel;
+class SdrObject;
+class SdrPage;
+class SdrObjList;
+class SdrLayer;
+class SdrLayerAdmin;
+class SdrObjGeoData;
+class OutlinerParaObject;
+
+namespace svx { namespace diagram {
+ class DiagramDataState;
+}}
+
+/**
+ * Abstract base class (ABC) for all UndoActions of DrawingEngine
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoAction : public SfxUndoAction
+{
+protected:
+ SdrModel& rMod;
+ ViewShellId m_nViewShellId;
+
+protected:
+ SdrUndoAction(SdrModel& rNewMod);
+
+public:
+ virtual ~SdrUndoAction() override;
+
+ virtual bool CanRepeat(SfxRepeatTarget& rView) const override;
+ virtual void Repeat(SfxRepeatTarget& rView) override;
+
+ virtual OUString GetRepeatComment(SfxRepeatTarget& rView) const override;
+ virtual OUString GetSdrRepeatComment() const;
+
+ virtual bool CanSdrRepeat(SdrView& rView) const;
+ virtual void SdrRepeat(SdrView& rView);
+
+ /// See SfxUndoAction::GetViewShellId().
+ ViewShellId GetViewShellId() const override;
+};
+
+/**
+ * Aggregation of arbitrarily many UndoActions to a single UndoAction.
+ * Undo() executes the single UndoActions backwards (LIFO, first the last
+ * ones attached), Redo() executes the UndoActions in the order they were
+ * added (FIFO).
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoGroup final : public SdrUndoAction
+{
+ std::vector<std::unique_ptr<SdrUndoAction>> maActions;
+
+ // No expanded description of the Action (contains %O)
+ OUString aComment;
+ OUString aObjDescription;
+
+ SdrRepeatFunc eFunction;
+
+public:
+ SdrUndoGroup(SdrModel& rNewMod);
+ virtual ~SdrUndoGroup() override;
+
+ sal_Int32 GetActionCount() const { return maActions.size(); }
+ SdrUndoAction* GetAction(sal_Int32 nNum) const { return maActions[nNum].get(); }
+ void AddAction(std::unique_ptr<SdrUndoAction> pAct);
+
+ void SetComment(const OUString& rStr) { aComment=rStr; }
+ void SetObjDescription(const OUString& rStr) { aObjDescription=rStr; }
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual bool CanSdrRepeat(SdrView& rView) const override;
+ virtual void SdrRepeat(SdrView& rView) override;
+ void SetRepeatFunction(SdrRepeatFunc eFunc) { eFunction=eFunc; }
+};
+
+/**
+ * Abstract base class for all UndoActions that handle objects.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoObj : public SdrUndoAction
+{
+protected:
+ SdrObject* pObj;
+
+protected:
+ SdrUndoObj(SdrObject& rNewObj);
+
+ OUString ImpGetDescriptionStr(TranslateId pStrCacheID, bool bRepeat = false) const;
+
+ [[nodiscard]] static OUString GetDescriptionStringForObject( const SdrObject& _rForObject, TranslateId pStrCacheID, bool bRepeat = false );
+
+ // #94278# new method for evtl. PageChange at UNDO/REDO
+ void ImpShowPageOfThisObject();
+};
+
+/**
+ * Changing the object attributes.
+ * Create Action right before setting the new attributes.
+ * Also for StyleSheets.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj
+{
+protected:
+ std::optional<SfxItemSet> moUndoSet;
+ std::optional<SfxItemSet> moRedoSet;
+
+ // FIXME: Or should we better remember the StyleSheetNames?
+ rtl::Reference< SfxStyleSheetBase > mxUndoStyleSheet;
+ rtl::Reference< SfxStyleSheetBase > mxRedoStyleSheet;
+ bool bStyleSheet;
+ bool bHaveToTakeRedoSet;
+
+ // When assigning TextItems to a drawing object with text:
+ std::optional<OutlinerParaObject> pTextUndo;
+ // #i8508#
+ // The text rescue mechanism needs also to be implemented for redo actions.
+ std::optional<OutlinerParaObject> pTextRedo;
+
+ // If we have a group object:
+ std::unique_ptr<SdrUndoGroup> pUndoGroup;
+
+ // Helper to ensure StyleSheet is in pool (provided by SdrModel from SdrObject)
+ static void ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& rStyleSheetPool, SfxStyleSheet& rSheet);
+
+public:
+ SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1 = false, bool bSaveText = false);
+ virtual ~SdrUndoAttrObj() override;
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+};
+
+/**
+ * Only moving of an object.
+ * Create Action right before moving.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoMoveObj final : public SdrUndoObj
+{
+ Size aDistance; // Distance by which we move
+
+public:
+ SdrUndoMoveObj(SdrObject& rNewObj, const Size& rDist): SdrUndoObj(rNewObj),aDistance(rDist) {}
+ virtual ~SdrUndoMoveObj() override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+
+ virtual void SdrRepeat(SdrView& rView) override;
+ virtual bool CanSdrRepeat(SdrView& rView) const override;
+};
+
+/**
+ * Changing the geometry of an object.
+ * Create Action right before the geometric transformation.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoGeoObj : public SdrUndoObj
+{
+ std::unique_ptr<SdrObjGeoData> pUndoGeo;
+ std::unique_ptr<SdrObjGeoData> pRedoGeo;
+ // If we have a group object:
+ std::unique_ptr<SdrUndoGroup> pUndoGroup;
+ /// If we have a table object, should its layout change?
+ bool mbSkipChangeLayout;
+
+public:
+ SdrUndoGeoObj(SdrObject& rNewObj);
+ virtual ~SdrUndoGeoObj() override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+ void SetSkipChangeLayout(bool bOn) { mbSkipChangeLayout=bOn; }
+};
+
+// Diagram ModelData changes
+class SVXCORE_DLLPUBLIC SdrUndoDiagramModelData : public SdrUndoObj
+{
+ std::shared_ptr< svx::diagram::DiagramDataState > m_aStartState;
+ std::shared_ptr< svx::diagram::DiagramDataState > m_aEndState;
+
+ void implUndoRedo(bool bUndo);
+
+public:
+ SdrUndoDiagramModelData(SdrObject& rNewObj, std::shared_ptr< svx::diagram::DiagramDataState >& rStartState);
+ virtual ~SdrUndoDiagramModelData() override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+/**
+ * Manipulation of an ObjList: New Object, DeleteObj, SetObjZLevel, Grouping, ...
+ * Abstract base class.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoObjList : public SdrUndoObj {
+ class ObjListListener;
+ friend class ObjListListener;
+
+private:
+ bool bOwner;
+
+protected:
+ SdrObjList* pObjList;
+ sal_uInt32 nOrdNum;
+
+protected:
+ SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect);
+ virtual ~SdrUndoObjList() override;
+
+ bool IsOwner() const { return bOwner; }
+ void SetOwner(bool bNew);
+};
+
+/**
+ * Removing an Object from an ObjectList.
+ * To be used with corresponding Inserts within a UndoGroup.
+ *
+ * Create Action before removing from the ObjList.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoRemoveObj : public SdrUndoObjList
+{
+public:
+ SdrUndoRemoveObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
+ : SdrUndoObjList(rNewObj,bOrdNumDirect) {}
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual ~SdrUndoRemoveObj() override;
+};
+
+/**
+ * Inserting Objects into an ObjectList.
+ * Use with corresponding Removes within an UndoGroup.
+ * Create Action before removal from ObjList.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoInsertObj : public SdrUndoObjList
+{
+public:
+ SdrUndoInsertObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
+ : SdrUndoObjList(rNewObj,bOrdNumDirect) {}
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+};
+
+/**
+ * Deleting an Object.
+ * Create Action before removing from ObjList.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoDelObj : public SdrUndoRemoveObj
+{
+public:
+ SdrUndoDelObj(SdrObject& rNewObj, bool bOrdNumDirect = false);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+
+ virtual void SdrRepeat(SdrView& rView) override;
+ virtual bool CanSdrRepeat(SdrView& rView) const override;
+};
+
+/**
+ * Inserting a NEW Object.
+ * Create Action after insertion into the ObjList.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoNewObj : public SdrUndoInsertObj
+{
+public:
+ SdrUndoNewObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
+ : SdrUndoInsertObj(rNewObj,bOrdNumDirect) {}
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+
+ static OUString GetComment(const SdrObject& _rForObject);
+};
+
+/**
+ * Replacing an Object.
+ * Create Action before Replace in ObjList.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoReplaceObj : public SdrUndoObj
+{
+ bool bOldOwner;
+ bool bNewOwner;
+
+ SdrObjList* pObjList;
+ SdrObject* pNewObj;
+
+public:
+ SdrUndoReplaceObj(SdrObject& rOldObj1, SdrObject& rNewObj1);
+ virtual ~SdrUndoReplaceObj() override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ bool IsNewOwner() const { return bNewOwner; }
+ void SetNewOwner(bool bNew);
+
+ bool IsOldOwner() const { return bOldOwner; }
+ void SetOldOwner(bool bNew);
+};
+
+/**
+ * Copying an Object.
+ * Create Action before inserting into the ObjList.
+ */
+
+class SdrUndoCopyObj final : public SdrUndoNewObj
+{
+public:
+ SdrUndoCopyObj(SdrObject& rNewObj, bool bOrdNumDirect)
+ : SdrUndoNewObj(rNewObj,bOrdNumDirect) {}
+
+ virtual OUString GetComment() const override;
+};
+
+class SdrUndoObjOrdNum final : public SdrUndoObj
+{
+ sal_uInt32 nOldOrdNum;
+ sal_uInt32 nNewOrdNum;
+
+public:
+ SdrUndoObjOrdNum(SdrObject& rNewObj, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+class SdrUndoSort final : public SdrUndoAction
+{
+private:
+ ::std::vector<sal_Int32> m_OldSortOrder;
+ ::std::vector<sal_Int32> m_NewSortOrder;
+ sal_uInt16 const m_nPage;
+
+ void Do(::std::vector<sal_Int32> & rSortOrder);
+
+public:
+ SdrUndoSort(const SdrPage & rPage,
+ ::std::vector<sal_Int32> const& rSortOrder);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+// #i11702#
+
+class SVXCORE_DLLPUBLIC SdrUndoObjectLayerChange final : public SdrUndoObj
+{
+ SdrLayerID maOldLayer;
+ SdrLayerID maNewLayer;
+
+public:
+ SdrUndoObjectLayerChange(SdrObject& rObj, SdrLayerID aOldLayer, SdrLayerID aNewLayer);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+};
+
+class SVXCORE_DLLPUBLIC SdrUndoObjSetText : public SdrUndoObj
+{
+protected:
+ std::optional<OutlinerParaObject>
+ pOldText;
+ std::optional<OutlinerParaObject>
+ pNewText;
+ bool bNewTextAvailable;
+ bool bEmptyPresObj;
+ sal_Int32 mnText;
+
+public:
+ SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText );
+ virtual ~SdrUndoObjSetText() override;
+
+ bool IsDifferent() const;
+ void AfterSetText();
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+
+ virtual void SdrRepeat(SdrView& rView) override;
+ virtual bool CanSdrRepeat(SdrView& rView) const override;
+};
+
+/**
+ * Implement Title/Description Elements UI for Writer
+ * text frames, graphics and embedded objects (#i73249#)
+ */
+class SdrUndoObjStrAttr final : public SdrUndoObj
+{
+public:
+ enum class ObjStrAttrType
+ {
+ Name,
+ Title,
+ Description
+ };
+
+ SdrUndoObjStrAttr( SdrObject& rNewObj,
+ const ObjStrAttrType eObjStrAttr,
+ const OUString& sOldStr,
+ const OUString& sNewStr);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+
+private:
+ const ObjStrAttrType meObjStrAttr;
+ const OUString msOldStr;
+ const OUString msNewStr;
+
+};
+
+
+/*
+ * Layer
+ */
+
+/**
+ * Abstract base class for all UndoActions that have something to do with SdrLayer.
+ */
+
+class SdrUndoLayer : public SdrUndoAction
+{
+protected:
+ SdrLayer* pLayer;
+ SdrLayerAdmin* pLayerAdmin;
+ sal_uInt16 nNum;
+ bool bItsMine;
+
+protected:
+ SdrUndoLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
+ virtual ~SdrUndoLayer() override;
+};
+
+/**
+ * Inserting a new Layer.
+ * Create Action after Insertion.
+ */
+
+class SdrUndoNewLayer final : public SdrUndoLayer
+{
+public:
+ SdrUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
+ : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) {}
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+/**
+ * Deleting a Layer.
+ * Create Action before the Remove.
+ */
+
+class SdrUndoDelLayer final : public SdrUndoLayer
+{
+public:
+ SdrUndoDelLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
+ : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) { bItsMine=true; }
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+/*
+ * Pages
+ */
+
+/**
+ * ABC for all UndoActions that have something to do with SdrPages.
+ */
+
+class SdrUndoPage : public SdrUndoAction
+{
+protected:
+ rtl::Reference<SdrPage> mxPage;
+
+protected:
+ void ImpInsertPage(sal_uInt16 nNum);
+ void ImpRemovePage(sal_uInt16 nNum);
+ void ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum);
+
+protected:
+ SdrUndoPage(SdrPage& rNewPg);
+ ~SdrUndoPage();
+
+ static OUString ImpGetDescriptionStr(TranslateId pStrCacheID);
+};
+
+/**
+ * ABC for manipulation of a PageList: New Page, DeletePage, MovePage (ChangePageNum).
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoPageList : public SdrUndoPage
+{
+protected:
+ sal_uInt16 nPageNum;
+
+protected:
+ SdrUndoPageList(SdrPage& rNewPg);
+ virtual ~SdrUndoPageList() override;
+};
+
+/**
+ * Deleting a Page.
+ * Create Action before removing from the List.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoDelPage final : public SdrUndoPageList
+{
+ // When deleting a MasterPage, we remember all relations of the
+ // Character Page with the MasterPage in this UndoGroup.
+ std::unique_ptr<SdrUndoGroup> pUndoGroup;
+ std::unique_ptr<SfxPoolItem> mpFillBitmapItem;
+ bool mbHasFillBitmap;
+
+public:
+ SdrUndoDelPage(SdrPage& rNewPg);
+ virtual ~SdrUndoDelPage() override;
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+
+ virtual void SdrRepeat(SdrView& rView) override;
+ virtual bool CanSdrRepeat(SdrView& rView) const override;
+
+private:
+ void queryFillBitmap(const SfxItemSet &rItemSet);
+ void clearFillBitmap();
+ void restoreFillBitmap();
+};
+
+/**
+ * Inserting a new Page.
+ * Create Action after inserting into the List.
+ */
+
+class SVXCORE_DLLPUBLIC SdrUndoNewPage : public SdrUndoPageList
+{
+public:
+ SdrUndoNewPage(SdrPage& rNewPg): SdrUndoPageList(rNewPg) {}
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+/**
+ * Copying a Page.
+ * Create Action after inserting into the List.
+ */
+
+class SdrUndoCopyPage final : public SdrUndoNewPage
+{
+public:
+ SdrUndoCopyPage(SdrPage& rNewPg): SdrUndoNewPage(rNewPg) {}
+
+ virtual OUString GetComment() const override;
+ virtual OUString GetSdrRepeatComment() const override;
+
+ virtual void SdrRepeat(SdrView& rView) override;
+ virtual bool CanSdrRepeat(SdrView& rView) const override;
+};
+
+/**
+ * Moving a Page within the List.
+ * Create Action before moving the Page.
+ */
+
+class SdrUndoSetPageNum final : public SdrUndoPage
+{
+ sal_uInt16 nOldPageNum;
+ sal_uInt16 nNewPageNum;
+
+public:
+ SdrUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1)
+ : SdrUndoPage(rNewPg),nOldPageNum(nOldPageNum1),nNewPageNum(nNewPageNum1) {}
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+
+/*
+ * Masterpages
+ */
+
+/**
+ * ABC for all UndoActions that have something to do with
+ * MasterPage relationships.
+ */
+
+class SdrUndoPageMasterPage : public SdrUndoPage
+{
+protected:
+ bool mbOldHadMasterPage;
+ SdrLayerIDSet maOldSet;
+ sal_uInt16 maOldMasterPageNumber;
+
+protected:
+ SdrUndoPageMasterPage(SdrPage& rChangedPage);
+
+public:
+ UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) virtual ~SdrUndoPageMasterPage() override;
+};
+
+/**
+ * Removal of a MasterPage from a Character Page.
+ * Create Action before removing the MasterPageDescriptor.
+ */
+
+class SdrUndoPageRemoveMasterPage final : public SdrUndoPageMasterPage
+{
+public:
+ SdrUndoPageRemoveMasterPage(SdrPage& rChangedPage);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+/**
+ * Changing the MasterPageDescriptor (e.g. change of the VisibleLayer).
+ * Create Action before changing the MasterPageDescriptors.
+ */
+
+class SdrUndoPageChangeMasterPage final : public SdrUndoPageMasterPage
+{
+ bool mbNewHadMasterPage;
+ SdrLayerIDSet maNewSet;
+ sal_uInt16 maNewMasterPageNumber;
+
+public:
+ SdrUndoPageChangeMasterPage(SdrPage& rChangedPage);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
+
+/**
+ * The SdrUndoFactory can be set and retrieved from the SdrModel.
+ * It is used by the drawing layer implementations to create undo actions.
+ * It can be used by applications to create application specific undo actions.
+ */
+class SVXCORE_DLLPUBLIC SdrUndoFactory
+{
+public:
+ // Shapes
+ virtual ~SdrUndoFactory();
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoMoveObject( SdrObject& rObject, const Size& rDist );
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoGeoObject( SdrObject& rObject );
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1 = false, bool bSaveText = false );
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoRemoveObject(SdrObject& rObject);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect = false);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect = false);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect = false);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect = false);
+
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
+
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject );
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer );
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
+
+ // Implement Title/Description Elements UI for Writer text frames, graphics and embedded objects (#i73249#)
+ static std::unique_ptr<SdrUndoAction> CreateUndoObjectStrAttr( SdrObject& rObject,
+ SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
+ const OUString& sOldStr,
+ const OUString& sNewStr );
+
+ // Diagram ModelData changes
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoDiagramModelData( SdrObject& rObject, std::shared_ptr< svx::diagram::DiagramDataState >& rStartState );
+
+ // Layer
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
+
+ // Page
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoDeletePage(SdrPage& rPage);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoNewPage(SdrPage& rPage);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoCopyPage(SdrPage& rPage);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1);
+ static std::unique_ptr<SdrUndoAction> CreateUndoSort(SdrPage& rPage, ::std::vector<sal_Int32> const& rSortOrder);
+
+ // Master page
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoPageRemoveMasterPage(SdrPage& rChangedPage);
+ virtual std::unique_ptr<SdrUndoAction> CreateUndoPageChangeMasterPage(SdrPage& rChangedPage);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
new file mode 100644
index 000000000..166990985
--- /dev/null
+++ b/include/svx/svdview.hxx
@@ -0,0 +1,281 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+// HACK to avoid too deep includes and to have some
+// levels free in svdmark itself (MS compiler include depth limit)
+#include <svx/svdhdl.hxx>
+#include <tools/weakbase.h>
+#include <svtools/accessibilityoptions.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdcrtv.hxx>
+#include <vcl/event.hxx>
+#include <unotools/options.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+
+// class hierarchy of View:
+// SfxListener
+// SdrPaintView PntV Action ModChg Attr Notify
+// SdrSnapView SnpV Action
+//
+// SdrMarkView MrkV Action MrkChg ModChg Notify
+//
+// SdrEditView EdtV MrkChg ModChg Attr
+// SdrPolyEditView PoEV
+// SdrGlueEditView GlEV
+// SdrObjEditView EdxV Action ModChg Attr Notify
+//
+// SdrExchangeView XcgV
+// SdrDragView DrgV Action
+//
+// SdrCreateView CrtV Action
+// SdrView View
+
+class SvxURLField;
+namespace sdr::contact { class ObjectContact; }
+
+enum class SdrViewContext {
+ Standard,
+ PointEdit,
+ GluePointEdit,
+ Graphic,
+ Media,
+ Table
+};
+
+enum class SdrEventKind {
+ NONE,
+ TextEdit,
+ MoveAction,
+ EndAction,
+ BackAction,
+ EndCreate,
+ EndDrag,
+ MarkObj,
+ MarkPoint,
+ MarkGluePoint,
+ BeginMark,
+ BeginInsertObjPoint,
+ EndInsertObjPoint,
+ BeginInsertGluePoint,
+ BeginDragHelpline,
+ BeginDragObj,
+ BeginCreateObj,
+ BeginMacroObj,
+ BeginTextEdit,
+ EndMark,
+ BrkMark,
+ ExecuteUrl
+};
+
+/* for PickAnything() */
+enum class SdrMouseEventKind
+{
+ BUTTONDOWN = 1,
+ MOVE = 2,
+ BUTTONUP = 3,
+};
+
+// helper class SdrViewEvent
+struct SVXCORE_DLLPUBLIC SdrViewEvent
+{
+ SdrHdl* mpHdl;
+ SdrObject* mpObj;
+ SdrObject* mpRootObj; // mark this when SdrBeginTextEdit is executed
+ SdrPageView* mpPV;
+ const SvxURLField* mpURLField;
+
+ Point maLogicPos;
+ SdrHitKind meHit;
+ SdrEventKind meEvent;
+
+ sal_uInt16 mnMouseClicks;
+ MouseEventModifiers mnMouseMode;
+ sal_uInt16 mnMouseCode;
+ sal_uInt16 mnHlplIdx;
+ sal_uInt16 mnGlueId;
+
+ bool mbMouseDown : 1;
+ bool mbMouseUp : 1;
+ bool mbIsAction : 1; // Action is active
+ bool mbIsTextEdit : 1; // TextEdit runs currently
+ bool mbAddMark : 1;
+ bool mbUnmark : 1;
+ bool mbPrevNextMark : 1;
+ bool mbMarkPrev : 1;
+
+public:
+ SdrViewEvent();
+};
+
+// helper class for all D&D overlays
+class SVXCORE_DLLPUBLIC SdrDropMarkerOverlay
+{
+ // The OverlayObjects
+ sdr::overlay::OverlayObjectList maObjects;
+
+ void ImplCreateOverlays(
+ const SdrView& rView,
+ const basegfx::B2DPolyPolygon& rLinePolyPolygon);
+
+public:
+ SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject);
+ SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle);
+ SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd);
+ ~SdrDropMarkerOverlay();
+};
+
+
+class SVXCORE_DLLPUBLIC SdrView : public SdrCreateView, public tools::WeakBase
+{
+ friend class SdrPageView;
+
+ bool mbNoExtendedMouseDispatcher : 1;
+ bool mbNoExtendedKeyDispatcher : 1;
+ bool mbMasterPagePaintCaching : 1;
+
+ SvtAccessibilityOptions maAccessibilityOptions;
+
+public:
+ explicit SdrView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut = nullptr);
+
+ virtual ~SdrView() override;
+
+ // The default value for all dispatchers is activated. If the app for example
+ // wants to intervene in MouseDispatcher for special treatment, you have to
+ // deactivate the MouseDispatcher with the help of the method below and you have
+ // to implement it yourself. Example for MouseButtonDown:
+ // SdrViewEvent aVEvt;
+ // SdrHitKind eHit=pSdrView->PickAnything(rMEvt,SdrMouseEventKind::BUTTONDOWN,aVEvt);
+ // ... here application-specific intervention ...
+ // pSdrView->DoMouseEvent(aVEvt);
+ // SetPointer(GetPreferredPointer(...))
+ // CaptureMouse(...)
+ void EnableExtendedMouseEventDispatcher(bool bOn) { mbNoExtendedMouseDispatcher = !bOn; }
+ bool IsExtendedMouseEventDispatcherEnabled() const { return mbNoExtendedMouseDispatcher; }
+
+ void EnableExtendedKeyInputDispatcher(bool bOn) { mbNoExtendedKeyDispatcher=!bOn; }
+ bool IsExtendedKeyInputDispatcherEnabled() const { return mbNoExtendedKeyDispatcher; }
+
+ void SetMasterPagePaintCaching(bool bOn);
+ bool IsMasterPagePaintCaching() const { return mbMasterPagePaintCaching; }
+
+ bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ virtual bool MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
+ using SdrCreateView::RequestHelp;
+ virtual bool Command(const CommandEvent& rCEvt, vcl::Window* pWin) override;
+
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
+
+ bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll=false) { return SdrCreateView::SetAttributes(rSet,bReplaceAll); }
+
+ /* new interface src537 */
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr=false) const;
+
+ // incomplete implementation:
+ // OutputDevice is necessary to determine HandleSize.
+ // If NULL the first signed on Win is used.
+ PointerStyle GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const;
+ SdrHitKind PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent& rVEvt) const;
+ SdrHitKind PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const;
+ bool DoMouseEvent(const SdrViewEvent& rVEvt);
+ virtual SdrViewContext GetContext() const;
+
+ // The methods consider the particular context:
+ // - simple drawing
+ // - mode for editing points
+ // - mode for editing gluepoints
+ // - TextEdit
+ // - ... to be continued
+ void MarkAll();
+ void UnmarkAll();
+
+ const tools::Rectangle& GetMarkedRect() const;
+
+ virtual void DeleteMarked();
+
+ // Marking objects, traverse stations or gluepoints (depending on view-
+ // context) by enveloping the selection frame.
+ // bAddMark=TRUE: add to existing selection (->Shift)
+ // bUnmark=TRUE: remove objects from selection which are inside of
+ // the enveloped frame.
+ bool BegMark(const Point& rPnt, bool bAddMark, bool bUnmark);
+
+ // The following actions are possible:
+ // - ObjectCreating
+ // - ObjectMarking
+ // - Object-specific dragging
+ // - General dragging
+ // and more...
+ OUString GetStatusText();
+
+ SvtAccessibilityOptions& getAccessibilityOptions() { return maAccessibilityOptions;}
+
+ virtual void onAccessibilityOptionsChanged();
+
+ // Do not create ObjectContact locally, but offer a call to allow override
+ // and to create own derivations of ObjectContact
+ virtual sdr::contact::ObjectContact* createViewSpecificObjectContact(
+ SdrPageWindow& rPageWindow,
+ const char* pDebugName) const;
+
+ // Interactive Move Action programmatically
+ bool MoveShapeHandle(const sal_uInt32 handleNum, const Point& aEndPoint, const sal_Int32 aObjectOrdNum = -1);
+};
+
+// First of all the app creates a SdrModel.
+// Then it opens a Win and creates a SdrView.
+// ShowSdrPage() announces a page at SdrView.
+// It's possible to show SdrView in any Wins at once.
+// internal:
+// SdrView can show as many Wins as it wants at once. Pages are announced
+// or checked out with the help of ShowSdrPage()/HideSdrPage(). For every announced
+// page there is a SdrPageView instance in container aPages. If more than one page
+// is showed, you have to pay attention that the offset parameter of ShowSdrPage()
+// is conformed to the size of the page (to prevent overlapping of two pages).
+//
+// elementary methods:
+// ~~~~~~~~~~~~~~~~~~~~
+// simple events:
+// ~~~~~~~~~~~~~~~~
+// bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
+// bool MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin);
+// bool MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin);
+// bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin);
+// bool Command(const CommandEvent& rCEvt, vcl::Window* pWin);
+//
+// SfxItems:
+// ~~~~~~~~~
+// sal_Bool GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr=sal_False) const;
+// sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll);
+// SfxStyleSheet* GetStyleSheet() const;
+// sal_Bool SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr);
+//
+// others:
+// ~~~~~~~~~~
+// Pointer GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nTol=0) const;
+// OUString GetStatusText();
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdviter.hxx b/include/svx/svdviter.hxx
new file mode 100644
index 000000000..bdb28469c
--- /dev/null
+++ b/include/svx/svdviter.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+
+/*
+
+Using this class, you can find out:
+- SdrView* First/NextView()
+ - All Views in which a model is displayed
+ - All Views in which a certain page is visible (also as MasterPage)
+ - All Views in which a certain object is visible (also as MasterPage)
+- SdrPageView* First/NextPageView()
+ - All PageViews in which a model is displayed
+ - All PageViews in which a certain page is visible (also as MasterPage)
+ - All PageViews in which a certain object is visible (also as MasterPage)
+- vcl::Window* First/NextWindow()
+ - All Windows in which a model is displayed
+ - All Windows in which a certain page is visible (also as MasterPage)
+ - All Windows in which a certain object is visible (also as MasterPage)
+You can specify if the selection is restricted to a certain page/object by
+choosing the corresponding constructor.
+
+Among others, the following are considered:
+- Visibility state of the layer
+- Visible Layer of MasterPages
+- Multiple layer for group objects
+
+Not considered are:
+- Whether the pages/objects were already painted or if an Invalidate is still pending
+- Whether the pages/objects in a Window are in a visible region
+
+*/
+
+class OutputDevice;
+class SdrView;
+class SdrPageView;
+class SdrModel;
+class SdrPage;
+class SdrObject;
+class SdrLayerIDSet;
+
+class SVXCORE_DLLPUBLIC SdrViewIter
+{
+ const SdrModel* mpModel;
+ const SdrPage* mpPage;
+ const SdrObject* mpObject;
+ SdrView* mpCurrentView;
+
+ size_t mnListenerNum;
+
+private:
+ SVX_DLLPRIVATE void ImpInitVars();
+ SVX_DLLPRIVATE SdrView* ImpFindView();
+ SVX_DLLPRIVATE bool ImpCheckPageView(SdrPageView const * pPV) const;
+
+public:
+ SdrViewIter(const SdrPage* pPage);
+ SdrViewIter(const SdrObject* pObject);
+
+ SdrView* FirstView();
+ SdrView* NextView();
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
new file mode 100644
index 000000000..87ea2a285
--- /dev/null
+++ b/include/svx/svdxcgv.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svdedxv.hxx>
+
+#include <vcl/gdimtf.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC SdrExchangeView : public SdrObjEditView
+{
+ friend class SdrPageView;
+
+protected:
+
+ void ImpGetPasteObjList(Point& rPos, SdrObjList*& rpLst);
+ void ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, SdrInsertFlags nOptions);
+ bool ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& rLayer) const;
+
+ // Returns true if rPt has changed
+ bool ImpLimitToWorkArea(Point& rPt) const;
+
+protected:
+ // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
+ SdrExchangeView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+public:
+ // Output all marked objects on the specified OutputDevice
+ ::std::vector< SdrObject* > GetMarkedObjects() const;
+ virtual void DrawMarkedObj(OutputDevice& rOut) const;
+
+ // E.g. for Clipboard, Drag'n'Drop, ...
+ // Add all marked objects to a metafile.
+ // FIXME: This is known to be somewhat buggy still (Offset...,
+ // foreign graphics objects (SdrGrafObj), virtual object
+ // copies (SdrVirtObj) with anchor position <>(0,0)).
+ GDIMetaFile GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked = false) const;
+
+ // Draw all marked objects onto a bitmap, with the display's color depth
+ // and resolution
+ BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const sal_uInt32 nMaximumQuadraticPixels = 500000, const std::optional<Size>& rTargetDPI = std::nullopt) const;
+
+ // Copy all marked objects to a new model, consisting of exactly one page,
+ // with the flag PageNotValid set. This means, that only the page's objects
+ // are valid and not the page itself (page size, margins).
+ // The new model is created on the free store and passed to the caller of
+ // this method, which is responsible to dispose it later on.
+ //
+ // When inserting the marked objects into the one page of the new model,
+ // the page-local layer is merged. If there's no more room left for
+ // additional page-local layers, the corresponding objects are assigned
+ // the default layer (layer 0, document-global standard layer).
+ virtual std::unique_ptr<SdrModel> CreateMarkedObjModel() const;
+
+ Graphic GetAllMarkedGraphic() const;
+
+ /** Generate a Graphic for the given draw object
+
+ @param rSdrObject
+ The object (can also be a group object) to retrieve a Graphic
+ for.
+
+ @return a graphical representation of the given object, as it
+ appears on screen (e.g. with rotation, if any, applied).
+ */
+ static Graphic GetObjGraphic(const SdrObject& rSdrObject);
+
+ // The new Draw objects are marked for all paste methods.
+ // If bAddMark is true, the new Draw objects are added to an existing
+ // selection, which is meant for Drag'n'Drop with multiple items.
+ //
+ // The methods with a point parameter insert objects centered at that
+ // position, all others are centered at the 1st OutputDevice of the View.
+ //
+ // If pPg is set, the objects are inserted at that page. The positioning
+ // (rPos or alignment) are not relative to the View, but to the Page.
+ //
+ // Note: SdrObjList is the base class of SdrPage.
+ // All methods return true, if the objects have been successfully created
+ // and inserted.
+ // If pLst = false and no TextEdit active, we can rely on the fact, that
+ // it is marked at the View. Or else the marking only happens if the pLst
+ // is also shown at the View at the moment.
+ //
+ // Valid values for nOptions are SDRINSERT_DONTMARK and SDRINSERT_ADDMARK
+ // (@see svdedtv.hxx).
+ virtual bool Paste(
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
+
+ bool Paste(const OUString& rStr, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
+ bool Paste(SvStream& rInput, EETextFormat eFormat, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
new file mode 100644
index 000000000..7cb5eae6e
--- /dev/null
+++ b/include/svx/svx3ditems.hxx
@@ -0,0 +1,319 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SVX3DITEMS_HXX
+#define INCLUDED_SVX_SVX3DITEMS_HXX
+
+#include <config_options.h>
+#include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
+
+
+#include <editeng/colritem.hxx>
+#include <svx/e3ditem.hxx>
+#include <svx/viewpt3d.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+// Svx3D _3DOBJ_ Items
+inline SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal) {
+ return SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal);
+}
+
+inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) {
+ return SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal);
+}
+
+inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) {
+ return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal);
+}
+
+inline SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal) {
+ return SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal);
+}
+
+inline SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal) {
+ return SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal);
+}
+
+inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) {
+ return SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal);
+}
+
+inline SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal);
+}
+
+// #i28528#
+// Added extra Item (Bool) for chart2 to be able to show reduced line geometry
+class Svx3DReducedLineGeometryItem final : public SfxBoolItem {
+public:
+ Svx3DReducedLineGeometryItem(bool bVal = false);
+ Svx3DReducedLineGeometryItem* Clone(SfxItemPool * = nullptr) const override;
+};
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem final : public SfxUInt16Item {
+public:
+ Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
+
+ // use drawing::NormalsKind
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ SVX_DLLPRIVATE virtual Svx3DNormalsKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+inline SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal);
+}
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem final : public SfxUInt16Item {
+public:
+ Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
+
+ // use drawing::TextureProjectionMode
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ SVX_DLLPRIVATE virtual Svx3DTextureProjectionXItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem final : public SfxUInt16Item {
+public:
+ Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
+
+ // use drawing::TextureProjectionMode
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual Svx3DTextureProjectionYItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+inline SfxBoolItem makeSvx3DShadow3DItem(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal);
+}
+
+inline SvxColorItem makeSvx3DMaterialEmissionItem(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION);
+}
+
+inline SvxColorItem makeSvx3DMaterialSpecularItem(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR);
+}
+
+inline SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
+ return SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal);
+}
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public SfxUInt16Item {
+public:
+ Svx3DTextureKindItem(sal_uInt16 nVal = 3);
+
+ // use drawing::TextureKind
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ SVX_DLLPRIVATE virtual Svx3DTextureKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final : public SfxUInt16Item {
+public:
+ Svx3DTextureModeItem(sal_uInt16 nVal = 2);
+
+ // use drawing:TextureMode
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ SVX_DLLPRIVATE virtual Svx3DTextureModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+inline SfxBoolItem makeSvx3DTextureFilterItem(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal);
+}
+
+// Svx3D _3DSCENE_ Items
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem final : public SfxUInt16Item {
+public:
+ Svx3DPerspectiveItem(ProjectionType nVal = ProjectionType::Perspective);
+
+ // use drawing::ProjectionMode
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ SVX_DLLPRIVATE virtual Svx3DPerspectiveItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) {
+ return SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal);
+}
+
+inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) {
+ return SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal);
+}
+
+inline SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal);
+}
+
+inline SvxColorItem makeSvx3DLightcolor1Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1);
+}
+
+inline SvxColorItem makeSvx3DLightcolor2Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2);
+}
+
+inline SvxColorItem makeSvx3DLightcolor3Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3);
+}
+
+inline SvxColorItem makeSvx3DLightcolor4Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4);
+}
+
+inline SvxColorItem makeSvx3DLightcolor5Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5);
+}
+
+inline SvxColorItem makeSvx3DLightcolor6Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6);
+}
+
+inline SvxColorItem makeSvx3DLightcolor7Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7);
+}
+
+inline SvxColorItem makeSvx3DLightcolor8Item(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8);
+}
+
+inline SvxColorItem makeSvx3DAmbientcolorItem(const Color& rCol) {
+ return SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal);
+}
+
+inline SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal) {
+ return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec);
+}
+
+inline SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec);
+}
+
+inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
+ return SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal);
+}
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DShadeModeItem final : public SfxUInt16Item {
+public:
+ Svx3DShadeModeItem(sal_uInt16 nVal = 2);
+
+ // use drawing::ShadeMode
+ SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ SVX_DLLPRIVATE virtual Svx3DShadeModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+
+// #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
+class Svx3DSmoothNormalsItem final : public SfxBoolItem {
+public:
+ Svx3DSmoothNormalsItem(bool bVal = true);
+ Svx3DSmoothNormalsItem* Clone(SfxItemPool * = nullptr) const override;
+};
+
+// #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
+class Svx3DSmoothLidsItem final : public SfxBoolItem {
+public:
+ Svx3DSmoothLidsItem(bool bVal = false);
+ Svx3DSmoothLidsItem* Clone(SfxItemPool * = nullptr) const override;
+};
+
+// #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
+class Svx3DCharacterModeItem final : public SfxBoolItem {
+public:
+ Svx3DCharacterModeItem(bool bVal = false);
+ Svx3DCharacterModeItem* Clone(SfxItemPool * = nullptr) const override;
+};
+
+// #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseFrontItem final : public SfxBoolItem {
+public:
+ Svx3DCloseFrontItem(bool bVal = true);
+ Svx3DCloseFrontItem* Clone(SfxItemPool * = nullptr) const override;
+};
+
+// #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseBackItem final : public SfxBoolItem {
+public:
+ Svx3DCloseBackItem(bool bVal = true);
+ Svx3DCloseBackItem* Clone(SfxItemPool * = nullptr) const override;
+};
+
+#endif // INCLUDED_SVX_SVX3DITEMS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
new file mode 100644
index 000000000..d697da78a
--- /dev/null
+++ b/include/svx/svxdlg.hxx
@@ -0,0 +1,451 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SVXDLG_HXX
+#define INCLUDED_SVX_SVXDLG_HXX
+
+#include <sfx2/sfxdlg.hxx>
+#include <svx/anchorid.hxx>
+#include <svx/zoom_def.hxx>
+#include <editeng/edtdlg.hxx>
+
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <svx/svxdllapi.h>
+#include <vector>
+
+namespace sd {
+ class View;
+}
+
+namespace com::sun::star::linguistic2 {
+ class XDictionary;
+ class XSpellChecker1;
+ class XSpellChecker;
+ class XThesaurus;
+ class XHyphenator;
+}
+class SdrModel;
+class SdrView;
+class SvxSpellWrapper;
+enum class TransliterationFlags;
+struct ExchangeData;
+class INetURLObject;
+class GalleryTheme;
+class SvxHyperlinkTabPageBase;
+class SearchAttrItemList;
+class FmFormShell;
+class Graphic;
+class SdrObject;
+class SvxSpellWrapper;
+struct FmSearchContext;
+
+typedef WhichRangesContainer (*DialogGetRanges)();
+
+typedef ::std::vector< OUString > TargetList;
+
+namespace svx{ class SpellDialogChildWindow;}
+namespace weld{
+ class Dialog;
+ class Window;
+}
+
+class AbstractFmShowColsDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractFmShowColsDialog() override = default;
+public:
+ virtual void SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols)= 0;
+};
+
+class AbstractSvxZoomDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxZoomDialog() override = default;
+public:
+ virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) = 0;
+ virtual void HideButton( ZoomButtonId nBtnId )= 0;
+ virtual const SfxItemSet* GetOutputItemSet() const = 0 ;
+};
+
+class AbstractSpellDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSpellDialog() override = default;
+public:
+ virtual void InvalidateDialog() = 0;
+ virtual std::shared_ptr<SfxDialogController> GetController() = 0;
+ virtual SfxBindings& GetBindings() = 0;
+};
+
+class AbstractTitleDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractTitleDialog() override = default;
+public:
+ virtual OUString GetTitle() const =0;
+};
+
+class AbstractGalleryIdDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractGalleryIdDialog() override = default;
+public:
+ virtual sal_uInt32 GetId() const =0;
+};
+
+class AbstractURLDlg :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractURLDlg() override = default;
+public:
+ virtual OUString GetURL() const = 0;
+ virtual OUString GetAltText() const = 0;
+ virtual OUString GetDesc() const = 0;
+ virtual OUString GetTarget() const = 0;
+ virtual OUString GetName() const = 0;
+};
+
+class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxSearchSimilarityDialog() override = default;
+public:
+ virtual sal_uInt16 GetOther() =0 ;
+ virtual sal_uInt16 GetShorter() =0 ;
+ virtual sal_uInt16 GetLonger() =0 ;
+ virtual bool IsRelaxed() =0 ;
+};
+
+class AbstractSvxJSearchOptionsDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxJSearchOptionsDialog() override = default;
+public:
+ virtual TransliterationFlags GetTransliterationFlags() const = 0;
+};
+
+class AbstractFmInputRecordNoDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractFmInputRecordNoDialog() override = default;
+public:
+ virtual void SetValue(tools::Long dNew) = 0;
+ virtual tools::Long GetValue() const = 0;
+};
+
+class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxNewDictionaryDialog() override = default;
+public:
+ virtual css::uno::Reference< css::linguistic2::XDictionary > GetNewDictionary() = 0;
+};
+
+class AbstractSvxNameDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxNameDialog() override = default;
+public:
+ virtual void GetName( OUString& rName ) = 0;
+ virtual void SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately = false ) = 0;
+ virtual void SetCheckNameTooltipHdl( const Link<AbstractSvxNameDialog&,OUString>& rLink ) = 0;
+ virtual void SetEditHelpId(const OString&) = 0;
+ virtual void SetHelpId( const OString& ) = 0;
+ virtual void SetText( const OUString& rStr ) = 0;
+};
+
+class AbstractSvxObjectNameDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxObjectNameDialog() override = default;
+public:
+ virtual void GetName(OUString& rName) = 0;
+ virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) = 0;
+};
+
+class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxObjectTitleDescDialog() override = default;
+public:
+ virtual void GetTitle(OUString& rTitle) = 0;
+ virtual void GetDescription(OUString& rDescription) = 0;
+};
+
+/// Abstract class provides the get information from the numbering and position dialog.
+class AbstractSvxBulletAndPositionDlg :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxBulletAndPositionDlg() override = default;
+public:
+ virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* pSet) const = 0 ;
+ virtual bool IsApplyToMaster() = 0;
+ virtual bool IsSlideScope() = 0;
+};
+
+class AbstractSvxMultiPathDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxMultiPathDialog() override = default;
+public:
+ virtual OUString GetPath() const = 0;
+ virtual void SetPath( const OUString& rPath ) = 0;
+ virtual void SetTitle( const OUString& rNewTitle ) = 0;
+};
+
+class AbstractSvxHpLinkDlg : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxHpLinkDlg() override = default;
+public:
+ virtual std::shared_ptr<SfxDialogController> GetController() = 0;
+ virtual bool QueryClose() = 0;
+};
+
+struct FmFoundRecordInformation;
+class AbstractFmSearchDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractFmSearchDialog() override = default;
+public:
+ virtual void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) = 0;
+ virtual void SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk)=0;
+ virtual void SetActiveField(const OUString& strField)=0;
+};
+
+class AbstractGraphicFilterDialog :public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractGraphicFilterDialog() override = default;
+public:
+ virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
+};
+
+class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog
+{
+protected:
+ virtual ~AbstractSvxAreaTabDialog() override = default;
+};
+
+struct SvxSwFrameValidation;
+class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog
+{
+protected:
+ virtual ~AbstractSvxTransformTabDialog() override = default;
+public:
+ virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0;
+};
+
+class AbstractSvxCaptionDialog : public SfxAbstractTabDialog
+{
+protected:
+ virtual ~AbstractSvxCaptionDialog() override = default;
+public:
+ virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0;
+};
+
+class AbstractSvxPostItDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSvxPostItDialog() override = default;
+public:
+ virtual void SetText( const OUString& rStr ) = 0;
+ virtual const SfxItemSet* GetOutputItemSet() const = 0;
+ virtual void SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) = 0;
+ virtual void SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) = 0;
+ virtual void EnableTravel(bool bNext, bool bPrev) = 0;
+ virtual OUString GetNote() = 0;
+ virtual void SetNote(const OUString& rTxt) = 0;
+ virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) = 0;
+ virtual void DontChangeAuthor() = 0;
+ virtual void HideAuthor() = 0;
+ virtual std::shared_ptr<weld::Dialog> GetDialog() = 0;
+};
+
+class SvxAbstractSplitTableDialog : public VclAbstractDialog
+{
+protected:
+ virtual ~SvxAbstractSplitTableDialog() override = default;
+public:
+ virtual bool IsHorizontal() const = 0;
+ virtual bool IsProportional() const = 0;
+ virtual tools::Long GetCount() const = 0;
+ virtual void SetSplitVerticalByDefault() = 0;
+};
+
+class SvxAbstractNewTableDialog
+{
+protected:
+ virtual ~SvxAbstractNewTableDialog() = default;
+public:
+ virtual sal_Int32 getRows() const = 0;
+ virtual sal_Int32 getColumns() const = 0;
+ virtual std::shared_ptr<weld::DialogController> getDialogController() = 0;
+};
+
+class SvxAbstractInsRowColDlg : public VclAbstractDialog
+{
+protected:
+ virtual ~SvxAbstractInsRowColDlg() override = default;
+public:
+ virtual bool isInsertBefore() const = 0;
+ virtual sal_uInt16 getInsertCount() const = 0;
+};
+
+class SVXCORE_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory, public EditAbstractDialogFactory
+{
+public:
+ static SvxAbstractDialogFactory* Create();
+
+ virtual ~SvxAbstractDialogFactory() override;
+
+ virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( weld::Window* pParent,
+ const SfxItemSet* pAttrSet,
+ SdrView* pView ) = 0 ;
+
+ virtual VclPtr<AbstractSvxCaptionDialog> CreateCaptionDialog(weld::Window* pParent,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
+
+ virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog(weld::Window* pParent) = 0;
+
+ virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) = 0;
+
+ virtual VclPtr<AbstractSpellDialog> CreateSvxSpellDialog(weld::Window* pParent,
+ SfxBindings* pBindings,
+ svx::SpellDialogChildWindow* pSpellChildWindow )=0;
+
+ virtual VclPtr<VclAbstractDialog> CreateActualizeProgressDialog(weld::Widget* pParent,
+ GalleryTheme* pThm) = 0;
+ virtual VclPtr<AbstractTitleDialog> CreateTitleDialog(weld::Widget* pParent,
+ const OUString& rOldText) = 0;
+ virtual VclPtr<AbstractGalleryIdDialog> CreateGalleryIdDialog(weld::Widget* pParent,
+ GalleryTheme* pThm) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateGalleryThemePropertiesDialog(weld::Widget* pParent,
+ ExchangeData* pData,
+ SfxItemSet* pItemSet ) = 0;
+
+ virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Widget* pParent,
+ const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
+ const OUString& rTarget, const OUString& rName,
+ TargetList& rTargetList ) = 0;
+
+ virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(weld::Window* pParent, const SfxItemSet& rSet) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateSvxSearchAttributeDialog(weld::Window* pParent,
+ SearchAttrItemList& rLst,
+ const WhichRangesContainer& pWhRanges)=0;
+ virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( weld::Window* pParent,
+ bool bRelax,
+ sal_uInt16 nOther,
+ sal_uInt16 nShorter,
+ sal_uInt16 nLonger ) = 0;
+ // add for SvxBorderBackgroundDlg
+ virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg(
+ weld::Window* pParent,
+ const SfxItemSet& rCoreSet,
+ bool bEnableDrawingLayerFillStyles) = 0;
+
+ virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
+ virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pSdrView,
+ bool bSizeTabPage) = 0;
+ virtual VclPtr<AbstractSvxJSearchOptionsDialog> CreateSvxJSearchOptionsDialog(weld::Window* pParent,
+ const SfxItemSet& rOptionsSet,
+ TransliterationFlags nInitialFlags) = 0;
+ virtual VclPtr<AbstractFmInputRecordNoDialog> CreateFmInputRecordNoDialog(weld::Window* pParent) = 0;
+ virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) = 0;
+ virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent,
+ const OUString& rName, const OUString& rDesc ) = 0;
+
+ // #i68101#
+ virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0;
+ virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
+ virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) = 0 ;
+ virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) = 0 ;
+ virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent) = 0;
+ virtual VclPtr<AbstractFmSearchDialog> CreateFmSearchDialog(weld::Window* pParent,
+ const OUString& strInitialText,
+ const ::std::vector< OUString >& _rContexts,
+ sal_Int16 nInitialContext,
+ const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier)=0;
+ virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterEmboss(weld::Window* pParent,
+ const Graphic& rGraphic)=0;
+ virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterPoster(weld::Window* pParent,
+ const Graphic& rGraphic)=0;
+ virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSepia(weld::Window* pParent,
+ const Graphic& rGraphic)=0;
+ virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSmooth(weld::Window* pParent,
+ const Graphic& rGraphic,
+ double nRadius)=0;
+ virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSolarize(weld::Window* pParent,
+ const Graphic& rGraphic)=0;
+ virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterMosaic(weld::Window* pParent,
+ const Graphic& rGraphic)=0;
+ virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ SdrModel* pModel,
+ bool bShadow,
+ bool bSlideBackground) = 0 ;
+ virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
+ SdrModel* pModel,
+ const SdrObject* pObj,
+ bool bHasObj )=0;
+ virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( weld::Window* pParent,
+ const SfxItemSet& rAttr,
+ const SdrView* pView,
+ sal_uInt32 nResId )=0;
+ virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
+ const css::uno::Reference<css::frame::XFrame>& rFrame) = 0;
+ virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent, const SfxItemSet& rAttr,
+ const css::uno::Reference< css::frame::XFrame >& rFrame) = 0;
+ virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage) override = 0;
+
+ virtual DialogGetRanges GetDialogGetRangesFunc() = 0;
+
+ virtual VclPtr<AbstractScriptSelectorDialog> CreateScriptSelectorDialog(weld::Window* pParent,
+ const css::uno::Reference< css::frame::XFrame >& rxFrame) override = 0;
+
+ virtual void ShowAsyncScriptErrorDialog(weld::Window* pParent, const css::uno::Any& rException) override = 0;
+
+ virtual VclPtr<VclAbstractDialog> CreateSvxMacroAssignDlg(
+ weld::Window* _pParent,
+ const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
+ const bool _bUnoDialogMode,
+ const css::uno::Reference< css::container::XNameReplace >& _rxEvents,
+ const sal_uInt16 _nInitiallySelectedEvent
+ ) = 0;
+
+ virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel )=0;
+
+ virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical) = 0;
+
+ virtual std::shared_ptr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) = 0;
+
+ virtual VclPtr<SvxAbstractInsRowColDlg> CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId) = 0;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxdllapi.h b/include/svx/svxdllapi.h
new file mode 100644
index 000000000..f799f3d50
--- /dev/null
+++ b/include/svx/svxdllapi.h
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SVXDLLAPI_H
+#define INCLUDED_SVX_SVXDLLAPI_H
+
+#include <sal/types.h>
+
+#if defined(SVX_DLLIMPLEMENTATION)
+#define SVX_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SVX_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define SVX_DLLPRIVATE SAL_DLLPRIVATE
+
+#if defined(SVXCORE_DLLIMPLEMENTATION)
+#define SVXCORE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SVXCORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define SVXCORE_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif // INCLUDED_SVX_SVXDLLAPI_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxerr.hxx b/include/svx/svxerr.hxx
new file mode 100644
index 000000000..ecb98cd27
--- /dev/null
+++ b/include/svx/svxerr.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SVXERR_HXX
+#define INCLUDED_SVX_SVXERR_HXX
+
+#include <vcl/errcode.hxx>
+#include <svtools/ehdl.hxx>
+#include <svx/svxdllapi.h>
+
+#define ERRCODE_SVX_LINGU_LINGUNOTEXISTS ErrCode( ErrCodeArea::Svx, ErrCodeClass::NotExists, 3 )
+#define ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE ErrCode( ErrCodeArea::Svx, ErrCodeClass::Write, 6 )
+#define ERRCODE_SVX_GRAPHIC_NOTREADABLE ErrCode( ErrCodeArea::Svx, ErrCodeClass::Read, 7 )
+#define ERRCODE_SVX_LINGU_NOLANGUAGE ErrCode( ErrCodeArea::Svx, ErrCodeClass::NotExists, 9 )
+#define ERRCODE_SVX_MODIFIED_VBASIC_STORAGE ErrCode( WarningFlag::Yes, ErrCodeArea::Svx, ErrCodeClass::Write, 13 )
+#define ERRCODE_SVX_VBASIC_STORAGE_EXIST ErrCode( WarningFlag::Yes, ErrCodeArea::Svx, ErrCodeClass::Write, 14 )
+/** Error message: "Wrong password." */
+#define ERRCODE_SVX_WRONGPASS ErrCode( ErrCodeArea::Svx, ErrCodeClass::NONE, 15)
+/** Error message: "Read error. Unsupported encryption method." */
+#define ERRCODE_SVX_READ_FILTER_CRYPT ErrCode( ErrCodeArea::Svx, ErrCodeClass::Read, 16)
+/** Error message: "Read error. Passwort encrypted Powerpoint documents..." */
+#define ERRCODE_SVX_READ_FILTER_PPOINT ErrCode( ErrCodeArea::Svx, ErrCodeClass::Read, 17)
+/** Error message: "Warning. Passwort protection is not supported when..." */
+#define ERRCODE_SVX_EXPORT_FILTER_CRYPT ErrCode( WarningFlag::Yes, ErrCodeArea::Svx, ErrCodeClass::Export, 18)
+
+
+// both codes will be used twice : with ErrCodeClass::Read- and ErrCodeClass::Write-bits
+#define ERRCTX_SVX_LINGU_THESAURUS 1
+#define ERRCTX_SVX_LINGU_SPELLING 2
+#define ERRCTX_SVX_LINGU_HYPHENATION 3
+#define ERRCTX_SVX_LINGU_DICTIONARY 4
+#define ERRCTX_SVX_BACKGROUND 5
+#define ERRCTX_SVX_IMPORT_GRAPHIC 6
+
+class SVX_DLLPUBLIC SvxErrorHandler final : private SfxErrorHandler
+{
+public:
+ SvxErrorHandler();
+ static void ensure();
+};
+
+SVX_DLLPUBLIC extern const ErrMsgCode RID_SVXERRCODE[];
+SVX_DLLPUBLIC extern const ErrMsgCode RID_SVXERRCTX[];
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxgraphicitem.hxx b/include/svx/svxgraphicitem.hxx
new file mode 100644
index 000000000..78592f382
--- /dev/null
+++ b/include/svx/svxgraphicitem.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+
+#include <vcl/graph.hxx>
+
+class SVX_DLLPUBLIC SvxGraphicItem final : public SfxPoolItem
+{
+ Graphic aGraphic;
+
+public:
+ SvxGraphicItem( const Graphic& rGraphic);
+
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxGraphicItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ const Graphic& GetGraphic() const { return aGraphic; }
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
new file mode 100644
index 000000000..96122a66b
--- /dev/null
+++ b/include/svx/svxids.hrc
@@ -0,0 +1,1068 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SVXIDS_HRC
+#define INCLUDED_SVX_SVXIDS_HRC
+
+#include <svl/solar.hrc>
+#include <sfx2/sfxsids.hrc>
+#include <editeng/editids.hrc>
+#include <svl/typedwhich.hxx>
+
+class OfaPtrItem;
+class OfaXColorListItem;
+class SdrAngleItem;
+class SfxBoolItem;
+class SfxInt32Item;
+class SfxInt64Item;
+class SfxIntegerListItem;
+class SfxPointItem;
+class SfxRectangleItem;
+class SfxStringItem;
+class SfxUInt32Item;
+class SvxBitmapListItem;
+class SvxBoxInfoItem;
+class SvxBrushItem;
+class SvxChartColorTableItem;
+class SvxColorItem;
+class SvxColorListItem;
+class SvxColumnItem;
+class SvxDashListItem;
+class SvxDoubleItem;
+class SvxGradientListItem;
+class SvxGridItem;
+class SvxHatchListItem;
+class SvxLineEndListItem;
+class SvxLineItem;
+class SvxLongLRSpaceItem;
+class SvxLongULSpaceItem;
+class SvxNumberInfoItem;
+class SvxObjectItem;
+class SvxPageItem;
+class SvxPagePosSizeItem;
+class SvxPatternListItem;
+class SvxPostItAuthorItem;
+class SvxPostItDateItem;
+class SvxPostItIdItem;
+class SvxPostItTextItem;
+class SvxRulerItem;
+class SvxSetItem;
+class SvxSizeItem;
+class SvxSmartTagItem;
+class SvxViewLayoutItem;
+class SvxZoomSliderItem;
+class XFillGradientItem;
+
+// member IDs
+
+#define MID_INTER_LINESPACE 0x36
+#define MID_INTER_SPACE 0x37
+
+#define MID_LOWER 0x3d
+#define MID_RIGHT 0x46
+#define MID_UPPER 0x4b
+
+#define MID_HLINK_NAME 0x6f
+#define MID_HLINK_URL 0x70
+#define MID_HLINK_TARGET 0x71
+#define MID_HLINK_TYPE 0x72
+#define MID_HLINK_TEXT 0x73
+
+#define MID_VIEWLAYOUT_COLUMNS 0x77
+#define MID_VIEWLAYOUT_BOOKMODE 0x78
+
+#define MID_ZOOMSLIDER_CURRENTZOOM 0x79
+#define MID_ZOOMSLIDER_SNAPPINGPOINTS 0x7a
+#define MID_ZOOMSLIDER_MINZOOM 0x7b
+#define MID_ZOOMSLIDER_MAXZOOM 0x7c
+
+// function IDs
+#define FID_SVX_START (SID_LIB_START + 500)
+
+#define FID_SEARCH_ON (FID_SVX_START + 0)
+#define FID_SEARCH_OFF (FID_SVX_START + 1)
+#define FID_SEARCH_NOW (FID_SVX_START + 2)
+
+#define SID_CHARMAP TypedWhichId<SfxStringItem>(FID_SVX_START + 3)
+
+#define FID_SEARCH_SEARCHSET (FID_SVX_START + 4)
+#define FID_SEARCH_REPLACESET (FID_SVX_START + 5)
+
+// SFX IDs
+
+#define SID_POLY_MERGE (SID_SFX_START + 679)
+#define SID_POLY_SUBSTRACT (SID_SFX_START + 680)
+#define SID_POLY_INTERSECT (SID_SFX_START + 681)
+#define SID_DISTRIBUTE_DLG (SID_SFX_START + 683) // dialog replaced by dropdown
+#define SID_EQUALIZEWIDTH (SID_SFX_START + 684)
+#define SID_EQUALIZEHEIGHT (SID_SFX_START + 685)
+#define SID_DISTRIBUTE_HLEFT (SID_SFX_START + 686)
+#define SID_DISTRIBUTE_HCENTER (SID_SFX_START + 687)
+#define SID_DISTRIBUTE_HDISTANCE (SID_SFX_START + 688)
+#define SID_DISTRIBUTE_HRIGHT (SID_SFX_START + 689)
+#define SID_DISTRIBUTE_VTOP (SID_SFX_START + 690)
+#define SID_DISTRIBUTE_VCENTER (SID_SFX_START + 691)
+#define SID_DISTRIBUTE_VDISTANCE (SID_SFX_START + 692)
+#define SID_DISTRIBUTE_VBOTTOM (SID_SFX_START + 693)
+
+// StarBase IDs
+
+#define SID_SBA_BRW_UPDATE (SID_SBA_START+100) // data in fields
+#define SID_SBA_BRW_INSERT (SID_SBA_START+101) // data in text
+#define SID_SBA_BRW_MERGE (SID_SBA_START+102) // form letter
+
+// SD IDs
+
+#define SID_RULER (SID_SD_START+40)
+#define SID_BEZIER_CONVERT (SID_SD_START+65)
+#define SID_BEZIER_ELIMINATE_POINTS (SID_SD_START+30)
+#define SID_BEZIER_EDGE (SID_SD_START+66)
+#define SID_BEZIER_SYMMTR (SID_SD_START+67)
+#define SID_TEXTEDIT (SID_SD_START+76)
+#define SID_ENTER_GROUP (SID_SD_START+96)
+#define SID_LEAVE_GROUP (SID_SD_START+97)
+#define SID_SIZE_PAGE_WIDTH (SID_SD_START+98)
+#define SID_INSERT_MATH (SID_SD_START+106)
+#define SID_SIZE_VISAREA (SID_SD_START+114)
+#define SID_ATTR_SYMBOLTYPE TypedWhichId<SfxInt32Item>(SID_SD_START+115) // used by Chart and SvxLineTabPage
+#define SID_ATTR_SYMBOLSIZE TypedWhichId<SvxSizeItem>(SID_SD_START+116)
+#define SID_HELPLINES_MOVE (SID_SD_START+153)
+#define SID_GRID_USE (SID_SD_START+154)
+#define ID_VAL_MOUSESTART_X (SID_SD_START+200)
+#define ID_VAL_MOUSESTART_Y (SID_SD_START+201)
+ // free
+#define ID_VAL_MOUSEEND_X (SID_SD_START+204)
+#define ID_VAL_MOUSEEND_Y (SID_SD_START+205)
+#define ID_VAL_AXIS_X (SID_SD_START+206)
+#define ID_VAL_AXIS_Y (SID_SD_START+207)
+#define ID_VAL_ANGLESTART (SID_SD_START+208)
+#define ID_VAL_ANGLEEND (SID_SD_START+209)
+#define ID_VAL_CENTER_X (SID_SD_START+210)
+#define ID_VAL_CENTER_Y (SID_SD_START+211)
+#define ID_VAL_STYLE (SID_SD_START+240)
+#define ID_VAL_DOTS (SID_SD_START+241)
+#define ID_VAL_DOTLEN (SID_SD_START+242)
+#define ID_VAL_DASHES (SID_SD_START+243)
+#define ID_VAL_DASHLEN (SID_SD_START+244)
+#define ID_VAL_DISTANCE (SID_SD_START+245)
+#define ID_VAL_INDEX (SID_SD_START+246)
+#define SID_BEZIERTO (SID_SD_START+252)
+#define SID_DASH (SID_SD_START+267)
+#define SID_TEXT_FITTOSIZE_VERTICAL (SID_SD_START+286)
+#define SID_GRID_VISIBLE (SID_SD_START+322)
+#define ID_VAL_USEFIRSTROWSTYLE TypedWhichId<SfxBoolItem>(SID_SD_START+323)
+#define ID_VAL_USELASTROWSTYLE TypedWhichId<SfxBoolItem>(SID_SD_START+324)
+#define ID_VAL_USEBANDINGROWSTYLE TypedWhichId<SfxBoolItem>(SID_SD_START+325)
+#define ID_VAL_USEFIRSTCOLUMNSTYLE TypedWhichId<SfxBoolItem>(SID_SD_START+326)
+#define ID_VAL_USELASTCOLUMNSTYLE TypedWhichId<SfxBoolItem>(SID_SD_START+327)
+#define ID_VAL_USEBANDINGCOLUMNSTYLE TypedWhichId<SfxBoolItem>(SID_SD_START+328)
+
+// Writer IDs
+
+#define FN_EDIT (SID_SW_START + 100) // 20100
+#define FN_NUM_BULLET_OFF (FN_EDIT + 37) // numbering off
+#define FN_NUM_BULLET_ON (FN_EDIT + 38) // numbering with bullets on
+#define FN_NUM_NUMBERING_ON (FN_EDIT + 44) // numbering on
+#define FN_BUL_NUM_RULE_INDEX (FN_EDIT + 120) // achieving num rule index
+#define FN_NUM_NUM_RULE_INDEX (FN_EDIT + 121)
+#define FN_OUTLINE_RULE_INDEX (FN_EDIT + 122)
+
+#define FN_INSERT (SID_SW_START + 300) // 20300
+#define FN_DELETE_BOOKMARK (FN_INSERT + 1)
+#define FN_INSERT_BREAK (FN_INSERT + 3)
+#define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43) /* optional hyphen */
+#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hard space */
+#define FN_INSERT_NNBSP (FN_INSERT + 45) /* U+202F NARROW NO-BREAK SPACE (NNBSP) */
+#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* hyphen without break*/
+
+//!! be aware to not overwrite something that is used in sw/inc/cmdid.h already !!
+#define FN_FORMAT (SID_SW_START + 400) // 20400
+#define FN_FORMAT_RESET (FN_FORMAT + 69)
+
+#define FN_EXTRA (SID_SW_START + 600) // 20600
+
+#define FN_SELECTION (SID_SW_START + 900) // 20900
+#define FN_END_OF_DOCUMENT (FN_SELECTION + 8)
+#define FN_START_DOC_DIRECT (FN_SELECTION + 78)
+#define FN_END_DOC_DIRECT (FN_SELECTION + 79)
+
+#define FN_PARAM (SID_SW_START + 1100)
+#define FN_PARAM_FILTER TypedWhichId<SfxStringItem>(FN_PARAM + 30)
+#define FN_PARAM_FIELD_CONTENT TypedWhichId<SfxStringItem>(FN_PARAM + 55)
+
+#define FN_PGPREVIEW (SID_SW_START + 1250)
+#define FN_SHOW_MULTIPLE_PAGES (FN_PGPREVIEW + 2)
+
+// Svx-Id's
+// When adding new entries here, note that other SID_SVX_START entries exist in
+// include/editeng/editids.hrc and include/sfx2/sfxsids.hrc so don't use the
+// same id for two different attributes
+
+// CAUTION! Range <1 .. 22> used by EditEngine (!)
+
+#define SID_ATTR_BORDER_INNER TypedWhichId<SvxBoxInfoItem>( SID_SVX_START + 23 )
+
+// CAUTION! Range <24 .. 49> used by EditEngine (!)
+
+#define SID_ATTR_PAGE TypedWhichId<SvxPageItem>( SID_SVX_START + 50 )
+#define SID_ATTR_PAGE_SIZE TypedWhichId<SvxSizeItem>( SID_SVX_START + 51 )
+#define SID_ATTR_PAGE_MAXSIZE TypedWhichId<SvxSizeItem>( SID_SVX_START + 52 )
+#define SID_ATTR_PAGE_ORIENTATION TypedWhichId<SvxPageItem>( SID_SVX_START + 53 )
+#define SID_ATTR_PAGE_PAPERBIN TypedWhichId<SvxPaperBinItem>( SID_SVX_START + 54 )
+// this is used both as a SfxBoolItem(sd/source/ui/func/fupage.cxx) and as a SfxStringItem(sw/source/uibase/utlui/uitool.cxx)
+#define SID_ATTR_PAGE_EXT1 ( SID_SVX_START + 55 )
+#define SID_ATTR_PAGE_EXT2 TypedWhichId<SfxBoolItem>( SID_SVX_START + 56 )
+#define SID_ATTR_PAGE_HEADERSET TypedWhichId<SvxSetItem>( SID_SVX_START + 57 )
+#define SID_ATTR_PAGE_FOOTERSET TypedWhichId<SvxSetItem>( SID_SVX_START + 58 )
+#define SID_ATTR_PAGE_ON TypedWhichId<SfxBoolItem>( SID_SVX_START + 59 )
+#define SID_ATTR_PAGE_DYNAMIC TypedWhichId<SfxBoolItem>( SID_SVX_START + 60 )
+#define SID_ATTR_PAGE_SHARED TypedWhichId<SfxBoolItem>( SID_SVX_START + 61 )
+#define SID_ATTR_PAGE_LRSPACE TypedWhichId<SvxLongLRSpaceItem>( SID_SVX_START + 62 )
+#define SID_ATTR_PAGE_ULSPACE TypedWhichId<SvxLongULSpaceItem>( SID_SVX_START + 63 )
+
+// CAUTION! Range <64 .. 68> used by EditEngine (!)
+
+#define SID_RULER_CHANGE_STATE ( SID_SVX_START + 78 )
+#define SID_RULER_NULL_OFFSET TypedWhichId<SfxPointItem>( SID_SVX_START + 79 )
+#define SID_RULER_BORDERS TypedWhichId<SvxColumnItem>( SID_SVX_START + 80 )
+#define SID_RULER_OBJECT TypedWhichId<SvxObjectItem>( SID_SVX_START + 81 )
+#define SID_RULER_PAGE_POS TypedWhichId<SvxPagePosSizeItem>( SID_SVX_START + 82 )
+#define SID_RULER_ACT_LINE_ONLY TypedWhichId<SfxBoolItem>( SID_SVX_START + 83 )
+#define SID_RULER_LR_MIN_MAX TypedWhichId<SfxUInt32Item>( SID_SVX_START + 84 )
+#define SID_ATTR_NUMBERFORMAT_VALUE TypedWhichId<SfxUInt32Item>( SID_SVX_START + 85 )
+#define SID_ATTR_NUMBERFORMAT_INFO TypedWhichId<SvxNumberInfoItem>( SID_SVX_START + 86 )
+#define SID_ATTR_TRANSFORM TypedWhichId<SfxInt32Item>( SID_SVX_START + 87 )
+#define SID_ATTR_TRANSFORM_POS_X TypedWhichId<SfxInt32Item>( SID_SVX_START + 88 )
+#define SID_ATTR_TRANSFORM_POS_Y TypedWhichId<SfxInt32Item>( SID_SVX_START + 89 )
+#define SID_ATTR_TRANSFORM_WIDTH TypedWhichId<SfxUInt32Item>( SID_SVX_START + 90 )
+#define SID_ATTR_TRANSFORM_HEIGHT TypedWhichId<SfxUInt32Item>( SID_SVX_START + 91 )
+#define SID_ATTR_TRANSFORM_SIZE_POINT TypedWhichId<SfxUInt16Item>( SID_SVX_START + 92 )
+#define SID_ATTR_TRANSFORM_ROT_X TypedWhichId<SfxInt32Item>( SID_SVX_START + 93 )
+#define SID_ATTR_TRANSFORM_ROT_Y TypedWhichId<SfxInt32Item>( SID_SVX_START + 94 )
+#define SID_ATTR_TRANSFORM_ANGLE TypedWhichId<SdrAngleItem>( SID_SVX_START + 95 )
+#define SID_ATTR_TRANSFORM_DELTA_ANGLE TypedWhichId<SdrAngleItem>( SID_SVX_START + 96 )
+// CAUTION! Range <96..100> used by SFX2 (!)
+#define SID_SIZE_ALL ( SID_SVX_START + 101 )
+#define SID_DRAW_LINE ( SID_SVX_START + 102 )
+#define SID_DRAW_XLINE ( SID_SVX_START + 103 )
+#define SID_DRAW_RECT ( SID_SVX_START + 104 )
+#define SID_DRAW_RECT_ROUND ( SID_SVX_START + 105 )
+#define SID_TABLE_CHANGE_CURRENT_BORDER_POSITION ( SID_SVX_START + 106 )
+#define SID_DRAW_ELLIPSE ( SID_SVX_START + 110 )
+#define SID_DRAW_PIE ( SID_SVX_START + 112 )
+#define SID_DRAW_ARC ( SID_SVX_START + 114 )
+#define SID_DRAW_CIRCLECUT ( SID_SVX_START + 115 )
+#define SID_DRAW_POLYGON ( SID_SVX_START + 117 )
+#define SID_DRAW_BEZIER_FILL ( SID_SVX_START + 118 )
+#define SID_BEZIER_INSERT ( SID_SVX_START + 119 )
+#define SID_BEZIER_DELETE ( SID_SVX_START + 120 )
+#define SID_BEZIER_MOVE ( SID_SVX_START + 121 )
+#define SID_BEZIER_CLOSE TypedWhichId<SfxBoolItem>( SID_SVX_START + 122 )
+#define SID_BEZIER_SMOOTH TypedWhichId<SfxBoolItem>( SID_SVX_START + 123 )
+#define SID_BEZIER_EDIT ( SID_SVX_START + 126 )
+#define SID_BEZIER_CUTLINE ( SID_SVX_START + 127 )
+#define SID_OBJECT_SELECT ( SID_SVX_START + 128 )
+#define SID_OBJECT_ROTATE TypedWhichId<SfxBoolItem>( SID_SVX_START + 129 )
+#define SID_OBJECT_ALIGN ( SID_SVX_START + 130 )
+#define SID_OBJECT_ALIGN_LEFT ( SID_SVX_START + 131 )
+#define SID_OBJECT_ALIGN_CENTER ( SID_SVX_START + 132 )
+#define SID_OBJECT_ALIGN_RIGHT ( SID_SVX_START + 133 )
+#define SID_OBJECT_ALIGN_UP ( SID_SVX_START + 134 )
+#define SID_OBJECT_ALIGN_MIDDLE ( SID_SVX_START + 135 )
+#define SID_OBJECT_ALIGN_DOWN ( SID_SVX_START + 136 )
+#define SID_INSERT_DIAGRAM ( SID_SVX_START + 140 )
+#define SID_INSERT_TABLE ( SID_SVX_START + 141 )
+#define SID_ATTRIBUTES_AREA ( SID_SVX_START + 142 )
+#define SID_ATTRIBUTES_LINE ( SID_SVX_START + 143 )
+#define SID_CHOOSE_CONTROLS ( SID_SVX_START + 144 )
+#define SID_INSERT_PUSHBUTTON ( SID_SVX_START + 146 )
+#define SID_INSERT_RADIOBUTTON ( SID_SVX_START + 147 )
+#define SID_INSERT_CHECKBOX ( SID_SVX_START + 148 )
+#define SID_OUTLINE_UP ( SID_SVX_START + 150 )
+#define SID_OUTLINE_DOWN ( SID_SVX_START + 151 )
+#define SID_OUTLINE_LEFT ( SID_SVX_START + 152 )
+#define SID_OUTLINE_RIGHT ( SID_SVX_START + 153 )
+#define SID_OUTLINE_FORMAT ( SID_SVX_START + 154 )
+#define SID_OUTLINE_COLLAPSE_ALL ( SID_SVX_START + 155 )
+#define SID_OUTLINE_BULLET ( SID_SVX_START + 156 )
+#define SID_PRESENTATION ( SID_SVX_START + 157 )
+#define SID_PRESENTATION_CURRENT_SLIDE ( SID_SVX_START + 158 )
+#define SID_REHEARSE_TIMINGS ( SID_SVX_START + 159 )
+//
+#define SID_HIDE_SLIDE ( SID_SVX_START + 161 )
+#define SID_ATTR_FILL_STYLE ( SID_SVX_START + 164 )
+#define SID_ATTR_FILL_COLOR ( SID_SVX_START + 165 )
+#define SID_ATTR_FILL_GRADIENT ( SID_SVX_START + 166 )
+#define SID_ATTR_FILL_HATCH ( SID_SVX_START + 167 )
+#define SID_ATTR_FILL_BITMAP ( SID_SVX_START + 168 )
+#define SID_ATTR_LINE_STYLE ( SID_SVX_START + 169 )
+#define SID_ATTR_LINE_DASH ( SID_SVX_START + 170 )
+#define SID_ATTR_LINE_WIDTH ( SID_SVX_START + 171 )
+#define SID_ATTR_LINE_COLOR ( SID_SVX_START + 172 )
+#define SID_ATTR_LINE_START ( SID_SVX_START + 173 )
+#define SID_ATTR_LINE_END ( SID_SVX_START + 174 )
+#define SID_ATTR_LINE_STARTWIDTH ( SID_SVX_START + 175 )
+#define SID_ATTR_LINE_ENDWIDTH ( SID_SVX_START + 176 )
+#define SID_ATTR_LINE_STARTCENTER ( SID_SVX_START + 177 )
+#define SID_ATTR_LINE_ENDCENTER ( SID_SVX_START + 178 )
+#define SID_COLOR_TABLE TypedWhichId<SvxColorListItem>( SID_SVX_START + 179 )
+#define SID_GRADIENT_LIST TypedWhichId<SvxGradientListItem>( SID_SVX_START + 180 )
+#define SID_HATCH_LIST TypedWhichId<SvxHatchListItem>( SID_SVX_START + 181 )
+#define SID_BITMAP_LIST TypedWhichId<SvxBitmapListItem>( SID_SVX_START + 182 )
+#define SID_PATTERN_LIST TypedWhichId<SvxPatternListItem>( SID_SVX_START + 183 )
+#define SID_DASH_LIST TypedWhichId<SvxDashListItem>( SID_SVX_START + 184 )
+#define SID_LINEEND_LIST TypedWhichId<SvxLineEndListItem>( SID_SVX_START + 185 )
+#define SID_BACKGROUND_COLOR TypedWhichId<SvxColorItem>( SID_SVX_START + 186 )
+#define SID_BACKGROUND_PATTERN ( SID_SVX_START + 187 )
+#define SID_ATTR_BORDER ( SID_SVX_START + 188 )
+#define SID_INSERT_FIXEDTEXT ( SID_SVX_START + 189 )
+#define SID_INSERT_GROUPBOX ( SID_SVX_START + 190 )
+#define SID_INSERT_EDIT ( SID_SVX_START + 191 )
+#define SID_INSERT_LISTBOX ( SID_SVX_START + 192 )
+#define SID_INSERT_COMBOBOX ( SID_SVX_START + 193 )
+#define SID_INSERT_SPINBUTTON ( SID_SVX_START + 194 )
+#define SID_INSERT_HSCROLLBAR ( SID_SVX_START + 195 )
+#define SID_INSERT_VSCROLLBAR ( SID_SVX_START + 196 )
+#define SID_INSERT_SELECT ( SID_SVX_START + 199 )
+#define SID_DIALOG_TESTMODE ( SID_SVX_START + 200 )
+#define SID_FRAME_LINESTYLE TypedWhichId<SvxLineItem>( SID_SVX_START + 201 )
+#define SID_FRAME_LINECOLOR TypedWhichId<SvxColorItem>( SID_SVX_START + 202 )
+#define SID_ATTR_LINE_WIDTH_ARG TypedWhichId<SvxDoubleItem>( SID_SVX_START + 203 )
+#define SID_FILL_GRADIENT_JSON TypedWhichId<SfxStringItem>( SID_SVX_START + 204 )
+#define SID_SEARCHDLG_SEARCHSTRINGS ( SID_SVX_START + 215 )
+#define SID_SEARCHDLG_REPLACESTRINGS ( SID_SVX_START + 216 )
+#define SID_ATTR_TABLE ( SID_SVX_START + 217 )
+#define SID_ATTR_TABLE_COLUMN TypedWhichId<SfxUInt16Item>( SID_SVX_START + 218 )
+#define SID_ATTR_TABLE_ROW TypedWhichId<SfxUInt16Item>( SID_SVX_START + 219 )
+#define SID_ATTR_COLUMNS TypedWhichId<SfxUInt16Item>( SID_SVX_START + 220 )
+#define SID_ATTR_INSERT TypedWhichId<SfxBoolItem>( SID_SVX_START + 221 )
+#define SID_ATTR_ZOOM_USER TypedWhichId<SfxUInt16Item>( SID_SVX_START + 222 )
+#define SID_ATTR_POSITION TypedWhichId<SfxPointItem>( SID_SVX_START + 223 )
+#define SID_ATTR_SIZE TypedWhichId<SvxSizeItem>( SID_SVX_START + 224 )
+#define SID_TABLE_CELL ( SID_SVX_START + 225 )
+#define SID_ATTR_ALIGN_MARGIN ( SID_SVX_START + 228 )
+#define SID_ATTR_ALIGN_STACKED ( SID_SVX_START + 229 )
+#define SID_ATTR_ALIGN_LINEBREAK ( SID_SVX_START + 230 )
+#define SID_OUTLINE_COLLAPSE ( SID_SVX_START + 231 )
+#define SID_OUTLINE_EXPAND_ALL ( SID_SVX_START + 232 )
+#define SID_OUTLINE_EXPAND ( SID_SVX_START + 233 )
+#define SID_OUTLINE_DELETEALL ( SID_SVX_START + 234 )
+#define SID_ATTR_TRANSFORM_PROTECT_POS TypedWhichId<SfxBoolItem>( SID_SVX_START + 236 )
+#define SID_ATTR_TRANSFORM_PROTECT_SIZE TypedWhichId<SfxBoolItem>( SID_SVX_START + 237 )
+#define SID_ATTR_TRANSFORM_AUTOSIZE ( SID_SVX_START + 238 ) // !!!
+#define SID_ATTR_TRANSFORM_INTERN TypedWhichId<SfxRectangleItem>( SID_SVX_START + 239 )
+#define SID_INSERT_FRAME ( SID_SVX_START + 240 )
+#define SID_INSERT_GRAPHIC TypedWhichId<SfxStringItem>( SID_SVX_START + 241 )
+#define SID_AUTOFORMAT TypedWhichId<SfxStringItem>( SID_SVX_START + 242 )
+#define SID_SPELL_DIALOG ( SID_SVX_START + 243 )
+#define SID_INSERT_DRAW ( SID_SVX_START + 244 )
+#define SID_THESAURUS ( SID_SVX_START + 245 )
+#define SID_SPELLCHECK_IGNORE ( SID_SVX_START + 246 )
+#define SID_SPELLCHECK_IGNORE_ALL ( SID_SVX_START + 247 )
+#define SID_SPELLCHECK_APPLY_SUGGESTION ( SID_SVX_START + 248 )
+#define SID_REGENERATE_DIAGRAM ( SID_SVX_START + 249 )
+#define SID_EDIT_DIAGRAM ( SID_SVX_START + 450 )
+
+// CAUTION! Range <250 .. 250> used by EditEngine (!)
+
+#define SID_DRAW_TEXT ( SID_SVX_START + 253 )
+#define SID_DRAW_CAPTION ( SID_SVX_START + 254 )
+#define SID_DRAW_SELECT ( SID_SVX_START + 255 )
+#define SID_FONTWORK ( SID_SVX_START + 256 )
+#define SID_FORMTEXT_STYLE ( SID_SVX_START + 257 )
+#define SID_FORMTEXT_ADJUST ( SID_SVX_START + 258 )
+#define SID_FORMTEXT_DISTANCE ( SID_SVX_START + 259 )
+#define SID_FORMTEXT_START ( SID_SVX_START + 260 )
+#define SID_FORMTEXT_MIRROR ( SID_SVX_START + 261 )
+#define SID_FORMTEXT_OUTLINE ( SID_SVX_START + 262 )
+#define SID_FORMTEXT_SHADOW ( SID_SVX_START + 263 )
+#define SID_FORMTEXT_SHDWCOLOR ( SID_SVX_START + 264 )
+#define SID_FORMTEXT_SHDWXVAL ( SID_SVX_START + 265 )
+#define SID_FORMTEXT_SHDWYVAL ( SID_SVX_START + 266 )
+#define SID_FORMTEXT_HIDEFORM ( SID_SVX_START + 268 )
+#define SID_GALLERY_ENABLE_ADDCOPY ( SID_SVX_START + 276 )
+#define SID_GALLERY_BG_POS ( SID_SVX_START + 278 )
+#define SID_GALLERY_FORMATS ( SID_SVX_START + 280 )
+#define SID_OBJECT_HELL ( SID_SVX_START + 282 )
+#define SID_OBJECT_HEAVEN ( SID_SVX_START + 283 )
+#define SID_ATTR_LONG_ULSPACE TypedWhichId<SvxLongULSpaceItem>( SID_SVX_START + 284 )
+#define SID_ATTR_LONG_LRSPACE TypedWhichId<SvxLongLRSpaceItem>( SID_SVX_START + 285 )
+#define SID_FRAME_TO_TOP ( SID_SVX_START + 286 )
+#define SID_FRAME_TO_BOTTOM ( SID_SVX_START + 287 )
+#define SID_SEARCH_SEARCHSET TypedWhichId<SvxSetItem>( SID_SVX_START + 292 )
+#define SID_SEARCH_REPLACESET TypedWhichId<SvxSetItem>( SID_SVX_START + 293 )
+#define SID_SET_SUPER_SCRIPT ( SID_SVX_START + 294 )
+#define SID_SET_SUB_SCRIPT ( SID_SVX_START + 295 )
+#define SID_CHAR_DLG ( SID_SVX_START + 296 )
+#define SID_PARA_DLG ( SID_SVX_START + 297 )
+#define SID_ATTR_GRID_OPTIONS TypedWhichId<SvxGridItem>( SID_SVX_START + 298 )
+#define SID_ATTR_FILL_SHADOW ( SID_SVX_START + 299 )
+
+// CAUTION! Range <300 .. 300> used by EditEngine (!)
+
+#define SID_ATTR_LINEEND_STYLE ( SID_SVX_START + 301 )
+#define SID_ATTR_TRANSFORM_SHEAR TypedWhichId<SdrAngleItem>( SID_SVX_START + 304 )
+#define SID_ATTR_TRANSFORM_SHEAR_X ( SID_SVX_START + 305 )
+#define SID_ATTR_TRANSFORM_SHEAR_Y ( SID_SVX_START + 306 )
+#define SID_ATTR_TRANSFORM_SHEAR_VERTICAL TypedWhichId<SfxBoolItem>( SID_SVX_START + 307 )
+#define SID_ATTR_TRANSFORM_RESIZE_REF_X ( SID_SVX_START + 308 )
+#define SID_ATTR_TRANSFORM_RESIZE_REF_Y ( SID_SVX_START + 309 )
+#define SID_ATTR_TRANSFORM_AUTOWIDTH TypedWhichId<SfxBoolItem>( SID_SVX_START + 310 )
+#define SID_ATTR_TRANSFORM_AUTOHEIGHT TypedWhichId<SfxBoolItem>( SID_SVX_START + 311 )
+#define SID_ATTR_TRANSFORM_HORI_RELATION TypedWhichId<SfxInt16Item>( SID_SVX_START + 312 )
+#define SID_ATTR_TRANSFORM_VERT_RELATION TypedWhichId<SfxInt16Item>( SID_SVX_START + 313 )
+#define SID_ATTR_TRANSFORM_HORI_ORIENT TypedWhichId<SfxInt16Item>( SID_SVX_START + 314 )
+#define SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT ( SID_SVX_START + 315 )
+#define SID_ATTR_TRANSFORM_IN_RTL_TEXT ( SID_SVX_START + 316 )
+#define SID_ATTR_TRANSFORM_HORI_MIRROR TypedWhichId<SfxBoolItem>( SID_SVX_START + 317 )
+#define SID_ATTR_TRANSFORM_ANCHOR TypedWhichId<SfxInt16Item>( SID_SVX_START + 318 )
+#define SID_ATTR_TRANSFORM_VERT_ORIENT TypedWhichId<SfxInt16Item>( SID_SVX_START + 319 )
+#define SID_ATTR_GLOW_RADIUS ( SID_SVX_START + 320 )
+#define SID_ATTR_GLOW_COLOR ( SID_SVX_START + 321 )
+#define SID_ATTR_GLOW_TRANSPARENCY ( SID_SVX_START + 322 )
+#define SID_ATTR_SOFTEDGE_RADIUS ( SID_SVX_START + 323 )
+#define SID_SCAN ( SID_SVX_START + 330 )
+#define SID_TWAIN_SELECT ( SID_SVX_START + 331 )
+#define SID_TWAIN_TRANSFER ( SID_SVX_START + 332 )
+#define SID_CONTOUR_DLG ( SID_SVX_START + 334 )
+#define SID_CONTOUR_EXEC ( SID_SVX_START + 335 )
+
+//#define SID_SIDEBAR ( SID_SVX_START + 336 ) -> sfxsids.hrc
+
+#define SID_ATTR_TEXTCOLUMNS_NUMBER ( SID_SVX_START + 340 )
+#define SID_ATTR_TEXTCOLUMNS_SPACING ( SID_SVX_START + 341 )
+
+#define SID_ATTR_COLOR_THEME_INDEX TypedWhichId<SfxInt16Item>( SID_SVX_START + 342 )
+#define SID_ATTR_COLOR_LUM_MOD TypedWhichId<SfxInt16Item>( SID_SVX_START + 343 )
+#define SID_ATTR_COLOR_LUM_OFF TypedWhichId<SfxInt16Item>( SID_SVX_START + 344 )
+
+#define SID_SB_CONNECTIONPOOLING ( SID_SVX_START + 348 )
+#define SID_SB_DBREGISTEROPTIONS ( SID_SVX_START + 349 )
+#define SID_BMPMASK ( SID_SVX_START + 350 )
+#define SID_BMPMASK_PIPETTE ( SID_SVX_START + 351 )
+#define SID_BMPMASK_EXEC ( SID_SVX_START + 353 )
+
+// CAUTION! Range <363 .. 363> used by EditEngine (!)
+
+#define SID_ATTR_TEXT_FITTOSIZE ( SID_SVX_START + 367 )
+#define SID_ATTR_BRUSH_ROW TypedWhichId<SvxBrushItem>( SID_SVX_START + 368 )
+#define SID_OPTFILTER_MSOFFICE ( SID_SVX_START + 369 )
+#define SID_IMAP ( SID_SVX_START + 371 )
+#define SID_IMAP_EXEC ( SID_SVX_START + 374 )
+#define SID_DRAW_RECT_NOFILL ( SID_SVX_START + 378 )
+#define SID_DRAW_RECT_ROUND_NOFILL ( SID_SVX_START + 379 )
+#define SID_DRAW_SQUARE ( SID_SVX_START + 380 )
+#define SID_DRAW_SQUARE_ROUND ( SID_SVX_START + 381 )
+#define SID_DRAW_SQUARE_NOFILL ( SID_SVX_START + 382 )
+#define SID_DRAW_SQUARE_ROUND_NOFILL ( SID_SVX_START + 383 )
+#define SID_DRAW_ELLIPSE_NOFILL ( SID_SVX_START + 384 )
+#define SID_DRAW_CIRCLE ( SID_SVX_START + 385 )
+#define SID_DRAW_CIRCLE_NOFILL ( SID_SVX_START + 386 )
+#define SID_DRAW_PIE_NOFILL ( SID_SVX_START + 387 )
+#define SID_DRAW_CIRCLEPIE ( SID_SVX_START + 388 )
+#define SID_DRAW_CIRCLEPIE_NOFILL ( SID_SVX_START + 389 )
+#define SID_DRAW_CIRCLEARC ( SID_SVX_START + 390 )
+#define SID_DRAW_CIRCLECUT_NOFILL ( SID_SVX_START + 391 )
+#define SID_DRAW_ELLIPSECUT ( SID_SVX_START + 392 )
+#define SID_DRAW_ELLIPSECUT_NOFILL ( SID_SVX_START + 393 )
+#define SID_DRAW_XPOLYGON ( SID_SVX_START + 394 )
+#define SID_DRAW_POLYGON_NOFILL ( SID_SVX_START + 395 )
+#define SID_DRAW_XPOLYGON_NOFILL ( SID_SVX_START + 396 )
+#define SID_DRAW_BEZIER_NOFILL ( SID_SVX_START + 397 )
+#define SID_DRAWTBX_TEXT ( SID_SVX_START + 398 )
+#define SID_DRAWTBX_RECTANGLES ( SID_SVX_START + 399 )
+#define SID_DRAWTBX_ELLIPSES ( SID_SVX_START + 400 )
+#define SID_DRAWTBX_LINES ( SID_SVX_START + 401 )
+#define SID_BACKGRND_DESTINATION TypedWhichId<SfxUInt16Item>( SID_SVX_START + 404 )
+#define SID_ATTR_FLASH ( SID_SVX_START + 406 )
+
+// CAUTION! Range <413 .. 413> used by EditEngine (!)
+
+#define SID_DRAWTBX_REDACTED_EXPORT ( SID_SVX_START + 606 )
+
+#define SID_ATTR_3D_START ( SID_SVX_START + 415 )
+#define SID_RULER_PROTECT SID_ATTR_3D_START
+#define SID_COLOR_CONTROL ( SID_SVX_START + 417 )
+
+#define SID_TABLE_INSERT_COL_BEFORE ( SID_SVX_START + 418 )
+#define SID_TABLE_INSERT_COL_AFTER ( SID_SVX_START + 419 )
+#define SID_TABLE_INSERT_ROW_BEFORE ( SID_SVX_START + 420 )
+#define SID_TABLE_INSERT_ROW_AFTER ( SID_SVX_START + 421 )
+
+#define SID_ATTR_3D_INTERN TypedWhichId<SfxUInt32Item>( SID_SVX_START + 422 )
+#define SID_PSZ_FUNCTION ( SID_SVX_START + 423 )
+
+// CAUTION! <424 > used by sfxids (!)
+#define SID_TABLE_INSERT_COL_DLG ( SID_SVX_START + 426 )
+#define SID_TABLE_INSERT_ROW_DLG ( SID_SVX_START + 427 )
+#define SID_TABLE_PARAM_INSERT_AFTER TypedWhichId<SfxBoolItem>( SID_SVX_START + 428 )
+
+#define SID_TABLEDESIGN ( SID_SVX_START + 429 )
+#define SID_GENERAL_OPTIONS ( SID_SVX_START + 432 )
+#define SID_SW_EDITOPTIONS ( SID_SVX_START + 433 )
+#define SID_SD_EDITOPTIONS ( SID_SVX_START + 434 )
+#define SID_SC_EDITOPTIONS ( SID_SVX_START + 435 )
+#define SID_SM_EDITOPTIONS ( SID_SVX_START + 436 )
+#define SID_SCH_EDITOPTIONS TypedWhichId<SvxChartColorTableItem>( SID_SVX_START + 437 )
+#define SID_SW_ONLINEOPTIONS ( SID_SVX_START + 439 )
+#define SID_GET_COLORLIST TypedWhichId<OfaXColorListItem>( SID_SVX_START + 441 )
+#define SID_OUTLINE_TO_IMPRESS ( SID_SVX_START + 443 )
+#define SID_SPELLCHECKER_CHANGED ( SID_SVX_START + 446 )
+#define SID_SD_GRAPHIC_OPTIONS ( SID_SVX_START + 447 )
+#define SID_SM_TP_PRINTOPTIONS ( SID_SVX_START + 448 )
+#define SID_SB_STARBASEOPTIONS ( SID_SVX_START + 450 )
+#define SID_SWREGISTER_COLLECTION TypedWhichId<SfxStringItem>( SID_SVX_START + 451 )
+#define SID_FILTER_DLG ( SID_SVX_START + 452 )
+#define SID_ATTR_BRUSH_TABLE TypedWhichId<SvxBrushItem>( SID_SVX_START + 453 )
+#define SID_GROUP ( SID_SVX_START + 454 )
+#define SID_UNGROUP ( SID_SVX_START + 455 )
+#define SID_SET_DEFAULT ( SID_SVX_START + 456 )
+
+// CAUTION! Range <457 .. 457> used by EditEngine (!)
+
+#define SID_REMOVE_HYPERLINK ( SID_SVX_START + 459 )
+#define SID_ATTR_ALIGN_INDENT ( SID_SVX_START + 460 )
+#define SID_DEC_INDENT ( SID_SVX_START + 461 )
+#define SID_INC_INDENT ( SID_SVX_START + 462 )
+#define SID_DRAW_FREELINE ( SID_SVX_START + 463 )
+#define SID_DRAW_FREELINE_NOFILL ( SID_SVX_START + 464 )
+#define SID_DRAW_TEXT_MARQUEE ( SID_SVX_START + 465 )
+#define SID_SWREGISTER_MODE TypedWhichId<SfxBoolItem>( SID_SVX_START + 467 )
+#define SID_GRFFILTER ( SID_SVX_START + 469 )
+#define SID_GRFFILTER_INVERT ( SID_SVX_START + 470 )
+#define SID_GRFFILTER_SMOOTH ( SID_SVX_START + 471 )
+#define SID_GRFFILTER_SHARPEN ( SID_SVX_START + 472 )
+#define SID_GRFFILTER_REMOVENOISE ( SID_SVX_START + 473 )
+#define SID_GRFFILTER_SOBEL ( SID_SVX_START + 474 )
+#define SID_GRFFILTER_MOSAIC ( SID_SVX_START + 475 )
+#define SID_GRFFILTER_EMBOSS ( SID_SVX_START + 476 )
+#define SID_GRFFILTER_POSTER ( SID_SVX_START + 477 )
+#define SID_GRFFILTER_POPART ( SID_SVX_START + 478 )
+#define SID_GRFFILTER_SEPIA ( SID_SVX_START + 479 )
+#define SID_GRFFILTER_SOLARIZE ( SID_SVX_START + 480 )
+#define SID_FIELD_GRABFOCUS ( SID_SVX_START + 567 )
+#define SID_ATTR_ALIGN_DEGREES ( SID_SVX_START + 577 )
+#define SID_ATTR_ALIGN_LOCKPOS ( SID_SVX_START + 578 )
+#define SID_ATTR_NUMBERFORMAT_ONE_AREA ( SID_SVX_START + 580 )
+#define SID_TABSTOP_ADD_OR_CHANGE ( SID_SVX_START + 581 )
+#define SID_TABSTOP_ATTR_INDEX ( SID_SVX_START + 582 )
+#define SID_TABSTOP_ATTR_POSITION ( SID_SVX_START + 583 )
+#define SID_TABSTOP_ATTR_REMOVE ( SID_SVX_START + 584 )
+
+// CAUTION! Range <587 .. 587> used by EditEngine (!)
+
+#define SID_PARAGRAPH_FIRST_LINE_INDENT TypedWhichId<SfxStringItem>( SID_SVX_START + 588 )
+#define SID_PARAGRAPH_LEFT_INDENT TypedWhichId<SfxStringItem>( SID_SVX_START + 589 )
+#define SID_PARAGRAPH_RIGHT_INDENT TypedWhichId<SfxStringItem>( SID_SVX_START + 590 )
+
+// CAUTION! Range <591 .. 591> used by EditEngine (!)
+
+#define SID_FMSLOTS_START ( SID_SVX_START + 592 )
+#define SID_FM_CONFIG ( SID_SVX_START + 593 )
+#define SID_FM_PUSHBUTTON ( SID_SVX_START + 594 )
+#define SID_FM_RADIOBUTTON ( SID_SVX_START + 595 )
+#define SID_FM_CHECKBOX ( SID_SVX_START + 596 )
+#define SID_FM_FIXEDTEXT ( SID_SVX_START + 597 )
+#define SID_FM_GROUPBOX ( SID_SVX_START + 598 )
+#define SID_FM_EDIT ( SID_SVX_START + 599 )
+#define SID_FM_LISTBOX ( SID_SVX_START + 600 )
+#define SID_FM_COMBOBOX ( SID_SVX_START + 601 )
+#define SID_FM_DBGRID ( SID_SVX_START + 603 )
+#define SID_FM_IMAGEBUTTON ( SID_SVX_START + 604 )
+#define SID_FM_FILECONTROL ( SID_SVX_START + 605 )
+//( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT
+#define SID_FM_NAVIGATIONBAR ( SID_SVX_START + 607 )
+//FREE
+//FREE
+#define SID_FM_DELETEROWS ( SID_SVX_START + 610 )
+//FREE
+//FREE
+#define SID_FM_CTL_PROPERTIES TypedWhichId<SfxBoolItem>( SID_SVX_START + 613 )
+#define SID_FM_PROPERTIES ( SID_SVX_START + 614 )
+#define SID_FM_TAB_DIALOG ( SID_SVX_START + 615 )
+#define SID_FM_RECORD_FIRST ( SID_SVX_START + 616 )
+#define SID_FM_RECORD_NEXT ( SID_SVX_START + 617 )
+#define SID_FM_RECORD_PREV ( SID_SVX_START + 618 )
+#define SID_FM_RECORD_LAST ( SID_SVX_START + 619 )
+#define SID_FM_RECORD_NEW ( SID_SVX_START + 620 )
+#define SID_FM_RECORD_DELETE ( SID_SVX_START + 621 )
+#define SID_FM_RECORD_ABSOLUTE ( SID_SVX_START + 622 )
+#define SID_FM_ADD_FIELD ( SID_SVX_START + 623 )
+#define SID_FM_RECORD_TEXT ( SID_SVX_START + 624 )
+#define SID_FM_RECORD_FROM_TEXT ( SID_SVX_START + 625 )
+#define SID_FM_RECORD_TOTAL ( SID_SVX_START + 626 )
+#define SID_FM_RECORD_SAVE ( SID_SVX_START + 627 )
+#define SID_FM_CREATE_CONTROL ( SID_SVX_START + 628 )
+#define SID_FM_DESIGN_MODE ( SID_SVX_START + 629 )
+#define SID_FM_RECORD_UNDO ( SID_SVX_START + 630 )
+#define SID_FM_CONTROL_IDENTIFIER ( SID_SVX_START + 631 )
+#define SID_FM_CONTROL_INVENTOR ( SID_SVX_START + 632 )
+#define SID_FM_SHOW_FMEXPLORER ( SID_SVX_START + 633 )
+#define SID_FM_FIELDS_CONTROL ( SID_SVX_START + 634 )
+#define SID_FM_SHOW_PROPERTIES ( SID_SVX_START + 635 )
+#define SID_FM_PROPERTY_CONTROL ( SID_SVX_START + 636 )
+#define SID_FM_FMEXPLORER_CONTROL ( SID_SVX_START + 637 )
+//FREE
+//FREE
+//FREE
+#define SID_3D_WIN ( SID_SVX_START + 644 )
+#define SID_3D_STATE ( SID_SVX_START + 645 )
+#define SID_3D_INIT ( SID_SVX_START + 646 )
+#define SID_3D_ASSIGN ( SID_SVX_START + 647 )
+#define SID_CONVERT_TO_3D ( SID_SVX_START + 648 )
+#define SID_CONVERT_TO_3D_LATHE_FAST ( SID_SVX_START + 649 )
+#define SID_ATTR_3D_END SID_CONVERT_TO_3D_LATHE_FAST
+#define SID_ATTR_NUMBERFORMAT_NOLANGUAGE TypedWhichId<SfxBoolItem>( SID_SVX_START + 700 )
+
+#define SID_MORE_FMSLOTS_START ( SID_SVX_START + 702 )
+#define SID_FM_SHOW_PROPERTY_BROWSER ( SID_SVX_START + 703 )
+#define SID_FM_DATEFIELD ( SID_SVX_START + 704 )
+#define SID_FM_TIMEFIELD ( SID_SVX_START + 705 )
+#define SID_FM_NUMERICFIELD ( SID_SVX_START + 706 )
+#define SID_FM_CURRENCYFIELD ( SID_SVX_START + 707 )
+#define SID_FM_PATTERNFIELD ( SID_SVX_START + 708 )
+#define SID_FM_OPEN_READONLY ( SID_SVX_START + 709 )
+#define SID_FM_IMAGECONTROL ( SID_SVX_START + 710 )
+#define SID_FM_REMOVE_FILTER_SORT ( SID_SVX_START + 711 )
+#define SID_FM_SORTUP ( SID_SVX_START + 712 )
+#define SID_FM_SORTDOWN ( SID_SVX_START + 713 )
+#define SID_FM_ORDERCRIT ( SID_SVX_START + 714 )
+#define SID_FM_FILTERCRIT ( SID_SVX_START + 715 )
+#define SID_FM_AUTOFILTER ( SID_SVX_START + 716 )
+#define SID_FM_NATIVESQL ( SID_SVX_START + 720 )
+#define SID_FM_EXECUTE ( SID_SVX_START + 721 )
+#define SID_SBA_QRY_EXECUTE SID_FM_EXECUTE
+#define SID_FM_ADDTABLE ( SID_SVX_START + 722 )
+#define SID_FM_FORM_FILTERED ( SID_SVX_START + 723 )
+#define SID_FM_REFRESH ( SID_SVX_START + 724 )
+#define SID_FM_SEARCH ( SID_SVX_START + 725 )
+#define SID_FM_LEAVE_CREATE ( SID_SVX_START + 726 ) // pop Formcontroller Button
+#define SID_FM_USE_WIZARDS ( SID_SVX_START + 727 )
+#define SID_FM_FORMATTEDFIELD ( SID_SVX_START + 728 )
+#define SID_FM_FILTER_START ( SID_SVX_START + 729 )
+#define SID_FM_FILTER_EXIT ( SID_SVX_START + 730 )
+#define SID_FM_FILTER_EXECUTE ( SID_SVX_START + 731 )
+#define SID_FM_FILTER_NAVIGATOR ( SID_SVX_START + 732 )
+#define SID_FM_CHANGECONTROLTYPE ( SID_SVX_START + 733 )
+#define SID_FM_CONVERTTO_EDIT ( SID_SVX_START + 734 )
+#define SID_FM_CONVERTTO_BUTTON ( SID_SVX_START + 735 )
+#define SID_FM_CONVERTTO_FIXEDTEXT ( SID_SVX_START + 736 )
+#define SID_FM_CONVERTTO_LISTBOX ( SID_SVX_START + 737 )
+#define SID_FM_CONVERTTO_CHECKBOX ( SID_SVX_START + 738 )
+#define SID_FM_CONVERTTO_RADIOBUTTON ( SID_SVX_START + 739 )
+#define SID_FM_CONVERTTO_GROUPBOX ( SID_SVX_START + 740 )
+#define SID_FM_CONVERTTO_COMBOBOX ( SID_SVX_START + 741 )
+#define SID_FM_CONVERTTO_IMAGEBUTTON ( SID_SVX_START + 743 )
+#define SID_FM_CONVERTTO_FILECONTROL ( SID_SVX_START + 744 )
+#define SID_FM_CONVERTTO_DATE ( SID_SVX_START + 745 )
+#define SID_FM_CONVERTTO_TIME ( SID_SVX_START + 746 )
+#define SID_FM_CONVERTTO_NUMERIC ( SID_SVX_START + 747 )
+#define SID_FM_CONVERTTO_CURRENCY ( SID_SVX_START + 748 )
+#define SID_FM_CONVERTTO_PATTERN ( SID_SVX_START + 749 )
+#define SID_FM_CONVERTTO_IMAGECONTROL ( SID_SVX_START + 750 )
+#define SID_FM_CONVERTTO_FORMATTED ( SID_SVX_START + 751 )
+#define SID_FM_FILTER_NAVIGATOR_CONTROL ( SID_SVX_START + 752 )
+#define SID_INSERT_GRIDCONTROL ( SID_SVX_START + 753 )
+#define SID_PARAGRAPH_CHANGE_STATE ( SID_SVX_START + 754 )
+
+#define SID_ATTR_SHADOW_BLUR ( SID_SVX_START + 755 )
+
+//FREE
+//FREE
+//FREE
+//FREE
+//FREE
+#define SID_FM_VIEW_AS_GRID ( SID_SVX_START + 761 )
+#define SID_FM_AUTOCONTROLFOCUS ( SID_SVX_START + 763 )
+#define SID_DSBROWSER_EXPLORER ( SID_SVX_START + 764 )
+#define SID_FM_CREATE_FIELDCONTROL ( SID_SVX_START + 765 )
+#define SID_FM_DATACCESS_DESCRIPTOR ( SID_SVX_START + 766 )
+#define SID_FM_TOGGLECONTROLFOCUS ( SID_SVX_START + 767 )
+#define SID_FM_SCROLLBAR ( SID_SVX_START + 768 )
+#define SID_FM_SPINBUTTON ( SID_SVX_START + 769 )
+#define SID_FM_CONVERTTO_SCROLLBAR ( SID_SVX_START + 770 )
+#define SID_FM_CONVERTTO_SPINBUTTON ( SID_SVX_START + 771 )
+#define SID_FM_CONVERTTO_NAVIGATIONBAR ( SID_SVX_START + 772 )
+#define SID_FM_SHOW_DATANAVIGATOR ( SID_SVX_START + 773 )
+#define SID_FM_DATANAVIGATOR_CONTROL ( SID_SVX_START + 774 )
+#define SID_FM_REFRESH_FORM_CONTROL ( SID_SVX_START + 775 )
+#define SID_REFRESH_VIEW ( SID_SVX_START + 776 )
+
+// CAUTION! Range <855 .. 855> used by EditEngine (!)
+
+#define SID_PARAM_NUM_PRESET TypedWhichId<SfxBoolItem>( SID_SVX_START + 856 )
+#define SID_PARAM_CUR_NUM_LEVEL TypedWhichId<SfxUInt16Item>( SID_SVX_START + 859 )
+#define SID_CREATE_SW_DRAWVIEW ( SID_SVX_START + 860 )
+#define SID_ATTR_GRAF_LUMINANCE ( SID_SVX_START + 863 )
+#define SID_ATTR_GRAF_CONTRAST ( SID_SVX_START + 864 )
+#define SID_ATTR_GRAF_RED ( SID_SVX_START + 865 )
+#define SID_ATTR_GRAF_GREEN ( SID_SVX_START + 866 )
+#define SID_ATTR_GRAF_BLUE ( SID_SVX_START + 867 )
+#define SID_ATTR_GRAF_GAMMA ( SID_SVX_START + 868 )
+#define SID_ATTR_GRAF_TRANSPARENCE TypedWhichId<SfxUInt16Item>( SID_SVX_START + 869 )
+#define SID_ATTR_GRAF_INVERT ( SID_SVX_START + 870 )
+#define SID_ATTR_GRAF_MODE TypedWhichId<SfxUInt16Item>( SID_SVX_START + 871 )
+
+// CAUTION! Range <877 .. 877> used by EditEngine (!)
+
+#define SID_ATTR_GRAF_KEEP_ZOOM TypedWhichId<SfxBoolItem>( SID_SVX_START + 882 )
+#define SID_ATTR_GRAF_CROP ( SID_SVX_START + 883 )
+#define SID_ATTR_GRAF_FRMSIZE TypedWhichId<SvxSizeItem>( SID_SVX_START + 884 )
+#define SID_ATTR_GRAF_FRMSIZE_PERCENT TypedWhichId<SvxSizeItem>( SID_SVX_START + 885 )
+#define SID_ATTR_GRAF_GRAPHIC TypedWhichId<SvxBrushItem>( SID_SVX_START + 886 )
+#define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_VERTICAL
+
+// CAUTION! Range <887 .. 903> used by EditEngine (!)
+
+// CAUTION! Range <905 .. 905> used by EditEngine (!)
+
+#define SID_DRAW_CAPTION_VERTICAL ( SID_SVX_START + 906 )
+#define SID_TEXTDIRECTION_LEFT_TO_RIGHT ( SID_SVX_START + 907 )
+#define SID_TEXTDIRECTION_TOP_TO_BOTTOM ( SID_SVX_START + 908 )
+
+// CAUTION! Range <910 .. 911> used by EditEngine (!)
+
+#define SID_TRANSLITERATE_UPPER ( SID_SVX_START + 912 )
+#define SID_TRANSLITERATE_LOWER ( SID_SVX_START + 913 )
+#define SID_TRANSLITERATE_HALFWIDTH ( SID_SVX_START + 914 )
+#define SID_TRANSLITERATE_FULLWIDTH ( SID_SVX_START + 915 )
+#define SID_TRANSLITERATE_HIRAGANA ( SID_SVX_START + 916 )
+#define SID_TRANSLITERATE_KATAKANA ( SID_SVX_START + 917 )
+
+// CAUTION! Range <919 .. 920> used by EditEngine (!)
+
+#define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 )
+#define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 )
+#define SID_GETREDOSTRINGS ( SID_SVX_START + 924 )
+
+// CAUTION! Range <925 .. 925> used by EditEngine (!)
+
+#define SID_INSERT_IMAGECONTROL ( SID_SVX_START + 926 )
+#define SID_INSERT_PROGRESSBAR ( SID_SVX_START + 927 )
+#define SID_INSERT_HFIXEDLINE ( SID_SVX_START + 928 )
+#define SID_INSERT_VFIXEDLINE ( SID_SVX_START + 929 )
+#define SID_READONLY_MODE ( SID_SVX_START + 930 )
+#define SID_ATTR_ALIGN_HYPHENATION ( SID_SVX_START + 931 )
+#define SID_ATTR_NUMBERFORMAT_SOURCE TypedWhichId<SfxBoolItem>( SID_SVX_START + 932 )
+
+#define SID_RULER_BORDER_DISTANCE ( SID_SVX_START + 935 )
+#define SID_INSERT_DATEFIELD ( SID_SVX_START + 936 )
+#define SID_INSERT_TIMEFIELD ( SID_SVX_START + 937 )
+#define SID_INSERT_NUMERICFIELD ( SID_SVX_START + 938 )
+#define SID_INSERT_CURRENCYFIELD ( SID_SVX_START + 939 )
+#define SID_INSERT_FORMATTEDFIELD ( SID_SVX_START + 940 )
+#define SID_INSERT_PATTERNFIELD ( SID_SVX_START + 941 )
+#define SID_INSERT_FILECONTROL ( SID_SVX_START + 942 )
+#define SID_SHOW_PROPERTYBROWSER ( SID_SVX_START + 943 )
+
+// CAUTION! Range <944 .. 945> used by EditEngine (!)
+
+#define SID_ATTR_TABSTOP_VERTICAL ( SID_SVX_START + 946 )
+
+// CAUTION! Range <947 .. 947> used by EditEngine (!)
+
+#define SID_RULER_BORDERS_VERTICAL ( SID_SVX_START + 948 )
+#define SID_ATTR_ALIGN_ASIANVERTICAL ( SID_SVX_START + 949 )
+
+// CAUTION! Range <950 .. 951> used by EditEngine (!)
+
+#define SID_RULER_TEXT_RIGHT_TO_LEFT ( SID_SVX_START + 952 )
+#define SID_ATTR_HDFT_DYNAMIC_SPACING ( SID_SVX_START + 953 )
+#define SID_ATTR_NUMBERFORMAT_ADD_AUTO TypedWhichId<SfxBoolItem>( SID_SVX_START + 954 )
+#define SID_OPEN_HYPERLINK ( SID_SVX_START + 955 )
+#define SID_CTLFONT_STATE ( SID_SVX_START + 956 )
+#define SID_VERTICALTEXT_STATE ( SID_SVX_START + 957 )
+#define SID_OPEN_XML_FILTERSETTINGS ( SID_SVX_START + 958 )
+#define SID_HANGUL_HANJA_CONVERSION ( SID_SVX_START + 959 )
+#define SID_EXTRUSION_TOGGLE ( SID_SVX_START + 960 )
+#define SID_EXTRUSION_TILT_DOWN ( SID_SVX_START + 961 )
+#define SID_EXTRUSION_TILT_UP ( SID_SVX_START + 962 )
+#define SID_EXTRUSION_TILT_LEFT ( SID_SVX_START + 963 )
+#define SID_EXTRUSION_TILT_RIGHT ( SID_SVX_START + 964 )
+#define SID_EXTRUSION_DEPTH_FLOATER ( SID_SVX_START + 965 )
+#define SID_EXTRUSION_DIRECTION_FLOATER ( SID_SVX_START + 966 )
+#define SID_EXTRUSION_LIGHTING_FLOATER ( SID_SVX_START + 967 )
+#define SID_EXTRUSION_SURFACE_FLOATER ( SID_SVX_START + 968 )
+#define SID_EXTRUSION_3D_COLOR ( SID_SVX_START + 969 )
+#define SID_EXTRUSION_DEPTH TypedWhichId<SvxDoubleItem>( SID_SVX_START + 970 )
+#define SID_EXTRUSION_DIRECTION ( SID_SVX_START + 971 )
+#define SID_EXTRUSION_PROJECTION ( SID_SVX_START + 972 )
+#define SID_EXTRUSION_LIGHTING_DIRECTION ( SID_SVX_START + 973 )
+#define SID_EXTRUSION_LIGHTING_INTENSITY ( SID_SVX_START + 974 )
+#define SID_EXTRUSION_SURFACE ( SID_SVX_START + 975 )
+#define SID_EXTRUSION_DEPTH_DIALOG ( SID_SVX_START + 976 )
+#define SID_FONTWORK_GALLERY_FLOATER ( SID_SVX_START + 977 )
+#define SID_EDIT_HYPERLINK ( SID_SVX_START + 978 )
+#define SID_FONTWORK_SHAPE_TYPE ( SID_SVX_START + 979 )
+#define SID_FONTWORK_SAME_LETTER_HEIGHTS ( SID_SVX_START + 980 )
+#define SID_FONTWORK_ALIGNMENT_FLOATER ( SID_SVX_START + 981 )
+#define SID_FONTWORK_CHARACTER_SPACING_FLOATER ( SID_SVX_START + 982 )
+#define SID_FONTWORK_SHAPE ( SID_SVX_START + 983 )
+#define SID_FONTWORK_ALIGNMENT ( SID_SVX_START + 984 )
+#define SID_FONTWORK_CHARACTER_SPACING ( SID_SVX_START + 985 )
+#define SID_FONTWORK_KERN_CHARACTER_PAIRS ( SID_SVX_START + 986 )
+#define SID_DRAW_FONTWORK ( SID_SVX_START + 987 )
+#define SID_DRAW_FONTWORK_VERTICAL ( SID_SVX_START + 988 )
+
+// CAUTION! Range <989 .. 989> used by EditEngine (!)
+
+#define SID_ATTR_BORDER_CONNECT ( SID_SVX_START + 990 )
+#define SID_SW_FOLLOW_TEXT_FLOW ( SID_SVX_START + 991 ) /* #i18732# - slot-id for new option IsFollowingTextFlow' */
+#define SID_RULER_ROWS ( SID_SVX_START + 992 )
+#define SID_RULER_ROWS_VERTICAL ( SID_SVX_START + 993 )
+
+// CAUTION! Range <994 .. 998> used by EditEngine (!)
+
+#define SID_ATTR_TRANSFORM_HORI_POSITION TypedWhichId<SfxInt32Item>( SID_SVX_START + 999 )
+#define SID_ATTR_TRANSFORM_VERT_POSITION TypedWhichId<SfxInt32Item>( SID_SVX_START + 1000 )
+// Available for use 1001
+#define SID_ALIGN_ANY_LEFT ( SID_SVX_START + 1002 )
+#define SID_ALIGN_ANY_HCENTER ( SID_SVX_START + 1003 )
+#define SID_ALIGN_ANY_RIGHT ( SID_SVX_START + 1004 )
+#define SID_ALIGN_ANY_JUSTIFIED ( SID_SVX_START + 1005 )
+#define SID_ALIGN_ANY_TOP ( SID_SVX_START + 1006 )
+#define SID_ALIGN_ANY_VCENTER ( SID_SVX_START + 1007 )
+#define SID_ALIGN_ANY_BOTTOM ( SID_SVX_START + 1008 )
+#define SID_ALIGN_ANY_HDEFAULT ( SID_SVX_START + 1009 )
+#define SID_ALIGN_ANY_VDEFAULT ( SID_SVX_START + 1010 )
+#define SID_SW_COLLAPSING_BORDERS ( SID_SVX_START + 1011 )
+#define SID_SW_WRAP_INFLUENCE_ON_OBJPOS ( SID_SVX_START + 1012 ) /* #i28701# - slot-id for new attribute WrapInfluenceOnObjPos' */
+#define SID_ATTR_BORDER_DIAG_TLBR ( SID_SVX_START + 1013 )
+#define SID_ATTR_BORDER_DIAG_BLTR ( SID_SVX_START + 1014 )
+#define SID_ATTR_ALIGN_SHRINKTOFIT ( SID_SVX_START + 1015 )
+#define SID_CHINESE_CONVERSION ( SID_SVX_START + 1016 )
+#define SID_PAGE_TYPE ( SID_SVX_START + 1017 )
+#define SID_DLG_TYPE ( SID_SVX_START + 1018 )
+#define SID_TABPAGE_POS ( SID_SVX_START + 1019 )
+#define SID_GRAPHIC ( SID_SVX_START + 1020 )
+#define SID_OBJECT_LIST TypedWhichId<OfaPtrItem>( SID_SVX_START + 1021 )
+#define SID_ATTR_SET ( SID_SVX_START + 1022 )
+#define SID_CHAR_FMT_LIST_BOX ( SID_SVX_START + 1023 )
+#define SID_METRIC_ITEM TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1024 )
+#define SID_NUM_CHAR_FMT ( SID_SVX_START + 1025 )
+#define SID_BULLET_CHAR_FMT ( SID_SVX_START + 1026 )
+#define SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK ( SID_SVX_START + 1027 )
+#define SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT ( SID_SVX_START + 1028 )
+#define SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH ( SID_SVX_START + 1029 )
+#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET ( SID_SVX_START + 1030 )
+#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST ( SID_SVX_START + 1031 )
+#define SID_SVXTABULATORTABPAGE_DISABLEFLAGS ( SID_SVX_START + 1032 )
+#define SID_SVXTEXTATTRPAGE_OBJKIND ( SID_SVX_START + 1033 )
+#define SID_FLAG_TYPE ( SID_SVX_START + 1034 )
+#define SID_SWMODE_TYPE ( SID_SVX_START + 1035 )
+#define SID_DISABLE_CTL ( SID_SVX_START + 1036 )
+#define SID_INSERT_HYPERLINKCONTROL ( SID_SVX_START + 1037 )
+#define SID_ENUM_PAGE_MODE TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1038 )
+#define SID_PAPER_START TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1039 )
+#define SID_PAPER_END TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1040 )
+#define SID_COLLECT_LIST ( SID_SVX_START + 1041 )
+#define SID_GROW_FONT_SIZE ( SID_SVX_START + 1042 )
+#define SID_SHRINK_FONT_SIZE ( SID_SVX_START + 1043 )
+// color subtoolbar on graphictoolbar
+#define SID_COLOR_SETTINGS ( SID_SVX_START + 1044 )
+
+#define SID_FM_FORM_DESIGN_TOOLS ( SID_SVX_START + 1046 )
+#define SID_DRAWTBX_CS_BASIC ( SID_SVX_START + 1047 )
+#define SID_DRAWTBX_CS_SYMBOL ( SID_SVX_START + 1048 )
+#define SID_DRAWTBX_CS_ARROW ( SID_SVX_START + 1049 )
+#define SID_DRAWTBX_CS_FLOWCHART ( SID_SVX_START + 1050 )
+#define SID_DRAWTBX_CS_CALLOUT ( SID_SVX_START + 1051 )
+#define SID_DRAWTBX_CS_STAR ( SID_SVX_START + 1052 )
+#define SID_DRAW_CS_ID ( SID_SVX_START + 1053 )
+#define SID_FONTWORK_CHARACTER_SPACING_DIALOG ( SID_SVX_START + 1054 )
+#define SID_BORDER_REDUCED_MODE ( SID_SVX_START + 1055 )
+#define SID_INSERT_RLM ( SID_SVX_START + 1056 ) /* insert RLM - right to left mark */
+#define SID_INSERT_LRM ( SID_SVX_START + 1057 ) /* insert LRM - left to right mark */
+#define SID_INSERT_ZWSP ( SID_SVX_START + 1058 ) /* insert ZWJ - invisible space, keep words together*/
+#define SID_INSERT_WJ ( SID_SVX_START + 1059 ) /* insert WJ - Word Joiner */
+#define SID_OPTIONS_DATABASES ( SID_SVX_START + 1060 )
+#define SID_OPEN_SMARTTAGMENU TypedWhichId<SvxSmartTagItem>( SID_SVX_START + 1061 )
+
+// CAUTION! Range <1062 .. 1069> used by include/sfx2/sfxsids.hrc
+
+#define SID_TABLE_MERGE_CELLS ( SID_SVX_START + 1070 )
+#define SID_TABLE_SPLIT_CELLS ( SID_SVX_START + 1071 )
+#define SID_OPTIMIZE_TABLE ( SID_SVX_START + 1072 )
+#define SID_TABLE_VERT_BOTTOM ( SID_SVX_START + 1073 )
+#define SID_TABLE_VERT_CENTER ( SID_SVX_START + 1074 )
+#define SID_TABLE_VERT_NONE ( SID_SVX_START + 1075 )
+#define SID_TABLE_INSERT_ROW ( SID_SVX_START + 1076 )
+#define SID_TABLE_INSERT_COL ( SID_SVX_START + 1077 )
+#define SID_TABLE_DELETE_ROW ( SID_SVX_START + 1078 )
+#define SID_TABLE_DELETE_COL ( SID_SVX_START + 1079 )
+#define SID_TABLE_SELECT_ALL ( SID_SVX_START + 1080 )
+#define SID_TABLE_SELECT_COL ( SID_SVX_START + 1081 )
+#define SID_TABLE_SELECT_ROW ( SID_SVX_START + 1082 )
+#define SID_FORMAT_TABLE_DLG ( SID_SVX_START + 1083 )
+#define SID_TABLE_SORT_DIALOG ( SID_SVX_START + 1084 )
+#define SID_TABLE_AUTOSUM ( SID_SVX_START + 1085 )
+#define SID_TABLE_DISTRIBUTE_COLUMNS ( SID_SVX_START + 1086 )
+#define SID_TABLE_DISTRIBUTE_ROWS ( SID_SVX_START + 1087 )
+#define SID_TABLE_STYLE ( SID_SVX_START + 1088 )
+#define SID_TABLE_STYLE_SETTINGS ( SID_SVX_START + 1089 )
+#define SID_CHAR_DLG_PREVIEW_STRING ( SID_SVX_START + 1090 )
+#define SID_RECHECK_DOCUMENT ( SID_SVX_START + 1091 )
+// 1092 is used out of order below
+#define SID_OBJECT_MIRROR ( SID_SVX_START + 1093 )
+
+#define SID_DELETE_POSTIT ( SID_SVX_START + 1094 )
+#define SID_NEXT_POSTIT ( SID_SVX_START + 1095 )
+#define SID_PREVIOUS_POSTIT ( SID_SVX_START + 1096 )
+#define SID_DELETEALL_POSTIT ( SID_SVX_START + 1097 )
+#define SID_TOGGLE_NOTES ( SID_SVX_START + 1098 )
+#define SID_REPLYTO_POSTIT ( SID_SVX_START + 1099 )
+#define SID_DELETEALLBYAUTHOR_POSTIT ( SID_SVX_START + 1100 )
+#define SID_INSERT_POSTIT ( SID_SVX_START + 1101 )
+
+#define SID_TRANSLITERATE_SENTENCE_CASE ( SID_SVX_START + 1102 )
+#define SID_TRANSLITERATE_TITLE_CASE ( SID_SVX_START + 1103 )
+#define SID_TRANSLITERATE_TOGGLE_CASE ( SID_SVX_START + 1104 )
+#define SID_TRANSLITERATE_ROTATE_CASE ( SID_SVX_START + 1105 )
+#define SID_INSERT_FORM_RADIO ( SID_SVX_START + 1106 )
+#define SID_INSERT_FORM_CHECK ( SID_SVX_START + 1107 )
+#define SID_INSERT_FORM_LIST ( SID_SVX_START + 1108 )
+#define SID_INSERT_FORM_COMBO ( SID_SVX_START + 1109 )
+#define SID_INSERT_FORM_SPIN ( SID_SVX_START + 1110 )
+#define SID_INSERT_FORM_VSCROLL ( SID_SVX_START + 1111 )
+#define SID_INSERT_FORM_HSCROLL ( SID_SVX_START + 1112 )
+#define SID_EXTERNAL_EDIT ( SID_SVX_START + 1113 )
+#define SID_ATTR_PAGE_SHARED_FIRST ( SID_SVX_START + 1114 )
+#define SID_CHANGE_PICTURE ( SID_SVX_START + 1115 )
+#define SID_SAVE_GRAPHIC ( SID_SVX_START + 1116 )
+#define SID_COMPRESS_GRAPHIC ( SID_SVX_START + 1117 )
+#define SID_FRAME_UP ( SID_SVX_START + 1118 )
+#define SID_FRAME_DOWN ( SID_SVX_START + 1119 )
+#define SID_ATTR_SPECIALCHAR TypedWhichId<SfxStringItem>( SID_SVX_START + 1120 )
+#define SID_ROTATE_GRAPHIC_LEFT ( SID_SVX_START + 1121 )
+#define SID_ROTATE_GRAPHIC_RIGHT ( SID_SVX_START + 1122 )
+#define SID_ROTATE_GRAPHIC_180 ( SID_SVX_START + 1123 )
+#define SID_ROTATE_GRAPHIC_RESET ( SID_SVX_START + 1092 ) /* RotGrfFlyFrame: */
+
+// new slots for panels
+#define SID_ATTR_FILL_TRANSPARENCE ( SID_SVX_START + 1124 )
+#define SID_ATTR_FILL_FLOATTRANSPARENCE ( SID_SVX_START + 1125 )
+#define SID_ATTR_LINE_TRANSPARENCE ( SID_SVX_START + 1126 )
+#define SID_FLIP_HORIZONTAL ( SID_SVX_START + 1127 )
+#define SID_FLIP_VERTICAL ( SID_SVX_START + 1128 )
+#define SID_ATTR_LINE_JOINT ( SID_SVX_START + 1129 )
+#define SID_ATTR_LINE_CAP ( SID_SVX_START + 1130 )
+#define SID_ATTR_TRANSFORM_MATRIX ( SID_SVX_START + 1131 )
+
+#define SID_CELL_FORMAT_BORDER ( SID_SVX_START + 1132 )
+#define SID_CHAR_DLG_EFFECT ( SID_SVX_START + 1133 )
+#define SID_CHAR_DLG_POSITION ( SID_SVX_START + 1134 )
+#define SID_ATTR_FILL_USE_SLIDE_BACKGROUND ( SID_SVX_START + 1135 )
+#define FN_SVX_SET_NUMBER ( SID_SVX_START + 1136 )
+#define FN_SVX_SET_BULLET ( SID_SVX_START + 1137 )
+#define FN_SVX_SET_OUTLINE ( SID_SVX_START + 1138 )
+
+#define SID_ATTR_BORDER_STYLES TypedWhichId<SfxIntegerListItem>( SID_SVX_START + 1140 )
+#define SID_ATTR_BORDER_DEFAULT_WIDTH TypedWhichId<SfxInt64Item>( SID_SVX_START + 1141 )
+// 1142 is used by editeng (SID_ATTR_CHAR_GRABBAG)
+
+#define SID_OFFER_IMPORT ( SID_SVX_START + 1143 )
+#define SID_DRAWINGLAYER_FILLSTYLES ( SID_SVX_START + 1144)
+#define SID_PARASPACE_INCREASE ( SID_SVX_START + 1145 )
+#define SID_PARASPACE_DECREASE ( SID_SVX_START + 1146 )
+
+#define SID_OBJECT_CROP ( SID_SVX_START + 1147 )
+#define SID_ATTR_SHADOW_TRANSPARENCE ( SID_SVX_START + 1148 )
+#define SID_ATTR_SHADOW_COLOR ( SID_SVX_START + 1149 )
+#define SID_ATTR_SHADOW_XDISTANCE ( SID_SVX_START + 1150 )
+#define SID_ATTR_SHADOW_YDISTANCE ( SID_SVX_START + 1151 )
+
+#define SID_ATTR_PAGE_COLOR ( SID_SVX_START + 1152 )
+// 1153 is used by editeng (SID_ATTR_CHAR_BACK_COLOR)
+#define SID_ATTR_PAGE_GRADIENT TypedWhichId<XFillGradientItem>( SID_SVX_START + 1154 )
+#define SID_ATTR_PAGE_HATCH ( SID_SVX_START + 1155 )
+#define SID_ATTR_PAGE_BITMAP ( SID_SVX_START + 1156 )
+#define SID_ATTR_PAGE_FILLSTYLE ( SID_SVX_START + 1157 )
+
+#define SID_EDIT_POSTIT ( SID_SVX_START + 1158 )
+
+#define SID_LINE_ARROW_CIRCLE ( SID_SVX_START + 1159 )
+#define SID_LINE_ARROW_SQUARE ( SID_SVX_START + 1160 )
+#define SID_LINE_CIRCLE_ARROW ( SID_SVX_START + 1161 )
+#define SID_LINE_SQUARE_ARROW ( SID_SVX_START + 1162 )
+#define SID_LINE_ARROWS ( SID_SVX_START + 1163 )
+#define SID_DRAWTBX_ARROWS ( SID_SVX_START + 1164 )
+#define SID_LINE_ARROW_START ( SID_SVX_START + 1165 )
+#define SID_LINE_ARROW_END ( SID_SVX_START + 1166 )
+#define SID_DRAW_MEASURELINE ( SID_SVX_START + 1167 )
+#define SID_AUTHOR_COLOR ( SID_SVX_START + 1168 )
+#define SID_BMPMASK_COLOR ( SID_SVX_START + 1169 )
+#define SID_PARAGRAPH_SIGN_CLASSIFY_DLG ( SID_SVX_START + 1170 )
+#define SID_CLASSIFICATION_DIALOG ( SID_SVX_START + 1171 )
+#define SID_ANCHOR_MENU ( SID_SVX_START + 1172 )
+
+#define SID_INSERT_SIGNATURELINE ( SID_SVX_START + 1173 )
+#define SID_EDIT_SIGNATURELINE ( SID_SVX_START + 1174 )
+#define SID_SIGN_SIGNATURELINE ( SID_SVX_START + 1175 )
+#define SID_MEASURE_DLG ( SID_SVX_START + 1176 )
+// free slots - available for use
+#define SID_TABLE_DELETE_TABLE ( SID_SVX_START + 1184 )
+#define SID_TABLE_MINIMAL_COLUMN_WIDTH ( SID_SVX_START + 1185 )
+#define SID_TABLE_MINIMAL_ROW_HEIGHT ( SID_SVX_START + 1186 )
+#define SID_TABLE_OPTIMAL_COLUMN_WIDTH ( SID_SVX_START + 1187 )
+#define SID_TABLE_OPTIMAL_ROW_HEIGHT ( SID_SVX_START + 1188 )
+
+#define SID_TABLE_CELL_BACKGROUND_COLOR TypedWhichId<SvxColorItem>( SID_SVX_START + 1189 )
+
+#define SID_TOGGLE_RESOLVED_NOTES ( SID_SVX_START + 1190 )
+
+#define SID_INSERT_QRCODE ( SID_SVX_START + 1191 )
+#define SID_EDIT_QRCODE ( SID_SVX_START + 1192 )
+#define SID_COPY_HYPERLINK_LOCATION ( SID_SVX_START + 1193 )
+
+#define SID_IMPRESS_DOC TypedWhichId<SfxBoolItem>( SID_SVX_START + 1194 )
+
+#define SID_ULINE_VAL_NONE (SID_SVX_START + 1195) /* no underline */
+#define SID_ULINE_VAL_SINGLE (SID_SVX_START + 1196) /* single underline */
+#define SID_ULINE_VAL_DOUBLE (SID_SVX_START + 1197) /* double underline */
+#define SID_ULINE_VAL_DOTTED (SID_SVX_START + 1198) /* dotted underline */
+
+#define SID_MOVE_SHAPE_HANDLE ( SID_SVX_START + 1199 )
+
+#define SID_ATTR_POSTIT_AUTHOR TypedWhichId<SvxPostItAuthorItem>( SID_SVX_START + 1200 )
+#define SID_ATTR_POSTIT_DATE TypedWhichId<SvxPostItDateItem>( SID_SVX_START + 1201 )
+#define SID_ATTR_POSTIT_TEXT TypedWhichId<SvxPostItTextItem>( SID_SVX_START + 1202 )
+#define SID_ATTR_POSTIT_ID TypedWhichId<SvxPostItIdItem>( SID_SVX_START + 1203 )
+
+#define SID_ATTR_POSTIT_POSITION_X TypedWhichId<SfxInt32Item>( SID_SVX_START + 1204 )
+#define SID_ATTR_POSTIT_POSITION_Y TypedWhichId<SfxInt32Item>( SID_SVX_START + 1205 )
+
+#define SID_INSERT_TREECONTROL ( SID_SVX_START + 1206 )
+#define SID_ATTR_VIEWLAYOUT TypedWhichId<SvxViewLayoutItem>( SID_SVX_START + 1207 )
+#define SID_ATTR_ZOOMSLIDER TypedWhichId<SvxZoomSliderItem>( SID_SVX_START + 1208 )
+// Can be either SfxStringItem or SfxStringListItem
+#define SID_LANGUAGE_STATUS ( SID_SVX_START + 1209 )
+#define SID_CHAR_DLG_FOR_PARAGRAPH ( SID_SVX_START + 1210 )
+#define SID_SET_DOCUMENT_LANGUAGE TypedWhichId<SfxBoolItem>( SID_SVX_START + 1211 )
+
+// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
+#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1211 + 1 )
+
+
+// Overflow check for slot IDs
+#if SID_SVX_FIRSTFREE > SID_SVX_END
+#error Resource-overflow in #line, #file
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svxitems.hrc b/include/svx/svxitems.hrc
new file mode 100644
index 000000000..d42194497
--- /dev/null
+++ b/include/svx/svxitems.hrc
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_INC_SVX_ITEMS_HRC
+#define INCLUDED_SVX_INC_SVX_ITEMS_HRC
+
+#include <sal/types.h>
+#include <svx/svxitems.hrc>
+#include <svx/svxids.hrc>
+#include <editeng/editids.hrc>
+#include <unotools/resmgr.hxx>
+#include <utility>
+
+#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
+
+const std::pair<TranslateId, sal_uInt16> RID_ATTR_NAMES[] =
+{
+ { NC_("RID_ATTR_NAMES", "Scale") , SID_ATTR_ZOOM },
+ { NC_("RID_ATTR_NAMES", "Brush") , SID_ATTR_BRUSH },
+ { NC_("RID_ATTR_NAMES", "Tab stops") , SID_ATTR_TABSTOP },
+ { NC_("RID_ATTR_NAMES", "Character") , SID_ATTR_CHAR },
+ { NC_("RID_ATTR_NAMES", "Font") , SID_ATTR_CHAR_FONT },
+ { NC_("RID_ATTR_NAMES", "Font posture") , SID_ATTR_CHAR_POSTURE },
+ { NC_("RID_ATTR_NAMES", "Font weight") , SID_ATTR_CHAR_WEIGHT },
+ { NC_("RID_ATTR_NAMES", "Shadowed") , SID_ATTR_CHAR_SHADOWED },
+ { NC_("RID_ATTR_NAMES", "Individual words") , SID_ATTR_CHAR_WORDLINEMODE },
+ { NC_("RID_ATTR_NAMES", "Outline") , SID_ATTR_CHAR_CONTOUR },
+ { NC_("RID_ATTR_NAMES", "Strikethrough") , SID_ATTR_CHAR_STRIKEOUT },
+ { NC_("RID_ATTR_NAMES", "Underline") , SID_ATTR_CHAR_UNDERLINE },
+ { NC_("RID_ATTR_NAMES", "Font size") , SID_ATTR_CHAR_FONTHEIGHT },
+ { NC_("RID_ATTR_NAMES", "Font color") , SID_ATTR_CHAR_COLOR },
+ { NC_("RID_ATTR_NAMES", "Kerning") , SID_ATTR_CHAR_KERNING },
+ { NC_("RID_ATTR_NAMES", "Effects") , SID_ATTR_CHAR_CASEMAP },
+ { NC_("RID_ATTR_NAMES", "Language"), SID_ATTR_CHAR_LANGUAGE },
+ { NC_("RID_ATTR_NAMES", "Position") , SID_ATTR_CHAR_ESCAPEMENT },
+ { NC_("RID_ATTR_NAMES", "Character blinking") , SID_ATTR_CHAR_AUTOKERN },
+ { NC_("RID_ATTR_NAMES", "Character set color") , SID_ATTR_CHAR_CHARSETCOLOR },
+ { NC_("RID_ATTR_NAMES", "Overline") , SID_ATTR_CHAR_OVERLINE },
+ { NC_("RID_ATTR_NAMES", "Alignment") , SID_ATTR_PARA_ADJUST },
+ { NC_("RID_ATTR_NAMES", "Line spacing") , SID_ATTR_PARA_LINESPACE },
+ { NC_("RID_ATTR_NAMES", "Page Break") , SID_ATTR_PARA_PAGEBREAK },
+ { NC_("RID_ATTR_NAMES", "Hyphenation") , SID_ATTR_PARA_HYPHENZONE },
+ { NC_("RID_ATTR_NAMES", "Do not split paragraph"), SID_ATTR_PARA_SPLIT },
+ { NC_("RID_ATTR_NAMES", "Orphans") , SID_ATTR_PARA_ORPHANS },
+ { NC_("RID_ATTR_NAMES", "Widows") , SID_ATTR_PARA_WIDOWS },
+ { NC_("RID_ATTR_NAMES", "Paragraph spacing") , SID_ATTR_PARA_ULSPACE },
+ { NC_("RID_ATTR_NAMES", "Paragraph indent") , SID_ATTR_PARA_LRSPACE },
+ { NC_("RID_ATTR_NAMES", "Indent") , SID_ATTR_LRSPACE },
+ { NC_("RID_ATTR_NAMES", "Spacing") , SID_ATTR_ULSPACE },
+ { NC_("RID_ATTR_NAMES", "Page") , SID_ATTR_PAGE },
+ { NC_("RID_ATTR_NAMES", "Page Style") , SID_ATTR_PARA_MODEL },
+ { NC_("RID_ATTR_NAMES", "Keep with next paragraph"), SID_ATTR_PARA_KEEP },
+ { NC_("RID_ATTR_NAMES", "Blinking") , SID_ATTR_FLASH },
+ { NC_("RID_ATTR_NAMES", "Page line-spacing") , SID_ATTR_PARA_REGISTER },
+ { NC_("RID_ATTR_NAMES", "Character background") , SID_ATTR_BRUSH_CHAR },
+ { NC_("RID_ATTR_NAMES", "Asian font") , SID_ATTR_CHAR_CJK_FONT },
+ { NC_("RID_ATTR_NAMES", "Size of Asian font") , SID_ATTR_CHAR_CJK_FONTHEIGHT },
+ { NC_("RID_ATTR_NAMES", "Language of Asian font"), SID_ATTR_CHAR_CJK_LANGUAGE },
+ { NC_("RID_ATTR_NAMES", "Posture of Asian font") , SID_ATTR_CHAR_CJK_POSTURE },
+ { NC_("RID_ATTR_NAMES", "Weight of Asian font") , SID_ATTR_CHAR_CJK_WEIGHT },
+ { NC_("RID_ATTR_NAMES", "CTL") , SID_ATTR_CHAR_CTL_FONT },
+ { NC_("RID_ATTR_NAMES", "Size of complex scripts") , SID_ATTR_CHAR_CTL_FONTHEIGHT },
+ { NC_("RID_ATTR_NAMES", "Language of complex scripts"),SID_ATTR_CHAR_CTL_LANGUAGE },
+ { NC_("RID_ATTR_NAMES", "Posture of complex scripts"), SID_ATTR_CHAR_CTL_POSTURE },
+ { NC_("RID_ATTR_NAMES", "Weight of complex scripts"), SID_ATTR_CHAR_CTL_WEIGHT },
+ { NC_("RID_ATTR_NAMES", "Double-lined") , SID_ATTR_CHAR_TWO_LINES },
+ { NC_("RID_ATTR_NAMES", "Emphasis mark") , SID_ATTR_CHAR_EMPHASISMARK },
+ { NC_("RID_ATTR_NAMES", "Text spacing") , SID_ATTR_PARA_SCRIPTSPACE },
+ { NC_("RID_ATTR_NAMES", "Hanging punctuation") , SID_ATTR_PARA_HANGPUNCTUATION },
+ { NC_("RID_ATTR_NAMES", "Forbidden characters") , SID_ATTR_PARA_FORBIDDEN_RULES },
+ { NC_("RID_ATTR_NAMES", "Rotation") , SID_ATTR_CHAR_ROTATED },
+ { NC_("RID_ATTR_NAMES", "Character scaling") , SID_ATTR_CHAR_SCALEWIDTH },
+ { NC_("RID_ATTR_NAMES", "Relief") , SID_ATTR_CHAR_RELIEF },
+ { NC_("RID_ATTR_NAMES", "Vertical text alignment") , SID_PARA_VERTALIGN }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/swframeexample.hxx b/include/svx/swframeexample.hxx
new file mode 100644
index 000000000..fc64982ce
--- /dev/null
+++ b/include/svx/swframeexample.hxx
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
+#define INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
+
+#include <tools/color.hxx>
+#include <tools/gen.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/swframetypes.hxx>
+#include <vcl/customweld.hxx>
+#include <com/sun/star/text/WrapTextMode.hpp>
+
+class SVX_DLLPUBLIC SwFrameExample final : public weld::CustomWidgetController
+{
+ Color m_aTransColor; ///< transparency
+ Color m_aBgCol; ///< background
+ Color m_aFrameColor; ///< graphic frame
+ Color m_aAlignColor; ///< align anchor
+ Color m_aBorderCol; ///< frame of doc
+ Color m_aPrintAreaCol; ///< frame of printable area of doc
+ Color m_aTxtCol; ///< symbolised text
+ Color m_aBlankCol; ///< area of symbol for blank
+ Color m_aBlankFrameCol; ///< frame of symbol for blank
+
+ tools::Rectangle aPage;
+ tools::Rectangle aPagePrtArea;
+ tools::Rectangle aTextLine;
+ tools::Rectangle aPara;
+ tools::Rectangle aParaPrtArea;
+ tools::Rectangle aFrameAtFrame;
+ tools::Rectangle aDrawObj;
+ tools::Rectangle aAutoCharFrame;
+ Size aFrmSize;
+
+ short nHAlign;
+ short nHRel;
+
+ short nVAlign;
+ short nVRel;
+
+ css::text::WrapTextMode nWrap;
+ RndStdIds nAnchor;
+ bool bTrans;
+
+ Point aRelPos;
+
+ void InitColors_Impl();
+ void InitAllRects_Impl(vcl::RenderContext& rRenderContext);
+ void CalcBoundRect_Impl(const vcl::RenderContext& rRenderContext, tools::Rectangle &rRect);
+ tools::Rectangle DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor);
+
+ virtual void StyleUpdated() override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
+public:
+
+ SwFrameExample();
+
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+
+ void SetWrap(css::text::WrapTextMode nW) { nWrap = nW; }
+
+ void SetHAlign(short nH) { nHAlign = nH; }
+ void SetHoriRel(short nR) { nHRel = nR; }
+
+ void SetVAlign(short nV) { nVAlign = nV; }
+ void SetVertRel(short nR) { nVRel = nR; }
+
+ void SetTransparent(bool bT) { bTrans = bT; }
+ void SetAnchor(RndStdIds nA) { nAnchor = nA; }
+
+ void SetRelPos(const Point& rP);
+};
+
+
+
+#endif // INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/swframeposstrings.hxx b/include/svx/swframeposstrings.hxx
new file mode 100644
index 000000000..2aca2f195
--- /dev/null
+++ b/include/svx/swframeposstrings.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+
+/*
+ contains strings needed for positioning dialogs
+ of frames and drawing in Writer
+ */
+class SVX_DLLPUBLIC SvxSwFramePosString
+{
+public:
+ enum StringId
+ {
+ LEFT ,
+ RIGHT ,
+ FROMLEFT ,
+ MIR_LEFT ,
+ MIR_RIGHT ,
+ MIR_FROMLEFT ,
+ FRAME ,
+ PRTAREA ,
+ REL_PG_LEFT ,
+ REL_PG_RIGHT ,
+ REL_FRM_LEFT ,
+ REL_FRM_RIGHT ,
+ MIR_REL_PG_LEFT ,
+ MIR_REL_PG_RIGHT ,
+ MIR_REL_FRM_LEFT ,
+ MIR_REL_FRM_RIGHT ,
+ REL_PG_FRAME ,
+ REL_PG_PRTAREA ,
+ REL_PG_PRTAREA_TOP ,
+ REL_PG_PRTAREA_BOTTOM ,
+ REL_BASE ,
+ REL_CHAR ,
+ REL_ROW ,
+ REL_BORDER ,
+ REL_PRTAREA ,
+ FLY_REL_PG_LEFT ,
+ FLY_REL_PG_RIGHT ,
+ FLY_REL_PG_FRAME ,
+ FLY_REL_PG_PRTAREA ,
+ FLY_MIR_REL_PG_LEFT ,
+ FLY_MIR_REL_PG_RIGHT ,
+ TOP,
+ BOTTOM,
+ CENTER_HORI,
+ CENTER_VERT,
+ FROMTOP,
+ FROMBOTTOM,
+ BELOW,
+ FROMRIGHT,
+ REL_PG_TOP,
+ REL_PG_BOTTOM,
+ REL_FRM_TOP,
+ REL_FRM_BOTTOM,
+ REL_LINE,
+
+ STR_MAX
+ };
+ static OUString GetString(StringId eId);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/swframetypes.hxx b/include/svx/swframetypes.hxx
new file mode 100644
index 000000000..abff5b0ee
--- /dev/null
+++ b/include/svx/swframetypes.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_INC_SWFRAMETYPES_HXX
+#define INCLUDED_SVX_INC_SWFRAMETYPES_HXX
+
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+
+// The former Rendezvous-IDs live on:
+// There are IDs for the anchors (SwFormatAnchor) and some others
+// that are only of importance for interfaces (SwDoc).
+enum class RndStdIds
+{
+ UNKNOWN = -1, // return value used by SwFEShell::GetAnchorId
+
+ // the following 5 values are deliberately the same as the values in css::text::TextContentAnchorType
+ FLY_AT_PARA = int(css::text::TextContentAnchorType_AT_PARAGRAPH), // Anchored at paragraph.
+ FLY_AS_CHAR = int(css::text::TextContentAnchorType_AS_CHARACTER), // Anchored as character.
+ FLY_AT_PAGE = int(css::text::TextContentAnchorType_AT_PAGE), // Anchored at page.
+ FLY_AT_FLY = int(css::text::TextContentAnchorType_AT_FRAME), // Anchored at frame.
+ FLY_AT_CHAR = int(css::text::TextContentAnchorType_AT_CHARACTER), // Anchored at character.
+
+ HEADER,
+ FOOTER,
+ HEADERL,
+ HEADERR,
+
+ DRAW_OBJECT // A draw-Object! For the SwDoc-interface only!
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/swframevalidation.hxx b/include/svx/swframevalidation.hxx
new file mode 100644
index 000000000..049fce9af
--- /dev/null
+++ b/include/svx/swframevalidation.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SWFRAMEVALIDATION_HXX
+#define INCLUDED_SVX_SWFRAMEVALIDATION_HXX
+
+#include <sal/types.h>
+#include <tools/gen.hxx>
+#include <svx/swframetypes.hxx>
+
+/*
+ struct to determine min/max values for fly frame positioning in Writer
+ */
+struct SvxSwFrameValidation
+{
+ RndStdIds nAnchorType;
+ sal_Int16 nHoriOrient; //css::text::HoriOrientation
+ sal_Int16 nVertOrient; //css::text::VertOrientation
+ sal_Int16 nHRelOrient; //css::text::RelOrientation
+ sal_Int16 nVRelOrient; //css::text::RelOrientation
+ bool bAutoHeight;
+ bool bMirror;
+ bool bFollowTextFlow;
+
+ sal_Int32 nHPos;
+ sal_Int32 nMaxHPos;
+ sal_Int32 nMinHPos;
+
+ sal_Int32 nVPos;
+ sal_Int32 nMaxVPos;
+ sal_Int32 nMinVPos;
+
+ sal_Int32 nWidth;
+ sal_Int32 nMinWidth;
+ sal_Int32 nMaxWidth;
+
+ sal_Int32 nHeight;
+ sal_Int32 nMinHeight;
+ sal_Int32 nMaxHeight;
+
+ Size aPercentSize; // Size for 100% value
+
+ SvxSwFrameValidation() :
+ nAnchorType(RndStdIds::FLY_AT_PARA),
+ nHoriOrient(0),
+ nVertOrient(0),
+ nHRelOrient(0),
+ nVRelOrient(0),
+ bAutoHeight(false),
+ bMirror(false),
+ bFollowTextFlow( false ),
+ nHPos(0),
+ nMaxHPos(SAL_MAX_INT32),
+ nMinHPos(0),
+ nVPos(0),
+ nMaxVPos(SAL_MAX_INT32),
+ nMinVPos(0),
+ nWidth( 283 * 4 ), //2.0 cm
+ nMinWidth(0),
+ nMaxWidth(SAL_MAX_INT32),
+ nHeight( 283 ), //0.5 cm
+ nMinHeight(0),
+ nMaxHeight(SAL_MAX_INT32)
+ {
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxcecitm.hxx b/include/svx/sxcecitm.hxx
new file mode 100644
index 000000000..6619c04be
--- /dev/null
+++ b/include/svx/sxcecitm.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXCECITM_HXX
+#define INCLUDED_SVX_SXCECITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/sdynitm.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/svxdllapi.h>
+
+enum class SdrCaptionEscDir { Horizontal, Vertical, BestFit };
+
+
+// class SdrCaptionEscDirItem
+
+class SVXCORE_DLLPUBLIC SdrCaptionEscDirItem final : public SfxEnumItem<SdrCaptionEscDir> {
+public:
+ SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SdrCaptionEscDir::Horizontal): SfxEnumItem(SDRATTR_CAPTIONESCDIR, eDir) {}
+ virtual SdrCaptionEscDirItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 3; }
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+
+// class SdrCaptionEscIsRelItem
+// sal_True = line escape position is relative
+// sal_False = line escape position is absolute
+
+class SVXCORE_DLLPUBLIC SdrCaptionEscIsRelItem final : public SdrYesNoItem {
+public:
+ SdrCaptionEscIsRelItem(bool bRel=true): SdrYesNoItem(SDRATTR_CAPTIONESCISREL,bRel) {}
+ virtual ~SdrCaptionEscIsRelItem() override;
+ virtual SdrCaptionEscIsRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrCaptionEscIsRelItem(SdrCaptionEscIsRelItem const &) = default;
+ SdrCaptionEscIsRelItem(SdrCaptionEscIsRelItem &&) = default;
+ SdrCaptionEscIsRelItem & operator =(SdrCaptionEscIsRelItem const &) = delete; // due to SdrYesNoItem
+ SdrCaptionEscIsRelItem & operator =(SdrCaptionEscIsRelItem &&) = delete; // due to SdrYesNoItem
+};
+
+
+// class SdrCaptionEscRelItem
+// relative line escape
+// 0 = 0.00% = up resp. left,
+// 10000 = 100.00% = right resp. down
+// only when SdrCaptionEscIsRelItem=TRUE
+
+class SVXCORE_DLLPUBLIC SdrCaptionEscRelItem final : public SfxInt32Item {
+public:
+ SdrCaptionEscRelItem(sal_Int32 nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
+ virtual ~SdrCaptionEscRelItem() override;
+ virtual SdrCaptionEscRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrCaptionEscRelItem(SdrCaptionEscRelItem const &) = default;
+ SdrCaptionEscRelItem(SdrCaptionEscRelItem &&) = default;
+ SdrCaptionEscRelItem & operator =(SdrCaptionEscRelItem const &) = delete; // due to SfxInt32Item
+ SdrCaptionEscRelItem & operator =(SdrCaptionEscRelItem &&) = delete; // due to SfxInt32Item
+};
+
+
+// class SdrCaptionEscAbsItem
+// absolute line escape
+// 0 = up resp. left,
+// >0 = in direction right resp. down
+// only when SdrCaptionEscIsRelItem=FALSE
+
+class SdrCaptionEscAbsItem final : public SdrMetricItem {
+public:
+ SdrCaptionEscAbsItem(tools::Long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
+ virtual SdrCaptionEscAbsItem* Clone(SfxItemPool*) const override
+ {
+ return new SdrCaptionEscAbsItem(*this);
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxcgitm.hxx b/include/svx/sxcgitm.hxx
new file mode 100644
index 000000000..993d164de
--- /dev/null
+++ b/include/svx/sxcgitm.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXCGITM_HXX
+#define INCLUDED_SVX_SXCGITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdmetitm.hxx>
+
+/**
+ * class SdrCaptionGapItem
+ * Distance of the line start from the Rect
+ */
+class SdrCaptionGapItem final : public SdrMetricItem
+{
+public:
+ SdrCaptionGapItem(tools::Long nGap = 0)
+ : SdrMetricItem(SDRATTR_CAPTIONGAP, nGap)
+ {
+ }
+ virtual SdrCaptionGapItem* Clone(SfxItemPool*) const override
+ {
+ return new SdrCaptionGapItem(*this);
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxciaitm.hxx b/include/svx/sxciaitm.hxx
new file mode 100644
index 000000000..9d77c18e3
--- /dev/null
+++ b/include/svx/sxciaitm.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXCIAITM_HXX
+#define INCLUDED_SVX_SXCIAITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdangitm.hxx>
+
+inline SdrAngleItem makeSdrCircStartAngleItem(Degree100 nAngle)
+{
+ return SdrAngleItem(SDRATTR_CIRCSTARTANGLE, nAngle);
+}
+
+inline SdrAngleItem makeSdrCircEndAngleItem(Degree100 nAngle)
+{
+ return SdrAngleItem(SDRATTR_CIRCENDANGLE, nAngle);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxcllitm.hxx b/include/svx/sxcllitm.hxx
new file mode 100644
index 000000000..8ac03f0ea
--- /dev/null
+++ b/include/svx/sxcllitm.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXCLLITM_HXX
+#define INCLUDED_SVX_SXCLLITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdynitm.hxx>
+#include <svx/sdmetitm.hxx>
+
+/**
+ * Length of the first caption line
+ * Only for Type3 and Type4
+ * Only relevant, if SdrCaptionFitLineLenItem = false
+ */
+class SVXCORE_DLLPUBLIC SdrCaptionLineLenItem final : public SdrMetricItem {
+public:
+ SdrCaptionLineLenItem(tools::Long nLineLen=0): SdrMetricItem(SDRATTR_CAPTIONLINELEN,nLineLen) {}
+ virtual ~SdrCaptionLineLenItem() override;
+ virtual SdrCaptionLineLenItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrCaptionLineLenItem(SdrCaptionLineLenItem const &) = default;
+ SdrCaptionLineLenItem(SdrCaptionLineLenItem &&) = default;
+ SdrCaptionLineLenItem & operator =(SdrCaptionLineLenItem const &) = delete; // due to SdrMetricItem
+ SdrCaptionLineLenItem & operator =(SdrCaptionLineLenItem &&) = delete; // due to SdrMetricItem
+};
+
+/**
+ * The length of the first caption line is either automatically
+ * calculated or the default setting is used (SdrCaptionLineLenItem)
+ */
+class SVXCORE_DLLPUBLIC SdrCaptionFitLineLenItem final : public SdrYesNoItem {
+public:
+ SdrCaptionFitLineLenItem(bool bBestFit=true): SdrYesNoItem(SDRATTR_CAPTIONFITLINELEN,bBestFit) {}
+ virtual ~SdrCaptionFitLineLenItem() override;
+ virtual SdrCaptionFitLineLenItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrCaptionFitLineLenItem(SdrCaptionFitLineLenItem const &) = default;
+ SdrCaptionFitLineLenItem(SdrCaptionFitLineLenItem &&) = default;
+ SdrCaptionFitLineLenItem & operator =(SdrCaptionFitLineLenItem const &) = delete; // due to SdrYesNoItem
+ SdrCaptionFitLineLenItem & operator =(SdrCaptionFitLineLenItem &&) = delete; // due to SdrYesNoItem
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxctitm.hxx b/include/svx/sxctitm.hxx
new file mode 100644
index 000000000..3d46f54cb
--- /dev/null
+++ b/include/svx/sxctitm.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXCTITM_HXX
+#define INCLUDED_SVX_SXCTITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+enum class SdrCaptionType { Type1, Type2, Type3, Type4 };
+
+
+
+class SVXCORE_DLLPUBLIC SdrCaptionTypeItem final : public SfxEnumItem<SdrCaptionType> {
+public:
+ SdrCaptionTypeItem(SdrCaptionType eStyle=SdrCaptionType::Type3): SfxEnumItem(SDRATTR_CAPTIONTYPE, eStyle) {}
+ virtual SdrCaptionTypeItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 4; }
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxekitm.hxx b/include/svx/sxekitm.hxx
new file mode 100644
index 000000000..fd54d38bb
--- /dev/null
+++ b/include/svx/sxekitm.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXEKITM_HXX
+#define INCLUDED_SVX_SXEKITM_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxdllapi.h>
+
+enum class SdrEdgeKind
+{
+ OrthoLines, ThreeLines, OneLine, Bezier, Arc
+};
+
+class SVXCORE_DLLPUBLIC SdrEdgeKindItem final : public SfxEnumItem<SdrEdgeKind> {
+public:
+ SdrEdgeKindItem(SdrEdgeKind eStyle=SdrEdgeKind::OrthoLines): SfxEnumItem(SDRATTR_EDGEKIND, eStyle) {}
+ virtual SdrEdgeKindItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 5; }
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxelditm.hxx b/include/svx/sxelditm.hxx
new file mode 100644
index 000000000..c957070ce
--- /dev/null
+++ b/include/svx/sxelditm.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXELDITM_HXX
+#define INCLUDED_SVX_SXELDITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdmetitm.hxx>
+
+class SdrEdgeLineDeltaCountItem final : public SfxUInt16Item
+{
+public:
+ SdrEdgeLineDeltaCountItem(sal_uInt16 nVal = 0)
+ : SfxUInt16Item(SDRATTR_EDGELINEDELTACOUNT, nVal)
+ {
+ }
+ virtual SdrEdgeLineDeltaCountItem* Clone(SfxItemPool*) const override
+ {
+ return new SdrEdgeLineDeltaCountItem(*this);
+ }
+};
+
+inline SdrMetricItem makeSdrEdgeLine1DeltaItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_EDGELINE1DELTA, nVal);
+}
+
+inline SdrMetricItem makeSdrEdgeLine2DeltaItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_EDGELINE2DELTA, nVal);
+}
+
+inline SdrMetricItem makeSdrEdgeLine3DeltaItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_EDGELINE3DELTA, nVal);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxenditm.hxx b/include/svx/sxenditm.hxx
new file mode 100644
index 000000000..de7accd9b
--- /dev/null
+++ b/include/svx/sxenditm.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXENDITM_HXX
+#define INCLUDED_SVX_SXENDITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC SdrEdgeNode1HorzDistItem final : public SdrMetricItem {
+public:
+ SdrEdgeNode1HorzDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,nVal) {}
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual SdrEdgeNode1HorzDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
+};
+
+class SVXCORE_DLLPUBLIC SdrEdgeNode1VertDistItem final : public SdrMetricItem {
+public:
+ SdrEdgeNode1VertDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,nVal) {}
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual SdrEdgeNode1VertDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
+};
+
+class SVXCORE_DLLPUBLIC SdrEdgeNode2HorzDistItem final : public SdrMetricItem {
+public:
+ SdrEdgeNode2HorzDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,nVal) {}
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual SdrEdgeNode2HorzDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
+};
+
+class SVXCORE_DLLPUBLIC SdrEdgeNode2VertDistItem final : public SdrMetricItem {
+public:
+ SdrEdgeNode2VertDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,nVal) {}
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual SdrEdgeNode2VertDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
+};
+
+class SdrEdgeNode1GlueDistItem final : public SdrMetricItem {
+public:
+ SdrEdgeNode1GlueDistItem(tools::Long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {}
+ virtual SdrEdgeNode1GlueDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
+};
+
+class SdrEdgeNode2GlueDistItem final : public SdrMetricItem {
+public:
+ SdrEdgeNode2GlueDistItem(tools::Long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {}
+ virtual SdrEdgeNode2GlueDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxmbritm.hxx b/include/svx/sxmbritm.hxx
new file mode 100644
index 000000000..022656aaa
--- /dev/null
+++ b/include/svx/sxmbritm.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXMBRITM_HXX
+#define INCLUDED_SVX_SXMBRITM_HXX
+
+#include <svx/svddef.hxx>
+
+#include <svx/sdynitm.hxx>
+
+// dimension line below the reference edge
+// for dimensioning the lower edge of the object
+// (redundant to turn the reference edge through 180deg +
+// TextUpsideDown, but easily operated)
+// can also be dragged by dragging the measure line item
+// (SdrMeasureLineDistItem) over the reference edge
+class SVXCORE_DLLPUBLIC SdrMeasureBelowRefEdgeItem final : public SdrYesNoItem {
+public:
+ SdrMeasureBelowRefEdgeItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASUREBELOWREFEDGE,bOn) {}
+ virtual ~SdrMeasureBelowRefEdgeItem() override;
+ virtual SdrMeasureBelowRefEdgeItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrMeasureBelowRefEdgeItem(SdrMeasureBelowRefEdgeItem const &) = default;
+ SdrMeasureBelowRefEdgeItem(SdrMeasureBelowRefEdgeItem &&) = default;
+ SdrMeasureBelowRefEdgeItem & operator =(SdrMeasureBelowRefEdgeItem const &) = delete; // due to SdrYesNoItem
+ SdrMeasureBelowRefEdgeItem & operator =(SdrMeasureBelowRefEdgeItem &&) = delete; // due to SdrYesNoItem
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxmlhitm.hxx b/include/svx/sxmlhitm.hxx
new file mode 100644
index 000000000..8fdb7c64e
--- /dev/null
+++ b/include/svx/sxmlhitm.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXMLHITM_HXX
+#define INCLUDED_SVX_SXMLHITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdmetitm.hxx>
+
+// Measure
+// ___
+// | 100,00km | 2mm = SdrMeasureHelplineOverhangItem
+// |<--------------------->|---
+// | | 8mm = SdrMeasureLineDistItem
+// | |
+// #=============# |---
+// # # | SdrMeasureHelpline1/2LenItem
+// # #=========#---
+// # dimensioned object #
+// #=======================#
+
+// gab between dimension line and document reference edge (norm=8mm)
+// can be dragged on the handles of the arrowheads
+inline SdrMetricItem makeSdrMeasureLineDistItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_MEASURELINEDIST, nVal);
+}
+
+// overhang of dimension help line to dimension line (norm=2mm)
+inline SdrMetricItem makeSdrMeasureHelplineOverhangItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, nVal);
+}
+
+// gab between dimension line and document reference edge
+// dimension help lines shell not touch the object
+inline SdrMetricItem makeSdrMeasureHelplineDistItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, nVal);
+}
+
+// overlength of the help lines can be dragged at the round handles,
+// which are under the reference points by default
+inline SdrMetricItem makeSdrMeasureHelpline1LenItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, nVal);
+}
+inline SdrMetricItem makeSdrMeasureHelpline2LenItem(tools::Long nVal)
+{
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, nVal);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxmtfitm.hxx b/include/svx/sxmtfitm.hxx
new file mode 100644
index 000000000..11de73286
--- /dev/null
+++ b/include/svx/sxmtfitm.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXMTFITM_HXX
+#define INCLUDED_SVX_SXMTFITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdynitm.hxx>
+#include <svx/sdangitm.hxx>
+
+// The two following are not implemented yet!
+// Nail text down to a fix angle.
+// The text angle is independent of the dimension line.
+// Abrogate TextUpsideDown, TextRota90 and TextAutoAngle. (n.i.)
+class SdrMeasureTextIsFixedAngleItem final : public SdrYesNoItem {
+public:
+ SdrMeasureTextIsFixedAngleItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURETEXTISFIXEDANGLE,bOn) {}
+ virtual ~SdrMeasureTextIsFixedAngleItem() override;
+ virtual SdrMeasureTextIsFixedAngleItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrMeasureTextIsFixedAngleItem(SdrMeasureTextIsFixedAngleItem const &) = default;
+ SdrMeasureTextIsFixedAngleItem(SdrMeasureTextIsFixedAngleItem &&) = default;
+ SdrMeasureTextIsFixedAngleItem & operator =(SdrMeasureTextIsFixedAngleItem const &) = delete; // due to SdrYesNoItem
+ SdrMeasureTextIsFixedAngleItem & operator =(SdrMeasureTextIsFixedAngleItem &&) = delete; // due to SdrYesNoItem
+};
+
+//Angle of the text in 1/100deg. 0=horizontal; read from left to right. (n.i.)
+class SdrMeasureTextFixedAngleItem final : public SdrAngleItem {
+public:
+ SdrMeasureTextFixedAngleItem(Degree100 nVal=0_deg100): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,nVal) {}
+ virtual ~SdrMeasureTextFixedAngleItem() override;
+ virtual SdrMeasureTextFixedAngleItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrMeasureTextFixedAngleItem(SdrMeasureTextFixedAngleItem const &) = default;
+ SdrMeasureTextFixedAngleItem(SdrMeasureTextFixedAngleItem &&) = default;
+ SdrMeasureTextFixedAngleItem & operator =(SdrMeasureTextFixedAngleItem const &) = delete; // due to SdrAngleItem
+ SdrMeasureTextFixedAngleItem & operator =(SdrMeasureTextFixedAngleItem &&) = delete; // due to SdrAngleItem
+};
+
+// The decimal places used for the measure value
+class SVXCORE_DLLPUBLIC SdrMeasureDecimalPlacesItem final : public SfxInt16Item {
+public:
+ SdrMeasureDecimalPlacesItem(sal_Int16 nVal=2): SfxInt16Item(SDRATTR_MEASUREDECIMALPLACES,nVal) {}
+ virtual ~SdrMeasureDecimalPlacesItem() override;
+ virtual SdrMeasureDecimalPlacesItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrMeasureDecimalPlacesItem(SdrMeasureDecimalPlacesItem const &) = default;
+ SdrMeasureDecimalPlacesItem(SdrMeasureDecimalPlacesItem &&) = default;
+ SdrMeasureDecimalPlacesItem & operator =(SdrMeasureDecimalPlacesItem const &) = delete; // due to SfxInt16Item
+ SdrMeasureDecimalPlacesItem & operator =(SdrMeasureDecimalPlacesItem &&) = delete; // due to SfxInt16Item
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxmtpitm.hxx b/include/svx/sxmtpitm.hxx
new file mode 100644
index 000000000..60e17d445
--- /dev/null
+++ b/include/svx/sxmtpitm.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXMTPITM_HXX
+#define INCLUDED_SVX_SXMTPITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
+#include <com/sun/star/drawing/MeasureTextVertPos.hpp>
+
+class SVXCORE_DLLPUBLIC SdrMeasureTextHPosItem final : public SfxEnumItem<css::drawing::MeasureTextHorzPos> {
+public:
+ SdrMeasureTextHPosItem(css::drawing::MeasureTextHorzPos ePos = css::drawing::MeasureTextHorzPos::MeasureTextHorzPos_AUTO)
+ : SfxEnumItem(SDRATTR_MEASURETEXTHPOS, ePos)
+ {
+ }
+ virtual SdrMeasureTextHPosItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 4; }
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static const OUString & GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+class SVXCORE_DLLPUBLIC SdrMeasureTextVPosItem final : public SfxEnumItem<css::drawing::MeasureTextVertPos> {
+public:
+ SdrMeasureTextVPosItem(css::drawing::MeasureTextVertPos ePos = css::drawing::MeasureTextVertPos_AUTO)
+ : SfxEnumItem(SDRATTR_MEASURETEXTVPOS, ePos)
+ {
+ }
+ virtual SdrMeasureTextVPosItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 5; }
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxmtritm.hxx b/include/svx/sxmtritm.hxx
new file mode 100644
index 000000000..184a59f39
--- /dev/null
+++ b/include/svx/sxmtritm.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXMTRITM_HXX
+#define INCLUDED_SVX_SXMTRITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svx/sdynitm.hxx>
+
+// text across the dimension line (90deg counter-clockwise rotation)
+class SVXCORE_DLLPUBLIC SdrMeasureTextRota90Item final : public SdrYesNoItem {
+public:
+ SdrMeasureTextRota90Item(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURETEXTROTA90,bOn) {}
+ virtual ~SdrMeasureTextRota90Item() override;
+ virtual SdrMeasureTextRota90Item* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrMeasureTextRota90Item(SdrMeasureTextRota90Item const &) = default;
+ SdrMeasureTextRota90Item(SdrMeasureTextRota90Item &&) = default;
+ SdrMeasureTextRota90Item & operator =(SdrMeasureTextRota90Item const &) = delete; // due to SdrYesNoItem
+ SdrMeasureTextRota90Item & operator =(SdrMeasureTextRota90Item &&) = delete; // due to SdrYesNoItem
+};
+
+// Turn the calculated TextRect through 180 deg
+// Text is also switched to the other side of the dimension line, if not Rota90
+class SdrMeasureTextUpsideDownItem final : public SdrYesNoItem {
+public:
+ SdrMeasureTextUpsideDownItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURETEXTUPSIDEDOWN,bOn) {}
+ virtual ~SdrMeasureTextUpsideDownItem() override;
+ virtual SdrMeasureTextUpsideDownItem* Clone(SfxItemPool* pPool=nullptr) const override;
+
+ SdrMeasureTextUpsideDownItem(SdrMeasureTextUpsideDownItem const &) = default;
+ SdrMeasureTextUpsideDownItem(SdrMeasureTextUpsideDownItem &&) = default;
+ SdrMeasureTextUpsideDownItem & operator =(SdrMeasureTextUpsideDownItem const &) = delete; // due to SdrYesNoItem
+ SdrMeasureTextUpsideDownItem & operator =(SdrMeasureTextUpsideDownItem &&) = delete; // due to SdrYesNoItem
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sxmuitm.hxx b/include/svx/sxmuitm.hxx
new file mode 100644
index 000000000..ab0ad8a3c
--- /dev/null
+++ b/include/svx/sxmuitm.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_SXMUITM_HXX
+#define INCLUDED_SVX_SXMUITM_HXX
+
+#include <svx/svddef.hxx>
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+#include <tools/fldunit.hxx>
+
+// specification of the unit if measurement. The numerical quantity value is converted in this unity.
+// (based on the facts of the MapUnit of the model). This unity is displayed if necessary.
+class SVXCORE_DLLPUBLIC SdrMeasureUnitItem final : public SfxEnumItem<FieldUnit> {
+public:
+ SdrMeasureUnitItem(FieldUnit eUnit=FieldUnit::NONE): SfxEnumItem(SDRATTR_MEASUREUNIT, eUnit) {}
+ virtual SdrMeasureUnitItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override; // { return 14; }
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ static OUString GetValueTextByPos(sal_uInt16 nPos);
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/tabarea.hxx b/include/svx/tabarea.hxx
new file mode 100644
index 000000000..b1307b4c4
--- /dev/null
+++ b/include/svx/tabarea.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_TABAREA_HXX
+#define INCLUDED_SVX_TABAREA_HXX
+
+#include <o3tl/typed_flags_set.hxx>
+
+enum class ChangeType
+{
+ NONE = 0x00,
+ MODIFIED = 0x01,
+ CHANGED = 0x02
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ChangeType> : is_typed_flags<ChangeType, 0x03> {};
+}
+
+#endif // INCLUDED_SVX_TABAREA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/tabline.hxx b/include/svx/tabline.hxx
new file mode 100644
index 000000000..2b6e318da
--- /dev/null
+++ b/include/svx/tabline.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_TABLINE_HXX
+#define INCLUDED_SVX_TABLINE_HXX
+
+class SvxBrushItem;
+class SdrModel;
+class SdrObject;
+
+//defines for the symbol selection on the page
+//Positive value (0,...n) declares the index in pSymbollist, else:
+#define SVX_SYMBOLTYPE_NONE (-3) //symbol hidden
+#define SVX_SYMBOLTYPE_AUTO (-2) //symbol automatically generated
+#define SVX_SYMBOLTYPE_BRUSHITEM (-1) //symbol is contained as graphic in item:
+#define SVX_SYMBOLTYPE_UNKNOWN (-100) //unknown/not initialized
+
+#endif // INCLUDED_SVX_TABLINE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
new file mode 100644
index 000000000..194db28a5
--- /dev/null
+++ b/include/svx/tbcontrl.hxx
@@ -0,0 +1,281 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_TBCONTRL_HXX
+#define INCLUDED_SVX_TBCONTRL_HXX
+
+/*--------------------------------------------------------------*\
+
+ Description:
+ -------------
+ ToolBox-Controller for:
+ Font-Name, Font-Height, Font-Color
+ Fore-/Background color /-patterns
+ Frames, Lines
+ (indentation-)templates
+
+ Use:
+ ----------
+ SvxFontNameToolBoxControl
+ -------------------------
+ Item type: SvxFontItem
+ Execute-Id: SID_ATTR_CHAR_FONT
+ -> SvxFontItem
+ Additional information
+ from DocShell: SvxFontListItem (SID_ATTR_CHAR_FONTLIST)
+
+ SvxColorToolBoxControl
+ ----------------------
+ Item type: SvxColorItem
+ SvxLineItem
+ SfxBoolItem
+ XLineColorItem
+ and XFillColorItem
+
+ for font color (writer, ...)
+ Execute-Id SID_ATTR_CHAR_COLOR2
+ and SID_ATTR_CHAR_COLOR_EXT
+
+ for font color
+ (calc/impress/draw and writer drawing objects)
+ Execute-Id SID_ATTR_CHAR_COLOR
+
+ for character background color (writer)
+ Execute-Id SID_ATTR_CHAR_COLOR_BACKGROUND
+ and SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
+
+ for paragraph background color (writer)
+ and cell background color (calc)
+ Execute-Id SID_BACKGROUND_COLOR
+
+ for table/cell border color (writer, calc)
+ Execute-Id SID_FRAME_LINECOLOR
+
+ for 3D extrusion
+ Execute-Id SID_EXTRUSION_3D_COLOR
+
+ for line color
+ Execute-Id SID_ATTR_LINE_COLOR
+
+ for area fill color
+ Execute-Id SID_ATTR_FILL_COLOR
+
+ SvxPatternToolBoxControl
+ ------------------------
+ Item type: SvxBrushItem
+ Execute-Id: SID_BACKGROUND_PATTERN
+ -> SvxBrushItem
+ Additional information
+ from DocShell: presently none
+ in future: color palette
+ Note: Analysis of BrushItem:
+ Brush-FillColor() is misused as switch,
+ to distinguish whether a new style
+ or a new color has been set
+
+ GetFillColor() == COL_BLACK -> GetStyle() ,
+ GetFillColor() == COL_WHITE -> GetColor()
+
+ SvxFrameToolBoxControl
+ ----------------------
+ Item type: SvxBoxItem
+ Execute-Id: SID_ATTR_BORDER
+ -> SvxBoxItem & SvxBoxInfoItem
+ Additional information
+ from DocShell: none
+ Note: provides, depending on chosen ValueSet-Item,
+ only SvxBoxItem or additionally SvxBoxInfoItem
+ If the Controller in SfxUInt16Item receives a
+ value != 0, paragraph mode will be switched on,
+ i.e. the last line will be hidden.
+ A value == 0 switches again to Table mode.
+
+ SvxFrameLineStyleToolBoxControl
+ -------------------------------
+ Item type: SvxLineItem
+ Execute-Id: SID_FRAME_LINESTYLE
+ -> SvxLineItem
+ Additional information
+ from DocShell: none
+ Note: provides a SvxLineItem, which provides a SvxBorderLine
+ without color information.
+
+ SvxStyleToolBoxControl
+ ----------------------
+ Item type: SfxTemplateItem
+ Execute-Id: SID_TEMPLATE_APPLY
+ -> StyleName (SfxStringItem)
+ -> eStyleFamily (SfxUInt16Item)
+ Additional information
+ from DocShell: none
+ Note: Switch family by Invalidate
+ at the Bindings (->SfxStyleControllerItem)
+
+\*--------------------------------------------------------------*/
+
+// ITEMID_... defines in the *.cxx
+
+#include <config_options.h>
+#include <svl/style.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/frame/XSubToolbarController.hpp>
+#include <svtools/popupwindowcontroller.hxx>
+#include <svx/colorwindow.hxx>
+#include <memory>
+
+// important in the tbxctrls.hxx created with HeDaBu !!!
+class SvxLineItem;
+class SvxBoxInfoItem;
+class SvxFontItem;
+class SfxStyleControllerItem_Impl;
+class SfxStyleSheetBasePool;
+class SfxTemplateItem;
+class PaletteManager;
+
+namespace svx
+{
+ class ToolboxButtonColorUpdaterBase;
+}
+
+class SvxStyleToolBoxControl final : public cppu::ImplInheritanceHelper<svt::ToolboxController,
+ css::lang::XServiceInfo>
+{
+ struct Impl;
+ std::unique_ptr<Impl> pImpl;
+
+public:
+ SvxStyleToolBoxControl();
+ virtual ~SvxStyleToolBoxControl() override;
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
+
+ // XToolbarController
+ virtual css::uno::Reference<css::awt::XWindow> SAL_CALL createItemWindow(const css::uno::Reference<css::awt::XWindow>& rParent) override;
+
+ // XInitialization
+ virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) override;
+
+ // XUpdatable
+ virtual void SAL_CALL update() override;
+
+ // XComponent
+ virtual void SAL_CALL dispose() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+private:
+#define MAX_FAMILIES 5
+
+ SfxStyleSheetBasePool* pStyleSheetPool;
+ rtl::Reference<SfxStyleControllerItem_Impl> m_xBoundItems[MAX_FAMILIES];
+ std::unique_ptr<SfxTemplateItem> pFamilyState[MAX_FAMILIES];
+ sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1
+
+ void Update();
+ void FillStyleBox();
+ void SelectStyle(const OUString& rStyleName);
+
+friend class SfxStyleControllerItem_Impl;
+
+ void SetFamilyState(sal_uInt16 nIdx, const SfxTemplateItem* pItem);
+ SfxStyleFamily GetActFamily() const;
+};
+
+typedef std::function<void(const OUString&, const svx::NamedThemedColor&)> ColorSelectFunction;
+
+class SVXCORE_DLLPUBLIC SvxColorToolBoxControl final : public cppu::ImplInheritanceHelper< svt::PopupWindowController,
+ css::frame::XSubToolbarController >
+{
+ std::unique_ptr<svx::ToolboxButtonColorUpdaterBase> m_xBtnUpdater;
+ std::shared_ptr<PaletteManager> m_xPaletteManager;
+ ColorStatus m_aColorStatus;
+ bool m_bSplitButton;
+ sal_uInt16 m_nSlotId;
+ ColorSelectFunction m_aColorSelectFunction;
+ DECL_DLLPRIVATE_LINK(SelectedHdl, const NamedColor&, void);
+
+ weld::Window* GetParentFrame() const;
+
+public:
+ explicit SvxColorToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext );
+ virtual ~SvxColorToolBoxControl() override;
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence<css::uno::Any>& rArguments ) override;
+
+ // XUpdatable
+ virtual void SAL_CALL update() override;
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 nSelectModifier ) override;
+
+ virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
+ virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
+
+ // XSubToolbarController
+ virtual sal_Bool SAL_CALL opensSubToolbar() override;
+ virtual OUString SAL_CALL getSubToolbarName() override;
+ virtual void SAL_CALL functionSelected( const OUString& rCommand ) override;
+ virtual void SAL_CALL updateImage() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+ void setColorSelectFunction(const ColorSelectFunction& aColorSelectFunction);
+ void EnsurePaletteManager();
+};
+
+class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxCurrencyToolBoxControl final : public svt::PopupWindowController
+{
+private:
+ OUString m_aFormatString;
+ LanguageType m_eLanguage;
+ sal_uInt32 m_nFormatKey;
+
+public:
+ static void GetCurrencySymbols( std::vector<OUString>& rList, bool bFlag,
+ std::vector<sal_uInt16>& rCurrencyList );
+
+ explicit SvxCurrencyToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext );
+ virtual ~SvxCurrencyToolBoxControl() override;
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 nSelectModifier ) override;
+
+ virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
+ virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override;
+};
+
+#endif // INCLUDED_SVX_TBCONTRL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/tbxcolor.hxx b/include/svx/tbxcolor.hxx
new file mode 100644
index 000000000..86dff9a92
--- /dev/null
+++ b/include/svx/tbxcolor.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <com/sun/star/frame/XLayoutManager.hpp>
+#include <svx/svxdllapi.h>
+
+
+namespace svx
+{
+
+
+ //= ToolboxAccess
+
+ class SVX_DLLPUBLIC ToolboxAccess
+ {
+ private:
+ OUString m_sToolboxResName;
+ css::uno::Reference<
+ css::frame::XLayoutManager > m_xLayouter;
+
+ public:
+ ToolboxAccess( std::u16string_view rToolboxName );
+
+ public:
+ /** toggles the toolbox
+ */
+ void toggleToolbox() const;
+
+ /** determines whether the toolbox is currently visible
+ */
+ bool isToolboxVisible() const;
+ };
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/tbxctl.hxx b/include/svx/tbxctl.hxx
new file mode 100644
index 000000000..09af66c61
--- /dev/null
+++ b/include/svx/tbxctl.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_TBXCTL_HXX
+#define INCLUDED_SVX_TBXCTL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Class for SwToolbox
+|*
+\************************************************************************/
+
+class SVX_DLLPUBLIC SvxTbxCtlDraw final : public SfxToolBoxControl
+{
+private:
+ OUString m_sToolboxName;
+
+ void toggleToolbox();
+
+protected:
+
+public:
+ SvxTbxCtlDraw( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rTbx );
+ // XInitialization
+ virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ virtual void Select(sal_uInt16 nSelectModifier) override;
+ virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/transfrmhelper.hxx b/include/svx/transfrmhelper.hxx
new file mode 100644
index 000000000..9e683d445
--- /dev/null
+++ b/include/svx/transfrmhelper.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_TRANSFRMHELPER_HXX
+#define INCLUDED_SVX_TRANSFRMHELPER_HXX
+
+#include <basegfx/range/b2drange.hxx>
+#include <tools/fract.hxx>
+#include <tools/fldunit.hxx>
+#include <tools/mapunit.hxx>
+#include <vcl/fieldvalues.hxx>
+
+namespace TransfrmHelper
+{
+ inline void ConvertRect(basegfx::B2DRange& rRange, const sal_uInt16 nDigits, const MapUnit ePoolUnit, const FieldUnit eDlgUnit)
+ {
+ const basegfx::B2DPoint aTopLeft(
+ static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMinX()), nDigits, ePoolUnit, eDlgUnit)),
+ static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMinY()), nDigits, ePoolUnit, eDlgUnit)));
+ const basegfx::B2DPoint aBottomRight(
+ static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMaxX()), nDigits, ePoolUnit, eDlgUnit)),
+ static_cast<double>(vcl::ConvertValue(basegfx::fround(rRange.getMaxY()), nDigits, ePoolUnit, eDlgUnit)));
+
+ rRange = basegfx::B2DRange(aTopLeft, aBottomRight);
+ }
+
+ inline void ScaleRect(basegfx::B2DRange& rRange, const Fraction& rUIScale)
+ {
+ const double fFactor(1.0 / double(rUIScale));
+ rRange = basegfx::B2DRange(rRange.getMinimum() * fFactor, rRange.getMaximum() * fFactor);
+ }
+}
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
new file mode 100644
index 000000000..c87f07b2e
--- /dev/null
+++ b/include/svx/txencbox.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_TXENCBOX_HXX
+#define INCLUDED_SVX_TXENCBOX_HXX
+
+#include <vcl/weld.hxx>
+#include <rtl/textenc.h>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxTextEncodingBox
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+public:
+ SvxTextEncodingBox(std::unique_ptr<weld::ComboBox> pControl);
+
+ ~SvxTextEncodingBox();
+
+ /** Fill with all known encodings but exclude those matching one or more
+ given flags as defined in rtl/tencinfo.h
+
+ <p> If nButIncludeInfoFlags is given, encodings are included even if they
+ match nExcludeInfoFlags. Thus it is possible to exclude 16/32-bit
+ Unicode with RTL_TEXTENCODING_INFO_UNICODE but to include UTF7 and UTF8
+ with RTL_TEXTENCODING_INFO_MIME </p>
+
+ @param bExcludeImportSubsets
+ If <TRUE/>, some specific encodings are not listed, as they are a
+ subset of another encoding. This is the case for
+ RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK,
+ RTL_TEXTENCODING_MS_936, which are covered by
+ RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to
+ <TRUE/> whenever the box is used in import dialogs. */
+ void FillFromTextEncodingTable(
+ bool bExcludeImportSubsets,
+ sal_uInt32 nExcludeInfoFlags = 0,
+ sal_uInt32 nButIncludeInfoFlags = 0
+ );
+
+ /** Fill with all encodings known to the dbtools::OCharsetMap but exclude
+ those matching one or more given flags as defined in rtl/tencinfo.h
+
+ <p> If nButIncludeInfoFlags is given, encodings are included even if they
+ match nExcludeInfoFlags. Thus it is possible to exclude 16/32-bit
+ Unicode with RTL_TEXTENCODING_INFO_UNICODE but to include UTF7 and UTF8
+ with RTL_TEXTENCODING_INFO_MIME </p>
+
+ @param bExcludeImportSubsets
+ If <TRUE/>, some specific encodings are not listed, as they are a
+ subset of another encoding. This is the case for
+ RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK,
+ RTL_TEXTENCODING_MS_936, which are covered by
+ RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to
+ <TRUE/> whenever the box is used in import dialogs. */
+ void FillFromDbTextEncodingMap(
+ bool bExcludeImportSubsets,
+ sal_uInt32 nExcludeInfoFlags = 0);
+
+ void InsertTextEncoding( const rtl_TextEncoding nEnc );
+
+ void InsertTextEncoding( const rtl_TextEncoding nEnc,
+ const OUString& rEntry );
+
+ void SelectTextEncoding( const rtl_TextEncoding nEnc );
+
+ rtl_TextEncoding GetSelectTextEncoding() const;
+
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
+ void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
+ void grab_focus() { m_xControl->grab_focus(); }
+ int get_active() const { return m_xControl->get_active(); }
+ void set_active(int nActive) { m_xControl->set_active(nActive); }
+ void show() { m_xControl->show(); }
+ void hide() { m_xControl->hide(); }
+};
+
+class SVX_DLLPUBLIC SvxTextEncodingTreeView
+{
+private:
+ std::unique_ptr<weld::TreeView> m_xControl;
+
+public:
+ SvxTextEncodingTreeView(std::unique_ptr<weld::TreeView> pControl);
+
+ ~SvxTextEncodingTreeView();
+
+ /** Fill with all known encodings but exclude those matching one or more
+ given flags as defined in rtl/tencinfo.h
+
+ @param bExcludeImportSubsets
+ If <TRUE/>, some specific encodings are not listed, as they are a
+ subset of another encoding. This is the case for
+ RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK,
+ RTL_TEXTENCODING_MS_936, which are covered by
+ RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to
+ <TRUE/> whenever the box is used in import dialogs. */
+ void FillFromTextEncodingTable(
+ bool bExcludeImportSubsets,
+ sal_uInt32 nExcludeInfoFlags = 0);
+
+ /** Fill with all encodings known to the dbtools::OCharsetMap but exclude
+ those matching one or more given flags as defined in rtl/tencinfo.h
+
+ @param bExcludeImportSubsets
+ If <TRUE/>, some specific encodings are not listed, as they are a
+ subset of another encoding. This is the case for
+ RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK,
+ RTL_TEXTENCODING_MS_936, which are covered by
+ RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to
+ <TRUE/> whenever the box is used in import dialogs. */
+ void FillFromDbTextEncodingMap(
+ bool bExcludeImportSubsets,
+ sal_uInt32 nExcludeInfoFlags = 0);
+
+ void InsertTextEncoding( const rtl_TextEncoding nEnc );
+
+ void InsertTextEncoding( const rtl_TextEncoding nEnc,
+ const OUString& rEntry );
+
+ void SelectTextEncoding( const rtl_TextEncoding nEnc );
+
+ rtl_TextEncoding GetSelectTextEncoding() const;
+
+ void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); }
+ void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) { m_xControl->connect_row_activated(rLink); }
+ void grab_focus() { m_xControl->grab_focus(); }
+ void show() { m_xControl->show(); }
+ void hide() { m_xControl->hide(); }
+ int get_height_rows(int nRows) const
+ {
+ return m_xControl->get_height_rows(nRows);
+ }
+ void set_size_request(int nWidth, int nHeight)
+ {
+ m_xControl->set_size_request(nWidth, nHeight);
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/txenctab.hxx b/include/svx/txenctab.hxx
new file mode 100644
index 000000000..c4bbbd4e9
--- /dev/null
+++ b/include/svx/txenctab.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_TXENCTAB_HXX
+#define INCLUDED_SVX_TXENCTAB_HXX
+
+#include <rtl/textenc.h>
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxTextEncodingTable
+{
+public:
+ static OUString GetTextString(const rtl_TextEncoding nEnc);
+ static rtl_TextEncoding GetTextEncoding(const OUString& rStr);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ucsubset.hxx b/include/svx/ucsubset.hxx
new file mode 100644
index 000000000..21251c4b5
--- /dev/null
+++ b/include/svx/ucsubset.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UCSUBSET_HXX
+#define INCLUDED_SVX_UCSUBSET_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <vcl/vclenum.hxx>
+#include <vcl/metric.hxx>
+
+#include <vector>
+
+class FontCharMap;
+
+// TODO: should be moved into Font Attributes territory,
+// we let them mature here though because this is currently the only use
+
+class Subset
+{
+public:
+ Subset(sal_UCS4 nMin, sal_UCS4 nMax, const OUString& rName);
+
+ sal_UCS4 GetRangeMin() const { return mnRangeMin;}
+ sal_UCS4 GetRangeMax() const { return mnRangeMax;}
+ const OUString& GetName() const { return maRangeName;}
+
+private:
+ sal_UCS4 mnRangeMin;
+ sal_UCS4 mnRangeMax;
+ OUString maRangeName;
+};
+
+inline bool operator<(const Subset &rLHS, const Subset &rRHS)
+{
+ return rLHS.GetRangeMin() < rRHS.GetRangeMin();
+}
+
+typedef ::std::vector<Subset> SubsetVec;
+
+class SVX_DLLPUBLIC SubsetMap
+{
+public:
+ SubsetMap( const FontCharMapRef& );
+
+ const Subset* GetSubsetByUnicode( sal_UCS4 ) const;
+ const SubsetVec& GetSubsetMap() const;
+
+private:
+ SubsetVec maSubsets;
+
+ SVX_DLLPRIVATE void InitList();
+ SVX_DLLPRIVATE void ApplyCharMap( const FontCharMapRef& );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/uiobject.hxx b/include/svx/uiobject.hxx
new file mode 100644
index 000000000..4fd63c9d0
--- /dev/null
+++ b/include/svx/uiobject.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_UIOBJECT_HXX
+#define INCLUDED_SVX_UIOBJECT_HXX
+
+#include <svx/svxdllapi.h>
+
+#include <svx/SvxColorValueSet.hxx>
+
+#include <vcl/uitest/uiobject.hxx>
+
+class SdrObject;
+class SvxColorValueSet;
+
+class SVXCORE_DLLPUBLIC SdrUIObject : public UIObject
+{
+public:
+
+ virtual ~SdrUIObject() override;
+
+ virtual StringMap get_state() override;
+
+ virtual void execute(const OUString& rAction,
+ const StringMap& rParameters) override;
+
+ virtual OUString get_type() const override;
+
+ virtual SdrObject* get_object() = 0;
+};
+
+class SvxColorValueSetUIObject final : public DrawingAreaUIObject
+{
+ SvxColorValueSet* mpColorSet;
+
+public:
+
+ SvxColorValueSetUIObject(vcl::Window* pColorSetWin);
+
+ virtual void execute(const OUString& rAction,
+ const StringMap& rParameters) override;
+
+ static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
+
+ virtual StringMap get_state() override;
+
+private:
+
+ OUString get_name() const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx
new file mode 100644
index 000000000..3107a4835
--- /dev/null
+++ b/include/svx/unoapi.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOAPI_HXX
+#define INCLUDED_SVX_UNOAPI_HXX
+
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <rtl/ref.hxx>
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <tools/fldunit.hxx>
+#include <tools/mapunit.hxx>
+
+class SvxShape;
+class SdrObject;
+class SdrPage;
+class SvxNumBulletItem;
+class SfxItemPool;
+enum class SdrInventor : sal_uInt32;
+enum class SdrObjKind : sal_uInt16;
+
+/**
+ * Creates a StarOffice API wrapper with the given type and inventor
+ * Deprecated: This will be replaced with a function returning XShape.
+ *
+ * @throws css::uno::RuntimeException
+ */
+SVXCORE_DLLPUBLIC rtl::Reference<SvxShape> CreateSvxShapeByTypeAndInventor(SdrObjKind nType, SdrInventor nInventor, OUString const & referer);
+
+/** Returns a StarOffice API wrapper for the given SdrObject */
+SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) noexcept;
+
+/** Returns a StarOffice API wrapper for the given SdrPage */
+SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) noexcept;
+
+/** Returns the SdrPage from the given StarOffice API wrapper */
+SVXCORE_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage ) noexcept ;
+
+/**
+ * Maps the vcl MapUnit enum to an API constant MeasureUnit.
+ * Returns false if conversion is not supported.
+ */
+SVXCORE_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) noexcept;
+
+/**
+ * Maps the API constant MeasureUnit to a vcl MapUnit enum.
+ * Returns false if conversion is not supported.
+ */
+SVXCORE_DLLPUBLIC bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& nVcl ) noexcept;
+
+/**
+ * Maps the vcl MapUnit enum to an API constant MeasureUnit.
+ * Returns false if conversion is not supported.
+ */
+SVXCORE_DLLPUBLIC bool SvxFieldUnitToMeasureUnit( const FieldUnit nVcl, short& eApi ) noexcept;
+
+/**
+ * If the given name is a predefined name for the current language it is replaced by
+ * the corresponding API name.
+ *
+ * @throws std::exception
+*/
+[[nodiscard]] SVXCORE_DLLPUBLIC OUString
+ SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName);
+
+/**
+ * If the given name is a predefined API name it is replaced by the predefined name
+ * for the current language.
+ *
+ * @throws std::exception
+*/
+[[nodiscard]] OUString
+ SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName);
+
+#endif // INCLUDED_SVX_UNOAPI_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unobrushitemhelper.hxx b/include/svx/unobrushitemhelper.hxx
new file mode 100644
index 000000000..1bb7d8f14
--- /dev/null
+++ b/include/svx/unobrushitemhelper.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_UNOBRUSHITEMHELPER_HXX
+#define INCLUDED_SVX_UNOBRUSHITEMHELPER_HXX
+
+#include <svx/svxdllapi.h>
+#include <editeng/brushitem.hxx>
+
+// Helper function definitions for UNO API fallbacks to replace SvxBrushItem. The
+// idea is to have fallbacks to create a SvxBrushItem if needed for backwards compatibility
+// if needed from the SfxItemSet and vice versa. This is used in cases where e.g. UNO API
+// accesses to slots in the SvxBrushItem are used (see cases in SvxBrushItem::QueryValue
+// and SvxBrushItem::PutValue as MID_BACK_COLOR and similar).
+// To make this work, a cycle of creating a SvxBrushItem from a SfxItemSet, changing a value
+// using PutValue, putting back to the SfxItemSet should create the *same* SvxBrushItem
+// the next time this will be created using getSvxBrushItemFromSourceSet. For more details,
+// see comments at the implementations of that two methods.
+
+// Set the equivalent in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST] in the given
+// SfxItemSet to create the same FillStyle as is expressed by the given SvxBrushItem.
+// This method will reset all items in the XATTR_FILL_* range first.
+SVXCORE_DLLPUBLIC void setSvxBrushItemAsFillAttributesToTargetSet(
+ const SvxBrushItem& rBrush,
+ SfxItemSet& rToSet);
+
+// Create a SvxBrushItem as close as possible to the settings in the DrawingLayer
+// items in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. Since this is not 100%
+// representable this may lead to reduced data. With nBackgroundID a Which-ID for the
+// to-be-created SvxBrushItem has to be given (default should be 99 as in RES_BACKGROUND).
+SVXCORE_DLLPUBLIC std::unique_ptr<SvxBrushItem> getSvxBrushItemFromSourceSet(
+ const SfxItemSet& rSourceSet,
+ sal_uInt16 nBackgroundID,
+ bool bSearchInParents = true,
+ bool bXMLImportHack = false);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unodraw/SvxTableShape.hxx b/include/svx/unodraw/SvxTableShape.hxx
new file mode 100644
index 000000000..518d3ac2c
--- /dev/null
+++ b/include/svx/unodraw/SvxTableShape.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+#include <svx/unoshape.hxx>
+
+class SVXCORE_DLLPUBLIC SvxTableShape : public SvxShape
+{
+protected:
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl(const OUString& rName,
+ const SfxItemPropertyMapEntry* pProperty,
+ const css::uno::Any& rValue) override;
+ virtual bool getPropertyValueImpl(const OUString& rName,
+ const SfxItemPropertyMapEntry* pProperty,
+ css::uno::Any& rValue) override;
+
+ virtual void lock() override;
+ virtual void unlock() override;
+
+public:
+ explicit SvxTableShape(SdrObject* pObj);
+ virtual ~SvxTableShape() noexcept override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unofill.hxx b/include/svx/unofill.hxx
new file mode 100644
index 000000000..a59f9c8fb
--- /dev/null
+++ b/include/svx/unofill.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOFILL_HXX
+#define INCLUDED_SVX_UNOFILL_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+#include <svx/svxdllapi.h>
+
+class SdrModel;
+
+SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxUnoGradientTable_createInstance( SdrModel* pModel );
+SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxUnoHatchTable_createInstance( SdrModel* pModel );
+SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxUnoBitmapTable_createInstance( SdrModel* pModel );
+SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxUnoTransGradientTable_createInstance( SdrModel* pModel );
+SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxUnoMarkerTable_createInstance( SdrModel* pModel );
+SVXCORE_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvxUnoDashTable_createInstance( SdrModel* pModel );
+
+#endif // INCLUDED_SVX_UNOFILL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unomaster.hxx b/include/svx/unomaster.hxx
new file mode 100644
index 000000000..f544d2f8b
--- /dev/null
+++ b/include/svx/unomaster.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOMASTER_HXX
+#define INCLUDED_SVX_UNOMASTER_HXX
+
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+
+/** this abstract class is the interface for an instance that likes to enhance
+ the functionality of components implemented with derivations from SvxShape
+
+ @see SvxShape::setMaster
+*/
+class SvxShapeMaster
+{
+public:
+ virtual bool queryAggregation( const css::uno::Type & rType, css::uno::Any& aAny ) = 0;
+
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) = 0;
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::beans::PropertyVetoException
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) = 0;
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) = 0;
+
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::uno::RuntimeException
+ virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) = 0;
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::uno::RuntimeException
+ virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) = 0;
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) = 0;
+
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) = 0;
+
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() = 0;
+
+ virtual void dispose() = 0;
+
+protected:
+ ~SvxShapeMaster() {}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unomid.hxx b/include/svx/unomid.hxx
new file mode 100644
index 000000000..fe07fee51
--- /dev/null
+++ b/include/svx/unomid.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_UNOMID_HXX
+#define INCLUDED_SVX_UNOMID_HXX
+
+//SvxPageItem
+#define MID_PAGE_NUMTYPE 0
+#define MID_PAGE_ORIENTATION 1
+#define MID_PAGE_LAYOUT 2
+
+//SvxMarginItem
+#define MID_MARGIN_L_MARGIN 2
+#define MID_MARGIN_R_MARGIN 3
+#define MID_MARGIN_UP_MARGIN 4
+#define MID_MARGIN_LO_MARGIN 5
+
+#define ALL_BORDER 10
+#define ALL_BORDER_PADDING 11
+#define LEFT_BORDER_PADDING 12
+#define RIGHT_BORDER_PADDING 13
+#define TOP_BORDER_PADDING 14
+#define BOTTOM_BORDER_PADDING 15
+#define ALL_BORDER_LINE_WIDTH 16
+#define LEFT_BORDER_LINE_WIDTH 17
+#define RIGHT_BORDER_LINE_WIDTH 18
+#define TOP_BORDER_LINE_WIDTH 19
+#define BOTTOM_BORDER_LINE_WIDTH 20
+
+// XFillBitmapItem (is also a NameOrIndex)
+#define MID_BITMAP 8
+
+// SvxObjectItem
+#define MID_START_X 1
+#define MID_START_Y 2
+#define MID_END_X 3
+#define MID_END_Y 4
+#define MID_LIMIT 5
+
+// SvxColumnItem
+#define MID_COLUMNARRAY 7
+#define MID_ACTUAL 4
+#define MID_TABLE 5
+#define MID_ORTHO 6
+
+// XFillGradientItem
+// Don't use 0 as it used for the whole struct
+#define MID_FILLGRADIENT 1
+#define MID_GRADIENT_STYLE 2
+#define MID_GRADIENT_STARTCOLOR 3
+#define MID_GRADIENT_ENDCOLOR 4
+#define MID_GRADIENT_ANGLE 5
+#define MID_GRADIENT_BORDER 6
+#define MID_GRADIENT_XOFFSET 7
+#define MID_GRADIENT_YOFFSET 8
+#define MID_GRADIENT_STARTINTENSITY 9
+#define MID_GRADIENT_ENDINTENSITY 10
+#define MID_GRADIENT_STEPCOUNT 11
+
+// XFillHatchItem
+// Don't use 0 as it used for the whole struct
+#define MID_FILLHATCH 1
+#define MID_HATCH_STYLE 2
+#define MID_HATCH_COLOR 3
+#define MID_HATCH_DISTANCE 4
+#define MID_HATCH_ANGLE 5
+
+// XLineDashItem
+// Don't use 0 as it used for the whole struct
+#define MID_LINEDASH 1
+#define MID_LINEDASH_STYLE 2
+#define MID_LINEDASH_DOTS 3
+#define MID_LINEDASH_DOTLEN 4
+#define MID_LINEDASH_DASHES 5
+#define MID_LINEDASH_DASHLEN 6
+#define MID_LINEDASH_DISTANCE 7
+
+#define MID_LEFT 3
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unomod.hxx b/include/svx/unomod.hxx
new file mode 100644
index 000000000..d786824eb
--- /dev/null
+++ b/include/svx/unomod.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOMOD_HXX
+#define INCLUDED_SVX_UNOMOD_HXX
+
+#include <sal/config.h>
+
+#include <string_view>
+
+#include <com/sun/star/document/EventObject.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <svx/svxdllapi.h>
+
+class SdrHint;
+class SdrModel;
+
+SVXCORE_DLLPUBLIC css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel* pModel);
+
+class SVXCORE_DLLPUBLIC SvxUnoDrawMSFactory : public css::lang::XMultiServiceFactory
+{
+protected:
+ /** abstract SdrModel provider */
+ // Every App has a DrwingLayer as internal Tooling, thus ist is
+ // not too hard to asl a UnoModel to hand back a DrawingLayer Model in the
+ // form of an SdrModel. Thus, returning a reference and make usages
+ // safer and easier is justified.
+ virtual SdrModel& getSdrModelFromUnoModel() const = 0; //TTTT make reference return
+
+public:
+ SvxUnoDrawMSFactory() noexcept {};
+
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& ServiceSpecifier, const css::uno::Sequence< css::uno::Any >& Arguments ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) override;
+
+ /// @throws css::uno::Exception
+ /// @throws css::uno::RuntimeException
+ static css::uno::Reference< css::uno::XInterface > createTextField( std::u16string_view aServiceSpecifier );
+
+ /** fills the given EventObject from the given SdrHint.
+ @returns
+ true if the SdrHint could be translated to an EventObject<br>
+ false if not
+ */
+ static bool createEvent( const SdrModel* pDoc, const SdrHint* pSdrHint, css::document::EventObject& aEvent );
+
+protected:
+ ~SvxUnoDrawMSFactory() {}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unomodel.hxx b/include/svx/unomodel.hxx
new file mode 100644
index 000000000..87ccd82b0
--- /dev/null
+++ b/include/svx/unomodel.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOMODEL_HXX
+#define INCLUDED_SVX_UNOMODEL_HXX
+
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <sfx2/sfxbasemodel.hxx>
+#include <svx/fmdmod.hxx>
+#include <svx/svxdllapi.h>
+#include <cppuhelper/weakref.hxx>
+
+class SdrModel;
+
+class SVXCORE_DLLPUBLIC SvxUnoDrawingModel
+: public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
+ public SvxFmMSFactory,
+ public css::drawing::XDrawPagesSupplier,
+ public css::lang::XServiceInfo,
+ public css::ucb::XAnyCompareFactory
+{
+ friend class SvxUnoDrawPagesAccess;
+
+private:
+ SdrModel* mpDoc;
+
+ css::uno::WeakReference< css::drawing::XDrawPages > mxDrawPagesAccess;
+
+ css::uno::Reference< css::uno::XInterface > mxDashTable;
+ css::uno::Reference< css::uno::XInterface > mxGradientTable;
+ css::uno::Reference< css::uno::XInterface > mxHatchTable;
+ css::uno::Reference< css::uno::XInterface > mxBitmapTable;
+ css::uno::Reference< css::uno::XInterface > mxTransGradientTable;
+ css::uno::Reference< css::uno::XInterface > mxMarkerTable;
+
+ css::uno::Sequence< css::uno::Type > maTypeSequence;
+
+protected:
+ // SvxUnoDrawMSFactory
+ virtual SdrModel& getSdrModelFromUnoModel() const override;
+
+public:
+ SvxUnoDrawingModel( SdrModel* pDoc ) noexcept;
+ virtual ~SvxUnoDrawingModel() noexcept override;
+
+ SdrModel* GetDoc() const { return mpDoc; }
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SfxBaseModel::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SfxBaseModel::release(); }
+
+ // XModel
+ virtual void SAL_CALL lockControllers( ) override;
+ virtual void SAL_CALL unlockControllers( ) override;
+ virtual sal_Bool SAL_CALL hasControllersLocked( ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ // XDrawPagesSupplier
+ virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages( ) override;
+
+ // XMultiServiceFactory ( SvxFmMSFactory )
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ // XAnyCompareFactory
+ virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const OUString& PropertyName ) override;
+};
+
+SVXCORE_DLLPUBLIC extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut );
+extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut, const css::uno::Reference< css::lang::XComponent >& xComponent );
+SVXCORE_DLLPUBLIC extern bool SvxDrawingLayerExport( SdrModel* pModel, const css::uno::Reference<css::io::XOutputStream>& xOut, const css::uno::Reference< css::lang::XComponent >& xComponent, const char* pExportService );
+SVXCORE_DLLPUBLIC extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream );
+extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream, const css::uno::Reference< css::lang::XComponent >& xComponent );
+SVXCORE_DLLPUBLIC extern bool SvxDrawingLayerImport( SdrModel* pModel, const css::uno::Reference<css::io::XInputStream>& xInputStream, const css::uno::Reference< css::lang::XComponent >& xComponent, const char* pImportService );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
new file mode 100644
index 000000000..e69eb7ec8
--- /dev/null
+++ b/include/svx/unopage.hxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_UNOPAGE_HXX
+#define INCLUDED_SVX_UNOPAGE_HXX
+
+#include <com/sun/star/lang/XComponent.hpp>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XShapes2.hpp>
+#include <com/sun/star/drawing/XShapes3.hpp>
+#include <com/sun/star/drawing/XShapeGrouper.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/basemutex.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/svdobjkind.hxx>
+#include <rtl/ref.hxx>
+
+#include <cppuhelper/implbase7.hxx>
+#include <comphelper/servicehelper.hxx>
+
+#include <memory>
+
+class SdrPage;
+class SdrModel;
+class SdrView;
+class SdrPageView;
+class SdrObject;
+class SvxShape;
+class SvxShapeGroup;
+class SvxShapeConnector;
+enum class SdrInventor : sal_uInt32;
+
+class SVXCORE_DLLPUBLIC SvxDrawPage : protected cppu::BaseMutex,
+ public ::cppu::WeakAggImplHelper7< css::drawing::XDrawPage,
+ css::drawing::XShapeGrouper,
+ css::drawing::XShapes2,
+ css::drawing::XShapes3,
+ css::lang::XServiceInfo,
+ css::lang::XUnoTunnel,
+ css::lang::XComponent>
+
+{
+ protected:
+ cppu::OBroadcastHelper mrBHelper;
+
+ SdrPage* mpPage; // TTTT should be reference
+ SdrModel* mpModel; // TTTT probably not needed -> use from SdrPage
+ std::unique_ptr<SdrView> mpView;
+
+ void SelectObjectsInView( const css::uno::Reference< css::drawing::XShapes >& aShapes, SdrPageView* pPageView ) noexcept;
+ void SelectObjectInView( const css::uno::Reference< css::drawing::XShape >& xShape, SdrPageView* pPageView ) noexcept;
+
+ virtual void disposing() noexcept;
+
+ public:
+ SvxDrawPage(SdrPage* pPage);
+ virtual ~SvxDrawPage() noexcept override;
+
+ // Internals
+ SdrPage* GetSdrPage() const { return mpPage; }
+
+ // Creation of a SdrObject and insertion into the SdrPage
+ SdrObject *CreateSdrObject( const css::uno::Reference< css::drawing::XShape >& xShape, bool bBeginning = false ) noexcept;
+
+ // Determine Type and Inventor
+ static void GetTypeAndInventor( SdrObjKind& rType, SdrInventor& rInventor, const OUString& aName ) noexcept;
+
+ // Creating a SdrObject using it's Description.
+ // Can be used by derived classes to support their owen Shapes (e.g. Controls).
+ /// @throws css::uno::RuntimeException
+ virtual SdrObject *CreateSdrObject_( const css::uno::Reference< css::drawing::XShape >& xShape );
+
+ /// @throws css::uno::RuntimeException
+ static rtl::Reference<SvxShape> CreateShapeByTypeAndInventor( SdrObjKind nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage = nullptr, OUString const & referer = OUString() );
+
+ // The following method is called if a SvxShape object is to be created.
+ // Derived classes can create a derivation or an SvxShape aggregating object.
+ /// @throws css::uno::RuntimeException
+ virtual css::uno::Reference< css::drawing::XShape > CreateShape( SdrObject *pObj ) const;
+
+ UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage )
+
+ // XInterface
+ virtual void SAL_CALL release() noexcept override;
+
+ // XShapes
+ virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+ virtual void SAL_CALL remove( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+
+ // XShapes2
+ virtual void SAL_CALL addTop( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+ virtual void SAL_CALL addBottom( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+
+ // XShapes3
+ virtual void SAL_CALL sort( const css::uno::Sequence< sal_Int32 >& sortOrder ) override;
+
+ // XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType() override;
+ virtual sal_Bool SAL_CALL hasElements() override;
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() override ;
+ virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
+
+ // XShapeGrouper
+ virtual css::uno::Reference< css::drawing::XShapeGroup > SAL_CALL group( const css::uno::Reference< css::drawing::XShapes >& xShapes ) override;
+ virtual void SAL_CALL ungroup( const css::uno::Reference< css::drawing::XShapeGroup >& aGroup ) override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ // XComponent
+ virtual void SAL_CALL dispose() override;
+ virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
+ virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unopool.hxx b/include/svx/unopool.hxx
new file mode 100644
index 000000000..96b9bc179
--- /dev/null
+++ b/include/svx/unopool.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOPOOL_HXX
+#define INCLUDED_SVX_UNOPOOL_HXX
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <comphelper/propertysethelper.hxx>
+#include <cppuhelper/weakagg.hxx>
+#include <svx/svxdllapi.h>
+#include <svl/itempool.hxx>
+
+class SdrModel;
+class SfxItemPool;
+
+/** This class implements the service com.sun.star.drawing.Defaults.
+ It works on the SfxItemPool from the given model and the global
+ draw object item pool.
+ The class can work in a read only mode without a model. Derivated
+ classes can set a model on demand by overriding getModelPool().
+*/
+class SVX_DLLPUBLIC SvxUnoDrawPool : public ::cppu::OWeakAggObject,
+ public css::lang::XServiceInfo,
+ public css::lang::XTypeProvider,
+ public comphelper::PropertySetHelper
+{
+public:
+ SvxUnoDrawPool(SdrModel* pModel, sal_Int32 nServiceId);
+
+ /** deprecated */
+ SvxUnoDrawPool(SdrModel* pModel);
+ virtual ~SvxUnoDrawPool() noexcept override;
+
+ /** This returns the item pool from the given model, or the default pool if there is no model and bReadOnly is true.
+ If bReadOnly is false and there is no model the default implementation returns NULL.
+ */
+ virtual SfxItemPool* getModelPool( bool bReadOnly ) noexcept;
+
+ // overridden helpers from comphelper::PropertySetHelper
+ virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const css::uno::Any* pValues ) override;
+ virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, css::uno::Any* pValue ) override;
+
+ virtual void _getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, css::beans::PropertyState* pStates ) override;
+ virtual void _setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry ) override;
+ virtual css::uno::Any _getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { OWeakAggObject::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { OWeakAggObject::release(); }
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+protected:
+ void init();
+
+ /// @throws css::beans::UnknownPropertyException
+ static void getAny( SfxItemPool const * pPool, const comphelper::PropertyMapEntry* pEntry, css::uno::Any& rValue );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::uno::RuntimeException
+ virtual void putAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, const css::uno::Any& rValue );
+
+protected:
+ SdrModel* mpModel;
+ rtl::Reference<SfxItemPool> mpDefaultsPool;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx
new file mode 100644
index 000000000..f7ee83979
--- /dev/null
+++ b/include/svx/unoprov.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOPROV_HXX
+#define INCLUDED_SVX_UNOPROV_HXX
+
+#include <config_options.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <svl/itemprop.hxx>
+#include <svx/svxdllapi.h>
+#include <editeng/unoipset.hxx>
+#include <rtl/ref.hxx>
+#include <memory>
+#include <optional>
+
+class SvxItemPropertySet;
+class SfxItemPool;
+enum class SdrObjKind : sal_uInt16;
+
+/**
+ * class UHashMap
+ */
+class UHashMap
+{
+ UHashMap() = delete;
+public:
+ static std::optional<SdrObjKind> getId( const OUString& rCompareString );
+ static OUString getNameFromId (SdrObjKind nId);
+ static css::uno::Sequence< OUString > getServiceNames();
+};
+
+/**
+ * Sorter
+ */
+
+#define SVXMAP_SHAPE 0
+#define SVXMAP_CONNECTOR 1
+#define SVXMAP_DIMENSIONING 2
+#define SVXMAP_CIRCLE 3
+#define SVXMAP_POLYPOLYGON 4
+#define SVXMAP_GRAPHICOBJECT 5
+#define SVXMAP_3DSCENEOBJECT 6
+#define SVXMAP_3DCUBEOBJECT 7
+#define SVXMAP_3DSPHEREOBJECT 8
+#define SVXMAP_3DLATHEOBJECT 9
+#define SVXMAP_3DEXTRUDEOBJECT 10
+#define SVXMAP_3DPOLYGONOBJECT 11
+#define SVXMAP_ALL 12
+#define SVXMAP_GROUP 13
+#define SVXMAP_CAPTION 14
+#define SVXMAP_OLE2 15
+#define SVXMAP_PLUGIN 16
+#define SVXMAP_FRAME 17
+#define SVXMAP_APPLET 18
+#define SVXMAP_CONTROL 19
+#define SVXMAP_TEXT 20
+#define SVXMAP_CUSTOMSHAPE 21
+#define SVXMAP_MEDIA 22
+#define SVXMAP_TABLE 23
+#define SVXMAP_PAGE 24
+#define SVXMAP_END 25 // last+1 !
+
+/**
+ * SvxUnoPropertyMapProvider
+ */
+
+class SVXCORE_DLLPUBLIC SvxUnoPropertyMapProvider
+{
+ SfxItemPropertyMapEntry const * aMapArr[SVXMAP_END];
+ std::unique_ptr<SvxItemPropertySet> aSetArr[SVXMAP_END];
+public:
+ SvxUnoPropertyMapProvider();
+ ~SvxUnoPropertyMapProvider();
+ const SfxItemPropertyMapEntry* GetMap(sal_uInt16 nPropertyId);
+ const SvxItemPropertySet* GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool);
+};
+
+/**
+ * class SvxPropertySetInfoPool
+ */
+
+const sal_Int32 SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS = 0;
+const sal_Int32 SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER = 1;
+const sal_Int32 SVXUNO_SERVICEID_LASTID = 1;
+
+namespace comphelper { class PropertySetInfo; }
+
+class SvxPropertySetInfoPool
+{
+public:
+ UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) static rtl::Reference<comphelper::PropertySetInfo> const & getOrCreate( sal_Int32 nServiceId ) noexcept;
+
+private:
+ static rtl::Reference<comphelper::PropertySetInfo> mxInfos[SVXUNO_SERVICEID_LASTID+1];
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
new file mode 100644
index 000000000..3185d958a
--- /dev/null
+++ b/include/svx/unoshape.hxx
@@ -0,0 +1,871 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOSHAPE_HXX
+#define INCLUDED_SVX_UNOSHAPE_HXX
+
+#include <memory>
+#include <com/sun/star/document/XActionLockable.hpp>
+#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
+#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/drawing/PolygonKind.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/XShapes2.hpp>
+#include <com/sun/star/drawing/XShapeGroup.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/drawing/XConnectorShape.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <sal/types.h>
+#include <tools/weakbase.hxx>
+#include <svl/lstner.hxx>
+#include <editeng/unoipset.hxx>
+#include <svx/svxdllapi.h>
+#include <rtl/ref.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <editeng/unotext.hxx>
+
+#include <svx/svdobj.hxx>
+
+#include <comphelper/servicehelper.hxx>
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/implbase12.hxx>
+
+class SfxItemSet;
+class SdrModel;
+class SvxDrawPage;
+class SvGlobalName;
+class Pair;
+
+// Dimension arrows change size/position on save/reload (#i59051#)
+namespace basegfx
+ {
+ class B2DPolyPolygon;
+ } // end of namespace basegfx
+
+struct SvxShapeImpl;
+class SvxShapeMaster;
+class SvxItemPropertySet;
+class SfxItemSet;
+
+void SVXCORE_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SfxItemPropertyMapEntry* pMap,
+ const css::uno::Any& rVal, SfxItemSet& rSet );
+
+css::uno::Any SVXCORE_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SfxItemPropertyMapEntry* pMap, const SfxItemSet& rSet );
+
+
+// WARNING: if you update the supported interfaces,
+// also update SvxShape::_getTypes()
+typedef ::cppu::WeakAggImplHelper12<
+ css::drawing::XShape,
+ css::lang::XComponent,
+ css::beans::XPropertySet,
+ css::beans::XMultiPropertySet,
+ css::beans::XPropertyState,
+ css::lang::XUnoTunnel,
+ css::container::XNamed,
+ css::drawing::XGluePointsSupplier,
+ css::container::XChild,
+ css::lang::XServiceInfo,
+ css::document::XActionLockable,
+ css::beans::XMultiPropertyStates> SvxShape_UnoImplHelper;
+
+class SVXCORE_DLLPUBLIC SvxShape :
+ public cppu::BaseMutex,
+ public SvxShape_UnoImplHelper,
+ public SfxListener
+{
+private:
+ css::awt::Size maSize;
+ css::awt::Point maPosition;
+ OUString maShapeType;
+ OUString maShapeName;
+
+ /** these members are used to optimize XMultiProperty calls */
+ std::unique_ptr<SvxShapeImpl> mpImpl;
+ bool mbIsMultiPropertyCall;
+
+ css::uno::WeakReference< css::container::XIndexContainer > mxGluePoints;
+
+protected:
+ friend class SvxDrawPage;
+ friend class SvxShapeConnector;
+ friend class SdXShape;
+
+ const SvxItemPropertySet* mpPropSet;
+ SvxItemPropertySetUsrAnys maUrsAnys;
+ const SfxItemPropertyMapEntry* maPropMapEntries;
+
+private:
+ ::tools::WeakReference< SdrObject > mpSdrObjectWeakReference;
+
+protected:
+ // translations for writer, which works in TWIPS
+ void ForceMetricToItemPoolMetric(Pair& rPoint) const noexcept;
+ void ForceMetricToItemPoolMetric(Point& rPoint) const noexcept { ForceMetricToItemPoolMetric(rPoint.toPair()); }
+ void ForceMetricToItemPoolMetric(Size& rPoint) const noexcept { ForceMetricToItemPoolMetric(rPoint.toPair()); }
+ void ForceMetricTo100th_mm(Pair& rPoint) const noexcept;
+ void ForceMetricTo100th_mm(Point& rPoint) const noexcept { ForceMetricTo100th_mm(rPoint.toPair()); }
+ void ForceMetricTo100th_mm(Size& rPoint) const noexcept { ForceMetricTo100th_mm(rPoint.toPair()); }
+
+ // version for basegfx::B2DPolyPolygon
+ void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const noexcept;
+ void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const noexcept;
+
+ // tdf#117145 version for basegfx::B2DHomMatrix
+ void ForceMetricToItemPoolMetric(basegfx::B2DHomMatrix& rB2DHomMatrix) const noexcept;
+ void ForceMetricTo100th_mm(basegfx::B2DHomMatrix& rB2DHomMatrix) const noexcept;
+
+ css::uno::Any GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertyMapEntry* pMap ) const;
+
+ bool SetFillAttribute( sal_uInt16 nWID, const OUString& rName );
+
+ /** called from the XActionLockable interface methods on initial locking */
+ virtual void lock();
+
+ /** called from the XActionLockable interface methods on final unlock */
+ virtual void unlock();
+
+ /** used from the XActionLockable interface */
+ sal_uInt16 mnLockCount;
+
+ const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
+
+ void updateShapeKind();
+ void endSetPropertyValues();
+
+ // override these for special property handling in subcasses. Return true if property is handled
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::beans::PropertyVetoException
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::uno::RuntimeException
+ virtual bool getPropertyStateImpl( const SfxItemPropertyMapEntry* pProperty, css::beans::PropertyState& rState );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::uno::RuntimeException
+ virtual bool setPropertyToDefaultImpl( const SfxItemPropertyMapEntry* pProperty );
+
+public:
+ /// @throws css::uno::RuntimeException
+ SvxShape( SdrObject* pObj );
+ /// @throws css::uno::RuntimeException
+ SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet );
+ virtual ~SvxShape() noexcept override;
+
+ // Internals
+ void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet);
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage );
+ /** takes the ownership of the SdrObject.
+
+ When the shape is disposed, and it has the ownership of its associated SdrObject, then
+ it will delete this object.
+ */
+ void TakeSdrObjectOwnership();
+ bool HasSdrObjectOwnership() const;
+
+ // used exclusively by SdrObject
+ void InvalidateSdrObject();
+
+ // Encapsulated access to SdrObject
+ SdrObject* GetSdrObject() const { return mpSdrObjectWeakReference.get(); }
+ bool HasSdrObject() const { return mpSdrObjectWeakReference.is(); }
+
+ void SetShapeType( const OUString& ShapeType ) { maShapeType = ShapeType; }
+ /// @throws css::uno::RuntimeException
+ css::uno::Any GetBitmap( bool bMetaFile = false ) const;
+
+ svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
+
+ void setShapeKind( SdrObjKind nKind );
+ SdrObjKind getShapeKind() const;
+
+ // styles need this
+ static bool SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItemSet& rSet, SdrModel const * pModel );
+ static bool SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItemSet& rSet );
+
+ /** same as SetFillAttribute but for property names instead of which ids,
+ and the property found is returned instead of set at the object
+ directly.
+ */
+
+ UNO3_GETIMPLEMENTATION_DECL( SvxShape )
+
+ // access methods for master objects
+ /// @throws css::uno::RuntimeException
+ css::uno::Reference< css::beans::XPropertySetInfo > const & _getPropertySetInfo( );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::beans::PropertyVetoException
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ void _setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ css::uno::Any _getPropertyValue( const OUString& PropertyName );
+
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::uno::RuntimeException
+ css::beans::PropertyState _getPropertyState( const OUString& PropertyName );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::uno::RuntimeException
+ void _setPropertyToDefault( const OUString& PropertyName );
+ /// @throws css::beans::UnknownPropertyException
+ /// @throws css::lang::WrappedTargetException
+ /// @throws css::uno::RuntimeException
+ css::uno::Any _getPropertyDefault( const OUString& aPropertyName );
+
+ /// @throws css::uno::RuntimeException
+ css::uno::Sequence< OUString > _getSupportedServiceNames();
+
+ /// @throws css::uno::RuntimeException
+ css::uno::Sequence< css::uno::Type > const & _getTypes( );
+
+ void setMaster( SvxShapeMaster* pMaster );
+
+ // SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) noexcept override;
+
+ // XAggregation
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override;
+
+ // XNamed
+ virtual OUString SAL_CALL getName( ) override;
+ virtual void SAL_CALL setName( const OUString& aName ) override;
+
+ // XShapeDescriptor
+ virtual OUString SAL_CALL getShapeType() override;
+
+ // XShape
+ virtual css::awt::Point SAL_CALL getPosition() override;
+ virtual void SAL_CALL setPosition( const css::awt::Point& aPosition ) override;
+ virtual css::awt::Size SAL_CALL getSize() override;
+ virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
+
+ // XComponent
+ virtual void SAL_CALL dispose() override;
+ virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
+ virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
+
+ // XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
+ virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
+ virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
+ virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
+ virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
+ virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
+ virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
+
+ // XMultiPropertySet
+ virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override;
+ virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames ) override;
+ virtual void SAL_CALL addPropertiesChangeListener( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
+ virtual void SAL_CALL removePropertiesChangeListener( const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
+ virtual void SAL_CALL firePropertiesChangeEvent( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
+
+ // XPropertyState
+ virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
+ virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override;
+ virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
+ virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
+
+ // XMultiPropertyStates
+ virtual void SAL_CALL setAllPropertiesToDefault() override;
+ virtual void SAL_CALL setPropertiesToDefault(
+ const css::uno::Sequence<
+ OUString >& aPropertyNames ) override;
+ virtual css::uno::Sequence< css::uno::Any >
+ SAL_CALL getPropertyDefaults(
+ const css::uno::Sequence<
+ OUString >& aPropertyNames ) override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+
+ // XGluePointsSupplier
+ virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getGluePoints( ) override;
+
+ // XChild
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
+ virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ // XActionLockable
+ virtual sal_Bool SAL_CALL isActionLocked( ) override;
+ virtual void SAL_CALL addActionLock( ) override;
+ virtual void SAL_CALL removeActionLock( ) override;
+ virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) override;
+ virtual sal_Int16 SAL_CALL resetActionLocks( ) override;
+
+private:
+ /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL
+ */
+ SVX_DLLPRIVATE void impl_initFromSdrObject();
+ /// CTOR-Impl
+ SVX_DLLPRIVATE void impl_construct();
+};
+
+class SVXCORE_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
+{
+protected:
+ /** called from the XActionLockable interface methods on initial locking */
+ virtual void lock() override;
+
+ /** called from the XActionLockable interface methods on final unlock */
+ virtual void unlock() override;
+
+protected:
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+ virtual bool getPropertyStateImpl( const SfxItemPropertyMapEntry* pProperty, css::beans::PropertyState& rState ) override;
+ virtual bool setPropertyToDefaultImpl( const SfxItemPropertyMapEntry* pProperty ) override;
+
+public:
+ SvxShapeText(SdrObject* pObj);
+ SvxShapeText(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet);
+ virtual ~SvxShapeText() noexcept override;
+
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShape::release(); }
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+
+ // css::text::XTextRange
+ virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override;
+ virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override;
+ virtual OUString SAL_CALL getString() override;
+ virtual void SAL_CALL setString( const OUString& aString ) override;
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+};
+
+class SAL_DLLPUBLIC_RTTI SvxShapeRect final : public SvxShapeText
+{
+public:
+ SVXCORE_DLLPUBLIC SvxShapeRect(SdrObject* pObj);
+ virtual ~SvxShapeRect() noexcept override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { OWeakAggObject::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { OWeakAggObject::release(); }
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+/// This only exists so I have a common base class for SvxShapeGroup and Svx3DSceneObject
+class SVXCORE_DLLPUBLIC SvxShapeGroupAnyD : public SvxShape,
+ public css::drawing::XShapes
+{
+public:
+ SvxShapeGroupAnyD( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet );
+ virtual ~SvxShapeGroupAnyD() noexcept override;
+
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShape::release(); }
+
+ virtual void addShape(SvxShape& rShape) = 0;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SVXCORE_DLLPUBLIC SvxShapeGroup final : public SvxShapeGroupAnyD,
+ public css::drawing::XShapeGroup,
+ public css::drawing::XShapes2
+{
+private:
+ rtl::Reference< SvxDrawPage> mxPage;
+
+ void addUnoShape( const css::uno::Reference< css::drawing::XShape >& xShape, size_t nPos );
+ void addShape(SvxShape& rShape, size_t nPos);
+
+public:
+ SvxShapeGroup(SdrObject* pObj,SvxDrawPage* pDrawPage);
+ virtual ~SvxShapeGroup() noexcept override;
+
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShape::release(); }
+
+ // XShapes
+ virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+ virtual void SAL_CALL remove( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+
+ // XShapes2
+ virtual void SAL_CALL addTop( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+ virtual void SAL_CALL addBottom( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+
+ // XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType() override;
+ virtual sal_Bool SAL_CALL hasElements() override;
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() override ;
+ virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
+
+ // XShapeDescriptor
+ virtual OUString SAL_CALL getShapeType() override;
+
+ // XShape
+ virtual css::awt::Point SAL_CALL getPosition() override;
+ virtual void SAL_CALL setPosition( const css::awt::Point& aPosition ) override;
+ virtual css::awt::Size SAL_CALL getSize() override;
+ virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
+
+ // XShapeGroup
+ virtual void SAL_CALL enterGroup( ) override;
+ virtual void SAL_CALL leaveGroup( ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ virtual void addShape(SvxShape& rShape) final override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SvxShapeConnector final : public css::drawing::XConnectorShape,
+ public SvxShapeText
+{
+public:
+ SvxShapeConnector(SdrObject* pObj);
+ virtual ~SvxShapeConnector() noexcept override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShapeText::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShapeText::release(); }
+
+ // XShapeDescriptor
+ virtual OUString SAL_CALL getShapeType() override;
+
+ // XShape
+ virtual css::awt::Point SAL_CALL getPosition() override;
+ virtual void SAL_CALL setPosition( const css::awt::Point& aPosition ) override;
+ virtual css::awt::Size SAL_CALL getSize() override;
+ virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
+
+ // XConnectorShape
+ virtual void SAL_CALL connectStart( const css::uno::Reference< css::drawing::XConnectableShape >& xShape, css::drawing::ConnectionType nPos ) override;
+ virtual void SAL_CALL connectEnd( const css::uno::Reference< css::drawing::XConnectableShape >& xShape, css::drawing::ConnectionType nPos ) override;
+ virtual void SAL_CALL disconnectBegin( const css::uno::Reference< css::drawing::XConnectableShape >& xShape ) override;
+ virtual void SAL_CALL disconnectEnd( const css::uno::Reference< css::drawing::XConnectableShape >& xShape ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SVXCORE_DLLPUBLIC SvxShapeControl final : public css::drawing::XControlShape, public SvxShapeText
+{
+protected:
+ using SvxUnoTextRangeBase::setPropertyValue;
+ using SvxUnoTextRangeBase::getPropertyValue;
+
+public:
+ SvxShapeControl(SdrObject* pObj);
+ virtual ~SvxShapeControl() noexcept override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShapeText::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShapeText::release(); }
+
+ // XPropertySet
+ virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
+ virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
+
+ // XPropertyState
+ virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
+ virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
+ virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
+
+ // XShapeDescriptor
+ virtual OUString SAL_CALL getShapeType() override;
+
+ // XShape
+ virtual css::awt::Point SAL_CALL getPosition() override;
+ virtual void SAL_CALL setPosition( const css::awt::Point& aPosition ) override;
+ virtual css::awt::Size SAL_CALL getSize() override;
+ virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
+
+ // XControlShape
+ virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getControl() override;
+ virtual void SAL_CALL setControl( const css::uno::Reference< css::awt::XControlModel >& xControl ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SvxShapeDimensioning final : public SvxShapeText
+{
+public:
+ SvxShapeDimensioning(SdrObject* pObj);
+ virtual ~SvxShapeDimensioning() noexcept override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SvxShapeCircle final : public SvxShapeText
+{
+public:
+ SVXCORE_DLLPUBLIC SvxShapeCircle(SdrObject* pObj);
+ virtual ~SvxShapeCircle() noexcept override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+// #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
+class SVXCORE_DLLPUBLIC SvxOle2Shape : public SvxShapeText
+{
+protected:
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+ void resetModifiedState();
+
+ SvGlobalName GetClassName_Impl(OUString& rHexCLSID);
+public:
+ SvxOle2Shape(SdrObject* pObj);
+ SvxOle2Shape(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet);
+ virtual ~SvxOle2Shape() noexcept override;
+
+ bool createObject( const SvGlobalName &aClassName );
+
+ void createLink( const OUString& aLinkURL );
+
+ virtual OUString GetAndClearInitialFrameURL();
+};
+
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SAL_DLLPUBLIC_RTTI SvxShapePolyPolygon final : public SvxShapeText
+{
+ using SvxUnoTextRangeBase::setPropertyValue;
+ using SvxUnoTextRangeBase::getPropertyValue;
+
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+ // local helper to detect PolygonKind from SdrObject::GetObjIdentifier()
+ css::drawing::PolygonKind GetPolygonKind() const;
+
+public:
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::beans::PropertyVetoException
+ SVXCORE_DLLPUBLIC SvxShapePolyPolygon( SdrObject* pObj );
+ virtual ~SvxShapePolyPolygon() noexcept override;
+
+ // Local support functions
+ /// @throws css::uno::RuntimeException
+ void SetPolygon(const basegfx::B2DPolyPolygon& rNew);
+ basegfx::B2DPolyPolygon GetPolygon() const noexcept;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+class SvxGraphicObject final : public SvxShapeText
+{
+ using SvxUnoTextRangeBase::setPropertyValue;
+ using SvxUnoTextRangeBase::getPropertyValue;
+
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+public:
+ SVXCORE_DLLPUBLIC SvxGraphicObject(SdrObject* pObj);
+ virtual ~SvxGraphicObject() noexcept override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SAL_DLLPUBLIC_RTTI Svx3DSceneObject final : public SvxShapeGroupAnyD
+{
+private:
+ rtl::Reference< SvxDrawPage > mxPage;
+
+protected:
+ using SvxShape::setPropertyValue;
+ using SvxShape::getPropertyValue;
+
+public:
+ SVXCORE_DLLPUBLIC Svx3DSceneObject(SdrObject* pObj, SvxDrawPage* pDrawPage);
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl(const OUString& rName, const SfxItemPropertyMapEntry* pProperty,
+ css::uno::Any& rValue ) override;
+
+ virtual ~Svx3DSceneObject() noexcept override;
+
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShape::release(); }
+
+ // XShapes
+ virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+ virtual void SAL_CALL remove( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
+
+ // XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) override;
+ virtual sal_Bool SAL_CALL hasElements( ) override;
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) override ;
+ virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ virtual void addShape(SvxShape& rShape) override final;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class Svx3DCubeObject final : public SvxShape
+{
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+public:
+ Svx3DCubeObject(SdrObject* pObj);
+ virtual ~Svx3DCubeObject() noexcept override;
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class Svx3DSphereObject final : public SvxShape
+{
+public:
+ Svx3DSphereObject(SdrObject* pObj);
+private:
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+ virtual ~Svx3DSphereObject() noexcept override;
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class Svx3DLatheObject final : public SvxShape
+{
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+public:
+ SVXCORE_DLLPUBLIC Svx3DLatheObject(SdrObject* pObj);
+ virtual ~Svx3DLatheObject() noexcept override;
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class Svx3DExtrudeObject final : public SvxShape
+{
+public:
+ SVXCORE_DLLPUBLIC Svx3DExtrudeObject(SdrObject* pObj);
+private:
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+ virtual ~Svx3DExtrudeObject() noexcept override;
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class Svx3DPolygonObject final : public SvxShape
+{
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+public:
+ SVXCORE_DLLPUBLIC Svx3DPolygonObject(SdrObject* pObj);
+ virtual ~Svx3DPolygonObject() noexcept override;
+
+ // XServiceInfo
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SVXCORE_DLLPUBLIC SvxCustomShape final : public SvxShapeText, public css::drawing::XEnhancedCustomShapeDefaulter
+{
+protected:
+ using SvxUnoTextRangeBase::setPropertyValue;
+ using SvxUnoTextRangeBase::getPropertyValue;
+
+public:
+ SvxCustomShape(SdrObject* pObj);
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+
+
+ virtual ~SvxCustomShape() noexcept override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire() noexcept override
+ { SvxShapeText::acquire(); }
+ virtual void SAL_CALL release() noexcept override
+ { SvxShapeText::release(); }
+
+ // XShape
+ virtual css::awt::Point SAL_CALL getPosition() override;
+
+ // XPropertySet
+ void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ //XEnhancedCustomShapeDefaulter
+ virtual void SAL_CALL createCustomShapeDefaults( const OUString& rShapeType ) override;
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+class SvxMediaShape final : public SvxShape
+{
+public:
+ SvxMediaShape(SdrObject* pObj, OUString const & referer);
+ virtual ~SvxMediaShape() noexcept override;
+
+private:
+ // override these for special property handling in subcasses. Return true if property is handled
+ virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
+ virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
+ bool getPropertyStateImpl(const SfxItemPropertyMapEntry* pProperty,
+ css::beans::PropertyState& rState) override;
+
+ OUString referer_;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
new file mode 100644
index 000000000..b32b8672c
--- /dev/null
+++ b/include/svx/unoshprp.hxx
@@ -0,0 +1,577 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOSHPRP_HXX
+#define INCLUDED_SVX_UNOSHPRP_HXX
+
+#include <com/sun/star/drawing/PointSequence.hpp>
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/drawing/TextAnimationDirection.hpp>
+#include <com/sun/star/drawing/TextAnimationKind.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/MeasureKind.hpp>
+#include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
+#include <com/sun/star/drawing/MeasureTextVertPos.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+#include <com/sun/star/drawing/CircleKind.hpp>
+#include <com/sun/star/drawing/PolygonKind.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/ColorMode.hpp>
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#include <com/sun/star/drawing/Direction3D.hpp>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/drawing/Position3D.hpp>
+#include <com/sun/star/drawing/NormalsKind.hpp>
+#include <com/sun/star/drawing/TextureKind.hpp>
+#include <com/sun/star/drawing/TextureMode.hpp>
+#include <com/sun/star/drawing/TextureProjectionMode.hpp>
+#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
+#include <com/sun/star/text/GraphicCrop.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/drawing/CameraGeometry.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/drawing/BarCode.hpp>
+
+#include <editeng/unoprnms.hxx>
+#include <svx/svddef.hxx>
+#include <svx/unomid.hxx>
+#include <editeng/unotext.hxx>
+
+#include <editeng/memberids.h>
+#include <svl/solar.hrc>
+
+#define OWN_ATTR_VALUE_START_TEXT (OWN_ATTR_VALUE_START+0) // the next 10 entries are reserved for text
+#define OWN_ATTR_VALUE_POLYGONKIND (OWN_ATTR_VALUE_START+10)
+#define OWN_ATTR_VALUE_POLYPOLYGON (OWN_ATTR_VALUE_START+11)
+#define OWN_ATTR_VALUE_POLYPOLYGONBEZIER (OWN_ATTR_VALUE_START+12)
+#define OWN_ATTR_VALUE_FILLBITMAP (OWN_ATTR_VALUE_START+13)
+#define OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX (OWN_ATTR_VALUE_START+14)
+#define OWN_ATTR_3D_VALUE_POSITION (OWN_ATTR_VALUE_START+15)
+#define OWN_ATTR_3D_VALUE_SIZE (OWN_ATTR_VALUE_START+16)
+#define OWN_ATTR_3D_VALUE_POS_IS_CENTER (OWN_ATTR_VALUE_START+17)
+#define OWN_ATTR_3D_VALUE_POLYPOLYGON3D (OWN_ATTR_VALUE_START+18)
+#define OWN_ATTR_3D_VALUE_LINEONLY (OWN_ATTR_VALUE_START+19)
+#define OWN_ATTR_BITMAP (OWN_ATTR_VALUE_START+20)
+#define OWN_ATTR_EDGE_START_OBJ (OWN_ATTR_VALUE_START+21)
+#define OWN_ATTR_EDGE_START_POS (OWN_ATTR_VALUE_START+22)
+#define OWN_ATTR_EDGE_END_OBJ (OWN_ATTR_VALUE_START+23)
+#define OWN_ATTR_EDGE_END_POS (OWN_ATTR_VALUE_START+24)
+#define OWN_ATTR_FRAMERECT (OWN_ATTR_VALUE_START+25)
+#define OWN_ATTR_VALUE_POLYGON (OWN_ATTR_VALUE_START+26)
+#define OWN_ATTR_METAFILE (OWN_ATTR_VALUE_START+27)
+#define OWN_ATTR_ISFONTWORK (OWN_ATTR_VALUE_START+28)
+#define OWN_ATTR_BOUNDRECT (OWN_ATTR_VALUE_START+29)
+#define OWN_ATTR_LDNAME (OWN_ATTR_VALUE_START+30)
+#define OWN_ATTR_LDBITMAP (OWN_ATTR_VALUE_START+31)
+#define OWN_ATTR_OLESIZE (OWN_ATTR_VALUE_START+32)
+#define OWN_ATTR_GRAPHIC_URL (OWN_ATTR_VALUE_START+33)
+#define OWN_ATTR_OLEMODEL (OWN_ATTR_VALUE_START+34)
+#define OWN_ATTR_MIRRORED (OWN_ATTR_VALUE_START+35)
+#define OWN_ATTR_CLSID (OWN_ATTR_VALUE_START+36)
+#define OWN_ATTR_GLUEID_TAIL (OWN_ATTR_VALUE_START+37)
+#define OWN_ATTR_GLUEID_HEAD (OWN_ATTR_VALUE_START+38)
+#define OWN_ATTR_ZORDER (OWN_ATTR_VALUE_START+39)
+#define OWN_ATTR_MEASURE_START_POS (OWN_ATTR_VALUE_START+40)
+#define OWN_ATTR_MEASURE_END_POS (OWN_ATTR_VALUE_START+41)
+#define OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY (OWN_ATTR_VALUE_START+42)
+#define OWN_ATTR_WRITINGMODE (OWN_ATTR_VALUE_START+43)
+#define OWN_ATTR_GRAFSTREAMURL (OWN_ATTR_VALUE_START+44)
+#define OWN_ATTR_FILLBMP_MODE (OWN_ATTR_VALUE_START+45)
+#define OWN_ATTR_TRANSFORMATION (OWN_ATTR_VALUE_START+46)
+#define OWN_ATTR_BASE_GEOMETRY (OWN_ATTR_VALUE_START+47)
+
+/// reuse attr slots for GraphicObject which will never be used together with graphic object
+#define OWN_ATTR_REPLACEMENT_GRAPHIC (OWN_ATTR_VALUE_START+14)
+
+#define OWN_ATTR_APPLET_DOCBASE (OWN_ATTR_VALUE_START+48)
+#define OWN_ATTR_APPLET_CODEBASE (OWN_ATTR_VALUE_START+49)
+#define OWN_ATTR_APPLET_NAME (OWN_ATTR_VALUE_START+50)
+#define OWN_ATTR_APPLET_CODE (OWN_ATTR_VALUE_START+51)
+#define OWN_ATTR_APPLET_COMMANDS (OWN_ATTR_VALUE_START+52)
+#define OWN_ATTR_APPLET_ISSCRIPT (OWN_ATTR_VALUE_START+53)
+#define OWN_ATTR_PLUGIN_MIMETYPE (OWN_ATTR_VALUE_START+54)
+#define OWN_ATTR_PLUGIN_URL (OWN_ATTR_VALUE_START+55)
+#define OWN_ATTR_PLUGIN_COMMANDS (OWN_ATTR_VALUE_START+56)
+#define OWN_ATTR_FRAME_URL (OWN_ATTR_VALUE_START+57)
+#define OWN_ATTR_FRAME_NAME (OWN_ATTR_VALUE_START+58)
+#define OWN_ATTR_FRAME_ISAUTOSCROLL (OWN_ATTR_VALUE_START+59)
+#define OWN_ATTR_FRAME_ISBORDER (OWN_ATTR_VALUE_START+60)
+#define OWN_ATTR_FRAME_MARGIN_WIDTH (OWN_ATTR_VALUE_START+61)
+#define OWN_ATTR_FRAME_MARGIN_HEIGHT (OWN_ATTR_VALUE_START+62)
+
+// reuse own attr from ole shapes for tables
+#define OWN_ATTR_TABLETEMPLATE (OWN_ATTR_VALUE_START+48)
+#define OWN_ATTR_TABLETEMPLATE_FIRSTROW (OWN_ATTR_VALUE_START+49)
+#define OWN_ATTR_TABLETEMPLATE_LASTROW (OWN_ATTR_VALUE_START+50)
+#define OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN (OWN_ATTR_VALUE_START+51)
+#define OWN_ATTR_TABLETEMPLATE_LASTCOLUMN (OWN_ATTR_VALUE_START+52)
+#define OWN_ATTR_TABLETEMPLATE_BANDINGROWS (OWN_ATTR_VALUE_START+53)
+#define OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS (OWN_ATTR_VALUE_START+54)
+#define OWN_ATTR_TABLEBORDER (OWN_ATTR_VALUE_START+55)
+
+#define OWN_ATTR_OLE_VISAREA (OWN_ATTR_VALUE_START+63)
+#define OWN_ATTR_CAPTION_POINT (OWN_ATTR_VALUE_START+64)
+#define OWN_ATTR_PAGE_NUMBER (OWN_ATTR_VALUE_START+65)
+#define OWN_ATTR_THUMBNAIL (OWN_ATTR_VALUE_START+66)
+#define OWN_ATTR_PERSISTNAME (OWN_ATTR_VALUE_START+67)
+#define OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT (OWN_ATTR_VALUE_START+68)
+#define OWN_ATTR_MEDIA_URL (OWN_ATTR_VALUE_START+69)
+#define OWN_ATTR_MEDIA_PREFERREDSIZE (OWN_ATTR_VALUE_START+70)
+#define OWN_ATTR_MEDIA_LOOP (OWN_ATTR_VALUE_START+71)
+#define OWN_ATTR_MEDIA_MUTE (OWN_ATTR_VALUE_START+72)
+#define OWN_ATTR_MEDIA_VOLUMEDB (OWN_ATTR_VALUE_START+73)
+#define OWN_ATTR_MEDIA_ZOOM (OWN_ATTR_VALUE_START+74)
+#define OWN_ATTR_UINAME_SINGULAR (OWN_ATTR_VALUE_START+75)
+#define OWN_ATTR_UINAME_PLURAL (OWN_ATTR_VALUE_START+76)
+#define OWN_ATTR_VALUE_GRAPHIC (OWN_ATTR_VALUE_START+77)
+#define OWN_ATTR_INTERNAL_OLE (OWN_ATTR_VALUE_START+78)
+#define OWN_ATTR_OLE_EMBEDDED_OBJECT (OWN_ATTR_VALUE_START+79)
+#define OWN_ATTR_OLE_ASPECT (OWN_ATTR_VALUE_START+80)
+
+// #i68101#
+#define OWN_ATTR_MISC_OBJ_TITLE (OWN_ATTR_VALUE_START+81)
+#define OWN_ATTR_MISC_OBJ_DESCRIPTION (OWN_ATTR_VALUE_START+82)
+
+#define OWN_ATTR_GRAPHIC_STREAM (OWN_ATTR_VALUE_START+83)
+#define OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D (OWN_ATTR_VALUE_START+84)
+#define OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D (OWN_ATTR_VALUE_START+85)
+
+#define OWN_ATTR_OLE_LINKURL (OWN_ATTR_VALUE_START+86)
+
+#define OWN_ATTR_STYLE (OWN_ATTR_VALUE_START+87)
+
+#define OWN_ATTR_EDGE_POLYPOLYGONBEZIER (OWN_ATTR_VALUE_START+88)
+
+#define OWN_ATTR_MEDIA_STREAM (OWN_ATTR_VALUE_START+89)
+#define OWN_ATTR_MEDIA_TEMPFILEURL (OWN_ATTR_VALUE_START+90)
+#define OWN_ATTR_INTEROPGRABBAG (OWN_ATTR_VALUE_START+91)
+#define OWN_ATTR_MEDIA_MIMETYPE (OWN_ATTR_VALUE_START+92)
+#define OWN_ATTR_FALLBACK_GRAPHIC (OWN_ATTR_VALUE_START+93)
+#define OWN_ATTR_IS_SIGNATURELINE (OWN_ATTR_VALUE_START+94)
+#define OWN_ATTR_SIGNATURELINE_ID (OWN_ATTR_VALUE_START+95)
+#define OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_NAME (OWN_ATTR_VALUE_START+96)
+#define OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_TITLE (OWN_ATTR_VALUE_START+97)
+#define OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_EMAIL (OWN_ATTR_VALUE_START+98)
+#define OWN_ATTR_SIGNATURELINE_SIGNING_INSTRUCTIONS (OWN_ATTR_VALUE_START+99)
+#define OWN_ATTR_SIGNATURELINE_SHOW_SIGN_DATE (OWN_ATTR_VALUE_START+100)
+#define OWN_ATTR_SIGNATURELINE_CAN_ADD_COMMENT (OWN_ATTR_VALUE_START+101)
+#define OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE (OWN_ATTR_VALUE_START+102)
+#define OWN_ATTR_SIGNATURELINE_IS_SIGNED (OWN_ATTR_VALUE_START+103)
+#define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104)
+#define OWN_ATTR_TEXTFITTOSIZESCALE (OWN_ATTR_VALUE_START+105)
+#define OWN_ATTR_TEXTCOLUMNS (OWN_ATTR_VALUE_START+106)
+#define OWN_ATTR_HYPERLINK (OWN_ATTR_VALUE_START+107)
+// ATTENTION: current maximum is OWN_ATTR_VALUE_START+107 svx; wnen adding values, update
+// OWN_ATTR_VALUE_END in include/svl/solar.hrc accordingly
+
+// #FontWork#
+#define FONTWORK_PROPERTIES \
+ { u"FontWorkStyle", XATTR_FORMTXTSTYLE, /*ENUM*/::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"FontWorkAdjust", XATTR_FORMTXTADJUST, /*ENUM*/::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"FontWorkDistance", XATTR_FORMTXTDISTANCE, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"FontWorkStart", XATTR_FORMTXTSTART, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"FontWorkMirror", XATTR_FORMTXTMIRROR, cppu::UnoType<bool>::get(), 0, 0}, \
+ { u"FontWorkOutline", XATTR_FORMTXTOUTLINE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { u"FontWorkShadow", XATTR_FORMTXTSHADOW, /*ENUM*/::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"FontWorkShadowColor", XATTR_FORMTXTSHDWCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"FontWorkShadowOffsetX", XATTR_FORMTXTSHDWXVAL, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"FontWorkShadowOffsetY", XATTR_FORMTXTSHDWYVAL, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"FontWorkHideForm", XATTR_FORMTXTHIDEFORM, cppu::UnoType<bool>::get(), 0, 0}, \
+ { u"FontWorkShadowTransparence",XATTR_FORMTXTSHDWTRANSP, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
+
+#define GLOW_PROPERTIES \
+ { u"GlowEffectRadius", SDRATTR_GLOW_RADIUS, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"GlowEffectColor", SDRATTR_GLOW_COLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"GlowEffectTransparency", SDRATTR_GLOW_TRANSPARENCY,::cppu::UnoType<sal_Int16>::get(), 0, 0 },
+
+#define SOFTEDGE_PROPERTIES \
+ { u"SoftEdgeRadius", SDRATTR_SOFTEDGE_RADIUS, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
+
+#define SHADOW_PROPERTIES \
+ { UNO_NAME_SHADOW, SDRATTR_SHADOW, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_SHADOWCOLOR, SDRATTR_SHADOWCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_SHADOWTRANSPARENCE,SDRATTR_SHADOWTRANSPARENCE, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_SHADOWXDIST, SDRATTR_SHADOWXDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_SHADOWYDIST, SDRATTR_SHADOWYDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_SHADOWSIZEX, SDRATTR_SHADOWSIZEX, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_SHADOWSIZEY, SDRATTR_SHADOWSIZEY, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_SHADOWBLUR, SDRATTR_SHADOWBLUR, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
+
+
+#define LINE_PROPERTIES_DEFAULTS\
+ { UNO_NAME_LINECAP, XATTR_LINECAP, ::cppu::UnoType<css::drawing::LineCap>::get(), 0, 0}, \
+ { UNO_NAME_LINECOLOR, XATTR_LINECOLOR, ::cppu::UnoType<sal_Int32>::get() , 0, 0}, \
+ { UNO_NAME_LINEENDCENTER, XATTR_LINEENDCENTER, cppu::UnoType<bool>::get() , 0, 0}, \
+ { UNO_NAME_LINEENDWIDTH, XATTR_LINEENDWIDTH, ::cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_LINEJOINT, XATTR_LINEJOINT, ::cppu::UnoType<css::drawing::LineJoint>::get(), 0, 0}, \
+ { UNO_NAME_LINESTARTCENTER, XATTR_LINESTARTCENTER, cppu::UnoType<bool>::get() , 0, 0}, \
+ { UNO_NAME_LINESTARTWIDTH, XATTR_LINESTARTWIDTH, ::cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_LINESTYLE, XATTR_LINESTYLE, cppu::UnoType<css::drawing::LineStyle>::get() , 0, 0}, \
+ { UNO_NAME_LINETRANSPARENCE, XATTR_LINETRANSPARENCE, ::cppu::UnoType<sal_Int16>::get() , 0, 0}, \
+ { UNO_NAME_LINEWIDTH, XATTR_LINEWIDTH, ::cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM},
+
+#define LINE_PROPERTIES \
+ { UNO_NAME_LINEDASH, XATTR_LINEDASH, ::cppu::UnoType<css::drawing::LineDash>::get() , 0, MID_LINEDASH}, \
+ { u"LineDashName", XATTR_LINEDASH, ::cppu::UnoType<OUString>::get() , 0, MID_NAME}, \
+ LINE_PROPERTIES_DEFAULTS
+
+#define LINE_PROPERTIES_START_END \
+ { UNO_NAME_LINEEND, XATTR_LINEEND, ::cppu::UnoType<css::drawing::PolyPolygonBezierCoords>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, \
+ { u"LineEndName", XATTR_LINEEND, ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
+ { UNO_NAME_LINESTART, XATTR_LINESTART, ::cppu::UnoType<css::drawing::PolyPolygonBezierCoords>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, \
+ { u"LineStartName", XATTR_LINESTART, ::cppu::UnoType<OUString>::get(), 0, MID_NAME },
+
+#define FILL_PROPERTIES_BMP \
+ { UNO_NAME_FILLBMP_LOGICAL_SIZE, XATTR_FILLBMP_SIZELOG, cppu::UnoType<bool>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_OFFSET_X, XATTR_FILLBMP_TILEOFFSETX, ::cppu::UnoType<sal_Int32>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_OFFSET_Y, XATTR_FILLBMP_TILEOFFSETY, ::cppu::UnoType<sal_Int32>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_POSITION_OFFSET_X, XATTR_FILLBMP_POSOFFSETX, ::cppu::UnoType<sal_Int32>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_POSITION_OFFSET_Y, XATTR_FILLBMP_POSOFFSETY, ::cppu::UnoType<sal_Int32>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_RECTANGLE_POINT, XATTR_FILLBMP_POS, ::cppu::UnoType<css::drawing::RectanglePoint>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_SIZE_X, XATTR_FILLBMP_SIZEX, ::cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_FILLBMP_SIZE_Y, XATTR_FILLBMP_SIZEY, ::cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_FILLBMP_STRETCH, XATTR_FILLBMP_STRETCH, cppu::UnoType<bool>::get() , 0, 0}, \
+ { UNO_NAME_FILLBMP_TILE, XATTR_FILLBMP_TILE, cppu::UnoType<bool>::get() , 0, 0},\
+ { UNO_NAME_FILLBMP_MODE, OWN_ATTR_FILLBMP_MODE, ::cppu::UnoType<css::drawing::BitmapMode>::get(), 0, 0},
+
+#define FILL_PROPERTIES_DEFAULTS \
+ { UNO_NAME_FILLCOLOR, XATTR_FILLCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+
+#define FILL_PROPERTIES \
+ FILL_PROPERTIES_BMP \
+ FILL_PROPERTIES_DEFAULTS \
+ { UNO_NAME_FILLBACKGROUND, XATTR_FILLBACKGROUND , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_FILLBITMAP, XATTR_FILLBITMAP , cppu::UnoType<css::awt::XBitmap>::get() , 0, MID_BITMAP}, \
+ { UNO_NAME_FILLBITMAPURL, XATTR_FILLBITMAP , cppu::UnoType<OUString>::get(), 0, MID_BITMAP }, \
+ { UNO_NAME_FILLBITMAPNAME, XATTR_FILLBITMAP , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
+ { UNO_NAME_FILLGRADIENTSTEPCOUNT, XATTR_GRADIENTSTEPCOUNT , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_FILLGRADIENT, XATTR_FILLGRADIENT , ::cppu::UnoType<css::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \
+ { UNO_NAME_FILLGRADIENTNAME, XATTR_FILLGRADIENT , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
+ { UNO_NAME_FILLHATCH, XATTR_FILLHATCH , ::cppu::UnoType<css::drawing::Hatch>::get(), 0, MID_FILLHATCH}, \
+ { UNO_NAME_FILLHATCHNAME, XATTR_FILLHATCH , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
+ { UNO_NAME_FILLSTYLE, XATTR_FILLSTYLE , ::cppu::UnoType<css::drawing::FillStyle>::get() , 0, 0}, \
+ { UNO_NAME_FILL_TRANSPARENCE, XATTR_FILLTRANSPARENCE, ::cppu::UnoType<sal_Int16>::get() , 0, 0}, \
+ { UNO_NAME_FILLTRANSPARENCEGRADIENT, XATTR_FILLFLOATTRANSPARENCE, ::cppu::UnoType<css::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \
+ { UNO_NAME_FILLTRANSPARENCEGRADIENTNAME, XATTR_FILLFLOATTRANSPARENCE, ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \
+ { UNO_NAME_FILLCOLOR_2, XATTR_SECONDARYFILLCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_FILLCOLOR_THEME, XATTR_FILLCOLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_THEME_INDEX}, \
+ { UNO_NAME_FILLCOLOR_LUM_MOD, XATTR_FILLCOLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_LUM_MOD}, \
+ { UNO_NAME_FILLCOLOR_LUM_OFF, XATTR_FILLCOLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_LUM_OFF}, \
+ { UNO_NAME_GRAPHIC_GRAPHICCROP, SDRATTR_GRAFCROP , ::cppu::UnoType<css::text::GraphicCrop>::get(), 0, 0 }, \
+ { UNO_NAME_FILLUSESLIDEBACKGROUND, XATTR_FILLUSESLIDEBACKGROUND, cppu::UnoType<bool>::get(), 0, 0},
+
+
+#define EDGERADIUS_PROPERTIES \
+ { UNO_NAME_EDGERADIUS, SDRATTR_CORNER_RADIUS , ::cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM},
+
+#define TEXT_PROPERTIES_DEFAULTS\
+ { UNO_NAME_TEXT_WRITINGMODE, SDRATTR_TEXTDIRECTION, ::cppu::UnoType<css::text::WritingMode>::get(), 0, 0},\
+ { UNO_NAME_TEXT_ANIAMOUNT, SDRATTR_TEXT_ANIAMOUNT, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_ANICOUNT, SDRATTR_TEXT_ANICOUNT, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_ANIDELAY, SDRATTR_TEXT_ANIDELAY, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_ANIDIRECTION, SDRATTR_TEXT_ANIDIRECTION, cppu::UnoType<css::drawing::TextAnimationDirection>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_ANIKIND, SDRATTR_TEXT_ANIKIND, cppu::UnoType<css::drawing::TextAnimationKind>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_ANISTARTINSIDE, SDRATTR_TEXT_ANISTARTINSIDE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_ANISTOPINSIDE, SDRATTR_TEXT_ANISTOPINSIDE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_CONTOURFRAME, SDRATTR_TEXT_CONTOURFRAME, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_FITTOSIZE, SDRATTR_TEXT_FITTOSIZE, cppu::UnoType<css::drawing::TextFitToSizeType>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_HORZADJUST, SDRATTR_TEXT_HORZADJUST, cppu::UnoType<css::drawing::TextHorizontalAdjust>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_LEFTDIST, SDRATTR_TEXT_LEFTDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_LOWERDIST, SDRATTR_TEXT_LOWERDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_MAXFRAMEHEIGHT, SDRATTR_TEXT_MAXFRAMEHEIGHT, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_MAXFRAMEWIDTH, SDRATTR_TEXT_MAXFRAMEWIDTH, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_MINFRAMEHEIGHT, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_MINFRAMEWIDTH, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_RIGHTDIST, SDRATTR_TEXT_RIGHTDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_UPPERDIST, SDRATTR_TEXT_UPPERDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_TEXT_FONTINDEPENDENTLINESPACING,SDRATTR_TEXT_USEFIXEDCELLHEIGHT,cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST, cppu::UnoType<css::drawing::TextVerticalAdjust>::get(), 0, 0},\
+ { UNO_NAME_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_CHAINNEXTNAME, SDRATTR_TEXT_CHAINNEXTNAME, ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { u"TextColumns", OWN_ATTR_TEXTCOLUMNS, cppu::UnoType<css::text::XTextColumns>::get(), 0, 0 }, \
+ SVX_UNOEDIT_CHAR_PROPERTIES, \
+ SVX_UNOEDIT_PARA_PROPERTIES,
+
+#define TEXT_PROPERTIES \
+ SVX_UNOEDIT_NUMBERING_PROPERTY, \
+ TEXT_PROPERTIES_DEFAULTS
+
+// { "HasLevels", OWN_ATTR_HASLEVELS, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY, 0},
+
+#define MISC_OBJ_PROPERTIES_NO_SHEAR \
+ { u"Transformation", OWN_ATTR_TRANSFORMATION, cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 }, \
+ { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_FRAMERECT, OWN_ATTR_FRAMERECT, cppu::UnoType<css::awt::Rectangle>::get(), 0, 0 }, \
+ { UNO_NAME_MISC_OBJ_ROTATEANGLE, SDRATTR_ROTATEANGLE, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_BITMAP, OWN_ATTR_BITMAP, cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { UNO_NAME_OLE2_METAFILE, OWN_ATTR_METAFILE, cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { u"IsFontwork", OWN_ATTR_ISFONTWORK, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
+
+#define MISC_OBJ_PROPERTIES \
+ { UNO_NAME_MISC_OBJ_INTEROPGRABBAG, OWN_ATTR_INTEROPGRABBAG, cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0}, \
+ MISC_OBJ_PROPERTIES_NO_SHEAR \
+ { UNO_NAME_MISC_OBJ_SHEARANGLE, SDRATTR_SHEARANGLE, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
+
+
+#define SHAPE_DESCRIPTOR_PROPERTIES \
+ { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_LAYERNAME, SDRATTR_LAYERNAME , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_NAME, SDRATTR_OBJECTNAME , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_PRINTABLE, SDRATTR_OBJPRINTABLE , cppu::UnoType<bool>::get(), 0, 0}, \
+ { u"Visible", SDRATTR_OBJVISIBLE , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT , cppu::UnoType<bool>::get(), 0, 0},\
+ { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { u"UINamePlural", OWN_ATTR_UINAME_PLURAL , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { u"TextFitToSizeScale", OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ /* #i68101# */ \
+ { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_HYPERLINK, OWN_ATTR_HYPERLINK, ::cppu::UnoType<OUString>::get(), 0, 0},
+
+#define LINKTARGET_PROPERTIES \
+ { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
+
+
+#define CONNECTOR_PROPERTIES \
+ { UNO_NAME_EDGEKIND, SDRATTR_EDGEKIND, ::cppu::UnoType<css::drawing::ConnectorType>::get(), 0, 0}, \
+ { UNO_NAME_EDGENODE1HORZDIST, SDRATTR_EDGENODE1HORZDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_EDGENODE1VERTDIST, SDRATTR_EDGENODE1VERTDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_EDGENODE2HORZDIST, SDRATTR_EDGENODE2HORZDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_EDGENODE2VERTDIST, SDRATTR_EDGENODE2VERTDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
+
+#define SPECIAL_CONNECTOR_PROPERTIES \
+ CONNECTOR_PROPERTIES \
+ { UNO_NAME_EDGELINE1DELTA, SDRATTR_EDGELINE1DELTA, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_EDGELINE2DELTA, SDRATTR_EDGELINE2DELTA, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_EDGELINE3DELTA, SDRATTR_EDGELINE3DELTA, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"StartShape", OWN_ATTR_EDGE_START_OBJ, cppu::UnoType<css::drawing::XShape>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, \
+ { u"StartGluePointIndex", OWN_ATTR_GLUEID_HEAD, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"StartPosition", OWN_ATTR_EDGE_START_POS, ::cppu::UnoType<css::awt::Point>::get(), 0, 0}, \
+ { u"EndShape", OWN_ATTR_EDGE_END_OBJ, cppu::UnoType<css::drawing::XShape>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, \
+ { u"EndPosition", OWN_ATTR_EDGE_END_POS, ::cppu::UnoType<css::awt::Point>::get(), 0, 0},\
+ { u"EndGluePointIndex", OWN_ATTR_GLUEID_TAIL, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+\
+ { u"EdgeStartConnection", OWN_ATTR_EDGE_START_OBJ, cppu::UnoType<css::drawing::XShape>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, \
+ { u"EdgeStartPoint", OWN_ATTR_EDGE_START_POS, ::cppu::UnoType<css::awt::Point>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+ { u"EdgeEndConnection", OWN_ATTR_EDGE_END_OBJ, cppu::UnoType<css::drawing::XShape>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, \
+ { u"EdgeEndPoint", OWN_ATTR_EDGE_END_POS, ::cppu::UnoType<css::awt::Point>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
+\
+ { UNO_NAME_POLYPOLYGONBEZIER, OWN_ATTR_EDGE_POLYPOLYGONBEZIER, ::cppu::UnoType<css::drawing::PolyPolygonBezierCoords>::get(), 0, 0},
+
+#define SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS \
+ { UNO_NAME_MEASUREBELOWREFEDGE, SDRATTR_MEASUREBELOWREFEDGE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MEASUREFORMATSTRING, SDRATTR_MEASUREFORMATSTRING, ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_MEASUREHELPLINE1LEN, SDRATTR_MEASUREHELPLINE1LEN, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_MEASUREHELPLINE2LEN, SDRATTR_MEASUREHELPLINE2LEN, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_MEASUREHELPLINEDIST, SDRATTR_MEASUREHELPLINEDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_MEASUREHELPLINEOVERHANG, SDRATTR_MEASUREHELPLINEOVERHANG, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_MEASUREKIND, SDRATTR_MEASUREKIND, ::cppu::UnoType<css::drawing::MeasureKind>::get(), 0, 0}, \
+ { UNO_NAME_MEASURELINEDIST, SDRATTR_MEASURELINEDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_MEASUREOVERHANG, SDRATTR_MEASUREOVERHANG, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_MEASUREUNIT, SDRATTR_MEASUREUNIT, ::cppu::UnoType<sal_Int32>::get(), 0, 0},\
+ { UNO_NAME_MEASURESHOWUNIT, SDRATTR_MEASURESHOWUNIT, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTAUTOANGLE, SDRATTR_MEASURETEXTAUTOANGLE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTAUTOANGLEVIEW, SDRATTR_MEASURETEXTAUTOANGLEVIEW, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTFIXEDANGLE, SDRATTR_MEASURETEXTFIXEDANGLE, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTHPOS, SDRATTR_MEASURETEXTHPOS, ::cppu::UnoType<css::drawing::MeasureTextHorzPos>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTISFIXEDANGLE, SDRATTR_MEASURETEXTISFIXEDANGLE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTROTA90, SDRATTR_MEASURETEXTROTA90, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTUPSIDEDOWN, SDRATTR_MEASURETEXTUPSIDEDOWN, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_MEASURETEXTVPOS, SDRATTR_MEASURETEXTVPOS, ::cppu::UnoType<css::drawing::MeasureTextVertPos>::get(), 0, 0}, \
+ { u"MeasureDecimalPlaces", SDRATTR_MEASUREDECIMALPLACES, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
+
+
+#define SPECIAL_DIMENSIONING_PROPERTIES \
+ SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS \
+ { u"StartPosition", OWN_ATTR_MEASURE_START_POS, ::cppu::UnoType<css::awt::Point>::get(), 0, 0},\
+ { u"EndPosition", OWN_ATTR_MEASURE_END_POS, ::cppu::UnoType<css::awt::Point>::get(), 0, 0},
+
+#define SPECIAL_CIRCLE_PROPERTIES \
+ { UNO_NAME_CIRCENDANGLE, SDRATTR_CIRCENDANGLE, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_CIRCKIND, SDRATTR_CIRCKIND, ::cppu::UnoType<css::drawing::CircleKind>::get(), 0, 0}, \
+ { UNO_NAME_CIRCSTARTANGLE,SDRATTR_CIRCSTARTANGLE, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
+
+#define SPECIAL_POLYGON_PROPERTIES \
+ { UNO_NAME_POLYGONKIND, OWN_ATTR_VALUE_POLYGONKIND, ::cppu::UnoType<css::drawing::PolygonKind>::get(), css::beans::PropertyAttribute::READONLY, 0},
+
+#define SPECIAL_POLYPOLYGON_PROPERTIES \
+ { UNO_NAME_POLYPOLYGON, OWN_ATTR_VALUE_POLYPOLYGON, ::cppu::UnoType<css::drawing::PointSequenceSequence>::get(), 0, 0}, \
+ { UNO_NAME_POLYGON, OWN_ATTR_VALUE_POLYGON, ::cppu::UnoType<css::drawing::PointSequence>::get(), 0, 0},
+
+#define SPECIAL_POLYPOLYGONBEZIER_PROPERTIES \
+ { UNO_NAME_POLYPOLYGONBEZIER, OWN_ATTR_VALUE_POLYPOLYGONBEZIER, ::cppu::UnoType<css::drawing::PolyPolygonBezierCoords>::get(), 0, 0},
+
+#define SPECIAL_GRAPHOBJ_PROPERTIES_DEFAULTS \
+ { UNO_NAME_GRAPHIC_LUMINANCE, SDRATTR_GRAFLUMINANCE , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_CONTRAST, SDRATTR_GRAFCONTRAST , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_RED, SDRATTR_GRAFRED , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_GREEN, SDRATTR_GRAFGREEN , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_BLUE, SDRATTR_GRAFBLUE , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_GAMMA, SDRATTR_GRAFGAMMA , cppu::UnoType<double>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_TRANSPARENCY, SDRATTR_GRAFTRANSPARENCE , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHIC_COLOR_MODE, SDRATTR_GRAFMODE , ::cppu::UnoType<css::drawing::ColorMode>::get(), 0, 0},
+
+#define SPECIAL_GRAPHOBJ_PROPERTIES \
+ SPECIAL_GRAPHOBJ_PROPERTIES_DEFAULTS \
+ { UNO_NAME_GRAPHIC_GRAPHICCROP, SDRATTR_GRAFCROP , ::cppu::UnoType<css::text::GraphicCrop>::get(), 0, 0 }, \
+ { UNO_NAME_GRAPHOBJ_REPLACEMENT_GRAPHIC, OWN_ATTR_REPLACEMENT_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get() , 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_GRAFSTREAMURL, OWN_ATTR_GRAFSTREAMURL , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, \
+ { UNO_NAME_GRAPHOBJ_FILLBITMAP, OWN_ATTR_VALUE_FILLBITMAP , cppu::UnoType<css::awt::XBitmap>::get() , 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_GRAPHIC, OWN_ATTR_VALUE_GRAPHIC , cppu::UnoType<css::graphic::XGraphic>::get() , 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_GRAPHIC_URL, OWN_ATTR_GRAPHIC_URL , cppu::UnoType<css::uno::Any>::get(), 0, 0 }, \
+ { UNO_NAME_GRAPHOBJ_IS_SIGNATURELINE, OWN_ATTR_IS_SIGNATURELINE , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_ID, OWN_ATTR_SIGNATURELINE_ID , cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_SUGGESTED_SIGNER_NAME, OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_NAME, cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_SUGGESTED_SIGNER_TITLE, OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_TITLE, cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_SUGGESTED_SIGNER_EMAIL, OWN_ATTR_SIGNATURELINE_SUGGESTED_SIGNER_EMAIL, cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_SIGNING_INSTRUCTIONS, OWN_ATTR_SIGNATURELINE_SIGNING_INSTRUCTIONS, cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_SHOW_SIGN_DATE, OWN_ATTR_SIGNATURELINE_SHOW_SIGN_DATE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_CAN_ADD_COMMENT, OWN_ATTR_SIGNATURELINE_CAN_ADD_COMMENT, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_UNSIGNED_IMAGE, OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE, cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_SIGNATURELINE_IS_SIGNED, OWN_ATTR_SIGNATURELINE_IS_SIGNED , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_GRAPHOBJ_QRCODE, OWN_ATTR_QRCODE , cppu::UnoType<css::drawing::BarCode>::get(), 0, 0},
+
+#define SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \
+ { UNO_NAME_3D_SCENE_AMBIENTCOLOR, SDRATTR_3DSCENE_AMBIENTCOLOR , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_DISTANCE, SDRATTR_3DSCENE_DISTANCE , ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_3D_SCENE_FOCAL_LENGTH, SDRATTR_3DSCENE_FOCAL_LENGTH , ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_1, SDRATTR_3DSCENE_LIGHTCOLOR_1 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_2, SDRATTR_3DSCENE_LIGHTCOLOR_2 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_3, SDRATTR_3DSCENE_LIGHTCOLOR_3 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_4, SDRATTR_3DSCENE_LIGHTCOLOR_4 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_5, SDRATTR_3DSCENE_LIGHTCOLOR_5 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_6, SDRATTR_3DSCENE_LIGHTCOLOR_6 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_7, SDRATTR_3DSCENE_LIGHTCOLOR_7 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTCOLOR_8, SDRATTR_3DSCENE_LIGHTCOLOR_8 , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_1, SDRATTR_3DSCENE_LIGHTDIRECTION_1 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_2, SDRATTR_3DSCENE_LIGHTDIRECTION_2 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_3, SDRATTR_3DSCENE_LIGHTDIRECTION_3 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_4, SDRATTR_3DSCENE_LIGHTDIRECTION_4 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_5, SDRATTR_3DSCENE_LIGHTDIRECTION_5 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_6, SDRATTR_3DSCENE_LIGHTDIRECTION_6 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_7, SDRATTR_3DSCENE_LIGHTDIRECTION_7 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTDIRECTION_8, SDRATTR_3DSCENE_LIGHTDIRECTION_8 , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_1, SDRATTR_3DSCENE_LIGHTON_1 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_2, SDRATTR_3DSCENE_LIGHTON_2 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_3, SDRATTR_3DSCENE_LIGHTON_3 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_4, SDRATTR_3DSCENE_LIGHTON_4 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_5, SDRATTR_3DSCENE_LIGHTON_5 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_6, SDRATTR_3DSCENE_LIGHTON_6 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_7, SDRATTR_3DSCENE_LIGHTON_7 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_LIGHTON_8, SDRATTR_3DSCENE_LIGHTON_8 , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_PERSPECTIVE, SDRATTR_3DSCENE_PERSPECTIVE , cppu::UnoType<css::drawing::ProjectionMode>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_SHADOW_SLANT, SDRATTR_3DSCENE_SHADOW_SLANT , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_SHADE_MODE, SDRATTR_3DSCENE_SHADE_MODE , ::cppu::UnoType<css::drawing::ShadeMode>::get(), 0, 0}, \
+ { UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING,SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, cppu::UnoType<bool>::get(), 0, 0},
+
+#define SPECIAL_3DSCENEOBJECT_PROPERTIES \
+ SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \
+ { UNO_NAME_3D_TRANSFORM_MATRIX, OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , ::cppu::UnoType<css::drawing::HomogenMatrix>::get(), 0, 0}, \
+ { UNO_NAME_3D_CAMERA_GEOMETRY, OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY , ::cppu::UnoType<css::drawing::CameraGeometry>::get(), 0, 0},
+
+// #i28528#
+// Added extra Item (Bool) for chart2 to be able to show reduced line geometry (SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)
+#define MISC_3D_OBJ_PROPERTIES \
+ { UNO_NAME_3D_DOUBLE_SIDED ,SDRATTR_3DOBJ_DOUBLE_SIDED , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_MAT_COLOR ,SDRATTR_3DOBJ_MAT_COLOR , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_MAT_EMISSION ,SDRATTR_3DOBJ_MAT_EMISSION , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_MAT_SPECULAR ,SDRATTR_3DOBJ_MAT_SPECULAR , ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_MAT_SPECULAR_INTENSITY ,SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_3D_NORMALS_INVERT ,SDRATTR_3DOBJ_NORMALS_INVERT , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_NORMALS_KIND ,SDRATTR_3DOBJ_NORMALS_KIND , ::cppu::UnoType<css::drawing::NormalsKind>::get(), 0, 0}, \
+ { UNO_NAME_3D_SHADOW_3D ,SDRATTR_3DOBJ_SHADOW_3D , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_TEXTURE_FILTER ,SDRATTR_3DOBJ_TEXTURE_FILTER , cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_TEXTURE_KIND ,SDRATTR_3DOBJ_TEXTURE_KIND , ::cppu::UnoType<css::drawing::TextureKind>::get(), 0, 0}, \
+ { UNO_NAME_3D_TEXTURE_MODE ,SDRATTR_3DOBJ_TEXTURE_MODE , ::cppu::UnoType<css::drawing::TextureMode>::get(), 0, 0}, \
+ { UNO_NAME_3D_TEXTURE_PROJ_X ,SDRATTR_3DOBJ_TEXTURE_PROJ_X , ::cppu::UnoType<css::drawing::TextureProjectionMode>::get(), 0, 0}, \
+ { UNO_NAME_3D_TEXTURE_PROJ_Y ,SDRATTR_3DOBJ_TEXTURE_PROJ_Y , ::cppu::UnoType<css::drawing::TextureProjectionMode>::get(), 0, 0}, \
+ { UNO_NAME_3D_REDUCED_LINE_GEOMETRY ,SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY , cppu::UnoType<bool>::get(), 0, 0},
+
+#define SPECIAL_3DCUBEOBJECT_PROPERTIES \
+ { UNO_NAME_3D_TRANSFORM_MATRIX ,OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , ::cppu::UnoType<css::drawing::HomogenMatrix>::get(), 0, 0}, \
+ { UNO_NAME_3D_POS ,OWN_ATTR_3D_VALUE_POSITION , cppu::UnoType<css::drawing::Position3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SIZE ,OWN_ATTR_3D_VALUE_SIZE , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_POS_IS_CENTER ,OWN_ATTR_3D_VALUE_POS_IS_CENTER , cppu::UnoType<bool>::get(), 0, 0},
+
+#define SPECIAL_3DSPHEREOBJECT_PROPERTIES \
+ { UNO_NAME_3D_TRANSFORM_MATRIX ,OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , ::cppu::UnoType<css::drawing::HomogenMatrix>::get(), 0, 0}, \
+ { UNO_NAME_3D_POS ,OWN_ATTR_3D_VALUE_POSITION , cppu::UnoType<css::drawing::Position3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_SIZE ,OWN_ATTR_3D_VALUE_SIZE , ::cppu::UnoType<css::drawing::Direction3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_HORZ_SEGS ,SDRATTR_3DOBJ_HORZ_SEGS, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_VERT_SEGS ,SDRATTR_3DOBJ_VERT_SEGS, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
+
+// #107245# New 3D properties which are possible for lathe and extrude 3d objects
+#define SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES \
+ { UNO_NAME_3D_SMOOTH_NORMALS , SDRATTR_3DOBJ_SMOOTH_NORMALS, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_SMOOTH_LIDS , SDRATTR_3DOBJ_SMOOTH_LIDS, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_CHARACTER_MODE , SDRATTR_3DOBJ_CHARACTER_MODE, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_CLOSE_FRONT , SDRATTR_3DOBJ_CLOSE_FRONT, cppu::UnoType<bool>::get(), 0, 0}, \
+ { UNO_NAME_3D_CLOSE_BACK , SDRATTR_3DOBJ_CLOSE_BACK, cppu::UnoType<bool>::get(), 0, 0},
+
+#define SPECIAL_3DLATHEOBJECT_PROPERTIES \
+ { UNO_NAME_3D_TRANSFORM_MATRIX ,OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX,::cppu::UnoType<css::drawing::HomogenMatrix>::get(), 0, 0}, \
+ { UNO_NAME_3D_POLYPOLYGON3D ,OWN_ATTR_3D_VALUE_POLYPOLYGON3D ,::cppu::UnoType<css::drawing::PolyPolygonShape3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_LATHE_END_ANGLE ,SDRATTR_3DOBJ_END_ANGLE ,::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_3D_HORZ_SEGS ,SDRATTR_3DOBJ_HORZ_SEGS ,::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { UNO_NAME_3D_PERCENT_DIAGONAL ,SDRATTR_3DOBJ_PERCENT_DIAGONAL ,::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+ { UNO_NAME_3D_VERT_SEGS ,SDRATTR_3DOBJ_VERT_SEGS ,::cppu::UnoType<sal_Int32>::get(), 0, 0},
+
+#define SPECIAL_3DEXTRUDEOBJECT_PROPERTIES \
+ { UNO_NAME_3D_TRANSFORM_MATRIX ,OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX,::cppu::UnoType<css::drawing::HomogenMatrix>::get(), 0, 0}, \
+ { UNO_NAME_3D_POLYPOLYGON3D ,OWN_ATTR_3D_VALUE_POLYPOLYGON3D ,::cppu::UnoType<css::drawing::PolyPolygonShape3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_EXTRUDE_DEPTH ,SDRATTR_3DOBJ_DEPTH ,::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { UNO_NAME_3D_PERCENT_DIAGONAL ,SDRATTR_3DOBJ_PERCENT_DIAGONAL ,::cppu::UnoType<sal_Int16>::get(), 0, 0},
+
+#define SPECIAL_3DPOLYGONOBJECT_PROPERTIES \
+ { UNO_NAME_3D_TRANSFORM_MATRIX ,OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX, ::cppu::UnoType<css::drawing::HomogenMatrix>::get(), 0, 0}, \
+ { UNO_NAME_3D_POLYPOLYGON3D ,OWN_ATTR_3D_VALUE_POLYPOLYGON3D , ::cppu::UnoType<css::drawing::PolyPolygonShape3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_NORMALSPOLYGON3D ,OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D, ::cppu::UnoType<css::drawing::PolyPolygonShape3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_TEXTUREPOLYGON3D ,OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D, ::cppu::UnoType<css::drawing::PolyPolygonShape3D>::get(), 0, 0}, \
+ { UNO_NAME_3D_LINEONLY ,OWN_ATTR_3D_VALUE_LINEONLY , cppu::UnoType<bool>::get(), 0, 0},
+
+#define SPECIAL_3DBACKSCALE_PROPERTIES \
+ { UNO_NAME_3D_BACKSCALE ,SDRATTR_3DOBJ_BACKSCALE , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoshtxt.hxx b/include/svx/unoshtxt.hxx
new file mode 100644
index 000000000..803b2996d
--- /dev/null
+++ b/include/svx/unoshtxt.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_UNOSHTXT_HXX
+#define INCLUDED_SVX_UNOSHTXT_HXX
+
+#include <memory>
+#include <editeng/unoedsrc.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star {
+ namespace uno {
+ class XInterface;
+ }
+ namespace accessibility {
+ struct TextSegment;
+ }
+}
+
+class SvxTextForwarder;
+class SdrObject;
+class SdrModel;
+class SdrView;
+class OutputDevice;
+class SvxTextEditSourceImpl;
+class SdrText;
+
+class SVXCORE_DLLPUBLIC SvxTextEditSource final : public SvxEditSource, public SvxViewForwarder
+{
+public:
+ SvxTextEditSource( SdrObject* pObj, SdrText* pText );
+
+ /** Since the views don't broadcast their dying, make sure that
+ this object gets destroyed if the view becomes invalid
+
+ The window is necessary, since our views can display on multiple windows
+ */
+ SvxTextEditSource( SdrObject& rObj, SdrText* pText, SdrView& rView, const OutputDevice& rViewWindow );
+ SvxTextEditSource(const SvxTextEditSource&) = delete;
+ SvxTextEditSource& operator=(const SvxTextEditSource&) = delete;
+ virtual ~SvxTextEditSource() override;
+
+ virtual std::unique_ptr<SvxEditSource> Clone() const override;
+ virtual SvxTextForwarder* GetTextForwarder() override;
+ virtual SvxViewForwarder* GetViewForwarder() override;
+ virtual SvxEditViewForwarder* GetEditViewForwarder( bool bCreate = false ) override;
+ virtual void UpdateData() override;
+
+ virtual void addRange( SvxUnoTextRangeBase* pNewRange ) override;
+ virtual void removeRange( SvxUnoTextRangeBase* pOldRange ) override;
+ virtual const SvxUnoTextRangeBaseVec& getRanges() const override;
+
+ virtual SfxBroadcaster& GetBroadcaster() const override;
+
+ void lock();
+ void unlock();
+
+ // the SvxViewForwarder interface
+ virtual bool IsValid() const override;
+ virtual Point LogicToPixel( const Point&, const MapMode& ) const override;
+ virtual Point PixelToLogic( const Point&, const MapMode& ) const override;
+
+ void UpdateOutliner();
+
+private:
+ SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl );
+
+ rtl::Reference<SvxTextEditSourceImpl> mpImpl;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/view3d.hxx b/include/svx/view3d.hxx
new file mode 100644
index 000000000..359b3aa31
--- /dev/null
+++ b/include/svx/view3d.hxx
@@ -0,0 +1,120 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_VIEW3D_HXX
+#define INCLUDED_SVX_VIEW3D_HXX
+
+#include <svx/svdview.hxx>
+#include <svx/deflt3d.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+/*
+ * Forward declarations
+ */
+
+class E3dObject;
+class E3dScene;
+class Impl3DMirrorConstructOverlay;
+
+/**
+ * Derived class of SdrView to edit 3D objects.
+ */
+
+class SVXCORE_DLLPUBLIC E3dView : public SdrView
+{
+ E3dDefaultAttributes a3DDefaultAttr;
+ MouseEvent aMouseEvent; // The parameters of the last Events (Mouse, Keyboard)
+
+ // Migrate selections
+ std::unique_ptr<Impl3DMirrorConstructOverlay> mpMirrorOverlay;
+
+protected:
+ void InitView();
+
+ void ImpCreate3DObject(E3dScene* pScene, SdrObject* pObj, bool bExtrude, double fDepth, basegfx::B2DHomMatrix const & rLatheMat);
+ void ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, bool bExtrude, double fDepth, basegfx::B2DHomMatrix const & rLatheMat);
+ void ImpChangeSomeAttributesFor3DConversion(SdrObject* pObj);
+ void ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj);
+
+ void InitScene(E3dScene* pScene, double fW, double fH, double fCamZ);
+ void ImpIsConvertTo3DPossible(SdrObject const * pObj, bool& rAny3D, bool& rGroupSelected) const;
+ void BreakSingle3DObj(E3dObject* pObj);
+
+public:
+ E3dView(
+ SdrModel& rSdrModel,
+ OutputDevice* pOut);
+
+ virtual ~E3dView() override;
+
+ // Output all marked Objects on the given OutputDevice.
+ virtual void DrawMarkedObj(OutputDevice& rOut) const override;
+
+ // Access to the default attributes.
+ E3dDefaultAttributes& Get3DDefaultAttributes() { return a3DDefaultAttr; }
+ virtual bool BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl, short nMinMov = -3, SdrDragMethod* pForcedMeth = nullptr) override;
+ virtual void CheckPossibilities() override;
+
+ // Get/Set Event
+ void SetMouseEvent(const MouseEvent& rNew) { aMouseEvent = rNew; }
+ const MouseEvent& GetMouseEvent() const { return aMouseEvent; }
+
+ // Override getting the model, as we need to supply a Scene together with individual 3D Objects.
+ virtual std::unique_ptr<SdrModel> CreateMarkedObjModel() const override;
+
+ // On Paste: We need to insert the objects of the Scene, but not the Scene itself
+ using SdrView::Paste;
+ virtual bool Paste(
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions) override;
+
+ // #83403# Service routine used from local Clone() and from SdrCreateView::EndCreateObj(...)
+ bool ImpCloneAll3DObjectsToDestScene(E3dScene const * pSrcScene, E3dScene* pDstScene, Point aOffset);
+
+ bool IsConvertTo3DObjPossible() const;
+ void ConvertMarkedObjTo3D(bool bExtrude=true, const basegfx::B2DPoint& rPnt1 = basegfx::B2DPoint(0.0, 0.0), const basegfx::B2DPoint& rPnt2 = basegfx::B2DPoint(0.0, 1.0));
+
+ // Means to create all Extrudes in a certain depth order.
+ static void DoDepthArrange(E3dScene const * pScene, double fDepth);
+ void ConvertMarkedToPolyObj();
+ E3dScene* SetCurrent3DObj(E3dObject* p3DObj);
+ void Start3DCreation();
+
+ // Migration of overlay
+ bool Is3DRotationCreationActive() const { return (nullptr != mpMirrorOverlay); }
+
+ virtual void MovAction(const Point& rPnt) override;
+ void End3DCreation(bool bUseDefaultValuesForMirrorAxes=false);
+ void ResetCreationActive();
+
+ double GetDefaultCamPosZ();
+
+ double GetDefaultCamFocal();
+
+ bool IsBreak3DObjPossible() const;
+ void Break3DObj();
+
+ SfxItemSet Get3DAttributes() const;
+ void Set3DAttributes(const SfxItemSet& rAttr);
+};
+
+#endif // INCLUDED_SVX_VIEW3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/viewlayoutitem.hxx b/include/svx/viewlayoutitem.hxx
new file mode 100644
index 000000000..495443c85
--- /dev/null
+++ b/include/svx/viewlayoutitem.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_VIEWLAYOUTITEM_HXX
+#define INCLUDED_SVX_VIEWLAYOUTITEM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxids.hrc>
+#include <svx/svxdllapi.h>
+
+
+class SVX_DLLPUBLIC SvxViewLayoutItem final : public SfxUInt16Item
+{
+ bool mbBookMode;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxViewLayoutItem( sal_uInt16 nColumns = 0, bool bBookMode = false, TypedWhichId<SvxViewLayoutItem> nWhich = SID_ATTR_VIEWLAYOUT );
+ SvxViewLayoutItem( const SvxViewLayoutItem& );
+ virtual ~SvxViewLayoutItem() override;
+
+ void SetBookMode( bool bNew ) {mbBookMode = bNew; }
+ bool IsBookMode() const {return mbBookMode; }
+
+ // "purely virtual methods" from the SfxPoolItem
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxViewLayoutItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; // empty
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; // empty
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/viewpt3d.hxx b/include/svx/viewpt3d.hxx
new file mode 100644
index 000000000..5d7856bd9
--- /dev/null
+++ b/include/svx/viewpt3d.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_VIEWPT3D_HXX
+#define INCLUDED_SVX_VIEWPT3D_HXX
+
+#include <svx/svxdllapi.h>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/point/b3dpoint.hxx>
+#include <basegfx/vector/b3dvector.hxx>
+#include <tools/gen.hxx>
+
+// predefines
+namespace basegfx { class B3DRange; } // end of namespace basegfx
+
+/*************************************************************************
+|*
+|* enums for projection
+|*
+\************************************************************************/
+
+enum class ProjectionType { Parallel, Perspective };
+
+
+/*************************************************************************
+|*
+|* 3D viewport according to PHIGS
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC Viewport3D
+{
+ protected:
+ basegfx::B3DHomMatrix aViewTf; // the real transformations matrix
+ basegfx::B3DPoint aVRP; // View Reference Point
+ basegfx::B3DVector aVPN; // View Plane Normal
+ basegfx::B3DVector aVUV; // View Up Vector
+ basegfx::B3DPoint aPRP; // Projection Reference Point(View-coordinates)
+ // up to now only the z-coordinate is considered
+
+ ProjectionType eProjection; // kind of the projection
+ tools::Rectangle aDeviceRect; // position and size of the output area
+
+ struct
+ {
+ double X, Y, W, H; // position and size of the view window
+ } aViewWin; // in view coordinates
+
+ basegfx::B3DPoint aViewPoint; //observers position in world coordinates;
+ // is calculated by the transformation
+ bool bTfValid; // flag, if transformation is valid
+
+ public:
+ Viewport3D();
+
+ void SetVRP(const basegfx::B3DPoint& rNewVRP);
+ void SetVPN(const basegfx::B3DVector& rNewVPN);
+ void SetVUV(const basegfx::B3DVector& rNewVUV);
+ void SetPRP(const basegfx::B3DPoint& rNewPRP);
+
+ const basegfx::B3DPoint& GetVRP() const { return aVRP; }
+ const basegfx::B3DVector& GetVUV() const { return aVUV; }
+
+ void SetProjection(ProjectionType ePrj)
+ { eProjection = ePrj; bTfValid = false; }
+ ProjectionType GetProjection() const { return eProjection; }
+
+ void SetViewWindow(double fX, double fY, double fW, double fH);
+
+ void SetDeviceWindow(const tools::Rectangle& rRect);
+ const tools::Rectangle& GetDeviceWindow() const { return aDeviceRect; }
+
+ // returns observers position in world coordinates
+ const basegfx::B3DPoint& GetViewPoint();
+};
+
+#endif // INCLUDED_SVX_VIEWPT3D_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/weldeditview.hxx b/include/svx/weldeditview.hxx
new file mode 100644
index 000000000..004be7b60
--- /dev/null
+++ b/include/svx/weldeditview.hxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <sal/config.h>
+#include <svx/svxdllapi.h>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/outdev.hxx>
+
+class WeldEditAccessible;
+
+class SVX_DLLPUBLIC WeldEditView : public weld::CustomWidgetController, public EditViewCallbacks
+{
+public:
+ WeldEditView();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual int GetSurroundingText(OUString& rSurrounding) override;
+ virtual bool DeleteSurroundingText(const Selection& rRange) override;
+
+ void SetText(const OUString& rStr);
+
+ OUString GetText() const;
+
+ virtual FactoryFunction GetUITestFactory() const override;
+
+ void SetModifyHdl(const Link<LinkParamNone*, void>& rLink);
+
+ virtual EditView* GetEditView() const;
+ virtual EditEngine* GetEditEngine() const;
+
+ bool HasSelection() const;
+
+ void Delete();
+ void Cut();
+ void Copy();
+ void Paste();
+
+ virtual ~WeldEditView() override;
+
+protected:
+ bool m_bAcceptsTab;
+ // m_xDropTarget must outlive m_xEditView
+ css::uno::Reference<css::datatransfer::dnd::XDropTarget> m_xDropTarget;
+ std::unique_ptr<EditEngine> m_xEditEngine;
+ std::unique_ptr<EditView> m_xEditView;
+ rtl::Reference<WeldEditAccessible> m_xAccessible;
+
+ virtual void makeEditEngine();
+
+ void InitAccessible();
+
+ void DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
+
+public:
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual bool MouseMove(const MouseEvent& rMEvt) override;
+ virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
+ virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
+ virtual bool KeyInput(const KeyEvent& rKEvt) override;
+ virtual bool Command(const CommandEvent& rCEvt) override;
+ virtual bool CanFocus() const;
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+ virtual void Resize() override;
+
+ virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard>
+ GetClipboard() const override;
+ virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> GetDropTarget() override;
+
+ // Whether Tab will result in entering a tab or not
+ bool GetAcceptsTab() const { return m_bAcceptsTab; }
+
+ void SetAcceptsTab(bool bAcceptsTab) { m_bAcceptsTab = bAcceptsTab; }
+
+protected:
+ virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
+
+ virtual void EditViewInvalidate(const tools::Rectangle& rRect) override { Invalidate(rRect); }
+
+ virtual void EditViewSelectionChange() override { Invalidate(); }
+
+ virtual OutputDevice& EditViewOutputDevice() const override
+ {
+ return GetDrawingArea()->get_ref_device();
+ }
+
+ virtual Point EditViewPointerPosPixel() const override;
+
+ virtual void EditViewInputContext(const InputContext& rInputContext) override
+ {
+ SetInputContext(rInputContext);
+ }
+
+ virtual void EditViewCursorRect(const tools::Rectangle& rRect, int nExtTextInputWidth) override
+ {
+ OutputDevice& rRefDevice = EditViewOutputDevice();
+ SetCursorRect(rRefDevice.LogicToPixel(rRect),
+ rRefDevice.LogicToPixel(Size(nExtTextInputWidth, 0)).Width());
+ }
+
+ virtual weld::Widget* EditViewPopupParent() const override { return GetDrawingArea(); }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xbitmap.hxx b/include/svx/xbitmap.hxx
new file mode 100644
index 000000000..0fff0a5ce
--- /dev/null
+++ b/include/svx/xbitmap.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XBITMAP_HXX
+#define INCLUDED_SVX_XBITMAP_HXX
+
+#include <memory>
+#include <tools/color.hxx>
+#include <vcl/GraphicObject.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XOBitmap
+{
+private:
+ std::unique_ptr<GraphicObject> xGraphicObject;
+ std::unique_ptr<sal_uInt16[]> pPixelArray;
+ Color aPixelColor;
+ Color aBckgrColor;
+ bool bGraphicDirty;
+
+ const GraphicObject& GetGraphicObject() const;
+
+ XOBitmap(const XOBitmap& rXBmp) = delete;
+ XOBitmap& operator=(const XOBitmap& rXOBitmap) = delete;
+
+
+public:
+ XOBitmap( const BitmapEx& rBitmap );
+ ~XOBitmap();
+
+ void Bitmap2Array();
+ void Array2Bitmap();
+
+ void SetPixelColor( const Color& rColor ) { aPixelColor = rColor; bGraphicDirty = true; }
+ void SetBackgroundColor( const Color& rColor ) { aBckgrColor = rColor; bGraphicDirty = true; }
+
+ BitmapEx GetBitmap() const;
+ const Color& GetBackgroundColor() const { return aBckgrColor; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx
new file mode 100644
index 000000000..0882081fb
--- /dev/null
+++ b/include/svx/xbtmpit.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XBTMPIT_HXX
+#define INCLUDED_SVX_XBTMPIT_HXX
+
+#include <svx/svxdllapi.h>
+#include <svx/xdef.hxx>
+#include <svx/xit.hxx>
+#include <vcl/GraphicObject.hxx>
+
+class SdrModel;
+
+
+class SVXCORE_DLLPUBLIC XFillBitmapItem final : public NameOrIndex
+{
+private:
+ GraphicObject maGraphicObject;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {}
+ XFillBitmapItem(const OUString& rName, const GraphicObject& rGraphicObject);
+ XFillBitmapItem( const GraphicObject& rGraphicObject );
+ XFillBitmapItem( const XFillBitmapItem& rItem );
+
+ virtual bool operator==( const SfxPoolItem& rItem ) const override;
+ // no idea why, but this item does not play nice with the sorting optimisation, get failures in sd_import_tests
+ virtual bool IsSortable() const override { return false; }
+ virtual XFillBitmapItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ const GraphicObject& GetGraphicObject() const { return maGraphicObject;}
+ bool isPattern() const;
+
+ static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
+ std::unique_ptr<XFillBitmapItem> checkForUniqueItem( SdrModel* pModel ) const;
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx
new file mode 100644
index 000000000..5b882f9a9
--- /dev/null
+++ b/include/svx/xcolit.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XCOLIT_HXX
+#define INCLUDED_SVX_XCOLIT_HXX
+
+#include <tools/color.hxx>
+#include <editeng/colritem.hxx>
+
+#include <svx/svxdllapi.h>
+#include <svx/xit.hxx>
+
+class XColorList;
+
+
+
+class SVXCORE_DLLPUBLIC XColorItem : public NameOrIndex
+{
+ Color aColor;
+ SvxThemeColor maThemeColor;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XColorItem() {}
+ XColorItem(TypedWhichId<XColorItem> nWhich, sal_Int32 nIndex, const Color& rTheColor);
+ XColorItem(TypedWhichId<XColorItem> nWhich, const Color& rTheColor);
+ XColorItem(TypedWhichId<XColorItem> nWhich, const OUString& rName, const Color& rTheColor);
+ XColorItem(const XColorItem& rItem);
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual XColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ const Color& GetColorValue() const;
+ void SetColorValue(const Color& rNew) { aColor = rNew; Detach(); }
+
+ SvxThemeColor& GetThemeColor() { return maThemeColor; }
+ const SvxThemeColor& GetThemeColor() const { return maThemeColor; }
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xdash.hxx b/include/svx/xdash.hxx
new file mode 100644
index 000000000..e789830e2
--- /dev/null
+++ b/include/svx/xdash.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XDASH_HXX
+#define INCLUDED_SVX_XDASH_HXX
+
+
+
+
+#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/DashStyle.hpp>
+
+#include <vector>
+
+class SVXCORE_DLLPUBLIC XDash final
+{
+ css::drawing::DashStyle eDash;
+ sal_uInt16 nDots;
+ sal_uInt16 nDashes;
+ double nDotLen;
+ double nDashLen;
+ double nDistance;
+
+public:
+ XDash(css::drawing::DashStyle eDash = css::drawing::DashStyle_RECT,
+ sal_uInt16 nDots = 1, double nDotLen = 20,
+ sal_uInt16 nDashes = 1, double nDashLen = 20, double nDistance = 20);
+
+ bool operator==(const XDash& rDash) const;
+
+ void SetDashStyle(css::drawing::DashStyle eNewStyle) { eDash = eNewStyle; }
+ void SetDots(sal_uInt16 nNewDots) { nDots = nNewDots; }
+ void SetDotLen(double nNewDotLen) { nDotLen = nNewDotLen; }
+ void SetDashes(sal_uInt16 nNewDashes) { nDashes = nNewDashes; }
+ void SetDashLen(double nNewDashLen) { nDashLen = nNewDashLen; }
+ void SetDistance(double nNewDistance) { nDistance = nNewDistance; }
+
+ css::drawing::DashStyle GetDashStyle() const { return eDash; }
+ sal_uInt16 GetDots() const { return nDots; }
+ double GetDotLen() const { return nDotLen; }
+ sal_uInt16 GetDashes() const { return nDashes; }
+ double GetDashLen() const { return nDashLen; }
+ double GetDistance() const { return nDistance; }
+
+ // XDash is translated into an array of doubles which describe the lengths of the
+ // dashes, dots and empty passages. It returns the complete length of the full DashDot
+ // sequence and fills the given vetor of doubles accordingly (also resizing, so deleting it).
+ double CreateDotDashArray(::std::vector< double >& rDotDashArray, double fLineWidth) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xdef.hxx b/include/svx/xdef.hxx
new file mode 100644
index 000000000..906b566ca
--- /dev/null
+++ b/include/svx/xdef.hxx
@@ -0,0 +1,151 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XDEF_HXX
+#define INCLUDED_SVX_XDEF_HXX
+
+
+#include <svl/typedwhich.hxx>
+
+/*************************************************************************
+|*
+|* Adding an attribute: Copy line, above which you want to add something,
+|* change the label and add it at the end of the following line, too
+|*
+\************************************************************************/
+
+class SfxMetricItem;
+class XFillAttrSetItem;
+class XFillBackgroundItem;
+class XFillBitmapItem;
+class XFillBmpPosItem;
+class XFillBmpPosOffsetXItem;
+class XFillBmpPosOffsetYItem;
+class XFillBmpSizeLogItem;
+class XFillBmpSizeYItem;
+class XFillBmpStretchItem;
+class XFillBmpTileItem;
+class XFillBmpTileOffsetXItem;
+class XFillBmpTileOffsetYItem;
+class XFillColorItem;
+class XFillFloatTransparenceItem;
+class XFillGradientItem;
+class XFillHatchItem;
+class XFillStyleItem;
+class XFillTransparenceItem;
+class XFillUseSlideBackgroundItem;
+class XFormTextAdjustItem;
+class XFormTextDistanceItem;
+class XFormTextHideFormItem;
+class XFormTextMirrorItem;
+class XFormTextOutlineItem;
+class XFormTextShadowColorItem;
+class XFormTextShadowItem;
+class XFormTextShadowTranspItem;
+class XFormTextShadowXValItem;
+class XFormTextShadowYValItem;
+class XFormTextStartItem;
+class XFormTextStyleItem;
+class XGradientStepCountItem;
+class XLineAttrSetItem;
+class XLineCapItem;
+class XLineColorItem;
+class XLineDashItem;
+class XLineEndCenterItem;
+class XLineEndItem;
+class XLineEndWidthItem;
+class XLineJointItem;
+class XLineStartCenterItem;
+class XLineStartItem;
+class XLineStartWidthItem;
+class XLineStyleItem;
+class XLineTransparenceItem;
+class XLineWidthItem;
+class XSecondaryFillColorItem;
+
+#define COL_DEFAULT_FONT ::Color(0xC9211E) // dark red 2
+#define COL_DEFAULT_FRAMELINE ::Color(0x2A6099) // blue
+#define COL_DEFAULT_HIGHLIGHT ::Color(0xFFFF00) // yellow
+#define COL_DEFAULT_SHAPE_FILLING ::Color(0x729fcf) // light blue 2
+#define COL_DEFAULT_SHAPE_STROKE ::Color(0x3465a4) // dark blue 1
+
+constexpr sal_uInt16 XATTR_START = 1000;
+
+constexpr sal_uInt16 XATTR_LINE_FIRST (XATTR_START); /* V3: 1000 V2: 1000 */
+constexpr TypedWhichId<XLineStyleItem> XATTR_LINESTYLE (XATTR_LINE_FIRST);
+constexpr TypedWhichId<XLineDashItem> XATTR_LINEDASH (XATTR_LINE_FIRST + 1); /* V3: 1001 V2: 1001 */
+constexpr TypedWhichId<XLineWidthItem> XATTR_LINEWIDTH (XATTR_LINE_FIRST + 2); /* V3: 1002 V2: 1002 */
+constexpr TypedWhichId<XLineColorItem> XATTR_LINECOLOR (XATTR_LINE_FIRST + 3); /* V3: 1003 V2: 1003 */
+constexpr TypedWhichId<XLineStartItem> XATTR_LINESTART (XATTR_LINE_FIRST + 4); /* V3: 1004 V2: 1004 */
+constexpr TypedWhichId<XLineEndItem> XATTR_LINEEND (XATTR_LINE_FIRST + 5); /* V3: 1005 V2: 1005 */
+constexpr TypedWhichId<XLineStartWidthItem> XATTR_LINESTARTWIDTH (XATTR_LINE_FIRST + 6); /* V3: 1006 V2: 1006 */
+constexpr TypedWhichId<XLineEndWidthItem> XATTR_LINEENDWIDTH (XATTR_LINE_FIRST + 7); /* V3: 1007 V2: 1007 */
+constexpr TypedWhichId<XLineStartCenterItem> XATTR_LINESTARTCENTER (XATTR_LINE_FIRST + 8); /* V3: 1008 V2: 1008 */
+constexpr TypedWhichId<XLineEndCenterItem> XATTR_LINEENDCENTER (XATTR_LINE_FIRST + 9); /* V3: 1009 V2: 1009 */
+constexpr TypedWhichId<XLineTransparenceItem> XATTR_LINETRANSPARENCE (XATTR_LINE_FIRST + 10); /* V3: 1010 V2: 1010 */
+constexpr TypedWhichId<XLineJointItem> XATTR_LINEJOINT (XATTR_LINE_FIRST + 11); /* V3: 1011 V2: 1011 */
+constexpr TypedWhichId<XLineCapItem> XATTR_LINECAP (XATTR_LINE_FIRST + 12); /* V3: 1012 */
+constexpr sal_uInt16 XATTR_LINE_LAST (XATTR_LINECAP);
+constexpr TypedWhichId<XLineAttrSetItem> XATTRSET_LINE (XATTR_LINE_LAST + 1); /* V3: 1017 V2: 1017 */
+
+constexpr sal_uInt16 XATTR_FILL_FIRST (XATTRSET_LINE + 1); /* V3: 1018 V2: 1018 */
+constexpr TypedWhichId<XFillStyleItem> XATTR_FILLSTYLE (XATTR_FILL_FIRST);
+constexpr TypedWhichId<XFillColorItem> XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1); /* V3: 1019 V2: 1019 */
+constexpr TypedWhichId<XFillGradientItem> XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2); /* V3: 1020 V2: 1020 */
+constexpr TypedWhichId<XFillHatchItem> XATTR_FILLHATCH (XATTR_FILL_FIRST + 3); /* V3: 1021 V2: 1021 */
+constexpr TypedWhichId<XFillBitmapItem> XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4); /* V3: 1022 V2: 1022 */
+constexpr TypedWhichId<XFillTransparenceItem> XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5); /* V3: 1023 V2: 1023 */
+constexpr TypedWhichId<XGradientStepCountItem> XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6); /* V3: 1024 V2: 1024 */
+constexpr TypedWhichId<XFillBmpTileItem> XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7); /* V3: 1025 V2: 1025 */
+constexpr TypedWhichId<XFillBmpPosItem> XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8); /* V3: 1026 V2: 1026 */
+constexpr TypedWhichId<SfxMetricItem> XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9); /* V3: 1027 V2: 1027 */
+constexpr TypedWhichId<XFillBmpSizeYItem> XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10); /* V3: 1028 V2: 1028 */
+constexpr TypedWhichId<XFillFloatTransparenceItem> XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11); /* V3: 1029 V2: 1029 */
+constexpr TypedWhichId<XSecondaryFillColorItem> XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12); /* V3: 1030 */
+constexpr TypedWhichId<XFillBmpSizeLogItem> XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13); /* V3: 1031 */
+constexpr TypedWhichId<XFillBmpTileOffsetXItem> XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14); /* V3: 1032 */
+constexpr TypedWhichId<XFillBmpTileOffsetYItem> XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15); /* V3: 1033 */
+constexpr TypedWhichId<XFillBmpStretchItem> XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16); /* V3: 1034 */
+constexpr TypedWhichId<XFillBmpPosOffsetXItem> XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17); /* V3: 1041 */
+constexpr TypedWhichId<XFillBmpPosOffsetYItem> XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18); /* V3: 1042 */
+constexpr TypedWhichId<XFillBackgroundItem> XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19); /* V3: 1043 */
+constexpr TypedWhichId<XFillUseSlideBackgroundItem> XATTR_FILLUSESLIDEBACKGROUND (XATTR_FILL_FIRST + 20);
+constexpr sal_uInt16 XATTR_FILL_LAST (XATTR_FILLUSESLIDEBACKGROUND);
+constexpr TypedWhichId<XFillAttrSetItem> XATTRSET_FILL (XATTR_FILL_LAST + 1); /* V3: 1047 V2: 1030 */
+
+constexpr sal_uInt16 XATTR_TEXT_FIRST (XATTRSET_FILL + 1);
+constexpr TypedWhichId<XFormTextStyleItem> XATTR_FORMTXTSTYLE (XATTR_TEXT_FIRST); /* V3: 1048 V2: 1031 */
+constexpr TypedWhichId<XFormTextAdjustItem> XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1); /* V3: 1049 V2: 1032 */
+constexpr TypedWhichId<XFormTextDistanceItem> XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2); /* V3: 1050 V2: 1033 */
+constexpr TypedWhichId<XFormTextStartItem> XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3); /* V3: 1051 V2: 1034 */
+constexpr TypedWhichId<XFormTextMirrorItem> XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4); /* V3: 1052 V2: 1035 */
+constexpr TypedWhichId<XFormTextOutlineItem> XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5); /* V3: 1053 V2: 1036 */
+constexpr TypedWhichId<XFormTextShadowItem> XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6); /* V3: 1054 V2: 1037 */
+constexpr TypedWhichId<XFormTextShadowColorItem> XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7); /* V3: 1055 V2: 1038 */
+constexpr TypedWhichId<XFormTextShadowXValItem> XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8); /* V3: 1056 V2: 1039 */
+constexpr TypedWhichId<XFormTextShadowYValItem> XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9); /* V3: 1057 V2: 1040 */
+constexpr TypedWhichId<XFormTextHideFormItem> XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10); /* V3: 1059 V2: 1042 */
+constexpr TypedWhichId<XFormTextShadowTranspItem> XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11); /* V3: 1060 V2: 1043 */
+constexpr sal_uInt16 XATTR_TEXT_LAST (XATTR_FORMTXTSHDWTRANSP);
+
+constexpr sal_uInt16 XATTR_END = XATTR_TEXT_LAST;
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx
new file mode 100644
index 000000000..f3620bdfa
--- /dev/null
+++ b/include/svx/xenum.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XENUM_HXX
+#define INCLUDED_SVX_XENUM_HXX
+
+
+enum class XFormTextStyle { Rotate, Upright, SlantX, SlantY, NONE };
+enum class XFormTextAdjust { Left, Right, AutoSize, Center };
+enum class XFormTextShadow { NONE, Normal, Slant };
+
+
+#endif // INCLUDED_SVX_XENUM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xfillit0.hxx b/include/svx/xfillit0.hxx
new file mode 100644
index 000000000..9f7cf9079
--- /dev/null
+++ b/include/svx/xfillit0.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFILLIT0_HXX
+#define INCLUDED_SVX_XFILLIT0_HXX
+
+#include <svl/eitem.hxx>
+
+#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/FillStyle.hpp>
+
+
+
+
+class SVXCORE_DLLPUBLIC XFillStyleItem final : public SfxEnumItem<css::drawing::FillStyle>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ XFillStyleItem(css::drawing::FillStyle = css::drawing::FillStyle_SOLID);
+
+ virtual XFillStyleItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xfilluseslidebackgrounditem.hxx b/include/svx/xfilluseslidebackgrounditem.hxx
new file mode 100644
index 000000000..86317a903
--- /dev/null
+++ b/include/svx/xfilluseslidebackgrounditem.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+/** Item to enable slide background for filled objects */
+
+class SVXCORE_DLLPUBLIC XFillUseSlideBackgroundItem final : public SfxBoolItem
+{
+public:
+ XFillUseSlideBackgroundItem(bool bFill = false);
+
+ virtual XFillUseSlideBackgroundItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric,
+ MapUnit ePresMetric, OUString& rText,
+ const IntlWrapper&) const override;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/svx/xflasit.hxx b/include/svx/xflasit.hxx
new file mode 100644
index 000000000..e3780a31d
--- /dev/null
+++ b/include/svx/xflasit.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLASIT_HXX
+#define INCLUDED_SVX_XFLASIT_HXX
+
+#include <sal/config.h>
+
+#include <svl/setitem.hxx>
+#include <svx/svxdllapi.h>
+
+// SetItem with all ItemSets of fill-attributes
+class SVXCORE_DLLPUBLIC XFillAttrSetItem final : public SfxSetItem
+{
+public:
+ XFillAttrSetItem(SfxItemSet&& pItemSet );
+ XFillAttrSetItem(SfxItemPool* pItemPool);
+ XFillAttrSetItem(const XFillAttrSetItem& rAttr);
+ XFillAttrSetItem(const XFillAttrSetItem& rAttr,
+ SfxItemPool* pItemPool);
+ virtual XFillAttrSetItem* Clone( SfxItemPool* pToPool = nullptr ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbckit.hxx b/include/svx/xflbckit.hxx
new file mode 100644
index 000000000..59d4e940e
--- /dev/null
+++ b/include/svx/xflbckit.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBCKIT_HXX
+#define INCLUDED_SVX_XFLBCKIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Item to enable background for filled objects
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFillBackgroundItem final : public SfxBoolItem
+{
+public:
+ XFillBackgroundItem( bool bFill = false );
+
+ SVX_DLLPRIVATE virtual XFillBackgroundItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbmpit.hxx b/include/svx/xflbmpit.hxx
new file mode 100644
index 000000000..ca7c739a7
--- /dev/null
+++ b/include/svx/xflbmpit.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBMPIT_HXX
+#define INCLUDED_SVX_XFLBMPIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/rectenum.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpPosItem final : public SfxEnumItem<RectPoint>
+{
+public:
+ XFillBmpPosItem( RectPoint eRP = RectPoint::MM );
+
+ SVX_DLLPRIVATE virtual XFillBmpPosItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ SVX_DLLPRIVATE virtual sal_uInt16 GetValueCount() const override;
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbmsli.hxx b/include/svx/xflbmsli.hxx
new file mode 100644
index 000000000..9fb283bab
--- /dev/null
+++ b/include/svx/xflbmsli.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBMSLI_HXX
+#define INCLUDED_SVX_XFLBMSLI_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpSizeLogItem final : public SfxBoolItem
+{
+public:
+ XFillBmpSizeLogItem( bool bLog = true );
+
+ SVX_DLLPRIVATE virtual XFillBmpSizeLogItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbmsxy.hxx b/include/svx/xflbmsxy.hxx
new file mode 100644
index 000000000..76611d3bd
--- /dev/null
+++ b/include/svx/xflbmsxy.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBMSXY_HXX
+#define INCLUDED_SVX_XFLBMSXY_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpSizeXItem final : public SfxMetricItem
+{
+public:
+ XFillBmpSizeXItem( tools::Long nSizeX = 0 );
+
+ SVX_DLLPRIVATE virtual XFillBmpSizeXItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ // This item records both metrical and percentage quotation (negative);
+ // We have to consider that.
+ SVX_DLLPRIVATE virtual bool HasMetrics() const override;
+};
+
+class SVXCORE_DLLPUBLIC XFillBmpSizeYItem final : public SfxMetricItem
+{
+public:
+ XFillBmpSizeYItem( tools::Long nSizeY = 0 );
+
+ SVX_DLLPRIVATE virtual XFillBmpSizeYItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ // This item records both metrical and percentage quotation (negative);
+ // We have to consider that.
+ SVX_DLLPRIVATE virtual bool HasMetrics() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbmtit.hxx b/include/svx/xflbmtit.hxx
new file mode 100644
index 000000000..ab92eca97
--- /dev/null
+++ b/include/svx/xflbmtit.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBMTIT_HXX
+#define INCLUDED_SVX_XFLBMTIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpTileItem final : public SfxBoolItem
+{
+public:
+ XFillBmpTileItem( bool bTile = true );
+
+ virtual XFillBmpTileItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflboxy.hxx b/include/svx/xflboxy.hxx
new file mode 100644
index 000000000..54d354b52
--- /dev/null
+++ b/include/svx/xflboxy.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBOXY_HXX
+#define INCLUDED_SVX_XFLBOXY_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpPosOffsetXItem final : public SfxUInt16Item
+{
+public:
+ XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX = 0 );
+
+ SVX_DLLPRIVATE virtual XFillBmpPosOffsetXItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+class SVXCORE_DLLPUBLIC XFillBmpPosOffsetYItem final : public SfxUInt16Item
+{
+public:
+ XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY = 0 );
+
+ SVX_DLLPRIVATE virtual XFillBmpPosOffsetYItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbstit.hxx b/include/svx/xflbstit.hxx
new file mode 100644
index 000000000..3d3f3b28e
--- /dev/null
+++ b/include/svx/xflbstit.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBSTIT_HXX
+#define INCLUDED_SVX_XFLBSTIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpStretchItem final : public SfxBoolItem
+{
+public:
+ XFillBmpStretchItem( bool bStretch = true );
+
+ virtual XFillBmpStretchItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflbtoxy.hxx b/include/svx/xflbtoxy.hxx
new file mode 100644
index 000000000..b561ab775
--- /dev/null
+++ b/include/svx/xflbtoxy.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLBTOXY_HXX
+#define INCLUDED_SVX_XFLBTOXY_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SVXCORE_DLLPUBLIC XFillBmpTileOffsetXItem final : public SfxUInt16Item
+{
+public:
+ XFillBmpTileOffsetXItem( sal_uInt16 nOffX = 0 );
+
+ SVX_DLLPRIVATE virtual XFillBmpTileOffsetXItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+class SVXCORE_DLLPUBLIC XFillBmpTileOffsetYItem final : public SfxUInt16Item
+{
+public:
+ XFillBmpTileOffsetYItem( sal_uInt16 nOffX = 0 );
+
+ SVX_DLLPRIVATE virtual XFillBmpTileOffsetYItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflclit.hxx b/include/svx/xflclit.hxx
new file mode 100644
index 000000000..df6b302d3
--- /dev/null
+++ b/include/svx/xflclit.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLCLIT_HXX
+#define INCLUDED_SVX_XFLCLIT_HXX
+
+#include <svx/xcolit.hxx>
+#include <svx/svxdllapi.h>
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Fuellattribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+
+class SVXCORE_DLLPUBLIC XFillColorItem final : public XColorItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFillColorItem() {}
+ XFillColorItem(sal_Int32 nIndex, const Color& rTheColor);
+ XFillColorItem(const OUString& rName, const Color& rTheColor);
+
+ virtual XFillColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflftrit.hxx b/include/svx/xflftrit.hxx
new file mode 100644
index 000000000..bd8a54a24
--- /dev/null
+++ b/include/svx/xflftrit.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLFTRIT_HXX
+#define INCLUDED_SVX_XFLFTRIT_HXX
+
+#include <svx/xflgrit.hxx>
+#include <svx/svxdllapi.h>
+#include <boost/property_tree/ptree_fwd.hpp>
+
+
+
+
+class SVXCORE_DLLPUBLIC XFillFloatTransparenceItem final : public XFillGradientItem
+{
+private:
+
+ bool bEnabled;
+
+public:
+
+ static SfxPoolItem* CreateDefault();
+ XFillFloatTransparenceItem();
+ XFillFloatTransparenceItem(const OUString& rName, const XGradient& rGradient, bool bEnable = true );
+ XFillFloatTransparenceItem( const XGradient& rTheGradient, bool bEnable = true );
+ XFillFloatTransparenceItem( const XFillFloatTransparenceItem& rItem );
+
+ virtual bool operator==( const SfxPoolItem& rItem ) const override;
+ virtual XFillFloatTransparenceItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric,
+ MapUnit ePresMetric, OUString &rText, const IntlWrapper& rIntlWrapper ) const override;
+
+ bool IsEnabled() const { return bEnabled; }
+ void SetEnabled( bool bEnable ) { bEnabled = bEnable; }
+
+ static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
+ std::unique_ptr<XFillFloatTransparenceItem> checkForUniqueItem( SdrModel* pModel ) const;
+
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflgrit.hxx b/include/svx/xflgrit.hxx
new file mode 100644
index 000000000..0c02e44a8
--- /dev/null
+++ b/include/svx/xflgrit.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLGRIT_HXX
+#define INCLUDED_SVX_XFLGRIT_HXX
+
+#include <svx/xdef.hxx>
+#include <svx/xit.hxx>
+#include <svx/xgrad.hxx>
+#include <svx/svxdllapi.h>
+
+class SdrModel;
+
+
+
+class SVXCORE_DLLPUBLIC XFillGradientItem : public NameOrIndex
+{
+ XGradient aGradient;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1) {}
+ XFillGradientItem(sal_Int32 nIndex, const XGradient& rTheGradient);
+ XFillGradientItem(const OUString& rName, const XGradient& rTheGradient, TypedWhichId<XFillGradientItem> nWhich = XATTR_FILLGRADIENT);
+ XFillGradientItem(const XGradient& rTheGradient);
+ XFillGradientItem(const XFillGradientItem& rItem);
+
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual XFillGradientItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ const XGradient& GetGradientValue() const; // GetValue -> GetGradientValue
+ void SetGradientValue(const XGradient& rNew) { aGradient = rNew; Detach(); } // SetValue -> SetGradientValue
+
+ static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
+ std::unique_ptr<XFillGradientItem> checkForUniqueItem( SdrModel* pModel ) const;
+
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx
new file mode 100644
index 000000000..9eb880541
--- /dev/null
+++ b/include/svx/xflhtit.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLHTIT_HXX
+#define INCLUDED_SVX_XFLHTIT_HXX
+
+#include <svx/xdef.hxx>
+#include <svx/xit.hxx>
+#include <svx/xhatch.hxx>
+#include <svx/svxdllapi.h>
+
+class SdrModel;
+
+
+
+class SVXCORE_DLLPUBLIC XFillHatchItem final : public NameOrIndex
+{
+ XHatch aHatch;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XFillHatchItem() : NameOrIndex(XATTR_FILLHATCH, -1) {}
+ XFillHatchItem(const OUString& rName, const XHatch& rTheHatch);
+ XFillHatchItem(const XHatch& rTheHatch);
+ XFillHatchItem(const XFillHatchItem& rItem);
+
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual XFillHatchItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ virtual bool HasMetrics() const override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
+
+ const XHatch& GetHatchValue() const { return aHatch;} // GetValue -> GetHatchValue
+
+ static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
+ std::unique_ptr<XFillHatchItem> checkForUniqueItem( SdrModel* pModel ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xfltrit.hxx b/include/svx/xfltrit.hxx
new file mode 100644
index 000000000..55128b495
--- /dev/null
+++ b/include/svx/xfltrit.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFLTRIT_HXX
+#define INCLUDED_SVX_XFLTRIT_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* transparency-Item for contents (Solid)
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFillTransparenceItem final : public SfxUInt16Item
+{
+public:
+ XFillTransparenceItem(sal_uInt16 nFillTransparence = 0);
+ virtual XFillTransparenceItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftadit.hxx b/include/svx/xftadit.hxx
new file mode 100644
index 000000000..27773a49d
--- /dev/null
+++ b/include/svx/xftadit.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTADIT_HXX
+#define INCLUDED_SVX_XFTADIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/xenum.hxx>
+
+/*************************************************************************
+|*
+|* FormText-AdjustItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextAdjustItem final : public SfxEnumItem<XFormTextAdjust>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ XFormTextAdjustItem(XFormTextAdjust = XFormTextAdjust::Center);
+ virtual XFormTextAdjustItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+ // #FontWork#
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftdiit.hxx b/include/svx/xftdiit.hxx
new file mode 100644
index 000000000..d77323e78
--- /dev/null
+++ b/include/svx/xftdiit.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTDIIT_HXX
+#define INCLUDED_SVX_XFTDIIT_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-DistanceItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextDistanceItem final : public SfxMetricItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFormTextDistanceItem(tools::Long nDist = 0);
+ virtual XFormTextDistanceItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftmrit.hxx b/include/svx/xftmrit.hxx
new file mode 100644
index 000000000..3cac10212
--- /dev/null
+++ b/include/svx/xftmrit.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTMRIT_HXX
+#define INCLUDED_SVX_XFTMRIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-MirrorItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextMirrorItem final : public SfxBoolItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFormTextMirrorItem(bool bMirror = false);
+ virtual XFormTextMirrorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftouit.hxx b/include/svx/xftouit.hxx
new file mode 100644
index 000000000..2225e3552
--- /dev/null
+++ b/include/svx/xftouit.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTOUIT_HXX
+#define INCLUDED_SVX_XFTOUIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svl/poolitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-OutlineItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextOutlineItem final : public SfxBoolItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ XFormTextOutlineItem(bool bOutline = false);
+ virtual XFormTextOutlineItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftshcit.hxx b/include/svx/xftshcit.hxx
new file mode 100644
index 000000000..cfaccbfad
--- /dev/null
+++ b/include/svx/xftshcit.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTSHCIT_HXX
+#define INCLUDED_SVX_XFTSHCIT_HXX
+
+#include <svx/xcolit.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-ShadowColorItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextShadowColorItem final : public XColorItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFormTextShadowColorItem() {}
+ XFormTextShadowColorItem(const OUString& rName, const Color& rTheColor);
+
+ virtual XFormTextShadowColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftshit.hxx b/include/svx/xftshit.hxx
new file mode 100644
index 000000000..e951a6908
--- /dev/null
+++ b/include/svx/xftshit.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTSHIT_HXX
+#define INCLUDED_SVX_XFTSHIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/xenum.hxx>
+
+/*************************************************************************
+|*
+|* FormText-ShadowItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextShadowItem final : public SfxEnumItem<XFormTextShadow>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ XFormTextShadowItem(XFormTextShadow = XFormTextShadow::NONE);
+ virtual XFormTextShadowItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+ // #FontWork#
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftshxy.hxx b/include/svx/xftshxy.hxx
new file mode 100644
index 000000000..2e7cbe663
--- /dev/null
+++ b/include/svx/xftshxy.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTSHXY_HXX
+#define INCLUDED_SVX_XFTSHXY_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-ShadowXValItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextShadowXValItem final : public SfxMetricItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ XFormTextShadowXValItem(tools::Long nVal = 0);
+ virtual XFormTextShadowXValItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+/*************************************************************************
+|*
+|* FormText-ShadowYValItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextShadowYValItem final : public SfxMetricItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFormTextShadowYValItem(tools::Long nVal = 0);
+ virtual XFormTextShadowYValItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xftstit.hxx b/include/svx/xftstit.hxx
new file mode 100644
index 000000000..bc9243968
--- /dev/null
+++ b/include/svx/xftstit.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XFTSTIT_HXX
+#define INCLUDED_SVX_XFTSTIT_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-StartPositionItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextStartItem final : public SfxMetricItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+
+ XFormTextStartItem(tools::Long nStart = 0);
+ virtual XFormTextStartItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xgrad.hxx b/include/svx/xgrad.hxx
new file mode 100644
index 000000000..93a2f0065
--- /dev/null
+++ b/include/svx/xgrad.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XGRAD_HXX
+#define INCLUDED_SVX_XGRAD_HXX
+
+#include <tools/color.hxx>
+#include <tools/degree.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/awt/GradientStyle.hpp>
+#include <boost/property_tree/ptree_fwd.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+
+class Gradient;
+
+class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC XGradient final
+{
+ css::awt::GradientStyle eStyle;
+ Color aStartColor;
+ Color aEndColor;
+ Degree10 nAngle;
+ sal_uInt16 nBorder;
+ sal_uInt16 nOfsX;
+ sal_uInt16 nOfsY;
+ sal_uInt16 nIntensStart;
+ sal_uInt16 nIntensEnd;
+ sal_uInt16 nStepCount;
+
+ static std::string GradientStyleToString(css::awt::GradientStyle eStyle);
+
+public:
+ XGradient();
+ XGradient( const Color& rStart, const Color& rEnd,
+ css::awt::GradientStyle eStyle = css::awt::GradientStyle_LINEAR, Degree10 nAngle = 0_deg10,
+ sal_uInt16 nXOfs = 50, sal_uInt16 nYOfs = 50, sal_uInt16 nBorder = 0,
+ sal_uInt16 nStartIntens = 100, sal_uInt16 nEndIntens = 100,
+ sal_uInt16 nSteps = 0 );
+
+ bool operator==(const XGradient& rGradient) const;
+
+ void SetGradientStyle(css::awt::GradientStyle eNewStyle) { eStyle = eNewStyle; }
+ void SetStartColor(const Color& rColor) { aStartColor = rColor; }
+ void SetEndColor(const Color& rColor) { aEndColor = rColor; }
+ void SetAngle(Degree10 nNewAngle) { nAngle = nNewAngle; }
+ void SetBorder(sal_uInt16 nNewBorder) { nBorder = nNewBorder; }
+ void SetXOffset(sal_uInt16 nNewOffset) { nOfsX = nNewOffset; }
+ void SetYOffset(sal_uInt16 nNewOffset) { nOfsY = nNewOffset; }
+ void SetStartIntens(sal_uInt16 nNewIntens) { nIntensStart = nNewIntens; }
+ void SetEndIntens(sal_uInt16 nNewIntens) { nIntensEnd = nNewIntens; }
+ void SetSteps(sal_uInt16 nSteps) { nStepCount = nSteps; }
+
+ css::awt::GradientStyle GetGradientStyle() const { return eStyle; }
+ const Color& GetStartColor() const { return aStartColor; }
+ const Color& GetEndColor() const { return aEndColor; }
+ Degree10 GetAngle() const { return nAngle; }
+ sal_uInt16 GetBorder() const { return nBorder; }
+ sal_uInt16 GetXOffset() const { return nOfsX; }
+ sal_uInt16 GetYOffset() const { return nOfsY; }
+ sal_uInt16 GetStartIntens() const { return nIntensStart; }
+ sal_uInt16 GetEndIntens() const { return nIntensEnd; }
+ sal_uInt16 GetSteps() const { return nStepCount; }
+
+ boost::property_tree::ptree dumpAsJSON() const;
+ static XGradient fromJSON(const OUString& rJSON);
+ css::awt::Gradient toGradientUNO() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xgrscit.hxx b/include/svx/xgrscit.hxx
new file mode 100644
index 000000000..92e0c099b
--- /dev/null
+++ b/include/svx/xgrscit.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XGRSCIT_HXX
+#define INCLUDED_SVX_XGRSCIT_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Gradient step item for gradient fills
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XGradientStepCountItem final : public SfxUInt16Item
+{
+public:
+ XGradientStepCountItem( sal_uInt16 nStepCount = 0 );
+ virtual XGradientStepCountItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xhatch.hxx b/include/svx/xhatch.hxx
new file mode 100644
index 000000000..1553141e5
--- /dev/null
+++ b/include/svx/xhatch.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XHATCH_HXX
+#define INCLUDED_SVX_XHATCH_HXX
+
+#include <tools/color.hxx>
+#include <tools/degree.hxx>
+#include <tools/long.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/HatchStyle.hpp>
+
+
+
+
+class SVXCORE_DLLPUBLIC XHatch final
+{
+ css::drawing::HatchStyle eStyle;
+ Color aColor;
+ tools::Long nDistance;
+ Degree10 nAngle;
+
+public:
+ XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), nDistance(0), nAngle(0) {}
+ XHatch(const Color& rCol, css::drawing::HatchStyle eStyle = css::drawing::HatchStyle_SINGLE,
+ tools::Long nDistance = 20, Degree10 nAngle = 0_deg10);
+
+ bool operator==(const XHatch& rHatch) const;
+
+ void SetHatchStyle(css::drawing::HatchStyle eNewStyle) { eStyle = eNewStyle; }
+ void SetColor(const Color& rColor) { aColor = rColor; }
+ void SetDistance(tools::Long nNewDistance) { nDistance = nNewDistance; }
+ void SetAngle(Degree10 nNewAngle) { nAngle = nNewAngle; }
+
+ css::drawing::HatchStyle GetHatchStyle() const { return eStyle; }
+ const Color& GetColor() const { return aColor; }
+ tools::Long GetDistance() const { return nDistance; }
+ Degree10 GetAngle() const { return nAngle; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xit.hxx b/include/svx/xit.hxx
new file mode 100644
index 000000000..f6b19595a
--- /dev/null
+++ b/include/svx/xit.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XIT_HXX
+#define INCLUDED_SVX_XIT_HXX
+
+#include <svl/stritem.hxx>
+#include <svx/xtable.hxx>
+#include <svx/svxdllapi.h>
+#include <unotools/resmgr.hxx>
+
+/************************************************************************/
+
+class SfxItemPool;
+class NameOrIndex;
+
+typedef bool (*SvxCompareValueFunc)( const NameOrIndex* p1, const NameOrIndex* p2 );
+
+
+
+class SVXCORE_DLLPUBLIC NameOrIndex : public SfxStringItem
+{
+ sal_Int32 nPalIndex;
+
+protected:
+ void Detach() { nPalIndex = -1; }
+
+public:
+ NameOrIndex() { nPalIndex = -1; }
+ NameOrIndex(TypedWhichId<NameOrIndex> nWhich, sal_Int32 nIndex);
+ NameOrIndex(TypedWhichId<NameOrIndex> nWhich, const OUString& rName);
+ NameOrIndex(const NameOrIndex& rNameOrIndex);
+
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual NameOrIndex* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ OUString const & GetName() const { return GetValue(); }
+ void SetName(const OUString& rName) { SetValue(rName); }
+ bool IsIndex() const { return (nPalIndex >= 0); }
+ sal_Int32 GetPalIndex() const { return nPalIndex; }
+
+ /** this static checks if the given NameOrIndex item has a unique name for its value.
+ The returned String is a unique name for an item with this value in both given pools.
+ Argument pPool2 can be null.
+ If returned string equals NameOrIndex->GetName(), the name was already unique.
+ */
+ static OUString CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, SvxCompareValueFunc pCompareValueFunc, TranslateId pPrefixResId, const XPropertyListRef &pDefaults );
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlineit0.hxx b/include/svx/xlineit0.hxx
new file mode 100644
index 000000000..ab8e26561
--- /dev/null
+++ b/include/svx/xlineit0.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLINEIT0_HXX
+#define INCLUDED_SVX_XLINEIT0_HXX
+
+#include <svl/eitem.hxx>
+
+
+#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/LineStyle.hpp>
+
+class SVXCORE_DLLPUBLIC XLineStyleItem final : public SfxEnumItem<css::drawing::LineStyle>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineStyleItem(css::drawing::LineStyle = css::drawing::LineStyle_SOLID);
+ virtual XLineStyleItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlinjoit.hxx b/include/svx/xlinjoit.hxx
new file mode 100644
index 000000000..b495ecf25
--- /dev/null
+++ b/include/svx/xlinjoit.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLINJOIT_HXX
+#define INCLUDED_SVX_XLINJOIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+#include <com/sun/star/drawing/LineJoint.hpp>
+
+
+
+
+class SVXCORE_DLLPUBLIC XLineJointItem final : public SfxEnumItem<css::drawing::LineJoint>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineJointItem( css::drawing::LineJoint eLineJoint = css::drawing::LineJoint_ROUND );
+
+ virtual XLineJointItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric, MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ virtual sal_uInt16 GetValueCount() const override;
+};
+
+#endif // INCLUDED_SVX_XLINJOIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnasit.hxx b/include/svx/xlnasit.hxx
new file mode 100644
index 000000000..e388c2965
--- /dev/null
+++ b/include/svx/xlnasit.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNASIT_HXX
+#define INCLUDED_SVX_XLNASIT_HXX
+
+#include <sal/config.h>
+
+#include <svl/setitem.hxx>
+#include <svx/svxdllapi.h>
+
+// SetItem with all ItemSets of line-attributes
+class SVXCORE_DLLPUBLIC XLineAttrSetItem final : public SfxSetItem
+{
+public:
+ XLineAttrSetItem(SfxItemSet&& pItemSet );
+ XLineAttrSetItem(SfxItemPool* pItemPool);
+ XLineAttrSetItem(const XLineAttrSetItem& rAttr);
+ XLineAttrSetItem(const XLineAttrSetItem& rAttr,
+ SfxItemPool* pItemPool);
+ virtual XLineAttrSetItem* Clone( SfxItemPool* pToPool = nullptr ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlncapit.hxx b/include/svx/xlncapit.hxx
new file mode 100644
index 000000000..7311d0d06
--- /dev/null
+++ b/include/svx/xlncapit.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNCAPIT_HXX
+#define INCLUDED_SVX_XLNCAPIT_HXX
+
+#include <svx/svxdllapi.h>
+#include <svl/eitem.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
+
+
+
+
+class SVXCORE_DLLPUBLIC XLineCapItem final : public SfxEnumItem<css::drawing::LineCap>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineCapItem(css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
+
+ virtual XLineCapItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric, MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ css::drawing::LineCap GetValue() const;
+ virtual sal_uInt16 GetValueCount() const override;
+};
+
+#endif // INCLUDED_SVX_XLNCAPIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnclit.hxx b/include/svx/xlnclit.hxx
new file mode 100644
index 000000000..7de9bc8b6
--- /dev/null
+++ b/include/svx/xlnclit.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNCLIT_HXX
+#define INCLUDED_SVX_XLNCLIT_HXX
+
+#include <svx/xcolit.hxx>
+#include <svx/svxdllapi.h>
+
+
+
+class SVXCORE_DLLPUBLIC XLineColorItem final : public XColorItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineColorItem() {}
+ XLineColorItem(sal_Int32 nIndex, const Color& rTheColor);
+ XLineColorItem(const OUString& rName, const Color& rTheColor);
+
+ virtual XLineColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlndsit.hxx b/include/svx/xlndsit.hxx
new file mode 100644
index 000000000..04b40d41f
--- /dev/null
+++ b/include/svx/xlndsit.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNDSIT_HXX
+#define INCLUDED_SVX_XLNDSIT_HXX
+
+#include <svx/xdef.hxx>
+#include <svx/xit.hxx>
+
+#include <svx/xdash.hxx>
+#include <svx/svxdllapi.h>
+
+class SdrModel;
+
+
+
+class SVXCORE_DLLPUBLIC XLineDashItem final : public NameOrIndex
+{
+ XDash aDash;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineDashItem() : NameOrIndex(XATTR_LINEDASH, -1) {}
+ XLineDashItem(const OUString& rName, const XDash& rTheDash);
+ XLineDashItem(const XDash& rTheDash);
+ XLineDashItem(const XLineDashItem& rItem);
+
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual XLineDashItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+ virtual bool HasMetrics() const override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
+
+ const XDash& GetDashValue() const { return aDash;}
+ void SetDashValue(const XDash& rNew) { aDash = rNew; Detach(); } // SetValue -> SetDashValue
+
+ static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
+ std::unique_ptr<XLineDashItem> checkForUniqueItem( SdrModel* pModel ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnedcit.hxx b/include/svx/xlnedcit.hxx
new file mode 100644
index 000000000..fde707675
--- /dev/null
+++ b/include/svx/xlnedcit.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNEDCIT_HXX
+#define INCLUDED_SVX_XLNEDCIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+
+class SVXCORE_DLLPUBLIC XLineEndCenterItem final : public SfxBoolItem
+{
+public:
+ XLineEndCenterItem(bool bEndCenter = false);
+ virtual XLineEndCenterItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnedit.hxx b/include/svx/xlnedit.hxx
new file mode 100644
index 000000000..9a43e14f3
--- /dev/null
+++ b/include/svx/xlnedit.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNEDIT_HXX
+#define INCLUDED_SVX_XLNEDIT_HXX
+
+#include <svx/xit.hxx>
+#include <svx/svxdllapi.h>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+
+class SdrModel;
+
+
+
+class SVXCORE_DLLPUBLIC XLineEndItem final : public NameOrIndex
+{
+ basegfx::B2DPolyPolygon maPolyPolygon;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineEndItem(sal_Int32 nIndex = -1);
+ XLineEndItem(const OUString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon);
+ XLineEndItem(const basegfx::B2DPolyPolygon& rPolyPolygon);
+ XLineEndItem(const XLineEndItem& rItem);
+
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual XLineEndItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ const basegfx::B2DPolyPolygon& GetLineEndValue() const { return maPolyPolygon;}
+ void SetLineEndValue(const basegfx::B2DPolyPolygon& rPolyPolygon) { maPolyPolygon = rPolyPolygon; Detach(); }
+
+ std::unique_ptr<XLineEndItem> checkForUniqueItem( SdrModel* pModel ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnedwit.hxx b/include/svx/xlnedwit.hxx
new file mode 100644
index 000000000..a049794f3
--- /dev/null
+++ b/include/svx/xlnedwit.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNEDWIT_HXX
+#define INCLUDED_SVX_XLNEDWIT_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+#define LINE_END_WIDTH_DEFAULT (200)
+
+
+
+
+class SVXCORE_DLLPUBLIC XLineEndWidthItem final : public SfxMetricItem
+{
+public:
+ XLineEndWidthItem(tools::Long nWidth = LINE_END_WIDTH_DEFAULT);
+ virtual XLineEndWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnstcit.hxx b/include/svx/xlnstcit.hxx
new file mode 100644
index 000000000..a48307cab
--- /dev/null
+++ b/include/svx/xlnstcit.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNSTCIT_HXX
+#define INCLUDED_SVX_XLNSTCIT_HXX
+
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+
+class SVXCORE_DLLPUBLIC XLineStartCenterItem final : public SfxBoolItem
+{
+public:
+ XLineStartCenterItem(bool bStartCenter = false);
+ virtual XLineStartCenterItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnstit.hxx b/include/svx/xlnstit.hxx
new file mode 100644
index 000000000..859fdcbe7
--- /dev/null
+++ b/include/svx/xlnstit.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNSTIT_HXX
+#define INCLUDED_SVX_XLNSTIT_HXX
+
+#include <svx/xit.hxx>
+#include <svx/svxdllapi.h>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+
+class SdrModel;
+
+
+
+class SVXCORE_DLLPUBLIC XLineStartItem final : public NameOrIndex
+{
+ basegfx::B2DPolyPolygon maPolyPolygon;
+
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineStartItem(sal_Int32 nIndex = -1);
+ XLineStartItem(const OUString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon);
+ XLineStartItem(const basegfx::B2DPolyPolygon& rPolyPolygon);
+ XLineStartItem(const XLineStartItem& rItem);
+
+ virtual bool operator==(const SfxPoolItem& rItem) const override;
+ virtual XLineStartItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+ const basegfx::B2DPolyPolygon& GetLineStartValue() const { return maPolyPolygon;}
+ void SetLineStartValue(const basegfx::B2DPolyPolygon& rPolyPolygon) { maPolyPolygon = rPolyPolygon; Detach(); }
+
+ std::unique_ptr<XLineStartItem> checkForUniqueItem( SdrModel* pModel ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnstwit.hxx b/include/svx/xlnstwit.hxx
new file mode 100644
index 000000000..c6803e371
--- /dev/null
+++ b/include/svx/xlnstwit.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNSTWIT_HXX
+#define INCLUDED_SVX_XLNSTWIT_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+#define LINE_START_WIDTH_DEFAULT (200)
+
+
+
+class SVXCORE_DLLPUBLIC XLineStartWidthItem final : public SfxMetricItem
+{
+public:
+ XLineStartWidthItem(tools::Long nWidth = LINE_START_WIDTH_DEFAULT);
+ virtual XLineStartWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlntrit.hxx b/include/svx/xlntrit.hxx
new file mode 100644
index 000000000..c7eca5815
--- /dev/null
+++ b/include/svx/xlntrit.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNTRIT_HXX
+#define INCLUDED_SVX_XLNTRIT_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* Transparency item for lines
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XLineTransparenceItem final : public SfxUInt16Item
+{
+public:
+ XLineTransparenceItem(sal_uInt16 nLineTransparence = 0);
+ virtual XLineTransparenceItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xlnwtit.hxx b/include/svx/xlnwtit.hxx
new file mode 100644
index 000000000..21df71b8a
--- /dev/null
+++ b/include/svx/xlnwtit.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XLNWTIT_HXX
+#define INCLUDED_SVX_XLNWTIT_HXX
+
+#include <svl/metitem.hxx>
+#include <svx/svxdllapi.h>
+
+
+
+class SVXCORE_DLLPUBLIC XLineWidthItem final : public SfxMetricItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XLineWidthItem(tools::Long nWidth = 0);
+ virtual XLineWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+
+ virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx
new file mode 100644
index 000000000..55682f16c
--- /dev/null
+++ b/include/svx/xmleohlp.hxx
@@ -0,0 +1,124 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XMLEOHLP_HXX
+#define INCLUDED_SVX_XMLEOHLP_HXX
+
+#include <comphelper/compbase.hxx>
+#include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <svx/svxdllapi.h>
+#include <rtl/ref.hxx>
+#include <tools/stream.hxx>
+#include <map>
+#include <optional>
+
+enum class SvXMLEmbeddedObjectHelperMode
+{
+ Read, Write
+};
+
+namespace comphelper { class IEmbeddedHelper; }
+
+class SvGlobalName;
+class OutputStorageWrapper_Impl;
+
+
+class SVXCORE_DLLPUBLIC SvXMLEmbeddedObjectHelper final :
+ public comphelper::WeakComponentImplHelper< css::document::XEmbeddedObjectResolver, css::container::XNameAccess >
+{
+ OUString maCurContainerStorageName;
+
+
+ css::uno::Reference < css::embed::XStorage > mxRootStorage; // package
+ ::comphelper::IEmbeddedHelper* mpDocPersist;
+ css::uno::Reference < css::embed::XStorage > mxContainerStorage; // container sub package for
+ css::uno::Reference < css::embed::XStorage > mxTempStorage; // package
+ // objects
+ SvXMLEmbeddedObjectHelperMode meCreateMode;
+ std::optional<std::map< OUString, rtl::Reference<OutputStorageWrapper_Impl> >>
+ mxStreamMap;
+
+ SVX_DLLPRIVATE bool ImplGetStorageNames(
+ const OUString& rURLStr,
+ OUString& rContainerStorageName,
+ OUString& rObjectStorageName,
+ bool bInternalToExternal,
+ bool *pGraphicRepl=nullptr,
+ bool *pOasisFormat=nullptr ) const;
+
+ SVX_DLLPRIVATE css::uno::Reference < css::embed::XStorage > const & ImplGetContainerStorage(
+ const OUString& rStorageName );
+
+ SVX_DLLPRIVATE void ImplReadObject(
+ const OUString& rContainerStorageName,
+ OUString& rObjName,
+ const SvGlobalName *pClassId,
+ SvStream* pTemp );
+
+ SVX_DLLPRIVATE OUString ImplInsertEmbeddedObjectURL(
+ const OUString& rURLStr );
+
+ SVX_DLLPRIVATE css::uno::Reference< css::io::XInputStream > ImplGetReplacementImage(
+ const css::uno::Reference< css::embed::XEmbeddedObject >& xObj );
+
+ SvXMLEmbeddedObjectHelper();
+ virtual ~SvXMLEmbeddedObjectHelper() override;
+ void Init( const css::uno::Reference < css::embed::XStorage >&,
+ ::comphelper::IEmbeddedHelper& rDocPersist,
+ SvXMLEmbeddedObjectHelperMode eCreateMode );
+
+ virtual void disposing(std::unique_lock<std::mutex>&) override;
+
+public:
+ SvXMLEmbeddedObjectHelper(
+ ::comphelper::IEmbeddedHelper& rDocPersist,
+ SvXMLEmbeddedObjectHelperMode eCreateMode );
+
+ static rtl::Reference<SvXMLEmbeddedObjectHelper> Create(
+ const css::uno::Reference < css::embed::XStorage >&,
+ ::comphelper::IEmbeddedHelper& rDocPersist,
+ SvXMLEmbeddedObjectHelperMode eCreateMode );
+ static rtl::Reference<SvXMLEmbeddedObjectHelper> Create(
+ ::comphelper::IEmbeddedHelper& rDocPersist,
+ SvXMLEmbeddedObjectHelperMode eCreateMode );
+
+ // XEmbeddedObjectResolver
+ virtual OUString SAL_CALL resolveEmbeddedObjectURL( const OUString& aURL ) override;
+
+ // XNameAccess
+ virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) override;
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
+
+ // XNameAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) override;
+ virtual sal_Bool SAL_CALL hasElements( ) override;
+
+
+ static void splitObjectURL(const OUString& aURLNoPar,
+ OUString& rContainerStorageName,
+ OUString& rObjectStorageName);
+};
+
+#endif // INCLUDED_SVX_XMLEOHLP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xmlexchg.hxx b/include/svx/xmlexchg.hxx
new file mode 100644
index 000000000..e03bdb4cf
--- /dev/null
+++ b/include/svx/xmlexchg.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XMLEXCHG_HXX
+#define INCLUDED_SVX_XMLEXCHG_HXX
+
+#include <rtl/ustring.hxx>
+#include <vcl/transfer.hxx>
+#include <svx/svxdllapi.h>
+
+namespace com::sun::star::beans {
+ class SAL_NO_VTABLE XPropertySet;
+}
+
+
+namespace svx
+{
+
+
+ //= OXFormsDescriptor
+
+
+ struct SVXCORE_DLLPUBLIC OXFormsDescriptor {
+
+ OUString szName;
+ OUString szServiceName;
+ css::uno::Reference< css::beans::XPropertySet > xPropSet;
+
+ OXFormsDescriptor() {}
+ OXFormsDescriptor( const OXFormsDescriptor &rhs ) { *this=rhs; }
+ OXFormsDescriptor &operator = ( const OXFormsDescriptor &rhs ) {
+ szName = rhs.szName;
+ szServiceName = rhs.szServiceName;
+ xPropSet = rhs.xPropSet;
+ return (*this);
+ }
+ };
+
+
+ //= OXFormsTransferable
+
+ class SVXCORE_DLLPUBLIC OXFormsTransferable final : public TransferDataContainer {
+
+ // TransferableHelper overridables
+ virtual void AddSupportedFormats() override;
+ virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
+
+ OXFormsDescriptor m_aDescriptor;
+
+ public:
+
+ /** construct the transferable
+ */
+ OXFormsTransferable( const OXFormsDescriptor &rhs );
+
+ /** extracts an xform descriptor from the transferable given
+ */
+ static const OXFormsDescriptor &extractDescriptor( const TransferableDataHelper& _rData );
+ };
+
+
+}
+
+
+#endif // INCLUDED_SVX_XMLEXCHG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx
new file mode 100644
index 000000000..0e54e1cb1
--- /dev/null
+++ b/include/svx/xmlgrhlp.hxx
@@ -0,0 +1,128 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XMLGRHLP_HXX
+#define INCLUDED_SVX_XMLGRHLP_HXX
+
+#include <comphelper/compbase.hxx>
+#include <vcl/graph.hxx>
+#include <rtl/ref.hxx>
+
+#include <string_view>
+#include <vector>
+#include <unordered_map>
+#include <utility>
+#include <com/sun/star/document/XGraphicObjectResolver.hpp>
+#include <com/sun/star/document/XGraphicStorageHandler.hpp>
+#include <com/sun/star/document/XBinaryStreamResolver.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <svx/svxdllapi.h>
+
+enum class SvXMLGraphicHelperMode
+{
+ Read, Write
+};
+
+struct SvxGraphicHelperStream_Impl
+{
+ css::uno::Reference < css::embed::XStorage > xStorage;
+ css::uno::Reference < css::io::XStream > xStream;
+};
+
+class SVXCORE_DLLPUBLIC SvXMLGraphicHelper final :
+ public comphelper::WeakComponentImplHelper<css::document::XGraphicObjectResolver,
+ css::document::XGraphicStorageHandler,
+ css::document::XBinaryStreamResolver>
+{
+private:
+ css::uno::Reference < css::embed::XStorage > mxRootStorage;
+ OUString maCurStorageName;
+ std::vector< css::uno::Reference< css::io::XOutputStream > >
+ maGrfStms;
+
+ std::unordered_map<OUString, css::uno::Reference<css::graphic::XGraphic>> maGraphicObjects;
+ std::unordered_map<Graphic, std::pair<OUString, OUString>> maExportGraphics;
+
+ SvXMLGraphicHelperMode meCreateMode;
+ OUString maOutputMimeType;
+
+ SVX_DLLPRIVATE static bool ImplGetStreamNames( const OUString& rURLStr,
+ OUString& rPictureStorageName,
+ OUString& rPictureStreamName );
+ SVX_DLLPRIVATE css::uno::Reference < css::embed::XStorage >
+ ImplGetGraphicStorage( const OUString& rPictureStorageName );
+ SVX_DLLPRIVATE SvxGraphicHelperStream_Impl
+ ImplGetGraphicStream( const OUString& rPictureStorageName,
+ const OUString& rPictureStreamName );
+ SVX_DLLPRIVATE static OUString ImplGetGraphicMimeType( const OUString& rFileName );
+ SVX_DLLPRIVATE Graphic ImplReadGraphic( const OUString& rPictureStorageName,
+ const OUString& rPictureStreamName );
+
+ SvXMLGraphicHelper();
+ virtual ~SvXMLGraphicHelper() override;
+ void Init( const css::uno::Reference < css::embed::XStorage >& xXMLStorage,
+ SvXMLGraphicHelperMode eCreateMode,
+ const OUString& rGraphicMimeType = OUString() );
+
+ SVX_DLLPRIVATE OUString implSaveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,
+ OUString & rOutMimeType,
+ std::u16string_view rRequestName);
+
+public:
+ SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode );
+
+ static rtl::Reference<SvXMLGraphicHelper> Create( const css::uno::Reference < css::embed::XStorage >& rXMLStorage,
+ SvXMLGraphicHelperMode eCreateMode );
+ static rtl::Reference<SvXMLGraphicHelper> Create( SvXMLGraphicHelperMode eCreateMode,
+ const OUString& rMimeType = OUString() );
+
+public:
+
+ // XGraphicObjectResolver
+ virtual OUString SAL_CALL resolveGraphicObjectURL( const OUString& aURL ) override;
+
+ // XGraphicStorageHandler
+ virtual css::uno::Reference<css::graphic::XGraphic> SAL_CALL
+ loadGraphic(OUString const & aURL) override;
+
+ virtual css::uno::Reference<css::graphic::XGraphic> SAL_CALL
+ loadGraphicFromOutputStream(css::uno::Reference<css::io::XOutputStream> const & rxOutputStream) override;
+
+ virtual OUString SAL_CALL
+ saveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic) override;
+
+ virtual OUString SAL_CALL
+ saveGraphicByName(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic, OUString & rOutSavedMimeType, OUString const & rRequestName) override;
+
+ virtual css::uno::Reference<css::io::XInputStream> SAL_CALL
+ createInputStream(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic) override;
+
+ // XBinaryStreamResolver
+ virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( const OUString& rURL ) override;
+ virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL createOutputStream( ) override;
+ virtual OUString SAL_CALL resolveOutputStream( const css::uno::Reference< css::io::XOutputStream >& rxBinaryStream ) override;
+};
+
+namespace svx {
+ SVXCORE_DLLPUBLIC void DropUnusedNamedItems(css::uno::Reference<css::uno::XInterface> const& xModel);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xmlsecctrl.hxx b/include/svx/xmlsecctrl.hxx
new file mode 100644
index 000000000..b9019cf25
--- /dev/null
+++ b/include/svx/xmlsecctrl.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+
+class SvxSizeItem;
+
+class SVX_DLLPUBLIC XmlSecStatusBarControl final : public SfxStatusBarControl
+{
+private:
+ struct XmlSecStatusBarControl_Impl;
+
+ std::unique_ptr<XmlSecStatusBarControl_Impl> mpImpl;
+
+public:
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ XmlSecStatusBarControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& _rStb );
+ virtual ~XmlSecStatusBarControl() override;
+
+ virtual void StateChangedAtStatusBarControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual void Paint( const UserDrawEvent& rEvt ) override;
+ virtual void Command( const CommandEvent& rCEvt ) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
new file mode 100644
index 000000000..0451fa479
--- /dev/null
+++ b/include/svx/xoutbmp.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XOUTBMP_HXX
+#define INCLUDED_SVX_XOUTBMP_HXX
+
+#include <vcl/graph.hxx>
+#include <vcl/errcode.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+#include <vcl/salctype.hxx>
+
+
+enum class XOutFlags {
+ NONE = 0x00000000,
+ MirrorHorz = 0x00000001,
+ MirrorVert = 0x00000010,
+ DontAddExtension = 0x00000008,
+ DontExpandFilename = 0x00010000,
+ UseGifIfPossible = 0x00020000,
+ UseGifIfSensible = 0x00040000,
+ UseNativeIfPossible = 0x00080000,
+};
+namespace o3tl {
+ template<> struct typed_flags<XOutFlags> : is_typed_flags<XOutFlags, 0x000f0019> {};
+}
+
+class GraphicFilter;
+class VirtualDevice;
+class INetURLObject;
+namespace tools {
+ class Polygon;
+}
+
+class SVXCORE_DLLPUBLIC XOutBitmap
+{
+public:
+
+ static Graphic MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags nMirrorFlags );
+ static Animation MirrorAnimation( const Animation& rAnimation, bool bHMirr, bool bVMirr );
+ static ErrCode WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
+ const OUString& rFilterName, const XOutFlags nFlags,
+ const Size* pMtfSize_100TH_MM = nullptr,
+ const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr);
+ static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString,
+ bool bAddPrefix = true,
+ ConvertDataFormat aTargetFormat = ConvertDataFormat::Unknown);
+
+ static ErrCode ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
+ GraphicFilter& rFilter, const sal_uInt16 nFormat,
+ const css::uno::Sequence< css::beans::PropertyValue >* pFilterData );
+};
+
+#endif // INCLUDED_SVX_XOUTBMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx
new file mode 100644
index 000000000..23a87341d
--- /dev/null
+++ b/include/svx/xpoly.hxx
@@ -0,0 +1,155 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_XPOLY_HXX
+#define INCLUDED_SVX_XPOLY_HXX
+
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <svx/svxdllapi.h>
+#include <o3tl/cow_wrapper.hxx>
+#include <tools/poly.hxx>
+#include <tools/degree.hxx>
+
+class Point;
+namespace tools { class Rectangle; }
+class SvStream;
+namespace tools {
+ class Polygon;
+ class PolyPolygon;
+}
+class OutputDevice;
+
+#define XPOLYPOLY_APPEND 0xFFFF
+#define XPOLY_APPEND 0xFFFF
+
+
+// Class XPolygon has a point-array and a flag-array, which contains information about a particular point
+
+class ImpXPolygon;
+
+class SVXCORE_DLLPUBLIC XPolygon final
+{
+ o3tl::cow_wrapper< ImpXPolygon > pImpXPolygon;
+
+ // auxiliary functions for Bezier conversion
+ void SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT);
+ void GenBezArc(const Point& rCenter, tools::Long nRx, tools::Long nRy,
+ tools::Long nXHdl, tools::Long nYHdl, Degree100 nStart, Degree100 nEnd,
+ sal_uInt16 nQuad, sal_uInt16 nFirst);
+ static bool CheckAngles(Degree100& nStart, Degree100 nEnd, Degree100& nA1, Degree100& nA2);
+
+public:
+ XPolygon( sal_uInt16 nSize=16 );
+ XPolygon( const XPolygon& );
+ XPolygon( XPolygon&& );
+ XPolygon( const tools::Polygon& rPoly );
+ XPolygon( const tools::Rectangle& rRect, tools::Long nRx = 0, tools::Long nRy = 0 );
+ XPolygon( const Point& rCenter, tools::Long nRx, tools::Long nRy,
+ Degree100 nStartAngle = 0_deg100, Degree100 nEndAngle = 36000_deg100,
+ bool bClose = true );
+
+ ~XPolygon();
+
+ sal_uInt16 GetSize() const;
+
+ void SetPointCount( sal_uInt16 nPoints );
+ sal_uInt16 GetPointCount() const;
+
+ void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags );
+ void Insert( sal_uInt16 nPos, const XPolygon& rXPoly );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
+ void Move( tools::Long nHorzMove, tools::Long nVertMove );
+ tools::Rectangle GetBoundRect() const;
+
+ const Point& operator[]( sal_uInt16 nPos ) const;
+ Point& operator[]( sal_uInt16 nPos );
+ XPolygon& operator=( const XPolygon& );
+ XPolygon& operator=( XPolygon&& );
+ bool operator==( const XPolygon& rXPoly ) const;
+
+ PolyFlags GetFlags( sal_uInt16 nPos ) const;
+ void SetFlags( sal_uInt16 nPos, PolyFlags eFlags );
+ bool IsControl(sal_uInt16 nPos) const;
+ bool IsSmooth(sal_uInt16 nPos) const;
+
+ // distance between two points
+ double CalcDistance(sal_uInt16 nP1, sal_uInt16 nP2);
+
+ // Bezier conversion
+ void CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 nPnt);
+ void CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNext);
+ void PointsToBezier(sal_uInt16 nFirst);
+
+ // transformations
+ void Scale(double fSx, double fSy);
+ void Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect);
+
+ // #116512# convert to basegfx::B2DPolygon and return
+ basegfx::B2DPolygon getB2DPolygon() const;
+
+ // #116512# constructor to convert from basegfx::B2DPolygon
+ // #i76339# made explicit
+ explicit XPolygon(const basegfx::B2DPolygon& rPolygon);
+};
+
+// Class XPolyPolygon; like PolyPolygon, composed of XPolygons instead of Polygons
+
+class ImpXPolyPolygon;
+
+class XPolyPolygon final
+{
+ o3tl::cow_wrapper< ImpXPolyPolygon > pImpXPolyPolygon;
+
+public:
+ XPolyPolygon();
+ XPolyPolygon( const XPolyPolygon& );
+ XPolyPolygon( XPolyPolygon&& );
+
+ ~XPolyPolygon();
+
+ void Insert( XPolygon&& rXPoly );
+ void Insert( const XPolyPolygon& rXPoly );
+ void Remove( sal_uInt16 nPos );
+ const XPolygon& GetObject( sal_uInt16 nPos ) const;
+
+ void Clear();
+ sal_uInt16 Count() const;
+
+ tools::Rectangle GetBoundRect() const;
+
+ const XPolygon& operator[]( sal_uInt16 nPos ) const
+ { return GetObject( nPos ); }
+ XPolygon& operator[]( sal_uInt16 nPos );
+
+ XPolyPolygon& operator=( const XPolyPolygon& );
+ XPolyPolygon& operator=( XPolyPolygon&& );
+
+ // transformations
+ void Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect);
+
+ // #116512# convert to basegfx::B2DPolyPolygon and return
+ basegfx::B2DPolyPolygon getB2DPolyPolygon() const;
+
+ // #116512# constructor to convert from basegfx::B2DPolyPolygon
+ // #i76339# made explicit
+ explicit XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon);
+};
+
+#endif // INCLUDED_SVX_XPOLY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xpool.hxx b/include/svx/xpool.hxx
new file mode 100644
index 000000000..e8fc6f5e7
--- /dev/null
+++ b/include/svx/xpool.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XPOOL_HXX
+#define INCLUDED_SVX_XPOOL_HXX
+
+#include <svl/itempool.hxx>
+#include <memory>
+
+/*************************************************************************
+|*
+|* Klassendeklaration
+|*
+\************************************************************************/
+
+class XOutdevItemPool : public SfxItemPool
+{
+protected:
+ std::vector<SfxPoolItem*>* mpLocalPoolDefaults;
+ std::unique_ptr<SfxItemInfo[]> mpLocalItemInfos;
+
+public:
+ XOutdevItemPool(SfxItemPool* pMaster);
+ XOutdevItemPool(const XOutdevItemPool& rPool);
+
+ virtual rtl::Reference<SfxItemPool> Clone() const override;
+
+protected:
+ virtual ~XOutdevItemPool() override;
+};
+
+#endif // INCLUDED_SVX_XPOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xsflclit.hxx b/include/svx/xsflclit.hxx
new file mode 100644
index 000000000..f82f88d38
--- /dev/null
+++ b/include/svx/xsflclit.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XSFLCLIT_HXX
+#define INCLUDED_SVX_XSFLCLIT_HXX
+
+#include <svx/xcolit.hxx>
+
+class SVXCORE_DLLPUBLIC XSecondaryFillColorItem final : public XColorItem
+{
+public:
+ XSecondaryFillColorItem(const OUString& rName, const Color& rTheColor);
+
+ SVX_DLLPRIVATE virtual XSecondaryFillColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
+
+ SVX_DLLPRIVATE virtual bool GetPresentation( SfxItemPresentation ePres,
+ MapUnit eCoreMetric,
+ MapUnit ePresMetric,
+ OUString &rText, const IntlWrapper& ) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
new file mode 100644
index 000000000..cb3a4cca4
--- /dev/null
+++ b/include/svx/xtable.hxx
@@ -0,0 +1,394 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_XTABLE_HXX
+#define INCLUDED_SVX_XTABLE_HXX
+
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <svx/xdash.hxx>
+#include <svx/xhatch.hxx>
+#include <svx/xgrad.hxx>
+
+#include <tools/color.hxx>
+
+#include <cppuhelper/weak.hxx>
+
+#include <svx/svxdllapi.h>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <vcl/GraphicObject.hxx>
+#include <svx/XPropertyEntry.hxx>
+
+#include <limits>
+#include <memory>
+
+class SVXCORE_DLLPUBLIC XColorEntry final : public XPropertyEntry
+{
+private:
+ Color aColor;
+
+public:
+ XColorEntry(const Color& rColor, const OUString& rName);
+
+ const Color& GetColor() const
+ {
+ return aColor;
+ }
+};
+
+class SVXCORE_DLLPUBLIC XLineEndEntry final : public XPropertyEntry
+{
+private:
+ basegfx::B2DPolyPolygon aB2DPolyPolygon;
+
+public:
+ XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const OUString& rName);
+ XLineEndEntry(const XLineEndEntry& rOther);
+
+ const basegfx::B2DPolyPolygon& GetLineEnd() const
+ {
+ return aB2DPolyPolygon;
+ }
+};
+
+class SVXCORE_DLLPUBLIC XDashEntry final : public XPropertyEntry
+{
+private:
+ XDash aDash;
+
+public:
+ XDashEntry(const XDash& rDash, const OUString& rName);
+ XDashEntry(const XDashEntry& rOther);
+
+ const XDash& GetDash() const
+ {
+ return aDash;
+ }
+};
+
+class SVXCORE_DLLPUBLIC XHatchEntry final : public XPropertyEntry
+{
+private:
+ XHatch aHatch;
+
+public:
+ XHatchEntry(const XHatch& rHatch, const OUString& rName);
+ XHatchEntry(const XHatchEntry& rOther);
+
+ const XHatch& GetHatch() const
+ {
+ return aHatch;
+ }
+};
+
+class SVXCORE_DLLPUBLIC XGradientEntry final : public XPropertyEntry
+{
+private:
+ XGradient aGradient;
+
+public:
+ XGradientEntry(const XGradient& rGradient, const OUString& rName);
+ XGradientEntry(const XGradientEntry& rOther);
+
+ const XGradient& GetGradient() const
+ {
+ return aGradient;
+ }
+};
+
+class SVXCORE_DLLPUBLIC XBitmapEntry final : public XPropertyEntry
+{
+private:
+ GraphicObject maGraphicObject;
+
+public:
+ XBitmapEntry(const GraphicObject& rGraphicObject, const OUString& rName);
+ XBitmapEntry(const XBitmapEntry& rOther);
+
+ const GraphicObject& GetGraphicObject() const
+ {
+ return maGraphicObject;
+ }
+};
+
+enum class XPropertyListType {
+ Unknown = -1,
+ Color,
+ LineEnd,
+ Dash,
+ Hatch,
+ Gradient,
+ Bitmap,
+ Pattern,
+ LAST = Pattern
+};
+
+typedef rtl::Reference< class XPropertyList > XPropertyListRef;
+
+class XDashList ; typedef rtl::Reference< class XDashList > XDashListRef;
+class XHatchList ; typedef rtl::Reference< class XHatchList > XHatchListRef;
+class XColorList ; typedef rtl::Reference< class XColorList > XColorListRef;
+class XBitmapList ; typedef rtl::Reference< class XBitmapList > XBitmapListRef;
+class XPatternList ; typedef rtl::Reference< class XPatternList > XPatternListRef;
+class XLineEndList ; typedef rtl::Reference< class XLineEndList > XLineEndListRef;
+class XGradientList ; typedef rtl::Reference< class XGradientList > XGradientListRef;
+
+class SVXCORE_DLLPUBLIC XPropertyList : public cppu::OWeakObject
+{
+protected:
+ XPropertyListType meType;
+ OUString maName; // not persistent
+ OUString maPath;
+ OUString maReferer;
+
+ std::vector< std::unique_ptr<XPropertyEntry> > maList;
+
+ bool mbListDirty;
+ bool mbEmbedInDocument;
+
+ XPropertyList(XPropertyListType t, const OUString& rPath, const OUString& rReferer);
+ bool isValidIdx(tools::Long nIndex) const;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) = 0;
+
+public:
+ XPropertyList(const XPropertyList&) = delete;
+ XPropertyList& operator=(const XPropertyList&) = delete;
+ virtual ~XPropertyList() override;
+
+ XPropertyListType Type() const { return meType; }
+ tools::Long Count() const;
+
+ void Insert(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex = std::numeric_limits<tools::Long>::max());
+ void Replace(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex);
+ void Remove(tools::Long nIndex);
+
+ XPropertyEntry* Get(tools::Long nIndex) const;
+ tools::Long GetIndex(std::u16string_view rName) const;
+ BitmapEx GetUiBitmap(tools::Long nIndex) const;
+
+ const OUString& GetName() const { return maName; }
+ void SetName(const OUString& rString);
+
+ const OUString& GetPath() const { return maPath; }
+ void SetPath(const OUString& rString) { maPath = rString; }
+
+ void SetDirty(bool bDirty) { mbListDirty = bDirty; }
+
+ bool IsEmbedInDocument() const { return mbEmbedInDocument; }
+
+ static OUString GetDefaultExt(XPropertyListType t);
+ OUString GetDefaultExt() const { return GetDefaultExt(meType); }
+
+ virtual css::uno::Reference< css::container::XNameContainer >
+ createInstance() = 0;
+ bool Load();
+ bool LoadFrom(const css::uno::Reference<
+ css::embed::XStorage > &xStorage,
+ const OUString &rURL, const OUString &rReferer);
+ bool Save();
+ bool SaveTo (const css::uno::Reference<
+ css::embed::XStorage > &xStorage,
+ const OUString &rURL,
+ OUString *pOptName);
+ virtual bool Create() = 0;
+
+ // Factory method for sub-classes
+ static XPropertyListRef CreatePropertyList(XPropertyListType t,
+ const OUString& rPath,
+ const OUString& rReferer);
+ // as above but initializes name as expected
+ static XPropertyListRef CreatePropertyListFromURL(XPropertyListType t,
+ std::u16string_view rUrl);
+
+ // helper accessors
+ static inline XDashListRef AsDashList(
+ rtl::Reference<XPropertyList> const & plist);
+ static inline XHatchListRef AsHatchList(
+ rtl::Reference<XPropertyList> const & plist);
+ static inline XColorListRef AsColorList(
+ rtl::Reference<XPropertyList> const & plist);
+ static inline XBitmapListRef AsBitmapList(
+ rtl::Reference<XPropertyList> const & plist);
+ static inline XPatternListRef AsPatternList(
+ rtl::Reference<XPropertyList> const & plist);
+ static inline XLineEndListRef AsLineEndList(
+ rtl::Reference<XPropertyList> const & plist);
+ static inline XGradientListRef AsGradientList(
+ rtl::Reference<XPropertyList> const & plist);
+};
+
+class SVXCORE_DLLPUBLIC XColorList final : public XPropertyList
+{
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+
+public:
+ XColorList(const OUString& rPath, const OUString& rReferer)
+ : XPropertyList(XPropertyListType::Color, rPath, rReferer) {}
+
+ void Replace(tools::Long nIndex, std::unique_ptr<XColorEntry> pEntry);
+ XColorEntry* GetColor(tools::Long nIndex) const;
+ tools::Long GetIndexOfColor( const Color& rColor) const;
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+
+ static XColorListRef CreateStdColorList();
+ static XColorListRef GetStdColorList(); // returns a singleton
+};
+
+class SVXCORE_DLLPUBLIC XLineEndList final : public XPropertyList
+{
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+
+public:
+ XLineEndList(const OUString& rPath, const OUString& rReferer);
+ virtual ~XLineEndList() override;
+
+ XLineEndEntry* GetLineEnd(tools::Long nIndex) const;
+
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+};
+
+class SVXCORE_DLLPUBLIC XDashList final : public XPropertyList
+{
+private:
+ BitmapEx maBitmapSolidLine;
+ OUString maStringSolidLine;
+ OUString maStringNoLine;
+
+ static BitmapEx ImpCreateBitmapForXDash(const XDash* pDash);
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+
+public:
+ XDashList(const OUString& rPath, const OUString& rReferer);
+ virtual ~XDashList() override;
+
+ void Replace(std::unique_ptr<XDashEntry> pEntry, tools::Long nIndex);
+ XDashEntry* GetDash(tools::Long nIndex) const;
+
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+
+ // Special call to get a bitmap for the solid line representation. It
+ // creates a bitmap fitting in size and style to the ones you get by
+ // using GetUiBitmap for existing entries.
+ BitmapEx const & GetBitmapForUISolidLine() const;
+
+ // Special calls to get the translated strings for the UI entry for no
+ // line style (XLINE_NONE) and solid line style (XLINE_SOLID) for dialogs
+ OUString const & GetStringForUiSolidLine() const;
+ OUString const & GetStringForUiNoLine() const;
+};
+
+class SVXCORE_DLLPUBLIC XHatchList final : public XPropertyList
+{
+private:
+ BitmapEx CreateBitmap(tools::Long nIndex, const Size& rSize) const;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+public:
+ XHatchList(const OUString& rPath, const OUString& rReferer);
+ virtual ~XHatchList() override;
+
+ void Replace(std::unique_ptr<XHatchEntry> pEntry, tools::Long nIndex);
+ XHatchEntry* GetHatch(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
+
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+};
+
+class SVXCORE_DLLPUBLIC XGradientList final : public XPropertyList
+{
+private:
+ BitmapEx CreateBitmap(tools::Long nIndex, const Size& rSize) const;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+
+public:
+ XGradientList(const OUString& rPath, const OUString& rReferer);
+ virtual ~XGradientList() override;
+
+ void Replace(std::unique_ptr<XGradientEntry> pEntry, tools::Long nIndex);
+ XGradientEntry* GetGradient(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
+
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+};
+
+class SVXCORE_DLLPUBLIC XBitmapList final : public XPropertyList
+{
+private:
+ BitmapEx CreateBitmap( tools::Long nIndex, const Size& rSize ) const;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+
+public:
+ XBitmapList(const OUString& rPath, const OUString& rReferer)
+ : XPropertyList(XPropertyListType::Bitmap, rPath, rReferer) {}
+
+ XBitmapEntry* GetBitmap(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
+
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+};
+
+class SVXCORE_DLLPUBLIC XPatternList final : public XPropertyList
+{
+private:
+ BitmapEx CreateBitmap( tools::Long nIndex, const Size& rSize ) const;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
+
+public:
+ XPatternList(const OUString& rPath, const OUString& rReferer)
+ : XPropertyList(XPropertyListType::Pattern, rPath, rReferer) {}
+
+ XBitmapEntry* GetBitmap(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
+
+ virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
+ virtual bool Create() override;
+};
+
+// FIXME: could add type checking too ...
+inline XDashListRef XPropertyList::AsDashList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XDashListRef( static_cast<XDashList *> (plist.get()) ); }
+inline XHatchListRef XPropertyList::AsHatchList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XHatchListRef( static_cast<XHatchList *> (plist.get()) ); }
+inline XColorListRef XPropertyList::AsColorList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XColorListRef( static_cast<XColorList *> (plist.get()) ); }
+inline XBitmapListRef XPropertyList::AsBitmapList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XBitmapListRef( static_cast<XBitmapList *> (plist.get()) ); }
+inline XPatternListRef XPropertyList::AsPatternList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XPatternListRef( static_cast<XPatternList *> (plist.get()) ); }
+inline XLineEndListRef XPropertyList::AsLineEndList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XLineEndListRef( static_cast<XLineEndList *> (plist.get()) ); }
+inline XGradientListRef XPropertyList::AsGradientList(
+ rtl::Reference<XPropertyList> const & plist)
+{ return XGradientListRef( static_cast<XGradientList *> (plist.get()) ); }
+
+#endif // INCLUDED_SVX_XTABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/xtextit0.hxx b/include/svx/xtextit0.hxx
new file mode 100644
index 000000000..8d6db594d
--- /dev/null
+++ b/include/svx/xtextit0.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_XTEXTIT0_HXX
+#define INCLUDED_SVX_XTEXTIT0_HXX
+
+#include <svx/xenum.hxx>
+#include <svl/eitem.hxx>
+#include <svx/svxdllapi.h>
+
+/*************************************************************************
+|*
+|* FormText-StyleItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextStyleItem final : public SfxEnumItem<XFormTextStyle>
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFormTextStyleItem(XFormTextStyle = XFormTextStyle::NONE);
+ virtual XFormTextStyleItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ virtual sal_uInt16 GetValueCount() const override;
+ // #FontWork#
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+/*************************************************************************
+|*
+|* FormText-HideFormItem
+|*
+\************************************************************************/
+
+class SVXCORE_DLLPUBLIC XFormTextHideFormItem final : public SfxBoolItem
+{
+public:
+ static SfxPoolItem* CreateDefault();
+ XFormTextHideFormItem(bool bHide = false);
+ virtual XFormTextHideFormItem* Clone(SfxItemPool* pPool = nullptr) const override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/zoom_def.hxx b/include/svx/zoom_def.hxx
new file mode 100644
index 000000000..1a98d929d
--- /dev/null
+++ b/include/svx/zoom_def.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+enum class ZoomButtonId
+{
+ NONE = 0x0000,
+ OPTIMAL = 0x0001,
+ PAGEWIDTH = 0x0002,
+ WHOLEPAGE = 0x0004,
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/zoomctrl.hxx b/include/svx/zoomctrl.hxx
new file mode 100644
index 000000000..0c64db1e5
--- /dev/null
+++ b/include/svx/zoomctrl.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_ZOOMCTRL_HXX
+#define INCLUDED_SVX_ZOOMCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+#include <sfx2/zoomitem.hxx>
+#include <vcl/image.hxx>
+
+class SVX_DLLPUBLIC SvxZoomStatusBarControl : public SfxStatusBarControl
+{
+private:
+ sal_uInt16 nZoom;
+ SvxZoomEnableFlags nValueSet;
+
+public:
+ virtual void StateChangedAtStatusBarControl(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual void Paint(const UserDrawEvent& rEvt) override;
+ virtual void Command(const CommandEvent& rCEvt) override;
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxZoomStatusBarControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+
+private:
+ void ImplUpdateItemText();
+};
+
+class SVX_DLLPUBLIC SvxZoomPageStatusBarControl final : public SfxStatusBarControl
+{
+private:
+ Image maImage;
+
+public:
+ virtual void Paint(const UserDrawEvent& rEvt) override;
+ virtual bool MouseButtonDown(const MouseEvent& rEvt) override;
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxZoomPageStatusBarControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/zoomsliderctrl.hxx b/include/svx/zoomsliderctrl.hxx
new file mode 100644
index 000000000..ba300e261
--- /dev/null
+++ b/include/svx/zoomsliderctrl.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_ZOOMSLIDERCTRL_HXX
+#define INCLUDED_SVX_ZOOMSLIDERCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+#include <svx/svxdllapi.h>
+#include <memory>
+
+class SVX_DLLPUBLIC SvxZoomSliderControl final : public SfxStatusBarControl
+{
+private:
+
+ struct SvxZoomSliderControl_Impl;
+ std::unique_ptr<SvxZoomSliderControl_Impl> mxImpl;
+
+ sal_uInt16 Offset2Zoom( tools::Long nOffset ) const;
+ tools::Long Zoom2Offset( sal_uInt16 nZoom ) const;
+
+ void repaintAndExecute();
+ void forceRepaint() const;
+
+public:
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& _rStb );
+ virtual ~SvxZoomSliderControl() override;
+
+ virtual void StateChangedAtStatusBarControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override;
+ virtual void Paint( const UserDrawEvent& rEvt ) override;
+ virtual bool MouseButtonDown( const MouseEvent & ) override;
+ virtual bool MouseButtonUp( const MouseEvent & ) override;
+ virtual bool MouseMove( const MouseEvent & rEvt ) override;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/zoomslideritem.hxx b/include/svx/zoomslideritem.hxx
new file mode 100644
index 000000000..919d7c026
--- /dev/null
+++ b/include/svx/zoomslideritem.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_ZOOMSLIDERITEM_HXX
+#define INCLUDED_SVX_ZOOMSLIDERITEM_HXX
+
+#include <svl/intitem.hxx>
+#include <svx/svxids.hrc>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <svx/svxdllapi.h>
+
+
+class SVX_DLLPUBLIC SvxZoomSliderItem final : public SfxUInt16Item
+{
+ css::uno::Sequence < sal_Int32 > maValues;
+ sal_uInt16 mnMinZoom;
+ sal_uInt16 mnMaxZoom;
+
+public:
+ static SfxPoolItem* CreateDefault();
+
+ SvxZoomSliderItem( sal_uInt16 nCurrentZoom = 100, sal_uInt16 nMinZoom = 20, sal_uInt16 nMaxZoom = 600, TypedWhichId<SvxZoomSliderItem> nWhich = SID_ATTR_ZOOMSLIDER );
+
+ void AddSnappingPoint( sal_Int32 nNew );
+ const css::uno::Sequence < sal_Int32 >& GetSnappingPoints() const { return maValues;}
+ sal_uInt16 GetMinZoom() const {return mnMinZoom;}
+ sal_uInt16 GetMaxZoom() const {return mnMaxZoom;}
+
+ // "purely virtual methods" from the SfxPoolItem
+ virtual bool operator==( const SfxPoolItem& ) const override;
+ virtual SvxZoomSliderItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+ virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */