summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/AccessibleStaticTextBase.hxx283
-rwxr-xr-xsvx/inc/EnhancedCustomShapeFunctionParser.hxx8
-rw-r--r--svx/inc/accessibility.hrc2
-rw-r--r--svx/inc/acorrcfg.hxx1
-rw-r--r--svx/inc/anchorid.hxx1
-rw-r--r--svx/inc/asiancfg.hxx1
-rw-r--r--svx/inc/bolnitem.hxx1
-rw-r--r--svx/inc/bulitem.hxx1
-rw-r--r--svx/inc/charhiddenitem.hxx2
-rw-r--r--svx/inc/edtspell.hxx3
-rw-r--r--svx/inc/fmhelp.hrc115
-rw-r--r--svx/inc/fontitem.hxx2
-rw-r--r--svx/inc/gallery1.hxx4
-rw-r--r--svx/inc/galobj.hxx2
-rw-r--r--svx/inc/galtheme.hxx20
-rw-r--r--svx/inc/mscodec.hxx51
-rw-r--r--svx/inc/optgenrl.hrc3
-rw-r--r--svx/inc/pch/precompiled_svx.hxx2
-rw-r--r--svx/inc/svdglob.hxx6
-rw-r--r--svx/inc/svdstr.hrc8
-rw-r--r--svx/inc/svx/AccessibleContextBase.hxx33
-rw-r--r--svx/inc/svx/AccessibleControlShape.hxx4
-rwxr-xr-xsvx/inc/svx/AccessibleShape.hxx33
-rw-r--r--svx/inc/svx/SmartTagMgr.hxx4
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/dbcharsethelper.hxx (renamed from svx/source/inc/dbcharsethelper.hxx)6
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/dbtoolsclient.hxx (renamed from svx/source/inc/dbtoolsclient.hxx)7
-rw-r--r--svx/inc/svx/dialogs.hrc70
-rw-r--r--svx/inc/svx/editeng.hxx2
-rw-r--r--svx/inc/svx/editobj.hxx3
-rw-r--r--svx/inc/svx/editview.hxx4
-rw-r--r--svx/inc/svx/emphitem.hxx2
-rw-r--r--svx/inc/svx/escherex.hxx81
-rw-r--r--svx/inc/svx/fmpage.hxx9
-rw-r--r--svx/inc/svx/fntctrl.hxx1
-rw-r--r--svx/inc/svx/framelink.hxx10
-rw-r--r--svx/inc/svx/langbox.hxx2
-rw-r--r--svx/inc/svx/msdffdef.hxx8
-rw-r--r--svx/inc/svx/msdffimp.hxx28
-rw-r--r--svx/inc/svx/msocximex.hxx6
-rw-r--r--svx/inc/svx/numfmtsh.hxx4
-rw-r--r--svx/inc/svx/obj3d.hxx7
-rw-r--r--svx/inc/svx/outliner.hxx14
-rw-r--r--svx/inc/svx/outlobj.hxx3
-rw-r--r--svx/inc/svx/paperinf.hxx116
-rw-r--r--svx/inc/svx/sdasaitm.hxx8
-rw-r--r--svx/inc/svx/sdgcpitm.hxx2
-rw-r--r--svx/inc/svx/sdr/animation/objectanimator.hxx2
-rw-r--r--svx/inc/svx/sdr/animation/scheduler.hxx9
-rw-r--r--svx/inc/svx/sdr/attribute/sdrallattribute.hxx27
-rw-r--r--svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx108
-rw-r--r--svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx74
-rw-r--r--svx/inc/svx/sdr/attribute/sdrtextattribute.hxx53
-rw-r--r--svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx19
-rw-r--r--svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx3
-rw-r--r--svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx12
-rw-r--r--svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx60
-rw-r--r--svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx14
-rw-r--r--svx/inc/svx/sdr/overlay/overlaybitmap.hxx94
-rw-r--r--svx/inc/svx/sdr/overlay/overlaybitmapex.hxx11
-rw-r--r--svx/inc/svx/sdr/overlay/overlaycrosshair.hxx32
-rw-r--r--svx/inc/svx/sdr/overlay/overlayhatchrect.hxx24
-rw-r--r--svx/inc/svx/sdr/overlay/overlayhelpline.hxx34
-rw-r--r--svx/inc/svx/sdr/overlay/overlayline.hxx36
-rw-r--r--svx/inc/svx/sdr/overlay/overlaymanager.hxx37
-rw-r--r--svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx14
-rw-r--r--svx/inc/svx/sdr/overlay/overlayobject.hxx100
-rw-r--r--svx/inc/svx/sdr/overlay/overlayobjectcell.hxx8
-rw-r--r--svx/inc/svx/sdr/overlay/overlayobjectlist.hxx7
-rw-r--r--svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx36
-rw-r--r--svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx12
-rw-r--r--svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx50
-rw-r--r--svx/inc/svx/sdr/overlay/overlayselection.hxx98
-rw-r--r--svx/inc/svx/sdr/overlay/overlaytools.hxx281
-rw-r--r--svx/inc/svx/sdr/overlay/overlaytriangle.hxx46
-rw-r--r--svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx8
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx21
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx2
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx6
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx7
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx17
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx89
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx12
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx19
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx115
-rw-r--r--svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx7
-rw-r--r--svx/inc/svx/sdr/properties/properties.hxx5
-rw-r--r--svx/inc/svx/sdr/properties/textproperties.hxx7
-rw-r--r--svx/inc/svx/sdrhittesthelper.hxx81
-rw-r--r--svx/inc/svx/sdtfchim.hxx20
-rwxr-xr-xsvx/inc/svx/shapeproperty.hxx58
-rw-r--r--svx/inc/svx/shapepropertynotifier.hxx147
-rw-r--r--svx/inc/svx/svdedtv.hxx1
-rw-r--r--svx/inc/svx/svdedxv.hxx3
-rw-r--r--svx/inc/svx/svdetc.hxx22
-rw-r--r--svx/inc/svx/svdfppt.hxx14
-rw-r--r--svx/inc/svx/svdhdl.hxx10
-rw-r--r--svx/inc/svx/svdmodel.hxx14
-rw-r--r--svx/inc/svx/svdmrkv.hxx11
-rw-r--r--svx/inc/svx/svdoashp.hxx8
-rw-r--r--svx/inc/svx/svdoattr.hxx3
-rw-r--r--svx/inc/svx/svdobj.hxx68
-rw-r--r--svx/inc/svx/svdocapt.hxx1
-rw-r--r--svx/inc/svx/svdocirc.hxx1
-rw-r--r--svx/inc/svx/svdoedge.hxx3
-rw-r--r--svx/inc/svx/svdograf.hxx4
-rw-r--r--svx/inc/svx/svdogrp.hxx1
-rw-r--r--svx/inc/svx/svdomeas.hxx2
-rw-r--r--svx/inc/svx/svdoole2.hxx11
-rw-r--r--svx/inc/svx/svdopath.hxx1
-rw-r--r--svx/inc/svx/svdorect.hxx2
-rw-r--r--svx/inc/svx/svdotable.hxx1
-rw-r--r--svx/inc/svx/svdotext.hxx17
-rw-r--r--svx/inc/svx/svdouno.hxx3
-rw-r--r--svx/inc/svx/svdovirt.hxx1
-rw-r--r--svx/inc/svx/svdpage.hxx31
-rw-r--r--svx/inc/svx/svdpntv.hxx35
-rw-r--r--svx/inc/svx/svdtext.hxx3
-rw-r--r--svx/inc/svx/svdundo.hxx38
-rw-r--r--svx/inc/svx/svx3ditems.hxx88
-rw-r--r--svx/inc/svx/svxdlg.hxx9
-rw-r--r--svx/inc/svx/svxenum.hxx43
-rw-r--r--svx/inc/svx/svxfont.hxx3
-rw-r--r--svx/inc/svx/svxids.hrc20
-rw-r--r--svx/inc/svx/sxfiitm.hxx2
-rw-r--r--svx/inc/svx/tstpitem.hxx12
-rw-r--r--svx/inc/svx/unoedsrc.hxx32
-rw-r--r--svx/inc/svx/unofield.hxx4
-rw-r--r--svx/inc/svx/unofored.hxx2
-rw-r--r--svx/inc/svx/unoforou.hxx2
-rw-r--r--svx/inc/svx/unoipset.hxx30
-rw-r--r--svx/inc/svx/unopage.hxx2
-rw-r--r--svx/inc/svx/unoprov.hxx15
-rw-r--r--svx/inc/svx/unoshape.hxx121
-rw-r--r--svx/inc/svx/unoshtxt.hxx13
-rw-r--r--svx/inc/svx/unotext.hxx43
-rw-r--r--svx/inc/svx/xcolit.hxx2
-rw-r--r--svx/inc/svx/xflbckit.hxx8
-rw-r--r--svx/inc/svx/xflbmpit.hxx12
-rw-r--r--svx/inc/svx/xflbmsli.hxx8
-rw-r--r--svx/inc/svx/xflbmsxy.hxx20
-rw-r--r--svx/inc/svx/xflboxy.hxx16
-rw-r--r--svx/inc/svx/xflbtoxy.hxx16
-rw-r--r--svx/inc/svx/xflclit.hxx2
-rw-r--r--svx/inc/svx/xflftrit.hxx2
-rw-r--r--svx/inc/svx/xflgrit.hxx2
-rw-r--r--svx/inc/svx/xflhtit.hxx2
-rw-r--r--svx/inc/svx/xftshcit.hxx2
-rw-r--r--svx/inc/svx/xit.hxx8
-rw-r--r--svx/inc/svx/xlnclit.hxx2
-rw-r--r--svx/inc/svx/xlndsit.hxx2
-rw-r--r--svx/inc/svx/xlnedit.hxx2
-rw-r--r--svx/inc/svx/xlnstit.hxx2
-rw-r--r--svx/inc/svx/xsflclit.hxx16
-rw-r--r--svx/inc/unoapi.hxx11
-rw-r--r--svx/inc/unoedhlp.hxx2
-rw-r--r--svx/inc/unolingu.hxx2
-rw-r--r--svx/inc/xexch.hxx2
-rw-r--r--svx/inc/xmlgrhlp.hxx14
-rw-r--r--svx/inc/xoutbmp.hxx2
-rw-r--r--svx/prj/build.lst2
-rw-r--r--svx/prj/d.lst14
-rw-r--r--svx/sdi/makefile.mk4
-rw-r--r--svx/sdi/svx.sdi274
-rw-r--r--svx/sdi/svxitems.sdi2
-rw-r--r--svx/source/accessibility/AccessibleEditableTextPara.cxx166
-rw-r--r--svx/source/accessibility/AccessibleEditableTextPara.hxx19
-rw-r--r--svx/source/accessibility/AccessibleEmptyEditSource.cxx9
-rw-r--r--svx/source/accessibility/AccessibleImageBullet.cxx20
-rw-r--r--svx/source/accessibility/AccessibleStaticTextBase.cxx47
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx11
-rw-r--r--svx/source/accessibility/accessibility.src12
-rwxr-xr-xsvx/source/accessibility/makefile.mk11
-rw-r--r--svx/source/cui/autocdlg.cxx8
-rw-r--r--svx/source/cui/autocdlg.hrc2
-rw-r--r--svx/source/cui/autocdlg.hxx2
-rw-r--r--svx/source/cui/autocdlg.src4
-rw-r--r--svx/source/cui/backgrnd.cxx2
-rw-r--r--svx/source/cui/commonlingui.src20
-rw-r--r--svx/source/cui/cuicharmap.cxx8
-rw-r--r--svx/source/cui/cuioptgenrl.hxx1
-rw-r--r--svx/source/cui/dlgfact.cxx6
-rw-r--r--svx/source/cui/dlgfact.hxx2
-rw-r--r--svx/source/cui/hangulhanjadlg.src38
-rw-r--r--svx/source/cui/insrc.cxx88
-rw-r--r--svx/source/cui/insrc.hrc (renamed from svx/source/sdr/overlay/overlaylinestriped.cxx)28
-rw-r--r--svx/source/cui/insrc.hxx (renamed from svx/inc/svdtouch.hxx)53
-rw-r--r--svx/source/cui/insrc.src118
-rw-r--r--svx/source/cui/macropg.cxx35
-rw-r--r--svx/source/cui/macropg.src101
-rwxr-xr-xsvx/source/cui/makefile.mk6
-rw-r--r--svx/source/cui/numfmt.cxx19
-rw-r--r--svx/source/cui/numfmt.hrc7
-rw-r--r--svx/source/cui/numfmt.hxx1
-rw-r--r--svx/source/cui/numfmt.src4
-rw-r--r--svx/source/cui/optaccessibility.cxx4
-rw-r--r--svx/source/cui/optgdlg.cxx191
-rw-r--r--svx/source/cui/optgdlg.hrc9
-rw-r--r--svx/source/cui/optgdlg.hxx8
-rw-r--r--svx/source/cui/optgdlg.src78
-rw-r--r--svx/source/cui/optgenrl.cxx18
-rw-r--r--svx/source/cui/optpath.cxx24
-rw-r--r--svx/source/cui/optsave.cxx87
-rw-r--r--svx/source/cui/page.cxx75
-rw-r--r--svx/source/cui/page.h42
-rw-r--r--svx/source/cui/page.hxx9
-rw-r--r--svx/source/cui/page.src138
-rw-r--r--svx/source/cui/paragrph.cxx2
-rw-r--r--svx/source/cui/selector.cxx9
-rw-r--r--svx/source/cui/selector.hxx1
-rw-r--r--svx/source/cui/showcols.cxx8
-rw-r--r--svx/source/cui/svuidlg.src24
-rw-r--r--svx/source/cui/treeopt.cxx15
-rw-r--r--svx/source/cui/webconninfo.cxx106
-rw-r--r--svx/source/cui/webconninfo.hxx1
-rw-r--r--svx/source/cui/zoom.src44
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx305
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.hxx39
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.hxx7
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx32
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeGeometry.cxx478
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeGeometry.hxx8
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx10
-rw-r--r--svx/source/customshapes/makefile.mk14
-rw-r--r--svx/source/dialog/dlgctrl.cxx38
-rw-r--r--svx/source/dialog/fntctrl.cxx29
-rw-r--r--svx/source/dialog/imapdlg.cxx5
-rw-r--r--svx/source/dialog/imapwnd.cxx5
-rw-r--r--svx/source/dialog/langbox.cxx28
-rw-r--r--svx/source/dialog/makefile.mk45
-rw-r--r--svx/source/dialog/srchdlg.cxx2
-rw-r--r--svx/source/dialog/txencbox.cxx2
-rw-r--r--svx/source/editeng/editdoc.cxx2
-rw-r--r--svx/source/editeng/editdoc.hxx13
-rw-r--r--svx/source/editeng/editdoc2.cxx50
-rw-r--r--svx/source/editeng/editeng.cxx31
-rw-r--r--svx/source/editeng/editobj.cxx76
-rw-r--r--svx/source/editeng/editobj2.hxx13
-rw-r--r--svx/source/editeng/editview.cxx51
-rw-r--r--svx/source/editeng/edtspell.cxx30
-rw-r--r--svx/source/editeng/eertfpar.cxx13
-rw-r--r--svx/source/editeng/impedit.cxx2
-rw-r--r--svx/source/editeng/impedit.hxx2
-rw-r--r--svx/source/editeng/impedit2.cxx97
-rw-r--r--svx/source/engine3d/dragmt3d.cxx16
-rw-r--r--svx/source/engine3d/helperhittest3d.cxx32
-rw-r--r--svx/source/engine3d/makefile.mk15
-rw-r--r--svx/source/engine3d/obj3d.cxx16
-rw-r--r--svx/source/engine3d/scene3d.cxx13
-rw-r--r--svx/source/engine3d/view3d.cxx8
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx1
-rw-r--r--svx/source/fmcomp/dbaobjectex.cxx1
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx23
-rw-r--r--svx/source/fmcomp/fmgridif.cxx46
-rw-r--r--svx/source/fmcomp/gridcell.cxx909
-rw-r--r--svx/source/fmcomp/gridcols.cxx19
-rw-r--r--svx/source/fmcomp/gridctrl.cxx36
-rw-r--r--svx/source/fmcomp/makefile.mk20
-rw-r--r--svx/source/form/datanavi.cxx28
-rw-r--r--svx/source/form/datanavi.src5
-rw-r--r--svx/source/form/dbcharsethelper.cxx2
-rw-r--r--svx/source/form/dbtoolsclient.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx89
-rw-r--r--svx/source/form/fmctrler.cxx8
-rw-r--r--svx/source/form/fmdocumentclassification.cxx2
-rw-r--r--svx/source/form/fmobj.cxx22
-rw-r--r--svx/source/form/fmpage.cxx4
-rw-r--r--svx/source/form/fmpgeimp.cxx279
-rw-r--r--svx/source/form/fmprop.cxx194
-rw-r--r--svx/source/form/fmservs.cxx69
-rw-r--r--svx/source/form/fmshimp.cxx33
-rw-r--r--svx/source/form/fmstring.src103
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx5
-rw-r--r--svx/source/form/fmtools.cxx11
-rw-r--r--svx/source/form/fmundo.cxx38
-rw-r--r--svx/source/form/fmurl.cxx74
-rw-r--r--svx/source/form/fmview.cxx4
-rw-r--r--svx/source/form/fmvwimp.cxx24
-rw-r--r--svx/source/form/formcontrolfactory.cxx73
-rw-r--r--svx/source/form/formcontrolling.cxx1215
-rw-r--r--svx/source/form/makefile.mk31
-rw-r--r--svx/source/form/navigatortree.cxx28
-rw-r--r--svx/source/form/navigatortreemodel.cxx42
-rw-r--r--svx/source/form/tabwin.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx3
-rw-r--r--svx/source/gengal/makefile.mk2
-rw-r--r--svx/source/inc/AccessibleStringWrap.hxx8
-rw-r--r--svx/source/inc/GraphCtlAccessibleContext.hxx2
-rw-r--r--svx/source/inc/datanavi.hxx4
-rw-r--r--svx/source/inc/filtnav.hxx5
-rw-r--r--svx/source/inc/fmPropBrw.hxx1
-rw-r--r--svx/source/inc/fmctrler.hxx4
-rw-r--r--svx/source/inc/fmexch.hxx12
-rw-r--r--svx/source/inc/fmexpl.hxx4
-rw-r--r--svx/source/inc/fmobj.hxx6
-rw-r--r--svx/source/inc/fmpgeimp.hxx42
-rw-r--r--svx/source/inc/fmprop.hrc288
-rw-r--r--svx/source/inc/fmresids.hrc46
-rw-r--r--svx/source/inc/fmservs.hxx122
-rw-r--r--svx/source/inc/fmshimp.hxx13
-rw-r--r--svx/source/inc/fmstatic.hxx81
-rw-r--r--svx/source/inc/fmtools.hxx20
-rw-r--r--svx/source/inc/fmundo.hxx4
-rw-r--r--svx/source/inc/fmurl.hxx69
-rw-r--r--svx/source/inc/formcontrolfactory.hxx17
-rw-r--r--svx/source/inc/formcontrolling.hxx622
-rw-r--r--svx/source/inc/formtoolbars.hxx13
-rw-r--r--svx/source/inc/gridcell.hxx199
-rw-r--r--svx/source/inc/gridcols.hxx29
-rw-r--r--svx/source/inc/sqlparserclient.hxx4
-rw-r--r--svx/source/inc/stringlistresource.hxx9
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx2
-rw-r--r--svx/source/inc/tabwin.hxx2
-rw-r--r--svx/source/inc/typeconversionclient.hxx2
-rw-r--r--svx/source/inc/unoedprx.hxx6
-rw-r--r--svx/source/inc/unogalthemeprovider.hxx6
-rw-r--r--svx/source/inc/unopolyhelper.hxx4
-rw-r--r--svx/source/inc/unopracc.hxx2
-rw-r--r--svx/source/intro/intro_tmpl.hrc2
-rw-r--r--svx/source/items/algitem.cxx100
-rw-r--r--svx/source/items/makefile.mk37
-rw-r--r--svx/source/items/numfmtsh.cxx61
-rw-r--r--svx/source/items/numitem.cxx20
-rw-r--r--svx/source/items/paperinf.cxx298
-rw-r--r--svx/source/items/paraitem.cxx14
-rw-r--r--svx/source/items/textitem.cxx7
-rw-r--r--svx/source/mnuctrls/clipboardctl.cxx10
-rw-r--r--svx/source/msfilter/escherex.cxx213
-rw-r--r--svx/source/msfilter/eschesdo.cxx21
-rw-r--r--svx/source/msfilter/makefile.mk13
-rw-r--r--svx/source/msfilter/msashape.cxx6536
-rw-r--r--svx/source/msfilter/msashape.hxx116
-rw-r--r--svx/source/msfilter/msashape3d.cxx564
-rw-r--r--svx/source/msfilter/msashape3d.hxx83
-rw-r--r--svx/source/msfilter/mscodec.cxx170
-rw-r--r--svx/source/msfilter/msdffimp.cxx1220
-rw-r--r--svx/source/msfilter/msocximex.cxx14
-rw-r--r--svx/source/msfilter/svxmsbas.cxx49
-rw-r--r--svx/source/msfilter/svxmsbas2.cxx88
-rw-r--r--svx/source/options/makefile.mk35
-rw-r--r--svx/source/options/optgenrl.src8
-rw-r--r--svx/source/options/optimprove.src2
-rw-r--r--svx/source/options/optlingu.cxx43
-rw-r--r--svx/source/options/optsave.src8
-rw-r--r--svx/source/outliner/outliner.cxx39
-rw-r--r--svx/source/outliner/outlobj.cxx19
-rw-r--r--svx/source/outliner/outlvw.cxx20
-rw-r--r--svx/source/sdr/attribute/makefile.mk5
-rw-r--r--svx/source/sdr/attribute/sdrallattribute.cxx126
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx304
-rw-r--r--svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx (renamed from svx/inc/svx/sdr/overlay/overlaysdrobject.hxx)58
-rw-r--r--svx/source/sdr/attribute/sdrtextattribute.cxx130
-rw-r--r--svx/source/sdr/contact/viewcontactofe3dpolygon.cxx17
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx339
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx115
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx97
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpathobj.cxx119
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx10
-rw-r--r--svx/source/sdr/contact/viewcontactofunocontrol.cxx38
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgraphic.cxx46
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofpageobj.cxx3
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx240
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx770
-rw-r--r--svx/source/sdr/overlay/makefile.mk17
-rw-r--r--svx/source/sdr/overlay/overlayanimatedbitmapex.cxx76
-rw-r--r--svx/source/sdr/overlay/overlaybitmap.cxx162
-rw-r--r--svx/source/sdr/overlay/overlaybitmapex.cxx50
-rw-r--r--svx/source/sdr/overlay/overlaycrosshair.cxx100
-rw-r--r--svx/source/sdr/overlay/overlayhatchrect.cxx88
-rw-r--r--svx/source/sdr/overlay/overlayhelpline.cxx189
-rw-r--r--svx/source/sdr/overlay/overlayline.cxx94
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx300
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx112
-rw-r--r--svx/source/sdr/overlay/overlayobject.cxx221
-rw-r--r--svx/source/sdr/overlay/overlayobjectcell.cxx98
-rw-r--r--svx/source/sdr/overlay/overlayobjectlist.cxx95
-rw-r--r--svx/source/sdr/overlay/overlaypolypolygon.cxx93
-rw-r--r--svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx50
-rw-r--r--svx/source/sdr/overlay/overlayrollingrectangle.cxx229
-rw-r--r--svx/source/sdr/overlay/overlaysdrobject.cxx87
-rw-r--r--svx/source/sdr/overlay/overlayselection.cxx233
-rw-r--r--svx/source/sdr/overlay/overlaytools.cxx498
-rw-r--r--svx/source/sdr/overlay/overlaytriangle.cxx122
-rw-r--r--svx/source/sdr/primitive2d/makefile.mk1
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx58
-rw-r--r--svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx84
-rw-r--r--svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx12
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx30
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx345
-rw-r--r--svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx26
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx13
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx144
-rw-r--r--svx/source/sdr/primitive2d/sdrole2primitive2d.cxx13
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx200
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx47
-rw-r--r--svx/source/sdr/primitive2d/sdrprimitivetools.cxx25
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx74
-rw-r--r--svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx282
-rw-r--r--svx/source/sdr/properties/properties.cxx5
-rw-r--r--svx/source/sdr/properties/textproperties.cxx25
-rw-r--r--svx/source/smarttags/SmartTagMgr.cxx18
-rw-r--r--svx/source/stbctrls/stbctrls.src7
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx6
-rw-r--r--svx/source/svdraw/ActionDescriptionProvider.cxx2
-rw-r--r--svx/source/svdraw/makefile.mk27
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx176
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx44
-rw-r--r--svx/source/svdraw/svdcrtv.cxx59
-rw-r--r--svx/source/svdraw/svddrgmt.cxx127
-rw-r--r--svx/source/svdraw/svddrgv.cxx38
-rw-r--r--svx/source/svdraw/svdedtv.cxx144
-rw-r--r--svx/source/svdraw/svdedtv1.cxx490
-rw-r--r--svx/source/svdraw/svdedtv2.cxx519
-rw-r--r--svx/source/svdraw/svdedxv.cxx150
-rw-r--r--svx/source/svdraw/svdetc.cxx307
-rw-r--r--svx/source/svdraw/svdfmtf.cxx12
-rw-r--r--svx/source/svdraw/svdfppt.cxx691
-rw-r--r--svx/source/svdraw/svdglev.cxx79
-rw-r--r--svx/source/svdraw/svdhdl.cxx218
-rw-r--r--svx/source/svdraw/svdmodel.cxx156
-rw-r--r--svx/source/svdraw/svdmrkv.cxx65
-rw-r--r--svx/source/svdraw/svdoashp.cxx198
-rw-r--r--svx/source/svdraw/svdoattr.cxx21
-rw-r--r--svx/source/svdraw/svdobj.cxx308
-rw-r--r--svx/source/svdraw/svdocapt.cxx58
-rw-r--r--svx/source/svdraw/svdocirc.cxx179
-rw-r--r--svx/source/svdraw/svdoedge.cxx51
-rw-r--r--svx/source/svdraw/svdograf.cxx32
-rw-r--r--svx/source/svdraw/svdogrp.cxx26
-rw-r--r--svx/source/svdraw/svdomeas.cxx38
-rw-r--r--svx/source/svdraw/svdoole2.cxx234
-rw-r--r--svx/source/svdraw/svdopath.cxx189
-rw-r--r--svx/source/svdraw/svdorect.cxx123
-rw-r--r--svx/source/svdraw/svdotext.cxx96
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx197
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx305
-rw-r--r--svx/source/svdraw/svdotxed.cxx5
-rw-r--r--svx/source/svdraw/svdotxtr.cxx213
-rw-r--r--svx/source/svdraw/svdouno.cxx7
-rw-r--r--svx/source/svdraw/svdovirt.cxx7
-rw-r--r--svx/source/svdraw/svdpage.cxx113
-rw-r--r--svx/source/svdraw/svdpntv.cxx126
-rw-r--r--svx/source/svdraw/svdpoev.cxx103
-rw-r--r--svx/source/svdraw/svdsnpv.cxx31
-rw-r--r--svx/source/svdraw/svdstr.src14
-rw-r--r--svx/source/svdraw/svdtext.cxx12
-rw-r--r--svx/source/svdraw/svdtouch.cxx299
-rw-r--r--svx/source/svdraw/svdtxhdl.cxx400
-rw-r--r--svx/source/svdraw/svdtxhdl.hxx73
-rw-r--r--svx/source/svdraw/svdundo.cxx118
-rw-r--r--svx/source/svdraw/svdview.cxx13
-rw-r--r--svx/source/svdraw/svdxcgv.cxx77
-rw-r--r--svx/source/svrtf/makefile.mk11
-rw-r--r--svx/source/svrtf/rtfgrf.cxx13
-rw-r--r--svx/source/svrtf/rtfitem.cxx12
-rw-r--r--svx/source/svxlink/fileobj.cxx31
-rw-r--r--svx/source/table/accessiblecell.cxx11
-rw-r--r--svx/source/table/accessiblecell.hxx1
-rw-r--r--svx/source/table/accessibletableshape.cxx11
-rw-r--r--svx/source/table/cell.cxx147
-rw-r--r--svx/source/table/cell.hxx187
-rw-r--r--svx/source/table/cellcursor.cxx86
-rw-r--r--svx/source/table/cellcursor.hxx2
-rw-r--r--svx/source/table/celleditsource.hxx2
-rw-r--r--svx/source/table/makefile.mk17
-rw-r--r--svx/source/table/svdotable.cxx19
-rw-r--r--svx/source/table/tablecolumn.cxx12
-rw-r--r--svx/source/table/tablecontroller.cxx157
-rw-r--r--svx/source/table/tablecontroller.hxx113
-rw-r--r--svx/source/table/tablehandles.cxx281
-rw-r--r--svx/source/table/tablehandles.hxx5
-rw-r--r--svx/source/table/tablelayouter.cxx177
-rw-r--r--svx/source/table/tablelayouter.hxx1
-rw-r--r--svx/source/table/tablemodel.cxx164
-rw-r--r--svx/source/table/tablemodel.hxx3
-rw-r--r--svx/source/table/tablerow.cxx15
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx39
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx56
-rw-r--r--svx/source/tbxctrls/makefile.mk17
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx12
-rw-r--r--svx/source/toolbars/extrusionbar.cxx15
-rw-r--r--svx/source/toolbars/fontworkbar.cxx27
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hrc2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src1
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_direction_ids.hrc (renamed from svx/inc/svx/sdr/overlay/overlaylinestriped.hxx)26
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc5
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hrc2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src3
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx39
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.hxx6
-rw-r--r--svx/source/unodraw/gluepts.cxx92
-rw-r--r--svx/source/unodraw/makefile.mk22
-rw-r--r--svx/source/unodraw/shapeimpl.hxx20
-rw-r--r--svx/source/unodraw/shapepropertynotifier.cxx206
-rw-r--r--svx/source/unodraw/tableshape.cxx18
-rw-r--r--svx/source/unodraw/unoipset.cxx266
-rw-r--r--svx/source/unodraw/unomod.cxx14
-rw-r--r--svx/source/unodraw/unonrule.cxx2
-rw-r--r--svx/source/unodraw/unopage.cxx6
-rw-r--r--svx/source/unodraw/unoprov.cxx147
-rw-r--r--svx/source/unodraw/unoshap2.cxx55
-rw-r--r--svx/source/unodraw/unoshap3.cxx96
-rw-r--r--svx/source/unodraw/unoshap4.cxx70
-rw-r--r--svx/source/unodraw/unoshape.cxx453
-rw-r--r--svx/source/unodraw/unoshtxt.cxx14
-rw-r--r--svx/source/unoedit/makefile.mk17
-rw-r--r--svx/source/unoedit/unoedprx.cxx10
-rw-r--r--svx/source/unoedit/unofield.cxx76
-rw-r--r--svx/source/unoedit/unofored.cxx11
-rw-r--r--svx/source/unoedit/unoforou.cxx12
-rw-r--r--svx/source/unoedit/unopracc.cxx4
-rw-r--r--svx/source/unoedit/unotext.cxx206
-rw-r--r--svx/source/unoedit/unoviwou.cxx1
-rwxr-xr-xsvx/source/unogallery/makefile.mk6
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx4
-rw-r--r--svx/source/xml/xmleohlp.cxx28
-rw-r--r--svx/source/xml/xmlgrhlp.cxx99
-rw-r--r--svx/source/xml/xmltxtexp.cxx11
-rw-r--r--svx/source/xml/xmltxtimp.cxx5
-rw-r--r--svx/source/xml/xmlxtimp.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx50
-rw-r--r--svx/util/hidother.src116
-rw-r--r--svx/util/makefile.mk172
-rw-r--r--svx/util/makefile.pmk8
525 files changed, 18932 insertions, 21118 deletions
diff --git a/svx/inc/AccessibleStaticTextBase.hxx b/svx/inc/AccessibleStaticTextBase.hxx
index 2398a03992b4..60a31117185f 100644
--- a/svx/inc/AccessibleStaticTextBase.hxx
+++ b/svx/inc/AccessibleStaticTextBase.hxx
@@ -44,6 +44,289 @@
class SvxEditSource;
+class SvxEditViewForwarder;
+
+namespace accessibility
+{
+
+ class AccessibleStaticTextBase_Impl;
+
+ typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessibleText,
+ ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE;
+
+ /** Helper class for objects containing EditEngine/Outliner text
+
+ This class implements the XAccessibleText interface for static
+ text, somewhat similar to the children of the
+ AccessibleTextHelper class. Currently, there are no children,
+ i.e. the whole text is presented in one big chunk. This might
+ change in the future, if a need for image bullets should
+ arise. These, by convention, would be represented as children
+ of the text.
+
+ 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.
+
+ As this class is intended for static (i.e. non-changing) text
+ only, no event broadcasting is necessary. You must handle
+ visibility by yourself, the bounding boxes returned by
+ getCharacterBounds() are relative to your accessibility
+ object.
+
+ @attention All public non-UNO methods (those are the uppercase
+ ones) 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 as a base for objects containing static
+ edit engine text. To avoid overwriting every interface method
+ to intercept derived object defunc state, just set NULL as the
+ edit source. Every interface method will then properly throw
+ an exception.
+ */
+ class SVX_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE
+ {
+
+ public:
+ /** 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 AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource );
+ virtual ~AccessibleStaticTextBase();
+
+ private:
+
+ // declared, but not defined
+ SVX_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& );
+ // declared, but not defined
+ SVX_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& );
+
+ public:
+ /** Query the current edit source
+
+ @attention This method returns by reference, so you are
+ responsible for serialization (typically, you aquired the
+ solar mutex when calling this method). Thus, the method
+ should only be called from the main office thread.
+
+ */
+ virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the current edit source
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ The EditSource set here is required to broadcast out the
+ following hints: EDITSOURCE_HINT_PARASMOVED,
+ EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
+ TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
+ TEXT_HINT_TEXTHEIGHTCHANGED,
+ TEXT_HINT_VIEWSCROLLED. 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 SFX_HINT_DYING hint.
+
+ 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::auto_ptr<SvxEditSource>(NULL)) in
+ your dispose() method.
+
+ @param pEditSource
+ The new edit source to set. Object ownership is transferred
+ from the caller to the callee.
+ */
+ virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the event source
+
+ @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.
+ */
+ virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface );
+
+ /** Get the event source
+
+ @return the interface that is set as the source for
+ accessibility events sent by this object.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const;
+
+ /** Set offset of EditEngine from parent
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ If the origin of the underlying EditEngine does
+ not correspond to the upper left corner of the object
+ using this class, you have to specify the offset.
+
+ @param rPoint
+ The offset in screen coordinates (i.e. pixel)
+ */
+ virtual void SetOffset( const Point& rPoint );
+
+ /** Query offset of EditEngine from parent
+
+ @return the offset in screen coordinates (i.e. pixel)
+ */
+ virtual Point GetOffset() const;
+
+ /** Update the visible children
+
+ As this class currently does not represent any content
+ using children, this does nothing at the moment.
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ This method reevaluates the visibility of all
+ childrens. Call this method if your visibility state has
+ changed somehow, e.g. if the visible area has changed and
+ the AccessibleStaticTextHelper isn't notified
+ internally. Normally, there should not be a need to call
+ this method.
+ */
+ virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** 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).
+ */
+ virtual void Dispose();
+
+ // XAccessibleText interface implementation
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleTextAttributes
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ Rectangle GetParagraphBoundingBox() const;
+ sal_Int32 GetParagraphCount() const;
+ sal_Int32 GetParagraphIndex() const;
+ sal_Int32 GetLineCount( sal_Int32 nParagraph ) const;
+
+ private:
+
+ /// @dyn
+ const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
+
+ };
+
+} // end of namespace accessibility
+
+#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleStaticTextBase.hxx,v $
+ * $Revision: 1.14 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+#define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+
+#include <memory>
+#include <tools/gen.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+#include "svx/svxdllapi.h"
+
+
+class SvxEditSource;
namespace accessibility
{
diff --git a/svx/inc/EnhancedCustomShapeFunctionParser.hxx b/svx/inc/EnhancedCustomShapeFunctionParser.hxx
index 9c9a8574aa8f..411a16d60e31 100755
--- a/svx/inc/EnhancedCustomShapeFunctionParser.hxx
+++ b/svx/inc/EnhancedCustomShapeFunctionParser.hxx
@@ -32,14 +32,14 @@
#define _ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX
#include <sal/config.h>
-#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <boost/shared_ptr.hpp>
-#endif
#include "EnhancedCustomShapeFunctionParser.hxx"
#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
#include <vector>
+#include <svx/svxdllapi.h>
+
struct EnhancedCustomShapeEquation
{
sal_Int32 nOperation;
@@ -97,7 +97,7 @@ enum ExpressionFunct
#define EXPRESSION_FLAG_SUMANGLE_MODE 1
-void FillEquationParameter( const com::sun::star::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& );
+SVX_DLLPUBLIC void FillEquationParameter( const com::sun::star::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& );
class ExpressionNode
{
@@ -200,7 +200,7 @@ public:
@return the generated function object.
*/
- static ExpressionNodeSharedPtr parseFunction( const ::rtl::OUString& rFunction, const EnhancedCustomShape2d& rCustoShape );
+ SVX_DLLPUBLIC static ExpressionNodeSharedPtr parseFunction( const ::rtl::OUString& rFunction, const EnhancedCustomShape2d& rCustoShape );
private:
// disabled constructor/destructor, since this is
diff --git a/svx/inc/accessibility.hrc b/svx/inc/accessibility.hrc
index c202c4611ffe..5688f7a8033e 100644
--- a/svx/inc/accessibility.hrc
+++ b/svx/inc/accessibility.hrc
@@ -80,8 +80,6 @@
// text paragraphs and bullets
#define RID_SVXSTR_A11Y_TEXTHELPER_START (RID_SVXSTR_ACCESSIBILITY_START + 70)
-#define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 0)
-#define RID_SVXSTR_A11Y_PARAGRAPH_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 1)
#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 2)
#define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 3)
diff --git a/svx/inc/acorrcfg.hxx b/svx/inc/acorrcfg.hxx
index ae8d3d1832be..046cf1a6198a 100644
--- a/svx/inc/acorrcfg.hxx
+++ b/svx/inc/acorrcfg.hxx
@@ -134,4 +134,3 @@ public:
#endif
-
diff --git a/svx/inc/anchorid.hxx b/svx/inc/anchorid.hxx
index e1baec8e604f..db897fb3e11e 100644
--- a/svx/inc/anchorid.hxx
+++ b/svx/inc/anchorid.hxx
@@ -43,4 +43,3 @@ enum SvxAnchorIds
#endif
-
diff --git a/svx/inc/asiancfg.hxx b/svx/inc/asiancfg.hxx
index 2246d2313985..303da7e76630 100644
--- a/svx/inc/asiancfg.hxx
+++ b/svx/inc/asiancfg.hxx
@@ -70,4 +70,3 @@ public:
};
#endif
-
diff --git a/svx/inc/bolnitem.hxx b/svx/inc/bolnitem.hxx
index f2b2a24c61e7..bfb55d676866 100644
--- a/svx/inc/bolnitem.hxx
+++ b/svx/inc/bolnitem.hxx
@@ -84,4 +84,3 @@ private:
#endif
-
diff --git a/svx/inc/bulitem.hxx b/svx/inc/bulitem.hxx
index a633da2752a8..b0adc0d4dd9f 100644
--- a/svx/inc/bulitem.hxx
+++ b/svx/inc/bulitem.hxx
@@ -161,4 +161,3 @@ public:
#endif
-
diff --git a/svx/inc/charhiddenitem.hxx b/svx/inc/charhiddenitem.hxx
index d3431c952ba3..ea36786a503b 100644
--- a/svx/inc/charhiddenitem.hxx
+++ b/svx/inc/charhiddenitem.hxx
@@ -62,5 +62,3 @@ public:
};
#endif
-
-
diff --git a/svx/inc/edtspell.hxx b/svx/inc/edtspell.hxx
index f3d55ee87841..15e180342d85 100644
--- a/svx/inc/edtspell.hxx
+++ b/svx/inc/edtspell.hxx
@@ -133,6 +133,9 @@ public:
void MarkWrongsInvalid();
WrongList* Clone() const;
+
+ // #i102062#
+ bool operator==(const WrongList& rCompare) const;
};
inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos )
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
index daf2ff4c1812..c7f172cbe5db 100644
--- a/svx/inc/fmhelp.hrc
+++ b/svx/inc/fmhelp.hrc
@@ -43,121 +43,6 @@
#define HID_DLG_DBINFO (HID_FORMS_START + 0)
#define HID_DLG_DBMSG (HID_FORMS_START + 1)
-#define HID_PROP_GROUPBOX (HID_FORMS_START + 2)
-#define HID_PROP_CONTROLSOURCE (HID_FORMS_START + 3)
-#define HID_PROP_NAME (HID_FORMS_START + 4)
-#define HID_PROP_TABINDEX (HID_FORMS_START + 5)
-#define HID_PROP_MASTERFIELDS (HID_FORMS_START + 6)
-#define HID_PROP_SLAVEFIELDS (HID_FORMS_START + 7)
-#define HID_PROP_DATASOURCE (HID_FORMS_START + 8)
-#define HID_PROP_CURSORSOURCE (HID_FORMS_START + 9)
-#define HID_PROP_CURSORSOURCETYPE (HID_FORMS_START + 10)
-#define HID_PROP_CURSORTYPE (HID_FORMS_START + 11)
-#define HID_PROP_READONLY (HID_FORMS_START + 12)
-#define HID_PROP_DATAENTRY (HID_FORMS_START + 13)
-#define HID_PROP_NAVIGATION (HID_FORMS_START + 14)
-#define HID_PROP_CYCLE (HID_FORMS_START + 15)
-#define HID_PROP_ALLOW_ADDITIONS (HID_FORMS_START + 16)
-#define HID_PROP_ALLOW_EDITS (HID_FORMS_START + 17)
-#define HID_PROP_ALLOW_DELETIONS (HID_FORMS_START + 18)
-#define HID_PROP_DIRTY (HID_FORMS_START + 19)
-#define HID_PROP_OLDVALUE (HID_FORMS_START + 20)
-#define HID_PROP_VALUE (HID_FORMS_START + 21)
-#define HID_PROP_LOCKED (HID_FORMS_START + 22)
-#define HID_PROP_FORMATKEY (HID_FORMS_START + 23)
-#define HID_PROP_REQUIRED (HID_FORMS_START + 24)
-#define HID_PROP_SCALE (HID_FORMS_START + 25)
-#define HID_PROP_SIZE (HID_FORMS_START + 26)
-#define HID_PROP_UNIQUE (HID_FORMS_START + 27)
-#define HID_PROP_CLASSID (HID_FORMS_START + 28)
-#define HID_PROP_LEFT (HID_FORMS_START + 29)
-#define HID_PROP_RIGHT (HID_FORMS_START + 30)
-#define HID_PROP_HEIGHT (HID_FORMS_START + 31)
-#define HID_PROP_WIDTH (HID_FORMS_START + 32)
-#define HID_PROP_BOUNDCOLUMN (HID_FORMS_START + 33)
-#define HID_PROP_LISTSOURCETYPE (HID_FORMS_START + 34)
-#define HID_PROP_LISTSOURCE (HID_FORMS_START + 35)
-#define HID_PROP_LISTINDEX (HID_FORMS_START + 36)
-#define HID_PROP_TEXT (HID_FORMS_START + 37)
-#define HID_PROP_LABEL (HID_FORMS_START + 38)
-#define HID_PROP_STRINGITEMLIST (HID_FORMS_START + 39)
-#define HID_PROP_SEARCHING (HID_FORMS_START + 40)
-#define HID_PROP_FONT (HID_FORMS_START + 41)
-#define HID_PROP_ROWHEIGHT (HID_FORMS_START + 42)
-#define HID_PROP_BACKGROUNDCOLOR (HID_FORMS_START + 43)
-#define HID_PROP_FILLCOLOR (HID_FORMS_START + 44)
-#define HID_PROP_TEXTCOLOR (HID_FORMS_START + 45)
-#define HID_PROP_LINECOLOR (HID_FORMS_START + 46)
-#define HID_PROP_BORDER (HID_FORMS_START + 47)
-#define HID_PROP_ALIGN (HID_FORMS_START + 48)
-#define HID_PROP_DROPDOWN (HID_FORMS_START + 49)
-#define HID_PROP_MULTILINE (HID_FORMS_START + 50)
-#define HID_PROP_HSCROLL (HID_FORMS_START + 51)
-#define HID_PROP_VSCROLL (HID_FORMS_START + 52)
-#define HID_PROP_TABSTOP (HID_FORMS_START + 53)
-#define HID_PROP_REFVALUE (HID_FORMS_START + 54)
-#define HID_PROP_BUTTONTYPE (HID_FORMS_START + 55)
-#define HID_PROP_SUBMIT_ACTION (HID_FORMS_START + 56)
-#define HID_PROP_SUBMIT_METHOD (HID_FORMS_START + 57)
-#define HID_PROP_SUBMIT_ENCODING (HID_FORMS_START + 58)
-#define HID_PROP_DEFAULTVALUE (HID_FORMS_START + 59)
-#define HID_PROP_SUBMIT_TARGET (HID_FORMS_START + 60)
-#define HID_PROP_DEFAULT_CHECKED (HID_FORMS_START + 61)
-#define HID_PROP_IMAGE_URL (HID_FORMS_START + 62)
-#define HID_PROP_DEFAULT_SELECT_SEQ (HID_FORMS_START + 63)
-#define HID_PROP_MULTISELECTION (HID_FORMS_START + 64)
-
-#define HID_PROP_DATE (HID_FORMS_START + 65)
-#define HID_PROP_DATEMIN (HID_FORMS_START + 66)
-#define HID_PROP_DATEMAX (HID_FORMS_START + 67)
-#define HID_PROP_DATEFORMAT (HID_FORMS_START + 68)
-#define HID_PROP_TIME (HID_FORMS_START + 69)
-#define HID_PROP_TIMEMIN (HID_FORMS_START + 70)
-#define HID_PROP_TIMEMAX (HID_FORMS_START + 71)
-#define HID_PROP_TIMEFORMAT (HID_FORMS_START + 72)
-#define HID_PROP_VALUEMIN (HID_FORMS_START + 73)
-#define HID_PROP_VALUEMAX (HID_FORMS_START + 74)
-#define HID_PROP_VALUESTEP (HID_FORMS_START + 75)
-#define HID_PROP_CURRENCYSYMBOL (HID_FORMS_START + 76)
-#define HID_PROP_EDITMASK (HID_FORMS_START + 77)
-#define HID_PROP_LITERALMASK (HID_FORMS_START + 78)
-#define HID_PROP_ENABLED (HID_FORMS_START + 79)
-#define HID_PROP_AUTOCOMPLETE (HID_FORMS_START + 80)
-#define HID_PROP_LINECOUNT (HID_FORMS_START + 81)
-#define HID_PROP_MAXTEXTLEN (HID_FORMS_START + 82)
-#define HID_PROP_SPIN (HID_FORMS_START + 83)
-#define HID_PROP_STRICTFORMAT (HID_FORMS_START + 84)
-#define HID_PROP_SHOWTHOUSANDSEP (HID_FORMS_START + 85)
- // FREE
-#define HID_PROP_PRINTABLE (HID_FORMS_START + 87)
-#define HID_PROP_TARGET_URL (HID_FORMS_START + 88)
-#define HID_PROP_TARGET_FRAME (HID_FORMS_START + 89)
-#define HID_PROP_TAG (HID_FORMS_START + 90)
-#define HID_PROP_ECHO_CHAR (HID_FORMS_START + 91)
-#define HID_PROP_EMPTY_IS_NULL (HID_FORMS_START + 92)
-#define HID_PROP_DECIMAL_ACCURACY (HID_FORMS_START + 93)
- // FREE
-#define HID_PROP_DEFAULT_BUTTON (HID_FORMS_START + 95)
-#define HID_PROP_HIDDEN_VALUE (HID_FORMS_START + 96)
-#define HID_PROP_TRISTATE (HID_FORMS_START + 97)
-#define HID_PROP_NAVIGATIONBAR (HID_FORMS_START + 98)
-#define HID_PROP_FILTER_CRITERIA (HID_FORMS_START + 99)
-#define HID_PROP_SORT_CRITERIA (HID_FORMS_START + 100)
-#define HID_PROP_DEFAULT_LONG_VALUE (HID_FORMS_START + 101)
-#define HID_PROP_DEFAULT_TIME (HID_FORMS_START + 102)
-#define HID_PROP_DEFAULT_DATE (HID_FORMS_START + 103)
-#define HID_PROP_HELPTEXT (HID_FORMS_START + 104)
-#define HID_PROP_HELPURL (HID_FORMS_START + 105)
-#define HID_PROP_RECORDMARKER (HID_FORMS_START + 106)
-#define HID_PROP_FILTERPROPOSAL (HID_FORMS_START + 107)
-#define HID_PROP_EFFECTIVEMIN (HID_FORMS_START + 108)
-#define HID_PROP_EFFECTIVEMAX (HID_FORMS_START + 109)
-#define HID_PROP_EFFECTIVEDEFAULT (HID_FORMS_START + 110)
-#define HID_PROP_CONTROLLABEL (HID_FORMS_START + 111)
-#define HID_PROP_CURRSYM_POSITION (HID_FORMS_START + 112)
-#define HID_PROP_ESCAPE_PROCESSING (HID_FORMS_START + 113)
-#define HID_PROP_IMAGE_ALIGN (HID_FORMS_START + 114)
-
#define HID_FM_OTHER_START (HID_FORMS_START + 300)
#define HID_FORM_NAVIGATOR (HID_FM_OTHER_START + 0)
#define HID_FORM_NAVIGATOR_WIN (HID_FM_OTHER_START + 1)
diff --git a/svx/inc/fontitem.hxx b/svx/inc/fontitem.hxx
index 8f092b4640f2..da0ee972954b 100644
--- a/svx/inc/fontitem.hxx
+++ b/svx/inc/fontitem.hxx
@@ -111,7 +111,7 @@ public:
return *this;
}
- static void EnableStoreUnicodeNames( BOOL bEnable ) { bEnableStoreUnicodeNames = bEnable; }
+ static void EnableStoreUnicodeNames( BOOL bEnable );
};
diff --git a/svx/inc/gallery1.hxx b/svx/inc/gallery1.hxx
index f38bf0dda5d9..e3665a47c707 100644
--- a/svx/inc/gallery1.hxx
+++ b/svx/inc/gallery1.hxx
@@ -144,7 +144,7 @@ private:
void ImplLoadImports();
void ImplWriteImportList();
- GalleryThemeEntry* ImplGetThemeEntry( const String& rThemeName );
+ SVX_DLLPUBLIC GalleryThemeEntry* ImplGetThemeEntry( const String& rThemeName );
GalleryThemeEntry* ImplGetThemeEntry( ULONG nThemeId );
GalleryImportThemeEntry* ImplGetImportThemeEntry( const String& rImportName );
@@ -168,7 +168,7 @@ public:
SVX_DLLPUBLIC BOOL CreateTheme( const String& rThemeName, UINT32 nNumFrom = 0 );
BOOL CreateImportTheme( const INetURLObject& rURL, const String& rFileName );
BOOL RenameTheme( const String& rOldName, const String& rNewName );
- BOOL RemoveTheme( const String& rThemeName );
+ SVX_DLLPUBLIC BOOL RemoveTheme( const String& rThemeName );
SVX_DLLPUBLIC GalleryTheme* AcquireTheme( const String& rThemeName, SfxListener& rListener );
SVX_DLLPUBLIC void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener );
diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx
index fd1988383d8e..a33a1b5cbd81 100644
--- a/svx/inc/galobj.hxx
+++ b/svx/inc/galobj.hxx
@@ -85,7 +85,7 @@ enum GalSoundType
// - SgaObject -
// -------------
-class SgaObject
+class SVX_DLLPUBLIC SgaObject
{
friend class GalleryTheme;
diff --git a/svx/inc/galtheme.hxx b/svx/inc/galtheme.hxx
index 459ef98b9a84..15a1c6fbb1e2 100644
--- a/svx/inc/galtheme.hxx
+++ b/svx/inc/galtheme.hxx
@@ -107,12 +107,12 @@ private:
BOOL bAbortActualize;
void ImplCreateSvDrawStorage();
- SgaObject* ImplReadSgaObject( GalleryObject* pEntry );
+ SVX_DLLPUBLIC SgaObject* ImplReadSgaObject( GalleryObject* pEntry );
BOOL ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, GalleryObject* pExistentEntry );
void ImplRead();
void ImplWrite();
const GalleryObject* ImplGetGalleryObject( ULONG nPos ) const { return aObjectList.GetObject( nPos ); }
- const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL );
+ SVX_DLLPUBLIC const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL );
ULONG ImplGetGalleryObjectPos( const GalleryObject* pObj ) const { return aObjectList.GetPos( pObj ); }
INetURLObject ImplGetURL( const GalleryObject* pObject ) const;
INetURLObject ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFormat = CVT_UNKNOWN );
@@ -129,11 +129,11 @@ public:
ULONG GetObjectCount() const { return aObjectList.Count(); }
- SgaObject* AcquireObject( ULONG nPos );
- void ReleaseObject( SgaObject* pObj );
+ SVX_DLLPUBLIC SgaObject* AcquireObject( ULONG nPos );
+ SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj );
- BOOL InsertObject( const SgaObject& rObj, ULONG nPos = LIST_APPEND );
- BOOL RemoveObject( ULONG nPos );
+ SVX_DLLPUBLIC BOOL InsertObject( const SgaObject& rObj, ULONG nPos = LIST_APPEND );
+ SVX_DLLPUBLIC BOOL RemoveObject( ULONG nPos );
BOOL ChangeObjectPos( ULONG nOldPos, ULONG nNewPos );
const String& GetName() const { return IsImported() ? aImportName : pThm->GetThemeName(); }
@@ -194,11 +194,11 @@ public:
BOOL GetThumb( ULONG nPos, Bitmap& rBmp, BOOL bProgress = FALSE );
- BOOL GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress = FALSE );
- BOOL InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC BOOL GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress = FALSE );
+ SVX_DLLPUBLIC BOOL InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos = LIST_APPEND );
- BOOL GetModel( ULONG nPos, SdrModel& rModel, BOOL bProgress = FALSE );
- BOOL InsertModel( const FmFormModel& rModel, ULONG nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC BOOL GetModel( ULONG nPos, SdrModel& rModel, BOOL bProgress = FALSE );
+ SVX_DLLPUBLIC BOOL InsertModel( const FmFormModel& rModel, ULONG nInsertPos = LIST_APPEND );
BOOL GetModelStream( ULONG nPos, SotStorageStreamRef& rModelStreamRef, BOOL bProgress = FALSE );
BOOL InsertModelStream( const SotStorageStreamRef& rModelStream, ULONG nInsertPos = LIST_APPEND );
diff --git a/svx/inc/mscodec.hxx b/svx/inc/mscodec.hxx
index 1b72976cbf01..4ee508d661dd 100644
--- a/svx/inc/mscodec.hxx
+++ b/svx/inc/mscodec.hxx
@@ -235,6 +235,36 @@ public:
*/
bool InitCipher( sal_uInt32 nCounter );
+ /** Creates an MD5 digest of salt digest. */
+ bool CreateSaltDigest(
+ const sal_uInt8 nSaltData[16], sal_uInt8 nSaltDigest[16] );
+
+ /** Encodes a block of memory.
+
+ @see rtl_cipher_encode()
+
+ @precond
+ The codec must be initialized with InitKey() before this function
+ can be used. The destination buffer must be able to take all
+ unencoded data from the source buffer (usually this means it must be
+ as long as or longer than the source buffer).
+
+ @param pData
+ Unencrypted source data block.
+ @param nDatLen
+ Size of the passed source data block.
+ @param pBuffer
+ Destination buffer for the encrypted data.
+ @param nBufLen
+ Size of the destination buffer.
+
+ @return
+ true = Encoding was successful (no error occured).
+ */
+ bool Encode(
+ const void* pData, sal_Size nDatLen,
+ sal_uInt8* pBuffer, sal_Size nBufLen );
+
/** Decodes a block of memory.
@see rtl_cipher_decode()
@@ -275,6 +305,27 @@ public:
*/
bool Skip( sal_Size nDatLen );
+ /** Gets salt data and salt digest.
+
+ @precond
+ The codec must be initialized with InitKey() before this function
+ can be used.
+
+ @param pSalt
+ Salt, a random number.
+ @param pSaltData
+ Salt data block generated from the salt.
+ @param pSaltDigest
+ Salt digest generated from the salt.
+ */
+ void GetEncryptKey (
+ const sal_uInt8 pSalt[16],
+ sal_uInt8 pSaltData[16],
+ sal_uInt8 pSaltDigest[16]);
+
+private:
+ void GetDigestFromSalt( const sal_uInt8 pSaltData[16], sal_uInt8 pDigest[16] );
+
private:
SVX_DLLPRIVATE MSCodec_Std97( const MSCodec_Std97& );
SVX_DLLPRIVATE MSCodec_Std97& operator=( const MSCodec_Std97& );
diff --git a/svx/inc/optgenrl.hrc b/svx/inc/optgenrl.hrc
index 1972689529fc..4c519d5ebb70 100644
--- a/svx/inc/optgenrl.hrc
+++ b/svx/inc/optgenrl.hrc
@@ -63,6 +63,7 @@
#define ED_EMAIL 38
#define GB_ADDRESS 39
#define CB_USEDATA 40
+#define FT_NAME_EASTERN 41
#define STR_US_STATE 10
#define STR_QUERY_REG 11
@@ -74,7 +75,7 @@
#define LINEH 12
#define FLINEH 8
#define LEFT 12
-#define MID 96
+#define MID 100
#define RIGHT 248
#define TOP 10
#define LINE(y) (14+y*15)
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 283bb9b2d6fd..8e9bc4d17930 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -909,7 +909,7 @@
#include "unotools/configvaluecontainer.hxx"
#include "unotools/localfilehelper.hxx"
#include "unotools/processfactory.hxx"
-#include "unotools/servicehelper.hxx"
+#include "comphelper/servicehelper.hxx"
#include "unotools/streamwrap.hxx"
#include "unotools/textsearch.hxx"
#include "unotools/transliterationwrapper.hxx"
diff --git a/svx/inc/svdglob.hxx b/svx/inc/svdglob.hxx
index c4856be30083..4526579d0658 100644
--- a/svx/inc/svdglob.hxx
+++ b/svx/inc/svdglob.hxx
@@ -33,11 +33,11 @@
#include <tools/contnr.hxx>
-#ifndef _RESID_HXX //autogen
#include <tools/resid.hxx>
-#endif
#include <tools/string.hxx>
+#include <svx/svxdllapi.h>
+
//************************************************************
// Vorausdeklarationen
//************************************************************
@@ -64,7 +64,7 @@ public:
// IDs von SDR_StringCacheBegin (256) bis
// SDR_StringCacheEnd (weiss ich grad' nicht).
// Hierzu siehe auch SvdStr.Hrc
-String ImpGetResStr(sal_uInt16 nResID);
+SVX_DLLPUBLIC String ImpGetResStr(sal_uInt16 nResID);
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc
index cb1b85079f37..280a9dba6122 100644
--- a/svx/inc/svdstr.hrc
+++ b/svx/inc/svdstr.hrc
@@ -324,7 +324,13 @@
#define STR_UndoNewLayer (STR_UndoBegin +13)
#define STR_UndoDelLayer (STR_UndoBegin +14)
#define STR_UndoMovLayer (STR_UndoBegin +15)
-#define STR_UndoEnd (STR_UndoMovLayer)
+
+// --> OD 2009-07-09 #i73249#
+#define STR_UndoObjName (STR_UndoBegin +16)
+#define STR_UndoObjTitle (STR_UndoBegin +17)
+#define STR_UndoObjDescription (STR_UndoBegin +18)
+// <--
+#define STR_UndoEnd (STR_UndoObjDescription)
#define STR_LayerBegin (STR_UndoEnd+1)
diff --git a/svx/inc/svx/AccessibleContextBase.hxx b/svx/inc/svx/AccessibleContextBase.hxx
index 9e36f99eaf0d..009c9b4fa619 100644
--- a/svx/inc/svx/AccessibleContextBase.hxx
+++ b/svx/inc/svx/AccessibleContextBase.hxx
@@ -1,37 +1,5 @@
/*************************************************************************
*
-<<<<<<< AccessibleContextBase.hxx
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AccessibleContextBase.hxx,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: rt $ $Date: 2008-07-07 14:27:26 $
- *
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
-=======
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
@@ -57,7 +25,6 @@
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
->>>>>>> 1.3
*
************************************************************************/
diff --git a/svx/inc/svx/AccessibleControlShape.hxx b/svx/inc/svx/AccessibleControlShape.hxx
index bf8cdec82815..82a56aafb2bf 100644
--- a/svx/inc/svx/AccessibleControlShape.hxx
+++ b/svx/inc/svx/AccessibleControlShape.hxx
@@ -31,13 +31,9 @@
#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_CONTROL_SHAPE_HXX
#define _SVX_ACCESSIBILITY_ACCESSIBLE_CONTROL_SHAPE_HXX
-#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_MANAGER_HXX
#include <svx/AccessibleShape.hxx>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
#include <com/sun/star/accessibility/XAccessibleAction.hpp>
-#endif
#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
diff --git a/svx/inc/svx/AccessibleShape.hxx b/svx/inc/svx/AccessibleShape.hxx
index f545771728ed..018737934c74 100755
--- a/svx/inc/svx/AccessibleShape.hxx
+++ b/svx/inc/svx/AccessibleShape.hxx
@@ -1,37 +1,5 @@
/*************************************************************************
*
-<<<<<<< AccessibleShape.hxx
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AccessibleShape.hxx,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: rt $ $Date: 2008-07-07 14:28:01 $
- *
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
-=======
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
@@ -57,7 +25,6 @@
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
->>>>>>> 1.3
*
************************************************************************/
diff --git a/svx/inc/svx/SmartTagMgr.hxx b/svx/inc/svx/SmartTagMgr.hxx
index f7a33e41b705..ef9ed696ba80 100644
--- a/svx/inc/svx/SmartTagMgr.hxx
+++ b/svx/inc/svx/SmartTagMgr.hxx
@@ -102,7 +102,7 @@ private:
std::vector< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > maActionList;
std::set< rtl::OUString > maDisabledSmartTagTypes;
std::multimap < rtl::OUString, ActionReference > maSmartTagMap;
- com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > mxBreakIter;
+ mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > mxBreakIter;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxMSF;
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext> mxContext;
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > mxConfigurationSettings;
@@ -129,6 +129,8 @@ private:
*/
void AssociateActionsWithRecognizers();
+ void CreateBreakIterator() const;
+
public:
SmartTagMgr( const rtl::OUString& rApplicationName );
diff --git a/svx/source/inc/dbcharsethelper.hxx b/svx/inc/svx/dbcharsethelper.hxx
index 6b5c1769faba..444538db33f0 100644..100755
--- a/svx/source/inc/dbcharsethelper.hxx
+++ b/svx/inc/svx/dbcharsethelper.hxx
@@ -30,8 +30,8 @@
#ifndef SVX_DBCHARSETHELPER_HXX
#define SVX_DBCHARSETHELPER_HXX
-
-#include "dbtoolsclient.hxx"
+#include "svx/svxdllapi.h"
+#include "svx/dbtoolsclient.hxx"
//........................................................................
namespace svxform
@@ -41,7 +41,7 @@ namespace svxform
//====================================================================
//= ODataAccessCharsetHelper
//====================================================================
- class ODataAccessCharsetHelper : public ODbtoolsClient
+ class SVX_DLLPUBLIC ODataAccessCharsetHelper : public ODbtoolsClient
{
protected:
mutable ::rtl::Reference< ::connectivity::simple::IDataAccessCharSet > m_xCharsetHelper;
diff --git a/svx/source/inc/dbtoolsclient.hxx b/svx/inc/svx/dbtoolsclient.hxx
index 15174b85ef69..ff606c99da7e 100644..100755
--- a/svx/source/inc/dbtoolsclient.hxx
+++ b/svx/inc/svx/dbtoolsclient.hxx
@@ -36,6 +36,7 @@
#include <osl/module.h>
#include <tools/solar.h>
#include <unotools/sharedunocomponent.hxx>
+#include "svx/svxdllapi.h"
//........................................................................
namespace svxform
@@ -50,7 +51,7 @@ namespace svxform
/** base class for classes which want to use dbtools features with load-on-call
of the dbtools lib.
*/
- class ODbtoolsClient
+ class SVX_DLLPUBLIC ODbtoolsClient
{
private:
static ::osl::Mutex s_aMutex;
@@ -82,7 +83,7 @@ namespace svxform
//====================================================================
//= OStaticDataAccessTools
//====================================================================
- class OStaticDataAccessTools : public ODbtoolsClient
+ class SVX_DLLPUBLIC OStaticDataAccessTools : public ODbtoolsClient
{
protected:
mutable ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools;
@@ -214,7 +215,7 @@ namespace svxform
//====================================================================
//= DBToolsObjectFactory
//====================================================================
- class DBToolsObjectFactory : public ODbtoolsClient
+ class SVX_DLLPUBLIC DBToolsObjectFactory : public ODbtoolsClient
{
public:
DBToolsObjectFactory();
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index d19518fbcd88..6e6162ef61f2 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -251,8 +251,10 @@
// ResId fuer FontSubstitution
#define RID_SVX_FONT_SUBSTITUTION (RID_SVX_START + 18)
+// insert row&col dialog
+#define DLG_INS_ROW_COL (RID_SVX_START + 156)
+
//InetDlg
-//#define RID_SVXDLG_INTERNET (RID_SVX_START + 156)
#define RID_SVXPAGE_INET_MAIL (RID_SVX_START + 155)
#define RID_SVXPAGE_INET_PROXY (RID_SVX_START + 157)
#define RID_SVXPAGE_INET_CACHE (RID_SVX_START + 158)
@@ -484,13 +486,13 @@
#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 103)
#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 104)
#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 105)
-#define RID_SVXSTR_PAPER_B4 (RID_SVX_START + 106)
-#define RID_SVXSTR_PAPER_B5 (RID_SVX_START + 107)
+#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 106)
+#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 107)
#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 108)
#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 109)
#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 110)
#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 111)
-#define RID_SVXSTR_PAPER_B6 (RID_SVX_START + 112)
+#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 112)
#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 113)
#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 114)
#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 115)
@@ -498,25 +500,23 @@
#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 117)
#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 118)
#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 119)
-#define RID_SVXSTR_PAPER_A (RID_SVX_START + 120)
-#define RID_SVXSTR_PAPER_B (RID_SVX_START + 121)
-#define RID_SVXSTR_PAPER_C (RID_SVX_START + 122)
-#define RID_SVXSTR_PAPER_D (RID_SVX_START + 123)
-#define RID_SVXSTR_PAPER_E (RID_SVX_START + 124)
-#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 125)
-#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 126)
-#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 127)
-#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 128)
-#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 129)
-#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 130)
-#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 131)
-#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 132)
-#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 133)
-#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 134)
-#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 135)
-#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 136)
-#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 137)
-#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 138)
+#define RID_SVXSTR_PAPER_C (RID_SVX_START + 120)
+#define RID_SVXSTR_PAPER_D (RID_SVX_START + 121)
+#define RID_SVXSTR_PAPER_E (RID_SVX_START + 122)
+#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 123)
+#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 124)
+#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 125)
+#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 126)
+#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 127)
+#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 128)
+#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 129)
+#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 130)
+#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 131)
+#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 132)
+#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 133)
+#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 134)
+#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 135)
+#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 136)
#define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142)
#define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143)
@@ -600,6 +600,7 @@
#define RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY (RID_SVX_START + 223)
#define RID_SVXSTR_XMLSEC_SIG_NOT_OK (RID_SVX_START + 224)
#define RID_SVXSTR_XMLSEC_NO_SIG (RID_SVX_START + 225)
+#define RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG (RID_SVX_START + 226)
// Strings von der Hatch-Tabpage
#define RID_SVXSTR_WRITE_DATA_ERROR (RID_SVX_START + 229)
@@ -1238,7 +1239,7 @@
#define RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION (RID_SVX_START + 1050)
#define RID_SVXSTR_EVENT_STARTAPP (RID_SVX_START + 1051)
#define RID_SVXSTR_EVENT_CLOSEAPP (RID_SVX_START + 1052)
-#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1053)
+#define RID_SVXSTR_EVENT_NEWDOC (RID_SVX_START + 1053)
#define RID_SVXSTR_EVENT_CLOSEDOC (RID_SVX_START + 1054)
#define RID_SVXSTR_EVENT_PREPARECLOSEDOC (RID_SVX_START + 1055)
#define RID_SVXSTR_EVENT_OPENDOC (RID_SVX_START + 1056)
@@ -1369,9 +1370,28 @@
#define STR_LINKEDDOC_NO_SYSTEM_FILE (RID_SVX_START + 1169)
#define RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED (RID_SVX_START + 1170)
#define RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED (RID_SVX_START + 1171)
+
+#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1172)
+#define RID_SVXSTR_EVENT_LOADDOCFINISHED (RID_SVX_START + 1173)
+#define RID_SVXSTR_EVENT_SAVEDOCFAILED (RID_SVX_START + 1174)
+#define RID_SVXSTR_EVENT_SAVEASDOCFAILED (RID_SVX_START + 1175)
+#define RID_SVXSTR_EVENT_COPYTODOC (RID_SVX_START + 1176)
+#define RID_SVXSTR_EVENT_COPYTODOCDONE (RID_SVX_START + 1177)
+#define RID_SVXSTR_EVENT_COPYTODOCFAILED (RID_SVX_START + 1178)
+#define RID_SVXSTR_EVENT_VIEWCREATED (RID_SVX_START + 1179)
+#define RID_SVXSTR_EVENT_PREPARECLOSEVIEW (RID_SVX_START + 1180)
+#define RID_SVXSTR_EVENT_CLOSEVIEW (RID_SVX_START + 1181)
+#define RID_SVXSTR_EVENT_TITLECHANGED (RID_SVX_START + 1182)
+#define RID_SVXSTR_EVENT_MODECHANGED (RID_SVX_START + 1183)
+#define RID_SVXSTR_EVENT_VISAREACHANGED (RID_SVX_START + 1184)
+#define RID_SVXSTR_EVENT_STORAGECHANGED (RID_SVX_START + 1185)
+#define RID_SVXSTR_EVENT_MAILMERGE_END (RID_SVX_START + 1186)
+#define RID_SVXSTR_EVENT_FIELDMERGE (RID_SVX_START + 1187)
+#define RID_SVXSTR_EVENT_FIELDMERGE_FINISHED (RID_SVX_START + 1188)
+#define RID_SVXSTR_EVENT_LAYOUT_FINISHED (RID_SVX_START + 1189)
// if you add here, remember to adjust RID_SVXSTR_NEXTFREE
-#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1172)
+#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1190)
// ----------------------------------------------------------------------------
// if we have _a_lot_ time, we should group the resource ids by type, instead
diff --git a/svx/inc/svx/editeng.hxx b/svx/inc/svx/editeng.hxx
index d5176034a301..65168297274e 100644
--- a/svx/inc/svx/editeng.hxx
+++ b/svx/inc/svx/editeng.hxx
@@ -219,6 +219,8 @@ public:
USHORT GetLineCount( USHORT nParagraph ) const;
xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const;
+ void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
+ USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 );
USHORT GetFirstLineOffset( USHORT nParagraph );
ParagraphInfos GetParagraphInfos( USHORT nPara );
diff --git a/svx/inc/svx/editobj.hxx b/svx/inc/svx/editobj.hxx
index eb304425f09d..f291adefcf71 100644
--- a/svx/inc/svx/editobj.hxx
+++ b/svx/inc/svx/editobj.hxx
@@ -121,6 +121,9 @@ public:
virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
bool operator==( const EditTextObject& rCompare ) const;
+
+ // #i102062#
+ bool isWrongListEqual(const EditTextObject& rCompare) const;
};
#endif // _EDITOBJ_HXX
diff --git a/svx/inc/svx/editview.hxx b/svx/inc/svx/editview.hxx
index c7c9bd975428..79deaab4dc36 100644
--- a/svx/inc/svx/editview.hxx
+++ b/svx/inc/svx/editview.hxx
@@ -34,6 +34,7 @@
#include <rsc/rscsfx.hxx>
#include <i18npool/lang.h>
#include <tools/color.hxx>
+#include <tools/gen.hxx>
class EditEngine;
class ImpEditEngine;
@@ -242,6 +243,9 @@ public:
void ChangeFontSize( bool bGrow, const FontList* pList );
static bool ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFontList );
+
+ String GetSurroundingText() const;
+ Selection GetSurroundingTextSelection() const;
};
#endif // _MyEDITVIEW_HXX
diff --git a/svx/inc/svx/emphitem.hxx b/svx/inc/svx/emphitem.hxx
index 2d90f4cd035a..fd80081f2d30 100644
--- a/svx/inc/svx/emphitem.hxx
+++ b/svx/inc/svx/emphitem.hxx
@@ -28,7 +28,7 @@
*
************************************************************************/
#ifndef _SVX_EMPHITEM_HXX
-#define _SVX_EMPTITEM_HXX
+#define _SVX_EMPHITEM_HXX
// include ---------------------------------------------------------------
diff --git a/svx/inc/svx/escherex.hxx b/svx/inc/svx/escherex.hxx
index 2f6552510c7e..a93814b2a825 100644
--- a/svx/inc/svx/escherex.hxx
+++ b/svx/inc/svx/escherex.hxx
@@ -304,6 +304,8 @@
#define ESCHER_ShpInst_ActionButtonMovie 200
#define ESCHER_ShpInst_HostControl 201
#define ESCHER_ShpInst_TextBox 202
+
+#define ESCHER_ShpInst_COUNT 203
#define ESCHER_ShpInst_Max 0x0FFF
#define ESCHER_ShpInst_Nil ESCHER_ShpInst_Max
@@ -960,10 +962,35 @@ namespace com { namespace sun { namespace star {
struct Gradient;
}
namespace drawing {
+ struct EnhancedCustomShapeAdjustmentValue;
class XShape;
}
}}}
+struct SVX_DLLPUBLIC EscherConnectorListEntry
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnector;
+ ::com::sun::star::awt::Point maPointA;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToA;
+ ::com::sun::star::awt::Point maPointB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToB;
+
+ sal_uInt32 GetConnectorRule( sal_Bool bFirst );
+
+ EscherConnectorListEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rC,
+ const ::com::sun::star::awt::Point& rPA,
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSA ,
+ const ::com::sun::star::awt::Point& rPB,
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSB ) :
+ mXConnector ( rC ),
+ maPointA ( rPA ),
+ mXConnectToA( rSA ),
+ maPointB ( rPB ),
+ mXConnectToB( rSB ) {}
+
+ sal_uInt32 GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rP );
+};
+
struct SVX_DLLPUBLIC EscherExContainer
{
sal_uInt32 nContPos;
@@ -1108,8 +1135,19 @@ public:
#define ESCHER_CREATEPOLYGON_POLYLINE 2
#define ESCHER_CREATEPOLYGON_POLYPOLYGON 4
-struct EscherPropSortStruct;
class GraphicAttr;
+class SdrObjCustomShape;
+
+struct EscherPropSortStruct
+{
+ sal_uInt8* pBuf;
+ sal_uInt32 nPropSize;
+ sal_uInt32 nPropValue;
+ sal_uInt16 nPropId;
+};
+
+typedef std::vector< EscherPropSortStruct > EscherProperties;
+
class SVX_DLLPUBLIC EscherPropertyContainer
{
EscherGraphicProvider* pGraphicProvider;
@@ -1155,6 +1193,10 @@ class SVX_DLLPUBLIC EscherPropertyContainer
sal_Bool GetOpt( sal_uInt16 nPropertyID, sal_uInt32& rPropValue ) const;
+ sal_Bool GetOpt( sal_uInt16 nPropertyID, EscherPropSortStruct& rPropValue ) const;
+
+ EscherProperties GetOpts() const;
+
void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT );
sal_Bool CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject );
@@ -1202,6 +1244,14 @@ class SVX_DLLPUBLIC EscherPropertyContainer
static PolyPolygon GetPolyPolygon( const ::com::sun::star::uno::Any& rSource );
static MSO_SPT GetCustomShapeType( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape, sal_uInt32& nMirrorFlags );
static MSO_SPT GetCustomShapeType( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape, sal_uInt32& nMirrorFlags, rtl::OUString& rShapeType );
+
+ // helper functions which are also used in ooxml export
+ static sal_Bool GetLineArrow( const sal_Bool bLineStart,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
+ ESCHER_LineEnd& reLineEnd, sal_Int32& rnArrowLength, sal_Int32& rnArrowWidth );
+ static sal_Bool IsDefaultObject( SdrObjCustomShape* pCustoShape );
+ static void LookForPolarHandles( const MSO_SPT eShapeType, sal_Int32& nAdjustmentsWhichNeedsToBeConverted );
+ static sal_Bool GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue );
};
// ---------------------------------------------------------------------------------------------
@@ -1338,7 +1388,7 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr
BOOL mbOleEmf; // OLE is EMF instead of WMF
- BOOL DoSeek( UINT32 nKey );
+ virtual BOOL DoSeek( UINT32 nKey );
public:
@@ -1349,7 +1399,7 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr
/// Wenn pPicStreamMergeBSE angegeben ist, werden die BLIPs
/// aus diesem Stream in die MsofbtBSE Records des EscherStream
/// gemerged, wie es fuer Excel (und Word?) benoetigt wird.
- void Flush( SvStream* pPicStreamMergeBSE = NULL );
+ virtual void Flush( SvStream* pPicStreamMergeBSE = NULL );
virtual ~EscherEx();
@@ -1360,13 +1410,13 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr
void InsertPersistOffset( UINT32 nKey, UINT32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet
BOOL SeekToPersistOffset( UINT32 nKey );
- BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die
+ virtual BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die
// aktuelle StreamPosition aendert
SvStream& GetStream() const { return *mpOutStrm; }
ULONG GetStreamPos() const { return mpOutStrm->Tell(); }
- BOOL SeekBehindRecHeader( UINT16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen
+ virtual BOOL SeekBehindRecHeader( UINT16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen
// features beim erzeugen folgender Container:
//
@@ -1378,23 +1428,26 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr
virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 );
virtual void CloseContainer();
- void BeginAtom();
- void EndAtom( UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
- void AddAtom( UINT32 nAtomSitze, UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
- void AddClientAnchor( const Rectangle& rRectangle );
+ virtual void BeginAtom();
+ virtual void EndAtom( UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
+ virtual void AddAtom( UINT32 nAtomSitze, UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
+ virtual void AddChildAnchor( const Rectangle& rRectangle );
+ virtual void AddClientAnchor( const Rectangle& rRectangle );
- UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
+ virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
UINT32 EnterGroup( const Rectangle* pBoundRect = NULL );
UINT32 GetGroupLevel() const { return mnGroupLevel; };
- BOOL SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect );
- BOOL SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect );
- void LeaveGroup();
+ virtual BOOL SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect );
+ virtual BOOL SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect );
+ virtual void LeaveGroup();
// ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!)
- void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 );
+ virtual void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 );
// reserviert eine ShapeId
UINT32 GetShapeID();
+ virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect );
+
UINT32 GetColor( const UINT32 nColor, BOOL bSwap = TRUE );
UINT32 GetColor( const Color& rColor, BOOL bSwap = TRUE );
diff --git a/svx/inc/svx/fmpage.hxx b/svx/inc/svx/fmpage.hxx
index 2efda5fa2cc4..1b5de5eabf08 100644
--- a/svx/inc/svx/fmpage.hxx
+++ b/svx/inc/svx/fmpage.hxx
@@ -59,11 +59,6 @@ public:
FmFormPage(const FmFormPage& rPage);
~FmFormPage();
- using SdrPage::NbcInsertObject;
- using SdrPage::NbcRemoveObject;
- using SdrPage::NbcReplaceObject;
- using SdrPage::ReplaceObject;
-
virtual void SetModel(SdrModel* pNewModel);
virtual SdrPage* Clone() const;
@@ -77,7 +72,9 @@ public:
// Zugriff auf alle Formulare
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& GetForms( bool _bForceCreate = true ) const;
- FmFormPageImpl* GetImpl() const {return m_pImpl;}
+#ifndef SVX_LIGHT
+ FmFormPageImpl& GetImpl() const { return *m_pImpl; }
+#endif // SVX_LIGHT
public:
const String& GetName() const { return m_sPageName; }
diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx
index d87d75ab3690..a0de3b2d3048 100644
--- a/svx/inc/svx/fntctrl.hxx
+++ b/svx/inc/svx/fntctrl.hxx
@@ -71,6 +71,7 @@ public:
SvxFont& GetCJKFont();
SvxFont& GetCTLFont();
void SetColor( const Color& rColor );
+ void ResetColor();
void SetBackColor( const Color& rColor );
void UseResourceText( BOOL bUse = TRUE );
void Paint( const Rectangle& );
diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx
index 257816fd9c5c..012e0f103ac3 100644
--- a/svx/inc/svx/framelink.hxx
+++ b/svx/inc/svx/framelink.hxx
@@ -325,7 +325,7 @@ inline double GetVerDiagAngle( const Rectangle& rRect )
@param fAngle
Inner (right) angle between diagonal and horizontal frame border.
*/
-long GetTLDiagOffset( long nVerOffs, long nDiagOffs, double fAngle );
+SVX_DLLPUBLIC long GetTLDiagOffset( long nVerOffs, long nDiagOffs, double fAngle );
/** Returns an X coordinate for a diagonal frame border in the specified height.
@@ -434,7 +434,7 @@ long GetTRDiagOffset( long nVerOffs, long nDiagOffs, double fAngle );
True, if rLBorder and rRBorder can be drawn in one step without
interruption at their connection point.
*/
-bool CheckFrameBorderConnectable(
+SVX_DLLPUBLIC bool CheckFrameBorderConnectable(
const Style& rLBorder, /// Style of the left frame border to connect.
const Style& rRBorder, /// Style of the right frame border to connect.
@@ -486,7 +486,7 @@ bool CheckFrameBorderConnectable(
| \ / |
rLFromB \ / rRFromB
*/
-void DrawHorFrameBorder(
+SVX_DLLPUBLIC void DrawHorFrameBorder(
OutputDevice& rDev, /// The output device used to draw the frame border.
const Point& rLPos, /// Reference point for left end of the processed frame border.
@@ -603,7 +603,7 @@ void SVX_DLLPUBLIC DrawHorFrameBorder(
rBFromB
|
*/
-void DrawVerFrameBorder(
+SVX_DLLPUBLIC void DrawVerFrameBorder(
OutputDevice& rDev, /// The output device used to draw the frame border.
const Point& rTPos, /// Reference point for top end of the processed frame border.
@@ -698,7 +698,7 @@ void SVX_DLLPUBLIC DrawVerFrameBorderSlanted(
The function preserves all settings of the passed output device.
*/
-void DrawDiagFrameBorders(
+SVX_DLLPUBLIC void DrawDiagFrameBorders(
OutputDevice& rDev, /// The output device used to draw the frame border.
const Rectangle& rRect, /// Rectangle for both diagonal frame borders.
diff --git a/svx/inc/svx/langbox.hxx b/svx/inc/svx/langbox.hxx
index 8aebc88e380e..476d78c53d03 100644
--- a/svx/inc/svx/langbox.hxx
+++ b/svx/inc/svx/langbox.hxx
@@ -78,6 +78,7 @@ private:
SVX_DLLPRIVATE void Init();
SVX_DLLPRIVATE USHORT ImplInsertImgEntry( const String& rEntry, USHORT nPos, bool bChecked );
+ SVX_DLLPRIVATE USHORT ImplInsertLanguage(LanguageType, USHORT, sal_Int16 );
public:
SvxLanguageBox( Window* pParent, WinBits nWinStyle, BOOL bCheck = FALSE);
@@ -89,6 +90,7 @@ public:
BOOL bCheckSpellAvail = FALSE );
USHORT InsertLanguage( const LanguageType eLangType, USHORT nPos = LISTBOX_APPEND );
+ USHORT InsertDefaultLanguage( sal_Int16 nType, USHORT nPos = LISTBOX_APPEND );
USHORT InsertLanguage( const LanguageType eLangType,
BOOL bCheckEntry, USHORT nPos = LISTBOX_APPEND );
void RemoveLanguage( const LanguageType eLangType );
diff --git a/svx/inc/svx/msdffdef.hxx b/svx/inc/svx/msdffdef.hxx
index 2274d126ef2d..442f751ad95e 100644
--- a/svx/inc/svx/msdffdef.hxx
+++ b/svx/inc/svx/msdffdef.hxx
@@ -1284,6 +1284,7 @@ class SVX_DLLPUBLIC DffPropSet : public Table
class SfxItemSet;
class SdrObject;
+struct DffObjData;
class SVX_DLLPUBLIC DffPropertyReader : public DffPropSet
{
@@ -1292,9 +1293,9 @@ class SVX_DLLPUBLIC DffPropertyReader : public DffPropSet
void ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const;
void ApplyCustomShapeAdjustmentAttributes( SfxItemSet& rSet ) const;
- void ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, const MSO_SPT eShapeType, const sal_uInt32 nShapeFlags ) const;
+ void ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const;
void ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eShapeType ) const; // #i28269#
- void ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const MSO_SPT eShapeType ) const;
+ void ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const;
public:
@@ -1311,7 +1312,8 @@ public:
#endif
void SetDefaultPropSet( SvStream& rIn, UINT32 nOffDgg ) const;
- void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const MSO_SPT = mso_sptNil, const sal_uInt32 nShapeFlags = 0 ) const;
+ void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const;
+ void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const;
};
#endif
diff --git a/svx/inc/svx/msdffimp.hxx b/svx/inc/svx/msdffimp.hxx
index 6a86c09ebf25..603a6831fe30 100644
--- a/svx/inc/svx/msdffimp.hxx
+++ b/svx/inc/svx/msdffimp.hxx
@@ -36,9 +36,7 @@
#include <tools/solar.h> // UINTXX
#include <svtools/svarray.hxx>
-#ifndef _SV_COLOR_HXX //autogen
#include <tools/color.hxx>
-#endif
#include <tools/gen.hxx>
#include <tools/table.hxx>
#include <svx/msdffdef.hxx>
@@ -48,7 +46,7 @@
#include <map>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include "svx/svxdllapi.h"
+#include <svx/svxdllapi.h>
#include <sot/storage.hxx>
@@ -96,7 +94,6 @@ SV_DECL_PTRARR_SORT_VISIBILITY(SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder_Ptr,
#define SVXMSDFF_SETTINGS_CROP_BITMAPS 1
#define SVXMSDFF_SETTINGS_IMPORT_PPT 2
#define SVXMSDFF_SETTINGS_IMPORT_EXCEL 4
-#define SVXMSDFF_SETTINGS_IMPORT_IAS 8
#define SP_FGROUP 0x001 // This shape is a group shape
#define SP_FCHILD 0x002 // Not a top-level shape
@@ -251,10 +248,10 @@ struct SvxMSDffImportData
struct DffObjData
{
- Rectangle aChildAnchor;
-
const DffRecordHeader& rSpHd;
- Rectangle& rBoundRect;
+
+ Rectangle aBoundRect;
+ Rectangle aChildAnchor;
UINT32 nShapeId;
UINT32 nSpFlags;
@@ -270,10 +267,18 @@ struct DffObjData
int nCalledByGroup;
DffObjData( const DffRecordHeader& rObjHd,
- Rectangle& rBdRect,
- int nClByGroup ) :
+ const Rectangle& rBoundRect,
+ int nClByGroup ) :
rSpHd( rObjHd ),
- rBoundRect( rBdRect ),
+ aBoundRect( rBoundRect ),
+ nShapeId( 0 ),
+ nSpFlags( 0 ),
+ eShapeType( mso_sptNil ),
+ bShapeType( FALSE ),
+ bClientAnchor( FALSE ),
+ bClientData( FALSE ),
+ bChildAnchor( FALSE ),
+ bOpt( FALSE ),
bIsAutoText( FALSE ),
nCalledByGroup( nClByGroup ){}
};
@@ -405,7 +410,7 @@ protected :
FASTBOOL ReadGraphic( SvStream& rSt, ULONG nIndex, Graphic& rGraphic ) const;
SdrObject* ImportFontWork( SvStream&, SfxItemSet&, Rectangle& rBoundRect ) const;
- SdrObject* ImportGraphic( SvStream&, SfxItemSet&, Rectangle& rBoundRect, const DffObjData& ) const;
+ SdrObject* ImportGraphic( SvStream&, SfxItemSet&, const DffObjData& ) const;
// --> OD 2004-12-14 #i32596# - pass <nCalledByGroup> to method
// Needed in the Writer Microsoft Word import to avoid import of OLE objects
// inside groups. Instead a graphic object is created.
@@ -476,6 +481,7 @@ public:
MSFilterTracer* mpTracer;
sal_Bool mbTracing;
+ Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
diff --git a/svx/inc/svx/msocximex.hxx b/svx/inc/svx/msocximex.hxx
index 679845827867..a32179a43eb4 100644
--- a/svx/inc/svx/msocximex.hxx
+++ b/svx/inc/svx/msocximex.hxx
@@ -230,7 +230,7 @@ class SVX_DLLPUBLIC OCX_Control
{
public:
OCX_Control(UniString sN, OCX_Control* parent = NULL ) : nWidth( 0 ), nHeight( 0 ), mnLeft(0), mnTop(0),
- mnStep(0), mnBackColor(0x8000000FL), mnForeColor(0), mnTabPos(0), sName(sN), pDocSh(0),
+ mnStep(0), mnBackColor(0x8000000FL), mnForeColor(0), mnTabPos(0), mbVisible(true), sName(sN), pDocSh(0),
bSetInDialog(FALSE), mpParent( parent ) {}
sal_Bool FullRead(SotStorageStream *pS)
{
@@ -287,6 +287,7 @@ public:
sal_Int32 mnBackColor;
sal_Int32 mnForeColor;
sal_uInt16 mnTabPos;
+ bool mbVisible;
UniString sName;
UniString msToolTip;
OCX_FontData aFontData;
@@ -483,7 +484,7 @@ public:
};
struct ContainerRecord
{
- ContainerRecord():nTop(0), nLeft(0), nSubStorageId(0), nSubStreamLen(0), nTabPos(0), nTypeIdent(0) {}
+ ContainerRecord():nTop(0), nLeft(0), nSubStorageId(0), nSubStreamLen(0), nTabPos(0), nTypeIdent(0), bVisible( true ) {}
::rtl::OUString cName;
::rtl::OUString controlTip;
@@ -494,6 +495,7 @@ struct ContainerRecord
sal_uInt32 nSubStreamLen;
sal_uInt16 nTabPos;
sal_uInt16 nTypeIdent;
+ bool bVisible;
};
typedef std::vector<OCX_Control*>::iterator CtrlIterator;
diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx
index 8e2eb238d3bd..5e6fe3737f94 100644
--- a/svx/inc/svx/numfmtsh.hxx
+++ b/svx/inc/svx/numfmtsh.hxx
@@ -212,8 +212,8 @@ public:
short GetListPos4Entry(sal_uInt32 nIdx);
short GetListPos4Entry( const String& rFmtString );
- void GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope,USHORT* pPos);
- void GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, BOOL bFlag);
+ void GetCurrencySymbols( SvStringsDtor& rList, USHORT* pPos );
+ void GetCurrencySymbols( SvStringsDtor& rList, BOOL bFlag );
USHORT FindCurrencyTableEntry( const String& rFmtString, BOOL &bTestBanking );
BOOL IsInTable(USHORT nPos,BOOL bTmpBanking,const String &rFmtString);
diff --git a/svx/inc/svx/obj3d.hxx b/svx/inc/svx/obj3d.hxx
index 3c15cd6951ef..46c79b45e4d1 100644
--- a/svx/inc/svx/obj3d.hxx
+++ b/svx/inc/svx/obj3d.hxx
@@ -92,8 +92,8 @@ class E3dObjList : public SdrObjList
public:
TYPEINFO();
E3dObjList(SdrModel* pNewModel = 0, SdrPage* pNewPage = 0, E3dObjList* pNewUpList = 0);
- E3dObjList(const E3dObjList& rSrcList);
- virtual ~E3dObjList();
+ SVX_DLLPUBLIC E3dObjList(const E3dObjList& rSrcList);
+ SVX_DLLPUBLIC virtual ~E3dObjList();
virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL);
virtual void InsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL);
@@ -308,9 +308,6 @@ public :
virtual UINT16 GetObjIdentifier() const;
virtual void RecalcSnapRect();
- // Hittest, wird an Geometrie weitergegeben
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
-
// Parameter Geometrieerzeugung setzen/lesen
BOOL GetCreateNormals() const { return bCreateNormals; }
void SetCreateNormals(BOOL bNew);
diff --git a/svx/inc/svx/outliner.hxx b/svx/inc/svx/outliner.hxx
index f2a64e16acb6..37e3d8ac71ee 100644
--- a/svx/inc/svx/outliner.hxx
+++ b/svx/inc/svx/outliner.hxx
@@ -33,22 +33,19 @@
#include <tools/gen.hxx>
#include <tools/string.hxx>
#include <tools/debug.hxx>
-#ifndef _EDITDATA_HXX //autogen
+
+#include <svtools/brdcst.hxx>
+
#include <svx/editdata.hxx>
-#endif
#include <i18npool/lang.h>
-#ifndef _SV_COLOR_HXX //autogen
#include <tools/color.hxx>
-#endif
#include <vcl/graph.hxx>
#include <tools/list.hxx>
#include <tools/link.hxx>
#include <rsc/rscsfx.hxx>
#include "svx/svxdllapi.h"
-#ifndef _GRFMGR_HXX
#include <goodies/grfmgr.hxx>
-#endif
#include <tools/rtti.hxx> // wegen typedef TypeId
#include <vector>
@@ -390,6 +387,9 @@ public:
void SetInvalidateMore( USHORT nPixel );
USHORT GetInvalidateMore() const;
+
+ String GetSurroundingText() const;
+ Selection GetSurroundingTextSelection() const;
};
//#if 0 // _SOLAR__PRIVATE
@@ -585,7 +585,7 @@ struct EBulletInfo
#define OUTLINERMODE_SUBTITLE (0x0100|OUTLINERMODE_TEXTOBJECT)
#define OUTLINERMODE_NOTE (0x0200|OUTLINERMODE_TEXTOBJECT)
-class SVX_DLLPUBLIC Outliner
+class SVX_DLLPUBLIC Outliner : public SfxBroadcaster
{
friend class OutlinerView;
friend class OutlinerEditEng;
diff --git a/svx/inc/svx/outlobj.hxx b/svx/inc/svx/outlobj.hxx
index 9a8efeaaddc1..0311fa914422 100644
--- a/svx/inc/svx/outlobj.hxx
+++ b/svx/inc/svx/outlobj.hxx
@@ -67,6 +67,9 @@ public:
bool operator==(const OutlinerParaObject& rCandidate) const;
bool operator!=(const OutlinerParaObject& rCandidate) const { return !operator==(rCandidate); }
+ // #i102062#
+ bool isWrongListEqual(const OutlinerParaObject& rCompare) const;
+
// outliner mode access
sal_uInt16 GetOutlinerMode() const;
void SetOutlinerMode(sal_uInt16 nNew);
diff --git a/svx/inc/svx/paperinf.hxx b/svx/inc/svx/paperinf.hxx
index 1c6ccf02a9f4..9e2503a56ea8 100644
--- a/svx/inc/svx/paperinf.hxx
+++ b/svx/inc/svx/paperinf.hxx
@@ -32,12 +32,8 @@
// INCLUDE ---------------------------------------------------------------
-#ifndef _PRINT_HXX //autogen
#include <vcl/print.hxx>
-#endif
-#ifndef _MAPMOD_HXX //autogen
#include <vcl/mapmod.hxx>
-#endif
#include <svx/svxenum.hxx>
#include "svx/svxdllapi.h"
@@ -52,19 +48,12 @@ class String;
class SVX_DLLPUBLIC SvxPaperInfo
{
public:
- static Size GetPaperSize( const Printer* );
- static Size GetPaperSize( SvxPaper ePaper,
- MapUnit eUnit = MAP_TWIP );
- // entfaellt demnaechst
- static SvxPaper GetPaper( const Size&, MapUnit eUnit = MAP_TWIP,
- BOOL bSloppy = FALSE );
- // dann nur noch diese beiden
- static SvxPaper GetSvxPaper( const Size&, MapUnit eUnit = MAP_TWIP,
- BOOL bSloppy = FALSE );
- static SvxPaper GetDefaultSvxPaper( LanguageType eLanguage );
- static Paper GetSvPaper( const Size&, MapUnit eUnit = MAP_TWIP,
- BOOL bSloppy = FALSE );
- static String GetName( SvxPaper ePaper );
+ static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP );
+ static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP );
+ static Size GetPaperSize( const Printer* pPrinter );
+ static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE );
+ static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP );
+ static String GetName( Paper ePaper );
};
// INLINE -----------------------------------------------------------------
@@ -84,97 +73,4 @@ inline Size &LandscapeSwap(Size &rSize)
return rSize;
}
-// Masze f"ur Standard- Papiergr"ossen:
-// Berechnungsformel: X twips = Y mm * 14400 / 254 (ungerundet!)
-
-const long lA0Width = 47678; // A0 841mm
-const long lA0Height = 67407; // A0 1189mm
-const long lA1Width = 33675; // A1 594mm
-const long lA1Height = lA0Width; // A1
-const long lA2Width = 23811; // A2 420mm
-const long lA2Height = lA1Width; // A2
-const long lA3Width = 16837; // A3 297mm
-const long lA3Height = lA2Width; // A3 420mm
-const long lA4Width = 11905; // A4 210mm
-const long lA4Height = lA3Width; // A4
-const long lA5Width = 8390; // A5 148mm
-const long lA5Height = lA4Width; // A5
-
-const long lB4Width = 14173; // B4 250mm
-const long lB4Height = 20012; // B4 353mm
-const long lB5Width = 9977; // B5 176mm
-const long lB5Height = lB4Width; // B5
-const long lB6Width = 7086;
-const long lB6Height = lB5Width;
-
-const long lC4Width = 12983;
-const long lC4Height = 18368;
-const long lC5Width = 9184;
-const long lC5Height = lC4Width;
-const long lC6Width = 6463;
-const long lC6Height = lC5Width;
-const long lC65Width = 6463;
-const long lC65Height = 12870;
-const long lDLWidth = 6236;
-const long lDLHeight = 12472;
-
-const long lJISB4Width = 14570;
-const long lJISB4Height = 20636;
-const long lJISB5Width = 10318;
-const long lJISB5Height = lJISB4Width;
-const long lJISB6Width = 7256;
-const long lJISB6Height = lJISB5Width;
-
-// Die folgenden Daten stammen vom WinWord und sind noch
-// nicht nach der obigen Formel,
-// sondern per 1cm = 567 twips oder 1 Zoll = 1440 twips berechnet worden:
-
-const long lLetterWidth = 12240; // LETTER
-const long lLetterHeight = 15840; // LETTER
-const long lLegalWidth = lLetterWidth; // LEGAL
-const long lLegalHeight = 20163; // LEGAL
-const long lTabloidWidth = 15850; // TABLOID
-const long lTabloidHeight = 24450; // TABLOID
-
-const long lDiaWidth = 10206; // DIA
-const long lDiaHeight = 15309; // DIA
-const long lScreenWidth = 11905; // SCREEN
-const long lScreenHeight = 15874; // SCREEN
-
-const long lAWidth = 12240; // A 8,5 Zoll
-const long lAHeight = 15840; // A 11 Zoll
-const long lBWidth = lAHeight; // B
-const long lBHeight = 24480; // B 17 Zoll
-const long lCWidth = lBHeight; // C
-const long lCHeight = 31680; // C 22 Zoll
-const long lDWidth = lCHeight; // D
-const long lDHeight = 48960; // D 34 Zoll
-const long lEWidth = lDHeight; // E
-const long lEHeight = 63360; // E 44 Zoll
-
-const long lExeWidth = 10440; // Executive 7,25 Zoll
-const long lExeHeight = 15120; // Executive 10,5 Zoll
-const long lLegal2Width = 12240; // Legal2 8,5 Zoll
-const long lLegal2Height = 18720; // Legal2 13 Zoll
-const long lCom675Width = 5220; // COM-6 3/4 3,625 Zoll
-const long lCom675Height = 9360; // COM-6 3/4 6,5 Zoll
-const long lCom9Width = 5580; // COM-9 3,875 Zoll
-const long lCom9Height = 12780; // COM-9 8,875 Zoll
-const long lCom10Width = 5940; // COM-10 4,125 Zoll
-const long lCom10Height = 13680; // COM-10 9,5 Zoll
-const long lCom11Width = 6480; // COM-11 4,5 Zoll
-const long lCom11Height = 14940; // COM-11 10,375 Zoll
-const long lCom12Width = 6840; // COM-12 4,75 Zoll
-const long lCom12Height = lAHeight; // COM-12 11 Zoll
-const long lMonarchWidth = lCom9Width; // Monarch 3,875 Zoll
-const long lMonarchHeight = 10800; // Monarch 7,5 Zoll
-
-const long lKai16Width = 10433; // 16 kai 18,4 cm
-const long lKai16Height = 14742; // 16 kai 26 cm
-const long lKai32Width = 7371; // 32 kai 13 cm
-const long lKai32Height = lKai16Width; // 32 kai 18,4 cm
-const long lKai32BigWidth = 7938; // 32 kai gross 14 cm
-const long lKai32BigHeight = 11510; // 32 kai gross 20,3 cm
-
#endif
-
diff --git a/svx/inc/svx/sdasaitm.hxx b/svx/inc/svx/sdasaitm.hxx
index b945a8341808..2301e0021b42 100644
--- a/svx/inc/svx/sdasaitm.hxx
+++ b/svx/inc/svx/sdasaitm.hxx
@@ -54,9 +54,9 @@ class SdrCustomShapeAdjustmentItem : public SfxPoolItem
public :
TYPEINFO();
- SdrCustomShapeAdjustmentItem();
+ SVX_DLLPUBLIC SdrCustomShapeAdjustmentItem();
SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion );
- ~SdrCustomShapeAdjustmentItem();
+ SVX_DLLPUBLIC ~SdrCustomShapeAdjustmentItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation,
@@ -76,8 +76,8 @@ class SdrCustomShapeAdjustmentItem : public SfxPoolItem
#endif
sal_uInt32 GetCount() const { return aAdjustmentValueList.Count(); };
- const SdrCustomShapeAdjustmentValue& GetValue( sal_uInt32 nIndex ) const;
- void SetValue( sal_uInt32 nIndex,
+ SVX_DLLPUBLIC const SdrCustomShapeAdjustmentValue& GetValue( sal_uInt32 nIndex ) const;
+ SVX_DLLPUBLIC void SetValue( sal_uInt32 nIndex,
const SdrCustomShapeAdjustmentValue& rVal );
};
diff --git a/svx/inc/svx/sdgcpitm.hxx b/svx/inc/svx/sdgcpitm.hxx
index 41efd3e7abee..4df0e005111d 100644
--- a/svx/inc/svx/sdgcpitm.hxx
+++ b/svx/inc/svx/sdgcpitm.hxx
@@ -38,7 +38,7 @@
// SdrGrafCropItem -
//------------------
-class SdrGrafCropItem : public SvxGrfCrop
+class SVX_DLLPUBLIC SdrGrafCropItem : public SvxGrfCrop
{
public:
diff --git a/svx/inc/svx/sdr/animation/objectanimator.hxx b/svx/inc/svx/sdr/animation/objectanimator.hxx
index 6f1b0900c030..3fcb52463bc8 100644
--- a/svx/inc/svx/sdr/animation/objectanimator.hxx
+++ b/svx/inc/svx/sdr/animation/objectanimator.hxx
@@ -48,7 +48,7 @@ namespace sdr
public:
// basic constructor and destructor
primitiveAnimator();
- virtual ~primitiveAnimator();
+ SVX_DLLPUBLIC virtual ~primitiveAnimator();
};
} // end of namespace animation
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/animation/scheduler.hxx b/svx/inc/svx/sdr/animation/scheduler.hxx
index 589cbde9bd75..03fc8eccd9b4 100644
--- a/svx/inc/svx/sdr/animation/scheduler.hxx
+++ b/svx/inc/svx/sdr/animation/scheduler.hxx
@@ -33,6 +33,7 @@
#include <sal/types.h>
#include <vcl/timer.hxx>
+#include <svx/svxdllapi.h>
//////////////////////////////////////////////////////////////////////////////
// event class
@@ -52,7 +53,7 @@ namespace sdr
public:
// constructor/destructor
Event(sal_uInt32 nTime);
- virtual ~Event();
+ SVX_DLLPUBLIC virtual ~Event();
// access to mpNext
Event* GetNext() const;
@@ -83,7 +84,7 @@ namespace sdr
public:
// constructor/destructor
EventList();
- virtual ~EventList();
+ SVX_DLLPUBLIC virtual ~EventList();
// insert/remove time dependent
void Insert(Event* pNew);
@@ -123,10 +124,10 @@ namespace sdr
public:
// constructor/destructor
Scheduler();
- virtual ~Scheduler();
+ SVX_DLLPUBLIC virtual ~Scheduler();
// From baseclass Timer, the timeout call
- virtual void Timeout();
+ SVX_DLLPUBLIC virtual void Timeout();
// get time
sal_uInt32 GetTime();
diff --git a/svx/inc/svx/sdr/attribute/sdrallattribute.hxx b/svx/inc/svx/sdr/attribute/sdrallattribute.hxx
index ad3de9d8c837..a699c7f9a198 100644
--- a/svx/inc/svx/sdr/attribute/sdrallattribute.hxx
+++ b/svx/inc/svx/sdr/attribute/sdrallattribute.hxx
@@ -32,6 +32,8 @@
#ifndef _SDR_ATTRIBUTE_SDRALLATTRIBUTE_HXX
#define _SDR_ATTRIBUTE_SDRALLATTRIBUTE_HXX
+#include <sal/types.h>
+
//////////////////////////////////////////////////////////////////////////////
// predefines
@@ -57,7 +59,9 @@ namespace drawinglayer
SdrTextAttribute* mpTextAttribute; // text and text attributes (if used)
public:
- SdrShadowTextAttribute(SdrShadowAttribute* pShadow = 0L, SdrTextAttribute* pTextAttribute = 0L);
+ SdrShadowTextAttribute(
+ SdrShadowAttribute* pShadow = 0,
+ SdrTextAttribute* pTextAttribute = 0);
~SdrShadowTextAttribute();
// copy constructor and assigment operator
@@ -68,7 +72,7 @@ namespace drawinglayer
bool operator==(const SdrShadowTextAttribute& rCandidate) const;
// bool access
- bool isVisible() const { return (0L != mpTextAttribute); }
+ bool isVisible() const { return (0 != mpTextAttribute); }
// data access
const SdrShadowAttribute* getShadow() const { return mpShadow; }
@@ -91,7 +95,10 @@ namespace drawinglayer
SdrTextAttribute* mpTextAttribute; // text and text attributes (if used)
public:
- SdrFillTextAttribute(SdrFillAttribute* pFill = 0L, FillGradientAttribute* pFillFloatTransGradient = 0L, SdrTextAttribute* pTextAttribute = 0L);
+ SdrFillTextAttribute(
+ SdrFillAttribute* pFill = 0,
+ FillGradientAttribute* pFillFloatTransGradient = 0,
+ SdrTextAttribute* pTextAttribute = 0);
~SdrFillTextAttribute();
// copy constructor and assigment operator
@@ -126,8 +133,10 @@ namespace drawinglayer
public:
SdrLineShadowTextAttribute(
- SdrLineAttribute* pLine = 0L, SdrLineStartEndAttribute* pLineStartEnd = 0L,
- SdrShadowAttribute* pShadow = 0L, SdrTextAttribute* pTextAttribute = 0L);
+ SdrLineAttribute* pLine = 0,
+ SdrLineStartEndAttribute* pLineStartEnd = 0,
+ SdrShadowAttribute* pShadow = 0,
+ SdrTextAttribute* pTextAttribute = 0);
~SdrLineShadowTextAttribute();
// copy constructor and assigment operator
@@ -161,8 +170,12 @@ namespace drawinglayer
public:
SdrLineFillShadowTextAttribute(
- SdrLineAttribute* pLine = 0L, SdrFillAttribute* pFill = 0L, SdrLineStartEndAttribute* pLineStartEnd = 0L,
- SdrShadowAttribute* pShadow = 0L, FillGradientAttribute* pFillFloatTransGradient = 0L, SdrTextAttribute* pTextAttribute = 0L);
+ SdrLineAttribute* pLine = 0,
+ SdrFillAttribute* pFill = 0,
+ SdrLineStartEndAttribute* pLineStartEnd = 0,
+ SdrShadowAttribute* pShadow = 0,
+ FillGradientAttribute* pFillFloatTransGradient = 0,
+ SdrTextAttribute* pTextAttribute = 0);
~SdrLineFillShadowTextAttribute();
// copy constructor and assigment operator
diff --git a/svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx b/svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx
new file mode 100644
index 000000000000..77273bd9cb03
--- /dev/null
+++ b/svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrtextattribute.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SDR_ATTRIBUTE_SDRFORMTEXTATTRIBUTE_HXX
+#define _SDR_ATTRIBUTE_SDRFORMTEXTATTRIBUTE_HXX
+
+#include <sal/types.h>
+#include <svx/xenum.hxx>
+#include <tools/color.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+class SfxItemSet;
+namespace drawinglayer { namespace attribute { class SdrFormTextOutlineAttribute; }}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrFormTextAttribute
+ {
+ private:
+ // FormText (FontWork) Attributes
+ sal_Int32 mnFormTextDistance; // distance from line in upright direction
+ sal_Int32 mnFormTextStart; // shift from polygon start
+ sal_Int32 mnFormTextShdwXVal; // shadow distance or 10th degrees
+ sal_Int32 mnFormTextShdwYVal; // shadow distance or scaling
+ sal_uInt16 mnFormTextShdwTransp; // shadow transparence
+ XFormTextStyle meFormTextStyle; // on/off and char orientation
+ XFormTextAdjust meFormTextAdjust; // adjustment (left/right/center) and scale
+ XFormTextShadow meFormTextShadow; // shadow mode
+ Color maFormTextShdwColor; // shadow color
+
+ // outline attributes; used when getFormTextOutline() is true and (for
+ // shadow) when getFormTextShadow() != XFTSHADOW_NONE
+ SdrFormTextOutlineAttribute* mpOutline;
+ SdrFormTextOutlineAttribute* mpShadowOutline;
+
+ // bitfield
+ unsigned mbFormTextMirror : 1; // change orientation
+ unsigned mbFormTextOutline : 1; // show contour of objects
+
+ public:
+ SdrFormTextAttribute(const SfxItemSet& rSet);
+ ~SdrFormTextAttribute();
+
+ // copy constructor and assigment operator
+ SdrFormTextAttribute(const SdrFormTextAttribute& rCandidate);
+ SdrFormTextAttribute& operator=(const SdrFormTextAttribute& rCandidate);
+
+ // compare operator
+ bool operator==(const SdrFormTextAttribute& rCandidate) const;
+
+ // data access
+ sal_Int32 getFormTextDistance() const { return mnFormTextDistance; }
+ sal_Int32 getFormTextStart() const { return mnFormTextStart; }
+ sal_Int32 getFormTextShdwXVal() const { return mnFormTextShdwXVal; }
+ sal_Int32 getFormTextShdwYVal() const { return mnFormTextShdwYVal; }
+ sal_uInt16 getFormTextShdwTransp() const { return mnFormTextShdwTransp; }
+ XFormTextStyle getFormTextStyle() const { return meFormTextStyle; }
+ XFormTextAdjust getFormTextAdjust() const { return meFormTextAdjust; }
+ XFormTextShadow getFormTextShadow() const { return meFormTextShadow; }
+ Color getFormTextShdwColor() const { return maFormTextShdwColor; }
+
+ const SdrFormTextOutlineAttribute* getOutline() const { return mpOutline; }
+ const SdrFormTextOutlineAttribute* getShadowOutline() const { return mpShadowOutline; }
+
+ bool getFormTextMirror() const { return mbFormTextMirror; }
+ bool getFormTextOutline() const { return mbFormTextOutline; }
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _SDR_ATTRIBUTE_SDRFORMTEXTATTRIBUTE_HXX
+
+// eof
diff --git a/svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx b/svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx
new file mode 100644
index 000000000000..8e11c97ed5c3
--- /dev/null
+++ b/svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrtextattribute.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX
+#define _SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX
+
+#include <sal/types.h>
+#include <drawinglayer/attribute/lineattribute.hxx>
+#include <drawinglayer/attribute/strokeattribute.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrFormTextOutlineAttribute
+ {
+ private:
+ // one set of attributes for FormText (FontWork) outline visualisation
+ LineAttribute maLineAttribute;
+ StrokeAttribute maStrokeAttribute;
+ sal_uInt8 mnTransparence;
+
+ public:
+ SdrFormTextOutlineAttribute(
+ const LineAttribute& rLineAttribute,
+ const StrokeAttribute& rStrokeAttribute,
+ sal_uInt8 nTransparence);
+
+ // compare operator
+ bool operator==(const SdrFormTextOutlineAttribute& rCandidate) const;
+
+ // data read access
+ const LineAttribute& getLineAttribute() const { return maLineAttribute; }
+ const StrokeAttribute getStrokeAttribute() const { return maStrokeAttribute; }
+ sal_uInt8 getTransparence() const { return mnTransparence; }
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX
+
+// eof
diff --git a/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx b/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx
index 9033135e6caa..1759eb18d319 100644
--- a/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx
+++ b/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx
@@ -32,18 +32,16 @@
#ifndef _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
#define _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
-#include <svx/xenum.hxx>
#include <sal/types.h>
-#include <svx/sdr/primitive2d/sdrtextprimitive2d.hxx>
+#include <svx/xenum.hxx>
+#include <svx/outlobj.hxx>
+#include <svx/sdtaitm.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
class SdrText;
-class OutlinerParaObject;
-
-namespace drawinglayer { namespace animation {
- class AnimationEntryList;
-}}
+namespace drawinglayer { namespace animation { class AnimationEntryList; }}
+namespace drawinglayer { namespace attribute { class SdrFormTextAttribute; }}
//////////////////////////////////////////////////////////////////////////////
@@ -53,15 +51,28 @@ namespace drawinglayer
{
class SdrTextAttribute
{
- const SdrText& mrSdrText;
- const OutlinerParaObject maOutlinerParaObject;
- XFormTextStyle meFormTextStyle;
+ private:
+ // all-text attributes. The SdrText itself and a copy
+ // of te OPO
+ const SdrText* mpSdrText;
+ OutlinerParaObject maOutlinerParaObject;
+
+ // Set when it's a FormText; contains all FormText attributes
+ SdrFormTextAttribute* mpSdrFormTextAttribute;
+ // text distances
sal_Int32 maTextLeftDistance;
sal_Int32 maTextUpperDistance;
sal_Int32 maTextRightDistance;
sal_Int32 maTextLowerDistance;
+ // #i101556# use versioning from text attributes to detect changes
+ sal_uInt32 maPropertiesVersion;
+
+ // text alignments
+ SdrTextHorzAdjust maSdrTextHorzAdjust;
+ SdrTextVertAdjust maSdrTextVertAdjust;
+
// bitfield
unsigned mbContour : 1;
unsigned mbFitToSize : 1;
@@ -69,6 +80,7 @@ namespace drawinglayer
unsigned mbBlink : 1;
unsigned mbScroll : 1;
unsigned mbInEditMode : 1;
+ unsigned mbFixedCellHeight : 1;
public:
SdrTextAttribute(
@@ -79,29 +91,42 @@ namespace drawinglayer
sal_Int32 aTextUpperDistance,
sal_Int32 aTextRightDistance,
sal_Int32 aTextLowerDistance,
+ SdrTextHorzAdjust aSdrTextHorzAdjust,
+ SdrTextVertAdjust aSdrTextVertAdjust,
bool bContour,
bool bFitToSize,
bool bHideContour,
bool bBlink,
bool bScroll,
- bool bInEditMode);
+ bool bInEditMode,
+ bool bFixedCellHeight);
+ ~SdrTextAttribute();
+
+ // copy constructor and assigment operator
+ SdrTextAttribute(const SdrTextAttribute& rCandidate);
+ SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate);
+
+ // compare operator
bool operator==(const SdrTextAttribute& rCandidate) const;
// data access
- const SdrText& getSdrText() const { return mrSdrText; }
+ const SdrText& getSdrText() const { return *mpSdrText; }
const OutlinerParaObject& getOutlinerParaObject() const { return maOutlinerParaObject; }
bool isContour() const { return mbContour; }
- bool isFontwork() const { return (XFT_NONE != meFormTextStyle); }
bool isFitToSize() const { return mbFitToSize; }
bool isHideContour() const { return mbHideContour; }
bool isBlink() const { return mbBlink; }
bool isScroll() const { return mbScroll; }
bool isInEditMode() const { return mbInEditMode; }
- XFormTextStyle getFormTextStyle() const { return meFormTextStyle; }
+ bool isFixedCellHeight() const { return mbFixedCellHeight; }
+ const SdrFormTextAttribute* getSdrFormTextAttribute() const { return mpSdrFormTextAttribute; }
sal_Int32 getTextLeftDistance() const { return maTextLeftDistance; }
sal_Int32 getTextUpperDistance() const { return maTextUpperDistance; }
sal_Int32 getTextRightDistance() const { return maTextRightDistance; }
sal_Int32 getTextLowerDistance() const { return maTextLowerDistance; }
+ sal_uInt32 getPropertiesVersion() const { return maPropertiesVersion; }
+ SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; }
+ SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; }
// animation timing generation
void getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const;
diff --git a/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx b/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx
index 7ddc9546ee78..136f43aed0aa 100644
--- a/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx
+++ b/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx
@@ -38,6 +38,8 @@
// predeclarations
class SdrGrafObj;
+namespace drawinglayer { namespace attribute { class SdrLineFillShadowTextAttribute; }}
+class GraphicAttr;
//////////////////////////////////////////////////////////////////////////////
@@ -47,6 +49,16 @@ namespace sdr
{
class ViewContactOfGraphic : public ViewContactOfTextObj
{
+ private:
+ // helpers for constructing various primitive visualisations in various states
+ drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForPresObj(
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute,
+ const GraphicAttr& rLocalGrafInfo) const;
+ drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForDraft(
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const;
+
protected:
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
@@ -63,6 +75,13 @@ namespace sdr
ViewContactOfGraphic(SdrGrafObj& rGrafObj);
virtual ~ViewContactOfGraphic();
+ // #i102380#
+ void flushGraphicObjects();
+
+ // helpers for viusualisation state
+ bool visualisationUsesPresObj() const;
+ bool visualisationUsesDraft() const;
+
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx
index f9f19ba687bc..f1b515e8a198 100644
--- a/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx
+++ b/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx
@@ -53,6 +53,9 @@ namespace sdr
return (SdrObjCustomShape&)GetSdrObject();
}
+ // #i101684# internal tooling
+ basegfx::B2DRange getCorrectedTextBoundRect() const;
+
public:
// basic constructor, used from SdrObject.
ViewContactOfSdrObjCustomShape(SdrObjCustomShape& rCustomShape);
diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx
index d75c2bfa3919..27235de9e097 100644
--- a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx
+++ b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -64,15 +64,15 @@ namespace sdr
ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj);
virtual ~ViewContactOfSdrOle2Obj();
- // helper for creating a OLE sequence for this object for a specified Graphic. This is locally
- // used from createViewIndependentPrimitive2DSequence and also allows the VOC which knows about
- // HighContrast mode to easily do the same with the HighContrast OLE metafile. It also allows
- // to give a hint for scaling down the content what is needed for EmptyPresObjs
- drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithGivenGraphic(const Graphic& rOLEGraphic, bool bScaleContent) const;
+ // helper for creating a OLE sequence for this object. It takes care od attributes, needed
+ // scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from
+ // createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true
+ // from the VOC which knows that
+ drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithParameters(bool bHighContrast) const;
protected:
// This method is responsible for creating the graphical visualisation data
- // ONLY based on model data
+ // ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false)
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
};
} // end of namespace contact
diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
index 7a40c25511e4..87a1de55ec0a 100644
--- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -65,6 +65,8 @@ namespace sdr { namespace contact {
::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl;
public:
+ ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
+
/// determines whether an XControl already exists, and is currently visible
bool isControlVisible() const;
@@ -89,18 +91,6 @@ namespace sdr { namespace contact {
*/
void setControlDesignMode( bool _bDesignMode ) const;
- /** determines whether the instance belongs to a given OutputDevice
- @precond
- The instance knows the device it belongs to, or can determine it.
- If this is not the case, you will notice an assertion, and the method will
- return false.
- */
- bool belongsToDevice( const OutputDevice* _pDevice ) const;
-
- /** positions the control for subsequent paint operations
- */
- void positionControlForPaint( const DisplayInfo& _rDisplayInfo ) const;
-
/** callback from impl class to react on changes of properties form the XControlModel
*/
void propertyChange();
@@ -110,7 +100,6 @@ namespace sdr { namespace contact {
virtual void ActionChanged();
protected:
- ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
~ViewObjectContactOfUnoControl();
// support for Primitive2D
@@ -123,36 +112,6 @@ namespace sdr { namespace contact {
};
//====================================================================
- //= UnoControlDefaultContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlDefaultContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlDefaultContact();
-
- private:
- UnoControlDefaultContact(); // never implemented
- UnoControlDefaultContact( const UnoControlDefaultContact& ); // never implemented
- UnoControlDefaultContact& operator=( const UnoControlDefaultContact& ); // never implemented
- };
-
- //====================================================================
- //= UnoControlWindowContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlWindowContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlWindowContact();
-
- private:
- UnoControlWindowContact(); // never implemented
- UnoControlWindowContact( const UnoControlWindowContact& ); // never implemented
- UnoControlWindowContact& operator=( const UnoControlWindowContact& ); // never implemented
- };
-
- //====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
class SVX_DLLPRIVATE UnoControlPrintOrPreviewContact : public ViewObjectContactOfUnoControl
@@ -165,21 +124,8 @@ namespace sdr { namespace contact {
UnoControlPrintOrPreviewContact(); // never implemented
UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& ); // never implemented
UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ); // never implemented
- };
- //====================================================================
- //= UnoControlPDFExportContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlPDFExportContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlPDFExportContact();
-
- private:
- UnoControlPDFExportContact(); // never implemented
- UnoControlPDFExportContact( const UnoControlPDFExportContact& ); // never implemented
- UnoControlPDFExportContact& operator=( const UnoControlPDFExportContact& ); // never implemented
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const;
};
//........................................................................
diff --git a/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx
index 90c546cb85cc..23a720467710 100644
--- a/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx
@@ -40,7 +40,7 @@ namespace sdr
{
namespace overlay
{
- class OverlayAnimatedBitmapEx : public OverlayObjectWithBasePosition
+ class SVX_DLLPUBLIC OverlayAnimatedBitmapEx : public OverlayObjectWithBasePosition
{
protected:
// the Bitmaps
@@ -60,11 +60,8 @@ namespace sdr
// Flag to remember which state to draw. Inited with sal_False (0)
unsigned mbOverlayState : 1;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
// #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000)
void impCheckBlinkTimeValueRange();
@@ -100,11 +97,6 @@ namespace sdr
// 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);
-
- // Zoom has changed. If the objects logical size
- // depends on the MapMode of the used OutputDevice, use this call
- // to invalidate the range in logical coordinates.
- virtual void zoomHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlaybitmap.hxx b/svx/inc/svx/sdr/overlay/overlaybitmap.hxx
deleted file mode 100644
index 23037300259d..000000000000
--- a/svx/inc/svx/sdr/overlay/overlaybitmap.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: overlaybitmap.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SDR_OVERLAY_OVERLAYBITMAP_HXX
-#define _SDR_OVERLAY_OVERLAYBITMAP_HXX
-
-#include <svx/sdr/overlay/overlayobject.hxx>
-#include <vcl/bitmap.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayBitmap : public OverlayObjectWithBasePosition
- {
- protected:
- // the Bitmap itself
- Bitmap maBitmap;
-
- // position of the basePosition inside the Bitmap, in pixels
- sal_uInt16 mnCenterX;
- sal_uInt16 mnCenterY;
-
- // bitfield
- // shall the BaseColor be used to create transparence?
- unsigned mbUseTransparenceColor : 1;
-
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
-
- public:
- OverlayBitmap(
- const basegfx::B2DPoint& rBasePos,
- const Bitmap& rBitmap,
- sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0,
- sal_Bool bUseTransCol = sal_False,
- Color aTransColor = Color(COL_WHITE));
- virtual ~OverlayBitmap();
-
- const Bitmap& getBitmap() const { return maBitmap; }
- void setBitmap(const Bitmap& rNew);
-
- sal_Bool isTransparenceUsed() const { return mbUseTransparenceColor; }
- void setTransparenceUsed(sal_Bool bNew);
-
- sal_uInt16 getCenterX() const { return mnCenterX; }
- sal_uInt16 getCenterY() const { return mnCenterY; }
- void setCenterXY(sal_uInt16 nNewX, sal_uInt16 nNewY);
-
- // Zoom has changed. If the objects logical size
- // depends on the MapMode of the used OutputDevice, use this call
- // to invalidate the range in logical coordinates.
- virtual void zoomHasChanged();
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //_SDR_OVERLAY_OVERLAYBITMAP_HXX
-
-// eof
diff --git a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
index b19b8248eb3e..96295d0f9f80 100644
--- a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx
@@ -50,11 +50,7 @@ namespace sdr
sal_uInt16 mnCenterX;
sal_uInt16 mnCenterY;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayBitmapEx(
@@ -69,11 +65,6 @@ namespace sdr
sal_uInt16 getCenterX() const { return mnCenterX; }
sal_uInt16 getCenterY() const { return mnCenterY; }
void setCenterXY(sal_uInt16 nNewX, sal_uInt16 nNewY);
-
- // Zoom has changed. If the objects logical size
- // depends on the MapMode of the used OutputDevice, use this call
- // to invalidate the range in logical coordinates.
- virtual void zoomHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx b/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx
index c85bc3d9aae5..35223ce44d04 100644
--- a/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx
@@ -42,39 +42,15 @@ namespace sdr
class OverlayCrosshairStriped : public OverlayObjectWithBasePosition
{
protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayCrosshairStriped(const basegfx::B2DPoint& rBasePos);
virtual ~OverlayCrosshairStriped();
- // Hittest with logical coordinates
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayCrosshair : public OverlayCrosshairStriped
- {
- protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- public:
- OverlayCrosshair(
- const basegfx::B2DPoint& rBasePos,
- Color aLineColor = Color(COL_BLACK));
- virtual ~OverlayCrosshair();
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx b/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx
index 41e55f7dbdec..aeb4c416f058 100644
--- a/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx
@@ -47,38 +47,30 @@ namespace sdr
{
// geometric definitions
basegfx::B2DPoint maSecondPosition;
- const double mfDiscreteWidth;
+ const double mfDiscreteGrow;
+ const double mfDiscreteShrink;
const double mfHatchRotation;
const double mfRotation;
- // helper to create visualisation geometry from above values
- basegfx::B2DPolyPolygon getGeometry(OutputDevice& rOutputDevice);
-
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayHatchRect(
const basegfx::B2DPoint& rBasePosition,
const basegfx::B2DPoint& rSecondPosition,
const Color& rHatchColor,
- double fDiscreteWidth,
+ double fDiscreteGrow,
+ double fDiscreteShrink,
double fHatchRotation,
double fRotation);
const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
void setSecondPosition(const basegfx::B2DPoint&);
- // Zoom has changed. If the objects logical size
- // depends on the MapMode of the used OutputDevice, use this call
- // to invalidate the range in logical coordinates.
- virtual void zoomHasChanged();
-
// data read access
- double getDiscreteWidth() const { return mfDiscreteWidth; }
+ double getDiscreteGrow() const { return mfDiscreteGrow; }
+ double getDiscreteShrink() const { return mfDiscreteShrink; }
double getHatchRotation() const { return mfHatchRotation; }
double getRotation() const { return mfRotation; }
};
diff --git a/svx/inc/svx/sdr/overlay/overlayhelpline.hxx b/svx/inc/svx/sdr/overlay/overlayhelpline.hxx
index b26fc8c3f565..44baf5101e02 100644
--- a/svx/inc/svx/sdr/overlay/overlayhelpline.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayhelpline.hxx
@@ -46,11 +46,8 @@ namespace sdr
// remember HelpLineKind
SdrHelpLineKind meKind;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayHelplineStriped(
@@ -58,30 +55,11 @@ namespace sdr
SdrHelpLineKind eNewKind = SDRHELPLINE_POINT);
virtual ~OverlayHelplineStriped();
- // Hittest with logical coordinates
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayHelpline : public OverlayHelplineStriped
- {
- protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
+ // dat read access
+ SdrHelpLineKind getKind() const { return meKind; }
- public:
- OverlayHelpline(
- const basegfx::B2DPoint& rBasePos,
- Color aLineColor = Color(COL_BLACK),
- SdrHelpLineKind eNewKind = SDRHELPLINE_POINT);
- virtual ~OverlayHelpline();
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlayline.hxx b/svx/inc/svx/sdr/overlay/overlayline.hxx
index 821a87a0a36b..5c052b778fce 100644
--- a/svx/inc/svx/sdr/overlay/overlayline.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayline.hxx
@@ -45,11 +45,8 @@ namespace sdr
// second position in pixel
basegfx::B2DPoint maSecondPosition;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayLineStriped(
@@ -61,33 +58,8 @@ namespace sdr
const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
void setSecondPosition(const basegfx::B2DPoint& rNew);
- // Hittest with logical coordinates
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
-
- // transform object coordinates. Needs to transform maSecondPosition.
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayLine : public OverlayLineStriped
- {
- protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- public:
- OverlayLine(
- const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- Color aLineColor = Color(COL_BLACK));
- virtual ~OverlayLine();
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlaymanager.hxx b/svx/inc/svx/sdr/overlay/overlaymanager.hxx
index 53cb15c5d72b..557a06a5f722 100644
--- a/svx/inc/svx/sdr/overlay/overlaymanager.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaymanager.hxx
@@ -38,7 +38,6 @@
#include <tools/color.hxx>
#include "svx/svxdllapi.h"
#include <svtools/optionsdrawinglayer.hxx>
-#include <boost/shared_ptr.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
@@ -68,13 +67,8 @@ namespace sdr
// the OutputDevice to work on, set on construction and not to be changed
OutputDevice& rmOutputDevice;
- // start, end and number of the double linked list of OverlayObjects
- // managed by this manager
- OverlayObject* mpOverlayObjectStart;
- OverlayObject* mpOverlayObjectEnd;
-
- // MapMode for MapMode change watching
- MapMode maMapMode;
+ // the vector of registered OverlayObjects
+ OverlayObjectVector maOverlayObjects;
// Stripe support. All striped OverlayObjects use these stripe
// values. Changes change all those objects.
@@ -88,23 +82,33 @@ namespace sdr
// 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 ImpCheckMapModeChange() 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;
public:
- OverlayManager(OutputDevice& rOutputDevice);
+ // when handing over another OverlayManager at construction, the OverlayObjects
+ // will be taken over from it. The new one will have added all OverlayObjects
+ // while the handed over one will have none
+ OverlayManager(
+ OutputDevice& rOutputDevice,
+ OverlayManager* pOldOverlayManager = 0);
virtual ~OverlayManager();
+ // access to current ViewInformation2D; this call checks and evtl. updates ViewInformation2D
+ const drawinglayer::geometry::ViewInformation2D getCurrentViewInformation2D() const;
+
// complete redraw
- virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L) const;
+ virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0) const;
// flush. Do buffered updates.
virtual void flush();
@@ -139,17 +143,6 @@ namespace sdr
// access to maDrawinglayerOpt
const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return maDrawinglayerOpt; }
-
- /** Return a list of all OverlayObjects that currently belong to
- the called OverlayManager. Subsequent calls to add() or
- remove() will not alter the content of the returned list.
- Modifying the list will not change the list of
- OverlayObjects that belong to the called OverlayManager.
- @return
- The returned pointer is never empty but the pointed-to
- vector may be.
- */
- ::boost::shared_ptr<OverlayObjectVector> GetOverlayObjects (void) const;
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx
index 8899c1ac3194..9ced6a4d18ec 100644
--- a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx
@@ -65,7 +65,7 @@ namespace sdr
// bitfield
// Flag to decide if PreRendering shall be used for overlay refreshes.
- // Default is sal_False.
+ // Default is false.
unsigned mbRefreshWithPreRendering : 1;
// link for timer
@@ -78,7 +78,13 @@ namespace sdr
void ImpSaveBackground(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L);
public:
- OverlayManagerBuffered(OutputDevice& rOutputDevice, sal_Bool bRefreshWithPreRendering = sal_False);
+ // when handing over another OverlayManager at construction, the OverlayObjects
+ // will be taken over from it. The new one will have added all OverlayObjects
+ // while the handed over one will have none
+ OverlayManagerBuffered(
+ OutputDevice& rOutputDevice,
+ OverlayManager* pOldOverlayManager = 0,
+ bool bRefreshWithPreRendering = false);
virtual ~OverlayManagerBuffered();
// complete redraw
@@ -97,8 +103,8 @@ namespace sdr
virtual void invalidateRange(const basegfx::B2DRange& rRange);
// access to RefreshWithPreRendering Flag
- sal_Bool DoRefreshWithPreRendering() const { return mbRefreshWithPreRendering; }
- void SetRefreshWithPreRendering(sal_Bool bNew);
+ bool DoRefreshWithPreRendering() const { return mbRefreshWithPreRendering; }
+ void SetRefreshWithPreRendering(bool bNew);
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlayobject.hxx b/svx/inc/svx/sdr/overlay/overlayobject.hxx
index 41c13db0e457..ae31df8f6dee 100644
--- a/svx/inc/svx/sdr/overlay/overlayobject.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayobject.hxx
@@ -36,6 +36,7 @@
#include <tools/color.hxx>
#include <svx/sdr/animation/scheduler.hxx>
#include "svx/svxdllapi.h"
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <vector>
@@ -65,60 +66,64 @@ namespace sdr
{
namespace overlay
{
- class SVX_DLLPUBLIC OverlayObject : public ::sdr::animation::Event
+ class SVX_DLLPUBLIC OverlayObject : private ::boost::noncopyable, public ::sdr::animation::Event
{
- // Manager is allowed access to private Members, especially
- // pNext and pPrevious are used form the manager to handle the
- // OverlayObject.
- friend class OverlayManager;
+ private:
+ // Manager is allowed access to private Member mpOverlayManager
+ friend class OverlayManager;
// pointer to OverlayManager, if object is added. Changed by
// OverlayManager, do not chnge Yourself.
- OverlayManager* mpOverlayManager;
+ OverlayManager* mpOverlayManager;
- // Chaining of IAO's, used by OverlayManager. These will be
- // used form the OverlayManager, so do not change them Yourself.
- OverlayObject* mpNext;
- OverlayObject* mpPrevious;
+ // Primitive2DSequence of the OverlayObject
+ drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence;
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.
+ const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ void setPrimitive2DSequence(const drawinglayer::primitive2d::Primitive2DSequence& rNew) { maPrimitive2DSequence = rNew; }
+
+ // the creation method for Primitive2DSequence. 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::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
// region in logical coordinates
- basegfx::B2DRange maBaseRange;
+ basegfx::B2DRange maBaseRange;
// base color of this OverlayObject
- Color maBaseColor;
+ Color maBaseColor;
// bitfield
// Flag for visibility
- unsigned mbIsVisible : 1;
-
- // Flag for validity
- unsigned mbIsChanged : 1;
+ unsigned mbIsVisible : 1;
// Flag to control hittability
- unsigned mbIsHittable : 1;
+ unsigned mbIsHittable : 1;
// Flag to hold info if this objects supports animation. Default is
- // sal_False. If sal_True, the Trigger() method should be overloaded
+ // false. If true, the Trigger() method should be overloaded
// to implement the animation effect and to re-initiate the event.
- unsigned mbAllowsAnimation : 1;
+ unsigned mbAllowsAnimation : 1;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice) = 0;
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice) = 0;
+ // Flag tocontrol if this OverlayObject allows AntiAliased visualisation.
+ // Default is true, but e.g. for selection visualisation in SC and SW,
+ // it is switched to false
+ unsigned 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();
+ virtual void objectChange();
- // support method to draw striped geometries
- void ImpDrawRangeStriped(OutputDevice& rOutputDevice, const basegfx::B2DRange& rRange);
- void ImpDrawLineStriped(OutputDevice& rOutputDevice, double x1, double y1, double x2, double y2);
- void ImpDrawLineStriped(OutputDevice& rOutputDevice, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd);
- void ImpDrawPolygonStriped(OutputDevice& rOutputDevice, const basegfx::B2DPolygon& rPolygon);
+ // write access to AntiAliase flag. This is protected since
+ // only implementations are allowed to change this, preferrably in their
+ // constructor
+ void allowAntiAliase(bool bNew);
public:
OverlayObject(Color aBaseColor);
@@ -127,19 +132,21 @@ namespace sdr
// get OverlayManager
OverlayManager* getOverlayManager() const { return mpOverlayManager; }
- // Hittest with logical coordinates. Default tests against maBaseRange.
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
+ // the access method for Primitive2DSequence. Will use createPrimitive2DSequence and
+ // setPrimitive2DSequence if needed. Overloading may be used to allow disposal of last
+ // created primitives to react on changed circumstances and to re-create primitives
+ virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const;
// access to visibility state
- sal_Bool isVisible() const { return mbIsVisible; }
- void setVisible(sal_Bool bNew);
-
- // read access to changed flag
- sal_Bool isChanged() const { return mbIsChanged; }
+ bool isVisible() const { return mbIsVisible; }
+ void setVisible(bool bNew);
// access to hittable flag
- sal_Bool isHittable() const { return mbIsHittable; }
- void setHittable(sal_Bool bNew);
+ 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.
@@ -154,16 +161,7 @@ namespace sdr
virtual void Trigger(sal_uInt32 nTime);
// acces to AllowsAnimation flag
- sal_Bool allowsAnimation() const { return mbAllowsAnimation; }
-
- // transform object coordinates.
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix) = 0;
-
- // Zoom has changed. If the objects logical size
- // depends on the MapMode of the used OutputDevice, use this call
- // to invalidate the range in logical coordinates. Default is no
- // change.
- virtual void zoomHasChanged();
+ bool allowsAnimation() const { return mbAllowsAnimation; }
// stripe definition has changed. The OverlayManager does have
// support data to draw graphics in two colors striped. This
@@ -197,10 +195,6 @@ namespace sdr
// access to basePosition
const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
void setBasePosition(const basegfx::B2DPoint& rNew);
-
- // transform object coordinates. Transforms maBasePosition
- // and invalidates on change
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx b/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx
index 91add8a39758..2f40c9385674 100644
--- a/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx
@@ -42,7 +42,7 @@ namespace sdr
{
namespace overlay
{
- enum CellOverlayType { CELL_OVERLAY_INVERT, CELL_OVERLAY_HATCH, CELL_OVERLAY_TRANSPARENT, CELL_OVERLAY_LIGHT_TRANSPARENT };
+ enum CellOverlayType { CELL_OVERLAY_INVERT, CELL_OVERLAY_TRANSPARENT };
// OverlayObjectCell - used for cell cursor, selection and AutoFill handle
@@ -55,14 +55,12 @@ namespace sdr
CellOverlayType mePaintType;
RangeVector maRectangles;
- virtual void drawGeometry(OutputDevice& rOutputDevice);
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayObjectCell( CellOverlayType eType, const Color& rColor, const RangeVector& rRects);
virtual ~OverlayObjectCell();
-
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
};
} // end of namespace overlay
diff --git a/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx b/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
index 8e03cc620dd0..3f665f203e5d 100644
--- a/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
@@ -70,16 +70,13 @@ namespace sdr
OverlayObject& getOverlayObject(sal_uInt32 nIndex) const { return *(maVector[nIndex]); }
// Hittest with logical coordinates
- sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
+ bool isHitLogic(const basegfx::B2DPoint& rLogicPosition, double fLogicTolerance = 0.0) const;
// Hittest with pixel coordinates and pixel tolerance
- sal_Bool isHitPixel(const Point& rPos, sal_uInt32 nTol = DEFAULT_VALUE_FOR_HITTEST_PIXEL) const;
+ bool isHitPixel(const Point& rDiscretePosition, sal_uInt32 fDiscreteTolerance = DEFAULT_VALUE_FOR_HITTEST_PIXEL) const;
// calculate BaseRange of all included OverlayObjects and return
basegfx::B2DRange getBaseRange() const;
-
- // transform all members coordinates
- void transform(const basegfx::B2DHomMatrix& rMatrix);
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx b/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx
index 276ad2b6bc5b..d7dc72df4d59 100644
--- a/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx
@@ -46,11 +46,8 @@ namespace sdr
// geometry
basegfx::B2DPolyPolygon maPolyPolygon;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayPolyPolygonStriped(const basegfx::B2DPolyPolygon& rPolyPolygon);
@@ -60,33 +57,8 @@ namespace sdr
basegfx::B2DPolyPolygon getPolyPolygon() const { return maPolyPolygon; }
void setPolyPolygon(const basegfx::B2DPolyPolygon& rNew);
- // Hittest with logical coordinates
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
-
- // transform object coordinates. Needs to transform maSecondPosition
- // and maThirdPosition.
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayPolyPolygon : public OverlayPolyPolygonStriped
- {
- protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- public:
- OverlayPolyPolygon(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- Color aPolygonColor = Color(COL_BLACK));
- virtual ~OverlayPolyPolygon();
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx b/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
index 1ca1a0a7d18a..e94cfefcf327 100644
--- a/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx
@@ -41,20 +41,14 @@ namespace sdr
{
namespace overlay
{
- class OverlayPrimitive2DSequenceObject : public OverlayObjectWithBasePosition
+ class SVX_DLLPUBLIC OverlayPrimitive2DSequenceObject : public OverlayObjectWithBasePosition
{
protected:
// the sequence of primitives to show
const drawinglayer::primitive2d::Primitive2DSequence maSequence;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
-
- // Hittest with logical coordinates. Default tests against maBaseRange.
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
// internal helper to create a drawinglayer::geometry::ViewInformation2D
diff --git a/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx b/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx
index 81233e0d0252..3120f02d950b 100644
--- a/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx
+++ b/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx
@@ -52,18 +52,15 @@ namespace sdr
// Flag to switch on/off the bounds itself
unsigned mbShowBounds : 1;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
OverlayRollingRectangleStriped(
const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rSecondPos,
- sal_Bool bExtendedLines = sal_False,
- sal_Bool bShowBounds = sal_True);
+ bool bExtendedLines = false,
+ bool bShowBounds = true);
virtual ~OverlayRollingRectangleStriped();
// change second position
@@ -71,42 +68,15 @@ namespace sdr
void setSecondPosition(const basegfx::B2DPoint& rNew);
// change extended lines
- sal_Bool getExtendedLines() const { return mbExtendedLines; }
- void setExtendedLines(sal_Bool bNew);
+ bool getExtendedLines() const { return mbExtendedLines; }
+ void setExtendedLines(bool bNew);
// change show bounds
- sal_Bool getShowBounds() const { return mbShowBounds; }
- void setShowBounds(sal_Bool bNew);
-
- // Hittest with logical coordinates
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
-
- // transform object coordinates. Needs to transform maSecondPosition.
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayRollingRectangle : public OverlayRollingRectangleStriped
- {
- protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
+ bool getShowBounds() const { return mbShowBounds; }
+ void setShowBounds(bool bNew);
- public:
- OverlayRollingRectangle(
- const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- Color aLineColor = Color(COL_BLACK),
- sal_Bool bExtendedLines = sal_False,
- sal_Bool bShowBounds = sal_True);
- virtual ~OverlayRollingRectangle();
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/overlay/overlayselection.hxx b/svx/inc/svx/sdr/overlay/overlayselection.hxx
new file mode 100644
index 000000000000..17f32ee419e9
--- /dev/null
+++ b/svx/inc/svx/sdr/overlay/overlayselection.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: overlayline.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SDR_OVERLAY_OVERLAYSELECTION_HXX
+#define _SDR_OVERLAY_OVERLAYSELECTION_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <vcl/region.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace overlay
+ {
+ // overlay type definition
+ enum OverlayType
+ {
+ OVERLAY_INVERT,
+ OVERLAY_SOLID,
+ OVERLAY_TRANSPARENT
+ };
+
+ class SVX_DLLPUBLIC OverlaySelection : public OverlayObject
+ {
+ protected:
+ // 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 Primitive2DSequence. This ensures that these values are up-to-date
+ // and are usable when creating primitives
+ OverlayType maLastOverlayType;
+ sal_uInt16 mnLastTransparence;
+
+ // bitfield
+ unsigned mbBorder : 1;
+
+ // geometry creation for OverlayObject, can use local *Last* values
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ public:
+ OverlaySelection(
+ OverlayType eType,
+ const Color& rColor,
+ const std::vector< basegfx::B2DRange >& rRanges,
+ bool bBorder);
+ virtual ~OverlaySelection();
+
+ // data read access
+ OverlayType getOverlayType() const { return meOverlayType; }
+ const std::vector< basegfx::B2DRange >& getRanges() const { return maRanges; }
+ bool getBorder() const { return mbBorder; }
+
+ // overloaded to check conditions for last createOverlayObjectPrimitive2DSequence
+ virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const;
+
+ // data write access
+ void setRanges(const std::vector< basegfx::B2DRange >& rNew);
+ };
+ } // end of namespace overlay
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_OVERLAY_OVERLAYSELECTION_HXX
+
+// eof
diff --git a/svx/inc/svx/sdr/overlay/overlaytools.hxx b/svx/inc/svx/sdr/overlay/overlaytools.hxx
new file mode 100644
index 000000000000..d9a1b34dd8f6
--- /dev/null
+++ b/svx/inc/svx/sdr/overlay/overlaytools.hxx
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: overlayobject.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SDR_OVERLAY_OVERLAYTOOLS_HXX
+#define _SDR_OVERLAY_OVERLAYTOOLS_HXX
+
+#include <drawinglayer/primitive2d/primitivetools2d.hxx>
+#include <vcl/bitmapex.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// Overlay helper class which holds a BotmapEx which is to be visualized
+// at the given logic position with the Bitmap's pixel size, unscaled and
+// unrotated (like a marker). The discrete pixel on the bitmap assocciated
+// with the target position is given in discrete X,Y coordinates
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ class OverlayBitmapExPrimitive : public DiscreteMetricDependentPrimitive2D
+ {
+ private:
+ // The BitmapEx to use, PixelSize is used
+ BitmapEx maBitmapEx;
+
+ // The logic position
+ basegfx::B2DPoint maBasePosition;
+
+ // The pixel inside the BitmapEx which is assocciated with
+ // the target position (offset in the bitmap)
+ sal_uInt16 mnCenterX;
+ sal_uInt16 mnCenterY;
+
+ protected:
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ OverlayBitmapExPrimitive(
+ const BitmapEx& rBitmapEx,
+ const basegfx::B2DPoint& rBasePosition,
+ sal_uInt16 nCenterX,
+ sal_uInt16 nCenterY);
+
+ // data access
+ const BitmapEx& getBitmapEx() const { return maBitmapEx; }
+ const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
+ sal_uInt16 getCenterX() const { return mnCenterX; }
+ sal_uInt16 getCenterY() const { return mnCenterY; }
+
+ // compare operator
+ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// Overlay helper class for a crosshair
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ class OverlayCrosshairPrimitive : public ViewportDependentPrimitive2D
+ {
+ private:
+ // The logic position
+ basegfx::B2DPoint maBasePosition;
+
+ // The stripe colors and legth
+ basegfx::BColor maRGBColorA;
+ basegfx::BColor maRGBColorB;
+ double mfDiscreteDashLength;
+
+ protected:
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ OverlayCrosshairPrimitive(
+ const basegfx::B2DPoint& rBasePosition,
+ const basegfx::BColor& rRGBColorA,
+ const basegfx::BColor& rRGBColorB,
+ double fDiscreteDashLength);
+
+ // data access
+ const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
+ const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
+ const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
+ double getDiscreteDashLength() const { return mfDiscreteDashLength; }
+
+ // compare operator
+ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// Overlay helper class for a hatch rectangle as used e.g. for text object
+// selection hilighting
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ class OverlayHatchRectanglePrimitive : public DiscreteMetricDependentPrimitive2D
+ {
+ private:
+ // the logic rectangle definition
+ basegfx::B2DRange maObjectRange;
+
+ // the hatch definition
+ double mfDiscreteHatchDistance;
+ double mfHatchRotation;
+ basegfx::BColor maHatchColor;
+
+ // the dscrete grow and shrink of the box
+ double mfDiscreteGrow;
+ double mfDiscreteShrink;
+
+ // the rotation of the primitive itself
+ double mfRotation;
+
+ protected:
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ OverlayHatchRectanglePrimitive(
+ const basegfx::B2DRange& rObjectRange,
+ double fDiscreteHatchDistance,
+ double fHatchRotation,
+ const basegfx::BColor& rHatchColor,
+ double fDiscreteGrow,
+ double fDiscreteShrink,
+ double fRotation);
+
+ // data access
+ const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
+ double getDiscreteHatchDistance() const { return mfDiscreteHatchDistance; }
+ double getHatchRotation() const { return mfHatchRotation; }
+ const basegfx::BColor& getHatchColor() const { return maHatchColor; }
+ double getDiscreteGrow() const { return mfDiscreteGrow; }
+ double getDiscreteShrink() const { return mfDiscreteShrink; }
+ double getRotation() const { return mfRotation; }
+
+ // compare operator
+ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// Overlay helper class for a striped helpline
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ enum HelplineStyle
+ {
+ HELPLINESTYLE_POINT,
+ HELPLINESTYLE_VERTICAL,
+ HELPLINESTYLE_HORIZONTAL
+ };
+
+ class OverlayHelplineStripedPrimitive : public ViewportDependentPrimitive2D
+ {
+ private:
+ // The logic position
+ basegfx::B2DPoint maBasePosition;
+
+ // the style
+ HelplineStyle meStyle;
+
+ // The stripe colors and legth
+ basegfx::BColor maRGBColorA;
+ basegfx::BColor maRGBColorB;
+ double mfDiscreteDashLength;
+
+ protected:
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ OverlayHelplineStripedPrimitive(
+ const basegfx::B2DPoint& rBasePosition,
+ HelplineStyle eStyle,
+ const basegfx::BColor& rRGBColorA,
+ const basegfx::BColor& rRGBColorB,
+ double fDiscreteDashLength);
+
+ // data access
+ const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; }
+ HelplineStyle getStyle() const { return meStyle; }
+ const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
+ const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
+ double getDiscreteDashLength() const { return mfDiscreteDashLength; }
+
+ // compare operator
+ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// Overlay helper class for rolling rectangle helplines. This primitive is
+// only for the extended lines to the ends of the view
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ class OverlayRollingRectanglePrimitive : public ViewportDependentPrimitive2D
+ {
+ private:
+ // The logic range
+ basegfx::B2DRange maRollingRectangle;
+
+ // The stripe colors and legth
+ basegfx::BColor maRGBColorA;
+ basegfx::BColor maRGBColorB;
+ double mfDiscreteDashLength;
+
+ protected:
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ OverlayRollingRectanglePrimitive(
+ const basegfx::B2DRange& aRollingRectangle,
+ const basegfx::BColor& rRGBColorA,
+ const basegfx::BColor& rRGBColorB,
+ double fDiscreteDashLength);
+
+ // data access
+ const basegfx::B2DRange& getRollingRectangle() const { return maRollingRectangle; }
+ const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
+ const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
+ double getDiscreteDashLength() const { return mfDiscreteDashLength; }
+
+ // compare operator
+ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_OVERLAY_OVERLAYTOOLS_HXX
+
+// eof
diff --git a/svx/inc/svx/sdr/overlay/overlaytriangle.hxx b/svx/inc/svx/sdr/overlay/overlaytriangle.hxx
index b1d7a16ac72e..97b391047ba7 100644
--- a/svx/inc/svx/sdr/overlay/overlaytriangle.hxx
+++ b/svx/inc/svx/sdr/overlay/overlaytriangle.hxx
@@ -39,25 +39,23 @@ namespace sdr
{
namespace overlay
{
- class OverlayTriangleStriped : public OverlayObjectWithBasePosition
+ class OverlayTriangle : public OverlayObjectWithBasePosition
{
protected:
// second and third position in pixel
basegfx::B2DPoint maSecondPosition;
basegfx::B2DPoint maThirdPosition;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
- OverlayTriangleStriped(
+ OverlayTriangle(
const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos);
- virtual ~OverlayTriangleStriped();
+ const basegfx::B2DPoint& rThirdPos,
+ Color aTriangleColor);
+ virtual ~OverlayTriangle();
// change second position
const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
@@ -66,36 +64,6 @@ namespace sdr
// change third position
const basegfx::B2DPoint& getThirdPosition() const { return maThirdPosition; }
void setThirdPosition(const basegfx::B2DPoint& rNew);
-
- // Hittest with logical coordinates
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
-
- // transform object coordinates. Needs to transform maSecondPosition
- // and maThirdPosition.
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
- };
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- class OverlayTriangle : public OverlayTriangleStriped
- {
- protected:
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- public:
- OverlayTriangle(
- const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos,
- Color aTriangleColor = Color(COL_BLACK));
- virtual ~OverlayTriangle();
};
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx b/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx
index 85368fc8db86..aa3785995b25 100644
--- a/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx
@@ -36,6 +36,8 @@
#include <cppuhelper/compbase1.hxx>
#include <comphelper/broadcasthelper.hxx>
+#include <svx/svxdllapi.h>
+
//////////////////////////////////////////////////////////////////////////////
// UNO API helper methods
@@ -43,7 +45,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
+ SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -73,8 +75,8 @@ namespace drawinglayer
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xDrawPage, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException);
// UNO API helpers
- static rtl::OUString getImplementationName_Static();
- static com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_Static();
+ SVX_DLLPUBLIC static rtl::OUString getImplementationName_Static();
+ SVX_DLLPUBLIC static com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_Static();
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx b/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
index a9b3767c3c32..e4a8fa01902f 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
@@ -71,7 +71,16 @@ namespace drawinglayer
attribute::SdrLineStartEndAttribute* createNewSdrLineStartEndAttribute(const SfxItemSet& rSet, double fWidth);
attribute::SdrShadowAttribute* createNewSdrShadowAttribute(const SfxItemSet& rSet);
attribute::SdrFillAttribute* createNewSdrFillAttribute(const SfxItemSet& rSet);
- attribute::SdrTextAttribute* createNewSdrTextAttribute(const SfxItemSet& rSet, const SdrText& rText);
+
+ // #i101508# Support handing over given text-to-border distances
+ attribute::SdrTextAttribute* createNewSdrTextAttribute(
+ const SfxItemSet& rSet,
+ const SdrText& rText,
+ const sal_Int32* pLeft = 0,
+ const sal_Int32* pUpper = 0,
+ const sal_Int32* pRight = 0,
+ const sal_Int32* pLower = 0);
+
attribute::FillGradientAttribute* createNewTransparenceGradientAttribute(const SfxItemSet& rSet);
attribute::SdrFillBitmapAttribute* createNewSdrFillBitmapAttribute(const SfxItemSet& rSet);
attribute::SdrShadowTextAttribute* createNewSdrShadowTextAttribute(
@@ -83,7 +92,15 @@ namespace drawinglayer
attribute::SdrLineFillShadowAttribute* createNewSdrLineFillShadowAttribute(const SfxItemSet& rSet, bool bSuppressFill);
attribute::SdrSceneAttribute* createNewSdrSceneAttribute(const SfxItemSet& rSet);
attribute::SdrLightingAttribute* createNewSdrLightingAttribute(const SfxItemSet& rSet);
- attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute(const SfxItemSet& rSet, const SdrText* pSdrText);
+
+ // #i101508# Support handing over given text-to-border distances
+ attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute(
+ const SfxItemSet& rSet,
+ const SdrText* pSdrText,
+ const sal_Int32* pLeft = 0,
+ const sal_Int32* pUpper = 0,
+ const sal_Int32* pRight = 0,
+ const sal_Int32* pLower = 0);
// helpers
void calculateRelativeCornerRadius(sal_Int32 nRadius, const ::basegfx::B2DRange& rObjectRange, double& rfCornerRadiusX, double& rfCornerRadiusY);
diff --git a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx
index b5b8867b1ae5..01bb7794e9f3 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx
@@ -76,7 +76,7 @@ namespace drawinglayer
const ::basegfx::B2DPolygon& getTail() const { return maTail; }
double getCornerRadiusX() const { return mfCornerRadiusX; }
double getCornerRadiusY() const { return mfCornerRadiusY; }
- bool hasCornerRadius() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); }
+ bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); }
// provide unique ID
DeclPrimitrive2DIDBlock()
diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
index a29ecb890df6..4eddc4386a0d 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
@@ -56,6 +56,8 @@ namespace drawinglayer
// defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
// that the text needs to be block formatted
unsigned mbWordWrap : 1;
+ // #SJ# Allow text clipping against TextBox in special cases (used for SC)
+ unsigned mbForceTextClipToTextRange : 1;
protected:
// local decomposition.
@@ -66,13 +68,15 @@ namespace drawinglayer
const attribute::SdrShadowTextAttribute& rSdrSTAttribute,
const Primitive2DSequence& rSubPrimitives,
const basegfx::B2DHomMatrix& rTextBox,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bForceTextClipToTextRange);
// data access
const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; }
const Primitive2DSequence& getSubPrimitives() const { return maSubPrimitives; }
const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; }
bool getWordWrap() const { return mbWordWrap; }
+ bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
index 2f4702e62b07..0f46c2809597 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -75,10 +75,11 @@ namespace drawinglayer
const attribute::SdrTextAttribute& rText,
const attribute::SdrLineAttribute* pStroke,
bool bCellText,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bClipOnBounds);
- Primitive2DReference createShadowPrimitive(
- const Primitive2DSequence& rSource,
+ Primitive2DSequence createEmbeddedShadowPrimitive(
+ const Primitive2DSequence& rContent,
const attribute::SdrShadowAttribute& rShadow);
} // end of namespace primitive2d
diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
index 7ee46630bf5b..1e68a61432a0 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
@@ -63,8 +63,8 @@ namespace drawinglayer
{
private:
attribute::SdrLineShadowTextAttribute maSdrLSTAttribute;
- ::basegfx::B2DPoint maStart;
- ::basegfx::B2DPoint maEnd;
+ basegfx::B2DPoint maStart;
+ basegfx::B2DPoint maEnd;
MeasureTextPosition meHorizontal;
MeasureTextPosition meVertical;
double mfDistance;
@@ -80,9 +80,9 @@ namespace drawinglayer
// internal decomposition helper
Primitive2DReference impCreatePart(
- const ::basegfx::B2DHomMatrix& rObjectMatrix,
- const ::basegfx::B2DPoint& rStart,
- const ::basegfx::B2DPoint& rEnd,
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const basegfx::B2DPoint& rStart,
+ const basegfx::B2DPoint& rEnd,
bool bLeftActive,
bool bRightActive) const;
@@ -93,7 +93,8 @@ namespace drawinglayer
public:
SdrMeasurePrimitive2D(
const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute,
- const ::basegfx::B2DPoint& rStart, const ::basegfx::B2DPoint& rEnd,
+ const basegfx::B2DPoint& rStart,
+ const basegfx::B2DPoint& rEnd,
MeasureTextPosition eHorizontal,
MeasureTextPosition eVertical,
double fDistance,
@@ -107,8 +108,8 @@ namespace drawinglayer
// data access
const attribute::SdrLineShadowTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; }
- const ::basegfx::B2DPoint& getStart() const { return maStart; }
- const ::basegfx::B2DPoint& getEnd() const { return maEnd; }
+ const basegfx::B2DPoint& getStart() const { return maStart; }
+ const basegfx::B2DPoint& getEnd() const { return maEnd; }
MeasureTextPosition getHorizontal() const { return meHorizontal; }
MeasureTextPosition getVertical() const { return meVertical; }
double getDistance() const { return mfDistance; }
diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx
new file mode 100644
index 000000000000..70e28d599a44
--- /dev/null
+++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrcaptionprimitive2d.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
+#define INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
+
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/svdobj.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefinitions
+
+class SdrOle2Obj;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ class SdrOleContentPrimitive2D : public BasePrimitive2D
+ {
+ private:
+ SdrObjectWeakRef mpSdrOle2Obj;
+ basegfx::B2DHomMatrix maObjectTransform;
+
+ // bitfield
+ unsigned mbHighContrast : 1;
+
+ protected:
+ // local decomposition.
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const;
+
+ public:
+ SdrOleContentPrimitive2D(
+ const SdrOle2Obj& rSdrOle2Obj,
+ const basegfx::B2DHomMatrix& rObjectTransform,
+ bool bHighContrast);
+
+ // compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ // The default implementation will use getDecomposition results to create the range
+ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+ // data access
+ const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; }
+ bool getHighContrast() const { return mbHighContrast; }
+
+ // provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
+
+// eof
diff --git a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx
index 29d905c697ec..97b12b72d4a5 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx
@@ -49,9 +49,9 @@ namespace drawinglayer
class SdrPathPrimitive2D : public BasePrimitive2D
{
private:
- ::basegfx::B2DHomMatrix maTransform;
+ basegfx::B2DHomMatrix maTransform;
attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute;
- ::basegfx::B2DPolyPolygon maUnitPolyPolygon;
+ basegfx::B2DPolyPolygon maUnitPolyPolygon;
protected:
// local decomposition.
@@ -59,14 +59,14 @@ namespace drawinglayer
public:
SdrPathPrimitive2D(
- const ::basegfx::B2DHomMatrix& rTransform,
+ const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
- const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon);
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon);
// data access
- const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
+ const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; }
- const ::basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; }
+ const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx
index 6a3983835ef9..650cc1a882c5 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx
@@ -49,28 +49,35 @@ namespace drawinglayer
class SdrRectanglePrimitive2D : public BasePrimitive2D
{
private:
- ::basegfx::B2DHomMatrix maTransform;
+ basegfx::B2DHomMatrix maTransform;
attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute;
double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width
double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height
+ // bitfield
+ // flag which decides if this is a text frame. If Yes, the HitArea
+ // should be the filled geometry
+ bool mbTextFrame : 1;
+
protected:
// local decomposition.
virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const;
public:
SdrRectanglePrimitive2D(
- const ::basegfx::B2DHomMatrix& rTransform,
+ const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
- double fCornerRadiusX = 0.0,
- double fCornerRadiusY = 0.0);
+ double fCornerRadiusX,
+ double fCornerRadiusY,
+ bool bTextFrame);
// data access
- const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
+ const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; }
double getCornerRadiusX() const { return mfCornerRadiusX; }
double getCornerRadiusY() const { return mfCornerRadiusY; }
- bool hasCornerRadius() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); }
+ bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); }
+ bool getTextFrame() const { return mbTextFrame; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
index 8579b87e9470..059849531566 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -36,8 +36,11 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
-#include <boost/shared_ptr.hpp>
#include <svx/outlobj.hxx>
+#include <tools/color.hxx>
+#include <svx/sdr/attribute/sdrformtextattribute.hxx>
+#include <tools/weakbase.hxx>
+#include <svx/sdtaitm.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
@@ -54,11 +57,11 @@ namespace drawinglayer
private:
// The text model data; this sould later just be the OutlinerParaObject or
// something equal
- const SdrText& mrSdrText; // text model data
+ ::tools::WeakReference< SdrText > mrSdrText;
// #i97628#
- // The text content; now as OutlinerParaObject* and in exclusive, local, cloned
- // form as needed in a primitive
+ // The text content; now as local OutlinerParaObject copy (internally RefCounted and
+ // COW) and in exclusive, local form as needed in a primitive
const OutlinerParaObject maOutlinerParaObject;
// remeber last VisualizingPage for which a decomposition was made. If the new target
@@ -67,29 +70,35 @@ namespace drawinglayer
// field renderings in SubGeometry and MasterPage mnode
com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > mxLastVisualizingPage;
- // bitfield
- // remember if last decomposition was with or without spell checker. In this special
- // case the get2DDecomposition implementation has to take care of this aspect. This is
- // needed since different views do different text decompositons regarding spell checking.
- unsigned mbLastSpellCheck : 1;
+ // remember last PageNumber for which a decomposition was made. This is only used
+ // when mbContainsPageField is true, else it is 0
+ sal_Int16 mnLastPageNumber;
+
+ // remember last PageCount for which a decomposition was made. This is only used
+ // when mbContainsPageCountField is true, else it is 0
+ sal_Int16 mnLastPageCount;
+
+ // #i101443# remember last TextBackgroundColor to decide if a new decomposition is
+ // needed because of background color change
+ Color maLastTextBackgroundColor;
+ // bitfield
// is there a PageNumber, Header, Footer or DateTimeField used? Evaluated at construction
unsigned mbContainsPageField : 1;
+ unsigned mbContainsPageCountField : 1;
+ unsigned mbContainsOtherFields : 1;
protected:
// support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments
Primitive2DSequence encapsulateWithTextHierarchyBlockPrimitive2D(const Primitive2DSequence& rCandidate) const;
- bool getLastSpellCheck() const { return (bool)mbLastSpellCheck; }
- void setLastSpellCheck(bool bNew) { mbLastSpellCheck = bNew; }
-
public:
SdrTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObjectPtr);
// get data
- const SdrText& getSdrText() const { return mrSdrText; }
+ const SdrText* getSdrText() const { return mrSdrText.get(); }
const OutlinerParaObject& getOutlinerParaObject() const { return maOutlinerParaObject; }
// compare operator
@@ -100,7 +109,7 @@ namespace drawinglayer
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
// transformed clone operator
- virtual SdrTextPrimitive2D* createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const = 0;
+ virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const = 0;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
@@ -114,8 +123,11 @@ namespace drawinglayer
class SdrContourTextPrimitive2D : public SdrTextPrimitive2D
{
private:
- ::basegfx::B2DPolyPolygon maUnitPolyPolygon; // unit contour polygon (scaled to [0.0 .. 1.0])
- ::basegfx::B2DHomMatrix maObjectTransform; // complete contour polygon transform (scale, rotate, shear, translate)
+ // unit contour polygon (scaled to [0.0 .. 1.0])
+ basegfx::B2DPolyPolygon maUnitPolyPolygon;
+
+ // complete contour polygon transform (scale, rotate, shear, translate)
+ basegfx::B2DHomMatrix maObjectTransform;
protected:
// local decomposition.
@@ -123,20 +135,20 @@ namespace drawinglayer
public:
SdrContourTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObjectPtr,
- const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon,
- const ::basegfx::B2DHomMatrix& rObjectTransform);
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform);
// get data
- const ::basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; }
- const ::basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; }
+ const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; }
+ const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
// transformed clone operator
- virtual SdrTextPrimitive2D* createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const;
+ virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const;
// provide unique ID
DeclPrimitrive2DIDBlock()
@@ -153,7 +165,11 @@ namespace drawinglayer
class SdrPathTextPrimitive2D : public SdrTextPrimitive2D
{
private:
- ::basegfx::B2DPolyPolygon maPathPolyPolygon; // the path to use. Each paragraph will use one Polygon.
+ // the path to use. Each paragraph will use one Polygon.
+ basegfx::B2DPolyPolygon maPathPolyPolygon;
+
+ // the Fontwork parameters
+ attribute::SdrFormTextAttribute maSdrFormTextAttribute;
protected:
// local decomposition.
@@ -161,18 +177,20 @@ namespace drawinglayer
public:
SdrPathTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObjectPtr,
- const ::basegfx::B2DPolyPolygon& rPathPolyPolygon);
+ const basegfx::B2DPolyPolygon& rPathPolyPolygon,
+ const attribute::SdrFormTextAttribute& rSdrFormTextAttribute);
// get data
- const ::basegfx::B2DPolyPolygon& getPathPolyPolygon() const { return maPathPolyPolygon; }
+ const basegfx::B2DPolyPolygon& getPathPolyPolygon() const { return maPathPolyPolygon; }
+ const attribute::SdrFormTextAttribute& getSdrFormTextAttribute() const { return maSdrFormTextAttribute; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
// transformed clone operator
- virtual SdrTextPrimitive2D* createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const;
+ virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const;
// provide unique ID
DeclPrimitrive2DIDBlock()
@@ -189,12 +207,19 @@ namespace drawinglayer
class SdrBlockTextPrimitive2D : public SdrTextPrimitive2D
{
private:
- ::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range
+ // text range transformation from unit range ([0.0 .. 1.0]) to text range
+ basegfx::B2DHomMatrix maTextRangeTransform;
+
+ // text alignments
+ SdrTextHorzAdjust maSdrTextHorzAdjust;
+ SdrTextVertAdjust maSdrTextVertAdjust;
// bitfield
+ unsigned mbFixedCellHeight : 1;
unsigned mbUnlimitedPage : 1; // force layout with no text break
unsigned mbCellText : 1; // this is a cell text as block text
unsigned mbWordWrap : 1; // for CustomShapes text layout
+ unsigned mbClipOnBounds : 1; // for CustomShapes text layout
protected:
// local decomposition.
@@ -202,24 +227,32 @@ namespace drawinglayer
public:
SdrBlockTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObjectPtr,
- const ::basegfx::B2DHomMatrix& rTextRangeTransform,
+ const basegfx::B2DHomMatrix& rTextRangeTransform,
+ SdrTextHorzAdjust aSdrTextHorzAdjust,
+ SdrTextVertAdjust aSdrTextVertAdjust,
+ bool bFixedCellHeight,
bool bUnlimitedPage,
bool bCellText,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bClipOnBounds);
// get data
const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
+ SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; }
+ SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; }
+ bool isFixedCellHeight() const { return mbFixedCellHeight; }
bool getUnlimitedPage() const { return mbUnlimitedPage; }
bool getCellText() const { return mbCellText; }
bool getWordWrap() const { return mbWordWrap; }
+ bool getClipOnBounds() const { return mbClipOnBounds; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
// transformed clone operator
- virtual SdrTextPrimitive2D* createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const;
+ virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const;
// provide unique ID
DeclPrimitrive2DIDBlock()
@@ -236,7 +269,11 @@ namespace drawinglayer
class SdrStretchTextPrimitive2D : public SdrTextPrimitive2D
{
private:
- ::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range
+ // text range transformation from unit range ([0.0 .. 1.0]) to text range
+ basegfx::B2DHomMatrix maTextRangeTransform;
+
+ // bitfield
+ unsigned mbFixedCellHeight : 1;
protected:
// local decomposition.
@@ -244,18 +281,20 @@ namespace drawinglayer
public:
SdrStretchTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObjectPtr,
- const ::basegfx::B2DHomMatrix& rTextRangeTransform);
+ const basegfx::B2DHomMatrix& rTextRangeTransform,
+ bool bFixedCellHeight);
// get data
- const ::basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
+ const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
+ bool isFixedCellHeight() const { return mbFixedCellHeight; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
// transformed clone operator
- virtual SdrTextPrimitive2D* createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const;
+ virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const;
// provide unique ID
DeclPrimitrive2DIDBlock()
diff --git a/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx b/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
index d7dbf9f4ad9c..d1b857f510c3 100644
--- a/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
@@ -52,6 +52,13 @@
#define PRIMITIVE2D_ID_SDRSTRETCHTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 13)
#define PRIMITIVE2D_ID_SDRCELLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 14)
#define PRIMITIVE2D_ID_SDRBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 15)
+#define PRIMITIVE2D_ID_OVERLAYBITMAPEXPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 16)
+#define PRIMITIVE2D_ID_OVERLAYCROSSHAIRPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 17)
+#define PRIMITIVE2D_ID_OVERLAYHATCHRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 18)
+#define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 19)
+#define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 20)
+#define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 21)
+#define PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 22)
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/inc/svx/sdr/properties/properties.hxx b/svx/inc/svx/sdr/properties/properties.hxx
index d8b374a18042..2c4512236cb7 100644
--- a/svx/inc/svx/sdr/properties/properties.hxx
+++ b/svx/inc/svx/sdr/properties/properties.hxx
@@ -184,6 +184,11 @@ namespace sdr
// 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;
};
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/inc/svx/sdr/properties/textproperties.hxx b/svx/inc/svx/sdr/properties/textproperties.hxx
index 424b76ba7610..77a19818f55a 100644
--- a/svx/inc/svx/sdr/properties/textproperties.hxx
+++ b/svx/inc/svx/sdr/properties/textproperties.hxx
@@ -42,6 +42,10 @@ namespace sdr
{
class SVX_DLLPUBLIC TextProperties : public AttributeProperties
{
+ private:
+ // #i101556# versioning support
+ sal_uInt32 maVersion;
+
protected:
// create a new itemset
virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool);
@@ -82,6 +86,9 @@ namespace sdr
// Set single item at the local ItemSet. *Does not use* AllowItemChange(),
// ItemChange(), PostItemChange() and ItemSetChanged() calls.
void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
+
+ // #i101556# versioning support
+ virtual sal_uInt32 getVersion() const;
};
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/inc/svx/sdrhittesthelper.hxx b/svx/inc/svx/sdrhittesthelper.hxx
new file mode 100644
index 000000000000..037f7fa813a5
--- /dev/null
+++ b/svx/inc/svx/sdrhittesthelper.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svdetc.hxx,v $
+ * $Revision: 1.4.152.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SDRHITTESTHELPER_HXX
+#define _SDRHITTESTHELPER_HXX
+
+#include "svx/svxdllapi.h"
+#include <tools/string.hxx>
+#include <tools/gen.hxx>
+
+/////////////////////////////////////////////////////////////////////
+// #i101872# new Object HitTest as View-tooling
+
+class SdrObject;
+class SdrPageView;
+class SetOfByte;
+class SdrObjList;
+namespace sdr { namespace contact { class ViewObjectContact; }}
+namespace basegfx { class B2DPoint; }
+
+/////////////////////////////////////////////////////////////////////
+// Wrappers for classic Sdr* Mode/View classes
+
+SVX_DLLPUBLIC SdrObject* SdrObjectPrimitiveHit(
+ const SdrObject& rObject,
+ const Point& rPnt,
+ sal_uInt16 nTol,
+ const SdrPageView& rSdrPageView,
+ const SetOfByte* pVisiLayer,
+ bool bTextOnly);
+
+SVX_DLLPUBLIC SdrObject* SdrObjListPrimitiveHit(
+ const SdrObjList& rList,
+ const Point& rPnt,
+ sal_uInt16 nTol,
+ const SdrPageView& rSdrPageView,
+ const SetOfByte* pVisiLayer,
+ bool bTextOnly);
+
+/////////////////////////////////////////////////////////////////////
+// the pure HitTest based on a VOC
+
+SVX_DLLPUBLIC bool ViewObjectContactPrimitiveHit(
+ const sdr::contact::ViewObjectContact& rVOC,
+ const basegfx::B2DPoint& rHitPosition,
+ double fLogicHitTolerance,
+ bool bTextOnly);
+
+/////////////////////////////////////////////////////////////////////
+
+#endif //_SDRHITTESTHELPER_HXX
+
+/////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/inc/svx/sdtfchim.hxx b/svx/inc/svx/sdtfchim.hxx
index e52296dfe579..d8fa20507980 100644
--- a/svx/inc/svx/sdtfchim.hxx
+++ b/svx/inc/svx/sdtfchim.hxx
@@ -32,28 +32,28 @@
#include <svx/svddef.hxx>
-class SdrTextFixedCellHeightItem : public SfxBoolItem
+class SVX_DLLPUBLIC SdrTextFixedCellHeightItem : public SfxBoolItem
{
public:
TYPEINFO();
SdrTextFixedCellHeightItem( BOOL bUseFixedCellHeight = FALSE );
- SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion );
+ SVX_DLLPRIVATE SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion );
- virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation,
SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric,
String &rText, const IntlWrapper * = 0) const;
- virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const;
- virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
- virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const;
+ SVX_DLLPRIVATE virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
+ SVX_DLLPRIVATE virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
#ifdef SDR_ISPOOLABLE
- virtual int IsPoolable() const;
+ SVX_DLLPRIVATE virtual int IsPoolable() const;
#endif
};
diff --git a/svx/inc/svx/shapeproperty.hxx b/svx/inc/svx/shapeproperty.hxx
new file mode 100755
index 000000000000..267b5e229d08
--- /dev/null
+++ b/svx/inc/svx/shapeproperty.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+#ifndef SVX_SHAPEPROPERTY_HXX
+#define SVX_SHAPEPROPERTY_HXX
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+//........................................................................
+namespace svx
+{
+//........................................................................
+
+ //====================================================================
+ //= ShapeProperty
+ //====================================================================
+ enum ShapeProperty
+ {
+ // generic (UNO) shape properties
+ eShapePosition,
+ eShapeSize,
+ // text doc shape properties
+ eTextShapeAnchorType,
+ // spreadsheet doc shape properties
+ eSpreadsheetAnchor,
+
+ // invalid, not to be used
+ eInvalidShapeProperty
+ };
+
+//........................................................................
+} // namespace svx
+//........................................................................
+
+#endif // SVX_SHAPEPROPERTY_HXX
diff --git a/svx/inc/svx/shapepropertynotifier.hxx b/svx/inc/svx/shapepropertynotifier.hxx
new file mode 100644
index 000000000000..b5598e5fb0da
--- /dev/null
+++ b/svx/inc/svx/shapepropertynotifier.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+#ifndef SVX_PROPERTYCHANGENOTIFIER_HXX
+#define SVX_PROPERTYCHANGENOTIFIER_HXX
+
+#include "svx/svxdllapi.h"
+#include "svx/shapeproperty.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+/** === end UNO includes === **/
+
+#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
+#include <memory>
+
+namespace cppu
+{
+ class OWeakObject;
+}
+
+//........................................................................
+namespace svx
+{
+//........................................................................
+
+ //====================================================================
+ //= IPropertyValueProvider
+ //====================================================================
+ /** a provider for a property value
+ */
+ class SVX_DLLPUBLIC IPropertyValueProvider
+ {
+ public:
+ /** returns the name of the property which this provider is responsible for
+ */
+ virtual ::rtl::OUString getPropertyName() const = 0;
+
+ /** returns the current value of the property which the provider is responsible for
+ */
+ virtual void getCurrentValue( ::com::sun::star::uno::Any& _out_rValue ) const = 0;
+
+ virtual ~IPropertyValueProvider();
+ };
+ typedef ::boost::shared_ptr< IPropertyValueProvider > PPropertyValueProvider;
+
+ //====================================================================
+ //= PropertyValueProvider
+ //====================================================================
+ /** default implementation of a IPropertyValueProvider
+
+ This default implementation queries the object which it is constructed with for the XPropertySet interface,
+ and calls the getPropertyValue method.
+ */
+ class SVX_DLLPUBLIC PropertyValueProvider :public IPropertyValueProvider
+ ,public ::boost::noncopyable
+ {
+ public:
+ PropertyValueProvider( ::cppu::OWeakObject& _rContext, const sal_Char* _pAsciiPropertyName )
+ :m_rContext( _rContext )
+ ,m_sPropertyName( ::rtl::OUString::createFromAscii( _pAsciiPropertyName ) )
+ {
+ }
+
+ virtual ::rtl::OUString getPropertyName() const;
+ virtual void getCurrentValue( ::com::sun::star::uno::Any& _out_rValue ) const;
+
+ protected:
+ ::cppu::OWeakObject& getContext() const { return m_rContext; }
+ private:
+ ::cppu::OWeakObject& m_rContext;
+ const ::rtl::OUString m_sPropertyName;
+ };
+
+ //====================================================================
+ //= PropertyChangeNotifier
+ //====================================================================
+ struct PropertyChangeNotifier_Data;
+
+ /** helper class for notifying XPropertyChangeListeners
+
+ The class is intended to be held as member of the class which does the property change broadcasting.
+ */
+ class SVX_DLLPUBLIC PropertyChangeNotifier : public ::boost::noncopyable
+ {
+ 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 maintanance
+ void addPropertyChangeListener( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener );
+ void removePropertyChangeListener( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener );
+
+ /** registers a IPropertyValueProvider
+ */
+ void registerProvider( const ShapeProperty _eProperty, const PPropertyValueProvider _pProvider );
+
+ /** 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 ShapeProperty _eProperty ) const;
+
+ /** is called to dispose the instance
+ */
+ void disposing();
+
+ private:
+ ::std::auto_ptr< PropertyChangeNotifier_Data > m_pData;
+ };
+
+//........................................................................
+} // namespace svx
+//........................................................................
+
+#endif // SVX_PROPERTYCHANGENOTIFIER_HXX
diff --git a/svx/inc/svx/svdedtv.hxx b/svx/inc/svx/svdedtv.hxx
index c56bb9d01f62..1db0df84bf75 100644
--- a/svx/inc/svx/svdedtv.hxx
+++ b/svx/inc/svx/svdedtv.hxx
@@ -232,6 +232,7 @@ public:
void SetUndoComment(const String& rComment);
void SetUndoComment(const String& rComment, const String& rObjDescr);
#endif
+ bool IsUndoEnabled() const;
std::vector< SdrUndoAction* > CreateConnectorUndo( SdrObject& rO );
void AddUndoActions( std::vector< SdrUndoAction* >& );
diff --git a/svx/inc/svx/svdedxv.hxx b/svx/inc/svx/svdedxv.hxx
index ccfc74ab00af..17333ad74459 100644
--- a/svx/inc/svx/svdedxv.hxx
+++ b/svx/inc/svx/svdedxv.hxx
@@ -130,9 +130,6 @@ protected:
void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect) const;
void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const;
- // Hintergrundfarbe fuer die Outlinerviews bestimmen
- Color ImpGetTextEditBackgroundColor() const;
-
// Feststellen, ob der gesamte Text markiert ist. Liefert auch TRUE wenn
// kein Text vorhanden ist.
BOOL ImpIsTextEditAllSelected() const;
diff --git a/svx/inc/svx/svdetc.hxx b/svx/inc/svx/svdetc.hxx
index 40ece921f6a2..c0327d83457d 100644
--- a/svx/inc/svx/svdetc.hxx
+++ b/svx/inc/svx/svdetc.hxx
@@ -81,7 +81,7 @@ friend class SdrAttrObj;
Fraction aMapFraction;
private:
- SVX_DLLPRIVATE static SdrEngineDefaults& GetDefaults();
+ static SdrEngineDefaults& GetDefaults();
public:
SdrEngineDefaults();
@@ -272,7 +272,7 @@ protected:
public:
SdrLinkList(): aList(1024,4,4) {}
~SdrLinkList() { Clear(); }
- void Clear();
+ SVX_DLLPUBLIC void Clear();
unsigned GetLinkCount() const { return (unsigned)aList.Count(); }
Link& GetLink(unsigned nNum) { return *((Link*)(aList.GetObject(nNum))); }
const Link& GetLink(unsigned nNum) const { return *((Link*)(aList.GetObject(nNum))); }
@@ -299,7 +299,7 @@ class OLEObjCache : public Container
public:
OLEObjCache();
- ~OLEObjCache();
+ SVX_DLLPUBLIC ~OLEObjCache();
void SetSize(ULONG nNewSize);
void InsertObj(SdrOle2Obj* pObj);
@@ -309,6 +309,9 @@ public:
class SVX_DLLPUBLIC SdrGlobalData
{
+ const SvtSysLocale* pSysLocale; // follows always locale settings
+ const CharClass* pCharClass; // follows always SysLocale
+ const LocaleDataWrapper* pLocaleData; // follows always SysLocale
public:
SdrLinkList aUserMakeObjHdl;
SdrLinkList aUserMakeObjUserDataHdl;
@@ -317,10 +320,11 @@ public:
ResMgr* pResMgr;
ULONG nExchangeFormat;
OLEObjCache aOLEObjCache;
- const SvtSysLocale* pSysLocale; // follows always locale settings
- const CharClass* pCharClass; // follows always SysLocale
- const LocaleDataWrapper* pLocaleData; // follows always SysLocale
+
+ const SvtSysLocale* GetSysLocale(); // follows always locale settings
+ const CharClass* GetCharClass(); // follows always SysLocale
+ const LocaleDataWrapper* GetLocaleData(); // follows always SysLocale
public:
SdrGlobalData();
~SdrGlobalData();
@@ -344,8 +348,12 @@ SVX_DLLPUBLIC String GetResourceString(sal_uInt16 nResID);
}
+/////////////////////////////////////////////////////////////////////
+// #i101872# isolated GetTextEditBackgroundColor for tooling
+class SdrObjEditView;
+
+SVX_DLLPUBLIC Color GetTextEditBackgroundColor(const SdrObjEditView& rView);
/////////////////////////////////////////////////////////////////////
#endif //_SVDETC_HXX
-
diff --git a/svx/inc/svx/svdfppt.hxx b/svx/inc/svx/svdfppt.hxx
index 40c851d1c949..63f196876e93 100644
--- a/svx/inc/svx/svdfppt.hxx
+++ b/svx/inc/svx/svdfppt.hxx
@@ -989,6 +989,18 @@ struct PPTStyleTextPropReader
PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImport&, const DffRecordHeader& rClientTextBoxHd,
PPTTextRulerInterpreter& rInterpreter, const DffRecordHeader& rExtParaHd, sal_uInt32 nTextInstance );
+ void Init( SvStream& rIn, SdrPowerPointImport&, const DffRecordHeader& rClientTextBoxHd,
+ PPTTextRulerInterpreter& rInterpreter, const DffRecordHeader& rExtParaHd, sal_uInt32 nTextInstance );
+ void ReadParaProps( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
+ const String& aString, PPTTextRulerInterpreter& rRuler,
+ sal_uInt32& nCharCount, sal_Bool& bTextPropAtom );
+ void ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const String& aString,
+ sal_uInt32& nCharCount, sal_uInt32 nCharAnzRead,
+ sal_Bool& bTextPropAtom, sal_uInt32 nExtParaPos,
+ const std::vector< StyleTextProp9 >& aStyleTextProp9,
+ sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip,
+ sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme );
+
~PPTStyleTextPropReader();
};
@@ -1325,6 +1337,8 @@ class PPTConvertOCXControls : public SvxMSConvertOCXControls
#define PPT_PST_NewlyAddedAtomByXP11008 11008
#define PPT_PST_NewlyAddedAtomByXP11010 11010
+#define PPT_PST_Comment10 12000
+#define PPT_PST_CommentAtom10 12001
#define PPT_PST_NewlyAddedAtomByXP12004 12004
#define PPT_PST_NewlyAddedAtomByXP12010 12010
#define PPT_PST_NewlyAddedAtomByXP12011 12011
diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx
index ab4abfdd7458..4960323feeb7 100644
--- a/svx/inc/svx/svdhdl.hxx
+++ b/svx/inc/svx/svdhdl.hxx
@@ -58,7 +58,6 @@ class SdrHdlList;
class SdrMarkView;
class SdrObject;
class SdrPageView;
-class SdrHdlBitmapSet;
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -155,12 +154,6 @@ class SVX_DLLPUBLIC SdrHdl
friend class SdrMarkView; // fuer den Zugriff auf nObjHdlNum
friend class SdrHdlList;
- static SdrHdlBitmapSet* pSimpleSet;
- static SdrHdlBitmapSet* pModernSet;
-
- // #101928#
- static SdrHdlBitmapSet* pHighContrastSet;
-
// #101928#
BitmapEx ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, sal_Bool bFine, sal_Bool bIsHighContrast);
@@ -245,7 +238,7 @@ public:
sal_uInt32 GetSourceHdlNum() const { return nSourceHdlNum; }
virtual Pointer GetPointer() const;
- virtual bool IsHdlHit(const Point& rPnt) const;
+ bool IsHdlHit(const Point& rPnt) const;
// #97016# II
virtual BOOL IsFocusHdl() const;
@@ -363,7 +356,6 @@ public:
virtual ~SdrHdlLine();
virtual Pointer GetPointer() const;
- virtual bool IsHdlHit(const Point& rPnt) const;
};
// Ein SdrHdlBezWgt hat Kenntnis von seinem "BasisHandle". Seine Draw-Methode
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index f9a835185f37..2873b77ac2ea 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -220,6 +220,7 @@ protected:
Container* pRedoStack;
SdrUndoGroup* pAktUndoGroup; // Fuer mehrstufige
USHORT nUndoLevel; // Undo-Klammerung
+ bool mbUndoEnabled; // If false no undo is recorded or we are during the execution of an undo action
USHORT nProgressPercent; // fuer den ProgressBar-Handler
USHORT nLoadVersion; // Versionsnummer der geladenen Datei
FASTBOOL bExtColorTable; // Keinen eigenen ColorTable
@@ -688,7 +689,7 @@ public:
void SetModelStorage( SotStorage* pStor ) { pModelStorage = pStor; }
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoModel();
- void setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel ) { mxUnoModel = xModel; }
+ void setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel );
// these functions are used by the api to disable repaints during a
// set of api calls.
@@ -728,6 +729,17 @@ public:
bool IsInDestruction() const;
static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId();
+
+ /** 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;
+
};
typedef tools::WeakReference< SdrModel > SdrModelWeakRef;
diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx
index c9a590feccc5..88d0b941273d 100644
--- a/svx/inc/svx/svdmrkv.hxx
+++ b/svx/inc/svx/svdmrkv.hxx
@@ -180,9 +180,8 @@ protected:
void ForceUndirtyMrkPnt() const { if (bMrkPntDirty) UndirtyMrkPnt(); }
//HMHvoid ImpShowMarkHdl(bool bNoRefHdl);
- SdrObject* ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
- SdrObject* ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const;
- BOOL ImpIsObjHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions) const { return ImpCheckObjHit(rPnt,nTol,pObj,pPV,nOptions,NULL)!=NULL; }
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const;
BOOL ImpIsFrameHandles() const;
void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, USHORT nVal=0, USHORT nOpt=0) const;
@@ -309,9 +308,9 @@ public:
// SDRSEARCH_DEEP SDRSEARCH_ALSOONMASTER SDRSEARCH_TESTMARKABLE SDRSEARCH_TESTTEXTEDIT
// SDRSEARCH_WITHTEXT SDRSEARCH_TESTTEXTAREA SDRSEARCH_BACKWARD SDRSEARCH_MARKED
// SDRSEARCH_WHOLEPAGE
- BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions, SdrObject** ppRootObj, ULONG* pnMarkNum=NULL, USHORT* pnPassNum=NULL) const;
- BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const;
- BOOL PickObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const { return PickObj(rPnt,nHitTolLog,rpObj,rpPV,nOptions); }
+ virtual BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions, SdrObject** ppRootObj, ULONG* pnMarkNum=NULL, USHORT* pnPassNum=NULL) const;
+ virtual BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const;
+ // BOOL PickObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const { return PickObj(rPnt,nHitTolLog,rpObj,rpPV,nOptions); }
BOOL MarkObj(const Point& rPnt, short nTol=-2, BOOL bToggle=FALSE, BOOL bDeep=FALSE);
// Pick: Unterstuetzte Optionen fuer nOptions sind SDRSEARCH_PASS2BOUND und SDRSEARCH_PASS3NEAREST
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index a75c064e35ad..faf1aa7055aa 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -105,7 +105,7 @@ private:
// #i37011# render geometry shadow
SdrObject* mpLastShadowGeometry;
- static SVX_DLLPRIVATE com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape );
+ static com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape );
// SVX_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > >
// SdrObjCustomShape::GetInteraction( const SdrObjCustomShape* pCustomShape ) const;
@@ -134,7 +134,7 @@ public:
const SdrObject* GetSdrObjectShadowFromCustomShape() const;
sal_Bool GetTextBounds( Rectangle& rTextBound ) const;
sal_Bool IsTextPath() const;
- static SVX_DLLPRIVATE basegfx::B2DPolyPolygon GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed );
+ static basegfx::B2DPolyPolygon GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed );
protected:
@@ -199,6 +199,8 @@ public:
virtual void NbcSetSnapRect(const Rectangle& rRect);
virtual void NbcSetLogicRect(const Rectangle& rRect);
+ virtual SdrGluePoint GetVertexGluePoint(USHORT nNum) const;
+
virtual void NbcSetStyleSheet( SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr );
// special drag methods
@@ -222,8 +224,6 @@ public:
virtual void TakeTextAnchorRect( Rectangle& rAnchorRect ) const;
virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText=FALSE,
Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const;
-
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator=(const SdrObject& rObj);
virtual void TakeObjNameSingul(String& rName) const;
diff --git a/svx/inc/svx/svdoattr.hxx b/svx/inc/svx/svdoattr.hxx
index 20b196443739..3bcce26ea45e 100644
--- a/svx/inc/svx/svdoattr.hxx
+++ b/svx/inc/svx/svdoattr.hxx
@@ -66,9 +66,6 @@ protected:
// Strichstaerke ermitteln. Keine Linie -> 0.
sal_Int32 ImpGetLineWdt() const;
- // Schattenabstand ermitteln. FALSE=Kein Schatten.
- FASTBOOL ImpGetShadowDist(sal_Int32& nXDist, sal_Int32& nYDist) const;
-
// Zuhoeren, ob sich ein StyleSheet aendert
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 0b6e190ff025..349bf49ccf06 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -46,6 +46,7 @@
#include <vcl/bitmapex.hxx>
#include <svx/sdrobjectuser.hxx>
#include "svx/svxdllapi.h"
+#include "svx/shapeproperty.hxx"
//************************************************************
// Vorausdeklarationen
@@ -95,6 +96,11 @@ namespace sdr
} // end of namespace contact
} // end of namespace sdr
+namespace svx
+{
+ class PropertyChangeNotifier;
+}
+
//************************************************************
// Defines
//************************************************************
@@ -529,9 +535,6 @@ protected:
// ueberladen, wenn man sich von SdrObjPlusData abgeleitet hat:
virtual SdrObjPlusData* NewPlusData() const;
- // this is a weak reference to a possible living api wrapper for this shape
- ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > mxUnoShape;
-
protected:
// Diese 3 Methoden muss ein abgeleitetes Objekt ueberladen, wenn es eigene
// geometrische Daten besitzt, die fuer den Undo-Fall gesichert werden
@@ -680,20 +683,10 @@ public:
// Tooling for painting a single object to a OutputDevice. This will be needed as long
// as not all painting is changed to use DrawContact objects.
sal_Bool SingleObjectPainter(OutputDevice& rOut) const;
-
BOOL LineGeometryUsageIsNecessary() const;
- // HitTest, 2. Stufe. nTol ist die zulaessige Toleranz in logischen Einheiten.
- // rVisiLayer ist hauptsaechlich fuer Gruppenobjekte gedacht, die ja Objekte
- // mit unterschiedlichen Layerzuordnungen beinhalten koennen.
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
- //SdrObject* CheckHit(const Point& rPnt, USHORT nTol) const { return CheckHit(rPnt,nTol,NULL); }
- sal_Bool IsHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const { return CheckHit(rPnt,nTol,pVisiLayer)!=NULL; }
- sal_Bool IsHit(const Point& rPnt, USHORT nTol) const { return CheckHit(rPnt,nTol,NULL)!=NULL; }
-
// Clone() soll eine komplette Kopie des Objektes erzeugen.
virtual SdrObject* Clone() const;
- // #116235# virtual SdrObject* Clone(SdrPage* pPage, SdrModel* pModel) const;
virtual void operator=(const SdrObject& rObj);
// TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert".
@@ -875,10 +868,6 @@ public:
// TextEdit
virtual FASTBOOL HasTextEdit() const;
- virtual SdrObject* CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
- //SdrObject* CheckTextEditHit(const Point& rPnt, USHORT nTol) const { return CheckTextEditHit(rPnt,nTol,NULL); }
- sal_Bool IsTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const { return CheckTextEditHit(rPnt,nTol,pVisiLayer)!=NULL; }
- sal_Bool IsTextEditHit(const Point& rPnt, USHORT nTol) const { return CheckTextEditHit(rPnt,nTol,NULL)!=NULL; }
// Return==TRUE: TextEditMode gestartet
virtual sal_Bool BegTextEdit(SdrOutliner& rOutl);
@@ -1053,7 +1042,7 @@ public:
////////////////////////////////////////////////////////////////////////////////////////////////////
// access to the UNO representation of the shape
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape();
- ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > getWeakUnoShape() { return mxUnoShape; }
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > getWeakUnoShape() const { return maWeakUnoShape; }
static SdrObject* getSdrObjectFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInt );
@@ -1067,9 +1056,31 @@ public:
// setting the UNO representation is allowed for the UNO representation itself only!
void setUnoShape(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape,
- GrantXShapeAccess /*aGrant*/
- );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape,
+ GrantXShapeAccess /*aGrant*/
+ )
+ {
+ impl_setUnoShape( _rxUnoShape );
+ }
+
+ /** 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 ::com::sun::star::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::ShapeProperty _eProperty ) const;
////////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -1110,18 +1121,17 @@ public:
void SetBLIPSizeRectangle( const Rectangle& aRect );
protected:
- // #b4899532#
- // Force LineStyle with hard attributes to hair line in COL_LIGHTGRAY
+ void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape );
+
+private:
/** only for internal use!
- The returned SvxShape pointer may be null and if not it is only valid as long as you
- hold the xShapeGuard reference.
*/
- SvxShape* getSvxShape( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xShapeGuard );
+ SvxShape* getSvxShape() const;
-private:
/** do not use directly, always use getSvxShape() if you have to! */
- SvxShape* mpSvxShape;
-
+ SvxShape* mpSvxShape;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface >
+ maWeakUnoShape;
};
//************************************************************
diff --git a/svx/inc/svx/svdocapt.hxx b/svx/inc/svx/svdocapt.hxx
index 8e7860c204ce..37bfd5ed2f9b 100644
--- a/svx/inc/svx/svdocapt.hxx
+++ b/svx/inc/svx/svdocapt.hxx
@@ -99,7 +99,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator=(const SdrObject& rObj);
// for calc: special shadow only for text box
diff --git a/svx/inc/svx/svdocirc.hxx b/svx/inc/svx/svdocirc.hxx
index db31996939af..3f6a589d2cd7 100644
--- a/svx/inc/svx/svdocirc.hxx
+++ b/svx/inc/svx/svdocirc.hxx
@@ -111,7 +111,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
diff --git a/svx/inc/svx/svdoedge.hxx b/svx/inc/svx/svdoedge.hxx
index 9d2effc87c28..227afd9ab027 100644
--- a/svx/inc/svx/svdoedge.hxx
+++ b/svx/inc/svx/svdoedge.hxx
@@ -73,7 +73,7 @@ protected:
public:
SdrObjConnection() { ResetVars(); }
- ~SdrObjConnection();
+ SVX_DLLPUBLIC ~SdrObjConnection();
void ResetVars();
FASTBOOL TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsolutePos) const;
@@ -252,7 +252,6 @@ public:
virtual void RecalcSnapRect();
virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator=(const SdrObject& rObj);
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx
index 4d464d5c9836..4f00da997361 100644
--- a/svx/inc/svx/svdograf.hxx
+++ b/svx/inc/svx/svdograf.hxx
@@ -180,7 +180,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
@@ -227,6 +226,9 @@ public:
sal_Bool IsObjectTransparent() const;
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getInputStream();
+
+ // #i103116# FullDrag support
+ virtual SdrObject* getFullDragClone() const;
};
#endif //_SVDOGRAF_HXX
diff --git a/svx/inc/svx/svdogrp.hxx b/svx/inc/svx/svdogrp.hxx
index b6d2a4519db6..5f243d451f90 100644
--- a/svx/inc/svx/svdogrp.hxx
+++ b/svx/inc/svx/svdogrp.hxx
@@ -84,7 +84,6 @@ public:
virtual const Rectangle& GetCurrentBoundRect() const;
virtual const Rectangle& GetSnapRect() const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator=(const SdrObject& rObj);
virtual void TakeObjNameSingul(String& rName) const;
diff --git a/svx/inc/svx/svdomeas.hxx b/svx/inc/svx/svdomeas.hxx
index 866fda1eff48..406c5badbcb0 100644
--- a/svx/inc/svx/svdomeas.hxx
+++ b/svx/inc/svx/svdomeas.hxx
@@ -105,7 +105,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator=(const SdrObject& rObj);
virtual void TakeObjNameSingul(String& rName) const;
@@ -153,7 +152,6 @@ public:
Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const;
virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const;
virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const;
- virtual SdrObject* CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual USHORT GetOutlinerViewAnchorMode() const;
virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject);
virtual OutlinerParaObject* GetOutlinerParaObject() const;
diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx
index 87a86baeb624..2b5a19f7b60b 100644
--- a/svx/inc/svx/svdoole2.hxx
+++ b/svx/inc/svx/svdoole2.hxx
@@ -145,7 +145,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
@@ -157,6 +156,8 @@ public:
virtual void NbcSetLogicRect(const Rectangle& rRect);
virtual void SetGeoData(const SdrObjGeoData& rGeo);
+ static sal_Bool CanUnloadRunningObj( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj,
+ sal_Int64 nAspect );
static sal_Bool Unload( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
BOOL Unload();
void Connect();
@@ -183,14 +184,8 @@ public:
sal_Bool CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize );
sal_Bool AddOwnLightClient();
- // helper for ViewObjectContactOfSdrOle2Obj. As long as the OLE stuff is not
- // reworked, the things the old Do_PaintObject did at this object need to be
- // emulated. Isolated those things here. Return value tells if the object
- // is active
- bool executeOldDoPaintPreparations(SdrPageView* pPageVew) const;
-
// handy to get the empty replacement bitmap without accessing all the old stuff
- Bitmap GetEmtyOLEReplacementBitmap() const;
+ static Bitmap GetEmtyOLEReplacementBitmap();
void SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow);
};
diff --git a/svx/inc/svx/svdopath.hxx b/svx/inc/svx/svdopath.hxx
index a43b06ffd2ab..382f968f19b2 100644
--- a/svx/inc/svx/svdopath.hxx
+++ b/svx/inc/svx/svdopath.hxx
@@ -99,7 +99,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator=(const SdrObject& rObj);
virtual void TakeObjNameSingul(String& rName) const;
diff --git a/svx/inc/svx/svdorect.hxx b/svx/inc/svx/svdorect.hxx
index 2f4a3a3120dc..d8b0d2767553 100644
--- a/svx/inc/svx/svdorect.hxx
+++ b/svx/inc/svx/svdorect.hxx
@@ -75,7 +75,6 @@ protected:
protected:
XPolygon ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const;
- SdrObject* ImpCheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bForceFilled, FASTBOOL bForceTol=FALSE) const;
void SetXPolyDirty();
// RecalcXPoly sollte ueberladen werden. Dabei muss dann eine XPolygon
@@ -103,7 +102,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
diff --git a/svx/inc/svx/svdotable.hxx b/svx/inc/svx/svdotable.hxx
index 04348306a7de..a524ce757898 100644
--- a/svx/inc/svx/svdotable.hxx
+++ b/svx/inc/svx/svdotable.hxx
@@ -226,7 +226,6 @@ public:
virtual FASTBOOL AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE) const;
virtual FASTBOOL AdjustTextFrameWidthAndHeight(FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE);
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
virtual void operator=(const SdrObject& rObj);
diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx
index 080e20fd1a77..6ffa4ab5bd22 100644
--- a/svx/inc/svx/svdotext.hxx
+++ b/svx/inc/svx/svdotext.hxx
@@ -259,7 +259,7 @@ protected:
// Flag for allowing text animation. Default is sal_true.
BOOL mbTextAnimationAllowed : 1;
- SVX_DLLPRIVATE SdrOutliner& ImpGetDrawOutliner() const;
+ SdrOutliner& ImpGetDrawOutliner() const;
private:
SVX_DLLPRIVATE void ImpCheckMasterCachable();
@@ -272,14 +272,14 @@ private:
Rectangle& rAnchorRect,
Rectangle& rPaintRect,
Fraction& aFitXKorreg ) const;
- SVX_DLLPRIVATE SdrObject* ImpConvertObj(FASTBOOL bToPoly) const;
+ SVX_DLLPRIVATE SdrObject* ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
SVX_DLLPRIVATE void ImpLinkAnmeldung();
SVX_DLLPRIVATE void ImpLinkAbmeldung();
SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const;
// void ImpCheckItemSetChanges(const SfxItemSet& rAttr);
protected:
- FASTBOOL ImpCanConvTextToCurve() const { return GetOutlinerParaObject()!=NULL && pModel!=NULL && !IsOutlText() && !IsFontwork(); }
+ bool ImpCanConvTextToCurve() const;
SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, sal_Bool bClosed, sal_Bool bBezier, sal_Bool bNoSetAttr = sal_False) const;
SdrObject* ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const;
void ImpSetTextStyleSheetListeners();
@@ -430,7 +430,6 @@ public:
// Wird zur Bestimmung des Textankerbereichs benoetigt
virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void TakeObjNameSingul(String& rName) const;
virtual void TakeObjNamePlural(String& rName) const;
virtual void operator=(const SdrObject& rObj);
@@ -472,7 +471,6 @@ public:
virtual sal_Bool BegTextEdit(SdrOutliner& rOutl);
virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const;
virtual void EndTextEdit(SdrOutliner& rOutl);
- virtual SdrObject* CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual USHORT GetOutlinerViewAnchorMode() const;
void StartTextAnimation(OutputDevice* pOutDev, const Point& rOffset, long nExtraData=0L);
@@ -577,20 +575,19 @@ public:
public:
//////////////////////////////////////////////////////////////////////////////
// text primitive decomposition helpers
- bool impCheckSpellCheckForDecomposeTextPrimitive() const;
- bool impDecomposeContourTextPrimitive(
+ void impDecomposeContourTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
- bool impDecomposePathTextPrimitive(
+ void impDecomposePathTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
- bool impDecomposeBlockTextPrimitive(
+ void impDecomposeBlockTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
- bool impDecomposeStretchTextPrimitive(
+ void impDecomposeStretchTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
diff --git a/svx/inc/svx/svdouno.hxx b/svx/inc/svx/svdouno.hxx
index d0dd60fd8c9a..83019f6b1cc5 100644
--- a/svx/inc/svx/svdouno.hxx
+++ b/svx/inc/svx/svdouno.hxx
@@ -90,7 +90,6 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual UINT16 GetObjIdentifier() const;
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual void operator = (const SdrObject& rObj);
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
@@ -144,7 +143,7 @@ public:
const String& GetUnoControlModelTypeName() const { return aUnoControlTypeName; }
const String& GetUnoControlTypeName() const { return aUnoControlTypeName; }
- void SetUnoControlModel(::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > xModel);
+ virtual void SetUnoControlModel( const ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& xModel );
protected:
// SdrObject overridables
diff --git a/svx/inc/svx/svdovirt.hxx b/svx/inc/svx/svdovirt.hxx
index d7010cd40b48..190576fc68c6 100644
--- a/svx/inc/svx/svdovirt.hxx
+++ b/svx/inc/svx/svdovirt.hxx
@@ -83,7 +83,6 @@ public:
virtual const Rectangle& GetLastBoundRect() const;
virtual void RecalcBoundRect();
virtual void SetChanged();
- virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const;
virtual SdrObject* Clone() const;
virtual void operator=(const SdrObject& rObj);
diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx
index d817ede41406..6f2753c4e896 100644
--- a/svx/inc/svx/svdpage.hxx
+++ b/svx/inc/svx/svdpage.hxx
@@ -132,9 +132,7 @@ friend class SdrEditView;
FASTBOOL bRectsDirty;
protected:
virtual void RecalcRects();
-//#if 0 // _SOLAR__PRIVATE
- FASTBOOL ImpGetFillColor(SdrObject* pObj, Color& rCol) const;
-//#endif // __PRIVATE
+
private:
/// simple ActionChildInserted forwarder to have it on a central place
void impChildInserted(SdrObject& rChild) const;
@@ -188,12 +186,6 @@ public:
const Rectangle& GetAllObjSnapRect() const;
const Rectangle& GetAllObjBoundRect() const;
- // HitTest auf alle Objekte der Liste
- SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bBackward=FALSE) const;
- SdrObject* CheckHit(const Point& rPnt, USHORT nTol, FASTBOOL bBackward=FALSE) const { return CheckHit(rPnt,nTol,NULL,bBackward); }
- FASTBOOL IsHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const { return CheckHit(rPnt,nTol,pVisiLayer)!=NULL; }
- FASTBOOL IsHit(const Point& rPnt, USHORT nTol) const { return CheckHit(rPnt,nTol)!=NULL; } // #i24906#
-
// Alle Textobjekte neu formatieren, z.B. bei Druckerwechsel
void NbcReformatAllTextObjects();
void ReformatAllTextObjects();
@@ -204,14 +196,6 @@ public:
// Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
void BurnInStyleSheetAttributes();
- // Bestimmung der FuellFarbe an einer bestimmten Position.
- // FALSE=Kein Objekt mit FuellFarbe an dieser Position gefunden.
- // rVisLayers gibt die zu durchsuchenden Layer an.
- // bLayerSorted: TRUE=Es wird in der Reihenfolge der Layer gesucht (ni)
- // rCol: Hier wird die gefundene Farbe zurueckgegeben
- FASTBOOL GetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
- /* FASTBOOL bLayerSorted, */ Color& rCol) const;
-
ULONG GetObjCount() const;
SdrObject* GetObj(ULONG nNum) const;
@@ -444,10 +428,6 @@ friend class ChXChartDocument;
// this is a weak reference to a possible living api wrapper for this page
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxUnoPage;
- // #108867# used by GetFillColor
- FASTBOOL ImplGetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
- /* FASTBOOL bLayerSorted, */ Color& rCol, FASTBOOL bSkipBackgroundShape) const;
-
protected:
SdrLayerAdmin* pLayerAdmin;
SdrObject* pBackgroundObj;
@@ -530,15 +510,6 @@ public:
const SdrLayerAdmin& GetLayerAdmin() const { return *pLayerAdmin; }
SdrLayerAdmin& GetLayerAdmin() { return *pLayerAdmin; }
- // Bestimmung der FuellFarbe an einer bestimmten Position.
- // FALSE=Kein Objekt mit FuellFarbe an dieser Position gefunden.
- // rVisLayers gibt die zu durchsuchenden Layer an.
- // bLayerSorted: TRUE=Es wird in der Reihenfolge der Layer gesucht (ni)
- // rCol: Hier wird die gefundene Farbe zurueckgegeben
- // Auch MasterPages werden durchsucht.
- FASTBOOL GetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
- /*FASTBOOL bLayerSorted,*/ Color& rCol) const;
-
// GetBitmap und GetMetafile sind noch nicht implementiert.
// Bitmap in Bildschirmaufloesung und -farbtiefe aus den Objekten der
// Page erzeugen.
diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx
index dcdbe7fc1c8f..48523dc97c3b 100644
--- a/svx/inc/svx/svdpntv.hxx
+++ b/svx/inc/svx/svdpntv.hxx
@@ -109,7 +109,7 @@ namespace sdr
////////////////////////////////////////////////////////////////////////////////////////////////////
-class SvxViewHint : public SfxHint
+class SVX_DLLPUBLIC SvxViewHint : public SfxHint
{
public:
enum HintType { SVX_HINT_VIEWCHANGED };
@@ -319,6 +319,10 @@ public:
void SetHitTolerancePixel(USHORT nVal) { nHitTolPix=nVal; TheresNewMapMode(); }
USHORT GetHitTolerancePixel() const { return (USHORT)nHitTolPix; }
+ // data read access on logic HitTolerance and MinMoveTolerance
+ USHORT getHitTolLog() const { return nHitTolLog; }
+ USHORT getMinMovLog() const { return nMinMovLog; }
+
// Flag zur Visualisierung von Gruppen abfragen/testen
BOOL DoVisualizeEnteredGroup() const { return bVisualizeEnteredGroup; }
void SetVisualizeEnteredGroup(BOOL bNew) { bVisualizeEnteredGroup = bNew; }
@@ -559,35 +563,6 @@ public:
// #103911# Set document color for svx at SdrPageViews
void SetApplicationDocumentColor(Color aDocumentColor);
- /** Determine typical background color for given area on given page
-
- This method calculates a single representative color for the
- given rectangular area. This is accomplished by sampling from
- various points within that area, and calculating a weighted
- mean value of those samples. High contrast settings are
- respected by this method, i.e. in high contrast mode,
- svtools::DOCCOLOR is used as the background color.
-
- @attention For some cases, such as highly structured
- background or huge color ranges spanned by the background,
- this method cannot yield meaningful results, as the background
- simply cannot be represented by a single color. Beware.
-
- @param rArea
- Rectangular area to determine representative background color from
-
- @param rVisibleLayers
- Set of layers visible when calculating the background color
-
- @param rCurrPage
- Current page for which to determine background color on
-
- @return a representative background color.
- */
- Color CalcBackgroundColor( const Rectangle& rArea,
- const SetOfByte& rVisibleLayers,
- const SdrPage& rCurrPage ) const;
-
// #i38135#
// Sets the timer for Object animations and restarts.
void SetAnimationTimer(sal_uInt32 nTime);
diff --git a/svx/inc/svx/svdtext.hxx b/svx/inc/svx/svdtext.hxx
index 24e4d651cf50..d745bbe170de 100644
--- a/svx/inc/svx/svdtext.hxx
+++ b/svx/inc/svx/svdtext.hxx
@@ -33,6 +33,7 @@
#include <sal/types.h>
#include "svx/svxdllapi.h"
+#include <tools/weakbase.hxx>
// --------------------------------------------------------------------
@@ -49,7 +50,7 @@ namespace sdr { namespace properties {
/** This class stores information about one text inside a shape.
*/
-class SVX_DLLPUBLIC SdrText
+class SVX_DLLPUBLIC SdrText : public tools::WeakBase< SdrText >
{
public:
SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = 0 );
diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx
index 1b8c0f76b8b2..717b1a070c6f 100644
--- a/svx/inc/svx/svdundo.hxx
+++ b/svx/inc/svx/svdundo.hxx
@@ -484,6 +484,35 @@ public:
virtual bool CanSdrRepeat(SdrView& rView) const;
};
+// --> OD 2009-07-09 #i73249#
+class SdrUndoObjStrAttr : public SdrUndoObj
+{
+public:
+ enum ObjStrAttrType
+ {
+ OBJ_NAME,
+ OBJ_TITLE,
+ OBJ_DESCRIPTION
+ };
+
+protected:
+ const ObjStrAttrType meObjStrAttr;
+ const String msOldStr;
+ const String msNewStr;
+
+public:
+ SdrUndoObjStrAttr( SdrObject& rNewObj,
+ const ObjStrAttrType eObjStrAttr,
+ const String& sOldStr,
+ const String& sNewStr);
+
+ virtual void Undo();
+ virtual void Redo();
+
+ virtual String GetComment() const;
+};
+// <--
+
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// @@ @@@@ @@ @@ @@@@@ @@@@@
@@ -754,7 +783,7 @@ protected:
SdrUndoPageMasterPage(SdrPage& rChangedPage);
public:
- virtual ~SdrUndoPageMasterPage();
+ SVX_DLLPUBLIC virtual ~SdrUndoPageMasterPage();
};
//************************************************************
@@ -827,6 +856,13 @@ public:
virtual SdrUndoAction* CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer );
virtual SdrUndoAction* CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
+ // --> OD 2009-07-09 #i73249#
+ virtual SdrUndoAction* CreateUndoObjectStrAttr( SdrObject& rObject,
+ SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
+ String sOldStr,
+ String sNewStr );
+ // <--
+
// layer
virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
diff --git a/svx/inc/svx/svx3ditems.hxx b/svx/inc/svx/svx3ditems.hxx
index a77a9c3f8459..e956edb69803 100644
--- a/svx/inc/svx/svx3ditems.hxx
+++ b/svx/inc/svx/svx3ditems.hxx
@@ -48,12 +48,12 @@ public:
class Svx3DBackscaleItem : public SfxUInt16Item {
public:
- Svx3DBackscaleItem(sal_uInt16 nVal = 100);
+ SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100);
};
class Svx3DDepthItem : public SfxUInt32Item {
public:
- Svx3DDepthItem(sal_uInt32 nVal = 1000);
+ SVX_DLLPUBLIC Svx3DDepthItem(sal_uInt32 nVal = 1000);
};
class SVX_DLLPUBLIC Svx3DHorizontalSegmentsItem : public SfxUInt32Item {
@@ -63,12 +63,12 @@ public:
class Svx3DVerticalSegmentsItem : public SfxUInt32Item {
public:
- Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24);
+ SVX_DLLPUBLIC Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24);
};
class Svx3DEndAngleItem : public SfxUInt32Item {
public:
- Svx3DEndAngleItem(sal_uInt32 nVal = 3600);
+ SVX_DLLPUBLIC Svx3DEndAngleItem(sal_uInt32 nVal = 3600);
};
class SVX_DLLPUBLIC Svx3DDoubleSidedItem : public SfxBoolItem {
@@ -85,29 +85,29 @@ public:
virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
};
-class Svx3DNormalsKindItem : public SfxUInt16Item {
+class SVX_DLLPUBLIC Svx3DNormalsKindItem : public SfxUInt16Item {
public:
Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
// use drawing::NormalsKind
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
};
class Svx3DNormalsInvertItem : public SfxBoolItem {
public:
- Svx3DNormalsInvertItem(BOOL bVal = 0);
+ SVX_DLLPUBLIC Svx3DNormalsInvertItem(BOOL bVal = 0);
};
-class Svx3DTextureProjectionXItem : public SfxUInt16Item {
+class SVX_DLLPUBLIC Svx3DTextureProjectionXItem : public SfxUInt16Item {
public:
Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
// use drawing::TextureProjectionMode
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
};
class SVX_DLLPUBLIC Svx3DTextureProjectionYItem : public SfxUInt16Item {
@@ -122,7 +122,7 @@ public:
class Svx3DShadow3DItem : public SfxBoolItem {
public:
- Svx3DShadow3DItem(BOOL bVal = 0);
+ SVX_DLLPUBLIC Svx3DShadow3DItem(BOOL bVal = 0);
};
class Svx3DMaterialColorItem : public SvxColorItem {
@@ -132,68 +132,68 @@ public:
class Svx3DMaterialEmissionItem : public SvxColorItem {
public:
- Svx3DMaterialEmissionItem(const Color& rCol = Color(0x00000000));
+ SVX_DLLPUBLIC Svx3DMaterialEmissionItem(const Color& rCol = Color(0x00000000));
};
class Svx3DMaterialSpecularItem : public SvxColorItem {
public:
- Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff));
+ SVX_DLLPUBLIC Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff));
};
class Svx3DMaterialSpecularIntensityItem : public SfxUInt16Item {
public:
- Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15);
+ SVX_DLLPUBLIC Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15);
};
-class Svx3DTextureKindItem : public SfxUInt16Item {
+class SVX_DLLPUBLIC Svx3DTextureKindItem : public SfxUInt16Item {
public:
Svx3DTextureKindItem(sal_uInt16 nVal = 3);
// use drawing::TextureKind
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
};
-class Svx3DTextureModeItem : public SfxUInt16Item {
+class SVX_DLLPUBLIC Svx3DTextureModeItem : public SfxUInt16Item {
public:
Svx3DTextureModeItem(sal_uInt16 nVal = 2);
// use drawing:TextureMode
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
};
class Svx3DTextureFilterItem : public SfxBoolItem {
public:
- Svx3DTextureFilterItem(BOOL bVal = 0);
+ SVX_DLLPUBLIC Svx3DTextureFilterItem(BOOL bVal = 0);
};
// Svx3D _3DSCENE_ Items
-class Svx3DPerspectiveItem : public SfxUInt16Item {
+class SVX_DLLPUBLIC Svx3DPerspectiveItem : public SfxUInt16Item {
public:
Svx3DPerspectiveItem(sal_uInt16 nVal = (sal_uInt16)PR_PERSPECTIVE);
// use drawing::ProjectionMode
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
};
class Svx3DDistanceItem : public SfxUInt32Item {
public:
- Svx3DDistanceItem(sal_uInt32 nVal = 100);
+ SVX_DLLPUBLIC Svx3DDistanceItem(sal_uInt32 nVal = 100);
};
class Svx3DFocalLengthItem : public SfxUInt32Item {
public:
- Svx3DFocalLengthItem(sal_uInt32 nVal = 100);
+ SVX_DLLPUBLIC Svx3DFocalLengthItem(sal_uInt32 nVal = 100);
};
class Svx3DTwoSidedLightingItem : public SfxBoolItem {
public:
- Svx3DTwoSidedLightingItem(BOOL bVal = 0);
+ SVX_DLLPUBLIC Svx3DTwoSidedLightingItem(BOOL bVal = 0);
};
class SVX_DLLPUBLIC Svx3DLightcolor1Item : public SvxColorItem {
@@ -323,17 +323,17 @@ public:
class Svx3DShadowSlantItem : public SfxUInt16Item {
public:
- Svx3DShadowSlantItem(sal_uInt16 nVal = 0);
+ SVX_DLLPUBLIC Svx3DShadowSlantItem(sal_uInt16 nVal = 0);
};
-class Svx3DShadeModeItem : public SfxUInt16Item {
+class SVX_DLLPUBLIC Svx3DShadeModeItem : public SfxUInt16Item {
public:
Svx3DShadeModeItem(sal_uInt16 nVal = 2);
// use drawing::ShadeMode
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
+ SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
};
//////////////////////////////////////////////////////////////////////////////
@@ -362,19 +362,19 @@ public:
};
// #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
-class Svx3DCloseFrontItem : public SfxBoolItem {
+class SVX_DLLPUBLIC Svx3DCloseFrontItem : public SfxBoolItem {
public:
Svx3DCloseFrontItem(BOOL bVal = 1);
- virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
- virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
+ SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
};
// #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
-class Svx3DCloseBackItem : public SfxBoolItem {
+class SVX_DLLPUBLIC Svx3DCloseBackItem : public SfxBoolItem {
public:
Svx3DCloseBackItem(BOOL bVal = 1);
- virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
- virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const;
+ SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const;
};
#endif // _SVX3DITEMS_HXX
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index 233c7956f18a..e4b3b6152022 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.hxx
@@ -347,6 +347,13 @@ public:
virtual sal_Int32 getColumns() const = 0;
};
+class SvxAbstractInsRowColDlg : public VclAbstractDialog
+{
+public:
+ virtual bool isInsertBefore() const = 0;
+ virtual sal_uInt16 getInsertCount() const = 0;
+};
+
//-------------------------------------------------------------
class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory
@@ -543,6 +550,8 @@ public:
virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0;
virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0;
+
+ virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ) = 0;
};
#endif
diff --git a/svx/inc/svx/svxenum.hxx b/svx/inc/svx/svxenum.hxx
index 235128039fe4..01a7d80d1351 100644
--- a/svx/inc/svx/svxenum.hxx
+++ b/svx/inc/svx/svxenum.hxx
@@ -143,49 +143,6 @@ enum SvxCellOrientation
SVX_ORIENTATION_STACKED
};
-enum SvxPaper
-{
- SVX_PAPER_A0,
- SVX_PAPER_A1,
- SVX_PAPER_A2,
- SVX_PAPER_A3, // Aus SV.XXX
- SVX_PAPER_A4,
- SVX_PAPER_A5,
- SVX_PAPER_B4,
- SVX_PAPER_B5,
- SVX_PAPER_LETTER,
- SVX_PAPER_LEGAL,
- SVX_PAPER_TABLOID,
- SVX_PAPER_USER,
- SVX_PAPER_B6, // SVX_-Erweiterungen
- SVX_PAPER_C4,
- SVX_PAPER_C5,
- SVX_PAPER_C6,
- SVX_PAPER_C65,
- SVX_PAPER_DL,
- SVX_PAPER_DIA,
- SVX_PAPER_SCREEN,
- SVX_PAPER_A,
- SVX_PAPER_B,
- SVX_PAPER_C,
- SVX_PAPER_D,
- SVX_PAPER_E,
- SVX_PAPER_EXECUTIVE,
- SVX_PAPER_LEGAL2,
- SVX_PAPER_MONARCH,
- SVX_PAPER_COM675,
- SVX_PAPER_COM9,
- SVX_PAPER_COM10,
- SVX_PAPER_COM11,
- SVX_PAPER_COM12,
- SVX_PAPER_KAI16,
- SVX_PAPER_KAI32,
- SVX_PAPER_KAI32BIG,
- SVX_PAPER_B4_JIS,
- SVX_PAPER_B5_JIS,
- SVX_PAPER_B6_JIS
-};
-
enum SvxDrawToolEnum
{
SVX_SNAP_DRAW_SELECT,
diff --git a/svx/inc/svx/svxfont.hxx b/svx/inc/svx/svxfont.hxx
index b0165d73f978..cab43c06628c 100644
--- a/svx/inc/svx/svxfont.hxx
+++ b/svx/inc/svx/svxfont.hxx
@@ -70,7 +70,8 @@ public:
inline void SetCaseMap( const SvxCaseMap eNew ) { eCaseMap = eNew; }
inline LanguageType GetLanguage() const { return eLang; }
- inline void SetLanguage( const LanguageType eNewLan ) { eLang = eNewLan; }
+ inline void SetLanguage( const LanguageType eNewLan )
+ { eLang = eNewLan; Font::SetLanguage(eNewLan); }
// Is-Methoden:
inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; }
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index d7c018bedaac..4e3b1ebf4889 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -377,7 +377,6 @@
#define SID_FRAME_UP (SID_SC_START + 407)
#define SID_FRAME_DOWN (SID_SC_START + 408)
#define SID_ENTER_STRING (SID_SC_START + 476)
-#define SID_INSERT_POSTIT (SID_SC_START + 276)
#define SID_ATTR_SECIALCHAR (SID_SC_START + 581)
#define SID_ATTR_SPECIALCHAR (SID_SC_START + 581)
@@ -831,7 +830,11 @@
#define SID_OFASLOTS_START ( SID_SVX_START + 425 )
//#define SID_SD_AUTOPILOT ( SID_SVX_START + 425 ) -> sfxsids.hrc
#define SID_AUTOPILOT SID_SD_AUTOPILOT
-// 4 defines of Writer's old wizards have been removed here
+
+#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 ( SID_SVX_START + 428 )
+
#define SID_TABLEDESIGN ( SID_SVX_START + 429 )
#define SID_MN_AUTOPILOT ( SID_SVX_START + 430 )
#define SID_GENERAL_OPTIONS ( SID_SVX_START + 432 )
@@ -1174,7 +1177,6 @@
#define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_SVX_START + 919 )
#define SID_ATTR_CHAR_RELIEF ( SID_SVX_START + 920 )
#define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 )
-#define SID_CLIPBOARD_FORMAT_ITEMS ( SID_SVX_START + 922 )
#define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 )
#define SID_GETREDOSTRINGS ( SID_SVX_START + 924 )
#define SID_PARA_VERTALIGN ( SID_SVX_START + 925 )
@@ -1347,9 +1349,19 @@
#define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090)
#define SID_RECHECK_DOCUMENT (SID_SVX_START+1091)
#define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092)
+#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_SHOW_POSTIT (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)
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE SID_ATTR_PARA_OUTLINE_LEVEL + 1
+#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1
// --------------------------------------------------------------------------
// Overflow check for slot IDs
diff --git a/svx/inc/svx/sxfiitm.hxx b/svx/inc/svx/sxfiitm.hxx
index 27690098aad6..3228dee660e7 100644
--- a/svx/inc/svx/sxfiitm.hxx
+++ b/svx/inc/svx/sxfiitm.hxx
@@ -40,7 +40,7 @@
class SdrFractionItem: public SfxPoolItem {
Fraction nValue;
public:
- TYPEINFO();
+ TYPEINFO_VISIBILITY( SVX_DLLPUBLIC );
SdrFractionItem(USHORT nId=0): SfxPoolItem(nId) {}
SdrFractionItem(USHORT nId, const Fraction& rVal): SfxPoolItem(nId), nValue(rVal) {}
SdrFractionItem(USHORT nId, SvStream& rIn);
diff --git a/svx/inc/svx/tstpitem.hxx b/svx/inc/svx/tstpitem.hxx
index c8333252b8f0..58c9a6400aed 100644
--- a/svx/inc/svx/tstpitem.hxx
+++ b/svx/inc/svx/tstpitem.hxx
@@ -53,11 +53,13 @@ private:
long nTabPos;
SvxTabAdjust eAdjustment;
- sal_Unicode cDecimal;
+ mutable sal_Unicode m_cDecimal;
sal_Unicode cFill;
SVX_DLLPRIVATE friend SvStream& operator<<( SvStream&, SvxTabStop& );
+ void fillDecimal() const;
+
public:
SvxTabStop();
#if (_MSC_VER < 1300)
@@ -78,8 +80,8 @@ public:
SvxTabAdjust& GetAdjustment() { return eAdjustment; }
SvxTabAdjust GetAdjustment() const { return eAdjustment; }
- sal_Unicode& GetDecimal() { return cDecimal; }
- sal_Unicode GetDecimal() const { return cDecimal; }
+ sal_Unicode& GetDecimal() { fillDecimal(); return m_cDecimal; }
+ sal_Unicode GetDecimal() const { fillDecimal(); return m_cDecimal; }
sal_Unicode& GetFill() { return cFill; }
sal_Unicode GetFill() const { return cFill; }
@@ -91,7 +93,7 @@ public:
{
return ( nTabPos == rTS.nTabPos &&
eAdjustment == rTS.eAdjustment &&
- cDecimal == rTS.cDecimal &&
+ m_cDecimal == rTS.m_cDecimal &&
cFill == rTS.cFill );
}
@@ -105,7 +107,7 @@ public:
{
nTabPos = rTS.nTabPos;
eAdjustment = rTS.eAdjustment;
- cDecimal = rTS.cDecimal;
+ m_cDecimal = rTS.m_cDecimal;
cFill = rTS.cFill;
return *this;
}
diff --git a/svx/inc/svx/unoedsrc.hxx b/svx/inc/svx/unoedsrc.hxx
index 3eafa5795893..a4777b6469b4 100644
--- a/svx/inc/svx/unoedsrc.hxx
+++ b/svx/inc/svx/unoedsrc.hxx
@@ -31,6 +31,8 @@
#ifndef _SVX_UNOEDSRC_HXX
#define _SVX_UNOEDSRC_HXX
+#include <com/sun/star/accessibility/TextSegment.hpp>
+
#include <tools/solar.h>
#include <i18npool/lang.h>
#include <tools/link.hxx>
@@ -358,6 +360,36 @@ public:
*/
virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0;
+ /** Query bounds of line in paragraph
+
+ @param rStart [output param; 0 .. text_len]
+ The index in the paragraph text that belongs to the chara at the start of the line
+
+ @param rEnd [output param; 0 .. text_len]
+ The index in the paragraph text that follows the last chara in the line
+
+ @param nParagraph[0 .. n-1]
+ Index of paragraph to query line length in
+
+ @param nLine[0 .. m-1]
+ Index of line in paragraph to query line length of
+
+ */
+ virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0;
+
+ /** Query the line number for a index in the paragraphs text
+
+ @param nPara[0 .. n-1]
+ Index of paragraph to query line length in
+
+ @param nIndex[0 .. m-1]
+ Index of of the chara in the paragraph text
+
+ @returns [0 .. k-1]
+ The line number of the chara in the paragraph
+ */
+ virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0;
+
/** Delete given text range and reformat text
@param rSelection
diff --git a/svx/inc/svx/unofield.hxx b/svx/inc/svx/unofield.hxx
index 0df683bd879d..ad819e1b9dbe 100644
--- a/svx/inc/svx/unofield.hxx
+++ b/svx/inc/svx/unofield.hxx
@@ -39,7 +39,7 @@
#include <cppuhelper/component.hxx>
#include "svx/svxdllapi.h"
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <svx/mutxhelp.hxx>
@@ -74,7 +74,7 @@ class SVX_DLLPUBLIC SvxUnoTextField : public SvxMutexHelper,
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > mxAnchor;
- SfxItemPropertySet* mpPropSet;
+ const SfxItemPropertySet* mpPropSet;
sal_Int32 mnServiceId;
SvxUnoFieldData_Impl* mpImpl;
diff --git a/svx/inc/svx/unofored.hxx b/svx/inc/svx/unofored.hxx
index e912e5e4e593..a9c72f766a35 100644
--- a/svx/inc/svx/unofored.hxx
+++ b/svx/inc/svx/unofored.hxx
@@ -81,6 +81,8 @@ public:
virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
virtual USHORT GetLineCount( USHORT nPara ) const;
virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
+ virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
+ virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
diff --git a/svx/inc/svx/unoforou.hxx b/svx/inc/svx/unoforou.hxx
index 91ef33cae3b7..75adcc620a47 100644
--- a/svx/inc/svx/unoforou.hxx
+++ b/svx/inc/svx/unoforou.hxx
@@ -102,6 +102,8 @@ public:
virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
virtual USHORT GetLineCount( USHORT nPara ) const;
virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
+ virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const;
+ virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
diff --git a/svx/inc/svx/unoipset.hxx b/svx/inc/svx/unoipset.hxx
index 49b377d6fc2f..b16079e515cd 100644
--- a/svx/inc/svx/unoipset.hxx
+++ b/svx/inc/svx/unoipset.hxx
@@ -34,44 +34,46 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "svx/svxdllapi.h"
+#include <svtools/itemprop.hxx>
class SvxIDPropertyCombineList;
class SdrItemPool;
-struct SfxItemPropertyMap;
class SfxItemSet;
class SvxShape;
class SVX_DLLPUBLIC SvxItemPropertySet
{
- const SfxItemPropertyMap* _pMap;
- const SfxItemPropertyMap* mpLastMap;
+ SfxItemPropertyMap m_aPropertyMap;
+ mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
+ const SfxItemPropertyMapEntry* _pMap;
SvxIDPropertyCombineList* pCombiList;
sal_Bool mbConvertTwips;
public:
- SvxItemPropertySet( const SfxItemPropertyMap *pMap, sal_Bool bConvertTwips = sal_False );
+ SvxItemPropertySet( const SfxItemPropertyMapEntry *pMap, sal_Bool bConvertTwips = sal_False );
~SvxItemPropertySet();
// Methoden, die direkt mit dem ItemSet arbeiten
- ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertyMap* pMap, const SfxItemSet& rSet ) const;
- void setPropertyValue( const SfxItemPropertyMap* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet ) const;
+ ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) const;
+ void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet ) const;
// Methoden, die stattdessen Any benutzen
- ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertyMap* pMap ) const;
- void setPropertyValue( const SfxItemPropertyMap* pMap, const ::com::sun::star::uno::Any& rVal ) const;
+ ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const;
+ void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal ) const;
// Properties von einem anderen Set uebernehmen
- void ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet, SfxItemSet& rSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet );
- sal_Bool AreThereOwnUsrAnys() { return (pCombiList ? sal_True : sal_False); }
+ void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet, SfxItemSet& rSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet )const;
+ sal_Bool AreThereOwnUsrAnys() const { return (pCombiList ? sal_True : sal_False); }
::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const;
void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID);
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
- const SfxItemPropertyMap* getPropertyMap() const {return _pMap;}
- void setPropertyMap( const SfxItemPropertyMap *pMap ) { _pMap = pMap; }
- const SfxItemPropertyMap* getPropertyMapEntry(const ::rtl::OUString &rName) const;
+ const SfxItemPropertyMapEntry* getPropertyMapEntries() const {return _pMap;}
+ //void setPropertyMap( const SfxItemPropertyMapEntry *pMap ) { _pMap = pMap; }
+ const SfxItemPropertyMap* getPropertyMap()const { return &m_aPropertyMap;}
+ const SfxItemPropertySimpleEntry* getPropertyMapEntry(const ::rtl::OUString &rName) const;
- static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > getPropertySetInfo( const SfxItemPropertyMap* pMap );
+ static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > getPropertySetInfo( const SfxItemPropertyMapEntry* pMap );
};
#endif // _SVX_UNOIPSET_HXX_
diff --git a/svx/inc/svx/unopage.hxx b/svx/inc/svx/unopage.hxx
index f985d6e9b057..39caa0849ec6 100644
--- a/svx/inc/svx/unopage.hxx
+++ b/svx/inc/svx/unopage.hxx
@@ -49,7 +49,7 @@
#include "svx/svxdllapi.h"
#include <cppuhelper/implbase5.hxx>
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <svx/unoprov.hxx>
diff --git a/svx/inc/svx/unoprov.hxx b/svx/inc/svx/unoprov.hxx
index ff279d4e7a11..ebe1e375f58c 100644
--- a/svx/inc/svx/unoprov.hxx
+++ b/svx/inc/svx/unoprov.hxx
@@ -37,6 +37,7 @@
#include <tools/list.hxx>
#include "svx/svxdllapi.h"
+class SvxItemPropertySet;
/***********************************************************************
* class UHashMap *
***********************************************************************/
@@ -95,17 +96,21 @@ public:
#define SVXMAP_CUSTOMSHAPE 22
#define SVXMAP_MEDIA 23
#define SVXMAP_TABLE 24
-#define SVXMAP_END 25 // last+1 !
+#define SVXMAP_PAGE 25
+#define SVXMAP_END 26 // last+1 !
/***********************************************************************
* SvxUnoPropertyMapProvider *
***********************************************************************/
class SVX_DLLPUBLIC SvxUnoPropertyMapProvider
{
- SfxItemPropertyMap* aMapArr[SVXMAP_END];
- void Sort(USHORT nId);
+ SfxItemPropertyMapEntry* aMapArr[SVXMAP_END];
+ SvxItemPropertySet* aSetArr[SVXMAP_END];
+// void Sort(USHORT nId);
public:
SvxUnoPropertyMapProvider();
- SfxItemPropertyMap* GetMap(UINT16 nPropertyId);
+ ~SvxUnoPropertyMapProvider();
+ const SfxItemPropertyMapEntry* GetMap(UINT16 nPropertyId);
+ const SvxItemPropertySet* GetPropertySet(UINT16 nPropertyId);
};
/***********************************************************************
@@ -161,7 +166,7 @@ namespace comphelper { class PropertySetInfo; }
class SvxPropertySetInfoPool
{
public:
- static comphelper::PropertySetInfo* getOrCreate( sal_Int32 nServiceId ) throw();
+ SVX_DLLPUBLIC static comphelper::PropertySetInfo* getOrCreate( sal_Int32 nServiceId ) throw();
private:
static comphelper::PropertySetInfo* mpInfos[SVXUNO_SERVICEID_LASTID+1];
diff --git a/svx/inc/svx/unoshape.hxx b/svx/inc/svx/unoshape.hxx
index fe8cd8a93e2a..f400376a6937 100644
--- a/svx/inc/svx/unoshape.hxx
+++ b/svx/inc/svx/unoshape.hxx
@@ -40,9 +40,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XAggregation.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
-#ifndef _COM_SUN_STAR_UNO_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/PolygonKind.hpp>
#include <com/sun/star/container/XNamed.hpp>
@@ -62,7 +60,7 @@
#include <svx/svdouno.hxx>
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase12.hxx>
@@ -109,8 +107,7 @@ class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper,
public SfxListener,
public SvxShapeMutex
{
- private:
- SVX_DLLPRIVATE void Init() throw();
+private:
::com::sun::star::awt::Size maSize;
::com::sun::star::awt::Point maPosition;
::rtl::OUString maShapeType;
@@ -127,11 +124,8 @@ protected:
friend class SvxShapeConnector;
friend class SdXShape;
- SvxItemPropertySet maPropSet;
-
- // for xComponent
- ::cppu::OInterfaceContainerHelper maDisposeListeners;
- bool mbDisposing;
+ const SvxItemPropertySet* mpPropSet;
+ const SfxItemPropertyMapEntry* maPropMapEntries;
::tools::WeakReference< SdrObject > mpObj;
SdrModel* mpModel;
@@ -143,7 +137,7 @@ protected:
void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
// <--
- ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const;
+ ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const;
sal_Bool tryQueryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& rAny );
@@ -158,26 +152,26 @@ protected:
/** used from the XActionLockable interface */
sal_uInt16 mnLockCount;
- const SfxItemPropertyMap* getPropertyMap() const { return maPropSet.getPropertyMap(); }
+ const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
void updateShapeKind();
void endSetPropertyValues();
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual bool setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
public:
SvxShape( SdrObject* pObj ) throw ();
- SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw ();
SvxShape() throw ();
virtual ~SvxShape() throw ();
// Internals
- void ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw ();
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+ void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet);
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
/** takes the ownership of the SdrObject.
When the shape is disposed, and it has the ownership of its associated SdrObject, then
@@ -189,12 +183,14 @@ public:
void ChangeModel( SdrModel* pNewModel );
void InvalidateSdrObject() { mpObj.reset( NULL ); };
- SvxItemPropertySet& GetPropertySet() { return maPropSet; }
+ const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; }
SdrObject* GetSdrObject() const {return mpObj.get();}
void SetShapeType( const ::rtl::OUString& ShapeType ) { maShapeType = ShapeType; }
::com::sun::star::uno::Any GetBitmap( BOOL bMetaFile = FALSE ) const throw ();
static SvxShape* GetShapeForSdrObj( SdrObject* pObj ) throw ();
+ ::svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
+
void setShapeKind( sal_uInt32 nKind );
sal_uInt32 getShapeKind() const;
@@ -206,8 +202,9 @@ public:
and the property found is returned instead of set at the object
directly.
*/
- static ::com::sun::star::uno::Any SAL_CALL GetFillAttributeByName(
- const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel );
+// os: unused function
+// static ::com::sun::star::uno::Any SAL_CALL GetFillAttributeByName(
+// const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel );
UNO3_GETIMPLEMENTATION_DECL( SvxShape )
@@ -232,10 +229,11 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
- /** called from SdrObject::SendUserCall
- Currently only called for SDRUSERCALL_CHILD_CHGATTR
+ /** @obsolete
+ not used anymore
*/
virtual void onUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect);
+
// XAggregation
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
@@ -317,6 +315,13 @@ public:
virtual void SAL_CALL removeActionLock( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int16 SAL_CALL resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL
+ */
+ SVX_DLLPRIVATE void impl_initFromSdrObject();
+ /// CTOR-Impl
+ SVX_DLLPRIVATE void impl_construct();
};
#include <svx/unotext.hxx>
@@ -335,18 +340,18 @@ protected:
using SvxUnoTextRangeBase::getPropertyValue;
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual bool setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
public:
SvxShapeText() throw ();
SvxShapeText( SdrObject* pObj ) throw ();
- SvxShapeText( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
virtual ~SvxShapeText() throw ();
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -406,7 +411,7 @@ public:
SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw ();
virtual ~SvxShapeGroup() throw ();
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -571,15 +576,15 @@ class SVX_DLLPUBLIC SvxOle2Shape : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
void resetModifiedState();
const SvGlobalName GetClassName_Impl(rtl::OUString& rHexCLSID);
public:
SvxOle2Shape( SdrObject* pObj ) throw();
- SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
virtual ~SvxOle2Shape() throw();
sal_Bool createObject( const SvGlobalName &aClassName );
@@ -606,8 +611,8 @@ protected:
using SvxUnoTextRangeBase::getPropertyValue;
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxShapePolyPolygon( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_LINE ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::beans::PropertyVetoException);
@@ -637,8 +642,8 @@ protected:
public:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
virtual ~SvxShapePolyPolygonBezier() throw();
@@ -662,8 +667,8 @@ protected:
using SvxUnoTextRangeBase::getPropertyValue;
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxGraphicObject( SdrObject* pObj ) throw();
@@ -685,12 +690,12 @@ protected:
public:
Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw();
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~Svx3DSceneObject() throw();
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw();
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -725,8 +730,8 @@ class Svx3DCubeObject : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
Svx3DCubeObject( SdrObject* pObj ) throw();
@@ -745,8 +750,8 @@ public:
Svx3DSphereObject( SdrObject* pObj ) throw();
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~Svx3DSphereObject() throw();
@@ -761,8 +766,8 @@ class Svx3DLatheObject : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
Svx3DLatheObject( SdrObject* pObj ) throw();
@@ -781,8 +786,8 @@ public:
Svx3DExtrudeObject( SdrObject* pObj ) throw();
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~Svx3DExtrudeObject() throw();
@@ -797,8 +802,8 @@ class Svx3DPolygonObject : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
Svx3DPolygonObject( SdrObject* pObj ) throw();
@@ -827,13 +832,13 @@ protected:
public:
SvxCustomShape( SdrObject* pObj ) throw ();
// overide these for special property handling in subcasses. Return true if property is handled
- //virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ //virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertyMapEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~SvxCustomShape() throw ();
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw();
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -873,8 +878,8 @@ public:
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
};
#endif
diff --git a/svx/inc/svx/unoshtxt.hxx b/svx/inc/svx/unoshtxt.hxx
index e8d8e2b76f6c..6027191d222e 100644
--- a/svx/inc/svx/unoshtxt.hxx
+++ b/svx/inc/svx/unoshtxt.hxx
@@ -35,9 +35,14 @@
#include <svx/unoedsrc.hxx>
#include "svx/svxdllapi.h"
-namespace com { namespace sun { namespace star { namespace uno {
- class XInterface;
-} } } }
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XInterface;
+ }
+ namespace accessibility {
+ struct TextSegment;
+ }
+} } }
class SvxTextForwarder;
class SdrObject;
@@ -80,7 +85,7 @@ public:
// static sal_Bool hasLevels( const SdrObject* pObject );
- // the viewforwarder interface
+ // the SvxViewForwarder interface
virtual BOOL IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point&, const MapMode& ) const;
diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx
index 93005f2eeafb..63ce0a28b739 100644
--- a/svx/inc/svx/unotext.hxx
+++ b/svx/inc/svx/unotext.hxx
@@ -73,7 +73,7 @@
#include <osl/mutex.hxx>
#include "svx/svxdllapi.h"
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#ifndef SEQTYPE
#if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)
@@ -231,6 +231,8 @@ public:
virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
virtual USHORT GetLineCount( USHORT nPara ) const;
virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
+ virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
+ virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
@@ -268,7 +270,7 @@ class SVX_DLLPUBLIC SvxUnoTextRangeBase : public ::com::sun::star::text::XTextRa
protected:
SvxEditSource* mpEditSource;
ESelection maSelection;
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
virtual void SAL_CALL _setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL _getPropertyValue( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -276,22 +278,22 @@ protected:
virtual void SAL_CALL _setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues, sal_Int32 nPara = -1 ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL _getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, sal_Int32 nPara = -1 ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const SfxItemPropertyMap* pMap, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL _getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
// returns true if property found or false if unknown property
- virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertyMap* pMap, ::com::sun::star::beans::PropertyState& rState);
+ virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState);
virtual void SAL_CALL _setPropertyToDefault( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertyMap* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException );
+ virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException );
void SetEditSource( SvxEditSource* _pEditSource ) throw();
- virtual void getPropertyValue( const SfxItemPropertyMap* pMap, com::sun::star::uno::Any& rAny, const SfxItemSet& rSet ) throw(::com::sun::star::beans::UnknownPropertyException );
- virtual void setPropertyValue( const SfxItemPropertyMap* pMap, const com::sun::star::uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException );
+ virtual void getPropertyValue( const SfxItemPropertySimpleEntry* pMap, com::sun::star::uno::Any& rAny, const SfxItemSet& rSet ) throw(::com::sun::star::beans::UnknownPropertyException );
+ virtual void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const com::sun::star::uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException );
public:
- SvxUnoTextRangeBase( const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw();
+ SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw();
SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) throw();
virtual ~SvxUnoTextRangeBase() throw();
@@ -307,11 +309,12 @@ public:
virtual void GotoStart(sal_Bool Expand) throw();
virtual void GotoEnd(sal_Bool Expand) throw();
- const SfxItemPropertyMap* getPropertyMap() const throw() { return maPropSet.getPropertyMap(); }
+ //const SfxItemPropertyMapEntry* getPropertyMapEntries() const throw() { return maPropSet.getPropertyMapEntries(); }
+ const SvxItemPropertySet* getPropertySet() const throw() { return mpPropSet; }
SvxEditSource* GetEditSource() const throw() { return mpEditSource; }
- static sal_Bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertyMap* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
- static sal_Bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertyMap* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
+ static sal_Bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
+ static sal_Bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
void attachField( const SvxFieldData* pData ) throw();
@@ -410,9 +413,9 @@ protected:
public:
SvxUnoTextBase( ) throw();
- SvxUnoTextBase( const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
+ SvxUnoTextBase( const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
SvxUnoTextBase( const SvxUnoTextBase& rText ) throw();
virtual ~SvxUnoTextBase() throw();
@@ -479,8 +482,8 @@ class SVX_DLLPUBLIC SvxUnoText : public SvxUnoTextBase,
{
public:
SvxUnoText( ) throw();
- SvxUnoText( const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
+ SvxUnoText( const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoText( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
SvxUnoText( const SvxUnoText& rText ) throw();
virtual ~SvxUnoText() throw();
@@ -672,7 +675,9 @@ public:
};
-const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
-const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap();
+SVX_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet();
+SVX_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
+SVX_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet();
+SVX_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap();
#endif
diff --git a/svx/inc/svx/xcolit.hxx b/svx/inc/svx/xcolit.hxx
index 719ef1a48fc2..e8d041079652 100644
--- a/svx/inc/svx/xcolit.hxx
+++ b/svx/inc/svx/xcolit.hxx
@@ -48,7 +48,7 @@ class SVX_DLLPUBLIC XColorItem : public NameOrIndex
public:
TYPEINFO();
XColorItem() {}
- XColorItem(USHORT nWhich, long nIndex, const Color& rTheColor);
+ XColorItem(USHORT nWhich, INT32 nIndex, const Color& rTheColor);
virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
diff --git a/svx/inc/svx/xflbckit.hxx b/svx/inc/svx/xflbckit.hxx
index 8f4de04218df..2744982b8639 100644
--- a/svx/inc/svx/xflbckit.hxx
+++ b/svx/inc/svx/xflbckit.hxx
@@ -46,13 +46,13 @@ public:
TYPEINFO();
XFillBackgroundItem( BOOL bFill = FALSE );
- XFillBackgroundItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBackgroundItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
diff --git a/svx/inc/svx/xflbmpit.hxx b/svx/inc/svx/xflbmpit.hxx
index ff15f038dcd3..42117613cba4 100644
--- a/svx/inc/svx/xflbmpit.hxx
+++ b/svx/inc/svx/xflbmpit.hxx
@@ -45,18 +45,18 @@ class SVX_DLLPUBLIC XFillBmpPosItem : public SfxEnumItem
public:
TYPEINFO();
XFillBmpPosItem( RECT_POINT eRP = RP_MM );
- XFillBmpPosItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpPosItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
- virtual USHORT GetValueCount() const;
- RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); }
+ SVX_DLLPRIVATE virtual USHORT GetValueCount() const;
+ SVX_DLLPRIVATE RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); }
};
diff --git a/svx/inc/svx/xflbmsli.hxx b/svx/inc/svx/xflbmsli.hxx
index f57f4dc811d1..332bbf9792b7 100644
--- a/svx/inc/svx/xflbmsli.hxx
+++ b/svx/inc/svx/xflbmsli.hxx
@@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpSizeLogItem : public SfxBoolItem
public:
TYPEINFO();
XFillBmpSizeLogItem( BOOL bLog = TRUE );
- XFillBmpSizeLogItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpSizeLogItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
diff --git a/svx/inc/svx/xflbmsxy.hxx b/svx/inc/svx/xflbmsxy.hxx
index c9da8290daa0..78263dd2c5e3 100644
--- a/svx/inc/svx/xflbmsxy.hxx
+++ b/svx/inc/svx/xflbmsxy.hxx
@@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpSizeXItem : public SfxMetricItem
public:
TYPEINFO();
XFillBmpSizeXItem( long nSizeX = 0 );
- XFillBmpSizeXItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpSizeXItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
@@ -58,7 +58,7 @@ public:
// Dieses Item nimmt sowohl metrische als auch
// Prozentwerte ( sind negativ ) auf; das muessen
// wir hier beruecksichtigen
- virtual FASTBOOL HasMetrics() const;
+ SVX_DLLPRIVATE virtual FASTBOOL HasMetrics() const;
};
/*************************************************************************
@@ -72,12 +72,12 @@ class SVX_DLLPUBLIC XFillBmpSizeYItem : public SfxMetricItem
public:
TYPEINFO();
XFillBmpSizeYItem( long nSizeY = 0 );
- XFillBmpSizeYItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpSizeYItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
@@ -85,7 +85,7 @@ public:
// Dieses Item nimmt sowohl metrische als auch
// Prozentwerte ( sind negativ ) auf; das muessen
// wir hier beruecksichtigen
- virtual FASTBOOL HasMetrics() const;
+ SVX_DLLPRIVATE virtual FASTBOOL HasMetrics() const;
};
#endif
diff --git a/svx/inc/svx/xflboxy.hxx b/svx/inc/svx/xflboxy.hxx
index 6e9024399ef0..9f0c37f9b6b3 100644
--- a/svx/inc/svx/xflboxy.hxx
+++ b/svx/inc/svx/xflboxy.hxx
@@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpPosOffsetXItem : public SfxUInt16Item
public:
TYPEINFO();
XFillBmpPosOffsetXItem( USHORT nOffPosX = 0 );
- XFillBmpPosOffsetXItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpPosOffsetXItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
@@ -68,12 +68,12 @@ class SVX_DLLPUBLIC XFillBmpPosOffsetYItem : public SfxUInt16Item
public:
TYPEINFO();
XFillBmpPosOffsetYItem( USHORT nOffPosY = 0 );
- XFillBmpPosOffsetYItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpPosOffsetYItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
diff --git a/svx/inc/svx/xflbtoxy.hxx b/svx/inc/svx/xflbtoxy.hxx
index e01eb79ff146..828435432bb1 100644
--- a/svx/inc/svx/xflbtoxy.hxx
+++ b/svx/inc/svx/xflbtoxy.hxx
@@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpTileOffsetXItem : public SfxUInt16Item
public:
TYPEINFO();
XFillBmpTileOffsetXItem( USHORT nOffX = 0 );
- XFillBmpTileOffsetXItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpTileOffsetXItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
@@ -68,12 +68,12 @@ class SVX_DLLPUBLIC XFillBmpTileOffsetYItem : public SfxUInt16Item
public:
TYPEINFO();
XFillBmpTileOffsetYItem( USHORT nOffX = 0 );
- XFillBmpTileOffsetYItem( SvStream& rIn );
+ SVX_DLLPRIVATE XFillBmpTileOffsetYItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
diff --git a/svx/inc/svx/xflclit.hxx b/svx/inc/svx/xflclit.hxx
index 72f7728c14ab..39a382bd5e60 100644
--- a/svx/inc/svx/xflclit.hxx
+++ b/svx/inc/svx/xflclit.hxx
@@ -46,7 +46,7 @@ class SVX_DLLPUBLIC XFillColorItem : public XColorItem
public:
TYPEINFO();
XFillColorItem() {}
- XFillColorItem(long nIndex, const Color& rTheColor);
+ XFillColorItem(INT32 nIndex, const Color& rTheColor);
XFillColorItem(const String& rName, const Color& rTheColor);
XFillColorItem(SvStream& rIn);
diff --git a/svx/inc/svx/xflftrit.hxx b/svx/inc/svx/xflftrit.hxx
index d2c5ef8ef0b3..1e77f2a6d2e0 100644
--- a/svx/inc/svx/xflftrit.hxx
+++ b/svx/inc/svx/xflftrit.hxx
@@ -50,7 +50,7 @@ public:
TYPEINFO();
XFillFloatTransparenceItem();
- XFillFloatTransparenceItem( long nIndex, const XGradient& rGradient, BOOL bEnable = TRUE );
+ XFillFloatTransparenceItem( INT32 nIndex, const XGradient& rGradient, BOOL bEnable = TRUE );
XFillFloatTransparenceItem(const String& rName, const XGradient& rGradient, BOOL bEnable = TRUE );
XFillFloatTransparenceItem(SfxItemPool* pPool, const XGradient& rTheGradient, BOOL bEnable = TRUE );
XFillFloatTransparenceItem(SfxItemPool* pPool );
diff --git a/svx/inc/svx/xflgrit.hxx b/svx/inc/svx/xflgrit.hxx
index f463dd8f6dae..fd0a7a202c81 100644
--- a/svx/inc/svx/xflgrit.hxx
+++ b/svx/inc/svx/xflgrit.hxx
@@ -47,7 +47,7 @@ class SVX_DLLPUBLIC XFillGradientItem : public NameOrIndex
public:
TYPEINFO();
XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1) {}
- XFillGradientItem(long nIndex, const XGradient& rTheGradient);
+ XFillGradientItem(INT32 nIndex, const XGradient& rTheGradient);
XFillGradientItem(const UniString& rName, const XGradient& rTheGradient);
XFillGradientItem(SfxItemPool* pPool, const XGradient& rTheGradient);
XFillGradientItem(SfxItemPool* pPool );
diff --git a/svx/inc/svx/xflhtit.hxx b/svx/inc/svx/xflhtit.hxx
index 30686200f298..212977c87a1f 100644
--- a/svx/inc/svx/xflhtit.hxx
+++ b/svx/inc/svx/xflhtit.hxx
@@ -47,7 +47,7 @@ class SVX_DLLPUBLIC XFillHatchItem : public NameOrIndex
public:
TYPEINFO();
XFillHatchItem() : NameOrIndex(XATTR_FILLHATCH, -1) {}
- XFillHatchItem(long nIndex, const XHatch& rTheHatch);
+ XFillHatchItem(INT32 nIndex, const XHatch& rTheHatch);
XFillHatchItem(const String& rName, const XHatch& rTheHatch);
XFillHatchItem(SfxItemPool* pPool, const XHatch& rTheHatch);
XFillHatchItem(SfxItemPool* pPool );
diff --git a/svx/inc/svx/xftshcit.hxx b/svx/inc/svx/xftshcit.hxx
index 9668b01441dc..7f767d163278 100644
--- a/svx/inc/svx/xftshcit.hxx
+++ b/svx/inc/svx/xftshcit.hxx
@@ -45,7 +45,7 @@ class SVX_DLLPUBLIC XFormTextShadowColorItem : public XColorItem
public:
TYPEINFO();
XFormTextShadowColorItem() {}
- XFormTextShadowColorItem(long nIndex, const Color& rTheColor);
+ XFormTextShadowColorItem(INT32 nIndex, const Color& rTheColor);
XFormTextShadowColorItem(const String& rName, const Color& rTheColor);
XFormTextShadowColorItem(SvStream& rIn);
diff --git a/svx/inc/svx/xit.hxx b/svx/inc/svx/xit.hxx
index 2eaaa1629ef2..993f16eb1f43 100644
--- a/svx/inc/svx/xit.hxx
+++ b/svx/inc/svx/xit.hxx
@@ -54,7 +54,7 @@ typedef BOOL (*SvxCompareValueFunc)( const NameOrIndex* p1, const NameOrIndex* p
//-------------------
class SVX_DLLPUBLIC NameOrIndex : public SfxStringItem
{
- long nPalIndex;
+ INT32 nPalIndex;
protected:
void Detach() { nPalIndex = -1; }
@@ -62,7 +62,7 @@ protected:
public:
TYPEINFO();
NameOrIndex() { nPalIndex = -1; }
- NameOrIndex(USHORT nWhich, long nIndex);
+ NameOrIndex(USHORT nWhich, INT32 nIndex);
NameOrIndex(USHORT nWhich,
const String& rName= String());
NameOrIndex(USHORT nWhich, SvStream& rIn);
@@ -76,8 +76,8 @@ public:
String GetName() const { return GetValue(); }
void SetName(const String& rName) { SetValue(rName); }
- long GetIndex() const { return nPalIndex; }
- void SetIndex(long nIndex) { nPalIndex = nIndex; }
+ INT32 GetIndex() const { return nPalIndex; }
+ void SetIndex(INT32 nIndex) { nPalIndex = nIndex; }
BOOL IsIndex() const { return (nPalIndex >= 0); }
/** this static checks if the given NameOrIndex item has a unique name for its value.
diff --git a/svx/inc/svx/xlnclit.hxx b/svx/inc/svx/xlnclit.hxx
index 662531856689..f3622b32ce90 100644
--- a/svx/inc/svx/xlnclit.hxx
+++ b/svx/inc/svx/xlnclit.hxx
@@ -42,7 +42,7 @@ class SVX_DLLPUBLIC XLineColorItem : public XColorItem
public:
TYPEINFO();
XLineColorItem() {}
- XLineColorItem(long nIndex, const Color& rTheColor);
+ XLineColorItem(INT32 nIndex, const Color& rTheColor);
XLineColorItem(const String& rName, const Color& rTheColor);
XLineColorItem(SvStream& rIn);
diff --git a/svx/inc/svx/xlndsit.hxx b/svx/inc/svx/xlndsit.hxx
index 355ea3f72f55..4315161b34eb 100644
--- a/svx/inc/svx/xlndsit.hxx
+++ b/svx/inc/svx/xlndsit.hxx
@@ -50,7 +50,7 @@ class SVX_DLLPUBLIC XLineDashItem : public NameOrIndex
public:
TYPEINFO();
XLineDashItem() : NameOrIndex(XATTR_LINEDASH, -1) {}
- XLineDashItem(long nIndex, const XDash& rTheDash);
+ XLineDashItem(INT32 nIndex, const XDash& rTheDash);
XLineDashItem(const String& rName, const XDash& rTheDash);
XLineDashItem(SfxItemPool* pPool, const XDash& rTheDash);
XLineDashItem(SfxItemPool* pPool );
diff --git a/svx/inc/svx/xlnedit.hxx b/svx/inc/svx/xlnedit.hxx
index fa96776a18c4..46ef12ee2937 100644
--- a/svx/inc/svx/xlnedit.hxx
+++ b/svx/inc/svx/xlnedit.hxx
@@ -46,7 +46,7 @@ class SVX_DLLPUBLIC XLineEndItem : public NameOrIndex
public:
TYPEINFO();
- XLineEndItem(long nIndex = -1);
+ XLineEndItem(INT32 nIndex = -1);
XLineEndItem(const String& rName, const basegfx::B2DPolyPolygon& rPolyPolygon);
XLineEndItem(SfxItemPool* pPool, const basegfx::B2DPolyPolygon& rPolyPolygon);
XLineEndItem(SfxItemPool* pPool );
diff --git a/svx/inc/svx/xlnstit.hxx b/svx/inc/svx/xlnstit.hxx
index 0256e078d148..1d6af8690acd 100644
--- a/svx/inc/svx/xlnstit.hxx
+++ b/svx/inc/svx/xlnstit.hxx
@@ -46,7 +46,7 @@ class SVX_DLLPUBLIC XLineStartItem : public NameOrIndex
public:
TYPEINFO();
- XLineStartItem(long nIndex = -1);
+ XLineStartItem(INT32 nIndex = -1);
XLineStartItem(const String& rName, const basegfx::B2DPolyPolygon& rPolyPolygon);
XLineStartItem(SfxItemPool* pPool, const basegfx::B2DPolyPolygon& rPolyPolygon);
XLineStartItem(SfxItemPool* pPool );
diff --git a/svx/inc/svx/xsflclit.hxx b/svx/inc/svx/xsflclit.hxx
index eebe2e723620..802d247180a8 100644
--- a/svx/inc/svx/xsflclit.hxx
+++ b/svx/inc/svx/xsflclit.hxx
@@ -36,24 +36,24 @@
//------------------------------
// class XSecondaryFillColorItem
//------------------------------
-class XSecondaryFillColorItem : public XColorItem
+class SVX_DLLPUBLIC XSecondaryFillColorItem : public XColorItem
{
public:
TYPEINFO();
- XSecondaryFillColorItem() {}
- XSecondaryFillColorItem(long nIndex, const Color& rTheColor);
+ SVX_DLLPRIVATE XSecondaryFillColorItem() {}
+ SVX_DLLPRIVATE XSecondaryFillColorItem(INT32 nIndex, const Color& rTheColor);
XSecondaryFillColorItem(const String& rName, const Color& rTheColor);
- XSecondaryFillColorItem(SvStream& rIn);
+ SVX_DLLPRIVATE XSecondaryFillColorItem(SvStream& rIn);
- virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
- virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
- virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText, const IntlWrapper * = 0 ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ SVX_DLLPRIVATE virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
};
diff --git a/svx/inc/unoapi.hxx b/svx/inc/unoapi.hxx
index 441a5779073c..afd6cbec14a9 100644
--- a/svx/inc/unoapi.hxx
+++ b/svx/inc/unoapi.hxx
@@ -97,12 +97,12 @@ SVX_DLLPUBLIC sal_Bool SvxFieldUnitToMeasureUnit( const short nVcl, short& eApi
/** if the given name is a predefined name for the current language it is replaced by
the corresponding api name.
*/
-void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw();
+SVX_DLLPUBLIC void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw();
/** if the given name is a predefined api name it is replaced by the predefined name
for the current language.
*/
-void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw();
+SVX_DLLPUBLIC void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw();
/** returns the which id for the given property name. This only works for
properties of shapes (map SVXMAP_SHAPE is used for searching)
@@ -111,13 +111,14 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString&
SfxItemPropertyMap, the search in the map is not done via bsearch, but by
linear search.
*/
-SVX_DLLPUBLIC sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName );
+// os: unused function
+//SVX_DLLPUBLIC sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName );
/** converts the given any with a metric to 100th/mm if needed */
-void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw();
+SVX_DLLPUBLIC void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw();
/** converts the given any with a metric from 100th/mm to the given metric if needed */
-void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw();
+SVX_DLLPUBLIC void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw();
#endif // _SVX_UNOAPI_HXX_
diff --git a/svx/inc/unoedhlp.hxx b/svx/inc/unoedhlp.hxx
index 83e8d52034d0..b732ba867af1 100644
--- a/svx/inc/unoedhlp.hxx
+++ b/svx/inc/unoedhlp.hxx
@@ -49,7 +49,7 @@ class EditEngine;
case denotes the destination position, the two parameters the
start and the end of the moved paragraph range.
*/
-class SvxEditSourceHint : public TextHint
+class SVX_DLLPUBLIC SvxEditSourceHint : public TextHint
{
private:
ULONG mnStart;
diff --git a/svx/inc/unolingu.hxx b/svx/inc/unolingu.hxx
index d81fe9177587..8dc76a291ceb 100644
--- a/svx/inc/unolingu.hxx
+++ b/svx/inc/unolingu.hxx
@@ -67,7 +67,7 @@ class SvxLinguConfigUpdate
public:
- static void UpdateAll( sal_Bool bForceCheck = sal_False );
+ SVX_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False );
static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False );
};
diff --git a/svx/inc/xexch.hxx b/svx/inc/xexch.hxx
index cd44f82cfd85..4042303be3ae 100644
--- a/svx/inc/xexch.hxx
+++ b/svx/inc/xexch.hxx
@@ -60,7 +60,7 @@ public:
// Zuweisungsoperator
XFillExchangeData& operator=( const XFillExchangeData& rXFillExchangeData );
- friend SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rXFillExchangeData );
+ SVX_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rXFillExchangeData );
SVX_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rXFillExchangeData );
static ULONG RegisterClipboardFormatName();
diff --git a/svx/inc/xmlgrhlp.hxx b/svx/inc/xmlgrhlp.hxx
index f36733706ab5..77e6eb0be322 100644
--- a/svx/inc/xmlgrhlp.hxx
+++ b/svx/inc/xmlgrhlp.hxx
@@ -95,7 +95,7 @@ private:
SVX_DLLPRIVATE sal_Bool ImplWriteGraphic( const ::rtl::OUString& rPictureStorageName,
const ::rtl::OUString& rPictureStreamName,
const ::rtl::OUString& rGraphicId );
- SVX_DLLPRIVATE void ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos );
+ SVX_DLLPRIVATE void ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName );
protected:
SvXMLGraphicHelper();
@@ -142,9 +142,9 @@ namespace svx
uses eCreateMode == GRAPHICHELPER_MODE_READ, bDirect == TRUE in
SvXMLGraphicHelper
*/
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw();
-::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw();
+SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
+SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw();
+SVX_DLLPUBLIC ::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw();
/** Create this with createInstanceWithArguments. service name
"com.sun.star.comp.Svx.GraphicExportHelper", one argument which is the
@@ -158,9 +158,9 @@ namespace svx
uses eCreateMode == GRAPHICHELPER_MODE_WRITE, bDirect == TRUE in
SvXMLGraphicHelper
*/
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw();
-::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw();
+SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
+SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw();
+SVX_DLLPUBLIC ::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw();
}
#endif
diff --git a/svx/inc/xoutbmp.hxx b/svx/inc/xoutbmp.hxx
index 3cefd9b60f1f..6bbbb0b1073a 100644
--- a/svx/inc/xoutbmp.hxx
+++ b/svx/inc/xoutbmp.hxx
@@ -95,6 +95,6 @@ public:
// - DitherBitmap -
// ----------------
-BOOL DitherBitmap( Bitmap& rBitmap );
+SVX_DLLPUBLIC BOOL DitherBitmap( Bitmap& rBitmap );
#endif // _XOUTBMP_HXX
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 51d1217ceae8..56980702fb2d 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -1,4 +1,4 @@
-sx svx : connectivity xmloff linguistic jvmfwk avmedia configmgr ucb fileaccess drawinglayer NULL
+sx svx : l10n connectivity xmloff linguistic jvmfwk avmedia configmgr ucb fileaccess drawinglayer NULL
sx svx usr1 - all sx_mkout NULL
sx svx\inc nmake - all sx_inc NULL
sx svx\uiconfig\layout nmake - all sx_layout NULL
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index 3b70b59970fb..7edc2fbc9c11 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -10,7 +10,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es
..\%__SRC%\inc\svxslots.ilb %_DEST%\inc%_EXT%\svxslots.ilb
..\%__SRC%\inc\*.ilb* %_DEST%\inc%_EXT%\*.ilb*
..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
-..\%__SRC%\lib\isvx.lib %_DEST%\lib%_EXT%\isvx.lib
+..\%__SRC%\lib\isvx*.lib %_DEST%\lib%_EXT%\isvx*.lib
..\%__SRC%\bin\gengal* %_DEST%\bin%_EXT%\gengal*
..\%__SRC%\bin\gengalrc %_DEST%\bin%_EXT%\gengal.ini
..\%__SRC%\bin\cui*.dll %_DEST%\bin%_EXT%\cui*.dll
@@ -218,6 +218,7 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\svdedtv.hxx %_DEST%\inc%_EXT%\svx\svdedtv.hxx
..\inc\svx\svdedxv.hxx %_DEST%\inc%_EXT%\svx\svdedxv.hxx
..\inc\svx\svdetc.hxx %_DEST%\inc%_EXT%\svx\svdetc.hxx
+..\inc\svx\sdrhittesthelper.hxx %_DEST%\inc%_EXT%\svx\sdrhittesthelper.hxx
..\inc\svx\svdglev.hxx %_DEST%\inc%_EXT%\svx\svdglev.hxx
..\inc\svx\svdglue.hxx %_DEST%\inc%_EXT%\svx\svdglue.hxx
..\inc\svx\svdhdl.hxx %_DEST%\inc%_EXT%\svx\svdhdl.hxx
@@ -254,7 +255,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\svdpoev.hxx %_DEST%\inc%_EXT%\svx\svdpoev.hxx
..\inc\svx\svdpool.hxx %_DEST%\inc%_EXT%\svx\svdpool.hxx
..\inc\svx\svdsnpv.hxx %_DEST%\inc%_EXT%\svx\svdsnpv.hxx
-..\inc\svdtouch.hxx %_DEST%\inc%_EXT%\svx\svdtouch.hxx
..\inc\svx\svdtrans.hxx %_DEST%\inc%_EXT%\svx\svdtrans.hxx
..\inc\svx\svdundo.hxx %_DEST%\inc%_EXT%\svx\svdundo.hxx
..\inc\svx\svdoutl.hxx %_DEST%\inc%_EXT%\svx\svdoutl.hxx
@@ -324,6 +324,8 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\unopage.hxx %_DEST%\inc%_EXT%\svx\unopage.hxx
..\inc\svx\unoprnms.hxx %_DEST%\inc%_EXT%\svx\unoprnms.hxx
..\inc\svx\unoshape.hxx %_DEST%\inc%_EXT%\svx\unoshape.hxx
+..\inc\svx\shapepropertynotifier.hxx %_DEST%\inc%_EXT%\svx\shapepropertynotifier.hxx
+..\inc\svx\shapeproperty.hxx %_DEST%\inc%_EXT%\svx\shapeproperty.hxx
..\inc\unoshcol.hxx %_DEST%\inc%_EXT%\svx\unoshcol.hxx
..\inc\svx\unoipset.hxx %_DEST%\inc%_EXT%\svx\unoipset.hxx
..\inc\svx\unoprov.hxx %_DEST%\inc%_EXT%\svx\unoprov.hxx
@@ -552,6 +554,8 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\inc\svx\SmartTagCtl.hxx %_DEST%\inc%_EXT%\svx\SmartTagCtl.hxx
..\inc\svx\databaselocationinput.hxx %_DEST%\inc%_EXT%\svx\databaselocationinput.hxx
..\inc\xlinjoit.hxx %_DEST%\inc%_EXT%\svx\xlinjoit.hxx
+..\inc\svx\dbcharsethelper.hxx %_DEST%\inc%_EXT%\svx\dbcharsethelper.hxx
+..\inc\svx\dbtoolsclient.hxx %_DEST%\inc%_EXT%\svx\dbtoolsclient.hxx
mkdir: %_DEST%\inc%_EXT%\svx\sdr
mkdir: %_DEST%\inc%_EXT%\svx\sdr\properties
@@ -591,11 +595,9 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\contact
mkdir: %_DEST%\inc%_EXT%\svx\sdr\overlay
..\inc\svx\sdr\overlay\overlayanimatedbitmapex.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayanimatedbitmapex.hxx
-..\inc\svx\sdr\overlay\overlaybitmap.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaybitmap.hxx
..\inc\svx\sdr\overlay\overlaybitmapex.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaybitmapex.hxx
..\inc\svx\sdr\overlay\overlayline.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayline.hxx
..\inc\svx\sdr\overlay\overlayhelpline.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayhelpline.hxx
-..\inc\svx\sdr\overlay\overlaylinestriped.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaylinestriped.hxx
..\inc\svx\sdr\overlay\overlaymanager.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaymanager.hxx
..\inc\svx\sdr\overlay\overlaymanagerbuffered.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaymanagerbuffered.hxx
..\inc\svx\sdr\overlay\overlayobject.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayobject.hxx
@@ -603,7 +605,9 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\overlay
..\inc\svx\sdr\overlay\overlaytriangle.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaytriangle.hxx
..\inc\svx\sdr\overlay\overlaypolypolygon.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaypolypolygon.hxx
..\inc\svx\sdr\overlay\overlayobjectcell.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayobjectcell.hxx
-..\inc\svx\sdr\overlay\overlaysdrobject.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaysdrobject.hxx
+..\inc\svx\sdr\overlay\overlayprimitive2dsequenceobject.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayprimitive2dsequenceobject.hxx
+..\inc\svx\sdr\overlay\overlayselection.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayselection.hxx
+..\inc\svx\sdr\overlay\overlaytools.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaytools.hxx
mkdir: %_DEST%\inc%_EXT%\svx\sdr\animation
..\inc\svx\sdr\animation\ainfographic.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfographic.hxx
diff --git a/svx/sdi/makefile.mk b/svx/sdi/makefile.mk
index 60f3cc3fb5c3..2ea64ddedbba 100644
--- a/svx/sdi/makefile.mk
+++ b/svx/sdi/makefile.mk
@@ -39,6 +39,8 @@ TARGET=svxslots
.INCLUDE : settings.mk
+.IF "$(L10N_framework)"==""
+
SDI1NAME=$(TARGET)
SDI1EXPORT=svx
@@ -53,6 +55,6 @@ SVSDI1DEPEND= \
svxitems.sdi
# --- Targets -------------------------------------------------------
-
+.ENDIF
.INCLUDE : target.mk
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index a69aae4cf9fd..e3826708c196 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1974,34 +1974,6 @@ SfxVoidItem ClearOutline SID_OUTLINE_DELETEALL
]
//--------------------------------------------------------------------------
-SfxVoidItem ClipboardFormatItems SID_CLIPBOARD_FORMAT_ITEMS
-(SfxUInt32Item SelectedFormat SID_CLIPBOARD_FORMAT_ITEMS)
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* status: */
- SlotType = SvxClipboardFmtItem
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_EDIT;
-]
-
-//--------------------------------------------------------------------------
SvxColorItem Color SID_ATTR_CHAR_COLOR
[
@@ -3797,7 +3769,7 @@ SfxObjectItem FmFilterNavigatorController SID_FM_FILTER_NAVIGATOR_CONTROL
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -4806,7 +4778,7 @@ SfxStringListItem GetRedoStrings SID_GETREDOSTRINGS
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -4833,7 +4805,7 @@ SfxStringListItem GetUndoStrings SID_GETUNDOSTRINGS
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -5982,6 +5954,185 @@ SfxVoidItem InsertAnnotation SID_INSERT_POSTIT
]
//--------------------------------------------------------------------------
+SfxBoolItem ShowAnnotations SID_SHOW_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem ReplyToAnnotation SID_REPLYTO_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem DeleteAnnotation SID_DELETE_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem DeleteAllAnnotation SID_DELETEALL_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+SfxVoidItem DeleteAllAnnotationByAuthor SID_DELETEALLBYAUTHOR_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem NextAnnotation SID_NEXT_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem PreviousAnnotation SID_PREVIOUS_POSTIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
SfxVoidItem InsertApplet SID_INSERT_APPLET
(SfxStringItem Class FN_PARAM_1,
SfxStringItem ClassLocation FN_PARAM_2,
@@ -7493,7 +7644,7 @@ SfxVoidItem OutlineBullet SID_OUTLINE_BULLET
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
@@ -8475,7 +8626,7 @@ SfxBoolItem ReadOnlyMode SID_READONLY_MODE
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = TRUE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -9347,7 +9498,7 @@ SfxVoidItem Select SID_SELECT
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
@@ -10951,7 +11102,7 @@ SfxBoolItem TwainSelect SID_TWAIN_SELECT
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
@@ -10976,7 +11127,7 @@ SfxVoidItem TwainTransfer SID_TWAIN_TRANSFER
[
/* flags: */
AutoUpdate = FALSE,
- Cachable = Volatile,
+ Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
@@ -14911,3 +15062,54 @@ SfxVoidItem RecheckDocument SID_RECHECK_DOCUMENT
GroupId = GID_DOCUMENT;
]
+//--------------------------------------------------------------------------
+
+SfxVoidItem InsertColumnDialog SID_TABLE_INSERT_COL_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+
+SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TABLE;
+]
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
index 795f2aea1177..65a59bccf3b6 100644
--- a/svx/sdi/svxitems.sdi
+++ b/svx/sdi/svxitems.sdi
@@ -668,7 +668,6 @@ struct SvxCharRotate
};
item SvxCharRotate SvxCharRotateItem;
-item String SvxClipboardFmtItem; // dummy
item String SfxSetItem; // dummy
item INT16 SvxRotateModeItem; // enum
item INT16 SvxOrientationItem; // enum
@@ -700,4 +699,3 @@ struct ZoomSlider
INT16 SvxMaxZoom MID_ZOOMSLIDER_MAXZOOM;
};
item ZoomSlider SvxZoomSliderItem;
-
diff --git a/svx/source/accessibility/AccessibleEditableTextPara.cxx b/svx/source/accessibility/AccessibleEditableTextPara.cxx
index b301fee203b0..1c0ce04bb1d6 100644
--- a/svx/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/svx/source/accessibility/AccessibleEditableTextPara.cxx
@@ -93,10 +93,10 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility
{
- const SfxItemPropertyMap* ImplGetSvxCharAndParaPropertiesMap()
+ const SvxItemPropertySet* ImplGetSvxCharAndParaPropertiesSet()
{
// PropertyMap for character and paragraph properties
- static const SfxItemPropertyMap aPropMap[] =
+ static const SfxItemPropertyMapEntry aPropMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_PARA_PROPERTIES,
@@ -105,8 +105,8 @@ namespace accessibility
{MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
{0,0,0,0,0,0}
};
-
- return aPropMap;
+ static SvxItemPropertySet aPropSet( aPropMap );
+ return &aPropSet;
}
@@ -806,7 +806,7 @@ namespace accessibility
// must provide XAccesibleText by hand, since it comes publicly inherited by XAccessibleEditableText
if ( rType == ::getCppuType((uno::Reference< XAccessibleText > *)0) )
{
- uno::Reference< XAccessibleText > aAccText = this;
+ uno::Reference< XAccessibleText > aAccText = static_cast< XAccessibleEditableText * >(this);
aRet <<= aAccText;
}
else if ( rType == ::getCppuType((uno::Reference< XAccessibleEditableText > *)0) )
@@ -912,65 +912,18 @@ namespace accessibility
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- // append first 40 characters from text, or first line, if shorter
- // (writer takes first sentence here, but that's not supported
- // from EditEngine)
- // throws if defunc
- ::rtl::OUString aLine;
-
- if( getCharacterCount() )
- aLine = getTextAtIndex(0, AccessibleTextType::LINE).SegmentText;
-
- // Get the string from the resource for the specified id.
- String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION ) );
- String sParaIndex = ::rtl::OUString::valueOf( GetParagraphIndex() );
- sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )),
- sParaIndex );
-
- if( aLine.getLength() > MaxDescriptionLen )
- {
- ::rtl::OUString aCurrWord;
- sal_Int32 i;
-
- // search backward from MaxDescriptionLen for previous word start
- for( aCurrWord=getTextAtIndex(MaxDescriptionLen, AccessibleTextType::WORD).SegmentText,
- i=MaxDescriptionLen,
- aLine=::rtl::OUString();
- i>=0;
- --i )
- {
- if( getTextAtIndex(i, AccessibleTextType::WORD).SegmentText != aCurrWord )
- {
- if( i == 0 )
- // prevent completely empty string
- aLine = getTextAtIndex(0, AccessibleTextType::WORD).SegmentText;
- else
- aLine = getTextRange(0, i);
- }
- }
- }
+// ::vos::OGuard aGuard( Application::GetSolarMutex() );
- return ::rtl::OUString( sStr ) + aLine;
+ return ::rtl::OUString();
}
::rtl::OUString SAL_CALL AccessibleEditableTextPara::getAccessibleName() throw (uno::RuntimeException)
{
DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
-
- // throws if defunc
- sal_Int32 nPara( GetParagraphIndex() );
+// ::vos::OGuard aGuard( Application::GetSolarMutex() );
- // Get the string from the resource for the specified id.
- String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_PARAGRAPH_NAME) );
- String sParaIndex = ::rtl::OUString::valueOf( nPara );
- sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )),
- sParaIndex );
-
- return ::rtl::OUString( sStr );
+ return ::rtl::OUString();
}
uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleEditableTextPara::getAccessibleRelationSet() throw (uno::RuntimeException)
@@ -1885,8 +1838,8 @@ namespace accessibility
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
0 == nStartIndex &&
rCacheTF.GetTextLen(nPara) == nEndIndex ?
- ImplGetSvxUnoOutlinerTextCursorPropertyMap() :
- ImplGetSvxTextPortionPropertyMap() );
+ ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() :
+ ImplGetSvxTextPortionSvxPropertySet() );
aPropSet.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
@@ -1950,7 +1903,7 @@ namespace accessibility
// get XPropertySetInfo for paragraph attributes and
// character attributes that span all the paragraphs text.
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
- ImplGetSvxCharAndParaPropertiesMap() );
+ ImplGetSvxCharAndParaPropertiesSet() );
aPropSet.SetSelection( MakeSelection( 0, GetTextLen() ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = aPropSet.getPropertySetInfo();
if (!xPropSetInfo.is())
@@ -2049,7 +2002,7 @@ namespace accessibility
CheckIndex(nIndex);
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
- ImplGetSvxCharAndParaPropertiesMap() );
+ ImplGetSvxCharAndParaPropertiesSet() );
aPropSet.SetSelection( MakeSelection( nIndex ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = aPropSet.getPropertySetInfo();
if (!xPropSetInfo.is())
@@ -2113,6 +2066,99 @@ namespace accessibility
return aOutSequence;
}
+ // XAccessibleMultiLineText
+ sal_Int32 SAL_CALL AccessibleEditableTextPara::getLineNumberAtIndex( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+ {
+ DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
+
+ sal_Int32 nRes = -1;
+ sal_Int32 nPara = GetParagraphIndex();
+
+ SvxTextForwarder &rCacheTF = GetTextForwarder();
+ const bool bValidPara = 0 <= nPara && nPara < rCacheTF.GetParagraphCount();
+ DBG_ASSERT( bValidPara, "getLineNumberAtIndex: current paragraph index out of range" );
+ if (bValidPara)
+ {
+ // we explicitly allow for the index to point at the character right behind the text
+ if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< USHORT >(nPara) ))
+ nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) );
+ else
+ throw lang::IndexOutOfBoundsException();
+ }
+ return nRes;
+ }
+
+ // XAccessibleMultiLineText
+ ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtLineNumber( sal_Int32 nLineNo ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+ {
+ DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
+
+ ::com::sun::star::accessibility::TextSegment aResult;
+ sal_Int32 nPara = GetParagraphIndex();
+ SvxTextForwarder &rCacheTF = GetTextForwarder();
+ const bool bValidPara = 0 <= nPara && nPara < rCacheTF.GetParagraphCount();
+ DBG_ASSERT( bValidPara, "getTextAtLineNumber: current paragraph index out of range" );
+ if (bValidPara)
+ {
+ if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< USHORT >(nPara) ))
+ {
+ USHORT nStart = 0, nEnd = 0;
+ rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< USHORT >(nPara), static_cast< USHORT >(nLineNo) );
+ if (nStart != 0xFFFF && nEnd != 0xFFFF)
+ {
+ try
+ {
+ aResult.SegmentText = getTextRange( nStart, nEnd );
+ aResult.SegmentStart = nStart;
+ aResult.SegmentEnd = nEnd;
+ }
+ catch (lang::IndexOutOfBoundsException)
+ {
+ // this is not the exception that should be raised in this function ...
+ DBG_ASSERT( 0, "unexpected exception" );
+ }
+ }
+ }
+ else
+ throw lang::IndexOutOfBoundsException();
+ }
+ return aResult;
+ }
+
+ // XAccessibleMultiLineText
+ ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtLineWithCaret( ) throw (uno::RuntimeException)
+ {
+ DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
+
+ ::com::sun::star::accessibility::TextSegment aResult;
+ try
+ {
+ aResult = getTextAtLineNumber( getNumberOfLineWithCaret() );
+ }
+ catch (lang::IndexOutOfBoundsException &)
+ {
+ // this one needs to be catched since this interface does not allow for it.
+ }
+ return aResult;
+ }
+
+ // XAccessibleMultiLineText
+ sal_Int32 SAL_CALL AccessibleEditableTextPara::getNumberOfLineWithCaret( ) throw (uno::RuntimeException)
+ {
+ DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
+
+ sal_Int32 nRes = -1;
+ try
+ {
+ nRes = getLineNumberAtIndex( getCaretPosition() );
+ }
+ catch (lang::IndexOutOfBoundsException &)
+ {
+ // this one needs to be catched since this interface does not allow for it.
+ }
+ return nRes;
+ }
+
// XServiceInfo
::rtl::OUString SAL_CALL AccessibleEditableTextPara::getImplementationName (void) throw (uno::RuntimeException)
diff --git a/svx/source/accessibility/AccessibleEditableTextPara.hxx b/svx/source/accessibility/AccessibleEditableTextPara.hxx
index 5cf8c5361d20..4e297f44c3b5 100644
--- a/svx/source/accessibility/AccessibleEditableTextPara.hxx
+++ b/svx/source/accessibility/AccessibleEditableTextPara.hxx
@@ -34,12 +34,10 @@
#include <tools/gen.hxx>
#include <tools/string.hxx>
#include <cppuhelper/weakref.hxx>
-#include <cppuhelper/compbase7.hxx>
+#include <cppuhelper/compbase8.hxx>
#include <cppuhelper/typeprovider.hxx>
-
-#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
#include <cppuhelper/interfacecontainer.hxx>
-#endif
+
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
@@ -47,6 +45,8 @@
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
+
#include <comphelper/accessibletexthelper.hxx>
#include <comphelper/broadcasthelper.hxx>
#include "AccessibleParaManager.hxx"
@@ -55,12 +55,13 @@
namespace accessibility
{
- typedef ::cppu::WeakComponentImplHelper7< ::com::sun::star::accessibility::XAccessible,
+ typedef ::cppu::WeakComponentImplHelper8< ::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleEditableText,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleTextAttributes,
+ ::com::sun::star::accessibility::XAccessibleMultiLineText,
::com::sun::star::lang::XServiceInfo > AccessibleTextParaInterfaceBase;
/** This class implements the actual text paragraphs for the EditEngine/Outliner UAA
@@ -128,7 +129,7 @@ namespace accessibility
virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
- // XAccessibleText (this comes implicitely inherited by XAccessibleEditableText)
+ // XAccessibleText (this comes implicitely inherited by XAccessibleEditableText AND by XAccessibleMultiLineText)
virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
@@ -163,6 +164,12 @@ namespace accessibility
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( ::sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ // XAccessibleMultiLineText
+ virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException);
+
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService (const ::rtl::OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 072d6347f3f4..15da06a17054 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -161,6 +161,8 @@ namespace accessibility
sal_Bool GetAttributeRun( USHORT&, USHORT&, USHORT, USHORT ) const { return sal_False; }
USHORT GetLineCount( USHORT nPara ) const { return nPara == 0 ? 1 : 0; }
USHORT GetLineLen( USHORT, USHORT ) const { return 0; }
+ void GetLineBoundaries( /*out*/USHORT & rStart, /*out*/USHORT & rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const { rStart = rEnd = 0; }
+ USHORT GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const { return 0; }
// the following two methods would, strictly speaking, require
// a switch to a real EditSource, too. Fortunately, the
@@ -338,6 +340,13 @@ namespace accessibility
if( mbEditSourceEmpty )
Switch2ProxyEditSource();
}
+ else if (pSdrHint && pSdrHint->GetObject()!=NULL)
+ {
+ // When the SdrObject just got a para outliner object then
+ // switch the edit source.
+ if (pSdrHint->GetObject()->GetOutlinerParaObject() != NULL)
+ Switch2ProxyEditSource();
+ }
// forward messages
Broadcast( rHint );
diff --git a/svx/source/accessibility/AccessibleImageBullet.cxx b/svx/source/accessibility/AccessibleImageBullet.cxx
index 2ea02d03bf28..694043d69f4e 100644
--- a/svx/source/accessibility/AccessibleImageBullet.cxx
+++ b/svx/source/accessibility/AccessibleImageBullet.cxx
@@ -172,16 +172,8 @@ namespace accessibility
::vos::OGuard aGuard( Application::GetSolarMutex() );
- // throws if defunc
- sal_Int32 nPara( GetParagraphIndex() );
-
// Get the string from the resource for the specified id.
- String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION) );
- String sParaIndex = ::rtl::OUString::valueOf( nPara );
- sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )),
- sParaIndex );
-
- return ::rtl::OUString( sStr );
+ return ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION) );
}
::rtl::OUString SAL_CALL AccessibleImageBullet::getAccessibleName() throw (uno::RuntimeException)
@@ -190,16 +182,8 @@ namespace accessibility
::vos::OGuard aGuard( Application::GetSolarMutex() );
- // throws if defunc
- sal_Int32 nPara( GetParagraphIndex() );
-
// Get the string from the resource for the specified id.
- String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_NAME) );
- String sParaIndex = ::rtl::OUString::valueOf( nPara );
- sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )),
- sParaIndex );
-
- return ::rtl::OUString( sStr );
+ return ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_NAME) );
}
uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleImageBullet::getAccessibleRelationSet() throw (uno::RuntimeException)
diff --git a/svx/source/accessibility/AccessibleStaticTextBase.cxx b/svx/source/accessibility/AccessibleStaticTextBase.cxx
index b611b62b47e6..333c555bb746 100644
--- a/svx/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/svx/source/accessibility/AccessibleStaticTextBase.cxx
@@ -173,12 +173,16 @@ namespace accessibility
AccessibleEditableTextPara& GetParagraph( sal_Int32 nPara ) const;
sal_Int32 GetParagraphCount() const;
+ sal_Int32 GetParagraphIndex() const;
+ sal_Int32 GetLineCount( sal_Int32 nParagraph ) const;
+
EPosition Index2Internal( sal_Int32 nFlatIndex ) const
{
DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL );
return ImpCalcInternal( nFlatIndex, false );
}
+
EPosition Range2Internal( sal_Int32 nFlatIndex ) const
{
DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL );
@@ -327,6 +331,26 @@ namespace accessibility
return mpTextParagraph->GetTextForwarder().GetParagraphCount();
}
+ sal_Int32 AccessibleStaticTextBase_Impl::GetParagraphIndex() const
+ {
+ DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL );
+
+ sal_Int32 nIndex = -1;
+ if( mpTextParagraph )
+ nIndex = mpTextParagraph->GetParagraphIndex();
+ return nIndex;
+ }
+
+ sal_Int32 AccessibleStaticTextBase_Impl::GetLineCount( sal_Int32 nParagraph ) const
+ {
+ DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL );
+
+ sal_Int32 nIndex = 0;
+ if( mpTextParagraph )
+ nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< USHORT >(nParagraph) );
+ return nIndex;
+ }
+
sal_Int32 AccessibleStaticTextBase_Impl::Internal2Index( EPosition nEEIndex ) const
{
sal_Int32 aRes(0);
@@ -1001,10 +1025,25 @@ namespace accessibility
return ::comphelper::concatSequences( aRunAttrSeq, aDiffVec.getAsConstList() );
}
- Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const
- {
- return mpImpl->GetParagraphBoundingBox();
- }
+ Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const
+ {
+ return mpImpl->GetParagraphBoundingBox();
+ }
+
+ sal_Int32 AccessibleStaticTextBase::GetParagraphIndex() const
+ {
+ return mpImpl->GetParagraphIndex();
+ }
+
+ sal_Int32 AccessibleStaticTextBase::GetParagraphCount() const
+ {
+ return mpImpl->GetParagraphCount();
+ }
+
+ sal_Int32 AccessibleStaticTextBase::GetLineCount( sal_Int32 nParagraph ) const
+ {
+ return mpImpl->GetLineCount( nParagraph );
+ }
} // end of namespace accessibility
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 7882aeac6b7b..9423e6719a40 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -64,6 +64,8 @@
#include <svx/svdpage.hxx>
#include <svx/unomod.hxx>
#include <svx/dialmgr.hxx>
+#include <svx/svdetc.hxx>
+#include <svx/sdrhittesthelper.hxx>
//===== namespaces ===========================================================
@@ -225,7 +227,14 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleAt
{
Point aPnt( rPoint.X, rPoint.Y );
mpControl->PixelToLogic( aPnt );
- SdrObject * pObj = mpPage->CheckHit(aPnt, 1, NULL, false);
+
+ SdrObject* pObj = 0;
+
+ if(mpView && mpView->GetSdrPageView())
+ {
+ pObj = SdrObjListPrimitiveHit(*mpPage, aPnt, 1, *mpView->GetSdrPageView(), 0, false);
+ }
+
if( pObj )
xAccessible = getAccessible( pObj );
}
diff --git a/svx/source/accessibility/accessibility.src b/svx/source/accessibility/accessibility.src
index 323ff7982876..418236a0107d 100644
--- a/svx/source/accessibility/accessibility.src
+++ b/svx/source/accessibility/accessibility.src
@@ -196,19 +196,9 @@ String RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION
Text [ en-US ] = "This is where you can edit the contour." ;
};
-String RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION
-{
- Text [ en-US ] = "Paragraph: $(ARG) " ;
-};
-
-String RID_SVXSTR_A11Y_PARAGRAPH_NAME
-{
- Text [ en-US ] = "Paragraph $(ARG)" ;
-};
-
String RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION
{
- Text [ en-US ] = "Image bullet in paragraph: $(ARG)" ;
+ Text [ en-US ] = "Image bullet in paragraph" ;
};
String RID_SVXSTR_A11Y_IMAGEBULLET_NAME
diff --git a/svx/source/accessibility/makefile.mk b/svx/source/accessibility/makefile.mk
index f953adc1dda0..8b1802bf1a25 100755
--- a/svx/source/accessibility/makefile.mk
+++ b/svx/source/accessibility/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=accessibility
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -42,7 +43,12 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES = \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
+ $(SLO)$/AccessibleStringWrap.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
$(SLO)$/charmapacc.obj \
$(SLO)$/svxrectctaccessiblecontext.obj \
$(SLO)$/GraphCtlAccessibleContext.obj \
@@ -63,13 +69,14 @@ SLOFILES = \
$(SLO)$/AccessibleStaticTextBase.obj \
$(SLO)$/AccessibleParaManager.obj \
$(SLO)$/AccessibleEditableTextPara.obj \
- $(SLO)$/AccessibleStringWrap.obj \
$(SLO)$/AccessibleImageBullet.obj \
$(SLO)$/ShapeTypeHandler.obj \
$(SLO)$/SvxShapeTypes.obj \
$(SLO)$/AccessibleControlShape.obj \
$(SLO)$/DGColorNameLookUp.obj \
$(SLO)$/AccessibleFrameSelector.obj
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
SRS2NAME = accessibility
SRC2FILES = accessibility.src
diff --git a/svx/source/cui/autocdlg.cxx b/svx/source/cui/autocdlg.cxx
index 5d957b831d54..330459b224f1 100644
--- a/svx/source/cui/autocdlg.cxx
+++ b/svx/source/cui/autocdlg.cxx
@@ -2308,7 +2308,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent,
aCBAppendSpace (this, SVX_RES(CB_APPEND_SPACE)),
aCBAsTip (this, SVX_RES(CB_AS_TIP)),
aCBCollect (this, SVX_RES(CB_COLLECT)),
- aCBKeepList (this, SVX_RES(CB_KEEP_LIST)),
+ aCBRemoveList (this, SVX_RES(CB_REMOVE_LIST)),
aFTExpandKey (this, SVX_RES(FT_EXPAND_KEY)),
aDCBExpandKey (this, SVX_RES(DCB_EXPAND_KEY)),
aFTMinWordlen (this, SVX_RES(FT_MIN_WORDLEN)),
@@ -2369,7 +2369,7 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& )
bCheck = aCBCollect.IsChecked();
bModified |= pOpt->bAutoCmpltCollectWords != bCheck;
pOpt->bAutoCmpltCollectWords = bCheck;
- bCheck = aCBKeepList.IsChecked();
+ bCheck = !aCBRemoveList.IsChecked(); // inverted value!
bModified |= pOpt->bAutoCmpltKeepList != bCheck;
pOpt->bAutoCmpltKeepList = bCheck;
bCheck = aCBAppendSpace.IsChecked();
@@ -2416,7 +2416,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& )
aCBActiv.Check( 0 != pOpt->bAutoCompleteWords );
aCBCollect.Check( 0 != pOpt->bAutoCmpltCollectWords );
- aCBKeepList.Check( 0 != pOpt->bAutoCmpltKeepList);
+ aCBRemoveList.Check( !pOpt->bAutoCmpltKeepList ); //inverted value!
aCBAppendSpace.Check( 0 != pOpt->bAutoCmpltAppendBlanc );
aCBAsTip.Check( 0 != pOpt->bAutoCmpltShowAsTip );
@@ -2487,7 +2487,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox )
aDCBExpandKey.Enable( bEnable );
}
else if(&aCBCollect == pBox)
- aCBKeepList.Enable( bEnable );
+ aCBRemoveList.Enable( bEnable );
return 0;
}
diff --git a/svx/source/cui/autocdlg.hrc b/svx/source/cui/autocdlg.hrc
index d3c34e3e48a2..6a698b4397d7 100644
--- a/svx/source/cui/autocdlg.hrc
+++ b/svx/source/cui/autocdlg.hrc
@@ -129,7 +129,7 @@
#define CB_ACTIV 121
#define CB_COLLECT 122
#define CB_APPEND_SPACE 123
-#define CB_KEEP_LIST 124
+#define CB_REMOVE_LIST 124
#define CB_AS_TIP 125
#define FT_MIN_WORDLEN 126
#define FT_MAX_ENTRIES 127
diff --git a/svx/source/cui/autocdlg.hxx b/svx/source/cui/autocdlg.hxx
index d9d16f8ed064..dba6ce826cc3 100644
--- a/svx/source/cui/autocdlg.hxx
+++ b/svx/source/cui/autocdlg.hxx
@@ -406,7 +406,7 @@ class OfaAutoCompleteTabPage : public SfxTabPage
CheckBox aCBAsTip; //Show as tip
CheckBox aCBCollect;//Collect words
- CheckBox aCBKeepList;//...save the list for later use...
+ CheckBox aCBRemoveList;//...save the list for later use...
//--removed--CheckBox aCBEndless;//
FixedText aFTExpandKey;
diff --git a/svx/source/cui/autocdlg.src b/svx/source/cui/autocdlg.src
index 9ec079a5daae..a087bd7d59dc 100644
--- a/svx/source/cui/autocdlg.src
+++ b/svx/source/cui/autocdlg.src
@@ -656,12 +656,12 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "C~ollect words";
};
- CheckBox CB_KEEP_LIST
+ CheckBox CB_REMOVE_LIST
{
Pos = MAP_APPFONT( 10, 59 );
Size = MAP_APPFONT( 110, 40 );
WordBreak = TRUE;
- Text [ en-US ] = "~When closing a document, save the list for later use in other documents.";
+ Text [ en-US ] = "~When closing a document, remove the words collected from it from the list";
};
FixedText FT_EXPAND_KEY
{
diff --git a/svx/source/cui/backgrnd.cxx b/svx/source/cui/backgrnd.cxx
index 6d9c06484658..9ba19816b1bf 100644
--- a/svx/source/cui/backgrnd.cxx
+++ b/svx/source/cui/backgrnd.cxx
@@ -1204,8 +1204,6 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
const Size aSize15x15 = Size( 15, 15 );
FASTBOOL bOwn = FALSE;
- DBG_ASSERT( pDocSh, "DocShell not found!" );
-
if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) )
pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
diff --git a/svx/source/cui/commonlingui.src b/svx/source/cui/commonlingui.src
index b69d3449db4c..c229953ad3c8 100644
--- a/svx/source/cui/commonlingui.src
+++ b/svx/source/cui/commonlingui.src
@@ -47,7 +47,7 @@ Window RID_SVX_WND_COMMON_LINGU
{
HelpId=HID_SPELLDLG_SETWORD;
Pos = MAP_APPFONT( 51, 9 );
- Size = MAP_APPFONT( 149, 10 );
+ Size = MAP_APPFONT( 164, 10 );
Border =FALSE;
TabStop = TRUE;
};
@@ -62,7 +62,7 @@ Window RID_SVX_WND_COMMON_LINGU
Edit ED_NEWWORD
{
Pos = MAP_APPFONT( 51, 24 );
- Size = MAP_APPFONT( 122, 12 );
+ Size = MAP_APPFONT( 137, 12 );
Border = TRUE;
};
@@ -75,21 +75,21 @@ Window RID_SVX_WND_COMMON_LINGU
PushButton BTN_IGNORE
{
- Pos = MAP_APPFONT( 209, 6 );
+ Pos = MAP_APPFONT( 224, 6 );
Size = MAP_APPFONT( 55, 14 );
Text [ en-US ] = "~Ignore" ;
};
PushButton BTN_IGNOREALL
{
- Pos = MAP_APPFONT( 209, 22 );
+ Pos = MAP_APPFONT( 224, 22 );
Size = MAP_APPFONT( 55, 14 );
Text [ en-US ] = "Always I~gnore" ;
};
PushButton BTN_CHANGE
{
- Pos = MAP_APPFONT( 209, 40 );
+ Pos = MAP_APPFONT( 224, 40 );
Size = MAP_APPFONT( 55, 14 );
Text [ en-US ] = "~Replace" ;
DefButton = TRUE ;
@@ -97,14 +97,14 @@ Window RID_SVX_WND_COMMON_LINGU
PushButton BTN_CHANGEALL
{
- Pos = MAP_APPFONT( 209, 56 );
+ Pos = MAP_APPFONT( 224, 56 );
Size = MAP_APPFONT( 55, 14 );
Text [ en-US ] = "Always R~eplace" ;
};
PushButton BTN_OPTIONS
{
- Pos = MAP_APPFONT( 209, 129 );
+ Pos = MAP_APPFONT( 224, 129 );
Size = MAP_APPFONT( 55, 14 );
Hide = TRUE ;
Text [ en-US ] = "Options..." ;
@@ -119,19 +119,19 @@ Window RID_SVX_WND_COMMON_LINGU
GroupBox GB_AUDIT
{
Pos = MAP_APPFONT( 1, 1 );
- Size = MAP_APPFONT( 268, 148 );
+ Size = MAP_APPFONT( 283, 148 );
Hide=TRUE;
};
HelpButton BTN_SPL_HELP
{
- Pos = MAP_APPFONT( 145, 153 );
+ Pos = MAP_APPFONT( 160, 153 );
Size = MAP_APPFONT( 55, 14 );
};
CancelButton BTN_SPL_CANCEL
{
- Pos = MAP_APPFONT ( 209 , 153 ) ;
+ Pos = MAP_APPFONT ( 224 , 153 ) ;
Size = MAP_APPFONT ( 55 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Close" ;
diff --git a/svx/source/cui/cuicharmap.cxx b/svx/source/cui/cuicharmap.cxx
index fa962beafc3d..a66c7b3c10a8 100644
--- a/svx/source/cui/cuicharmap.cxx
+++ b/svx/source/cui/cuicharmap.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: cuicharmap.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -405,6 +402,11 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG )
USHORT nPos = aFontLB.GetSelectEntryPos(),
nFont = (USHORT)(ULONG)aFontLB.GetEntryData( nPos );
aFont = mpDialog->GetDevFont( nFont );
+ aFont.SetWeight( WEIGHT_DONTKNOW );
+ aFont.SetItalic( ITALIC_NONE );
+ aFont.SetWidthType( WIDTH_DONTKNOW );
+ aFont.SetPitch( PITCH_DONTKNOW );
+ aFont.SetFamily( FAMILY_DONTKNOW );
// notify children using this font
aShowSet.SetFont( aFont );
diff --git a/svx/source/cui/cuioptgenrl.hxx b/svx/source/cui/cuioptgenrl.hxx
index a19b20c16028..22ef5481651f 100644
--- a/svx/source/cui/cuioptgenrl.hxx
+++ b/svx/source/cui/cuioptgenrl.hxx
@@ -80,6 +80,7 @@ private:
SvxUserEdit aCompanyEdit;
FixedText aNameLbl;
FixedText aNameLblRuss;
+ FixedText aNameLblEastern;
SvxUserEdit aFirstName;
SvxUserEdit aFatherName;
SvxUserEdit aName;
diff --git a/svx/source/cui/dlgfact.cxx b/svx/source/cui/dlgfact.cxx
index 5fe71d5eb8af..996d0f63f9e9 100644
--- a/svx/source/cui/dlgfact.cxx
+++ b/svx/source/cui/dlgfact.cxx
@@ -112,6 +112,7 @@
#include "newtabledlg.hxx"
#include "macroass.hxx"
#include "acccfg.hxx"
+#include "insrc.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
@@ -2385,3 +2386,8 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
{
return new VclAbstractDialog_Impl( new OfaTreeOptionsDialog( pParent, rExtensionId ) );
}
+
+SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId )
+{
+ return new SvxInsRowColDlg( pParent, bCol, nHelpId );
+}
diff --git a/svx/source/cui/dlgfact.hxx b/svx/source/cui/dlgfact.hxx
index e6c1325b4b38..e52c21fc597a 100644
--- a/svx/source/cui/dlgfact.hxx
+++ b/svx/source/cui/dlgfact.hxx
@@ -810,6 +810,8 @@ public:
virtual VclAbstractDialog* CreateOptionsDialog(
Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& rApplicationContext );
+
+ virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId );
};
#endif
diff --git a/svx/source/cui/hangulhanjadlg.src b/svx/source/cui/hangulhanjadlg.src
index 91439e285f7d..920f99e03aec 100644
--- a/svx/source/cui/hangulhanjadlg.src
+++ b/svx/source/cui/hangulhanjadlg.src
@@ -37,7 +37,7 @@
ModalDialog RID_SVX_MDLG_HANGULHANJA
{
HelpId = HID_DIALOG_HANGULHANJA;
- Size = MAP_APPFONT( 287, 175 );
+ Size = MAP_APPFONT( 302, 175 );
OutputSize = TRUE;
Closeable = TRUE ;
Moveable = TRUE ;
@@ -47,7 +47,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
PushButton PB_FIND
{
- Pos = MAP_APPFONT( 192, 23 );
+ Pos = MAP_APPFONT( 207, 23 );
Size = MAP_APPFONT( 30, 14 );
Text [ en-US ] = "~Find";
@@ -56,7 +56,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
Control CTL_SUGGESTIONS
{
Pos = MAP_APPFONT( 51, 46 );
- Size = MAP_APPFONT( 171, 30 );
+ Size = MAP_APPFONT( 186, 30 );
TabStop = TRUE ;
};
@@ -71,7 +71,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
RadioButton RB_SIMPLE_CONVERSION
{
Pos = MAP_APPFONT( 51, 81 );
- Size = MAP_APPFONT( 55, 8 );
+ Size = MAP_APPFONT( 60, 8 );
Group = TRUE;
@@ -80,16 +80,16 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
RadioButton RB_HANJA_HANGUL_BRACKETED
{
- Pos = MAP_APPFONT( 109, 81 );
- Size = MAP_APPFONT( 55, 8 );
+ Pos = MAP_APPFONT( 114, 81 );
+ Size = MAP_APPFONT( 60, 8 );
Text [ en-US ] = "Hanja (Han~gul)";
};
RadioButton RB_HANGUL_HANJA_BRACKETED
{
- Pos = MAP_APPFONT( 167, 81 );
- Size = MAP_APPFONT( 55, 8 );
+ Pos = MAP_APPFONT( 177, 81 );
+ Size = MAP_APPFONT( 60, 8 );
Text [ en-US ] = "Hang~ul (Hanja)";
};
@@ -97,7 +97,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
RadioButton RB_HANGUL_HANJA_ABOVE
{
Pos = MAP_APPFONT( 51, 95 );
- Size = MAP_APPFONT( 55, 16 );
+ Size = MAP_APPFONT( 60, 16 );
// this is the _primary_ text
Text [ en-US ] = "Hangu~l";
@@ -105,8 +105,8 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
RadioButton RB_HANGUL_HANJA_BELOW
{
- Pos = MAP_APPFONT( 109, 95 );
- Size = MAP_APPFONT( 55, 16 );
+ Pos = MAP_APPFONT( 114, 95 );
+ Size = MAP_APPFONT( 60, 16 );
// this is the _primary_ text
Text [ en-US ] = "Hang~ul";
@@ -114,8 +114,8 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
RadioButton RB_HANJA_HANGUL_ABOVE
{
- Pos = MAP_APPFONT( 51, 114 );
- Size = MAP_APPFONT( 55, 16 );
+ Pos = MAP_APPFONT( 56, 114 );
+ Size = MAP_APPFONT( 60, 16 );
// this is the _primary_ text
Text [ en-US ] = "Han~ja";
@@ -123,8 +123,8 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
RadioButton RB_HANJA_HANGUL_BELOW
{
- Pos = MAP_APPFONT( 109, 114 );
- Size = MAP_APPFONT( 55, 16 );
+ Pos = MAP_APPFONT( 114, 114 );
+ Size = MAP_APPFONT( 60, 16 );
// this is the _primary_ text
Text [ en-US ] = "Ha~nja";
@@ -141,14 +141,14 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
CheckBox CB_HANGUL_ONLY
{
Pos = MAP_APPFONT( 51, 134 );
- Size = MAP_APPFONT( 55, 8 );
+ Size = MAP_APPFONT( 60, 8 );
Text [ en-US ] = "Hangul ~only";
};
CheckBox CB_HANJA_ONLY
{
- Pos = MAP_APPFONT( 109, 134 );
+ Pos = MAP_APPFONT( 114, 134 );
Size = MAP_APPFONT( 55, 8 );
Text [ en-US ] = "Hanja onl~y";
@@ -157,12 +157,12 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA
// this element is only for determining where our radio button group ends (in both directions)
FixedText FT_RESIZE_ANCHOR
{
- Pos = MAP_APPFONT( 226, 133 );
+ Pos = MAP_APPFONT( 241, 133 );
};
CheckBox CB_REPLACE_BY_CHARACTER
{
- Pos = MAP_APPFONT( 226, 81 );
+ Pos = MAP_APPFONT( 241, 81 );
Size = MAP_APPFONT( 55, 24 );
WordBreak = TRUE;
diff --git a/svx/source/cui/insrc.cxx b/svx/source/cui/insrc.cxx
new file mode 100644
index 000000000000..10b0a5d713a3
--- /dev/null
+++ b/svx/source/cui/insrc.cxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: insrc.cxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+#ifdef SVX_DLLIMPLEMENTATION
+#undef SVX_DLLIMPLEMENTATION
+#endif
+
+#include <svx/dialmgr.hxx>
+#include <svx/svxdlg.hxx>
+#include <svx/dialogs.hrc>
+#include "insrc.hxx"
+#include "insrc.hrc"
+
+bool SvxInsRowColDlg::isInsertBefore() const
+{
+ return !aAfterBtn.IsChecked();
+}
+
+sal_uInt16 SvxInsRowColDlg::getInsertCount() const
+{
+ return static_cast< sal_uInt16 >( aCountEdit.GetValue() );
+}
+
+SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, ULONG nHelpId )
+ : ModalDialog( pParent, SVX_RES(DLG_INS_ROW_COL) ),
+ aCount( this, SVX_RES( FT_COUNT ) ),
+ aCountEdit( this, SVX_RES( ED_COUNT ) ),
+ aInsFL( this, SVX_RES( FL_INS ) ),
+ aBeforeBtn( this, SVX_RES( CB_POS_BEFORE ) ),
+ aAfterBtn( this, SVX_RES( CB_POS_AFTER ) ),
+ aPosFL( this, SVX_RES( FL_POS ) ),
+ aRow(SVX_RES(STR_ROW)),
+ aCol(SVX_RES(STR_COL)),
+ aOKBtn( this, SVX_RES( BT_OK ) ),
+ aCancelBtn( this, SVX_RES( BT_CANCEL ) ),
+ aHelpBtn( this, SVX_RES( BT_HELP ) ),
+ bColumn( bCol )
+{
+ FreeResource();
+ String aTmp( GetText() );
+ if( bColumn )
+ {
+ aTmp += aCol;
+ }
+ else
+ {
+ aTmp += aRow;
+ }
+ SetText( aTmp );
+ SetHelpId( nHelpId );
+}
+
+short SvxInsRowColDlg::Execute(void)
+{
+ return ModalDialog::Execute();
+}
+
+
+
diff --git a/svx/source/sdr/overlay/overlaylinestriped.cxx b/svx/source/cui/insrc.hrc
index c00be65908e2..e07c7cb2f1d5 100644
--- a/svx/source/sdr/overlay/overlaylinestriped.cxx
+++ b/svx/source/cui/insrc.hrc
@@ -6,7 +6,7 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: overlaylinestriped.cxx,v $
+ * $RCSfile: insrc.hrc,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
@@ -27,21 +27,17 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#define FT_COUNT 1
+#define ED_COUNT 2
+#define FL_INS 3
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <svx/sdr/overlay/overlaylinestriped.hxx>
-#include <tools/gen.hxx>
-#include <vcl/outdev.hxx>
+#define CB_POS_BEFORE 10
+#define CB_POS_AFTER 11
+#define FL_POS 12
-//////////////////////////////////////////////////////////////////////////////
+#define STR_ROW 20
+#define STR_COL 21
-namespace sdr
-{
- namespace overlay
- {
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
+#define BT_OK 100
+#define BT_CANCEL 101
+#define BT_HELP 102
diff --git a/svx/inc/svdtouch.hxx b/svx/source/cui/insrc.hxx
index 4723eff487f0..e187313bdd03 100644
--- a/svx/inc/svdtouch.hxx
+++ b/svx/source/cui/insrc.hxx
@@ -6,8 +6,8 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: svdtouch.hxx,v $
- * $Revision: 1.6 $
+ * $RCSfile: insrc.hxx,v $
+ * $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
@@ -27,27 +27,46 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#ifndef _SVX_INSRC_HXX
+#define _SVX_INSRC_HXX
-#ifndef _SVDTOUCH_HXX
-#define _SVDTOUCH_HXX
+#include <svx/stddlg.hxx>
-#include <tools/solar.h>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/button.hxx>
+#include <vcl/group.hxx>
+#include <vcl/button.hxx>
-////////////////////////////////////////////////////////////////////////////////////////////////////
+#include <tools/string.hxx>
-class Point;
-class Polygon;
-class PolyPolygon;
-class Rectangle;
+class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
+{
+ FixedText aCount;
+ NumericField aCountEdit;
+ FixedLine aInsFL;
-bool IsPointInsidePoly(const Polygon& rPoly, const Point& rHit);
-bool IsPointInsidePoly(const PolyPolygon& rPoly, const Point& rHit);
+ RadioButton aBeforeBtn;
+ RadioButton aAfterBtn;
+ FixedLine aPosFL;
-bool IsRectTouchesLine(const Point& rPt1, const Point& rPt2, const Rectangle& rHit);
-bool IsRectTouchesLine(const Polygon& rLine, const Rectangle& rHit);
-bool IsRectTouchesLine(const PolyPolygon& rLine, const Rectangle& rHit);
+ String aRow;
+ String aCol;
-////////////////////////////////////////////////////////////////////////////////////////////////////
+ OKButton aOKBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
-#endif //_SVDTOUCH_HXX
+ bool bColumn;
+
+public:
+ SvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId );
+
+ virtual short Execute(void);
+
+ virtual bool isInsertBefore() const;
+ virtual sal_uInt16 getInsertCount() const;
+};
+
+#endif
diff --git a/svx/source/cui/insrc.src b/svx/source/cui/insrc.src
new file mode 100644
index 000000000000..6023e94604ef
--- /dev/null
+++ b/svx/source/cui/insrc.src
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: insrc.src,v $
+ * $Revision: 1.32 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <svx/dialogs.hrc>
+#include "insrc.hrc"
+
+ModalDialog DLG_INS_ROW_COL
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 136 , 84 ) ;
+ Text [ en-US ] = "Insert" ;
+ Moveable = TRUE ;
+ OKButton BT_OK
+ {
+ Pos = MAP_APPFONT ( 80 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 80 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BT_HELP
+ {
+ Pos = MAP_APPFONT ( 80 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ RadioButton CB_POS_BEFORE
+ {
+ Pos = MAP_APPFONT ( 12 , 49 ) ;
+ Size = MAP_APPFONT ( 56 , 10 ) ;
+ Text [ en-US ] = "~Before" ;
+ TabStop = TRUE ;
+ };
+ RadioButton CB_POS_AFTER
+ {
+ Pos = MAP_APPFONT ( 12 , 62 ) ;
+ Size = MAP_APPFONT ( 56 , 10 ) ;
+ Text [ en-US ] = "A~fter" ;
+ TabStop = TRUE ;
+ Check = TRUE ;
+ };
+ NumericField ED_COUNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 44 , 14 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 99 ;
+ Value = 1 ;
+ First = 1 ;
+ Last = 5 ;
+ };
+ FixedLine FL_INS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 68 , 8 ) ;
+ Text [ en-US ] = "Insert" ;
+ };
+ FixedLine FL_POS
+ {
+ Pos = MAP_APPFONT ( 6 , 38 ) ;
+ Size = MAP_APPFONT ( 68 , 8 ) ;
+ Text [ en-US ] = "Position";
+ };
+ FixedText FT_COUNT
+ {
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 30 , 8 ) ;
+ Text [ en-US ] = "~Number" ;
+ Left = TRUE ;
+ };
+ String STR_ROW
+ {
+ Text [ en-US ] = " Rows" ;
+ };
+ String STR_COL
+ {
+ Text [ en-US ] = " Columns" ;
+ };
+};
diff --git a/svx/source/cui/macropg.cxx b/svx/source/cui/macropg.cxx
index 6eeba1b0e703..0ee76246abe3 100644
--- a/svx/source/cui/macropg.cxx
+++ b/svx/source/cui/macropg.cxx
@@ -271,22 +271,42 @@ void _SvxMacroTabPage::InitResources()
// the event name to UI string mappings for App Events
aDisplayNames.push_back( EventDisplayName( "OnStartApp", RID_SVXSTR_EVENT_STARTAPP ) );
aDisplayNames.push_back( EventDisplayName( "OnCloseApp", RID_SVXSTR_EVENT_CLOSEAPP ) );
- aDisplayNames.push_back( EventDisplayName( "OnNew", RID_SVXSTR_EVENT_CREATEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCreate", RID_SVXSTR_EVENT_CREATEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnNew", RID_SVXSTR_EVENT_NEWDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnLoadFinished", RID_SVXSTR_EVENT_LOADDOCFINISHED ) );
aDisplayNames.push_back( EventDisplayName( "OnLoad", RID_SVXSTR_EVENT_OPENDOC ) );
- aDisplayNames.push_back( EventDisplayName( "OnSaveAs", RID_SVXSTR_EVENT_SAVEASDOC ) );
- aDisplayNames.push_back( EventDisplayName( "OnSaveAsDone", RID_SVXSTR_EVENT_SAVEASDOCDONE ) );
- aDisplayNames.push_back( EventDisplayName( "OnSave", RID_SVXSTR_EVENT_SAVEDOC ) );
- aDisplayNames.push_back( EventDisplayName( "OnSaveDone", RID_SVXSTR_EVENT_SAVEDOCDONE ) );
aDisplayNames.push_back( EventDisplayName( "OnPrepareUnload", RID_SVXSTR_EVENT_PREPARECLOSEDOC ) );
aDisplayNames.push_back( EventDisplayName( "OnUnload", RID_SVXSTR_EVENT_CLOSEDOC ) ) ;
+ aDisplayNames.push_back( EventDisplayName( "OnViewCreated", RID_SVXSTR_EVENT_VIEWCREATED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnPrepareViewClosing", RID_SVXSTR_EVENT_PREPARECLOSEVIEW ) );
+ aDisplayNames.push_back( EventDisplayName( "OnViewClosed", RID_SVXSTR_EVENT_CLOSEVIEW ) ) ;
aDisplayNames.push_back( EventDisplayName( "OnFocus", RID_SVXSTR_EVENT_ACTIVATEDOC ) );
aDisplayNames.push_back( EventDisplayName( "OnUnfocus", RID_SVXSTR_EVENT_DEACTIVATEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSave", RID_SVXSTR_EVENT_SAVEDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveDone", RID_SVXSTR_EVENT_SAVEDOCDONE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveFailed", RID_SVXSTR_EVENT_SAVEDOCFAILED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveAs", RID_SVXSTR_EVENT_SAVEASDOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveAsDone", RID_SVXSTR_EVENT_SAVEASDOCDONE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnSaveAsFailed", RID_SVXSTR_EVENT_SAVEASDOCFAILED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCopyTo", RID_SVXSTR_EVENT_COPYTODOC ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCopyToDone", RID_SVXSTR_EVENT_COPYTODOCDONE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnCopyToFailed", RID_SVXSTR_EVENT_COPYTODOCFAILED ) );
aDisplayNames.push_back( EventDisplayName( "OnPrint", RID_SVXSTR_EVENT_PRINTDOC ) );
aDisplayNames.push_back( EventDisplayName( "OnModifyChanged", RID_SVXSTR_EVENT_MODIFYCHANGED ) );
+ aDisplayNames.push_back( EventDisplayName( "OnTitleChanged", RID_SVXSTR_EVENT_TITLECHANGED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnModeChanged", RID_SVXSTR_EVENT_MODECHANGED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnVisAreaChanged", RID_SVXSTR_EVENT_VISAREACHANGED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnStorageChanged", RID_SVXSTR_EVENT_STORAGECHANGED ) );
+
+ // application specific events
aDisplayNames.push_back( EventDisplayName( "OnMailMerge", RID_SVXSTR_EVENT_MAILMERGE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnMailMergeFinished", RID_SVXSTR_EVENT_MAILMERGE_END ) );
+ aDisplayNames.push_back( EventDisplayName( "OnFieldMerge", RID_SVXSTR_EVENT_FIELDMERGE ) );
+ aDisplayNames.push_back( EventDisplayName( "OnFieldMergeFinished", RID_SVXSTR_EVENT_FIELDMERGE_FINISHED ) );
aDisplayNames.push_back( EventDisplayName( "OnPageCountChange", RID_SVXSTR_EVENT_PAGECOUNTCHANGE ) );
aDisplayNames.push_back( EventDisplayName( "OnSubComponentOpened", RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED ) );
aDisplayNames.push_back( EventDisplayName( "OnSubComponentClosed", RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED ) );
+// aDisplayNames.push_back( EventDisplayName( "OnLayoutFinished", RID_SVXSTR_EVENT_LAYOUT_FINISHED ) );
// the event name to UI string mappings for forms & dialogs
//
@@ -571,9 +591,14 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents)
rListBox.Select( _pE );
rListBox.MakeVisible( _pE );
}
+
pE = rListBox.GetEntry(0);
if( pE )
+ {
rListBox.Select( pE );
+ rListBox.MakeVisible( pE );
+ }
+
rListBox.SetUpdateMode( TRUE );
EnableButtons( String() );
}
diff --git a/svx/source/cui/macropg.src b/svx/source/cui/macropg.src
index 84fdb5c1af7f..92e1e718ba61 100644
--- a/svx/source/cui/macropg.src
+++ b/svx/source/cui/macropg.src
@@ -165,19 +165,19 @@ String RID_SVXSTR_EVENT_CLOSEAPP
Text [ en-US ] = "Close Application" ;
};
-String RID_SVXSTR_EVENT_CREATEDOC
+String RID_SVXSTR_EVENT_NEWDOC
{
- Text [ en-US ] = "Create Document" ;
+ Text [ en-US ] = "New Document" ;
};
String RID_SVXSTR_EVENT_CLOSEDOC
{
- Text [ en-US ] = "Document is closing" ;
+ Text [ en-US ] = "Document closed" ;
};
String RID_SVXSTR_EVENT_PREPARECLOSEDOC
{
- Text [ en-US ] = "Close Document" ;
+ Text [ en-US ] = "Document is going to be closed" ;
};
String RID_SVXSTR_EVENT_OPENDOC
@@ -226,7 +226,19 @@ String RID_SVXSTR_EVENT_MODIFYCHANGED
};
String RID_SVXSTR_EVENT_MAILMERGE
{
- Text [ en-US ] = "Print form letters" ;
+ Text [ en-US ] = "Printing of form letters started" ;
+};
+String RID_SVXSTR_EVENT_MAILMERGE_END
+{
+ Text [ en-US ] = "Printing of form letters finished" ;
+};
+String RID_SVXSTR_EVENT_FIELDMERGE
+{
+ Text [ en-US ] = "Merging of form fields started" ;
+};
+String RID_SVXSTR_EVENT_FIELDMERGE_FINISHED
+{
+ Text [ en-US ] = "Merging of form fields finished" ;
};
String RID_SVXSTR_EVENT_PAGECOUNTCHANGE
{
@@ -234,11 +246,11 @@ String RID_SVXSTR_EVENT_PAGECOUNTCHANGE
};
String RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED
{
- Text = "Loaded a sub component" ;
+ Text [ en-US ] = "Loaded a sub component" ;
};
String RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED
{
- Text = "Closed a sub component" ;
+ Text [ en-US ] = "Closed a sub component" ;
};
String RID_SVXSTR_EVENT_APPROVEPARAMETER
{
@@ -372,3 +384,78 @@ String RID_SVXSTR_EVENT_CHANGED
{
Text [ en-US ] = "Changed" ;
};
+
+String RID_SVXSTR_EVENT_CREATEDOC
+{
+ Text [ en-US ] = "Document created" ;
+};
+
+String RID_SVXSTR_EVENT_LOADDOCFINISHED
+{
+ Text [ en-US ] = "Document loading finished" ;
+};
+
+String RID_SVXSTR_EVENT_SAVEDOCFAILED
+{
+ Text [ en-US ] = "Saving of document failed" ;
+};
+
+String RID_SVXSTR_EVENT_SAVEASDOCFAILED
+{
+ Text [ en-US ] = "'Save as' has failed" ;
+};
+
+String RID_SVXSTR_EVENT_COPYTODOC
+{
+ Text [ en-US ] = "Storing or exporting copy of document" ;
+};
+
+String RID_SVXSTR_EVENT_COPYTODOCDONE
+{
+ Text [ en-US ] = "Document copy has been created" ;
+};
+
+String RID_SVXSTR_EVENT_COPYTODOCFAILED
+{
+ Text [ en-US ] = "Creating of document copy failed" ;
+};
+
+String RID_SVXSTR_EVENT_VIEWCREATED
+{
+ Text [ en-US ] = "View created" ;
+};
+
+String RID_SVXSTR_EVENT_PREPARECLOSEVIEW
+{
+ Text [ en-US ] = "View is going to be closed" ;
+};
+
+String RID_SVXSTR_EVENT_CLOSEVIEW
+{
+ Text [ en-US ] = "View closed" ;
+};
+
+String RID_SVXSTR_EVENT_TITLECHANGED
+{
+ Text [ en-US ] = "Document title changed" ;
+};
+
+String RID_SVXSTR_EVENT_MODECHANGED
+{
+ Text [ en-US ] = "Document mode changed" ;
+};
+
+String RID_SVXSTR_EVENT_VISAREACHANGED
+{
+ Text [ en-US ] = "Visible area changed" ;
+};
+
+String RID_SVXSTR_EVENT_STORAGECHANGED
+{
+ Text [ en-US ] = "Document has got a new storage" ;
+};
+
+String RID_SVXSTR_EVENT_LAYOUT_FINISHED
+{
+ Text [ en-US ] = "Document layout finished" ;
+};
diff --git a/svx/source/cui/makefile.mk b/svx/source/cui/makefile.mk
index 7db32bb15f7a..7a1db4a85f19 100755
--- a/svx/source/cui/makefile.mk
+++ b/svx/source/cui/makefile.mk
@@ -100,7 +100,8 @@ SRC1FILES = \
textattr.src \
treeopt.src \
webconninfo.src \
- zoom.src
+ zoom.src \
+ insrc.src
SRS2NAME=cuidrawdlgs
SRC2FILES = \
@@ -221,7 +222,8 @@ SLOFILES+=\
$(SLO)$/macroass.obj \
$(SLO)$/cfg.obj \
$(SLO)$/cfgutil.obj \
- $(SLO)$/optchart.obj
+ $(SLO)$/optchart.obj \
+ $(SLO)$/insrc.obj
.IF "$(GUI)"=="WNT"
SLOFILES+=$(SLO)$/winpluginlib.obj
diff --git a/svx/source/cui/numfmt.cxx b/svx/source/cui/numfmt.cxx
index 2f11f1af0223..d6978ea008b8 100644
--- a/svx/source/cui/numfmt.cxx
+++ b/svx/source/cui/numfmt.cxx
@@ -64,7 +64,9 @@
#include <svx/dialmgr.hxx>
#include <sfx2/request.hxx> //CHINA001
#include <sfx2/app.hxx> //CHINA001
+#include <sfx2/basedlgs.hxx>
#include "flagsdef.hxx" //CHINA001
+
#define NUMKEY_UNDEFINED SAL_MAX_UINT32
// static ----------------------------------------------------------------
@@ -290,7 +292,6 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent,
pNumFmtShell ( NULL ),
nInitFormat ( ULONG_MAX ),
- aStrEurope ( THIS_SVX_RES( STR_EUROPE) ),
sAutomaticEntry ( THIS_SVX_RES( STR_AUTO_ENTRY)),
pLastActivWindow( NULL )
{
@@ -1278,8 +1279,18 @@ IMPL_LINK( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvxFontListBox*, pLb )
if ( pLb == &aLbFormat )
{
SelFormatHdl_Impl( pLb );
- // Uebergangsloesung, sollte von SfxTabPage angeboten werden
- fnOkHdl.Call( NULL );
+
+ if ( fnOkHdl.IsSet() )
+ { // Uebergangsloesung, sollte von SfxTabPage angeboten werden
+ fnOkHdl.Call( NULL );
+ }
+ else
+ {
+ SfxSingleTabDialog* pParent = dynamic_cast< SfxSingleTabDialog* >( GetParent() );
+ OKButton* pOKButton = pParent ? pParent->GetOKButton() : NULL;
+ if ( pOKButton )
+ pOKButton->Click();
+ }
}
return 0;
}
@@ -1875,7 +1886,7 @@ void SvxNumberFormatTabPage::FillCurrencyBox()
USHORT nPos=0;
USHORT nSelPos=0;
- pNumFmtShell->GetCurrencySymbols(aList,aStrEurope,&nSelPos);
+ pNumFmtShell->GetCurrencySymbols( aList, &nSelPos);
for(USHORT i=1;i<aList.Count();i++)
{
diff --git a/svx/source/cui/numfmt.hrc b/svx/source/cui/numfmt.hrc
index 7f63e02b57d5..102c5a212ac6 100644
--- a/svx/source/cui/numfmt.hrc
+++ b/svx/source/cui/numfmt.hrc
@@ -64,10 +64,9 @@
#define IB_INFO 31
#define IL_ICON 32
#define LB_CURRENCY 33
-#define STR_EUROPE 34
-#define CB_SOURCEFORMAT 35
-#define IL_ICON_HC 36
-#define STR_AUTO_ENTRY 37
+#define CB_SOURCEFORMAT 34
+#define IL_ICON_HC 35
+#define STR_AUTO_ENTRY 36
#define TBX_ADDREMOVE 1
#define IID_ADD 1
diff --git a/svx/source/cui/numfmt.hxx b/svx/source/cui/numfmt.hxx
index ff9d0813f6e5..e14f397cf0ba 100644
--- a/svx/source/cui/numfmt.hxx
+++ b/svx/source/cui/numfmt.hxx
@@ -170,7 +170,6 @@ private:
long nCurFormatHeight;
long nStdFormatY;
long nStdFormatHeight;
- LocalizedString aStrEurope;
LocalizedString sAutomaticEntry;
Window* pLastActivWindow;
diff --git a/svx/source/cui/numfmt.src b/svx/source/cui/numfmt.src
index ab71ae446998..96269bb9ec09 100644
--- a/svx/source/cui/numfmt.src
+++ b/svx/source/cui/numfmt.src
@@ -256,10 +256,6 @@ TabPage RID_SVXPAGE_NUMBERFORMAT
IdCount = { 3 ; };
};
- String STR_EUROPE
- {
- Text [ en-US ] = "Europe";
- };
String STR_AUTO_ENTRY
{
Text [ en-US ] = "Automatic";
diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx
index 749e98a7d5c2..eb7cac6d8c5d 100644
--- a/svx/source/cui/optaccessibility.cxx
+++ b/svx/source/cui/optaccessibility.cxx
@@ -145,14 +145,14 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& )
if(m_pImpl->m_aConfig.IsModified())
m_pImpl->m_aConfig.Commit();
-#ifndef UNX
AllSettings aAllSettings = Application::GetSettings();
MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
+#ifndef UNX
aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
+#endif
aAllSettings.SetMiscSettings(aMiscSettings);
Application::SetSettings(aAllSettings);
Application::MergeSystemSettings( aAllSettings );
-#endif
return FALSE;
}
diff --git a/svx/source/cui/optgdlg.cxx b/svx/source/cui/optgdlg.cxx
index 9e6cd3b5a7f8..9a53de6bea72 100644
--- a/svx/source/cui/optgdlg.cxx
+++ b/svx/source/cui/optgdlg.cxx
@@ -103,6 +103,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XSet.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
#include <vcl/svapp.hxx>
@@ -136,7 +137,6 @@ int OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
return LEAVE_PAGE;
}
-# ifdef ENABLE_GTK
namespace
{
::rtl::OUString impl_SystemFileOpenServiceName()
@@ -146,13 +146,35 @@ namespace
if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) )
{
+ #ifdef ENABLE_GTK
return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.GtkFilePicker" );
+ #else
+ return rtl::OUString();
+ #endif
+ }
+ else if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde4" ) )
+ {
+ #ifdef ENABLE_KDE4
+ return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.KDE4FilePicker" );
+ #else
+ return rtl::OUString();
+ #endif
}
else if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) )
{
+ #ifdef ENABLE_KDE
return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.KDEFilePicker" );
+ #else
+ return rtl::OUString();
+ #endif
}
+ #if defined WNT
return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFilePicker" );
+ #elif (defined MACOSX && defined QUARTZ)
+ return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.AquaFilePicker" );
+ #else
+ return rtl::OUString();
+ #endif
}
sal_Bool lcl_HasSystemFilePicker()
@@ -180,8 +202,6 @@ namespace
}
}
-#endif
-
// -----------------------------------------------------------------------
OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
@@ -210,20 +230,11 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
{
FreeResource();
- //system fileopen only available in Windows and with gtk vclplug based
- //picker and on MacOSX (aqua version)
-#if !defined( WNT ) && !defined( ENABLE_GTK ) && !(defined(MACOSX) && defined(QUARTZ))
- aFileDlgFL.Hide();
- aFileDlgCB.Hide();
-#else
-# ifdef ENABLE_GTK
if (!lcl_HasSystemFilePicker())
{
aFileDlgFL.Hide();
aFileDlgCB.Hide();
}
-# endif
-#endif
#if ! defined(QUARTZ)
aPrintDlgFL.Hide();
@@ -691,6 +702,12 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) :
aMousePosLB ( this, SVX_RES( LB_MOUSEPOS ) ),
aMouseMiddleFT ( this, SVX_RES( FT_MOUSEMIDDLE ) ),
aMouseMiddleLB ( this, SVX_RES( LB_MOUSEMIDDLE ) ),
+
+ // #i97672#
+ maSelectionFL(this, SVX_RES(FL_SELECTION)),
+ maSelectionCB(this, SVX_RES(CB_SELECTION)),
+ maSelectionMF(this, SVX_RES(MF_SELECTION)),
+
nSizeLB_InitialSelection(0),
nStyleLB_InitialSelection(0),
pAppearanceCfg(new SvtTabAppearanceCfg),
@@ -753,6 +770,9 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) :
#endif
+ // #i97672#
+ maSelectionCB.SetToggleHdl( LINK( this, OfaViewTabPage, OnSelectionToggled ) );
+
FreeResource();
if( ! Application::ValidateSystemFont() )
@@ -807,6 +827,15 @@ IMPL_LINK( OfaViewTabPage, OnAntialiasingToggled, void*, NOTINTERESTEDIN )
}
#endif
+// #i97672#
+IMPL_LINK( OfaViewTabPage, OnSelectionToggled, void*, NOTINTERESTEDIN )
+{
+ (void)NOTINTERESTEDIN;
+ const bool bSelectionEnabled(maSelectionCB.IsChecked());
+ maSelectionMF.Enable(bSelectionEnabled);
+ return 0;
+}
+
/*-----------------06.12.96 11.50-------------------
--------------------------------------------------*/
@@ -828,6 +857,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& )
BOOL bModified = FALSE;
BOOL bMenuOptModified = FALSE;
+ bool bRepaintWindows(false);
SvtMiscOptions aMiscOptions;
UINT16 nSizeLB_NewSelection = aIconSizeLB.GetSelectEntryPos();
@@ -953,16 +983,30 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& )
{
mpDrawinglayerOpt->SetAntiAliasing(aUseAntiAliase.IsChecked());
bModified = TRUE;
+ bRepaintWindows = true;
+ }
+ }
- // react on AA change; invalidate all windows to force
- // a repaint when changing from AA to non-AA or vice-versa
- Window* pAppWindow = Application::GetFirstTopLevelWindow();
+ // #i97672#
+ if(maSelectionCB.IsEnabled())
+ {
+ const bool bNewSelection(maSelectionCB.IsChecked());
+ const sal_uInt16 nNewTransparence((sal_uInt16)maSelectionMF.GetValue());
- while(pAppWindow)
- {
- pAppWindow->Invalidate();
- pAppWindow = Application::GetNextTopLevelWindow(pAppWindow);
- }
+ if(bNewSelection != (bool)mpDrawinglayerOpt->IsTransparentSelection())
+ {
+ mpDrawinglayerOpt->SetTransparentSelection(maSelectionCB.IsChecked());
+ bModified = TRUE;
+ bRepaintWindows = true;
+ }
+
+ // #i104150# even read the value when maSelectionMF is disabled; it may have been
+ // modified by enabling-modify-disabling by the user
+ if(nNewTransparence != mpDrawinglayerOpt->GetTransparentSelectionPercent())
+ {
+ mpDrawinglayerOpt->SetTransparentSelectionPercent(nNewTransparence);
+ bModified = TRUE;
+ bRepaintWindows = true;
}
}
@@ -993,6 +1037,17 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& )
pAppearanceCfg->SetApplicationDefaults ( GetpApp() );
}
+ if(bRepaintWindows)
+ {
+ Window* pAppWindow = Application::GetFirstTopLevelWindow();
+
+ while(pAppWindow)
+ {
+ pAppWindow->Invalidate();
+ pAppWindow = Application::GetNextTopLevelWindow(pAppWindow);
+ }
+ }
+
return bModified;
}
@@ -1082,6 +1137,27 @@ void OfaViewTabPage::Reset( const SfxItemSet& )
aUseAntiAliase.SaveValue();
}
+ {
+ // #i97672# Selection
+ // check if transparent selection is possible on this system
+ const bool bTransparentSelectionPossible(
+ !GetSettings().GetStyleSettings().GetHighContrastMode()
+ && supportsOperation(OutDevSupport_TransparentRect));
+
+ // enter values
+ if(bTransparentSelectionPossible)
+ {
+ maSelectionCB.Check(mpDrawinglayerOpt->IsTransparentSelection());
+ }
+ else
+ {
+ maSelectionCB.Enable(false);
+ }
+
+ maSelectionMF.SetValue(mpDrawinglayerOpt->GetTransparentSelectionPercent());
+ maSelectionMF.Enable(mpDrawinglayerOpt->IsTransparentSelection() && bTransparentSelectionPossible);
+ }
+
#if defined( UNX )
aFontAntiAliasing.SaveValue();
aAAPointLimit.SaveValue();
@@ -1202,8 +1278,13 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
// initialize user interface language selection
SvtLanguageTable* pLanguageTable = new SvtLanguageTable;
- String aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) );
- aUserInterfaceLB.InsertEntry(aStr);
+ const String aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) );
+
+ String aUILang(aStr);
+ aUILang += String::CreateFromAscii(" - ");
+ aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguage() );
+
+ aUserInterfaceLB.InsertEntry(aUILang);
aUserInterfaceLB.SetEntryData(0, 0);
aUserInterfaceLB.SelectEntryPos(0);
try
@@ -1265,16 +1346,24 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
}
aWesternLanguageLB.SetLanguageList( LANG_LIST_WESTERN | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE );
- aAsianLanguageLB .SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE );
+ aWesternLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::LATIN );
+ aAsianLanguageLB.SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE );
+ aAsianLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::ASIAN );
aComplexLanguageLB.SetLanguageList( LANG_LIST_CTL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE );
- aLocaleSettingLB .SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE, FALSE, FALSE);
- aLocaleSettingLB.InsertLanguage( LANGUAGE_SYSTEM );
+ aComplexLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::COMPLEX );
+
+ aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE, FALSE, FALSE);
+ aLocaleSettingLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::WEAK );
- // insert SYSTEM entry, no specific currency
- aCurrencyLB.InsertEntry( aStr );
+ const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable();
+ const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM );
+ // insert SYSTEM entry
+ String aDefaultCurr(aStr);
+ aDefaultCurr += String::CreateFromAscii(" - ");
+ aDefaultCurr += rCurr.GetBankSymbol();
+ aCurrencyLB.InsertEntry( aDefaultCurr );
// all currencies
String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " " ) );
- const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable();
USHORT nCurrCount = rCurrTab.Count();
// first entry is SYSTEM, skip it
for ( USHORT j=1; j < nCurrCount; ++j )
@@ -1283,7 +1372,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
String aStr_( pCurr->GetBankSymbol() );
aStr_ += aTwoSpace;
aStr_ += pCurr->GetSymbol();
- aStr = ApplyLreOrRleEmbedding( aStr_ );
+ aStr_ = ApplyLreOrRleEmbedding( aStr_ );
aStr_ += aTwoSpace;
aStr_ += ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) );
USHORT nPos = aCurrencyLB.InsertEntry( aStr_ );
@@ -1497,7 +1586,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
if(!bCurrentDocCBChecked)
{
Any aValue;
- Locale aLocale = SvxCreateLocale( eSelectLang );
+ Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false );
aValue <<= aLocale;
OUString aPropName( C2U("DefaultLocale") );
pLangConfig->aLinguConfig.SetProperty( aPropName, aValue );
@@ -1506,7 +1595,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
}
if(pCurrentDocShell)
{
- rSet.Put(SvxLanguageItem(eSelectLang, SID_ATTR_LANGUAGE));
+ rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::LATIN),
+ SID_ATTR_LANGUAGE));
bRet = TRUE;
}
}
@@ -1517,7 +1607,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
if(!bCurrentDocCBChecked)
{
Any aValue;
- Locale aLocale = SvxCreateLocale( eSelectLang );
+ Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false );
aValue <<= aLocale;
OUString aPropName( C2U("DefaultLocale_CJK") );
pLangConfig->aLinguConfig.SetProperty( aPropName, aValue );
@@ -1526,7 +1616,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
}
if(pCurrentDocShell)
{
- rSet.Put(SvxLanguageItem(eSelectLang, SID_ATTR_CHAR_CJK_LANGUAGE));
+ rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::ASIAN),
+ SID_ATTR_CHAR_CJK_LANGUAGE));
bRet = TRUE;
}
}
@@ -1537,7 +1628,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
if(!bCurrentDocCBChecked)
{
Any aValue;
- Locale aLocale = SvxCreateLocale( eSelectLang );
+ Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false );
aValue <<= aLocale;
OUString aPropName( C2U("DefaultLocale_CTL") );
pLangConfig->aLinguConfig.SetProperty( aPropName, aValue );
@@ -1546,7 +1637,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
}
if(pCurrentDocShell)
{
- rSet.Put(SvxLanguageItem(eSelectLang, SID_ATTR_CHAR_CTL_LANGUAGE));
+ rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::COMPLEX),
+ SID_ATTR_CHAR_CTL_LANGUAGE));
bRet = TRUE;
}
}
@@ -1646,13 +1738,18 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
aWestLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale"));
Locale aLocale;
aWestLang >>= aLocale;
- eCurLang = SvxLocaleToLanguage( aLocale );
+
+ eCurLang = MsLangId::convertLocaleToLanguage( aLocale );
+
aCJKLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale_CJK"));
+ aLocale = Locale();
aCJKLang >>= aLocale;
- eCurLangCJK = SvxLocaleToLanguage( aLocale );
+ eCurLangCJK = MsLangId::convertLocaleToLanguage( aLocale );
+
aCTLLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale_CTL"));
+ aLocale = Locale();
aCTLLang >>= aLocale;
- eCurLangCTL = SvxLocaleToLanguage( aLocale );
+ eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale );
}
catch(Exception&)
{
@@ -1664,13 +1761,25 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
aCurrentDocCB.Check(bLanguageCurrentDoc_Impl);
const SfxPoolItem* pLang;
if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_LANGUAGE, FALSE, &pLang))
- eCurLang = ((const SvxLanguageItem*)pLang)->GetValue();
+ {
+ LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue();
+ if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, ::com::sun::star::i18n::ScriptType::LATIN) != eTempCurLang)
+ eCurLang = eTempCurLang;
+ }
if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pLang))
- eCurLangCJK = ((const SvxLanguageItem*)pLang)->GetValue();
+ {
+ LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue();
+ if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, ::com::sun::star::i18n::ScriptType::ASIAN) != eTempCurLang)
+ eCurLangCJK = eTempCurLang;
+ }
if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pLang))
- eCurLangCTL = ((const SvxLanguageItem*)pLang)->GetValue();
+ {
+ LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue();
+ if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, ::com::sun::star::i18n::ScriptType::COMPLEX) != eTempCurLang)
+ eCurLangCTL = eTempCurLang;
+ }
}
if(LANGUAGE_NONE == eCurLang || LANGUAGE_DONTKNOW == eCurLang)
aWesternLanguageLB.SelectLanguage(LANGUAGE_NONE);
diff --git a/svx/source/cui/optgdlg.hrc b/svx/source/cui/optgdlg.hrc
index b8dc903879ed..3ad985caa706 100644
--- a/svx/source/cui/optgdlg.hrc
+++ b/svx/source/cui/optgdlg.hrc
@@ -91,6 +91,10 @@
#define ROW_FT_MOUSEMIDDLE (ROW_LB_MOUSEPOS + RSC_CD_DROPDOWN_HEIGHT + ROWSPACE)
#define ROW_LB_MOUSEMIDDLE (ROW_FT_MOUSEMIDDLE + RSC_CD_FIXEDTEXT_HEIGHT + ROWSPACE)
+// #i97672#
+#define ROW_FL_SELECTION (ROW_LB_MOUSEMIDDLE + RSC_CD_DROPDOWN_HEIGHT + RSC_SP_FLGR_SPACE_X)
+#define ROW_CB_SELECTION (ROW_FL_SELECTION + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE)
+
// tabpage general -------------------------------------------------------
#define FL_HELP 10
@@ -150,6 +154,11 @@
#define CB_USE_HARDACCELL 68
#define CB_USE_ANTIALIASE 69
+// #i97672#
+#define FL_SELECTION 70
+#define CB_SELECTION 71
+#define MF_SELECTION 72
+
// tabpage languages -----------------------------------------------------
#define FL_UI_LANG 1
diff --git a/svx/source/cui/optgdlg.hxx b/svx/source/cui/optgdlg.hxx
index c44087708b31..4b86896fa58f 100644
--- a/svx/source/cui/optgdlg.hxx
+++ b/svx/source/cui/optgdlg.hxx
@@ -129,6 +129,11 @@ private:
FixedText aMouseMiddleFT;
ListBox aMouseMiddleLB;
+ // #i97672#
+ FixedLine maSelectionFL;
+ CheckBox maSelectionCB;
+ MetricField maSelectionMF;
+
UINT16 nSizeLB_InitialSelection;
UINT16 nStyleLB_InitialSelection;
BOOL bSfxSymbolsAuto;
@@ -140,6 +145,9 @@ private:
#if defined( UNX )
DECL_LINK( OnAntialiasingToggled, void* );
#endif
+ // #i97672#
+ DECL_LINK( OnSelectionToggled, void* );
+
public:
OfaViewTabPage( Window* pParent, const SfxItemSet& rSet );
~OfaViewTabPage();
diff --git a/svx/source/cui/optgdlg.src b/svx/source/cui/optgdlg.src
index 7f3ad6968079..f663a7ed44ef 100644
--- a/svx/source/cui/optgdlg.src
+++ b/svx/source/cui/optgdlg.src
@@ -404,6 +404,38 @@ TabPage OFA_TP_VIEW
};
};
+ // #i97672#
+ FixedLine FL_SELECTION
+ {
+ Pos = MAP_APPFONT ( 133 , ROW_FL_SELECTION ) ;
+ Size = MAP_APPFONT ( 120 , 8 ) ;
+ Text [ en-US ] = "Selection";
+ };
+
+ CheckBox CB_SELECTION
+ {
+ Pos = MAP_APPFONT ( 139, ROW_CB_SELECTION + (((12 - RSC_CD_CHECKBOX_HEIGHT) / 2) + 1)) ;
+ Size = MAP_APPFONT ( 118 - 34 , RSC_CD_CHECKBOX_HEIGHT ) ;
+ Text [ en-US ] = "Transparency" ;
+ };
+
+ MetricField MF_SELECTION
+ {
+ Pos = MAP_APPFONT ( 139 + (95 - 12), ROW_CB_SELECTION ) ;
+ Size = MAP_APPFONT ( 31 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 10 ;
+ Maximum = 90 ;
+ DecimalDigits = 0 ;
+ First = 10 ;
+ Last = 90 ;
+ SpinSize = 5 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText [ en-US ] = "%" ;
+ };
};
// *******************************************************************
@@ -428,13 +460,13 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_USERINTERFACE
{
Pos = MAP_APPFONT ( 12 , 16 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "~User interface";
};
ListBox LB_USERINTERFACE
{
- Pos = MAP_APPFONT ( 135 , 14 ) ;
- Size = MAP_APPFONT ( 113 , 60 ) ;
+ Pos = MAP_APPFONT ( 123 , 14 ) ;
+ Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
TabStop = TRUE ;
@@ -449,13 +481,13 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_LOCALESETTING
{
Pos = MAP_APPFONT ( 12 , 31 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Locale setting";
};
ListBox LB_LOCALESETTING
{
- Pos = MAP_APPFONT ( 135 , 30 ) ;
- Size = MAP_APPFONT ( 113 , 60 ) ;
+ Pos = MAP_APPFONT ( 123 , 30 ) ;
+ Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
TabStop = TRUE ;
@@ -464,13 +496,13 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_DECIMALSEPARATOR
{
Pos = MAP_APPFONT ( 12 , 46 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Decimal separator key";
};
CheckBox CB_DECIMALSEPARATOR
{
- Pos = MAP_APPFONT ( 135 , 46) ;
- Size = MAP_APPFONT ( 119 , RSC_CD_CHECKBOX_HEIGHT ) ;
+ Pos = MAP_APPFONT ( 123 , 46) ;
+ Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "~Same as locale setting ( %1 )";
};
FixedImage FI_CURRENCY
@@ -482,13 +514,13 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_CURRENCY
{
Pos = MAP_APPFONT ( 12 , 61 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "~Default currency";
};
ListBox LB_CURRENCY
{
- Pos = MAP_APPFONT ( 135 , 59 ) ;
- Size = MAP_APPFONT ( 113 , 60 ) ;
+ Pos = MAP_APPFONT ( 123 , 59 ) ;
+ Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
TabStop = TRUE ;
@@ -509,14 +541,14 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_WEST_LANG
{
Pos = MAP_APPFONT ( 12 , 90 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Western";
};
ListBox LB_WEST_LANG
{
- Pos = MAP_APPFONT ( 135 , 88 ) ;
- Size = MAP_APPFONT ( 113 , 60 ) ;
+ Pos = MAP_APPFONT ( 123 , 88 ) ;
+ Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
TabStop = TRUE ;
@@ -531,13 +563,13 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_ASIAN_LANG
{
Pos = MAP_APPFONT ( 12 , 106 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Asian";
};
ListBox LB_ASIAN_LANG
{
- Pos = MAP_APPFONT ( 135 , 104 ) ;
- Size = MAP_APPFONT ( 113 , 60 ) ;
+ Pos = MAP_APPFONT ( 123 , 104 ) ;
+ Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
TabStop = TRUE ;
@@ -552,13 +584,13 @@ TabPage OFA_TP_LANGUAGES
FixedText FT_COMPLEX_LANG
{
Pos = MAP_APPFONT ( 12 , 122 ) ;
- Size = MAP_APPFONT ( 120 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "C~TL";
};
ListBox LB_COMPLEX_LANG
{
- Pos = MAP_APPFONT ( 135 , 120 ) ;
- Size = MAP_APPFONT ( 113 , 60 ) ;
+ Pos = MAP_APPFONT ( 123 , 120 ) ;
+ Size = MAP_APPFONT ( 125 , 60 ) ;
DropDown = TRUE ;
Border = TRUE ;
TabStop = TRUE ;
@@ -566,8 +598,8 @@ TabPage OFA_TP_LANGUAGES
};
CheckBox CB_CURRENT_DOC
{
- Pos = MAP_APPFONT ( 135 , 135 ) ;
- Size = MAP_APPFONT ( 113 , RSC_CD_CHECKBOX_HEIGHT ) ;
+ Pos = MAP_APPFONT ( 123 , 135 ) ;
+ Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ;
Text [ en-US ] = "For the current document only";
};
FixedLine FL_ENHANCED
diff --git a/svx/source/cui/optgenrl.cxx b/svx/source/cui/optgenrl.cxx
index 1766dd58de72..7159cfdd7e61 100644
--- a/svx/source/cui/optgenrl.cxx
+++ b/svx/source/cui/optgenrl.cxx
@@ -103,6 +103,7 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe
aCompanyEdit ( this, SVX_RES( ED_COMPANY ), INDEX_NOTSET, &aCompanyLbl ),
aNameLbl ( this, SVX_RES( FT_NAME ), true ),
aNameLblRuss ( this, SVX_RES( FT_NAME_RUSS ), true ),
+ aNameLblEastern ( this, SVX_RES( FT_NAME_EASTERN ), true ),
aFirstName ( this, SVX_RES( ED_FIRSTNAME ), 0, &aNameLbl ),
aFatherName ( this, SVX_RES( ED_FATHERNAME ) ),
aName ( this, SVX_RES( ED_NAME ), 1, &aNameLbl ),
@@ -189,6 +190,23 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe
aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND );
aFatherName.SetZOrder( &aFirstName, WINDOW_ZORDER_BEHIND );
}
+ else if ( LANGUAGE_JAPANESE == eLang ||
+ LANGUAGE_KOREAN == eLang ||
+ LANGUAGE_CHINESE_TRADITIONAL == eLang ||
+ LANGUAGE_CHINESE_SIMPLIFIED == eLang)
+ {
+ aUsCityEdit.Hide();
+ aUsStateEdit.Hide();
+ aUsZipEdit.Hide();
+ aNameLbl.Hide();
+ aNameLblEastern.Show();
+
+ // swap "first name" field and "last name" field
+ Point aPosTmp = aFirstName.GetPosPixel();
+ aFirstName.SetPosPixel( aName.GetPosPixel() );
+ aName.SetPosPixel( aPosTmp );
+ aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND );
+ }
else
{
aUsCityEdit.Hide();
diff --git a/svx/source/cui/optpath.cxx b/svx/source/cui/optpath.cxx
index b31d56493aed..eeef9ec75fea 100644
--- a/svx/source/cui/optpath.cxx
+++ b/svx/source/cui/optpath.cxx
@@ -41,6 +41,7 @@
#include <tools/shl.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/filedlghelper.hxx>
+#include <sfx2/app.hxx>
#include <svtools/pickerhelper.hxx>
#include <svtools/aeitem.hxx>
#include <svtools/svtabbx.hxx>
@@ -52,6 +53,7 @@
#include <unotools/localfilehelper.hxx>
#include <svtools/pathoptions.hxx>
#include <svtools/moduleoptions.hxx>
+#include <svtools/viewoptions.hxx>
#define _SVX_OPTPATH_CXX
@@ -62,6 +64,7 @@
#include <svx/dialogs.hrc>
#include "helpid.hrc"
#include <comphelper/processfactory.hxx>
+#include <comphelper/configurationhelper.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -91,6 +94,7 @@ using namespace svx;
#define POSTFIX_WRITABLE String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_writable" ) )
#define POSTFIX_READONLY String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_readonly" ) )
#define VAR_ONE String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "%1" ) )
+#define IODLG_CONFIGNAME String(DEFINE_CONST_UNICODE("FilePicker_Save"))
// struct OptPath_Impl ---------------------------------------------------
@@ -536,6 +540,26 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder )
pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(nPos)->GetUserData();
pPathImpl->eState = SFX_ITEM_SET;
pPathImpl->sWritablePath = sNewPathStr;
+ if ( SvtPathOptions::PATH_WORK == pPathImpl->nRealId )
+ {
+ // Remove view options entry so the new work path
+ // will be used for the next open dialog.
+ SvtViewOptions aDlgOpt( E_DIALOG, IODLG_CONFIGNAME );
+ aDlgOpt.Delete();
+ // Reset also last used dir in the sfx application instance
+ SfxApplication *pSfxApp = SFX_APP();
+ pSfxApp->ResetLastDir();
+
+ // Set configuration flag to notify file picker that it's necessary
+ // to take over the path provided.
+ Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ ::comphelper::ConfigurationHelper::writeDirectKey(xFactory,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/")),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Path/Info")),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WorkPathChanged")),
+ ::com::sun::star::uno::makeAny(true),
+ ::comphelper::ConfigurationHelper::E_STANDARD);
+ }
}
}
diff --git a/svx/source/cui/optsave.cxx b/svx/source/cui/optsave.cxx
index 67ac02536b47..29708444fe93 100644
--- a/svx/source/cui/optsave.cxx
+++ b/svx/source/cui/optsave.cxx
@@ -245,38 +245,57 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
SvtModuleOptions aModuleOpt;
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) )
+ {
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_MATH ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_MATH ));
+ }
else
{
pImpl->aDefaultArr[APP_MATH] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_MATH);
pImpl->aDefaultReadonlyArr[APP_MATH] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_MATH);
}
+
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
+ {
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_DRAW ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_DRAW ));
+ }
else
{
pImpl->aDefaultArr[APP_DRAW] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_DRAW);
pImpl->aDefaultReadonlyArr[APP_DRAW] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_DRAW);
}
+
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
+ {
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_IMPRESS ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_IMPRESS ));
+ }
else
{
pImpl->aDefaultArr[APP_IMPRESS] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_IMPRESS);
pImpl->aDefaultReadonlyArr[APP_IMPRESS] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_IMPRESS);
}
+
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
+ {
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_CALC ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_CALC ));
+ }
else
{
pImpl->aDefaultArr[APP_CALC] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_CALC);
pImpl->aDefaultReadonlyArr[APP_CALC] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_CALC);
}
+
if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
{
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER ));
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER_WEB ));
aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER_GLOBAL ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER_WEB ));
+ aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER_GLOBAL ));
}
else
{
@@ -718,18 +737,23 @@ OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties)
---------------------------------------------------------------------------*/
IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
{
- if(&aDocTypeLB == pBox)
+ USHORT nCurPos = aDocTypeLB.GetSelectEntryPos();
+
+ long nData = -1;
+ if(nCurPos < APP_COUNT)
+ nData = (long) aDocTypeLB.GetEntryData(nCurPos);
+
+ if ( nData >= 0 && nData < APP_COUNT )
{
- USHORT nAppPos = pBox->GetSelectEntryPos();
- if ( nAppPos < APP_COUNT )
+ if(&aDocTypeLB == pBox)
{
aSaveAsLB.Clear();
- const OUString* pFilters = pImpl->aFilterArr[nAppPos].getConstArray();
- if(!pImpl->aUIFilterArr[nAppPos].getLength())
+ const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray();
+ if(!pImpl->aUIFilterArr[nData].getLength())
{
- pImpl->aUIFilterArr[nAppPos].realloc(pImpl->aFilterArr[nAppPos].getLength());
- OUString* pUIFilters = pImpl->aUIFilterArr[nAppPos].getArray();
- for(int nFilter = 0; nFilter < pImpl->aFilterArr[nAppPos].getLength(); nFilter++)
+ pImpl->aUIFilterArr[nData].realloc(pImpl->aFilterArr[nData].getLength());
+ OUString* pUIFilters = pImpl->aUIFilterArr[nData].getArray();
+ for(int nFilter = 0; nFilter < pImpl->aFilterArr[nData].getLength(); nFilter++)
{
Any aProps = pImpl->xFact->getByName(pFilters[nFilter]);
Sequence<PropertyValue> aProperties;
@@ -737,37 +761,36 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
pUIFilters[nFilter] = lcl_ExtracUIName(aProperties);
}
}
- const OUString* pUIFilters = pImpl->aUIFilterArr[nAppPos].getConstArray();
+ const OUString* pUIFilters = pImpl->aUIFilterArr[nData].getConstArray();
OUString sSelect;
- for(int i = 0; i < pImpl->aUIFilterArr[nAppPos].getLength(); i++)
+ for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++)
{
USHORT nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]);
- if ( pImpl->aODFArr[nAppPos][i] )
+ if ( pImpl->aODFArr[nData][i] )
aSaveAsLB.SetEntryData( nEntryPos, (void*)pImpl );
- if(pFilters[i] == pImpl->aDefaultArr[nAppPos])
+ if(pFilters[i] == pImpl->aDefaultArr[nData])
sSelect = pUIFilters[i];
}
if(sSelect.getLength())
aSaveAsLB.SelectEntry(sSelect);
- aSaveAsFI.Show(pImpl->aDefaultReadonlyArr[nAppPos]);
- aSaveAsFT.Enable(!pImpl->aDefaultReadonlyArr[nAppPos]);
- aSaveAsLB.Enable(!pImpl->aDefaultReadonlyArr[nAppPos]);
+ aSaveAsFI.Show(pImpl->aDefaultReadonlyArr[nData]);
+ aSaveAsFT.Enable(!pImpl->aDefaultReadonlyArr[nData]);
+ aSaveAsLB.Enable(!pImpl->aDefaultReadonlyArr[nData]);
}
- }
- else
- {
- OUString sSelect = pBox->GetSelectEntry();
- USHORT nPos = aDocTypeLB.GetSelectEntryPos();
- const OUString* pFilters = pImpl->aFilterArr[nPos].getConstArray();
- OUString* pUIFilters = pImpl->aUIFilterArr[nPos].getArray();
- for(int i = 0; i < pImpl->aUIFilterArr[nPos].getLength(); i++)
- if(pUIFilters[i] == sSelect)
- {
- sSelect = pFilters[i];
- break;
- }
+ else
+ {
+ OUString sSelect = pBox->GetSelectEntry();
+ const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray();
+ OUString* pUIFilters = pImpl->aUIFilterArr[nData].getArray();
+ for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++)
+ if(pUIFilters[i] == sSelect)
+ {
+ sSelect = pFilters[i];
+ break;
+ }
- pImpl->aDefaultArr[nPos] = sSelect;
+ pImpl->aDefaultArr[nData] = sSelect;
+ }
}
ODFVersionHdl_Impl( &aSaveAsLB );
@@ -777,7 +800,7 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox )
IMPL_LINK( SfxSaveTabPage, ODFVersionHdl_Impl, ListBox *, EMPTYARG )
{
long nVersion = long( aODFVersionLB.GetEntryData( aODFVersionLB.GetSelectEntryPos() ) );
- bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) == SvtSaveOptions::ODFVER_012;
+ bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) != SvtSaveOptions::ODFVER_LATEST;
if ( bShown )
{
bool bHasODFFormat = false;
@@ -795,8 +818,8 @@ IMPL_LINK( SfxSaveTabPage, ODFVersionHdl_Impl, ListBox *, EMPTYARG )
|| ( aSaveAsLB.GetEntryData( aSaveAsLB.GetSelectEntryPos() ) != NULL );
}
- aODFWarningFI.Show( !bShown );
- aODFWarningFT.Show( !bShown );
+ aODFWarningFI.Show( bShown );
+ aODFWarningFT.Show( bShown );
return 0;
}
diff --git a/svx/source/cui/page.cxx b/svx/source/cui/page.cxx
index 140a7cb646ab..f842af6b7559 100644
--- a/svx/source/cui/page.cxx
+++ b/svx/source/cui/page.cxx
@@ -310,8 +310,8 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) :
bLandscape ( FALSE ),
eMode ( SVX_PAGE_MODE_STANDARD ),
- ePaperStart ( SVX_PAPER_A3 ),
- ePaperEnd ( SVX_PAPER_DL ),
+ ePaperStart ( PAPER_A3 ),
+ ePaperEnd ( PAPER_ENV_DL ),
pImpl ( new SvxPage_Impl )
{
@@ -455,6 +455,7 @@ void SvxPageDescPage::Init_Impl()
// Handler einstellen
aLayoutBox.SetSelectHdl( LINK( this, SvxPageDescPage, LayoutHdl_Impl ) );
+ aPaperSizeBox.SetDropDownLineCount(10);
aPaperTrayBox.SetGetFocusHdl(
LINK( this, SvxPageDescPage, PaperBinHdl_Impl ) );
@@ -595,22 +596,28 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
aBspWin.SetSize( Size( ConvertLong_Impl( aPaperSize.Width(), eUnit ),
ConvertLong_Impl( aPaperSize.Height(), eUnit ) ) );
- // Werte in die Edits eintragen
- SetMetricValue( aPaperHeightEdit, aPaperSize.Height(), eUnit );
- SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), eUnit );
- aPaperSizeBox.Clear();
+ aPaperSize = OutputDevice::LogicToLogic(aPaperSize, (MapUnit)eUnit, MAP_100TH_MM);
+ if ( bLandscape )
+ Swap( aPaperSize );
+
+ // Actual Paper Format
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, TRUE );
- // Papierformate
- Size aTmpSize = aPaperSize;
+ if ( PAPER_USER != ePaper )
+ aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM );
if ( bLandscape )
- Swap( aTmpSize );
- // aktuelles Format
- SvxPaper ePaper = SvxPaperInfo::GetPaper( aTmpSize, (MapUnit)eUnit, TRUE );
+ Swap( aPaperSize );
+
+ // Werte in die Edits eintragen
+ SetMetricValue( aPaperHeightEdit, aPaperSize.Height(), SFX_MAPUNIT_100TH_MM );
+ SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), SFX_MAPUNIT_100TH_MM );
+ aPaperSizeBox.Clear();
+
USHORT nActPos = LISTBOX_ENTRY_NOTFOUND;
USHORT nAryId = RID_SVXSTRARY_PAPERSIZE_STD;
- if ( ePaperStart != SVX_PAPER_A3 )
+ if ( ePaperStart != PAPER_A3 )
nAryId = RID_SVXSTRARY_PAPERSIZE_DRAW;
ResStringArray aPaperAry( SVX_RES( nAryId ) );
sal_uInt32 nCnt = aPaperAry.Count();
@@ -618,7 +625,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
for ( sal_uInt32 i = 0; i < nCnt; ++i )
{
String aStr = aPaperAry.GetString(i);
- SvxPaper eSize = (SvxPaper)aPaperAry.GetValue(i);
+ Paper eSize = (Paper)aPaperAry.GetValue(i);
USHORT nPos = aPaperSizeBox.InsertEntry( aStr );
aPaperSizeBox.SetEntryData( nPos, (void*)(ULONG)eSize );
@@ -825,11 +832,11 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet )
}
nPos = aPaperSizeBox.GetSelectEntryPos();
- SvxPaper ePaper = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
+ Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
const USHORT nOld = aPaperSizeBox.GetSavedValue();
BOOL bChecked = aLandscapeBtn.IsChecked();
- if ( SVX_PAPER_USER == ePaper )
+ if ( PAPER_USER == ePaper )
{
if ( nOld != nPos ||
aPaperWidthEdit.IsValueModified() ||
@@ -1039,23 +1046,23 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG )
IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox )
{
const USHORT nPos = pBox->GetSelectEntryPos();
- SvxPaper ePaper = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
+ Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
- if ( ePaper != SVX_PAPER_USER )
+ if ( ePaper != PAPER_USER )
{
- Size aSize( SvxPaperInfo::GetPaperSize( ePaper ) );
+ Size aSize( SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ) );
if ( aLandscapeBtn.IsChecked() )
Swap( aSize );
- if ( aSize.Height() < aPaperHeightEdit.GetMin( FUNIT_TWIP ) )
+ if ( aSize.Height() < aPaperHeightEdit.GetMin( FUNIT_100TH_MM ) )
aPaperHeightEdit.SetMin(
- aPaperHeightEdit.Normalize( aSize.Height() ), FUNIT_TWIP );
- if ( aSize.Width() < aPaperWidthEdit.GetMin( FUNIT_TWIP ) )
+ aPaperHeightEdit.Normalize( aSize.Height() ), FUNIT_100TH_MM );
+ if ( aSize.Width() < aPaperWidthEdit.GetMin( FUNIT_100TH_MM ) )
aPaperWidthEdit.SetMin(
- aPaperWidthEdit.Normalize( aSize.Width() ), FUNIT_TWIP );
- SetMetricValue( aPaperHeightEdit, aSize.Height(), SFX_MAPUNIT_TWIP );
- SetMetricValue( aPaperWidthEdit, aSize.Width(), SFX_MAPUNIT_TWIP );
+ aPaperWidthEdit.Normalize( aSize.Width() ), FUNIT_100TH_MM );
+ SetMetricValue( aPaperHeightEdit, aSize.Height(), SFX_MAPUNIT_100TH_MM );
+ SetMetricValue( aPaperWidthEdit, aSize.Width(), SFX_MAPUNIT_100TH_MM );
// R"ander ggf. neu berechnen
CalcMargin_Impl();
@@ -1067,7 +1074,7 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox )
{
// Draw: bei Papierformat soll der Rand 1cm betragen
long nTmp = 0;
- BOOL bScreen = ( SVX_PAPER_SCREEN == ePaper );
+ BOOL bScreen = ( PAPER_SCREEN == ePaper );
if ( !bScreen )
// bei Bildschirm keinen Rand
@@ -1116,12 +1123,12 @@ IMPL_LINK( SvxPageDescPage, PaperSizeModify_Impl, Edit *, EMPTYARG )
SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich );
Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ),
GetCoreValue( aPaperHeightEdit, eUnit ) );
- SvxPaper ePaper = SvxPaperInfo::GetPaper( aSize, (MapUnit)eUnit, TRUE );
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, TRUE );
USHORT nEntryCount = aPaperSizeBox.GetEntryCount();
for ( USHORT i = 0; i < nEntryCount; ++i )
{
- SvxPaper eTmp = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData(i);
+ Paper eTmp = (Paper)(ULONG)aPaperSizeBox.GetEntryData(i);
if ( eTmp == ePaper )
{
@@ -1144,12 +1151,12 @@ IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, RadioButton *, pBtn )
{
bLandscape = aLandscapeBtn.IsChecked();
- const long lWidth = GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_TWIP );
- const long lHeight = GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_TWIP );
+ const long lWidth = GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_100TH_MM );
+ const long lHeight = GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_100TH_MM );
// swap with and height
- SetMetricValue( aPaperWidthEdit, lHeight, SFX_MAPUNIT_TWIP );
- SetMetricValue( aPaperHeightEdit, lWidth, SFX_MAPUNIT_TWIP );
+ SetMetricValue( aPaperWidthEdit, lHeight, SFX_MAPUNIT_100TH_MM );
+ SetMetricValue( aPaperHeightEdit, lWidth, SFX_MAPUNIT_100TH_MM );
// recalculate margins if necessary
CalcMargin_Impl();
@@ -1478,9 +1485,9 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
// Wenn nicht, dann den Anwender fragen, ob sie "ubernommen werden sollen.
// Wenn nicht, dann auf der TabPage bleiben.
USHORT nPos = aPaperSizeBox.GetSelectEntryPos();
- SvxPaper ePaper = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
+ Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
- if ( ePaper != SVX_PAPER_SCREEN && IsMarginOutOfRange() )
+ if ( ePaper != PAPER_SCREEN && IsMarginOutOfRange() )
{
if ( QueryBox( this, WB_YES_NO | WB_DEF_NO, aPrintRangeQueryText ).Execute() == RET_NO )
{
@@ -1775,7 +1782,7 @@ void SvxPageDescPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
if (pModeItem)
SetMode((SvxModeType)pModeItem->GetEnumValue());
if (pPaperStartItem && pPaperEndItem)
- SetPaperFormatRanges( (SvxPaper)pPaperStartItem->GetEnumValue(), (SvxPaper)pPaperEndItem->GetEnumValue() );
+ SetPaperFormatRanges( (Paper)pPaperStartItem->GetEnumValue(), (Paper)pPaperEndItem->GetEnumValue() );
if (pCollectListItem)
SetCollectionList(pCollectListItem->GetList());
}
diff --git a/svx/source/cui/page.h b/svx/source/cui/page.h
index 60f962565d33..98aefdc79cc4 100644
--- a/svx/source/cui/page.h
+++ b/svx/source/cui/page.h
@@ -38,13 +38,13 @@
#define PAPERSIZE_A3 3
#define PAPERSIZE_A4 4
#define PAPERSIZE_A5 5
-#define PAPERSIZE_B4 6
-#define PAPERSIZE_B5 7
+#define PAPERSIZE_B4_ISO 6
+#define PAPERSIZE_B5_ISO 7
#define PAPERSIZE_LETTER 8
#define PAPERSIZE_LEGAL 9
#define PAPERSIZE_TABLOID 10
#define PAPERSIZE_USER 11
-#define PAPERSIZE_B6 12
+#define PAPERSIZE_B6_ISO 12
#define PAPERSIZE_C4 13
#define PAPERSIZE_C5 14
#define PAPERSIZE_C6 15
@@ -52,25 +52,23 @@
#define PAPERSIZE_DL 17
#define PAPERSIZE_DIA 18
#define PAPERSIZE_SCREEN 19
-#define PAPERSIZE_A 20
-#define PAPERSIZE_B 21
-#define PAPERSIZE_C 22
-#define PAPERSIZE_D 23
-#define PAPERSIZE_E 24
-#define PAPERSIZE_EXECUTIVE 25
-#define PAPERSIZE_LEGAL2 26
-#define PAPERSIZE_MONARCH 27
-#define PAPERSIZE_COM675 28
-#define PAPERSIZE_COM9 29
-#define PAPERSIZE_COM10 30
-#define PAPERSIZE_COM11 31
-#define PAPERSIZE_COM12 32
-#define PAPERSIZE_KAI16 33
-#define PAPERSIZE_KAI32 34
-#define PAPERSIZE_KAI32BIG 35
-#define PAPERSIZE_B4_JIS 36
-#define PAPERSIZE_B5_JIS 37
-#define PAPERSIZE_B6_JIS 38
+#define PAPERSIZE_C 20
+#define PAPERSIZE_D 21
+#define PAPERSIZE_E 22
+#define PAPERSIZE_EXECUTIVE 23
+#define PAPERSIZE_LEGAL2 24
+#define PAPERSIZE_MONARCH 25
+#define PAPERSIZE_COM675 26
+#define PAPERSIZE_COM9 27
+#define PAPERSIZE_COM10 28
+#define PAPERSIZE_COM11 29
+#define PAPERSIZE_COM12 30
+#define PAPERSIZE_KAI16 31
+#define PAPERSIZE_KAI32 32
+#define PAPERSIZE_KAI32BIG 33
+#define PAPERSIZE_B4_JIS 34
+#define PAPERSIZE_B5_JIS 35
+#define PAPERSIZE_B6_JIS 36
#endif
diff --git a/svx/source/cui/page.hxx b/svx/source/cui/page.hxx
index 5b04e91ac387..a1fae0536af8 100644
--- a/svx/source/cui/page.hxx
+++ b/svx/source/cui/page.hxx
@@ -53,6 +53,9 @@
#include <svx/frmdirlbox.hxx>
#include <svx/svxenum.hxx>
+
+#include <i18npool/paper.hxx>
+
#include "flagsdef.hxx" //CHINA001
// enum ------------------------------------------------------------------
@@ -183,8 +186,8 @@ class SvxPageDescPage : public SfxTabPage
BOOL bLandscape;
FASTBOOL bBorderModified;
SvxModeType eMode;
- SvxPaper ePaperStart;
- SvxPaper ePaperEnd;
+ Paper ePaperStart;
+ Paper ePaperEnd;
SvxPage_Impl* pImpl;
@@ -242,7 +245,7 @@ public:
virtual ~SvxPageDescPage();
void SetMode( SvxModeType eMType ) { eMode = eMType; }
- void SetPaperFormatRanges( SvxPaper eStart, SvxPaper eEnd )
+ void SetPaperFormatRanges( Paper eStart, Paper eEnd )
{ ePaperStart = eStart, ePaperEnd = eEnd; }
void SetCollectionList(const List* pList);
diff --git a/svx/source/cui/page.src b/svx/source/cui/page.src
index 697f1416b47c..6a44e41729a7 100644
--- a/svx/source/cui/page.src
+++ b/svx/source/cui/page.src
@@ -399,11 +399,11 @@ String RID_SVXSTR_PAPER_A5
{
Text = "A5" ;
};
-String RID_SVXSTR_PAPER_B4
+String RID_SVXSTR_PAPER_B4_ISO
{
Text = "B4 (ISO)" ;
};
-String RID_SVXSTR_PAPER_B5
+String RID_SVXSTR_PAPER_B5_ISO
{
Text = "B5 (ISO)" ;
};
@@ -423,46 +423,38 @@ String RID_SVXSTR_PAPER_USER
{
Text [ en-US ] = "User Defined" ;
};
-String RID_SVXSTR_PAPER_B6
+String RID_SVXSTR_PAPER_B6_ISO
{
Text = "B6 (ISO)" ;
};
String RID_SVXSTR_PAPER_C4
{
- Text = "C4" ;
+ Text = "C4 Envelope" ;
};
String RID_SVXSTR_PAPER_C5
{
- Text = "C5" ;
+ Text = "C5 Envelope" ;
};
String RID_SVXSTR_PAPER_C6
{
- Text = "C6" ;
+ Text = "C6 Envelope" ;
};
String RID_SVXSTR_PAPER_C65
{
- Text = "C6/5" ;
+ Text = "C6/5 Envelope" ;
};
String RID_SVXSTR_PAPER_DL
{
- Text = "DL" ;
+ Text = "DL Envelope" ;
};
String RID_SVXSTR_PAPER_DIA
{
- Text = "Dia" ;
+ Text = "Dia Slide" ;
};
String RID_SVXSTR_PAPER_SCREEN
{
Text [ en-US ] = "Screen" ;
};
-String RID_SVXSTR_PAPER_A
-{
- Text = "A" ;
-};
-String RID_SVXSTR_PAPER_B
-{
- Text = "B" ;
-};
String RID_SVXSTR_PAPER_C
{
Text = "C" ;
@@ -477,47 +469,47 @@ String RID_SVXSTR_PAPER_E
};
String RID_SVXSTR_PAPER_EXECUTIVE
{
- Text = "Executive" ;
+ Text = "Executive" ;
};
String RID_SVXSTR_PAPER_LEGAL2
{
- Text = "Legal" ;
+ Text = "Long Bond" ;
};
String RID_SVXSTR_PAPER_MONARCH
{
- Text = "Monarch" ;
+ Text = "#8 (Monarch) Envelope" ;
};
String RID_SVXSTR_PAPER_COM675
{
- Text = "Env. 6¾" ;
+ Text = "#6 3/4 (Personal) Envelope" ;
};
String RID_SVXSTR_PAPER_COM9
{
- Text = "Env. 9" ;
+ Text = "#9 Envelope" ;
};
String RID_SVXSTR_PAPER_COM10
{
- Text = "Env. 10" ;
+ Text = "#10 Envelope" ;
};
String RID_SVXSTR_PAPER_COM11
{
- Text = "Env. 11" ;
+ Text = "#11 Envelope" ;
};
String RID_SVXSTR_PAPER_COM12
{
- Text = "Env. 12" ;
+ Text = "#12 Envelope" ;
};
String RID_SVXSTR_PAPER_KAI16
{
- Text = "16 kai" ;
+ Text = "16 Kai" ;
};
String RID_SVXSTR_PAPER_KAI32
{
- Text = "32 kai" ;
+ Text = "32 Kai" ;
};
String RID_SVXSTR_PAPER_KAI32BIG
{
- Text = "32 kai big" ;
+ Text = "Big 32 Kai" ;
};
String RID_SVXSTR_PAPER_B4_JIS
{
@@ -535,67 +527,69 @@ StringArray RID_SVXSTRARY_PAPERSIZE_STD
{
ItemList [ en-US ] =
{
- < "A3" ; PAPERSIZE_A3 ; > ;
- < "A4" ; PAPERSIZE_A4 ; > ;
< "A5" ; PAPERSIZE_A5 ; > ;
- < "B4 (ISO)" ; PAPERSIZE_B4 ; > ;
- < "B5 (ISO)" ; PAPERSIZE_B5 ; > ;
- < "B6 (ISO)" ; PAPERSIZE_B6 ; > ;
- < "B4 (JIS)" ; PAPERSIZE_B4_JIS ; > ;
- < "B5 (JIS)" ; PAPERSIZE_B5_JIS ; > ;
- < "B6 (JIS)" ; PAPERSIZE_B6_JIS ; > ;
+ < "A4" ; PAPERSIZE_A4 ; > ;
+ < "A3" ; PAPERSIZE_A3 ; > ;
+ < "B6 (ISO)" ; PAPERSIZE_B6_ISO ; > ;
+ < "B5 (ISO)" ; PAPERSIZE_B5_ISO ; > ;
+ < "B4 (ISO)" ; PAPERSIZE_B4_ISO ; > ;
< "Letter" ; PAPERSIZE_LETTER ; > ;
< "Legal" ; PAPERSIZE_LEGAL ; > ;
+ < "Long Bond" ; PAPERSIZE_LEGAL2 ; > ;
< "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "B6 (JIS)" ; PAPERSIZE_B6_JIS ; > ;
+ < "B5 (JIS)" ; PAPERSIZE_B5_JIS ; > ;
+ < "B4 (JIS)" ; PAPERSIZE_B4_JIS ; > ;
+ < "16 Kai" ; PAPERSIZE_KAI16; > ;
+ < "32 Kai" ; PAPERSIZE_KAI32; > ;
+ < "Big 32 Kai" ; PAPERSIZE_KAI32BIG; > ;
< "User" ; PAPERSIZE_USER ; > ;
- < "C4" ; PAPERSIZE_C4 ; > ;
- < "C5" ; PAPERSIZE_C5 ; > ;
- < "C6" ; PAPERSIZE_C6 ; > ;
- < "C6/5" ; PAPERSIZE_C65 ; > ;
- < "DL" ; PAPERSIZE_DL ; > ;
- < "Env. #6¾" ; PAPERSIZE_COM675; > ;
- < "Env. Monarch" ; PAPERSIZE_MONARCH; > ;
- < "Env. #9" ; PAPERSIZE_COM9; > ;
- < "Env. #10" ; PAPERSIZE_COM10; > ;
- < "Env. #11" ; PAPERSIZE_COM11; > ;
- < "Env. #12" ; PAPERSIZE_COM12; > ;
- < "16 kai" ; PAPERSIZE_KAI16; > ;
- < "32 kai" ; PAPERSIZE_KAI32; > ;
- < "32 kai large" ; PAPERSIZE_KAI32BIG; > ;
- };
+ < "DL Envelope" ; PAPERSIZE_DL ; > ;
+ < "C6 Envelope" ; PAPERSIZE_C6 ; > ;
+ < "C6/5 Envelope" ; PAPERSIZE_C65 ; > ;
+ < "C5 Envelope" ; PAPERSIZE_C5 ; > ;
+ < "C4 Envelope" ; PAPERSIZE_C4 ; > ;
+ < "#6 3/4 (Personal) Envelope" ; PAPERSIZE_COM675; > ;
+ < "#8 (Monarch) Envelope" ; PAPERSIZE_MONARCH; > ;
+ < "#9 Envelope" ; PAPERSIZE_COM9; > ;
+ < "#10 Envelope" ; PAPERSIZE_COM10; > ;
+ < "#11 Envelope" ; PAPERSIZE_COM11; > ;
+ < "#12 Envelope" ; PAPERSIZE_COM12; > ;
};
+};
StringArray RID_SVXSTRARY_PAPERSIZE_DRAW
{
ItemList [ en-US ] =
{
- < "A0" ; PAPERSIZE_A0 ; > ;
- < "A1" ; PAPERSIZE_A1 ; > ;
- < "A2" ; PAPERSIZE_A2 ; > ;
- < "A3" ; PAPERSIZE_A3 ; > ;
- < "A4" ; PAPERSIZE_A4 ; > ;
< "A5" ; PAPERSIZE_A5 ; > ;
- < "B4 (ISO)" ; PAPERSIZE_B4 ; > ;
- < "B5 (ISO)" ; PAPERSIZE_B5 ; > ;
- < "B6 (ISO)" ; PAPERSIZE_B6 ; > ;
- < "B4 (JIS)" ; PAPERSIZE_B4_JIS ; > ;
- < "B5 (JIS)" ; PAPERSIZE_B5_JIS ; > ;
- < "B6 (JIS)" ; PAPERSIZE_B6_JIS ; > ;
+ < "A4" ; PAPERSIZE_A4 ; > ;
+ < "A3" ; PAPERSIZE_A3 ; > ;
+ < "A2" ; PAPERSIZE_A2 ; > ;
+ < "A1" ; PAPERSIZE_A1 ; > ;
+ < "A0" ; PAPERSIZE_A0 ; > ;
+ < "B6 (ISO)" ; PAPERSIZE_B6_ISO ; > ;
+ < "B5 (ISO)" ; PAPERSIZE_B5_ISO ; > ;
+ < "B4 (ISO)" ; PAPERSIZE_B4_ISO ; > ;
< "Letter" ; PAPERSIZE_LETTER ; > ;
< "Legal" ; PAPERSIZE_LEGAL ; > ;
+ < "Long Bond" ; PAPERSIZE_LEGAL2 ; > ;
< "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "B6 (JIS)" ; PAPERSIZE_B6_JIS ; > ;
+ < "B5 (JIS)" ; PAPERSIZE_B5_JIS ; > ;
+ < "B4 (JIS)" ; PAPERSIZE_B4_JIS ; > ;
+ < "16 Kai" ; PAPERSIZE_KAI16; > ;
+ < "32 Kai" ; PAPERSIZE_KAI32; > ;
+ < "Big 32 Kai" ; PAPERSIZE_KAI32BIG; > ;
< "User" ; PAPERSIZE_USER ; > ;
- < "C4" ; PAPERSIZE_C4 ; > ;
- < "C5" ; PAPERSIZE_C5 ; > ;
- < "C6" ; PAPERSIZE_C6 ; > ;
- < "C6/5" ; PAPERSIZE_C65 ; > ;
- < "DL" ; PAPERSIZE_DL ; > ;
- < "Slide" ; PAPERSIZE_DIA ; > ;
+ < "DL Envelope" ; PAPERSIZE_DL ; > ;
+ < "C6 Envelope" ; PAPERSIZE_C6 ; > ;
+ < "C6/5 Envelope" ; PAPERSIZE_C65 ; > ;
+ < "C5 Envelope" ; PAPERSIZE_C5 ; > ;
+ < "C4 Envelope" ; PAPERSIZE_C4 ; > ;
+ < "Dia Slide" ; PAPERSIZE_DIA ; > ;
< "Screen" ; PAPERSIZE_SCREEN ; > ;
- < "16 kai" ; PAPERSIZE_KAI16; > ;
- < "32 kai" ; PAPERSIZE_KAI32; > ;
- < "32 kai large" ; PAPERSIZE_KAI32BIG; > ;
- };
};
+};
String RID_SVXSTR_PAPERBIN
{
Text [ en-US ] = "Paper tray" ;
diff --git a/svx/source/cui/paragrph.cxx b/svx/source/cui/paragrph.cxx
index b1ed23edc0e9..c0b72b573099 100644
--- a/svx/source/cui/paragrph.cxx
+++ b/svx/source/cui/paragrph.cxx
@@ -2356,7 +2356,7 @@ void lcl_SetBox(const SfxItemSet& rSet, USHORT nSlotId, TriStateBox& rBox)
{
USHORT _nWhich = rSet.GetPool()->GetWhich(nSlotId);
SfxItemState eState = rSet.GetItemState(_nWhich, TRUE);
- if(!eState)
+ if(!eState || eState == SFX_ITEM_DISABLED )
rBox.Enable(FALSE);
else if(eState >= SFX_ITEM_AVAILABLE)
{
diff --git a/svx/source/cui/selector.cxx b/svx/source/cui/selector.cxx
index 39e22e5ab9f2..83e4aa2b1612 100644
--- a/svx/source/cui/selector.cxx
+++ b/svx/source/cui/selector.cxx
@@ -1053,6 +1053,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
aCategories.SetSelectHdl(
LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
aCommands.SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) );
+ aCommands.SetDoubleClickHdl( LINK( this, SvxScriptSelectorDialog, FunctionDoubleClickHdl ) );
aOKButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
aCancelButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) );
@@ -1140,6 +1141,14 @@ IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl )
return 0;
}
+IMPL_LINK( SvxScriptSelectorDialog, FunctionDoubleClickHdl, Control*, pCtrl )
+{
+ (void)pCtrl;
+ if ( aOKButton.IsEnabled() )
+ return ClickHdl( &aOKButton );
+ return 0;
+}
+
// Check if command is selected and enable the OK button accordingly
// Grab the help text for this id if available and update the description field
void
diff --git a/svx/source/cui/selector.hxx b/svx/source/cui/selector.hxx
index fe6152131c9d..10346f251563 100644
--- a/svx/source/cui/selector.hxx
+++ b/svx/source/cui/selector.hxx
@@ -216,6 +216,7 @@ class SvxScriptSelectorDialog : public ModelessDialog
DECL_LINK( ClickHdl, Button * );
DECL_LINK( SelectHdl, Control* );
+ DECL_LINK( FunctionDoubleClickHdl, Control* );
void UpdateUI();
void ResizeControls();
diff --git a/svx/source/cui/showcols.cxx b/svx/source/cui/showcols.cxx
index bf225508310e..734b59e1f6fe 100644
--- a/svx/source/cui/showcols.cxx
+++ b/svx/source/cui/showcols.cxx
@@ -36,19 +36,17 @@
#endif
#include "showcols.hxx"
-#ifndef _SVX_FMRESIDS_HRC
#include "fmresids.hrc"
-#endif
#include <tools/shl.hxx>
#include <svx/dialmgr.hxx>
#include <vcl/msgbox.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/extract.hxx>
#include <comphelper/types.hxx>
-#include "fmstatic.hxx" //CHINA001
-IMPLEMENT_CONSTASCII_USTRING(CUIFM_PROP_HIDDEN, "Hidden");
-IMPLEMENT_CONSTASCII_USTRING(CUIFM_PROP_LABEL,"Label");
+#define CUIFM_PROP_HIDDEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Hidden" ) )
+#define CUIFM_PROP_LABEL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" ) )
+
//==========================================================================
// FmShowColsDialog
//==========================================================================
diff --git a/svx/source/cui/svuidlg.src b/svx/source/cui/svuidlg.src
index a00a09e919e6..cc8f2db676ae 100644
--- a/svx/source/cui/svuidlg.src
+++ b/svx/source/cui/svuidlg.src
@@ -156,37 +156,37 @@ ModalDialog MD_UPDATE_BASELINKS
};
CancelButton 1
{
- Pos = MAP_APPFONT ( 275 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 270 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Close" ;
};
HelpButton 1
{
- Pos = MAP_APPFONT ( 275 , 26 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 270 , 26 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
};
PushButton PB_UPDATE_NOW
{
- Pos = MAP_APPFONT ( 275 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 270 , 43 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Update" ;
};
PushButton PB_OPEN_SOURCE
{
- Pos = MAP_APPFONT ( 275 , 60 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 270 , 60 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Open" ;
};
PushButton PB_CHANGE_SOURCE
{
- Pos = MAP_APPFONT ( 275 , 77 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 270 , 77 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Modify..." ;
};
PushButton PB_BREAK_LINK
{
- Pos = MAP_APPFONT ( 275 , 94 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 270 , 94 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Break Link" ;
};
FixedText FT_FILES2
diff --git a/svx/source/cui/treeopt.cxx b/svx/source/cui/treeopt.cxx
index 7491b2bb1cc5..744f9d5c1dbe 100644
--- a/svx/source/cui/treeopt.cxx
+++ b/svx/source/cui/treeopt.cxx
@@ -64,6 +64,8 @@
#include <com/sun/star/awt/XContainerWindowEventHandler.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/XTabController.hpp>
#include <vcl/help.hxx>
#ifndef _LINGUISTIC_MISC_HHX_
#include <linguistic/misc.hxx>
@@ -2745,10 +2747,23 @@ void ExtensionsTabPage::CreateDialogWithHandler()
if ( !bWithHandler || m_xEventHdl.is() )
{
+ SetStyle( GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
Reference< awt::XWindowPeer > xParent( VCLUnoHelper::GetInterface( this ), UNO_QUERY );
m_xPage = Reference < awt::XWindow >(
m_xWinProvider->createContainerWindow(
m_sPageURL, rtl::OUString(), xParent, m_xEventHdl ), UNO_QUERY );
+
+ Reference< awt::XControl > xPageControl( m_xPage, UNO_QUERY );
+ if ( xPageControl.is() )
+ {
+ Reference< awt::XWindowPeer > xWinPeer( xPageControl->getPeer() );
+ if ( xWinPeer.is() )
+ {
+ Window* pWindow = VCLUnoHelper::GetWindow( xWinPeer );
+ if ( pWindow )
+ pWindow->SetStyle( pWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
+ }
+ }
}
}
catch ( ::com::sun::star::lang::IllegalArgumentException& )
diff --git a/svx/source/cui/webconninfo.cxx b/svx/source/cui/webconninfo.cxx
index 8fdf6a26d2bd..997c246abf1e 100644
--- a/svx/source/cui/webconninfo.cxx
+++ b/svx/source/cui/webconninfo.cxx
@@ -44,9 +44,10 @@
#include <com/sun/star/task/UrlRecord.hpp>
#include <com/sun/star/task/XPasswordContainer.hpp>
#include <com/sun/star/task/XMasterPasswordHandling.hpp>
+#include "com/sun/star/task/XUrlContainer.hpp"
#include <comphelper/processfactory.hxx>
-#include <svtools/docpasswdrequest.hxx>
+#include <comphelper/docpasswordrequest.hxx>
#include "webconninfo.hxx"
#include "webconninfo.hrc"
@@ -116,7 +117,7 @@ WebConnectionInfoDialog::WebConnectionInfoDialog( Window* pParent ) :
,m_aButtonsFL ( this, SVX_RES( FL_BUTTONS ) )
,m_aCloseBtn ( this, SVX_RES( PB_CLOSE ) )
,m_aHelpBtn ( this, SVX_RES( PB_HELP ) )
-
+ ,m_nPos ( -1 )
{
static long aStaticTabs[]= { 3, 0, 150, 250 };
m_aPasswordsLB.SetTabs( aStaticTabs );
@@ -211,6 +212,7 @@ void WebConnectionInfoDialog::FillPasswordList()
uno::Sequence< task::UrlRecord > aURLEntries = xPasswdContainer->getAllPersistent( xInteractionHandler );
sal_Int32 nCount = 0;
for ( sal_Int32 nURLInd = 0; nURLInd < aURLEntries.getLength(); nURLInd++ )
+ {
for ( sal_Int32 nUserInd = 0; nUserInd < aURLEntries[nURLInd].UserList.getLength(); nUserInd++ )
{
::rtl::OUString aUIEntry( aURLEntries[nURLInd].Url );
@@ -219,6 +221,25 @@ void WebConnectionInfoDialog::FillPasswordList()
SvLBoxEntry* pEntry = m_aPasswordsLB.InsertEntry( aUIEntry );
pEntry->SetUserData( (void*)(nCount++) );
}
+ }
+
+ // remember pos of first url container entry.
+ m_nPos = nCount;
+
+ uno::Reference< task::XUrlContainer > xUrlContainer(
+ xPasswdContainer, uno::UNO_QUERY_THROW );
+
+ uno::Sequence< rtl::OUString > aUrls
+ = xUrlContainer->getUrls( sal_True /* OnlyPersistent */ );
+
+ for ( sal_Int32 nURLIdx = 0; nURLIdx < aUrls.getLength(); nURLIdx++ )
+ {
+ ::rtl::OUString aUIEntry( aUrls[ nURLIdx ] );
+ aUIEntry += ::rtl::OUString::valueOf( (sal_Unicode)'\t' );
+ aUIEntry += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*" ) );
+ SvLBoxEntry* pEntry = m_aPasswordsLB.InsertEntry( aUIEntry );
+ pEntry->SetUserData( (void*)(nCount++) );
+ }
}
}
catch( uno::Exception& )
@@ -230,22 +251,29 @@ IMPL_LINK( WebConnectionInfoDialog, RemovePasswordHdl, PushButton*, EMPTYARG )
{
try
{
- uno::Reference< task::XPasswordContainer > xPasswdContainer(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ),
- uno::UNO_QUERY_THROW );
-
- uno::Reference< task::XInteractionHandler > xInteractionHandler(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.InteractionHandler" ) ) ),
- uno::UNO_QUERY_THROW );
-
SvLBoxEntry* pEntry = m_aPasswordsLB.GetCurEntry();
if ( pEntry )
{
::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 );
::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 );
- xPasswdContainer->removePersistent( aURL, aUserName );
+
+ uno::Reference< task::XPasswordContainer > xPasswdContainer(
+ comphelper::getProcessServiceFactory()->createInstance(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.task.PasswordContainer" ) ) ),
+ uno::UNO_QUERY_THROW );
+
+ sal_Int32 nPos = (sal_Int32)(sal_IntPtr)pEntry->GetUserData();
+ if ( nPos < m_nPos )
+ {
+ xPasswdContainer->removePersistent( aURL, aUserName );
+ }
+ else
+ {
+ uno::Reference< task::XUrlContainer > xUrlContainer(
+ xPasswdContainer, uno::UNO_QUERY_THROW );
+ xUrlContainer->removeUrl( aURL );
+ }
m_aPasswordsLB.RemoveEntry( pEntry );
}
}
@@ -262,11 +290,20 @@ IMPL_LINK( WebConnectionInfoDialog, RemoveAllPasswordsHdl, PushButton*, EMPTYARG
{
uno::Reference< task::XPasswordContainer > xPasswdContainer(
comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.task.PasswordContainer" ) ) ),
uno::UNO_QUERY_THROW );
// should the master password be requested before?
xPasswdContainer->removeAllPersistent();
+
+ uno::Reference< task::XUrlContainer > xUrlContainer(
+ xPasswdContainer, uno::UNO_QUERY_THROW );
+ uno::Sequence< rtl::OUString > aUrls
+ = xUrlContainer->getUrls( sal_True /* OnlyPersistent */ );
+ for ( sal_Int32 nURLIdx = 0; nURLIdx < aUrls.getLength(); nURLIdx++ )
+ xUrlContainer->removeUrl( aUrls[ nURLIdx ] );
+
m_aPasswordsLB.Clear();
}
catch( uno::Exception& )
@@ -280,35 +317,38 @@ IMPL_LINK( WebConnectionInfoDialog, ChangePasswordHdl, PushButton*, EMPTYARG )
{
try
{
- uno::Reference< task::XPasswordContainer > xPasswdContainer(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ),
- uno::UNO_QUERY_THROW );
-
- uno::Reference< task::XInteractionHandler > xInteractionHandler(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.InteractionHandler" ) ) ),
- uno::UNO_QUERY_THROW );
-
-
SvLBoxEntry* pEntry = m_aPasswordsLB.GetCurEntry();
if ( pEntry )
{
::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 );
::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 );
- RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword(
- task::PasswordRequestMode_PASSWORD_CREATE,
- aURL );
-
+ ::comphelper::DocPasswordRequest* pPasswordRequest
+ = new ::comphelper::DocPasswordRequest(
+ ::comphelper::DocPasswordRequestType_STANDARD,
+ task::PasswordRequestMode_PASSWORD_CREATE, aURL );
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
+
+ uno::Reference< task::XInteractionHandler > xInteractionHandler(
+ comphelper::getProcessServiceFactory()->createInstance(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.task.InteractionHandler" ) ) ),
+ uno::UNO_QUERY_THROW );
xInteractionHandler->handle( rRequest );
+
if ( pPasswordRequest->isPassword() )
{
String aNewPass = pPasswordRequest->getPassword();
uno::Sequence< ::rtl::OUString > aPasswd( 1 );
aPasswd[0] = aNewPass;
- xPasswdContainer->addPersistent( aURL, aUserName, aPasswd, xInteractionHandler );
+
+ uno::Reference< task::XPasswordContainer > xPasswdContainer(
+ comphelper::getProcessServiceFactory()->createInstance(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.task.PasswordContainer" ) ) ),
+ uno::UNO_QUERY_THROW );
+ xPasswdContainer->addPersistent(
+ aURL, aUserName, aPasswd, xInteractionHandler );
}
}
}
@@ -330,7 +370,11 @@ IMPL_LINK( WebConnectionInfoDialog, EntrySelectedHdl, void*, EMPTYARG )
else
{
m_aRemoveBtn.Enable( TRUE );
- m_aChangeBtn.Enable( TRUE );
+
+ // url container entries (-> use system credentials) have
+ // no password
+ sal_Int32 nPos = (sal_Int32)(sal_IntPtr)pEntry->GetUserData();
+ m_aChangeBtn.Enable( nPos < m_nPos );
}
return 0;
diff --git a/svx/source/cui/webconninfo.hxx b/svx/source/cui/webconninfo.hxx
index 775d5072393c..f24b9f0dd4c8 100644
--- a/svx/source/cui/webconninfo.hxx
+++ b/svx/source/cui/webconninfo.hxx
@@ -65,6 +65,7 @@ namespace svx
FixedLine m_aButtonsFL;
CancelButton m_aCloseBtn;
HelpButton m_aHelpBtn;
+ sal_Int32 m_nPos;
DECL_LINK( HeaderBarClickedHdl, SvxSimpleTable* );
DECL_LINK( RemovePasswordHdl, PushButton* );
diff --git a/svx/source/cui/zoom.src b/svx/source/cui/zoom.src
index dca32260ab8d..197d1e2f2959 100644
--- a/svx/source/cui/zoom.src
+++ b/svx/source/cui/zoom.src
@@ -37,48 +37,48 @@ ModalDialog RID_SVXDLG_ZOOM
HelpId = SID_ATTR_ZOOM ;
OutputSize = TRUE ;
SvLook = TRUE ;
- Size = MAP_APPFONT ( 218 , 112 ) ;
+ Size = MAP_APPFONT ( 242 , 112 ) ;
Moveable = TRUE ;
Text [ en-US ] = "Zoom & View Layout";
FixedLine FL_ZOOM
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
+ Size = MAP_APPFONT ( 112 , 8 ) ;
Text [ en-US ] = "Zoom factor";
};
RadioButton BTN_OPTIMAL
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 91 , 10 ) ;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
Text [ en-US ] = "~Optimal" ;
};
RadioButton BTN_WHOLE_PAGE
{
Pos = MAP_APPFONT ( 12 , 27 ) ;
- Size = MAP_APPFONT ( 91 , 10 ) ;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
Text [ en-US ] = "~Fit width and height" ;
};
RadioButton BTN_PAGE_WIDTH
{
Pos = MAP_APPFONT ( 12 , 40 ) ;
- Size = MAP_APPFONT ( 91 , 10 ) ;
+ Size = MAP_APPFONT ( 105, 10 ) ;
Text [ en-US ] = "Fit ~width" ;
};
RadioButton BTN_100
{
Pos = MAP_APPFONT ( 12 , 53 ) ;
- Size = MAP_APPFONT ( 91 , 10 ) ;
+ Size = MAP_APPFONT ( 105, 10 ) ;
Text = "~100 %" ;
};
RadioButton BTN_USER
{
Pos = MAP_APPFONT ( 12 , 67 ) ;
- Size = MAP_APPFONT ( 59 , 10 ) ;
+ Size = MAP_APPFONT ( 72 , 10 ) ;
Text [ en-US ] = "~Variable" ;
};
MetricField ED_USER
{
- Pos = MAP_APPFONT ( 74 , 66 ) ;
+ Pos = MAP_APPFONT ( 86 , 66 ) ;
Size = MAP_APPFONT ( 32 , 12 ) ;
Border = TRUE ;
Group = TRUE ;
@@ -91,31 +91,31 @@ ModalDialog RID_SVXDLG_ZOOM
};
FixedLine FL_VIEWLAYOUT
{
- Pos = MAP_APPFONT ( 112 , 3 ) ;
- Size = MAP_APPFONT ( 100 , 8 ) ;
+ Pos = MAP_APPFONT ( 124 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 8 ) ;
Text [ en-US ] = "View layout";
};
RadioButton BTN_AUTOMATIC
{
- Pos = MAP_APPFONT ( 118 , 14 ) ;
- Size = MAP_APPFONT ( 91 , 10 ) ;
+ Pos = MAP_APPFONT ( 130 , 14 ) ;
+ Size = MAP_APPFONT ( 106 , 10 ) ;
Text [ en-US ] = "~Automatic" ;
};
RadioButton BTN_SINGLE
{
- Pos = MAP_APPFONT ( 118 , 27 ) ;
- Size = MAP_APPFONT ( 91 , 10 ) ;
+ Pos = MAP_APPFONT ( 130, 27 ) ;
+ Size = MAP_APPFONT ( 106, 10 ) ;
Text [ en-US ] = "~Single page" ;
};
RadioButton BTN_COLUMNS
{
- Pos = MAP_APPFONT ( 118 , 41 ) ;
- Size = MAP_APPFONT ( 64 , 10 ) ;
+ Pos = MAP_APPFONT ( 130, 41 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "~Columns" ;
};
MetricField ED_COLUMNS
{
- Pos = MAP_APPFONT ( 185 , 40 ) ;
+ Pos = MAP_APPFONT ( 209 , 40 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
Border = TRUE ;
Group = TRUE ;
@@ -128,29 +128,29 @@ ModalDialog RID_SVXDLG_ZOOM
};
CheckBox CHK_BOOK
{
- Pos = MAP_APPFONT ( 124 , 55 ) ;
+ Pos = MAP_APPFONT ( 136 , 55 ) ;
Size = MAP_APPFONT ( 85 , 10 ) ;
Text [ en-US ] = "~Book mode" ;
};
FixedLine FL_BOTTOM
{
Pos = MAP_APPFONT ( 6 , 81 ) ;
- Size = MAP_APPFONT ( 206 , 8 ) ;
+ Size = MAP_APPFONT ( 230 , 8 ) ;
};
OKButton BTN_ZOOM_OK
{
- Pos = MAP_APPFONT ( 53 , 92 ) ;
+ Pos = MAP_APPFONT ( 77 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_ZOOM_CANCEL
{
- Pos = MAP_APPFONT ( 106 , 92 ) ;
+ Pos = MAP_APPFONT ( 130 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_ZOOM_HELP
{
- Pos = MAP_APPFONT ( 162 , 92 ) ;
+ Pos = MAP_APPFONT ( 186 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index e4b2d1da1a0d..804db0c58a16 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -55,6 +55,12 @@
#include <svx/xlnedwit.hxx>
#include <svx/xlnstcit.hxx>
#include <svx/xlnedcit.hxx>
+#include <svx/xflgrit.hxx>
+#include <svx/xflhtit.hxx>
+#include <svx/xbtmpit.hxx>
+#include <svx/xgrad.hxx>
+#include <svx/xbitmap.hxx>
+#include <svx/xhatch.hxx>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
#ifndef __COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPESEGMENTCOMMAND_HPP__
@@ -64,6 +70,7 @@
#include <boost/shared_ptr.hpp>
#endif
#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/color/bcolortools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
// #i76201#
@@ -724,23 +731,23 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
/*const sal_Int32* pDefData =*/ ApplyShapeAttributes( rGeometryItem );
switch( eSpType )
{
- case mso_sptCan : nColorData = 0x20200000; break;
- case mso_sptCube : nColorData = 0x302d0000; break;
- case mso_sptActionButtonBlank : nColorData = 0x502ad400; break;
- case mso_sptActionButtonHome : nColorData = 0x702ad4ad; break;
- case mso_sptActionButtonHelp : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonInformation : nColorData = 0x702ad4a5; break;
- case mso_sptActionButtonBackPrevious : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonForwardNext : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonBeginning : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonEnd : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonReturn : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonDocument : nColorData = 0x702ad4da; break;
- case mso_sptActionButtonSound : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonMovie : nColorData = 0x602ad4a0; break;
- case mso_sptBevel : nColorData = 0x502ad400; break;
- case mso_sptFoldedCorner : nColorData = 0x20d00000; break;
- case mso_sptSmileyFace : nColorData = 0x20d00000; break;
+ case mso_sptCan : nColorData = 0x20400000; break;
+ case mso_sptCube : nColorData = 0x302e0000; break;
+ case mso_sptActionButtonBlank : nColorData = 0x502ce400; break;
+ case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break;
+ case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break;
+ case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break;
+ case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break;
+ case mso_sptBevel : nColorData = 0x502ce400; break;
+ case mso_sptFoldedCorner : nColorData = 0x20e00000; break;
+ case mso_sptSmileyFace : nColorData = 0x20e00000; break;
case mso_sptNil :
{
if( sShapeType.getLength() > 4 &&
@@ -751,38 +758,17 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
}
break;
case mso_sptCurvedLeftArrow :
- {
- if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
- {
- double fValue;
- seqAdjustmentValues[ 2 ].Value >>= fValue;
- fValue = 21600 - fValue;
- seqAdjustmentValues[ 2 ].Value <<= fValue;
- }
- nFlags |= DFF_CUSTOMSHAPE_FLIP_H;
- }
- break;
+ case mso_sptCurvedRightArrow :
case mso_sptCurvedUpArrow :
- {
- if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
- {
- double fValue;
- seqAdjustmentValues[ 2 ].Value >>= fValue;
- fValue = 21600 - fValue;
- seqAdjustmentValues[ 2 ].Value <<= fValue;
- }
- nFlags |= DFF_CUSTOMSHAPE_FLIP_V | DFF_CUSTOMSHAPE_EXCH;
- }
- break;
- case mso_sptCurvedDownArrow : nFlags |= DFF_CUSTOMSHAPE_EXCH; break;
- case mso_sptRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptRibbon : nColorData = 0x30dd0000; break;
+ case mso_sptCurvedDownArrow : nColorData = 0x2d000000; break;
+ case mso_sptRibbon2 : nColorData = 0x30ee0000; break;
+ case mso_sptRibbon : nColorData = 0x30ee0000; break;
- case mso_sptEllipseRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptEllipseRibbon : nColorData = 0x30dd0000; break;
+ case mso_sptEllipseRibbon2 : nColorData = 0x30ee0000; break;
+ case mso_sptEllipseRibbon : nColorData = 0x30ee0000; break;
- case mso_sptVerticalScroll : nColorData = 0x30dd0000; break;
- case mso_sptHorizontalScroll : nColorData = 0x30dd0000; break;
+ case mso_sptVerticalScroll : nColorData = 0x30ee0000; break;
+ case mso_sptHorizontalScroll : nColorData = 0x30ee0000; break;
default:
break;
}
@@ -1043,41 +1029,48 @@ sal_Bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedC
// nLumDat 27-24 = nLumDatEntry 0
// nLumDat 23-20 = nLumDatEntry 1 ...
// each 4bit entry is to be interpreted as a 10 percent signed luminance changing
-Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 nIndex )
+sal_Int32 EnhancedCustomShape2d::GetLuminanceChange( sal_uInt32 nIndex ) const
{
- Color aRetColor;
+ const sal_uInt32 nCount = nColorData >> 28;
+ if ( !nCount )
+ return 0;
- sal_uInt32 i, nColor, nTmp, nCount = nColorData >> 28;
+ if ( nIndex >= nCount )
+ nIndex = nCount - 1;
- if ( nCount )
+ const sal_Int32 nLumDat = nColorData << ( ( 1 + nIndex ) << 2 );
+ return ( nLumDat >> 28 ) * 10;
+}
+
+Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 nIndex ) const
+{
+ const sal_Int32 nLuminance = GetLuminanceChange(nIndex);
+ if( !nLuminance )
+ return rFillColor;
+
+ basegfx::BColor aHSVColor=
+ basegfx::tools::rgb2hsv(
+ basegfx::BColor(rFillColor.GetRed()/255.0,
+ rFillColor.GetGreen()/255.0,
+ rFillColor.GetBlue()/255.0));
+ if( nLuminance > 0 )
{
- if ( nIndex >= nCount )
- nIndex = nCount - 1;
-
- sal_uInt32 nFillColor = (sal_uInt32)rFillColor.GetRed() |
- ((sal_uInt32)rFillColor.GetGreen() << 8 ) |
- ((sal_uInt32)rFillColor.GetBlue() << 16 );
-
- sal_Int32 nLumDat = nColorData << ( ( 1 + nIndex ) << 2 );
- sal_Int32 nLuminance = ( nLumDat >> 28 ) * 12;
-
- nTmp = nFillColor;
- nColor = 0;
- for ( i = 0; i < 3; i++ )
- {
- sal_Int32 nC = (sal_uInt8)nTmp;
- nTmp >>= 8;
- nC += ( ( nLuminance * nC ) >> 8 );
- if ( nC < 0 )
- nC = 0;
- else if ( nC &~ 0xff )
- nC = 0xff;
- nColor >>= 8;
- nColor |= nC << 16;
- }
- aRetColor = Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
+ aHSVColor.setGreen(
+ aHSVColor.getGreen() * (1.0-nLuminance/100.0));
+ aHSVColor.setBlue(
+ nLuminance/100.0 +
+ (1.0-nLuminance/100.0)*aHSVColor.getBlue());
}
- return aRetColor;
+ else if( nLuminance < 0 )
+ {
+ aHSVColor.setBlue(
+ (1.0+nLuminance/100.0)*aHSVColor.getBlue());
+ }
+
+ aHSVColor = basegfx::tools::hsv2rgb(aHSVColor);
+ return Color( (sal_uInt8)static_cast< sal_Int32 >( basegfx::clamp(aHSVColor.getRed(),0.0,1.0) * 255.0 + 0.5 ),
+ (sal_uInt8)static_cast< sal_Int32 >( basegfx::clamp(aHSVColor.getGreen(),0.0,1.0) * 255.0 + 0.5 ),
+ (sal_uInt8)static_cast< sal_Int32 >( basegfx::clamp(aHSVColor.getBlue(),0.0,1.0) * 255.0 + 0.5 ) );
}
Rectangle EnhancedCustomShape2d::GetTextRect() const
@@ -1152,6 +1145,14 @@ sal_Bool EnhancedCustomShape2d::GetHandlePosition( const sal_uInt32 nIndex, Poin
}
rReturnPosition = GetPoint( aHandle.aPosition, sal_True, sal_False );
}
+ const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() );
+ if ( aGeoStat.nShearWink )
+ {
+ double nTan = aGeoStat.nTan;
+ if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
+ nTan = -nTan;
+ ShearPoint( rReturnPosition, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
+ }
if ( nRotateAngle )
{
double a = nRotateAngle * F_PI18000;
@@ -1193,6 +1194,15 @@ sal_Bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nI
double a = -nRotateAngle * F_PI18000;
RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) );
}
+ const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() );
+ if ( aGeoStat.nShearWink )
+ {
+ double nTan = -aGeoStat.nTan;
+ if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
+ nTan = -nTan;
+ ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
+ }
+
double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X();
double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y();
fPos1 /= fXScale;
@@ -1691,6 +1701,19 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
if(aNewB2DPolyPolygon.count())
{
+ if( !bLineGeometryNeededOnly )
+ {
+ // hack aNewB2DPolyPolygon to fill logic rect - this is
+ // needed to produce gradient fills that look like mso
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
+ aLogicRect.GetHeight()));
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+ }
// #i37011#
bool bForceCreateTwoObjects(false);
@@ -1860,6 +1883,78 @@ void CorrectCalloutArrows( MSO_SPT eSpType, sal_uInt32 nLineObjectCount, std::ve
}
}
+void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rCustomShapeSet,
+ sal_uInt32& nColorIndex, sal_uInt32 nColorCount)
+{
+ if ( !rObj.IsLine() )
+ {
+ const XFillStyle eFillStyle = ((const XFillStyleItem&)rObj.GetMergedItem(XATTR_FILLSTYLE)).GetValue();
+ switch( eFillStyle )
+ {
+ default:
+ case XFILL_SOLID:
+ {
+ Color aFillColor;
+ if ( nColorCount )
+ {
+ aFillColor = GetColorData(
+ ((XFillColorItem&)rCustomShapeSet.Get( XATTR_FILLCOLOR )).GetColorValue(),
+ std::min(nColorIndex, nColorCount-1) );
+ rObj.SetMergedItem( XFillColorItem( String(), aFillColor ) );
+ }
+ break;
+ }
+ case XFILL_GRADIENT:
+ {
+ XGradient aXGradient(((const XFillGradientItem&)rObj.GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue());
+ if ( nColorCount )
+ {
+ aXGradient.SetStartColor(
+ GetColorData(
+ aXGradient.GetStartColor(),
+ std::min(nColorIndex, nColorCount-1) ));
+ aXGradient.SetEndColor(
+ GetColorData(
+ aXGradient.GetEndColor(),
+ std::min(nColorIndex, nColorCount-1) ));
+ }
+
+ rObj.SetMergedItem( XFillGradientItem( String(), aXGradient ) );
+ break;
+ }
+ case XFILL_HATCH:
+ {
+ XHatch aXHatch(((const XFillHatchItem&)rObj.GetMergedItem(XATTR_FILLHATCH)).GetHatchValue());
+ if ( nColorCount )
+ {
+ aXHatch.SetColor(
+ GetColorData(
+ aXHatch.GetColor(),
+ std::min(nColorIndex, nColorCount-1) ));
+ }
+
+ rObj.SetMergedItem( XFillHatchItem( String(), aXHatch ) );
+ break;
+ }
+ case XFILL_BITMAP:
+ {
+ Bitmap aBitmap(((const XFillBitmapItem&)rObj.GetMergedItem(XATTR_FILLBITMAP)).GetBitmapValue().GetBitmap());
+ if ( nColorCount )
+ {
+ aBitmap.Adjust(
+ static_cast< short > ( GetLuminanceChange(
+ std::min(nColorIndex, nColorCount-1))));
+ }
+
+ rObj.SetMergedItem( XFillBitmapItem( String(), aBitmap ) );
+ break;
+ }
+ }
+
+ if ( nColorIndex < nColorCount )
+ nColorIndex++;
+ }
+}
SdrObject* EnhancedCustomShape2d::CreatePathObj( sal_Bool bLineGeometryNeededOnly )
{
@@ -1884,18 +1979,10 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( sal_Bool bLineGeometryNeededOnl
if ( vObjectList.size() )
{
const SfxItemSet& rCustomShapeSet = pCustomShapeObj->GetMergedItemSet();
- // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here
- // const sal_Bool bShadow(((SdrShadowItem&)rCustomShapeSet.Get( SDRATTR_SHADOW )).GetValue());
- Color aBasicColor( COL_WHITE );
Color aFillColor;
sal_uInt32 nColorCount = nColorData >> 28;
sal_uInt32 nColorIndex = 0;
- if ( nColorCount )
- {
- aBasicColor = ((XFillColorItem&)rCustomShapeSet.Get( XATTR_FILLCOLOR )).GetColorValue();
- }
-
// #i37011# remove invisible objects
if(vObjectList.size())
{
@@ -1920,26 +2007,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( sal_Bool bLineGeometryNeededOnl
if(1L == vObjectList.size())
{
// a single object, correct some values
- SdrPathObj* pObj(vObjectList[0L]);
-
-// For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here
-// if(bShadow)
-// {
-// pObj->SetMergedItem(SdrShadowItem(sal_True));
-// }
-
- if(!pObj->IsLine())
- {
- if ( nColorIndex < nColorCount )
- {
- aFillColor = GetColorData( aBasicColor, nColorIndex++ );
- }
-
- if ( nColorCount )
- {
- pObj->SetMergedItem( XFillColorItem( String(), aFillColor ) );
- }
- }
+ AdaptObjColor(*vObjectList[0L],rCustomShapeSet,nColorIndex,nColorCount);
}
else
{
@@ -1958,16 +2026,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( sal_Bool bLineGeometryNeededOnl
else
{
nAreaObjectCount++;
-
- if ( nColorIndex < nColorCount )
- {
- aFillColor = GetColorData( aBasicColor, nColorIndex++ );
- }
-
- if ( nColorCount )
- {
- pObj->SetMergedItem( XFillColorItem( String(), aFillColor ) );
- }
+ AdaptObjColor(*pObj,rCustomShapeSet,nColorIndex,nColorCount);
}
}
@@ -2062,13 +2121,17 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj )
for ( i = 0; i < nCount; i++ )
{
SdrGluePoint aGluePoint;
- const Point& rPoint = GetPoint( seqGluePoints[ i ], sal_True, sal_True );
- double fXRel = rPoint.X();
- double fYRel = rPoint.Y();
- fXRel = aLogicRect.GetWidth() == 0 ? 0.0 : fXRel / aLogicRect.GetWidth() * 10000;
- fYRel = aLogicRect.GetHeight() == 0 ? 0.0 : fYRel / aLogicRect.GetHeight() * 10000;
- aGluePoint.SetPos( Point( (sal_Int32)fXRel, (sal_Int32)fYRel ) );
- aGluePoint.SetPercent( sal_True );
+
+ aGluePoint.SetPos( GetPoint( seqGluePoints[ i ], sal_True, sal_True ) );
+ aGluePoint.SetPercent( sal_False );
+
+// const Point& rPoint = GetPoint( seqGluePoints[ i ], sal_True, sal_True );
+// double fXRel = rPoint.X();
+// double fYRel = rPoint.Y();
+// fXRel = aLogicRect.GetWidth() == 0 ? 0.0 : fXRel / aLogicRect.GetWidth() * 10000;
+// fYRel = aLogicRect.GetHeight() == 0 ? 0.0 : fYRel / aLogicRect.GetHeight() * 10000;
+// aGluePoint.SetPos( Point( (sal_Int32)fXRel, (sal_Int32)fYRel ) );
+// aGluePoint.SetPercent( sal_True );
aGluePoint.SetAlign( SDRVERTALIGN_TOP | SDRHORZALIGN_LEFT );
aGluePoint.SetEscDir( SDRESC_SMART );
SdrGluePointList* pList = pObj->ForceGluePointList();
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.hxx b/svx/source/customshapes/EnhancedCustomShape2d.hxx
index 7f42ad751edc..6be05a9e588d 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.hxx
@@ -32,28 +32,19 @@
#define _ENHANCEDCUSTOMSHAPE2D_HXX
#include <svx/msdffdef.hxx>
-#include <svx/msdffimp.hxx>
#include <svx/sdasitm.hxx>
#include <com/sun/star/uno/Sequence.h>
-#ifndef _com_sun_star_beans_PropertyValues_hpp__
#include <com/sun/star/beans/PropertyValues.hpp>
-#endif
#include <com/sun/star/awt/Point.hpp>
#include <svtools/itemset.hxx>
-#ifndef __com_sun_star_drawing_EnhancedCustomShapeParameterPair_hpp__
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
-#endif
#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
-#ifndef __COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPETEXTFRAME_HPP__
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
-#endif
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
#include <EnhancedCustomShapeFunctionParser.hxx>
-#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <boost/shared_ptr.hpp>
-#endif
#include <vector>
#define DFF_CUSTOMSHAPE_FLIP_V 1
@@ -84,6 +75,7 @@ class SvxMSDffAdjustmentHandle;
// between X_RANGE and Y_RANGE
class SdrPathObj;
+
class EnhancedCustomShape2d : public SfxItemSet
{
SdrObject* pCustomShapeObj;
@@ -128,7 +120,10 @@ class EnhancedCustomShape2d : public SfxItemSet
sal_Int32 nRotateAngle;
sal_Bool SetAdjustValueAsDouble( const double& rValue, const sal_Int32 nIndex );
- Color GetColorData( const Color& rFillColor, sal_uInt32 nIndex );
+ sal_Int32 GetLuminanceChange( sal_uInt32 nIndex ) const;
+ Color GetColorData( const Color& rFillColor, sal_uInt32 nIndex ) const;
+ void AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rCustomShapeSet,
+ sal_uInt32& nColorIndex, sal_uInt32 nColorCount);
sal_Bool GetParameter( double& rParameterReturnValue, const com::sun::star::drawing::EnhancedCustomShapeParameter&,
const sal_Bool bReplaceGeoWidth, const sal_Bool bReplaceGeoHeight ) const;
Point GetPoint( const com::sun::star::drawing::EnhancedCustomShapeParameterPair&,
@@ -164,17 +159,17 @@ class EnhancedCustomShape2d : public SfxItemSet
sal_Bool IsFlipHorz() { return bFlipH; };
sal_Int32 GetRotateAngle() { return nRotateAngle; };
- SdrObject* CreateLineGeometry();
- SdrObject* CreateObject( sal_Bool bLineGeometryNeededOnly );
- void ApplyGluePoints( SdrObject* pObj );
- Rectangle GetTextRect() const;
+ SVX_DLLPUBLIC SdrObject* CreateLineGeometry();
+ SVX_DLLPUBLIC SdrObject* CreateObject( sal_Bool bLineGeometryNeededOnly );
+ SVX_DLLPUBLIC void ApplyGluePoints( SdrObject* pObj );
+ SVX_DLLPUBLIC Rectangle GetTextRect() const;
- sal_uInt32 GetHdlCount() const;
- sal_Bool GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const;
- sal_Bool SetHandleControllerPosition( const sal_uInt32 nIndex, const com::sun::star::awt::Point& rPosition );
+ SVX_DLLPUBLIC sal_uInt32 GetHdlCount() const;
+ SVX_DLLPUBLIC sal_Bool GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const;
+ SVX_DLLPUBLIC sal_Bool SetHandleControllerPosition( const sal_uInt32 nIndex, const com::sun::star::awt::Point& rPosition );
- EnhancedCustomShape2d( SdrObject* pSdrObjCustomShape );
- ~EnhancedCustomShape2d();
+ SVX_DLLPUBLIC EnhancedCustomShape2d( SdrObject* pSdrObjCustomShape );
+ SVX_DLLPUBLIC ~EnhancedCustomShape2d();
enum EnumFunc
{
@@ -198,15 +193,15 @@ class EnhancedCustomShape2d : public SfxItemSet
double GetEquationValueAsDouble( const sal_Int32 nIndex ) const;
sal_Int32 GetAdjustValueAsInteger( const sal_Int32 nIndex, const sal_Int32 nDefault = 0 ) const;
- static rtl::OUString GetEquation( const sal_uInt16 nFlags, sal_Int16 nPara1, sal_Int16 nPara2, sal_Int16 nPara3 );
+ SVX_DLLPUBLIC static rtl::OUString GetEquation( const sal_uInt16 nFlags, sal_Int16 nPara1, sal_Int16 nPara2, sal_Int16 nPara3 );
static void AppendEnhancedCustomShapeEquationParameter( rtl::OUString& rParameter, const sal_Int16 nPara, const sal_Bool bIsSpecialValue );
static void SetEnhancedCustomShapeEquationParameter( com::sun::star::drawing::EnhancedCustomShapeParameter&
rParameter, const sal_Int16 nPara, const sal_Bool bIsSpecialValue );
- static void SetEnhancedCustomShapeParameter( com::sun::star::drawing::EnhancedCustomShapeParameter&
+ SVX_DLLPUBLIC static void SetEnhancedCustomShapeParameter( com::sun::star::drawing::EnhancedCustomShapeParameter&
rParameter, const sal_Int32 nValue );
- static void SetEnhancedCustomShapeHandleParameter( com::sun::star::drawing::EnhancedCustomShapeParameter&
+ SVX_DLLPUBLIC static void SetEnhancedCustomShapeHandleParameter( com::sun::star::drawing::EnhancedCustomShapeParameter&
rParameter, const sal_Int32 nPara, const sal_Bool bIsSpecialValue, sal_Bool bHorz );
static sal_Bool ConvertSequenceToEnhancedCustomShape2dHandle( const com::sun::star::beans::PropertyValues& rHandleProperties,
EnhancedCustomShape2d::Handle& rDestinationHandle );
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx
index 3451007a2b28..6d885d51e012 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx
@@ -31,14 +31,15 @@
#ifndef _ENHANCEDCUSTOMSHAPE3D_HXX
#define _ENHANCEDCUSTOMSHAPE3D_HXX
-#include <svx/msdffimp.hxx>
#include <vector>
-//#include <poly3d.hxx>
-//#include <goodies/point3d.hxx>
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/polygon/b3dpolygon.hxx>
+#include <tools/gen.hxx>
+
+class SdrObject;
+
class EnhancedCustomShape3d
{
class Transformation2D
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 0ac56ff21a43..8ae4e34197c5 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -307,6 +307,19 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende
pRenderedShape = pRenderedShape3d;
}
Rectangle aRect( pSdrObjCustomShape->GetSnapRect() );
+
+ const GeoStat& rGeoStat = ((SdrObjCustomShape*)pSdrObjCustomShape)->GetGeoStat();
+ if ( rGeoStat.nShearWink )
+ {
+ long nShearWink = rGeoStat.nShearWink;
+ double nTan = rGeoStat.nTan;
+ if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
+ {
+ nShearWink = -nShearWink;
+ nTan = -nTan;
+ }
+ pRenderedShape->Shear( pSdrObjCustomShape->GetSnapRect().Center(), nShearWink, nTan, FALSE);
+ }
if( nRotateAngle )
{
double a = nRotateAngle * F_PI18000;
@@ -374,19 +387,34 @@ com::sun::star::drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEng
if ( pObj )
{
Rectangle aRect( pSdrObjCustomShape->GetSnapRect() );
+ sal_Bool bFlipV = aCustomShape2d.IsFlipVert();
+ sal_Bool bFlipH = aCustomShape2d.IsFlipHorz();
+
+ const GeoStat& rGeoStat = ((SdrObjCustomShape*)pSdrObjCustomShape)->GetGeoStat();
+ if ( rGeoStat.nShearWink )
+ {
+ long nShearWink = rGeoStat.nShearWink;
+ double nTan = rGeoStat.nTan;
+ if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
+ {
+ nShearWink = -nShearWink;
+ nTan = -nTan;
+ }
+ pObj->Shear( aRect.Center(), nShearWink, nTan, FALSE);
+ }
sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle();
if( nRotateAngle )
{
double a = nRotateAngle * F_PI18000;
pObj->NbcRotate( aRect.Center(), nRotateAngle, sin( a ), cos( a ) );
}
- if ( aCustomShape2d.IsFlipHorz() )
+ if ( bFlipH )
{
Point aTop( ( aRect.Left() + aRect.Right() ) >> 1, aRect.Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
pObj->NbcMirror( aTop, aBottom );
}
- if ( aCustomShape2d.IsFlipVert() )
+ if ( bFlipV )
{
Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) >> 1 );
Point aRight( aLeft.X() + 1000, aLeft.Y() );
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 426c94adcab8..abe6178cc800 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -683,7 +683,7 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW
break;
const Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] );
const sal_uInt16 nPointCount = rOutlinePoly.GetSize();
- if ( nPointCount )
+ if ( nPointCount > 1 )
{
std::vector< double > vDistances;
vDistances.reserve( nPointCount );
@@ -745,7 +745,7 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW
const Polygon& rOutlinePoly2( aOutlines2d[ nOutline2dIdx++ ] );
const sal_uInt16 nPointCount = rOutlinePoly.GetSize();
const sal_uInt16 nPointCount2 = rOutlinePoly2.GetSize();
- if ( nPointCount && nPointCount2 )
+ if ( ( nPointCount > 1 ) && ( nPointCount2 > 1 ) )
{
std::vector< double > vDistances;
vDistances.reserve( nPointCount );
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 8f447de5b51c..022b7505cb44 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -44,7 +44,7 @@
#include <typeinfo>
#define BOOST_SPIRIT_DEBUG
#endif
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
#if (OSL_DEBUG_LEVEL > 0)
#include <iostream>
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 9cb3c414de37..0b41dda45eaa 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -54,10 +54,6 @@ static const SvxMSDffTextRect TextRect[] =
{
{ { 0, 0 }, { 0, 0 } }
};
-static const sal_Int32 BoundRect[] =
-{
- 0, 0, 21600, 21600
-};
static const mso_CustomShape mso =
{
(SvxMSDffVertPair*)mso_sptVert, sizeof( mso_sptVert ) / sizeof( SvxMSDffVertPair ),
@@ -668,10 +664,6 @@ static const SvxMSDffVertPair mso_sptCanGluePoints[] =
{
{ 44, 6 MSO_I }, { 44, 0 }, { 0, 10800 }, { 44, 21600 }, { 88, 10800 }
};
-static const sal_Int32 mso_sptCanBoundRect[] =
-{
- 0, 0, 88, 21600
-};
static const SvxMSDffHandle mso_sptCanHandle[] =
{
{ MSDFF_HANDLE_FLAGS_RANGE,
@@ -1197,60 +1189,422 @@ static const mso_CustomShape msoBentUpArrow =
(SvxMSDffHandle*)mso_sptBentUpArrowHandle, sizeof( mso_sptBentUpArrowHandle ) / sizeof( SvxMSDffHandle )
};
-static const SvxMSDffVertPair mso_sptCurvedArrowVert[] = // adjustment1 : y 10800 - 21600, adjustment2 : y 16424 - 21600
-{ // adjustment3 : x 0 - 21600
- { 21600, 0 },
- { 9675, 0 }, { 0, 10 MSO_I }, { 0, 9 MSO_I }, // ccp
- { 0, 11 MSO_I },
- { 0, 14 MSO_I }, { 15 MSO_I, 1 MSO_I }, { 2 MSO_I, 1 MSO_I }, // ccp
- { 2 MSO_I, 21600 }, { 21600, 7 MSO_I }, { 2 MSO_I, 0 MSO_I }, { 2 MSO_I, 16 MSO_I },// pppp
- { 2 MSO_I, 16 MSO_I }, { 80, 8 MSO_I }, { 80, 8 MSO_I }, // ccp
- { 80, 8 MSO_I }, { 21600, 5 MSO_I }, { 21600, 0 } // ccp
-};
-static const sal_uInt16 mso_sptCurvedArrowSegm[] =
-{
- 0x4000, 0x2001, 0x0001, 0x2001, 0x0004, 0x2002, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCurvedArrowCalc[] =
-{
- { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, // 0
- { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, // 1
- { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } }, // 2
- { 0x8000, { 21600, 0, DFF_Prop_adjust2Value } }, // 3
- { 0xa000, { DFF_Prop_adjust2Value, 0, DFF_Prop_adjustValue } }, // 4
- { 0xa000, { 0x0404, 0, 0x0403 } }, // 5
- { 0x2001, { 0x0405, 1, 2 } }, // 6
- { 0xa000, { DFF_Prop_adjust2Value, 0, 0x0406 } }, // 7
- { 0x2001, { DFF_Prop_adjust2Value, 1, 2 } }, // 8
- { 0xa000, { 0x0408, 0, 0x0406 } }, // 9
- { 0x2001, { 0x0409, 10000, 22326 } }, // 10
- { 0x6000, { 0x0409, 0x0405, 0 } }, // 11
- { 0xa000, { DFF_Prop_adjust2Value, 0, 0x040b } }, // 12
- { 0x2001, { 0x040c, 10000, 23148 } }, // 13
- { 0x6000, { 0x040d, 0x040b, 0 } }, // 14
- { 0x2001, { DFF_Prop_adjust3Value, 10000, 25467 } }, // 15
- { 0x6000, { DFF_Prop_adjustValue, 0x0403, 0 } } // 16
-};
-static const sal_Int32 mso_sptCurvedArrowDefault[] =
-{
- 3, 13000, 19400, 14400
-};
-static const SvxMSDffTextRectangles mso_sptCurvedArrowTextRect[] = // todo
+
+static const SvxMSDffVertPair mso_sptCurvedDownVert[] =
{
- { { 0, 0 }, { 21600, 21600 } }
+ { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 0, 21600 }, { 4 MSO_I, 0 },
+ { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 4 MSO_I, 0 }, { 17 MSO_I, 24 MSO_I },
+ { 15 MSO_I, 0 }, { 1 MSO_I, 21 MSO_I }, { 17 MSO_I, 24 MSO_I }, { 15 MSO_I, 21600 },
+ { 15 MSO_I, 0 }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 0 }, { 13 MSO_I, 2 MSO_I },
+ { 14 MSO_I, 2 MSO_I }, { 8 MSO_I, 21600 }, { 12 MSO_I, 2 MSO_I },
+ { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 11 MSO_I, 2 MSO_I }, { 17 MSO_I, 24 MSO_I },
+ { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 17 MSO_I, 24 MSO_I }, { 4 MSO_I, 0 }
+};
+static const sal_uInt16 mso_sptCurvedDownSegm[] =
+{
+ 0xa508,
+ 0xa304,
+ 0x6000,
+ 0x8000,
+ 0xa604,
+ 0x0003,
+ 0xa308,
+ 0x6000,
+ 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedDownCalc[] =
+{
+ { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+ { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+ { 0x2001, { 0x403, 1, 2 } },
+ { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+ { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x406, 1, 2 } },
+ { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+ { 0x8000, { 21600, 0, DFF_Prop_adjust3Value } },
+ { 0xa00f, { 0x409, 21600, 0x404 } },
+ { 0x6000, { 0x404, 0x40a, 0 } },
+ { 0x6000, { 0x40b, DFF_Prop_adjust2Value, 21600 } },
+ { 0x6000, { 0x407, 0x40a, 0 } },
+ { 0xa000, { 0x40c, 21600, DFF_Prop_adjustValue } },
+ { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x40f, 1, 2 } },
+ { 0x6002, { 0x404, 0x407, 0 } },
+ { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+ { 0x2001, { 0x412, 1, 2 } },
+ { 0xa000, { 0x411, 0, 0x413 } },
+ { 0x0001, { 21600, 2, 1 } },
+ { 0xa000, { 0x411, 0, 0x404 } },
+ { 0x600f, { 0x416, 0x404, 21600 } },
+ { 0x8000, { 21600, 0, 0x417 } },
+ { 0x2000, { 0x408, 128, 0 } },
+ { 0x2001, { 0x405, 1, 2 } },
+ { 0x2000, { 0x405, 0, 128 } },
+ { 0xe000, { DFF_Prop_adjustValue, 0x411, 0x40c } },
+ { 0x600f, { 0x414, 0x404, 21600 } },
+ { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x41e, 1, 2 } },
+ { 0x0001, { 21600, 21600, 1 } },
+ { 0x6001, { 0x409, 0x409, 1 } },
+ { 0xa000, { 0x420, 0, 0x421 } },
+ { 0x200d, { 0x422, 0, 0 } },
+ { 0x2000, { 0x423, 21600, 0 } },
+ { 0x8001, { 21600, 21600, 0x424 } },
+ { 0x2000, { 0x425, 64, 0 } },
+ { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+ { 0x600f, { 0x41f, 0x427, 21600 } },
+ { 0x8000, { 21600, 0, 0x428 } },
+ { 0x2000, { 0x429, 64, 0 } },
+ { 0x2001, { 0x404, 1, 2 } },
+ { 0xa000, { DFF_Prop_adjust2Value, 0, 0x42b } },
+ { 0x0001, { 21600, 2195, 16384 } },
+ { 0x0001, { 21600, 14189, 16384 } }
};
-static const mso_CustomShape msoCurvedArrow =
+static const sal_Int32 mso_sptCurvedDownDefault[] =
{
- (SvxMSDffVertPair*)mso_sptCurvedArrowVert, sizeof( mso_sptCurvedArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptCurvedArrowSegm, sizeof( mso_sptCurvedArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCurvedArrowCalc, sizeof( mso_sptCurvedArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptCurvedArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptCurvedArrowTextRect, sizeof( mso_sptCurvedArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
+ 3, 12960, 19440, 14400
+};
+static const SvxMSDffTextRectangles mso_sptCurvedDownTextRect[] =
+{
+ { { 43 MSO_I, 45 MSO_I }, { 44 MSO_I, 46 MSO_I } }
+};
+static const SvxMSDffVertPair mso_sptCurvedDownGluePoints[] =
+{
+ { 17 MSO_I, 0 }, { 16 MSO_I, 21600 }, { 12 MSO_I, 2 MSO_I }, { 8 MSO_I, 21600 }, { 14 MSO_I, 2 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedDownHandles[] =
+{
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+ 0x100, 21600, 10800, 10800, 3 + 0x26, 3 + 0x1b, 0, 10800 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL,
+ 0x101, 21600, 10800, 10800, 3 + 0x19, 21600, 0, 10800 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL,
+ 21600, 0x102, 10800, 10800, 3375, 21600, 3 + 0x2a, 21600 }
+};
+static const mso_CustomShape msoCurvedDownArrow =
+{
+ (SvxMSDffVertPair*)mso_sptCurvedDownVert, sizeof( mso_sptCurvedDownVert ) / sizeof( SvxMSDffVertPair ),
+ (sal_uInt16*)mso_sptCurvedDownSegm, sizeof( mso_sptCurvedDownSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCurvedDownCalc, sizeof( mso_sptCurvedDownCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptCurvedDownDefault,
+ (SvxMSDffTextRectangles*)mso_sptCurvedDownTextRect, sizeof( mso_sptCurvedDownTextRect ) / sizeof( SvxMSDffTextRectangles ),
21600, 21600,
0x80000000, 0x80000000,
- NULL, 0,
- NULL, 0 // handles
+ (SvxMSDffVertPair*)mso_sptCurvedDownGluePoints, sizeof( mso_sptCurvedDownGluePoints ) / sizeof( SvxMSDffVertPair ),
+ (SvxMSDffHandle*)mso_sptCurvedDownHandles, sizeof( mso_sptCurvedDownHandles ) / sizeof( SvxMSDffHandle )
+};
+
+static const SvxMSDffVertPair mso_sptCurvedUpVert[] =
+{
+ { 0, 22 MSO_I }, { 3 MSO_I, 21 MSO_I }, { 0, 0 }, { 4 MSO_I, 21 MSO_I },
+ { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 21 MSO_I }, { 12 MSO_I, 2 MSO_I },
+ { 13 MSO_I, 2 MSO_I }, { 8 MSO_I, 0 }, { 11 MSO_I, 2 MSO_I },
+ { 0, 22 MSO_I }, { 3 MSO_I, 21 MSO_I }, { 10 MSO_I, 2 MSO_I }, { 16 MSO_I, 24 MSO_I },
+ { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 16 MSO_I, 24 MSO_I }, { 14 MSO_I, 0 },
+ { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 21 MSO_I }, { 16 MSO_I, 24 MSO_I }
+};
+static const sal_uInt16 mso_sptCurvedUpSegm[] =
+{
+ 0xa408,
+ 0x0003,
+ 0xa508,
+ 0x6000,
+ 0x8000,
+ 0xa604,
+ 0xaa00,
+ 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedUpCalc[] =
+{
+ { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+ { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+ { 0x2001, { 0x403, 1, 2 } },
+ { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+ { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x406, 1, 2 } },
+ { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+ { 0xa00f, { DFF_Prop_adjust3Value, 21600, 0x404 } },
+ { 0x6000, { 0x404, 0x409, 0 } },
+ { 0x6000, { 0x40a, DFF_Prop_adjust2Value, 21600 } },
+ { 0x6000, { 0x407, 0x409, 0 } },
+ { 0xa000, { 0x40b, 21600, DFF_Prop_adjustValue } },
+ { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x40e, 1, 2 } },
+ { 0x6002, { 0x404, 0x407, 0 } },
+ { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+ { 0x2001, { 0x411, 1, 2 } },
+ { 0xa000, { 0x410, 0, 0x412 } },
+ { 0x0000, { 21600, 0, 0 } },
+ { 0x0000, { 21600, 0, 0 } },
+ { 0x0000, { 0, 0, 21600 } },
+ { 0xa000, { 0x410, 0, 0x404 } },
+ { 0x600f, { 0x417, 0x404, 21600 } },
+ { 0x2000, { 0x408, 128, 0 } },
+ { 0x2001, { 0x405, 1, 2 } },
+ { 0x2000, { 0x405, 0, 128 } },
+ { 0xe000, { DFF_Prop_adjustValue, 0x410, 0x40b } },
+ { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x41d, 1, 2 } },
+ { 0x0001, { 21600, 21600, 1 } },
+ { 0x6001, { DFF_Prop_adjust3Value, DFF_Prop_adjust3Value, 1 } },
+ { 0xa000, { 0x41f, 0, 0x420 } },
+ { 0x200d, { 0x421, 0, 0 } },
+ { 0x2000, { 0x422, 21600, 0 } },
+ { 0x8001, { 21600, 21600, 0x423 } },
+ { 0x2000, { 0x424, 64, 0 } },
+ { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+ { 0x600f, { 0x41e, 0x426, 21600 } },
+ { 0x2000, { 0x427, 0, 64 } },
+ { 0x2001, { 0x404, 1, 2 } },
+ { 0xa000, { DFF_Prop_adjust2Value, 0, 0x429 } },
+ { 0x0001, { 21600, 2195, 16384 } },
+ { 0x0001, { 21600, 14189, 16384 } }
+};
+static const sal_Int32 mso_sptCurvedUpDefault[] =
+{
+ 3, 12960, 19440, 7200
+};
+static const SvxMSDffTextRectangles mso_sptCurvedUpTextRect[] =
+{
+ { { 41 MSO_I, 43 MSO_I }, { 42 MSO_I, 44 MSO_I } }
+};
+static const SvxMSDffVertPair mso_sptCurvedUpGluePoints[] =
+{
+ { 8 MSO_I, 0 }, { 11 MSO_I, 2 MSO_I }, { 15 MSO_I, 0 }, { 16 MSO_I, 21 MSO_I }, { 13 MSO_I, 2 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedUpHandles[] =
+{
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+ 0x100, 0, 10800, 10800, 3 + 37, 3 + 27, 0, 10800 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+ 0x101, 0, 10800, 10800, 3 + 25, 3 + 20, 0, 10800 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+ 21600, 0x102, 10800, 10800, 3375, 21600, 0, 3 + 40 }
+};
+static const mso_CustomShape msoCurvedUpArrow =
+{
+ (SvxMSDffVertPair*)mso_sptCurvedUpVert, sizeof( mso_sptCurvedUpVert ) / sizeof( SvxMSDffVertPair ),
+ (sal_uInt16*)mso_sptCurvedUpSegm, sizeof( mso_sptCurvedUpSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCurvedUpCalc, sizeof( mso_sptCurvedUpCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptCurvedUpDefault,
+ (SvxMSDffTextRectangles*)mso_sptCurvedUpTextRect, sizeof( mso_sptCurvedUpTextRect ) / sizeof( SvxMSDffTextRectangles ),
+ 21600, 21600,
+ 0x80000000, 0x80000000,
+ (SvxMSDffVertPair*)mso_sptCurvedUpGluePoints, sizeof( mso_sptCurvedUpGluePoints ) / sizeof( SvxMSDffVertPair ),
+ (SvxMSDffHandle*)mso_sptCurvedUpHandles, sizeof( mso_sptCurvedUpHandles ) / sizeof( SvxMSDffHandle )
+};
+
+static const SvxMSDffVertPair mso_sptCurvedRightVert[] =
+{
+ { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 22 MSO_I, 0 }, { 0, 4 MSO_I }, { 0, 15 MSO_I }, { 23 MSO_I, 1 MSO_I }, { 0, 7 MSO_I }, { 2 MSO_I, 13 MSO_I },
+ { 2 MSO_I, 14 MSO_I }, { 22 MSO_I, 8 MSO_I }, { 2 MSO_I, 12 MSO_I },
+ { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 2 MSO_I, 11 MSO_I }, { 26 MSO_I, 17 MSO_I }, { 0, 15 MSO_I }, { 23 MSO_I, 1 MSO_I }, { 26 MSO_I, 17 MSO_I }, { 22 MSO_I, 15 MSO_I },
+ { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 0, 4 MSO_I }, { 26 MSO_I, 17 MSO_I }
+};
+static const sal_uInt16 mso_sptCurvedRightSegm[] =
+{
+ 0xa408,
+ 0x0003,
+ 0xa508,
+ 0x6000,
+ 0x8000,
+ 0xa404,
+ 0xaa00,
+ 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedRightCalc[] =
+{
+ { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+ { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+ { 0x2001, { 0x403, 1, 2 } },
+ { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+ { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x406, 1, 2 } },
+ { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+ { 0x8000, { 21600, 0, DFF_Prop_adjust3Value } },
+ { 0xa00f, { 0x409, 21600, 0x404 } },
+ { 0x6000, { 0x404, 0x40a, 0 } },
+ { 0x6000, { 0x40b, DFF_Prop_adjust2Value, 21600 } },
+ { 0x6000, { 0x407, 0x40a, 0 } },
+ { 0xa000, { 0x40c, 21600, DFF_Prop_adjustValue } },
+ { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x40f, 1, 2 } },
+ { 0x6002, { 0x404, 0x407, 0 } },
+ { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+ { 0x2001, { 0x412, 1, 2 } },
+ { 0xa000, { 0x411, 0, 0x413 } },
+ { 0x0000, { 21600, 0, 0 } },
+ { 0x0000, { 21600, 0, 0 } },
+ { 0x0001, { 21600, 2, 1 } },
+ { 0xa000, { 0x411, 0, 0x404 } },
+ { 0x600f, { 0x418, 0x404, 21600 } },
+ { 0x8000, { 21600, 0, 0x419 } },
+ { 0x2000, { 0x408, 128, 0 } },
+ { 0x2001, { 0x405, 1, 2 } },
+ { 0x2000, { 0x405, 0, 128 } },
+ { 0xe000, { DFF_Prop_adjustValue, 0x411, 0x40c } },
+ { 0x600f, { 0x414, 0x404, 21600 } },
+ { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x420, 1, 2 } },
+ { 0x0001, { 21600, 21600, 1 } },
+ { 0x6001, { 0x409, 0x409, 1 } },
+ { 0xa000, { 0x422, 0, 0x423 } },
+ { 0x200d, { 0x424, 0, 0 } },
+ { 0x2000, { 0x425, 21600, 0 } },
+ { 0x8001, { 21600, 21600, 0x426 } },
+ { 0x2000, { 0x427, 64, 0 } },
+ { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+ { 0x600f, { 0x421, 0x429, 21600 } },
+ { 0x8000, { 21600, 0, 0x42a } },
+ { 0x2000, { 0x42b, 64, 0 } },
+ { 0x2001, { 0x404, 1, 2 } },
+ { 0xa000, { DFF_Prop_adjust2Value, 0, 0x42d } },
+ { 0x0001, { 21600, 2195, 16384 } },
+ { 0x0001, { 21600, 14189, 16384 } }
+};
+static const sal_Int32 mso_sptCurvedRightDefault[] =
+{
+ 3, 12960, 19440, 14400
+};
+static const SvxMSDffTextRectangles mso_sptCurvedRightTextRect[] =
+{
+ { { 47 MSO_I, 45 MSO_I }, { 48 MSO_I, 46 MSO_I } }
+};
+static const SvxMSDffVertPair mso_sptCurvedRightGluePoints[] =
+{
+ { 0, 17 MSO_I }, { 2 MSO_I, 14 MSO_I }, { 22 MSO_I, 8 MSO_I }, { 2 MSO_I, 12 MSO_I }, { 22 MSO_I, 16 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedRightHandles[] =
+{
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+ 21600, 0x100, 10800, 10800, 0, 10800, 3 + 40, 3 + 29 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+ 21600, 0x101, 10800, 10800, 0, 10800, 3 + 27, 3 + 21 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+ 0x102, 21600, 10800, 10800, 3 + 44, 3 + 22, 3375, 21600 }
+};
+static const mso_CustomShape msoCurvedRightArrow =
+{
+ (SvxMSDffVertPair*)mso_sptCurvedRightVert, sizeof( mso_sptCurvedRightVert ) / sizeof( SvxMSDffVertPair ),
+ (sal_uInt16*)mso_sptCurvedRightSegm, sizeof( mso_sptCurvedRightSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCurvedRightCalc, sizeof( mso_sptCurvedRightCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptCurvedRightDefault,
+ (SvxMSDffTextRectangles*)mso_sptCurvedRightTextRect, sizeof( mso_sptCurvedRightTextRect ) / sizeof( SvxMSDffTextRectangles ),
+ 21600, 21600,
+ 0x80000000, 0x80000000,
+ (SvxMSDffVertPair*)mso_sptCurvedRightGluePoints, sizeof( mso_sptCurvedRightGluePoints ) / sizeof( SvxMSDffVertPair ),
+ (SvxMSDffHandle*)mso_sptCurvedRightHandles, sizeof( mso_sptCurvedRightHandles ) / sizeof( SvxMSDffHandle )
+};
+
+static const SvxMSDffVertPair mso_sptCurvedLeftVert[] =
+{
+ { 22 MSO_I, 0 }, { 21 MSO_I, 3 MSO_I }, { 0, 0 }, { 21 MSO_I, 4 MSO_I }, { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 21 MSO_I, 7 MSO_I }, { 2 MSO_I, 12 MSO_I },
+ { 2 MSO_I, 13 MSO_I }, { 0, 8 MSO_I }, { 2 MSO_I, 11 MSO_I },
+ { 22 MSO_I, 0 }, { 21 MSO_I, 3 MSO_I }, { 2 MSO_I, 10 MSO_I }, { 24 MSO_I, 16 MSO_I }, { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 24 MSO_I, 16 MSO_I }, { 0, 14 MSO_I },
+ { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 21 MSO_I, 7 MSO_I }, { 24 MSO_I, 16 MSO_I }
+};
+static const sal_uInt16 mso_sptCurvedLeftSegm[] =
+{
+ 0xa608,
+ 0x0003,
+ 0xa308,
+ 0x6000,
+ 0x8000,
+ 0xa404,
+ 0xaa00,
+ 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedLeftCalc[] =
+{
+ { 0x2000, { DFF_Prop_adjustValue, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } },
+ { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } },
+ { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } },
+ { 0x2001, { 0x403, 1, 2 } },
+ { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } },
+ { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x406, 1, 2 } },
+ { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } },
+ { 0xa00f, { DFF_Prop_adjust3Value, 21600, 0x404 } },
+ { 0x6000, { 0x404, 0x409, 0 } },
+ { 0x6000, { 0x40a, DFF_Prop_adjust2Value, 21600 } },
+ { 0x6000, { 0x407, 0x409, 0 } },
+ { 0xa000, { 0x40b, 21600, DFF_Prop_adjustValue } },
+ { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x40e, 1, 2 } },
+ { 0x6002, { 0x404, 0x407, 0 } },
+ { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } },
+ { 0x2001, { 0x411, 1, 2 } },
+ { 0xa000, { 0x410, 0, 0x412 } },
+ { 0x0000, { 21600, 0, 0 } },
+ { 0x0000, { 21600, 0, 0 } },
+ { 0x0000, { 0, 0, 21600 } },
+ { 0xa000, { 0x410, 0, 0x404 } },
+ { 0x600f, { 0x417, 0x404, 21600 } },
+ { 0x2000, { 0x408, 128, 0 } },
+ { 0x2001, { 0x405, 1, 2 } },
+ { 0x2000, { 0x405, 0, 128 } },
+ { 0xe000, { DFF_Prop_adjustValue, 0x410, 0x40b } },
+ { 0x8000, { 21600, 0, DFF_Prop_adjustValue } },
+ { 0x2001, { 0x41d, 1, 2 } },
+ { 0x0001, { 21600, 21600, 1 } },
+ { 0x6001, { DFF_Prop_adjust3Value, DFF_Prop_adjust3Value, 1 } },
+ { 0xa000, { 0x41f, 0, 0x420 } },
+ { 0x200d, { 0x421, 0, 0 } },
+ { 0x2000, { 0x422, 21600, 0 } },
+ { 0x8001, { 21600, 21600, 0x423 } },
+ { 0x2000, { 0x424, 64, 0 } },
+ { 0x2001, { DFF_Prop_adjustValue, 1, 2 } },
+ { 0x600f, { 0x41e, 0x426, 21600 } },
+ { 0x2000, { 0x427, 0, 64 } },
+ { 0x2001, { 0x404, 1, 2 } },
+ { 0xa000, { DFF_Prop_adjust2Value, 0, 0x429 } },
+ { 0x0001, { 21600, 2195, 16384 } },
+ { 0x0001, { 21600, 14189, 16384 } }
+};
+static const sal_Int32 mso_sptCurvedLeftDefault[] =
+{
+ 3, 12960, 19440, 7200
+};
+static const SvxMSDffTextRectangles mso_sptCurvedLeftTextRect[] =
+{
+ { { 43 MSO_I, 41 MSO_I }, { 44 MSO_I, 42 MSO_I } }
};
+static const SvxMSDffVertPair mso_sptCurvedLeftGluePoints[] =
+{
+ { 0, 15 MSO_I }, { 2 MSO_I, 11 MSO_I }, { 0, 8 MSO_I }, { 2 MSO_I, 13 MSO_I }, { 21 MSO_I, 16 MSO_I }
+};
+static const SvxMSDffHandle mso_sptCurvedLeftHandles[] =
+{
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+ 0, 0x100, 10800, 10800, 0, 10800, 3 + 37, 3 + 27 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL,
+ 0, 0x101, 10800, 10800, 0, 10800, 3 + 25, 3 + 20 },
+ { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL,
+ 0x102, 21600, 10800, 10800, 0, 3 + 40, 3375, 21600 }
+};
+static const mso_CustomShape msoCurvedLeftArrow =
+{
+ (SvxMSDffVertPair*)mso_sptCurvedLeftVert, sizeof( mso_sptCurvedLeftVert ) / sizeof( SvxMSDffVertPair ),
+ (sal_uInt16*)mso_sptCurvedLeftSegm, sizeof( mso_sptCurvedLeftSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCurvedLeftCalc, sizeof( mso_sptCurvedLeftCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptCurvedLeftDefault,
+ (SvxMSDffTextRectangles*)mso_sptCurvedLeftTextRect, sizeof( mso_sptCurvedLeftTextRect ) / sizeof( SvxMSDffTextRectangles ),
+ 21600, 21600,
+ 0x80000000, 0x80000000,
+ (SvxMSDffVertPair*)mso_sptCurvedLeftGluePoints, sizeof( mso_sptCurvedLeftGluePoints ) / sizeof( SvxMSDffVertPair ),
+ (SvxMSDffHandle*)mso_sptCurvedLeftHandles, sizeof( mso_sptCurvedLeftHandles ) / sizeof( SvxMSDffHandle )
+};
+
+
+
+
static const SvxMSDffVertPair mso_sptStripedRightArrowVert[] = // adjustment1 : x 3375 - 21600
{ // adjustment2 : y 0 - 10800
@@ -3046,10 +3400,6 @@ static const SvxMSDffVertPair mso_sptHeartGluePoints[] =
{
{ 10800, 2180 }, { 3090, 10800 }, { 10800, 21600 }, { 18490, 10800 }
};
-static const sal_Int32 mso_sptHeartBoundRect[] =
-{
- -9, 0, 21606, 21602
-};
static const mso_CustomShape msoHeart =
{
(SvxMSDffVertPair*)mso_sptHeartVert, sizeof( mso_sptHeartVert ) / sizeof( SvxMSDffVertPair ),
@@ -7772,10 +8122,10 @@ const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType )
case mso_sptUturnArrow : pCustomShape = &msoUturnArrow; break;
case mso_sptLeftUpArrow : pCustomShape = &msoLeftUpArrow; break;
case mso_sptBentUpArrow : pCustomShape = &msoBentUpArrow; break;
- case mso_sptCurvedRightArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptCurvedLeftArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptCurvedUpArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptCurvedDownArrow : pCustomShape = &msoCurvedArrow; break;
+ case mso_sptCurvedRightArrow : pCustomShape = &msoCurvedRightArrow; break;
+ case mso_sptCurvedLeftArrow : pCustomShape = &msoCurvedLeftArrow; break;
+ case mso_sptCurvedUpArrow : pCustomShape = &msoCurvedUpArrow; break;
+ case mso_sptCurvedDownArrow : pCustomShape = &msoCurvedDownArrow; break;
case mso_sptStripedRightArrow : pCustomShape = &msoStripedRightArrow; break;
case mso_sptNotchedRightArrow : pCustomShape = &msoNotchedRightArrow; break;
case mso_sptHomePlate : pCustomShape = &msoHomePlate; break;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx
index b3544b8185da..8f43d8ac23a2 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx
@@ -93,12 +93,12 @@ struct mso_CustomShape
#define MSO_I | (sal_Int32)0x80000000
sal_Bool SortFilledObjectsToBackByDefault( MSO_SPT eSpType );
-sal_Bool IsCustomShapeFilledByDefault( MSO_SPT eSpType );
-sal_Int16 GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType );
+SVX_DLLPUBLIC sal_Bool IsCustomShapeFilledByDefault( MSO_SPT eSpType );
+SVX_DLLPUBLIC sal_Int16 GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType );
// #i28269#
-sal_Bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType );
+SVX_DLLPUBLIC sal_Bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType );
-const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType );
+SVX_DLLPUBLIC const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType );
#endif
diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx
index 7b23629d625d..544500c34091 100644
--- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx
+++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx
@@ -33,12 +33,10 @@
#include <svx/msdffdef.hxx>
#include <rtl/ustring.hxx>
-class EnhancedCustomShapeTypeNames
+namespace EnhancedCustomShapeTypeNames
{
- public :
-
- static MSO_SPT Get( const rtl::OUString& );
- static rtl::OUString Get( const MSO_SPT );
-};
+ SVX_DLLPUBLIC MSO_SPT Get( const rtl::OUString& );
+ SVX_DLLPUBLIC rtl::OUString Get( const MSO_SPT );
+}
#endif
diff --git a/svx/source/customshapes/makefile.mk b/svx/source/customshapes/makefile.mk
index a81910b83038..edd6f7d33ed0 100644
--- a/svx/source/customshapes/makefile.mk
+++ b/svx/source/customshapes/makefile.mk
@@ -32,6 +32,7 @@
PRJ=..$/..
PRJNAME=svx
TARGET=customshapes
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings ----------------------------------
@@ -48,18 +49,27 @@ ENABLE_EXCEPTIONS=TRUE
NOOPTFILES= $(SLO)$/EnhancedCustomShapeFunctionParser.obj
.ENDIF
+ENVCFLAGS += -DBOOST_SPIRIT_USE_OLD_NAMESPACE
+
# --- Files -------------------------------------
-SLOFILES= $(SLO)$/EnhancedCustomShapeEngine.obj \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/EnhancedCustomShapeTypeNames.obj \
$(SLO)$/EnhancedCustomShapeGeometry.obj \
$(SLO)$/EnhancedCustomShape2d.obj \
+ $(SLO)$/EnhancedCustomShapeFunctionParser.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/EnhancedCustomShapeEngine.obj \
$(SLO)$/EnhancedCustomShape3d.obj \
$(SLO)$/EnhancedCustomShapeFontWork.obj \
$(SLO)$/EnhancedCustomShapeHandle.obj \
- $(SLO)$/EnhancedCustomShapeFunctionParser.obj \
$(SLO)$/tbxcustomshapes.obj
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
# --- Targets ----------------------------------
.INCLUDE : target.mk
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index beef4fe8ae48..59d0c721b560 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -173,24 +173,22 @@ void SvxRectCtl::InitRectBitmap( void )
pBitmap = new Bitmap( SVX_RES( RID_SVXCTRL_RECTBTNS ) );
// set bitmap-colors
- long aTempAry1[(7*sizeof(Color))/sizeof(long)];
- long aTempAry2[(7*sizeof(Color))/sizeof(long)];
- Color* pColorAry1 = (Color*)aTempAry1;
- Color* pColorAry2 = (Color*)aTempAry2;
- pColorAry1[0] = Color( 0xC0, 0xC0, 0xC0 ); // light-gray
- pColorAry1[1] = Color( 0xFF, 0xFF, 0x00 ); // yellow
- pColorAry1[2] = Color( 0xFF, 0xFF, 0xFF ); // white
- pColorAry1[3] = Color( 0x80, 0x80, 0x80 ); // dark-gray
- pColorAry1[4] = Color( 0x00, 0x00, 0x00 ); // black
- pColorAry1[5] = Color( 0x00, 0xFF, 0x00 ); // green
- pColorAry1[6] = Color( 0x00, 0x00, 0xFF ); // blue
- pColorAry2[0] = rStyles.GetDialogColor(); // background
- pColorAry2[1] = rStyles.GetWindowColor();
- pColorAry2[2] = rStyles.GetLightColor();
- pColorAry2[3] = rStyles.GetShadowColor();
- pColorAry2[4] = rStyles.GetDarkShadowColor();
- pColorAry2[5] = Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
- pColorAry2[6] = rStyles.GetDialogColor();
+ Color aColorAry1[7];
+ Color aColorAry2[7];
+ aColorAry1[0] = Color( 0xC0, 0xC0, 0xC0 ); // light-gray
+ aColorAry1[1] = Color( 0xFF, 0xFF, 0x00 ); // yellow
+ aColorAry1[2] = Color( 0xFF, 0xFF, 0xFF ); // white
+ aColorAry1[3] = Color( 0x80, 0x80, 0x80 ); // dark-gray
+ aColorAry1[4] = Color( 0x00, 0x00, 0x00 ); // black
+ aColorAry1[5] = Color( 0x00, 0xFF, 0x00 ); // green
+ aColorAry1[6] = Color( 0x00, 0x00, 0xFF ); // blue
+ aColorAry2[0] = rStyles.GetDialogColor(); // background
+ aColorAry2[1] = rStyles.GetWindowColor();
+ aColorAry2[2] = rStyles.GetLightColor();
+ aColorAry2[3] = rStyles.GetShadowColor();
+ aColorAry2[4] = rStyles.GetDarkShadowColor();
+ aColorAry2[5] = Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
+ aColorAry2[6] = rStyles.GetDialogColor();
#ifdef DBG_UTIL
static BOOL bModify = FALSE;
@@ -205,11 +203,11 @@ void SvxRectCtl::InitRectBitmap( void )
UINT8& rr = r;
UINT8& rg = g;
UINT8& rb = b;
- pColorAry2[ rn ] = Color( rr, rg, rb );
+ aColorAry2[ rn ] = Color( rr, rg, rb );
}
#endif
- pBitmap->Replace( pColorAry1, pColorAry2, 7, NULL );
+ pBitmap->Replace( aColorAry1, aColorAry2, 7, NULL );
}
// -----------------------------------------------------------------------
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 5076b06f52c5..5018bd28a640 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -36,6 +36,7 @@
#include <sfx2/printer.hxx> // SfxPrinter
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
+#include <unicode/uchar.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -244,7 +245,25 @@ void FontPrevWin_Impl::_CheckScript()
do
{
nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
- aScriptChg.Insert( nChg, nCnt );
+ if (nChg < aText.Len() && nChg > 0 &&
+ (com::sun::star::i18n::ScriptType::WEAK ==
+ xBreak->getScriptType(aText, nChg - 1)))
+ {
+ int8_t nType = u_charType(aText.GetChar(nChg) );
+ if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
+ nType == U_COMBINING_SPACING_MARK )
+ {
+ aScriptChg.Insert( nChg - 1, nCnt );
+ }
+ else
+ {
+ aScriptChg.Insert( nChg, nCnt );
+ }
+ }
+ else
+ {
+ aScriptChg.Insert( nChg, nCnt );
+ }
aScriptType.Insert( nScript, nCnt );
aTextWidth.Insert( ULONG(0), nCnt++ );
@@ -604,6 +623,14 @@ void SvxFontPrevWindow::SetColor(const Color &rColor)
pImpl->pColor = new Color( rColor );
Invalidate();
}
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::ResetColor()
+{
+ delete pImpl->pColor;
+ pImpl->pColor = 0;
+ Invalidate();
+}
// -----------------------------------------------------------------------
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 56fd8273fed2..5777dc8e7446 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -60,6 +60,8 @@
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include <svtools/urihelper.hxx>
#include <svtools/miscopt.hxx>
+#include <svtools/ehdl.hxx>
+#include <svtools/sfxecode.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
@@ -654,7 +656,10 @@ void SvxIMapDlg::DoOpen()
aLoadIMap.Read( *pIStm, IMAP_FORMAT_DETECT, String() );
if( pIStm->GetError() )
+ {
+ SfxErrorContext eEC(ERRCODE_SFX_GENERAL,this);
ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
else
pIMapWnd->SetImageMap( aLoadIMap );
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 277a6a9f8372..d835dd1a129e 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -716,7 +716,7 @@ void IMapWindow::RequestHelp( const HelpEvent& rHEvt )
if ( Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled() )
{
- if ( pView->PickObj( aPos, pSdrObj, pPageView ) )
+ if ( pView->PickObj( aPos, pView->getHitTolLog(), pSdrObj, pPageView ) )
{
const IMapObject* pIMapObj = GetIMapObj( pSdrObj );
String aStr;
@@ -819,11 +819,12 @@ void IMapWindow::DoMacroAssign()
if ( pSdrObj )
{
- SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG );
+ SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
aNamesItem.AddEvent( String::CreateFromAscii( "MouseOver" ), String(), SFX_EVENT_MOUSEOVER_OBJECT );
aNamesItem.AddEvent( String::CreateFromAscii( "MouseOut" ), String(), SFX_EVENT_MOUSEOUT_OBJECT );
+ aSet.Put( aNamesItem );
SvxMacroItem aMacroItem(SID_ATTR_MACROITEM);
IMapObject* pIMapObj = GetIMapObj( pSdrObj );
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 16e04efeefbe..c196178a4d16 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -37,8 +37,9 @@
#include <com/sun/star/linguistic2/XLinguServiceManager.hdl>
#endif
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
#include <linguistic/misc.hxx>
-#include<rtl/ustring.hxx>
+#include <rtl/ustring.hxx>
#include <unotools/localedatawrapper.hxx>
#include <svtools/langtab.hxx>
@@ -315,6 +316,13 @@ void SvxLanguageBox::SetLanguageList( INT16 nLangList,
USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos )
{
+ return ImplInsertLanguage( nLangType, nPos, ::com::sun::star::i18n::ScriptType::WEAK );
+}
+
+//------------------------------------------------------------------------
+
+USHORT SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, USHORT nPos, sal_Int16 nType )
+{
LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType);
// For obsolete and to be replaced languages check whether an entry of the
// replacement already exists and if so don't add an entry with identical
@@ -329,6 +337,15 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos
String aStrEntry = m_pLangTable->GetString( nLang );
if (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll)
aStrEntry = m_aAllString;
+
+ LanguageType nRealLang = nLang;
+ if (nRealLang == LANGUAGE_SYSTEM)
+ {
+ nRealLang = MsLangId::resolveSystemLanguageByScriptType(nRealLang, nType);
+ aStrEntry.AppendAscii(" - ");
+ aStrEntry.Append(m_pLangTable->GetString( nRealLang ));
+ }
+
aStrEntry = ApplyLreOrRleEmbedding( aStrEntry );
USHORT nAt = 0;
@@ -343,7 +360,7 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos
m_pSpellUsedLang = new Sequence< INT16 >( xSpell->getLanguages() );
}
bFound = m_pSpellUsedLang ?
- lcl_SeqHasLang( *m_pSpellUsedLang, nLang ) : FALSE;
+ lcl_SeqHasLang( *m_pSpellUsedLang, nRealLang ) : FALSE;
nAt = ImplInsertImgEntry( aStrEntry, nPos, bFound );
}
@@ -356,6 +373,13 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos
//------------------------------------------------------------------------
+USHORT SvxLanguageBox::InsertDefaultLanguage( sal_Int16 nType, USHORT nPos )
+{
+ return ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType );
+}
+
+//------------------------------------------------------------------------
+
USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
BOOL bCheckEntry, USHORT nPos )
{
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
index 04865246a915..c54081365a11 100644
--- a/svx/source/dialog/makefile.mk
+++ b/svx/source/dialog/makefile.mk
@@ -31,6 +31,7 @@
PRJ=..$/..
PRJNAME=svx
TARGET=dialogs
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -76,9 +77,28 @@ SRC1FILES = \
SRS2NAME=drawdlgs
SRC2FILES = \
- sdstring.src \
+ sdstring.src
-SLOFILES= \
+LIB1TARGET=$(SLB)$/$(TARGET)-core.lib
+
+LIB1OBJFILES= \
+ $(SLO)$/dialmgr.obj\
+ $(SLO)$/dlgutil.obj \
+ $(SLO)$/framelink.obj\
+ $(SLO)$/hangulhanja.obj \
+ $(SLO)$/hyphen.obj \
+ $(SLO)$/impgrf.obj \
+ $(SLO)$/langbox.obj \
+ $(SLO)$/opengrf.obj \
+ $(SLO)$/simptabl.obj \
+ $(SLO)$/splwrap.obj \
+ $(SLO)$/svxdlg.obj \
+ $(SLO)$/stddlg.obj \
+ $(SLO)$/thesdlg.obj
+
+LIB2TARGET=$(SLB)$/$(TARGET).lib
+
+LIB2OBJFILES= \
$(SLO)$/charmap.obj \
$(SLO)$/checklbx.obj \
$(SLO)$/connctrl.obj \
@@ -86,31 +106,23 @@ SLOFILES= \
$(SLO)$/ctredlin.obj \
$(SLO)$/databaseregistrationui.obj \
$(SLO)$/dialcontrol.obj \
- $(SLO)$/dialmgr.obj\
$(SLO)$/dlgctl3d.obj \
$(SLO)$/dlgctrl.obj \
- $(SLO)$/dlgutil.obj \
$(SLO)$/docrecovery.obj \
$(SLO)$/fntctrl.obj \
$(SLO)$/fontlb.obj \
$(SLO)$/fontwork.obj \
- $(SLO)$/framelink.obj\
$(SLO)$/framelinkarray.obj \
$(SLO)$/frmdirlbox.obj \
$(SLO)$/frmsel.obj \
$(SLO)$/graphctl.obj \
$(SLO)$/grfflt.obj \
- $(SLO)$/hangulhanja.obj \
$(SLO)$/hdft.obj \
$(SLO)$/hyperdlg.obj \
- $(SLO)$/hyphen.obj \
$(SLO)$/hyprlink.obj \
$(SLO)$/imapdlg.obj \
$(SLO)$/imapwnd.obj \
- $(SLO)$/impgrf.obj \
- $(SLO)$/langbox.obj \
$(SLO)$/measctrl.obj \
- $(SLO)$/opengrf.obj \
$(SLO)$/orienthelper.obj \
$(SLO)$/pagectrl.obj \
$(SLO)$/paraprev.obj \
@@ -122,21 +134,16 @@ SLOFILES= \
$(SLO)$/rlrcitem.obj \
$(SLO)$/rubydialog.obj \
$(SLO)$/rulritem.obj \
- $(SLO)$/simptabl.obj \
$(SLO)$/SpellDialogChildWindow.obj \
- $(SLO)$/splwrap.obj \
$(SLO)$/srchctrl.obj \
$(SLO)$/srchdlg.obj \
- $(SLO)$/stddlg.obj \
$(SLO)$/strarray.obj \
$(SLO)$/svxbmpnumvalueset.obj\
$(SLO)$/svxbox.obj \
- $(SLO)$/svxdlg.obj \
$(SLO)$/svxgrahicitem.obj \
$(SLO)$/svxruler.obj \
$(SLO)$/swframeexample.obj \
$(SLO)$/swframeposstrings.obj \
- $(SLO)$/thesdlg.obj \
$(SLO)$/txencbox.obj \
$(SLO)$/txenctab.obj \
$(SLO)$/wrapfield.obj \
@@ -144,15 +151,17 @@ SLOFILES= \
$(SLO)$/_contdlg.obj
.IF "$(GUI)"=="UNX"
-SLOFILES += $(SLO)$/sendreportunx.obj
+LIB2OBJFILES += $(SLO)$/sendreportunx.obj
.ELSE
.IF "$(GUI)"=="WNT"
-SLOFILES += $(SLO)$/sendreportw32.obj
+LIB2OBJFILES += $(SLO)$/sendreportw32.obj
.ELSE
-SLOFILES += $(SLO)$/sendreportgen.obj
+LIB2OBJFILES += $(SLO)$/sendreportgen.obj
.ENDIF
.ENDIF
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
# --- Targets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 8d0ec6ac4d59..918234222135 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -394,7 +394,7 @@ void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings )
aCalcStr ( THIS_SVX_RES( STR_WORDCALC ) ), \
pImpl ( NULL ), \
pSearchList ( NULL ), \
- pReplaceList ( NULL ), \
+ pReplaceList ( new SearchAttrItemList ), \
pSearchItem ( NULL ), \
pSearchController ( NULL ), \
pOptionsController ( NULL ), \
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 1215c685514e..0c96191c3db8 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -34,7 +34,7 @@
#include "txencbox.hxx"
#include "txenctab.hxx"
#include <svx/dialogs.hrc>
-#include "dbcharsethelper.hxx"
+#include "svx/dbcharsethelper.hxx"
#include <vcl/svapp.hxx>
#include <rtl/tencinfo.h>
#include <rtl/locale.h>
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx
index c90de8eb5ce0..acf278e2d01f 100644
--- a/svx/source/editeng/editdoc.cxx
+++ b/svx/source/editeng/editdoc.cxx
@@ -258,7 +258,7 @@ USHORT aV5Map[] = {
4035, 4036, 4037, 4038
};
-SV_IMPL_PTRARR( ContentList, ContentNode* );
+SV_IMPL_PTRARR( DummyContentList, ContentNode* );
SV_IMPL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo );
SV_IMPL_VARARR( WritingDirectionInfos, WritingDirectionInfo );
// SV_IMPL_VARARR( ExtraCharInfos, ExtraCharInfo );
diff --git a/svx/source/editeng/editdoc.hxx b/svx/source/editeng/editdoc.hxx
index dd9662d366e5..872f19485ae6 100644
--- a/svx/source/editeng/editdoc.hxx
+++ b/svx/source/editeng/editdoc.hxx
@@ -285,7 +285,15 @@ public:
};
typedef ContentNode* ContentNodePtr;
-SV_DECL_PTRARR( ContentList, ContentNodePtr, 0, 4 )
+SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0, 4 )
+
+class ContentList : public DummyContentList
+{
+ USHORT nLastCache;
+public:
+ ContentList() : DummyContentList( 0, 4 ), nLastCache(0) {}
+ USHORT GetPos( const ContentNodePtr &rPtr ) const;
+};
// -------------------------------------------------------------------------
// class EditPaM
@@ -612,6 +620,7 @@ SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 )
// -------------------------------------------------------------------------
class ParaPortionList : public DummyParaPortionList
{
+ USHORT nLastCache;
public:
ParaPortionList();
~ParaPortionList();
@@ -623,6 +632,8 @@ public:
inline ParaPortion* SaveGetObject( USHORT nPos ) const
{ return ( nPos < Count() ) ? GetObject( nPos ) : 0; }
+ USHORT GetPos( const ParaPortionPtr &rPtr ) const;
+
// temporaer:
void DbgCheck( EditDoc& rDoc );
};
diff --git a/svx/source/editeng/editdoc2.cxx b/svx/source/editeng/editdoc2.cxx
index 2b0967e173a8..030dfb1ad615 100644
--- a/svx/source/editeng/editdoc2.cxx
+++ b/svx/source/editeng/editdoc2.cxx
@@ -324,10 +324,42 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin
DBG_ASSERT( aLineList[ aLineList.Count()-1 ]->GetEnd() == pNode->Len(), "CorrectLines: Ende stimmt nicht!" );
}
- // -------------------------------------------------------------------------
+// Shared reverse lookup acceleration pieces ...
+
+static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen,
+ VoidPtr pPtr, USHORT &rLastPos )
+{
+ // Through certain filter code-paths we do a lot of appends, which in
+ // turn call GetPos - creating some N^2 nightmares. If we have a
+ // non-trivially large list, do a few checks from the end first.
+ if( rLastPos > 16 )
+ {
+ USHORT nEnd;
+ if (rLastPos > nPtrArrayLen - 2)
+ nEnd = nPtrArrayLen;
+ else
+ nEnd = rLastPos + 2;
+
+ for( USHORT nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ )
+ {
+ if( pPtrArray[ nIdx ] == pPtr )
+ {
+ rLastPos = nIdx;
+ return nIdx;
+ }
+ }
+ }
+ // The world's lamest linear search from svarray ...
+ for( USHORT nIdx = 0; nIdx < nPtrArrayLen; nIdx++ )
+ if (pPtrArray[ nIdx ] == pPtr )
+ return rLastPos = nIdx;
+ return USHRT_MAX;
+}
+
+// -------------------------------------------------------------------------
// class ParaPortionList
// -------------------------------------------------------------------------
-ParaPortionList::ParaPortionList()
+ParaPortionList::ParaPortionList() : nLastCache( 0 )
{
}
@@ -336,6 +368,20 @@ ParaPortionList::~ParaPortionList()
Reset();
}
+USHORT ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const
+{
+ return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ),
+ Count(), static_cast<VoidPtr>( rPtr ),
+ ((ParaPortionList *)this)->nLastCache );
+}
+
+USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const
+{
+ return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ),
+ Count(), static_cast<VoidPtr>( rPtr ),
+ ((ContentList *)this)->nLastCache );
+}
+
void ParaPortionList::Reset()
{
for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx
index 9a0b1d593f40..059dae19c8f8 100644
--- a/svx/source/editeng/editeng.cxx
+++ b/svx/source/editeng/editeng.cxx
@@ -86,11 +86,9 @@
#include <vcl/help.hxx>
#include <svx/xpoly.hxx>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#ifndef _COM_SUN_STAR_I18N_XINPUTSEQUENCECHECKER_HPP_
#include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
-#endif
-#include <srchdlg.hxx>
+#include <sfx2/srchdefs.hxx>
#if OSL_DEBUG_LEVEL > 1
#include <svx/frmdiritem.hxx>
@@ -99,18 +97,11 @@
// Spaeter -> TOOLS\STRING.H (fuer Grep: WS_TARGET)
-//using namespace ::rtl;
-//using namespace ::utl;
using namespace ::com::sun::star;
-//using namespace ::com::sun::star::util;
using namespace ::com::sun::star::uno;
-//using namespace ::com::sun::star::lang;
-//using namespace ::com::sun::star::beans;
-//using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::linguistic2;
-
DBG_NAME( EditEngine )
DBG_NAMEEX( EditView )
@@ -706,15 +697,35 @@ sal_uInt16 EditEngine::GetParagraphCount() const
sal_uInt16 EditEngine::GetLineCount( sal_uInt16 nParagraph ) const
{
DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
return pImpEditEngine->GetLineCount( nParagraph );
}
sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const
{
DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
return pImpEditEngine->GetLineLen( nParagraph, nLine );
}
+void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+ return pImpEditEngine->GetLineBoundaries( rStart, rEnd, nParagraph, nLine );
+}
+
+USHORT EditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+ return pImpEditEngine->GetLineNumberAtIndex( nPara, nIndex );
+}
+
sal_uInt32 EditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine )
{
DBG_CHKTHIS( EditEngine, 0 );
diff --git a/svx/source/editeng/editobj.cxx b/svx/source/editeng/editobj.cxx
index d0170e507060..fb5e921f60f0 100644
--- a/svx/source/editeng/editobj.cxx
+++ b/svx/source/editeng/editobj.cxx
@@ -253,6 +253,18 @@ void ContentInfo::DestroyLoadStoreTempInfos()
}
*/
+// #i102062#
+bool ContentInfo::isWrongListEqual(const ContentInfo& rCompare) const
+{
+ if(GetWrongList() == rCompare.GetWrongList())
+ return true;
+
+ if(!GetWrongList() || !rCompare.GetWrongList())
+ return false;
+
+ return (*GetWrongList() == *rCompare.GetWrongList());
+}
+
bool ContentInfo::operator==( const ContentInfo& rCompare ) const
{
if( (aText == rCompare.aText) &&
@@ -566,6 +578,12 @@ bool EditTextObject::operator==( const EditTextObject& rCompare ) const
return static_cast< const BinTextObject* >( this )->operator==( static_cast< const BinTextObject& >( rCompare ) );
}
+// #i102062#
+bool EditTextObject::isWrongListEqual(const EditTextObject& rCompare) const
+{
+ return static_cast< const BinTextObject* >(this)->isWrongListEqual(static_cast< const BinTextObject& >(rCompare));
+}
+
// from SfxItemPoolUser
void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
{
@@ -599,6 +617,23 @@ void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
}
}
+EditEngineItemPool* getEditEngineItemPool(SfxItemPool* pPool)
+{
+ EditEngineItemPool* pRetval = dynamic_cast< EditEngineItemPool* >(pPool);
+
+ while(!pRetval && pPool && pPool->GetSecondaryPool())
+ {
+ pPool = pPool->GetSecondaryPool();
+
+ if(pPool)
+ {
+ pRetval = dynamic_cast< EditEngineItemPool* >(pPool);
+ }
+ }
+
+ return pRetval;
+}
+
BinTextObject::BinTextObject( SfxItemPool* pP ) :
EditTextObject( EE_FORMAT_BIN ),
SfxItemPoolUser()
@@ -608,9 +643,17 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) :
nUserType = 0;
nObjSettings = 0;
pPortionInfo = 0;
- if ( pP )
+
+ // #i101239# ensure target is a EditEngineItemPool, else
+ // fallback to pool ownership. This is needed to ensure that at
+ // pool destruction time of an alien pool, the pool is still alive.
+ // When registering would happen at an alien pool which just uses an
+ // EditEngineItemPool as some sub-pool, that pool could already
+ // be decoupled and deleted whcih would lead to crashes.
+ pPool = getEditEngineItemPool(pP);
+
+ if ( pPool )
{
- pPool = pP;
bOwnerOfPool = FALSE;
}
else
@@ -621,6 +664,7 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) :
if(!bOwnerOfPool && pPool)
{
+ // it is sure now that the pool is an EditEngineItemPool
pPool->AddSfxItemPoolUser(*this);
}
@@ -641,9 +685,12 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
nScriptType = r.nScriptType;
pPortionInfo = NULL; // PortionInfo nicht kopieren
bStoreUnicodeStrings = FALSE;
+
if ( !r.bOwnerOfPool )
{
- // Dann den Pool mitverwenden
+ // reuse alien pool; this must be a EditEngineItemPool
+ // since there is no other way to construct a BinTextObject
+ // than it's regular constructor where that is ensured
pPool = r.pPool;
bOwnerOfPool = FALSE;
}
@@ -656,6 +703,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
if(!bOwnerOfPool && pPool)
{
+ // it is sure now that the pool is an EditEngineItemPool
pPool->AddSfxItemPoolUser(*this);
}
@@ -1589,6 +1637,28 @@ bool BinTextObject::operator==( const BinTextObject& rCompare ) const
return true;
}
+// #i102062#
+bool BinTextObject::isWrongListEqual(const BinTextObject& rCompare) const
+{
+ if(GetContents().Count() != rCompare.GetContents().Count())
+ {
+ return false;
+ }
+
+ for(USHORT a(0); a < GetContents().Count(); a++)
+ {
+ const ContentInfo& rCandA(*GetContents().GetObject(a));
+ const ContentInfo& rCandB(*rCompare.GetContents().GetObject(a));
+
+ if(!rCandA.isWrongListEqual(rCandB))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
#define CHARSETMARKER 0x9999
void __EXPORT BinTextObject::CreateData300( SvStream& rIStream )
diff --git a/svx/source/editeng/editobj2.hxx b/svx/source/editeng/editobj2.hxx
index 51a044575dd2..2ed9c8b3e6d8 100644
--- a/svx/source/editeng/editobj2.hxx
+++ b/svx/source/editeng/editobj2.hxx
@@ -181,13 +181,10 @@ public:
WrongList* GetWrongList() const { return pWrongs; }
void SetWrongList( WrongList* p ) { pWrongs = p; }
-
-/* cl removed because not needed anymore since binfilter
- LoadStoreTempInfos* GetLoadStoreTempInfos() const { return pTempLoadStoreInfos; }
- void CreateLoadStoreTempInfos();
- void DestroyLoadStoreTempInfos();
-*/
bool operator==( const ContentInfo& rCompare ) const;
+
+ // #i102062#
+ bool isWrongListEqual(const ContentInfo& rCompare) const;
};
typedef ContentInfo* ContentInfoPtr;
@@ -198,6 +195,7 @@ SV_DECL_PTRARR( ContentInfoList, ContentInfoPtr, 1, 4 )
class BinTextObject : public EditTextObject, public SfxItemPoolUser
{
using EditTextObject::operator==;
+ using EditTextObject::isWrongListEqual;
private:
ContentInfoList aContents;
@@ -303,6 +301,9 @@ public:
bool operator==( const BinTextObject& rCompare ) const;
+ // #i102062#
+ bool isWrongListEqual(const BinTextObject& rCompare) const;
+
// from SfxItemPoolUser
virtual void ObjectInDestruction(const SfxItemPool& rSfxItemPool);
};
diff --git a/svx/source/editeng/editview.cxx b/svx/source/editeng/editview.cxx
index 134e3d6c75b0..6776f57ea2b6 100644
--- a/svx/source/editeng/editview.cxx
+++ b/svx/source/editeng/editview.cxx
@@ -1546,3 +1546,54 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo
}
return bRet;
}
+
+String EditView::GetSurroundingText() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ EditSelection aSel( pImpEditView->GetEditSelection() );
+ aSel.Adjust( PIMPEE->GetEditDoc() );
+
+ if( HasSelection() )
+ {
+ XubString aStr = PIMPEE->GetSelected( aSel );
+
+ // Stop reconversion if the selected text includes a line break.
+ if ( aStr.Search( 0x0A ) == STRING_NOTFOUND )
+ return aStr;
+ else
+ return String();
+ }
+ else
+ {
+ aSel.Min().SetIndex( 0 );
+ aSel.Max().SetIndex( aSel.Max().GetNode()->Len() );
+ return PIMPEE->GetSelected( aSel );
+ }
+}
+
+Selection EditView::GetSurroundingTextSelection() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+
+ ESelection aSelection( GetSelection() );
+ aSelection.Adjust();
+
+ if( HasSelection() )
+ {
+ EditSelection aSel( pImpEditView->GetEditSelection() );
+ aSel.Adjust( PIMPEE->GetEditDoc() );
+ XubString aStr = PIMPEE->GetSelected( aSel );
+
+ // Stop reconversion if the selected text includes a line break.
+ if ( aStr.Search( 0x0A ) == STRING_NOTFOUND )
+ return Selection( 0, aSelection.nEndPos - aSelection.nStartPos );
+ else
+ return Selection( 0, 0 );
+ }
+ else
+ {
+ return Selection( aSelection.nStartPos, aSelection.nEndPos );
+ }
+}
diff --git a/svx/source/editeng/edtspell.cxx b/svx/source/editeng/edtspell.cxx
index 808d75615255..df6725cff00f 100644
--- a/svx/source/editeng/edtspell.cxx
+++ b/svx/source/editeng/edtspell.cxx
@@ -291,8 +291,9 @@ void WrongList::TextDeleted( sal_uInt16 nPos, sal_uInt16 nDeleted )
sal_uInt16 nEndChanges = nPos+nDeleted;
if ( !IsInvalid() )
{
- nInvalidStart = nPos;
- nInvalidEnd = nPos+1; // Nicht nDeleted, weil da ja wegfaellt.
+ sal_uInt16 nNewInvalidStart = nPos ? nPos - 1 : 0;
+ nInvalidStart = nNewInvalidStart;
+ nInvalidEnd = nNewInvalidStart + 1;
}
else
{
@@ -475,6 +476,31 @@ WrongList* WrongList::Clone() const
return pNew;
}
+// #i102062#
+bool WrongList::operator==(const WrongList& rCompare) const
+{
+ // cleck direct members
+ if(GetInvalidStart() != rCompare.GetInvalidStart()
+ || GetInvalidEnd() != rCompare.GetInvalidEnd()
+ || Count() != rCompare.Count())
+ {
+ return false;
+ }
+
+ for(USHORT a(0); a < Count(); a++)
+ {
+ const WrongRange& rCandA(GetObject(a));
+ const WrongRange& rCandB(rCompare.GetObject(a));
+
+ if(rCandA.nStart != rCandB.nStart
+ || rCandA.nEnd != rCandB.nEnd)
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
#ifdef DBG_UTIL
sal_Bool WrongList::DbgIsBuggy() const
diff --git a/svx/source/editeng/eertfpar.cxx b/svx/source/editeng/eertfpar.cxx
index e0628d086767..a659b0e513f0 100644
--- a/svx/source/editeng/eertfpar.cxx
+++ b/svx/source/editeng/eertfpar.cxx
@@ -43,6 +43,19 @@
#include <svtools/rtftoken.h>
+// alle Werte auf default; wird nach einlesen der Bitmap aufgerufen !
+void SvxRTFPictureType::ResetValues()
+{ // setze alle Werte RTF-Defaults
+ eStyle = RTF_BITMAP;
+ nMode = HEX_MODE;
+ nType = nGoalWidth = nGoalHeight = 0;
+ nWidth = nHeight = nWidthBytes = 0;
+ uPicLen = 0;
+ nBitsPerPixel = nPlanes = 1;
+ nScalX = nScalY = 100; // Skalierung in Prozent
+ nCropT = nCropB = nCropL = nCropR = 0;
+}
+
ImportInfo::ImportInfo( ImportState eSt, SvParser* pPrsrs, const ESelection& rSel )
: aSelection( rSel )
{
diff --git a/svx/source/editeng/impedit.cxx b/svx/source/editeng/impedit.cxx
index 2e27bd744637..16f0c1f5277d 100644
--- a/svx/source/editeng/impedit.cxx
+++ b/svx/source/editeng/impedit.cxx
@@ -670,6 +670,8 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US
USHORT nTextPortionStart = 0;
USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
+ if (nPara == USHRT_MAX) // #i94322
+ return;
ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara );
nShowCursorFlags |= nExtraCursorFlags;
diff --git a/svx/source/editeng/impedit.hxx b/svx/source/editeng/impedit.hxx
index 5df4b0f5ed29..25b7cec4f449 100644
--- a/svx/source/editeng/impedit.hxx
+++ b/svx/source/editeng/impedit.hxx
@@ -813,6 +813,8 @@ public:
sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace );
sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const;
sal_uInt16 GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
+ USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
sal_uInt16 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine );
sal_uInt32 GetParaHeight( sal_uInt16 nParagraph );
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx
index 9ae79e7b1391..f8cd7e67a4c9 100644
--- a/svx/source/editeng/impedit2.cxx
+++ b/svx/source/editeng/impedit2.cxx
@@ -381,7 +381,6 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView )
void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
{
-#ifndef SVX_LIGHT
GetSelEngine().SetCurView( pView );
SetActiveView( pView );
if ( rCEvt.GetCommand() == COMMAND_VOICE )
@@ -642,7 +641,42 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
pView->GetWindow()->SetCursorRect();
}
}
-#endif // !SVX_LIGHT
+ else if ( rCEvt.GetCommand() == COMMAND_SELECTIONCHANGE )
+ {
+ const CommandSelectionChangeData *pData = rCEvt.GetSelectionChangeData();
+
+ ESelection aSelection = pView->GetSelection();
+ aSelection.Adjust();
+
+ if( pView->HasSelection() )
+ {
+ aSelection.nEndPos = aSelection.nStartPos;
+ aSelection.nStartPos += pData->GetStart();
+ aSelection.nEndPos += pData->GetEnd();
+ }
+ else
+ {
+ aSelection.nStartPos = pData->GetStart();
+ aSelection.nEndPos = pData->GetEnd();
+ }
+ pView->SetSelection( aSelection );
+ }
+ else if ( rCEvt.GetCommand() == COMMAND_PREPARERECONVERSION )
+ {
+ if ( pView->HasSelection() )
+ {
+ ESelection aSelection = pView->GetSelection();
+ aSelection.Adjust();
+
+ if ( aSelection.nStartPara != aSelection.nEndPara )
+ {
+ xub_StrLen aParaLen = pEditEngine->GetTextLen( aSelection.nStartPara );
+ aSelection.nEndPara = aSelection.nStartPara;
+ aSelection.nEndPos = aParaLen;
+ pView->SetSelection( aSelection );
+ }
+ }
+ }
GetSelEngine().Command( rCEvt );
}
@@ -1743,7 +1777,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
::rtl::OUString aOUText( aText );
USHORT nTextLen = (USHORT)aOUText.getLength();
- long nPos = 0;
+ sal_Int32 nPos = 0;
short nScriptType = _xBI->getScriptType( aOUText, nPos );
rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
nPos = _xBI->endOfScript( aOUText, nPos, nScriptType );
@@ -1761,6 +1795,17 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
}
else
{
+ if ( _xBI->getScriptType( aOUText, nPos - 1 ) == i18n::ScriptType::WEAK )
+ {
+ switch ( u_charType(aOUText.iterateCodePoints(&nPos, 0) ) ) {
+ case U_NON_SPACING_MARK:
+ case U_ENCLOSING_MARK:
+ case U_COMBINING_SPACING_MARK:
+ --nPos;
+ rTypes[rTypes.Count()-1].nEndPos--;
+ break;
+ }
+ }
rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
}
@@ -3255,9 +3300,9 @@ USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const
xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const
{
- DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
+ DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineLen: Out of range" );
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
- DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineHeight" );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineLen" );
if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) )
{
EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
@@ -3268,6 +3313,48 @@ xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const
return 0xFFFF;
}
+void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const
+{
+ DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineBoundaries" );
+ rStart = rEnd = 0xFFFF; // default values in case of error
+ if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+ DBG_ASSERT( pLine, "Zeile nicht gefunden: GetLineBoundaries" );
+ rStart = pLine->GetStart();
+ rEnd = pLine->GetEnd();
+ }
+}
+
+USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+{
+ USHORT nLineNo = 0xFFFF;
+ ContentNode* pNode = GetEditDoc().SaveGetObject( nPara );
+ DBG_ASSERT( pNode, "GetLineNumberAtIndex: invalid paragraph index" );
+ if (pNode)
+ {
+ // we explicitly allow for the index to point at the character right behind the text
+ const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= pNode->Len();
+ DBG_ASSERT( bValidIndex, "GetLineNumberAtIndex: invalid index" );
+ const USHORT nLineCount = GetLineCount( nPara );
+ if (nIndex == pNode->Len())
+ nLineNo = nLineCount > 0 ? nLineCount - 1 : 0;
+ else if (bValidIndex) // nIndex < pNode->Len()
+ {
+ USHORT nStart = USHRT_MAX, nEnd = USHRT_MAX;
+ for (USHORT i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i)
+ {
+ GetLineBoundaries( nStart, nEnd, nPara, i );
+ if (nStart <= nIndex && nIndex < nEnd)
+ nLineNo = i;
+ }
+ }
+ }
+ return nLineNo;
+}
+
USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine )
{
DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index 9abf4e483649..3408108788c4 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -175,7 +175,9 @@ bool E3dDragMethod::EndSdrDrag(bool /*bCopy*/)
// Alle Transformationen anwenden und UnDo's anlegen
if(mbMovedAtAll)
{
- getSdrDragView().BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_ROTATE));
+ const bool bUndo = getSdrDragView().IsUndoEnabled();
+ if( bUndo )
+ getSdrDragView().BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_ROTATE));
sal_uInt32 nOb(0);
for(nOb=0;nOb<nCnt;nOb++)
@@ -183,11 +185,15 @@ bool E3dDragMethod::EndSdrDrag(bool /*bCopy*/)
E3dDragMethodUnit& rCandidate = maGrp[nOb];
E3DModifySceneSnapRectUpdater aUpdater(rCandidate.mp3DObj);
rCandidate.mp3DObj->SetTransform(rCandidate.maTransform);
- getSdrDragView().AddUndo(new E3dRotateUndoAction(rCandidate.mp3DObj->GetModel(),
- rCandidate.mp3DObj, rCandidate.maInitTransform,
- rCandidate.maTransform));
+ if( bUndo )
+ {
+ getSdrDragView().AddUndo(new E3dRotateUndoAction(rCandidate.mp3DObj->GetModel(),
+ rCandidate.mp3DObj, rCandidate.maInitTransform,
+ rCandidate.maTransform));
+ }
}
- getSdrDragView().EndUndo();
+ if( bUndo )
+ getSdrDragView().EndUndo();
}
return TRUE;
diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx
index 3df2e40b8145..821c0ba07c32 100644
--- a/svx/source/engine3d/helperhittest3d.cxx
+++ b/svx/source/engine3d/helperhittest3d.cxx
@@ -92,7 +92,12 @@ namespace drawinglayer
basegfx::B3DPoint maBack;
// the found cut points
- ::std::vector< basegfx::B3DPoint > mo_rResult;
+ ::std::vector< basegfx::B3DPoint > maResult;
+
+ // #i102956# the transformation change from TransformPrimitive3D processings
+ // needs to be remembered to be able to transform found cuts to the
+ // basic coordinate system the processor starts with
+ basegfx::B3DHomMatrix maCombinedTransform;
// as tooling, the process() implementation takes over API handling and calls this
// virtual render method when the primitive implementation is BasePrimitive3D-based.
@@ -105,11 +110,12 @@ namespace drawinglayer
: BaseProcessor3D(rViewInformation),
maFront(rFront),
maBack(rBack),
- mo_rResult()
+ maResult(),
+ maCombinedTransform()
{}
// data access
- const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return mo_rResult; }
+ const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
};
void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
@@ -119,9 +125,8 @@ namespace drawinglayer
{
case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D :
{
- // transform group. Remember current transformations
+ // transform group.
const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate);
- const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D());
// remember old and transform front, back to object coordinates
const basegfx::B3DPoint aLastFront(maFront);
@@ -131,7 +136,8 @@ namespace drawinglayer
maFront *= aInverseTrans;
maBack *= aInverseTrans;
- // create new transformation; add new object transform from right side
+ // remember current and create new transformation; add new object transform from right side
+ const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D());
const geometry::ViewInformation3D aNewViewInformation3D(
aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(),
aLastViewInformation3D.getOrientation(),
@@ -141,10 +147,15 @@ namespace drawinglayer
aLastViewInformation3D.getExtendedInformationSequence());
updateViewInformation(aNewViewInformation3D);
+ // #i102956# remember needed back-transform for found cuts (combine from right side)
+ const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform);
+ maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation();
+
// let break down
process(rPrimitive.getChildren());
// restore transformations and front, back
+ maCombinedTransform = aLastCombinedTransform;
updateViewInformation(aLastViewInformation3D);
maFront = aLastFront;
maBack = aLastBack;
@@ -207,7 +218,10 @@ namespace drawinglayer
if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false))
{
- mo_rResult.push_back(aCutPoint);
+ // #i102956# add result. Do not forget to do this in the coordinate
+ // system the processor get started with, so use the collected
+ // combined transformation from processed TransformPrimitive3D's
+ maResult.push_back(maCombinedTransform * aCutPoint);
}
}
}
@@ -376,9 +390,9 @@ SVX_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack(
::std::vector< basegfx::B3DPoint > aHitsWithObject;
getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject);
- if(aHitsWithObject.size())
+ for(sal_uInt32 a(0); a < aHitsWithObject.size(); a++)
{
- const basegfx::B3DPoint aPointInViewCoordinates(aViewInfo3D.getObjectToView() * aHitsWithObject[0]);
+ const basegfx::B3DPoint aPointInViewCoordinates(aViewInfo3D.getObjectToView() * aHitsWithObject[a]);
aDepthAndObjectResults.push_back(ImplPairDephAndObject(pCandidate, aPointInViewCoordinates.getZ()));
}
}
diff --git a/svx/source/engine3d/makefile.mk b/svx/source/engine3d/makefile.mk
index 4c03f949e939..bb590bd76c71 100644
--- a/svx/source/engine3d/makefile.mk
+++ b/svx/source/engine3d/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=engine3d
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -42,7 +43,8 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES= \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/e3dsceneupdater.obj \
$(SLO)$/helperminimaldepth3d.obj \
$(SLO)$/helperhittest3d.obj \
@@ -57,16 +59,21 @@ SLOFILES= \
$(SLO)$/svx3ditems.obj \
$(SLO)$/deflt3d.obj \
$(SLO)$/e3dundo.obj \
- $(SLO)$/volume3d.obj \
- $(SLO)$/viewpt3d.obj \
$(SLO)$/viewpt3d2.obj \
$(SLO)$/camera3d.obj \
$(SLO)$/objfac3d.obj \
$(SLO)$/dragmt3d.obj \
$(SLO)$/view3d.obj \
- $(SLO)$/view3d1.obj \
+ $(SLO)$/view3d1.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/volume3d.obj \
+ $(SLO)$/viewpt3d.obj \
$(SLO)$/float3d.obj
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
#disable optimizer for MSCompiler and ICC
.IF "$(COM)"=="ICC" || "$(COM)"=="MSC"
NOOPTFILES=\
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 23e73421192d..2d3408ffeb86 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -1206,22 +1206,6 @@ void E3dCompoundObject::operator=(const SdrObject& rObj)
/*************************************************************************
|*
-|* Hittest fuer 3D-Objekte, wird an Geometrie weitergegeben
-|*
-\************************************************************************/
-
-SdrObject* E3dCompoundObject::CheckHit(const Point& rPnt, USHORT /*nTol*/, const SetOfByte* /*pVisiLayer*/) const
-{
- if(checkHitSingle3DObject(basegfx::B2DPoint(rPnt.X(), rPnt.Y()), *this))
- {
- return const_cast< E3dCompoundObject* >(this);
- }
-
- return 0;
-}
-
-/*************************************************************************
-|*
|* Parameter Geometrieerzeugung setzen
|*
\************************************************************************/
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index ebd11f87c477..22ef5777f730 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -538,6 +538,19 @@ void E3dScene::operator=(const SdrObject& rObj)
// #110988#
ImpCleanup3DDepthMapper();
+
+ // #i101941#
+ // After a Scene as model object is cloned, the used
+ // ViewContactOfE3dScene is created and partially used
+ // to calculate Bound/SnapRects, but - since quite some
+ // values are buffered at the VC - not really well
+ // initialized. It would be possible to always watch for
+ // preconditions of buffered data, but this would be expensive
+ // and would create a lot of short living data structures.
+ // It is currently better to flush that data, e.g. by using
+ // ActionChanged at the VC which will for this class
+ // flush that cached data and initalize it's valid reconstruction
+ GetViewContact().ActionChanged();
}
/*************************************************************************
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 81e4543dbe86..06d4cf5bbe95 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -628,7 +628,8 @@ BOOL E3dView::ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* pDs
bRetval = TRUE;
// Undo anlegen
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNewCompoundObj));
+ if( GetModel()->IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNewCompoundObj));
}
}
}
@@ -714,7 +715,8 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion(SdrObject* pObj)
pObj->SetMergedItem(SvxColorItem(RGB_Color(COL_BLACK), EE_CHAR_COLOR));
// add undo now
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj, false, false));
+ if( GetModel()->IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj, false, false));
}
pObj->SetMergedItem(SvxColorItem(RGB_Color(COL_GRAY), EE_CHAR_COLOR));
@@ -736,7 +738,7 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj)
&& !nLineWidth
&& eFillStyle != XFILL_NONE)
{
- if(pObj->GetPage())
+ if(pObj->GetPage() && GetModel()->IsUndoEnabled() )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj, false, false));
pObj->SetMergedItem(XLineStyleItem(XLINE_NONE));
pObj->SetMergedItem(XLineWidthItem(0L));
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index d92b1dd4bbca..99abbd9853f7 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -61,7 +61,6 @@ namespace svx
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::datatransfer;
- using namespace ::svxform;
using namespace ::comphelper;
//====================================================================
diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx
index 21381d9c8709..26c0d04a891e 100644
--- a/svx/source/fmcomp/dbaobjectex.cxx
+++ b/svx/source/fmcomp/dbaobjectex.cxx
@@ -60,7 +60,6 @@ namespace svx
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::datatransfer;
- using namespace ::svxform;
using namespace ::comphelper;
//====================================================================
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 20de4e139b9d..c210919bd09d 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -889,9 +889,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
break;
case SID_FM_SHOWCOLS_MORE:
{
- //CHINA001 FmShowColsDialog dlg(NULL);
- //CHINA001 dlg.SetColumns(xCols);
- //CHINA001 dlg.Execute();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -960,24 +957,14 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe
}
else
{
- // Standardlabel setzen
- ::rtl::OUString sLabelBase = String( SVX_RES( RID_STR_COLUMN ) );
- // disambiguate the name
- Reference< XNameAccess > xColNames( xCols, UNO_QUERY );
- ::rtl::OUString sLabel;
- for ( sal_Int32 i=1; i<65535; ++i )
- {
- sLabel = sLabelBase;
- sLabel += ::rtl::OUString::valueOf( (sal_Int32)i );
- if ( !xColNames->hasByName( sLabel ) )
- break;
- }
- // no fallback in case the name is not unique (which is rather improbable) ....
+ FormControlFactory factory( ::comphelper::getProcessServiceFactory() );
+
+ ::rtl::OUString sLabel = factory.getDefaultUniqueName_ByComponentType(
+ Reference< XNameAccess >( xCols, UNO_QUERY_THROW ), xNewCol );
xNewCol->setPropertyValue( FM_PROP_LABEL, makeAny( sLabel ) );
xNewCol->setPropertyValue( FM_PROP_NAME, makeAny( sLabel ) );
- FormControlFactory determine( ::comphelper::getProcessServiceFactory() );
- determine.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xNewCol );
+ factory.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xNewCol );
xCols->insertByIndex( nPos, makeAny( xNewCol ) );
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 80983514ede5..0bfc7c768973 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1919,9 +1919,9 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
sal_Bool bVoid = !Value.hasValue();
- if ( 0 == PropertyName.compareToAscii( FM_PROP_TEXTLINECOLOR ) )
+ if ( 0 == PropertyName.compareTo( FM_PROP_TEXTLINECOLOR ) )
{
- ::Color aTextLineColor(::comphelper::getINT32(Value));
+ ::Color aTextLineColor( bVoid ? COL_TRANSPARENT : ::comphelper::getINT32( Value ) );
if (bVoid)
{
pGrid->SetTextLineColor();
@@ -1953,21 +1953,21 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
if (isDesignMode())
pGrid->Invalidate();
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONTEMPHASISMARK ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_FONTEMPHASISMARK ) )
{
Font aGridFont = pGrid->GetControlFont();
sal_Int16 nValue = ::comphelper::getINT16(Value);
aGridFont.SetEmphasisMark( nValue );
pGrid->SetControlFont( aGridFont );
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONTRELIEF ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_FONTRELIEF ) )
{
Font aGridFont = pGrid->GetControlFont();
sal_Int16 nValue = ::comphelper::getINT16(Value);
aGridFont.SetRelief( (FontRelief)nValue );
pGrid->SetControlFont( aGridFont );
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_HELPURL ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_HELPURL ) )
{
String sHelpURL(::comphelper::getString(Value));
String sPattern;
@@ -1978,11 +1978,11 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
pGrid->SetHelpId(sID.ToInt32());
}
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_DISPLAYSYNCHRON ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_DISPLAYSYNCHRON ) )
{
pGrid->setDisplaySynchron(::comphelper::getBOOL(Value));
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_CURSORCOLOR ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_CURSORCOLOR ) )
{
if (bVoid)
pGrid->SetCursorColor(COL_TRANSPARENT);
@@ -1991,13 +1991,13 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
if (isDesignMode())
pGrid->Invalidate();
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_ALWAYSSHOWCURSOR ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_ALWAYSSHOWCURSOR ) )
{
pGrid->EnablePermanentCursor(::comphelper::getBOOL(Value));
if (isDesignMode())
pGrid->Invalidate();
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONT ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_FONT ) )
{
if ( bVoid )
pGrid->SetControlFont( Font() );
@@ -2031,7 +2031,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
}
}
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_BACKGROUNDCOLOR ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) )
{
if ( bVoid )
{
@@ -2044,7 +2044,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
pGrid->SetControlBackground( aColor );
}
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_TEXTCOLOR ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_TEXTCOLOR ) )
{
if ( bVoid )
{
@@ -2057,7 +2057,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
pGrid->SetControlForeground( aColor );
}
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_ROWHEIGHT ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_ROWHEIGHT ) )
{
sal_Int32 nLogHeight(0);
if (Value >>= nLogHeight)
@@ -2070,17 +2070,17 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V
else if (bVoid)
pGrid->SetDataRowHeight(0);
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_HASNAVIGATION ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_HASNAVIGATION ) )
{
if (Value.getValueType() == ::getBooleanCppuType())
pGrid->EnableNavigationBar(*(sal_Bool*)Value.getValue());
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_RECORDMARKER ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_RECORDMARKER ) )
{
if (Value.getValueType() == ::getBooleanCppuType())
pGrid->EnableHandle(*(sal_Bool*)Value.getValue());
}
- else if ( 0 == PropertyName.compareToAscii( FM_PROP_ENABLED ) )
+ else if ( 0 == PropertyName.compareTo( FM_PROP_ENABLED ) )
{
if (Value.getValueType() == ::getBooleanCppuType())
{
@@ -2134,37 +2134,37 @@ Any FmXGridPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( Run
FmGridControl* pGrid = (FmGridControl*) GetWindow();
Window* pDataWindow = &pGrid->GetDataWindow();
- if ( 0 == _rPropertyName.compareToAscii( FM_PROP_NAME ) )
+ if ( 0 == _rPropertyName.compareTo( FM_PROP_NAME ) )
{
Font aFont = pDataWindow->GetControlFont();
aProp <<= ImplCreateFontDescriptor( aFont );
}
- else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_TEXTCOLOR ) )
+ else if ( 0 == _rPropertyName.compareTo( FM_PROP_TEXTCOLOR ) )
{
aProp <<= (sal_Int32)pDataWindow->GetControlForeground().GetColor();
}
- else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_BACKGROUNDCOLOR ) )
+ else if ( 0 == _rPropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) )
{
aProp <<= (sal_Int32)pDataWindow->GetControlBackground().GetColor();
}
- else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_ROWHEIGHT ) )
+ else if ( 0 == _rPropertyName.compareTo( FM_PROP_ROWHEIGHT ) )
{
sal_Int32 nPixelHeight = pGrid->GetDataRowHeight();
// take the zoom factor into account
nPixelHeight = pGrid->CalcReverseZoom(nPixelHeight);
aProp <<= (sal_Int32)pGrid->PixelToLogic(Point(0,nPixelHeight),MAP_10TH_MM).Y();
}
- else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_HASNAVIGATION ) )
+ else if ( 0 == _rPropertyName.compareTo( FM_PROP_HASNAVIGATION ) )
{
sal_Bool bHasNavBar = pGrid->HasNavigationBar();
aProp <<= (sal_Bool)bHasNavBar;
}
- else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_RECORDMARKER ) )
+ else if ( 0 == _rPropertyName.compareTo( FM_PROP_RECORDMARKER ) )
{
sal_Bool bHasHandle = pGrid->HasHandle();
aProp <<= (sal_Bool)bHasHandle;
}
- else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_ENABLED ) )
+ else if ( 0 == _rPropertyName.compareTo( FM_PROP_ENABLED ) )
{
aProp <<= (sal_Bool)pDataWindow->IsEnabled();
}
@@ -2948,7 +2948,7 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot)
if (m_pDispatchers[i].is())
{
// commit any changes done so far, if it's not the undoRecord URL
- if ( 0 == pUrls->Complete.compareToAscii( FMURL_RECORD_UNDO ) || commit() )
+ if ( 0 == pUrls->Complete.compareTo( FMURL_RECORD_UNDO ) || commit() )
m_pDispatchers[i]->dispatch(*pUrls, Sequence< PropertyValue>());
return 1; // handled
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 49778b7a4b69..ff7cfd422eb8 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -30,54 +30,52 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "gridcell.hxx"
-#include "fmtools.hxx"
-#include <stdio.h>
-#ifndef _SVX_FMPROP_HRC
+
+
#include "fmprop.hrc"
-#endif
+#include "fmresids.hrc"
+#include "fmtools.hxx"
+#include "gridcell.hxx"
#include "gridcols.hxx"
#include "sdbdatacolumn.hxx"
+
+#include <com/sun/star/awt/LineEndFormat.hpp>
+#include <com/sun/star/awt/MouseWheelBehavior.hpp>
#include <com/sun/star/awt/VisualEffect.hpp>
-#include <com/sun/star/sdbc/XStatement.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/form/FormComponentType.hpp>
+#include <com/sun/star/form/XBoundComponent.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
-#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_
-#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#include <com/sun/star/form/XBoundComponent.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdbc/XStatement.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/awt/LineEndFormat.hpp>
-#ifndef _COM_SUN_STAR_SCRTIP_XEVENTATTACHERMANAGER_HPP_
-#include <com/sun/star/script/XEventAttacherManager.hpp>
-#endif
-#include <svtools/fmtfield.hxx>
-#include <svtools/numuno.hxx>
-#include <svtools/calendar.hxx>
-#include <vcl/longcurr.hxx>
-#include <svx/dialmgr.hxx>
-#ifndef _SVX_FMRESIDS_HRC
-#include "fmresids.hrc"
-#endif
-#include <tools/shl.hxx>
-#include <tools/diagnose_ex.h>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+
+#include <comphelper/extract.hxx>
#include <comphelper/numbers.hxx>
#include <comphelper/property.hxx>
-#include <comphelper/extract.hxx>
+#include <connectivity/formattedcolumnvalue.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <i18npool/lang.h>
-#include <connectivity/formattedcolumnvalue.hxx>
-#include <math.h>
#include <rtl/math.hxx>
+#include <svtools/calendar.hxx>
+#include <svtools/fmtfield.hxx>
+#include <svtools/numuno.hxx>
#include <svtools/svmedit.hxx>
+#include <svx/dialmgr.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/shl.hxx>
+#include <vcl/longcurr.hxx>
+
+#include <math.h>
+#include <stdio.h>
using namespace ::connectivity;
using namespace ::connectivity::simple;
@@ -90,9 +88,9 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::form;
-using ::com::sun::star::util::XNumberFormatter;
using ::com::sun::star::util::XNumberFormatter;
+namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
String INVALIDTEXT = String::CreateFromAscii("###");
String OBJECTTEXT = String::CreateFromAscii("<OBJECT>");
@@ -172,8 +170,9 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s
case DataType::TINYINT:
case DataType::SMALLINT:
case DataType::INTEGER:
- case DataType::REAL:
case DataType::BIGINT:
+ case DataType::FLOAT:
+ case DataType::REAL:
case DataType::DOUBLE:
case DataType::NUMERIC:
case DataType::DECIMAL:
@@ -182,6 +181,7 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s
break;
default:
m_nAlign = ::com::sun::star::awt::TextAlign::LEFT;
+ break;
}
}
@@ -225,13 +225,15 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s
{
switch (nTypeId)
{
- case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell(this, pCellControl); break;
- case TYPE_LISTBOX: m_pCell = new FmXListBoxCell(this, pCellControl); break;
+ case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell( this, *pCellControl ); break;
+ case TYPE_LISTBOX: m_pCell = new FmXListBoxCell( this, *pCellControl ); break;
+ case TYPE_COMBOBOX: m_pCell = new FmXComboBoxCell( this, *pCellControl ); break;
default:
- m_pCell = new FmXEditCell(this, pCellControl);
+ m_pCell = new FmXEditCell( this, *pCellControl );
}
}
m_pCell->acquire();
+ m_pCell->init();
impl_toggleScriptManager_nothrow( true );
@@ -648,10 +650,10 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R
Reference< XPropertySet > xSourceProps( _rEvent.Source, UNO_QUERY );
- if ( _rEvent.PropertyName.equalsAscii( FM_PROP_VALUE )
- || _rEvent.PropertyName.equalsAscii( FM_PROP_STATE )
- || _rEvent.PropertyName.equalsAscii( FM_PROP_TEXT )
- || _rEvent.PropertyName.equalsAscii( FM_PROP_EFFECTIVE_VALUE )
+ if ( _rEvent.PropertyName.equals( FM_PROP_VALUE )
+ || _rEvent.PropertyName.equals( FM_PROP_STATE )
+ || _rEvent.PropertyName.equals( FM_PROP_TEXT )
+ || _rEvent.PropertyName.equals( FM_PROP_EFFECTIVE_VALUE )
)
{ // it was one of the known "value" properties
if ( !isValuePropertyLocked() )
@@ -659,11 +661,11 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R
implValuePropertyChanged( );
}
}
- else if ( _rEvent.PropertyName.equalsAscii( FM_PROP_READONLY ) )
+ else if ( _rEvent.PropertyName.equals( FM_PROP_READONLY ) )
{
implAdjustReadOnly( xSourceProps );
}
- else if ( _rEvent.PropertyName.equalsAscii( FM_PROP_ENABLED ) )
+ else if ( _rEvent.PropertyName.equals( FM_PROP_ENABLED ) )
{
implAdjustEnabled( xSourceProps );
}
@@ -834,22 +836,40 @@ void DbCellControl::Init( Window& rParent, const Reference< XRowSet >& _rxCursor
try
{
// some other common properties
- Reference< XPropertySet > xModel( m_rColumn.getModel() );
- Reference< XPropertySetInfo > xModelPSI;
- if ( xModel.is() )
- xModelPSI = xModel->getPropertySetInfo();
+ Reference< XPropertySet > xModel( m_rColumn.getModel(), UNO_SET_THROW );
+ Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW );
- // the "readonly" state
- if ( xModelPSI.is() && xModelPSI->hasPropertyByName( FM_PROP_READONLY ) )
+ if ( xModelPSI->hasPropertyByName( FM_PROP_READONLY ) )
{
implAdjustReadOnly( xModel );
}
- // the "enabled" flag
- if ( xModelPSI.is() && xModelPSI->hasPropertyByName( FM_PROP_ENABLED ) )
+ if ( xModelPSI->hasPropertyByName( FM_PROP_ENABLED ) )
{
implAdjustEnabled( xModel );
}
+
+ if ( xModelPSI->hasPropertyByName( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) )
+ {
+ sal_Int16 nWheelBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY;
+ OSL_VERIFY( xModel->getPropertyValue( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) >>= nWheelBehavior );
+ USHORT nVclSetting = MOUSE_WHEEL_FOCUS_ONLY;
+ switch ( nWheelBehavior )
+ {
+ case MouseWheelBehavior::SCROLL_DISABLED: nVclSetting = MOUSE_WHEEL_DISABLE; break;
+ case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MOUSE_WHEEL_FOCUS_ONLY; break;
+ case MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MOUSE_WHEEL_ALWAYS; break;
+ default:
+ OSL_ENSURE( false, "DbCellControl::Init: invalid MouseWheelBehavior!" );
+ break;
+ }
+
+ AllSettings aSettings = m_pWindow->GetSettings();
+ MouseSettings aMouseSettings = aSettings.GetMouseSettings();
+ aMouseSettings.SetWheelBehavior( nVclSetting );
+ aSettings.SetMouseSettings( aMouseSettings );
+ m_pWindow->SetSettings( aSettings, TRUE );
+ }
}
catch( const Exception& )
{
@@ -2408,7 +2428,7 @@ DbComboBox::DbComboBox(DbGridColumn& _rColumn)
//------------------------------------------------------------------------------
void DbComboBox::_propertyChanged( const PropertyChangeEvent& _rEvent ) throw( RuntimeException )
{
- if ( _rEvent.PropertyName.equalsAscii( FM_PROP_STRINGITEMLIST ) )
+ if ( _rEvent.PropertyName.equals( FM_PROP_STRINGITEMLIST ) )
{
SetList(_rEvent.NewValue);
}
@@ -2537,7 +2557,7 @@ DbListBox::DbListBox(DbGridColumn& _rColumn)
//------------------------------------------------------------------------------
void DbListBox::_propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent ) throw( RuntimeException )
{
- if ( _rEvent.PropertyName.equalsAscii( FM_PROP_STRINGITEMLIST ) )
+ if ( _rEvent.PropertyName.equals( FM_PROP_STRINGITEMLIST ) )
{
SetList(_rEvent.NewValue);
}
@@ -3178,13 +3198,33 @@ TYPEINIT0(FmXGridCell);
DBG_NAME(FmXGridCell);
//-----------------------------------------------------------------------------
-FmXGridCell::FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl)
+FmXGridCell::FmXGridCell( DbGridColumn* pColumn, DbCellControl* _pControl )
:OComponentHelper(m_aMutex)
,m_pColumn(pColumn)
- ,m_pCellControl(pControl)
+ ,m_pCellControl( _pControl )
+ ,m_aWindowListeners( m_aMutex )
+ ,m_aFocusListeners( m_aMutex )
+ ,m_aKeyListeners( m_aMutex )
+ ,m_aMouseListeners( m_aMutex )
+ ,m_aMouseMotionListeners( m_aMutex )
{
DBG_CTOR(FmXGridCell,NULL);
+}
+
+//-----------------------------------------------------------------------------
+void FmXGridCell::init()
+{
+ Window* pEventWindow( getEventWindow() );
+ if ( pEventWindow )
+ pEventWindow->AddEventListener( LINK( this, FmXGridCell, OnWindowEvent ) );
+}
+//-----------------------------------------------------------------------------
+Window* FmXGridCell::getEventWindow() const
+{
+ if ( m_pCellControl )
+ return &m_pCellControl->GetWindow();
+ return NULL;
}
//-----------------------------------------------------------------------------
@@ -3215,25 +3255,34 @@ void FmXGridCell::SetTextLineColor(const Color& _rColor)
// XTypeProvider
//------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL FmXGridCell::getImplementationId() throw(RuntimeException)
-{
- static ::cppu::OImplementationId* pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+Sequence< Type > SAL_CALL FmXGridCell::getTypes( ) throw (RuntimeException)
+{
+ Sequence< uno::Type > aTypes = ::comphelper::concatSequences(
+ ::cppu::OComponentHelper::getTypes(),
+ FmXGridCell_Base::getTypes()
+ );
+ if ( m_pCellControl )
+ aTypes = ::comphelper::concatSequences(
+ aTypes,
+ FmXGridCell_WindowBase::getTypes()
+ );
+ return aTypes;
}
+//------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXGridCell )
+
// OComponentHelper
//-----------------------------------------------------------------------------
void FmXGridCell::disposing()
{
+ lang::EventObject aEvent( *this );
+ m_aWindowListeners.disposeAndClear( aEvent );
+ m_aFocusListeners.disposeAndClear( aEvent );
+ m_aKeyListeners.disposeAndClear( aEvent );
+ m_aMouseListeners.disposeAndClear( aEvent );
+ m_aMouseMotionListeners.disposeAndClear( aEvent );
+
OComponentHelper::disposing();
m_pColumn = NULL;
DELETEZ(m_pCellControl);
@@ -3242,12 +3291,13 @@ void FmXGridCell::disposing()
//------------------------------------------------------------------
Any SAL_CALL FmXGridCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
- Any aReturn = OComponentHelper::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XControl* >(this),
- static_cast< ::com::sun::star::form::XBoundControl* >(this)
- );
+ Any aReturn = OComponentHelper::queryAggregation( _rType );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXGridCell_Base::queryInterface( _rType );
+
+ if ( !aReturn.hasValue() && ( m_pCellControl != NULL ) )
+ aReturn = FmXGridCell_WindowBase::queryInterface( _rType );
return aReturn;
}
@@ -3284,6 +3334,231 @@ void FmXGridCell::setLock(sal_Bool _bLock) throw( RuntimeException )
}
}
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _XX, ::sal_Int32 _Y, ::sal_Int32 _Width, ::sal_Int32 _Height, ::sal_Int16 _Flags ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setPosSize: not implemented" );
+ (void)_XX;
+ (void)_Y;
+ (void)_Width;
+ (void)_Height;
+ (void)_Flags;
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+awt::Rectangle SAL_CALL FmXGridCell::getPosSize( ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::getPosSize: not implemented" );
+ return awt::Rectangle();
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setVisible( ::sal_Bool _Visible ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setVisible: not implemented" );
+ (void)_Visible;
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setEnable( ::sal_Bool _Enable ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setEnable: not implemented" );
+ (void)_Enable;
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::setFocus( ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::setFocus: not implemented" );
+ // not allowed to tamper with this for a grid cell
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addWindowListener( const Reference< awt::XWindowListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aWindowListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeWindowListener( const Reference< awt::XWindowListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aWindowListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addFocusListener( const Reference< awt::XFocusListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aFocusListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeFocusListener( const Reference< awt::XFocusListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aFocusListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addKeyListener( const Reference< awt::XKeyListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aKeyListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeKeyListener( const Reference< awt::XKeyListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aKeyListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addMouseListener( const Reference< awt::XMouseListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeMouseListener( const Reference< awt::XMouseListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addMouseMotionListener( const Reference< awt::XMouseMotionListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseMotionListeners.addInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removeMouseMotionListener( const Reference< awt::XMouseMotionListener >& _rxListener ) throw (RuntimeException)
+{
+ m_aMouseMotionListeners.removeInterface( _rxListener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::addPaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::addPaintListener: not implemented" );
+ (void)_rxListener;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXGridCell::removePaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException)
+{
+ OSL_ENSURE( false, "FmXGridCell::removePaintListener: not implemented" );
+ (void)_rxListener;
+}
+
+//------------------------------------------------------------------
+IMPL_LINK( FmXGridCell, OnWindowEvent, VclWindowEvent*, _pEvent )
+{
+ ENSURE_OR_THROW( _pEvent, "illegal event pointer" );
+ ENSURE_OR_THROW( _pEvent->GetWindow(), "illegal window" );
+ onWindowEvent( _pEvent->GetId(), *_pEvent->GetWindow(), _pEvent->GetData() );
+ return 1L;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridCell::onFocusGained( const awt::FocusEvent& _rEvent )
+{
+ m_aFocusListeners.notifyEach( &awt::XFocusListener::focusGained, _rEvent );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridCell::onFocusLost( const awt::FocusEvent& _rEvent )
+{
+ m_aFocusListeners.notifyEach( &awt::XFocusListener::focusLost, _rEvent );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+ switch ( _nEventId )
+ {
+ case VCLEVENT_CONTROL_GETFOCUS:
+ case VCLEVENT_WINDOW_GETFOCUS:
+ case VCLEVENT_CONTROL_LOSEFOCUS:
+ case VCLEVENT_WINDOW_LOSEFOCUS:
+ {
+ if ( ( _rWindow.IsCompoundControl()
+ && ( _nEventId == VCLEVENT_CONTROL_GETFOCUS
+ || _nEventId == VCLEVENT_CONTROL_LOSEFOCUS
+ )
+ )
+ || ( !_rWindow.IsCompoundControl()
+ && ( _nEventId == VCLEVENT_WINDOW_GETFOCUS
+ || _nEventId == VCLEVENT_WINDOW_LOSEFOCUS
+ )
+ )
+ )
+ {
+ if ( !m_aFocusListeners.getLength() )
+ break;
+
+ bool bFocusGained = ( _nEventId == VCLEVENT_CONTROL_GETFOCUS ) || ( _nEventId == VCLEVENT_WINDOW_GETFOCUS );
+
+ awt::FocusEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.FocusFlags = _rWindow.GetGetFocusFlags();
+ aEvent.Temporary = sal_False;
+
+ if ( bFocusGained )
+ onFocusGained( aEvent );
+ else
+ onFocusLost( aEvent );
+ }
+ }
+ break;
+ case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
+ case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+ {
+ if ( !m_aMouseListeners.getLength() )
+ break;
+
+ const bool bButtonDown = ( _nEventId == VCLEVENT_WINDOW_MOUSEBUTTONDOWN );
+
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast< const ::MouseEvent* >( _pEventData ), *this ) );
+ m_aMouseListeners.notifyEach( bButtonDown ? &awt::XMouseListener::mousePressed : &awt::XMouseListener::mouseReleased, aEvent );
+ }
+ break;
+ case VCLEVENT_WINDOW_MOUSEMOVE:
+ {
+ const MouseEvent& rMouseEvent = *static_cast< const ::MouseEvent* >( _pEventData );
+ if ( rMouseEvent.IsEnterWindow() || rMouseEvent.IsLeaveWindow() )
+ {
+ if ( m_aMouseListeners.getLength() != 0 )
+ {
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( rMouseEvent, *this ) );
+ m_aMouseListeners.notifyEach( rMouseEvent.IsEnterWindow() ? &awt::XMouseListener::mouseEntered: &awt::XMouseListener::mouseExited, aEvent );
+ }
+ }
+ else if ( !rMouseEvent.IsEnterWindow() && !rMouseEvent.IsLeaveWindow() )
+ {
+ if ( m_aMouseMotionListeners.getLength() != 0 )
+ {
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( rMouseEvent, *this ) );
+ aEvent.ClickCount = 0;
+ const bool bSimpleMove = ( ( rMouseEvent.GetMode() & MOUSE_SIMPLEMOVE ) != 0 );
+ m_aMouseMotionListeners.notifyEach( bSimpleMove ? &awt::XMouseMotionListener::mouseMoved: &awt::XMouseMotionListener::mouseDragged, aEvent );
+ }
+ }
+ }
+ break;
+ case VCLEVENT_WINDOW_KEYINPUT:
+ case VCLEVENT_WINDOW_KEYUP:
+ {
+ if ( !m_aKeyListeners.getLength() )
+ break;
+
+ const bool bKeyPressed = ( _nEventId == VCLEVENT_WINDOW_KEYINPUT );
+ awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent( *static_cast< const ::KeyEvent* >( _pEventData ), *this ) );
+ m_aKeyListeners.notifyEach( bKeyPressed ? &awt::XKeyListener::keyPressed: &awt::XKeyListener::keyReleased, aEvent );
+ }
+ break;
+ }
+}
+
/*************************************************************************/
TYPEINIT1(FmXDataCell, FmXGridCell);
//------------------------------------------------------------------------------
@@ -3305,6 +3580,12 @@ void FmXDataCell::UpdateFromColumn()
/*************************************************************************/
TYPEINIT1(FmXTextCell, FmXDataCell);
+FmXTextCell::FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXDataCell( pColumn, _rControl )
+ ,m_bFastPaint( sal_True )
+{
+}
+
//------------------------------------------------------------------------------
void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
const Rectangle& rRect,
@@ -3351,15 +3632,16 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev,
DBG_NAME(FmXEditCell);
//------------------------------------------------------------------------------
-FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXTextCell(pColumn, pControl)
+FmXEditCell::FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXTextCell( pColumn, _rControl )
,m_aTextListeners(m_aMutex)
+ ,m_aChangeListeners( m_aMutex )
,m_pEditImplementation( NULL )
,m_bOwnEditImplementation( false )
{
DBG_CTOR(FmXEditCell,NULL);
- DbTextField* pTextField = PTR_CAST( DbTextField, pControl );
+ DbTextField* pTextField = PTR_CAST( DbTextField, &_rControl );
if ( pTextField )
{
@@ -3369,11 +3651,9 @@ FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl)
}
else
{
- m_pEditImplementation = new EditImplementation( *static_cast< Edit* >( pControl->GetControl() ) );
+ m_pEditImplementation = new EditImplementation( static_cast< Edit& >( _rControl.GetWindow() ) );
m_bOwnEditImplementation = true;
}
-
- m_pEditImplementation->SetModifyHdl( LINK( this, FmXEditCell, OnTextChanged ) );
}
//------------------------------------------------------------------
@@ -3395,6 +3675,7 @@ void FmXEditCell::disposing()
{
::com::sun::star::lang::EventObject aEvt(*this);
m_aTextListeners.disposeAndClear(aEvt);
+ m_aChangeListeners.disposeAndClear(aEvt);
m_pEditImplementation->SetModifyHdl( Link() );
if ( m_bOwnEditImplementation )
@@ -3407,27 +3688,26 @@ void FmXEditCell::disposing()
//------------------------------------------------------------------
Any SAL_CALL FmXEditCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
- Any aReturn = FmXDataCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XTextComponent* >(this)
- );
+ Any aReturn = FmXTextCell::queryAggregation( _rType );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXEditCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXEditCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XTextComponent >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXTextCell::getTypes(),
+ FmXEditCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXEditCell )
+
// ::com::sun::star::awt::XTextComponent
//------------------------------------------------------------------------------
void SAL_CALL FmXEditCell::addTextListener(const Reference< ::com::sun::star::awt::XTextListener >& l) throw( RuntimeException )
@@ -3452,7 +3732,7 @@ void SAL_CALL FmXEditCell::setText( const ::rtl::OUString& aText ) throw( Runtim
// In JAVA wird auch ein textChanged ausgeloest, in VCL nicht.
// ::com::sun::star::awt::Toolkit soll JAVA-komform sein...
- OnTextChanged( NULL );
+ onTextChanged();
}
}
@@ -3562,30 +3842,70 @@ void SAL_CALL FmXEditCell::setMaxTextLen( sal_Int16 nLen ) throw( RuntimeExcepti
}
//------------------------------------------------------------------------------
-IMPL_LINK( FmXEditCell, OnTextChanged, void*, EMPTYARG )
+void SAL_CALL FmXEditCell::addChangeListener( const Reference< form::XChangeListener >& _Listener ) throw (RuntimeException)
{
- if ( m_pEditImplementation )
+ m_aChangeListeners.addInterface( _Listener );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::removeChangeListener( const Reference< form::XChangeListener >& _Listener ) throw (RuntimeException)
+{
+ m_aChangeListeners.removeInterface( _Listener );
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onTextChanged()
+{
+ ::com::sun::star::awt::TextEvent aEvent;
+ aEvent.Source = *this;
+ m_aTextListeners.notifyEach( &awt::XTextListener::textChanged, aEvent );
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onFocusGained( const awt::FocusEvent& _rEvent )
+{
+ FmXTextCell::onFocusGained( _rEvent );
+ m_sValueOnEnter = getText();
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onFocusLost( const awt::FocusEvent& _rEvent )
+{
+ FmXTextCell::onFocusLost( _rEvent );
+
+ if ( getText() != m_sValueOnEnter )
{
- ::cppu::OInterfaceIteratorHelper aIt( m_aTextListeners );
- ::com::sun::star::awt::TextEvent aEvt;
- aEvt.Source = *this;
- while( aIt.hasMoreElements() )
- ((::com::sun::star::awt::XTextListener *)aIt.next())->textChanged( aEvt );
+ lang::EventObject aEvent( *this );
+ m_aChangeListeners.notifyEach( &XChangeListener::changed, aEvent );
}
- return 1;
+}
+
+//------------------------------------------------------------------------------
+void FmXEditCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+ switch ( _nEventId )
+ {
+ case VCLEVENT_EDIT_MODIFY:
+ {
+ if ( m_pEditImplementation && m_aTextListeners.getLength() )
+ onTextChanged();
+ return;
+ }
+ }
+
+ FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
}
/*************************************************************************/
DBG_NAME(FmXCheckBoxCell);
//------------------------------------------------------------------------------
-FmXCheckBoxCell::FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXDataCell(pColumn, pControl)
+FmXCheckBoxCell::FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXDataCell( pColumn, _rControl )
,m_aItemListeners(m_aMutex)
- ,m_pBox(&((CheckBoxControl*)pControl->GetControl())->GetBox())
+ ,m_aActionListeners( m_aMutex )
+ ,m_pBox( & static_cast< CheckBoxControl& >( _rControl.GetWindow() ).GetBox() )
{
DBG_CTOR(FmXCheckBoxCell,NULL);
-
- ((CheckBoxControl*)pControl->GetControl())->SetClickHdl( LINK( this, FmXCheckBoxCell, OnClick ) );
}
//------------------------------------------------------------------
@@ -3606,8 +3926,9 @@ void FmXCheckBoxCell::disposing()
{
::com::sun::star::lang::EventObject aEvt(*this);
m_aItemListeners.disposeAndClear(aEvt);
+ m_aActionListeners.disposeAndClear(aEvt);
- ((CheckBoxControl*)m_pCellControl->GetControl())->SetClickHdl(Link());
+ static_cast< CheckBoxControl& >( m_pCellControl->GetWindow() ).SetClickHdl(Link());
m_pBox = NULL;
FmXDataCell::disposing();
@@ -3616,27 +3937,26 @@ void FmXCheckBoxCell::disposing()
//------------------------------------------------------------------
Any SAL_CALL FmXCheckBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
- Any aReturn = FmXDataCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XCheckBox* >(this)
- );
+ Any aReturn = FmXDataCell::queryAggregation( _rType );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXCheckBoxCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXCheckBoxCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XCheckBox >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXDataCell::getTypes(),
+ FmXCheckBoxCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXCheckBoxCell )
+
//------------------------------------------------------------------
void SAL_CALL FmXCheckBoxCell::addItemListener( const Reference< ::com::sun::star::awt::XItemListener >& l ) throw( RuntimeException )
{
@@ -3650,17 +3970,6 @@ void SAL_CALL FmXCheckBoxCell::removeItemListener( const Reference< ::com::sun::
}
//------------------------------------------------------------------
-void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& rLabel ) throw( RuntimeException )
-{
- ::osl::MutexGuard aGuard( m_aMutex );
- if (m_pBox)
- {
- UpdateFromColumn();
- m_pBox->SetText( rLabel );
- }
-}
-
-//------------------------------------------------------------------
void SAL_CALL FmXCheckBoxCell::setState( short n ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -3695,42 +4004,89 @@ void SAL_CALL FmXCheckBoxCell::enableTriState( sal_Bool b ) throw( RuntimeExcept
}
//------------------------------------------------------------------
-IMPL_LINK( FmXCheckBoxCell, OnClick, void*, EMPTYARG )
+void SAL_CALL FmXCheckBoxCell::addActionListener( const Reference< awt::XActionListener >& _Listener ) throw (RuntimeException)
{
- if (m_pBox)
+ m_aActionListeners.addInterface( _Listener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::removeActionListener( const Reference< awt::XActionListener >& _Listener ) throw (RuntimeException)
+{
+ m_aActionListeners.removeInterface( _Listener );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( m_pColumn )
+ {
+ DbGridControl& rGrid( m_pColumn->GetParent() );
+ rGrid.SetColumnTitle( rGrid.GetColumnId( m_pColumn->GetFieldPos() ), _Label );
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::setActionCommand( const ::rtl::OUString& _Command ) throw (RuntimeException)
+{
+ m_aActionCommand = _Command;
+}
+
+//------------------------------------------------------------------
+Window* FmXCheckBoxCell::getEventWindow() const
+{
+ return m_pBox;
+}
+
+//------------------------------------------------------------------
+void FmXCheckBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+ switch ( _nEventId )
+ {
+ case VCLEVENT_CHECKBOX_TOGGLE:
{
// check boxes are to be committed immediately (this holds for ordinary check box controls in
// documents, and this must hold for check boxes in grid columns, too
// 91210 - 22.08.2001 - frank.schoenheit@sun.com
m_pCellControl->Commit();
- // notify our listeners
- ::cppu::OInterfaceIteratorHelper aIt( m_aItemListeners );
-
- ::com::sun::star::awt::ItemEvent aEvent;
- aEvent.Source = *this;
- aEvent.Highlighted = sal_False;
- aEvent.Selected = m_pBox->GetState();
+ Reference< XWindow > xKeepAlive( this );
+ if ( m_aItemListeners.getLength() && m_pBox )
+ {
+ awt::ItemEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Highlighted = sal_False;
+ aEvent.Selected = m_pBox->GetState();
+ m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent );
+ }
+ if ( m_aActionListeners.getLength() )
+ {
+ awt::ActionEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.ActionCommand = m_aActionCommand;
+ m_aActionListeners.notifyEach( &awt::XActionListener::actionPerformed, aEvent );
+ }
+ }
+ break;
- while ( aIt.hasMoreElements() )
- static_cast< awt::XItemListener* >( aIt.next() )->itemStateChanged( aEvent );
+ default:
+ FmXDataCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
+ break;
}
- return 1;
}
/*************************************************************************/
DBG_NAME(FmXListBoxCell);
//------------------------------------------------------------------------------
-FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXTextCell(pColumn, pControl)
+FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl& _rControl)
+ :FmXTextCell( pColumn, _rControl )
,m_aItemListeners(m_aMutex)
,m_aActionListeners(m_aMutex)
- ,m_pBox((ListBox*)pControl->GetControl())
+ ,m_pBox( &static_cast< ListBox& >( _rControl.GetWindow() ) )
{
DBG_CTOR(FmXListBoxCell,NULL);
- m_pBox->AddEventListener( LINK( this, FmXListBoxCell, OnSelect ) );
m_pBox->SetDoubleClickHdl( LINK( this, FmXListBoxCell, OnDoubleClick ) );
}
@@ -3765,26 +4121,25 @@ void FmXListBoxCell::disposing()
Any SAL_CALL FmXListBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
Any aReturn = FmXTextCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XListBox* >(this)
- );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXListBoxCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXListBoxCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XListBox >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXTextCell::getTypes(),
+ FmXListBoxCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXListBoxCell )
+
//------------------------------------------------------------------
void SAL_CALL FmXListBoxCell::addItemListener(const Reference< ::com::sun::star::awt::XItemListener >& l) throw( RuntimeException )
{
@@ -4021,10 +4376,10 @@ void SAL_CALL FmXListBoxCell::makeVisible(sal_Int16 nEntry) throw( RuntimeExcept
}
//------------------------------------------------------------------
-IMPL_LINK(FmXListBoxCell, OnSelect, VclWindowEvent*, _pEvent )
+void FmXListBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
{
- if ( ( _pEvent->GetWindow() == m_pBox )
- && ( _pEvent->GetId() == VCLEVENT_LISTBOX_SELECT )
+ if ( ( &_rWindow == m_pBox )
+ && ( _nEventId == VCLEVENT_LISTBOX_SELECT )
)
{
OnDoubleClick( NULL );
@@ -4038,8 +4393,10 @@ IMPL_LINK(FmXListBoxCell, OnSelect, VclWindowEvent*, _pEvent )
? m_pBox->GetSelectEntryPos() : 0xFFFF;
m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent );
+ return;
}
- return 1;
+
+ FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
}
@@ -4062,6 +4419,203 @@ IMPL_LINK( FmXListBoxCell, OnDoubleClick, void*, EMPTYARG )
/*************************************************************************/
+
+DBG_NAME( FmXComboBoxCell );
+
+//------------------------------------------------------------------------------
+FmXComboBoxCell::FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXTextCell( pColumn, _rControl )
+ ,m_aItemListeners( m_aMutex )
+ ,m_aActionListeners( m_aMutex )
+ ,m_pComboBox( &static_cast< ComboBox& >( _rControl.GetWindow() ) )
+{
+ DBG_CTOR( FmXComboBoxCell, NULL );
+}
+
+//------------------------------------------------------------------------------
+FmXComboBoxCell::~FmXComboBoxCell()
+{
+ if ( !OComponentHelper::rBHelper.bDisposed )
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR( FmXComboBoxCell, NULL );
+}
+
+//-----------------------------------------------------------------------------
+void FmXComboBoxCell::disposing()
+{
+ ::com::sun::star::lang::EventObject aEvt(*this);
+ m_aItemListeners.disposeAndClear(aEvt);
+ m_aActionListeners.disposeAndClear(aEvt);
+
+ FmXTextCell::disposing();
+}
+
+//------------------------------------------------------------------
+Any SAL_CALL FmXComboBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
+{
+ Any aReturn = FmXTextCell::queryAggregation(_rType);
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXComboBoxCell_Base::queryInterface( _rType );
+
+ return aReturn;
+}
+
+//-------------------------------------------------------------------------
+Sequence< Type > SAL_CALL FmXComboBoxCell::getTypes( ) throw(RuntimeException)
+{
+ return ::comphelper::concatSequences(
+ FmXTextCell::getTypes(),
+ FmXComboBoxCell_Base::getTypes()
+ );
+}
+
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXComboBoxCell )
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addItemListener(const Reference< awt::XItemListener >& l) throw( RuntimeException )
+{
+ m_aItemListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::removeItemListener(const Reference< awt::XItemListener >& l) throw( RuntimeException )
+{
+ m_aItemListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addActionListener(const Reference< awt::XActionListener >& l) throw( RuntimeException )
+{
+ m_aActionListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::removeActionListener(const Reference< awt::XActionListener >& l) throw( RuntimeException )
+{
+ m_aActionListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addItem( const ::rtl::OUString& _Item, sal_Int16 _Pos ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ m_pComboBox->InsertEntry( _Item, _Pos );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::addItems( const Sequence< ::rtl::OUString >& _Items, sal_Int16 _Pos ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ {
+ sal_uInt16 nP = _Pos;
+ for ( sal_uInt16 n = 0; n < _Items.getLength(); n++ )
+ {
+ m_pComboBox->InsertEntry( _Items.getConstArray()[n], nP );
+ if ( _Pos != -1 )
+ nP++;
+ }
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::removeItems( sal_Int16 _Pos, sal_Int16 _Count ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ {
+ for ( sal_uInt16 n = _Count; n; )
+ m_pComboBox->RemoveEntry( _Pos + (--n) );
+ }
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXComboBoxCell::getItemCount() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pComboBox ? m_pComboBox->GetEntryCount() : 0;
+}
+
+//------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXComboBoxCell::getItem( sal_Int16 _Pos ) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ String sItem;
+ if ( m_pComboBox )
+ sItem = m_pComboBox->GetEntry( _Pos );
+ return sItem;
+}
+//------------------------------------------------------------------
+Sequence< ::rtl::OUString > SAL_CALL FmXComboBoxCell::getItems() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Sequence< ::rtl::OUString > aItems;
+ if ( m_pComboBox )
+ {
+ sal_uInt16 nEntries = m_pComboBox->GetEntryCount();
+ aItems.realloc( nEntries );
+ ::rtl::OUString* pItem = aItems.getArray();
+ for ( sal_uInt16 n=0; n<nEntries; ++n, ++pItem )
+ *pItem = m_pComboBox->GetEntry( n );
+ }
+ return aItems;
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXComboBoxCell::getDropDownLineCount() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int16 nLines = 0;
+ if ( m_pComboBox )
+ nLines = m_pComboBox->GetDropDownLineCount();
+
+ return nLines;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXComboBoxCell::setDropDownLineCount(sal_Int16 nLines) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pComboBox )
+ m_pComboBox->SetDropDownLineCount( nLines );
+}
+
+//------------------------------------------------------------------------------
+void FmXComboBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData )
+{
+
+ switch ( _nEventId )
+ {
+ case VCLEVENT_COMBOBOX_SELECT:
+ {
+ awt::ItemEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Highlighted = sal_False;
+
+ // Bei Mehrfachselektion 0xFFFF, sonst die ID
+ aEvent.Selected = ( m_pComboBox->GetSelectEntryCount() == 1 )
+ ? m_pComboBox->GetSelectEntryPos()
+ : 0xFFFF;
+ m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent );
+ }
+ break;
+
+ default:
+ FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData );
+ break;
+ }
+}
+
+/*************************************************************************/
TYPEINIT1(FmXFilterCell, FmXGridCell);
//------------------------------------------------------------------------------
@@ -4072,8 +4626,8 @@ Reference< XInterface > FmXFilterCell_CreateInstance(const Reference< ::com::su
DBG_NAME(FmXFilterCell);
//------------------------------------------------------------------------------
-FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl)
- :FmXGridCell(pColumn, pControl)
+FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl )
+ :FmXGridCell( pColumn, pControl )
,m_aTextListeners(m_aMutex)
{
DBG_CTOR(FmXFilterCell,NULL);
@@ -4159,26 +4713,25 @@ void FmXFilterCell::disposing()
Any SAL_CALL FmXFilterCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException)
{
Any aReturn = FmXGridCell::queryAggregation(_rType);
- if (!aReturn.hasValue())
- aReturn = ::cppu::queryInterface(_rType,
- static_cast< ::com::sun::star::awt::XTextComponent* >(this)
- );
+
+ if ( !aReturn.hasValue() )
+ aReturn = FmXFilterCell_Base::queryInterface( _rType );
+
return aReturn;
}
//-------------------------------------------------------------------------
Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXFilterCell::getTypes( ) throw(RuntimeException)
{
- Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL));
- aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XTextComponent >* >(NULL));
-
- return aTypes;
+ return ::comphelper::concatSequences(
+ FmXGridCell::getTypes(),
+ FmXFilterCell_Base::getTypes()
+ );
}
+//------------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( FmXFilterCell )
+
// ::com::sun::star::awt::XTextComponent
//------------------------------------------------------------------------------
void SAL_CALL FmXFilterCell::addTextListener(const Reference< ::com::sun::star::awt::XTextListener >& l) throw( RuntimeException )
diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx
index cab60f046cf3..da7fe3447b0a 100644
--- a/svx/source/fmcomp/gridcols.cxx
+++ b/svx/source/fmcomp/gridcols.cxx
@@ -36,23 +36,6 @@
#include "fmservs.hxx"
#include "fmtools.hxx"
-namespace svxform
-{
-
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_TEXTFIELD, "TextField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_COMBOBOX, "ComboBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_CHECKBOX, "CheckBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_TIMEFIELD, "TimeField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_DATEFIELD, "DateField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_NUMERICFIELD, "NumericField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_CURRENCYFIELD, "CurrencyField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_PATTERNFIELD, "PatternField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_LISTBOX, "ListBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_COL_FORMATTEDFIELD, "FormattedField");
-
-} // namespace svxform
-using namespace ::svxform;
-
//------------------------------------------------------------------------------
const ::comphelper::StringSequence& getColumnTypes()
{
@@ -81,7 +64,7 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName)
const ::rtl::OUString aCompatibleModelPrefix = ::rtl::OUString::createFromAscii("stardiv.one.form.component.");
sal_Int32 nTypeId = -1;
- if (aModelName == ::svxform::FM_COMPONENT_EDIT)
+ if (aModelName == FM_COMPONENT_EDIT)
nTypeId = TYPE_TEXTFIELD;
else
{
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 3ef1d68916ec..afff309168ac 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -36,7 +36,7 @@
#endif
#include <svx/gridctrl.hxx>
#include "gridcell.hxx"
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include "fmtools.hxx"
#include <svtools/stringtransfer.hxx>
@@ -698,25 +698,6 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
else
pWnd->SetText(aText);
- {
- vos::OGuard aPaintSafety(Application::GetSolarMutex());
- // we want to update only the window, not our parent, so lock the latter
- // (In fact, if we are in DbGridControl::RecalcRows, perhaps as a result of an setDataSource or
- // a VisibleRowsChanged, the grid will be frozen and a SeekRow triggered implicitly by the update
- // of pWnd will fail.)
- // (the SetUpdateMode call goes to the data window : it's sufficient to prevent SeekRow's, but it
- // avoids the Invalidate which would be triggered by BrowseBox::SetUpdateMode (which lead to massive
- // flicker when scrolling))
- // FS - 06.10.99
-
- // don't use SetUpdateMode in those situations as all necessary paints get lost DG
- // so update only if necessary (DG)
- if (pParent->IsPaintEnabled())
- {
- pWnd->Update();
- pWnd->Flush();
- }
- }
pParent->SetRealRowCount(aText);
} break;
}
@@ -782,12 +763,18 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
Fraction aZoom = GetZoom();
// not all of these controls need to know the new zoom, but to be sure ...
- Font aFont( IsControlFont() ? GetControlFont() : GetPointFont());
+ Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
{
pWindows[i]->SetZoom(aZoom);
pWindows[i]->SetZoomedPointFont(aFont);
}
+
+ SetZoomedPointFont( aFont );
+
// rearrange the controls
m_nDefaultWidth = ArrangeControls();
}
@@ -1094,18 +1081,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
- m_aBar.SetZoom( GetZoom() );
-
Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont();
if ( IsControlFont() )
- {
m_aBar.SetControlFont( GetControlFont() );
- aFont.Merge( GetControlFont() );
- }
else
m_aBar.SetControlFont();
- m_aBar.SetZoomedPointFont( aFont );
+ m_aBar.SetZoom( GetZoom() );
}
}
diff --git a/svx/source/fmcomp/makefile.mk b/svx/source/fmcomp/makefile.mk
index a2387ef180f4..1e86308f9c44 100644
--- a/svx/source/fmcomp/makefile.mk
+++ b/svx/source/fmcomp/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=fmcomp
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
@@ -48,25 +49,20 @@ SRC1FILES= \
gridctrl.src \
showcols.src
-#SLOFILES= \
-# $(SLO)$/dbaexchange.obj \
-# $(SLO)$/gridcols.obj \
-# $(SLO)$/gridctrl.obj \
-# $(SLO)$/gridcell.obj \
-# $(SLO)$/fmgridcl.obj \
-# $(SLO)$/fmgridif.obj \
-# $(SLO)$/trace.obj
-
-SLOFILES= \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/dbaexchange.obj \
- $(SLO)$/dbaobjectex.obj \
$(SLO)$/gridcols.obj \
$(SLO)$/gridctrl.obj \
$(SLO)$/gridcell.obj \
$(SLO)$/fmgridcl.obj \
$(SLO)$/fmgridif.obj \
- $(SLO)$/trace.obj \
+ $(SLO)$/trace.obj \
$(SLO)$/xmlexchg.obj
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/dbaobjectex.obj
+
.INCLUDE : target.mk
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 01e65ff891a3..791bebc772c8 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -452,9 +452,11 @@ namespace svxform
bool bIsDocModified = false;
m_pNaviWin->DisableNotify( true );
- if ( TBI_ITEM_ADD == _nToolBoxID
- || TBI_ITEM_ADD_ELEMENT == _nToolBoxID
- || TBI_ITEM_ADD_ATTRIBUTE == _nToolBoxID )
+ switch ( _nToolBoxID )
+ {
+ case TBI_ITEM_ADD:
+ case TBI_ITEM_ADD_ELEMENT:
+ case TBI_ITEM_ADD_ATTRIBUTE:
{
bHandled = true;
Reference< css::xforms::XModel > xModel( m_xUIHelper, UNO_QUERY );
@@ -643,7 +645,9 @@ namespace svxform
}
}
}
- else if ( TBI_ITEM_EDIT == _nToolBoxID )
+ break;
+
+ case TBI_ITEM_EDIT:
{
bHandled = true;
SvLBoxEntry* pEntry = m_aItemList.FirstSelected();
@@ -737,7 +741,9 @@ namespace svxform
}
}
}
- else if ( TBI_ITEM_REMOVE == _nToolBoxID )
+ break;
+
+ case TBI_ITEM_REMOVE:
{
bHandled = true;
if ( DGTInstance == m_eGroup && m_sInstanceURL.Len() > 0 )
@@ -748,6 +754,18 @@ namespace svxform
}
bIsDocModified = RemoveEntry();
}
+ break;
+
+ case MID_INSERT_CONTROL:
+ {
+ OSL_ENSURE( false, "XFormsPage::DoToolboxAction: MID_INSERT_CONTROL not implemented, yet!" );
+ }
+ break;
+
+ default:
+ OSL_ENSURE( false, "XFormsPage::DoToolboxAction: unknown ID!" );
+ break;
+ }
m_pNaviWin->DisableNotify( false );
EnableMenuItems( NULL );
diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src
index 29ea1797073b..4d48ead413b8 100644
--- a/svx/source/form/datanavi.src
+++ b/svx/source/form/datanavi.src
@@ -512,7 +512,8 @@ Menu RID_MENU_DATANAVIGATOR
{
ItemList =
{
- MenuItem
+ // MID_INSERT_CONTROL not implemented, yet (#i99890#)
+ /*MenuItem
{
Identifier = MID_INSERT_CONTROL ;
HelpId = HID_XFORMS_MID_INSERT_CONTROL ;
@@ -521,7 +522,7 @@ Menu RID_MENU_DATANAVIGATOR
MenuItem
{
Separator = TRUE;
- };
+ };*/
MenuItem
{
Identifier = TBI_ITEM_ADD ;
diff --git a/svx/source/form/dbcharsethelper.cxx b/svx/source/form/dbcharsethelper.cxx
index 0d3e3ebaf764..4e2f86eab25c 100644
--- a/svx/source/form/dbcharsethelper.cxx
+++ b/svx/source/form/dbcharsethelper.cxx
@@ -30,7 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "dbcharsethelper.hxx"
+#include "svx/dbcharsethelper.hxx"
//........................................................................
namespace svxform
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index 0c1e1b40564b..88f55ff2cd50 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include <osl/diagnose.h>
#include <connectivity/formattedcolumnvalue.hxx>
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 47de621f99dd..ccce6b50ee20 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -30,24 +30,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
+#include "fmhelp.hrc"
+#include "fmprop.hrc"
#include "fmPropBrw.hxx"
-#ifndef _SVX_SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
-#include <svx/fmshell.hxx>
-#include "fmshimp.hxx"
-#ifndef _SVX_FMPROP_HRC
-#include "fmprop.hrc"
-#endif
-#ifndef _SVX_FMHELP_HRC
-#include "fmhelp.hrc"
-#endif
-#include <svx/dialmgr.hxx>
-#ifndef _SVX_FMRESIDS_HRC
#include "fmresids.hrc"
-#endif
#include "fmservs.hxx"
-#include <svx/svdpagv.hxx>
+#include "fmshimp.hxx"
+#include "fmpgeimp.hxx"
+
+#include "svx/dialmgr.hxx"
+#include "svx/fmpage.hxx"
+#include "svx/fmshell.hxx"
+#include "svx/sdrpagewindow.hxx"
+#include "svx/svdpagv.hxx"
+#include "svx/svxids.hrc"
/** === begin UNO includes === **/
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -64,24 +61,22 @@
#include <com/sun/star/inspection/XObjectInspectorUI.hpp>
#include <com/sun/star/inspection/DefaultHelpProvider.hpp>
/** === end UNO includes === **/
+
#include <comphelper/processfactory.hxx>
+#include <comphelper/property.hxx>
#include <cppuhelper/component_context.hxx>
-#include <tools/shl.hxx>
-#include <tools/diagnose_ex.h>
-#include <vcl/stdtext.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <tools/debug.hxx>
-#include <sfx2/objsh.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/childwin.hxx>
+#include <sfx2/dispatch.hxx>
#include <sfx2/objitem.hxx>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
#include <toolkit/unohlp.hxx>
-#endif
-#include <comphelper/property.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/shl.hxx>
#include <unotools/confignode.hxx>
-#include <svx/sdrpagewindow.hxx>
+#include <vcl/stdtext.hxx>
#include <algorithm>
@@ -195,7 +190,7 @@ using namespace ::svxform;
case FormComponentType::IMAGECONTROL:
nClassNameResourceId = RID_STR_PROPTITLE_IMAGECONTROL; break;
case FormComponentType::HIDDENCONTROL:
- nClassNameResourceId = RID_STR_HIDDEN_CLASSNAME; break;
+ nClassNameResourceId = RID_STR_PROPTITLE_HIDDEN; break;
case FormComponentType::SCROLLBAR:
nClassNameResourceId = RID_STR_PROPTITLE_SCROLLBAR; break;
case FormComponentType::SPINBUTTON:
@@ -204,7 +199,7 @@ using namespace ::svxform;
nClassNameResourceId = RID_STR_PROPTITLE_NAVBAR; break;
case FormComponentType::CONTROL:
default:
- nClassNameResourceId = RID_STR_CONTROL_CLASSNAME; break;
+ nClassNameResourceId = RID_STR_CONTROL; break;
}
if ( !nClassNameResourceId )
@@ -223,6 +218,7 @@ FmPropBrw::FmPropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBinding
:SfxFloatingWindow(_pBindings, _pMgr, _pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_3DLOOK|WB_ROLLABLE) )
,SfxControllerItem(SID_FM_PROPERTY_CONTROL, *_pBindings)
,m_bInitialStateChange(sal_True)
+ ,m_bInStateChange( false )
,m_xORB(_xORB)
{
DBG_CTOR(FmPropBrw,NULL);
@@ -303,19 +299,24 @@ FmPropBrw::~FmPropBrw()
implDetachController();
try
{
+ // remove our own properties from the component context. We cannot ensure that the component context
+ // is freed (there might be refcount problems :-\), so at least ensure the context itself
+ // does hold the objects anymore
Reference<XNameContainer> xName(m_xInspectorContext,uno::UNO_QUERY);
if ( xName.is() )
{
const ::rtl::OUString pProps[] = { ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContextDocument" ) )
- , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) )
- , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlContext" ) )};
- for (size_t i = 0; i < sizeof(pProps)/sizeof(pProps[0]); ++i)
- xName->removeByName(pProps[i]);
+ , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) )
+ , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlContext" ) )
+ , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlShapeAccess" ) ) };
+ for ( size_t i = 0; i < sizeof(pProps)/sizeof(pProps[0]); ++i )
+ xName->removeByName( pProps[i] );
}
}
- catch(Exception&)
- {}
-
+ catch (const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
DBG_DTOR(FmPropBrw,NULL);
}
@@ -574,6 +575,12 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell )
// the default parent window for message boxes
Reference< XWindow > xParentWindow( VCLUnoHelper::GetInterface ( this ) );
+ // the mapping from control models to control shapes
+ Reference< XMap > xControlMap;
+ FmFormPage* pFormPage = _pFormShell ? _pFormShell->GetCurPage() : NULL;
+ if ( pFormPage )
+ xControlMap = pFormPage->GetImpl().getControlToShapeMap();
+
// our own component context
Reference< XPropertySet > xFactoryProperties( m_xORB, UNO_QUERY_THROW );
Reference< XComponentContext > xOwnContext(
@@ -585,7 +592,8 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell )
{
::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContextDocument" ) ), makeAny( xDocument ) ),
::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) ), makeAny( xParentWindow ) ),
- ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlContext" ) ), makeAny( xControlContext ) )
+ ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlContext" ) ), makeAny( xControlContext ) ),
+ ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlShapeAccess" ) ), makeAny( xControlMap ) )
};
m_xInspectorContext.set(
::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
@@ -661,11 +669,12 @@ void FmPropBrw::impl_ensurePropertyBrowser_nothrow( FmFormShell* _pFormShell )
//-----------------------------------------------------------------------
void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
+ if (!pState || SID_FM_PROPERTY_CONTROL != nSID)
+ return;
+
+ m_bInStateChange = true;
try
{
- if (!pState || SID_FM_PROPERTY_CONTROL != nSID)
- return;
-
if (eState >= SFX_ITEM_AVAILABLE)
{
FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
@@ -712,5 +721,5 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
{
DBG_ERROR("FmPropBrw::StateChanged: Exception occured!");
}
-
+ m_bInStateChange = false;
}
diff --git a/svx/source/form/fmctrler.cxx b/svx/source/form/fmctrler.cxx
index 935bdbc74fe8..48db5acbb01e 100644
--- a/svx/source/form/fmctrler.cxx
+++ b/svx/source/form/fmctrler.cxx
@@ -129,6 +129,7 @@ struct ColumnInfo
Reference< XColumn > xColumn;
sal_Int32 nNullable;
sal_Bool bAutoIncrement;
+ sal_Bool bReadOnly;
::rtl::OUString sName;
// information about the control(s) bound to this column
@@ -148,6 +149,7 @@ struct ColumnInfo
:xColumn()
,nNullable( ColumnValue::NULLABLE_UNKNOWN )
,bAutoIncrement( sal_False )
+ ,bReadOnly( sal_False )
,sName()
,xFirstControlWithInputRequired()
,xFirstGridWithInputRequiredColumn()
@@ -202,6 +204,7 @@ ColumnInfoCache::ColumnInfoCache( const Reference< XColumnsSupplier >& _rxColSup
OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_ISNULLABLE ) >>= aColInfo.nNullable );
OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_AUTOINCREMENT ) >>= aColInfo.bAutoIncrement );
OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_NAME ) >>= aColInfo.sName );
+ OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_ISREADONLY ) >>= aColInfo.bReadOnly );
m_aColumns.push_back( aColInfo );
}
@@ -227,6 +230,7 @@ namespace
OSL_VERIFY( _rxControlModel->getPropertyValue( FM_PROP_INPUT_REQUIRED ) >>= bInputRequired );
return ( bInputRequired != sal_False );
}
+
void lcl_resetColumnControlInfo( ColumnInfo& _rColInfo )
{
_rColInfo.xFirstControlWithInputRequired.clear();
@@ -2956,7 +2960,6 @@ void FmXFormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
aRow[(*iter).xText] = sCriteria;
}
}
- break;
}
}
}
@@ -3502,6 +3505,9 @@ sal_Bool SAL_CALL FmXFormController::approveRowChange(const RowChangeEvent& _rEv
if ( rColInfo.bAutoIncrement )
continue;
+ if ( rColInfo.bReadOnly )
+ continue;
+
if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() )
continue;
diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx
index 70c37f223ffd..1d9c3ed0bf1d 100644
--- a/svx/source/form/fmdocumentclassification.cxx
+++ b/svx/source/form/fmdocumentclassification.cxx
@@ -34,7 +34,7 @@
#ifndef SVX_SOURCE_FORM_FMDOCUMENTCLASSIFICATION_HXX
#include "fmdocumentclassification.hxx"
#endif
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/container/XChild.hpp>
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index fd5299fe62d5..f2773b7350fa 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -148,13 +148,17 @@ void FmFormObj::impl_isolateControlModel_nothrow()
//------------------------------------------------------------------
void FmFormObj::SetPage(SdrPage* _pNewPage)
{
- FmFormPage* pNewFormPage = PTR_CAST(FmFormPage, _pNewPage);
if ( GetPage() == _pNewPage )
{
SdrUnoObj::SetPage(_pNewPage);
return;
}
+ FmFormPage* pOldFormPage = PTR_CAST( FmFormPage, GetPage() );
+ if ( pOldFormPage )
+ pOldFormPage->GetImpl().formObjectRemoved( *this );
+
+ FmFormPage* pNewFormPage = PTR_CAST( FmFormPage, _pNewPage );
if ( !pNewFormPage )
{ // Maybe it makes sense to create an environment history here : if somebody set's our page to NULL, and we have a valid page before,
// me may want to remember our place within the old page. For this we could create a new m_xEnvironmentHistory to store it.
@@ -202,7 +206,6 @@ void FmFormObj::SetPage(SdrPage* _pNewPage)
{
// are we a valid part of our current page forms ?
Reference< XIndexContainer > xOldForms;
- FmFormPage* pOldFormPage = dynamic_cast< FmFormPage* >( GetPage() );
if ( pOldFormPage )
xOldForms.set( pOldFormPage->GetForms(), UNO_QUERY_THROW );
@@ -296,6 +299,9 @@ void FmFormObj::SetPage(SdrPage* _pNewPage)
m_xEnvironmentHistory = NULL;
m_aEventsHistory.realloc(0);
+
+ if ( pNewFormPage )
+ pNewFormPage->GetImpl().formObjectInserted( *this );
}
//------------------------------------------------------------------
@@ -584,6 +590,14 @@ const FmFormObj* FmFormObj::GetFormObject( const SdrObject* _pSdrObject )
}
//------------------------------------------------------------------
+void FmFormObj::SetUnoControlModel( const Reference< com::sun::star::awt::XControlModel >& _rxModel )
+{
+ SdrUnoObj::SetUnoControlModel( _rxModel );
+
+ // TODO: call something like formObjectInserted at the form page, to tell it the new model
+}
+
+//------------------------------------------------------------------
FASTBOOL FmFormObj::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd )
{
bool bResult = SdrUnoObj::EndCreate(rStat, eCmd);
@@ -602,11 +616,11 @@ FASTBOOL FmFormObj::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd )
if ( !xParentForm.is() )
{ // model is not yet part of a form component hierachy
- xParentForm.set( rPage.GetImpl()->findPlaceInFormComponentHierarchy( xContent ), UNO_SET_THROW );
+ xParentForm.set( rPage.GetImpl().findPlaceInFormComponentHierarchy( xContent ), UNO_SET_THROW );
xFormToInsertInto.set( xParentForm, UNO_QUERY_THROW );
}
- rPage.GetImpl()->setUniqueName( xContent, xParentForm );
+ rPage.GetImpl().setUniqueName( xContent, xParentForm );
if ( xFormToInsertInto.is() )
xFormToInsertInto->insertByIndex( xFormToInsertInto->getCount(), makeAny( xContent ) );
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index fc87ebc37454..0ead41eb87bc 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -95,7 +95,7 @@ TYPEINIT1(FmFormPage, SdrPage);
FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMasterPage)
:SdrPage(rModel, bMasterPage)
#ifndef SVX_LIGHT
- ,m_pImpl(new FmFormPageImpl(this))
+ ,m_pImpl( new FmFormPageImpl( *this ) )
#else
,m_pImpl(NULL)
#endif
@@ -108,7 +108,7 @@ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMaster
FmFormPage::FmFormPage(const FmFormPage& rPage)
:SdrPage(rPage)
#ifndef SVX_LIGHT
- ,m_pImpl(new FmFormPageImpl(this, *rPage.GetImpl()))
+ ,m_pImpl(new FmFormPageImpl( *this, rPage.GetImpl() ) )
#else
,m_pImpl(NULL)
#endif
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index ae9e5a349532..ed4cd890ec9e 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include "svxerr.hxx"
#include "fmpgeimp.hxx"
#include "fmundo.hxx"
@@ -37,13 +38,16 @@
#include "fmprop.hrc"
#include "fmservs.hxx"
#include "fmobj.hxx"
+#include "formcontrolfactory.hxx"
#include "svditer.hxx"
#include "fmresids.hrc"
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include "treevisitor.hxx"
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/container/EnumerableMap.hpp>
+#include <com/sun/star/drawing/XControlShape.hpp>
#include <sfx2/objsh.hxx>
#include <svx/fmglob.hxx>
@@ -55,6 +59,7 @@
#include <vcl/stdtext.hxx>
#include <svx/dialmgr.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/types.hxx>
#include <unotools/streamwrap.hxx>
@@ -69,12 +74,15 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::form;
using ::com::sun::star::util::XCloneable;
using ::com::sun::star::awt::XControlModel;
+using ::com::sun::star::container::XMap;
+using ::com::sun::star::container::EnumerableMap;
+using ::com::sun::star::drawing::XControlShape;
using namespace ::svxform;
DBG_NAME(FmFormPageImpl)
//------------------------------------------------------------------------------
-FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage)
- :pPage(_pPage)
+FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage )
+ :m_rPage( _rPage )
,m_bFirstActivation( sal_True )
,m_bAttemptedFormCreation( false )
,m_bInFind( false )
@@ -162,13 +170,11 @@ namespace
}
//------------------------------------------------------------------------------
-FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl)
- :pPage(_pPage)
+FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl )
+ :m_rPage( _rPage )
,m_bFirstActivation( sal_True )
,m_bAttemptedFormCreation( false )
- ,m_bInFind( false )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::FmFormPageImpl" );
DBG_CTOR(FmFormPageImpl,NULL);
// clone the Forms collection
@@ -193,8 +199,8 @@ FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl)
aVisitor.process( FormComponentPair( xCloneable, m_xForms ), aAssignmentProcessor );
// assign the cloned models to their SdrObjects
- SdrObjListIter aForeignIter( *rImpl.pPage );
- SdrObjListIter aOwnIter( *pPage );
+ SdrObjListIter aForeignIter( rImpl.m_rPage );
+ SdrObjListIter aOwnIter( m_rPage );
OSL_ENSURE( aForeignIter.IsMore() == aOwnIter.IsMore(), "FmFormPageImpl::FmFormPageImpl: inconsistent number of objects (1)!" );
while ( aForeignIter.IsMore() && aOwnIter.IsMore() )
@@ -242,6 +248,85 @@ FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl)
}
//------------------------------------------------------------------------------
+Reference< XMap > FmFormPageImpl::getControlToShapeMap()
+{
+ Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
+ if ( xControlShapeMap.is() )
+ return xControlShapeMap;
+
+ xControlShapeMap = impl_createControlShapeMap_nothrow();
+ m_aControlShapeMap = xControlShapeMap;
+ return xControlShapeMap;
+}
+
+//------------------------------------------------------------------------------
+namespace
+{
+ static void lcl_insertFormObject_throw( const FmFormObj& _object, const Reference< XMap >& _map )
+ {
+ // the control model
+ Reference< XControlModel > xControlModel( _object.GetUnoControlModel(), UNO_QUERY );
+ OSL_ENSURE( xControlModel.is(), "lcl_insertFormObject_throw: suspicious: no control model!" );
+ if ( !xControlModel.is() )
+ return;
+
+ Reference< XControlShape > xControlShape( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY );
+ OSL_ENSURE( xControlShape.is(), "lcl_insertFormObject_throw: suspicious: no control shape!" );
+ if ( !xControlShape.is() )
+ return;
+
+ _map->put( makeAny( xControlModel ), makeAny( xControlShape ) );
+ }
+
+ static void lcl_removeFormObject( const FmFormObj& _object, const Reference< XMap >& _map )
+ {
+ // the control model
+ Reference< XControlModel > xControlModel( _object.GetUnoControlModel(), UNO_QUERY );
+ OSL_ENSURE( xControlModel.is(), "lcl_removeFormObject: suspicious: no control model!" );
+ if ( !xControlModel.is() )
+ return;
+
+ #if OSL_DEBUG_LEVEL > 0
+ Any aOldAssignment =
+ #endif
+ _map->remove( makeAny( xControlModel ) );
+ OSL_ENSURE( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ),
+ "lcl_removeFormObject: map was inconsistent!" );
+ }
+}
+
+//------------------------------------------------------------------------------
+Reference< XMap > FmFormPageImpl::impl_createControlShapeMap_nothrow()
+{
+ Reference< XMap > xMap;
+
+ try
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ xMap.set( EnumerableMap::create( aContext.getUNOContext(),
+ ::cppu::UnoType< XControlModel >::get(),
+ ::cppu::UnoType< XControlShape >::get()
+ ).get(), UNO_SET_THROW );
+
+ SdrObjListIter aPageIter( m_rPage );
+ while ( aPageIter.IsMore() )
+ {
+ // only FmFormObjs are what we're interested in
+ FmFormObj* pCurrent = FmFormObj::GetFormObject( aPageIter.Next() );
+ if ( !pCurrent )
+ continue;
+
+ lcl_insertFormObject_throw( *pCurrent, xMap );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return xMap;
+}
+
+//------------------------------------------------------------------------------
const Reference< XNameContainer >& FmFormPageImpl::getForms( bool _bForceCreate )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getForms" );
@@ -264,7 +349,7 @@ const Reference< XNameContainer >& FmFormPageImpl::getForms( bool _bForceCreate
m_aFormsCreationHdl.Call( this );
}
- FmFormModel* pFormsModel = pPage ? PTR_CAST( FmFormModel, pPage->GetModel() ) : NULL;
+ FmFormModel* pFormsModel = PTR_CAST( FmFormModel, m_rPage.GetModel() );
// give the newly created collection a place in the universe
Reference< XChild > xAsChild( m_xForms, UNO_QUERY );
@@ -354,11 +439,15 @@ Reference< XForm > FmFormPageImpl::getDefaultForm()
// did not find an existing suitable form -> create a new one
if ( !xForm.is() )
{
- SdrModel* pModel = pPage->GetModel();
- XubString aStr(SVX_RES(RID_STR_FORM));
- XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
- aUndoStr.SearchAndReplace('#', aStr);
- pModel->BegUndo(aUndoStr);
+ SdrModel* pModel = m_rPage.GetModel();
+
+ if( pModel->IsUndoEnabled() )
+ {
+ XubString aStr(SVX_RES(RID_STR_FORM));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ pModel->BegUndo(aUndoStr);
+ }
try
{
@@ -373,11 +462,14 @@ Reference< XForm > FmFormPageImpl::getDefaultForm()
xFormProps->setPropertyValue( FM_PROP_NAME, makeAny( sName ) );
Reference< XIndexContainer > xContainer( xForms, UNO_QUERY );
- pModel->AddUndo(new FmUndoContainerAction(*(FmFormModel*)pModel,
- FmUndoContainerAction::Inserted,
- xContainer,
- xForm,
- xContainer->getCount()));
+ if( pModel->IsUndoEnabled() )
+ {
+ pModel->AddUndo(new FmUndoContainerAction(*(FmFormModel*)pModel,
+ FmUndoContainerAction::Inserted,
+ xContainer,
+ xForm,
+ xContainer->getCount()));
+ }
xForms->insertByName( sName, makeAny( xForm ) );
xCurrentForm = xForm;
}
@@ -387,7 +479,8 @@ Reference< XForm > FmFormPageImpl::getDefaultForm()
xForm.clear();
}
- pModel->EndUndo();
+ if( pModel->IsUndoEnabled() )
+ pModel->EndUndo();
}
return xForm;
@@ -428,11 +521,18 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo
// wenn keine ::com::sun::star::form gefunden, dann eine neue erzeugen
if (!xForm.is())
{
- SdrModel* pModel = pPage->GetModel();
- XubString aStr(SVX_RES(RID_STR_FORM));
- XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
- aUndoStr.SearchAndReplace('#', aStr);
- pModel->BegUndo(aUndoStr);
+ SdrModel* pModel = m_rPage.GetModel();
+
+ const bool bUndo = pModel->IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aStr(SVX_RES(RID_STR_FORM));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ pModel->BegUndo(aUndoStr);
+ }
+
xForm = Reference< ::com::sun::star::form::XForm >(::comphelper::getProcessServiceFactory()->createInstance(FM_SUN_COMPONENT_FORM), UNO_QUERY);
// a form should always have the command type table as default
Reference< ::com::sun::star::beans::XPropertySet > xFormProps(xForm, UNO_QUERY);
@@ -452,29 +552,27 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo
xFormProps->setPropertyValue(FM_PROP_COMMANDTYPE, makeAny(nCommandType));
Reference< ::com::sun::star::container::XNameAccess > xNamedSet( getForms(), UNO_QUERY );
- ::rtl::OUString aName;
- if ((CommandType::TABLE == nCommandType) || (CommandType::QUERY == nCommandType))
- {
- // Namen der ::com::sun::star::form ueber den Titel der CursorSource setzen
- aName = getUniqueName(rCursorSource, xNamedSet);
- }
- else
- // ansonsten StandardformName verwenden
- aName = getUniqueName(::rtl::OUString(String(SVX_RES(RID_STR_STDFORMNAME))), xNamedSet);
+ const bool bTableOrQuery = ( CommandType::TABLE == nCommandType ) || ( CommandType::QUERY == nCommandType );
+ ::rtl::OUString sName = FormControlFactory::getUniqueName( xNamedSet,
+ bTableOrQuery ? rCursorSource : ::rtl::OUString( String( SVX_RES( RID_STR_STDFORMNAME ) ) ) );
- xFormProps->setPropertyValue(FM_PROP_NAME, makeAny(aName));
+ xFormProps->setPropertyValue( FM_PROP_NAME, makeAny( sName ) );
- Reference< ::com::sun::star::container::XIndexContainer > xContainer( getForms(), UNO_QUERY );
- pModel->AddUndo(new FmUndoContainerAction(*(FmFormModel*)pModel,
- FmUndoContainerAction::Inserted,
- xContainer,
- xForm,
- xContainer->getCount()));
+ if( bUndo )
+ {
+ Reference< ::com::sun::star::container::XIndexContainer > xContainer( getForms(), UNO_QUERY );
+ pModel->AddUndo(new FmUndoContainerAction(*(FmFormModel*)pModel,
+ FmUndoContainerAction::Inserted,
+ xContainer,
+ xForm,
+ xContainer->getCount()));
+ }
+ getForms()->insertByName( sName, makeAny( xForm ) );
- getForms()->insertByName(aName, makeAny(xForm));
- pModel->EndUndo();
+ if( bUndo )
+ pModel->EndUndo();
}
xCurrentForm = xForm;
}
@@ -569,7 +667,6 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
//------------------------------------------------------------------------------
::rtl::OUString FmFormPageImpl::setUniqueName(const Reference< XFormComponent > & xFormComponent, const Reference< XForm > & xControls)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::setUniqueName" );
#if OSL_DEBUG_LEVEL > 0
try
{
@@ -593,9 +690,10 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
// setzen eines default Namens ueber die ClassId
sal_Int16 nClassId( FormComponentType::CONTROL );
xSet->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId;
- Reference< XServiceInfo > xSI( xSet, UNO_QUERY );
- ::rtl::OUString sDefaultName = getDefaultName( nClassId, xControls, xSI );
+ ::rtl::OUString sDefaultName = FormControlFactory::getDefaultUniqueName_ByComponentType(
+ Reference< XNameAccess >( xControls, UNO_QUERY ), xSet );
+
// bei Radiobuttons, die einen Namen haben, diesen nicht ueberschreiben!
if (!sName.getLength() || nClassId != ::com::sun::star::form::FormComponentType::RADIOBUTTON)
{
@@ -608,74 +706,37 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
return sName;
}
-
-UniString FmFormPageImpl::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject )
+//------------------------------------------------------------------
+void FmFormPageImpl::formObjectInserted( const FmFormObj& _object )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultName" );
- sal_uInt16 nResId;
+ Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
+ if ( !xControlShapeMap.is() )
+ // our map does not exist -> not interested in this event
+ return;
- switch (_nClassId)
+ try
{
- case FormComponentType::COMMANDBUTTON: nResId = RID_STR_BUTTON_CLASSNAME; break;
- case FormComponentType::RADIOBUTTON: nResId = RID_STR_RADIOBUTTON_CLASSNAME; break;
- case FormComponentType::CHECKBOX: nResId = RID_STR_CHECKBOX_CLASSNAME; break;
- case FormComponentType::LISTBOX: nResId = RID_STR_LISTBOX_CLASSNAME; break;
- case FormComponentType::COMBOBOX: nResId = RID_STR_COMBOBOX_CLASSNAME; break;
- case FormComponentType::GROUPBOX: nResId = RID_STR_GROUPBOX_CLASSNAME; break;
- case FormComponentType::IMAGEBUTTON: nResId = RID_STR_IMAGE_CLASSNAME; break;
- case FormComponentType::FIXEDTEXT: nResId = RID_STR_FIXEDTEXT_CLASSNAME; break;
- case FormComponentType::GRIDCONTROL: nResId = RID_STR_GRID_CLASSNAME; break;
- case FormComponentType::FILECONTROL: nResId = RID_STR_FILECONTROL_CLASSNAME; break;
- case FormComponentType::DATEFIELD: nResId = RID_STR_DATEFIELD_CLASSNAME; break;
- case FormComponentType::TIMEFIELD: nResId = RID_STR_TIMEFIELD_CLASSNAME; break;
- case FormComponentType::NUMERICFIELD: nResId = RID_STR_NUMERICFIELD_CLASSNAME; break;
- case FormComponentType::CURRENCYFIELD: nResId = RID_STR_CURRENCYFIELD_CLASSNAME; break;
- case FormComponentType::PATTERNFIELD: nResId = RID_STR_PATTERNFIELD_CLASSNAME; break;
- case FormComponentType::IMAGECONTROL: nResId = RID_STR_IMAGECONTROL_CLASSNAME; break;
- case FormComponentType::HIDDENCONTROL: nResId = RID_STR_HIDDEN_CLASSNAME; break;
- case FormComponentType::SCROLLBAR: nResId = RID_STR_CLASSNAME_SCROLLBAR; break;
- case FormComponentType::SPINBUTTON: nResId = RID_STR_CLASSNAME_SPINBUTTON; break;
- case FormComponentType::NAVIGATIONBAR: nResId = RID_STR_NAVBAR_CLASSNAME; break;
-
- case FormComponentType::TEXTFIELD:
- nResId = RID_STR_EDIT_CLASSNAME;
- if ( _rxObject.is() && _rxObject->supportsService( FM_SUN_COMPONENT_FORMATTEDFIELD ) )
- nResId = RID_STR_FORMATTED_CLASSNAME;
- break;
-
- default:
- nResId = RID_STR_CONTROL_CLASSNAME; break;
+ lcl_insertFormObject_throw( _object, xControlShapeMap );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
-
- return SVX_RES(nResId);
-}
-
-//------------------------------------------------------------------------------
-::rtl::OUString FmFormPageImpl::getDefaultName(
- sal_Int16 _nClassId, const Reference< XForm >& _rxControls, const Reference< XServiceInfo >& _rxObject ) const
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultName" );
- ::rtl::OUString aClassName=getDefaultName( _nClassId, _rxObject );
-
- Reference< ::com::sun::star::container::XNameAccess > xNamedSet( _rxControls, UNO_QUERY );
- return getUniqueName(aClassName, xNamedSet);
}
-//------------------------------------------------------------------
-::rtl::OUString FmFormPageImpl::getUniqueName(const ::rtl::OUString& rName, const Reference< ::com::sun::star::container::XNameAccess > & xNamedSet) const
+void FmFormPageImpl::formObjectRemoved( const FmFormObj& _object )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getUniqueName" );
- Reference< ::com::sun::star::container::XIndexAccess > xIndexSet(xNamedSet, UNO_QUERY);
- ::rtl::OUString sName( rName );
-
- if ( !xIndexSet.is() )
- return sName;
-
- sal_Int32 n = 0;
- ::rtl::OUString sClassName = rName;
-
- while ( xNamedSet->hasByName( sName ) )
- sName = sClassName + ::rtl::OUString::valueOf(++n);
+ Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
+ if ( !xControlShapeMap.is() )
+ // our map does not exist -> not interested in this event
+ return;
- return sName;
+ try
+ {
+ lcl_removeFormObject( _object, xControlShapeMap );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
diff --git a/svx/source/form/fmprop.cxx b/svx/source/form/fmprop.cxx
deleted file mode 100644
index 2cf5f158ac1f..000000000000
--- a/svx/source/form/fmprop.cxx
+++ /dev/null
@@ -1,194 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: fmprop.cxx,v $
- * $Revision: 1.22 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-
-#ifndef _SVX_FMPROP_HRC
-#include "fmprop.hrc"
-#endif
-#include "fmstatic.hxx"
-
-#include <set>
-
-namespace svxform
-{
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NAME,"Name");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CLASSID,"ClassId");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWCOUNT,"RowCount");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWCOUNTFINAL,"IsRowCountFinal");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FETCHSIZE,"FetchSize");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUE,"Value");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXT,"Text");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LABEL,"Label");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANINSERT,"CanInsert");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANUPDATE,"CanUpdate");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANDELETE,"CanDelete");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NAVIGATION,"NavigationBarMode");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HASNAVIGATION,"HasNavigationBar");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CYCLE,"Cycle");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCE,"DataField");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ENABLED,"Enabled");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_READONLY,"ReadOnly");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISREADONLY,"IsReadOnly");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTER,"Filter");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_AUTOINCREMENT,"IsAutoIncrement");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATAENTRY,"DataEntry");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_WIDTH,"Width");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SEARCHABLE,"IsSearchable");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MULTILINE,"MultiLine");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TARGET_URL,"TargetURL");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULTCONTROL,"DefaultControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MAXTEXTLEN,"MaxTextLen");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EDITMASK,"EditMask");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SPIN,"Spin");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATE,"Date");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIME,"Time");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STATE,"State");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TRISTATE,"TriState");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STRINGITEMLIST,"StringItemList");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_TEXT,"DefaultText");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULTCHECKED,"DefaultState");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FORMATKEY,"FormatKey");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FORMATSSUPPLIER,"FormatsSupplier");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LISTSOURCETYPE,"ListSourceType");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LISTSOURCE,"ListSource");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECT_SEQ,"SelectedItems");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUE_SEQ,"ValueItemList");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_SELECT_SEQ,"DefaultSelection");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALIGN,"Align");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_DATE,"DefaultDate");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_TIME,"DefaultTime");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_VALUE,"DefaultValue");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DECIMAL_ACCURACY,"DecimalAccuracy");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORSOURCE,"DataSelection");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORSOURCETYPE,"DataSelectionType");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FIELDTYPE,"Type");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_REFVALUE,"RefValue");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUEMIN,"ValueMin");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUEMAX,"ValueMax");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STRICTFORMAT,"StrictFormat");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LITERALMASK,"LiteralMask");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUESTEP,"ValueStep");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SHOWTHOUSANDSEP,"ShowThousandsSeparator");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRENCYSYMBOL,"CurrencySymbol");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEFORMAT,"DateFormat");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEMIN,"DateMin");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEMAX,"DateMax");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATE_SHOW_CENTURY,"DateShowCentury");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEFORMAT, "TimeFormat");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEMIN, "TimeMin");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEMAX,"TimeMax");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LINECOUNT,"LineCount");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BOUNDCOLUMN, "BoundColumn");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT,"FontDescriptor");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BACKGROUNDCOLOR,"BackgroundColor");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXTCOLOR,"TextColor");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BORDER,"Border");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DROPDOWN,"Dropdown");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWHEIGHT,"RowHeight");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HELPTEXT, "HelpText");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HELPURL, "HelpURL");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RECORDMARKER, "HasRecordMarker");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BOUNDFIELD, "BoundField");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_VALUE, "EffectiveValue");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_DEFAULT, "EffectiveDefault");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MIN, "EffectiveMin");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MAX, "EffectiveMax");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HIDDEN, "Hidden");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTERPROPOSAL, "UseFilterValueProposal");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FIELDSOURCE, "FieldSource");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TABLENAME, "TableName");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTERSUPPLIER, "FilterSupplier");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRENTFILTER, "CurrentFilter");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECTED_FIELDS, "SelectedFields");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECTED_TABLES, "SelectedTables");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_THREADSAFE, "ThreadSafe");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISFILTERAPPLIED, "IsFilterApplied");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLLABEL, "LabelControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORCOLOR, "CursorColor");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALWAYSSHOWCURSOR, "AlwaysShowCursor");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DISPLAYSYNCHRON, "DisplayIsSynchron");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISMODIFIED, "IsModified");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISNEW, "IsNew");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_PRIVILEGES, "Privileges");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_COMMAND,"Command");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_COMMANDTYPE,"CommandType");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RESULTSET_CONCURRENCY, "ResultSetConcurrency");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_INSERTONLY, "IgnoreResult");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RESULTSET_TYPE, "ResultSetType");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ESCAPE_PROCESSING, "EscapeProcessing");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_APPLYFILTER, "ApplyFilter");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISNULLABLE, "IsNullable");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVECOMMAND, "ActiveCommand");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISCURRENCY, "IsCurrency");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_URL, "URL");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION, "ActiveConnection");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SORT, "Order");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATASOURCE, "DataSourceName");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_REALNAME,"RealName");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCEPROPERTY,"DataFieldProperty");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXTLINECOLOR, "TextLineColor");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONTEMPHASISMARK, "FontEmphasisMark");
- IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONTRELIEF, "FontRelief");
-
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MIN, "ScrollValueMin" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MAX, "ScrollValueMax" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_DEFAULT_SCROLLVALUE, "DefaultScrollValue" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_LINEINCREMENT, "LineIncrement" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_BLOCKINCREMENT, "BlockIncrement" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_ORIENTATION, "Orientation" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_REPEAT, "Repeat" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_REPEATDELAY, "RepeatDelay" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SYMBOLCOLOR, "SymbolColor" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_VISIBILESIZE, "VisibleSize" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MIN, "SpinValueMin" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MAX, "SpinValueMax" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_DEFAULT_SPINVALUE, "DefaultSpinValue" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SPININCREMENT, "SpinIncrement" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_LINEENDFORMAT, "LineEndFormat" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_TOGGLE, "Toggle" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_FOCUSONCLICK, "FocusOnClick" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_HIDEINACTIVESELECTION, "HideInactiveSelection" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_VISUALEFFECT, "VisualEffect" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_BORDERCOLOR, "BorderColor" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_DYNAMIC_CONTROL_BORDER, "DynamicControlBorder" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_FOCUS, "ControlBorderColorOnFocus" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_MOUSE, "ControlBorderColorOnHover" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_INVALID,"ControlBorderColorOnInvalid" );
-
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_BUTTON_TYPE, "ButtonType" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_FORM_OPERATIONS, "FormOperations" );
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_INPUT_REQUIRED, "InputRequired" );
-
- IMPLEMENT_CONSTASCII_USTRING( FM_PROP_WRITING_MODE, "WritingMode" );
-
-} // namespace svxform
-
diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx
index fd4ab39e2f91..b9f40b6ddda2 100644
--- a/svx/source/form/fmservs.cxx
+++ b/svx/source/form/fmservs.cxx
@@ -31,76 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include <com/sun/star/container/XSet.hpp>
-#include "fmstatic.hxx"
#include <cppuhelper/factory.hxx>
#include <comphelper/processfactory.hxx>
-
-namespace svxform
-{
-
- // -----------------------
- // service names for compatibility
- // -----------------------
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_EDIT,"stardiv.one.form.component.Edit"); // compatibility
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_TEXTFIELD,"stardiv.one.form.component.TextField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_LISTBOX,"stardiv.one.form.component.ListBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_COMBOBOX,"stardiv.one.form.component.ComboBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_RADIOBUTTON,"stardiv.one.form.component.RadioButton");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GROUPBOX,"stardiv.one.form.component.GroupBox"); // compatibility
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FIXEDTEXT,"stardiv.one.form.component.FixedText"); // compatibility
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_COMMANDBUTTON,"stardiv.one.form.component.CommandButton");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_CHECKBOX,"stardiv.one.form.component.CheckBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GRID,"stardiv.one.form.component.Grid"); // compatibility
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GRIDCONTROL,"stardiv.one.form.component.GridControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_IMAGEBUTTON,"stardiv.one.form.component.ImageButton");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FILECONTROL,"stardiv.one.form.component.FileControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_TIMEFIELD,"stardiv.one.form.component.TimeField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_DATEFIELD,"stardiv.one.form.component.DateField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_NUMERICFIELD,"stardiv.one.form.component.NumericField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_CURRENCYFIELD,"stardiv.one.form.component.CurrencyField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_PATTERNFIELD,"stardiv.one.form.component.PatternField");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_HIDDEN,"stardiv.one.form.component.Hidden");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_HIDDENCONTROL,"stardiv.one.form.component.HiddenControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_IMAGECONTROL,"stardiv.one.form.component.ImageControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FORMATTEDFIELD,"stardiv.one.form.component.FormattedField");
-
- IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GRID,"stardiv.one.form.control.Grid"); // compatibility
- IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL,"stardiv.one.form.control.GridControl");
-
- // -----------------------
- // new (sun) service names
- // -----------------------
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORM,"com.sun.star.form.component.Form");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_TEXTFIELD,"com.sun.star.form.component.TextField");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_LISTBOX,"com.sun.star.form.component.ListBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMBOBOX,"com.sun.star.form.component.ComboBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_RADIOBUTTON,"com.sun.star.form.component.RadioButton");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_GROUPBOX,"com.sun.star.form.component.GroupBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FIXEDTEXT,"com.sun.star.form.component.FixedText");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMMANDBUTTON,"com.sun.star.form.component.CommandButton");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_CHECKBOX,"com.sun.star.form.component.CheckBox");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_GRIDCONTROL,"com.sun.star.form.component.GridControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGEBUTTON,"com.sun.star.form.component.ImageButton");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FILECONTROL,"com.sun.star.form.component.FileControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_TIMEFIELD,"com.sun.star.form.component.TimeField");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_DATEFIELD,"com.sun.star.form.component.DateField");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_NUMERICFIELD,"com.sun.star.form.component.NumericField");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_CURRENCYFIELD,"com.sun.star.form.component.CurrencyField");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_PATTERNFIELD,"com.sun.star.form.component.PatternField");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_HIDDENCONTROL,"com.sun.star.form.component.HiddenControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGECONTROL,"com.sun.star.form.component.DatabaseImageControl");
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORMATTEDFIELD,"com.sun.star.form.component.FormattedField");
- IMPLEMENT_CONSTASCII_USTRING( FM_SUN_COMPONENT_SCROLLBAR, "com.sun.star.form.component.ScrollBar" );
- IMPLEMENT_CONSTASCII_USTRING( FM_SUN_COMPONENT_SPINBUTTON, "com.sun.star.form.component.SpinButton" );
- IMPLEMENT_CONSTASCII_USTRING( FM_SUN_COMPONENT_NAVIGATIONBAR,"com.sun.star.form.component.NavigationToolBar" );
-
- IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_GRIDCONTROL,"com.sun.star.form.control.GridControl");
-
- IMPLEMENT_CONSTASCII_USTRING(FM_NUMBER_FORMATTER,"com.sun.star.util.NumberFormatter");
- IMPLEMENT_CONSTASCII_USTRING(FM_FORM_CONTROLLER,"com.sun.star.form.FormController");
- IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_CONNECTION,"com.sun.star.sdb.Connection");
- IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_INTERACTION_HANDLER,"com.sun.star.sdb.InteractionHandler");
-} // namespace svxform
+#include "fmservs.hxx"
// ------------------------------------------------------------------------
#define DECL_SERVICE(ImplName) \
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 00dca9dfe7ad..8c5ca61f6691 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -265,6 +265,7 @@ sal_Int16 nObjectTypes[] =
OBJ_FM_NAVIGATIONBAR
};
+using namespace ::com::sun::star;
using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
@@ -784,7 +785,7 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru
void FmXFormShell::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" );
- OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........\n", this );
+ OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........", this );
impl_checkDisposed();
FmXFormShell_BASE::disposing();
@@ -1214,8 +1215,14 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent
// create an undo action
FmFormModel* pModel = m_pShell->GetFormModel();
DBG_ASSERT(pModel != NULL, "FmXFormShell::executeControlConversionSlot: my shell has no model !");
- if (pModel)
+ if (pModel && pModel->IsUndoEnabled() )
+ {
pModel->AddUndo(new FmUndoModelReplaceAction(*pModel, pFormObject, xOldModel));
+ }
+ else
+ {
+ FmUndoModelReplaceAction::DisposeElement( xOldModel );
+ }
return true;
}
@@ -2059,7 +2066,7 @@ void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurFo
// propagate to the FormPage(Impl)
FmFormPage* pPage = m_pShell->GetCurPage();
if ( pPage )
- pPage->GetImpl()->setCurForm( m_xCurrentForm );
+ pPage->GetImpl().setCurForm( m_xCurrentForm );
// ensure the UI which depends on the current form is up-to-date
for ( size_t i = 0; i < sizeof( DlgSlotMap ) / sizeof( DlgSlotMap[0] ); ++i )
@@ -3929,7 +3936,7 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem)
void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeactivateController /* = sal_True */ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewDeactivated" );
- OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........\n", this, &_rCurrentView );
+ OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........", this, &_rCurrentView );
if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() )
{
@@ -3962,10 +3969,10 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeacti
}
// remove callbacks at the page
- if ( pPage && pPage->GetImpl() )
+ if ( pPage )
{
- OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p\n", this, pPage );
- pPage->GetImpl()->SetFormsCreationHdl( Link() );
+ OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p", this, pPage );
+ pPage->GetImpl().SetFormsCreationHdl( Link() );
}
UpdateForms( sal_True );
}
@@ -4003,7 +4010,7 @@ IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ )
void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncAction /* = sal_False */ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewActivated" );
- OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........\n", this, &_rCurrentView );
+ OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........", this, &_rCurrentView );
FmFormPage* pPage = _rCurrentView.GetCurPage();
@@ -4014,9 +4021,9 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi
// load forms for the page the current view belongs to
if ( pPage )
{
- if ( !pPage->GetImpl()->hasEverBeenActivated() )
+ if ( !pPage->GetImpl().hasEverBeenActivated() )
loadForms( pPage, FORMS_LOAD | ( _bSyncAction ? FORMS_SYNC : FORMS_ASYNC ) );
- pPage->GetImpl()->setHasBeenActivated( );
+ pPage->GetImpl().setHasBeenActivated( );
}
// first-time initializations for the views
@@ -4031,10 +4038,10 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi
}
// set callbacks at the page
- if ( pPage && pPage->GetImpl() )
+ if ( pPage )
{
- OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p\n", this, pPage );
- pPage->GetImpl()->SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) );
+ OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p", this, pPage );
+ pPage->GetImpl().SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) );
}
UpdateForms( sal_True );
diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src
index 2572c2ed2239..8b42ccadc6a6 100644
--- a/svx/source/form/fmstring.src
+++ b/svx/source/form/fmstring.src
@@ -84,107 +84,16 @@ Resource RID_RSC_TABWIN_PREFIX
};
String RID_STR_FORMSHELL
{
- Text [ en-US ] = "Form";
+ Text = "Form Shell";
};
String RID_STR_STDFORMNAME
{
- Text = "Standard";
-};
-String RID_STR_FORMATTED_CLASSNAME
-{
- Text = "FormattedField";
-};
-String RID_STR_CONTROL_CLASSNAME
-{
- Text = "Control";
-};
-String RID_STR_CHECKBOX_CLASSNAME
-{
- Text = "CheckBox";
-};
-String RID_STR_RADIOBUTTON_CLASSNAME
-{
- Text = "OptionButton";
-};
-String RID_STR_BUTTON_CLASSNAME
-{
- Text = "PushButton";
-};
-String RID_STR_FIXEDTEXT_CLASSNAME
-{
- Text = "LabelField";
-};
-String RID_STR_IMAGE_CLASSNAME
-{
- Text = "ImageButton";
-};
-String RID_STR_GRID_CLASSNAME
-{
- Text = "TableControl";
-};
-String RID_STR_GROUPBOX_CLASSNAME
-{
- Text = "GroupBox";
-};
-String RID_STR_LISTBOX_CLASSNAME
-{
- Text = "ListBox";
-};
-String RID_STR_COMBOBOX_CLASSNAME
-{
- Text = "ComboBox";
-};
-String RID_STR_EDIT_CLASSNAME
-{
- Text = "TextBox";
+ Text [ en-US ]= "Form";
};
-String RID_STR_FILECONTROL_CLASSNAME
+String RID_STR_PROPTITLE_HIDDEN
{
- Text = "FileSelection";
+ Text [ en-US ] = "Hidden Control";
};
-String RID_STR_DATEFIELD_CLASSNAME
-{
- Text = "DateField";
-};
-String RID_STR_TIMEFIELD_CLASSNAME
-{
- Text = "TimeField";
-};
-String RID_STR_NUMERICFIELD_CLASSNAME
-{
- Text = "NumericalField";
-};
-String RID_STR_CURRENCYFIELD_CLASSNAME
-{
- Text = "CurrencyField";
-};
-String RID_STR_PATTERNFIELD_CLASSNAME
-{
- Text = "PatternField";
-};
-String RID_STR_IMAGECONTROL_CLASSNAME
-{
- Text = "ImageControl";
-};
-String RID_STR_HIDDEN_CLASSNAME
-{
- Text = "HiddenControl";
-};
-String RID_STR_NAVBAR_CLASSNAME
-{
- Text [ en-US ] = "NavigationBar";
-};
-
-String RID_STR_CLASSNAME_SCROLLBAR
-{
- Text [ en-US ] = "Scrollbar";
-};
-
-String RID_STR_CLASSNAME_SPINBUTTON
-{
- Text [ en-US ] = "SpinButton";
-};
-
String RID_STR_CONTROL
{
Text [ en-US ] = "Control";
@@ -282,7 +191,7 @@ String RID_STR_TIME
};
String RID_STR_PROPTITLE_PUSHBUTTON
{
- Text [ en-US ] = "Button";
+ Text [ en-US ] = "Push Button";
};
String RID_STR_PROPTITLE_RADIOBUTTON
{
@@ -294,7 +203,7 @@ String RID_STR_PROPTITLE_CHECKBOX
};
String RID_STR_PROPTITLE_FIXEDTEXT
{
- Text [ en-US ] = "Label field";
+ Text [ en-US ] = "Label Field";
};
String RID_STR_PROPTITLE_GROUPBOX
{
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index cb8a46cd88a9..fc7f1aa78558 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -94,7 +94,6 @@ namespace svx
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
- using namespace ::svxform;
//====================================================================
typedef USHORT WhichId;
@@ -102,6 +101,7 @@ namespace svx
//====================================================================
static SfxSlotId pTextControlSlots[] =
{
+ SID_CLIPBOARD_FORMAT_ITEMS,
SID_CUT,
SID_COPY,
SID_PASTE,
@@ -115,7 +115,6 @@ namespace svx
SID_ATTR_CHAR_CONTOUR,
SID_ATTR_CHAR_STRIKEOUT,
SID_ATTR_CHAR_UNDERLINE,
- SID_ATTR_CHAR_OVERLINE,
SID_ATTR_CHAR_FONTHEIGHT,
SID_ATTR_CHAR_COLOR,
SID_ATTR_CHAR_KERNING,
@@ -133,6 +132,7 @@ namespace svx
SID_ATTR_LRSPACE, /* 48 */
SID_ATTR_ULSPACE, /* 49 */
SID_ATTR_CHAR_AUTOKERN,
+ SID_ATTR_CHAR_OVERLINE,
SID_SET_SUPER_SCRIPT,
SID_SET_SUB_SCRIPT,
SID_CHAR_DLG,
@@ -141,7 +141,6 @@ namespace svx
// SID_TEXTDIRECTION_TOP_TO_BOTTOM,
SID_ATTR_CHAR_SCALEWIDTH, /* 911 */
SID_ATTR_CHAR_RELIEF,
- SID_CLIPBOARD_FORMAT_ITEMS, /* 922 */
SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */
SID_ATTR_PARA_RIGHT_TO_LEFT,
0
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 95f1ae30f41c..df8b51b8b82f 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -37,7 +37,7 @@
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include "fmtools.hxx"
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include "fmservs.hxx"
#include <svx/fmglob.hxx>
#include <vcl/stdtext.hxx>
@@ -100,7 +100,6 @@
#include <connectivity/dbtools.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
-#include "fmstatic.hxx"
#include <comphelper/extract.hxx>
#include <comphelper/uno3.hxx>
#include <connectivity/dbexception.hxx>
@@ -109,14 +108,6 @@
#include <algorithm>
#include <rtl/logfile.hxx>
-namespace svxform
-{
-
- IMPLEMENT_CONSTASCII_USTRING(DATA_MODE,"DataMode");
- IMPLEMENT_CONSTASCII_USTRING(FILTER_MODE,"FilterMode");
-
-} // namespace svxform
-
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::lang;
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index ea70f1f6c9e8..2436113312cc 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -55,7 +55,7 @@
#include <rtl/logfile.hxx>
#include <svx/dialmgr.hxx>
#include "fmpgeimp.hxx"
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include <svtools/macitem.hxx>
#include <tools/shl.hxx>
#include <tools/diagnose_ex.h>
@@ -336,12 +336,12 @@ void FmXUndoEnvironment::Inserted(FmFormObj* pObj)
}
else
{
- xForm.set( rPage.GetImpl()->findPlaceInFormComponentHierarchy( xContent ), UNO_SET_THROW );
+ xForm.set( rPage.GetImpl().findPlaceInFormComponentHierarchy( xContent ), UNO_SET_THROW );
xNewParent.set( xForm, UNO_QUERY_THROW );
nPos = xNewParent->getCount();
}
- rPage.GetImpl()->setUniqueName( xContent, xForm );
+ rPage.GetImpl().setUniqueName( xContent, xForm );
xNewParent->insertByIndex( nPos, makeAny( xContent ) );
Reference< XEventAttacherManager > xManager( xNewParent, UNO_QUERY_THROW );
@@ -459,7 +459,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
return;
// if it's a "default value" property of a control model, set the according "value" property
- static const sal_Char* pDefaultValueProperties[] = {
+ static ::rtl::OUString pDefaultValueProperties[] = {
FM_PROP_DEFAULT_TEXT, FM_PROP_DEFAULTCHECKED, FM_PROP_DEFAULT_DATE, FM_PROP_DEFAULT_TIME,
FM_PROP_DEFAULT_VALUE, FM_PROP_DEFAULT_SELECT_SEQ, FM_PROP_EFFECTIVE_DEFAULT
};
@@ -472,7 +472,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
"FmXUndoEnvironment::propertyChange: inconsistence!");
for (sal_Int32 i=0; i<nDefaultValueProps; ++i)
{
- if (0 == evt.PropertyName.compareToAscii(pDefaultValueProperties[i]))
+ if (0 == evt.PropertyName.compareTo(pDefaultValueProperties[i]))
{
try
{
@@ -569,9 +569,9 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
// now we have access to the cached info about the property affected
// and are able to decide wether or not we need an undo action
- bool bAddUndoAction = true;
+ bool bAddUndoAction = rModel.IsUndoEnabled();
// no UNDO for transient/readonly properties
- if ( aPropertyPos->second.bIsTransientOrReadOnly )
+ if ( bAddUndoAction && aPropertyPos->second.bIsTransientOrReadOnly )
bAddUndoAction = false;
if ( bAddUndoAction && aPropertyPos->second.bIsValueProperty )
@@ -996,16 +996,23 @@ FmUndoContainerAction::FmUndoContainerAction(FmFormModel& _rMod,
FmUndoContainerAction::~FmUndoContainerAction()
{
// if we own the object ....
- Reference< XComponent > xComp( m_xOwnElement, UNO_QUERY );
+ DisposeElement( m_xOwnElement );
+ DBG_DTOR(FmUndoContainerAction,NULL);
+}
+
+//------------------------------------------------------------------------------
+
+void FmUndoContainerAction::DisposeElement( const Reference< XInterface > & xElem )
+{
+ Reference< XComponent > xComp( xElem, UNO_QUERY );
if ( xComp.is() )
{
// and the object does not have a parent
- Reference< XChild > xChild( m_xOwnElement, UNO_QUERY );
+ Reference< XChild > xChild( xElem, UNO_QUERY );
if ( xChild.is() && !xChild->getParent().is() )
// -> dispose it
xComp->dispose();
}
- DBG_DTOR(FmUndoContainerAction,NULL);
}
//------------------------------------------------------------------------------
@@ -1139,10 +1146,17 @@ FmUndoModelReplaceAction::FmUndoModelReplaceAction(FmFormModel& _rMod, SdrUnoObj
FmUndoModelReplaceAction::~FmUndoModelReplaceAction()
{
// dispose our element if nobody else is responsible for
- Reference< XComponent > xComp(m_xReplaced, UNO_QUERY);
+ DisposeElement(m_xReplaced);
+}
+
+//------------------------------------------------------------------------------
+
+void FmUndoModelReplaceAction::DisposeElement( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xReplaced )
+{
+ Reference< XComponent > xComp(xReplaced, UNO_QUERY);
if (xComp.is())
{
- Reference< XChild > xChild(m_xReplaced, UNO_QUERY);
+ Reference< XChild > xChild(xReplaced, UNO_QUERY);
if (!xChild.is() || !xChild->getParent().is())
xComp->dispose();
}
diff --git a/svx/source/form/fmurl.cxx b/svx/source/form/fmurl.cxx
deleted file mode 100644
index 32a40c0949e4..000000000000
--- a/svx/source/form/fmurl.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: fmurl.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include "fmurl.hxx"
-
-
-namespace svxform
-{
-
- IMPLEMENT_CONSTASCII_USTRING(FMURL_FORMSLOTS_PREFIX, ".uno:FormController/");
-
- IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_POSITION, ".uno:FormController/positionForm" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_RECORDCOUNT, ".uno:FormController/RecordCount" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVEFIRST, ".uno:FormController/moveToFirst" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVEPREV, ".uno:FormController/moveToPrev" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVENEXT, ".uno:FormController/moveToNext" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVELAST, ".uno:FormController/moveToLast" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVETONEW, ".uno:FormController/moveToNew" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_UNDO, ".uno:FormController/undoRecord" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_SAVE, ".uno:FormController/saveRecord" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_DELETE, ".uno:FormController/deleteRecord" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_REFRESH, ".uno:FormController/refreshForm" );
- IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_REFRESH_CURRENT_CONTROL,
- ".uno:FormController/refreshCurrentControl" );
-
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_SORT_UP, ".uno:FormController/sortUp" );
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_SORT_DOWN, ".uno:FormController/sortDown" );
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_SORT, ".uno:FormController/sort" );
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_AUTO_FILTER, ".uno:FormController/autoFilter" );
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_FILTER, ".uno:FormController/filter" );
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_APPLY_FILTER, ".uno:FormController/applyFilter" );
- IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_REMOVE_FILTER,".uno:FormController/removeFilterOrder" );
-
- IMPLEMENT_CONSTASCII_USTRING(FMURL_CONFIRM_DELETION,".uno:FormSlots/ConfirmDeletion");
-
- IMPLEMENT_CONSTASCII_USTRING(FMURL_COMPONENT_FORMGRIDVIEW,".component:DB/FormGridView");
- IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_CLEARVIEW,".uno:FormSlots/ClearView");
- IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_ADDCOLUMN,".uno:FormSlots/AddGridColumn");
- IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_ATTACHTOFORM,".uno:FormSlots/AttachToForm");
-
- IMPLEMENT_CONSTASCII_USTRING(FMARG_ATTACHTO_MASTERFORM,"MasterForm");
- IMPLEMENT_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNTYPE,"ColumnType");
- IMPLEMENT_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNPOS,"ColumnPosition");
-
-} // namespace svxform
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 94ce048f4ed2..222407a36021 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -342,7 +342,7 @@ void FmFormView::GrabFirstControlFocus( sal_Bool _bForceSync )
//------------------------------------------------------------------------
SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
{
- OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p\n", this, pPage );
+ OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p", this, pPage );
SdrPageView* pPV = E3dView::ShowSdrPage(pPage);
@@ -380,7 +380,7 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage)
//------------------------------------------------------------------------
void FmFormView::HideSdrPage()
{
- OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p\n", this, GetCurPage() );
+ OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p", this, GetCurPage() );
// --- 1. deactivate controls
if ( !IsDesignMode() )
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index db4c7d678dd9..46750d524a4d 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -213,7 +213,7 @@ void FmXPageViewWinRec::dispose()
Reference< XChild > xControllerModel( xController->getModel(), UNO_QUERY );
if ( xControllerModel.is() )
{
- Reference< XEventAttacherManager > xEventManager( xControllerModel->getParent(), UNO_QUERY );
+ Reference< XEventAttacherManager > xEventManager( xControllerModel->getParent(), UNO_QUERY_THROW );
Reference< XInterface > xControllerNormalized( xController, UNO_QUERY_THROW );
xEventManager->detach( i - m_aControllerList.begin(), xControllerNormalized );
}
@@ -817,14 +817,20 @@ static Reference< XControl > lcl_firstFocussableControl( const Sequence< Referen
{
try
{
+ if ( !pControls->is() )
+ continue;
+
+ Reference< XPropertySet > xModelProps( (*pControls)->getModel(), UNO_QUERY_THROW );
+
+ // only enabled controls are allowed to participate
+ sal_Bool bEnabled = sal_False;
+ OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_ENABLED ) >>= bEnabled );
+ if ( !bEnabled )
+ continue;
+
// check the class id of the control model
sal_Int16 nClassId = FormComponentType::CONTROL;
-
- Reference< XPropertySet > xModelProps;
- if ( pControls->is() )
- xModelProps = xModelProps.query( (*pControls)->getModel() );
- if ( xModelProps.is() )
- xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId;
+ OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId );
// controls which are not focussable
if ( ( FormComponentType::CONTROL != nClassId )
@@ -1115,10 +1121,10 @@ namespace
Reference< XFormComponent > xFormComponent( _rSdrObj.GetUnoControlModel(), UNO_QUERY_THROW );
Reference< XForm > xTargetForm(
- rPage.GetImpl()->findPlaceInFormComponentHierarchy( xFormComponent, _rxDataSource, _rDataSourceName, _rCommand, _nCommandType ),
+ rPage.GetImpl().findPlaceInFormComponentHierarchy( xFormComponent, _rxDataSource, _rDataSourceName, _rCommand, _nCommandType ),
UNO_SET_THROW );
- rPage.GetImpl()->setUniqueName( xFormComponent, xTargetForm );
+ rPage.GetImpl().setUniqueName( xFormComponent, xTargetForm );
Reference< XIndexContainer > xFormAsContainer( xTargetForm, UNO_QUERY_THROW );
xFormAsContainer->insertByIndex( xFormAsContainer->getCount(), makeAny( xFormComponent ) );
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 8c9065fe1a46..de1a7d76b526 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -30,11 +30,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include "formcontrolfactory.hxx"
#include "fmcontrollayout.hxx"
#include "fmprop.hrc"
#include "fmresids.hrc"
+#include "fmservs.hxx"
#include "svx/dialmgr.hxx"
#include "svx/svdouno.hxx"
@@ -519,6 +520,7 @@ namespace svxform
{
sal_Bool bDropDown = !_rControlBoundRect.IsEmpty() && ( _rControlBoundRect.GetWidth() >= 3 * _rControlBoundRect.GetHeight() );
_rxControlModel->setPropertyValue( FM_PROP_DROPDOWN, makeAny( (sal_Bool)bDropDown ) );
+ _rxControlModel->setPropertyValue( FM_PROP_LINECOUNT, makeAny( sal_Int16( 20 ) ) );
}
break;
@@ -738,6 +740,75 @@ namespace svxform
}
}
+ //------------------------------------------------------------------------------
+ ::rtl::OUString FormControlFactory::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject )
+ {
+ sal_uInt16 nResId(0);
+
+ switch ( _nClassId )
+ {
+ case FormComponentType::COMMANDBUTTON: nResId = RID_STR_PROPTITLE_PUSHBUTTON; break;
+ case FormComponentType::RADIOBUTTON: nResId = RID_STR_PROPTITLE_RADIOBUTTON; break;
+ case FormComponentType::CHECKBOX: nResId = RID_STR_PROPTITLE_CHECKBOX; break;
+ case FormComponentType::LISTBOX: nResId = RID_STR_PROPTITLE_LISTBOX; break;
+ case FormComponentType::COMBOBOX: nResId = RID_STR_PROPTITLE_COMBOBOX; break;
+ case FormComponentType::GROUPBOX: nResId = RID_STR_PROPTITLE_GROUPBOX; break;
+ case FormComponentType::IMAGEBUTTON: nResId = RID_STR_PROPTITLE_IMAGEBUTTON; break;
+ case FormComponentType::FIXEDTEXT: nResId = RID_STR_PROPTITLE_FIXEDTEXT; break;
+ case FormComponentType::GRIDCONTROL: nResId = RID_STR_PROPTITLE_DBGRID; break;
+ case FormComponentType::FILECONTROL: nResId = RID_STR_PROPTITLE_FILECONTROL; break;
+ case FormComponentType::DATEFIELD: nResId = RID_STR_PROPTITLE_DATEFIELD; break;
+ case FormComponentType::TIMEFIELD: nResId = RID_STR_PROPTITLE_TIMEFIELD; break;
+ case FormComponentType::NUMERICFIELD: nResId = RID_STR_PROPTITLE_NUMERICFIELD; break;
+ case FormComponentType::CURRENCYFIELD: nResId = RID_STR_PROPTITLE_CURRENCYFIELD; break;
+ case FormComponentType::PATTERNFIELD: nResId = RID_STR_PROPTITLE_PATTERNFIELD; break;
+ case FormComponentType::IMAGECONTROL: nResId = RID_STR_PROPTITLE_IMAGECONTROL; break;
+ case FormComponentType::HIDDENCONTROL: nResId = RID_STR_PROPTITLE_HIDDEN; break;
+ case FormComponentType::SCROLLBAR: nResId = RID_STR_PROPTITLE_SCROLLBAR; break;
+ case FormComponentType::SPINBUTTON: nResId = RID_STR_PROPTITLE_SPINBUTTON; break;
+ case FormComponentType::NAVIGATIONBAR: nResId = RID_STR_PROPTITLE_NAVBAR; break;
+
+ case FormComponentType::TEXTFIELD:
+ nResId = RID_STR_PROPTITLE_EDIT;
+ if ( _rxObject.is() && _rxObject->supportsService( FM_SUN_COMPONENT_FORMATTEDFIELD ) )
+ nResId = RID_STR_PROPTITLE_FORMATTED;
+ break;
+
+ default:
+ nResId = RID_STR_CONTROL; break;
+ }
+
+ return String( SVX_RES( nResId ) );
+ }
+
+ //------------------------------------------------------------------------------
+ ::rtl::OUString FormControlFactory::getDefaultUniqueName_ByComponentType( const Reference< XNameAccess >& _rxContainer,
+ const Reference< XPropertySet >& _rxObject )
+ {
+ sal_Int16 nClassId = FormComponentType::CONTROL;
+ OSL_VERIFY( _rxObject->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId );
+ ::rtl::OUString sBaseName = getDefaultName( nClassId, Reference< XServiceInfo >( _rxObject, UNO_QUERY ) );
+
+ return getUniqueName( _rxContainer, sBaseName );
+ }
+
+ //------------------------------------------------------------------------------
+ ::rtl::OUString FormControlFactory::getUniqueName( const Reference< XNameAccess >& _rxContainer, const ::rtl::OUString& _rBaseName )
+ {
+ sal_Int32 n = 0;
+ ::rtl::OUString sName;
+ do
+ {
+ ::rtl::OUStringBuffer aBuf( _rBaseName );
+ aBuf.appendAscii( " " );
+ aBuf.append( ++n );
+ sName = aBuf.makeStringAndClear();
+ }
+ while ( _rxContainer->hasByName( sName ) );
+
+ return sName;
+ }
+
//........................................................................
} // namespace svxform
//........................................................................
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index 668267e14194..104d2f423eb5 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -1,608 +1,607 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: formcontrolling.cxx,v $
- * $Revision: 1.13 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-
-#include "formcontrolling.hxx"
-#include "fmurl.hxx"
-#include <svx/svxids.hrc>
-#include "fmprop.hrc"
-#include "fmtools.hxx"
-
-/** === begin UNO includes === **/
-#include <com/sun/star/form/runtime/FormOperations.hpp>
-#include <com/sun/star/form/runtime/FormFeature.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
-/** === end UNO includes === **/
-
-#include <tools/diagnose_ex.h>
-#include <comphelper/anytostring.hxx>
-#include <cppuhelper/exc_hlp.hxx>
-#include <osl/diagnose.h>
-
-#include <functional>
-#include <algorithm>
-
-//........................................................................
-namespace svx
-{
-//........................................................................
-
- using namespace ::svxform;
- /** === begin UNO using === **/
- using ::com::sun::star::uno::Reference;
- using ::com::sun::star::lang::XMultiServiceFactory;
- using ::com::sun::star::form::XFormController;
- using ::com::sun::star::form::XForm;
- using ::com::sun::star::form::runtime::FormOperations;
- using ::com::sun::star::uno::Exception;
- using ::com::sun::star::sdbc::XRowSet;
- using ::com::sun::star::form::runtime::FeatureState;
- using ::com::sun::star::uno::Any;
- using ::com::sun::star::uno::Sequence;
- using ::com::sun::star::beans::NamedValue;
- using ::com::sun::star::uno::RuntimeException;
- using ::com::sun::star::beans::XPropertySet;
- using ::com::sun::star::uno::UNO_QUERY_THROW;
- using ::com::sun::star::sdbc::SQLException;
- using ::com::sun::star::sdb::XSQLErrorBroadcaster;
- using ::com::sun::star::sdb::SQLErrorEvent;
- using ::com::sun::star::lang::EventObject;
- /** === end UNO using === **/
- namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
-
- //====================================================================
- //= FeatureSlotTranslation
- //====================================================================
- namespace
- {
- struct FeatureDescription
- {
- ::rtl::OUString sURL; // the URL
- sal_Int32 nSlotId; // the SFX-compatible slot ID
- sal_Int16 nFormFeature; // the css.form.runtime.FormFeature ID
- };
- typedef ::std::vector< FeatureDescription > FeatureDescriptions;
-
- //................................................................
- const FeatureDescriptions& getFeatureDescriptions()
- {
- static FeatureDescriptions s_aFeatureDescriptions;
- if ( s_aFeatureDescriptions.empty() )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( s_aFeatureDescriptions.empty() )
- {
- FeatureDescription aDescriptions[] = {
- { FMURL_FORM_POSITION, SID_FM_RECORD_ABSOLUTE, FormFeature::MoveAbsolute },
- { FMURL_FORM_RECORDCOUNT, SID_FM_RECORD_TOTAL, FormFeature::TotalRecords },
- { FMURL_RECORD_MOVEFIRST, SID_FM_RECORD_FIRST, FormFeature::MoveToFirst },
- { FMURL_RECORD_MOVEPREV, SID_FM_RECORD_PREV, FormFeature::MoveToPrevious },
- { FMURL_RECORD_MOVENEXT, SID_FM_RECORD_NEXT, FormFeature::MoveToNext },
- { FMURL_RECORD_MOVELAST, SID_FM_RECORD_LAST, FormFeature::MoveToLast },
- { FMURL_RECORD_MOVETONEW, SID_FM_RECORD_NEW, FormFeature::MoveToInsertRow },
- { FMURL_RECORD_SAVE, SID_FM_RECORD_SAVE, FormFeature::SaveRecordChanges },
- { FMURL_RECORD_DELETE, SID_FM_RECORD_DELETE, FormFeature::DeleteRecord },
- { FMURL_FORM_REFRESH, SID_FM_REFRESH, FormFeature::ReloadForm },
- { FMURL_FORM_REFRESH_CURRENT_CONTROL,
- SID_FM_REFRESH_FORM_CONTROL,FormFeature::RefreshCurrentControl },
- { FMURL_RECORD_UNDO, SID_FM_RECORD_UNDO, FormFeature::UndoRecordChanges },
- { FMURL_FORM_SORT_UP, SID_FM_SORTUP, FormFeature::SortAscending },
- { FMURL_FORM_SORT_DOWN, SID_FM_SORTDOWN, FormFeature::SortDescending },
- { FMURL_FORM_SORT, SID_FM_ORDERCRIT, FormFeature::InteractiveSort },
- { FMURL_FORM_AUTO_FILTER, SID_FM_AUTOFILTER, FormFeature::AutoFilter },
- { FMURL_FORM_FILTER, SID_FM_FILTERCRIT, FormFeature::InteractiveFilter },
- { FMURL_FORM_APPLY_FILTER, SID_FM_FORM_FILTERED, FormFeature::ToggleApplyFilter },
- { FMURL_FORM_REMOVE_FILTER, SID_FM_REMOVE_FILTER_SORT, FormFeature::RemoveFilterAndSort }
- };
- for ( size_t i=0; i<sizeof(aDescriptions)/sizeof(aDescriptions[0]); ++i )
- s_aFeatureDescriptions.push_back( aDescriptions[i] );
- }
- };
- return s_aFeatureDescriptions;
- }
- }
-
- //--------------------------------------------------------------------
- namespace
- {
- //................................................................
- struct MatchFeatureDescriptionByURL : public ::std::unary_function< FeatureDescription, bool >
- {
- const ::rtl::OUString& m_rURL;
- MatchFeatureDescriptionByURL( const ::rtl::OUString& _rURL ) :m_rURL( _rURL ) { }
-
- bool operator()( const FeatureDescription& _compare )
- {
- return m_rURL == _compare.sURL;
- }
- };
-
- //................................................................
- struct MatchFeatureDescriptionBySlotId : public ::std::unary_function< FeatureDescription, bool >
- {
- sal_Int32 m_nSlotId;
- MatchFeatureDescriptionBySlotId( sal_Int32 _nSlotId ) :m_nSlotId( _nSlotId ) { }
-
- bool operator()( const FeatureDescription& _compare )
- {
- return m_nSlotId == _compare.nSlotId;
- }
- };
-
- //................................................................
- struct MatchFeatureDescriptionByFormFeature : public ::std::unary_function< FeatureDescription, bool >
- {
- sal_Int32 m_nFormFeature;
- MatchFeatureDescriptionByFormFeature( sal_Int32 _nFormFeature ) :m_nFormFeature( _nFormFeature ) { }
-
- bool operator()( const FeatureDescription& _compare )
- {
- return m_nFormFeature == _compare.nFormFeature;
- }
- };
-
- //................................................................
- struct FormFeatureToSlotId : public ::std::unary_function< sal_Int16, sal_Int32 >
- {
- sal_Int32 operator()( sal_Int16 _FormFeature )
- {
- return FeatureSlotTranslation::getSlotIdForFormFeature( _FormFeature );
- }
- };
- }
-
- //--------------------------------------------------------------------
- sal_Int32 FeatureSlotTranslation::getControllerFeatureSlotIdForURL( const ::rtl::OUString& _rMainURL )
- {
- const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
- FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionByURL( _rMainURL ) );
- return ( pos != rDescriptions.end() ) ? pos->nSlotId : -1;
- }
-
- //--------------------------------------------------------------------
- ::rtl::OUString FeatureSlotTranslation::getControllerFeatureURLForSlotId( sal_Int32 _nSlotId )
- {
- const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
- FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionBySlotId( _nSlotId ) );
- OSL_ENSURE( pos != rDescriptions.end(), "FeatureSlotTranslation::getControllerFeatureURLForSlotId: not found!" );
- return ( pos != rDescriptions.end() ) ? pos->sURL : ::rtl::OUString();
- }
-
- //--------------------------------------------------------------------
- sal_Bool FeatureSlotTranslation::isFeatureURL( const ::rtl::OUString& _rMainURL )
- {
- return ( _rMainURL.indexOf( FMURL_FORMSLOTS_PREFIX ) == 0 );
- }
-
- //--------------------------------------------------------------------
- sal_Int16 FeatureSlotTranslation::getFormFeatureForSlotId( sal_Int32 _nSlotId )
- {
- const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
- FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionBySlotId( _nSlotId ) );
- OSL_ENSURE( pos != rDescriptions.end(), "FeatureSlotTranslation::getFormFeatureForSlotId: not found!" );
- return ( pos != rDescriptions.end() ) ? pos->nFormFeature : -1;
- }
-
- //--------------------------------------------------------------------
- sal_Int32 FeatureSlotTranslation::getSlotIdForFormFeature( sal_Int16 _nFormFeature )
- {
- const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
- FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionByFormFeature( _nFormFeature ) );
- OSL_ENSURE( pos != rDescriptions.end(), "FeatureSlotTranslation::getSlotIdForFormFeature: not found!" );
- return ( pos != rDescriptions.end() ) ? pos->nSlotId : -1;
- }
-
- //====================================================================
- //= ControllerFeatures
- //====================================================================
- //--------------------------------------------------------------------
- ControllerFeatures::ControllerFeatures( const Reference< XMultiServiceFactory >& _rxORB, IControllerFeatureInvalidation* _pInvalidationCallback )
- :m_aContext( _rxORB )
- ,m_pInvalidationCallback( _pInvalidationCallback )
- ,m_pImpl( NULL )
- {
- }
-
- //--------------------------------------------------------------------
- ControllerFeatures::ControllerFeatures( const Reference< XMultiServiceFactory >& _rxORB,
- const Reference< XFormController >& _rxController, IControllerFeatureInvalidation* _pInvalidationCallback )
- :m_aContext( _rxORB )
- ,m_pInvalidationCallback( _pInvalidationCallback )
- ,m_pImpl( NULL )
- {
- assign( _rxController );
- }
-
- //--------------------------------------------------------------------
- ControllerFeatures::ControllerFeatures( const Reference< XMultiServiceFactory >& _rxORB,
- const Reference< XForm >& _rxForm, IControllerFeatureInvalidation* _pInvalidationCallback )
- :m_aContext( _rxORB )
- ,m_pInvalidationCallback( _pInvalidationCallback )
- ,m_pImpl( NULL )
- {
- assign( _rxForm );
- }
-
- //--------------------------------------------------------------------
- void ControllerFeatures::assign( const Reference< XFormController >& _rxController )
- {
- dispose();
- m_pImpl = new FormControllerHelper( m_aContext, _rxController, m_pInvalidationCallback );
- m_pImpl->acquire();
- }
-
- //--------------------------------------------------------------------
- void ControllerFeatures::assign( const Reference< XForm >& _rxForm )
- {
- dispose();
- m_pImpl = new FormControllerHelper( m_aContext, _rxForm, m_pInvalidationCallback );
- m_pImpl->acquire();
- }
-
- //--------------------------------------------------------------------
- ControllerFeatures::~ControllerFeatures()
- {
- dispose();
- }
-
- //--------------------------------------------------------------------
- void ControllerFeatures::dispose()
- {
- if ( m_pImpl )
- {
- m_pImpl->dispose();
- m_pImpl->release();
- m_pImpl = NULL;
- }
- }
-
- //====================================================================
- //= FormControllerHelper
- //====================================================================
- //--------------------------------------------------------------------
- FormControllerHelper::FormControllerHelper( const ::comphelper::ComponentContext& _rContext,
- const Reference< XFormController >& _rxController, IControllerFeatureInvalidation* _pInvalidationCallback )
- :m_aContext( _rContext )
- ,m_pInvalidationCallback( _pInvalidationCallback )
- {
- osl_incrementInterlockedCount( &m_refCount );
- try
- {
- m_xFormOperations = FormOperations::createWithFormController( m_aContext.getUNOContext(), _rxController );
- if ( m_xFormOperations.is() )
- m_xFormOperations->setFeatureInvalidation( this );
-
- // to prevent the controller from displaying any error messages which happen while we operate on it,
- // we add ourself as XSQLErrorListener. By contract, a FormController displays errors if and only if
- // no SQLErrorListeners are registered.
- Reference< XSQLErrorBroadcaster > xErrorBroadcast( _rxController, UNO_QUERY_THROW );
- xErrorBroadcast->addSQLErrorListener( this );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- osl_decrementInterlockedCount( &m_refCount );
- }
-
- //--------------------------------------------------------------------
- FormControllerHelper::FormControllerHelper( const ::comphelper::ComponentContext& _rContext,
- const Reference< XForm >& _rxForm, IControllerFeatureInvalidation* _pInvalidationCallback )
- :m_aContext( _rContext )
- ,m_pInvalidationCallback( _pInvalidationCallback )
- {
- osl_incrementInterlockedCount( &m_refCount );
- try
- {
- m_xFormOperations = FormOperations::createWithForm( m_aContext.getUNOContext(), _rxForm );
- if ( m_xFormOperations.is() )
- m_xFormOperations->setFeatureInvalidation( this );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- osl_decrementInterlockedCount( &m_refCount );
- }
-
- //--------------------------------------------------------------------
- FormControllerHelper::~FormControllerHelper( )
- {
- try
- {
- acquire();
- dispose();
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
-
- //--------------------------------------------------------------------
- void FormControllerHelper::dispose()
- {
- if ( m_xFormOperations.is() )
- m_xFormOperations->dispose();
- m_xFormOperations.clear();
- }
-
- //--------------------------------------------------------------------
- sal_Bool FormControllerHelper::isEnabled( sal_Int32 _nSlotId ) const
- {
- if ( !m_xFormOperations.is() )
- return sal_False;
- return m_xFormOperations->isEnabled( FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ) );
- }
-
- //--------------------------------------------------------------------
- Reference< XRowSet > FormControllerHelper::getCursor() const
- {
- Reference< XRowSet > xCursor;
- if ( m_xFormOperations.is() )
- xCursor = m_xFormOperations->getCursor();
- return xCursor;
- }
-
- //--------------------------------------------------------------------
- void FormControllerHelper::getState( sal_Int32 _nSlotId, FeatureState& _rState ) const
- {
- if ( m_xFormOperations.is() )
- _rState = m_xFormOperations->getState( FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ) );
- }
-
- //--------------------------------------------------------------------
- sal_Bool FormControllerHelper::commitCurrentControl( ) const
- {
- return impl_operateForm_nothrow( COMMIT_CONTROL );
- }
-
- //--------------------------------------------------------------------
- sal_Bool FormControllerHelper::commitCurrentRecord() const
- {
- return impl_operateForm_nothrow( COMMIT_RECORD );
- }
-
- //--------------------------------------------------------------------
- bool FormControllerHelper::moveRight( ) const
- {
- return impl_operateForm_nothrow( FormFeature::MoveToNext );
- }
-
- //--------------------------------------------------------------------
- bool FormControllerHelper::moveLeft( ) const
- {
- return impl_operateForm_nothrow( FormFeature::MoveToPrevious );
- }
-
- //--------------------------------------------------------------------
- void FormControllerHelper::execute( sal_Int32 _nSlotId, const ::rtl::OUString& _rParamName, const Any& _rParamValue ) const
- {
- Sequence< NamedValue > aArguments(1);
- aArguments[0].Name = _rParamName;
- aArguments[0].Value = _rParamValue;
-
- impl_operateForm_nothrow( EXECUTE_ARGS, FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ), aArguments );
- }
-
- //--------------------------------------------------------------------
- bool FormControllerHelper::impl_operateForm_nothrow( const FormOperation _eWhat, const sal_Int16 _nFeature,
- const Sequence< NamedValue >& _rArguments ) const
- {
- if ( !m_xFormOperations.is() )
- return false;
-
- Any aError;
- bool bSuccess = false;
- const_cast< FormControllerHelper* >( this )->m_aOperationError.clear();
- try
- {
- switch ( _eWhat )
- {
- case COMMIT_CONTROL:
- bSuccess = m_xFormOperations->commitCurrentControl();
- break;
-
- case COMMIT_RECORD:
- {
- sal_Bool bDummy( sal_False );
- bSuccess = m_xFormOperations->commitCurrentRecord( bDummy );
- }
- break;
-
- case EXECUTE:
- m_xFormOperations->execute( _nFeature );
- bSuccess = true;
- break;
-
- case EXECUTE_ARGS:
- m_xFormOperations->executeWithArguments( _nFeature, _rArguments );
- bSuccess = true;
- break;
- }
- }
- catch ( const SQLException& )
- {
- aError = ::cppu::getCaughtException();
- }
- catch( const Exception& )
- {
- SQLException aFallbackError;
- aFallbackError.Message = ::comphelper::anyToString( ::cppu::getCaughtException() );
- aError <<= aFallbackError;
- }
-
- if ( bSuccess )
- return true;
-
- // display the error. Prefer the one reported in errorOccured over the one caught.
- if ( m_aOperationError.hasValue() )
- displayException( m_aOperationError );
- else if ( aError.hasValue() )
- displayException( aError );
- else
- OSL_ENSURE( false, "FormControllerHelper::impl_operateForm_nothrow: no success, but no error?" );
-
- return false;
- }
-
- //--------------------------------------------------------------------
- void FormControllerHelper::execute( sal_Int32 _nSlotId ) const
- {
- impl_operateForm_nothrow( EXECUTE, FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ),
- Sequence< NamedValue >() );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL FormControllerHelper::invalidateFeatures( const Sequence< ::sal_Int16 >& _Features ) throw (RuntimeException)
- {
- if ( !m_pInvalidationCallback )
- // nobody's interested in ...
- return;
-
- ::std::vector< sal_Int32 > aFeatures( _Features.getLength() );
- ::std::transform(
- _Features.getConstArray(),
- _Features.getConstArray() + _Features.getLength(),
- aFeatures.begin(),
- FormFeatureToSlotId()
- );
-
- m_pInvalidationCallback->invalidateFeatures( aFeatures );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL FormControllerHelper::invalidateAllFeatures() throw (RuntimeException)
- {
- if ( !m_pInvalidationCallback )
- // nobody's interested in ...
- return;
-
- // actually, it's a little bit more than the supported features,
- // but on the medium term, we are to support everything listed
- // here
- ::std::vector< sal_Int32 > aSupportedFeatures;
- sal_Int32 pSupportedFeatures[] =
- {
- SID_FM_RECORD_FIRST,
- SID_FM_RECORD_NEXT,
- SID_FM_RECORD_PREV,
- SID_FM_RECORD_LAST,
- SID_FM_RECORD_NEW,
- SID_FM_RECORD_DELETE,
- SID_FM_RECORD_ABSOLUTE,
- SID_FM_RECORD_TOTAL,
- SID_FM_RECORD_SAVE,
- SID_FM_RECORD_UNDO,
- SID_FM_REMOVE_FILTER_SORT,
- SID_FM_SORTUP,
- SID_FM_SORTDOWN,
- SID_FM_ORDERCRIT,
- SID_FM_AUTOFILTER,
- SID_FM_FILTERCRIT,
- SID_FM_FORM_FILTERED,
- SID_FM_REFRESH,
- SID_FM_REFRESH_FORM_CONTROL,
- SID_FM_SEARCH,
- SID_FM_FILTER_START,
- SID_FM_VIEW_AS_GRID
- };
- sal_Int32 nFeatureCount = sizeof( pSupportedFeatures ) / sizeof( pSupportedFeatures[ 0 ] );
- aSupportedFeatures.resize( nFeatureCount );
- ::std::copy( pSupportedFeatures, pSupportedFeatures + nFeatureCount, aSupportedFeatures.begin() );
-
- m_pInvalidationCallback->invalidateFeatures( aSupportedFeatures );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL FormControllerHelper::errorOccured( const SQLErrorEvent& _Event ) throw (RuntimeException)
- {
- OSL_ENSURE( !m_aOperationError.hasValue(), "FormControllerHelper::errorOccured: two errors during one operation?" );
- m_aOperationError = _Event.Reason;
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL FormControllerHelper::disposing( const EventObject& /*_Source*/ ) throw (RuntimeException)
- {
- // not interested in
- }
-
- //--------------------------------------------------------------------
- sal_Bool FormControllerHelper::isInsertionRow() const
- {
- sal_Bool bIs = sal_False;
- if ( m_xFormOperations.is() )
- bIs = m_xFormOperations->isInsertionRow();
- return bIs;
- }
-
- //--------------------------------------------------------------------
- sal_Bool FormControllerHelper::isModifiedRow() const
- {
- sal_Bool bIs = sal_False;
- if ( m_xFormOperations.is() )
- bIs = m_xFormOperations->isModifiedRow();
- return bIs;
- }
- //--------------------------------------------------------------------
- bool FormControllerHelper::canDoFormFilter() const
- {
- if ( !m_xFormOperations.is() )
- return false;
-
- bool bCanDo = false;
- try
- {
- Reference< XPropertySet > xCursorProperties( m_xFormOperations->getCursor(), UNO_QUERY_THROW );
-
- bool bEscapeProcessing( false );
- OSL_VERIFY( xCursorProperties->getPropertyValue( FM_PROP_ESCAPE_PROCESSING ) >>= bEscapeProcessing );
-
- ::rtl::OUString sActiveCommand;
- OSL_VERIFY( xCursorProperties->getPropertyValue( FM_PROP_ACTIVECOMMAND ) >>= sActiveCommand );
-
- bool bInsertOnlyForm( false );
- OSL_VERIFY( xCursorProperties->getPropertyValue( FM_PROP_INSERTONLY ) >>= bInsertOnlyForm );
-
- bCanDo = bEscapeProcessing && ( sActiveCommand.getLength() > 0 ) && !bInsertOnlyForm;
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return bCanDo;
- }
-
-//........................................................................
-} // namespace svx
-//........................................................................
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: formcontrolling.cxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include "formcontrolling.hxx"
+#include "fmurl.hxx"
+#include <svx/svxids.hrc>
+#include "fmprop.hrc"
+#include "fmtools.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/form/runtime/FormOperations.hpp>
+#include <com/sun/star/form/runtime/FormFeature.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+#include <comphelper/anytostring.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <osl/diagnose.h>
+
+#include <functional>
+#include <algorithm>
+
+//........................................................................
+namespace svx
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::form::XFormController;
+ using ::com::sun::star::form::XForm;
+ using ::com::sun::star::form::runtime::FormOperations;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::sdbc::XRowSet;
+ using ::com::sun::star::form::runtime::FeatureState;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::beans::NamedValue;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::sdbc::SQLException;
+ using ::com::sun::star::sdb::XSQLErrorBroadcaster;
+ using ::com::sun::star::sdb::SQLErrorEvent;
+ using ::com::sun::star::lang::EventObject;
+ /** === end UNO using === **/
+ namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
+
+ //====================================================================
+ //= FeatureSlotTranslation
+ //====================================================================
+ namespace
+ {
+ struct FeatureDescription
+ {
+ ::rtl::OUString sURL; // the URL
+ sal_Int32 nSlotId; // the SFX-compatible slot ID
+ sal_Int16 nFormFeature; // the css.form.runtime.FormFeature ID
+ };
+ typedef ::std::vector< FeatureDescription > FeatureDescriptions;
+
+ //................................................................
+ const FeatureDescriptions& getFeatureDescriptions()
+ {
+ static FeatureDescriptions s_aFeatureDescriptions;
+ if ( s_aFeatureDescriptions.empty() )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( s_aFeatureDescriptions.empty() )
+ {
+ FeatureDescription aDescriptions[] = {
+ { FMURL_FORM_POSITION, SID_FM_RECORD_ABSOLUTE, FormFeature::MoveAbsolute },
+ { FMURL_FORM_RECORDCOUNT, SID_FM_RECORD_TOTAL, FormFeature::TotalRecords },
+ { FMURL_RECORD_MOVEFIRST, SID_FM_RECORD_FIRST, FormFeature::MoveToFirst },
+ { FMURL_RECORD_MOVEPREV, SID_FM_RECORD_PREV, FormFeature::MoveToPrevious },
+ { FMURL_RECORD_MOVENEXT, SID_FM_RECORD_NEXT, FormFeature::MoveToNext },
+ { FMURL_RECORD_MOVELAST, SID_FM_RECORD_LAST, FormFeature::MoveToLast },
+ { FMURL_RECORD_MOVETONEW, SID_FM_RECORD_NEW, FormFeature::MoveToInsertRow },
+ { FMURL_RECORD_SAVE, SID_FM_RECORD_SAVE, FormFeature::SaveRecordChanges },
+ { FMURL_RECORD_DELETE, SID_FM_RECORD_DELETE, FormFeature::DeleteRecord },
+ { FMURL_FORM_REFRESH, SID_FM_REFRESH, FormFeature::ReloadForm },
+ { FMURL_FORM_REFRESH_CURRENT_CONTROL,
+ SID_FM_REFRESH_FORM_CONTROL,FormFeature::RefreshCurrentControl },
+ { FMURL_RECORD_UNDO, SID_FM_RECORD_UNDO, FormFeature::UndoRecordChanges },
+ { FMURL_FORM_SORT_UP, SID_FM_SORTUP, FormFeature::SortAscending },
+ { FMURL_FORM_SORT_DOWN, SID_FM_SORTDOWN, FormFeature::SortDescending },
+ { FMURL_FORM_SORT, SID_FM_ORDERCRIT, FormFeature::InteractiveSort },
+ { FMURL_FORM_AUTO_FILTER, SID_FM_AUTOFILTER, FormFeature::AutoFilter },
+ { FMURL_FORM_FILTER, SID_FM_FILTERCRIT, FormFeature::InteractiveFilter },
+ { FMURL_FORM_APPLY_FILTER, SID_FM_FORM_FILTERED, FormFeature::ToggleApplyFilter },
+ { FMURL_FORM_REMOVE_FILTER, SID_FM_REMOVE_FILTER_SORT, FormFeature::RemoveFilterAndSort }
+ };
+ for ( size_t i=0; i<sizeof(aDescriptions)/sizeof(aDescriptions[0]); ++i )
+ s_aFeatureDescriptions.push_back( aDescriptions[i] );
+ }
+ };
+ return s_aFeatureDescriptions;
+ }
+ }
+
+ //--------------------------------------------------------------------
+ namespace
+ {
+ //................................................................
+ struct MatchFeatureDescriptionByURL : public ::std::unary_function< FeatureDescription, bool >
+ {
+ const ::rtl::OUString& m_rURL;
+ MatchFeatureDescriptionByURL( const ::rtl::OUString& _rURL ) :m_rURL( _rURL ) { }
+
+ bool operator()( const FeatureDescription& _compare )
+ {
+ return m_rURL == _compare.sURL;
+ }
+ };
+
+ //................................................................
+ struct MatchFeatureDescriptionBySlotId : public ::std::unary_function< FeatureDescription, bool >
+ {
+ sal_Int32 m_nSlotId;
+ MatchFeatureDescriptionBySlotId( sal_Int32 _nSlotId ) :m_nSlotId( _nSlotId ) { }
+
+ bool operator()( const FeatureDescription& _compare )
+ {
+ return m_nSlotId == _compare.nSlotId;
+ }
+ };
+
+ //................................................................
+ struct MatchFeatureDescriptionByFormFeature : public ::std::unary_function< FeatureDescription, bool >
+ {
+ sal_Int32 m_nFormFeature;
+ MatchFeatureDescriptionByFormFeature( sal_Int32 _nFormFeature ) :m_nFormFeature( _nFormFeature ) { }
+
+ bool operator()( const FeatureDescription& _compare )
+ {
+ return m_nFormFeature == _compare.nFormFeature;
+ }
+ };
+
+ //................................................................
+ struct FormFeatureToSlotId : public ::std::unary_function< sal_Int16, sal_Int32 >
+ {
+ sal_Int32 operator()( sal_Int16 _FormFeature )
+ {
+ return FeatureSlotTranslation::getSlotIdForFormFeature( _FormFeature );
+ }
+ };
+ }
+
+ //--------------------------------------------------------------------
+ sal_Int32 FeatureSlotTranslation::getControllerFeatureSlotIdForURL( const ::rtl::OUString& _rMainURL )
+ {
+ const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
+ FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionByURL( _rMainURL ) );
+ return ( pos != rDescriptions.end() ) ? pos->nSlotId : -1;
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString FeatureSlotTranslation::getControllerFeatureURLForSlotId( sal_Int32 _nSlotId )
+ {
+ const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
+ FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionBySlotId( _nSlotId ) );
+ OSL_ENSURE( pos != rDescriptions.end(), "FeatureSlotTranslation::getControllerFeatureURLForSlotId: not found!" );
+ return ( pos != rDescriptions.end() ) ? pos->sURL : ::rtl::OUString();
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool FeatureSlotTranslation::isFeatureURL( const ::rtl::OUString& _rMainURL )
+ {
+ return ( _rMainURL.indexOf( FMURL_FORMSLOTS_PREFIX ) == 0 );
+ }
+
+ //--------------------------------------------------------------------
+ sal_Int16 FeatureSlotTranslation::getFormFeatureForSlotId( sal_Int32 _nSlotId )
+ {
+ const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
+ FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionBySlotId( _nSlotId ) );
+ OSL_ENSURE( pos != rDescriptions.end(), "FeatureSlotTranslation::getFormFeatureForSlotId: not found!" );
+ return ( pos != rDescriptions.end() ) ? pos->nFormFeature : -1;
+ }
+
+ //--------------------------------------------------------------------
+ sal_Int32 FeatureSlotTranslation::getSlotIdForFormFeature( sal_Int16 _nFormFeature )
+ {
+ const FeatureDescriptions& rDescriptions( getFeatureDescriptions() );
+ FeatureDescriptions::const_iterator pos = ::std::find_if( rDescriptions.begin(), rDescriptions.end(), MatchFeatureDescriptionByFormFeature( _nFormFeature ) );
+ OSL_ENSURE( pos != rDescriptions.end(), "FeatureSlotTranslation::getSlotIdForFormFeature: not found!" );
+ return ( pos != rDescriptions.end() ) ? pos->nSlotId : -1;
+ }
+
+ //====================================================================
+ //= ControllerFeatures
+ //====================================================================
+ //--------------------------------------------------------------------
+ ControllerFeatures::ControllerFeatures( const Reference< XMultiServiceFactory >& _rxORB, IControllerFeatureInvalidation* _pInvalidationCallback )
+ :m_aContext( _rxORB )
+ ,m_pInvalidationCallback( _pInvalidationCallback )
+ ,m_pImpl( NULL )
+ {
+ }
+
+ //--------------------------------------------------------------------
+ ControllerFeatures::ControllerFeatures( const Reference< XMultiServiceFactory >& _rxORB,
+ const Reference< XFormController >& _rxController, IControllerFeatureInvalidation* _pInvalidationCallback )
+ :m_aContext( _rxORB )
+ ,m_pInvalidationCallback( _pInvalidationCallback )
+ ,m_pImpl( NULL )
+ {
+ assign( _rxController );
+ }
+
+ //--------------------------------------------------------------------
+ ControllerFeatures::ControllerFeatures( const Reference< XMultiServiceFactory >& _rxORB,
+ const Reference< XForm >& _rxForm, IControllerFeatureInvalidation* _pInvalidationCallback )
+ :m_aContext( _rxORB )
+ ,m_pInvalidationCallback( _pInvalidationCallback )
+ ,m_pImpl( NULL )
+ {
+ assign( _rxForm );
+ }
+
+ //--------------------------------------------------------------------
+ void ControllerFeatures::assign( const Reference< XFormController >& _rxController )
+ {
+ dispose();
+ m_pImpl = new FormControllerHelper( m_aContext, _rxController, m_pInvalidationCallback );
+ m_pImpl->acquire();
+ }
+
+ //--------------------------------------------------------------------
+ void ControllerFeatures::assign( const Reference< XForm >& _rxForm )
+ {
+ dispose();
+ m_pImpl = new FormControllerHelper( m_aContext, _rxForm, m_pInvalidationCallback );
+ m_pImpl->acquire();
+ }
+
+ //--------------------------------------------------------------------
+ ControllerFeatures::~ControllerFeatures()
+ {
+ dispose();
+ }
+
+ //--------------------------------------------------------------------
+ void ControllerFeatures::dispose()
+ {
+ if ( m_pImpl )
+ {
+ m_pImpl->dispose();
+ m_pImpl->release();
+ m_pImpl = NULL;
+ }
+ }
+
+ //====================================================================
+ //= FormControllerHelper
+ //====================================================================
+ //--------------------------------------------------------------------
+ FormControllerHelper::FormControllerHelper( const ::comphelper::ComponentContext& _rContext,
+ const Reference< XFormController >& _rxController, IControllerFeatureInvalidation* _pInvalidationCallback )
+ :m_aContext( _rContext )
+ ,m_pInvalidationCallback( _pInvalidationCallback )
+ {
+ osl_incrementInterlockedCount( &m_refCount );
+ try
+ {
+ m_xFormOperations = FormOperations::createWithFormController( m_aContext.getUNOContext(), _rxController );
+ if ( m_xFormOperations.is() )
+ m_xFormOperations->setFeatureInvalidation( this );
+
+ // to prevent the controller from displaying any error messages which happen while we operate on it,
+ // we add ourself as XSQLErrorListener. By contract, a FormController displays errors if and only if
+ // no SQLErrorListeners are registered.
+ Reference< XSQLErrorBroadcaster > xErrorBroadcast( _rxController, UNO_QUERY_THROW );
+ xErrorBroadcast->addSQLErrorListener( this );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+ }
+
+ //--------------------------------------------------------------------
+ FormControllerHelper::FormControllerHelper( const ::comphelper::ComponentContext& _rContext,
+ const Reference< XForm >& _rxForm, IControllerFeatureInvalidation* _pInvalidationCallback )
+ :m_aContext( _rContext )
+ ,m_pInvalidationCallback( _pInvalidationCallback )
+ {
+ osl_incrementInterlockedCount( &m_refCount );
+ try
+ {
+ m_xFormOperations = FormOperations::createWithForm( m_aContext.getUNOContext(), _rxForm );
+ if ( m_xFormOperations.is() )
+ m_xFormOperations->setFeatureInvalidation( this );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+ }
+
+ //--------------------------------------------------------------------
+ FormControllerHelper::~FormControllerHelper( )
+ {
+ try
+ {
+ acquire();
+ dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ void FormControllerHelper::dispose()
+ {
+ if ( m_xFormOperations.is() )
+ m_xFormOperations->dispose();
+ m_xFormOperations.clear();
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool FormControllerHelper::isEnabled( sal_Int32 _nSlotId ) const
+ {
+ if ( !m_xFormOperations.is() )
+ return sal_False;
+ return m_xFormOperations->isEnabled( FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ) );
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XRowSet > FormControllerHelper::getCursor() const
+ {
+ Reference< XRowSet > xCursor;
+ if ( m_xFormOperations.is() )
+ xCursor = m_xFormOperations->getCursor();
+ return xCursor;
+ }
+
+ //--------------------------------------------------------------------
+ void FormControllerHelper::getState( sal_Int32 _nSlotId, FeatureState& _rState ) const
+ {
+ if ( m_xFormOperations.is() )
+ _rState = m_xFormOperations->getState( FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ) );
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool FormControllerHelper::commitCurrentControl( ) const
+ {
+ return impl_operateForm_nothrow( COMMIT_CONTROL );
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool FormControllerHelper::commitCurrentRecord() const
+ {
+ return impl_operateForm_nothrow( COMMIT_RECORD );
+ }
+
+ //--------------------------------------------------------------------
+ bool FormControllerHelper::moveRight( ) const
+ {
+ return impl_operateForm_nothrow( FormFeature::MoveToNext );
+ }
+
+ //--------------------------------------------------------------------
+ bool FormControllerHelper::moveLeft( ) const
+ {
+ return impl_operateForm_nothrow( FormFeature::MoveToPrevious );
+ }
+
+ //--------------------------------------------------------------------
+ void FormControllerHelper::execute( sal_Int32 _nSlotId, const ::rtl::OUString& _rParamName, const Any& _rParamValue ) const
+ {
+ Sequence< NamedValue > aArguments(1);
+ aArguments[0].Name = _rParamName;
+ aArguments[0].Value = _rParamValue;
+
+ impl_operateForm_nothrow( EXECUTE_ARGS, FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ), aArguments );
+ }
+
+ //--------------------------------------------------------------------
+ bool FormControllerHelper::impl_operateForm_nothrow( const FormOperation _eWhat, const sal_Int16 _nFeature,
+ const Sequence< NamedValue >& _rArguments ) const
+ {
+ if ( !m_xFormOperations.is() )
+ return false;
+
+ Any aError;
+ bool bSuccess = false;
+ const_cast< FormControllerHelper* >( this )->m_aOperationError.clear();
+ try
+ {
+ switch ( _eWhat )
+ {
+ case COMMIT_CONTROL:
+ bSuccess = m_xFormOperations->commitCurrentControl();
+ break;
+
+ case COMMIT_RECORD:
+ {
+ sal_Bool bDummy( sal_False );
+ bSuccess = m_xFormOperations->commitCurrentRecord( bDummy );
+ }
+ break;
+
+ case EXECUTE:
+ m_xFormOperations->execute( _nFeature );
+ bSuccess = true;
+ break;
+
+ case EXECUTE_ARGS:
+ m_xFormOperations->executeWithArguments( _nFeature, _rArguments );
+ bSuccess = true;
+ break;
+ }
+ }
+ catch ( const SQLException& )
+ {
+ aError = ::cppu::getCaughtException();
+ }
+ catch( const Exception& )
+ {
+ SQLException aFallbackError;
+ aFallbackError.Message = ::comphelper::anyToString( ::cppu::getCaughtException() );
+ aError <<= aFallbackError;
+ }
+
+ if ( bSuccess )
+ return true;
+
+ // display the error. Prefer the one reported in errorOccured over the one caught.
+ if ( m_aOperationError.hasValue() )
+ displayException( m_aOperationError );
+ else if ( aError.hasValue() )
+ displayException( aError );
+ else
+ OSL_ENSURE( false, "FormControllerHelper::impl_operateForm_nothrow: no success, but no error?" );
+
+ return false;
+ }
+
+ //--------------------------------------------------------------------
+ void FormControllerHelper::execute( sal_Int32 _nSlotId ) const
+ {
+ impl_operateForm_nothrow( EXECUTE, FeatureSlotTranslation::getFormFeatureForSlotId( _nSlotId ),
+ Sequence< NamedValue >() );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL FormControllerHelper::invalidateFeatures( const Sequence< ::sal_Int16 >& _Features ) throw (RuntimeException)
+ {
+ if ( !m_pInvalidationCallback )
+ // nobody's interested in ...
+ return;
+
+ ::std::vector< sal_Int32 > aFeatures( _Features.getLength() );
+ ::std::transform(
+ _Features.getConstArray(),
+ _Features.getConstArray() + _Features.getLength(),
+ aFeatures.begin(),
+ FormFeatureToSlotId()
+ );
+
+ m_pInvalidationCallback->invalidateFeatures( aFeatures );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL FormControllerHelper::invalidateAllFeatures() throw (RuntimeException)
+ {
+ if ( !m_pInvalidationCallback )
+ // nobody's interested in ...
+ return;
+
+ // actually, it's a little bit more than the supported features,
+ // but on the medium term, we are to support everything listed
+ // here
+ ::std::vector< sal_Int32 > aSupportedFeatures;
+ sal_Int32 pSupportedFeatures[] =
+ {
+ SID_FM_RECORD_FIRST,
+ SID_FM_RECORD_NEXT,
+ SID_FM_RECORD_PREV,
+ SID_FM_RECORD_LAST,
+ SID_FM_RECORD_NEW,
+ SID_FM_RECORD_DELETE,
+ SID_FM_RECORD_ABSOLUTE,
+ SID_FM_RECORD_TOTAL,
+ SID_FM_RECORD_SAVE,
+ SID_FM_RECORD_UNDO,
+ SID_FM_REMOVE_FILTER_SORT,
+ SID_FM_SORTUP,
+ SID_FM_SORTDOWN,
+ SID_FM_ORDERCRIT,
+ SID_FM_AUTOFILTER,
+ SID_FM_FILTERCRIT,
+ SID_FM_FORM_FILTERED,
+ SID_FM_REFRESH,
+ SID_FM_REFRESH_FORM_CONTROL,
+ SID_FM_SEARCH,
+ SID_FM_FILTER_START,
+ SID_FM_VIEW_AS_GRID
+ };
+ sal_Int32 nFeatureCount = sizeof( pSupportedFeatures ) / sizeof( pSupportedFeatures[ 0 ] );
+ aSupportedFeatures.resize( nFeatureCount );
+ ::std::copy( pSupportedFeatures, pSupportedFeatures + nFeatureCount, aSupportedFeatures.begin() );
+
+ m_pInvalidationCallback->invalidateFeatures( aSupportedFeatures );
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL FormControllerHelper::errorOccured( const SQLErrorEvent& _Event ) throw (RuntimeException)
+ {
+ OSL_ENSURE( !m_aOperationError.hasValue(), "FormControllerHelper::errorOccured: two errors during one operation?" );
+ m_aOperationError = _Event.Reason;
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL FormControllerHelper::disposing( const EventObject& /*_Source*/ ) throw (RuntimeException)
+ {
+ // not interested in
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool FormControllerHelper::isInsertionRow() const
+ {
+ sal_Bool bIs = sal_False;
+ if ( m_xFormOperations.is() )
+ bIs = m_xFormOperations->isInsertionRow();
+ return bIs;
+ }
+
+ //--------------------------------------------------------------------
+ sal_Bool FormControllerHelper::isModifiedRow() const
+ {
+ sal_Bool bIs = sal_False;
+ if ( m_xFormOperations.is() )
+ bIs = m_xFormOperations->isModifiedRow();
+ return bIs;
+ }
+ //--------------------------------------------------------------------
+ bool FormControllerHelper::canDoFormFilter() const
+ {
+ if ( !m_xFormOperations.is() )
+ return false;
+
+ bool bCanDo = false;
+ try
+ {
+ Reference< XPropertySet > xCursorProperties( m_xFormOperations->getCursor(), UNO_QUERY_THROW );
+
+ bool bEscapeProcessing( false );
+ OSL_VERIFY( xCursorProperties->getPropertyValue( FM_PROP_ESCAPE_PROCESSING ) >>= bEscapeProcessing );
+
+ ::rtl::OUString sActiveCommand;
+ OSL_VERIFY( xCursorProperties->getPropertyValue( FM_PROP_ACTIVECOMMAND ) >>= sActiveCommand );
+
+ bool bInsertOnlyForm( false );
+ OSL_VERIFY( xCursorProperties->getPropertyValue( FM_PROP_INSERTONLY ) >>= bInsertOnlyForm );
+
+ bCanDo = bEscapeProcessing && ( sActiveCommand.getLength() > 0 ) && !bInsertOnlyForm;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return bCanDo;
+ }
+
+//........................................................................
+} // namespace svx
+//........................................................................
diff --git a/svx/source/form/makefile.mk b/svx/source/form/makefile.mk
index 3d405edc00f1..b649be94d106 100644
--- a/svx/source/form/makefile.mk
+++ b/svx/source/form/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=form
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
@@ -53,7 +54,8 @@ SRC1FILES= \
formshell.src \
datanavi.src
-SLOFILES = \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/formtoolbars.obj \
$(SLO)$/fmdocumentclassification.obj \
$(SLO)$/fmcontrolbordermanager.obj \
@@ -61,7 +63,6 @@ SLOFILES = \
$(SLO)$/fmtextcontroldialogs.obj \
$(SLO)$/fmtextcontrolfeature.obj \
$(SLO)$/fmtextcontrolshell.obj \
- $(SLO)$/dbcharsethelper.obj \
$(SLO)$/ParseContext.obj \
$(SLO)$/typeconversionclient.obj \
$(SLO)$/confirmdelete.obj \
@@ -69,9 +70,7 @@ SLOFILES = \
$(SLO)$/sqlparserclient.obj \
$(SLO)$/dataaccessdescriptor.obj \
$(SLO)$/fmpage.obj \
- $(SLO)$/fmPropBrw.obj \
$(SLO)$/fmundo.obj \
- $(SLO)$/fmprop.obj \
$(SLO)$/fmmodel.obj \
$(SLO)$/navigatortree.obj \
$(SLO)$/navigatortreemodel.obj \
@@ -81,21 +80,14 @@ SLOFILES = \
$(SLO)$/fmvwimp.obj \
$(SLO)$/fmdpage.obj \
$(SLO)$/fmitems.obj \
- $(SLO)$/tbxform.obj \
$(SLO)$/fmobj.obj \
$(SLO)$/fmdmod.obj \
- $(SLO)$/fmobjfac.obj \
- $(SLO)$/fmsrccfg.obj \
$(SLO)$/fmservs.obj \
$(SLO)$/typemap.obj \
$(SLO)$/fmexch.obj \
- $(SLO)$/tabwin.obj \
- $(SLO)$/fmurl.obj \
- $(SLO)$/filtnav.obj \
$(SLO)$/fmtools.obj \
$(SLO)$/fmshimp.obj \
$(SLO)$/fmshell.obj \
- $(SLO)$/fmsrcimp.obj \
$(SLO)$/fmview.obj \
$(SLO)$/sdbdatacolumn.obj \
$(SLO)$/formcontrolling.obj \
@@ -105,13 +97,22 @@ SLOFILES = \
$(SLO)$/datalistener.obj \
$(SLO)$/fmscriptingenv.obj \
$(SLO)$/stringlistresource.obj \
- $(SLO)$/databaselocationinput.obj \
$(SLO)$/delayedevent.obj \
$(SLO)$/formcontrolfactory.obj
-.IF "$(OS)$(CPU)"=="SOLARISI"
-NOOPTFILES=$(SLO)$/fmprop.obj
-.ENDIF
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/dbcharsethelper.obj \
+ $(SLO)$/fmPropBrw.obj \
+ $(SLO)$/tbxform.obj \
+ $(SLO)$/fmobjfac.obj \
+ $(SLO)$/fmsrccfg.obj \
+ $(SLO)$/tabwin.obj \
+ $(SLO)$/filtnav.obj \
+ $(SLO)$/fmsrcimp.obj \
+ $(SLO)$/databaselocationinput.obj
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
# --- Targets ----------------------------------
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 6ad696bf062f..f90f0d8c2ce4 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1161,9 +1161,13 @@ namespace svxform
return DND_ACTION_NONE;
// fuer's Undo
- XubString strUndoDescription(SVX_RES(RID_STR_UNDO_CONTAINER_REPLACE));
- // TODO : den ::rtl::OUString aussagekraeftiger machen
- pFormModel->BegUndo(strUndoDescription);
+ const bool bUndo = pFormModel->IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString strUndoDescription(SVX_RES(RID_STR_UNDO_CONTAINER_REPLACE));
+ pFormModel->BegUndo(strUndoDescription);
+ }
// ich nehme vor dem Einfuegen eines Eintrages seine Selection raus, damit die Markierung dabei nicht flackert
// -> das Handeln des Select locken
@@ -1199,9 +1203,15 @@ namespace svxform
sal_Int32 nIndex = getElementPos(Reference< XIndexAccess > (xContainer, UNO_QUERY), xCurrentChild);
GetNavModel()->m_pPropChangeList->Lock();
// die Undo-Action fuer das Rausnehmen
- if (GetNavModel()->m_pPropChangeList->CanUndo())
+ if ( bUndo && GetNavModel()->m_pPropChangeList->CanUndo())
+ {
pFormModel->AddUndo(new FmUndoContainerAction(*pFormModel, FmUndoContainerAction::Removed,
xContainer, xCurrentChild, nIndex));
+ }
+ else if( !GetNavModel()->m_pPropChangeList->CanUndo() )
+ {
+ FmUndoContainerAction::DisposeElement( xCurrentChild );
+ }
// Events mitkopieren
Reference< XEventAttacherManager > xManager(xContainer, UNO_QUERY);
@@ -1226,7 +1236,7 @@ namespace svxform
nIndex = xContainer->getCount();
// UndoAction fuer das Einfuegen
- if (GetNavModel()->m_pPropChangeList->CanUndo())
+ if ( bUndo && GetNavModel()->m_pPropChangeList->CanUndo())
pFormModel->AddUndo(new FmUndoContainerAction(*pFormModel, FmUndoContainerAction::Inserted,
xContainer, xCurrentChild, nIndex));
@@ -1272,7 +1282,9 @@ namespace svxform
}
UnlockSelectionHandling();
- pFormModel->EndUndo();
+
+ if( bUndo )
+ pFormModel->EndUndo();
// During the move, the markings of the underlying view did not change (because the view is not affected by the logical
// hierarchy of the form/control models. But my selection changed - which means I have to adjust it according to the
@@ -1526,7 +1538,7 @@ namespace svxform
SdrPageView* pPageView = pFormView->GetSdrPageView();
FmFormPage* pPage = (FmFormPage*)pPageView->GetPage();
- ::rtl::OUString sName = pPage->GetImpl()->setUniqueName( xNewComponent, xParentForm );
+ ::rtl::OUString sName = pPage->GetImpl().setUniqueName( xNewComponent, xParentForm );
pNewFormControlData->SetText( sName );
@@ -1561,7 +1573,7 @@ namespace svxform
aBaseName = SVX_RES( RID_STR_STDFORMNAME );
else if( pEntryData->ISA(FmControlData) )
- aBaseName = SVX_RES( RID_STR_CONTROL_CLASSNAME );
+ aBaseName = SVX_RES( RID_STR_CONTROL );
//////////////////////////////////////////////////////////////////////
// Neuen Namen erstellen
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 5b041c6d9373..df87fda4007e 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -323,20 +323,27 @@ namespace svxform
else
xContainer = Reference< XIndexContainer > (GetForms(), UNO_QUERY);
- XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
- aUndoStr.SearchAndReplace('#', aStr);
- m_pFormModel->BegUndo(aUndoStr);
+ bool bUndo = m_pFormModel->IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ m_pFormModel->BegUndo(aUndoStr);
+ }
if (nRelPos >= (sal_uInt32)xContainer->getCount())
nRelPos = (sal_uInt32)xContainer->getCount();
// UndoAction
- if (m_pPropChangeList->CanUndo())
+ if ( bUndo && m_pPropChangeList->CanUndo())
+ {
m_pFormModel->AddUndo(new FmUndoContainerAction(*m_pFormModel,
FmUndoContainerAction::Inserted,
xContainer,
xElement,
nRelPos));
+ }
// das Element muss den Typ haben, den der Container erwartet
if (xContainer->getElementType() ==
@@ -358,7 +365,8 @@ namespace svxform
DBG_ERROR("NavigatorTreeModel::Insert : the parent container needs an elementtype I don't know !");
}
- m_pFormModel->EndUndo();
+ if( bUndo )
+ m_pFormModel->EndUndo();
}
//////////////////////////////////////////////////////////////////////
@@ -403,6 +411,8 @@ namespace svxform
if (IsListening(*m_pFormModel))
EndListening(*m_pFormModel);
+ const bool bUndo = m_pFormModel->IsUndoEnabled();
+
m_pPropChangeList->Lock();
FmFormData* pFolder = (FmFormData*) pEntry->GetParent();
Reference< XChild > xElement ( pEntry->GetChildIFace() );
@@ -414,9 +424,12 @@ namespace svxform
else
aStr = SVX_RES(RID_STR_CONTROL);
- XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_REMOVE));
- aUndoStr.SearchAndReplace('#', aStr);
- m_pFormModel->BegUndo(aUndoStr);
+ if( bUndo )
+ {
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_REMOVE));
+ aUndoStr.SearchAndReplace('#', aStr);
+ m_pFormModel->BegUndo(aUndoStr);
+ }
}
// jetzt die eigentliche Entfernung der Daten aus dem Model
@@ -434,14 +447,23 @@ namespace svxform
// UndoAction
if (nContainerIndex >= 0)
{
- if (m_pPropChangeList->CanUndo())
+ if ( bUndo && m_pPropChangeList->CanUndo())
+ {
m_pFormModel->AddUndo(new FmUndoContainerAction(*m_pFormModel,
FmUndoContainerAction::Removed,
xContainer,
xElement, nContainerIndex ));
+ }
+ else if( !m_pPropChangeList->CanUndo() )
+ {
+ FmUndoContainerAction::DisposeElement( xElement );
+ }
+
xContainer->removeByIndex(nContainerIndex );
}
- m_pFormModel->EndUndo();
+
+ if( bUndo )
+ m_pFormModel->EndUndo();
}
// beim Vater austragen
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index e28ff0204366..4ad118418981 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -52,7 +52,7 @@
#endif
#include <svx/fmshell.hxx>
#include "fmshimp.hxx"
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include <svx/fmpage.hxx>
#ifndef _SVX_FMPGEIMP_HXX
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 25992ad607dd..b5cdd332362d 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -134,7 +134,8 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic )
else
aSize.Height() = (sal_Int32)( S_THUMB / fFactor );
- aThumbBmp = rGraphic.GetBitmap( &aSize );
+ const GraphicConversionParameters aParameters(aSize);
+ aThumbBmp = rGraphic.GetBitmap(aParameters);
if( !aThumbBmp.IsEmpty() )
{
diff --git a/svx/source/gengal/makefile.mk b/svx/source/gengal/makefile.mk
index 703f730433c9..ae1f36e5f742 100644
--- a/svx/source/gengal/makefile.mk
+++ b/svx/source/gengal/makefile.mk
@@ -66,7 +66,7 @@ APP1STDLIBS=$(TOOLSLIB) \
$(SALLIB) \
$(VCLLIB) \
$(UCBHELPERLIB) \
- $(SVXLIB)
+ $(SVXCORELIB)
#.IF "$(COM)"=="GCC"
#ADDOPTFILES=$(OBJ)$/gengal.obj
diff --git a/svx/source/inc/AccessibleStringWrap.hxx b/svx/source/inc/AccessibleStringWrap.hxx
index 032c5b5472c7..e85e36b7b8ac 100644
--- a/svx/source/inc/AccessibleStringWrap.hxx
+++ b/svx/source/inc/AccessibleStringWrap.hxx
@@ -34,6 +34,8 @@
#include <sal/types.h>
#include <tools/string.hxx>
+#include <svx/svxdllapi.h>
+
class OutputDevice;
class SvxFont;
class Rectangle;
@@ -49,10 +51,10 @@ class AccessibleStringWrap
{
public:
- AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText );
+ SVX_DLLPUBLIC AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText );
- sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect );
- sal_Int32 GetIndexAtPoint( const Point& rPoint );
+ SVX_DLLPUBLIC sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect );
+ SVX_DLLPUBLIC sal_Int32 GetIndexAtPoint( const Point& rPoint );
private:
diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx
index 906833e81251..0b862e1be691 100644
--- a/svx/source/inc/GraphCtlAccessibleContext.hxx
+++ b/svx/source/inc/GraphCtlAccessibleContext.hxx
@@ -57,7 +57,7 @@
#include <set>
#include <map>
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <svx/rectenum.hxx>
#include <svx/AccessibleShapeTreeInfo.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 81e77be20b8e..deac560db58b 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -307,10 +307,10 @@ namespace svxform
};
//========================================================================
- class DataNavigatorManager : public SfxChildWindow
+ class SVX_DLLPUBLIC DataNavigatorManager : public SfxChildWindow
{
public:
- DataNavigatorManager( Window* pParent, sal_uInt16 nId,
+ SVX_DLLPRIVATE DataNavigatorManager( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW( DataNavigatorManager );
};
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 5f48c24e1085..2bb298836d02 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -43,13 +43,8 @@
#include <vcl/image.hxx>
#include <svtools/svtreebx.hxx>
-#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-
-#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
-#endif
#include <vcl/dockwin.hxx>
#include "fmtools.hxx"
#include "fmexch.hxx"
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index 6d7e6bde0259..285cb90320d2 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -57,6 +57,7 @@ class FmFormShell;
class FmPropBrw : public SfxFloatingWindow, public SfxControllerItem
{
sal_Bool m_bInitialStateChange;
+ bool m_bInStateChange;
::rtl::OUString m_sLastActivePage;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xInspectorContext;
diff --git a/svx/source/inc/fmctrler.hxx b/svx/source/inc/fmctrler.hxx
index 5684a4c0bd55..7a973e129280 100644
--- a/svx/source/inc/fmctrler.hxx
+++ b/svx/source/inc/fmctrler.hxx
@@ -273,7 +273,7 @@ public:
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
- static FmXFormController* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
+ SVX_DLLPUBLIC static FmXFormController* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
// XDispatch
virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& _rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs ) throw (::com::sun::star::uno::RuntimeException);
@@ -462,7 +462,7 @@ public:
--m_nCurrentFilterPosition;
}
- void setCurrentFilterPosition(sal_Int32 nPos);
+ SVX_DLLPUBLIC void setCurrentFilterPosition(sal_Int32 nPos);
sal_Int32 getCurrentFilterPosition() const {return m_nCurrentFilterPosition;}
protected:
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index f85f61fdd126..689d02396d23 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -36,6 +36,8 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <tools/link.hxx>
+#include <svx/svxdllapi.h>
+
class FmFormShell;
class FmFormPage;
class SvLBoxEntry;
@@ -63,7 +65,7 @@ namespace svxform
//====================================================================
//= OLocalExchange
//====================================================================
- class OLocalExchange : public TransferableHelper
+ class SVX_DLLPUBLIC OLocalExchange : public TransferableHelper
{
private:
Link m_aClipboardListener;
@@ -110,7 +112,7 @@ namespace svxform
//= OLocalExchangeHelper
//====================================================================
/// a helper for navigator windows (SvTreeListBox'es) which allow DnD within themself
- class OLocalExchangeHelper
+ class SVX_DLLPUBLIC OLocalExchangeHelper
{
protected:
Window* m_pDragSource;
@@ -130,13 +132,13 @@ namespace svxform
inline sal_Bool isDataExchangeActive( ) const { return isDragSource() || isClipboardOwner(); }
inline void clear() { if ( isDataExchangeActive() ) m_pTransferable->clear(); }
- void setClipboardListener( const Link& _rListener ) { if ( m_pTransferable ) m_pTransferable->setClipboardListener( _rListener ); }
+ SVX_DLLPRIVATE void setClipboardListener( const Link& _rListener ) { if ( m_pTransferable ) m_pTransferable->setClipboardListener( _rListener ); }
protected:
- virtual OLocalExchange* createExchange() const = 0;
+ SVX_DLLPRIVATE virtual OLocalExchange* createExchange() const = 0;
protected:
- void implReset();
+ SVX_DLLPRIVATE void implReset();
};
//====================================================================
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 7b66a9968f13..df60ba931739 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -595,10 +595,10 @@ namespace svxform
};
//========================================================================
- class NavigatorFrameManager : public SfxChildWindow
+ class SVX_DLLPUBLIC NavigatorFrameManager : public SfxChildWindow
{
public:
- NavigatorFrameManager( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
+ SVX_DLLPRIVATE NavigatorFrameManager( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
SfxChildWinInfo *pInfo );
SFX_DECL_CHILDWINDOW( NavigatorFrameManager );
};
diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx
index 236a9d2a67ca..4099f241b72a 100644
--- a/svx/source/inc/fmobj.hxx
+++ b/svx/source/inc/fmobj.hxx
@@ -62,8 +62,8 @@ class FmFormObj: public SdrUnoObj
// only to be used for comparison with the current ref device!
public:
- FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType);
- FmFormObj(sal_Int32 _nType);
+ SVX_DLLPUBLIC FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType);
+ SVX_DLLPUBLIC FmFormObj(sal_Int32 _nType);
TYPEINFO();
@@ -109,6 +109,8 @@ public:
*/
sal_Int32 getType() const;
+ virtual void SetUnoControlModel( const ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& _rxModel );
+
protected:
virtual FASTBOOL EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd );
virtual void BrkCreate( SdrDragStat& rStat );
diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx
index ac2c573565dc..880ecb21d7e5 100644
--- a/svx/source/inc/fmpgeimp.hxx
+++ b/svx/source/inc/fmpgeimp.hxx
@@ -37,10 +37,12 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XMap.hpp>
#include <tools/list.hxx>
#include <tools/link.hxx>
#include <comphelper/uno3.hxx>
+#include <cppuhelper/weakref.hxx>
#include "svx/svxdllapi.h"
#include <map>
@@ -57,8 +59,6 @@ FORWARD_DECLARE_INTERFACE(container,XIndexContainer)
class SdrObjList;
-DECLARE_LIST(FmObjectList, FmFormObj*)
-
//==================================================================
// FmFormPageImpl
// lauscht an allen Containern, um festzustellen, wann Objecte
@@ -68,9 +68,11 @@ DECLARE_LIST(FmObjectList, FmFormObj*)
class SVX_DLLPRIVATE FmFormPageImpl
{
::std::map< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >,SdrObject* > m_aComponentMap;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xCurrentForm;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> m_xForms;
- FmFormPage* pPage;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xCurrentForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xForms;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XMap > m_aControlShapeMap;
+
+ FmFormPage& m_rPage;
Link m_aFormsCreationHdl;
sal_Bool m_bFirstActivation;
@@ -81,8 +83,8 @@ protected:
void Init();
public:
- FmFormPageImpl(FmFormPage* _pPage);
- FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl);
+ FmFormPageImpl( FmFormPage& _rPage );
+ FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl );
~FmFormPageImpl();
// nur wichtig fuer den DesignMode
@@ -131,11 +133,15 @@ protected:
sal_Int32 nCommandType
);
- ::rtl::OUString getDefaultName(
- sal_Int16 _nClassId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _rxControls,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
- ) const;
+public:
+ ::rtl::OUString setUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xFormComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xControls);
+
+ void formObjectInserted( const FmFormObj& _object );
+ void formObjectRemoved( const FmFormObj& _object );
+
+ /** returns an object mapping from control models to drawing shapes.
+ */
+ SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XMap > getControlToShapeMap();
private:
/** validates whether <member>xCurrentForm</member> is still valid and to be used
@@ -153,16 +159,8 @@ private:
*/
bool validateCurForm();
-public:
-
- static UniString getDefaultName(
- sal_Int16 nClassId,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
- );
-
- ::rtl::OUString setUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xFormComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xControls);
- ::rtl::OUString getUniqueName(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& xNamedSet) const;
-
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XMap >
+ impl_createControlShapeMap_nothrow();
private:
FmFormPageImpl(); // never implemented
diff --git a/svx/source/inc/fmprop.hrc b/svx/source/inc/fmprop.hrc
index adfb73ad1dc8..34d88b325731 100644
--- a/svx/source/inc/fmprop.hrc
+++ b/svx/source/inc/fmprop.hrc
@@ -30,9 +30,6 @@
#ifndef _SVX_FMPROP_HRC
#define _SVX_FMPROP_HRC
-#ifndef _FM_STATIC_HXX_
-#include "fmstatic.hxx"
-#endif
// PropertyId's, welche eine Zuordnung zu einen PropertyName haben, das koennten
// auch in Zukunft WhichIds sein -> Itemset
#define FM_ATTR_START 0
@@ -40,150 +37,145 @@
#define FM_ATTR_FILTER ( FM_ATTR_START + 1 )
#define FM_ATTR_FORM_OPERATIONS ( FM_ATTR_START + 2 )
-
-namespace svxform
-{
- DECLARE_CONSTASCII_USTRING(FM_PROP_NAME);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CLASSID);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ALIGN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ROWCOUNT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ROWCOUNTFINAL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FETCHSIZE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_VALUE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_VALUEMIN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_VALUEMAX);
- DECLARE_CONSTASCII_USTRING(FM_PROP_VALUESTEP);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TEXT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_LABEL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_NAVIGATION);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CYCLE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ENABLED);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SPIN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_READONLY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FILTER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_AUTOINCREMENT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_WIDTH);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SEARCHABLE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_MULTILINE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TARGET_URL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULTCONTROL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_MAXTEXTLEN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DATE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TIME);
- DECLARE_CONSTASCII_USTRING(FM_PROP_STATE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TRISTATE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_STRINGITEMLIST);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_TEXT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULTCHECKED);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_DATE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_TIME);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_VALUE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FORMATKEY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FORMATSSUPPLIER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_LISTSOURCETYPE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_LISTSOURCE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SELECT_SEQ);
- DECLARE_CONSTASCII_USTRING(FM_PROP_VALUE_SEQ);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_SELECT_SEQ);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DECIMAL_ACCURACY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_EDITMASK);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ISREADONLY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FIELDTYPE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_REFVALUE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_STRICTFORMAT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DATASOURCE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_LITERALMASK);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SHOWTHOUSANDSEP);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CURRENCYSYMBOL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DATEFORMAT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DATEMIN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DATEMAX);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DATE_SHOW_CENTURY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEFORMAT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEMIN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEMAX);
- DECLARE_CONSTASCII_USTRING(FM_PROP_LINECOUNT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_BOUNDCOLUMN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_HASNAVIGATION);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FONT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_BACKGROUNDCOLOR);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TEXTCOLOR);
- DECLARE_CONSTASCII_USTRING(FM_PROP_BORDER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DROPDOWN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ROWHEIGHT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_HELPTEXT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_HELPURL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_RECORDMARKER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_BOUNDFIELD);
- DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_VALUE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_DEFAULT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MIN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MAX);
- DECLARE_CONSTASCII_USTRING(FM_PROP_HIDDEN);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FILTERPROPOSAL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FIELDSOURCE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TABLENAME);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FILTERSUPPLIER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CURRENTFILTER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SELECTED_FIELDS);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SELECTED_TABLES);
- DECLARE_CONSTASCII_USTRING(FM_PROP_THREADSAFE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLLABEL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CURSORCOLOR);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ALWAYSSHOWCURSOR);
- DECLARE_CONSTASCII_USTRING(FM_PROP_DISPLAYSYNCHRON);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ISMODIFIED);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ISNEW);
- DECLARE_CONSTASCII_USTRING(FM_PROP_PRIVILEGES);
- DECLARE_CONSTASCII_USTRING(FM_PROP_COMMAND);
- DECLARE_CONSTASCII_USTRING(FM_PROP_COMMANDTYPE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_RESULTSET_CONCURRENCY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_INSERTONLY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_RESULTSET_TYPE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ESCAPE_PROCESSING);
- DECLARE_CONSTASCII_USTRING(FM_PROP_APPLYFILTER);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ISNULLABLE);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ACTIVECOMMAND);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ISCURRENCY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_URL);
- DECLARE_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION);
- DECLARE_CONSTASCII_USTRING(FM_PROP_SORT);
- DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCEPROPERTY);
- DECLARE_CONSTASCII_USTRING(FM_PROP_REALNAME);
- DECLARE_CONSTASCII_USTRING(FM_PROP_TEXTLINECOLOR);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FONTEMPHASISMARK);
- DECLARE_CONSTASCII_USTRING(FM_PROP_FONTRELIEF);
- DECLARE_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MIN );
- DECLARE_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MAX );
- DECLARE_CONSTASCII_USTRING( FM_PROP_DEFAULT_SCROLLVALUE );
- DECLARE_CONSTASCII_USTRING( FM_PROP_LINEINCREMENT );
- DECLARE_CONSTASCII_USTRING( FM_PROP_BLOCKINCREMENT );
- DECLARE_CONSTASCII_USTRING( FM_PROP_ORIENTATION );
- DECLARE_CONSTASCII_USTRING( FM_PROP_REPEAT );
- DECLARE_CONSTASCII_USTRING( FM_PROP_REPEATDELAY );
- DECLARE_CONSTASCII_USTRING( FM_PROP_SYMBOLCOLOR );
- DECLARE_CONSTASCII_USTRING( FM_PROP_VISIBILESIZE );
- DECLARE_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MIN );
- DECLARE_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MAX );
- DECLARE_CONSTASCII_USTRING( FM_PROP_DEFAULT_SPINVALUE );
- DECLARE_CONSTASCII_USTRING( FM_PROP_SPININCREMENT );
- DECLARE_CONSTASCII_USTRING( FM_PROP_LINEENDFORMAT );
- DECLARE_CONSTASCII_USTRING( FM_PROP_TOGGLE );
- DECLARE_CONSTASCII_USTRING( FM_PROP_FOCUSONCLICK );
- DECLARE_CONSTASCII_USTRING( FM_PROP_HIDEINACTIVESELECTION );
- DECLARE_CONSTASCII_USTRING( FM_PROP_VISUALEFFECT );
- DECLARE_CONSTASCII_USTRING( FM_PROP_BORDERCOLOR );
- DECLARE_CONSTASCII_USTRING( FM_PROP_DYNAMIC_CONTROL_BORDER );
- DECLARE_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_FOCUS );
- DECLARE_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_MOUSE );
- DECLARE_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_INVALID );
- DECLARE_CONSTASCII_USTRING( FM_PROP_BUTTON_TYPE );
- DECLARE_CONSTASCII_USTRING( FM_PROP_FORM_OPERATIONS );
- DECLARE_CONSTASCII_USTRING( FM_PROP_INPUT_REQUIRED );
- DECLARE_CONSTASCII_USTRING( FM_PROP_WRITING_MODE );
-
-} // namespace svxform
+#define FM_PROP_NAME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) )
+#define FM_PROP_CLASSID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassId" ) )
+#define FM_PROP_ALIGN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Align" ) )
+#define FM_PROP_ROWCOUNT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowCount" ) )
+#define FM_PROP_ROWCOUNTFINAL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" ) )
+#define FM_PROP_FETCHSIZE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FetchSize" ) )
+#define FM_PROP_VALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value" ) )
+#define FM_PROP_VALUEMIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueMin" ) )
+#define FM_PROP_VALUEMAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueMax" ) )
+#define FM_PROP_VALUESTEP rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueStep" ) )
+#define FM_PROP_TEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) )
+#define FM_PROP_LABEL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" ) )
+#define FM_PROP_NAVIGATION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NavigationBarMode" ) )
+#define FM_PROP_CYCLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cycle" ) )
+#define FM_PROP_CONTROLSOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataField" ) )
+#define FM_PROP_ENABLED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) )
+#define FM_PROP_SPIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Spin" ) )
+#define FM_PROP_READONLY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" ) )
+#define FM_PROP_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Filter" ) )
+#define FM_PROP_AUTOINCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAutoIncrement" ) )
+#define FM_PROP_WIDTH rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) )
+#define FM_PROP_SEARCHABLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSearchable" ) )
+#define FM_PROP_MULTILINE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) )
+#define FM_PROP_TARGET_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ) )
+#define FM_PROP_DEFAULTCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultControl" ) )
+#define FM_PROP_MAXTEXTLEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextLen" ) )
+#define FM_PROP_DATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) )
+#define FM_PROP_TIME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Time" ) )
+#define FM_PROP_STATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "State" ) )
+#define FM_PROP_TRISTATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TriState" ) )
+#define FM_PROP_STRINGITEMLIST rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringItemList" ) )
+#define FM_PROP_DEFAULT_TEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultText" ) )
+#define FM_PROP_DEFAULTCHECKED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultState" ) )
+#define FM_PROP_DEFAULT_DATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultDate" ) )
+#define FM_PROP_DEFAULT_TIME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultTime" ) )
+#define FM_PROP_DEFAULT_VALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultValue" ) )
+#define FM_PROP_FORMATKEY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormatKey" ) )
+#define FM_PROP_FORMATSSUPPLIER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormatsSupplier" ) )
+#define FM_PROP_LISTSOURCETYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListSourceType" ) )
+#define FM_PROP_LISTSOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListSource" ) )
+#define FM_PROP_SELECT_SEQ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) )
+#define FM_PROP_VALUE_SEQ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueItemList" ) )
+#define FM_PROP_DEFAULT_SELECT_SEQ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultSelection" ) )
+#define FM_PROP_DECIMAL_ACCURACY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DecimalAccuracy" ) )
+#define FM_PROP_EDITMASK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EditMask" ) )
+#define FM_PROP_ISREADONLY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) )
+#define FM_PROP_FIELDTYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ) )
+#define FM_PROP_REFVALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RefValue" ) )
+#define FM_PROP_STRICTFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictFormat" ) )
+#define FM_PROP_DATASOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataSourceName" ) )
+#define FM_PROP_LITERALMASK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LiteralMask" ) )
+#define FM_PROP_SHOWTHOUSANDSEP rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShowThousandsSeparator" ) )
+#define FM_PROP_CURRENCYSYMBOL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrencySymbol" ) )
+#define FM_PROP_DATEFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateFormat" ) )
+#define FM_PROP_DATEMIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateMin" ) )
+#define FM_PROP_DATEMAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateMax" ) )
+#define FM_PROP_DATE_SHOW_CENTURY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateShowCentury" ) )
+#define FM_PROP_TIMEFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeFormat" ) )
+#define FM_PROP_TIMEMIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeMin" ) )
+#define FM_PROP_TIMEMAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeMax" ) )
+#define FM_PROP_LINECOUNT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineCount" ) )
+#define FM_PROP_BOUNDCOLUMN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BoundColumn" ) )
+#define FM_PROP_HASNAVIGATION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasNavigationBar" ) )
+#define FM_PROP_FONT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) )
+#define FM_PROP_BACKGROUNDCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) )
+#define FM_PROP_TEXTCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) )
+#define FM_PROP_BORDER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Border" ) )
+#define FM_PROP_DROPDOWN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dropdown" ) )
+#define FM_PROP_ROWHEIGHT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeight" ) )
+#define FM_PROP_HELPTEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) )
+#define FM_PROP_HELPURL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) )
+#define FM_PROP_RECORDMARKER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasRecordMarker" ) )
+#define FM_PROP_BOUNDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BoundField" ) )
+#define FM_PROP_EFFECTIVE_VALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveValue" ) )
+#define FM_PROP_EFFECTIVE_DEFAULT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveDefault" ) )
+#define FM_PROP_EFFECTIVE_MIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveMin" ) )
+#define FM_PROP_EFFECTIVE_MAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveMax" ) )
+#define FM_PROP_HIDDEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Hidden" ) )
+#define FM_PROP_FILTERPROPOSAL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseFilterValueProposal" ) )
+#define FM_PROP_FIELDSOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FieldSource" ) )
+#define FM_PROP_TABLENAME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TableName" ) )
+#define FM_PROP_FILTERSUPPLIER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterSupplier" ) )
+#define FM_PROP_CURRENTFILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrentFilter" ) )
+#define FM_PROP_SELECTED_FIELDS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedFields" ) )
+#define FM_PROP_SELECTED_TABLES rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedTables" ) )
+#define FM_PROP_THREADSAFE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThreadSafe" ) )
+#define FM_PROP_CONTROLLABEL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LabelControl" ) )
+#define FM_PROP_CURSORCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CursorColor" ) )
+#define FM_PROP_ALWAYSSHOWCURSOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AlwaysShowCursor" ) )
+#define FM_PROP_DISPLAYSYNCHRON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisplayIsSynchron" ) )
+#define FM_PROP_ISMODIFIED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsModified" ) )
+#define FM_PROP_ISNEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsNew" ) )
+#define FM_PROP_PRIVILEGES rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Privileges" ) )
+#define FM_PROP_COMMAND rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Command" ) )
+#define FM_PROP_COMMANDTYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CommandType" ) )
+#define FM_PROP_RESULTSET_CONCURRENCY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResultSetConcurrency" ) )
+#define FM_PROP_INSERTONLY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IgnoreResult" ) )
+#define FM_PROP_RESULTSET_TYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResultSetType" ) )
+#define FM_PROP_ESCAPE_PROCESSING rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EscapeProcessing" ) )
+#define FM_PROP_APPLYFILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" ) )
+#define FM_PROP_ISNULLABLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsNullable" ) )
+#define FM_PROP_ACTIVECOMMAND rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveCommand" ) )
+#define FM_PROP_ISCURRENCY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsCurrency" ) )
+#define FM_PROP_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) )
+#define FM_PROP_ACTIVE_CONNECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) )
+#define FM_PROP_SORT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Order" ) )
+#define FM_PROP_CONTROLSOURCEPROPERTY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataFieldProperty" ) )
+#define FM_PROP_REALNAME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RealName" ) )
+#define FM_PROP_TEXTLINECOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextLineColor" ) )
+#define FM_PROP_FONTEMPHASISMARK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontEmphasisMark" ) )
+#define FM_PROP_FONTRELIEF rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontRelief" ) )
+#define FM_PROP_SCROLLVALUE_MIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScrollValueMin" ) )
+#define FM_PROP_SCROLLVALUE_MAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScrollValueMax" ) )
+#define FM_PROP_DEFAULT_SCROLLVALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultScrollValue" ) )
+#define FM_PROP_LINEINCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineIncrement" ) )
+#define FM_PROP_BLOCKINCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BlockIncrement" ) )
+#define FM_PROP_ORIENTATION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Orientation" ) )
+#define FM_PROP_REPEAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Repeat" ) )
+#define FM_PROP_REPEATDELAY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepeatDelay" ) )
+#define FM_PROP_SYMBOLCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SymbolColor" ) )
+#define FM_PROP_VISIBILESIZE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleSize" ) )
+#define FM_PROP_SPINVALUE_MIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SpinValueMin" ) )
+#define FM_PROP_SPINVALUE_MAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SpinValueMax" ) )
+#define FM_PROP_DEFAULT_SPINVALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultSpinValue" ) )
+#define FM_PROP_SPININCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SpinIncrement" ) )
+#define FM_PROP_LINEENDFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineEndFormat" ) )
+#define FM_PROP_TOGGLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Toggle" ) )
+#define FM_PROP_FOCUSONCLICK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FocusOnClick" ) )
+#define FM_PROP_HIDEINACTIVESELECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HideInactiveSelection" ) )
+#define FM_PROP_VISUALEFFECT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisualEffect" ) )
+#define FM_PROP_BORDERCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BorderColor" ) )
+#define FM_PROP_DYNAMIC_CONTROL_BORDER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DynamicControlBorder" ) )
+#define FM_PROP_CONTROL_BORDER_COLOR_FOCUS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlBorderColorOnFocus" ) )
+#define FM_PROP_CONTROL_BORDER_COLOR_MOUSE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlBorderColorOnHover" ) )
+#define FM_PROP_CONTROL_BORDER_COLOR_INVALID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlBorderColorOnInvalid" ) )
+#define FM_PROP_BUTTON_TYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ButtonType" ) )
+#define FM_PROP_FORM_OPERATIONS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormOperations" ) )
+#define FM_PROP_INPUT_REQUIRED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputRequired" ) )
+#define FM_PROP_WRITING_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WritingMode" ) )
+#define FM_PROP_MOUSE_WHEEL_BEHAVIOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MouseWheelBehavior" ) )
#endif // _SVX_FMPROP_HRC
-
diff --git a/svx/source/inc/fmresids.hrc b/svx/source/inc/fmresids.hrc
index e9f39396cca6..95a478fc5aee 100644
--- a/svx/source/inc/fmresids.hrc
+++ b/svx/source/inc/fmresids.hrc
@@ -214,29 +214,29 @@
#define RID_STR_SVT_SQL_SYNTAX_COLUMN (RID_FORMS_START + 98)
#define RID_STR_PROPTITLE_SCROLLBAR (RID_FORMS_START + 99)
#define RID_STR_PROPTITLE_SPINBUTTON (RID_FORMS_START + 100)
-#define RID_STR_EDIT_CLASSNAME (RID_FORMS_START + 101)
-#define RID_STR_BUTTON_CLASSNAME (RID_FORMS_START + 102)
-#define RID_STR_FIXEDTEXT_CLASSNAME (RID_FORMS_START + 103)
-#define RID_STR_CHECKBOX_CLASSNAME (RID_FORMS_START + 104)
-#define RID_STR_RADIOBUTTON_CLASSNAME (RID_FORMS_START + 105)
-#define RID_STR_LISTBOX_CLASSNAME (RID_FORMS_START + 106)
-#define RID_STR_COMBOBOX_CLASSNAME (RID_FORMS_START + 107)
-#define RID_STR_FORMATTED_CLASSNAME (RID_FORMS_START + 108)
-#define RID_STR_GROUPBOX_CLASSNAME (RID_FORMS_START + 109)
-#define RID_STR_CONTROL_CLASSNAME (RID_FORMS_START + 110)
-#define RID_STR_IMAGE_CLASSNAME (RID_FORMS_START + 111)
-#define RID_STR_GRID_CLASSNAME (RID_FORMS_START + 112)
-#define RID_STR_FILECONTROL_CLASSNAME (RID_FORMS_START + 113)
-#define RID_STR_DATEFIELD_CLASSNAME (RID_FORMS_START + 114)
-#define RID_STR_TIMEFIELD_CLASSNAME (RID_FORMS_START + 115)
-#define RID_STR_NUMERICFIELD_CLASSNAME (RID_FORMS_START + 116)
-#define RID_STR_CURRENCYFIELD_CLASSNAME (RID_FORMS_START + 117)
-#define RID_STR_PATTERNFIELD_CLASSNAME (RID_FORMS_START + 118)
-#define RID_STR_IMAGECONTROL_CLASSNAME (RID_FORMS_START + 119)
-#define RID_STR_HIDDEN_CLASSNAME (RID_FORMS_START + 120)
-#define RID_STR_CLASSNAME_SCROLLBAR (RID_FORMS_START + 121)
-#define RID_STR_CLASSNAME_SPINBUTTON (RID_FORMS_START + 122)
-#define RID_STR_NAVBAR_CLASSNAME (RID_FORMS_START + 123)
+#define RID_STR_PROPTITLE_HIDDEN (RID_FORMS_START + 101)
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
+ // FREE
#define RID_STR_DATANAVIGATOR (RID_FORMS_START + 124)
#define RID_STR_DATANAV_SUBM_PARENT (RID_FORMS_START + 125)
#define RID_STR_DATANAV_SUBM_ID (RID_FORMS_START + 126)
diff --git a/svx/source/inc/fmservs.hxx b/svx/source/inc/fmservs.hxx
index e538ee994d8f..201a5a351224 100644
--- a/svx/source/inc/fmservs.hxx
+++ b/svx/source/inc/fmservs.hxx
@@ -30,76 +30,64 @@
#ifndef _SVX_FMSERVS_HXX
#define _SVX_FMSERVS_HXX
-#include "fmstatic.hxx"
+#include <svx/svxdllapi.h>
+
+#define FM_NUMBER_FORMATTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.NumberFormatter" ) )
+#define FM_COMPONENT_EDIT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Edit" ) )
+#define FM_COMPONENT_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.TextField" ) )
+#define FM_COMPONENT_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ListBox" ) )
+#define FM_COMPONENT_COMBOBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ComboBox" ) )
+#define FM_COMPONENT_RADIOBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.RadioButton" ) )
+#define FM_COMPONENT_GROUPBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.GroupBox" ) )
+#define FM_COMPONENT_FIXEDTEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.FixedText" ) )
+#define FM_COMPONENT_COMMANDBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.CommandButton" ) )
+#define FM_COMPONENT_CHECKBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.CheckBox" ) )
+#define FM_COMPONENT_GRID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Grid" ) )
+#define FM_COMPONENT_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.GridControl" ) )
+#define FM_COMPONENT_IMAGEBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ImageButton" ) )
+#define FM_COMPONENT_FILECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.FileControl" ) )
+#define FM_COMPONENT_TIMEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.TimeField" ) )
+#define FM_COMPONENT_DATEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.DateField" ) )
+#define FM_COMPONENT_NUMERICFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.NumericField" ) )
+#define FM_COMPONENT_CURRENCYFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.CurrencyField" ) )
+#define FM_COMPONENT_PATTERNFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.PatternField" ) )
+#define FM_COMPONENT_FORMATTEDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.FormattedField" ) )
+#define FM_COMPONENT_HIDDEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Hidden" ) )
+#define FM_COMPONENT_HIDDENCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.HiddenControl" ) )
+#define FM_COMPONENT_IMAGECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ImageControl" ) )
+#define FM_CONTROL_GRID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.control.Grid" ) )
+#define FM_CONTROL_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.control.GridControl" ) )
+#define FM_FORM_CONTROLLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.FormController" ) )
+#define SRV_SDB_CONNECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.Connection" ) )
+#define SRV_SDB_INTERACTION_HANDLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.InteractionHandler" ) )
+#define FM_SUN_COMPONENT_FORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.Form" ) )
+#define FM_SUN_COMPONENT_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.TextField" ) )
+#define FM_SUN_COMPONENT_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ListBox" ) )
+#define FM_SUN_COMPONENT_COMBOBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ComboBox" ) )
+#define FM_SUN_COMPONENT_RADIOBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.RadioButton" ) )
+#define FM_SUN_COMPONENT_GROUPBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.GroupBox" ) )
+#define FM_SUN_COMPONENT_FIXEDTEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FixedText" ) )
+#define FM_SUN_COMPONENT_COMMANDBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CommandButton" ) )
+#define FM_SUN_COMPONENT_CHECKBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CheckBox" ) )
+#define FM_SUN_COMPONENT_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.GridControl" ) )
+#define FM_SUN_COMPONENT_IMAGEBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ImageButton" ) )
+#define FM_SUN_COMPONENT_FILECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FileControl" ) )
+#define FM_SUN_COMPONENT_TIMEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.TimeField" ) )
+#define FM_SUN_COMPONENT_DATEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.DateField" ) )
+#define FM_SUN_COMPONENT_NUMERICFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.NumericField" ) )
+#define FM_SUN_COMPONENT_CURRENCYFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CurrencyField" ) )
+#define FM_SUN_COMPONENT_PATTERNFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.PatternField" ) )
+#define FM_SUN_COMPONENT_HIDDENCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.HiddenControl" ) )
+#define FM_SUN_COMPONENT_IMAGECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.DatabaseImageControl" ) )
+#define FM_SUN_COMPONENT_FORMATTEDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FormattedField" ) )
+#define FM_SUN_COMPONENT_SCROLLBAR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ScrollBar" ) )
+#define FM_SUN_COMPONENT_SPINBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.SpinButton" ) )
+#define FM_SUN_COMPONENT_NAVIGATIONBAR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.NavigationToolBar" ) )
+#define FM_SUN_CONTROL_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.control.GridControl" ) )
namespace svxform
{
-
- DECLARE_CONSTASCII_USTRING(FM_NUMBER_FORMATTER);
-
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_EDIT); // alter service name (5.0)
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_TEXTFIELD);
-
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_LISTBOX);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_COMBOBOX);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_RADIOBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GROUPBOX);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FIXEDTEXT);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_COMMANDBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_CHECKBOX);
-
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GRID); // alter service name (5.0)
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GRIDCONTROL);
-
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_IMAGEBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FILECONTROL);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_TIMEFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_DATEFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_NUMERICFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_CURRENCYFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_PATTERNFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FORMATTEDFIELD);
-
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_HIDDEN); // alter service name (5.0)
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_HIDDENCONTROL);
-
- DECLARE_CONSTASCII_USTRING(FM_COMPONENT_IMAGECONTROL);
-
- DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRID);
- DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL);
-
- DECLARE_CONSTASCII_USTRING(FM_FORM_CONTROLLER);
- DECLARE_CONSTASCII_USTRING(SRV_SDB_CONNECTION);
- DECLARE_CONSTASCII_USTRING(SRV_SDB_INTERACTION_HANDLER);
-
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORM);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_TEXTFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_LISTBOX);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMBOBOX);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_RADIOBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_GROUPBOX);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FIXEDTEXT);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMMANDBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_CHECKBOX);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_GRIDCONTROL);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGEBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FILECONTROL);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_TIMEFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_DATEFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_NUMERICFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_CURRENCYFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_PATTERNFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_HIDDENCONTROL);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGECONTROL);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORMATTEDFIELD);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_SCROLLBAR);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_SPINBUTTON);
- DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_NAVIGATIONBAR);
-
- DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_GRIDCONTROL);
-
- void ImplSmartRegisterUnoServices();
-
+ SVX_DLLPUBLIC void ImplSmartRegisterUnoServices();
} // namespace svxform
#endif // _SVX_FMSERVS_HXX
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 9cc316ae575c..85644ea5daba 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -79,7 +79,7 @@
#include <cppuhelper/compbase4.hxx>
#include <cppuhelper/compbase6.hxx>
#include <unotools/configitem.hxx>
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include "formcontrolling.hxx"
#include "fmdocumentclassification.hxx"
@@ -181,6 +181,7 @@ typedef ::utl::ConfigItem FmXFormShell_CFGBASE;
struct SdrViewEvent;
class FmFormShell;
+class FmFormView;
class SAL_DLLPRIVATE FmXFormShell :public FmXFormShell_BASE
,public FmXFormShell_CFGBASE
,public ::svxform::OStaticDataAccessTools
@@ -421,7 +422,7 @@ public:
/** retrieves the current selection
*/
- void getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const;
+ SVX_DLLPUBLIC void getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const;
/** sets a new current selection as indicated by a mark list
@return
@@ -630,7 +631,7 @@ public:
// ========================================================================
SV_DECL_PTRARR_DEL(StatusForwarderArray, SfxStatusForwarder*, 16, 0)
-class SAL_DLLPRIVATE ControlConversionMenuController : public SfxMenuControl
+class SVX_DLLPUBLIC ControlConversionMenuController : public SfxMenuControl
{
protected:
StatusForwarderArray m_aStatusForwarders;
@@ -638,11 +639,11 @@ protected:
PopupMenu* m_pConversionMenu;
public:
- ControlConversionMenuController(sal_uInt16 nId, Menu& rMenu, SfxBindings& rBindings);
- virtual ~ControlConversionMenuController();
+ SVX_DLLPRIVATE ControlConversionMenuController(sal_uInt16 nId, Menu& rMenu, SfxBindings& rBindings);
+ SVX_DLLPRIVATE virtual ~ControlConversionMenuController();
SFX_DECL_MENU_CONTROL();
- virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState);
+ SVX_DLLPRIVATE virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState);
};
//==================================================================
diff --git a/svx/source/inc/fmstatic.hxx b/svx/source/inc/fmstatic.hxx
deleted file mode 100644
index cd58a79df753..000000000000
--- a/svx/source/inc/fmstatic.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: fmstatic.hxx,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _FM_STATIC_HXX_
-#define _FM_STATIC_HXX_
-#include <tools/string.hxx>
-
-struct ConstAsciiString
-{
- const sal_Char* ascii;
- sal_Int32 length;
-
- inline operator const ::rtl::OUString () const;
- inline operator const sal_Char* () const { return ascii; }
-
- inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength);
- inline ~ConstAsciiString();
-
-private:
- mutable ::rtl::OUString* ustring;
-};
-
-//------------------------------------------------------------
-inline ConstAsciiString::ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength)
- :ascii(_pAsciiZeroTerminated)
- ,length(_nLength)
- ,ustring(NULL)
-{
-}
-
-//------------------------------------------------------------
-inline ConstAsciiString::~ConstAsciiString()
-{
- delete ustring;
- ustring = NULL;
-}
-
-//------------------------------------------------------------
-inline ConstAsciiString::operator const ::rtl::OUString () const
-{
- if (!ustring)
- ustring = new ::rtl::OUString(ascii, length, RTL_TEXTENCODING_ASCII_US);
- return *ustring;
-}
-
-#define DECLARE_CONSTASCII_USTRING(name) \
- extern ConstAsciiString name
-
-#define IMPLEMENT_CONSTASCII_USTRING(name, asciivalue) \
- ConstAsciiString name(asciivalue, sizeof(asciivalue) - 1)
-
-
-#endif // _FM_STATIC_HXX_
-
diff --git a/svx/source/inc/fmtools.hxx b/svx/source/inc/fmtools.hxx
index 44495a1002e9..935e84c6448e 100644
--- a/svx/source/inc/fmtools.hxx
+++ b/svx/source/inc/fmtools.hxx
@@ -96,7 +96,8 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/component.hxx>
-#include "fmstatic.hxx"
+
+#include <svx/svxdllapi.h>
#include <set>
@@ -109,19 +110,12 @@ class Window;
// display info about a simple ::com::sun::star::sdbc::SQLException
void displayException(const ::com::sun::star::sdbc::SQLException&, Window* _pParent = NULL);
void displayException(const ::com::sun::star::sdbc::SQLWarning&, Window* _pParent = NULL);
-void displayException(const ::com::sun::star::sdb::SQLContext&, Window* _pParent = NULL);
+SVX_DLLPUBLIC void displayException(const ::com::sun::star::sdb::SQLContext&, Window* _pParent = NULL);
void displayException(const ::com::sun::star::sdb::SQLErrorEvent&, Window* _pParent = NULL);
void displayException(const ::com::sun::star::uno::Any&, Window* _pParent = NULL);
-// StringConversion
-namespace svxform
-{
- // modes for the XModeSelector
- DECLARE_CONSTASCII_USTRING(DATA_MODE);
- DECLARE_CONSTASCII_USTRING(FILTER_MODE);
-
-} // namespace svxform
-
+#define DATA_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) )
+#define FILTER_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) )
// Kopieren von Persistenten Objecten
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> cloneUsingProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj);
@@ -139,7 +133,7 @@ String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> getXModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xIface);
-::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel);
+SVX_DLLPUBLIC ::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel);
// ===================================================================================================
// = class CursorWrapper - eine Hilfsklasse, die parallel mit je einem ::com::sun::star::uno::Reference<XDatabaseUpdateCursor>,
@@ -159,7 +153,7 @@ public:
// Construction/Destruction
CursorWrapper() { }
CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxCursor, sal_Bool bUseCloned = sal_False);
- CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned = sal_False);
+ SVX_DLLPUBLIC CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned = sal_False);
// bei bUseCloned == sal_True wird der Cursor ueber das XCloneable-Interface (dass er besitzen muss) gedoubled und
// erst dann benutzt
diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx
index 8583bc35a759..596eaac0014e 100644
--- a/svx/source/inc/fmundo.hxx
+++ b/svx/source/inc/fmundo.hxx
@@ -119,6 +119,8 @@ public:
virtual void Undo();
virtual void Redo();
+ static void DisposeElement( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xElem );
+
protected:
void implReInsert( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
void implReRemove( ) SAL_THROW( ( ::com::sun::star::uno::Exception ) );
@@ -140,6 +142,8 @@ public:
virtual void Redo() { Undo(); }
virtual String GetComment() const;
+
+ static void DisposeElement( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xReplaced );
};
//========================================================================
diff --git a/svx/source/inc/fmurl.hxx b/svx/source/inc/fmurl.hxx
index 3f90948620da..21030d294a10 100644
--- a/svx/source/inc/fmurl.hxx
+++ b/svx/source/inc/fmurl.hxx
@@ -31,46 +31,33 @@
#ifndef _SVX_FMURL_HXX
#define _SVX_FMURL_HXX
-#include "fmstatic.hxx"
-
-namespace svxform
-{
-
- DECLARE_CONSTASCII_USTRING(FMURL_FORMSLOTS_PREFIX);
-
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_POSITION);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_RECORDCOUNT);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVEFIRST);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVEPREV);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVENEXT);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVELAST);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVETONEW);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_UNDO);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_SAVE);
- DECLARE_CONSTASCII_USTRING(FMURL_RECORD_DELETE);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_REFRESH);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_REFRESH_CURRENT_CONTROL);
-
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_SORT_UP);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_SORT_DOWN);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_SORT);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_AUTO_FILTER);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_FILTER);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_APPLY_FILTER);
- DECLARE_CONSTASCII_USTRING(FMURL_FORM_REMOVE_FILTER);
-
- DECLARE_CONSTASCII_USTRING(FMURL_CONFIRM_DELETION);
-
- DECLARE_CONSTASCII_USTRING(FMURL_COMPONENT_FORMGRIDVIEW);
- DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_CLEARVIEW);
- DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_ADDCOLUMN);
- DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_ATTACHTOFORM);
-
- DECLARE_CONSTASCII_USTRING(FMARG_ATTACHTO_MASTERFORM);
- DECLARE_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNTYPE);
- DECLARE_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNPOS);
-
-} // namespace svxform
+#define FMURL_FORMSLOTS_PREFIX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/" ) )
+#define FMURL_FORM_POSITION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/positionForm" ) )
+#define FMURL_FORM_RECORDCOUNT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/RecordCount" ) )
+#define FMURL_RECORD_MOVEFIRST rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToFirst" ) )
+#define FMURL_RECORD_MOVEPREV rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToPrev" ) )
+#define FMURL_RECORD_MOVENEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToNext" ) )
+#define FMURL_RECORD_MOVELAST rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToLast" ) )
+#define FMURL_RECORD_MOVETONEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToNew" ) )
+#define FMURL_RECORD_UNDO rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/undoRecord" ) )
+#define FMURL_RECORD_SAVE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/saveRecord" ) )
+#define FMURL_RECORD_DELETE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/deleteRecord" ) )
+#define FMURL_FORM_REFRESH rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/refreshForm" ) )
+#define FMURL_FORM_REFRESH_CURRENT_CONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/refreshCurrentControl" ) )
+#define FMURL_FORM_SORT_UP rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/sortUp" ) )
+#define FMURL_FORM_SORT_DOWN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/sortDown" ) )
+#define FMURL_FORM_SORT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/sort" ) )
+#define FMURL_FORM_AUTO_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/autoFilter" ) )
+#define FMURL_FORM_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/filter" ) )
+#define FMURL_FORM_APPLY_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/applyFilter" ) )
+#define FMURL_FORM_REMOVE_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/removeFilterOrder" ) )
+#define FMURL_CONFIRM_DELETION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/ConfirmDeletion" ) )
+#define FMURL_COMPONENT_FORMGRIDVIEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".component:DB/FormGridView" ) )
+#define FMURL_GRIDVIEW_CLEARVIEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/ClearView" ) )
+#define FMURL_GRIDVIEW_ADDCOLUMN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/AddGridColumn" ) )
+#define FMURL_GRIDVIEW_ATTACHTOFORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/AttachToForm" ) )
+#define FMARG_ATTACHTO_MASTERFORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MasterForm" ) )
+#define FMARG_ADDCOL_COLUMNTYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnType" ) )
+#define FMARG_ADDCOL_COLUMNPOS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnPosition" ) )
#endif // _SVX_FMURL_HXX
-
diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx
index 2868308d6f7c..432ad25bdea0 100644
--- a/svx/source/inc/formcontrolfactory.hxx
+++ b/svx/source/inc/formcontrolfactory.hxx
@@ -37,6 +37,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
/** === end UNO includes === **/
#include <memory>
@@ -94,6 +96,21 @@ namespace svxform
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats
);
+ static ::rtl::OUString getDefaultName(
+ const sal_Int16 nClassId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
+ );
+
+ static ::rtl::OUString getDefaultUniqueName_ByComponentType(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject
+ );
+
+ static ::rtl::OUString getUniqueName(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
+ const ::rtl::OUString& _rBaseName
+ );
+
private:
::std::auto_ptr< FormControlFactory_Data > m_pData;
};
diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx
index 50f27f45ff73..d082bd889804 100644
--- a/svx/source/inc/formcontrolling.hxx
+++ b/svx/source/inc/formcontrolling.hxx
@@ -1,311 +1,311 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: formcontrolling.hxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SVX_FORMCONTROLLING_HXX
-#define SVX_FORMCONTROLLING_HXX
-
-#include <com/sun/star/form/XFormController.hpp>
-#include <com/sun/star/form/XForm.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/form/runtime/FeatureState.hpp>
-#include <com/sun/star/form/runtime/XFormOperations.hpp>
-#include <com/sun/star/sdb/XSQLErrorListener.hpp>
-
-#include <cppuhelper/implbase2.hxx>
-#include <comphelper/componentcontext.hxx>
-
-#include <vector>
-
-//........................................................................
-namespace svx
-{
-//........................................................................
-
- //====================================================================
- //= FeatureSlotTranslation
- //====================================================================
- class FeatureSlotTranslation
- {
- public:
- /// retrieves the feature id for a given feature URL
- static sal_Int32 getControllerFeatureSlotIdForURL( const ::rtl::OUString& _rMainURL );
-
- /// retrieves the feature URL for a given feature id
- static ::rtl::OUString getControllerFeatureURLForSlotId( sal_Int32 _nSlotId );
-
- /// determines whether the given URL is a controller feature URL
- static sal_Bool isFeatureURL( const ::rtl::OUString& _rMainURL );
-
- /// retrieves the css.form.runtime.FormFeature ID for a given slot ID
- static sal_Int16 getFormFeatureForSlotId( sal_Int32 _nSlotId );
-
- /// retrieves the slot id for a given css.form.runtime.FormFeature ID
- static sal_Int32 getSlotIdForFormFeature( sal_Int16 _nFormFeature );
- };
-
- //====================================================================
- //= IControllerFeatureInvalidation
- //====================================================================
- class IControllerFeatureInvalidation
- {
- public:
- /** invalidates the given features
-
- Invalidation means that any user interface representation (such as toolbox buttons), or
- any dispatches associated with the features in question are potentially out-of-date, and
- need to be updated
-
- @param _rFeatures
- Ids of the features to be invalidated.
- */
- virtual void invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures ) = 0;
- };
-
- //====================================================================
- //= ControllerFeatures
- //====================================================================
- class FormControllerHelper;
- /** easier access to an FormControllerHelper instance
- */
- class ControllerFeatures
- {
- protected:
- ::comphelper::ComponentContext m_aContext;
- IControllerFeatureInvalidation* m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed
- FormControllerHelper* m_pImpl;
-
- public:
- /** standard ctor
-
- The instance is not functional until <method>assign</method> is used.
-
- @param _rxORB
- a multi service factory for creating various needed components
-
- @param _pInvalidationCallback
- the callback for invalidating feature states
- */
- ControllerFeatures(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
- IControllerFeatureInvalidation* _pInvalidationCallback
- );
-
- /** constructs the instance from a <type scope="com::sun::star::form">XFormController<type> instance
-
- @param _rxORB
- a multi service factory for creating various needed components
-
- @param _rxController
- The form controller which the helper should be responsible for. Must not
- be <NULL/>, and must have a valid model (form).
-
- @param _pInvalidationCallback
- the callback for invalidating feature states
- */
- ControllerFeatures(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController,
- IControllerFeatureInvalidation* _pInvalidationCallback
- );
-
- /** constructs the helper form a <type scope="com::sun::star::form">XForm<type> instance
-
- Any functionality which depends on a controller will not be available.
-
- @param _rxORB
- a multi service factory for creating various needed components
-
- @param _rxForm
- The form which the helper should be responsible for. Must not be <NULL/>.
-
- @param _pInvalidationCallback
- the callback for invalidating feature states
- */
- ControllerFeatures(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
- IControllerFeatureInvalidation* _pInvalidationCallback
- );
-
- /// dtor
- ~ControllerFeatures();
-
- /// checks whether the instance is properly assigned to a form and/or controller
- inline bool isAssigned( ) const { return m_pImpl != NULL; }
-
- /** assign to a controller
- */
- void assign(
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController
- );
-
- /** assign to a controller
- */
- void assign(
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm
- );
-
- /// clears the instance so that it cannot be used afterwards
- void dispose();
-
- // access to the instance which implements the functionality. Not to be used when not assigned
- inline const FormControllerHelper* operator->() const { return m_pImpl; }
- inline FormControllerHelper* operator->() { return m_pImpl; }
- inline const FormControllerHelper& operator*() const { return *m_pImpl; }
- inline FormControllerHelper& operator*() { return *m_pImpl; }
- };
-
- //====================================================================
- //= FormControllerHelper
- //====================================================================
- typedef ::cppu::WeakImplHelper2 < ::com::sun::star::form::runtime::XFeatureInvalidation
- , ::com::sun::star::sdb::XSQLErrorListener
- > FormControllerHelper_Base;
- /** is a helper class which manages form controller functionality (such as moveNext etc.).
-
- <p>The class helps implementing form controller functionality, by providing
- methods to determine the state of, and execute, various common form features.<br/>
- A <em>feature</em> is for instance moving the form associated with the controller
- to a certain position, or reloading the form, and so on.</p>
- */
- class FormControllerHelper : public FormControllerHelper_Base
- {
- protected:
- ::comphelper::ComponentContext m_aContext;
- IControllerFeatureInvalidation* m_pInvalidationCallback;
- ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >
- m_xFormOperations;
-
- ::com::sun::star::uno::Any m_aOperationError;
-
- public:
- /** constructs the helper from a <type scope="com::sun::star::form">XFormController<type> instance
-
- @param _rContext
- the context the component lives in
- @param _rxController
- The form controller which the helper should be responsible for. Must not
- be <NULL/>, and must have a valid model (form).
- @param _pInvalidationCallback
- the callback for invalidating feature states
- */
- FormControllerHelper(
- const ::comphelper::ComponentContext& _rContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController,
- IControllerFeatureInvalidation* _pInvalidationCallback
- );
-
- /** constructs the helper form a <type scope="com::sun::star::form">XForm<type> instance
-
- Any functionality which depends on a controller will not be available.
-
- @param _rContext
- the context the component lives in
- @param _rxForm
- The form which the helper should be responsible for. Must not be <NULL/>.
- @param _pInvalidationCallback
- the callback for invalidating feature states
- */
- FormControllerHelper(
- const ::comphelper::ComponentContext& _rContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
- IControllerFeatureInvalidation* _pInvalidationCallback
- );
-
- // forwards to the XFormOperations implementation
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >
- getCursor() const;
- void getState(
- sal_Int32 _nSlotId,
- ::com::sun::star::form::runtime::FeatureState& _out_rState
- ) const;
- sal_Bool isEnabled( sal_Int32 _nSlotId ) const;
- void execute( sal_Int32 _nSlotId ) const;
- void execute( sal_Int32 _nSlotId, const ::rtl::OUString& _rParamName, const ::com::sun::star::uno::Any& _rParamValue ) const;
- sal_Bool commitCurrentRecord() const;
- sal_Bool commitCurrentControl( ) const;
- sal_Bool isInsertionRow() const;
- sal_Bool isModifiedRow() const;
-
- bool moveLeft( ) const;
- bool moveRight( ) const;
-
- bool canDoFormFilter() const;
-
- /** disposes this instance.
-
- After this method has been called, the instance is not functional anymore
- */
- void dispose();
-
- const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >&
- getFormOperations() const { return m_xFormOperations; }
- protected:
- /// dtor
- ~FormControllerHelper();
-
- // XFeatureInvalidation
- virtual void SAL_CALL invalidateFeatures( const ::com::sun::star::uno::Sequence< ::sal_Int16 >& Features ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL invalidateAllFeatures() throw (::com::sun::star::uno::RuntimeException);
-
- // XSQLErrorListener
- virtual void SAL_CALL errorOccured( const ::com::sun::star::sdb::SQLErrorEvent& _Event ) throw (::com::sun::star::uno::RuntimeException);
-
- // XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
-
- private:
- enum FormOperation { EXECUTE, EXECUTE_ARGS, COMMIT_CONTROL, COMMIT_RECORD };
-
- bool impl_operateForm_nothrow(
- const FormOperation _eWhat,
- const sal_Int16 _nFeature, /* ignore for COMMIT_* */
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rArguments /* ignore except for EXECUTE_ARGS */
- ) const;
- bool impl_operateForm_nothrow( const FormOperation _eWhat ) const
- {
- return impl_operateForm_nothrow( _eWhat, 0, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
- }
- bool impl_operateForm_nothrow( const sal_Int16 _nFeature ) const
- {
- return impl_operateForm_nothrow( EXECUTE, _nFeature, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
- }
-
- private:
- FormControllerHelper(); // never implemented
- FormControllerHelper( const FormControllerHelper& ); // never implemented
- FormControllerHelper& operator=( const FormControllerHelper& ); // never implemented
- };
-
-//........................................................................
-} // namespace svx
-//........................................................................
-
-#endif // SVX_FORMCONTROLLING_HXX
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: formcontrolling.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_FORMCONTROLLING_HXX
+#define SVX_FORMCONTROLLING_HXX
+
+#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/form/runtime/FeatureState.hpp>
+#include <com/sun/star/form/runtime/XFormOperations.hpp>
+#include <com/sun/star/sdb/XSQLErrorListener.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+#include <comphelper/componentcontext.hxx>
+
+#include <vector>
+
+//........................................................................
+namespace svx
+{
+//........................................................................
+
+ //====================================================================
+ //= FeatureSlotTranslation
+ //====================================================================
+ class FeatureSlotTranslation
+ {
+ public:
+ /// retrieves the feature id for a given feature URL
+ static sal_Int32 getControllerFeatureSlotIdForURL( const ::rtl::OUString& _rMainURL );
+
+ /// retrieves the feature URL for a given feature id
+ static ::rtl::OUString getControllerFeatureURLForSlotId( sal_Int32 _nSlotId );
+
+ /// determines whether the given URL is a controller feature URL
+ static sal_Bool isFeatureURL( const ::rtl::OUString& _rMainURL );
+
+ /// retrieves the css.form.runtime.FormFeature ID for a given slot ID
+ static sal_Int16 getFormFeatureForSlotId( sal_Int32 _nSlotId );
+
+ /// retrieves the slot id for a given css.form.runtime.FormFeature ID
+ static sal_Int32 getSlotIdForFormFeature( sal_Int16 _nFormFeature );
+ };
+
+ //====================================================================
+ //= IControllerFeatureInvalidation
+ //====================================================================
+ class IControllerFeatureInvalidation
+ {
+ public:
+ /** invalidates the given features
+
+ Invalidation means that any user interface representation (such as toolbox buttons), or
+ any dispatches associated with the features in question are potentially out-of-date, and
+ need to be updated
+
+ @param _rFeatures
+ Ids of the features to be invalidated.
+ */
+ virtual void invalidateFeatures( const ::std::vector< sal_Int32 >& _rFeatures ) = 0;
+ };
+
+ //====================================================================
+ //= ControllerFeatures
+ //====================================================================
+ class FormControllerHelper;
+ /** easier access to an FormControllerHelper instance
+ */
+ class ControllerFeatures
+ {
+ protected:
+ ::comphelper::ComponentContext m_aContext;
+ IControllerFeatureInvalidation* m_pInvalidationCallback; // necessary as long as m_pImpl is not yet constructed
+ FormControllerHelper* m_pImpl;
+
+ public:
+ /** standard ctor
+
+ The instance is not functional until <method>assign</method> is used.
+
+ @param _rxORB
+ a multi service factory for creating various needed components
+
+ @param _pInvalidationCallback
+ the callback for invalidating feature states
+ */
+ ControllerFeatures(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ IControllerFeatureInvalidation* _pInvalidationCallback
+ );
+
+ /** constructs the instance from a <type scope="com::sun::star::form">XFormController<type> instance
+
+ @param _rxORB
+ a multi service factory for creating various needed components
+
+ @param _rxController
+ The form controller which the helper should be responsible for. Must not
+ be <NULL/>, and must have a valid model (form).
+
+ @param _pInvalidationCallback
+ the callback for invalidating feature states
+ */
+ ControllerFeatures(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController,
+ IControllerFeatureInvalidation* _pInvalidationCallback
+ );
+
+ /** constructs the helper form a <type scope="com::sun::star::form">XForm<type> instance
+
+ Any functionality which depends on a controller will not be available.
+
+ @param _rxORB
+ a multi service factory for creating various needed components
+
+ @param _rxForm
+ The form which the helper should be responsible for. Must not be <NULL/>.
+
+ @param _pInvalidationCallback
+ the callback for invalidating feature states
+ */
+ ControllerFeatures(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
+ IControllerFeatureInvalidation* _pInvalidationCallback
+ );
+
+ /// dtor
+ ~ControllerFeatures();
+
+ /// checks whether the instance is properly assigned to a form and/or controller
+ inline bool isAssigned( ) const { return m_pImpl != NULL; }
+
+ /** assign to a controller
+ */
+ void assign(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController
+ );
+
+ /** assign to a controller
+ */
+ void assign(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm
+ );
+
+ /// clears the instance so that it cannot be used afterwards
+ void dispose();
+
+ // access to the instance which implements the functionality. Not to be used when not assigned
+ inline const FormControllerHelper* operator->() const { return m_pImpl; }
+ inline FormControllerHelper* operator->() { return m_pImpl; }
+ inline const FormControllerHelper& operator*() const { return *m_pImpl; }
+ inline FormControllerHelper& operator*() { return *m_pImpl; }
+ };
+
+ //====================================================================
+ //= FormControllerHelper
+ //====================================================================
+ typedef ::cppu::WeakImplHelper2 < ::com::sun::star::form::runtime::XFeatureInvalidation
+ , ::com::sun::star::sdb::XSQLErrorListener
+ > FormControllerHelper_Base;
+ /** is a helper class which manages form controller functionality (such as moveNext etc.).
+
+ <p>The class helps implementing form controller functionality, by providing
+ methods to determine the state of, and execute, various common form features.<br/>
+ A <em>feature</em> is for instance moving the form associated with the controller
+ to a certain position, or reloading the form, and so on.</p>
+ */
+ class FormControllerHelper : public FormControllerHelper_Base
+ {
+ protected:
+ ::comphelper::ComponentContext m_aContext;
+ IControllerFeatureInvalidation* m_pInvalidationCallback;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >
+ m_xFormOperations;
+
+ ::com::sun::star::uno::Any m_aOperationError;
+
+ public:
+ /** constructs the helper from a <type scope="com::sun::star::form">XFormController<type> instance
+
+ @param _rContext
+ the context the component lives in
+ @param _rxController
+ The form controller which the helper should be responsible for. Must not
+ be <NULL/>, and must have a valid model (form).
+ @param _pInvalidationCallback
+ the callback for invalidating feature states
+ */
+ FormControllerHelper(
+ const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >& _rxController,
+ IControllerFeatureInvalidation* _pInvalidationCallback
+ );
+
+ /** constructs the helper form a <type scope="com::sun::star::form">XForm<type> instance
+
+ Any functionality which depends on a controller will not be available.
+
+ @param _rContext
+ the context the component lives in
+ @param _rxForm
+ The form which the helper should be responsible for. Must not be <NULL/>.
+ @param _pInvalidationCallback
+ the callback for invalidating feature states
+ */
+ FormControllerHelper(
+ const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm,
+ IControllerFeatureInvalidation* _pInvalidationCallback
+ );
+
+ // forwards to the XFormOperations implementation
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >
+ getCursor() const;
+ void getState(
+ sal_Int32 _nSlotId,
+ ::com::sun::star::form::runtime::FeatureState& _out_rState
+ ) const;
+ sal_Bool isEnabled( sal_Int32 _nSlotId ) const;
+ void execute( sal_Int32 _nSlotId ) const;
+ void execute( sal_Int32 _nSlotId, const ::rtl::OUString& _rParamName, const ::com::sun::star::uno::Any& _rParamValue ) const;
+ sal_Bool commitCurrentRecord() const;
+ sal_Bool commitCurrentControl( ) const;
+ sal_Bool isInsertionRow() const;
+ sal_Bool isModifiedRow() const;
+
+ bool moveLeft( ) const;
+ bool moveRight( ) const;
+
+ bool canDoFormFilter() const;
+
+ /** disposes this instance.
+
+ After this method has been called, the instance is not functional anymore
+ */
+ void dispose();
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >&
+ getFormOperations() const { return m_xFormOperations; }
+ protected:
+ /// dtor
+ ~FormControllerHelper();
+
+ // XFeatureInvalidation
+ virtual void SAL_CALL invalidateFeatures( const ::com::sun::star::uno::Sequence< ::sal_Int16 >& Features ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL invalidateAllFeatures() throw (::com::sun::star::uno::RuntimeException);
+
+ // XSQLErrorListener
+ virtual void SAL_CALL errorOccured( const ::com::sun::star::sdb::SQLErrorEvent& _Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ enum FormOperation { EXECUTE, EXECUTE_ARGS, COMMIT_CONTROL, COMMIT_RECORD };
+
+ bool impl_operateForm_nothrow(
+ const FormOperation _eWhat,
+ const sal_Int16 _nFeature, /* ignore for COMMIT_* */
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rArguments /* ignore except for EXECUTE_ARGS */
+ ) const;
+ bool impl_operateForm_nothrow( const FormOperation _eWhat ) const
+ {
+ return impl_operateForm_nothrow( _eWhat, 0, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
+ }
+ bool impl_operateForm_nothrow( const sal_Int16 _nFeature ) const
+ {
+ return impl_operateForm_nothrow( EXECUTE, _nFeature, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
+ }
+
+ private:
+ FormControllerHelper(); // never implemented
+ FormControllerHelper( const FormControllerHelper& ); // never implemented
+ FormControllerHelper& operator=( const FormControllerHelper& ); // never implemented
+ };
+
+//........................................................................
+} // namespace svx
+//........................................................................
+
+#endif // SVX_FORMCONTROLLING_HXX
diff --git a/svx/source/inc/formtoolbars.hxx b/svx/source/inc/formtoolbars.hxx
index 5e8eae756b89..2090b7e6b667 100644
--- a/svx/source/inc/formtoolbars.hxx
+++ b/svx/source/inc/formtoolbars.hxx
@@ -31,14 +31,13 @@
#ifndef SVX_SOURCE_INC_FORMTOOLBARS_HXX
#define SVX_SOURCE_INC_FORMTOOLBARS_HXX
-/** === begin UNO includes === **/
-/** === end UNO includes === **/
-
#include "fmdocumentclassification.hxx"
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <tools/solar.h>
+#include <svx/svxdllapi.h>
+
//........................................................................
namespace svxform
{
@@ -58,7 +57,7 @@ namespace svxform
@param _rxFrame
the frame to analyze
*/
- FormToolboxes(
+ SVX_DLLPUBLIC FormToolboxes(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
);
@@ -66,16 +65,16 @@ namespace svxform
/** retrieves the URI for the toolbox associated with the given slot, depending
on the type of our document
*/
- ::rtl::OUString
+ SVX_DLLPUBLIC ::rtl::OUString
getToolboxResourceName( USHORT _nSlotId ) const;
/** toggles the toolbox associated with the given slot
*/
- void toggleToolbox( USHORT _nSlotId ) const;
+ SVX_DLLPUBLIC void toggleToolbox( USHORT _nSlotId ) const;
/** determines whether the toolbox associated with the given slot is currently visible
*/
- bool isToolboxVisible( USHORT _nSlotId ) const;
+ SVX_DLLPUBLIC bool isToolboxVisible( USHORT _nSlotId ) const;
/** ensures that a given toolbox is visible
*/
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 6a552da6edb7..cb747e3a894c 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -42,20 +42,24 @@
#include <com/sun/star/form/XBoundControl.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
+#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
+#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/form/XChangeBroadcaster.hpp>
/** === end UNO includes === **/
-#include <tools/rtti.hxx>
-
#include <comphelper/propmultiplex.hxx>
#include <comphelper/componentcontext.hxx>
-
#include <cppuhelper/component.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/rtti.hxx>
class DbCellControl;
class Edit;
@@ -282,7 +286,11 @@ public:
virtual ~DbCellControl();
- Window* GetControl() const { return m_pWindow; }
+ Window& GetWindow() const
+ {
+ ENSURE_OR_THROW( m_pWindow, "no window" );
+ return *m_pWindow;
+ }
// control alignment
inline sal_Bool isAlignedController() const { return m_bAlignedController; }
@@ -732,20 +740,34 @@ protected:
//==================================================================
// Base class providing the access to a grid cell
//==================================================================
-class FmXGridCell : public ::cppu::OComponentHelper,
- public ::com::sun::star::awt::XControl,
- public ::com::sun::star::form::XBoundControl
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XControl
+ , ::com::sun::star::form::XBoundControl
+ > FmXGridCell_Base;
+typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XWindow
+ > FmXGridCell_WindowBase;
+class FmXGridCell :public ::cppu::OComponentHelper
+ ,public FmXGridCell_Base
+ ,public FmXGridCell_WindowBase
{
protected:
- ::osl::Mutex m_aMutex;
- DbGridColumn* m_pColumn;
- DbCellControl* m_pCellControl;
+ ::osl::Mutex m_aMutex;
+ DbGridColumn* m_pColumn;
+ DbCellControl* m_pCellControl;
+
+private:
+ ::cppu::OInterfaceContainerHelper m_aWindowListeners;
+ ::cppu::OInterfaceContainerHelper m_aFocusListeners;
+ ::cppu::OInterfaceContainerHelper m_aKeyListeners;
+ ::cppu::OInterfaceContainerHelper m_aMouseListeners;
+ ::cppu::OInterfaceContainerHelper m_aMouseMotionListeners;
+protected:
virtual ~FmXGridCell();
+
public:
TYPEINFO();
- FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl);
-
+ FmXGridCell( DbGridColumn* pColumn, DbCellControl* pControl );
+ void init();
DECLARE_UNO3_AGG_DEFAULTS(FmXGridCell, OComponentHelper);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -754,6 +776,7 @@ public:
void SetTextLineColor(const Color& _rColor);
// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
@@ -781,6 +804,25 @@ public:
virtual sal_Bool SAL_CALL getLock() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setLock(sal_Bool _bLock) throw(::com::sun::star::uno::RuntimeException);
+ // XWindow
+ virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setVisible( ::sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEnable( ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFocus( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
sal_Bool Commit() {return m_pCellControl->Commit();}
void ImplInitWindow( Window& rParent, const InitWindowFacet _eInitWhat )
{ m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); }
@@ -788,6 +830,17 @@ public:
sal_Bool isAlignedController() const { return m_pCellControl->isAlignedController(); }
void AlignControl(sal_Int16 nAlignment)
{ m_pCellControl->AlignControl(nAlignment);}
+
+protected:
+ virtual Window* getEventWindow() const;
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+
+ // default implementations call our focus listeners, don't forget to call them if you override this
+ virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent );
+ virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent );
+
+private:
+ DECL_LINK( OnWindowEvent, VclWindowEvent* );
};
//==================================================================
@@ -795,7 +848,10 @@ class FmXDataCell : public FmXGridCell
{
public:
TYPEINFO();
- FmXDataCell(DbGridColumn* pColumn, DbCellControl* pControl):FmXGridCell(pColumn, pControl){}
+ FmXDataCell( DbGridColumn* pColumn, DbCellControl& _rControl )
+ :FmXGridCell( pColumn, &_rControl )
+ {
+ }
virtual void PaintFieldToCell(OutputDevice& rDev,
const Rectangle& rRect,
@@ -831,11 +887,7 @@ protected:
public:
TYPEINFO();
- FmXTextCell( DbGridColumn* pColumn, DbCellControl* pControl )
- :FmXDataCell( pColumn, pControl )
- ,m_bFastPaint( sal_True )
- {
- }
+ FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl );
virtual void PaintFieldToCell(OutputDevice& rDev,
const Rectangle& rRect,
@@ -849,23 +901,31 @@ public:
};
//==================================================================
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent
+ , ::com::sun::star::form::XChangeBroadcaster
+ > FmXEditCell_Base;
class FmXEditCell : public FmXTextCell,
- public ::com::sun::star::awt::XTextComponent
+ public FmXEditCell_Base
{
+private:
+ ::rtl::OUString m_sValueOnEnter;
+
protected:
::cppu::OInterfaceContainerHelper m_aTextListeners;
+ ::cppu::OInterfaceContainerHelper m_aChangeListeners;
::svt::IEditImplementation* m_pEditImplementation;
bool m_bOwnEditImplementation;
virtual ~FmXEditCell();
public:
- FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl );
DECLARE_UNO3_AGG_DEFAULTS(FmXEditCell, FmXTextCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
// XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing();
@@ -884,26 +944,43 @@ public:
virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException);
+ // XChangeBroadcaster
+ virtual void SAL_CALL addChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
- DECL_LINK( OnTextChanged, void* );
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+
+ virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent );
+ virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent );
+
+private:
+ void onTextChanged();
};
//==================================================================
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XCheckBox
+ , ::com::sun::star::awt::XButton
+ > FmXCheckBoxCell_Base;
class FmXCheckBoxCell : public FmXDataCell,
- public ::com::sun::star::awt::XCheckBox
+ public FmXCheckBoxCell_Base
{
::cppu::OInterfaceContainerHelper m_aItemListeners;
+ ::cppu::OInterfaceContainerHelper m_aActionListeners;
+ ::rtl::OUString m_aActionCommand;
CheckBox* m_pBox;
+
protected:
virtual ~FmXCheckBoxCell();
-public:
- FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+public:
+ FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
// UNO
DECLARE_UNO3_AGG_DEFAULTS(FmXCheckBoxCell, FmXDataCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing();
@@ -916,26 +993,37 @@ public:
virtual void SAL_CALL setLabel(const ::rtl::OUString& Label) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL enableTriState(sal_Bool b) throw(::com::sun::star::uno::RuntimeException);
+ // XButton
+ virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException);
+ //virtual void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
- DECL_LINK( OnClick, void* );
+ virtual Window* getEventWindow() const;
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
};
//==================================================================
-class FmXListBoxCell : public FmXTextCell,
- public ::com::sun::star::awt::XListBox
+typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XListBox
+ > FmXListBoxCell_Base;
+class FmXListBoxCell :public FmXTextCell
+ ,public FmXListBoxCell_Base
{
::cppu::OInterfaceContainerHelper m_aItemListeners,
m_aActionListeners;
ListBox* m_pBox;
+
protected:
virtual ~FmXListBoxCell();
-public:
- FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+public:
+ FmXListBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// OComponentHelper
virtual void SAL_CALL disposing();
@@ -965,14 +1053,60 @@ public:
virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(::com::sun::star::uno::RuntimeException);
protected:
- DECL_LINK( OnSelect, VclWindowEvent* );
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+
DECL_LINK( OnDoubleClick, void* );
};
//==================================================================
+typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XComboBox
+ > FmXComboBoxCell_Base;
+class FmXComboBoxCell :public FmXTextCell
+ ,public FmXComboBoxCell_Base
+{
+private:
+ ::cppu::OInterfaceContainerHelper m_aItemListeners,
+ m_aActionListeners;
+ ComboBox* m_pComboBox;
+
+protected:
+ virtual ~FmXComboBoxCell();
+
+public:
+ FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl );
+
+ DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // XComboBox
+ virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItem( const ::rtl::OUString& _Item, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _Items, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getItemCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItem( ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 _Lines ) throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData );
+};
+
+//==================================================================
+typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent
+ , ::com::sun::star::lang::XUnoTunnel
+ > FmXFilterCell_Base;
class FmXFilterCell :public FmXGridCell
- ,public ::com::sun::star::awt::XTextComponent
- ,public ::com::sun::star::lang::XUnoTunnel
+ ,public FmXFilterCell_Base
{
::cppu::OInterfaceContainerHelper m_aTextListeners;
protected:
@@ -985,6 +1119,7 @@ public:
DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/inc/gridcols.hxx b/svx/source/inc/gridcols.hxx
index a68e28270591..3b4c3582f314 100644
--- a/svx/source/inc/gridcols.hxx
+++ b/svx/source/inc/gridcols.hxx
@@ -30,25 +30,20 @@
#ifndef _SVX_GRIDCOLS_HXX
#define _SVX_GRIDCOLS_HXX
-#include "fmstatic.hxx"
+#include <sal/types.h>
-namespace svxform
-{
-
- // list of possible controls
- DECLARE_CONSTASCII_USTRING(FM_COL_TEXTFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COL_CHECKBOX);
- DECLARE_CONSTASCII_USTRING(FM_COL_COMBOBOX);
- DECLARE_CONSTASCII_USTRING(FM_COL_LISTBOX);
- DECLARE_CONSTASCII_USTRING(FM_COL_NUMERICFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COL_DATEFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COL_TIMEFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COL_CURRENCYFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COL_PATTERNFIELD);
- DECLARE_CONSTASCII_USTRING(FM_COL_FORMATTEDFIELD);
-
-} // namespace svxform
+namespace rtl { class OUString; }
+#define FM_COL_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextField" ) )
+#define FM_COL_COMBOBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ComboBox" ) )
+#define FM_COL_CHECKBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CheckBox" ) )
+#define FM_COL_TIMEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeField" ) )
+#define FM_COL_DATEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateField" ) )
+#define FM_COL_NUMERICFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NumericField" ) )
+#define FM_COL_CURRENCYFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrencyField" ) )
+#define FM_COL_PATTERNFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PatternField" ) )
+#define FM_COL_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListBox" ) )
+#define FM_COL_FORMATTEDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormattedField" ) )
// column type ids
#define TYPE_CHECKBOX 0
diff --git a/svx/source/inc/sqlparserclient.hxx b/svx/source/inc/sqlparserclient.hxx
index 2f7e43073b8b..65f96cf80523 100644
--- a/svx/source/inc/sqlparserclient.hxx
+++ b/svx/source/inc/sqlparserclient.hxx
@@ -31,7 +31,7 @@
#ifndef SVX_SQLPARSERCLIENT_HXX
#define SVX_SQLPARSERCLIENT_HXX
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
#include "ParseContext.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -43,7 +43,7 @@ namespace svxform
//====================================================================
//= OSQLParserClient
//====================================================================
- class OSQLParserClient : public ODbtoolsClient
+ class SVX_DLLPUBLIC OSQLParserClient : public ODbtoolsClient
,public ::svxform::OParseContextClient
{
private:
diff --git a/svx/source/inc/stringlistresource.hxx b/svx/source/inc/stringlistresource.hxx
index 496993f7fbe1..76c7d1c92df7 100644
--- a/svx/source/inc/stringlistresource.hxx
+++ b/svx/source/inc/stringlistresource.hxx
@@ -31,11 +31,10 @@
#ifndef SVX_STRINGLISTRESOURCE_HXX
#define SVX_STRINGLISTRESOURCE_HXX
-/** === begin UNO includes === **/
-/** === end UNO includes === **/
-
#include <tools/rc.hxx>
+#include <svx/svxdllapi.h>
+
#include <memory>
//........................................................................
@@ -52,8 +51,8 @@ namespace svx
class StringListResource : public Resource
{
public:
- StringListResource( const ResId& _rResId );
- ~StringListResource();
+ SVX_DLLPUBLIC StringListResource( const ResId& _rResId );
+ SVX_DLLPUBLIC ~StringListResource();
inline void get( ::std::vector< String >& _rStrings )
{
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index c1a4c5a6ecbc..9479ed15cfc4 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -55,7 +55,7 @@
//#endif
#include <comphelper/broadcasthelper.hxx>
#include <cppuhelper/implbase6.hxx>
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <svx/rectenum.hxx>
namespace com { namespace sun { namespace star { namespace awt {
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index e83e0c0f80bd..be46c05a58d5 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -42,7 +42,7 @@
//#endif
#include <comphelper/propmultiplex.hxx>
#include <svtools/transfer.hxx>
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
//==================================================================
class FmFieldWin;
diff --git a/svx/source/inc/typeconversionclient.hxx b/svx/source/inc/typeconversionclient.hxx
index 947cc4eddd07..2cfaaabe5173 100644
--- a/svx/source/inc/typeconversionclient.hxx
+++ b/svx/source/inc/typeconversionclient.hxx
@@ -31,7 +31,7 @@
#ifndef SVX_TYPECONVERSION_CLIENT_HXX
#define SVX_TYPECONVERSION_CLIENT_HXX
-#include "dbtoolsclient.hxx"
+#include "svx/dbtoolsclient.hxx"
//........................................................................
namespace svxform
diff --git a/svx/source/inc/unoedprx.hxx b/svx/source/inc/unoedprx.hxx
index 070367f26dd9..4758b17dd621 100644
--- a/svx/source/inc/unoedprx.hxx
+++ b/svx/source/inc/unoedprx.hxx
@@ -79,6 +79,9 @@ public:
virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
virtual USHORT GetLineCount( USHORT nPara ) const;
virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
+ virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
+ virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const;
+
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
@@ -118,12 +121,13 @@ public:
SvxAccessibleTextEditViewAdapter();
virtual ~SvxAccessibleTextEditViewAdapter();
+ // SvxViewForwarder interface
virtual BOOL IsValid() const;
-
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
+ // SvxEditViewForwarder interface
virtual sal_Bool GetSelection( ESelection& rSelection ) const;
virtual sal_Bool SetSelection( const ESelection& rSelection );
virtual sal_Bool Copy();
diff --git a/svx/source/inc/unogalthemeprovider.hxx b/svx/source/inc/unogalthemeprovider.hxx
index dd8391e89c12..555e7f380ab3 100644
--- a/svx/source/inc/unogalthemeprovider.hxx
+++ b/svx/source/inc/unogalthemeprovider.hxx
@@ -36,6 +36,8 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/gallery/XGalleryThemeProvider.hpp>
+#include <svx/svxdllapi.h>
+
class Gallery;
namespace unogallery {
@@ -60,8 +62,8 @@ public:
GalleryThemeProvider();
~GalleryThemeProvider();
- static ::rtl::OUString getImplementationName_Static() throw();
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
+ SVX_DLLPUBLIC static ::rtl::OUString getImplementationName_Static() throw();
+ SVX_DLLPUBLIC static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
protected:
diff --git a/svx/source/inc/unopolyhelper.hxx b/svx/source/inc/unopolyhelper.hxx
index 8b299aa9ddb9..373b6ecc0f4a 100644
--- a/svx/source/inc/unopolyhelper.hxx
+++ b/svx/source/inc/unopolyhelper.hxx
@@ -33,6 +33,8 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <svx/svxdllapi.h>
+
namespace com { namespace sun { namespace star { namespace drawing {
struct PolyPolygonBezierCoords;
} } } }
@@ -48,7 +50,7 @@ basegfx::B2DPolyPolygon SvxConvertPolyPolygonBezierToB2DPolyPolygon( const com::
/** convert a B2DPolyPolygon to a drawing::PolyPolygonBezierCoords
*/
-void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon& rPolyPoly, com::sun::star::drawing::PolyPolygonBezierCoords& rRetval );
+SVX_DLLPUBLIC void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon& rPolyPoly, com::sun::star::drawing::PolyPolygonBezierCoords& rRetval );
#endif
diff --git a/svx/source/inc/unopracc.hxx b/svx/source/inc/unopracc.hxx
index c84075f85a47..139837143623 100644
--- a/svx/source/inc/unopracc.hxx
+++ b/svx/source/inc/unopracc.hxx
@@ -48,7 +48,7 @@ class SvxAccessibleTextPropertySet : public SvxUnoTextRangeBase,
public ::cppu::OWeakObject
{
public:
- SvxAccessibleTextPropertySet( const SvxEditSource*, const SfxItemPropertyMap* );
+ SvxAccessibleTextPropertySet( const SvxEditSource*, const SvxItemPropertySet* );
virtual ~SvxAccessibleTextPropertySet() throw();
// XTextRange
diff --git a/svx/source/intro/intro_tmpl.hrc b/svx/source/intro/intro_tmpl.hrc
index 0f1b36e0c9f6..ad3a628213be 100644
--- a/svx/source/intro/intro_tmpl.hrc
+++ b/svx/source/intro/intro_tmpl.hrc
@@ -269,9 +269,9 @@ ItemList = \
< "Darin Fisher" ; > ; \
< "Nicole M. Follet-Dunn" ; > ; \
< "Kenneth Foskey" ; > ; \
- < "Peter Frandsen" ; > ; \
< "Duncan Foster" ; > ; \
< "Tim Foster" ; > ; \
+ < "Peter Frandsen" ; > ; \
< "Gary Frederick" ; > ; \
< "Nils Fuhrmann" ; > ; \
< "Jan Funken" ; > ; \
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index c291c9b1be69..447d11f6d6ea 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/table/TableOrientation.hpp>
#include <com/sun/star/table/CellHoriJustify.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include "com/sun/star/style/VerticalAlignment.hpp"
#include <com/sun/star/util/SortField.hpp>
#include <com/sun/star/util/SortFieldType.hpp>
#include <com/sun/star/table/CellOrientation.hpp>
@@ -275,42 +276,89 @@ SfxItemPresentation SvxVerJustifyItem::GetPresentation
//------------------------------------------------------------------------
-sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
- table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
- switch ( (SvxCellVerJustify)GetValue() )
+ nMemberId &= ~CONVERT_TWIPS;
+ switch ( nMemberId )
{
- case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
- case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break;
- case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break;
- case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
- default: ; //prevent warning
+ case MID_HORJUST_ADJUST:
+ {
+ style::VerticalAlignment eUno = style::VerticalAlignment_TOP;
+ switch ( (SvxCellVerJustify)GetValue() )
+ {
+ case SVX_VER_JUSTIFY_TOP: eUno = style::VerticalAlignment_TOP; break;
+ case SVX_VER_JUSTIFY_CENTER: eUno = style::VerticalAlignment_MIDDLE; break;
+ case SVX_VER_JUSTIFY_BOTTOM: eUno = style::VerticalAlignment_BOTTOM; break;
+ default: ; //prevent warning
+ }
+ rVal <<= eUno;
+ break;
+ }
+ default:
+ {
+ table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
+ switch ( (SvxCellVerJustify)GetValue() )
+ {
+ case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
+ case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break;
+ case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break;
+ case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
+ default: ; //prevent warning
+ }
+ rVal <<= eUno;
+ break;
+ }
}
- rVal <<= eUno;
return sal_True;
}
-sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
- table::CellVertJustify eUno;
- if(!(rVal >>= eUno))
+ nMemberId &= ~CONVERT_TWIPS;
+ switch ( nMemberId )
{
- sal_Int32 nValue = 0;
- if(!(rVal >>= nValue))
- return sal_False;
- eUno = (table::CellVertJustify)nValue;
- }
+ case MID_HORJUST_ADJUST:
+ {
+ // property contains ParagraphAdjust values as sal_Int16
+ style::VerticalAlignment nVal = style::VerticalAlignment_TOP;
+ if(!(rVal >>= nVal))
+ return sal_False;
- SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
- switch (eUno)
- {
- case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break;
- case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
- case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break;
- case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
- default: ; //prevent warning
+ SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+ switch (nVal)
+ {
+ case style::VerticalAlignment_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
+ case style::VerticalAlignment_MIDDLE: eSvx = SVX_VER_JUSTIFY_CENTER; break;
+ case style::VerticalAlignment_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
+ default:;
+ }
+ SetValue( (USHORT)eSvx );
+ break;
+ }
+ default:
+ {
+ table::CellVertJustify eUno;
+ if(!(rVal >>= eUno))
+ {
+ sal_Int32 nValue = 0;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eUno = (table::CellVertJustify)nValue;
+ }
+
+ SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+ switch (eUno)
+ {
+ case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break;
+ case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
+ case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break;
+ case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
+ default: ; //prevent warning
+ }
+ SetValue( (USHORT)eSvx );
+ break;
+ }
}
- SetValue( (USHORT)eSvx );
return sal_True;
}
diff --git a/svx/source/items/makefile.mk b/svx/source/items/makefile.mk
index c6cae5464735..ef4bf0b00149 100644
--- a/svx/source/items/makefile.mk
+++ b/svx/source/items/makefile.mk
@@ -38,6 +38,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
PRJNAME=svx
TARGET=items
+LIBTARGET=NO
# --- Settings -----------------------------------------------------
@@ -51,41 +52,45 @@ SRC1FILES = \
svxerr.src \
svxitems.src
-SLOFILES= \
- $(SLO)$/ofaitem.obj \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/writingmodeitem.obj \
$(SLO)$/frmitems.obj \
$(SLO)$/paraitem.obj \
$(SLO)$/textitem.obj \
- $(SLO)$/postattr.obj \
$(SLO)$/flditem.obj \
- $(SLO)$/hlnkitem.obj \
$(SLO)$/svxfont.obj \
- $(SLO)$/pageitem.obj \
- $(SLO)$/viewlayoutitem.obj \
- $(SLO)$/paperinf.obj \
+ $(SLO)$/paperinf.obj \
$(SLO)$/drawitem.obj \
- $(SLO)$/algitem.obj \
$(SLO)$/itemtype.obj \
- $(SLO)$/rotmodit.obj \
- $(SLO)$/numinf.obj \
- $(SLO)$/svxerr.obj \
- $(SLO)$/numfmtsh.obj \
- $(SLO)$/zoomitem.obj \
$(SLO)$/chrtitem.obj \
$(SLO)$/bulitem.obj \
$(SLO)$/e3ditem.obj \
$(SLO)$/numitem.obj \
$(SLO)$/grfitem.obj \
$(SLO)$/clipfmtitem.obj \
- $(SLO)$/svxempty.obj \
$(SLO)$/xmlcnitm.obj \
$(SLO)$/customshapeitem.obj \
- $(SLO)$/charhiddenitem.obj \
+ $(SLO)$/charhiddenitem.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/ofaitem.obj \
+ $(SLO)$/postattr.obj \
+ $(SLO)$/hlnkitem.obj \
+ $(SLO)$/pageitem.obj \
+ $(SLO)$/viewlayoutitem.obj \
+ $(SLO)$/algitem.obj \
+ $(SLO)$/rotmodit.obj \
+ $(SLO)$/numinf.obj \
+ $(SLO)$/svxerr.obj \
+ $(SLO)$/numfmtsh.obj \
+ $(SLO)$/zoomitem.obj \
+ $(SLO)$/svxempty.obj \
$(SLO)$/SmartTagItem.obj \
$(SLO)$/zoomslideritem.obj \
-
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
EXCEPTIONSFILES= \
$(SLO)$/paraitem.obj \
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index d4dd02f74a3b..ca6333753769 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -45,6 +45,7 @@
#include <svtools/langtab.hxx>
#include <vcl/svapp.hxx>
+#include <comphelper/processfactory.hxx>
#include <svx/numfmtsh.hxx>
// class SvxNumberFormatShell --------------------------------------------
@@ -1523,22 +1524,22 @@ String SvxNumberFormatShell::GetStandardName() const
return pFormatter->GetStandardName( eCurLanguage);
}
-void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, sal_uInt16* pPos)
+void SvxNumberFormatShell::GetCurrencySymbols( SvStringsDtor& rList, sal_uInt16* pPos )
{
const NfCurrencyEntry* pTmpCurrencyEntry=SvNumberFormatter::MatchSystemCurrency();
sal_Bool bFlag=(pTmpCurrencyEntry==NULL);
- GetCurrencySymbols(rList,rStrEurope, bFlag);
+ GetCurrencySymbols( rList, bFlag);
if(pPos!=NULL)
{
const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable();
- sal_uInt16 nCount=rCurrencyTable.Count();
+ sal_uInt16 nTableCount=rCurrencyTable.Count();
*pPos=0;
- nCount=aCurCurrencyList.Count();
+ sal_uInt16 nCount=aCurCurrencyList.Count();
if(bFlag)
{
@@ -1549,8 +1550,9 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
{
for(sal_uInt16 i=1;i<nCount;i++)
{
- if(aCurCurrencyList[i]!=(sal_uInt16)-1 &&
- pTmpCurrencyEntry==rCurrencyTable[aCurCurrencyList[i]])
+ const sal_uInt16 j = aCurCurrencyList[i];
+ if (j != (sal_uInt16)-1 && j < nTableCount &&
+ pTmpCurrencyEntry == rCurrencyTable[j])
{
*pPos=i;
nCurCurrencyEntryPos=i;
@@ -1562,7 +1564,7 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
}
-void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& /*rStrEurope*/, sal_Bool bFlag)
+void SvxNumberFormatShell::GetCurrencySymbols( SvStringsDtor& rList, sal_Bool bFlag )
{
aCurCurrencyList.Remove(0,aCurCurrencyList.Count());
@@ -1574,9 +1576,9 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
sal_uInt16 nStart=1;
sal_uInt16 i,j;
- XubString aString(rCurrencyTable[0]->GetSymbol());
+ XubString aString( ApplyLreOrRleEmbedding( rCurrencyTable[0]->GetSymbol()));
aString += sal_Unicode(' ');
- aString += pLanguageTable->GetString(rCurrencyTable[0]->GetLanguage());
+ aString += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[0]->GetLanguage()));
WSStringPtr pStr = new XubString(aString);
rList.Insert( pStr,rList.Count());
@@ -1591,41 +1593,54 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri
++nStart;
}
- for(i=1;i<nCount;i++)
- {
- XubString _aString(rCurrencyTable[i]->GetSymbol());
- _aString += sal_Unicode(' ');
- _aString += pLanguageTable->GetString(rCurrencyTable[i]->GetLanguage());
+ CollatorWrapper aCollator( ::comphelper::getProcessServiceFactory());
+ aCollator.loadDefaultCollator( Application::GetSettings().GetLocale(), 0);
- pStr = new XubString(_aString);
+ const String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " "));
+ for(i=1;i<nCount;i++)
+ {
+ XubString aStr( ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetBankSymbol()));
+ aStr += aTwoSpace;
+ aStr += ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetSymbol());
+ aStr += aTwoSpace;
+ aStr += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[i]->GetLanguage()));
+
+ pStr = new XubString(aStr);
+#if 0
+ fprintf( stderr, "currency entry: %s\n", ByteString( *pStr, RTL_TEXTENCODING_UTF8).GetBuffer());
+#endif
for(j=nStart;j<rList.Count();j++)
{
const StringPtr pTestStr=rList[j];
-
- if(*pTestStr>aString) break;
+ if (aCollator.compareString( *pStr, *pTestStr) < 0)
+ break; // insert before first greater than
}
rList.Insert( pStr,j);
aCurCurrencyList.Insert(i,j);
}
+ // Append ISO codes to symbol list.
+ // XXX If this is to be changed, various other places would had to be
+ // adapted that assume this order!
sal_uInt16 nCont = rList.Count();
for(i=1;i<nCount;i++)
{
- sal_Bool bTest=sal_True;
- pStr = new XubString(rCurrencyTable[i]->GetBankSymbol());
+ bool bInsert = true;
+ pStr = new XubString( ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetBankSymbol()));
- for(j=nCont;j<rList.Count();j++)
+ for (j = nCont; j < rList.Count() && bInsert; ++j)
{
const StringPtr pTestStr=rList[j];
if(*pTestStr==*pStr)
- bTest=sal_False;
+ bInsert = false;
else
- if(*pTestStr>*pStr) break;
+ if (aCollator.compareString( *pStr, *pTestStr) < 0)
+ break; // insert before first greater than
}
- if(bTest)
+ if(bInsert)
{
rList.Insert( pStr,j);
aCurCurrencyList.Insert(i,j);
diff --git a/svx/source/items/numitem.cxx b/svx/source/items/numitem.cxx
index 18a9d18fb559..0a9b7786a476 100644
--- a/svx/source/items/numitem.cxx
+++ b/svx/source/items/numitem.cxx
@@ -71,14 +71,9 @@ using namespace ::com::sun::star::style;
sal_Int32 SvxNumberType::nRefCount = 0;
com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> SvxNumberType::xFormatter = 0;
-/* -----------------------------22.02.01 14:24--------------------------------
-
- ---------------------------------------------------------------------------*/
-SvxNumberType::SvxNumberType(sal_Int16 nType) :
- nNumType(nType),
- bShowSymbol(sal_True)
+void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& _xFormatter)
{
- if(!xFormatter.is())
+ if(!_xFormatter.is())
{
try
{
@@ -87,12 +82,20 @@ SvxNumberType::SvxNumberType(sal_Int16 nType) :
::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) );
Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY);
DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
- xFormatter = Reference<XNumberingFormatter> (xRet, UNO_QUERY);
+ _xFormatter = Reference<XNumberingFormatter> (xRet, UNO_QUERY);
}
catch(Exception& )
{
}
}
+}
+/* -----------------------------22.02.01 14:24--------------------------------
+
+ ---------------------------------------------------------------------------*/
+SvxNumberType::SvxNumberType(sal_Int16 nType) :
+ nNumType(nType),
+ bShowSymbol(sal_True)
+{
nRefCount++;
}
/* -----------------------------22.02.01 14:31--------------------------------
@@ -126,6 +129,7 @@ String SvxNumberType::GetNumStr( ULONG nNo ) const
* --------------------------------------------------*/
String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const
{
+ lcl_getFormatter(xFormatter);
String aTmpStr;
if(!xFormatter.is())
return aTmpStr;
diff --git a/svx/source/items/paperinf.cxx b/svx/source/items/paperinf.cxx
index 234b5548567d..161d7af1aba9 100644
--- a/svx/source/items/paperinf.cxx
+++ b/svx/source/items/paperinf.cxx
@@ -44,129 +44,6 @@
#include <svx/paperinf.hxx>
#include <svx/dialmgr.hxx>
-#define SVX_PAPER_OFFSET 3 // Anfang: enum Paper A3 - SvxPaper A0; Diff=3
-
-// STATIC DATA -----------------------------------------------------------
-
-static Size __FAR_DATA aDinTab[] =
-{
- Size(lA0Width,lA0Height), // A0
- Size(lA1Width,lA1Height), // A1
- Size(lA2Width,lA2Height), // A2
- Size(lA3Width,lA3Height), // A3
- Size(lA4Width,lA4Height), // A4
- Size(lA5Width,lA5Height), // A5
- Size(lB4Width, lB4Height), // B4
- Size(lB5Width,lB5Height), // B5
- Size(lLetterWidth,lLetterHeight), // LETTER
- Size(lLegalWidth,lLegalHeight), // LEGAL
- Size(lTabloidWidth,lTabloidHeight), // TABLOID
- Size(0, 0), // USER
- Size(lB6Width, lB6Height), // B6
- Size(lC4Width, lC4Height), // C4
- Size(lC5Width, lC5Height), // C5
- Size(lC6Width, lC6Height), // C6
- Size(lC65Width, lC65Height), // C65
- Size(lDLWidth, lDLHeight), // DL
- Size(lDiaWidth,lDiaHeight ), // DIA
- Size(lScreenWidth, lScreenHeight), // SCREEN
- Size(lAWidth, lAHeight), // A
- Size(lBWidth, lBHeight), // B
- Size(lCWidth, lCHeight), // C
- Size(lDWidth, lDHeight), // D
- Size(lEWidth, lEHeight), // E
- Size(lExeWidth, lExeHeight), // Executive
- Size(lLegal2Width, lLegal2Height), // Legal2
- Size(lMonarchWidth, lMonarchHeight),// Monarch
- Size(lCom675Width, lCom675Height), // COM-6 3/4
- Size(lCom9Width, lCom9Height), // COM-9
- Size(lCom10Width, lCom10Height), // COM-10
- Size(lCom11Width, lCom11Height), // COM-11
- Size(lCom12Width, lCom12Height), // COM-12
- Size(lKai16Width, lKai16Height), // 16 kai
- Size(lKai32Width, lKai32Height), // 32 kai
- Size(lKai32BigWidth, lKai32BigHeight), // 32 kai gross
- Size(lJISB4Width, lJISB4Height), // B4 (JIS)
- Size(lJISB5Width, lJISB5Height), // B5 (JIS)
- Size(lJISB6Width, lJISB6Height) // B6 (JIS)
-};
-
-static const int nTabSize = sizeof(aDinTab) / sizeof(aDinTab[0]);
-
-// -----------------------------------------------------------------------
-
-long TwipsTo100thMM( long nIn )
-{
- long nRet = OutputDevice::LogicToLogic( nIn, MAP_TWIP, MAP_100TH_MM );
- long nTmp = nRet % 10;
-
- if ( nTmp )
- nRet += 10 - nTmp;
- return nRet;
-}
-
-// -----------------------------------------------------------------------
-
-Size ConvertTo100thMM( Size& rSize )
-{
- // Convert form TWIPS to 100TH_MM
- long nW = TwipsTo100thMM( rSize.Width() );
- long nH = TwipsTo100thMM( rSize.Height() );
-
- rSize.Width() = nW;
- rSize.Height() = nH;
- return rSize;
-}
-
-// -----------------------------------------------------------------------
-
-long HundMMToTwips( long nIn )
-{
- long nRet = OutputDevice::LogicToLogic( nIn, MAP_100TH_MM, MAP_TWIP );
- return nRet;
-}
-
-// -----------------------------------------------------------------------
-
-Size ConvertToTwips( Size& rSize )
-{
- // Convert form TWIPS to 100TH_MM
- long nW = HundMMToTwips( rSize.Width() );
- long nH = HundMMToTwips( rSize.Height() );
-
- rSize.Width() = nW;
- rSize.Height() = nH;
- return rSize;
-}
-
-// -----------------------------------------------------------------------
-
-SvxPaper GetPaper_Impl( const Size &rSize, MapUnit eUnit, BOOL bSloppy )
-{
- DBG_ASSERT( eUnit == MAP_TWIP || eUnit == MAP_100TH_MM,
- "map unit not supported" );
- Size aSize = rSize;
-
- if ( eUnit == MAP_100TH_MM )
- ConvertToTwips( aSize );
-
- for ( USHORT i = 0; i < nTabSize; i++ )
- {
- if ( aDinTab[i] == aSize )
- return (SvxPaper)i;
- else if ( bSloppy )
- {
- long lDiffW = Abs(aDinTab[i].Width () - aSize.Width ()),
- lDiffH = Abs(aDinTab[i].Height() - aSize.Height());
-
- if ( lDiffW < 6 && lDiffH < 6 )
- return (SvxPaper)i;
- }
- }
- return SVX_PAPER_USER;
-}
-
-
/*--------------------------------------------------------------------
Beschreibung: Ist der Printer gueltig
--------------------------------------------------------------------*/
@@ -176,22 +53,13 @@ inline BOOL IsValidPrinter( const Printer* pPtr )
return pPtr->GetName().Len() ? TRUE : FALSE;
}
-/*------------------------------------------------------------------------
- Beschreibung: Konvertierung eines SV-Defines fuer Papiergroesse in
- Twips.
- Funktioniert logischerweise nicht fuer User Groessen
- (ASSERT).
-------------------------------------------------------------------------*/
+//------------------------------------------------------------------------
-Size SvxPaperInfo::GetPaperSize( SvxPaper ePaper, MapUnit eUnit )
+Size SvxPaperInfo::GetPaperSize( Paper ePaper, MapUnit eUnit )
{
- DBG_ASSERT( ePaper < nTabSize, "Tabelle der Papiergroessen ueberindiziert" );
- DBG_ASSERT( eUnit == MAP_TWIP || eUnit == MAP_100TH_MM, "this MapUnit not supported" );
- Size aSize = aDinTab[ePaper]; // in Twips
-
- if ( eUnit == MAP_100TH_MM )
- ConvertTo100thMM( aSize );
- return aSize;
+ PaperInfo aInfo(ePaper);
+ Size aRet(aInfo.getWidth(), aInfo.getHeight()); // in 100thMM
+ return eUnit == MAP_100TH_MM ? aRet : OutputDevice::LogicToLogic(aRet, MAP_100TH_MM, eUnit);
}
/*------------------------------------------------------------------------
@@ -201,21 +69,25 @@ Size SvxPaperInfo::GetPaperSize( SvxPaper ePaper, MapUnit eUnit )
wird DIN A4 Portrait als Defaultpapiergroesse geliefert.
------------------------------------------------------------------------*/
+//Is this method may be confused about the units it returns ?
+//Always returns TWIPS for known paper sizes or on failure.
+//But in the case of PAPER_USER paper and with a Printer with a mapmode set
+//will return in those printer units ?
Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter )
{
if ( !IsValidPrinter(pPrinter) )
- return GetPaperSize( SVX_PAPER_A4 );
- const SvxPaper ePaper = (SvxPaper)(pPrinter->GetPaper() + SVX_PAPER_OFFSET);
+ return GetPaperSize( PAPER_A4 );
+ const Paper ePaper = pPrinter->GetPaper();
- if ( ePaper == SVX_PAPER_USER )
+ if ( ePaper == PAPER_USER )
{
- // Orientation nicht beruecksichtigen, da durch SV bereits
- // die richtigen Masze eingestellt worden sind.
+ // Orientation nicht beruecksichtigen, da durch SV bereits
+ // die richtigen Masze eingestellt worden sind.
Size aPaperSize = pPrinter->GetPaperSize();
const Size aInvalidSize;
if ( aPaperSize == aInvalidSize )
- return GetPaperSize(SVX_PAPER_A4);
+ return GetPaperSize(PAPER_A4);
MapMode aMap1 = pPrinter->GetMapMode();
MapMode aMap2;
@@ -233,64 +105,33 @@ Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter )
return aSize;
}
-/*------------------------------------------------------------------------
- Beschreibung: Konvertierung einer Papiergroesse in Twips in das
- SV-Define. Ist bSloppy TRUE, so wird nur auf 1/10 mm genau
- verglichen.
-------------------------------------------------------------------------*/
+// -----------------------------------------------------------------------
-SvxPaper SvxPaperInfo::GetPaper( const Size &rSize, MapUnit eUnit, BOOL bSloppy )
+Paper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy )
{
- return GetPaper_Impl( rSize, eUnit, bSloppy );
+ Size aSize(eUnit == MAP_100TH_MM ? rSize : OutputDevice::LogicToLogic(rSize, eUnit, MAP_100TH_MM));
+ PaperInfo aInfo(aSize.Width(), aSize.Height());
+ if (bSloppy)
+ aInfo.doSloppyFit();
+ return aInfo.getPaper();
}
// -----------------------------------------------------------------------
-SvxPaper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit, BOOL bSloppy )
+long SvxPaperInfo::GetSloppyPaperDimension( long nSize, MapUnit eUnit )
{
- return GetPaper_Impl( rSize, eUnit, bSloppy );
-}
-
-SvxPaper SvxPaperInfo::GetDefaultSvxPaper( LanguageType eLanguage )
-{
- SvxPaper ePaper;
- switch ( eLanguage )
- {
- case LANGUAGE_ENGLISH_US:
- case LANGUAGE_ENGLISH_CAN:
- case LANGUAGE_FRENCH_CANADIAN:
- case LANGUAGE_SPANISH_MEXICAN:
- case LANGUAGE_SPANISH_VENEZUELA:
- ePaper = SvxPaper( SVX_PAPER_LETTER );
- break;
- default:
- ePaper = SvxPaper( SVX_PAPER_A4 );
- }
- return ePaper;
+ nSize = eUnit == MAP_100TH_MM ? nSize : OutputDevice::LogicToLogic(nSize, eUnit, MAP_100TH_MM);
+ nSize = PaperInfo::sloppyFitPageDimension(nSize);
+ return eUnit == MAP_100TH_MM ? nSize : OutputDevice::LogicToLogic(nSize, MAP_100TH_MM, eUnit);
}
// -----------------------------------------------------------------------
-Paper SvxPaperInfo::GetSvPaper( const Size &rSize, MapUnit eUnit,
- BOOL bSloppy )
+Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
{
- Paper eRet = PAPER_USER;
- SvxPaper ePaper = GetPaper_Impl( rSize, eUnit, bSloppy );
-
- switch ( ePaper )
- {
- case SVX_PAPER_A3: eRet = PAPER_A3; break;
- case SVX_PAPER_A4: eRet = PAPER_A4; break;
- case SVX_PAPER_A5: eRet = PAPER_A5; break;
- case SVX_PAPER_B4: eRet = PAPER_B4; break;
- case SVX_PAPER_B5: eRet = PAPER_B5; break;
- case SVX_PAPER_LETTER: eRet = PAPER_LETTER; break;
- case SVX_PAPER_LEGAL: eRet = PAPER_LEGAL; break;
- case SVX_PAPER_TABLOID: eRet = PAPER_TABLOID; break;
- default: ;//prevent warning
- }
-
- return eRet;
+ PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
+ Size aRet(aInfo.getWidth(), aInfo.getHeight());
+ return eUnit == MAP_100TH_MM ? aRet : OutputDevice::LogicToLogic(aRet, MAP_100TH_MM, eUnit);
}
/*------------------------------------------------------------------------
@@ -298,52 +139,49 @@ Paper SvxPaperInfo::GetSvPaper( const Size &rSize, MapUnit eUnit,
Papiergroessen.
------------------------------------------------------------------------*/
-String SvxPaperInfo::GetName( SvxPaper ePaper )
+String SvxPaperInfo::GetName( Paper ePaper )
{
USHORT nResId = 0;
switch ( ePaper )
{
- case SVX_PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break;
- case SVX_PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break;
- case SVX_PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break;
- case SVX_PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break;
- case SVX_PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break;
- case SVX_PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break;
- case SVX_PAPER_B4: nResId = RID_SVXSTR_PAPER_B4; break;
- case SVX_PAPER_B5: nResId = RID_SVXSTR_PAPER_B5; break;
- case SVX_PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break;
- case SVX_PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break;
- case SVX_PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break;
- case SVX_PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break;
- case SVX_PAPER_B6: nResId = RID_SVXSTR_PAPER_B6; break;
- case SVX_PAPER_C4: nResId = RID_SVXSTR_PAPER_C4; break;
- case SVX_PAPER_C5: nResId = RID_SVXSTR_PAPER_C5; break;
- case SVX_PAPER_C6: nResId = RID_SVXSTR_PAPER_C6; break;
- case SVX_PAPER_C65: nResId = RID_SVXSTR_PAPER_C65; break;
- case SVX_PAPER_DL: nResId = RID_SVXSTR_PAPER_DL; break;
- case SVX_PAPER_DIA: nResId = RID_SVXSTR_PAPER_DIA; break;
- case SVX_PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break;
- case SVX_PAPER_A: nResId = RID_SVXSTR_PAPER_A; break;
- case SVX_PAPER_B: nResId = RID_SVXSTR_PAPER_B; break;
- case SVX_PAPER_C: nResId = RID_SVXSTR_PAPER_C; break;
- case SVX_PAPER_D: nResId = RID_SVXSTR_PAPER_D; break;
- case SVX_PAPER_E: nResId = RID_SVXSTR_PAPER_E; break;
- case SVX_PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break;
- case SVX_PAPER_LEGAL2: nResId = RID_SVXSTR_PAPER_LEGAL2; break;
- case SVX_PAPER_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break;
- case SVX_PAPER_COM675: nResId = RID_SVXSTR_PAPER_COM675; break;
- case SVX_PAPER_COM9: nResId = RID_SVXSTR_PAPER_COM9; break;
- case SVX_PAPER_COM10: nResId = RID_SVXSTR_PAPER_COM10; break;
- case SVX_PAPER_COM11: nResId = RID_SVXSTR_PAPER_COM11; break;
- case SVX_PAPER_COM12: nResId = RID_SVXSTR_PAPER_COM12; break;
- case SVX_PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break;
- case SVX_PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break;
- case SVX_PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break;
- case SVX_PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break;
- case SVX_PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break;
- case SVX_PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break;
-
+ case PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break;
+ case PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break;
+ case PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break;
+ case PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break;
+ case PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break;
+ case PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break;
+ case PAPER_B4_ISO: nResId = RID_SVXSTR_PAPER_B4_ISO; break;
+ case PAPER_B5_ISO: nResId = RID_SVXSTR_PAPER_B5_ISO; break;
+ case PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break;
+ case PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break;
+ case PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break;
+ case PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break;
+ case PAPER_B6_ISO: nResId = RID_SVXSTR_PAPER_B6_ISO; break;
+ case PAPER_ENV_C4: nResId = RID_SVXSTR_PAPER_C4; break;
+ case PAPER_ENV_C5: nResId = RID_SVXSTR_PAPER_C5; break;
+ case PAPER_ENV_C6: nResId = RID_SVXSTR_PAPER_C6; break;
+ case PAPER_ENV_C65: nResId = RID_SVXSTR_PAPER_C65; break;
+ case PAPER_ENV_DL: nResId = RID_SVXSTR_PAPER_DL; break;
+ case PAPER_SLIDE_DIA: nResId = RID_SVXSTR_PAPER_DIA; break;
+ case PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break;
+ case PAPER_C: nResId = RID_SVXSTR_PAPER_C; break;
+ case PAPER_D: nResId = RID_SVXSTR_PAPER_D; break;
+ case PAPER_E: nResId = RID_SVXSTR_PAPER_E; break;
+ case PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break;
+ case PAPER_FANFOLD_LEGAL_DE: nResId = RID_SVXSTR_PAPER_LEGAL2; break;
+ case PAPER_ENV_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break;
+ case PAPER_ENV_PERSONAL: nResId = RID_SVXSTR_PAPER_COM675; break;
+ case PAPER_ENV_9: nResId = RID_SVXSTR_PAPER_COM9; break;
+ case PAPER_ENV_10: nResId = RID_SVXSTR_PAPER_COM10; break;
+ case PAPER_ENV_11: nResId = RID_SVXSTR_PAPER_COM11; break;
+ case PAPER_ENV_12: nResId = RID_SVXSTR_PAPER_COM12; break;
+ case PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break;
+ case PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break;
+ case PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break;
+ case PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break;
+ case PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break;
+ case PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break;
default: DBG_ERRORFILE( "unknown papersize" );
}
diff --git a/svx/source/items/paraitem.cxx b/svx/source/items/paraitem.cxx
index ebc9c9f59ac2..d97ba065441d 100644
--- a/svx/source/items/paraitem.cxx
+++ b/svx/source/items/paraitem.cxx
@@ -889,7 +889,7 @@ SvxTabStop::SvxTabStop()
{
nTabPos = 0;
eAdjustment = SVX_TAB_ADJUST_LEFT;
- cDecimal = SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0);
+ m_cDecimal = cDfltDecimalChar;
cFill = cDfltFillChar;
}
@@ -900,10 +900,15 @@ SvxTabStop::SvxTabStop( const long nPos, const SvxTabAdjust eAdjst,
{
nTabPos = nPos;
eAdjustment = eAdjst;
- cDecimal = ( cDfltDecimalChar == cDec ) ? SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0) : cDec;
+ m_cDecimal = cDec;
cFill = cFil;
}
-
+// -----------------------------------------------------------------------------
+void SvxTabStop::fillDecimal() const
+{
+ if ( cDfltDecimalChar == m_cDecimal )
+ m_cDecimal = SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0);
+}
// -----------------------------------------------------------------------
XubString SvxTabStop::GetValueString() const
@@ -918,7 +923,7 @@ XubString SvxTabStop::GetValueString() const
aStr += cpDelim;
aStr += sal_Unicode('[');
aStr += XubString( ResId( RID_SVXITEMS_TAB_DECIMAL_CHAR, DIALOG_MGR() ) );
- aStr += cDecimal;
+ aStr += GetDecimal();
aStr += sal_Unicode(']');
aStr += cpDelim;
aStr += cpDelim;
@@ -1268,6 +1273,7 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ )
if( nNew <= nPos + 50 )
nNew += nDefDist;
+ long lA3Width = SvxPaperInfo::GetPaperSize(PAPER_A3).Width();
nCount = (sal_uInt16)(nNew < lA3Width ? ( lA3Width - nNew ) / nDefDist + 1 : 0);
}
diff --git a/svx/source/items/textitem.cxx b/svx/source/items/textitem.cxx
index 50c18cd14b17..2d1e5b6ebf9f 100644
--- a/svx/source/items/textitem.cxx
+++ b/svx/source/items/textitem.cxx
@@ -485,6 +485,13 @@ SfxItemPresentation SvxFontItem::GetPresentation
return SFX_ITEM_PRESENTATION_NONE;
}
+//------------------------------------------------------------------------
+
+void SvxFontItem::EnableStoreUnicodeNames( BOOL bEnable )
+{
+ bEnableStoreUnicodeNames = bEnable;
+}
+
// class SvxPostureItem --------------------------------------------------
SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) :
diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx
index 82dc919bb729..3cd538e4c079 100644
--- a/svx/source/mnuctrls/clipboardctl.cxx
+++ b/svx/source/mnuctrls/clipboardctl.cxx
@@ -143,16 +143,6 @@ void SvxClipBoardControl::StateChanged( USHORT nSID, SfxItemState eState, const
GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) & ~TIB_DROPDOWN );
GetToolBox().Invalidate( GetToolBox().GetItemRect( GetId() ) );
}
- #ifdef UNIX
- // #b6673979# enable some slots hardly, because UNIX clipboard does not notify all changes
- // Can be removed if follow up task will be fixed directly within applications.
- else
- if ( SID_PASTE == nSID )
- {
- bDisabled = false;
- GetToolBox().EnableItem( GetId(), true );
- }
- #endif
else
{
// enable the item as a whole
diff --git a/svx/source/msfilter/escherex.cxx b/svx/source/msfilter/escherex.cxx
index c327cec80d1b..5bb1b77efc35 100644
--- a/svx/source/msfilter/escherex.cxx
+++ b/svx/source/msfilter/escherex.cxx
@@ -156,14 +156,6 @@ EscherExClientAnchor_Base::~EscherExClientAnchor_Base()
// ---------------------------------------------------------------------------------------------
-struct EscherPropSortStruct
-{
- sal_uInt8* pBuf;
- sal_uInt32 nPropSize;
- sal_uInt32 nPropValue;
- sal_uInt16 nPropId;
-};
-
void EscherPropertyContainer::ImplInit()
{
nSortCount = 0;
@@ -275,21 +267,40 @@ void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, sal_Bool bBlib, sal_uI
}
}
-sal_Bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, sal_uInt32& nPropValue ) const
+sal_Bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, sal_uInt32& rPropValue ) const
+{
+ EscherPropSortStruct aPropStruct;
+
+ if ( GetOpt( nPropId, aPropStruct ) )
+ {
+ rPropValue = aPropStruct.nPropValue;
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, EscherPropSortStruct& rPropValue ) const
{
- sal_Bool bRetValue = sal_False;
for( sal_uInt32 i = 0; i < nSortCount; i++ )
{
if ( ( pSortStruct[ i ].nPropId &~0xc000 ) == ( nPropId &~0xc000 ) )
{
- nPropValue = pSortStruct[ i ].nPropValue;
- bRetValue = sal_True;
- break;
+ rPropValue = pSortStruct[ i ];
+ return sal_True;
}
}
- return bRetValue;
+ return sal_False;
}
+EscherProperties EscherPropertyContainer::GetOpts() const
+{
+ EscherProperties aVector;
+
+ for ( sal_uInt32 i = 0; i < nSortCount; ++i )
+ aVector.push_back( pSortStruct[ i ] );
+
+ return aVector;
+}
extern "C" int __LOADONCALLAPI EscherPropSortFunc( const void* p1, const void* p2 )
{
@@ -715,7 +726,7 @@ void EscherPropertyContainer::CreateTextProperties(
AddOpt( ESCHER_Prop_lTxid, nTextId );
}
-static sal_Bool GetLineArrow( const sal_Bool bLineStart,
+sal_Bool EscherPropertyContainer::GetLineArrow( const sal_Bool bLineStart,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
ESCHER_LineEnd& reLineEnd, sal_Int32& rnArrowLength, sal_Int32& rnArrowWidth )
{
@@ -2084,6 +2095,68 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
}
}
+sal_Bool EscherPropertyContainer::IsDefaultObject( SdrObjCustomShape* pCustoShape )
+{
+ sal_Bool bIsDefaultObject = sal_False;
+ if ( pCustoShape )
+ {
+ if ( pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_EQUATIONS )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_VIEWBOX )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_PATH )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_GLUEPOINTS )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_SEGMENTS )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHX )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHY )
+// && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_HANDLES )
+ && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_TEXTFRAMES ) )
+ bIsDefaultObject = sal_True;
+ }
+
+ return bIsDefaultObject;
+}
+
+void EscherPropertyContainer::LookForPolarHandles( const MSO_SPT eShapeType, sal_Int32& nAdjustmentsWhichNeedsToBeConverted )
+{
+ const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType );
+ if ( pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles )
+ {
+ sal_Int32 k, nkCount = pDefCustomShape->nHandles;
+ const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
+ for ( k = 0; k < nkCount; k++, pData++ )
+ {
+ if ( pData->nFlags & MSDFF_HANDLE_FLAGS_POLAR )
+ {
+ if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) )
+ nAdjustmentsWhichNeedsToBeConverted |= ( 1 << k );
+ }
+ }
+ }
+}
+
+sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue )
+{
+ if ( rkProp.State != beans::PropertyState_DIRECT_VALUE )
+ return FALSE;
+
+ sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << nIndex ) ) != 0;
+ if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE )
+ {
+ double fValue;
+ rkProp.Value >>= fValue;
+ if ( bUseFixedFloat )
+ fValue *= 65536.0;
+ nValue = (sal_Int32)fValue;
+ }
+ else
+ {
+ rkProp.Value >>= nValue;
+ if ( bUseFixedFloat )
+ nValue <<= 16;
+ }
+
+ return TRUE;
+}
+
void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeType, const uno::Reference< drawing::XShape > & rXShape )
{
uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
@@ -2108,22 +2181,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0;
uno::Sequence< beans::PropertyValues > aHandlesPropSeq;
sal_Bool bPredefinedHandlesUsed = sal_True;
-
-
- sal_Bool bIsDefaultObject = sal_False;
- if ( pCustoShape )
- {
- if ( pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_EQUATIONS )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_VIEWBOX )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_PATH )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_GLUEPOINTS )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_SEGMENTS )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHX )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHY )
-// && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_HANDLES )
- && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_TEXTFRAMES ) )
- bIsDefaultObject = sal_True;
- }
+ sal_Bool bIsDefaultObject = IsDefaultObject( pCustoShape );
// convert property "Equations" into std::vector< EnhancedCustomShapeEquationEquation >
std::vector< EnhancedCustomShapeEquation > aEquations;
@@ -3185,46 +3243,12 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
if ( pAdjustmentValuesProp->Value >>= aAdjustmentSeq )
{
if ( bPredefinedHandlesUsed )
- {
- const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType );
- if ( pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles )
- {
- sal_Int32 k, nkCount = pDefCustomShape->nHandles;
- const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
- for ( k = 0; k < nkCount; k++, pData++ )
- {
- if ( pData->nFlags & MSDFF_HANDLE_FLAGS_POLAR )
- {
- if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) )
- nAdjustmentsWhichNeedsToBeConverted |= ( 1 << k );
- }
- }
- }
- }
+ LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted );
+
sal_Int32 k, nValue = 0, nAdjustmentValues = aAdjustmentSeq.getLength();
for ( k = 0; k < nAdjustmentValues; k++ )
- {
- const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp = aAdjustmentSeq[ k ];
- if ( rkProp.State == beans::PropertyState_DIRECT_VALUE )
- {
- sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << k ) ) != 0;
- if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE )
- {
- double fValue;
- rkProp.Value >>= fValue;
- if ( bUseFixedFloat )
- fValue *= 65536.0;
- nValue = (sal_Int32)fValue;
- }
- else
- {
- rkProp.Value >>= nValue;
- if ( bUseFixedFloat )
- nValue <<= 16;
- }
+ if( GetAdjustmentValue( aAdjustmentSeq[ k ], k, nAdjustmentsWhichNeedsToBeConverted, nValue ) )
AddOpt( (sal_uInt16)( DFF_Prop_adjustValue + k ), (sal_uInt32)nValue );
- }
- }
}
}
}
@@ -3923,30 +3947,6 @@ struct EscherConnectorRule
sal_uInt32 ncptiB; // Connection site Index of shape B
};
-struct EscherConnectorListEntry
-{
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnector;
- ::com::sun::star::awt::Point maPointA;
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToA;
- ::com::sun::star::awt::Point maPointB;
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToB;
-
- sal_uInt32 GetConnectorRule( sal_Bool bFirst );
-
- EscherConnectorListEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rC,
- const ::com::sun::star::awt::Point& rPA,
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSA ,
- const ::com::sun::star::awt::Point& rPB,
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSB ) :
- mXConnector ( rC ),
- maPointA ( rPA ),
- mXConnectToA( rSA ),
- maPointB ( rPB ),
- mXConnectToB( rSB ) {}
-
- sal_uInt32 GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rP );
-};
-
struct EscherShapeListEntry
{
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > aXShape;
@@ -4650,6 +4650,17 @@ void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int
// ---------------------------------------------------------------------------------------------
+void EscherEx::AddChildAnchor( const Rectangle& rRect )
+{
+ AddAtom( 16, ESCHER_ChildAnchor );
+ GetStream() << (INT32)rRect.Left()
+ << (INT32)rRect.Top()
+ << (INT32)rRect.Right()
+ << (INT32)rRect.Bottom();
+}
+
+// ---------------------------------------------------------------------------------------------
+
void EscherEx::AddClientAnchor( const Rectangle& rRect )
{
AddAtom( 8, ESCHER_ClientAnchor );
@@ -4699,15 +4710,10 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe
if( rShapeName.Len() > 0 )
aPropOpt.AddOpt( ESCHER_Prop_wzName, rShapeName );
- aPropOpt.Commit( *mpOutStrm );
+ Commit( aPropOpt, aRect );
if ( mnGroupLevel > 1 )
- {
- AddAtom( 16, ESCHER_ChildAnchor );
- *mpOutStrm << (INT32)aRect.Left()
- << (INT32)aRect.Top()
- << (INT32)aRect.Right()
- << (INT32)aRect.Bottom();
- }
+ AddChildAnchor( aRect );
+
EscherExHostAppData* pAppData = mpImplEscherExSdr->ImplGetHostData();
if( pAppData )
{
@@ -4805,6 +4811,13 @@ UINT32 EscherEx::GetShapeID()
// ---------------------------------------------------------------------------------------------
+void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& )
+{
+ rProps.Commit( GetStream() );
+}
+
+// ---------------------------------------------------------------------------------------------
+
UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap )
{
if ( bSwap )
diff --git a/svx/source/msfilter/eschesdo.cxx b/svx/source/msfilter/eschesdo.cxx
index 8057eded6131..65157df81baa 100644
--- a/svx/source/msfilter/eschesdo.cxx
+++ b/svx/source/msfilter/eschesdo.cxx
@@ -736,16 +736,10 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.GetAngle() )
ImplFlipBoundingBox( rObj, aPropOpt );
- aPropOpt.Commit( mpEscherEx->GetStream() );
+ mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
if( mpEscherEx->GetGroupLevel() > 1 )
- {
- mpEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
- const Rectangle& rRect = rObj.GetRect();
- mpEscherEx->GetStream() << (INT32)rRect.Left()
- << (INT32)rRect.Top()
- << (INT32)rRect.Right()
- << (INT32)rRect.Bottom();
- }
+ mpEscherEx->AddChildAnchor( rObj.GetRect() );
+
if ( mpHostAppData )
{ //! with AdditionalText the App has to control whether these are written or not
mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.GetRect() );
@@ -839,15 +833,10 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
rObj.GetRect() );
}
rObj.SetAngle( nAngle );
- aPropOpt.Commit( mpEscherEx->GetStream() );
+ mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
// write the childanchor
- mpEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
- const Rectangle& rRect = rObj.GetRect();
- mpEscherEx->GetStream() << (INT32)rRect.Left()
- << (INT32)rRect.Top()
- << (INT32)rRect.Right()
- << (INT32)rRect.Bottom();
+ mpEscherEx->AddChildAnchor( rObj.GetRect() );
#if defined EES_WRITE_EPP
// ClientAnchor
diff --git a/svx/source/msfilter/makefile.mk b/svx/source/msfilter/makefile.mk
index bc246eaecadf..adbe8b104860 100644
--- a/svx/source/msfilter/makefile.mk
+++ b/svx/source/msfilter/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=msfilter
+LIBTARGET=NO
AUTOSEG=true
# --- Settings -----------------------------------------------------
@@ -42,25 +43,29 @@ AUTOSEG=true
# --- Files --------------------------------------------------------
-SLOFILES=\
+LIB1TARGET= $(SLB)$/$(TARGET)-msfilter.lib
+LIB1OBJFILES= \
$(SLO)$/countryid.obj \
$(SLO)$/escherex.obj \
$(SLO)$/eschesdo.obj \
$(SLO)$/msdffimp.obj \
$(SLO)$/msoleexp.obj \
$(SLO)$/msvbasic.obj \
- $(SLO)$/msashape.obj \
$(SLO)$/svxmsbas.obj \
$(SLO)$/msocximex.obj \
- $(SLO)$/msashape3d.obj \
$(SLO)$/mscodec.obj \
$(SLO)$/msfiltertracer.obj
+LIB2TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB2OBJFILES= \
+ $(SLO)$/svxmsbas2.obj
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
EXCEPTIONSFILES= \
$(SLO)$/eschesdo.obj \
$(SLO)$/escherex.obj \
$(SLO)$/msdffimp.obj \
- $(SLO)$/msashape3d.obj \
$(SLO)$/msvbasic.obj \
$(SLO)$/msocximex.obj \
$(SLO)$/msoleexp.obj \
diff --git a/svx/source/msfilter/msashape.cxx b/svx/source/msfilter/msashape.cxx
deleted file mode 100644
index dda791643388..000000000000
--- a/svx/source/msfilter/msashape.cxx
+++ /dev/null
@@ -1,6536 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: msashape.cxx,v $
- * $Revision: 1.44 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <osl/endian.h>
-#include <msashape.hxx>
-#include <svx/svdocirc.hxx>
-#include <svx/svdogrp.hxx>
-#include <svx/svdopath.hxx>
-#include <svx/svdpage.hxx>
-#include <svx/xflclit.hxx>
-#include <svx/sdasaitm.hxx>
-#include <svtools/itemset.hxx>
-#include <svx/svdmodel.hxx>
-#include <rtl/crc.h>
-#include <svx/xlnstit.hxx>
-#include <svx/xlnedit.hxx>
-#include <svx/xlnstwit.hxx>
-#include <svx/xlnedwit.hxx>
-#include <svx/xlnstcit.hxx>
-#include <svx/xlnedcit.hxx>
-
-#include <math.h>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-
-struct SvxMSDffVertPair
-{
- sal_Int32 nValA;
- sal_Int32 nValB;
-};
-struct SvxMSDffCalculationData
-{
- sal_uInt16 nFlags;
- sal_Int16 nVal1;
- sal_Int16 nVal2;
- sal_Int16 nVal3;
-};
-struct SvxMSDffTextRectangles
-{
- SvxMSDffVertPair nPairA;
- SvxMSDffVertPair nPairB;
-};
-
-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;
-};
-
-#define GEOMETRY_USED_LEFT 1
-#define GEOMETRY_USED_TOP 2
-#define GEOMETRY_USED_RIGHT 4
-#define GEOMETRY_USED_BOTTOM 8
-
-/*
-static const SvxMSDffVertPair Vert[] =
-{
- { 0, 0, }
-};
-static const sal_uInt16 Segm[] =
-{
- 0x4000,
- 0x8000
-};
-static const SvxMSDffCalculationData Calc[] =
-{
- { 0x0000, 0, 0, 0 }
-};
-static const sal_Int32 Default[] =
-{
- 0
-};
-static const SvxMSDffTextRect TextRect[] =
-{
- { { 0, 0 }, { 0, 0 } }
-};
-static const sal_Int32 BoundRect[] =
-{
- 0, 0, 21600, 21600
-};
-static const mso_CustomShape mso =
-{
- (SvxMSDffVertPair*)mso_sptVert, sizeof( mso_sptVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptSegm, sizeof( mso_sptSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCalc, sizeof( mso_sptCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault,
- (SvxMSDffTextRectangles*)mso_sptTextRect, sizeof( mso_sptTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptVert, sizeof( mso_sptVert ) / sizeof( SvxMSDffVertPair )
-};
-*/
-
-#define MSO_I | (sal_Int32)0x80000000
-
-static const sal_Int32 mso_sptDefault0[] =
-{
- 1, 0
-};
-static const sal_Int32 mso_sptDefault1400[] =
-{
- 1, 1400
-};
-static const sal_Int32 mso_sptDefault1800[] =
-{
- 1, 1800
-};
-static const sal_Int32 mso_sptDefault2500[] =
-{
- 1, 2500
-};
-static const sal_Int32 mso_sptDefault2700[] =
-{
- 1, 2700
-};
-static const sal_Int32 mso_sptDefault3600[] =
-{
- 1, 3600
-};
-static const sal_Int32 mso_sptDefault3700[] =
-{
- 1, 3700
-};
-static const sal_Int32 mso_sptDefault5400[] =
-{
- 1, 5400
-};
-static const sal_Int32 mso_sptDefault8100[] =
-{
- 1, 5400
-};
-static const sal_Int32 mso_sptDefault10800[] =
-{
- 1, 10800
-};
-static const sal_Int32 mso_sptDefault16200and5400[] =
-{
- 2, 16200, 5400
-};
-
-static const sal_Int32 mso_sptArcDefault[] =
-{
- 2, 270 << 16, 0
-};
-static const SvxMSDffVertPair mso_sptStandardGluePoints[] =
-{
- { 10800, 0 }, { 0, 10800 }, { 10800, 21600 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoArc =
-{
- NULL, 0,
- NULL, 0,
- NULL, 0,
- (sal_Int32*)mso_sptArcDefault,
- NULL, 0,
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const mso_CustomShape msoRectangle =
-{
- NULL, 0,
- NULL, 0,
- NULL, 0,
- NULL,
- NULL, 0,
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffCalculationData mso_sptRoundRectangleCalc[] = // adjustment1 : 0 - 10800
-{
- { 0x2001, DFF_Prop_adjustValue, 1, 3 },
- { 0xa000, DFF_Prop_geoRight, 0, 0x400},
- { 0xa000, DFF_Prop_geoBottom, 0, 0x400},
- { 0x6000, DFF_Prop_geoLeft, 0x400, 0 },
- { 0x6000, DFF_Prop_geoTop, 0x400, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptRoundRectangleTextRect[] =
-{
- { { 3 MSO_I, 4 MSO_I }, { 1 MSO_I, 2 MSO_I } }
-};
-static const mso_CustomShape msoRoundRectangle =
-{
- NULL, 0,
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptRoundRectangleCalc, sizeof( mso_sptRoundRectangleCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault3600,
- (SvxMSDffTextRectangles*)mso_sptRoundRectangleTextRect, sizeof( mso_sptRoundRectangleTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptRightTriangleVert[] =
-{
- { 0, 0 }, { 21600, 21600 }, { 0, 21600 }, { 0, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptRightTriangleTextRect[] =
-{
- { { 1900, 12700 }, { 12700, 19700 } }
-};
-static const SvxMSDffVertPair mso_sptRightTriangleGluePoints[] =
-{
- { 10800, 0 }, { 5400, 10800 }, { 0, 21600 }, { 10800, 21600 }, { 21600, 21600 }, { 16200, 10800 }
-};
-static const mso_CustomShape msoRightTriangle =
-{
- (SvxMSDffVertPair*)mso_sptRightTriangleVert, sizeof( mso_sptRightTriangleVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptRightTriangleTextRect, sizeof( mso_sptRightTriangleTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptRightTriangleGluePoints, sizeof( mso_sptRightTriangleGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffTextRectangles mso_sptEllipseTextRect[] =
-{
- { { 3200, 3200 }, { 18400, 18400 } }
-};
-static const SvxMSDffVertPair mso_sptEllipseGluePoints[] =
-{
- { 10800, 0 }, { 3160, 3160 }, { 0, 10800 }, { 3160, 18440 }, { 10800, 21600 }, { 18440, 18440 }, { 21600, 10800 }, { 18440, 3160 }
-};
-static const mso_CustomShape msoEllipse =
-{
- NULL, 0,
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptEllipseTextRect, sizeof( mso_sptEllipseTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptParallelogramVert[] = // adjustment1 : 0 - 21600
-{
- { 0 MSO_I, 0 }, { 21600, 0 }, { 1 MSO_I, 21600 }, { 0, 21600 }
-};
-static const sal_uInt16 mso_sptParallelogramSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptParallelogramCalc[] =
-{
- { 0x4000, 0, DFF_Prop_adjustValue, 0 },
- { 0x8000, 0, 21600, DFF_Prop_adjustValue },
- { 0x2001, DFF_Prop_adjustValue, 10, 24 },
- { 0x2000, 0x0402, 1750, 0 },
- { 0x8000, 21600, 0, 0x0403 },
- { 0x2001, 0x400, 1, 2 },
- { 0x4000, 10800, 0x405, 0 },
- { 0x2000, 0x400, 0, 10800 },
- { 0x6006, 0x407, 0x40d, 0 },
- { 0x8000, 10800, 0, 0x405 },
- { 0x6006, 0x407, 0x40c, 21600 },
- { 0x8000, 21600, 0, 0x405 },
- { 0x8001, 21600, 10800, 0x400 },
- { 0x8000, 21600, 0, 0x40c }
-};
-static const SvxMSDffTextRectangles mso_sptParallelogramTextRect[] =
-{
- { { 3 MSO_I, 3 MSO_I }, { 4 MSO_I, 4 MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptParallelogramGluePoints[] =
-{
- { 6 MSO_I, 0 }, { 10800, 8 MSO_I }, { 11 MSO_I, 10800 }, { 9 MSO_I, 21600 }, { 10800, 10 MSO_I }, { 5 MSO_I, 10800 }
-};
-static const mso_CustomShape msoParallelogram =
-{
- (SvxMSDffVertPair*)mso_sptParallelogramVert, sizeof( mso_sptParallelogramVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptParallelogramSegm, sizeof( mso_sptParallelogramSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptParallelogramCalc, sizeof( mso_sptParallelogramCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptParallelogramTextRect, sizeof( mso_sptParallelogramTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptParallelogramGluePoints, sizeof( mso_sptParallelogramGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptDiamondVert[] =
-{
- { 10800, 0 }, { 21600, 10800 }, { 10800, 21600 }, { 0, 10800 }, { 10800, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptDiamondTextRect[] =
-{
- { { 5400, 5400 }, { 16200, 16200 } }
-};
-static const mso_CustomShape msoDiamond =
-{
- (SvxMSDffVertPair*)mso_sptDiamondVert, sizeof( mso_sptDiamondVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptDiamondTextRect, sizeof( mso_sptDiamondTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptTrapezoidVert[] = // adjustment1 : 0 - 10800
-{
- { 0, 0 }, { 21600, 0 }, {0 MSO_I, 21600 }, { 1 MSO_I, 21600 }
-};
-static const sal_uInt16 mso_sptTrapezoidSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptTrapezoidCalc[] =
-{
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2001, DFF_Prop_adjustValue, 10, 18 },
- { 0x2000, 0x0402, 1750, 0 },
- { 0x8000, 21600, 0, 0x403 },
- { 0x2001, DFF_Prop_adjustValue, 1, 2 },
- { 0x8000, 21600, 0, 0x405 }
-};
-static const SvxMSDffTextRectangles mso_sptTrapezoidTextRect[] =
-{
- { { 3 MSO_I, 3 MSO_I }, { 4 MSO_I, 4 MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptTrapezoidGluePoints[] =
-{
- { 6 MSO_I, 10800 }, { 10800, 21600 }, { 5 MSO_I, 10800 }, { 10800, 0 }
-};
-static const mso_CustomShape msoTrapezoid =
-{
- (SvxMSDffVertPair*)mso_sptTrapezoidVert, sizeof( mso_sptTrapezoidVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptTrapezoidSegm, sizeof( mso_sptTrapezoidSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptTrapezoidCalc, sizeof( mso_sptTrapezoidCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptTrapezoidTextRect, sizeof( mso_sptTrapezoidTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptTrapezoidGluePoints, sizeof( mso_sptTrapezoidGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptOctagonVert[] = // adjustment1 : 0 - 10800
-{
- { 0 MSO_I, 0 }, { 2 MSO_I, 0 }, { 21600, 1 MSO_I }, { 21600, 3 MSO_I },
- { 2 MSO_I, 21600 }, { 0 MSO_I, 21600 }, { 0, 3 MSO_I }, { 0, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptOctagonSegm[] =
-{
- 0x4000, 0x0007, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptOctagonCalc[] =
-{
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x2001, DFF_Prop_adjustValue, 1, 2 },
- { 0x6000, DFF_Prop_geoLeft, 0x404, 0 },
- { 0x6000, DFF_Prop_geoTop, 0x404, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, 0x404 },
- { 0xa000, DFF_Prop_geoBottom, 0, 0x404 }
-};
-static const sal_Int32 mso_sptOctagonDefault[] =
-{
- 1, 5000
-};
-static const SvxMSDffTextRectangles mso_sptOctagonTextRect[] =
-{
- { { 5 MSO_I, 6 MSO_I }, { 7 MSO_I, 8 MSO_I } }
-};
-static const mso_CustomShape msoOctagon =
-{
- (SvxMSDffVertPair*)mso_sptOctagonVert, sizeof( mso_sptOctagonVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptOctagonSegm, sizeof( mso_sptOctagonSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptOctagonCalc, sizeof( mso_sptOctagonCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptOctagonDefault,
- (SvxMSDffTextRectangles*)mso_sptOctagonTextRect, sizeof( mso_sptOctagonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptIsocelesTriangleVert[] = // adjustment1 : 0 - 21600
-{
- { 0 MSO_I, 0 }, { 21600, 21600 }, { 0, 21600 }
-};
-static const sal_uInt16 mso_sptIsocelesTriangleSegm[] =
-{
- 0x4000, 0x0002, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptIsocelesTriangleCalc[] =
-{
- { 0x4000, 0, DFF_Prop_adjustValue, 0 },
- { 0x2001, DFF_Prop_adjustValue, 1, 2 },
- { 0x2000, 0x401, 10800, 0 },
- { 0x2001, DFF_Prop_adjustValue, 2, 3 },
- { 0x2000, 0x403, 7200, 0 },
- { 0x8000, 21600, 0, 0x400 },
- { 0x2001, 0x405, 1, 2 },
- { 0x8000, 21600, 0, 0x406 }
-};
-static const SvxMSDffTextRectangles mso_sptIsocelesTriangleTextRect[] =
-{
- { { 1 MSO_I, 10800 }, { 2 MSO_I, 18000 } },
- { { 3 MSO_I, 7200 }, { 4 MSO_I, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptIsocelesTriangleGluePoints[] =
-{
- { 10800, 0 }, { 1 MSO_I, 10800 }, { 0, 21600 }, { 10800, 21600 }, { 21600, 21600 }, { 7 MSO_I, 10800 }
-};
-static const mso_CustomShape msoIsocelesTriangle =
-{
- (SvxMSDffVertPair*)mso_sptIsocelesTriangleVert, sizeof( mso_sptIsocelesTriangleVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptIsocelesTriangleSegm, sizeof( mso_sptIsocelesTriangleSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptIsocelesTriangleCalc, sizeof( mso_sptIsocelesTriangleCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault10800,
- (SvxMSDffTextRectangles*)mso_sptIsocelesTriangleTextRect, sizeof( mso_sptIsocelesTriangleTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptIsocelesTriangleGluePoints, sizeof( mso_sptIsocelesTriangleGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptHexagonVert[] = // adjustment1 : 0 - 10800
-{
- { 0 MSO_I, 0 }, { 1 MSO_I, 0 }, { 21600, 10800 }, { 1 MSO_I, 21600 },
- { 0 MSO_I, 21600 }, { 0, 10800 }
-};
-static const sal_uInt16 mso_sptHexagonSegm[] =
-{
- 0x4000, 0x0005, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptHexagonCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x2001, DFF_Prop_adjustValue, 100, 234 },
- { 0x2000, 0x402, 1700, 0 },
- { 0x8000, 21600, 0, 0x403 }
-};
-static const SvxMSDffTextRectangles mso_sptHexagonTextRect[] =
-{
- { { 3 MSO_I, 3 MSO_I }, { 4 MSO_I, 4 MSO_I } }
-};
-static const mso_CustomShape msoHexagon =
-{
- (SvxMSDffVertPair*)mso_sptHexagonVert, sizeof( mso_sptHexagonVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptHexagonSegm, sizeof( mso_sptHexagonSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptHexagonCalc, sizeof( mso_sptHexagonCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptHexagonTextRect, sizeof( mso_sptHexagonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptPentagonVert[] =
-{
- { 10800, 0 }, { 0, 8260 }, { 4230, 21600 }, { 17370, 21600 },
- { 21600, 8260 }, { 10800, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptPentagonTextRect[] =
-{
- { { 4230, 5080 }, { 17370, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptPentagonGluePoints[] =
-{
- { 10800, 0 }, { 0, 8260 }, { 4230, 21600 }, { 10800, 21600 },
- { 17370, 21600 }, { 21600, 8260 }
-};
-static const mso_CustomShape msoPentagon =
-{
- (SvxMSDffVertPair*)mso_sptPentagonVert, sizeof( mso_sptPentagonVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptPentagonTextRect, sizeof( mso_sptPentagonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptPentagonGluePoints, sizeof( mso_sptPentagonGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptPlusVert[] = // adjustment1 : 0 - 10800
-{
- { 1 MSO_I, 0 }, { 2 MSO_I, 0 }, { 2 MSO_I, 1 MSO_I }, { 21600, 1 MSO_I },
- { 21600, 2 MSO_I }, { 2 MSO_I, 2 MSO_I }, { 2 MSO_I, 21600 }, { 1 MSO_I, 21600 },
- { 1 MSO_I, 2 MSO_I }, { 0, 2 MSO_I }, { 0, 1 MSO_I }, { 1 MSO_I, 1 MSO_I }, { 1 MSO_I, 0 }
-};
-static const SvxMSDffCalculationData mso_sptPlusCalc[] =
-{
- { 0x2001, DFF_Prop_adjustValue, 10799, 10800 },
- { 0x2000, 0x400, 0, 0 },
- { 0x8000, 21600, 0, 0x400 }
-};
-static const SvxMSDffTextRectangles mso_sptPlusTextRect[] =
-{
- { { 1 MSO_I, 1 MSO_I }, { 2 MSO_I, 2 MSO_I } }
-};
-static const mso_CustomShape msoPlus =
-{
- (SvxMSDffVertPair*)mso_sptPlusVert, sizeof( mso_sptPlusVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptPlusCalc, sizeof( mso_sptPlusCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptPlusTextRect, sizeof( mso_sptPlusTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 10800, 10800,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptCanVert[] = // adjustment1 : 0 - 10800
-{
- { 44, 0 },
- { 20, 0 }, { 0, 2 MSO_I }, { 0, 0 MSO_I }, // ccp
- { 0, 3 MSO_I }, // p
- { 0, 4 MSO_I }, { 20, 10800 }, { 44, 10800 }, // ccp
- { 68, 10800 }, { 88, 4 MSO_I }, { 88, 3 MSO_I }, // ccp
- { 88, 0 MSO_I }, // p
- { 88, 2 MSO_I }, { 68, 0 }, { 44, 0 }, // ccp
- { 44, 0 }, // p
- { 20, 0 }, { 0, 2 MSO_I }, { 0, 0 MSO_I }, // ccp
- { 0, 5 MSO_I }, { 20, 6 MSO_I }, { 44, 6 MSO_I }, // ccp
- { 68, 6 MSO_I },{ 88, 5 MSO_I }, { 88, 0 MSO_I }, // ccp
- { 88, 2 MSO_I },{ 68, 0 }, { 44, 0 } // ccp
-};
-static const sal_uInt16 mso_sptCanSegm[] =
-{
- 0x4000, 0x2001, 0x0001, 0x2002, 0x0001, 0x2001, 0x6001, 0x8000,
- 0x4000, 0x2004, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCanCalc[] =
-{
- { 0x2001, DFF_Prop_adjustValue, 1, 4 }, // 1/4
- { 0x2001, 0x0400, 6, 11 },
- { 0xa000, 0x0400, 0, 0x0401 },
- { 0x8000, 10800, 0, 0x0400 },
- { 0x6000, 0x0403, 0x0401, 0 },
- { 0x6000, 0x0400, 0x0401, 0 },
- { 0x2001, DFF_Prop_adjustValue, 1, 2 }
-};
-static const SvxMSDffTextRectangles mso_sptCanTextRect[] =
-{
- { { 0, 6 MSO_I }, { 88, 3 MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptCanGluePoints[] =
-{
- { 44, 6 MSO_I }, { 44, 0 }, { 0, 5400 }, { 44, 10800 }, { 88, 5400 }
-};
-static const sal_Int32 mso_sptCanBoundRect[] =
-{
- 0, 0, 88, 10800
-};
-static const mso_CustomShape msoCan =
-{
- (SvxMSDffVertPair*)mso_sptCanVert, sizeof( mso_sptCanVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptCanSegm, sizeof( mso_sptCanSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCanCalc, sizeof( mso_sptCanCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptCanTextRect, sizeof( mso_sptCanTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 88, 10800,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptCanGluePoints, sizeof( mso_sptCanGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptArrowVert[] = // adjustment1: x 0 - 21600
-{ // adjustment2: y 0 - 10800
- { 0, 0 MSO_I }, { 1 MSO_I, 0 MSO_I }, { 1 MSO_I, 0 }, { 21600, 10800 },
- { 1 MSO_I, 21600 }, { 1 MSO_I, 2 MSO_I }, { 0, 2 MSO_I }
-};
-static const sal_uInt16 mso_sptArrowSegm[] =
-{
- 0x4000, 0x0006, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value },
- { 0x8000, 21600, 0, 0x401 },
- { 0x6001, 0x403, 0x400, 10800 },
- { 0x6000, 0x401, 0x404, 0 },
- { 0x6001, 0x401, 0x400, 10800 },
- { 0xa000, 0x401, 0, 0x406 }
-};
-static const SvxMSDffTextRectangles mso_sptArrowTextRect[] =
-{
- { { 0, 0 MSO_I }, { 5 MSO_I, 2 MSO_I } }
-};
-static const mso_CustomShape msoArrow =
-{
- (SvxMSDffVertPair*)mso_sptArrowVert, sizeof( mso_sptArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptArrowSegm, sizeof( mso_sptArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptArrowCalc, sizeof( mso_sptArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault16200and5400,
- (SvxMSDffTextRectangles*)mso_sptArrowTextRect, sizeof( mso_sptArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptLeftArrowVert[] = // adjustment1: x 0 - 21600
-{ // adjustment2: y 0 - 10800
- { 21600, 0 MSO_I }, { 1 MSO_I, 0 MSO_I }, { 1 MSO_I, 0 }, { 0, 10800 },
- { 1 MSO_I, 21600 }, { 1 MSO_I, 2 MSO_I }, { 21600, 2 MSO_I }
-};
-static const sal_uInt16 mso_sptLeftArrowSegm[] =
-{
- 0x4000, 0x0006, 0x6001, 0x8000
-};
-static const sal_Int32 mso_sptLeftArrowDefault[] =
-{
- 2, 5400, 5400
-};
-static const SvxMSDffTextRectangles mso_sptLeftArrowTextRect[] =
-{
- { { 7 MSO_I, 0 MSO_I }, { 21600, 2 MSO_I } }
-};
-static const mso_CustomShape msoLeftArrow =
-{
- (SvxMSDffVertPair*)mso_sptLeftArrowVert, sizeof( mso_sptLeftArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptLeftArrowSegm, sizeof( mso_sptLeftArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptArrowCalc, sizeof( mso_sptArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptLeftArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftArrowTextRect, sizeof( mso_sptLeftArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptDownArrowVert[] = // adjustment1: x 0 - 21600
-{ // adjustment2: y 0 - 10800
- { 0 MSO_I, 0 }, { 0 MSO_I, 1 MSO_I }, { 0, 1 MSO_I }, { 10800, 21600 },
- { 21600, 1 MSO_I }, { 2 MSO_I, 1 MSO_I }, { 2 MSO_I, 0 }
-};
-static const sal_uInt16 mso_sptDownArrowSegm[] =
-{
- 0x4000, 0x0006, 0x6001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptDownArrowTextRect[] =
-{
- { { 0 MSO_I, 0 }, { 2 MSO_I, 5 MSO_I } }
-};
-static const mso_CustomShape msoDownArrow =
-{
- (SvxMSDffVertPair*)mso_sptDownArrowVert, sizeof( mso_sptDownArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptDownArrowSegm, sizeof( mso_sptDownArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptArrowCalc, sizeof( mso_sptArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault16200and5400,
- (SvxMSDffTextRectangles*)mso_sptDownArrowTextRect, sizeof( mso_sptDownArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptUpArrowVert[] = // adjustment1: x 0 - 21600
-{ // adjustment2: y 0 - 10800
- { 0 MSO_I, 21600 }, { 0 MSO_I, 1 MSO_I }, { 0, 1 MSO_I }, { 10800, 0 },
- { 21600, 1 MSO_I }, { 2 MSO_I, 1 MSO_I }, { 2 MSO_I, 21600 }
-};
-static const sal_uInt16 mso_sptUpArrowSegm[] =
-{
- 0x4000, 0x0006, 0x6001, 0x8000
-};
-static const sal_Int32 mso_sptUpArrowDefault[] =
-{
- 2, 5400, 5400
-};
-static const SvxMSDffTextRectangles mso_sptUpArrowTextRect[] =
-{
- { { 0 MSO_I, 7 MSO_I }, { 2 MSO_I, 21600 } }
-};
-static const mso_CustomShape msoUpArrow =
-{
- (SvxMSDffVertPair*)mso_sptUpArrowVert, sizeof( mso_sptUpArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptUpArrowSegm, sizeof( mso_sptUpArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptArrowCalc, sizeof( mso_sptArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptUpArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptUpArrowTextRect, sizeof( mso_sptUpArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptLeftRightArrowVert[] = // adjustment1: x 0 - 10800
-{ // adjustment2: y 0 - 10800
- { 0, 10800 }, { 0 MSO_I, 0 }, { 0 MSO_I, 1 MSO_I }, { 2 MSO_I, 1 MSO_I },
- { 2 MSO_I, 0 }, { 21600, 10800 }, { 2 MSO_I, 21600 }, { 2 MSO_I, 3 MSO_I },
- { 0 MSO_I, 3 MSO_I }, { 0 MSO_I, 21600 }
-};
-static const sal_uInt16 mso_sptLeftRightArrowSegm[] =
-{
- 0x4000, 0x0009, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptDoubleArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value },
- { 0x8000, 10800, 0, DFF_Prop_adjust2Value },
- { 0x6001, DFF_Prop_adjustValue, 0x404, 10800 },
- { 0x8000, 21600, 0, 0x405 },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x6001, DFF_Prop_adjust2Value, 0x407, 10800 },
- { 0x8000, 21600, 0, 0x408 }
-};
-static const sal_Int32 mso_sptLeftRightArrowDefault[] =
-{
- 2, 4300, 5400
-};
-static const SvxMSDffTextRectangles mso_sptLeftRightArrowTextRect[] =
-{
- { { 5 MSO_I, 1 MSO_I }, { 6 MSO_I, 3 MSO_I } }
-};
-static const mso_CustomShape msoLeftRightArrow =
-{
- (SvxMSDffVertPair*)mso_sptLeftRightArrowVert, sizeof( mso_sptLeftRightArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptLeftRightArrowSegm, sizeof( mso_sptLeftRightArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptDoubleArrowCalc, sizeof( mso_sptDoubleArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptLeftRightArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftRightArrowTextRect, sizeof( mso_sptLeftRightArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptUpDownArrowVert[] = // adjustment1: x 0 - 10800
-{ // adjustment2: y 0 - 10800
- { 0, 1 MSO_I }, { 10800, 0 }, { 21600, 1 MSO_I }, { 2 MSO_I, 1 MSO_I },
- { 2 MSO_I, 3 MSO_I }, { 21600, 3 MSO_I }, { 10800, 21600 }, { 0, 3 MSO_I },
- { 0 MSO_I, 3 MSO_I }, { 0 MSO_I, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptUpDownArrowSegm[] =
-{
- 0x4000, 0x0009, 0x6001, 0x8000
-};
-static const sal_Int32 mso_sptUpDownArrowDefault[] =
-{
- 2, 5400, 4300
-};
-static const SvxMSDffTextRectangles mso_sptUpDownArrowTextRect[] =
-{
- { { 0 MSO_I, 8 MSO_I }, { 2 MSO_I, 9 MSO_I } }
-};
-static const mso_CustomShape msoUpDownArrow =
-{
- (SvxMSDffVertPair*)mso_sptUpDownArrowVert, sizeof( mso_sptUpDownArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptUpDownArrowSegm, sizeof( mso_sptUpDownArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptDoubleArrowCalc, sizeof( mso_sptDoubleArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptUpDownArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptUpDownArrowTextRect, sizeof( mso_sptUpDownArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptQuadArrowVert[] = // adjustment1: x 0 - 10800, adjustment2: x 0 - 10800
-{ // adjustment3: y 0 - 10800
- { 0, 10800 }, { 0 MSO_I, 1 MSO_I }, { 0 MSO_I, 2 MSO_I }, { 2 MSO_I, 2 MSO_I },
- { 2 MSO_I, 0 MSO_I }, { 1 MSO_I, 0 MSO_I }, { 10800, 0 }, { 3 MSO_I, 0 MSO_I },
- { 4 MSO_I, 0 MSO_I }, { 4 MSO_I, 2 MSO_I }, { 5 MSO_I, 2 MSO_I }, { 5 MSO_I, 1 MSO_I },
- { 21600, 10800 }, { 5 MSO_I, 3 MSO_I }, { 5 MSO_I, 4 MSO_I }, { 4 MSO_I, 4 MSO_I },
- { 4 MSO_I, 5 MSO_I }, { 3 MSO_I, 5 MSO_I }, { 10800, 21600 }, { 1 MSO_I, 5 MSO_I },
- { 2 MSO_I, 5 MSO_I }, { 2 MSO_I, 4 MSO_I }, { 0 MSO_I, 4 MSO_I }, { 0 MSO_I, 3 MSO_I }
-};
-static const sal_uInt16 mso_sptQuadArrowSegm[] =
-{
- 0x4000, 0x0017, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptQuadArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value },
- { 0x8000, 21600, 0, DFF_Prop_adjust3Value }
-};
-static const sal_Int32 mso_sptQuadArrowDefault[] =
-{
- 3, 6500, 8600, 4300
-};
-static const SvxMSDffTextRectangles mso_sptQuadArrowTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoQuadArrow =
-{
- (SvxMSDffVertPair*)mso_sptQuadArrowVert, sizeof( mso_sptQuadArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptQuadArrowSegm, sizeof( mso_sptQuadArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptQuadArrowCalc, sizeof( mso_sptQuadArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptQuadArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptQuadArrowTextRect, sizeof( mso_sptQuadArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptLeftRightUpArrowVert[] = // adjustment1: x 0 - 10800, adjustment2: x 0 - 10800
-{ // adjustment3: y 0 - 21600
- { 10800, 0 }, { 3 MSO_I, 2 MSO_I }, { 4 MSO_I, 2 MSO_I }, { 4 MSO_I, 1 MSO_I },
- { 5 MSO_I, 1 MSO_I }, { 5 MSO_I, 0 MSO_I }, { 21600, 10800 }, { 5 MSO_I, 3 MSO_I },
- { 5 MSO_I, 4 MSO_I }, { 2 MSO_I, 4 MSO_I }, { 2 MSO_I, 3 MSO_I }, { 0, 10800 },
- { 2 MSO_I, 0 MSO_I }, { 2 MSO_I, 1 MSO_I }, { 1 MSO_I, 1 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 0 MSO_I, 2 MSO_I }
-};
-static const sal_uInt16 mso_sptLeftRightUpArrowSegm[] =
-{
- 0x4000, 0x0010, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptLeftRightUpArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
- { 0x6001, 0x0403, DFF_Prop_adjust3Value, 21600 }, // 2
- { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 3
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 4
- { 0x8000, 21600, 0, 0x0402 } // 5
-};
-static const sal_Int32 mso_sptLeftRightUpArrowDefault[] =
-{
- 3, 6500, 8600, 6200
-};
-static const SvxMSDffTextRectangles mso_sptLeftRightUpArrowTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoLeftRightUpArrow =
-{
- (SvxMSDffVertPair*)mso_sptLeftRightUpArrowVert, sizeof( mso_sptLeftRightUpArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptLeftRightUpArrowSegm, sizeof( mso_sptLeftRightUpArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptLeftRightUpArrowCalc, sizeof( mso_sptLeftRightUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptLeftRightUpArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftRightUpArrowTextRect, sizeof( mso_sptLeftRightUpArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptBentArrowVert[] = // adjustment1 : x 12427 - 21600
-{ // adjustment2 : y 0 - 6079
- { 0, 21600 }, { 0, 12160 }, { 12427, 1 MSO_I }, { 0 MSO_I, 1 MSO_I },
- { 0 MSO_I, 0 }, { 21600, 6079 }, { 0 MSO_I, 12158 }, { 0 MSO_I, 2 MSO_I },
- { 12427, 2 MSO_I }, { 4 MSO_I, 12160 }, { 4 MSO_I, 21600 }
-};
-static const sal_uInt16 mso_sptBentArrowSegm[] =
-{
- 0x4000, 0x0001, 0xa801, 0x0006, 0xa701, 0x0001, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptBentArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x8000, 12158, 0, DFF_Prop_adjust2Value },
- { 0x8000, 6079, 0, DFF_Prop_adjust2Value },
- { 0x2001, 0x0403, 2, 1 }
-};
-static const sal_Int32 mso_sptBentArrowDefault[] =
-{
- 2, 15100, 2900
-};
-static const SvxMSDffTextRectangles mso_sptBentArrowTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoBentArrow =
-{
- (SvxMSDffVertPair*)mso_sptBentArrowVert, sizeof( mso_sptBentArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBentArrowSegm, sizeof( mso_sptBentArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBentArrowCalc, sizeof( mso_sptBentArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptBentArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptBentArrowTextRect, sizeof( mso_sptBentArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptUturnArrowVert[] =
-{
- { 0, 21600 }, { 0, 8550 }, // pp
- { 0, 3540 }, { 4370, 0 }, { 9270, 0 }, // ccp
- { 13890, 0 }, { 18570, 3230 }, { 18600, 8300 }, // ccp
- { 21600, 8300 }, { 15680, 14260 }, { 9700, 8300 }, { 12500, 8300 }, // pppp
- { 12320, 6380 }, { 10870, 5850 }, { 9320, 5850 }, // ccp
- { 7770, 5850 }, { 6040, 6410 }, { 6110, 8520 }, // ccp
- { 6110, 21600 }
-};
-static const sal_uInt16 mso_sptUturnArrowSegm[] =
-{
- 0x4000, 0x0001, 0x2002, 0x0004, 0x2002, 0x0001, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptUturnArrowTextRect[] =
-{
- { { 0, 8280 }, { 6110, 21600 } }
-};
-static const mso_CustomShape msoUturnArrow =
-{
- (SvxMSDffVertPair*)mso_sptUturnArrowVert, sizeof( mso_sptUturnArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptUturnArrowSegm, sizeof( mso_sptUturnArrowSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptUturnArrowTextRect, sizeof( mso_sptUturnArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptLeftUpArrowVert[] = // adjustment1 : x 0 - 21600, adjustment2 : x 0 - 21600
-{ // adjustment3 : y 0 - 21600
- { 0, 5 MSO_I }, { 2 MSO_I, 0 MSO_I }, { 2 MSO_I, 7 MSO_I }, { 7 MSO_I, 7 MSO_I },
- { 7 MSO_I, 2 MSO_I }, { 0 MSO_I, 2 MSO_I }, { 5 MSO_I, 0 }, { 21600, 2 MSO_I },
- { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 1 MSO_I }, { 2 MSO_I, 1 MSO_I }, { 2 MSO_I, 21600 }
-};
-static const sal_uInt16 mso_sptLeftUpArrowSegm[] =
-{
- 0x4000, 0x000b, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptLeftUpArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
- { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 3
- { 0x2001, 0x0403, 1, 2 }, // 4
- { 0x6000, DFF_Prop_adjustValue, 0x0404, 0 }, // 5
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 6
- { 0x6000, DFF_Prop_adjustValue, 0x0406, 0 } // 7
-};
-static const sal_Int32 mso_sptLeftUpArrowDefault[] =
-{
- 3, 9340, 18500, 6200
-};
-static const SvxMSDffTextRectangles mso_sptLeftUpArrowTextRect[] =
-{
- { { 2 MSO_I, 7 MSO_I }, { 1 MSO_I, 1 MSO_I } },
- { { 7 MSO_I, 2 MSO_I }, { 1 MSO_I, 1 MSO_I } }
-};
-static const mso_CustomShape msoLeftUpArrow =
-{
- (SvxMSDffVertPair*)mso_sptLeftUpArrowVert, sizeof( mso_sptLeftUpArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptLeftUpArrowSegm, sizeof( mso_sptLeftUpArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptLeftUpArrowCalc, sizeof( mso_sptLeftUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptLeftUpArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftUpArrowTextRect, sizeof( mso_sptLeftUpArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptBentUpArrowVert[] = // adjustment1 : x 0 - 21600, adjustment2 : x 0 - 21600
-{ // adjustment3 : y 0 - 21600
- { 0, 8 MSO_I }, { 7 MSO_I, 8 MSO_I }, { 7 MSO_I, 2 MSO_I }, { 0 MSO_I, 2 MSO_I },
- { 5 MSO_I, 0 }, { 21600, 2 MSO_I }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 21600 },
- { 0, 21600 }
-};
-static const sal_uInt16 mso_sptBentUpArrowSegm[] =
-{
- 0x4000, 0x0008, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptBentUpArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
- { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 3
- { 0x2001, 0x0403, 1, 2 }, // 4
- { 0x6000, DFF_Prop_adjustValue, 0x0404, 0 }, // 5
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 6
- { 0x6000, DFF_Prop_adjustValue, 0x0406, 0 }, // 7
- { 0x6000, 0x0407, 0x0406, 0 } // 8
-};
-static const sal_Int32 mso_sptBentUpArrowDefault[] =
-{
- 3, 9340, 18500, 7200
-};
-static const SvxMSDffTextRectangles mso_sptBentUpArrowTextRect[] =
-{
- { { 2 MSO_I, 7 MSO_I }, { 1 MSO_I, 1 MSO_I } },
- { { 7 MSO_I, 2 MSO_I }, { 1 MSO_I, 1 MSO_I } }
-};
-static const mso_CustomShape msoBentUpArrow =
-{
- (SvxMSDffVertPair*)mso_sptBentUpArrowVert, sizeof( mso_sptBentUpArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBentUpArrowSegm, sizeof( mso_sptBentUpArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBentUpArrowCalc, sizeof( mso_sptBentUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptBentUpArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptBentUpArrowTextRect, sizeof( mso_sptBentUpArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptCurvedArrowVert[] = // adjustment1 : y 10800 - 21600, adjustment2 : y 16424 - 21600
-{ // adjustment3 : x 0 - 21600
- { 21600, 0 },
- { 9675, 0 }, { 0, 10 MSO_I }, { 0, 9 MSO_I }, // ccp
- { 0, 11 MSO_I },
- { 0, 14 MSO_I }, { 15 MSO_I, 1 MSO_I }, { 2 MSO_I, 1 MSO_I }, // ccp
- { 2 MSO_I, 21600 }, { 21600, 7 MSO_I }, { 2 MSO_I, 0 MSO_I }, { 2 MSO_I, 16 MSO_I },// pppp
- { 2 MSO_I, 16 MSO_I }, { 80, 8 MSO_I }, { 80, 8 MSO_I }, // ccp
- { 80, 8 MSO_I }, { 21600, 5 MSO_I }, { 21600, 0 } // ccp
-};
-static const sal_uInt16 mso_sptCurvedArrowSegm[] =
-{
- 0x4000, 0x2001, 0x0001, 0x2001, 0x0004, 0x2002, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCurvedArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 3
- { 0xa000, DFF_Prop_adjust2Value, 0, DFF_Prop_adjustValue }, // 4
- { 0xa000, 0x0404, 0, 0x0403 }, // 5
- { 0x2001, 0x0405, 1, 2 }, // 6
- { 0xa000, DFF_Prop_adjust2Value, 0, 0x0406 }, // 7
- { 0x2001, DFF_Prop_adjust2Value, 1, 2 }, // 8
- { 0xa000, 0x0408, 0, 0x0406 }, // 9
- { 0x2001, 0x0409, 10000, 22326 }, // 10
- { 0x6000, 0x0409, 0x0405, 0 }, // 11
- { 0xa000, DFF_Prop_adjust2Value, 0, 0x040b }, // 12
- { 0x2001, 0x040c, 10000, 23148 }, // 13
- { 0x6000, 0x040d, 0x040b, 0 }, // 14
- { 0x2001, DFF_Prop_adjust3Value, 10000, 25467 }, // 15
- { 0x6000, DFF_Prop_adjustValue, 0x0403, 0 } // 16
-};
-static const sal_Int32 mso_sptCurvedArrowDefault[] =
-{
- 3, 13000, 19400, 14400
-};
-static const SvxMSDffTextRectangles mso_sptCurvedArrowTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoCurvedArrow =
-{
- (SvxMSDffVertPair*)mso_sptCurvedArrowVert, sizeof( mso_sptCurvedArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptCurvedArrowSegm, sizeof( mso_sptCurvedArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCurvedArrowCalc, sizeof( mso_sptCurvedArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptCurvedArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptCurvedArrowTextRect, sizeof( mso_sptCurvedArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptStripedRightArrowVert[] = // adjustment1 : x 3375 - 21600
-{ // adjustment2 : y 0 - 10800
- { 3375, 0 MSO_I }, { 1 MSO_I, 0 MSO_I }, { 1 MSO_I, 0 }, { 21600, 10800 },
- { 1 MSO_I, 21600 }, { 1 MSO_I, 2 MSO_I }, { 3375, 2 MSO_I }, { 0, 0 MSO_I },
- { 675, 0 MSO_I }, { 675, 2 MSO_I }, { 0, 2 MSO_I }, { 1350, 0 MSO_I },
- { 2700, 0 MSO_I }, { 2700, 2 MSO_I }, { 1350, 2 MSO_I }
-};
-static const sal_uInt16 mso_sptStripedRightArrowSegm[] =
-{
- 0x4000, 0x0006, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptStripedRightArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value },
- { 0x8000, 21600, 0, 0x401 },
- { 0x6001, 0x403, 0x400, 10800 },
- { 0x6000, 0x401, 0x404, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptStripedRightArrowTextRect[] =
-{
- { { 3375, 0 MSO_I }, { 5 MSO_I, 2 MSO_I } }
-};
-static const mso_CustomShape msoStripedRightArrow =
-{
- (SvxMSDffVertPair*)mso_sptStripedRightArrowVert, sizeof( mso_sptStripedRightArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptStripedRightArrowSegm, sizeof( mso_sptStripedRightArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptStripedRightArrowCalc, sizeof( mso_sptStripedRightArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault16200and5400,
- (SvxMSDffTextRectangles*)mso_sptStripedRightArrowTextRect, sizeof( mso_sptStripedRightArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptNotchedRightArrowVert[] = // adjustment1 : x 0 - 21600 (default 16200)
-{ // adjustment2 : y 0 - 10800 (default 5400)
- { 0, 1 MSO_I }, { 0 MSO_I, 1 MSO_I }, { 0 MSO_I, 0 }, { 21600, 10800 },
- { 0 MSO_I, 21600 }, { 0 MSO_I, 2 MSO_I }, { 0, 2 MSO_I }, { 5 MSO_I, 10800 }, { 0, 1 MSO_I }
-};
-static const SvxMSDffCalculationData mso_sptNotchedRightArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjust2Value },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjust2Value },
- { 0x6001, 0x403, 0x404, 10800 }
-};
-static const SvxMSDffTextRectangles mso_sptNotchedRightArrowTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoNotchedRightArrow =
-{
- (SvxMSDffVertPair*)mso_sptNotchedRightArrowVert, sizeof( mso_sptNotchedRightArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)NULL, 0,
- (SvxMSDffCalculationData*)mso_sptNotchedRightArrowCalc, sizeof( mso_sptNotchedRightArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault16200and5400,
- (SvxMSDffTextRectangles*)mso_sptNotchedRightArrowTextRect, sizeof( mso_sptNotchedRightArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptHomePlateVert[] = // adjustment1 : x 0 - 21600
-{
- { 0, 0 }, { 0 MSO_I, 0 }, { 21600, 10800 }, { 0 MSO_I, 21600 },
- { 0, 21600 }
-};
-static const sal_uInt16 mso_sptHomePlateSegm[] =
-{
- 0x4000, 0x0004, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptHomePlateCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }
-};
-static const sal_Int32 mso_sptHomePlateDefault[] =
-{
- 1, 16200
-};
-static const SvxMSDffTextRectangles mso_sptHomePlateTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoHomePlate =
-{
- (SvxMSDffVertPair*)mso_sptHomePlateVert, sizeof( mso_sptHomePlateVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptHomePlateSegm, sizeof( mso_sptHomePlateSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptHomePlateCalc, sizeof( mso_sptHomePlateCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptHomePlateDefault,
- (SvxMSDffTextRectangles*)mso_sptHomePlateTextRect, sizeof( mso_sptHomePlateTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptChevronVert[] = // adjustment1 : x 0 - 21600
-{
- { 0, 0 }, { 0 MSO_I, 0 }, { 21600, 10800 }, { 0 MSO_I, 21600 },
- { 0, 21600 }, { 1 MSO_I, 10800 }
-};
-static const sal_uInt16 mso_sptChevronSegm[] =
-{
- 0x4000, 0x0005, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptChevronCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, 0x0400 }
-};
-static const sal_Int32 mso_sptChevronDefault[] =
-{
- 1, 16200
-};
-static const SvxMSDffTextRectangles mso_sptChevronTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoChevron =
-{
- (SvxMSDffVertPair*)mso_sptChevronVert, sizeof( mso_sptChevronVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptChevronSegm, sizeof( mso_sptChevronSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptChevronCalc, sizeof( mso_sptChevronCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptChevronDefault,
- (SvxMSDffTextRectangles*)mso_sptChevronTextRect, sizeof( mso_sptChevronTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptRightArrowCalloutVert[] = // adjustment1 : x 0 - 21000
-{ // adjustment2 : y 0 - 10800
- { 0, 0 }, { 0 MSO_I, 0 }, { 0 MSO_I, 3 MSO_I }, { 2 MSO_I, 3 MSO_I },
- { 2 MSO_I, 1 MSO_I }, { 21600, 10800 }, { 2 MSO_I, 4 MSO_I }, { 2 MSO_I, 5 MSO_I },
- { 0 MSO_I, 5 MSO_I }, { 0 MSO_I, 21600 }, { 0, 21600 }
-};
-static const sal_uInt16 mso_sptRightArrowCalloutSegm[] =
-{
- 0x4000, 0x000a, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptRightArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptRightArrowCalloutDefault[] =
-{
- 4, 14400, 5400, 18000, 8100
-};
-static const SvxMSDffTextRectangles mso_sptRightArrowCalloutTextRect[] =
-{
- { { 0, 0 }, { 0 MSO_I, 21600 } }
-};
-static const mso_CustomShape msoRightArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptRightArrowCalloutVert, sizeof( mso_sptRightArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptRightArrowCalloutSegm, sizeof( mso_sptRightArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptRightArrowCalloutCalc, sizeof( mso_sptRightArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptRightArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptRightArrowCalloutTextRect, sizeof( mso_sptRightArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptLeftArrowCalloutVert[] = // adjustment1 : x 0 - 21600, adjustment2 : y 0 - 10800
-{ // adjustment3 : x 0 - 21600, adjustment4 : y 0 - 10800
- { 0 MSO_I, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0 MSO_I, 21600 },
- { 0 MSO_I, 5 MSO_I }, { 2 MSO_I, 5 MSO_I }, { 2 MSO_I, 4 MSO_I }, { 0, 10800 },
- { 2 MSO_I, 1 MSO_I }, { 2 MSO_I, 3 MSO_I }, { 0 MSO_I, 3 MSO_I }
-};
-static const sal_uInt16 mso_sptLeftArrowCalloutSegm[] =
-{
- 0x4000, 0x000a, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptLeftArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptLeftArrowCalloutDefault[] =
-{
- 4, 7200, 5400, 3600, 8100
-};
-static const SvxMSDffTextRectangles mso_sptLeftArrowCalloutTextRect[] =
-{
- { { 0 MSO_I, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoLeftArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptLeftArrowCalloutVert, sizeof( mso_sptLeftArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptLeftArrowCalloutSegm, sizeof( mso_sptLeftArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptLeftArrowCalloutCalc, sizeof( mso_sptLeftArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptLeftArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftArrowCalloutTextRect, sizeof( mso_sptLeftArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptUpArrowCalloutVert[] =
-{
- { 21600, 0 MSO_I }, { 21600, 21600 }, { 0, 21600 }, { 0, 0 MSO_I },
- { 3 MSO_I, 0 MSO_I }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I }, { 10800, 0 },
- { 4 MSO_I, 2 MSO_I }, { 5 MSO_I, 2 MSO_I }, { 5 MSO_I, 0 MSO_I }
-};
-static const sal_uInt16 mso_sptUpArrowCalloutSegm[] =
-{
- 0x4000, 0x000a, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptUpArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptUpArrowCalloutDefault[] =
-{
- 4, 7200, 5400, 3600, 8100
-};
-static const SvxMSDffTextRectangles mso_sptUpArrowCalloutTextRect[] =
-{
- { { 0, 0 MSO_I }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoUpArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptUpArrowCalloutVert, sizeof( mso_sptUpArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptUpArrowCalloutSegm, sizeof( mso_sptUpArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptUpArrowCalloutCalc, sizeof( mso_sptUpArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptUpArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptUpArrowCalloutTextRect, sizeof( mso_sptUpArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptDownArrowCalloutVert[] =
-{
- { 0, 0 MSO_I }, { 0, 0 }, { 21600, 0 }, { 21600, 0 MSO_I },
- { 5 MSO_I, 0 MSO_I }, { 5 MSO_I, 2 MSO_I }, { 4 MSO_I, 2 MSO_I }, { 10800, 21600 },
- { 1 MSO_I, 2 MSO_I }, { 3 MSO_I, 2 MSO_I }, { 3 MSO_I, 0 MSO_I }
-};
-static const sal_uInt16 mso_sptDownArrowCalloutSegm[] =
-{
- 0x4000, 0x000a, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptDownArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptDownArrowCalloutDefault[] =
-{
- 4, 14400, 5400, 18000, 8100
-};
-static const SvxMSDffTextRectangles mso_sptDownArrowCalloutTextRect[] =
-{
- { { 0, 0 }, { 21600, 0 MSO_I } }
-};
-static const mso_CustomShape msoDownArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptDownArrowCalloutVert, sizeof( mso_sptDownArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptDownArrowCalloutSegm, sizeof( mso_sptDownArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptDownArrowCalloutCalc, sizeof( mso_sptDownArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDownArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptDownArrowCalloutTextRect, sizeof( mso_sptDownArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptLeftRightArrowCalloutVert[] =
-{
- { 0 MSO_I, 0 }, { 4 MSO_I, 0 }, { 4 MSO_I, 3 MSO_I }, { 6 MSO_I, 3 MSO_I },
- { 6 MSO_I, 1 MSO_I }, { 21600, 10800 }, { 6 MSO_I, 5 MSO_I }, { 6 MSO_I, 7 MSO_I },
- { 4 MSO_I, 7 MSO_I }, { 4 MSO_I, 21600 }, { 0 MSO_I, 21600 }, { 0 MSO_I, 7 MSO_I },
- { 2 MSO_I, 7 MSO_I }, { 2 MSO_I, 5 MSO_I }, { 0, 10800 }, { 2 MSO_I, 1 MSO_I },
- { 2 MSO_I, 3 MSO_I }, { 0 MSO_I, 3 MSO_I }
-};
-static const sal_uInt16 mso_sptLeftRightArrowCalloutSegm[] =
-{
- 0x4000, 0x0011, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptLeftRightArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0400 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0402 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptLeftRightArrowCalloutDefault[] =
-{
- 4, 5400, 5500, 2700, 8100
-};
-static const SvxMSDffTextRectangles mso_sptLeftRightArrowCalloutTextRect[] =
-{
- { { 0 MSO_I, 0 }, { 4 MSO_I, 21600 } }
-};
-static const mso_CustomShape msoLeftRightArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptLeftRightArrowCalloutVert, sizeof( mso_sptLeftRightArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptLeftRightArrowCalloutSegm, sizeof( mso_sptLeftRightArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptLeftRightArrowCalloutCalc, sizeof( mso_sptLeftRightArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptLeftRightArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftRightArrowCalloutTextRect, sizeof( mso_sptLeftRightArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptUpDownArrowCalloutVert[] =
-{
- { 0, 0 MSO_I }, { 0, 4 MSO_I }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 6 MSO_I },
- { 1 MSO_I, 6 MSO_I }, { 10800, 21600 }, { 5 MSO_I, 6 MSO_I }, { 7 MSO_I, 6 MSO_I },
- { 7 MSO_I, 4 MSO_I }, { 21600, 4 MSO_I }, { 21600, 0 MSO_I }, { 7 MSO_I, 0 MSO_I },
- { 7 MSO_I, 2 MSO_I }, { 5 MSO_I, 2 MSO_I }, { 10800, 0 }, { 1 MSO_I, 2 MSO_I },
- { 3 MSO_I, 2 MSO_I }, { 3 MSO_I, 0 MSO_I }
-};
-static const sal_uInt16 mso_sptUpDownArrowCalloutSegm[] =
-{
- 0x4000, 0x0011, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptUpDownArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0400 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0402 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptUpDownArrowCalloutDefault[] =
-{
- 4, 5400, 5500, 2700, 8100
-};
-static const SvxMSDffTextRectangles mso_sptUpDownArrowCalloutTextRect[] =
-{
- { { 0, 0 MSO_I }, { 21600, 4 MSO_I } }
-};
-static const mso_CustomShape msoUpDownArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptUpDownArrowCalloutVert, sizeof( mso_sptUpDownArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptUpDownArrowCalloutSegm, sizeof( mso_sptUpDownArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptUpDownArrowCalloutCalc, sizeof( mso_sptUpDownArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptUpDownArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptUpDownArrowCalloutTextRect, sizeof( mso_sptUpDownArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptQuadArrowCalloutVert[] =
-{
- { 0 MSO_I, 0 MSO_I }, { 3 MSO_I, 0 MSO_I }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 10800, 0 }, { 5 MSO_I, 2 MSO_I }, { 7 MSO_I, 2 MSO_I }, { 7 MSO_I, 0 MSO_I },
- { 4 MSO_I, 0 MSO_I }, { 4 MSO_I, 3 MSO_I }, { 6 MSO_I, 3 MSO_I }, { 6 MSO_I, 1 MSO_I },
- { 21600, 10800 }, { 6 MSO_I, 5 MSO_I }, { 6 MSO_I, 7 MSO_I }, { 4 MSO_I, 7 MSO_I },
- { 4 MSO_I, 4 MSO_I }, { 7 MSO_I, 4 MSO_I }, { 7 MSO_I, 6 MSO_I }, { 5 MSO_I, 6 MSO_I },
- { 10800, 21600 }, { 1 MSO_I, 6 MSO_I }, { 3 MSO_I, 6 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0 MSO_I, 4 MSO_I }, { 0 MSO_I, 7 MSO_I }, { 2 MSO_I, 7 MSO_I }, { 2 MSO_I, 5 MSO_I },
- { 0, 10800 }, { 2 MSO_I, 1 MSO_I }, { 2 MSO_I, 3 MSO_I }, { 0 MSO_I, 3 MSO_I }
-};
-static const sal_uInt16 mso_sptQuadArrowCalloutSegm[] =
-{
- 0x4000, 0x001f, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptQuadArrowCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
- { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
- { 0x8000, 21600, 0, 0x0400 },
- { 0x8000, 21600, 0, 0x0401 },
- { 0x8000, 21600, 0, 0x0402 },
- { 0x8000, 21600, 0, 0x0403 }
-};
-static const sal_Int32 mso_sptQuadArrowCalloutDefault[] =
-{
- 4, 5400, 8100, 2700, 9400
-};
-static const SvxMSDffTextRectangles mso_sptQuadArrowCalloutTextRect[] =
-{
- { { 0 MSO_I, 0 MSO_I }, { 4 MSO_I, 4 MSO_I } }
-};
-static const mso_CustomShape msoQuadArrowCallout =
-{
- (SvxMSDffVertPair*)mso_sptQuadArrowCalloutVert, sizeof( mso_sptQuadArrowCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptQuadArrowCalloutSegm, sizeof( mso_sptQuadArrowCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptQuadArrowCalloutCalc, sizeof( mso_sptQuadArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptQuadArrowCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptQuadArrowCalloutTextRect, sizeof( mso_sptQuadArrowCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptCircularArrowVert[] =
-{
- { 3 MSO_I, 3 MSO_I }, { 20 MSO_I, 20 MSO_I }, { 19 MSO_I, 18 MSO_I }, { 17 MSO_I, 16 MSO_I },
- { 0, 0 }, { 21600, 21600 }, { 9 MSO_I, 8 MSO_I }, { 11 MSO_I, 10 MSO_I },
- { 24 MSO_I, 23 MSO_I }, { 40 MSO_I, 39 MSO_I }, { 29 MSO_I, 28 MSO_I }
-};
-static const sal_uInt16 mso_sptCircularArrowSegm[] =
-{
- 0xa404, 0xa504, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCircularArrowCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
- { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
- { 0x8000, 10800, 0,DFF_Prop_adjust3Value }, // 3
- { 0x4009, 10800, DFF_Prop_adjustValue, 0 }, // 4
- { 0x400a, 10800, DFF_Prop_adjustValue, 0 }, // 5
- { 0x4009, 10800, DFF_Prop_adjust2Value, 0 }, // 6
- { 0x400a, 10800, DFF_Prop_adjust2Value, 0 }, // 7
- { 0x2000, 0x0404, 10800, 0 }, // 8
- { 0x2000, 0x0405, 10800, 0 }, // 9
- { 0x2000, 0x0406, 10800, 0 }, // 10
- { 0x2000, 0x0407, 10800, 0 }, // 11
- { 0x6009, 0x0403, DFF_Prop_adjustValue, 0 }, // 12
- { 0x600a, 0x0403, DFF_Prop_adjustValue, 0 }, // 13
- { 0x6009, 0x0403, DFF_Prop_adjust2Value, 0 }, // 14
- { 0x600a, 0x0403, DFF_Prop_adjust2Value, 0 }, // 15
- { 0x2000, 0x040c, 10800, 0 }, // 16
- { 0x2000, 0x040d, 10800, 0 }, // 17
- { 0x2000, 0x040e, 10800, 0 }, // 18
- { 0x2000, 0x040f, 10800, 0 }, // 19
- { 0x8000, 21600, 0, 0x0403 }, // 20
- { 0x4009, 12600, DFF_Prop_adjust2Value, 0 }, // 21
- { 0x400a, 12600, DFF_Prop_adjust2Value, 0 }, // 22
- { 0x2000, 0x0415, 10800, 0 }, // 23
- { 0x2000, 0x0416, 10800, 0 }, // 24
- { 0x2000, DFF_Prop_adjust3Value, 0, 1800 }, // 25
- { 0x6009, 0x0419, DFF_Prop_adjust2Value, 0 }, // 26
- { 0x600a, 0x0419, DFF_Prop_adjust2Value, 0 }, // 27
- { 0x2000, 0x041a, 10800, 0 }, // 28
- { 0x2000, 0x041b, 10800, 0 }, // 29
- { 0x2001, 0x0403, 1, 2 }, // 30
- { 0x8000, 10800, 0, 0x041e }, // 31
- { 0x4001, 35, 0x0403, 10800 }, // 32
- { 0x2000, 0x0420, 10, 0 }, // 33
- { 0x2001, 0x0421, 256, 1 }, // 34
- { 0x2001, 0x0422, 256, 1 }, // 35
- { 0x6000, 0x0423, DFF_Prop_adjust2Value, 0 }, // 36
- { 0x6009, 0x041f, 0x0424, 0 }, // 37
- { 0x600a, 0x041f, 0x0424, 0 }, // 38
- { 0x2000, 0x0425, 10800, 0 }, // 39
- { 0x2000, 0x0426, 10800, 0 } // 40
-};
-static const sal_Int32 mso_sptCircularArrowDefault[] =
-{
- 3, 180 << 16, 0, 5500
-};
-static const SvxMSDffTextRectangles mso_sptCircularArrowTextRect[] = // todo
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoCircularArrow =
-{
- (SvxMSDffVertPair*)mso_sptCircularArrowVert, sizeof( mso_sptCircularArrowVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptCircularArrowSegm, sizeof( mso_sptCircularArrowSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCircularArrowCalc, sizeof( mso_sptCircularArrowCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptCircularArrowDefault,
- (SvxMSDffTextRectangles*)mso_sptCircularArrowTextRect, sizeof( mso_sptCircularArrowTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptCubeVert[] =
-{
- { 0, 21600 }, { 0, 1 MSO_I }, { 2 MSO_I, 0 }, { 21600, 0 },
- { 21600, 3 MSO_I }, { 4 MSO_I, 21600 }, { 0, 1 MSO_I }, { 2 MSO_I, 0 },
- { 21600, 0 }, { 4 MSO_I, 1 MSO_I }, { 4 MSO_I, 21600 }, { 4 MSO_I, 1 MSO_I },
- { 21600, 0 }, { 21600, 3 MSO_I }
-};
-static const sal_uInt16 mso_sptCubeSegm[] =
-{
- 0x4000, 0x0005, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCubeCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoTop, 0x400, 0 },
- { 0x6000, DFF_Prop_geoLeft, 0x400, 0 },
- { 0xa000, DFF_Prop_geoBottom, 0, 0x400 },
- { 0xa000, DFF_Prop_geoRight, 0, 0x400 },
- { 0x8000, 21600, 0, 0x402 }, // 5
- { 0x2001, 0x405, 1, 2 }, // 6
- { 0x6000, 0x402, 0x406, 0 }, // 7
- { 0x2001, 0x404, 1, 2 } // 8
-
-};
-static const SvxMSDffTextRectangles mso_sptCubeTextRect[] =
-{
- { { 0, 1 MSO_I }, { 4 MSO_I, 21600 } }
-};
-static const mso_CustomShape msoCube =
-{
- (SvxMSDffVertPair*)mso_sptCubeVert, sizeof( mso_sptCubeVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptCubeSegm, sizeof( mso_sptCubeSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCubeCalc, sizeof( mso_sptCubeCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptCubeTextRect, sizeof( mso_sptCubeTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 10800, 10800,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptBevelVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 1 MSO_I, 0 MSO_I }, { 0 MSO_I, 0 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 1 MSO_I, 1 MSO_I }, { 1 MSO_I, 0 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 0 MSO_I, 1 MSO_I }, { 1 MSO_I, 1 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 0 MSO_I, 0 MSO_I }, { 0 MSO_I, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptBevelSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptBevelCalc[] =
-{
- { 0x2001, DFF_Prop_adjustValue, 21599, 21600 },
- { 0x8000, 21600, 0, 0x400 }
-};
-static const SvxMSDffTextRectangles mso_sptBevelTextRect[] =
-{
- { { 0 MSO_I, 0 MSO_I }, { 1 MSO_I, 1 MSO_I } }
-};
-static const mso_CustomShape msoBevel =
-{
- (SvxMSDffVertPair*)mso_sptBevelVert, sizeof( mso_sptBevelVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBevelSegm, sizeof( mso_sptBevelSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBevelCalc, sizeof( mso_sptBevelCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2700,
- (SvxMSDffTextRectangles*)mso_sptBevelTextRect, sizeof( mso_sptBevelTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 10800, 10800,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptFoldedCornerVert[] = // adjustment1 : x 10800 - 21600
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 0 MSO_I }, { 0 MSO_I, 21600 },
- { 0, 21600 }, { 0 MSO_I, 21600 }, { 3 MSO_I, 0 MSO_I }, { 8 MSO_I, 9 MSO_I },
- { 10 MSO_I, 11 MSO_I }, { 21600, 0 MSO_I }
-};
-static const sal_uInt16 mso_sptFoldedCornerSegm[] =
-{
- 0x4000, 0x0004, 0x6001, 0x8000,
- 0x4000, 0x0001, 0x2001, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptFoldedCornerCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, 0x400 },
- { 0x2001, 0x0401, 8000, 10800 },
- { 0x8000, 21600, 0, 0x0402 },
- { 0x2001, 0x0401, 1, 2 },
- { 0x2001, 0x0401, 1, 4 },
- { 0x2001, 0x0401, 1, 7 },
- { 0x2001, 0x0401, 1, 16 },
- { 0x6000, 0x0403, 0x405, 0 },
- { 0x6000, 0x0400, 0x406, 0 },
- { 0x8000, 21600, 0, 0x404 },
- { 0x6000, 0x400, 0x407, 0 }
-};
-static const sal_Int32 mso_sptFoldedCornerDefault[] =
-{
- 1, 18900
-};
-static const SvxMSDffTextRectangles mso_sptFoldedCornerTextRect[] =
-{
- { { 0, 0 }, { 21600, 11 MSO_I } }
-};
-static const mso_CustomShape msoFoldedCorner =
-{
- (SvxMSDffVertPair*)mso_sptFoldedCornerVert, sizeof( mso_sptFoldedCornerVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFoldedCornerSegm, sizeof( mso_sptFoldedCornerSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptFoldedCornerCalc, sizeof( mso_sptFoldedCornerCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptFoldedCornerDefault,
- (SvxMSDffTextRectangles*)mso_sptFoldedCornerTextRect, sizeof( mso_sptFoldedCornerTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonBlankVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 1 MSO_I, 0 MSO_I }, { 0 MSO_I, 0 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 1 MSO_I, 1 MSO_I }, { 1 MSO_I, 0 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 0 MSO_I, 1 MSO_I }, { 1 MSO_I, 1 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 0 MSO_I, 0 MSO_I }, { 0 MSO_I, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonBlankSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonBlankCalc[] =
-{
- { 0x2001, DFF_Prop_adjustValue, 21599, 21600 },
- { 0x8000, 21600, 0, 0x400 }
-};
-static const SvxMSDffTextRectangles mso_sptActionButtonBlankTextRect[] =
-{
- { { 0 MSO_I, 0 MSO_I }, { 1 MSO_I, 1 MSO_I } }
-};
-static const mso_CustomShape msoActionButtonBlank =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonBlankVert, sizeof( mso_sptActionButtonBlankVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonBlankSegm, sizeof( mso_sptActionButtonBlankSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonBlankCalc, sizeof( mso_sptActionButtonBlankCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonBlankTextRect, sizeof( mso_sptActionButtonBlankTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 10800, 10800,
- NULL, 0
-};
-
-static const SvxMSDffTextRectangles mso_sptActionButtonTextRect[] =
-{
- { { 1 MSO_I, 2 MSO_I }, { 3 MSO_I, 4 MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptActionButtonHomeVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 10800, 0xa MSO_I }, { 0xc MSO_I, 0xe MSO_I }, { 0xc MSO_I, 0x10 MSO_I }, { 0x12 MSO_I, 0x10 MSO_I },
- { 0x12 MSO_I, 0x14 MSO_I }, { 0x16 MSO_I, 10800 }, { 0x18 MSO_I, 10800 }, { 0x18 MSO_I, 0x1a MSO_I },
- { 0x1c MSO_I, 0x1a MSO_I }, { 0x1c MSO_I, 10800 }, { 0x1e MSO_I, 10800 },
-
- { 0xc MSO_I, 0xe MSO_I }, { 0xc MSO_I, 0x10 MSO_I }, { 0x12 MSO_I, 0x10 MSO_I },{ 0x12 MSO_I, 0x14 MSO_I },
-
- { 0x20 MSO_I, 0x24 MSO_I }, { 0x22 MSO_I, 0x24 MSO_I }, { 0x22 MSO_I, 0x1a MSO_I }, { 0x18 MSO_I, 0x1a MSO_I },
- { 0x18 MSO_I, 10800 }, { 0x1c MSO_I, 10800 }, { 0x1c MSO_I, 0x1a MSO_I }, { 0x20 MSO_I, 0x1a MSO_I }
-
-};
-static const sal_uInt16 mso_sptActionButtonHomeSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x000a, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0007, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonHomeCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -8000, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0408, 0 }, // a
- { 0x4001, 2960, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0407, 0 }, // c
- { 0x4001, -5000, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0408, 0 }, // e
- { 0x4001, -7000, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0408, 0 }, // 10
- { 0x4001, 5000, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0407, 0 }, // 12
- { 0x4001, -2960, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0408, 0 }, // 14
- { 0x4001, 8000, 0x0406, 1 }, // 15
- { 0x6000, 0x0415,0x0407, 0 }, // 16
- { 0x4001, 6100, 0x0406, 1 }, // 17
- { 0x6000, 0x0417,0x0407, 0 }, // 18
- { 0x4001, 8260, 0x0406, 1 }, // 19
- { 0x6000, 0x0419, 0x0408, 0 }, // 1a
- { 0x4001, -6100, 0x0406, 1 }, // 1b
- { 0x6000, 0x041b, 0x0407, 0 }, // 1c
- { 0x4001, -8000, 0x0406, 1 }, // 1d
- { 0x6000, 0x041d, 0x0407, 0 }, // 1e
- { 0x4001, -1060, 0x0406, 1 }, // 1f
- { 0x6000, 0x041f, 0x0407, 0 }, // 20
- { 0x4001, 1060, 0x0406, 1 }, // 21
- { 0x6000, 0x0421, 0x0407, 0 }, // 22
- { 0x4001, 4020, 0x0406, 1 }, // 23
- { 0x6000, 0x0423, 0x0408, 0 } // 24
-
-};
-static const mso_CustomShape msoActionButtonHome =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonHomeVert, sizeof( mso_sptActionButtonHomeVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonHomeSegm, sizeof( mso_sptActionButtonHomeSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonHomeCalc, sizeof( mso_sptActionButtonHomeCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonHelpVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I,4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0x10 MSO_I },
-
- { 0x12 MSO_I, 0x14 MSO_I }, { 0x12 MSO_I, 0x16 MSO_I }, // pp
- { 0x12 MSO_I, 0x18 MSO_I }, { 0x1a MSO_I, 10800 }, { 0x1c MSO_I, 10800 }, // ccp
- { 0x1e MSO_I, 10800 }, { 0x20 MSO_I, 0x22 MSO_I }, { 0x20 MSO_I, 0x24 MSO_I }, // ccp
- { 0x20 MSO_I, 0x26 MSO_I }, { 0x28 MSO_I, 0x2a MSO_I }, { 10800, 0x2a MSO_I }, // ccp
- { 0x2c MSO_I, 0x2a MSO_I }, { 0x2e MSO_I, 0x26 MSO_I }, { 0x2e MSO_I, 0x24 MSO_I }, // ccp
- { 0x30 MSO_I, 0x24 MSO_I }, { 0x30 MSO_I, 0x32 MSO_I }, { 0x34 MSO_I, 0x36 MSO_I }, // ccp
- { 10800, 0x36 MSO_I }, // p
- { 0x12 MSO_I, 0x36 MSO_I }, { 0x1c MSO_I, 0x32 MSO_I }, { 0x1c MSO_I, 0x24 MSO_I }, // ccp
- { 0x1c MSO_I, 0x38 MSO_I }, { 0x3a MSO_I, 0x3c MSO_I }, { 0x12 MSO_I, 0x3c MSO_I }, // ccp
- { 10800, 0x3c MSO_I }, { 0x34 MSO_I, 10800 }, { 0x34 MSO_I, 0x16 MSO_I }, // ccp
- { 0x34 MSO_I, 0x14 MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonHelpSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0xa302, 0x6000, 0x8000,
- 0x4000, 0x0001, 0x2004, 0x0001, 0x2004, 0x0001, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonHelpCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -1690, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, 4600, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, 1690, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 7980, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0408, 0 }, // 10
- { 0x4001, 1270, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0407, 0 }, // 12
- { 0x4001, 4000, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0408, 0 }, // 14
- { 0x4001, 1750, 0x0406, 1 }, // 15
- { 0x6000, 0x0415, 0x0408, 0 }, // 16
- { 0x4001, 800, 0x0406, 1 }, // 17
- { 0x6000, 0x0417, 0x0408, 0 }, // 18
- { 0x4001, 1650, 0x0406, 1 }, // 19
- { 0x6000, 0x0419, 0x0407, 0 }, // 1a
- { 0x4001, 2340, 0x0406, 1 }, // 1b
- { 0x6000, 0x041b, 0x0407, 0 }, // 1c
- { 0x4001, 3640, 0x0406, 1 }, // 1d
- { 0x6000, 0x041d, 0x0407, 0 }, // 1e
- { 0x4001, 4670, 0x0406, 1 }, // 1f
- { 0x6000, 0x041f, 0x0407, 0 }, // 20
- { 0x4001, -1570, 0x0406, 1 }, // 21
- { 0x6000, 0x0421, 0x0408, 0 }, // 22
- { 0x4001, -3390, 0x0406, 1 }, // 23
- { 0x6000, 0x0423, 0x0408, 0 }, // 24
- { 0x4001, -6050, 0x0406, 1 }, // 25
- { 0x6000, 0x0425, 0x0408, 0 }, // 26
- { 0x4001, 2540, 0x0406, 1 }, // 27
- { 0x6000, 0x0427, 0x0407, 0 }, // 28
- { 0x4001, -8050, 0x0406, 1 }, // 29
- { 0x6000, 0x0429, 0x0408, 0 }, // 2a
- { 0x4001, -2540, 0x0406, 1 }, // 2b
- { 0x6000, 0x042b, 0x0407, 0 }, // 2c
- { 0x4001, -4460, 0x0406, 1 }, // 2d
- { 0x6000, 0x042d, 0x0407, 0 }, // 2e
- { 0x4001, -2330, 0x0406, 1 }, // 2f
- { 0x6000, 0x042f, 0x0407, 0 }, // 30
- { 0x4001, -4700, 0x0406, 1 }, // 31
- { 0x6000, 0x0431, 0x0408, 0 }, // 32
- { 0x4001, -1270, 0x0406, 1 }, // 33
- { 0x6000, 0x0433, 0x0407, 0 }, // 34
- { 0x4001, -5720, 0x0406, 1 }, // 35
- { 0x6000, 0x0435, 0x0408, 0 }, // 36
- { 0x4001, -2540, 0x0406, 1 }, // 37
- { 0x6000, 0x0437, 0x0408, 0 }, // 38
- { 0x4001, 1800, 0x0406, 1 }, // 39
- { 0x6000, 0x0439, 0x0407, 0 }, // 3a
- { 0x4001, -1700, 0x0406, 1 }, // 3b
- { 0x6000, 0x043b, 0x0408, 0 } // 3c
-};
-static const mso_CustomShape msoActionButtonHelp =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonHelpVert, sizeof( mso_sptActionButtonHelpVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonHelpSegm, sizeof( mso_sptActionButtonHelpSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonHelpCalc, sizeof( mso_sptActionButtonHelpCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonInformationVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0x10 MSO_I },
-
- { 0x12 MSO_I, 0x14 MSO_I }, { 0x16 MSO_I, 0x18 MSO_I },
-
- { 0x1a MSO_I, 0x1c MSO_I }, { 0x1e MSO_I, 0x1c MSO_I }, { 0x1e MSO_I, 0x20 MSO_I }, { 0x22 MSO_I, 0x20 MSO_I },
- { 0x22 MSO_I, 0x24 MSO_I }, { 0x1a MSO_I, 0x24 MSO_I }, { 0x1a MSO_I, 0x20 MSO_I }, { 0x26 MSO_I, 0x20 MSO_I },
- { 0x26 MSO_I, 0x28 MSO_I }, { 0x1a MSO_I, 0x28 MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonInformationSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0xa302, 0x6000, 0x8000,
- 0xa302, 0x6000, 0x8000,
- 0x4000, 0x0009, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonInformationCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -8050, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -8050, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, 8050, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 8050, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0408, 0 }, // 10
-
- { 0x4001, -2060, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0407, 0 }, // 12
- { 0x4001, -7620, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0408, 0 }, // 14
- { 0x4001, 2060, 0x0406, 1 }, // 15
- { 0x6000, 0x0415, 0x0407, 0 }, // 16
- { 0x4001, -3500, 0x0406, 1 }, // 17
- { 0x6000, 0x0417, 0x0408, 0 }, // 18
-
- { 0x4001, -2960, 0x0406, 1 }, // 19
- { 0x6000, 0x0419, 0x0407, 0 }, // 1a
- { 0x4001, -2960, 0x0406, 1 }, // 1b
- { 0x6000, 0x041b, 0x0408, 0 }, // 1c
- { 0x4001, 1480, 0x0406, 1 }, // 1d
- { 0x6000, 0x041d, 0x0407, 0 }, // 1e
- { 0x4001, 5080, 0x0406, 1 }, // 1f
- { 0x6000, 0x041f, 0x0408, 0 }, // 20
- { 0x4001, 2960, 0x0406, 1 }, // 21
- { 0x6000, 0x0421, 0x0407, 0 }, // 22
- { 0x4001, 6140, 0x0406, 1 }, // 23
- { 0x6000, 0x0423, 0x0408, 0 }, // 24
- { 0x4001, -1480, 0x0406, 1 }, // 25
- { 0x6000, 0x0425, 0x0407, 0 }, // 26
- { 0x4001, -1920, 0x0406, 1 }, // 27
- { 0x6000, 0x0427, 0x0408, 0 } // 28
-};
-static const mso_CustomShape msoActionButtonInformation =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonInformationVert, sizeof( mso_sptActionButtonInformationVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonInformationSegm, sizeof( mso_sptActionButtonInformationSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonInformationCalc, sizeof( mso_sptActionButtonInformationCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonBackPreviousVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I,4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 10800 }, { 0xe MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0x10 MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonForwardBackSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonForwardBackCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -8050, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -8050, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, 8050, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 8050, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0408, 0 } // 10
-};
-static const mso_CustomShape msoActionButtonBackPrevious =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonBackPreviousVert, sizeof( mso_sptActionButtonBackPreviousVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonForwardBackSegm, sizeof( mso_sptActionButtonForwardBackSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonForwardBackCalc, sizeof( mso_sptActionButtonForwardBackCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonForwardNextVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 10800 }, { 0xa MSO_I, 0x10 MSO_I }
-};
-static const mso_CustomShape msoActionButtonForwardNext =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonForwardNextVert, sizeof( mso_sptActionButtonForwardNextVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonForwardBackSegm, sizeof( mso_sptActionButtonForwardBackSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonForwardBackCalc, sizeof( mso_sptActionButtonForwardBackCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonBeginningVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 10800 }, { 0xe MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0x10 MSO_I }, { 0x12 MSO_I, 0xc MSO_I },
- { 0x14 MSO_I, 0xc MSO_I }, { 0x14 MSO_I, 0x10 MSO_I }, { 0x12 MSO_I, 0x10 MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonBeginningEndSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
-
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonBeginningEndCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -4020, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -8050, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, 8050, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 8050, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0408, 0 }, // 10
-
- { 0x4001, -8050, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0407, 0 }, // 12
- { 0x4001, -6140, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0407, 0 }, // 14
-
-
- { 0x4001, 4020, 0x0406, 1 }, // 15
- { 0x6000, 0x0415, 0x0407, 0 }, // 16
- { 0x4001, 6140, 0x0406, 1 }, // 17
- { 0x6000, 0x0417, 0x0407, 0 } // 18
-};
-static const mso_CustomShape msoActionButtonBeginning =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonBeginningVert, sizeof( mso_sptActionButtonBeginningVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonBeginningEndSegm, sizeof( mso_sptActionButtonBeginningEndSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonBeginningEndCalc, sizeof( mso_sptActionButtonBeginningEndCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonEndVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0x16 MSO_I, 10800 }, { 0x12 MSO_I, 0x10 MSO_I }, { 0x12 MSO_I, 0xc MSO_I },
-
- { 0x18 MSO_I, 0xc MSO_I }, { 0x18 MSO_I, 0x10 MSO_I }, { 0xe MSO_I, 0x10 MSO_I }, { 0xe MSO_I, 0xc MSO_I }
-};
-static const mso_CustomShape msoActionButtonEnd =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonEndVert, sizeof( mso_sptActionButtonEndVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonBeginningEndSegm, sizeof( mso_sptActionButtonBeginningEndSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonBeginningEndCalc, sizeof( mso_sptActionButtonBeginningEndCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonReturnVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0x10 MSO_I }, // ppp
- { 0xe MSO_I, 0x12 MSO_I }, { 0x14 MSO_I, 0x16 MSO_I }, { 0x18 MSO_I, 0x16 MSO_I }, // ccp
- { 10800, 0x16 MSO_I }, // p
- { 0x1a MSO_I, 0x16 MSO_I }, { 0x1c MSO_I, 0x12 MSO_I }, { 0x1c MSO_I, 0x10 MSO_I }, // ccp
- { 0x1c MSO_I, 0xc MSO_I }, { 10800, 0xc MSO_I }, { 0x1e MSO_I, 0x20 MSO_I }, { 0x22 MSO_I, 0xc MSO_I }, // pppp
- { 0x24 MSO_I, 0xc MSO_I }, { 0x24 MSO_I, 0x10 MSO_I }, // pp
- { 0x24 MSO_I, 0x26 MSO_I }, { 0x28 MSO_I, 0x2a MSO_I }, { 10800, 0x2a MSO_I }, // ccp
- { 0x18 MSO_I, 0x2a MSO_I }, // p
- { 0x2c MSO_I, 0x2a MSO_I }, { 0xa MSO_I, 0x26 MSO_I }, { 0xa MSO_I, 0x10 MSO_I } // ccp
-};
-static const sal_uInt16 mso_sptActionButtonReturnSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x2001, 0x0001, 0x2001, 0x0006,0x2001, 0x0001, 0x2001, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonReturnCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -8050, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -3800, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, -4020, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 2330, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0408, 0 }, // 10
- { 0x4001, 3390, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0408, 0 }, // 12
- { 0x4001, -3100, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0407, 0 }, // 14
- { 0x4001, 4230, 0x0406, 1 }, // 15
- { 0x6000, 0x0415, 0x0408, 0 }, // 16
- { 0x4001, -1910, 0x0406, 1 }, // 17
- { 0x6000, 0x0417, 0x0407, 0 }, // 18
- { 0x4001, 1190, 0x0406, 1 }, // 19
- { 0x6000, 0x0419, 0x0407, 0 }, // 1a
- { 0x4001, 2110, 0x0406, 1 }, // 1b
- { 0x6000, 0x041b, 0x0407, 0 }, // 1c
- { 0x4001, 4030, 0x0406, 1 }, // 1d
- { 0x6000, 0x041d, 0x0407, 0 }, // 1e
- { 0x4001, -7830, 0x0406, 1 }, // 1f
- { 0x6000, 0x041f, 0x0408, 0 }, // 20
- { 0x4001, 8250, 0x0406, 1 }, // 21
- { 0x6000, 0x0421, 0x0407, 0 }, // 22
- { 0x4001, 6140, 0x0406, 1 }, // 23
- { 0x6000, 0x0423, 0x0407, 0 }, // 24
- { 0x4001, 5510, 0x0406, 1 }, // 25
- { 0x6000, 0x0425, 0x0408, 0 }, // 26
- { 0x4001, 3180, 0x0406, 1 }, // 27
- { 0x6000, 0x0427, 0x0407, 0 }, // 28
- { 0x4001, 8450, 0x0406, 1 }, // 29
- { 0x6000, 0x0429, 0x0408, 0 }, // 2a
- { 0x4001, -5090, 0x0406, 1 }, // 2b
- { 0x6000, 0x042b, 0x0407, 0 } // 2c
-};
-static const mso_CustomShape msoActionButtonReturn =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonReturnVert, sizeof( mso_sptActionButtonReturnVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonReturnSegm, sizeof( mso_sptActionButtonReturnSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonReturnCalc, sizeof( mso_sptActionButtonReturnCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonDocumentVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0xc MSO_I }, { 0x10 MSO_I, 0x12 MSO_I }, { 0x10 MSO_I, 0x14 MSO_I },
- { 0xa MSO_I, 0x14 MSO_I }, { 0xe MSO_I, 0xc MSO_I }, { 0x10 MSO_I, 0x12 MSO_I }, { 0xe MSO_I, 0x12 MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonDocumentSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
-
- 0x4000, 0x0004, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonDocumentCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -6350, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -7830, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, 1690, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 6350, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0407, 0 }, // 10
- { 0x4001, -3810, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0408, 0 }, // 12
- { 0x4001, 7830, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0408, 0 } // 14
-};
-static const mso_CustomShape msoActionButtonDocument =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonDocumentVert, sizeof( mso_sptActionButtonDocumentVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonDocumentSegm, sizeof( mso_sptActionButtonDocumentSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonDocumentCalc, sizeof( mso_sptActionButtonDocumentCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonSoundVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0xc MSO_I }, { 0x10 MSO_I, 0x12 MSO_I }, { 0x10 MSO_I, 0x14 MSO_I },
- { 0xe MSO_I, 0x16 MSO_I }, { 0xa MSO_I, 0x16 MSO_I }, { 0x18 MSO_I, 10800 }, { 0x1a MSO_I, 10800 },
-
- { 0x18 MSO_I, 0xc MSO_I }, { 0x1a MSO_I, 0x1c MSO_I },
-
- { 0x18 MSO_I, 0x16 MSO_I }, { 0x1a MSO_I, 0x1e MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonSoundSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
-
- 0x4000, 0x0005, 0x6001, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonSoundCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -8050, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -2750, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, -2960, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, 2120, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0407, 0 }, // 10
- { 0x4001, -8050, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0408, 0 }, // 12
- { 0x4001, 8050, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0408, 0 }, // 14
- { 0x4001, 2750, 0x0406, 1 }, // 15
- { 0x6000, 0x0415, 0x0408, 0 }, // 16
- { 0x4001, 4020, 0x0406, 1 }, // 17
- { 0x6000, 0x0417, 0x0407, 0 }, // 18
- { 0x4001, 8050, 0x0406, 1 }, // 19
- { 0x6000, 0x0419, 0x0407, 0 }, // 1a
- { 0x4001, -5930, 0x0406, 1 }, // 1b
- { 0x6000, 0x041b, 0x0408, 0 }, // 1c
- { 0x4001, 5930, 0x0406, 1 }, // 1d
- { 0x6000, 0x041d, 0x0408, 0 } // 1e
-};
-static const mso_CustomShape msoActionButtonSound =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonSoundVert, sizeof( mso_sptActionButtonSoundVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonSoundSegm, sizeof( mso_sptActionButtonSoundSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonSoundCalc, sizeof( mso_sptActionButtonSoundCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptActionButtonMovieVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 0 }, { 21600, 0 }, { 3 MSO_I, 2 MSO_I }, { 1 MSO_I, 2 MSO_I },
- { 21600, 0 }, { 21600, 21600 }, { 3 MSO_I, 4 MSO_I }, { 3 MSO_I, 2 MSO_I },
- { 21600, 21600 }, { 0, 21600 }, { 1 MSO_I, 4 MSO_I }, { 3 MSO_I, 4 MSO_I },
- { 0, 21600 }, { 0, 0 }, { 1 MSO_I, 2 MSO_I }, { 1 MSO_I, 4 MSO_I },
-
- { 0xa MSO_I, 0xc MSO_I }, { 0xe MSO_I, 0xc MSO_I }, { 0x10 MSO_I, 0x12 MSO_I }, { 0x14 MSO_I, 0x12 MSO_I },
- { 0x16 MSO_I, 0x18 MSO_I }, { 0x16 MSO_I, 0x1a MSO_I }, { 0x1c MSO_I, 0x1a MSO_I }, { 0x1e MSO_I, 0x18 MSO_I },
- { 0x20 MSO_I, 0x18 MSO_I }, { 0x20 MSO_I, 0x22 MSO_I }, { 0x1e MSO_I, 0x22 MSO_I }, { 0x1c MSO_I, 0x24 MSO_I },
- { 0x16 MSO_I, 0x24 MSO_I }, { 0x16 MSO_I, 0x26 MSO_I }, { 0x2a MSO_I, 0x26 MSO_I }, { 0x2a MSO_I, 0x28 MSO_I },
- { 0x10 MSO_I, 0x28 MSO_I }, { 0xe MSO_I, 0x2c MSO_I }, { 0xa MSO_I, 0x2c MSO_I }
-};
-static const sal_uInt16 mso_sptActionButtonMovieSegm[] =
-{
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0003, 0x6001, 0x8000,
- 0x4000, 0x0012, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptActionButtonMovieCalc[] = // adj value 0 - 5400
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x8000, 10800, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x0405, 1, 10800 }, // scaling 6
- { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
- { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
-
- { 0x4001, -8050, 0x0406, 1 }, // 9
- { 0x6000, 0x0409, 0x0407, 0 }, // a
- { 0x4001, -4020, 0x0406, 1 }, // b
- { 0x6000, 0x040b, 0x0408, 0 }, // c
- { 0x4001, -7000, 0x0406, 1 }, // d
- { 0x6000, 0x040d, 0x0407, 0 }, // e
- { 0x4001, -6560, 0x0406, 1 }, // f
- { 0x6000, 0x040f, 0x0407, 0 }, // 10
- { 0x4001, -3600, 0x0406, 1 }, // 11
- { 0x6000, 0x0411, 0x0408, 0 }, // 12
- { 0x4001, 4020, 0x0406, 1 }, // 13
- { 0x6000, 0x0413, 0x0407, 0 }, // 14
- { 0x4001, 4660, 0x0406, 1 }, // 15
- { 0x6000, 0x0415, 0x0407, 0 }, // 16
- { 0x4001, -2960, 0x0406, 1 }, // 17
- { 0x6000, 0x0417, 0x0408, 0 }, // 18
- { 0x4001, -2330, 0x0406, 1 }, // 19
- { 0x6000, 0x0419, 0x0408, 0 }, // 1a
- { 0x4001, 6780, 0x0406, 1 }, // 1b
- { 0x6000, 0x041b, 0x0407, 0 }, // 1c
- { 0x4001, 7200, 0x0406, 1 }, // 1d
- { 0x6000, 0x041d, 0x0407, 0 }, // 1e
- { 0x4001, 8050, 0x0406, 1 }, // 1f
- { 0x6000, 0x041f, 0x0407, 0 }, // 20
- { 0x4001, 2960, 0x0406, 1 }, // 21
- { 0x6000, 0x0421, 0x0408, 0 }, // 22
- { 0x4001, 2330, 0x0406, 1 }, // 23
- { 0x6000, 0x0423, 0x0408, 0 }, // 24
- { 0x4001, 3800, 0x0406, 1 }, // 25
- { 0x6000, 0x0425, 0x0408, 0 }, // 26
- { 0x4001, -1060, 0x0406, 1 }, // 27
- { 0x6000, 0x0427, 0x0408, 0 }, // 28
- { 0x4001, -6350, 0x0406, 1 }, // 29
- { 0x6000, 0x0429, 0x0407, 0 }, // 2a
- { 0x4001, -640, 0x0406, 1 }, // 2b
- { 0x6000, 0x042b, 0x0408, 0 } // 2c
-};
-static const mso_CustomShape msoActionButtonMovie =
-{
- (SvxMSDffVertPair*)mso_sptActionButtonMovieVert, sizeof( mso_sptActionButtonMovieVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptActionButtonMovieSegm, sizeof( mso_sptActionButtonMovieSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptActionButtonMovieCalc, sizeof( mso_sptActionButtonMovieCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1400,
- (SvxMSDffTextRectangles*)mso_sptActionButtonTextRect, sizeof( mso_sptActionButtonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptSmileyFaceVert[] = // adj value 15510 - 17520
-{
- { 0, 0 }, { 21600, 21600 }, { 6140, 6350 }, { 8470, 8680 },
- { 13130, 6350 }, { 15460, 8680 }, { 4870, 1 MSO_I }, { 8680, 2 MSO_I },
- { 12920, 2 MSO_I }, { 16730, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptSmileyFaceSegm[] =
-{
- 0xa302, 0x6000, 0x8000,
- 0xa302, 0x6000, 0x8000,
- 0xa302, 0x6000, 0x8000,
- 0x4000, 0x2001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptSmileyFaceCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 15510 },
- { 0x8000, 17520, 0, 0x400 },
- { 0x4000, 15510, 0x400, 0 }
-};
-
-static const SvxMSDffTextRectangles mso_sptSmileyFaceTextRect[] =
-{
- { { 0, 1 MSO_I }, { 4 MSO_I, 21600 } }
-};
-static const sal_Int32 mso_sptSmileyFaceDefault[] =
-{
- 1, 17520
-};
-static const mso_CustomShape msoSmileyFace =
-{
- (SvxMSDffVertPair*)mso_sptSmileyFaceVert, sizeof( mso_sptSmileyFaceVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptSmileyFaceSegm, sizeof( mso_sptSmileyFaceSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptSmileyFaceCalc, sizeof( mso_sptSmileyFaceCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptSmileyFaceDefault,
- (SvxMSDffTextRectangles*)mso_sptEllipseTextRect, sizeof( mso_sptEllipseTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptDonutVert[] = // adj value 0 - 10800
-{
- { 0, 0 }, { 21600, 21600 }, { 0 MSO_I, 0 MSO_I }, { 1 MSO_I, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptDonutSegm[] =
-{
- 0xa302, 0xf8fe, 0xa302, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptDonutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue }
-};
-static const mso_CustomShape msoDonut =
-{
- (SvxMSDffVertPair*)mso_sptDonutVert, sizeof( mso_sptDonutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptDonutSegm, sizeof( mso_sptDonutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptDonutCalc, sizeof( mso_sptDonutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptEllipseTextRect, sizeof( mso_sptEllipseTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptNoSmokingVert[] = // adj value 0 - 7200
-{
- { 0, 0 }, { 21600, 21600 }, { 0 MSO_I, 0 MSO_I }, { 1 MSO_I, 1 MSO_I },
- { 9 MSO_I, 0xa MSO_I }, { 0xb MSO_I, 0xc MSO_I }, { 0 MSO_I, 0 MSO_I }, { 1 MSO_I, 1 MSO_I },
- { 0xd MSO_I, 0xe MSO_I }, { 0xf MSO_I, 0x10 MSO_I }
-};
-static const sal_uInt16 mso_sptNoSmokingSegm[] =
-{
- 0xa302, 0xf8fe, 0xa404, 0xf8fe, 0xa404, 0x6000, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptNoSmokingCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
- { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 1
- { 0x8000, 10800, 0, DFF_Prop_adjustValue }, // 2
- { 0x2001, DFF_Prop_adjustValue, 1, 2 }, // 3
- { 0xa080, 0x403, 0, 0x402 }, // 4
- { 0x8000, 10800, 0, 0x403 }, // 5 x1
- { 0x4000, 10800, 0x403, 0 }, // 6 x2
- { 0x8000, 10800, 0, 0x404 }, // 7 y1
- { 0x4000, 10800, 0x404, 0 }, // 8 y2
- { 0x6081, 0x405, 0x407, 450 }, // 9
- { 0x6082, 0x405, 0x407, 450 }, // a
- { 0x6081, 0x405, 0x408, 450 }, // b
- { 0x6082, 0x405, 0x408, 450 }, // c
- { 0x6081, 0x406, 0x408, 450 }, // d
- { 0x6082, 0x406, 0x408, 450 }, // e
- { 0x6081, 0x406, 0x407, 450 }, // f
- { 0x6082, 0x406, 0x407, 450 } // 10
-};
-static const mso_CustomShape msoNoSmoking =
-{
- (SvxMSDffVertPair*)mso_sptNoSmokingVert, sizeof( mso_sptNoSmokingVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptNoSmokingSegm, sizeof( mso_sptNoSmokingSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptNoSmokingCalc, sizeof( mso_sptNoSmokingCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2700,
- (SvxMSDffTextRectangles*)mso_sptEllipseTextRect, sizeof( mso_sptEllipseTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptBlockArcVert[] = // adj value 0 (degrees)
-{ // adj value 1: 0 -> 10800;
- { 0, 0 }, { 21600, 21600 }, { 4 MSO_I, 3 MSO_I }, { 2 MSO_I, 3 MSO_I },
- { 5 MSO_I, 5 MSO_I }, { 6 MSO_I, 6 MSO_I }, { 2 MSO_I, 3 MSO_I }, { 4 MSO_I, 3 MSO_I },
- { 0, 0 }, { 21600, 21600 }
-};
-static const sal_uInt16 mso_sptBlockArcSegm[] =
-{
- 0xA404, 0xa504, 0x6001, 0x8000, 0x0002, 0x8000, 0xf8ff
-};
-static const sal_Int32 mso_sptBlockArcDefault[] =
-{
- 2, 180 << 16, 5400
-};
-static const SvxMSDffCalculationData mso_sptBlockArcCalc[] =
-{
- { 0x400a, 10800, DFF_Prop_adjustValue, 0 },
- { 0x4009, 10800, DFF_Prop_adjustValue, 0 },
- { 0x2000, 0x400, 10800, 0 },
- { 0x2000, 0x401, 10800, 0 },
- { 0x8000, 21600, 0, 0x402 },
- { 0x8000, 10800, 0, DFF_Prop_adjust2Value },
- { 0x4000, 10800, DFF_Prop_adjust2Value, 0 },
- { 0x600a, 0x405, DFF_Prop_adjustValue, 0 },
- { 0x6009, 0x405, DFF_Prop_adjustValue, 0 }
-};
-static const mso_CustomShape msoBlockArc =
-{
- (SvxMSDffVertPair*)mso_sptBlockArcVert, sizeof( mso_sptBlockArcVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBlockArcSegm, sizeof( mso_sptBlockArcSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBlockArcCalc, sizeof( mso_sptBlockArcCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptBlockArcDefault,
- NULL, 0,
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-// aware : control points are always part of the bounding box
-static const SvxMSDffVertPair mso_sptHeartVert[] =
-{
- { 10800, 21599 }, { 321, 6886 }, { 70, 6036 }, // ppp
- { -9, 5766 }, { -1, 5474 }, { 2, 5192 }, // ccp
- { 6, 4918 }, { 43, 4641 }, { 101, 4370 }, // ccp
- { 159, 4103 }, { 245, 3837 }, { 353, 3582 }, // ccp
- { 460, 3326 }, { 591, 3077 }, { 741, 2839 }, // ccp
- { 892, 2598 }, { 1066, 2369 }, { 1253, 2155 }, // ccp
- { 1443, 1938 }, { 1651, 1732 }, { 1874, 1543 }, // ccp
- { 2097, 1351 }, { 2337, 1174 }, { 2587, 1014 }, // ccp
- { 2839, 854 }, { 3106, 708 }, { 3380, 584 }, // ccp
- { 3656, 459 }, { 3945, 350 }, { 4237, 264 }, // ccp
- { 4533, 176 }, { 4838, 108 }, { 5144, 66 }, // ccp
- { 5454, 22 }, { 5771, 1 }, { 6086, 3 }, // ccp
- { 6407, 7 }, { 6731, 35 }, { 7048, 89 }, // ccp
- { 7374, 144 }, { 7700, 226 }, { 8015, 335 }, // ccp
- { 8344, 447 }, { 8667, 590 }, { 8972, 756 }, // ccp
- { 9297, 932 }, { 9613, 1135 }, { 9907, 1363 }, // ccp
- { 10224, 1609 }, { 10504, 1900 }, { 10802, 2169 }, // ccp
- { 11697, 1363 }, // p
- { 11971, 1116 }, { 12304, 934 }, { 12630, 756 }, // ccp
- { 12935, 590 }, { 13528, 450 }, { 13589, 335 }, // ccp
- { 13901, 226 }, { 14227, 144 }, { 14556, 89 }, // ccp
- { 14872, 35 }, { 15195, 7 }, { 15517, 3 }, // ccp
- { 15830, 0 }, { 16147, 22 }, { 16458, 66 }, // ccp
- { 16764, 109 }, { 17068, 177 }, { 17365, 264 }, // ccp
- { 17658, 349 }, { 17946, 458 }, { 18222, 584 }, // ccp
- { 18496, 708 }, { 18762, 854 }, { 19015, 1014 }, // ccp
- { 19264, 1172 }, { 19504, 1349 }, { 19730, 1543 }, // ccp
- { 19950, 1731 }, { 20158, 1937 }, { 20350, 2155 }, // ccp
- { 20536, 2369 }, { 20710, 2598 }, { 20861, 2839 }, // ccp
- { 21010, 3074 }, { 21143, 3323 }, { 21251, 3582 }, // ccp
- { 21357, 3835 }, { 21443, 4099 }, { 21502, 4370 }, // ccp
- { 21561, 4639 }, { 21595, 4916 }, { 21600, 5192 }, // ccp
- { 21606, 5474 }, { 21584, 5760 }, { 21532, 6036 }, // ccp
- { 21478, 6326 }, { 21366, 6603 }, { 21282, 6887 }, // ccp
- { 10802, 21602 } // p
-};
-static const sal_uInt16 mso_sptHeartSegm[] =
-{
- 0x4000, 0x0002, 0x2010, 0x0001, 0x2010, 0x0001, 0x6001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptHeartTextRect[] =
-{
- { { 5080, 2540 }, { 16520, 13550 } }
-};
-static const SvxMSDffVertPair mso_sptHeartGluePoints[] =
-{
- { 10800, 2180 }, { 3090, 10800 }, { 10800, 21600 }, { 18490, 10800 }
-};
-static const sal_Int32 mso_sptHeartBoundRect[] =
-{
- -9, 0, 21606, 21602
-};
-static const mso_CustomShape msoHeart =
-{
- (SvxMSDffVertPair*)mso_sptHeartVert, sizeof( mso_sptHeartVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptHeartSegm, sizeof( mso_sptHeartSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptHeartTextRect, sizeof( mso_sptHeartTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21615, 21602,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptHeartGluePoints, sizeof( mso_sptHeartGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptLightningBoldVert[] =
-{
- { 8458, 0 }, { 0, 3923 }, { 7564, 8416 }, { 4993, 9720 },
- { 12197, 13904 }, { 9987, 14934 }, { 21600, 21600 }, { 14768, 12911 },
- { 16558, 12016 }, { 11030, 6840 }, { 12831, 6120 }, { 8458, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptLightningBoldTextRect[] =
-{
- { { 8680, 7410 }, { 13970, 14190 } }
-};
-static const SvxMSDffVertPair mso_sptLightningBoldGluePoints[] =
-{
- { 8458, 0 }, { 0, 3923 }, { 4993, 9720 }, { 9987, 14934 }, { 21600, 21600 },
- { 16558, 12016 }, { 12831, 6120 }
-};
-static const mso_CustomShape msoLightningBold =
-{
- (SvxMSDffVertPair*)mso_sptLightningBoldVert, sizeof( mso_sptLightningBoldVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptLightningBoldTextRect, sizeof( mso_sptLightningBoldTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptLightningBoldGluePoints, sizeof( mso_sptLightningBoldGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptSunVert[] = // adj value 2700 -> 10125
-{
- { 0, 10800 }, { 4 MSO_I, 8 MSO_I }, { 4 MSO_I, 9 MSO_I },
- { 0x0a MSO_I, 0x0b MSO_I }, { 0x0c MSO_I, 0x0d MSO_I }, { 0x0e MSO_I, 0x0f MSO_I },
- { 0x10 MSO_I, 0x11 MSO_I }, { 0x12 MSO_I, 0x13 MSO_I }, { 0x14 MSO_I, 0x15 MSO_I },
- { 0x16 MSO_I, 0x17 MSO_I }, { 0x18 MSO_I, 0x19 MSO_I }, { 0x1a MSO_I, 0x1b MSO_I },
- { 0x1c MSO_I, 0x1d MSO_I }, { 0x1e MSO_I, 0x1f MSO_I }, { 0x20 MSO_I, 0x21 MSO_I },
- { 0x22 MSO_I, 0x23 MSO_I }, { 0x24 MSO_I, 0x25 MSO_I }, { 0x26 MSO_I, 0x27 MSO_I },
- { 0x28 MSO_I, 0x29 MSO_I }, { 0x2a MSO_I, 0x2b MSO_I }, { 0x2c MSO_I, 0x2d MSO_I },
- { 0x2e MSO_I, 0x2f MSO_I }, { 0x30 MSO_I, 0x31 MSO_I }, { 0x32 MSO_I, 0x33 MSO_I },
- { 0 MSO_I, 0 MSO_I }, { 1 MSO_I, 1 MSO_I }
-};
-static const sal_uInt16 mso_sptSunSegm[] =
-{
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0x4000, 0x0002, 0x6001, 0x8000,
- 0xa302, 0x6000, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptSunCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x2000, DFF_Prop_adjustValue, 0, 2700 },
- { 0x2001, 0x402, 5080, 7425 },
- { 0x2000, 0x403, 2540, 0 },
- { 0x8000, 10125, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x405, 2120, 7425 },
- { 0x2000, 0x406, 210, 0 },
- { 0x4000, 10800, 0x407, 0 }, // y1 (0x8)
- { 0x8000, 10800, 0, 0x407 }, // y2 (0x9)
- { 0x0081, 0, 10800, 450 }, // 0xa
- { 0x0082, 0, 10800, 450 }, // 0xb
- { 0x6081, 0x404, 0x408, 450 }, // 0xc
- { 0x6082, 0x404, 0x408, 450 }, // 0xd
- { 0x6081, 0x404, 0x409, 450 }, // 0xe
- { 0x6082, 0x404, 0x409, 450 }, // 0xf
- { 0x0081, 0, 10800, 900 }, // 0x10
- { 0x0082, 0, 10800, 900 }, // 0x11
- { 0x6081, 0x404, 0x408, 900 }, // 0x12
- { 0x6082, 0x404, 0x408, 900 }, // 0x13
- { 0x6081, 0x404, 0x409, 900 }, // 0x14
- { 0x6082, 0x404, 0x409, 900 }, // 0x15
- { 0x0081, 0, 10800, 1350 }, // 0x16
- { 0x0082, 0, 10800, 1350 }, // 0x17
- { 0x6081, 0x404, 0x408, 1350 }, // 0x18
- { 0x6082, 0x404, 0x408, 1350 }, // 0x19
- { 0x6081, 0x404, 0x409, 1350 }, // 0x1a
- { 0x6082, 0x404, 0x409, 1350 }, // 0x1b
- { 0x0081, 0, 10800, 1800 }, // 0x1c
- { 0x0082, 0, 10800, 1800 }, // 0x1d
- { 0x6081, 0x404, 0x408, 1800 }, // 0x1e
- { 0x6082, 0x404, 0x408, 1800 }, // 0x1f
- { 0x6081, 0x404, 0x409, 1800 }, // 0x20
- { 0x6082, 0x404, 0x409, 1800 }, // 0x21
- { 0x0081, 0, 10800, 2250 }, // 0x22
- { 0x0082, 0, 10800, 2250 }, // 0x23
- { 0x6081, 0x404, 0x408, 2250 }, // 0x24
- { 0x6082, 0x404, 0x408, 2250 }, // 0x25
- { 0x6081, 0x404, 0x409, 2250 }, // 0x26
- { 0x6082, 0x404, 0x409, 2250 }, // 0x27
- { 0x0081, 0, 10800, 2700 }, // 0x28
- { 0x0082, 0, 10800, 2700 }, // 0x29
- { 0x6081, 0x404, 0x408, 2700 }, // 0x2a
- { 0x6082, 0x404, 0x408, 2700 }, // 0x2b
- { 0x6081, 0x404, 0x409, 2700 }, // 0x2c
- { 0x6082, 0x404, 0x409, 2700 }, // 0x2d
- { 0x0081, 0, 10800, 3150 }, // 0x2e
- { 0x0082, 0, 10800, 3150 }, // 0x2f
- { 0x6081, 0x404, 0x408, 3150 }, // 0x30
- { 0x6082, 0x404, 0x408, 3150 }, // 0x31
- { 0x6081, 0x404, 0x409, 3150 }, // 0x32
- { 0x6082, 0x404, 0x409, 3150 }, // 0x33
- { 0x2081, DFF_Prop_adjustValue, 10800, 450 }, // 0x34 ( textbox )
- { 0x2081, DFF_Prop_adjustValue, 10800, 2250 } // 0x35
-
-};
-static const SvxMSDffTextRectangles mso_sptSunTextRect[] =
-{
- { { 0x34 MSO_I, 0x34 MSO_I }, { 0x35 MSO_I, 0x35 MSO_I } }
-};
-static const mso_CustomShape msoSun =
-{
- (SvxMSDffVertPair*)mso_sptSunVert, sizeof( mso_sptSunVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptSunSegm, sizeof( mso_sptSunSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptSunCalc, sizeof( mso_sptSunCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault5400,
- (SvxMSDffTextRectangles*)mso_sptSunTextRect, sizeof( mso_sptSunTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptMoonVert[] = // adj value 0 -> 18900
-{
- { 21600, 0 },
- { 3 MSO_I, 4 MSO_I }, { 0 MSO_I, 5080 }, { 0 MSO_I, 10800 }, // ccp
- { 0 MSO_I, 16520 }, { 3 MSO_I, 5 MSO_I }, { 21600, 21600 }, // ccp
- { 9740, 21600 }, { 0, 16730 }, { 0, 10800 }, // ccp
- { 0, 4870 }, { 9740, 0 }, { 21600, 0 } // ccp
-};
-static const sal_uInt16 mso_sptMoonSegm[] =
-{
- 0x4000, 0x2004, 0x6000, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptMoonCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x401, 1, 2 },
- { 0x6000, 0x402, DFF_Prop_adjustValue, 0 },
- { 0x2001, DFF_Prop_adjustValue, 1794, 10000 },
- { 0x8000, 21600, 0, 0x0404 },
- { 0x2001, DFF_Prop_adjustValue, 4000, 18900 },
- { 0x8081, 0, 10800, 0x406 },
- { 0x8082, 0, 10800, 0x406 },
- { 0x6000, 0x407, 0x407, 0 },
- { 0x8000, 21600, 0, 0x408 }
-};
-static const SvxMSDffTextRectangles mso_sptMoonTextRect[] =
-{
- { { 9 MSO_I, 8 MSO_I }, { 0 MSO_I, 0xa MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptMoonGluePoints[] =
-{
- { 21600, 0 }, { 0, 10800 }, { 21600, 21600 }, { 0 MSO_I, 10800 }
-};
-static const mso_CustomShape msoMoon =
-{
- (SvxMSDffVertPair*)mso_sptMoonVert, sizeof( mso_sptMoonVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptMoonSegm, sizeof( mso_sptMoonSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptMoonCalc, sizeof( mso_sptMoonCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault10800,
- (SvxMSDffTextRectangles*)mso_sptMoonTextRect, sizeof( mso_sptMoonTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptMoonGluePoints, sizeof( mso_sptMoonGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptBracketPairVert[] = // adj value 0 -> 10800
-{
- { 0 MSO_I, 0 }, { 0, 1 MSO_I }, // left top alignment
- { 0, 2 MSO_I }, { 0 MSO_I, 21600 }, // left bottom "
- { 3 MSO_I, 21600 }, { 21600, 2 MSO_I }, // right bottom "
- { 21600, 1 MSO_I }, { 3 MSO_I, 0 } // right top "
-};
-static const sal_uInt16 mso_sptBracketPairSegm[] =
-{
- 0x4000, 0xa701, 0x0001, 0xa801, 0x8000,
- 0x4000, 0xa701, 0x0001, 0xa801, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptBracketPairCalc[] =
-{
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0x2082, DFF_Prop_adjustValue, 0, 450 },
- { 0x2000, 0x404, 0, 10800 },
- { 0x8000, 0, 0, DFF_Prop_adjustValue },
- { 0xa000, 0x406, 0, 0x405 },
- { 0xa000, DFF_Prop_geoLeft, 0, 0x407 },
- { 0xa000, DFF_Prop_geoTop, 0, 0x407 },
- { 0x6000, DFF_Prop_geoRight, 0x407, 0 },
- { 0x6000, DFF_Prop_geoBottom, 0x407, 0 },
- { 0xa000, DFF_Prop_geoLeft, 0, 0x405 },
- { 0xa000, DFF_Prop_geoTop, 0, 0x405 },
- { 0x6000, DFF_Prop_geoRight, 0x405, 0 },
- { 0x6000, DFF_Prop_geoBottom, 0x405, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptBracketPairTextRect[] =
-{
- { { 8 MSO_I, 9 MSO_I }, { 0xa MSO_I, 0xb MSO_I } }
-};
-static const mso_CustomShape msoBracketPair =
-{
- (SvxMSDffVertPair*)mso_sptBracketPairVert, sizeof( mso_sptBracketPairVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBracketPairSegm, sizeof( mso_sptBracketPairSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBracketPairCalc, sizeof( mso_sptBracketPairCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault3700,
- (SvxMSDffTextRectangles*)mso_sptBracketPairTextRect, sizeof( mso_sptBracketPairTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const sal_uInt16 mso_sptPlaqueSegm[] =
-{
- 0x4000, 0xa801, 0x0001, 0xa701, 0x0001, 0xa801, 0x0001, 0xa701, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptPlaqueTextRect[] =
-{
- { { 0xc MSO_I, 0xd MSO_I }, { 0xe MSO_I, 0xf MSO_I } }
-};
-static const mso_CustomShape msoPlaque =
-{
- (SvxMSDffVertPair*)mso_sptBracketPairVert, sizeof( mso_sptBracketPairVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptPlaqueSegm, sizeof( mso_sptPlaqueSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBracketPairCalc, sizeof( mso_sptBracketPairCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault3600,
- (SvxMSDffTextRectangles*)mso_sptPlaqueTextRect, sizeof( mso_sptPlaqueTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptBracePairVert[] = // adj value 0 -> 5400
-{
- { 4 MSO_I, 0 }, { 0 MSO_I, 1 MSO_I }, { 0 MSO_I, 6 MSO_I }, { 0 ,10800 }, // left bracket
- { 0 MSO_I, 7 MSO_I }, { 0 MSO_I, 2 MSO_I }, { 4 MSO_I, 21600 },
- { 8 MSO_I, 21600 }, { 3 MSO_I, 2 MSO_I }, { 3 MSO_I, 7 MSO_I }, { 21600, 10800 }, // right bracket
- { 3 MSO_I, 6 MSO_I }, { 3 MSO_I, 1 MSO_I }, { 8 MSO_I, 0 }
-};
-static const sal_uInt16 mso_sptBracePairSegm[] =
-{
- 0x4000, 0xa701, 0x0001, 0xa801, 0xa701, 0x0001, 0xa801, 0x8000,
- 0x4000, 0xa701, 0x0001, 0xa801, 0xa701, 0x0001, 0xa801, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptBracePairCalc[] =
-{
- { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
- { 0x2001, 0x400, 2, 1 }, // 4
- { 0x2001, DFF_Prop_adjustValue, 2, 1 }, // 5
- { 0x8000, 10800, 0, DFF_Prop_adjustValue }, // 6
- { 0x8000, 21600, 0, 0x406 }, // 7
- { 0xa000, DFF_Prop_geoRight, 0, 0x405 }, // 8
- { 0x2001, DFF_Prop_adjustValue, 1, 3 }, // 9
- { 0x6000, 0x409, DFF_Prop_adjustValue, 0 }, // xa
- { 0x6000, DFF_Prop_geoLeft, 0x40a, 0 }, // xb
- { 0x6000, DFF_Prop_geoTop, 0x409, 0 }, // xc
- { 0xa000, DFF_Prop_geoRight, 0, 0x40a }, // xd
- { 0xa000, DFF_Prop_geoBottom, 0, 0x409 } // xe
-
-};
-static const SvxMSDffTextRectangles mso_sptBracePairTextRect[] =
-{
- { { 0xb MSO_I, 0xc MSO_I }, { 0xd MSO_I, 0xe MSO_I } }
-};
-static const mso_CustomShape msoBracePair =
-{
- (SvxMSDffVertPair*)mso_sptBracePairVert, sizeof( mso_sptBracePairVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBracePairSegm, sizeof( mso_sptBracePairSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBracePairCalc, sizeof( mso_sptBracePairCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1800,
- (SvxMSDffTextRectangles*)mso_sptBracePairTextRect, sizeof( mso_sptBracePairTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffCalculationData mso_sptBracketCalc[] =
-{
- { 0x2001, DFF_Prop_adjustValue, 1, 2 },
- { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
- { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
- { 0x6000, DFF_Prop_geoTop, 0x400, 0 },
- { 0xa000, DFF_Prop_geoBottom, 0, 0x400 }
-};
-static const sal_uInt16 mso_sptBracketSegm[] =
-{
- 0x4000, 0x2001, 0x0001, 0x2001, 0x8000
-};
-static const SvxMSDffVertPair mso_sptLeftBracketVert[] = // adj value 0 -> 10800
-{
- { 21600, 0 }, { 10800, 0 }, { 0, 3 MSO_I }, { 0, 1 MSO_I },
- { 0, 2 MSO_I }, { 0, 4 MSO_I }, { 10800, 21600 }, { 21600, 21600 }
-};
-static const SvxMSDffTextRectangles mso_sptLeftBracketTextRect[] =
-{
- { { 6350, 3 MSO_I }, { 21600, 4 MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptLeftBracketGluePoints[] =
-{
- { 21600, 0 }, { 0, 10800 }, { 21600, 21600 }
-};
-static const mso_CustomShape msoLeftBracket =
-{
- (SvxMSDffVertPair*)mso_sptLeftBracketVert, sizeof( mso_sptLeftBracketVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBracketSegm, sizeof( mso_sptBracketSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBracketCalc, sizeof( mso_sptBracketCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1800,
- (SvxMSDffTextRectangles*)mso_sptLeftBracketTextRect, sizeof( mso_sptLeftBracketTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptLeftBracketGluePoints, sizeof( mso_sptLeftBracketGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-static const SvxMSDffVertPair mso_sptRightBracketVert[] = // adj value 0 -> 10800
-{
- { 0, 0 }, { 10800, 0 }, { 21600, 3 MSO_I }, { 21600, 1 MSO_I },
- { 21600, 2 MSO_I }, { 21600, 4 MSO_I }, { 10800, 21600 }, { 0, 21600 }
-};
-static const SvxMSDffTextRectangles mso_sptRightBracketTextRect[] =
-{
- { { 0, 3 MSO_I }, { 15150, 4 MSO_I } }
-};
-static const SvxMSDffVertPair mso_sptRightBracketGluePoints[] =
-{
- { 0, 0 }, { 0, 21600 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoRightBracket =
-{
- (SvxMSDffVertPair*)mso_sptRightBracketVert, sizeof( mso_sptRightBracketVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBracketSegm, sizeof( mso_sptBracketSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBracketCalc, sizeof( mso_sptBracketCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault1800,
- (SvxMSDffTextRectangles*)mso_sptRightBracketTextRect, sizeof( mso_sptRightBracketTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptRightBracketGluePoints, sizeof( mso_sptRightBracketGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffCalculationData mso_sptBraceCalc[] =
-{
- { 0x2001, DFF_Prop_adjustValue, 1, 2 },
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0xa000, 0x404, 0, DFF_Prop_adjustValue },
- { 0xa000, 0x404, 0, 0x400 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
- { 0x6000, 0x404, 0x400, 0 },
- { 0x6000, 0x404, DFF_Prop_adjustValue, 0 },
- { 0x8000, 21600, 0, DFF_Prop_adjustValue },
- { 0x8000, 21600, 0, 0x400 },
- { 0x2001, DFF_Prop_adjustValue, 10000, 31953 },
- { 0x8000, 21600, 0, 0x409 }
-};
-static const sal_uInt16 mso_sptBraceSegm[] =
-{
- 0x4000, 0x2001, 0x0001, 0x2002, 0x0001, 0x2001, 0x8000
-};
-static const sal_Int32 mso_sptBraceDefault[] =
-{
- 2, 1800, 10800
-};
-static const SvxMSDffVertPair mso_sptLeftBraceVert[] =
-{
- { 21600, 0 }, // p
- { 16200, 0 }, { 10800, 0 MSO_I }, { 10800, 1 MSO_I }, // ccp
- { 10800, 2 MSO_I }, // p
- { 10800, 3 MSO_I }, { 5400, 4 MSO_I }, { 0, 4 MSO_I }, // ccp
- { 5400, 4 MSO_I }, { 10800, 5 MSO_I }, { 10800, 6 MSO_I }, // ccp
- { 10800, 7 MSO_I }, // p
- { 10800, 8 MSO_I }, { 16200, 21600 }, { 21600, 21600 } // ccp
-};
-static const SvxMSDffTextRectangles mso_sptLeftBraceTextRect[] =
-{
- { { 13800, 9 MSO_I }, { 21600, 10 MSO_I } }
-};
-static const mso_CustomShape msoLeftBrace = // adj value0 0 -> 5400
-{ // adj value1 0 -> 21600
- (SvxMSDffVertPair*)mso_sptLeftBraceVert, sizeof( mso_sptLeftBraceVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBraceSegm, sizeof( mso_sptBraceSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBraceCalc, sizeof( mso_sptBraceCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptBraceDefault,
- (SvxMSDffTextRectangles*)mso_sptLeftBraceTextRect, sizeof( mso_sptLeftBraceTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptLeftBracketGluePoints, sizeof( mso_sptLeftBracketGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-static const SvxMSDffVertPair mso_sptRightBraceVert[] =
-{
- { 0, 0 }, // p
- { 5400, 0 }, { 10800, 0 MSO_I }, { 10800, 1 MSO_I }, // ccp
- { 10800, 2 MSO_I }, // p
- { 10800, 3 MSO_I }, { 16200, 4 MSO_I }, { 21600, 4 MSO_I }, // ccp
- { 16200, 4 MSO_I }, { 10800, 5 MSO_I }, { 10800, 6 MSO_I }, // ccp
- { 10800, 7 MSO_I }, // p
- { 10800, 8 MSO_I }, { 5400, 21600 }, { 0, 21600 } // ccp
-};
-static const SvxMSDffTextRectangles mso_sptRightBraceTextRect[] =
-{
- { { 0, 9 MSO_I }, { 7800, 10 MSO_I } }
-};
-static const mso_CustomShape msoRightBrace = // adj value0 0 -> 5400
-{ // adj value1 0 -> 21600
- (SvxMSDffVertPair*)mso_sptRightBraceVert, sizeof( mso_sptRightBraceVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptBraceSegm, sizeof( mso_sptBraceSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptBraceCalc, sizeof( mso_sptBraceCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptBraceDefault,
- (SvxMSDffTextRectangles*)mso_sptRightBraceTextRect, sizeof( mso_sptRightBraceTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptRightBracketGluePoints, sizeof( mso_sptRightBracketGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptIrregularSeal1Vert[] =
-{
- { 10901, 5905 }, { 8458, 2399 }, { 7417, 6425 }, { 476, 2399 },
- { 4732, 7722 }, { 106, 8718 }, { 3828, 11880 }, { 243, 14689 },
- { 5772, 14041 }, { 4868, 17719 }, { 7819, 15730 }, { 8590, 21600 },
- { 10637, 15038 }, { 13349, 19840 }, { 14125, 14561 }, { 18248, 18195 },
- { 16938, 13044 }, { 21600, 13393 }, { 17710, 10579 }, { 21198, 8242 },
- { 16806, 7417 }, { 18482, 4560 }, { 14257, 5429 }, { 14623, 106 }, { 10901, 5905 }
-};
-static const SvxMSDffTextRectangles mso_sptIrregularSeal1TextRect[] =
-{
- { { 4680, 6570 }, { 16140, 13280 } }
-};
-static const SvxMSDffVertPair mso_sptIrregularSeal1GluePoints[] =
-{
- { 14623, 106 }, { 106, 8718 }, { 8590, 21600 }, { 21600, 13393 }
-};
-static const mso_CustomShape msoIrregularSeal1 =
-{
- (SvxMSDffVertPair*)mso_sptIrregularSeal1Vert, sizeof( mso_sptIrregularSeal1Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptIrregularSeal1TextRect, sizeof( mso_sptIrregularSeal1TextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptIrregularSeal1GluePoints, sizeof( mso_sptIrregularSeal1GluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptIrregularSeal2Vert[] =
-{
- { 11464, 4340 }, { 9722, 1887 }, { 8548, 6383 }, { 4503, 3626 },
- { 5373, 7816 }, { 1174, 8270 }, { 3934, 11592 }, { 0, 12875 },
- { 3329, 15372 }, { 1283, 17824 }, { 4804, 18239 }, { 4918, 21600 },
- { 7525, 18125 }, { 8698, 19712 }, { 9871, 17371 }, { 11614, 18844 },
- { 12178, 15937 }, { 14943, 17371 }, { 14640, 14348 }, { 18878, 15632 },
- { 16382, 12311 }, { 18270, 11292 }, { 16986, 9404 }, { 21600, 6646 },
- { 16382, 6533 }, { 18005, 3172 }, { 14524, 5778 }, { 14789, 0 },
- { 11464, 4340 }
-};
-static const SvxMSDffTextRectangles mso_sptIrregularSeal2TextRect[] =
-{
- { { 5400, 6570 }, { 14160, 15290 } }
-};
-static const SvxMSDffVertPair mso_sptIrregularSeal2GluePoints[] =
-{
- { 9722, 1887 }, { 0, 12875 }, { 11614, 18844 }, { 21600, 6646 }
-};
-static const mso_CustomShape msoIrregularSeal2 =
-{
- (SvxMSDffVertPair*)mso_sptIrregularSeal2Vert, sizeof( mso_sptIrregularSeal2Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptIrregularSeal2TextRect, sizeof( mso_sptIrregularSeal2TextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptIrregularSeal2GluePoints, sizeof( mso_sptIrregularSeal2GluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptSeal4Vert[] = // adjustment1 : 0 - 10800
-{
- { 0, 10800 }, { 4 MSO_I, 4 MSO_I }, { 10800, 0 }, { 3 MSO_I, 4 MSO_I },
- { 21600, 10800 }, { 3 MSO_I, 3 MSO_I }, { 10800, 21600 }, { 4 MSO_I, 3 MSO_I },
- { 0, 10800 }
-};
-static const SvxMSDffCalculationData mso_sptSeal4Calc[] =
-{
- { 0x0000, 7600, 0, 0 },
- { 0x6001, 0x400, DFF_Prop_adjustValue, 10800 },
- { 0xa000, 0x400, 0, 0x401 },
- { 0x4000, 10800, 0x402, 0 },
- { 0x8000, 10800, 0, 0x402 }
-};
-static const SvxMSDffTextRectangles mso_sptSeal4TextRect[] =
-{
- { { 4 MSO_I, 4 MSO_I }, { 3 MSO_I, 3 MSO_I } }
-};
-static const mso_CustomShape msoSeal4 =
-{
- (SvxMSDffVertPair*)mso_sptSeal4Vert, sizeof( mso_sptSeal4Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptSeal4Calc, sizeof( mso_sptSeal4Calc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault8100,
- (SvxMSDffTextRectangles*)mso_sptSeal4TextRect, sizeof( mso_sptSeal4TextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptStarVert[] =
-{
- { 10797, 0 }, { 8278, 8256 }, { 0, 8256 }, { 6722, 13405 },
- { 4198, 21600 }, { 10797, 16580 }, { 17401, 21600 }, { 14878, 13405 },
- { 21600, 8256 }, { 13321, 8256 }, { 10797, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptStarTextRect[] =
-{
- { { 6722, 8256 }, { 14878, 15460 } }
-};
-static const mso_CustomShape msoStar =
-{
- (SvxMSDffVertPair*)mso_sptStarVert, sizeof( mso_sptStarVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptStarTextRect, sizeof( mso_sptStarTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffCalculationData mso_sptSeal24Calc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0x00
- { 0x2081, 0x400, 10800, 3150 }, // 0x01 ( textframe )
- { 0x2082, 0x400, 10800, 3150 }, // 0x02
- { 0x2081, 0x400, 10800, 1350 }, // 0x03
- { 0x2082, 0x400, 10800, 1350 }, // 0x04
- { 0x0081, 0, 10800, 0 },
- { 0x0082, 0, 10800, 0 },
- { 0x2081, 0x400, 10800, 75 },
- { 0x2082, 0x400, 10800, 75 },
- { 0x0081, 0, 10800, 150 },
- { 0x0082, 0, 10800, 150 },
- { 0x2081, 0x400, 10800, 225 },
- { 0x2082, 0x400, 10800, 225 },
- { 0x0081, 0, 10800, 300 },
- { 0x0082, 0, 10800, 300 },
- { 0x2081, 0x400, 10800, 375 },
- { 0x2082, 0x400, 10800, 375 },
- { 0x0081, 0, 10800, 450 },
- { 0x0082, 0, 10800, 450 },
- { 0x2081, 0x400, 10800, 525 },
- { 0x2082, 0x400, 10800, 525 },
- { 0x0081, 0, 10800, 600 },
- { 0x0082, 0, 10800, 600 },
- { 0x2081, 0x400, 10800, 675 },
- { 0x2082, 0x400, 10800, 675 },
- { 0x0081, 0, 10800, 750 },
- { 0x0082, 0, 10800, 750 },
- { 0x2081, 0x400, 10800, 825 },
- { 0x2082, 0x400, 10800, 825 },
- { 0x0081, 0, 10800, 900 },
- { 0x0082, 0, 10800, 900 },
- { 0x2081, 0x400, 10800, 975 },
- { 0x2082, 0x400, 10800, 975 },
- { 0x0081, 0, 10800, 1050 },
- { 0x0082, 0, 10800, 1050 },
- { 0x2081, 0x400, 10800, 1125 },
- { 0x2082, 0x400, 10800, 1125 },
- { 0x0081, 0, 10800, 1200 },
- { 0x0082, 0, 10800, 1200 },
- { 0x2081, 0x400, 10800, 1275 },
- { 0x2082, 0x400, 10800, 1275 },
- { 0x0081, 0, 10800, 1350 },
- { 0x0082, 0, 10800, 1350 },
- { 0x2081, 0x400, 10800, 1425 },
- { 0x2082, 0x400, 10800, 1425 },
- { 0x0081, 0, 10800, 1500 },
- { 0x0082, 0, 10800, 1500 },
- { 0x2081, 0x400, 10800, 1575 },
- { 0x2082, 0x400, 10800, 1575 },
- { 0x0081, 0, 10800, 1650 },
- { 0x0082, 0, 10800, 1650 },
- { 0x2081, 0x400, 10800, 1725 },
- { 0x2082, 0x400, 10800, 1725 },
- { 0x0081, 0, 10800, 1800 },
- { 0x0082, 0, 10800, 1800 },
- { 0x2081, 0x400, 10800, 1875 },
- { 0x2082, 0x400, 10800, 1875 },
- { 0x0081, 0, 10800, 1950 },
- { 0x0082, 0, 10800, 1950 },
- { 0x2081, 0x400, 10800, 2025 },
- { 0x2082, 0x400, 10800, 2025 },
- { 0x0081, 0, 10800, 2100 },
- { 0x0082, 0, 10800, 2100 },
- { 0x2081, 0x400, 10800, 2175 },
- { 0x2082, 0x400, 10800, 2175 },
- { 0x0081, 0, 10800, 2250 },
- { 0x0082, 0, 10800, 2250 },
- { 0x2081, 0x400, 10800, 2325 },
- { 0x2082, 0x400, 10800, 2325 },
- { 0x0081, 0, 10800, 2400 },
- { 0x0082, 0, 10800, 2400 },
- { 0x2081, 0x400, 10800, 2475 },
- { 0x2082, 0x400, 10800, 2475 },
- { 0x0081, 0, 10800, 2550 },
- { 0x0082, 0, 10800, 2550 },
- { 0x2081, 0x400, 10800, 2625 },
- { 0x2082, 0x400, 10800, 2625 },
- { 0x0081, 0, 10800, 2700 },
- { 0x0082, 0, 10800, 2700 },
- { 0x2081, 0x400, 10800, 2775 },
- { 0x2082, 0x400, 10800, 2775 },
- { 0x0081, 0, 10800, 2850 },
- { 0x0082, 0, 10800, 2850 },
- { 0x2081, 0x400, 10800, 2925 },
- { 0x2082, 0x400, 10800, 2925 },
- { 0x0081, 0, 10800, 3000 },
- { 0x0082, 0, 10800, 3000 },
- { 0x2081, 0x400, 10800, 3075 },
- { 0x2082, 0x400, 10800, 3075 },
- { 0x0081, 0, 10800, 3150 },
- { 0x0082, 0, 10800, 3150 },
- { 0x2081, 0x400, 10800, 3225 },
- { 0x2082, 0x400, 10800, 3225 },
- { 0x0081, 0, 10800, 3300 },
- { 0x0082, 0, 10800, 3300 },
- { 0x2081, 0x400, 10800, 3375 },
- { 0x2082, 0x400, 10800, 3375 },
- { 0x0081, 0, 10800, 3450 },
- { 0x0082, 0, 10800, 3450 },
- { 0x2081, 0x400, 10800, 3525 },
- { 0x2082, 0x400, 10800, 3525 }
-};
-static const SvxMSDffVertPair mso_sptSeal8Vert[] = // adj value 0 -> 10800
-{
- { 5 MSO_I, 6 MSO_I }, { 11 MSO_I, 12 MSO_I }, { 17 MSO_I, 18 MSO_I }, { 23 MSO_I, 24 MSO_I },
- { 29 MSO_I, 30 MSO_I }, { 35 MSO_I, 36 MSO_I }, { 41 MSO_I, 42 MSO_I }, { 47 MSO_I, 48 MSO_I },
- { 53 MSO_I, 54 MSO_I }, { 59 MSO_I, 60 MSO_I }, { 65 MSO_I, 66 MSO_I }, { 71 MSO_I, 72 MSO_I },
- { 77 MSO_I, 78 MSO_I }, { 83 MSO_I, 84 MSO_I }, { 89 MSO_I, 90 MSO_I }, { 95 MSO_I, 96 MSO_I },
- { 5 MSO_I, 6 MSO_I }
-};
-static const SvxMSDffTextRectangles mso_sptSealTextRect[] =
-{
- { { 1 MSO_I, 2 MSO_I }, { 3 MSO_I, 4 MSO_I } }
-};
-static const mso_CustomShape msoSeal8 =
-{
- (SvxMSDffVertPair*)mso_sptSeal8Vert, sizeof( mso_sptSeal8Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptSeal24Calc, sizeof( mso_sptSeal24Calc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2500,
- (SvxMSDffTextRectangles*)mso_sptSealTextRect, sizeof( mso_sptSealTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-static const SvxMSDffVertPair mso_sptSeal16Vert[] = // adj value 0 -> 10800
-{
- { 0x05 MSO_I, 0x06 MSO_I }, { 0x07 MSO_I, 0x08 MSO_I }, { 0x09 MSO_I, 0x0a MSO_I }, { 0x0b MSO_I, 0x0c MSO_I },
- { 0x0d MSO_I, 0x0e MSO_I }, { 0x0f MSO_I, 0x10 MSO_I }, { 0x11 MSO_I, 0x12 MSO_I }, { 0x13 MSO_I, 0x14 MSO_I },
- { 0x15 MSO_I, 0x16 MSO_I }, { 0x17 MSO_I, 0x18 MSO_I }, { 0x19 MSO_I, 0x1a MSO_I }, { 0x1b MSO_I, 0x1c MSO_I },
- { 0x1d MSO_I, 0x1e MSO_I }, { 0x1f MSO_I, 0x20 MSO_I }, { 0x21 MSO_I, 0x22 MSO_I }, { 0x23 MSO_I, 0x24 MSO_I },
- { 0x25 MSO_I, 0x26 MSO_I }, { 0x27 MSO_I, 0x28 MSO_I }, { 0x29 MSO_I, 0x2a MSO_I }, { 0x2b MSO_I, 0x2c MSO_I },
- { 0x2d MSO_I, 0x2e MSO_I }, { 0x2f MSO_I, 0x30 MSO_I }, { 0x31 MSO_I, 0x32 MSO_I }, { 0x33 MSO_I, 0x34 MSO_I },
- { 0x35 MSO_I, 0x36 MSO_I }, { 0x37 MSO_I, 0x38 MSO_I }, { 0x39 MSO_I, 0x3a MSO_I }, { 0x3b MSO_I, 0x3c MSO_I },
- { 0x3d MSO_I, 0x3e MSO_I }, { 0x3f MSO_I, 0x40 MSO_I }, { 0x41 MSO_I, 0x42 MSO_I }, { 0x43 MSO_I, 0x44 MSO_I },
- { 0x05 MSO_I, 0x06 MSO_I }
-};
-static const SvxMSDffCalculationData mso_sptSeal16Calc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0x00
- { 0x2081, 0x400, 10800, 3150 }, // 0x01 ( textframe )
- { 0x2082, 0x400, 10800, 3150 }, // 0x02
- { 0x2081, 0x400, 10800, 1350 }, // 0x03
- { 0x2082, 0x400, 10800, 1350 }, // 0x04
- { 0x0081, 0, 10800, 0 },
- { 0x0082, 0, 10800, 0 },
- { 0x2081, 0x400, 10800, 113 },
- { 0x2082, 0x400, 10800, 113 },
- { 0x0081, 0, 10800, 225 },
- { 0x0082, 0, 10800, 225 },
- { 0x2081, 0x400, 10800, 338 },
- { 0x2082, 0x400, 10800, 338 },
- { 0x0081, 0, 10800, 450 },
- { 0x0082, 0, 10800, 450 },
- { 0x2081, 0x400, 10800, 563 },
- { 0x2082, 0x400, 10800, 563 },
- { 0x0081, 0, 10800, 675 },
- { 0x0082, 0, 10800, 675 },
- { 0x2081, 0x400, 10800, 788 },
- { 0x2082, 0x400, 10800, 788 },
- { 0x0081, 0, 10800, 900 },
- { 0x0082, 0, 10800, 900 },
- { 0x2081, 0x400, 10800, 1013 },
- { 0x2082, 0x400, 10800, 1013 },
- { 0x0081, 0, 10800, 1125 },
- { 0x0082, 0, 10800, 1125 },
- { 0x2081, 0x400, 10800, 1238 },
- { 0x2082, 0x400, 10800, 1238 },
- { 0x0081, 0, 10800, 1350 },
- { 0x0082, 0, 10800, 1350 },
- { 0x2081, 0x400, 10800, 1463 },
- { 0x2082, 0x400, 10800, 1463 },
- { 0x0081, 0, 10800, 1575 },
- { 0x0082, 0, 10800, 1575 },
- { 0x2081, 0x400, 10800, 1688 },
- { 0x2082, 0x400, 10800, 1688 },
- { 0x0081, 0, 10800, 1800 },
- { 0x0082, 0, 10800, 1800 },
- { 0x2081, 0x400, 10800, 1913 },
- { 0x2082, 0x400, 10800, 1913 },
- { 0x0081, 0, 10800, 2025 },
- { 0x0082, 0, 10800, 2025 },
- { 0x2081, 0x400, 10800, 2138 },
- { 0x2082, 0x400, 10800, 2138 },
- { 0x0081, 0, 10800, 2250 },
- { 0x0082, 0, 10800, 2250 },
- { 0x2081, 0x400, 10800, 2363 },
- { 0x2082, 0x400, 10800, 2363 },
- { 0x0081, 0, 10800, 2475 },
- { 0x0082, 0, 10800, 2475 },
- { 0x2081, 0x400, 10800, 2588 },
- { 0x2082, 0x400, 10800, 2588 },
- { 0x0081, 0, 10800, 2700 },
- { 0x0082, 0, 10800, 2700 },
- { 0x2081, 0x400, 10800, 2813 },
- { 0x2082, 0x400, 10800, 2813 },
- { 0x0081, 0, 10800, 2925 },
- { 0x0082, 0, 10800, 2925 },
- { 0x2081, 0x400, 10800, 3038 },
- { 0x2082, 0x400, 10800, 3038 },
- { 0x0081, 0, 10800, 3150 },
- { 0x0082, 0, 10800, 3150 },
- { 0x2081, 0x400, 10800, 3263 },
- { 0x2082, 0x400, 10800, 3263 },
- { 0x0081, 0, 10800, 3375 },
- { 0x0082, 0, 10800, 3375 },
- { 0x2081, 0x400, 10800, 3488 },
- { 0x2082, 0x400, 10800, 3488 }
-};
-static const mso_CustomShape msoSeal16 =
-{
- (SvxMSDffVertPair*)mso_sptSeal16Vert, sizeof( mso_sptSeal16Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptSeal16Calc, sizeof( mso_sptSeal16Calc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2500,
- (SvxMSDffTextRectangles*)mso_sptSealTextRect, sizeof( mso_sptSealTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-static const SvxMSDffVertPair mso_sptSeal24Vert[] =
-{
- { 0x05 MSO_I, 0x06 MSO_I }, { 0x07 MSO_I, 0x08 MSO_I }, { 0x09 MSO_I, 0x0a MSO_I }, { 0x0b MSO_I, 0x0c MSO_I },
- { 0x0d MSO_I, 0x0e MSO_I }, { 0x0f MSO_I, 0x10 MSO_I }, { 0x11 MSO_I, 0x12 MSO_I }, { 0x13 MSO_I, 0x14 MSO_I },
- { 0x15 MSO_I, 0x16 MSO_I }, { 0x17 MSO_I, 0x18 MSO_I }, { 0x19 MSO_I, 0x1a MSO_I }, { 0x1b MSO_I, 0x1c MSO_I },
- { 0x1d MSO_I, 0x1e MSO_I }, { 0x1f MSO_I, 0x20 MSO_I }, { 0x21 MSO_I, 0x22 MSO_I }, { 0x23 MSO_I, 0x24 MSO_I },
- { 0x25 MSO_I, 0x26 MSO_I }, { 0x27 MSO_I, 0x28 MSO_I }, { 0x29 MSO_I, 0x2a MSO_I }, { 0x2b MSO_I, 0x2c MSO_I },
- { 0x2d MSO_I, 0x2e MSO_I }, { 0x2f MSO_I, 0x30 MSO_I }, { 0x31 MSO_I, 0x32 MSO_I }, { 0x33 MSO_I, 0x34 MSO_I },
- { 0x35 MSO_I, 0x36 MSO_I }, { 0x37 MSO_I, 0x38 MSO_I }, { 0x39 MSO_I, 0x3a MSO_I }, { 0x3b MSO_I, 0x3c MSO_I },
- { 0x3d MSO_I, 0x3e MSO_I }, { 0x3f MSO_I, 0x40 MSO_I }, { 0x41 MSO_I, 0x42 MSO_I }, { 0x43 MSO_I, 0x44 MSO_I },
- { 0x45 MSO_I, 0x46 MSO_I }, { 0x47 MSO_I, 0x48 MSO_I }, { 0x49 MSO_I, 0x4a MSO_I }, { 0x4b MSO_I, 0x4c MSO_I },
- { 0x4d MSO_I, 0x4e MSO_I }, { 0x4f MSO_I, 0x50 MSO_I }, { 0x51 MSO_I, 0x52 MSO_I }, { 0x53 MSO_I, 0x54 MSO_I },
- { 0x55 MSO_I, 0x56 MSO_I }, { 0x57 MSO_I, 0x58 MSO_I }, { 0x59 MSO_I, 0x5a MSO_I }, { 0x5b MSO_I, 0x5c MSO_I },
- { 0x5d MSO_I, 0x5e MSO_I }, { 0x5f MSO_I, 0x60 MSO_I }, { 0x61 MSO_I, 0x62 MSO_I }, { 0x63 MSO_I, 0x64 MSO_I },
- { 0x05 MSO_I, 0x06 MSO_I }
-};
-static const mso_CustomShape msoSeal24 =
-{
- (SvxMSDffVertPair*)mso_sptSeal24Vert, sizeof( mso_sptSeal24Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptSeal24Calc, sizeof( mso_sptSeal24Calc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2500,
- (SvxMSDffTextRectangles*)mso_sptSealTextRect, sizeof( mso_sptSealTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-static const SvxMSDffCalculationData mso_sptSeal32Calc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0x00
- { 0x2081, 0x400, 10800, 3150 }, // 0x01 ( textframe )
- { 0x2082, 0x400, 10800, 3150 }, // 0x02
- { 0x2081, 0x400, 10800, 1350 }, // 0x03
- { 0x2082, 0x400, 10800, 1350 }, // 0x04
- { 0x0081, 0, 10800, 0 },
- { 0x0082, 0, 10800, 0 },
- { 0x2081, 0x400, 10800, 56 },
- { 0x2082, 0x400, 10800, 56 },
- { 0x0081, 0, 10800, 113 },
- { 0x0082, 0, 10800, 113 },
- { 0x2081, 0x400, 10800, 169 },
- { 0x2082, 0x400, 10800, 169 },
- { 0x0081, 0, 10800, 225 },
- { 0x0082, 0, 10800, 225 },
- { 0x2081, 0x400, 10800, 281 },
- { 0x2082, 0x400, 10800, 281 },
- { 0x0081, 0, 10800, 338 },
- { 0x0082, 0, 10800, 338 },
- { 0x2081, 0x400, 10800, 394 },
- { 0x2082, 0x400, 10800, 394 },
- { 0x0081, 0, 10800, 450 },
- { 0x0082, 0, 10800, 450 },
- { 0x2081, 0x400, 10800, 506 },
- { 0x2082, 0x400, 10800, 506 },
- { 0x0081, 0, 10800, 563 },
- { 0x0082, 0, 10800, 563 },
- { 0x2081, 0x400, 10800, 619 },
- { 0x2082, 0x400, 10800, 619 },
- { 0x0081, 0, 10800, 675 },
- { 0x0082, 0, 10800, 675 },
- { 0x2081, 0x400, 10800, 731 },
- { 0x2082, 0x400, 10800, 731 },
- { 0x0081, 0, 10800, 788 },
- { 0x0082, 0, 10800, 788 },
- { 0x2081, 0x400, 10800, 843 },
- { 0x2082, 0x400, 10800, 843 },
- { 0x0081, 0, 10800, 900 },
- { 0x0082, 0, 10800, 900 },
- { 0x2081, 0x400, 10800, 956 },
- { 0x2082, 0x400, 10800, 956 },
- { 0x0081, 0, 10800, 1013 },
- { 0x0082, 0, 10800, 1013 },
- { 0x2081, 0x400, 10800, 1069 },
- { 0x2082, 0x400, 10800, 1069 },
- { 0x0081, 0, 10800, 1125 },
- { 0x0082, 0, 10800, 1125 },
- { 0x2081, 0x400, 10800, 1181 },
- { 0x2082, 0x400, 10800, 1181 },
- { 0x0081, 0, 10800, 1238 },
- { 0x0082, 0, 10800, 1238 },
- { 0x2081, 0x400, 10800, 1294 },
- { 0x2082, 0x400, 10800, 1294 },
- { 0x0081, 0, 10800, 1350 },
- { 0x0082, 0, 10800, 1350 },
- { 0x2081, 0x400, 10800, 1406 },
- { 0x2082, 0x400, 10800, 1406 },
- { 0x0081, 0, 10800, 1462 },
- { 0x0082, 0, 10800, 1462 },
- { 0x2081, 0x400, 10800, 1519 },
- { 0x2082, 0x400, 10800, 1519 },
- { 0x0081, 0, 10800, 1575 },
- { 0x0082, 0, 10800, 1575 },
- { 0x2081, 0x400, 10800, 1631 },
- { 0x2082, 0x400, 10800, 1631 },
- { 0x0081, 0, 10800, 1688 },
- { 0x0082, 0, 10800, 1688 },
- { 0x2081, 0x400, 10800, 1744 },
- { 0x2082, 0x400, 10800, 1744 },
- { 0x0081, 0, 10800, 1800 },
- { 0x0082, 0, 10800, 1800 },
- { 0x2081, 0x400, 10800, 1856 },
- { 0x2082, 0x400, 10800, 1856 },
- { 0x0081, 0, 10800, 1913 },
- { 0x0082, 0, 10800, 1913 },
- { 0x2081, 0x400, 10800, 1969 },
- { 0x2082, 0x400, 10800, 1969 },
- { 0x0081, 0, 10800, 2025 },
- { 0x0082, 0, 10800, 2025 },
- { 0x2081, 0x400, 10800, 2081 },
- { 0x2082, 0x400, 10800, 2081 },
- { 0x0081, 0, 10800, 2138 },
- { 0x0082, 0, 10800, 2138 },
- { 0x2081, 0x400, 10800, 2194 },
- { 0x2082, 0x400, 10800, 2194 },
- { 0x0081, 0, 10800, 2250 },
- { 0x0082, 0, 10800, 2250 },
- { 0x2081, 0x400, 10800, 2306 },
- { 0x2082, 0x400, 10800, 2306 },
- { 0x0081, 0, 10800, 2362 },
- { 0x0082, 0, 10800, 2362 },
- { 0x2081, 0x400, 10800, 2418 },
- { 0x2082, 0x400, 10800, 2418 },
- { 0x0081, 0, 10800, 2475 },
- { 0x0082, 0, 10800, 2475 },
- { 0x2081, 0x400, 10800, 2531 },
- { 0x2082, 0x400, 10800, 2531 },
- { 0x0081, 0, 10800, 2587 },
- { 0x0082, 0, 10800, 2587 },
- { 0x2081, 0x400, 10800, 2643 },
- { 0x2082, 0x400, 10800, 2643 },
- { 0x0081, 0, 10800, 2700 },
- { 0x0082, 0, 10800, 2700 },
- { 0x2081, 0x400, 10800, 2756 },
- { 0x2082, 0x400, 10800, 2756 },
- { 0x0081, 0, 10800, 2812 },
- { 0x0082, 0, 10800, 2812 },
- { 0x2081, 0x400, 10800, 2868 },
- { 0x2082, 0x400, 10800, 2868 },
- { 0x0081, 0, 10800, 2925 },
- { 0x0082, 0, 10800, 2925 },
- { 0x2081, 0x400, 10800, 2981 },
- { 0x2082, 0x400, 10800, 2981 },
- { 0x0081, 0, 10800, 3037 },
- { 0x0082, 0, 10800, 3037 },
- { 0x2081, 0x400, 10800, 3093 },
- { 0x2082, 0x400, 10800, 3093 },
- { 0x0081, 0, 10800, 3150 },
- { 0x0082, 0, 10800, 3150 },
- { 0x2081, 0x400, 10800, 3206 },
- { 0x2082, 0x400, 10800, 3206 },
- { 0x0081, 0, 10800, 3262 },
- { 0x0082, 0, 10800, 3262 },
- { 0x2081, 0x400, 10800, 3318 },
- { 0x2082, 0x400, 10800, 3318 },
- { 0x0081, 0, 10800, 3375 },
- { 0x0082, 0, 10800, 3375 },
- { 0x2081, 0x400, 10800, 3431 },
- { 0x2082, 0x400, 10800, 3431 },
- { 0x0081, 0, 10800, 3487 },
- { 0x0082, 0, 10800, 3487 },
- { 0x2081, 0x400, 10800, 3543 },
- { 0x2082, 0x400, 10800, 3543 }
-};
-static const SvxMSDffVertPair mso_sptSeal32Vert[] =
-{
- { 0x05 MSO_I, 0x06 MSO_I }, { 0x07 MSO_I, 0x08 MSO_I }, { 0x09 MSO_I, 0x0a MSO_I }, { 0x0b MSO_I, 0x0c MSO_I },
- { 0x0d MSO_I, 0x0e MSO_I }, { 0x0f MSO_I, 0x10 MSO_I }, { 0x11 MSO_I, 0x12 MSO_I }, { 0x13 MSO_I, 0x14 MSO_I },
- { 0x15 MSO_I, 0x16 MSO_I }, { 0x17 MSO_I, 0x18 MSO_I }, { 0x19 MSO_I, 0x1a MSO_I }, { 0x1b MSO_I, 0x1c MSO_I },
- { 0x1d MSO_I, 0x1e MSO_I }, { 0x1f MSO_I, 0x20 MSO_I }, { 0x21 MSO_I, 0x22 MSO_I }, { 0x23 MSO_I, 0x24 MSO_I },
- { 0x25 MSO_I, 0x26 MSO_I }, { 0x27 MSO_I, 0x28 MSO_I }, { 0x29 MSO_I, 0x2a MSO_I }, { 0x2b MSO_I, 0x2c MSO_I },
- { 0x2d MSO_I, 0x2e MSO_I }, { 0x2f MSO_I, 0x30 MSO_I }, { 0x31 MSO_I, 0x32 MSO_I }, { 0x33 MSO_I, 0x34 MSO_I },
- { 0x35 MSO_I, 0x36 MSO_I }, { 0x37 MSO_I, 0x38 MSO_I }, { 0x39 MSO_I, 0x3a MSO_I }, { 0x3b MSO_I, 0x3c MSO_I },
- { 0x3d MSO_I, 0x3e MSO_I }, { 0x3f MSO_I, 0x40 MSO_I }, { 0x41 MSO_I, 0x42 MSO_I }, { 0x43 MSO_I, 0x44 MSO_I },
- { 0x45 MSO_I, 0x46 MSO_I }, { 0x47 MSO_I, 0x48 MSO_I }, { 0x49 MSO_I, 0x4a MSO_I }, { 0x4b MSO_I, 0x4c MSO_I },
- { 0x4d MSO_I, 0x4e MSO_I }, { 0x4f MSO_I, 0x50 MSO_I }, { 0x51 MSO_I, 0x52 MSO_I }, { 0x53 MSO_I, 0x54 MSO_I },
- { 0x55 MSO_I, 0x56 MSO_I }, { 0x57 MSO_I, 0x58 MSO_I }, { 0x59 MSO_I, 0x5a MSO_I }, { 0x5b MSO_I, 0x5c MSO_I },
- { 0x5d MSO_I, 0x5e MSO_I }, { 0x5f MSO_I, 0x60 MSO_I }, { 0x61 MSO_I, 0x62 MSO_I }, { 0x63 MSO_I, 0x64 MSO_I },
- { 0x65 MSO_I, 0x66 MSO_I }, { 0x67 MSO_I, 0x68 MSO_I }, { 0x69 MSO_I, 0x6a MSO_I }, { 0x6b MSO_I, 0x6c MSO_I },
- { 0x6d MSO_I, 0x6e MSO_I }, { 0x6f MSO_I, 0x70 MSO_I }, { 0x71 MSO_I, 0x72 MSO_I }, { 0x73 MSO_I, 0x74 MSO_I },
- { 0x75 MSO_I, 0x76 MSO_I }, { 0x77 MSO_I, 0x78 MSO_I }, { 0x79 MSO_I, 0x7a MSO_I }, { 0x7b MSO_I, 0x7c MSO_I },
- { 0x7d MSO_I, 0x7e MSO_I }, { 0x7f MSO_I, 0x80 MSO_I }, { 0x81 MSO_I, 0x82 MSO_I }, { 0x83 MSO_I, 0x84 MSO_I },
- { 0x05 MSO_I, 0x06 MSO_I }
-};
-static const mso_CustomShape msoSeal32 =
-{
- (SvxMSDffVertPair*)mso_sptSeal32Vert, sizeof( mso_sptSeal32Vert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptSeal32Calc, sizeof( mso_sptSeal32Calc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2500,
- (SvxMSDffTextRectangles*)mso_sptSealTextRect, sizeof( mso_sptSealTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptRibbon2Vert[] = // adjustment1 : x 2700 - 8100 def 5400
-{ // adjustment2 : y 14400 - 21600 def 18900
- { 12 MSO_I, 1 MSO_I }, { 12 MSO_I, 13 MSO_I }, // pp
- { 12 MSO_I, 14 MSO_I }, { 15 MSO_I, 21600 }, { 16 MSO_I, 21600 }, // ccp
- { 0, 21600 }, { 2750, 7 MSO_I }, { 0, 2 MSO_I }, { 0 MSO_I, 2 MSO_I }, // pppp
- { 0 MSO_I, 4 MSO_I }, // p
- { 0 MSO_I, 5 MSO_I }, { 10 MSO_I, 0 }, { 11 MSO_I, 0 }, // ccp
- { 17 MSO_I, 0 }, // p
- { 18 MSO_I, 0 }, { 19 MSO_I, 5 MSO_I }, { 19 MSO_I, 4 MSO_I }, // ccp
- { 19 MSO_I, 2 MSO_I }, { 21600, 2 MSO_I }, { 18850, 7 MSO_I }, { 21600, 21600 }, // pppp
- { 20 MSO_I, 21600 }, // p
- { 21 MSO_I, 21600 }, { 22 MSO_I, 14 MSO_I }, { 22 MSO_I, 13 MSO_I }, // ccp
- { 22 MSO_I, 1 MSO_I }, { 12 MSO_I, 1 MSO_I }, { 12 MSO_I, 13 MSO_I }, // ppp
- { 12 MSO_I, 23 MSO_I }, { 15 MSO_I, 24 MSO_I }, { 16 MSO_I, 24 MSO_I }, // ccp
- { 11 MSO_I, 24 MSO_I }, // p
- { 10 MSO_I, 24 MSO_I }, { 0 MSO_I, 26 MSO_I }, { 0 MSO_I, 25 MSO_I }, // ccp
- { 0 MSO_I, 27 MSO_I }, { 10 MSO_I, 1 MSO_I }, { 11 MSO_I, 1 MSO_I }, // ccp
-
- { 22 MSO_I, 1 MSO_I }, { 22 MSO_I, 13 MSO_I }, // pp
- { 22 MSO_I, 23 MSO_I }, { 21 MSO_I, 24 MSO_I }, { 20 MSO_I, 24 MSO_I }, // ccp
- { 17 MSO_I, 24 MSO_I }, // p
- { 18 MSO_I, 24 MSO_I }, { 19 MSO_I, 26 MSO_I }, { 19 MSO_I, 25 MSO_I }, // ccp
- { 19 MSO_I, 27 MSO_I }, { 18 MSO_I, 1 MSO_I }, { 17 MSO_I, 1 MSO_I }, // ccp
-
- { 0 MSO_I, 25 MSO_I }, { 0 MSO_I, 2 MSO_I }, // pp
-
- { 19 MSO_I, 25 MSO_I }, { 19 MSO_I, 2 MSO_I } // pp
-};
-static const sal_uInt16 mso_sptRibbon2Segm[] =
-{
- 0x4000, 0x0001, 0x2001, 0x0005, 0x2001, 0x0001, 0x2001, 0x0005, 0x2001, 0x0001, 0x6001, 0x8000,
- 0x4000, 0x0001, 0x2001, 0x0001, 0x2002, 0x6001, 0x8000,
- 0x4000, 0x0001, 0x2001, 0x0001, 0x2002, 0x6001, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptRibbon2Calc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 00
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 01
- { 0x8000, 21600, 0, 0x401 }, // 02
- { 0x2001, 0x402, 1, 2 }, // 03
- { 0x2001, 0x403, 1, 2 }, // 04
- { 0x2001, 0x404, 1, 2 }, // 05
- { 0x2001, 0x401, 1, 2 }, // 06
- { 0x8000, 21600, 0, 0x406 }, // 07
- { 0x0000, 420, 0, 0 }, // 08
- { 0x2001, 0x408, 2, 1 }, // 09
- { 0x6000, 0x400, 0x408, 0 }, // 10
- { 0x6000, 0x400, 0x409, 0 }, // 11
- { 0x2000, 0x400, 2700, 0 }, // 12
- { 0x8000, 21600, 0, 0x404 }, // 13
- { 0x8000, 21600, 0, 0x405 }, // 14
- { 0xa000, 0x40c, 0, 0x408 }, // 15
- { 0xa000, 0x40c, 0, 0x409 }, // 16
-
- { 0x8000, 21600, 0, 0x40b }, // 17
- { 0x8000, 21600, 0, 0x40a }, // 18
- { 0x8000, 21600, 0, 0x400 }, // 19
- { 0x8000, 21600, 0, 0x410 }, // 20
- { 0x8000, 21600, 0, 0x40f }, // 21
- { 0x8000, 21600, 0, 0x40c }, // 22
-
- { 0xa000, 0x40d, 0, 0x405 }, // 23
- { 0x6000, 0x401, 0x403, 0 }, // 24
- { 0x6000, 0x401, 0x404, 0 }, // 25
- { 0x6000, 0x419, 0x405, 0 }, // 26
- { 0xa000, 0x419, 0, 0x405 } // 27
-};
-static const sal_Int32 mso_sptRibbon2Default[] =
-{
- 2, 5400, 18900
-};
-static const SvxMSDffTextRectangles mso_sptRibbon2TextRect[] =
-{
- { { 0 MSO_I, 0 }, { 19 MSO_I, 1 MSO_I } }
-};
-static const mso_CustomShape msoRibbon2 =
-{
- (SvxMSDffVertPair*)mso_sptRibbon2Vert, sizeof( mso_sptRibbon2Vert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptRibbon2Segm, sizeof( mso_sptRibbon2Segm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptRibbon2Calc, sizeof( mso_sptRibbon2Calc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptRibbon2Default,
- (SvxMSDffTextRectangles*)mso_sptRibbon2TextRect, sizeof( mso_sptRibbon2TextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptVerticalScrollVert[] = // adjustment1 : 0 - 5400
-{
- { 1 MSO_I, 21600 }, { 0, 2 MSO_I }, { 1 MSO_I, 3 MSO_I }, { 0 MSO_I, 3 MSO_I },
- { 0 MSO_I, 1 MSO_I }, { 4 MSO_I, 0 }, { 2 MSO_I, 0 }, { 21600, 1 MSO_I },
- { 2 MSO_I, 0 MSO_I }, { 3 MSO_I, 0 MSO_I }, { 3 MSO_I, 2 MSO_I }, { 5 MSO_I, 21600 },
-
- { 6 MSO_I, 1 MSO_I }, { 4 MSO_I, 0 MSO_I }, { 8 MSO_I, 9 MSO_I }, { 4 MSO_I, 1 MSO_I },
-
- { 0 MSO_I, 2 MSO_I }, { 1 MSO_I, 21600 }, { 0, 2 MSO_I }, { 1 MSO_I, 3 MSO_I },
- { 9 MSO_I, 10 MSO_I }, { 1 MSO_I, 2 MSO_I },
-
- { 4 MSO_I, 0 }, { 6 MSO_I, 1 MSO_I },
-
- { 0 MSO_I, 3 MSO_I }, { 0 MSO_I, 2 MSO_I },
-
- { 4 MSO_I, 0 MSO_I },
- { 2 MSO_I, 0 MSO_I }
-};
-static const sal_uInt16 mso_sptVerticalScrollSegm[] =
-{
- 0x4000, 0xa702, 0x0002, 0xa801, 0x0001, 0xa702, 0x0002, 0xa801, 0x6001, 0x8000,
- 0x4000, 0xa801, 0xa702, 0x6000, 0x8000,
- 0x4000, 0xa803, 0xa702, 0x6001, 0x8000,
- 0x4000, 0xa701, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptScrollCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 },
- { 0x2001, 0x400, 1, 2 },
- { 0x8000, 21600, 0, 0x401 },
- { 0x8000, 21600, 0, 0x400 },
- { 0x6000, 0x400, 0x401, 0 },
- { 0x8000, 21600, 0, 0x404 },
- { 0x2001, 0x400, 2, 1 },
- { 0x2001, 0x401, 1, 2 },
- { 0x6000, 0x400, 0x407, 0 },
- { 0x6000, 0x401, 0x407, 0 },
- { 0x8000, 21600, 0, 0x409 }
-};
-static const SvxMSDffTextRectangles mso_sptScrollTextRect[] =
-{
- { { 0 MSO_I, 0 MSO_I }, { 3 MSO_I, 3 MSO_I } }
-};
-static const mso_CustomShape msoVerticalScroll =
-{
- (SvxMSDffVertPair*)mso_sptVerticalScrollVert, sizeof( mso_sptVerticalScrollVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptVerticalScrollSegm, sizeof( mso_sptVerticalScrollSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptScrollCalc, sizeof( mso_sptScrollCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2700,
- (SvxMSDffTextRectangles*)mso_sptScrollTextRect, sizeof( mso_sptScrollTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 11000, 10800,
- NULL, 0
-};
-static const SvxMSDffVertPair mso_sptHorizontalScrollVert[] = // adjustment1 : 0 - 5400
-{
- { 0, 4 MSO_I }, { 1 MSO_I, 0 MSO_I }, { 3 MSO_I, 0 MSO_I }, { 3 MSO_I, 1 MSO_I },
- { 2 MSO_I, 0 }, { 21600, 1 MSO_I }, { 21600, 5 MSO_I }, { 2 MSO_I, 3 MSO_I },
- { 0 MSO_I, 3 MSO_I }, { 0 MSO_I, 2 MSO_I }, { 1 MSO_I, 21600 }, { 0, 2 MSO_I },
-
- { 1 MSO_I, 4 MSO_I }, { 9 MSO_I, 8 MSO_I }, { 0 MSO_I, 4 MSO_I }, { 1 MSO_I, 6 MSO_I },
-
- { 2 MSO_I, 1 MSO_I }, { 10 MSO_I,9 MSO_I }, { 3 MSO_I, 1 MSO_I }, { 2 MSO_I, 0 },
- { 21600, 1 MSO_I }, { 2 MSO_I, 0 MSO_I },
-
- { 1 MSO_I, 6 MSO_I },
- { 0, 4 MSO_I },
-
- { 2 MSO_I, 0 MSO_I },
- { 3 MSO_I, 0 MSO_I },
-
- { 0 MSO_I, 4 MSO_I },
- { 0 MSO_I, 2 MSO_I }
-};
-static const sal_uInt16 mso_sptHorizontalScrollSegm[] =
-{
- 0x4000, 0xa801, 0x0002, 0xa802, 0x0001, 0xa801, 0x0002, 0xa802, 0x6001, 0x8000,
- 0x4000, 0xa803, 0x6000, 0x8000,
- 0x4000, 0xa803, 0xa702, 0x6000, 0x8000,
- 0x4000, 0xa701, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const mso_CustomShape msoHorizontalScroll =
-{
- (SvxMSDffVertPair*)mso_sptHorizontalScrollVert, sizeof( mso_sptHorizontalScrollVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptHorizontalScrollSegm, sizeof( mso_sptHorizontalScrollSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptScrollCalc, sizeof( mso_sptScrollCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDefault2700,
- (SvxMSDffTextRectangles*)mso_sptScrollTextRect, sizeof( mso_sptScrollTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 10800, 11000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartProcessVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 }, { 0, 0 }
-};
-static const mso_CustomShape msoFlowChartProcess =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartProcessVert, sizeof( mso_sptFlowChartProcessVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- NULL, 0,
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartAlternateProcessVert[] =
-{
- { 0, 2 MSO_I }, { 0 MSO_I, 0 }, { 1 MSO_I, 0 }, { 21600, 2 MSO_I },
- { 21600, 3 MSO_I }, { 1 MSO_I, 21600 }, { 0 MSO_I, 21600 }, { 0, 3 MSO_I }
-};
-static const sal_uInt16 mso_sptFlowChartAlternateProcessSegm[] =
-{
- 0x4000, 0xa801, 0x0001, 0xa701, 0x0001, 0xa801, 0x0001, 0xa701, 0x6000, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptFlowChartAlternateProcessCalc[] =
-{
- { 0x2000, DFF_Prop_geoLeft, 2540, 0 },
- { 0x2000, DFF_Prop_geoRight, 0, 2540 },
- { 0x2000, DFF_Prop_geoTop, 2540, 0 },
- { 0x2000, DFF_Prop_geoBottom, 0, 2540 },
- { 0x2000, DFF_Prop_geoLeft, 800, 0 },
- { 0x2000, DFF_Prop_geoRight, 0, 800 },
- { 0x2000, DFF_Prop_geoTop, 800, 0 },
- { 0x2000, DFF_Prop_geoBottom,0, 800 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartAlternateProcessTextRect[] =
-{
- { { 4 MSO_I, 6 MSO_I }, { 5 MSO_I, 7 MSO_I } }
-};
-static const mso_CustomShape msoFlowChartAlternateProcess =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartAlternateProcessVert, sizeof( mso_sptFlowChartAlternateProcessVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartAlternateProcessSegm, sizeof( mso_sptFlowChartAlternateProcessSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptFlowChartAlternateProcessCalc, sizeof( mso_sptFlowChartAlternateProcessCalc ) / sizeof( SvxMSDffCalculationData ),
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartAlternateProcessTextRect, sizeof( mso_sptFlowChartAlternateProcessTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartDecisionVert[] =
-{
- { 0, 10800 }, { 10800, 0 }, { 21600, 10800 }, { 10800, 21600 }, { 0, 10800 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartDecisionTextRect[] =
-{
- { { 5400, 5400 }, { 16200, 16200 } }
-};
-static const mso_CustomShape msoFlowChartDecision =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartDecisionVert, sizeof( mso_sptFlowChartDecisionVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartDecisionTextRect, sizeof( mso_sptFlowChartDecisionTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartInputOutputVert[] =
-{
- { 4230, 0 }, { 21600, 0 }, { 17370, 21600 }, { 0, 21600 }, { 4230, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartInputOutputTextRect[] =
-{
- { { 4230, 0 }, { 17370, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartInputOutputGluePoints[] =
-{
- { 12960, 0 }, { 10800, 0 }, { 2160, 10800 }, { 8600, 21600 }, { 10800, 21600 }, { 19400, 10800 }
-};
-static const mso_CustomShape msoFlowChartInputOutput =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartInputOutputVert, sizeof( mso_sptFlowChartInputOutputVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartInputOutputTextRect, sizeof( mso_sptFlowChartInputOutputTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartInputOutputGluePoints, sizeof( mso_sptFlowChartInputOutputGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartPredefinedProcessVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
-
- { 2540, 0 }, { 2540, 21600 },
-
- { 21600 - 2540, 0 }, { 21600 - 2540, 21600 }
-};
-static const sal_uInt16 mso_sptFlowChartPredefinedProcessSegm[] =
-{
- 0x4000, 0x0003, 0x6000, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartPredefinedProcessTextRect[] =
-{
- { { 2540, 0 }, { 21600 - 2540, 21600 } }
-};
-static const mso_CustomShape msoFlowChartPredefinedProcess =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartPredefinedProcessVert, sizeof( mso_sptFlowChartPredefinedProcessVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartPredefinedProcessSegm, sizeof( mso_sptFlowChartPredefinedProcessSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartPredefinedProcessTextRect, sizeof( mso_sptFlowChartPredefinedProcessTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartInternalStorageVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
-
- { 4230, 0 }, { 4230, 21600 },
-
- { 0, 4230 }, { 21600, 4230 }
-};
-static const sal_uInt16 mso_sptFlowChartInternalStorageSegm[] =
-{
- 0x4000, 0x0003, 0x6000, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartInternalStorageTextRect[] =
-{
- { { 4230, 4230 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoFlowChartInternalStorage =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartInternalStorageVert, sizeof( mso_sptFlowChartInternalStorageVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartInternalStorageSegm, sizeof( mso_sptFlowChartInternalStorageSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartInternalStorageTextRect, sizeof( mso_sptFlowChartInternalStorageTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartDocumentVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 17360 },
- { 13050, 17220 }, { 13340, 20770 }, { 5620, 21600 }, // ccp
- { 2860, 21100 }, { 1850, 20700 }, { 0, 20120 } // ccp
-};
-static const sal_uInt16 mso_sptFlowChartDocumentSegm[] =
-{
- 0x4000, 0x0002, 0x2002, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartDocumentTextRect[] =
-{
- { { 0, 0 }, { 21600, 17360 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartDocumentGluePoints[] =
-{
- { 10800, 0 }, { 0, 10800 }, { 10800, 20320 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoFlowChartDocument =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartDocumentVert, sizeof( mso_sptFlowChartDocumentVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartDocumentSegm, sizeof( mso_sptFlowChartDocumentSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartDocumentTextRect, sizeof( mso_sptFlowChartDocumentTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartDocumentGluePoints, sizeof( mso_sptFlowChartDocumentGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartMultidocumentVert[] =
-{
- { 0, 3600 }, { 1500, 3600 }, { 1500, 1800 }, { 3000, 1800 },
- { 3000, 0 }, { 21600, 0 }, { 21600, 14409 }, { 21600 - 1500, 14409 },
- { 21600 - 1500, 14409 + 1800 }, { 21600 - 3000, 14409 + 1800 }, { 21600 - 3000, 14409 + 3600 },
- { 11610, 14293 + 3600 }, { 11472, 17239 + 3600 }, { 4833, 17928 + 3600 }, // ccp
- { 2450, 17513 + 3600 }, { 1591, 17181 + 3600 }, { 0, 16700 + 3600 }, // ccp
-
- { 1500, 3600 }, { 21600 - 3000, 3600 }, { 21600 - 3000, 14409 + 1800 },
-
- { 3000, 1800 }, { 21600 - 1500, 1800 }, { 21600 - 1500, 14409 }
-};
-static const sal_uInt16 mso_sptFlowChartMultidocumentSegm[] =
-{
- 0x4000, 0x000a, 0x2002, 0x6000, 0x8000,
- 0x4000, 0x0002, 0x8000,
- 0x4000, 0x0002, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartMultidocumentTextRect[] =
-{
- { { 0, 3600 }, { 21600 - 3000, 14409 + 3600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartMultidocumentGluePoints[] =
-{
- { 10800, 0 }, { 0, 10800 }, { 10800, 19890 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoFlowChartMultidocument =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartMultidocumentVert, sizeof( mso_sptFlowChartMultidocumentVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartMultidocumentSegm, sizeof( mso_sptFlowChartMultidocumentSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartMultidocumentTextRect, sizeof( mso_sptFlowChartMultidocumentTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartMultidocumentGluePoints, sizeof( mso_sptFlowChartMultidocumentGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartTerminatorVert[] =
-{
- { 3470, 21600 }, { 0, 10800 }, { 3470, 0 }, { 18130, 0 },
- { 21600, 10800 }, { 18130, 21600 }
-};
-static const sal_uInt16 mso_sptFlowChartTerminatorSegm[] =
-{
- 0x4000, 0xa702, 0x0001, 0xa702, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartTerminatorTextRect[] =
-{
- { { 1060, 3180 }, { 20540, 18420 } }
-};
-static const mso_CustomShape msoFlowChartTerminator =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartTerminatorVert, sizeof( mso_sptFlowChartTerminatorVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartTerminatorSegm, sizeof( mso_sptFlowChartTerminatorSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartTerminatorTextRect, sizeof( mso_sptFlowChartTerminatorTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartPreparationVert[] =
-{
- { 4350, 0 }, { 17250, 0 }, { 21600, 10800 }, { 17250, 21600 },
- { 4350, 21600 }, { 0, 10800 }, { 4350, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartPreparationTextRect[] =
-{
- { { 4350, 0 }, { 17250, 21600 } }
-};
-static const mso_CustomShape msoFlowChartPreparation =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartPreparationVert, sizeof( mso_sptFlowChartPreparationVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartPreparationTextRect, sizeof( mso_sptFlowChartPreparationTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartManualInputVert[] =
-{
- { 0, 4300 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 }, { 0, 4300 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartManualInputTextRect[] =
-{
- { { 0, 4300 }, { 21600, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartManualInputGluePoints[] =
-{
- { 10800, 2150 }, { 0, 10800 }, { 10800, 19890 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoFlowChartManualInput =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartManualInputVert, sizeof( mso_sptFlowChartManualInputVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartManualInputTextRect, sizeof( mso_sptFlowChartManualInputTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartManualInputGluePoints, sizeof( mso_sptFlowChartManualInputGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartManualOperationVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 17250, 21600 }, { 4350, 21600 }, { 0, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartManualOperationTextRect[] =
-{
- { { 4350, 0 }, { 17250, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartManualOperationGluePoints[] =
-{
- { 10800, 0 }, { 2160, 10800 }, { 10800, 21600 }, { 19440, 10800 }
-};
-static const mso_CustomShape msoFlowChartManualOperation =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartManualOperationVert, sizeof( mso_sptFlowChartManualOperationVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartManualOperationTextRect, sizeof( mso_sptFlowChartManualOperationTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartManualOperationGluePoints, sizeof( mso_sptFlowChartManualOperationGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartConnectorVert[] =
-{
- { 0, 0 }, { 21600, 21600 }
-};
-static const sal_uInt16 mso_sptFlowChartConnectorSegm[] =
-{
- 0xa302, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartConnectorTextRect[] =
-{
- { { 3180, 3180 }, { 18420, 18420 } }
-};
-static const mso_CustomShape msoFlowChartConnector =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartConnectorVert, sizeof( mso_sptFlowChartConnectorVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartConnectorSegm, sizeof( mso_sptFlowChartConnectorSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartConnectorTextRect, sizeof( mso_sptFlowChartConnectorTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartOffpageConnectorVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 21600, 17150 }, { 10800, 21600 },
- { 0, 17150 }, { 0, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartOffpageConnectorTextRect[] =
-{
- { { 0, 0 }, { 21600, 17150 } }
-};
-static const mso_CustomShape msoFlowChartOffpageConnector =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartOffpageConnectorVert, sizeof( mso_sptFlowChartOffpageConnectorVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartOffpageConnectorTextRect, sizeof( mso_sptFlowChartOffpageConnectorTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartPunchedCardVert[] =
-{
- { 4300, 0 }, { 21600, 0 }, { 21600, 21600 }, { 0, 21600 },
- { 0, 4300 }, { 4300, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartPunchedCardTextRect[] =
-{
- { { 0, 4300 }, { 21600, 21600 } }
-};
-static const mso_CustomShape msoFlowChartPunchedCard =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartPunchedCardVert, sizeof( mso_sptFlowChartPunchedCardVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartPunchedCardTextRect, sizeof( mso_sptFlowChartPunchedCardTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartPunchedTapeVert[] =
-{
- { 0, 2230 }, // p
- { 820, 3990 }, { 3410, 3980 }, { 5370, 4360 }, // ccp
- { 7430, 4030 }, { 10110, 3890 }, { 10690, 2270 }, // ccp
- { 11440, 300 }, { 14200, 160 }, { 16150, 0 }, // ccp
- { 18670, 170 }, { 20690, 390 }, { 21600, 2230 }, // ccp
- { 21600, 19420 }, // p
- { 20640, 17510 }, { 18320, 17490 }, { 16140, 17240 }, // ccp
- { 14710, 17370 }, { 11310, 17510 }, { 10770, 19430 }, // ccp
- { 10150, 21150 }, { 7380, 21290 }, { 5290, 21600 }, // ccp
- { 3220, 21250 }, { 610, 21130 }, { 0, 19420 } // ccp
-};
-static const sal_uInt16 mso_sptFlowChartPunchedTapeSegm[] =
-{
- 0x4000, 0x2004, 0x0001, 0x2004, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartPunchedTapeTextRect[] =
-{
- { { 0, 4360 }, { 21600, 17240 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartPunchedTapeGluePoints[] =
-{
- { 10800, 2020 }, { 0, 10800 }, { 10800, 19320 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoFlowChartPunchedTape =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartPunchedTapeVert, sizeof( mso_sptFlowChartPunchedTapeVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartPunchedTapeSegm, sizeof( mso_sptFlowChartPunchedTapeSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartPunchedTapeTextRect, sizeof( mso_sptFlowChartPunchedTapeTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartPunchedTapeGluePoints, sizeof( mso_sptFlowChartPunchedTapeGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartSummingJunctionVert[] =
-{
- { 0, 0 }, { 21600, 21600 },
-
- { 3100, 3100 },
- { 18500, 18500 },
-
- { 3100, 18500 },
- { 18500, 3100 }
-};
-static const sal_uInt16 mso_sptFlowChartSummingJunctionSegm[] =
-{
- 0xa302, 0x6000, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartSummingJunctionTextRect[] =
-{
- { { 3100, 3100 }, { 18500, 18500 } }
-};
-static const mso_CustomShape msoFlowChartSummingJunction =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartSummingJunctionVert, sizeof( mso_sptFlowChartSummingJunctionVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartSummingJunctionSegm, sizeof( mso_sptFlowChartSummingJunctionSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartSummingJunctionTextRect, sizeof( mso_sptFlowChartSummingJunctionTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartOrVert[] =
-{
- { 0, 0 }, { 21600, 21600 },
-
- { 0, 10800 }, { 21600, 10800 },
-
- { 10800, 0 }, { 10800, 21600 }
-};
-static const sal_uInt16 mso_sptFlowChartOrSegm[] =
-{
- 0xa302, 0x6000, 0x8000,
- 0x4000, 0x0001, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartOrTextRect[] =
-{
- { { 3100, 3100 }, { 18500, 18500 } }
-};
-static const mso_CustomShape msoFlowChartOr =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartOrVert, sizeof( mso_sptFlowChartOrVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartOrSegm, sizeof( mso_sptFlowChartOrSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartOrTextRect, sizeof( mso_sptFlowChartOrTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptEllipseGluePoints, sizeof( mso_sptEllipseGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartCollateVert[] =
-{
- { 0, 0 }, { 21600, 21600 }, { 0, 21600 }, { 21600, 0 }, { 0, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartCollateTextRect[] =
-{
- { { 5400, 5400 }, { 16200, 16200 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartCollateGluePoints[] =
-{
- { 10800, 0 }, { 10800, 10800 }, { 10800, 21600 }
-};
-static const mso_CustomShape msoFlowChartCollate =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartCollateVert, sizeof( mso_sptFlowChartCollateVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartCollateTextRect, sizeof( mso_sptFlowChartCollateTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartCollateGluePoints, sizeof( mso_sptFlowChartCollateGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartSortVert[] =
-{
- { 0, 10800 }, { 10800, 0 }, { 21600, 10800 }, { 10800, 21600 },
-
- { 0, 10800 }, { 21600, 10800 }
-};
-static const sal_uInt16 mso_sptFlowChartSortSegm[] =
-{
- 0x4000, 0x0003, 0x6000, 0x8000,
- 0x4000, 0x0001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartSortTextRect[] =
-{
- { { 5400, 5400 }, { 16200, 16200 } }
-};
-static const mso_CustomShape msoFlowChartSort =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartSortVert, sizeof( mso_sptFlowChartSortVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartSortSegm, sizeof( mso_sptFlowChartSortSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartSortTextRect, sizeof( mso_sptFlowChartSortTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartExtractVert[] =
-{
- { 10800, 0 }, { 21600, 21600 }, { 0, 21600 }, { 10800, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartExtractTextRect[] =
-{
- { { 5400, 10800 }, { 16200, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartExtractGluePoints[] =
-{
- { 10800, 0 }, { 5400, 10800 }, { 10800, 21600 }, { 16200, 10800 }
-};
-static const mso_CustomShape msoFlowChartExtract =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartExtractVert, sizeof( mso_sptFlowChartExtractVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartExtractTextRect, sizeof( mso_sptFlowChartExtractTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartExtractGluePoints, sizeof( mso_sptFlowChartExtractGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartMergeVert[] =
-{
- { 0, 0 }, { 21600, 0 }, { 10800, 21600 }, { 0, 0 }
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartMergeTextRect[] =
-{
- { { 5400, 0 }, { 16200, 10800 } }
-};
-static const mso_CustomShape msoFlowChartMerge =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartMergeVert, sizeof( mso_sptFlowChartMergeVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartMergeTextRect, sizeof( mso_sptFlowChartMergeTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartExtractGluePoints, sizeof( mso_sptFlowChartExtractGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartOnlineStorageVert[] =
-{
- { 3600, 21600 }, { 0, 10800 }, { 3600, 0 }, { 21600, 0 },
- { 18000, 10800 }, { 21600, 21600 }
-};
-static const sal_uInt16 mso_sptFlowChartOnlineStorageSegm[] =
-{
- 0x4000, 0xa702, 0x0001, 0xa702, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartOnlineStorageTextRect[] =
-{
- { { 3600, 0 }, { 18000, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartOnlineStorageGluePoints[] =
-{
- { 10800, 0 }, { 0, 10800 }, { 10800, 21600 }, { 18000, 10800 }
-};
-static const mso_CustomShape msoFlowChartOnlineStorage =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartOnlineStorageVert, sizeof( mso_sptFlowChartOnlineStorageVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartOnlineStorageSegm, sizeof( mso_sptFlowChartOnlineStorageSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartOnlineStorageTextRect, sizeof( mso_sptFlowChartOnlineStorageTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartOnlineStorageGluePoints, sizeof( mso_sptFlowChartOnlineStorageGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartDelayVert[] =
-{
- { 10800, 0 }, { 21600, 10800 }, { 10800, 21600 }, { 0, 21600 },
- { 0, 0 }
-};
-static const sal_uInt16 mso_sptFlowChartDelaySegm[] =
-{
- 0x4000, 0xa702, 0x0002, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartDelayTextRect[] =
-{
- { { 0, 3100 }, { 18500, 18500 } }
-};
-static const mso_CustomShape msoFlowChartDelay =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartDelayVert, sizeof( mso_sptFlowChartDelayVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartDelaySegm, sizeof( mso_sptFlowChartDelaySegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartDelayTextRect, sizeof( mso_sptFlowChartDelayTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartMagneticTapeVert[] =
-{
- { 20980, 18150 }, { 20980, 21600 }, { 10670, 21600 },
- { 4770, 21540 }, { 0, 16720 }, { 0, 10800 }, // ccp
- { 0, 4840 }, { 4840, 0 }, { 10800, 0 }, // ccp
- { 16740, 0 }, { 21600, 4840 }, { 21600, 10800 }, // ccp
- { 21600, 13520 }, { 20550, 16160 }, { 18670, 18170 } // ccp
-};
-static const sal_uInt16 mso_sptFlowChartMagneticTapeSegm[] =
-{
- 0x4000, 0x0002, 0x2004, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartMagneticTapeTextRect[] =
-{
- { { 3100, 3100 }, { 18500, 18500 } }
-};
-static const mso_CustomShape msoFlowChartMagneticTape =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartMagneticTapeVert, sizeof( mso_sptFlowChartMagneticTapeVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartMagneticTapeSegm, sizeof( mso_sptFlowChartMagneticTapeSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartMagneticTapeTextRect, sizeof( mso_sptFlowChartMagneticTapeTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartMagneticDiskVert[] =
-{
- { 0, 3400 }, { 10800, 0 }, { 21600, 3400 }, { 21600, 18200 },
- { 10800, 21600 }, { 0, 18200 },
-
- { 0, 3400 }, { 10800, 6800 }, { 21600, 3400 }
-};
-static const sal_uInt16 mso_sptFlowChartMagneticDiskSegm[] =
-{
- 0x4000, 0xa802, 0x0001, 0xa802, 0x6000, 0x8000,
- 0x4000, 0xa802, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartMagneticDiskTextRect[] =
-{
- { { 0, 6800 }, { 21600, 18200 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartMagneticDiskGluePoints[] =
-{
- { 10800, 6800 }, { 10800, 0 }, { 0, 10800 }, { 10800, 21600 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoFlowChartMagneticDisk =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartMagneticDiskVert, sizeof( mso_sptFlowChartMagneticDiskVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartMagneticDiskSegm, sizeof( mso_sptFlowChartMagneticDiskSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartMagneticDiskTextRect, sizeof( mso_sptFlowChartMagneticDiskTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartMagneticDiskGluePoints, sizeof( mso_sptFlowChartMagneticDiskGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartMagneticDrumVert[] =
-{
- { 18200, 0 }, { 21600, 10800 }, { 18200, 21600 }, { 3400, 21600 },
- { 0, 10800 }, { 3400, 0 },
-
- { 18200, 0 }, { 14800, 10800 }, { 18200, 21600 }
-};
-static const sal_uInt16 mso_sptFlowChartMagneticDrumSegm[] =
-{
- 0x4000, 0xa702, 0x0001, 0xa702, 0x6000, 0x8000,
- 0x4000, 0xa702, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartMagneticDrumTextRect[] =
-{
- { { 3400, 0 }, { 14800, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptFlowChartMagneticDrumGluePoints[] =
-{
- { 10800, 0 }, { 0, 10800 }, { 10800, 21600 }, { 14800, 10800 }, { 21600, 10800 }
-};
-static const mso_CustomShape msoFlowChartMagneticDrum =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartMagneticDrumVert, sizeof( mso_sptFlowChartMagneticDrumVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartMagneticDrumSegm, sizeof( mso_sptFlowChartMagneticDrumSegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartMagneticDrumTextRect, sizeof( mso_sptFlowChartMagneticDrumTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptFlowChartMagneticDrumGluePoints, sizeof( mso_sptFlowChartMagneticDrumGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptFlowChartDisplayVert[] =
-{
- { 3600, 0 }, { 17800, 0 }, { 21600, 10800 }, { 17800, 21600 },
- { 3600, 21600 }, { 0, 10800 }
-};
-static const sal_uInt16 mso_sptFlowChartDisplaySegm[] =
-{
- 0x4000, 0x0001, 0xa702, 0x0002, 0x6000, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptFlowChartDisplayTextRect[] =
-{
- { { 3600, 0 }, { 17800, 21600 } }
-};
-static const mso_CustomShape msoFlowChartDisplay =
-{
- (SvxMSDffVertPair*)mso_sptFlowChartDisplayVert, sizeof( mso_sptFlowChartDisplayVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptFlowChartDisplaySegm, sizeof( mso_sptFlowChartDisplaySegm ) >> 1,
- NULL, 0,
- NULL,
- (SvxMSDffTextRectangles*)mso_sptFlowChartDisplayTextRect, sizeof( mso_sptFlowChartDisplayTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptStandardGluePoints, sizeof( mso_sptStandardGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptWedgeRectCalloutVert[] =
-{
- { 0, 0 },
- { 0, 3590 }, { 2 MSO_I, 3 MSO_I }, { 0, 8970 },
- { 0, 12630 },{ 4 MSO_I, 5 MSO_I }, { 0, 18010 },
- { 0, 21600 },
- { 3590, 21600 }, { 6 MSO_I, 7 MSO_I }, { 8970, 21600 },
- { 12630, 21600 }, { 8 MSO_I, 9 MSO_I }, { 18010, 21600 },
- { 21600, 21600 },
- { 21600, 18010 }, { 10 MSO_I, 11 MSO_I }, { 21600, 12630 },
- { 21600, 8970 }, { 12 MSO_I, 13 MSO_I }, { 21600, 3590 },
- { 21600, 0 },
- { 18010, 0 }, { 14 MSO_I, 15 MSO_I }, { 12630, 0 },
- { 8970, 0 }, { 16 MSO_I, 17 MSO_I }, { 3590, 0 },
- { 0, 0 }
-};
-static const SvxMSDffCalculationData mso_sptWedgeRectCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 10800 }, //0x400
- { 0x2000, DFF_Prop_adjust2Value, 0,10800 },
- { 0x6006, 0x412, DFF_Prop_adjustValue, 0 }, //0x402
- { 0x6006, 0x412, DFF_Prop_adjust2Value, 6280 },
- { 0x6006, 0x417, DFF_Prop_adjustValue, 0 }, //0x404
- { 0x6006, 0x417, DFF_Prop_adjust2Value, 15320 },
- { 0x6006, 0x41a, DFF_Prop_adjustValue, 6280 }, //0x406
- { 0x6006, 0x41a, DFF_Prop_adjust2Value, 21600 },
- { 0x6006, 0x41d, DFF_Prop_adjustValue, 15320 }, //0x408
- { 0x6006, 0x41d, DFF_Prop_adjust2Value, 21600 },
- { 0x6006, 0x420, DFF_Prop_adjustValue, 21600 }, //0x40a
- { 0x6006, 0x420, DFF_Prop_adjust2Value, 15320 },
- { 0x6006, 0x422, DFF_Prop_adjustValue, 21600 }, //0x40c
- { 0x6006, 0x422, DFF_Prop_adjust2Value, 6280 },
- { 0x6006, 0x424, DFF_Prop_adjustValue, 15320 }, //0x40e
- { 0x6006, 0x424, DFF_Prop_adjust2Value, 0 },
- { 0x6006, 0x426, DFF_Prop_adjustValue, 6280 }, //0x410
- { 0x6006, 0x426, DFF_Prop_adjust2Value, 0 },
- { 0xa006, DFF_Prop_adjustValue, -1, 0x413 }, //0x412
- { 0xa006, 0x401, -1, 0x416 },
- { 0x2003, 0x400, 0, 0 }, //0x414
- { 0x2003, 0x401, 0, 0 },
- { 0xa000, 0x414, 0, 0x415 }, //0x416
- { 0xa006, DFF_Prop_adjustValue, -1, 0x418 },
- { 0x6006, 0x401, 0x416, -1 }, //0x418
- { 0x2000, DFF_Prop_adjust2Value, 0, 21600 },
- { 0x6006, 0x419, 0x41b, -1 }, //0x41a
- { 0xa006, 0x400, -1, 0x41c },
- { 0xa000, 0x415, 0, 0x414 }, //0x41c
- { 0x6006, 0x419, 0x41e, -1 },
- { 0x6006, 0x400, 0x41c, -1 }, //0x41e
- { 0x2000, DFF_Prop_adjustValue, 0, 21600 },
- { 0x6006, 0x41f, 0x421, -1 }, //0x420
- { 0x6006, 0x401, 0x416, -1 },
- { 0x6006, 0x41f, 0x423, -1 }, //0x422
- { 0xa006, 0x401, -1, 0x416 },
- { 0xa006, DFF_Prop_adjust2Value, -1, 0x425 }, //0x424
- { 0x6006, 0x400, 0x41c, -1 },
- { 0xa006, DFF_Prop_adjust2Value, -1, 0x427 }, //0x426
- { 0xa006, 0x400, -1, 0x41c },
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, //0x428
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }
-};
-static const sal_Int32 mso_sptWedgeRectCalloutDefault[] =
-{
- 2, 1400, 25920
-};
-static const SvxMSDffTextRectangles mso_sptWedgeRectCalloutTextRect[] =
-{
- { { 0, 0 }, { 21600, 21600 } }
-};
-static const SvxMSDffVertPair mso_sptWedgeRectCalloutGluePoints[] =
-{
- { 10800, 0 }, { 0, 10800 }, { 10800, 21600 }, { 21600, 10800 }, { 40 MSO_I, 41 MSO_I }
-};
-static const mso_CustomShape msoWedgeRectCallout =
-{
- (SvxMSDffVertPair*)mso_sptWedgeRectCalloutVert, sizeof( mso_sptWedgeRectCalloutVert ) / sizeof( SvxMSDffVertPair ),
- NULL, 0,
- (SvxMSDffCalculationData*)mso_sptWedgeRectCalloutCalc, sizeof( mso_sptWedgeRectCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptWedgeRectCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptWedgeRectCalloutTextRect, sizeof( mso_sptWedgeRectCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptWedgeRectCalloutGluePoints, sizeof( mso_sptWedgeRectCalloutGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptWaveVert[] = // adjustment1 : 0 - 4460
-{ // adjustment2 : 8640 - 12960
- { 7 MSO_I, 0 MSO_I }, { 15 MSO_I, 9 MSO_I }, { 16 MSO_I, 10 MSO_I }, { 12 MSO_I, 0 MSO_I },
- { 24 MSO_I, 1 MSO_I }, { 25 MSO_I, 26 MSO_I }, { 27 MSO_I, 28 MSO_I }, { 29 MSO_I, 1 MSO_I }
-};
-static const SvxMSDffCalculationData mso_sptWaveCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, //400 (vert.adj)
- { 0x8000, 21600, 0, 0x400 }, //401
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },//402 (horz.adj)
- { 0x2000, 0x402, 0, 10800 }, //403 -2160 -> 2160 (horz.adj)
- { 0x2001, 0x403, 2, 1 }, //404 -4320 -> 4320 (horz.adj)
- { 0x2003, 0x404, 0, 0 }, //405 abs( 0x404 ) (horz.adj)
- { 0x8000, 4320, 0, 0x405 }, //406
- { 0xa006, 0x403, 0, 0x405 }, //407
- { 0x4001, 15800, 0x400, 4460 }, //408 0 -> 15800 (vert.adj)
- { 0xa000, 0x400, 0, 0x408 }, //409
- { 0x6000, 0x400, 0x408, 0 }, //40a
- { 0x8000, 21600, 0, 0x404 }, //40b
- { 0x6006, 0x403, 0x40b, 21600 }, //40c
- { 0xa000, 0x40c, 0, 0x407 }, //40d width between p0 and p1
- { 0x2001, 0x405, 1, 2 }, //40e
- { 0xa000, 0x407, 7200, 0x40e }, //40f
- { 0x6000, 0x40c, 0x40e, 7200 }, //410
- { 0x2001, 0x40d, 1, 2 }, //411 1/2 width
- { 0x6000, 0x407, 0x411, 0 }, //412 top center glue xpos
- { 0x8000, 21600, 0, 0x412 }, //413 bottom center glue xpos
- { 0x2001, 0x405, 1, 2 }, //414 left glue x pos
- { 0x8000, 21600, 0, 0x414 }, //415 right glue x pos
- { 0x2001, 0x400, 2, 1 }, //416 y1 (textbox)
- { 0x8000, 21600, 0, 0x416 }, //417 y2 (textbox)
-
- { 0x8000, 21600, 0, 0x407 }, //418 p2
-
- { 0x8000, 21600, 0, 0x40f }, //419 c
- { 0x6000, 0x401, 0x408, 0 }, //41a
-
- { 0x8000, 21600, 0, 0x410 }, //41b c
- { 0xa000, 0x401, 0, 0x408 }, //41c
-
- { 0x8000, 21600, 0, 0x40c } //41d p3
-};
-static const SvxMSDffVertPair mso_sptWaveGluePoints[] =
-{
- { 0x12 MSO_I, 0 MSO_I }, { 0x14 MSO_I, 10800 }, { 0x13 MSO_I, 1 MSO_I }, { 0x15 MSO_I, 10800 }
-};
-static const sal_uInt16 mso_sptWaveSegm[] =
-{
- 0x4000, 0x2001, 0x0001, 0x2001, 0x6000, 0x8000
-};
-static const sal_Int32 mso_sptWaveDefault[] =
-{
- 2, 1400, 10800
-};
-static const SvxMSDffTextRectangles mso_sptWaveTextRect[] =
-{
- { { 5 MSO_I, 22 MSO_I }, { 11 MSO_I, 23 MSO_I } }
-};
-static const mso_CustomShape msoWave =
-{
- (SvxMSDffVertPair*)mso_sptWaveVert, sizeof( mso_sptWaveVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptWaveSegm, sizeof( mso_sptWaveSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptWaveCalc, sizeof( mso_sptWaveCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptWaveDefault,
- (SvxMSDffTextRectangles*)mso_sptWaveTextRect, sizeof( mso_sptWaveTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptWaveGluePoints, sizeof( mso_sptWaveGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-static const SvxMSDffVertPair mso_sptDoubleWaveVert[] = // adjustment1 : 0 - 2230
-{ // adjustment2 : 8640 - 12960
- { 7 MSO_I, 0 MSO_I }, { 15 MSO_I, 9 MSO_I }, { 0x1e MSO_I, 10 MSO_I }, { 0x12 MSO_I, 0 MSO_I }, { 0x1f MSO_I, 9 MSO_I }, { 16 MSO_I, 10 MSO_I }, { 12 MSO_I, 0 MSO_I },
- { 24 MSO_I, 1 MSO_I }, { 25 MSO_I, 26 MSO_I }, { 0x21 MSO_I, 28 MSO_I }, { 0x13 MSO_I, 1 MSO_I }, { 0x20 MSO_I, 26 MSO_I }, { 27 MSO_I, 28 MSO_I }, { 29 MSO_I, 1 MSO_I }
-};
-static const SvxMSDffCalculationData mso_sptDoubleWaveCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, //400 (vert.adj)
- { 0x8000, 21600, 0, 0x400 }, //401
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 },//402 (horz.adj)
- { 0x2000, 0x402, 0, 10800 }, //403 -2160 -> 2160 (horz.adj)
- { 0x2001, 0x403, 2, 1 }, //404 -4320 -> 4320 (horz.adj)
- { 0x2003, 0x404, 0, 0 }, //405 abs( 0x404 ) (horz.adj)
- { 0x8000, 4320, 0, 0x405 }, //406 -> not used
- { 0xa006, 0x403, 0, 0x405 }, //407
- { 0x4001, 7900, 0x400, 2230 }, //408 0 -> 7900 (vert.adj)
- { 0xa000, 0x400, 0, 0x408 }, //409
- { 0x6000, 0x400, 0x408, 0 }, //40a
- { 0x8000, 21600, 0, 0x404 }, //40b
- { 0x6006, 0x403, 0x40b, 21600 }, //40c
- { 0xa000, 0x40c, 0, 0x407 }, //40d width between p0 and p1
- { 0x2001, 0x405, 1, 2 }, //40e
- { 0xa000, 0x407, 3600, 0x40e }, //40f
- { 0x6000, 0x40c, 0x40e, 3600 }, //410
- { 0x2001, 0x40d, 1, 2 }, //411 1/2 width
- { 0x6000, 0x407, 0x411, 0 }, //412 top center glue xpos
- { 0x8000, 21600, 0, 0x412 }, //413 bottom center glue xpos
- { 0x2001, 0x405, 1, 2 }, //414 left glue x pos
- { 0x8000, 21600, 0, 0x414 }, //415 right glue x pos
- { 0x2001, 0x400, 2, 1 }, //416 y1 (textbox)
- { 0x8000, 21600, 0, 0x416 }, //417 y2 (textbox)
-
- { 0x8000, 21600, 0, 0x407 }, //418 p2
-
- { 0x8000, 21600, 0, 0x40f }, //419 c
- { 0x6000, 0x401, 0x408, 0 }, //41a
-
- { 0x8000, 21600, 0, 0x410 }, //41b c
- { 0xa000, 0x401, 0, 0x408 }, //41c
-
- { 0x8000, 21600, 0, 0x40c }, //41d p3
- { 0xa000, 0x412, 0, 0x40e }, //41e
- { 0x6000, 0x412, 0x40e, 0 }, //41f
- { 0xa000, 0x413, 0, 0x40e }, //420
- { 0x6000, 0x413, 0x40e, 0 } //421
-};
-static const SvxMSDffVertPair mso_sptDoubleWaveGluePoints[] =
-{
- { 0x12 MSO_I, 0 MSO_I }, { 0x14 MSO_I, 10800 }, { 0x13 MSO_I, 1 MSO_I }, { 0x15 MSO_I, 10800 }
-};
-static const sal_uInt16 mso_sptDoubleWaveSegm[] =
-{
- 0x4000, 0x2002, 0x0001, 0x2002, 0x6000, 0x8000
-};
-static const sal_Int32 mso_sptDoubleWaveDefault[] =
-{
- 2, 1400, 10800
-};
-static const SvxMSDffTextRectangles mso_sptDoubleWaveTextRect[] =
-{
- { { 5 MSO_I, 22 MSO_I }, { 11 MSO_I, 23 MSO_I } }
-};
-static const mso_CustomShape msoDoubleWave =
-{
- (SvxMSDffVertPair*)mso_sptDoubleWaveVert, sizeof( mso_sptDoubleWaveVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptDoubleWaveSegm, sizeof( mso_sptDoubleWaveSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptDoubleWaveCalc, sizeof( mso_sptDoubleWaveCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptDoubleWaveDefault,
- (SvxMSDffTextRectangles*)mso_sptDoubleWaveTextRect, sizeof( mso_sptDoubleWaveTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptDoubleWaveGluePoints, sizeof( mso_sptDoubleWaveGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-static const SvxMSDffVertPair mso_sptWedgeRRectCalloutVert[] =
-{
- { 3590, 0 },
- { 0, 3590 },
- { 2 MSO_I, 3 MSO_I }, { 0, 8970 },
- { 0, 12630 },{ 4 MSO_I, 5 MSO_I }, { 0, 18010 },
- { 3590, 21600 },
- { 6 MSO_I, 7 MSO_I }, { 8970, 21600 },
- { 12630, 21600 }, { 8 MSO_I, 9 MSO_I }, { 18010, 21600 },
- { 21600, 18010 },
- { 10 MSO_I, 11 MSO_I }, { 21600, 12630 },
- { 21600, 8970 }, { 12 MSO_I, 13 MSO_I }, { 21600, 3590 },
- { 18010, 0 },
- { 14 MSO_I, 15 MSO_I }, { 12630, 0 },
- { 8970, 0 }, { 16 MSO_I, 17 MSO_I }
-};
-static const sal_uInt16 mso_sptWedgeRRectCalloutSegm[] =
-{
- 0x4000, 0xa701, 0x0005, 0xa801, 0x0005, 0xa701, 0x0005, 0xa801, 0x0004, 0x6001, 0x8000
-};
-static const SvxMSDffTextRectangles mso_sptWedgeRRectCalloutTextRect[] =
-{
- { { 800, 800 }, { 20800, 20800 } }
-};
-static const mso_CustomShape msoWedgeRRectCallout =
-{
- (SvxMSDffVertPair*)mso_sptWedgeRRectCalloutVert, sizeof( mso_sptWedgeRRectCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptWedgeRRectCalloutSegm, sizeof( mso_sptWedgeRRectCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptWedgeRectCalloutCalc, sizeof( mso_sptWedgeRectCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptWedgeRectCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptWedgeRRectCalloutTextRect, sizeof( mso_sptWedgeRRectCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-static const SvxMSDffVertPair mso_sptWedgeEllipseCalloutVert[] =
-{
- { 0, 0 }, { 21600, 21600 }, { 0x16 MSO_I, 0x17 MSO_I }, { 0x12 MSO_I, 0x13 MSO_I }, { 0xe MSO_I, 0xf MSO_I }
-};
-static const sal_uInt16 mso_sptWedgeEllipseCalloutSegm[] =
-{
- 0xa504, 0x0001, 0x6001, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptWedgeEllipseCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 10800 }, // 00 rad x
- { 0x2000, DFF_Prop_adjust2Value, 0, 10800 }, // 01 rad y
- { 0x6001, 0x400, 0x400, 1 }, // 02 rad x^2
- { 0x6001, 0x401, 0x401, 1 }, // 03 rad y^2
- { 0x6000, 0x402, 0x403, 0 }, // 04
- { 0x200d, 0x404, 0, 0 }, // 05
- { 0x2000, 0x405, 0, 10800 }, // 06 > 0 ? spur needs to be drawn : 10800
- { 0x6008, 0x400, 0x401, 0 }, // 07 atan2 -> angle
- { 0x2000, 0x407, 0, 10 }, // 08
- { 0x2000, 0x407, 10, 0 }, // 09
- { 0x400a, 10800, 0x407, 0 }, // 0a
- { 0x4009, 10800, 0x407, 0 }, // 0b
- { 0x2000, 0x40a, 10800, 0 }, // 0c
- { 0x2000, 0x40b, 10800, 0 }, // 0d
- { 0xe006, 0x406, DFF_Prop_adjustValue, 0x40c }, // 0e
- { 0xe006, 0x406, DFF_Prop_adjust2Value, 0x40d },// 0f
- { 0x400a, 10800, 0x408, 0 }, // 10
- { 0x4009, 10800, 0x408, 0 }, // 11
- { 0x2000, 0x410, 10800, 0 }, // 12
- { 0x2000, 0x411, 10800, 0 }, // 13
- { 0x400a, 10800, 0x409, 0 }, // 14
- { 0x4009, 10800, 0x409, 0 }, // 15
- { 0x2000, 0x414, 10800, 0 }, // 16
- { 0x2000, 0x415, 10800, 0 }, // 17
-};
-static const sal_Int32 mso_sptWedgeEllipseCalloutDefault[] =
-{
- 2, 1350, 25920
-};
-static const SvxMSDffVertPair mso_sptWedgeEllipseCalloutGluePoints[] =
-{
- { 10800, 0 }, { 3160, 3160 }, { 0, 10800 }, { 3160, 18440 }, { 10800, 21600 }, { 18440, 18440 }, { 21600, 10800 }, { 18440, 3160 }, { 0xe MSO_I, 0xf MSO_I }
-};
-static const SvxMSDffTextRectangles mso_sptWedgeEllipseCalloutTextRect[] =
-{
- { { 3200, 3200 }, { 18400, 18400 } }
-};
-static const mso_CustomShape msoWedgeEllipseCallout =
-{
- (SvxMSDffVertPair*)mso_sptWedgeEllipseCalloutVert, sizeof( mso_sptWedgeEllipseCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptWedgeEllipseCalloutSegm, sizeof( mso_sptWedgeEllipseCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptWedgeEllipseCalloutCalc, sizeof( mso_sptWedgeEllipseCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptWedgeEllipseCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptWedgeEllipseCalloutTextRect, sizeof( mso_sptWedgeEllipseCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- (SvxMSDffVertPair*)mso_sptWedgeEllipseCalloutGluePoints, sizeof( mso_sptWedgeEllipseCalloutGluePoints ) / sizeof( SvxMSDffVertPair )
-};
-
-static const SvxMSDffVertPair mso_sptCloudCalloutVert[] =
-{
- { 1930,7160 }, // p
- { 1530,4490 }, { 3400,1970 }, { 5270,1970 }, // ccp
- { 5860,1950 }, { 6470,2210 }, { 6970,2600 }, // ccp
- { 7450,1390 }, { 8340,650 }, { 9340,650 }, // ccp
- { 10004,690 }, { 10710,1050 }, { 11210,1700 }, // ccp
- { 11570,630 }, { 12330,0 }, { 13150,0 }, // ccp
- { 13840,0 }, { 14470,460 }, { 14870,1160 }, // ccp
- { 15330,440 }, { 16020,0 }, { 16740,0 }, // ccp
- { 17910,0 }, { 18900,1130 }, { 19110,2710 }, // ccp
- { 20240,3150 }, { 21060,4580 }, { 21060,6220 }, // ccp
- { 21060,6720 }, { 21000,7200 }, { 20830,7660 }, // ccp
- { 21310,8460 }, { 21600,9450 }, { 21600,10460 }, // ccp
- { 21600,12750 }, { 20310,14680 }, { 18650,15010 }, // ccp
- { 18650,17200 }, { 17370,18920 }, { 15770,18920 }, // ccp
- { 15220,18920 }, { 14700,18710 }, { 14240,18310 }, // ccp
- { 13820,20240 }, { 12490,21600 }, { 11000,21600 }, // ccp
- { 9890,21600 }, { 8840,20790 }, { 8210,19510 }, // ccp
- { 7620,20000 }, { 7930,20290 }, { 6240,20290 }, // ccp
- { 4850,20290 }, { 3570,19280 }, { 2900,17640 }, // ccp
- { 1300,17600 }, { 480,16300 }, { 480,14660 }, // ccp
- { 480,13900 }, { 690,13210 }, { 1070,12640 }, // ccp
- { 380,12160 }, { 0,11210 }, { 0,10120 }, // ccp
- { 0,8590 }, { 840,7330 }, { 1930,7160 }, // ccp
-
- { 1930, 7160 }, { 1950, 7410 }, { 2040, 7690 }, { 2090, 7920 }, // pccp
- { 6970, 2600 }, { 7200, 2790 }, { 7480, 3050 }, { 7670, 3310 }, // pccp
- { 11210, 1700 }, { 11130, 1910 }, { 11080, 2160 }, { 11030, 2400 }, // pccp
- { 14870, 1160 }, { 14720, 1400 }, { 14640, 1720 }, { 14540, 2010 }, // pccp
- { 19110, 2710 }, { 19130, 2890 }, { 19230, 3290 }, { 19190, 3380 }, // pccp
- { 20830, 7660 }, { 20660, 8170 }, { 20430, 8620 }, { 20110, 8990 }, // pccp
- { 18660, 15010 }, { 18740, 14200 }, { 18280, 12200 }, { 17000, 11450 }, // pccp
- { 14240, 18310 }, { 14320, 17980 }, { 14350, 17680 }, { 14370, 17360 }, // pccp
- { 8220, 19510 }, { 8060, 19250 }, { 7960, 18950 }, { 7860, 18640 }, // pccp
- { 2900, 17640 }, { 3090, 17600 }, { 3280, 17540 }, { 3460, 17450 }, // pccp
- { 1070, 12640 }, { 1400, 12900 }, { 1780, 13130 }, { 2330, 13040 } // pccp
-};
-static const sal_uInt16 mso_sptCloudCalloutSegm[] =
-{
- 0x4000, 0x2016, 0x6001, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000,
- 0x4000, 0x2001, 0xaa00, 0x8000
-};
-static const SvxMSDffCalculationData mso_sptCloudCalloutCalc[] =
-{
- { 0x2000, DFF_Prop_adjustValue, 0, 10800 },
- { 0x2000, DFF_Prop_adjust2Value, 0, 10800 },
- { 0x6008, 0x400, 0x401, 0 },
- { 0x400a, 10800, 0x402, 0 }, // 3
- { 0x4009, 10800, 0x402, 0 }, // 4
- { 0x2000, 0x403, 10800, 0 }, // 5
- { 0x2000, 0x404, 10800, 0 }, // 6
- { 0xa000, DFF_Prop_adjustValue, 0, 0x405 }, // 7
- { 0xa000, DFF_Prop_adjust2Value,0, 0x406 }, // 8
- { 0x2001, 0x407, 1, 3 }, // 9
- { 0x2001, 0x408, 1, 3 }, // 0xa
- { 0x2001, 0x407, 2, 3 }, // 0xb
- { 0x2001, 0x408, 2, 3 }, // 0xc
- { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0xd
- { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 0xe
- { 0x2001, 0x403, 1, 10800 / 900 }, // 0xf taking half x distance of the radius from the first bobble
- { 0x2001, 0x404, 1, 10800 / 900 }, // 0x10
- { 0xe000, 0x409, 0x405, 0x40f }, // 0x11
- { 0xe000, 0x40a, 0x406, 0x410 }, // 0x12
- { 0x6000, 0x40b, 0x405, 0 }, // 0x13
- { 0x6000, 0x40c, 0x406, 0 } // 0x14
-};
-static const sal_Int32 mso_sptCloudCalloutDefault[] =
-{
- 2, 1350, 25920
-};
-static const SvxMSDffTextRectangles mso_sptCloudCalloutTextRect[] =
-{
- { { 3000, 3320 }, { 17110, 17330 } }
-};
-static const mso_CustomShape msoCloudCallout =
-{
- (SvxMSDffVertPair*)mso_sptCloudCalloutVert, sizeof( mso_sptCloudCalloutVert ) / sizeof( SvxMSDffVertPair ),
- (sal_uInt16*)mso_sptCloudCalloutSegm, sizeof( mso_sptCloudCalloutSegm ) >> 1,
- (SvxMSDffCalculationData*)mso_sptCloudCalloutCalc, sizeof( mso_sptCloudCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
- (sal_Int32*)mso_sptCloudCalloutDefault,
- (SvxMSDffTextRectangles*)mso_sptCloudCalloutTextRect, sizeof( mso_sptCloudCalloutTextRect ) / sizeof( SvxMSDffTextRectangles ),
- 21600, 21600,
- 0x80000000, 0x80000000,
- NULL, 0
-};
-
-
-class SvxMSDffAdjustmentHandle
-{
- sal_Int32 nAdjustValue;
- sal_Int32 nDefaultValue;
- sal_Bool bIsDefault;
-
- public :
- SvxMSDffAdjustmentHandle() : nAdjustValue( 0 ), nDefaultValue( 0 ), bIsDefault( TRUE ) {};
-
- void SetAdjustValue( sal_Int32 nVal ) { nAdjustValue = nVal; bIsDefault = FALSE; };
- sal_Int32 GetAdjustValue() const { return bIsDefault ? nDefaultValue : nAdjustValue; };
- void SetDefaultValue( sal_Int32 nVal ) { nDefaultValue = nVal; };
- sal_Bool IsDefault() const { return bIsDefault; };
-};
-
-const mso_CustomShape* GetCustomShapeContent2( MSO_SPT eSpType )
-{
- const mso_CustomShape* pCustomShape = NULL;
- switch( eSpType )
- {
- case mso_sptArc : pCustomShape = &msoArc; break;
- case mso_sptRectangle : pCustomShape = &msoRectangle; break;
- case mso_sptParallelogram : pCustomShape = &msoParallelogram; break;
- case mso_sptTrapezoid : pCustomShape = &msoTrapezoid; break;
- case mso_sptDiamond : pCustomShape = &msoDiamond; break;
- case mso_sptRoundRectangle : pCustomShape = &msoRoundRectangle; break;
- case mso_sptOctagon : pCustomShape = &msoOctagon; break;
- case mso_sptIsocelesTriangle : pCustomShape = &msoIsocelesTriangle; break;
- case mso_sptRightTriangle : pCustomShape = &msoRightTriangle; break;
- case mso_sptEllipse : pCustomShape = &msoEllipse; break;
- case mso_sptHexagon : pCustomShape = &msoHexagon; break;
- case mso_sptPlus : pCustomShape = &msoPlus; break;
- case mso_sptPentagon : pCustomShape = &msoPentagon; break;
- case mso_sptCan : pCustomShape = &msoCan; break;
- case mso_sptCube : pCustomShape = &msoCube; break;
- case mso_sptActionButtonBlank : pCustomShape = &msoActionButtonBlank; break;
- case mso_sptActionButtonHome : pCustomShape = &msoActionButtonHome; break;
- case mso_sptActionButtonHelp : pCustomShape = &msoActionButtonHelp; break;
- case mso_sptActionButtonInformation : pCustomShape = &msoActionButtonInformation; break;
- case mso_sptActionButtonBackPrevious : pCustomShape = &msoActionButtonBackPrevious; break;
- case mso_sptActionButtonForwardNext : pCustomShape = &msoActionButtonForwardNext; break;
- case mso_sptActionButtonBeginning : pCustomShape = &msoActionButtonBeginning; break;
- case mso_sptActionButtonEnd : pCustomShape = &msoActionButtonEnd; break;
- case mso_sptActionButtonReturn : pCustomShape = &msoActionButtonReturn; break;
- case mso_sptActionButtonDocument : pCustomShape = &msoActionButtonDocument; break;
- case mso_sptActionButtonSound : pCustomShape = &msoActionButtonSound; break;
- case mso_sptActionButtonMovie : pCustomShape = &msoActionButtonMovie; break;
- case mso_sptBevel : pCustomShape = &msoBevel; break;
- case mso_sptFoldedCorner : pCustomShape = &msoFoldedCorner; break;
- case mso_sptSmileyFace : pCustomShape = &msoSmileyFace; break;
- case mso_sptDonut : pCustomShape = &msoDonut; break;
- case mso_sptNoSmoking : pCustomShape = &msoNoSmoking; break;
- case mso_sptBlockArc : pCustomShape = &msoBlockArc; break;
- case mso_sptHeart : pCustomShape = &msoHeart; break;
- case mso_sptLightningBolt : pCustomShape = &msoLightningBold; break;
- case mso_sptSun : pCustomShape = &msoSun; break;
- case mso_sptMoon : pCustomShape = &msoMoon; break;
- case mso_sptBracketPair : pCustomShape = &msoBracketPair; break;
- case mso_sptBracePair : pCustomShape = &msoBracePair; break;
- case mso_sptPlaque : pCustomShape = &msoPlaque; break;
- case mso_sptLeftBracket : pCustomShape = &msoLeftBracket; break;
- case mso_sptRightBracket : pCustomShape = &msoRightBracket; break;
- case mso_sptLeftBrace : pCustomShape = &msoLeftBrace; break;
- case mso_sptRightBrace : pCustomShape = &msoRightBrace; break;
- case mso_sptArrow : pCustomShape = &msoArrow; break;
- case mso_sptUpArrow : pCustomShape = &msoUpArrow; break;
- case mso_sptDownArrow : pCustomShape = &msoDownArrow; break;
- case mso_sptLeftArrow : pCustomShape = &msoLeftArrow; break;
- case mso_sptLeftRightArrow : pCustomShape = &msoLeftRightArrow; break;
- case mso_sptUpDownArrow : pCustomShape = &msoUpDownArrow; break;
- case mso_sptQuadArrow : pCustomShape = &msoQuadArrow; break;
- case mso_sptLeftRightUpArrow : pCustomShape = &msoLeftRightUpArrow; break;
- case mso_sptBentArrow : pCustomShape = &msoBentArrow; break;
- case mso_sptUturnArrow : pCustomShape = &msoUturnArrow; break;
- case mso_sptLeftUpArrow : pCustomShape = &msoLeftUpArrow; break;
- case mso_sptBentUpArrow : pCustomShape = &msoBentUpArrow; break;
- case mso_sptCurvedRightArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptCurvedLeftArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptCurvedUpArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptCurvedDownArrow : pCustomShape = &msoCurvedArrow; break;
- case mso_sptStripedRightArrow : pCustomShape = &msoStripedRightArrow; break;
- case mso_sptNotchedRightArrow : pCustomShape = &msoNotchedRightArrow; break;
- case mso_sptHomePlate : pCustomShape = &msoHomePlate; break;
- case mso_sptChevron : pCustomShape = &msoChevron; break;
- case mso_sptRightArrowCallout : pCustomShape = &msoRightArrowCallout; break;
- case mso_sptLeftArrowCallout : pCustomShape = &msoLeftArrowCallout; break;
- case mso_sptUpArrowCallout : pCustomShape = &msoUpArrowCallout; break;
- case mso_sptDownArrowCallout : pCustomShape = &msoDownArrowCallout; break;
- case mso_sptLeftRightArrowCallout : pCustomShape = &msoLeftRightArrowCallout; break;
- case mso_sptUpDownArrowCallout : pCustomShape = &msoUpDownArrowCallout; break;
- case mso_sptQuadArrowCallout : pCustomShape = &msoQuadArrowCallout; break;
- case mso_sptCircularArrow : pCustomShape = &msoCircularArrow; break;
- case mso_sptIrregularSeal1 : pCustomShape = &msoIrregularSeal1; break;
- case mso_sptIrregularSeal2 : pCustomShape = &msoIrregularSeal2; break;
- case mso_sptSeal4 : pCustomShape = &msoSeal4; break;
- case mso_sptStar : pCustomShape = &msoStar; break;
- case mso_sptSeal8 : pCustomShape = &msoSeal8; break;
- case mso_sptSeal16 : pCustomShape = &msoSeal16; break;
- case mso_sptSeal24 : pCustomShape = &msoSeal24; break;
- case mso_sptSeal32 : pCustomShape = &msoSeal32; break;
- case mso_sptRibbon2 : pCustomShape = &msoRibbon2; break;
- case mso_sptRibbon : pCustomShape = &msoRibbon2; break;
- case mso_sptEllipseRibbon2 : pCustomShape = &msoRibbon2; break; //!!!!!
- case mso_sptEllipseRibbon : pCustomShape = &msoRibbon2; break; //!!!!!
- case mso_sptVerticalScroll : pCustomShape = &msoVerticalScroll; break;
- case mso_sptHorizontalScroll : pCustomShape = &msoHorizontalScroll; break;
- case mso_sptFlowChartProcess : pCustomShape = &msoFlowChartProcess; break;
- case mso_sptFlowChartAlternateProcess : pCustomShape = &msoFlowChartAlternateProcess; break;
- case mso_sptFlowChartDecision : pCustomShape = &msoFlowChartDecision; break;
- case mso_sptFlowChartInputOutput : pCustomShape = &msoFlowChartInputOutput; break;
- case mso_sptFlowChartPredefinedProcess :pCustomShape = &msoFlowChartPredefinedProcess; break;
- case mso_sptFlowChartInternalStorage : pCustomShape = &msoFlowChartInternalStorage; break;
- case mso_sptFlowChartDocument : pCustomShape = &msoFlowChartDocument; break;
- case mso_sptFlowChartMultidocument : pCustomShape = &msoFlowChartMultidocument; break;
- case mso_sptFlowChartTerminator : pCustomShape = &msoFlowChartTerminator; break;
- case mso_sptFlowChartPreparation : pCustomShape = &msoFlowChartPreparation; break;
- case mso_sptFlowChartManualInput : pCustomShape = &msoFlowChartManualInput; break;
- case mso_sptFlowChartManualOperation : pCustomShape = &msoFlowChartManualOperation; break;
- case mso_sptFlowChartConnector : pCustomShape = &msoFlowChartConnector; break;
- case mso_sptFlowChartOffpageConnector : pCustomShape = &msoFlowChartOffpageConnector; break;
- case mso_sptFlowChartPunchedCard : pCustomShape = &msoFlowChartPunchedCard; break;
- case mso_sptFlowChartPunchedTape : pCustomShape = &msoFlowChartPunchedTape; break;
- case mso_sptFlowChartSummingJunction : pCustomShape = &msoFlowChartSummingJunction; break;
- case mso_sptFlowChartOr : pCustomShape = &msoFlowChartOr; break;
- case mso_sptFlowChartCollate : pCustomShape = &msoFlowChartCollate; break;
- case mso_sptFlowChartSort : pCustomShape = &msoFlowChartSort; break;
- case mso_sptFlowChartExtract : pCustomShape = &msoFlowChartExtract; break;
- case mso_sptFlowChartMerge : pCustomShape = &msoFlowChartMerge; break;
- case mso_sptFlowChartOnlineStorage : pCustomShape = &msoFlowChartOnlineStorage; break;
- case mso_sptFlowChartDelay : pCustomShape = &msoFlowChartDelay; break;
- case mso_sptFlowChartMagneticTape : pCustomShape = &msoFlowChartMagneticTape; break;
- case mso_sptFlowChartMagneticDisk : pCustomShape = &msoFlowChartMagneticDisk; break;
- case mso_sptFlowChartMagneticDrum : pCustomShape = &msoFlowChartMagneticDrum; break;
- case mso_sptFlowChartDisplay : pCustomShape = &msoFlowChartDisplay; break;
- case mso_sptWave : pCustomShape = &msoWave; break;
- case mso_sptDoubleWave : pCustomShape = &msoDoubleWave; break;
- case mso_sptWedgeRectCallout : pCustomShape = &msoWedgeRectCallout; break;
- case mso_sptBalloon :
- case mso_sptWedgeRRectCallout : pCustomShape = &msoWedgeRRectCallout; break;
- case mso_sptWedgeEllipseCallout : pCustomShape = &msoWedgeEllipseCallout; break;
- case mso_sptCloudCallout : pCustomShape = &msoCloudCallout; break;
-
- default :
- break;
- }
- return pCustomShape;
-}
-
-SvxMSDffCustomShape::~SvxMSDffCustomShape()
-{
- if ( bVertAlloc )
- delete[] pVertData;
- if ( bSegAlloc )
- delete[] pSegData;
- if ( bTextRectAlloc )
- delete[] pTextRectData;
- if ( bCalcAlloc )
- delete[] pCalculationData;
- delete[] pAdjustmentHandles;
-}
-
-SvxMSDffCustomShape::SvxMSDffCustomShape( const DffPropertyReader& rPropReader, SvStream& rSt,
- DffObjData& rData, Rectangle& rSnapRect, sal_Int32 nAngle, MSFilterTracer* pT ) :
- pTracer ( pT ),
- eSpType ( rData.eShapeType ),
- aSnapRect ( rSnapRect ),
- nFix16Angle ( nAngle ),
- nXRef ( 0x80000000 ),
- nYRef ( 0x80000000 ),
- nFlags ( 0 ),
- nColorData ( 0 ),
- pVertData ( NULL ),
- pSegData ( NULL ),
- nTextRectData ( 0 ),
- pTextRectData ( NULL ),
- nCalculationData ( 0 ),
- pCalculationData ( NULL ),
- nAdjustmentHandles ( 0 ),
- pAdjustmentHandles ( NULL ),
- nGluePoints ( 0 ),
- pGluePoints ( NULL ),
- bIsEmpty ( TRUE ),
- bVertAlloc ( FALSE ),
- bSegAlloc ( FALSE ),
- bCalcAlloc ( FALSE ),
- bTextRectAlloc ( FALSE ),
- bTextFlow ( ( (MSO_TextFlow)rPropReader.GetPropertyValue( DFF_Prop_txflTextFlow ) ) == mso_txflTtoBA ),
- bFilled ( ( rPropReader.GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 ) != 0 ), // pie <-> arc
- bFlipH ( ( rData.nSpFlags & SP_FFLIPH ) != 0 ),
- bFlipV ( ( rData.nSpFlags & SP_FFLIPV ) != 0 )
-{
- const sal_Int32* pDefData = NULL;
- const mso_CustomShape* pDefCustomShape = NULL;
-
-
- // cloning DFF_Prop_adjustValues from DffPropertyReader to be able
- // to manipulate them and not destroying the original properties
-
- sal_uInt32 nHandles[ 10 ];
- sal_uInt32 nHandlesSet = 0;
- sal_uInt32 i, nHandlesUsed = 0;
-
- for ( i = DFF_Prop_adjustValue; i < DFF_Prop_adjust10Value; i++ )
- {
- if ( rPropReader.IsProperty( i ) )
- {
- sal_Int32 nIndex = i - DFF_Prop_adjustValue;
- nHandles[ nIndex ] = rPropReader.GetPropertyValue( i );
- nHandlesSet |= 1 << nIndex;
- nHandlesUsed = nIndex + 1;
- }
- }
- pDefCustomShape = GetCustomShapeContent2( eSpType );
- if ( pDefCustomShape )
- {
- switch( eSpType )
- {
- case mso_sptCan : nColorData = 0x20200000; break;
- case mso_sptCube : nColorData = 0x302d0000; break;
- case mso_sptActionButtonBlank : nColorData = 0x502ad400; break;
- case mso_sptActionButtonHome : nColorData = 0x702ad4ad; break;
- case mso_sptActionButtonHelp : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonInformation : nColorData = 0x702ad4a5; break;
- case mso_sptActionButtonBackPrevious : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonForwardNext : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonBeginning : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonEnd : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonReturn : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonDocument : nColorData = 0x702ad4da; break;
- case mso_sptActionButtonSound : nColorData = 0x602ad4a0; break;
- case mso_sptActionButtonMovie : nColorData = 0x602ad4a0; break;
- case mso_sptBevel : nColorData = 0x502ad400; break;
- case mso_sptFoldedCorner : nColorData = 0x20d00000; break;
- case mso_sptSmileyFace : nColorData = 0x20d00000; break;
- case mso_sptCurvedLeftArrow :
- {
- if ( nHandlesSet & 4 )
- nHandles[ 2 ] = 21600 - nHandles[ 2 ];
- nFlags |= DFF_CUSTOMSHAPE_FLIP_H;
- }
- break;
- case mso_sptCurvedUpArrow :
- {
- if ( nHandlesSet & 4 )
- nHandles[ 2 ] = 21600 - nHandles[ 2 ];
- nFlags |= DFF_CUSTOMSHAPE_FLIP_V | DFF_CUSTOMSHAPE_EXCH;
- }
- break;
- case mso_sptCurvedDownArrow : nFlags |= DFF_CUSTOMSHAPE_EXCH; break;
- case mso_sptRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptRibbon : nColorData = 0x30dd0000; break;
-
- case mso_sptEllipseRibbon2 : nColorData = 0x30dd0000; break;
- case mso_sptEllipseRibbon : nColorData = 0x30dd0000; break;
-
- case mso_sptVerticalScroll : nColorData = 0x30dd0000; break;
- case mso_sptHorizontalScroll : nColorData = 0x30dd0000; break;
- default: break;
- }
- }
- nCoordHeight = nCoordWidth = 21600;
- if ( pDefCustomShape )
- {
- bIsEmpty = FALSE;
- nNumElemVert = pDefCustomShape->nVertices;
- pVertData = pDefCustomShape->pVertices;
- nNumElemSeg = pDefCustomShape->nElements;
- pSegData = pDefCustomShape->pElements;
- nCalculationData = pDefCustomShape->nCalculation;
- pCalculationData = pDefCustomShape->pCalculation;
- pDefData = pDefCustomShape->pDefData;
- pTextRectData = pDefCustomShape->pTextRect;
- nTextRectData = pDefCustomShape->nTextRect;
- nCoordWidth = pDefCustomShape->nCoordWidth;
- nCoordHeight = pDefCustomShape->nCoordHeight;
- nXRef = pDefCustomShape->nXRef;
- nYRef = pDefCustomShape->nYRef;
- pGluePoints = pDefCustomShape->pGluePoints;
- nGluePoints = pDefCustomShape->nGluePoints;
- }
- sal_Int32 nGeoRight = rPropReader.GetPropertyValue( DFF_Prop_geoRight, 0 );
- if ( nGeoRight )
- {
- nGeoRight -= rPropReader.GetPropertyValue( DFF_Prop_geoLeft, 0 );
- nCoordWidth = labs( nGeoRight );
- }
- sal_Int32 nGeoBottom = rPropReader.GetPropertyValue( DFF_Prop_geoBottom, 0 );
- if ( nGeoBottom )
- {
- nGeoBottom -= rPropReader.GetPropertyValue( DFF_Prop_geoTop, 0 );
- nCoordHeight = labs( nGeoBottom );
- }
-
- if ( rPropReader.SeekToContent( DFF_Prop_pVertices, rSt ) )
- {
- sal_uInt16 nTmp16, nNumElemMemVert, nElemSizeVert;
- rSt >> nTmp16 >> nNumElemMemVert >> nElemSizeVert;
- if ( nTmp16 )
- {
- bIsEmpty = FALSE;
- nNumElemVert = nTmp16;
- sal_uInt32 k = nNumElemVert;
- bVertAlloc = TRUE;
- pVertData = new SvxMSDffVertPair[ nNumElemVert ];
- SvxMSDffVertPair* pTmp = pVertData;
- if ( nElemSizeVert == 8 )
- {
- while( k-- )
- {
- rSt >> pTmp->nValA
- >> pTmp->nValB;
- pTmp++;
- }
- }
- else
- {
- sal_Int16 nTmpA, nTmpB;
- while ( k-- )
- {
- rSt >> nTmpA
- >> nTmpB;
-
- pTmp->nValA = nTmpA;
- pTmp->nValB = nTmpB;
- pTmp++;
- }
- }
- }
- }
- if ( !bIsEmpty ) // we can import an customshape if either pVertData or pDefCustomShape is set
- {
- if ( rPropReader.SeekToContent( DFF_Prop_pSegmentInfo, rSt ) )
- {
- sal_uInt16 nTmp16, nNumElemMemSeg, nElemSizeSeg;
- rSt >> nTmp16 >> nNumElemMemSeg >> nElemSizeSeg;
- if ( nTmp16 )
- {
- nNumElemSeg = nTmp16;
- bSegAlloc = TRUE;
- pSegData = new sal_uInt16[ nNumElemSeg + 1 ]; // #97948# allocate one more element,
-#ifdef OSL_BIGENDIAN // so it won't be difficult to append
- sal_uInt32 k = nNumElemSeg; // a missing end segment action
- sal_uInt16* pTmp = pSegData;
- while( k-- )
- {
- rSt >> *pTmp++;
- }
-#else
- rSt.Read( pSegData, nNumElemSeg << 1 );
-#endif
- if ( pSegData[ nNumElemSeg - 1 ] != 0x8000 ) // #97948# append the missing segm action
- pSegData[ nNumElemSeg++ ] = 0x8000;
- }
- }
- if ( rPropReader.SeekToContent( 342, rSt ) )
- {
- sal_uInt16 nTmp16, nNumElemMem, nElemSize;
- rSt >> nTmp16 >> nNumElemMem >> nElemSize;
- if ( nTmp16 && ( nElemSize == 8 ) )
- {
- nCalculationData = nTmp16;
- pCalculationData = new SvxMSDffCalculationData[ nCalculationData ];
- bCalcAlloc = TRUE;
- sal_uInt32 k;
- sal_uInt16 nVal0, nVal1, nVal2;
- for ( k = 0; k < nCalculationData; k++ )
- {
- SvxMSDffCalculationData& rDat = pCalculationData[ k ];
- rSt >> rDat.nFlags
- >> nVal0 >> nVal1 >> nVal2;
- rDat.nVal1 = nVal0;
- rDat.nVal2 = nVal1;
- rDat.nVal3 = nVal2;
- }
- }
- }
-
- if ( rPropReader.SeekToContent( 343, rSt ) )
- {
- sal_uInt16 nTmp16, nNumElemMem, nElemSize;
- rSt >> nTmp16 >> nNumElemMem >> nElemSize;
- if ( nTmp16 && ( nElemSize == 16 ) )
- {
- sal_uInt32 nNumElem = nTmp16;
- if ( nNumElem > 1 )
- nNumElem = 2;
- bTextRectAlloc = sal_True;
- nTextRectData = nNumElem;
- pTextRectData = new SvxMSDffTextRectangles[ nNumElem ];
- SvxMSDffTextRectangles* pTmp = pTextRectData;
- for ( i = 0; i < nNumElem; i++ )
- {
- rSt >> pTmp->nPairA.nValA
- >> pTmp->nPairA.nValB
- >> pTmp->nPairB.nValA
- >> pTmp->nPairB.nValB;
- pTmp++;
- }
- }
- }
-
- const sal_Int32* pTmp = pDefData;
- sal_uInt32 nDefaults = 0;
- if ( pTmp )
- nDefaults = nAdjustmentHandles = *pTmp++;
-
- if ( nHandlesUsed > nAdjustmentHandles )
- nAdjustmentHandles = nHandlesUsed;
-
- if ( nAdjustmentHandles )
- {
- pAdjustmentHandles = new SvxMSDffAdjustmentHandle[ nAdjustmentHandles ];
- for ( i = 0; i < nAdjustmentHandles; i++ )
- {
- if ( i < nDefaults )
- pAdjustmentHandles[ i ].SetDefaultValue( *pTmp++ );
- if ( nHandlesSet & ( 1 << i ) )
- pAdjustmentHandles[ i ].SetAdjustValue( nHandles[ i ] );
- }
- }
-
- fXScale = (double)aSnapRect.GetWidth() / (double)nCoordWidth;
- fYScale = (double)aSnapRect.GetHeight() / (double)nCoordHeight;
-
- if ( rPropReader.IsProperty( 339 ) )
- nXRef = rPropReader.GetPropertyValue( 339 );
- if ( rPropReader.IsProperty( 340 ) )
- nYRef = rPropReader.GetPropertyValue( 340 );
- }
-}
-
-sal_Int32 SvxMSDffCustomShape::Fix16ToAngle( sal_Int32 nAngle ) const
-{
- if ( nAngle )
- {
- nAngle = ( (sal_Int16)( nAngle >> 16) * 100L ) + ( ( ( nAngle & 0x0000ffff) * 100L ) >> 16 );
- nAngle = NormAngle360( -nAngle );
- }
- return nAngle;
-}
-
-sal_Int32 SvxMSDffCustomShape::GetAdjustValue( sal_uInt32 nIndex ) const
-{
- return ( nIndex < nAdjustmentHandles ) ? pAdjustmentHandles[ nIndex ].GetAdjustValue() : 0;
-}
-
-sal_Int32 SvxMSDffCustomShape::GetAdjustValue( sal_uInt32 nIndex, sal_Int32 nDefault ) const
-{
- if ( ( nIndex >= nAdjustmentHandles ) || pAdjustmentHandles[ nIndex ].IsDefault() )
- return nDefault;
- else
- return pAdjustmentHandles[ nIndex ].GetAdjustValue();
-}
-
-Point SvxMSDffCustomShape::GetPoint( const SvxMSDffVertPair& rPair, sal_Bool bScale ) const
-{
- Point aRetValue;
- sal_Bool bExchange = ( nFlags & DFF_CUSTOMSHAPE_EXCH ) != 0; // x <-> y
- sal_uInt32 nPass = 0;
- do
- {
- sal_uInt32 nIndex = nPass;
-
- if ( bExchange )
- nIndex ^= 1;
-
- sal_uInt32 nDat = nIndex ? (sal_uInt32)rPair.nValB : (sal_uInt32)rPair.nValA;
- sal_Bool bScaleWidth = nPass == 0;
-
- double fVal;
- sal_uInt32 nGeometryFlags = 0;
- if ( ( nDat >> 16 ) == 0x8000 )
- fVal = ImplGetValue( (sal_uInt16)nDat, nGeometryFlags );
- else
- fVal = (sal_Int32)nDat;
-
- if ( bScale )
- {
- if ( nGeometryFlags & bExchange ) // left <-> top, right <-> bottom
- {
- nGeometryFlags = ( ( nGeometryFlags & 1 ) << 1 ) | ( ( nGeometryFlags & 2 ) >> 1 ) |
- ( ( nGeometryFlags & 4 ) << 1 ) | ( ( nGeometryFlags & 8 ) >> 1 );
- }
- if ( bScaleWidth )
- {
- if ( ( aSnapRect.GetWidth() > aSnapRect.GetHeight() ) && ( ( nXRef != (sal_Int32)0x80000000 ) || nGeometryFlags ) )
- {
- sal_Bool bGeo = ( ( ( nGeometryFlags & GEOMETRY_USED_LEFT ) == 0 ) && ( fVal > nXRef ) )
- || ( ( nGeometryFlags & GEOMETRY_USED_RIGHT ) != 0 );
- if ( ( nGeometryFlags & ( GEOMETRY_USED_LEFT | GEOMETRY_USED_RIGHT ) ) == ( GEOMETRY_USED_LEFT | GEOMETRY_USED_RIGHT ) )
- {
- fVal -= (double)nCoordWidth * 0.5;
- fVal *= fYScale;
- fVal += (double)aSnapRect.GetWidth() * 0.5;
- }
- else
- {
- fVal *= fYScale;
- if ( bGeo )
- fVal += (double)nCoordWidth * fXScale - (double)nCoordWidth * fYScale;
- }
- }
- else
- fVal *= fXScale;
- if ( nFlags & DFF_CUSTOMSHAPE_FLIP_H )
- fVal = aSnapRect.GetWidth() - fVal;
- }
- else
- {
- if ( ( aSnapRect.GetHeight() > aSnapRect.GetWidth() ) && ( ( nYRef != (sal_Int32)0x80000000 ) || nGeometryFlags ) )
- {
- sal_Bool bGeo = ( ( ( nGeometryFlags & GEOMETRY_USED_TOP ) == 0 ) && ( fVal > nYRef ) )
- || ( ( nGeometryFlags & GEOMETRY_USED_BOTTOM ) != 0 );
- if ( ( nGeometryFlags & ( GEOMETRY_USED_TOP | GEOMETRY_USED_BOTTOM ) ) == ( GEOMETRY_USED_TOP | GEOMETRY_USED_BOTTOM ) )
- {
- fVal -= (double)nCoordHeight * 0.5;
- fVal *= fXScale;
- fVal += (double)aSnapRect.GetHeight() * 0.5;
- }
- else
- {
- fVal *= fXScale;
- if ( bGeo )
- fVal += (double)nCoordHeight * fYScale - (double)nCoordHeight * fXScale;
- }
- }
- else
- fVal *= fYScale;
- if ( nFlags & DFF_CUSTOMSHAPE_FLIP_V )
- fVal = aSnapRect.GetHeight() - fVal;
- }
- }
- if ( nPass )
- aRetValue.Y() = (sal_Int32)fVal;
- else
- aRetValue.X() = (sal_Int32)fVal;
- }
- while ( ++nPass < 2 );
- return aRetValue;
-}
-
-double SvxMSDffCustomShape::ImplGetValue( sal_uInt16 nIndex, sal_uInt32& nGeometryFlags ) const
-{
- if ( !pCalculationData )
- return 0;
- if ( nCalculationData <= nIndex )
- return 0;
-
- double fVal[ 3 ];
- sal_Int16 i, nF = pCalculationData[ nIndex ].nFlags;
- for ( i = 0; i < 3; i++ )
- {
- if ( nF & ( 0x2000 << i ) )
- {
- sal_Int16 nVal = 0;
- switch( i )
- {
- case 0: nVal = pCalculationData[ nIndex ].nVal1; break;
- case 1: nVal = pCalculationData[ nIndex ].nVal2; break;
- case 2: nVal = pCalculationData[ nIndex ].nVal3; break;
- }
- if ( nVal & 0x400 )
- fVal[ i ] = ImplGetValue( nVal & 0xff, nGeometryFlags );
- else
- {
- switch ( nVal )
- {
- case DFF_Prop_adjustValue :
- case DFF_Prop_adjust2Value :
- case DFF_Prop_adjust3Value :
- case DFF_Prop_adjust4Value :
- case DFF_Prop_adjust5Value :
- case DFF_Prop_adjust6Value :
- case DFF_Prop_adjust7Value :
- case DFF_Prop_adjust8Value :
- case DFF_Prop_adjust9Value :
- case DFF_Prop_adjust10Value :
- fVal[ i ] = GetAdjustValue( nVal - DFF_Prop_adjustValue );
- break;
- case DFF_Prop_geoLeft :
- {
- nGeometryFlags |= GEOMETRY_USED_LEFT;
- fVal[ i ] = 0.0;
- }
- break;
- case DFF_Prop_geoTop :
- {
- nGeometryFlags |= GEOMETRY_USED_TOP;
- fVal[ i ] = 0.0;
- }
- break;
- case DFF_Prop_geoRight :
- {
- nGeometryFlags |= GEOMETRY_USED_RIGHT;
- fVal[ i ] = nCoordWidth;
- }
- break;
- case DFF_Prop_geoBottom :
- {
- nGeometryFlags |= GEOMETRY_USED_BOTTOM;
- fVal[ i ] = nCoordWidth;
- }
- break;
- default:
- fVal[ i ] = 0.0;
- break;
- }
- }
- }
- else
- {
- switch( i )
- {
- case 0 : fVal[ 0 ] = pCalculationData[ nIndex ].nVal1; break;
- case 1 : fVal[ 1 ] = pCalculationData[ nIndex ].nVal2; break;
- case 2 : fVal[ 2 ] = pCalculationData[ nIndex ].nVal3; break;
- }
-
-
- }
- }
-
- switch ( nF & 0xff )
- {
- case 0 : // sum
- {
- fVal[ 0 ] += fVal[ 1 ];
- fVal[ 0 ] -= fVal[ 2 ];
- }
- break;
-
- case 1 : // product
- {
- if ( fVal[ 1 ] != 0.0 )
- fVal[ 0 ] *= fVal[ 1 ];
- if ( fVal[ 2 ] != 0.0 )
- fVal[ 0 ] /= fVal[ 2 ];
- }
- break;
-
- case 2 : // mid
- {
- fVal[ 0 ] += fVal[ 1 ];
- fVal[ 0 ] /= 2.0;
- }
- break;
-
- case 3 : // abs
- {
- fVal[ 0 ] = fabs( fVal[ 0 ] );
- }
- break;
-
- case 4 : // min
- {
- if ( fVal[ 1 ] < fVal[ 0 ] )
- fVal[ 0 ] = fVal[ 1 ];
- }
- break;
-
- case 5 :
- {
- if ( fVal[ 1 ] > fVal[ 0 ] ) // max
- fVal[ 0 ] = fVal[ 1 ];
- }
- break;
-
- case 6 : // if > 0 ? a : b
- {
- if ( fVal[ 0 ] > 0.0 )
- fVal[ 0 ] = fVal[ 1 ];
- else
- fVal[ 0 ] = fVal[ 2 ];
- }
- break;
-
- case 7 : // mod
- {
- fVal[ 0 ] = sqrt( fVal[ 0 ] * fVal[ 0 ] + fVal[ 1 ] * fVal[ 1 ]
- + fVal[ 2 ] * fVal[ 2 ] );
- }
- break;
-
- case 8 : // atan2
- {
- fVal[ 0 ] = atan2( fVal[ 1 ], fVal[ 0 ] ) / F_PI180;
- fVal[ 0 ] *= 65536.0;
- }
- break;
-
- case 9 : // in this special case the second parameter is a fixed fload
- { // which has to be divided by 0x10000
- fVal[ 0 ] *= sin( ( fVal[ 1 ] / 65536 ) * F_PI180 );
- }
- break;
-
- case 0xa : // in this special case the second parameter is a fixed fload
- { // which has to be divided by 0x10000
- fVal[ 0 ] *= cos( ( fVal[ 1 ] / 65536 ) * F_PI180 );
- }
- break;
-
- case 0xb : // cosatan2
- {
- fVal[ 0 ] *= cos( atan2( fVal[ 2 ], fVal[ 1 ] ) );
- }
- break;
-
- case 0xc : // sinatan2
- {
- fVal[ 0 ] *= sin( atan2( fVal[ 2 ], fVal[ 1 ] ) );
- }
- break;
-
- case 0xd : // sqrt
- {
- fVal[ 0 ] = sqrt( fVal[ 0 ] );
- }
- break;
-
- case 0xe : // sumangle
- {
- fVal[ 0 ] += fVal[ 1 ] * 65536.0;
- fVal[ 0 ] -= fVal[ 2 ] * 65536.0;
- }
- break;
-
- case 0xf : // ellipse
- {
- if ( fVal[ 1 ] != 0.0 )
- {
- fVal[ 0 ] /= fVal[ 1 ];
- fVal[ 0 ] = fVal[ 2 ] * sqrt( 1 - fVal[ 0 ] * fVal[ 0 ] );
- }
- }
- break;
-
- case 0x10 : // tan
- {
- fVal[ 0 ] *= tan( fVal[ 1 ] );
- }
- break;
-
- case 0x80 :
- {
- // fVal[0]^2 + fVal[1]^2 = fVal[2]^2
- if ( fVal[ 2 ] == 0.0 )
- fVal[ 0 ] = sqrt( fVal[ 0 ] * fVal[ 0 ] + fVal[ 1 ] * fVal[ 1 ] );
- else
- {
- double fA = fVal[ 0 ] != 0.0 ? fVal[ 0 ] : fVal[ 1 ];
- fVal[ 0 ] = sqrt( fVal[ 2 ] * fVal[ 2 ] - fA * fA );
- }
- }
- break;
- case 0x81 :
- {
- double fAngle = F_PI1800 * fVal[ 2 ];
- fVal[ 0 ] = ( cos( fAngle ) * ( fVal[ 0 ] - 10800 )
- + sin( fAngle ) * ( fVal[ 1 ] - 10800 ) ) + 10800;
- }
- break;
- case 0x82 :
- {
- double fAngle = F_PI1800 * fVal[ 2 ];
- fVal[ 0 ] = - ( sin( fAngle ) * ( fVal[ 0 ] - 10800 )
- - cos( fAngle ) * ( fVal[ 1 ] - 10800 ) ) + 10800;
- }
- break;
- default :
- {
-// sal_Bool bStop = sal_True;
- }
- break;
- }
- return fVal[ 0 ];
-}
-
-// nLumDat 28-31 = number of luminance entries in nLumDat
-// nLumDat 27-24 = nLumDatEntry 0
-// nLumDat 23-20 = nLumDatEntry 1 ...
-// each 4bit entry is to be interpreted as a 10 percent signed luminance changing
-Color SvxMSDffCustomShape::ImplGetColorData( const Color& rFillColor, sal_uInt32 nIndex )
-{
- Color aRetColor;
-
- sal_uInt32 i, nColor, nTmp, nCount = nColorData >> 28;
-
- if ( nCount )
- {
- if ( nIndex >= nCount )
- nIndex = nCount - 1;
-
- sal_uInt32 nFillColor = (sal_uInt32)rFillColor.GetRed() |
- ((sal_uInt32)rFillColor.GetGreen() << 8 ) |
- ((sal_uInt32)rFillColor.GetBlue() << 16 );
-
- sal_Int32 nLumDat = nColorData << ( ( 1 + nIndex ) << 2 );
- sal_Int32 nLuminance = ( nLumDat >> 28 ) * 12;
-
- nTmp = nFillColor;
- nColor = 0;
- for ( i = 0; i < 3; i++ )
- {
- sal_Int32 nC = (sal_uInt8)nTmp;
- nTmp >>= 8;
- nC += ( ( nLuminance * nC ) >> 8 );
- if ( nC < 0 )
- nC = 0;
- else if ( nC &~ 0xff )
- nC = 0xff;
- nColor >>= 8;
- nColor |= nC << 16;
- }
- aRetColor = Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
- }
- return aRetColor;
-}
-
-sal_Bool SvxMSDffCustomShape::IsEmpty() const
-{
- return bIsEmpty;
-}
-
-Rectangle SvxMSDffCustomShape::GetTextRect() const
-{
- if ( !nTextRectData )
- return aSnapRect;
-
- sal_uInt32 nIndex = 0;
- if ( bTextFlow && ( nTextRectData > 1 ) )
- nIndex++;
-
- Point aTopLeft( GetPoint( pTextRectData[ nIndex ].nPairA, sal_True ) );
- Point aBottomRight( GetPoint( pTextRectData[ nIndex ].nPairB, sal_True ) );
- Rectangle aRect( aTopLeft, aBottomRight );
- aRect.Move( aSnapRect.Left(), aSnapRect.Top() );
- if ( bFlipH )
- {
- sal_Int32 nXDist = aSnapRect.Right() - aRect.Right();
- aRect = Rectangle( Point( nXDist + aSnapRect.Left(), aRect.Top() ), aRect.GetSize() );
- }
- if ( bFlipV )
- {
- sal_Int32 nYDist = aSnapRect.Bottom() - aRect.Bottom();
- aRect = Rectangle( Point( aRect.Left(), nYDist + aSnapRect.Top() ), aRect.GetSize() );
- }
- return aRect;
-}
-
-sal_Bool SvxMSDffCustomShape::HasGluePointList( const MSO_SPT eShapeType )
-{
- const mso_CustomShape* pCustomShape = GetCustomShapeContent2( eShapeType );
- return pCustomShape && pCustomShape->nGluePoints;
-}
-
-MSO_SPT SvxMSDffCustomShape::GetShapeTypeFromSdrObject( const SdrObject* pObj )
-{
- MSO_SPT eShapeType = mso_sptNil;
- const SfxPoolItem* pAdjustItem = NULL;
- const SfxItemSet& rItemSet = pObj->GetMergedItemSet();
- rItemSet.GetItemState( SDRATTR_CUSTOMSHAPE_ADJUSTMENT, FALSE, &pAdjustItem );
- if ( pAdjustItem )
- {
- SdrCustomShapeAdjustmentItem& rAdjustItem = *(SdrCustomShapeAdjustmentItem*)pAdjustItem;
- sal_uInt32 nCount = rAdjustItem.GetCount();
- if ( nCount >= 3 )
- {
- /* checking magic number, so we can get sure that the SdrObject was a customshape
- and we can get the customshape type */
- if ( rAdjustItem.GetValue( nCount - 1 ).GetValue() == (sal_Int32)0x80001234 )
- eShapeType = (MSO_SPT)((sal_uInt32)(rAdjustItem.GetValue( nCount - 2 ).GetValue()) >> 16);
- }
- }
- return eShapeType;
-}
-
-void SvxMSDffCustomShape::SwapStartAndEndArrow( SdrObject* pObj ) //#108274
-{
- XLineStartItem aLineStart;
- const SfxItemSet& rObjItemSet = pObj->GetMergedItemSet();
-
- aLineStart.SetLineStartValue(((XLineStartItem&)rObjItemSet.Get( XATTR_LINEEND )).GetLineStartValue());
- XLineStartWidthItem aLineStartWidth(((XLineStartWidthItem&)rObjItemSet.Get( XATTR_LINEENDWIDTH )).GetValue());
- XLineStartCenterItem aLineStartCenter(((XLineStartCenterItem&)rObjItemSet.Get( XATTR_LINEENDCENTER )).GetValue());
-
- XLineEndItem aLineEnd;
- aLineEnd.SetLineEndValue(((XLineEndItem&)rObjItemSet.Get( XATTR_LINESTART )).GetLineEndValue());
- XLineEndWidthItem aLineEndWidth(((XLineEndWidthItem&)rObjItemSet.Get( XATTR_LINESTARTWIDTH )).GetValue());
- XLineEndCenterItem aLineEndCenter(((XLineEndCenterItem&)rObjItemSet.Get( XATTR_LINESTARTCENTER )).GetValue());
-
- SfxItemSet aNew(*rObjItemSet.GetPool());
-
- aNew.Put( aLineStart );
- aNew.Put( aLineStartWidth );
- aNew.Put( aLineStartCenter );
- aNew.Put( aLineEnd );
- aNew.Put( aLineEndWidth );
- aNew.Put( aLineEndCenter );
-
- pObj->SetMergedItemSet(aNew);
-}
-
-SdrObject* SvxMSDffCustomShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet, sal_Bool bSetCustomShapeAdjustItem )
-{
- SdrObject* pRet = NULL;
-
- if ( !IsEmpty() )
- {
- if ( eSpType == mso_sptRectangle )
- {
- pRet = new SdrRectObj( aSnapRect );
- pRet->SetModel( pSdrModel );
- pRet->SetMergedItemSet(rSet);
- }
- else if ( eSpType == mso_sptRoundRectangle )
- {
- sal_Int32 nW = aSnapRect.Right() - aSnapRect.Left();
- sal_Int32 nH = aSnapRect.Bottom() - aSnapRect.Top();
- if ( nH < nW )
- nW = nH;
- double fAdjust = (double)GetAdjustValue( 0, 3600 ) / 21600.0;
- nW = (sal_Int32)( (double)nW * fAdjust );
- rSet.Put( SdrEckenradiusItem( nW ) );
- pRet = new SdrRectObj( aSnapRect );
- pRet->SetModel( pSdrModel );
- pRet->SetMergedItemSet(rSet);
- }
- else if ( eSpType == mso_sptEllipse )
- {
- pRet = new SdrCircObj( OBJ_CIRC, aSnapRect );
- pRet->SetModel( pSdrModel );
- pRet->SetMergedItemSet(rSet);
- }
- else if ( eSpType == mso_sptArc )
- { // the arc is something special, because sometimes the snaprect does not match
- Rectangle aPolyBoundRect;
- if ( nNumElemVert )
- {
- XPolygon aXP( (sal_uInt16)nNumElemVert );
- const SvxMSDffVertPair* pTmp = pVertData;
- sal_uInt32 nPtNum;
- for ( nPtNum = 0; nPtNum < nNumElemVert; nPtNum++ )
- aXP[ (sal_uInt16)nPtNum ] = GetPoint( *pTmp++, sal_False );
- aPolyBoundRect = Rectangle( aXP.GetBoundRect() );
- }
- else
- aPolyBoundRect = aSnapRect;
-
- sal_Int32 nEndAngle = Fix16ToAngle( GetAdjustValue( 0 ) );
- sal_Int32 nStartAngle = Fix16ToAngle( GetAdjustValue( 1 ) );
-
- if ( nStartAngle == nEndAngle )
- return NULL;
-
- if ( bFilled ) // ( filled ) ? we have to import an pie : we have to construct an arc
- {
- pRet = new SdrCircObj( OBJ_SECT, aPolyBoundRect, nStartAngle, nEndAngle );
- pRet->NbcSetSnapRect( aSnapRect );
- pRet->SetModel( pSdrModel );
- pRet->SetMergedItemSet(rSet);
- }
- else
- {
- Point aStart, aEnd, aCenter( aPolyBoundRect.Center() );
- aStart.X() = (sal_Int32)( ( cos( ( (double)nStartAngle * F_PI18000 ) ) * 1000.0 ) );
- aStart.Y() = - (sal_Int32)( ( sin( ( (double)nStartAngle * F_PI18000 ) ) * 1000.0 ) );
- aEnd.X() = (sal_Int32)( ( cos( ( (double)nEndAngle * F_PI18000 ) ) * 1000.0 ) );
- aEnd.Y() = - (sal_Int32)( ( sin( ( (double)nEndAngle * F_PI18000 ) ) * 1000.0 ) );
- aStart.X() += aCenter.X();
- aStart.Y() += aCenter.Y();
- aEnd.X() += aCenter.X();
- aEnd.Y() += aCenter.Y();
-
- Polygon aPolygon( aPolyBoundRect, aStart, aEnd, POLY_PIE );
- Rectangle aPolyPieRect( aPolygon.GetBoundRect() );
-
- USHORT nPt = aPolygon.GetSize();
-
- if ( nPt < 4 )
- return NULL;
-
- aPolygon[ 0 ] = aPolygon[ 1 ]; // try to get the arc boundrect
- aPolygon[ nPt - 1 ] = aPolygon[ nPt - 2 ];
- Rectangle aPolyArcRect( aPolygon.GetBoundRect() );
-
- double fYSc, fXSc;
- double fYOfs, fXOfs;
- int nCond;
-
- fYOfs = fXOfs = 0.0;
- if ( aPolyPieRect.GetWidth() != aPolyArcRect.GetWidth() )
- {
- nCond = ( (sal_uInt32)( nStartAngle - 9000 ) > 18000 ) && ( (sal_uInt32)( nEndAngle - 9000 ) > 18000 ) ? 1 : 0;
- nCond ^= bFlipH ? 1 : 0;
- if ( nCond )
- {
- fXSc = (double)aSnapRect.GetWidth() / (double)aPolyPieRect.GetWidth();
- fXOfs = ( (double)aPolyPieRect.GetWidth() - (double)aPolyArcRect.GetWidth() ) * fXSc;
- }
- }
- if ( aPolyPieRect.GetHeight() != aPolyArcRect.GetHeight() )
- {
- nCond = ( ( nStartAngle > 18000 ) && ( nEndAngle > 18000 ) ) ? 1 : 0;
- nCond ^= bFlipV ? 1 : 0;
- if ( nCond )
- {
- fYSc = (double)aSnapRect.GetHeight() / (double)aPolyPieRect.GetHeight();
- fYOfs = ( (double)aPolyPieRect.GetHeight() - (double)aPolyArcRect.GetHeight() ) * fYSc;
- }
- }
- fXSc = (double)aPolyArcRect.GetWidth() / (double)aPolyPieRect.GetWidth();
- fYSc = (double)aPolyArcRect.GetHeight() / (double)aPolyPieRect.GetHeight();
-
- aPolyArcRect = Rectangle( Point( aSnapRect.Left() + (sal_Int32)fXOfs, aSnapRect.Top() + (sal_Int32)fYOfs ),
- Size( (sal_Int32)( aSnapRect.GetWidth() * fXSc ), (sal_Int32)( aSnapRect.GetHeight() * fYSc ) ) );
-
- SdrCircObj* pObjCirc = new SdrCircObj( OBJ_CARC, aPolyBoundRect, nStartAngle, nEndAngle );
- pObjCirc->SetSnapRect( aPolyArcRect );
- pObjCirc->SetModel( pSdrModel );
- pObjCirc->SetMergedItemSet( rSet );
-
- int nSwap = bFlipH ? 1 : 0;
- nSwap ^= bFlipV ? 1 : 0;
- if ( nSwap )
- SwapStartAndEndArrow( pObjCirc );
-
- SdrRectObj* pRect = new SdrRectObj( aPolyArcRect );
- pRect->SetSnapRect( aPolyArcRect );
- pRect->SetModel( pSdrModel );
- pRect->SetMergedItemSet( rSet );
- pRect->SetMergedItem( XLineStyleItem( XLINE_NONE ) );
- pRect->SetMergedItem( XFillStyleItem( XFILL_NONE ) );
-
- pRet = new SdrObjGroup();
- pRet->SetModel( pSdrModel );
- ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pRect );
- ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pObjCirc );
- }
- }
- if ( !pRet && nNumElemVert )
- {
- // Header auswerten
- XPolygon aXP( (sal_uInt16)nNumElemVert );
- const SvxMSDffVertPair* pT = pVertData;
- sal_uInt32 nPtNum;
- for ( nPtNum = 0; nPtNum < nNumElemVert; nPtNum++ )
- aXP[ (sal_uInt16)nPtNum ] = GetPoint( *pT++, sal_True );
- Rectangle aPolyBoundRect( aXP.GetBoundRect() );
-
- if ( !pSegData )
- {
- FASTBOOL bClosed = aXP[ 0 ] == aXP[ (sal_uInt16)( aXP.GetPointCount() - 1 ) ];
- Rectangle aUnion( aXP.GetBoundRect() );
- pRet = new SdrPathObj( bClosed ? OBJ_POLY : OBJ_PLIN, basegfx::B2DPolyPolygon(aXP.getB2DPolygon()));
- pRet->NbcSetSnapRect( Rectangle( Point( aSnapRect.Left() + aUnion.Left(),
- aSnapRect.Top() + aUnion.Top() ),
- aUnion.GetSize() ) );
- pRet->SetModel( pSdrModel );
- pRet->SetMergedItemSet(rSet);
- }
- else
- {
- SdrObjGroup* pGrp = NULL;
- SdrObject* pSdrPathObj = NULL;
-
- XPolyPolygon aPolyPoly;
- XPolygon aPoly;
-
- XPolyPolygon aEmptyPolyPoly;
- XPolygon aEmptyPoly;
-
- BOOL bClosed = FALSE;
- sal_uInt16 nPolyFlags;
-
- Color aFillColor( COL_WHITE );
- sal_uInt32 nColorCount = nColorData >> 28;
- sal_uInt32 nColorIndex = 0;
- sal_uInt16 nSrcPt = 0;
-
- Rectangle aUnion;
-
- const sal_uInt16* pS = pSegData;
-
- if ( nColorCount )
- {
- const SfxPoolItem* pPoolItem = NULL;
- SfxItemState eState = rSet.GetItemState( XATTR_FILLCOLOR, FALSE, &pPoolItem );
- if( SFX_ITEM_SET == eState )
- {
- if ( pPoolItem )
- aFillColor = ((XFillColorItem*)pPoolItem)->GetColorValue();
- }
- }
- for ( sal_uInt16 i = 0; i < nNumElemSeg; i++ )
- {
- nPolyFlags = *pS++;
- switch ( nPolyFlags >> 12 )
- {
- case 0x4 :
- {
- if ( aPoly.GetPointCount() > 1 )
- {
- if ( bClosed )
- aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
- aPolyPoly.Insert( aPoly );
- }
- bClosed = FALSE;
- aPoly = aEmptyPoly;
- aPoly[ 0 ] = aXP[ nSrcPt++ ];
- }
- break;
- case 0x8 :
- {
- if ( aPoly.GetPointCount() > 1 )
- {
- if ( bClosed )
- aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
- aPolyPoly.Insert( aPoly );
- }
- aPoly = aEmptyPoly;
- if ( aPolyPoly.Count() )
- {
- if ( pSdrPathObj )
- {
- pGrp = new SdrObjGroup();
- pGrp->SetModel( pSdrModel );
- pGrp->NbcSetLogicRect( aSnapRect );
- pGrp->GetSubList()->NbcInsertObject( pSdrPathObj );
- }
- aUnion.Union( aPolyPoly.GetBoundRect() );
- pSdrPathObj = new SdrPathObj( bClosed ? OBJ_POLY : OBJ_PLIN, aPolyPoly.getB2DPolyPolygon() );
- pSdrPathObj->SetModel( pSdrModel );
- if ( !bClosed )
- rSet.Put( SdrShadowItem( FALSE ) );
- else
- {
- if ( nColorIndex < nColorCount )
- {
- Color aColor( ImplGetColorData( aFillColor, nColorIndex++ ) );
- rSet.Put( XFillColorItem( String(), aColor ) );
- }
- }
- pSdrPathObj->SetMergedItemSet(rSet);
- if ( pGrp )
- {
- if ( pSdrPathObj )
- {
- pGrp->GetSubList()->NbcInsertObject( pSdrPathObj );
- pSdrPathObj = NULL;
- }
- }
- aPolyPoly = aEmptyPolyPoly;
- }
- }
- break;
- case 0x6 :
- {
- bClosed = TRUE;
- }
- break;
- case 0x2 :
- {
- sal_uInt16 nDstPt = aPoly.GetPointCount();
- for ( sal_uInt16 k = 0; k < ( nPolyFlags & 0xfff ); k++ )
- {
- aPoly[ nDstPt ] = aXP[ nSrcPt++ ];
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt ] = aXP[ nSrcPt++ ];
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt++ ] = aXP[ nSrcPt++ ];
- }
- }
- break;
- case 0xa :
- case 0xb :
- {
- sal_uInt16 nPntCount = (BYTE)nPolyFlags;
- if ( nPntCount )
- {
- sal_uInt32 nMod = ( nPolyFlags >> 8 ) & 0xf;
- switch ( nMod )
- {
- case 3 :
- case 4 :
- case 5 :
- {
- sal_uInt16 nDstPt = aPoly.GetPointCount();
- if ( nPntCount == 2 )
- { // create a circle
- Rectangle aRect( aXP[ nSrcPt ], aXP[ nSrcPt + 1 ] );
- sal_Int32 nXControl = (sal_Int32)((double)aRect.GetWidth() * 0.2835 );
- sal_Int32 nYControl = (sal_Int32)((double)aRect.GetHeight() * 0.2835 );
- Point aCenter( aRect.Center() );
- aPoly[ nDstPt++ ] = Point( aCenter.X(), aRect.Top() );
- aPoly[ nDstPt ] = Point( aCenter.X() + nXControl, aRect.Top() );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt ] = Point( aRect.Right(), aCenter.Y() - nYControl );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt++ ] = Point( aRect.Right(), aCenter.Y() );
- aPoly[ nDstPt ] = Point( aRect.Right(), aCenter.Y() + nYControl );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt ] = Point( aCenter.X() + nXControl, aRect.Bottom() );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt++ ] = Point( aCenter.X(), aRect.Bottom() );
- aPoly[ nDstPt ] = Point( aCenter.X() - nXControl, aRect.Bottom() );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt ] = Point( aRect.Left(), aCenter.Y() + nYControl );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt++ ] = Point( aRect.Left(), aCenter.Y() );
- aPoly[ nDstPt ] = Point( aRect.Left(), aCenter.Y() - nYControl );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt ] = Point( aCenter.X() - nXControl, aRect.Top() );
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- aPoly[ nDstPt++ ] = Point( aCenter.X(), aRect.Top() );
- nSrcPt += 2;
- }
- else
- {
- sal_uInt32 nXor = ( nMod == 5 ) ? 3 : 2;
- for ( sal_uInt16 k = 0; k < ( nPntCount >> 2 ); k++ )
- {
- PolyStyle ePolyStyle = POLY_ARC;
- Rectangle aRect( aXP[ nSrcPt ], aXP[ nSrcPt + 1 ] );
- Point aCenter( aRect.Center() );
- Point aStart( aXP[ (sal_uInt16)( nSrcPt + nXor ) ] );
- Point aEnd( aXP[ (sal_uInt16)( nSrcPt + ( nXor ^ 1 ) ) ] );
- aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) / fXScale ) ) + aCenter.X();
- aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) / fYScale ) ) + aCenter.Y();
- aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) / fXScale ) ) + aCenter.X();
- aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) / fYScale ) ) + aCenter.Y();
-
- Polygon aTempPoly( aRect, aStart, aEnd, ePolyStyle );
- if ( nMod == 5 )
- {
- for ( sal_uInt16 j = aTempPoly.GetSize(); j--; )
- aPoly[ nDstPt++ ] = aTempPoly[ j ];
- }
- else
- {
- for ( sal_uInt16 j = 0; j < aTempPoly.GetSize(); j++ )
- aPoly[ nDstPt++ ] = aTempPoly[ j ];
- }
- nSrcPt += 4;
- }
- }
- }
- break;
- case 0 :
- case 1 :
- case 2 :
- case 6 :
- case 9 :
- case 0xa :
- case 0xb :
- case 0xc :
- case 0xd :
- case 0xe :
- case 0xf :
-
- case 7 :
- case 8 :
- {
- BOOL bFirstDirection = TRUE;
- sal_uInt16 nDstPt = aPoly.GetPointCount();
- for ( sal_uInt16 k = 0; k < ( nPolyFlags & 0xff ); k++ )
- {
- sal_uInt32 nModT = ( nMod == 7 ) ? 1 : 0;
- Point aCurrent( aXP[ nSrcPt ] );
- if ( nSrcPt ) // we need a previous point
- {
- Point aPrev( aXP[ nSrcPt - 1 ] );
- sal_Int32 nX, nY;
- nX = aCurrent.X() - aPrev.X();
- nY = aCurrent.Y() - aPrev.Y();
- if ( ( nY ^ nX ) & 0x80000000 )
- {
- if ( !k )
- bFirstDirection = TRUE;
- else if ( !bFirstDirection )
- nModT ^= 1;
- }
- else
- {
- if ( !k )
- bFirstDirection = FALSE;
- else if ( bFirstDirection )
- nModT ^= 1;
- }
- if ( nModT ) // get the right corner
- {
- nX = aCurrent.X();
- nY = aPrev.Y();
- }
- else
- {
- nX = aPrev.X();
- nY = aCurrent.Y();
- }
- sal_Int32 nXVec = ( nX - aPrev.X() ) >> 1;
- sal_Int32 nYVec = ( nY - aPrev.Y() ) >> 1;
- Point aControl1( aPrev.X() + nXVec, aPrev.Y() + nYVec );
- aPoly[ nDstPt ] = aControl1;
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- nXVec = ( nX - aCurrent.X() ) >> 1;
- nYVec = ( nY - aCurrent.Y() ) >> 1;
- Point aControl2( aCurrent.X() + nXVec, aCurrent.Y() + nYVec );
- aPoly[ nDstPt ] = aControl2;
- aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
- }
- aPoly[ nDstPt ] = aCurrent;
- nSrcPt++;
- nDstPt++;
- }
- }
- break;
- }
- }
- }
- break;
- case 0x0 :
- {
- sal_uInt16 nDstPt = aPoly.GetPointCount();
- for ( sal_uInt16 k = 0; k < ( nPolyFlags & 0xfff ); k++ )
- aPoly[ nDstPt++ ] = aXP[ nSrcPt++ ];
- }
- break;
- case 0xf :
- {
- sal_Bool bOwn = TRUE;
- switch ( nPolyFlags )
- {
- case 0xf8ff : // This value is not ms specific and is used
- { // to create a dummy object that is not visible.
- SdrObject* pLast = pSdrPathObj; // This solves the problem of customshapes that
- if ( !pLast ) // did not use the whole space of the boundrect.
- { // eg. the BlockArc
- if ( pGrp )
- {
- SdrObjList* pList = pGrp->GetSubList();
- if ( pList && pList->GetObjCount() )
- pLast = pList->GetObj( pList->GetObjCount() - 1 );
- }
- }
- if ( pLast )
- {
- pLast->SetMergedItem( XLineStyleItem( XLINE_NONE ) );
- pLast->SetMergedItem( XFillStyleItem( XFILL_NONE ) );
- }
- }
- break;
- case 0xf8fe : // nearly the same as 0x4000
- { // but the first point is ignored
- if ( aPoly.GetPointCount() > 1 )
- {
- if ( bClosed )
- aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
- aPolyPoly.Insert( aPoly );
- }
- aPoly = aEmptyPoly;
- }
- break;
- default :
- bOwn = FALSE;
- }
- if ( bOwn )
- break;
- }
-#ifdef DBG_CUSTOMSHAPE
- default :
- {
- ByteString aString( "customshapes::unknown PolyFlagValue :" );
- aString.Append( ByteString::CreateFromInt32( nPolyFlags ) );
- DBG_ERROR( aString.GetBuffer() );
- }
- break;
-#endif
- }
- }
- if ( pGrp )
- pRet = pGrp;
- else
- pRet = pSdrPathObj;
- if ( pRet )
- {
- pRet->NbcSetSnapRect( Rectangle( Point( aSnapRect.Left() + aUnion.Left(),
- aSnapRect.Top() + aUnion.Top() ),
- aUnion.GetSize() ) );
- }
- }
- }
- }
- if ( pRet )
- {
- // some objects needs to have their own GluePoint list
- if ( HasGluePointList( eSpType ) )
- {
- sal_uInt32 i;
- const SvxMSDffVertPair* pTmp = pGluePoints;
- for ( i = 0; i < nGluePoints; i++ )
- {
- SdrGluePoint aGluePoint;
- Rectangle aNewSnapRect( pRet->GetSnapRect() );
- sal_Int32 nXMove = aSnapRect.Left() - aNewSnapRect.Left();
- sal_Int32 nYMove = aSnapRect.Top() - aNewSnapRect.Top();
-
- const Point& rPoint = GetPoint( *pTmp++, sal_True );
- double fXRel = rPoint.X() + nXMove;
- double fYRel = rPoint.Y() + nYMove;
- fXRel = fXRel / aNewSnapRect.GetWidth() * 10000;
- fYRel = fYRel / aNewSnapRect.GetHeight() * 10000;
- aGluePoint.SetPos( Point( (sal_Int32)fXRel, (sal_Int32)fYRel ) );
- aGluePoint.SetPercent( sal_True );
- aGluePoint.SetAlign( SDRVERTALIGN_TOP | SDRHORZALIGN_LEFT );
- aGluePoint.SetEscDir( SDRESC_SMART );
- SdrGluePointList* pList = pRet->ForceGluePointList();
- if( pList )
- /* sal_uInt16 nId = */ pList->Insert( aGluePoint );
- }
- }
- if ( bSetCustomShapeAdjustItem )
- {
- if ( pRet->ISA( SdrObjGroup ) || pRet->ISA( SdrPathObj ) )
- {
- sal_uInt32 i, nCount = 0;
- SdrObject* pFirstObject = pRet;
- SdrObjList* pObjectList = NULL;
- if ( pRet->ISA( SdrPathObj ) )
- nCount = 1;
- else
- {
- pObjectList = ((SdrObjGroup*)pRet)->GetSubList();
- if ( pObjectList )
- nCount = pObjectList->GetObjCount();
- if ( nCount )
- pFirstObject = pObjectList->GetObj( 0 );
- }
- if ( nCount )
- {
- SdrCustomShapeAdjustmentItem aAdjustItem;
- SdrCustomShapeAdjustmentValue aAdjustValue;
- if ( nAdjustmentHandles )
- {
- for ( i = 0; i < nAdjustmentHandles; i++ )
- {
- aAdjustValue.SetValue( pAdjustmentHandles[ i ].GetAdjustValue() );
- aAdjustItem.SetValue( i, aAdjustValue );
- }
- }
- if ( bVertAlloc == FALSE )
- {
- sal_uInt32 nMagicNumber = 0x80001234; // this magic number identifies ms objects
- sal_uInt32 nType = (sal_uInt32)eSpType << 16 // hiword is the shapetype
- | nCount; // loword the number of Path objects
- sal_uInt32 nChecksum = 0; // checksum is used later to be sure that
- // the object is not changed
-
- // here we are calculating the checksum
- Rectangle aTRect( pRet->GetSnapRect() );
- sal_Int32 nLeft = aTRect.Left();
- sal_Int32 nTop = aTRect.Top();
-
- SdrObject* pNext = pFirstObject;
- for ( i = 0; i < nCount; i++ )
- {
- if ( i )
- pNext = pObjectList->GetObj( i );
-
- if ( !pNext->ISA( SdrPathObj ) ) // just only SdrPathObjs are valid as Customshapes
- {
- nChecksum = 0;
- break;
- }
-
- // #i74631# use explicit constructor here. Also XPolyPolygon is not necessary,
- // reducing to PolyPolygon
- const PolyPolygon aPolyPolygon(((SdrPathObj*)pNext)->GetPathPoly());
-
- sal_uInt16 j, k = aPolyPolygon.Count();
- sal_Int32 aVal[ 3 ];
- while( k )
- {
- const Polygon& rPoly = aPolyPolygon[ --k ];
- j = rPoly.GetSize();
- while( j )
- {
- const Point& rPoint = rPoly[ --j ];
-#ifdef OSL_LITENDIAN
- aVal[ 0 ] = SWAPLONG( rPoint.X() - nLeft );
- aVal[ 1 ] = SWAPLONG( rPoint.Y() - nTop );
- aVal[ 2 ] = SWAPLONG( rPoly.GetFlags( j ) );
-#else
- aVal[ 0 ] = rPoint.X() - nLeft;
- aVal[ 1 ] = rPoint.Y() - nTop;
- aVal[ 2 ] = rPoly.GetFlags( j );
-#endif
- nChecksum = rtl_crc32( nChecksum, &aVal[ 0 ], 12 );
- }
- }
- }
-
- if ( nChecksum )
- {
- i = aAdjustItem.GetCount();
- aAdjustValue.SetValue( nChecksum ); // the last 3 entries in the adjustment item must be in this
- aAdjustItem.SetValue( i++, aAdjustValue ); // order, otherwise it will be not possible to recreate the original
- aAdjustValue.SetValue( nType ); // customshape when exporting into ms formats
- aAdjustItem.SetValue( i++, aAdjustValue );
- aAdjustValue.SetValue( nMagicNumber );
- aAdjustItem.SetValue( i++, aAdjustValue );
- }
- }
- SfxItemSet aSet( pSdrModel->GetItemPool() );
- aSet.Put( aAdjustItem );
- pFirstObject->SetMergedItemSet(aSet);
- }
- }
- }
- }
- return pRet;
-}
diff --git a/svx/source/msfilter/msashape.hxx b/svx/source/msfilter/msashape.hxx
deleted file mode 100644
index fe469802ee4a..000000000000
--- a/svx/source/msfilter/msashape.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: msashape.hxx,v $
- * $Revision: 1.13 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MSASHAPE_HXX
-#define _MSASHAPE_HXX
-
-#include <svx/msdffdef.hxx>
-#include <svx/msdffimp.hxx>
-
-#define DFF_CUSTOMSHAPE_FLIP_V 1
-#define DFF_CUSTOMSHAPE_FLIP_H 2
-#define DFF_CUSTOMSHAPE_EXCH 4
-
-class SdrModel;
-class SfxItemSet;
-struct SvxMSDffVertPair;
-struct SvxMSDffCalculationData;
-struct SvxMSDffTextRectangles;
-class SvxMSDffAdjustmentHandle;
-class SvxMSDffCustomShape
-{
- MSFilterTracer* pTracer;
- MSO_SPT eSpType;
-
- sal_Int32 nCoordWidth;
- sal_Int32 nCoordHeight;
- Rectangle aSnapRect;
-
- double fXScale;
- double fYScale;
-
- sal_Int32 nFix16Angle;
- sal_Int32 nXRef;
- sal_Int32 nYRef;
- sal_uInt32 nFlags;
-
- sal_uInt32 nNumElemVert;
- sal_uInt32 nNumElemSeg;
-
- sal_uInt32 nColorData;
-
- SvxMSDffVertPair* pVertData;
- sal_uInt16* pSegData;
-
- sal_uInt32 nTextRectData;
- SvxMSDffTextRectangles* pTextRectData;
- sal_uInt32 nCalculationData;
- SvxMSDffCalculationData* pCalculationData;
- sal_uInt32 nAdjustmentHandles;
- SvxMSDffAdjustmentHandle* pAdjustmentHandles;
- sal_uInt32 nGluePoints;
- SvxMSDffVertPair* pGluePoints;
-
- sal_Bool bIsEmpty : 1;
- sal_Bool bVertAlloc : 1;
- sal_Bool bSegAlloc : 1;
- sal_Bool bCalcAlloc : 1;
- sal_Bool bTextRectAlloc : 1;
-
- sal_Bool bTextFlow : 1;
- sal_Bool bFilled : 1;
- sal_Bool bFlipH : 1;
- sal_Bool bFlipV : 1;
-
- sal_Int32 GetAdjustValue( sal_uInt32 nIndex ) const;
- sal_Int32 GetAdjustValue( sal_uInt32 nIndex, sal_Int32 nDefault ) const;
- sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const;
- Color ImplGetColorData( const Color& rFillColor, sal_uInt32 nIndex );
- double ImplGetValue( sal_uInt16 nIndex, sal_uInt32& nGeometryFlags ) const;
- Point GetPoint( const SvxMSDffVertPair&, sal_Bool bScale = sal_True ) const;
-
- static void SwapStartAndEndArrow( SdrObject* pObj );
-
- public :
-
- SdrObject* GetObject( SdrModel* pSdrModel, SfxItemSet& rSet, sal_Bool bSetAdjustmentItem );
- sal_Bool IsEmpty() const;
-
- Rectangle GetTextRect() const;
- static sal_Bool HasGluePointList( const MSO_SPT eShapeType );
- static MSO_SPT GetShapeTypeFromSdrObject( const SdrObject* );
-
- SvxMSDffCustomShape( const DffPropertyReader& rPropReader, SvStream&,
- DffObjData& rObjDat, Rectangle& rSnapRect, sal_Int32 nFix16Angle, MSFilterTracer* pTracer );
- ~SvxMSDffCustomShape();
-};
-
-#endif
-
diff --git a/svx/source/msfilter/msashape3d.cxx b/svx/source/msfilter/msashape3d.cxx
deleted file mode 100644
index 7d8b81edf31e..000000000000
--- a/svx/source/msfilter/msashape3d.cxx
+++ /dev/null
@@ -1,564 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: msashape3d.cxx,v $
- * $Revision: 1.13.226.1 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <msashape3d.hxx>
-#include <tools/poly.hxx>
-#include <svditer.hxx>
-#include <svx/svdobj.hxx>
-#include <svtools/poolitem.hxx>
-#include <svtools/itemset.hxx>
-#include <svx/xfillit0.hxx>
-#include <svx/xit.hxx>
-#include <svx/xbtmpit.hxx>
-#include <svx/xflclit.hxx>
-#include <svx/svdopath.hxx>
-#include <svx/svdogrp.hxx>
-#include <svx/svdpage.hxx>
-#include <svx/polysc3d.hxx>
-#include <svx/svddef.hxx>
-#include <svx/svx3ditems.hxx>
-#include <svx/extrud3d.hxx>
-#include <svx/xflbmtit.hxx>
-#include <vcl/svapp.hxx>
-#include <svx/xlnclit.hxx>
-
-#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
-
-double SvxMSDffCustomShape3D::Fix16ToAngle( sal_Int32 nFixAngle )
-{
- double fAngle = 0.0;
- if ( nFixAngle )
- {
- fAngle = nFixAngle;
- fAngle /= 65536.0;
- }
- return fAngle;
-}
-
-SvxMSDffCustomShape3D::Transformation2D::Transformation2D( const DffPropSet& rPropSet, const Rectangle& rSnapRect ) :
- aCenter( rSnapRect.Center() )
-{
- bParallel = ( rPropSet.GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 4 ) != 0;
- if ( bParallel )
- {
- fSkewAngle = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< UINT32 >( -135 * 65536 ) ) ) * F_PI180;
- nSkewAmount = rPropSet.GetPropertyValue( DFF_Prop_c3DSkewAmount, 50 );
- }
- else
- {
- fZScreen = 0.0;
- fViewPointOriginX = ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DOriginX, 32768 )) * rSnapRect.GetWidth()) / 65536.0;
- fViewPointOriginY = ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DOriginY, (sal_uInt32)-32768 )) * rSnapRect.GetHeight()) / 65536.0;
- fViewPoint.setX((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DXViewpoint, 1250000 )) / 360); // 360 emu = 0,01 mm
- fViewPoint.setY((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DYViewpoint, (sal_uInt32)-1250000 )) / 360);
- fViewPoint.setZ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DZViewpoint, (sal_uInt32)-9000000 )) / 360);
- }
-}
-
-basegfx::B3DPolygon SvxMSDffCustomShape3D::Transformation2D::ApplySkewSettings( const basegfx::B3DPolygon& rPoly3D )
-{
- basegfx::B3DPolygon aRetval;
- sal_uInt32 j;
-
- for ( j = 0L; j < rPoly3D.count(); j++ )
- {
- const basegfx::B3DPoint aPoint(rPoly3D.getB3DPoint(j));
- const double fDepth(-( aPoint.getZ() * nSkewAmount ) / 100.0);
- const basegfx::B3DPoint aNewPoint(
- aPoint.getX() + (fDepth * cos( fSkewAngle )),
- aPoint.getY() - ( fDepth * sin( fSkewAngle )),
- aPoint.getZ());
- aRetval.append(aNewPoint);
- }
-
- return aRetval;
-}
-
-Point SvxMSDffCustomShape3D::Transformation2D::Transform2D( const basegfx::B3DPoint& rPoint3D )
-{
- Point aPoint2D;
- if ( bParallel )
- {
- aPoint2D.X() = (sal_Int32)rPoint3D.getX();
- aPoint2D.Y() = (sal_Int32)rPoint3D.getY();
- }
- else
- {
- double fX = rPoint3D.getX() - fViewPointOriginX;
- double fY = rPoint3D.getY() - fViewPointOriginY;
- double f = ( fZScreen - fViewPoint.getZ() ) / ( rPoint3D.getZ() - fViewPoint.getZ() );
- aPoint2D.X() = (sal_Int32)(( fX - fViewPoint.getX() ) * f + fViewPoint.getX() + fViewPointOriginX );
- aPoint2D.Y() = (sal_Int32)(( fY - fViewPoint.getY() ) * f + fViewPoint.getY() + fViewPointOriginY );
- }
- aPoint2D.Move( aCenter.X(), aCenter.Y() );
- return aPoint2D;
-}
-
-basegfx::B3DPoint SvxMSDffCustomShape3D::Rotate( const basegfx::B3DPoint& rPoint, const double x, const double y, const double z )
-{
- basegfx::B3DPoint aRetval(rPoint);
- basegfx::B3DPoint aPoint( rPoint );
-
- // rotation z axis
- aRetval.setX(aPoint.getX() * cos( z ) + aPoint.getY() * sin( z ));
- aRetval.setY(-( aPoint.getX() * sin( z ) ) + aPoint.getY() * cos( z ));
-
- // rotation y axis
- aPoint = aRetval;
- aRetval.setX(aPoint.getX() * cos( y ) + aPoint.getZ() * sin( y ));
- aRetval.setZ(-( aPoint.getX() * sin( y ) ) + aPoint.getZ() * cos( y ));
-
- // rotation x axis
- aPoint = aRetval;
- aRetval.setY(aPoint.getY() * cos( x ) + aPoint.getZ() * sin( x ));
- aRetval.setZ(-( aPoint.getY() * sin( x ) ) + aPoint.getZ() * cos( x ));
-
- return aRetval;
-}
-
-//basegfx::B3DPolyPolygon SvxMSDffCustomShape3D::Rotate( const basegfx::B3DPolyPolygon& rPolyPoly3D, const basegfx::B3DPoint& rOrigin, const double x, const double y, const double z )
-//{
-// basegfx::B3DPolyPolygon aRetval;
-// sal_uInt32 i, j;
-//
-// for( i = 0L; i < rPolyPoly3D.count(); i++ )
-// {
-// const basegfx::B3DPolygon aPoly3D(rPolyPoly3D.getB3DPolygon(i));
-// basegfx::B3DPolygon rNewPoly;
-//
-// for( j = 0L; j < aPoly3D.count(); j++ )
-// {
-// basegfx::B3DPoint aPoint(aPoly3D.getB3DPoint(j));
-//
-// aPoint -= rOrigin;
-// aPoint = Rotate( aPoint, x, y, z );
-// aPoint += rOrigin;
-//
-// rNewPoly.append(aPoint);
-// }
-//
-// aRetval.append(rNewPoly);
-// }
-//
-// return aRetval;
-//}
-
-SdrObject* SvxMSDffCustomShape3D::Create3DObject( const SdrObject* pObj, const DffPropSet& rPropSet,
- SfxItemSet& aSet, Rectangle& rSnapRect, sal_uInt32 nSpFlags )
-{
- SdrObject* pRet = NULL;
- std::vector< E3dCompoundObject* > aPlaceholderObjectList;
-
- double fExtrusionBackward = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DExtrudeBackward, 457200 )) / 360.0; // in emus
- double fExtrusionForward = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DExtrudeForward, 0 )) / 360.0;
- double fDepth = fExtrusionBackward - fExtrusionForward;
- if ( fDepth < 1.0 )
- fDepth = 1.0;
- ProjectionType eProjectionType( rPropSet.GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 4 ? PR_PARALLEL : PR_PERSPECTIVE );
-
- // pObj Umwandeln in Szene mit 3D Objekt
- E3dDefaultAttributes a3DDefaultAttr;
- a3DDefaultAttr.SetDefaultLatheCharacterMode( TRUE );
- a3DDefaultAttr.SetDefaultExtrudeCharacterMode( TRUE );
-
- E3dScene* pScene = new E3dPolyScene( a3DDefaultAttr );
-
- sal_Bool bSceneHasObjects ( sal_False );
- sal_Bool bUseTwoFillStyles( sal_False );
-
- MSO_3DRenderMode eRenderMode( (MSO_3DRenderMode)rPropSet.GetPropertyValue( DFF_Prop_c3DRenderMode, mso_FullRender ) );
- XFillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) );
- pScene->SetMergedItem( Svx3DShadeModeItem( 0 ) );
- aSet.Put( Svx3DPercentDiagonalItem( 0 ) );
- aSet.Put( Svx3DTextureModeItem( 1 ) );
- if ( eRenderMode == mso_Wireframe )
- {
- aSet.Put( XLineStyleItem( XLINE_SOLID ) );
- aSet.Put( XFillStyleItem ( XFILL_NONE ) );
- aSet.Put( Svx3DDoubleSidedItem( TRUE ) );
- }
- else
- {
- aSet.Put( XLineStyleItem( XLINE_NONE ) );
- if ( eFillStyle == XFILL_NONE )
- aSet.Put( XFillStyleItem( XFILL_SOLID ) );
- else if ( ( eFillStyle == XFILL_BITMAP ) || ( eFillStyle == XFILL_GRADIENT ) )
- bUseTwoFillStyles = sal_True;
- }
- const SdrObject* pNext = NULL;
- SdrObjListIter* pIter = NULL;
- if ( pObj->IsGroupObject() )
- {
- pIter = new SdrObjListIter( *pObj, IM_DEEPWITHGROUPS );
- if ( pIter->IsMore() )
- pNext = pIter->Next();
- }
- else
- pNext = pObj;
- while ( pNext )
- {
- const SfxItemSet& rNextItemSet = pNext->GetMergedItemSet();
-
- sal_Bool bIsPlaceholderObject = (((XFillStyleItem&)rNextItemSet.Get( XATTR_FILLSTYLE )).GetValue() == XFILL_NONE )
- && (((XLineStyleItem&)rNextItemSet.Get( XATTR_LINESTYLE )).GetValue() == XLINE_NONE );
-
- SdrObject* pNewObj = pNext->ConvertToPolyObj( FALSE, FALSE );
- SdrPathObj* pPath = PTR_CAST( SdrPathObj, pNewObj );
- if( pPath )
- {
- const basegfx::B2DPolyPolygon aPolyPolygon(pPath->GetPathPoly());
- E3dCompoundObject* p3DObj = new E3dExtrudeObj( a3DDefaultAttr, aPolyPolygon, bUseTwoFillStyles ? 1 : fDepth );
- p3DObj->NbcSetLayer( pObj->GetLayer() );
- p3DObj->SetMergedItemSet( aSet );
- if ( bIsPlaceholderObject )
- aPlaceholderObjectList.push_back( p3DObj );
- else if ( bUseTwoFillStyles )
- {
- Bitmap aFillBmp;
- sal_Bool bFillBmpTile = ((XFillBmpTileItem&)p3DObj->GetMergedItem( XATTR_FILLBMP_TILE )).GetValue();
- if ( bFillBmpTile )
- {
- const XFillBitmapItem& rBmpItm = (XFillBitmapItem&)p3DObj->GetMergedItem( XATTR_FILLBITMAP );
- const XOBitmap& rXOBmp = rBmpItm.GetBitmapValue();
- aFillBmp = rXOBmp.GetBitmap();
- Size aLogicalSize = aFillBmp.GetPrefSize();
- if ( aFillBmp.GetPrefMapMode() == MAP_PIXEL )
- aLogicalSize = Application::GetDefaultDevice()->PixelToLogic( aLogicalSize, MAP_100TH_MM );
- else
- aLogicalSize = OutputDevice::LogicToLogic( aLogicalSize, aFillBmp.GetPrefMapMode(), MAP_100TH_MM );
- aLogicalSize.Width() *= 5; ;// :-( nice scaling, look at engine3d/obj3d.cxx
- aLogicalSize.Height() *= 5;
- aFillBmp.SetPrefSize( aLogicalSize );
- aFillBmp.SetPrefMapMode( MAP_100TH_MM );
- p3DObj->SetMergedItem( XFillBitmapItem( String(), aFillBmp ) );
- }
- else
- {
- Rectangle aBoundRect( PolyPolygon(aPolyPolygon).GetBoundRect() );
- if ( rSnapRect != aBoundRect )
- {
- const XFillBitmapItem& rBmpItm = (XFillBitmapItem&)p3DObj->GetMergedItem( XATTR_FILLBITMAP );
- const XOBitmap& rXOBmp = rBmpItm.GetBitmapValue();
- aFillBmp = rXOBmp.GetBitmap();
- Size aBmpSize( aFillBmp.GetSizePixel() );
- double fXScale = (double)aBoundRect.GetWidth() / (double)rSnapRect.GetWidth();
- double fYScale = (double)aBoundRect.GetHeight() / (double)rSnapRect.GetHeight();
-
- Point aPt( (sal_Int32)( (double)( aBoundRect.Left() - rSnapRect.Left() )* (double)aBmpSize.Width() / (double)rSnapRect.GetWidth() ),
- (sal_Int32)( (double)( aBoundRect.Top() - rSnapRect.Top() ) * (double)aBmpSize.Height() / (double)rSnapRect.GetHeight() ) );
- Size aSize( (sal_Int32)( aBmpSize.Width() * fXScale ),
- (sal_Int32)( aBmpSize.Height() * fYScale ) );
- Rectangle aCropRect( aPt, aSize );
- aFillBmp.Crop( aCropRect );
- p3DObj->SetMergedItem( XFillBitmapItem( String(), aFillBmp ) );
- }
- }
- pScene->Insert3DObj( p3DObj );
- p3DObj = new E3dExtrudeObj( a3DDefaultAttr, pPath->GetPathPoly(), fDepth );
- p3DObj->NbcSetLayer( pObj->GetLayer() );
- p3DObj->SetMergedItemSet( aSet );
- p3DObj->SetMergedItem( XFillStyleItem( XFILL_SOLID ) );
- p3DObj->SetMergedItem( Svx3DCloseFrontItem( sal_False ) );
- p3DObj->SetMergedItem( Svx3DCloseBackItem( sal_False ) );
- pScene->Insert3DObj( p3DObj );
- p3DObj = new E3dExtrudeObj( a3DDefaultAttr, pPath->GetPathPoly(), 1 );
- p3DObj->NbcSetLayer( pObj->GetLayer() );
- p3DObj->SetMergedItemSet( aSet );
- basegfx::B3DHomMatrix aFrontTransform( p3DObj->GetTransform() );
- aFrontTransform.translate( 0.0, 0.0, fDepth );
- p3DObj->NbcSetTransform( aFrontTransform );
- if ( ( eFillStyle == XFILL_BITMAP ) && !aFillBmp.IsEmpty() )
- p3DObj->SetMergedItem( XFillBitmapItem( String(), aFillBmp ) );
- }
- else if ( eFillStyle == XFILL_NONE )
- {
- XLineColorItem& rLineColor = (XLineColorItem&)p3DObj->GetMergedItem( XATTR_LINECOLOR );
- p3DObj->SetMergedItem( XFillColorItem( String(), rLineColor.GetColorValue() ) );
- p3DObj->SetMergedItem( Svx3DDoubleSidedItem( sal_True ) );
- p3DObj->SetMergedItem( Svx3DCloseFrontItem( sal_False ) );
- p3DObj->SetMergedItem( Svx3DCloseBackItem( sal_False ) );
- }
- pScene->Insert3DObj( p3DObj );
- bSceneHasObjects = sal_True;
- }
- SdrObject::Free( pNewObj );
- pNext = NULL;
- if ( pIter && pIter->IsMore() )
- pNext = pIter->Next();
- }
- delete pIter;
-
- if ( bSceneHasObjects ) // is the SdrObject properly converted
- {
- // then we can change the return value
- pRet = pScene;
-
- // Kameraeinstellungen, Perspektive ...
- Camera3D& rCamera = (Camera3D&)pScene->GetCamera();
- const basegfx::B3DRange& rVolume = pScene->GetBoundVolume();
- pScene->NbcSetSnapRect( rSnapRect );
-
- // InitScene replacement
- double fW(rVolume.getWidth());
- double fH(rVolume.getHeight());
-
- rCamera.SetAutoAdjustProjection( FALSE );
- rCamera.SetViewWindow( -fW / 2, - fH / 2, fW, fH);
- basegfx::B3DPoint aLookAt( 0.0, 0.0, 0.0 );
- basegfx::B3DPoint aCamPos( 0.0, 0.0, 100.0 );
-
- rCamera.SetDefaults( basegfx::B3DPoint( 0.0, 0.0, 100.0 ), aLookAt, 100.0 );
- rCamera.SetPosAndLookAt( aCamPos, aLookAt );
- rCamera.SetFocalLength( 1.0 );
- rCamera.SetProjection( eProjectionType );
- pScene->SetCamera( rCamera );
- pScene->SetRectsDirty();
-
- double fViewPointOriginX = ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DOriginX, 32768 )) * rSnapRect.GetWidth()) / 65536.0;
- double fViewPointOriginY = ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DOriginY, (sal_uInt32)-32768 )) * rSnapRect.GetHeight()) / 65536.0;
-
- basegfx::B3DHomMatrix aNewTransform( pScene->GetTransform() );
- Point aCenter( rSnapRect.Center() );
- aNewTransform.translate( -aCenter.X(), aCenter.Y(), -pScene->GetBoundVolume().getDepth() );
- double fXRotate = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DXRotationAngle, 0 ) );
- double fYRotate = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DYRotationAngle, 0 ) );
- double fZRotate = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_Rotation, 0 ) );
- if ( fZRotate != 0.0 )
- {
- aNewTransform.rotate(0.0, 0.0, -fZRotate * F_PI180 );
- }
- if ( nSpFlags & SP_FFLIPH )
- {
- aNewTransform.scale( -1.0, 0.0, 0.0 );
- }
- if ( nSpFlags & SP_FFLIPV )
- {
- aNewTransform.scale(0.0, -1.0, 0.0 );
- }
- if( fYRotate != 0.0 )
- {
- aNewTransform.rotate( 0.0, -fYRotate * F_PI180, 0.0 );
- }
- if( fXRotate != 0.0 )
- {
- aNewTransform.rotate( -fXRotate * F_PI180, 0.0, 0.0 );
- }
- if ( eProjectionType == PR_PARALLEL )
- {
- sal_Int32 nSkewAmount = rPropSet.GetPropertyValue( DFF_Prop_c3DSkewAmount, 50 );
- if ( nSkewAmount )
- {
- sal_Int32 nSkewAngle = ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< UINT32 >( -135 * 65536 ) ) ) >> 16;
-
- double fAlpha( (double)nSkewAngle * F_PI180 );
- double fInvTanBeta( (double)nSkewAmount / 100.0 );
- if(fInvTanBeta)
- {
- aNewTransform.shearXY(
- fInvTanBeta * cos(fAlpha),
- fInvTanBeta * sin(fAlpha));
- }
- }
- }
- else
- {
- aNewTransform.translate( -fViewPointOriginX, fViewPointOriginY, 0.0 );
- // now set correct camera position
-// double fViewPointOriginX = ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DOriginX, 32768 )) * rSnapRect.GetWidth()) / 65536.0;
-// double fViewPointOriginY = ((double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DOriginY, (sal_uInt32)-32768 )) * rSnapRect.GetHeight()) / 65536.0;
- double fViewPointX = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DXViewpoint, 1250000 )) / 360;
- double fViewPointY = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DYViewpoint,(sal_uInt32)-1250000 )) / 360;
- double fViewPointZ = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DZViewpoint,(sal_uInt32)-9000000 )) / 360;
-
- basegfx::B3DPoint aNewLookAt( fViewPointX, -fViewPointY, 0 );
- basegfx::B3DPoint aNewCamPos( fViewPointX, -fViewPointY, -fViewPointZ );
- rCamera.SetPosAndLookAt( aNewCamPos, aNewLookAt );
- pScene->SetCamera( rCamera );
- }
- pScene->NbcSetTransform( aNewTransform );
-
- ///////////
- // light //
- ///////////
- double fAmbientIntensity = ((double)rPropSet.GetPropertyValue( DFF_Prop_c3DAmbientIntensity, 22178 )) / 65536.0;
-
- sal_Int32 nLightX = ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DKeyX, 50000 )) / 360;
- sal_Int32 nLightY = - ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DKeyY, 0 )) / 360;
- sal_Int32 nLightZ = - ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DKeyZ, 10000 )) / 360;
- if ( !nLightZ )
- nLightZ = 1;
- double fLightIntensity = ((double)rPropSet.GetPropertyValue( DFF_Prop_c3DKeyIntensity, 43712 )) / 65536.0;
-// sal_Bool bLightHarsh = ( rPropSet.GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 2 ) != 0;
-
- sal_Int32 nLight2X = ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DFillX, (sal_uInt32)-50000 )) / 360;
- sal_Int32 nLight2Y = - ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DFillY, 0 )) / 360;
- sal_Int32 nLight2Z = - ((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DFillZ, 10000 )) / 360;
- if ( !nLight2Z )
- nLight2Z = -1;
- double fLight2Intensity = ((double)rPropSet.GetPropertyValue( DFF_Prop_c3DFillIntensity, 43712 )) / 65536.0;
-// sal_Bool bLight2Harsh = ( rPropSet.GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 1 ) != 0;
-// sal_Bool bLightFace = ( rPropSet.GetPropertyValue( DFF_Prop_fc3DLightFace, 0 ) & 1 ) != 0;
-
- sal_uInt16 nAmbientColor = (sal_uInt16)( fAmbientIntensity * 255.0 );
- if ( nAmbientColor > 255 )
- nAmbientColor = 255;
- Color aGlobalAmbientColor( (sal_uInt8)nAmbientColor, (sal_uInt8)nAmbientColor, (sal_uInt8)nAmbientColor );
- pScene->SetMergedItem( Svx3DAmbientcolorItem( aGlobalAmbientColor ) );
-
- sal_uInt8 nSpotLight1 = (sal_uInt8)( fLightIntensity * 255.0 );
- basegfx::B3DVector aSpotLight1( (double)nLightX, (double)nLightY, (double)nLightZ );
- aSpotLight1.normalize();
- pScene->SetMergedItem( Svx3DLightOnOff1Item( sal_True ) );
- Color aAmbientSpot1Color( nSpotLight1, nSpotLight1, nSpotLight1 );
- pScene->SetMergedItem( Svx3DLightcolor1Item( aAmbientSpot1Color ) );
- pScene->SetMergedItem( Svx3DLightDirection1Item( aSpotLight1 ) );
-
- sal_uInt8 nSpotLight2 = (sal_uInt8)( fLight2Intensity * 255.0 );
- basegfx::B3DVector aSpotLight2( (double)nLight2X, (double)nLight2Y, (double)nLight2Z );
- aSpotLight2.normalize();
- pScene->SetMergedItem( Svx3DLightOnOff2Item( sal_True ) );
- Color aAmbientSpot2Color( nSpotLight2, nSpotLight2, nSpotLight2 );
- pScene->SetMergedItem( Svx3DLightcolor2Item( aAmbientSpot2Color ) );
- pScene->SetMergedItem( Svx3DLightDirection2Item( aSpotLight2 ) );
-
- if ( nLightX || nLightY )
- {
- sal_uInt8 nSpotLight3 = 70;
- basegfx::B3DVector aSpotLight3( 0.0, 0.0, 1.0 );
- pScene->SetMergedItem( Svx3DLightOnOff3Item( sal_True ) );
- Color aAmbientSpot3Color( nSpotLight3, nSpotLight3, nSpotLight3 );
- pScene->SetMergedItem( Svx3DLightcolor3Item( aAmbientSpot3Color ) );
- pScene->SetMergedItem( Svx3DLightDirection3Item( aSpotLight3 ) );
- }
-
- double fSpecular = ((double)rPropSet.GetPropertyValue( DFF_Prop_c3DSpecularAmt, 0 )) / 65536.0;
-// double fDiffuse = ((double)rPropSet.GetPropertyValue( DFF_Prop_c3DDiffuseAmt, 0 )) / 65536.0;
-// double fShininess = ((double)rPropSet.GetPropertyValue( DFF_Prop_c3DShininess, 0 )) / 65536.0;
-
- sal_uInt16 nItensity = 25;
- Color aSpecularCol( COL_BLACK );
- if ( fSpecular == 0.0 )
- {
- aSpecularCol = Color( 51, 51, 51 );
- }
- else if ( fSpecular > 1.2 )
- {
- aSpecularCol = Color( 128, 128, 128 );
- }
- pScene->SetMergedItem( Svx3DMaterialSpecularItem( aSpecularCol ) );
- pScene->SetMergedItem( Svx3DMaterialSpecularIntensityItem( nItensity ) );
-
- pScene->SetModel( pObj->GetModel() );
- pRet->SetSnapRect( CalculateNewSnapRect( rSnapRect, rPropSet ) );
-
- // removing placeholder objects
- std::vector< E3dCompoundObject* >::iterator aObjectListIter( aPlaceholderObjectList.begin() );
- while ( aObjectListIter != aPlaceholderObjectList.end() )
- {
- pScene->Remove3DObj( *aObjectListIter );
- delete *aObjectListIter++;
- }
- }
- else
- delete pScene;
- return pRet;
-}
-
-Rectangle SvxMSDffCustomShape3D::CalculateNewSnapRect( const Rectangle& rOriginalSnapRect, const DffPropSet& rPropSet )
-{
- const Point aCenter( rOriginalSnapRect.Center() );
- //double fExtrusionBackward = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DExtrudeBackward, 457200 )) / 360.0;
- double fExtrusionForward = (double)((sal_Int32)rPropSet.GetPropertyValue( DFF_Prop_c3DExtrudeForward, 0 )) / 360.0;
- sal_uInt32 i;
-
- // creating initial bound volume ( without rotation. skewing.and camera )
- basegfx::B3DPolygon aBoundVolume;
- const Polygon aPolygon( rOriginalSnapRect );
-
- for ( i = 0L; i < 4L; i++ )
- {
- aBoundVolume.append(basegfx::B3DPoint(
- aPolygon[ (sal_uInt16)i ].X() - aCenter.X(),
- aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(),
- fExtrusionForward));
- }
-
- for ( ; i < 8L; i++ )
- {
- aBoundVolume.append(basegfx::B3DPoint(
- aPolygon[ (sal_uInt16)i ].X() - aCenter.X(),
- aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(),
- fExtrusionForward));
- }
-
- basegfx::B3DPoint aRotateCenter;
- aRotateCenter.setX(0.0);
- aRotateCenter.setY(0.0);
- aRotateCenter.setZ(rPropSet.GetPropertyValue( DFF_Prop_c3DRotationCenterZ, 0 ) / 360);
-
- // double XCenterInGUnits = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationCenterX, 0 );
- // double YCenterInGUnits = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationCenterY, 0 );
-
- // sal_Int32 nRotationXAxisInProz = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAxisX, 100 );
- // sal_Int32 nRotationYAxisInProz = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAxisY, 0 );
- // sal_Int32 nRotationZAxisInProz = rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAxisZ, 0 );
-
- double fXRotate = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DXRotationAngle, 0 ) ) * F_PI180;
- double fYRotate = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DYRotationAngle, 0 ) ) * F_PI180;
- double fZRotate = -Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_Rotation, 0 ) ) * F_PI180;
- // double fRotationAngle = Fix16ToAngle( rPropSet.GetPropertyValue( DFF_Prop_c3DRotationAngle, 0 ) ); // * F_PI180;
-
- for( i = 0; i < 8; i++ ) // rotating bound volume
- {
- basegfx::B3DPoint aPoint(aBoundVolume.getB3DPoint(i));
- aPoint -= aRotateCenter;
- aPoint = Rotate( aPoint, fXRotate, fYRotate, fZRotate );
- aPoint += aRotateCenter;
- aBoundVolume.setB3DPoint(i, aPoint);
- }
-
- Transformation2D aTransformation2D( rPropSet, rOriginalSnapRect );
- if ( aTransformation2D.IsParallel() )
- {
- aBoundVolume = aTransformation2D.ApplySkewSettings( aBoundVolume );
- }
-
- Polygon aTransformed( 8 );
- for ( i = 0L; i < 8L; i++ )
- {
- aTransformed[ (sal_uInt16)i ] = aTransformation2D.Transform2D( aBoundVolume.getB3DPoint(i) );
- }
-
- return aTransformed.GetBoundRect();
-}
-
-// eof
diff --git a/svx/source/msfilter/msashape3d.hxx b/svx/source/msfilter/msashape3d.hxx
deleted file mode 100644
index 862f9dcfbaf7..000000000000
--- a/svx/source/msfilter/msashape3d.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: msashape3d.hxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MSASHAPE3D_HXX
-#define _MSASHAPE3D_HXX
-
-#include <svx/msdffimp.hxx>
-#include <basegfx/point/b3dpoint.hxx>
-#include <basegfx/polygon/b3dpolygon.hxx>
-
-#include <vector>
-//#include <poly3d.hxx>
-//#include <goodies/point3d.hxx>
-
-class SvxMSDffCustomShape3D
-{
- class Transformation2D
- {
- Point aCenter;
- sal_Bool bParallel;
-
- // parallel projection
- double fSkewAngle;
- sal_Int32 nSkewAmount; // in percent
-
- // perspective projection
- double fZScreen;
- basegfx::B3DPoint fViewPoint;
- double fViewPointOriginX;
- double fViewPointOriginY;
-
- public :
-
- Transformation2D( const DffPropSet& rPropSet, const Rectangle& rSnapRect );
- basegfx::B3DPolygon ApplySkewSettings( const basegfx::B3DPolygon& rPoly3D );
- Point Transform2D( const basegfx::B3DPoint& rPoint );
- sal_Bool IsParallel() const { return bParallel; };
- };
-
- friend class Transformation2D;
-
- protected :
-
- static basegfx::B3DPoint Rotate( const basegfx::B3DPoint& rPoint, const double x, const double y, const double z );
-// static void Rotate( basegfx::B3DPolyPolygon&, const basegfx::B3DPoint& rRotateCenter, const double x, const double y, const double z );
- static double Fix16ToAngle( sal_Int32 nFixAngle );
- static Rectangle CalculateNewSnapRect( const Rectangle& rOriginalSnapRect, const DffPropSet& );
-
- public :
-
- static SdrObject* Create3DObject( const SdrObject* pSource, const DffPropSet&,
- SfxItemSet&, Rectangle& rSnapRect, sal_uInt32 nSpFlags );
-};
-
-#endif
-
diff --git a/svx/source/msfilter/mscodec.cxx b/svx/source/msfilter/mscodec.cxx
index 428d18c20649..591bce8f4f6d 100644
--- a/svx/source/msfilter/mscodec.cxx
+++ b/svx/source/msfilter/mscodec.cxx
@@ -37,6 +37,13 @@
#include <string.h>
#include <tools/solar.h>
+#define DEBUG_MSO_ENCRYPTION_STD97 0
+
+#if DEBUG_MSO_ENCRYPTION_STD97
+#include <stdio.h>
+#endif
+
+
namespace svx {
// ============================================================================
@@ -241,15 +248,50 @@ MSCodec_Std97::~MSCodec_Std97 ()
rtl_cipher_destroy (m_hCipher);
}
+#if DEBUG_MSO_ENCRYPTION_STD97
+static void lcl_PrintKeyData(const sal_uInt8* pKeyData, const char* msg)
+{
+ printf("pKeyData: (%s)\n", msg);
+ for (int j = 0; j < 4; ++j)
+ {
+ for (int i = 0; i < 16; ++i)
+ printf("%2.2x ", pKeyData[j*16+i]);
+ printf("\n");
+ }
+}
+#else
+static void lcl_PrintKeyData(const sal_uInt8* /*pKeyData*/, const char* /*msg*/)
+{
+}
+#endif
+
+#if DEBUG_MSO_ENCRYPTION_STD97
+static void lcl_PrintDigest(const sal_uInt8* pDigest, const char* msg)
+{
+ printf("digest: (%s)\n", msg);
+ for (int i = 0; i < 16; ++i)
+ printf("%2.2x ", pDigest[i]);
+ printf("\n");
+}
+#else
+static void lcl_PrintDigest(const sal_uInt8* /*pDigest*/, const char* /*msg*/)
+{
+}
+#endif
+
void MSCodec_Std97::InitKey (
const sal_uInt16 pPassData[16],
const sal_uInt8 pUnique[16])
{
+#if DEBUG_MSO_ENCRYPTION_STD97
+ fprintf(stdout, "MSCodec_Std97::InitKey: --begin\n");fflush(stdout);
+#endif
sal_uInt8 pKeyData[64];
int i, n;
// Fill PassData into KeyData.
(void)memset (pKeyData, 0, sizeof(pKeyData));
+ lcl_PrintKeyData(pKeyData, "initial");
for (i = 0, n = 16; (i < n) && pPassData[i]; i++)
{
pKeyData[2*i ] = sal::static_int_cast< sal_uInt8 >(
@@ -260,12 +302,16 @@ void MSCodec_Std97::InitKey (
pKeyData[2*i] = 0x80;
pKeyData[ 56] = sal::static_int_cast< sal_uInt8 >(i << 4);
+ lcl_PrintKeyData(pKeyData, "password data");
+
// Fill raw digest of KeyData into KeyData.
(void)rtl_digest_updateMD5 (
m_hDigest, pKeyData, sizeof(pKeyData));
(void)rtl_digest_rawMD5 (
m_hDigest, pKeyData, RTL_DIGEST_LENGTH_MD5);
+ lcl_PrintKeyData(pKeyData, "raw digest of key data");
+
// Update digest with KeyData and Unique.
for (i = 0; i < 16; i++)
{
@@ -279,6 +325,8 @@ void MSCodec_Std97::InitKey (
pKeyData[56] = 0x80;
pKeyData[57] = 0x0a;
+ lcl_PrintKeyData(pKeyData, "update digest with padding");
+
rtl_digest_updateMD5 (
m_hDigest, &(pKeyData[16]), sizeof(pKeyData) - 16);
@@ -286,6 +334,8 @@ void MSCodec_Std97::InitKey (
rtl_digest_rawMD5 (
m_hDigest, m_pDigestValue, sizeof(m_pDigestValue));
+ lcl_PrintDigest(m_pDigestValue, "digest value");
+
// Erase KeyData array and leave.
(void)memset (pKeyData, 0, sizeof(pKeyData));
}
@@ -294,27 +344,21 @@ bool MSCodec_Std97::VerifyKey (
const sal_uInt8 pSaltData[16],
const sal_uInt8 pSaltDigest[16])
{
+ // both the salt data and salt digest (hash) come from the document being imported.
+
+#if DEBUG_MSO_ENCRYPTION_STD97
+ fprintf(stdout, "MSCodec_Std97::VerifyKey: \n");
+ lcl_PrintDigest(pSaltData, "salt data");
+ lcl_PrintDigest(pSaltDigest, "salt hash");
+#endif
bool result = false;
if (InitCipher(0))
{
sal_uInt8 pDigest[RTL_DIGEST_LENGTH_MD5];
- sal_uInt8 pBuffer[64];
-
- // Decode SaltData into Buffer.
- rtl_cipher_decode (
- m_hCipher, pSaltData, 16, pBuffer, sizeof(pBuffer));
-
- pBuffer[16] = 0x80;
- (void)memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
- pBuffer[56] = 0x80;
-
- // Fill raw digest of Buffer into Digest.
- rtl_digest_updateMD5 (
- m_hDigest, pBuffer, sizeof(pBuffer));
- rtl_digest_rawMD5 (
- m_hDigest, pDigest, sizeof(pDigest));
+ GetDigestFromSalt(pSaltData, pDigest);
+ sal_uInt8 pBuffer[16];
// Decode original SaltDigest into Buffer.
rtl_cipher_decode (
m_hCipher, pSaltDigest, 16, pBuffer, sizeof(pBuffer));
@@ -333,7 +377,7 @@ bool MSCodec_Std97::VerifyKey (
bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter)
{
rtlCipherError result;
- sal_uInt8 pKeyData[64];
+ sal_uInt8 pKeyData[64]; // 512-bit message block
// Initialize KeyData array.
(void)memset (pKeyData, 0, sizeof(pKeyData));
@@ -358,7 +402,7 @@ bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter)
// Initialize Cipher with KeyData (for decoding).
result = rtl_cipher_init (
- m_hCipher, rtl_Cipher_DirectionDecode,
+ m_hCipher, rtl_Cipher_DirectionBoth,
pKeyData, RTL_DIGEST_LENGTH_MD5, 0, 0);
// Erase KeyData array and leave.
@@ -367,6 +411,39 @@ bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter)
return (result == rtl_Cipher_E_None);
}
+bool MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 nSaltDigest[16] )
+{
+#if DEBUG_MSO_ENCRYPTION_STD97
+ lcl_PrintDigest(pSaltData, "salt data");
+#endif
+ bool result = false;
+
+ if (InitCipher(0))
+ {
+ sal_uInt8 pDigest[RTL_DIGEST_LENGTH_MD5];
+ GetDigestFromSalt(nSaltData, pDigest);
+
+ rtl_cipher_decode (
+ m_hCipher, pDigest, 16, pDigest, sizeof(pDigest));
+
+ (void)memcpy(nSaltDigest, pDigest, 16);
+ }
+
+ return (result);
+}
+
+bool MSCodec_Std97::Encode (
+ const void *pData, sal_Size nDatLen,
+ sal_uInt8 *pBuffer, sal_Size nBufLen)
+{
+ rtlCipherError result;
+
+ result = rtl_cipher_encode (
+ m_hCipher, pData, nDatLen, pBuffer, nBufLen);
+
+ return (result == rtl_Cipher_E_None);
+}
+
bool MSCodec_Std97::Decode (
const void *pData, sal_Size nDatLen,
sal_uInt8 *pBuffer, sal_Size nBufLen)
@@ -395,6 +472,65 @@ bool MSCodec_Std97::Skip( sal_Size nDatLen )
return bResult;
}
+void MSCodec_Std97::GetDigestFromSalt( const sal_uInt8 pSaltData[16], sal_uInt8 pDigest[16] )
+{
+ sal_uInt8 pBuffer[64];
+ sal_uInt8 pDigestLocal[16];
+
+ // Decode SaltData into Buffer.
+ rtl_cipher_decode (
+ m_hCipher, pSaltData, 16, pBuffer, sizeof(pBuffer));
+
+ // set the 129th bit to make the buffer 128-bit in length.
+ pBuffer[16] = 0x80;
+
+ // erase the rest of the buffer with zeros.
+ (void)memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
+
+ // set the 441st bit.
+ pBuffer[56] = 0x80;
+
+ // Fill raw digest of Buffer into Digest.
+ rtl_digest_updateMD5 (
+ m_hDigest, pBuffer, sizeof(pBuffer));
+ rtl_digest_rawMD5 (
+ m_hDigest, pDigestLocal, sizeof(pDigestLocal));
+
+ memcpy(pDigest, pDigestLocal, 16);
+}
+
+void MSCodec_Std97::GetEncryptKey (
+ const sal_uInt8 pSalt[16],
+ sal_uInt8 pSaltData[16],
+ sal_uInt8 pSaltDigest[16])
+{
+ if (InitCipher(0))
+ {
+ sal_uInt8 pDigest[RTL_DIGEST_LENGTH_MD5];
+ sal_uInt8 pBuffer[64];
+
+ rtl_cipher_encode (
+ m_hCipher, pSalt, 16, pSaltData, sizeof(pBuffer));
+
+ (void)memcpy( pBuffer, pSalt, 16 );
+
+ pBuffer[16] = 0x80;
+ (void)memset (pBuffer + 17, 0, sizeof(pBuffer) - 17);
+ pBuffer[56] = 0x80;
+
+ rtl_digest_updateMD5 (
+ m_hDigest, pBuffer, sizeof(pBuffer));
+ rtl_digest_rawMD5 (
+ m_hDigest, pDigest, sizeof(pDigest));
+
+ rtl_cipher_encode (
+ m_hCipher, pDigest, 16, pSaltDigest, 16);
+
+ (void)memset (pBuffer, 0, sizeof(pBuffer));
+ (void)memset (pDigest, 0, sizeof(pDigest));
+ }
+}
+
// ============================================================================
} // namespace svx
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index b90035b28664..c9cfde91547a 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -168,8 +168,6 @@
#include <svx/outlobj.hxx>
#include <svx/editobj.hxx>
#include <svx/editeng.hxx>
-#include "msashape.hxx"
-#include "msashape3d.hxx"
#include "gallery.hxx"
#include <com/sun/star/drawing/ShadeMode.hpp>
#include <svtools/itempool.hxx>
@@ -1618,12 +1616,239 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh
rSet.Put( XLineStyleItem( XLINE_NONE ) );
}
+struct ShadeColor
+{
+ Color aColor;
+ double fDist;
+
+ ShadeColor( const Color& rC, double fR ) : aColor( rC ), fDist( fR ) {};
+};
+
+void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& rProperties, SvStream& rIn, std::vector< ShadeColor >& rShadeColors )
+{
+ sal_uInt32 nPos = rIn.Tell();
+ if ( rProperties.IsProperty( DFF_Prop_fillShadeColors ) )
+ {
+ if ( rProperties.SeekToContent( DFF_Prop_fillShadeColors, rIn ) )
+ {
+ sal_uInt16 i = 0, nNumElem = 0, nNumElemReserved = 0, nSize = 0;
+ rIn >> nNumElem >> nNumElemReserved >> nSize;
+ for ( ; i < nNumElem; i++ )
+ {
+ sal_Int32 nColor;
+ sal_Int32 nDist;
+
+ rIn >> nColor >> nDist;
+ rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( nColor, DFF_Prop_fillColor ), 1.0 - ( nDist / 65536.0 ) ) );
+ }
+ }
+ }
+ if ( !rShadeColors.size() )
+ {
+ rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ), 0 ) );
+ rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ), 1 ) );
+ }
+ rIn.Seek( nPos );
+}
+
+struct QuantErr
+{
+ double fRed;
+ double fGreen;
+ double fBlue;
-void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const MSO_SPT eShapeType ) const
+ QuantErr() : fRed( 0.0 ), fGreen( 0.0 ), fBlue( 0.0 ){};
+};
+
+void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream& rIn, SfxItemSet& rSet, const std::vector< ShadeColor >& rShadeColors, const DffObjData& rObjData, sal_Int32 nFix16Angle )
+{
+ Size aBitmapSizePixel( static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetWidth() / 2540.0 ) * 90.0 ), // we will create a bitmap with 90 dpi
+ static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetHeight() / 2540.0 ) * 90.0 ) );
+ if ( aBitmapSizePixel.Width() && aBitmapSizePixel.Height() && ( aBitmapSizePixel.Width() <= 1024 ) && ( aBitmapSizePixel.Height() <= 1024 ) )
+ {
+// std::vector< QuantErr > aQuantErrCurrScan( aBitmapSizePixel.Width() + 1 );
+// std::vector< QuantErr > aQuantErrNextScan( aBitmapSizePixel.Width() + 1 );
+
+ double fFocusX = rManager.GetPropertyValue( DFF_Prop_fillToRight, 0 ) / 65536.0;
+ double fFocusY = rManager.GetPropertyValue( DFF_Prop_fillToBottom, 0 ) / 65536.0;
+
+ Bitmap aBitmap( aBitmapSizePixel, 24 );
+ BitmapWriteAccess* pAcc = aBitmap.AcquireWriteAccess();
+ if ( pAcc )
+ {
+ sal_Int32 nX, nY;
+ for ( nY = 0; nY < aBitmapSizePixel.Height(); nY++ )
+ {
+ for ( nX = 0; nX < aBitmapSizePixel.Width(); nX++ )
+ {
+ double fX = static_cast< double >( nX ) / aBitmapSizePixel.Width();
+ double fY = static_cast< double >( nY ) / aBitmapSizePixel.Height();
+
+ double fD, fDist;
+ if ( fX < fFocusX )
+ {
+ if ( fY < fFocusY )
+ {
+ if ( fX > fY )
+ fDist = fY, fD = fFocusY;
+ else
+ fDist = fX, fD = fFocusX;
+ }
+ else
+ {
+ if ( fX > ( 1 - fY ) )
+ fDist = ( 1 - fY ), fD = 1 - fFocusY;
+ else
+ fDist = fX, fD = fFocusX;
+ }
+ }
+ else
+ {
+ if ( fY < fFocusY )
+ {
+ if ( ( 1 - fX ) > fY )
+ fDist = fY, fD = fFocusY;
+ else
+ fDist = ( 1 - fX ), fD = 1 - fFocusX;
+ }
+ else
+ {
+ if ( ( 1 - fX ) > ( 1 - fY ) )
+ fDist = ( 1 - fY ), fD = 1 - fFocusY;
+ else
+ fDist = ( 1 - fX ), fD = 1 - fFocusX;
+ }
+ }
+ if ( fD != 0.0 )
+ fDist /= fD;
+
+ std::vector< ShadeColor >::const_iterator aIter( rShadeColors.begin() );
+ double fA = 0.0;
+ Color aColorA = aIter->aColor;
+ double fB = 1.0;
+ Color aColorB( aColorA );
+ while ( aIter != rShadeColors.end() )
+ {
+ if ( aIter->fDist <= fDist )
+ {
+ if ( aIter->fDist >= fA )
+ {
+ fA = aIter->fDist;
+ aColorA = aIter->aColor;
+ }
+ }
+ if ( aIter->fDist > fDist )
+ {
+ if ( aIter->fDist <= fB )
+ {
+ fB = aIter->fDist;
+ aColorB = aIter->aColor;
+ }
+ }
+ aIter++;
+ }
+ double fRed = aColorA.GetRed(), fGreen = aColorA.GetGreen(), fBlue = aColorA.GetBlue();
+ double fD1 = fB - fA;
+ if ( fD1 != 0.0 )
+ {
+ fRed += ( ( ( fDist - fA ) * ( aColorB.GetRed() - aColorA.GetRed() ) ) / fD1 ); // + aQuantErrCurrScan[ nX ].fRed;
+ fGreen += ( ( ( fDist - fA ) * ( aColorB.GetGreen() - aColorA.GetGreen() ) ) / fD1 ); // + aQuantErrCurrScan[ nX ].fGreen;
+ fBlue += ( ( ( fDist - fA ) * ( aColorB.GetBlue() - aColorA.GetBlue() ) ) / fD1 ); // + aQuantErrCurrScan[ nX ].fBlue;
+ }
+ sal_Int16 nRed = static_cast< sal_Int16 >( fRed + 0.5 );
+ sal_Int16 nGreen = static_cast< sal_Int16 >( fGreen + 0.5 );
+ sal_Int16 nBlue = static_cast< sal_Int16 >( fBlue + 0.5 );
+/*
+ double fErr = fRed - nRed;
+ aQuantErrCurrScan[ nX + 1 ].fRed += 7.0 * fErr / 16.0;
+ if ( nX )
+ aQuantErrNextScan[ nX - 1 ].fRed += 3.0 * fErr / 16.0;
+ aQuantErrNextScan[ nX ].fRed += 5.0 * fErr / 16.0;
+ aQuantErrNextScan[ nX + 1 ].fRed += 1.0 * fErr / 16.0;
+
+ fErr = fGreen - nGreen;
+ aQuantErrCurrScan[ nX + 1 ].fGreen += 7.0 * fErr / 16.0;
+ if ( nX )
+ aQuantErrNextScan[ nX - 1 ].fGreen += 3.0 * fErr / 16.0;
+ aQuantErrNextScan[ nX ].fGreen += 5.0 * fErr / 16.0;
+ aQuantErrNextScan[ nX + 1 ].fGreen += 1.0 * fErr / 16.0;
+
+ fErr = fBlue - nBlue;
+ aQuantErrCurrScan[ nX + 1 ].fBlue += 7.0 * fErr / 16.0;
+ if ( nX )
+ aQuantErrNextScan[ nX - 1 ].fBlue += 3.0 * fErr / 16.0;
+ aQuantErrNextScan[ nX ].fBlue += 5.0 * fErr / 16.0;
+ aQuantErrNextScan[ nX + 1 ].fBlue += 1.0 * fErr / 16.0;
+*/
+ if ( nRed < 0 )
+ nRed = 0;
+ if ( nRed > 255 )
+ nRed = 255;
+ if ( nGreen < 0 )
+ nGreen = 0;
+ if ( nGreen > 255 )
+ nGreen = 255;
+ if ( nBlue < 0 )
+ nBlue = 0;
+ if ( nBlue > 255 )
+ nBlue = 255;
+
+ pAcc->SetPixel( nY, nX, BitmapColor( static_cast< sal_Int8 >( nRed ), static_cast< sal_Int8 >( nGreen ), static_cast< sal_Int8 >( nBlue ) ) );
+ }
+/*
+ aQuantErrCurrScan.swap( aQuantErrNextScan );
+ std::vector< QuantErr >::iterator aIter( aQuantErrNextScan.begin() );
+ while( aIter != aQuantErrNextScan.end() )
+ {
+ *aIter = QuantErr();
+ aIter++;
+ }
+*/
+ }
+ aBitmap.ReleaseAccess( pAcc );
+
+ if ( nFix16Angle )
+ {
+ sal_Bool bRotateWithShape = sal_True; // TRUE seems to be default
+ sal_uInt32 nPos = rIn.Tell();
+ if ( const_cast< SvxMSDffManager& >( rManager ).maShapeRecords.SeekToContent( rIn, DFF_msofbtUDefProp, SEEK_FROM_CURRENT_AND_RESTART ) )
+ {
+ const_cast< SvxMSDffManager& >( rManager ).maShapeRecords.Current()->SeekToBegOfRecord( rIn );
+ DffPropertyReader aSecPropSet( rManager );
+ aSecPropSet.ReadPropSet( rIn, NULL );
+ sal_Int32 nSecFillProperties = aSecPropSet.GetPropertyValue( DFF_Prop_fNoFillHitTest, 0x200020 );
+ bRotateWithShape = ( nSecFillProperties & 0x0020 );
+ }
+ rIn.Seek( nPos );
+ if ( bRotateWithShape )
+ {
+ aBitmap.Rotate( nFix16Angle / 10, rShadeColors[ 0 ].aColor );
+
+ ULONG nMirrorFlags = BMP_MIRROR_NONE;
+ if ( rObjData.nSpFlags & SP_FFLIPV )
+ nMirrorFlags |= BMP_MIRROR_VERT;
+ if ( rObjData.nSpFlags & SP_FFLIPH )
+ nMirrorFlags |= BMP_MIRROR_HORZ;
+ if ( nMirrorFlags != BMP_MIRROR_NONE )
+ aBitmap.Mirror( nMirrorFlags );
+ }
+ }
+
+ XOBitmap aXBmp( aBitmap, XBITMAP_STRETCH );
+ rSet.Put( XFillBmpTileItem( sal_False ) );
+ rSet.Put( XFillBitmapItem( String(), aXBmp ) );
+ }
+ }
+}
+
+void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const
{
UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
- if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( eShapeType ))
+ std::vector< ShadeColor > aShadeColors;
+ GetShadeColors( rManager, *this, rIn, aShadeColors );
+
+ if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
{
nFillFlags &= ~0x10;
}
@@ -1642,9 +1867,16 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
case mso_fillPicture : // Center a picture in the shape
eXFill = XFILL_BITMAP;
break;
- case mso_fillShadeShape : // Shade from shape outline to end point
- case mso_fillShade : // Shade from start to end points
case mso_fillShadeCenter : // Shade from bounding rectangle to end point
+ {
+ if ( rObjData.aBoundRect.IsEmpty() )// size of object needed to be able
+ eXFill = XFILL_GRADIENT; // to create a bitmap substitution
+ else
+ eXFill = XFILL_BITMAP;
+ }
+ break;
+ case mso_fillShade : // Shade from start to end points
+ case mso_fillShadeShape : // Shade from shape outline to end point
case mso_fillShadeScale : // Similar to mso_fillShade, but the fillAngle
case mso_fillShadeTitle : // special type - shade to title --- for PP
eXFill = XFILL_GRADIENT;
@@ -1662,7 +1894,11 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
sal_uInt16(100 - ::rtl::math::round(nTrans))));
}
- if ( eXFill == XFILL_GRADIENT )
+ if ( ( eMSO_FillType == mso_fillShadeCenter ) && ( eXFill == XFILL_BITMAP ) )
+ {
+ ApplyRectangularGradientAsBitmap( rManager, rIn, rSet, aShadeColors, rObjData, mnFix16Angle );
+ }
+ else if ( eXFill == XFILL_GRADIENT )
{
sal_Int32 nAngle = 3600 - ( ( Fix16ToAngle( GetPropertyValue( DFF_Prop_fillAngle, 0 ) ) + 5 ) / 10 );
@@ -1676,12 +1912,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
XGradientStyle eGrad = XGRAD_LINEAR;
sal_Int32 nChgColors = 0;
- if ( !nAngle )
- nChgColors ^= 1;
-
- if ( !nFocus )
- nChgColors ^= 1;
- else if ( nFocus < 0 ) // Bei negativem Focus sind die Farben zu tauschen
+ if ( nFocus < 0 ) // Bei negativem Focus sind die Farben zu tauschen
{
nFocus =- nFocus;
nChgColors ^= 1;
@@ -1689,8 +1920,8 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
if( nFocus > 40 && nFocus < 60 )
{
eGrad = XGRAD_AXIAL; // Besser gehts leider nicht
- nChgColors ^= 1;
}
+
USHORT nFocusX = (USHORT)nFocus;
USHORT nFocusY = (USHORT)nFocus;
@@ -1722,9 +1953,6 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
aCol1 = aCol2;
aCol2 = aZwi;
}
- if ( ( eShapeType == mso_sptEllipse ) && ( eMSO_FillType == mso_fillShadeShape ) )
- eGrad = XGRAD_ELLIPTICAL;
-
XGradient aGrad( aCol2, aCol1, eGrad, nAngle, nFocusX, nFocusY );
aGrad.SetStartIntens( 100 );
aGrad.SetEndIntens( 100 );
@@ -1936,7 +2164,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const
// rSet.Put( SdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) );
}
-void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, const MSO_SPT eShapeType, const sal_uInt32 /* nShapeFlags */ ) const
+void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const
{
sal_uInt32 nAdjustmentsWhichNeedsToBeConverted = 0;
@@ -1960,7 +2188,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
/////////////////////////////////////////////////////////////////////
const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) );
aProp.Name = sType;
- aProp.Value <<= EnhancedCustomShapeTypeNames::Get( eShapeType );
+ aProp.Value <<= EnhancedCustomShapeTypeNames::Get( rObjData.eShapeType );
aPropVec.push_back( aProp );
/*
@@ -2568,7 +2796,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
}
else
{
- const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType );
+ const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( rObjData.eShapeType );
if ( pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles )
{
sal_Int32 i, nCnt = pDefCustomShape->nHandles;
@@ -2902,7 +3130,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
else
{
bTextPathFitShape = true;
- switch( eShapeType )
+ switch( rObjData.eShapeType )
{
case mso_sptTextArchUpCurve :
case mso_sptTextArchDownCurve :
@@ -2994,10 +3222,20 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
rSet.Put( SdrCustomShapeGeometryItem( aSeq ) );
}
-void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const MSO_SPT eShapeType, const sal_uInt32 nShapeFlags ) const
+void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const
+{
+ Rectangle aEmptyRect;
+ DffRecordHeader aHdTemp;
+ DffObjData aDffObjTemp( aHdTemp, aEmptyRect, 0 );
+ ApplyAttributes( rIn, rSet, aDffObjTemp );
+}
+
+void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const
{
// MapUnit eMap( rManager.GetModel()->GetScaleUnit() );
+ sal_Bool bHasShadow = sal_False;
+
for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() )
{
UINT32 nRecType = GetCurKey();
@@ -3069,8 +3307,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
break;
case DFF_Prop_fshadowObscured :
{
- sal_Bool bHasShadow = ( nContent & 2 ) != 0;
- rSet.Put( SdrShadowItem( bHasShadow ) );
+ bHasShadow = ( nContent & 2 ) != 0;
if ( bHasShadow )
{
if ( !IsProperty( DFF_Prop_shadowOffsetX ) )
@@ -3083,15 +3320,50 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
}
}
- ApplyLineAttributes( rSet, eShapeType ); // #i28269#
- ApplyFillAttributes( rIn, rSet, eShapeType );
- if ( rManager.GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_IMPORT_IAS )
+ if ( bHasShadow )
{
- if ( eShapeType != mso_sptNil )
- {
- ApplyCustomShapeGeometryAttributes( rIn, rSet, eShapeType, nShapeFlags );
- ApplyCustomShapeTextAttributes( rSet );
+ // #160376# sj: activating shadow only if fill and or linestyle is used
+ // this is required because of the latest drawing layer core changes.
+ // Issue i104085 is related to this.
+ UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
+ if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType ))
+ nLineFlags &= ~0x08;
+ UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
+ if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
+ nFillFlags &= ~0x10;
+ if ( nFillFlags & 0x10 )
+ {
+ MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid );
+ switch( eMSO_FillType )
+ {
+ case mso_fillSolid :
+ case mso_fillPattern :
+ case mso_fillTexture :
+ case mso_fillPicture :
+ case mso_fillShade :
+ case mso_fillShadeCenter :
+ case mso_fillShadeShape :
+ case mso_fillShadeScale :
+ case mso_fillShadeTitle :
+ break;
+ // case mso_fillBackground :
+ default:
+ nFillFlags &=~0x10; // no fillstyle used
+ break;
+ }
}
+ if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) ) // if there is no fillstyle and linestyle
+ bHasShadow = sal_False; // we are turning shadow off.
+
+ if ( bHasShadow )
+ rSet.Put( SdrShadowItem( bHasShadow ) );
+ }
+ ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269#
+ ApplyFillAttributes( rIn, rSet, rObjData );
+ if ( rObjData.eShapeType != mso_sptNil )
+ {
+ ApplyCustomShapeGeometryAttributes( rIn, rSet, rObjData );
+ ApplyCustomShapeTextAttributes( rSet );
}
}
@@ -3537,16 +3809,43 @@ FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor
return TRUE;
}
+// sj: the documentation is not complete, especially in ppt the normal rgb for text
+// color is written as 0xfeRRGGBB, this can't be explained by the documentation, nearly
+// every bit in the upper code is set -> so there seems to be a special handling for
+// ppt text colors, i decided not to fix this in MSO_CLR_ToColor because of possible
+// side effects, instead MSO_TEXT_CLR_ToColor is called for PPT text colors, to map
+// the color code to something that behaves like the other standard color codes used by
+// fill and line color
+Color SvxMSDffManager::MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const
+{
+ // Fuer Textfarben: Header ist 0xfeRRGGBB
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
+ nColorCode &= 0x00ffffff;
+ else
+ {
+ // for colorscheme colors the color index are the lower three bits of the upper byte
+ if ( ( nColorCode & 0xf8000000 ) == 0 ) // this must be a colorscheme index
+ {
+ nColorCode >>= 24;
+ nColorCode |= 0x8000000;
+ }
+ }
+ return MSO_CLR_ToColor( nColorCode );
+}
Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const
{
Color aColor( mnDefaultColor );
// Fuer Textfarben: Header ist 0xfeRRGGBB
- if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
- nColorCode &= 0x00ffffff;
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) // sj: it needs to be checked if 0xfe is used in
+ nColorCode &= 0x00ffffff; // other cases than ppt text -> if not this code can be removed
sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 );
+
+ // sj: below change from 0x1b to 0x19 was done because of i84812 (0x02 -> rgb color),
+ // now I have some problems to fix i104685 (there the color value is 0x02000000 whichs requires
+ // a 0x2 scheme color to be displayed properly), the color docu seems to be incomplete
if( nUpper & 0x19 ) // if( nUpper & 0x1f )
{
if( ( nUpper & 0x08 ) || ( ( nUpper & 0x10 ) == 0 ) )
@@ -4206,7 +4505,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra
}
}
-SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, Rectangle& aBoundRect, const DffObjData& rObjData ) const
+SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, const DffObjData& rObjData ) const
{
SdrObject* pRet = NULL;
String aFilename;
@@ -4387,7 +4686,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, Rect
// TODO/LATER: in future probably the correct aspect should be provided here
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
// --> OD 2004-12-14 #i32596# - pass <nCalledByGroup> to method
- pRet = ImportOLE( GetPropertyValue( DFF_Prop_pictureId ), aGraf, aBoundRect, aVisArea, rObjData.nCalledByGroup, nAspect );
+ pRet = ImportOLE( GetPropertyValue( DFF_Prop_pictureId ), aGraf, rObjData.aBoundRect, aVisArea, rObjData.nCalledByGroup, nAspect );
// <--
}
if( !pRet )
@@ -4443,7 +4742,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, Rect
}
}
pRet->SetModel( pSdrModel ); // fuer GraphicLink erforderlich
- pRet->SetLogicRect( aBoundRect );
+ pRet->SetLogicRect( rObjData.aBoundRect );
if ( pRet->ISA( SdrGrafObj ) )
{
@@ -4516,13 +4815,13 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
if ( ( nGroupRotateAngle > 4500 && nGroupRotateAngle <= 13500 )
|| ( nGroupRotateAngle > 22500 && nGroupRotateAngle <= 31500 ) )
{
- sal_Int32 nHalfWidth = ( aGlobalChildRect.GetWidth() + 1 ) >> 1;
- sal_Int32 nHalfHeight = ( aGlobalChildRect.GetHeight() + 1 ) >> 1;
- Point aTopLeft( aGlobalChildRect.Left() + nHalfWidth - nHalfHeight,
- aGlobalChildRect.Top() + nHalfHeight - nHalfWidth );
- Size aNewSize( aGlobalChildRect.GetHeight(), aGlobalChildRect.GetWidth() );
+ sal_Int32 nHalfWidth = ( aClientRect.GetWidth() + 1 ) >> 1;
+ sal_Int32 nHalfHeight = ( aClientRect.GetHeight() + 1 ) >> 1;
+ Point aTopLeft( aClientRect.Left() + nHalfWidth - nHalfHeight,
+ aClientRect.Top() + nHalfHeight - nHalfWidth );
+ Size aNewSize( aClientRect.GetHeight(), aClientRect.GetWidth() );
Rectangle aNewRect( aTopLeft, aNewSize );
- aGlobalChildRect = aNewRect;
+ aClientRect = aNewRect;
}
// now importing the inner objects of the group
@@ -4593,8 +4892,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
*pShapeId = 0;
rHd.SeekToBegOfRecord( rSt );
- Rectangle aBoundRect( rClientRect );
- DffObjData aObjData( rHd, aBoundRect, nCalledByGroup );
+ DffObjData aObjData( rHd, rClientRect, nCalledByGroup );
maShapeRecords.Consume( rSt, FALSE );
aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp, SEEK_FROM_BEGINNING );
if ( aObjData.bShapeType )
@@ -4665,29 +4963,29 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
ProcessClientAnchor2( rSt, *maShapeRecords.Current(), pClientData, aObjData );
if ( aObjData.bChildAnchor )
- aBoundRect = aObjData.aChildAnchor;
+ aObjData.aBoundRect = aObjData.aChildAnchor;
if ( aObjData.nSpFlags & SP_FBACKGROUND )
- aBoundRect = Rectangle( Point(), Size( 1, 1 ) );
+ aObjData.aBoundRect = Rectangle( Point(), Size( 1, 1 ) );
Rectangle aTextRect;
- if ( !aBoundRect.IsEmpty() )
+ if ( !aObjData.aBoundRect.IsEmpty() )
{ // Rotation auf BoundingBox anwenden, BEVOR ien Objekt generiert wurde
if( mnFix16Angle )
{
long nAngle = mnFix16Angle;
if ( ( nAngle > 4500 && nAngle <= 13500 ) || ( nAngle > 22500 && nAngle <= 31500 ) )
{
- INT32 nHalfWidth = ( aBoundRect.GetWidth() + 1 ) >> 1;
- INT32 nHalfHeight = ( aBoundRect.GetHeight() + 1 ) >> 1;
- Point aTopLeft( aBoundRect.Left() + nHalfWidth - nHalfHeight,
- aBoundRect.Top() + nHalfHeight - nHalfWidth );
- Size aNewSize( aBoundRect.GetHeight(), aBoundRect.GetWidth() );
+ INT32 nHalfWidth = ( aObjData.aBoundRect.GetWidth() + 1 ) >> 1;
+ INT32 nHalfHeight = ( aObjData.aBoundRect.GetHeight() + 1 ) >> 1;
+ Point aTopLeft( aObjData.aBoundRect.Left() + nHalfWidth - nHalfHeight,
+ aObjData.aBoundRect.Top() + nHalfHeight - nHalfWidth );
+ Size aNewSize( aObjData.aBoundRect.GetHeight(), aObjData.aBoundRect.GetWidth() );
Rectangle aNewRect( aTopLeft, aNewSize );
- aBoundRect = aNewRect;
+ aObjData.aBoundRect = aNewRect;
}
}
- aTextRect = aBoundRect;
+ aTextRect = aObjData.aBoundRect;
FASTBOOL bGraphic = IsProperty( DFF_Prop_pib ) ||
IsProperty( DFF_Prop_pibName ) ||
IsProperty( DFF_Prop_pibFlags );
@@ -4700,7 +4998,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
to return this rectangle via rClientRect now, but only, if
caller has not passed an own bounding ractangle. */
if ( rClientRect.IsEmpty() )
- rClientRect = aBoundRect;
+ rClientRect = aObjData.aBoundRect;
nGroupShapeFlags = aObjData.nSpFlags; // #73013#
}
else if ( ( aObjData.eShapeType != mso_sptNil ) || IsProperty( DFF_Prop_pVertices ) || bGraphic )
@@ -4713,532 +5011,432 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
sal_uInt32 nSpFlags = aObjData.nSpFlags;
if ( bGraphic )
- pRet = ImportGraphic( rSt, aSet, aBoundRect, aObjData ); // SJ: #68396# is no longer true (fixed in ppt2000)
+ {
+ pRet = ImportGraphic( rSt, aSet, aObjData ); // SJ: #68396# is no longer true (fixed in ppt2000)
+ ApplyAttributes( rSt, aSet, aObjData );
+ pRet->SetMergedItemSet(aSet);
+ }
+ else if ( aObjData.eShapeType == mso_sptLine )
+ {
+ basegfx::B2DPolygon aPoly;
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
+ pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
+ pRet->SetModel( pSdrModel );
+ ApplyAttributes( rSt, aSet, aObjData );
+ pRet->SetMergedItemSet(aSet);
+ }
else
{
- // Check if we are using our new as shape type. This is done by
- // the PowerPoint import now. As result nearly each escher object
- // will be imported as customshape, this is also done in the case for
- // simple text objects.
- // The new shape is having the advantage to fully support wordwrapping
- // and autogrow size attributes.
-
- if ( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_IMPORT_IAS )
+ if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) )
{
- if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) )
- {
- ApplyAttributes( rSt, aSet, aObjData.eShapeType, aObjData.nSpFlags );
+ ApplyAttributes( rSt, aSet, aObjData );
// the com.sun.star.drawing.EnhancedCustomShapeEngine is default, so we do not need to set a hard attribute
// aSet.Put( SdrCustomShapeEngineItem( String::CreateFromAscii( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ) );
- pRet = new SdrObjCustomShape();
- pRet->SetModel( pSdrModel );
+ pRet = new SdrObjCustomShape();
+ pRet->SetModel( pSdrModel );
- sal_Bool bIsFontwork = ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x4000 ) != 0;
+ sal_Bool bIsFontwork = ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x4000 ) != 0;
+
+ // in case of a FontWork, the text is set by the escher import
+ if ( bIsFontwork )
+ {
+ String aObjectText;
+ String aFontName;
+ MSO_GeoTextAlign eGeoTextAlign;
- // in case of a FontWork, the text is set by the escher import
- if ( bIsFontwork )
+ if ( SeekToContent( DFF_Prop_gtextFont, rSt ) )
{
- String aObjectText;
- String aFontName;
- MSO_GeoTextAlign eGeoTextAlign;
+ SvxFontItem aLatin(EE_CHAR_FONTINFO), aAsian(EE_CHAR_FONTINFO_CJK), aComplex(EE_CHAR_FONTINFO_CTL);
+ GetDefaultFonts( aLatin, aAsian, aComplex );
+
+ MSDFFReadZString( rSt, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), TRUE );
+ aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
+ PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO ));
+ aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
+ PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CJK ) );
+ aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
+ PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CTL ) );
+ }
- if ( SeekToContent( DFF_Prop_gtextFont, rSt ) )
- {
- SvxFontItem aLatin(EE_CHAR_FONTINFO), aAsian(EE_CHAR_FONTINFO_CJK), aComplex(EE_CHAR_FONTINFO_CTL);
- GetDefaultFonts( aLatin, aAsian, aComplex );
-
- MSDFFReadZString( rSt, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), TRUE );
- aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
- PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO ));
- aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
- PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CJK ) );
- aSet.Put( SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
- PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO_CTL ) );
- }
+ // SJ: applying fontattributes for Fontwork :
+ if ( IsHardAttribute( DFF_Prop_gtextFItalic ) )
+ aSet.Put( SvxPostureItem( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x0010 ) != 0 ? ITALIC_NORMAL : ITALIC_NONE, EE_CHAR_ITALIC ) );
- // SJ: applying fontattributes for Fontwork :
- if ( IsHardAttribute( DFF_Prop_gtextFItalic ) )
- aSet.Put( SvxPostureItem( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x0010 ) != 0 ? ITALIC_NORMAL : ITALIC_NONE, EE_CHAR_ITALIC ) );
+ if ( IsHardAttribute( DFF_Prop_gtextFBold ) )
+ aSet.Put( SvxWeightItem( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x0020 ) != 0 ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
- if ( IsHardAttribute( DFF_Prop_gtextFBold ) )
- aSet.Put( SvxWeightItem( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x0020 ) != 0 ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
+ // SJ TODO: Vertical Writing is not correct, instead this should be
+ // replaced through "CharacterRotation" by 90°, therefore a new Item has to be
+ // supported by svx core, api and xml file format
+ ((SdrObjCustomShape*)pRet)->SetVerticalWriting( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 ) != 0 );
- // SJ TODO: Vertical Writing is not correct, instead this should be
- // replaced through "CharacterRotation" by 90°, therefore a new Item has to be
- // supported by svx core, api and xml file format
- ((SdrObjCustomShape*)pRet)->SetVerticalWriting( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 ) != 0 );
+ if ( SeekToContent( DFF_Prop_gtextUNICODE, rSt ) )
+ {
+ MSDFFReadZString( rSt, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), TRUE );
+ ReadObjText( aObjectText, pRet );
+ }
- if ( SeekToContent( DFF_Prop_gtextUNICODE, rSt ) )
+ eGeoTextAlign = ( (MSO_GeoTextAlign)GetPropertyValue( DFF_Prop_gtextAlign, mso_alignTextCenter ) );
+ {
+ SdrTextHorzAdjust eHorzAdjust;
+ switch( eGeoTextAlign )
{
- MSDFFReadZString( rSt, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), TRUE );
- ReadObjText( aObjectText, pRet );
+ case mso_alignTextLetterJust :
+ case mso_alignTextWordJust :
+ case mso_alignTextStretch : eHorzAdjust = SDRTEXTHORZADJUST_BLOCK; break;
+ default:
+ case mso_alignTextInvalid :
+ case mso_alignTextCenter : eHorzAdjust = SDRTEXTHORZADJUST_CENTER; break;
+ case mso_alignTextLeft : eHorzAdjust = SDRTEXTHORZADJUST_LEFT; break;
+ case mso_alignTextRight : eHorzAdjust = SDRTEXTHORZADJUST_RIGHT; break;
}
+ aSet.Put( SdrTextHorzAdjustItem( eHorzAdjust ) );
- eGeoTextAlign = ( (MSO_GeoTextAlign)GetPropertyValue( DFF_Prop_gtextAlign, mso_alignTextCenter ) );
- {
- SdrTextHorzAdjust eHorzAdjust;
- switch( eGeoTextAlign )
- {
- case mso_alignTextLetterJust :
- case mso_alignTextWordJust :
- case mso_alignTextStretch : eHorzAdjust = SDRTEXTHORZADJUST_BLOCK; break;
- default:
- case mso_alignTextInvalid :
- case mso_alignTextCenter : eHorzAdjust = SDRTEXTHORZADJUST_CENTER; break;
- case mso_alignTextLeft : eHorzAdjust = SDRTEXTHORZADJUST_LEFT; break;
- case mso_alignTextRight : eHorzAdjust = SDRTEXTHORZADJUST_RIGHT; break;
- }
- aSet.Put( SdrTextHorzAdjustItem( eHorzAdjust ) );
-
- SdrFitToSizeType eFTS = SDRTEXTFIT_NONE;
- if ( eGeoTextAlign == mso_alignTextStretch )
- eFTS = SDRTEXTFIT_ALLLINES;
- aSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
- }
- if ( IsProperty( DFF_Prop_gtextSpacing ) )
- {
- sal_Int32 nTextWidth = GetPropertyValue( DFF_Prop_gtextSpacing, 100 < 16 ) / 655;
- if ( nTextWidth != 100 )
- aSet.Put( SvxCharScaleWidthItem( (sal_uInt16)nTextWidth, EE_CHAR_FONTWIDTH ) );
- }
- if ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x1000 ) // SJ: Font Kerning On ?
- aSet.Put( SvxKerningItem( 1, EE_CHAR_KERNING ) );
+ SdrFitToSizeType eFTS = SDRTEXTFIT_NONE;
+ if ( eGeoTextAlign == mso_alignTextStretch )
+ eFTS = SDRTEXTFIT_ALLLINES;
+ aSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
}
- pRet->SetMergedItemSet( aSet );
+ if ( IsProperty( DFF_Prop_gtextSpacing ) )
+ {
+ sal_Int32 nTextWidth = GetPropertyValue( DFF_Prop_gtextSpacing, 100 < 16 ) / 655;
+ if ( nTextWidth != 100 )
+ aSet.Put( SvxCharScaleWidthItem( (sal_uInt16)nTextWidth, EE_CHAR_FONTWIDTH ) );
+ }
+ if ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x1000 ) // SJ: Font Kerning On ?
+ aSet.Put( SvxKerningItem( 1, EE_CHAR_KERNING ) );
+ }
+ pRet->SetMergedItemSet( aSet );
- // sj: taking care of rtl, ltr. In case of fontwork mso. seems not to be able to set
- // proper text directions, instead the text default is depending to the string.
- // so we have to calculate the a text direction from string:
- if ( bIsFontwork )
+ // sj: taking care of rtl, ltr. In case of fontwork mso. seems not to be able to set
+ // proper text directions, instead the text default is depending to the string.
+ // so we have to calculate the a text direction from string:
+ if ( bIsFontwork )
+ {
+ OutlinerParaObject* pParaObj = ((SdrObjCustomShape*)pRet)->GetOutlinerParaObject();
+ if ( pParaObj )
{
- OutlinerParaObject* pParaObj = ((SdrObjCustomShape*)pRet)->GetOutlinerParaObject();
- if ( pParaObj )
+ SdrOutliner& rOutliner = ((SdrObjCustomShape*)pRet)->ImpGetDrawOutliner();
+ BOOL bOldUpdateMode = rOutliner.GetUpdateMode();
+ SdrModel* pModel = pRet->GetModel();
+ if ( pModel )
+ rOutliner.SetStyleSheetPool( (SfxStyleSheetPool*)pModel->GetStyleSheetPool() );
+ rOutliner.SetUpdateMode( FALSE );
+ rOutliner.SetText( *pParaObj );
+ VirtualDevice aVirDev( 1 );
+ aVirDev.SetMapMode( MAP_100TH_MM );
+ sal_uInt32 i, nParagraphs = rOutliner.GetParagraphCount();
+ if ( nParagraphs )
{
- SdrOutliner& rOutliner = ((SdrObjCustomShape*)pRet)->ImpGetDrawOutliner();
- BOOL bOldUpdateMode = rOutliner.GetUpdateMode();
- SdrModel* pModel = pRet->GetModel();
- if ( pModel )
- rOutliner.SetStyleSheetPool( (SfxStyleSheetPool*)pModel->GetStyleSheetPool() );
- rOutliner.SetUpdateMode( FALSE );
- rOutliner.SetText( *pParaObj );
- VirtualDevice aVirDev( 1 );
- aVirDev.SetMapMode( MAP_100TH_MM );
- sal_uInt32 i, nParagraphs = rOutliner.GetParagraphCount();
- if ( nParagraphs )
+ sal_Bool bCreateNewParaObject = sal_False;
+ for ( i = 0; i < nParagraphs; i++ )
{
- sal_Bool bCreateNewParaObject = sal_False;
- for ( i = 0; i < nParagraphs; i++ )
- {
- BOOL bIsRTL = aVirDev.GetTextIsRTL( rOutliner.GetText( rOutliner.GetParagraph( i ) ), 0, STRING_LEN );
- if ( bIsRTL )
- {
- SfxItemSet aSet2( rOutliner.GetParaAttribs( (USHORT)i ) );
- aSet2.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
- rOutliner.SetParaAttribs( (USHORT)i, aSet2 );
- bCreateNewParaObject = sal_True;
- }
- }
- if ( bCreateNewParaObject )
+ BOOL bIsRTL = aVirDev.GetTextIsRTL( rOutliner.GetText( rOutliner.GetParagraph( i ) ), 0, STRING_LEN );
+ if ( bIsRTL )
{
- OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
- rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
- ((SdrObjCustomShape*)pRet)->NbcSetOutlinerParaObject( pNewText );
+ SfxItemSet aSet2( rOutliner.GetParaAttribs( (USHORT)i ) );
+ aSet2.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
+ rOutliner.SetParaAttribs( (USHORT)i, aSet2 );
+ bCreateNewParaObject = sal_True;
}
}
- rOutliner.Clear();
- rOutliner.SetUpdateMode( bOldUpdateMode );
+ if ( bCreateNewParaObject )
+ {
+ OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
+ rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
+ ((SdrObjCustomShape*)pRet)->NbcSetOutlinerParaObject( pNewText );
+ }
}
+ rOutliner.Clear();
+ rOutliner.SetUpdateMode( bOldUpdateMode );
}
+ }
- // mso_sptArc special treating:
- // sj: since we actually can't render the arc because of its weird SnapRect settings,
- // we will create a new CustomShape, that can be saved/loaded without problems.
- // We will change the shape type, so this code applys only if importing arcs from msoffice.
- if ( aObjData.eShapeType == mso_sptArc )
+ // mso_sptArc special treating:
+ // sj: since we actually can't render the arc because of its weird SnapRect settings,
+ // we will create a new CustomShape, that can be saved/loaded without problems.
+ // We will change the shape type, so this code applys only if importing arcs from msoffice.
+ if ( aObjData.eShapeType == mso_sptArc )
+ {
+ const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) );
+ const rtl::OUString sCoordinates( RTL_CONSTASCII_USTRINGPARAM ( "Coordinates" ) );
+ const rtl::OUString sHandles( RTL_CONSTASCII_USTRINGPARAM ( "Handles" ) );
+ const rtl::OUString sEquations( RTL_CONSTASCII_USTRINGPARAM ( "Equations" ) );
+ const rtl::OUString sViewBox( RTL_CONSTASCII_USTRINGPARAM ( "ViewBox" ) );
+ const rtl::OUString sPath( RTL_CONSTASCII_USTRINGPARAM ( "Path" ) );
+ const rtl::OUString sTextFrames( RTL_CONSTASCII_USTRINGPARAM ( "TextFrames" ) );
+ SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair> seqCoordinates;
+ com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > seqAdjustmentValues;
+
+ // before clearing the GeometryItem we have to store the current Coordinates
+ const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sPath, sCoordinates );
+ Rectangle aPolyBoundRect;
+ if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) )
{
- const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) );
- const rtl::OUString sCoordinates( RTL_CONSTASCII_USTRINGPARAM ( "Coordinates" ) );
- const rtl::OUString sHandles( RTL_CONSTASCII_USTRINGPARAM ( "Handles" ) );
- const rtl::OUString sEquations( RTL_CONSTASCII_USTRINGPARAM ( "Equations" ) );
- const rtl::OUString sViewBox( RTL_CONSTASCII_USTRINGPARAM ( "ViewBox" ) );
- const rtl::OUString sPath( RTL_CONSTASCII_USTRINGPARAM ( "Path" ) );
- const rtl::OUString sTextFrames( RTL_CONSTASCII_USTRINGPARAM ( "TextFrames" ) );
- SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
- com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair> seqCoordinates;
- com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > seqAdjustmentValues;
-
- // before clearing the GeometryItem we have to store the current Coordinates
- const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sPath, sCoordinates );
- Rectangle aPolyBoundRect;
- if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) )
- {
- sal_Int32 nPtNum, nNumElemVert = seqCoordinates.getLength();
- XPolygon aXP( (sal_uInt16)nNumElemVert );
+ sal_Int32 nPtNum, nNumElemVert = seqCoordinates.getLength();
+ XPolygon aXP( (sal_uInt16)nNumElemVert );
// const EnhancedCustomShapeParameterPair* pTmp = seqCoordinates.getArray();
- for ( nPtNum = 0; nPtNum < nNumElemVert; nPtNum++ )
- {
- Point aP;
- sal_Int32 nX = 0, nY = 0;
- seqCoordinates[ nPtNum ].First.Value >>= nX;
- seqCoordinates[ nPtNum ].Second.Value >>= nY;
- aP.X() = nX;
- aP.Y() = nY;
- aXP[ (sal_uInt16)nPtNum ] = aP;
- }
- aPolyBoundRect = Rectangle( aXP.GetBoundRect() );
+ for ( nPtNum = 0; nPtNum < nNumElemVert; nPtNum++ )
+ {
+ Point aP;
+ sal_Int32 nX = 0, nY = 0;
+ seqCoordinates[ nPtNum ].First.Value >>= nX;
+ seqCoordinates[ nPtNum ].Second.Value >>= nY;
+ aP.X() = nX;
+ aP.Y() = nY;
+ aXP[ (sal_uInt16)nPtNum ] = aP;
+ }
+ aPolyBoundRect = Rectangle( aXP.GetBoundRect() );
+ }
+ else
+ aPolyBoundRect = Rectangle( -21600, 0, 21600, 43200 ); // defaulting
+
+ // clearing items, so MergeDefaultAttributes will set the corresponding defaults from EnhancedCustomShapeGeometry
+ aGeometryItem.ClearPropertyValue( sHandles );
+ aGeometryItem.ClearPropertyValue( sEquations );
+ aGeometryItem.ClearPropertyValue( sViewBox );
+ aGeometryItem.ClearPropertyValue( sPath );
+
+ sal_Int32 nEndAngle = 9000;
+ sal_Int32 nStartAngle = 0;
+ pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sAdjustmentValues );
+ if ( pAny && ( *pAny >>= seqAdjustmentValues ) && seqAdjustmentValues.getLength() > 1 )
+ {
+ double fNumber;
+ if ( seqAdjustmentValues[ 0 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE )
+ {
+ seqAdjustmentValues[ 0 ].Value >>= fNumber;
+ nEndAngle = NormAngle360( - (sal_Int32)fNumber * 100 );
}
else
- aPolyBoundRect = Rectangle( -21600, 0, 21600, 43200 ); // defaulting
-
- // clearing items, so MergeDefaultAttributes will set the corresponding defaults from EnhancedCustomShapeGeometry
- aGeometryItem.ClearPropertyValue( sHandles );
- aGeometryItem.ClearPropertyValue( sEquations );
- aGeometryItem.ClearPropertyValue( sViewBox );
- aGeometryItem.ClearPropertyValue( sPath );
-
- sal_Int32 nEndAngle = 9000;
- sal_Int32 nStartAngle = 0;
- pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sAdjustmentValues );
- if ( pAny && ( *pAny >>= seqAdjustmentValues ) && seqAdjustmentValues.getLength() > 1 )
{
- double fNumber;
- if ( seqAdjustmentValues[ 0 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE )
- {
- seqAdjustmentValues[ 0 ].Value >>= fNumber;
- nEndAngle = NormAngle360( - (sal_Int32)fNumber * 100 );
- }
- else
- {
- fNumber = 270.0;
- seqAdjustmentValues[ 0 ].Value <<= fNumber;
- seqAdjustmentValues[ 0 ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE; // so this value will properly be stored
- }
-
- if ( seqAdjustmentValues[ 1 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE )
- {
- seqAdjustmentValues[ 1 ].Value >>= fNumber;
- nStartAngle = NormAngle360( - (sal_Int32)fNumber * 100 );
- }
- else
- {
- fNumber = 0.0;
- seqAdjustmentValues[ 0 ].Value <<= fNumber;
- seqAdjustmentValues[ 1 ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
- }
+ fNumber = 270.0;
+ seqAdjustmentValues[ 0 ].Value <<= fNumber;
+ seqAdjustmentValues[ 0 ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE; // so this value will properly be stored
+ }
- PropertyValue aPropVal;
- aPropVal.Name = sAdjustmentValues;
- aPropVal.Value <<= seqAdjustmentValues;
- aGeometryItem.SetPropertyValue( aPropVal ); // storing the angle attribute
+ if ( seqAdjustmentValues[ 1 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE )
+ {
+ seqAdjustmentValues[ 1 ].Value >>= fNumber;
+ nStartAngle = NormAngle360( - (sal_Int32)fNumber * 100 );
}
- if ( nStartAngle != nEndAngle )
+ else
{
- XPolygon aXPoly( aPolyBoundRect.Center(), aPolyBoundRect.GetWidth() / 2, aPolyBoundRect.GetHeight() / 2,
- (USHORT)nStartAngle / 10, (USHORT)nEndAngle / 10, TRUE );
- Rectangle aPolyPieRect( aXPoly.GetBoundRect() );
-
- double fYScale, fXScale;
- double fYOfs, fXOfs;
-
- Point aP( aBoundRect.Center() );
- Size aS( aBoundRect.GetSize() );
- aP.X() -= aS.Width() / 2;
- aP.Y() -= aS.Height() / 2;
- Rectangle aLogicRect( aP, aS );
-
- fYOfs = fXOfs = 0.0;
-
- if ( aPolyBoundRect.GetWidth() && aPolyPieRect.GetWidth() )
- {
- fXScale = (double)aLogicRect.GetWidth() / (double)aPolyPieRect.GetWidth();
- if ( nSpFlags & SP_FFLIPH )
- fXOfs = ( (double)aPolyPieRect.Right() - (double)aPolyBoundRect.Right() ) * fXScale;
- else
- fXOfs = ( (double)aPolyBoundRect.Left() - (double)aPolyPieRect.Left() ) * fXScale;
- }
- if ( aPolyBoundRect.GetHeight() && aPolyPieRect.GetHeight() )
- {
- fYScale = (double)aLogicRect.GetHeight() / (double)aPolyPieRect.GetHeight();
- if ( nSpFlags & SP_FFLIPV )
- fYOfs = ( (double)aPolyPieRect.Bottom() - (double)aPolyBoundRect.Bottom() ) * fYScale;
- else
- fYOfs = ((double)aPolyBoundRect.Top() - (double)aPolyPieRect.Top() ) * fYScale;
- }
-
- fXScale = (double)aPolyBoundRect.GetWidth() / (double)aPolyPieRect.GetWidth();
- fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight();
-
- Rectangle aOldBoundRect( aBoundRect );
- aBoundRect = Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ),
- Size( (sal_Int32)( aLogicRect.GetWidth() * fXScale ), (sal_Int32)( aLogicRect.GetHeight() * fYScale ) ) );
-
- // creating the text frame -> scaling into (0,0),(21600,21600) destination coordinate system
- double fTextFrameScaleX = (double)21600 / (double)aPolyBoundRect.GetWidth();
- double fTextFrameScaleY = (double)21600 / (double)aPolyBoundRect.GetHeight();
- sal_Int32 nLeft = (sal_Int32)(( aPolyPieRect.Left() - aPolyBoundRect.Left() ) * fTextFrameScaleX );
- sal_Int32 nTop = (sal_Int32)(( aPolyPieRect.Top() - aPolyBoundRect.Top() ) * fTextFrameScaleY );
- sal_Int32 nRight = (sal_Int32)(( aPolyPieRect.Right() - aPolyBoundRect.Left() ) * fTextFrameScaleX );
- sal_Int32 nBottom= (sal_Int32)(( aPolyPieRect.Bottom()- aPolyBoundRect.Top() ) * fTextFrameScaleY );
- com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrame( 1 );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].TopLeft.First, nLeft );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].TopLeft.Second, nTop );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.First, nRight );
- EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.Second,nBottom );
- PropertyValue aProp;
- aProp.Name = sTextFrames;
- aProp.Value <<= aTextFrame;
- aGeometryItem.SetPropertyValue( sPath, aProp );
-
- // sj: taking care of the different rotation points, since the new arc is having a bigger snaprect
- if ( mnFix16Angle )
- {
- sal_Int32 nAngle = mnFix16Angle;
- if ( nSpFlags & SP_FFLIPH )
- nAngle = 36000 - nAngle;
- if ( nSpFlags & SP_FFLIPV )
- nAngle = -nAngle;
- double a = nAngle * F_PI18000;
- double ss = sin( a );
- double cc = cos( a );
- Point aP1( aOldBoundRect.TopLeft() );
- Point aC1( aBoundRect.Center() );
- Point aP2( aOldBoundRect.TopLeft() );
- Point aC2( aOldBoundRect.Center() );
- RotatePoint( aP1, aC1, ss, cc );
- RotatePoint( aP2, aC2, ss, cc );
- aBoundRect.Move( aP2.X() - aP1.X(), aP2.Y() - aP1.Y() );
- }
+ fNumber = 0.0;
+ seqAdjustmentValues[ 0 ].Value <<= fNumber;
+ seqAdjustmentValues[ 1 ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
}
- ((SdrObjCustomShape*)pRet)->SetMergedItem( aGeometryItem );
- ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
- // now setting a new name, so the above correction is only done once when importing from ms
- SdrCustomShapeGeometryItem aGeoName( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
- const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) );
- const rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM ( "mso-spt100" ) );
PropertyValue aPropVal;
- aPropVal.Name = sType;
- aPropVal.Value <<= sName;
- aGeoName.SetPropertyValue( aPropVal );
- ((SdrObjCustomShape*)pRet)->SetMergedItem( aGeoName );
+ aPropVal.Name = sAdjustmentValues;
+ aPropVal.Value <<= seqAdjustmentValues;
+ aGeometryItem.SetPropertyValue( aPropVal ); // storing the angle attribute
}
- else
- ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
+ if ( nStartAngle != nEndAngle )
+ {
+ XPolygon aXPoly( aPolyBoundRect.Center(), aPolyBoundRect.GetWidth() / 2, aPolyBoundRect.GetHeight() / 2,
+ (USHORT)nStartAngle / 10, (USHORT)nEndAngle / 10, TRUE );
+ Rectangle aPolyPieRect( aXPoly.GetBoundRect() );
- pRet->SetSnapRect( aBoundRect );
- EnhancedCustomShape2d aCustomShape2d( pRet );
- aTextRect = aCustomShape2d.GetTextRect();
+ double fYScale, fXScale;
+ double fYOfs, fXOfs;
- bIsCustomShape = TRUE;
+ Point aP( aObjData.aBoundRect.Center() );
+ Size aS( aObjData.aBoundRect.GetSize() );
+ aP.X() -= aS.Width() / 2;
+ aP.Y() -= aS.Height() / 2;
+ Rectangle aLogicRect( aP, aS );
- if( bIsConnector )
- {
- if( nObjectRotation )
+ fYOfs = fXOfs = 0.0;
+
+ if ( aPolyBoundRect.GetWidth() && aPolyPieRect.GetWidth() )
{
- double a = nObjectRotation * nPi180;
- pRet->NbcRotate( aBoundRect.Center(), nObjectRotation, sin( a ), cos( a ) );
+ fXScale = (double)aLogicRect.GetWidth() / (double)aPolyPieRect.GetWidth();
+ if ( nSpFlags & SP_FFLIPH )
+ fXOfs = ( (double)aPolyPieRect.Right() - (double)aPolyBoundRect.Right() ) * fXScale;
+ else
+ fXOfs = ( (double)aPolyBoundRect.Left() - (double)aPolyPieRect.Left() ) * fXScale;
}
- // Horizontal gespiegelt?
- if ( nSpFlags & SP_FFLIPH )
+ if ( aPolyBoundRect.GetHeight() && aPolyPieRect.GetHeight() )
{
- Rectangle aBndRect( pRet->GetSnapRect() );
- Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() );
- Point aBottom( aTop.X(), aTop.Y() + 1000 );
- pRet->NbcMirror( aTop, aBottom );
+ fYScale = (double)aLogicRect.GetHeight() / (double)aPolyPieRect.GetHeight();
+ if ( nSpFlags & SP_FFLIPV )
+ fYOfs = ( (double)aPolyPieRect.Bottom() - (double)aPolyBoundRect.Bottom() ) * fYScale;
+ else
+ fYOfs = ((double)aPolyBoundRect.Top() - (double)aPolyPieRect.Top() ) * fYScale;
}
- // Vertikal gespiegelt?
- if ( nSpFlags & SP_FFLIPV )
+
+ fXScale = (double)aPolyBoundRect.GetWidth() / (double)aPolyPieRect.GetWidth();
+ fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight();
+
+ Rectangle aOldBoundRect( aObjData.aBoundRect );
+ aObjData.aBoundRect = Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ),
+ Size( (sal_Int32)( aLogicRect.GetWidth() * fXScale ), (sal_Int32)( aLogicRect.GetHeight() * fYScale ) ) );
+
+ // creating the text frame -> scaling into (0,0),(21600,21600) destination coordinate system
+ double fTextFrameScaleX = (double)21600 / (double)aPolyBoundRect.GetWidth();
+ double fTextFrameScaleY = (double)21600 / (double)aPolyBoundRect.GetHeight();
+ sal_Int32 nLeft = (sal_Int32)(( aPolyPieRect.Left() - aPolyBoundRect.Left() ) * fTextFrameScaleX );
+ sal_Int32 nTop = (sal_Int32)(( aPolyPieRect.Top() - aPolyBoundRect.Top() ) * fTextFrameScaleY );
+ sal_Int32 nRight = (sal_Int32)(( aPolyPieRect.Right() - aPolyBoundRect.Left() ) * fTextFrameScaleX );
+ sal_Int32 nBottom= (sal_Int32)(( aPolyPieRect.Bottom()- aPolyBoundRect.Top() ) * fTextFrameScaleY );
+ com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrame( 1 );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].TopLeft.First, nLeft );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].TopLeft.Second, nTop );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.First, nRight );
+ EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.Second,nBottom );
+ PropertyValue aProp;
+ aProp.Name = sTextFrames;
+ aProp.Value <<= aTextFrame;
+ aGeometryItem.SetPropertyValue( sPath, aProp );
+
+ // sj: taking care of the different rotation points, since the new arc is having a bigger snaprect
+ if ( mnFix16Angle )
{
- Rectangle aBndRect( pRet->GetSnapRect() );
- Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 );
- Point aRight( aLeft.X() + 1000, aLeft.Y() );
- pRet->NbcMirror( aLeft, aRight );
+ sal_Int32 nAngle = mnFix16Angle;
+ if ( nSpFlags & SP_FFLIPH )
+ nAngle = 36000 - nAngle;
+ if ( nSpFlags & SP_FFLIPV )
+ nAngle = -nAngle;
+ double a = nAngle * F_PI18000;
+ double ss = sin( a );
+ double cc = cos( a );
+ Point aP1( aOldBoundRect.TopLeft() );
+ Point aC1( aObjData.aBoundRect.Center() );
+ Point aP2( aOldBoundRect.TopLeft() );
+ Point aC2( aOldBoundRect.Center() );
+ RotatePoint( aP1, aC1, ss, cc );
+ RotatePoint( aP2, aC2, ss, cc );
+ aObjData.aBoundRect.Move( aP2.X() - aP1.X(), aP2.Y() - aP1.Y() );
}
- basegfx::B2DPolyPolygon aPoly( SdrObjCustomShape::GetLineGeometry( (SdrObjCustomShape*)pRet, sal_True ) );
- SdrObject::Free( pRet );
-
- pRet = new SdrEdgeObj();
- pRet->SetLogicRect(aBoundRect);
+ }
+ ((SdrObjCustomShape*)pRet)->SetMergedItem( aGeometryItem );
+ ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
+
+ // now setting a new name, so the above correction is only done once when importing from ms
+ SdrCustomShapeGeometryItem aGeoName( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) );
+ const rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM ( "mso-spt100" ) );
+ PropertyValue aPropVal;
+ aPropVal.Name = sType;
+ aPropVal.Value <<= sName;
+ aGeoName.SetPropertyValue( aPropVal );
+ ((SdrObjCustomShape*)pRet)->SetMergedItem( aGeoName );
+ }
+ else
+ ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
- // Konnektoren
- MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
+ pRet->SetSnapRect( aObjData.aBoundRect );
+ EnhancedCustomShape2d aCustomShape2d( pRet );
+ aTextRect = aCustomShape2d.GetTextRect();
- ((SdrEdgeObj*)pRet)->ConnectToNode(TRUE, NULL);
- ((SdrEdgeObj*)pRet)->ConnectToNode(FALSE, NULL);
+ bIsCustomShape = TRUE;
- Point aPoint1( aBoundRect.TopLeft() );
- Point aPoint2( aBoundRect.BottomRight() );
+ if( bIsConnector )
+ {
+ if( nObjectRotation )
+ {
+ double a = nObjectRotation * nPi180;
+ pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation, sin( a ), cos( a ) );
+ }
+ // Horizontal gespiegelt?
+ if ( nSpFlags & SP_FFLIPH )
+ {
+ Rectangle aBndRect( pRet->GetSnapRect() );
+ Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() );
+ Point aBottom( aTop.X(), aTop.Y() + 1000 );
+ pRet->NbcMirror( aTop, aBottom );
+ }
+ // Vertikal gespiegelt?
+ if ( nSpFlags & SP_FFLIPV )
+ {
+ Rectangle aBndRect( pRet->GetSnapRect() );
+ Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 );
+ Point aRight( aLeft.X() + 1000, aLeft.Y() );
+ pRet->NbcMirror( aLeft, aRight );
+ }
+ basegfx::B2DPolyPolygon aPoly( SdrObjCustomShape::GetLineGeometry( (SdrObjCustomShape*)pRet, sal_True ) );
+ SdrObject::Free( pRet );
- // Rotationen beachten
- if ( nObjectRotation )
- {
- double a = nObjectRotation * nPi180;
- Point aCenter( aBoundRect.Center() );
- double ss = sin(a);
- double cc = cos(a);
+ pRet = new SdrEdgeObj();
+ pRet->SetLogicRect( aObjData.aBoundRect );
- RotatePoint(aPoint1, aCenter, ss, cc);
- RotatePoint(aPoint2, aCenter, ss, cc);
- }
+ // Konnektoren
+ MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
- // Linie innerhalb des Bereiches zurechtdrehen/spiegeln
- if ( nSpFlags & SP_FFLIPH )
- {
- INT32 n = aPoint1.X();
- aPoint1.X() = aPoint2.X();
- aPoint2.X() = n;
- }
- if ( nSpFlags & SP_FFLIPV )
- {
- INT32 n = aPoint1.Y();
- aPoint1.Y() = aPoint2.Y();
- aPoint2.Y() = n;
- }
- nSpFlags &= ~( SP_FFLIPV | SP_FFLIPH );
+ ((SdrEdgeObj*)pRet)->ConnectToNode(TRUE, NULL);
+ ((SdrEdgeObj*)pRet)->ConnectToNode(FALSE, NULL);
- pRet->NbcSetPoint(aPoint1, 0L); // Startpunkt
- pRet->NbcSetPoint(aPoint2, 1L); // Endpunkt
+ Point aPoint1( aObjData.aBoundRect.TopLeft() );
+ Point aPoint2( aObjData.aBoundRect.BottomRight() );
- sal_Int32 n1HorzDist, n1VertDist, n2HorzDist, n2VertDist;
- n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 0;
- switch( eConnectorStyle )
- {
- case mso_cxstyleBent:
- {
- aSet.Put( SdrEdgeKindItem( SDREDGE_ORTHOLINES ) );
- n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 630;
- }
- break;
- case mso_cxstyleCurved:
- aSet.Put( SdrEdgeKindItem( SDREDGE_BEZIER ) );
- break;
- default: // mso_cxstyleStraight || mso_cxstyleNone
- aSet.Put( SdrEdgeKindItem( SDREDGE_ONELINE ) );
- break;
- }
- aSet.Put( SdrEdgeNode1HorzDistItem( n1HorzDist ) );
- aSet.Put( SdrEdgeNode1VertDistItem( n1VertDist ) );
- aSet.Put( SdrEdgeNode2HorzDistItem( n2HorzDist ) );
- aSet.Put( SdrEdgeNode2VertDistItem( n2VertDist ) );
+ // Rotationen beachten
+ if ( nObjectRotation )
+ {
+ double a = nObjectRotation * nPi180;
+ Point aCenter( aObjData.aBoundRect.Center() );
+ double ss = sin(a);
+ double cc = cos(a);
- ((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
+ RotatePoint(aPoint1, aCenter, ss, cc);
+ RotatePoint(aPoint2, aCenter, ss, cc);
}
- }
- }
- else
- {
- SvxMSDffCustomShape aCustomShape( *this, rSt, aObjData, aBoundRect, nObjectRotation, mpTracer );
- if ( !aCustomShape.IsEmpty() )
- {
- ApplyAttributes( rSt, aSet, aObjData.eShapeType, aObjData.nSpFlags );
- pRet = aCustomShape.GetObject( pSdrModel, aSet, TRUE );
- aTextRect = aCustomShape.GetTextRect();
- bIsCustomShape = TRUE;
- }
- }
- if ( !bIsCustomShape )
- {
- if ( aObjData.eShapeType == mso_sptTextBox )
- {
- if ( ( GetPropertyValue( DFF_Prop_fNoLineDrawDash ) & 8 )
- || ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 ) )
+
+ // Linie innerhalb des Bereiches zurechtdrehen/spiegeln
+ if ( nSpFlags & SP_FFLIPH )
{
- pRet = new SdrRectObj( aBoundRect ); // SJ: changed the type from OBJ_TEXT to OBJ_RECT (#88277#)
+ INT32 n = aPoint1.X();
+ aPoint1.X() = aPoint2.X();
+ aPoint2.X() = n;
}
- }
- else if ( ( ( aObjData.eShapeType >= mso_sptCallout1 ) && ( aObjData.eShapeType <= mso_sptAccentBorderCallout3 ) )
- || ( aObjData.eShapeType == mso_sptCallout90 )
- || ( aObjData.eShapeType == mso_sptAccentCallout90 )
- || ( aObjData.eShapeType == mso_sptBorderCallout90 )
- || ( aObjData.eShapeType == mso_sptAccentBorderCallout90 ) )
- {
- pRet = new SdrCaptionObj( aBoundRect );
- INT32 nAdjust0 = GetPropertyValue( DFF_Prop_adjustValue, 0 );
- INT32 nAdjust1 = GetPropertyValue( DFF_Prop_adjust2Value, 0 );
- if( nAdjust0 | nAdjust1 )
- { // AdjustValues anwenden, nur welche ?!?
- nAdjust0 = ( nAdjust0 * 100 ) / 850;
- nAdjust1 = ( nAdjust1 * 100 ) / 1275;
- Point aTailPos( nAdjust0 + aBoundRect.Left(), nAdjust1 + aBoundRect.Top() );
- ((SdrCaptionObj*)pRet)->NbcSetTailPos( aTailPos );
- }
- }
- else if( ( aObjData.eShapeType >= mso_sptTextPlainText ) && ( aObjData.eShapeType <= mso_sptTextCanDown ) ) // FontWork
- {
- aObjData.bIsAutoText = TRUE;
- if ( mbTracing )
- mpTracer->Trace( rtl::OUString::createFromAscii( "escher1000" ), rtl::OUString::valueOf( (sal_Int32)aObjData.eShapeType ) );
- pRet = ImportFontWork( rSt, aSet, aBoundRect );
- }
- else if ( aObjData.eShapeType == mso_sptLine )
- {
- basegfx::B2DPolygon aPoly;
- aPoly.append(basegfx::B2DPoint(aBoundRect.Left(), aBoundRect.Top()));
- aPoly.append(basegfx::B2DPoint(aBoundRect.Right(), aBoundRect.Bottom()));
- pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
- }
- else if ( ( (int)aObjData.eShapeType > (int)mso_sptRectangle ) && ( (int)aObjData.eShapeType < (int)mso_sptHostControl ) )
- {
- pRet = GetAutoForm( aObjData.eShapeType );
- if ( pRet )
+ if ( nSpFlags & SP_FFLIPV )
{
- mpTracer->Trace( rtl::OUString::createFromAscii( "escher1001" ), rtl::OUString::valueOf( (sal_Int32)aObjData.eShapeType ) );
- pRet->NbcSetSnapRect( aBoundRect ); // Groesse setzen
+ INT32 n = aPoint1.Y();
+ aPoint1.Y() = aPoint2.Y();
+ aPoint2.Y() = n;
}
- }
- }
- }
- if ( pRet )
- {
- if ( bIsConnector || !bIsCustomShape )
- {
- ApplyAttributes( rSt, aSet, aObjData.eShapeType, aObjData.nSpFlags );
- if ( !GetPropertyValue( DFF_Prop_gtextSize, 0 ) )
- aSet.Put( SvxFontHeightItem( ScalePt( 24 << 16 ), 100, EE_CHAR_FONTHEIGHT ) );
- if ( aObjData.eShapeType == mso_sptTextBox )
- aSet.Put( SdrTextMinFrameHeightItem( aBoundRect.GetHeight() ) );
- pRet->SetModel( pSdrModel );
- pRet->SetMergedItemSet(aSet);
- // Rotieren
- if ( pRet->ISA( SdrCaptionObj ) ) // sj: #96758# SetModel is changing
- pRet->SetSnapRect( aBoundRect ); // the original snaprect
- }
- // FillStyle != XFILL_NONE und nicht geschlossenes Polygon-Objekt?
- if( pRet->ISA( SdrPathObj ) )
- {
- XFillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem );
- if( eFillStyle != XFILL_NONE )
- {
- // Das Polygon des Objektes muss geschlossen werden
- if(!((SdrPathObj*)pRet)->IsClosed())
- ((SdrPathObj*)pRet)->ToggleClosed(); //0);
- }
- }
- // Handelt es sich um 3D?
- if( GetPropertyValue( DFF_Prop_fc3DLightFace ) & 8 )
- {
- // #81981# not all objects are effected by 3d effects
- if ( !bGraphic )
- {
- SdrObject* p3d = SvxMSDffCustomShape3D::Create3DObject( pRet, *this, aSet, aBoundRect, nSpFlags );
- if ( p3d )
+ nSpFlags &= ~( SP_FFLIPV | SP_FFLIPH );
+
+ pRet->NbcSetPoint(aPoint1, 0L); // Startpunkt
+ pRet->NbcSetPoint(aPoint2, 1L); // Endpunkt
+
+ sal_Int32 n1HorzDist, n1VertDist, n2HorzDist, n2VertDist;
+ n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 0;
+ switch( eConnectorStyle )
{
- nSpFlags &= ~( SP_FFLIPV | SP_FFLIPH );
- nObjectRotation = 0;
- SdrObject::Free( pRet );
- pRet = p3d;
+ case mso_cxstyleBent:
+ {
+ aSet.Put( SdrEdgeKindItem( SDREDGE_ORTHOLINES ) );
+ n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 630;
+ }
+ break;
+ case mso_cxstyleCurved:
+ aSet.Put( SdrEdgeKindItem( SDREDGE_BEZIER ) );
+ break;
+ default: // mso_cxstyleStraight || mso_cxstyleNone
+ aSet.Put( SdrEdgeKindItem( SDREDGE_ONELINE ) );
+ break;
}
+ aSet.Put( SdrEdgeNode1HorzDistItem( n1HorzDist ) );
+ aSet.Put( SdrEdgeNode1VertDistItem( n1VertDist ) );
+ aSet.Put( SdrEdgeNode2HorzDistItem( n2HorzDist ) );
+ aSet.Put( SdrEdgeNode2VertDistItem( n2VertDist ) );
+
+ ((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
}
}
}
+
if ( pRet )
{
- if( nObjectRotation /* && !bIsConnector */ )
+ if( nObjectRotation )
{
double a = nObjectRotation * nPi180;
- pRet->NbcRotate( aBoundRect.Center(), nObjectRotation, sin( a ), cos( a ) );
+ pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation, sin( a ), cos( a ) );
}
// Horizontal gespiegelt?
if ( nSpFlags & SP_FFLIPH )
@@ -5610,7 +5808,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
}
if( !pObj )
- ApplyAttributes( rSt, aSet, rObjData.eShapeType, rObjData.nSpFlags );
+ ApplyAttributes( rSt, aSet, rObjData );
bool bFitText = false;
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
@@ -5742,7 +5940,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if ( mnFix16Angle )
{
double a = mnFix16Angle * nPi180;
- pTextObj->NbcRotate( rObjData.rBoundRect.Center(), mnFix16Angle,
+ pTextObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle,
sin( a ), cos( a ) );
}
@@ -5774,7 +5972,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
pOrgObj = pObj;
pObj->SetModel( pSdrModel );
SfxItemSet aSet( pSdrModel->GetItemPool() );
- ApplyAttributes( rSt, aSet, rObjData.eShapeType, rObjData.nSpFlags );
+ ApplyAttributes( rSt, aSet, rObjData );
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
diff --git a/svx/source/msfilter/msocximex.cxx b/svx/source/msfilter/msocximex.cxx
index 7308bbf221eb..7db08e229536 100644
--- a/svx/source/msfilter/msocximex.cxx
+++ b/svx/source/msfilter/msocximex.cxx
@@ -623,7 +623,11 @@ class ContainerRecReader
pS->SeekRel( 4 );
// option flags
if( nContentFlags & 0x00000010 )
- pS->SeekRel( 4 );
+ {
+ sal_uInt32 nBitFlags = 0;
+ *pS >> nBitFlags;
+ rec.bVisible = ( ( nBitFlags & 0x02 ) == 0x02 );
+ }
// substream size
if( nContentFlags & 0x00000020 )
*pS >> rec.nSubStreamLen;
@@ -1212,6 +1216,13 @@ sal_Bool OCX_Control::Import(uno::Reference<container::XNameContainer> &rDialog
xPropSet->setPropertyValue(WW8_ASCII2STR("Step"), aTmp);
}
+ try
+ {
+ xPropSet->setPropertyValue(WW8_ASCII2STR("EnableVisible"), uno::makeAny( mbVisible ) );
+ }
+ catch( uno::Exception& )
+ {
+ }
return sal_True;
}
@@ -3612,6 +3623,7 @@ void OCX_ContainerControl::ProcessControl(OCX_Control* pControl,SvStorageStream*
// reflect the ms tabbing from orig MS UserForm, see below
pControl->mnTabPos = rec.nTabPos;
pControl->SetInDialog(true);
+ pControl->mbVisible = rec.bVisible;
if ( mnStep )
{
// If the container has a step then it should be
diff --git a/svx/source/msfilter/svxmsbas.cxx b/svx/source/msfilter/svxmsbas.cxx
index 17674c4254ca..48823640af61 100644
--- a/svx/source/msfilter/svxmsbas.cxx
+++ b/svx/source/msfilter/svxmsbas.cxx
@@ -403,53 +403,4 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
return bRet;
}
-ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto,
- const String& rStorageName )
-{
- ULONG nRet = ERRCODE_NONE;
- uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
- String aDstStgName( GetMSBasicStorageName() );
- SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName,
- STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL ) );
- if( xVBAStg.Is() && !xVBAStg->GetError() )
- {
- xVBAStg = 0;
- if( bSaveInto )
- {
- BasicManager *pBasicMan = rDocSh.GetBasicManager();
- if( pBasicMan && pBasicMan->IsBasicModified() )
- nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE;
-
- SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ );
- SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | STREAM_TRUNC );
- xSrc->CopyTo( xDst );
- xDst->Commit();
- ErrCode nError = xDst->GetError();
- if ( nError == ERRCODE_NONE )
- nError = xSrc->GetError();
- if ( nError != ERRCODE_NONE )
- xRoot->SetError( nError );
- }
- }
-
- return nRet;
-}
-
-// check if the MS-VBA-Storage exists in the RootStorage of the DocShell.
-// If it exists, then return the WarningId for losing the information.
-ULONG SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh)
-{
- uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
- SvStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(),
- STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL ));
- return ( xVBAStg.Is() && !xVBAStg->GetError() )
- ? ERRCODE_SVX_VBASIC_STORAGE_EXIST
- : ERRCODE_NONE;
-}
-
-String SvxImportMSVBasic::GetMSBasicStorageName()
-{
- return String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Macros" ) );
-}
-
/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/svx/source/msfilter/svxmsbas2.cxx b/svx/source/msfilter/svxmsbas2.cxx
new file mode 100644
index 000000000000..afd772bbd7e4
--- /dev/null
+++ b/svx/source/msfilter/svxmsbas2.cxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svxmsbas.cxx,v $
+ * $Revision: 1.24 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include <basic/basmgr.hxx>
+#include <sfx2/objsh.hxx>
+#include <svxerr.hxx>
+#include <svxmsbas.hxx>
+
+using namespace com::sun::star;
+
+ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto,
+ const String& rStorageName )
+{
+ ULONG nRet = ERRCODE_NONE;
+ uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
+ String aDstStgName( GetMSBasicStorageName() );
+ SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName,
+ STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL ) );
+ if( xVBAStg.Is() && !xVBAStg->GetError() )
+ {
+ xVBAStg = 0;
+ if( bSaveInto )
+ {
+ BasicManager *pBasicMan = rDocSh.GetBasicManager();
+ if( pBasicMan && pBasicMan->IsBasicModified() )
+ nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE;
+
+ SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ );
+ SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | STREAM_TRUNC );
+ xSrc->CopyTo( xDst );
+ xDst->Commit();
+ ErrCode nError = xDst->GetError();
+ if ( nError == ERRCODE_NONE )
+ nError = xSrc->GetError();
+ if ( nError != ERRCODE_NONE )
+ xRoot->SetError( nError );
+ }
+ }
+
+ return nRet;
+}
+
+// check if the MS-VBA-Storage exists in the RootStorage of the DocShell.
+// If it exists, then return the WarningId for losing the information.
+ULONG SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh)
+{
+ uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() );
+ SvStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(),
+ STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL ));
+ return ( xVBAStg.Is() && !xVBAStg->GetError() )
+ ? ERRCODE_SVX_VBASIC_STORAGE_EXIST
+ : ERRCODE_NONE;
+}
+
+String SvxImportMSVBasic::GetMSBasicStorageName()
+{
+ return String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Macros" ) );
+}
diff --git a/svx/source/options/makefile.mk b/svx/source/options/makefile.mk
index c4828b81f324..d68703983ebd 100644
--- a/svx/source/options/makefile.mk
+++ b/svx/source/options/makefile.mk
@@ -36,6 +36,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util\svxpch
PRJNAME=svx
TARGET=options
+LIBTARGET=NO
# --- Settings -----------------------------------------------------
@@ -62,39 +63,23 @@ SRC1FILES=\
optchart.src \
optimprove.src
-#EXCEPTIONSFILES=\
-# $(SLO)$/optasian.obj \
-# $(SLO)$/optlingu.obj \
-# $(SLO)$/optaccessibility.obj \
-# $(SLO)$/optsave.obj \
-# $(SLO)$/optpath.obj
-
-#SLOFILES=\
-# $(EXCEPTIONSFILES) \
-# $(SLO)$/asiancfg.obj \
-# $(SLO)$/htmlcfg.obj \
-# $(SLO)$/optcolor.obj \
-# $(SLO)$/optjsearch.obj \
-# $(SLO)$/optitems.obj \
-# $(SLO)$/optgenrl.obj \
-# $(SLO)$/adritem.obj \
-# $(SLO)$/optgrid.obj \
-# $(SLO)$/optinet2.obj \
-# $(SLO)$/optextbr.obj \
-# $(SLO)$/srchcfg.obj \
-# $(SLO)$/optctl.obj
-
EXCEPTIONSFILES=\
$(SLO)$/optlingu.obj
-SLOFILES=\
- $(EXCEPTIONSFILES) \
- $(SLO)$/asiancfg.obj \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
+ $(SLO)$/asiancfg.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/optlingu.obj \
$(SLO)$/htmlcfg.obj \
$(SLO)$/optitems.obj \
$(SLO)$/optgrid.obj \
$(SLO)$/srchcfg.obj
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
# --- Targets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/svx/source/options/optgenrl.src b/svx/source/options/optgenrl.src
index 52e031f1099f..cff6f8d4216c 100644
--- a/svx/source/options/optgenrl.src
+++ b/svx/source/options/optgenrl.src
@@ -74,6 +74,14 @@ TabPage RID_SFXPAGE_GENERAL
Hide = TRUE;
Text [ en-US ] = "Last Name/First name/Father's name/Initials";
};
+ FixedText FT_NAME_EASTERN
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Hide = TRUE;
+ Text [ en-US ] = "Last/First ~name/Initials" ;
+ };
Edit ED_FATHERNAME
{
Border = TRUE ;
diff --git a/svx/source/options/optimprove.src b/svx/source/options/optimprove.src
index 148d7391c905..86fc6d1c1a5d 100644
--- a/svx/source/options/optimprove.src
+++ b/svx/source/options/optimprove.src
@@ -87,7 +87,7 @@ TabPage RID_SVXPAGE_IMPROVEMENT
{
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 80 , 8 ) ;
- Text [ en-US ] = "Number of reports send:" ;
+ Text [ en-US ] = "Number of reports sent:" ;
};
FixedText FT_NR_REPORTS_VALUE
{
diff --git a/svx/source/options/optlingu.cxx b/svx/source/options/optlingu.cxx
index 89dbb08994c6..f4ed552d7d27 100644
--- a/svx/source/options/optlingu.cxx
+++ b/svx/source/options/optlingu.cxx
@@ -70,6 +70,7 @@
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <com/sun/star/system/XSystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
+#include <svtools/extendedsecurityoptions.hxx>
#include <svtools/svlbox.hxx>
#include <svtools/eitem.hxx>
#include <svtools/intitem.hxx>
@@ -1176,9 +1177,15 @@ SvxLinguTabPage::SvxLinguTabPage( Window* pParent,
aLinguOptionsCLB.SetSelectHdl( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
aLinguOptionsCLB.SetDoubleClickHdl(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl));
- aMoreDictsLink.SetURL( String(
- RTL_CONSTASCII_STRINGPARAM( "http://extensions.services.openoffice.org/dictionary?cid=926386" ) ) );
- aMoreDictsLink.SetClickHdl( LINK( this, SvxLinguTabPage, OpenURLHdl_Impl ) );
+ if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
+ != SvtExtendedSecurityOptions::OPEN_NEVER )
+ {
+ aMoreDictsLink.SetURL( String(
+ RTL_CONSTASCII_STRINGPARAM( "http://extensions.services.openoffice.org/dictionary?cid=926386" ) ) );
+ aMoreDictsLink.SetClickHdl( LINK( this, SvxLinguTabPage, OpenURLHdl_Impl ) );
+ }
+ else
+ aMoreDictsLink.Hide();
// force recalculation of hash value used for checking the need of updating
@@ -2017,10 +2024,14 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
aSize.Height() += nDeltaY;
aLinguOptionsCLB.SetSizePixel( aSize );
- aSize = GetOutputSizePixel();
- aSize.Height() += ( aMoreDictsLink.GetSizePixel().Height() * 11 / 8 );
- SetSizePixel( aSize );
- aMoreDictsLink.Show();
+ if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
+ != SvtExtendedSecurityOptions::OPEN_NEVER )
+ {
+ aSize = GetOutputSizePixel();
+ aSize.Height() += ( aMoreDictsLink.GetSizePixel().Height() * 11 / 8 );
+ SetSizePixel( aSize );
+ aMoreDictsLink.Show();
+ }
}
}
/*--------------------------------------------------
@@ -2064,9 +2075,21 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData)
aPrioUpPB .Enable( FALSE );
aPrioDownPB.Enable( FALSE );
- aMoreDictsLink.SetURL( String(
- RTL_CONSTASCII_STRINGPARAM( "http://extensions.services.openoffice.org/dictionary?cid=926386" ) ) );
- aMoreDictsLink.SetClickHdl( LINK( this, SvxEditModulesDlg, OpenURLHdl_Impl ) );
+ if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
+ != SvtExtendedSecurityOptions::OPEN_NEVER )
+ {
+ aMoreDictsLink.SetURL( String(
+ RTL_CONSTASCII_STRINGPARAM( "http://extensions.services.openoffice.org/dictionary?cid=926386" ) ) );
+ aMoreDictsLink.SetClickHdl( LINK( this, SvxEditModulesDlg, OpenURLHdl_Impl ) );
+ }
+ else
+ {
+ aMoreDictsLink.Hide();
+ long nPos = aMoreDictsLink.GetPosPixel().Y() + aMoreDictsLink.GetSizePixel().Height();
+ Size aSize = aModulesCLB.GetSizePixel();
+ aSize.Height() += ( nPos - ( aModulesCLB.GetPosPixel().Y() + aSize.Height() ) );
+ aModulesCLB.SetSizePixel( aSize );
+ }
//
//fill language box
diff --git a/svx/source/options/optsave.src b/svx/source/options/optsave.src
index afa1c4b6d0c8..374f53ef618f 100644
--- a/svx/source/options/optsave.src
+++ b/svx/source/options/optsave.src
@@ -149,8 +149,9 @@ TabPage RID_SFXPAGE_SAVE
DropDown = TRUE;
StringList [ en-US ] =
{
- < "1.0/1.1 (OpenOffice.org 2.x)" ; 2 ; > ;
- < "1.2 (recommended)" ; 3 ; > ;
+ < "1.0/1.1" ; 2 ; > ;
+ < "1.2" ; 4 ; > ;
+ < "1.2 Extended (recommended)"; 0x7fffffff ; > ;
};
};
CheckBox BTN_NOPRETTYPRINTING
@@ -219,7 +220,8 @@ TabPage RID_SFXPAGE_SAVE
Pos = MAP_APPFONT ( 23 , 169 ) ;
Size = MAP_APPFONT ( 239 , 8 ) ;
Hide = TRUE;
- Text [ en-US ] = "Not using ODF 1.2 may cause infomation to be lost.";
+ Text [ en-US ] = "Not using ODF 1.2 Extended may cause infomation to be lost.";
+ Text [ x-comment ] = "EN-US, the term 'extended' must not be translated.";
};
Image IMG_ODF_WARNING
{
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
index 19a92f91f4fc..fc144cf4304f 100644
--- a/svx/source/outliner/outliner.cxx
+++ b/svx/source/outliner/outliner.cxx
@@ -1519,15 +1519,15 @@ void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd )
// --> OD 2009-03-10 #i100014#
// assure that the following for-loop does not loop forever
- for ( ULONG n = nStart; n < nEnd; n++ )
+ for ( USHORT n = nStart; n < nEnd; n++ )
// <--
{
Paragraph* pPara = pParaList->GetParagraph( n );
- if (pPara)
- {
- pPara->Invalidate();
- ImplCalcBulletText( n, FALSE, FALSE );
- }
+ if (pPara)
+ {
+ pPara->Invalidate();
+ ImplCalcBulletText( n, FALSE, FALSE );
+ }
}
}
@@ -1867,6 +1867,20 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
return 0;
}
+static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 )
+{
+ if( rN1.GetNumberingType() != rN2.GetNumberingType() )
+ return false;
+
+ if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
+ return false;
+
+ if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
+ return false;
+
+ return true;
+}
+
sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt )
{
sal_uInt16 nNumber = pParaFmt->GetStart() - 1;
@@ -1879,8 +1893,8 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nDepth = pPara->GetDepth();
- // ignore paragraphs that are below our paragraph
- if( nDepth > nParaDepth )
+ // ignore paragraphs that are below our paragraph or have no numbering
+ if( (nDepth > nParaDepth) || (nDepth == -1) )
continue;
// stop on paragraphs that are above our paragraph
@@ -1888,8 +1902,13 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
break;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
- if( pFmt == 0 || (*pFmt != *pParaFmt) )
- break; // change in number format, stop here
+
+ if( pFmt == 0 )
+ continue; // ignore paragraphs without bullets
+
+ // check if numbering is the same
+ if( !isSameNumbering( *pFmt, *pParaFmt ) )
+ break;
const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
diff --git a/svx/source/outliner/outlobj.cxx b/svx/source/outliner/outlobj.cxx
index 1f2297bada6f..0e319ad1be81 100644
--- a/svx/source/outliner/outlobj.cxx
+++ b/svx/source/outliner/outlobj.cxx
@@ -61,7 +61,7 @@ public:
mbIsEditDoc(bIsEditDoc),
mnRefCount(0)
{
- if( (maParagraphDataVector.size() == 0) && (pEditTextObject->GetParagraphCount() != 0) )
+ if( (maParagraphDataVector.size() == 0) && (pEditTextObject->GetParagraphCount() != 0) )
maParagraphDataVector.resize(pEditTextObject->GetParagraphCount());
}
@@ -77,6 +77,12 @@ public:
&& maParagraphDataVector == rCandidate.maParagraphDataVector
&& mbIsEditDoc == rCandidate.mbIsEditDoc);
}
+
+ // #i102062#
+ bool isWrongListEqual(const ImplOutlinerParaObject& rCompare) const
+ {
+ return mpEditTextObject->isWrongListEqual(*rCompare.mpEditTextObject);
+ }
};
//////////////////////////////////////////////////////////////////////////////
@@ -147,6 +153,17 @@ bool OutlinerParaObject::operator==(const OutlinerParaObject& rCandidate) const
return (*rCandidate.mpImplOutlinerParaObject == *mpImplOutlinerParaObject);
}
+// #i102062#
+bool OutlinerParaObject::isWrongListEqual(const OutlinerParaObject& rCompare) const
+{
+ if(rCompare.mpImplOutlinerParaObject == mpImplOutlinerParaObject)
+ {
+ return true;
+ }
+
+ return mpImplOutlinerParaObject->isWrongListEqual(*rCompare.mpImplOutlinerParaObject);
+}
+
sal_uInt16 OutlinerParaObject::GetOutlinerMode() const
{
return mpImplOutlinerParaObject->mpEditTextObject->GetUserType();
diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx
index 102a0318bcb5..a69776df14e8 100644
--- a/svx/source/outliner/outlvw.cxx
+++ b/svx/source/outliner/outlvw.cxx
@@ -1010,6 +1010,14 @@ void OutlinerView::PasteSpecial()
pOwner->bPasting = TRUE;
pEditView->PasteSpecial();
+ if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ {
+ const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount();
+
+ for( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ pOwner->ImplSetLevelDependendStyleSheet( nPara );
+ }
+
pEditView->SetEditEngineUpdateMode( TRUE );
pOwner->UndoActionEnd( OLUNDO_INSERT );
pEditView->ShowCursor( TRUE, TRUE );
@@ -1635,3 +1643,15 @@ USHORT OutlinerView::GetSelectedScriptType() const
DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetSelectedScriptType();
}
+
+String OutlinerView::GetSurroundingText() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetSurroundingText();
+}
+
+Selection OutlinerView::GetSurroundingTextSelection() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetSurroundingTextSelection();
+}
diff --git a/svx/source/sdr/attribute/makefile.mk b/svx/source/sdr/attribute/makefile.mk
index adbd85f88d94..44e161a3b503 100644
--- a/svx/source/sdr/attribute/makefile.mk
+++ b/svx/source/sdr/attribute/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..$/..
PRJNAME=svx
TARGET=attribute
+ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -43,6 +44,8 @@ TARGET=attribute
SLOFILES=\
$(SLO)$/sdrallattribute.obj \
- $(SLO)$/sdrtextattribute.obj
+ $(SLO)$/sdrtextattribute.obj \
+ $(SLO)$/sdrformtextattribute.obj \
+ $(SLO)$/sdrformtextoutlineattribute.obj
.INCLUDE : target.mk
diff --git a/svx/source/sdr/attribute/sdrallattribute.cxx b/svx/source/sdr/attribute/sdrallattribute.cxx
index 6e9d312b8357..9eee8dbccce8 100644
--- a/svx/source/sdr/attribute/sdrallattribute.cxx
+++ b/svx/source/sdr/attribute/sdrallattribute.cxx
@@ -30,6 +30,7 @@
************************************************************************/
#include "precompiled_svx.hxx"
+
#include <svx/sdr/attribute/sdrallattribute.hxx>
#include <drawinglayer/attribute/sdrattribute.hxx>
#include <drawinglayer/attribute/fillattribute.hxx>
@@ -45,20 +46,20 @@ namespace drawinglayer
{
namespace attribute
{
- SdrShadowTextAttribute::SdrShadowTextAttribute(SdrShadowAttribute* pShadow, SdrTextAttribute* pTextAttribute)
+ SdrShadowTextAttribute::SdrShadowTextAttribute(
+ SdrShadowAttribute* pShadow,
+ SdrTextAttribute* pTextAttribute)
: mpShadow(pShadow),
mpTextAttribute(pTextAttribute)
{
}
- SdrShadowTextAttribute::SdrShadowTextAttribute(const SdrShadowTextAttribute& rCandidate)
- : mpShadow(0L),
- mpTextAttribute(0L)
+ SdrShadowTextAttribute::SdrShadowTextAttribute(
+ const SdrShadowTextAttribute& rCandidate)
+ : mpShadow(0),
+ mpTextAttribute(0)
{
- if(!(*this == rCandidate))
- {
- *this = rCandidate;
- }
+ *this = rCandidate;
}
SdrShadowTextAttribute::~SdrShadowTextAttribute()
@@ -72,14 +73,14 @@ namespace drawinglayer
// handle mpShadow
{
// delete local mpShadow if necessary
- if(mpShadow && ((!rCandidate.mpShadow) || (!(*mpShadow == *rCandidate.mpShadow))))
+ if(mpShadow)
{
delete mpShadow;
- mpShadow = 0L;
+ mpShadow = 0;
}
// copy mpShadow if necessary
- if(!mpShadow && rCandidate.mpShadow)
+ if(rCandidate.mpShadow)
{
mpShadow = new SdrShadowAttribute(*rCandidate.mpShadow);
}
@@ -88,14 +89,14 @@ namespace drawinglayer
// handle mpTextAttribute
{
// delete local mpTextAttribute if necessary
- if(mpTextAttribute && ((!rCandidate.mpTextAttribute) || (!(*mpTextAttribute == *rCandidate.mpTextAttribute))))
+ if(mpTextAttribute)
{
delete mpTextAttribute;
- mpTextAttribute = 0L;
+ mpTextAttribute = 0;
}
// copy mpTextAttribute if necessary
- if(!mpTextAttribute && rCandidate.mpTextAttribute)
+ if(rCandidate.mpTextAttribute)
{
mpTextAttribute = new SdrTextAttribute(*rCandidate.mpTextAttribute);
}
@@ -125,22 +126,23 @@ namespace drawinglayer
{
namespace attribute
{
- SdrFillTextAttribute::SdrFillTextAttribute(SdrFillAttribute* pFill, FillGradientAttribute* pFillFloatTransGradient, SdrTextAttribute* pTextAttribute)
+ SdrFillTextAttribute::SdrFillTextAttribute(
+ SdrFillAttribute* pFill,
+ FillGradientAttribute* pFillFloatTransGradient,
+ SdrTextAttribute* pTextAttribute)
: mpFill(pFill),
mpFillFloatTransGradient(pFillFloatTransGradient),
mpTextAttribute(pTextAttribute)
{
}
- SdrFillTextAttribute::SdrFillTextAttribute(const SdrFillTextAttribute& rCandidate)
+ SdrFillTextAttribute::SdrFillTextAttribute(
+ const SdrFillTextAttribute& rCandidate)
: mpFill(0),
mpFillFloatTransGradient(0),
mpTextAttribute(0)
{
- if(!(*this == rCandidate))
- {
- *this = rCandidate;
- }
+ *this = rCandidate;
}
SdrFillTextAttribute::~SdrFillTextAttribute()
@@ -155,14 +157,14 @@ namespace drawinglayer
// handle mpFill
{
// delete local mpFill if necessary
- if(mpFill && ((!rCandidate.mpFill) || (!(*mpFill == *rCandidate.mpFill))))
+ if(mpFill)
{
delete mpFill;
- mpFill = 0L;
+ mpFill = 0;
}
// copy mpFill if necessary
- if(!mpFill && rCandidate.mpFill)
+ if(rCandidate.mpFill)
{
mpFill = new attribute::SdrFillAttribute(*rCandidate.mpFill);
}
@@ -171,14 +173,14 @@ namespace drawinglayer
// handle mpFillFloatTransGradient
{
// delete local mpFillFloatTransGradient if necessary
- if(mpFillFloatTransGradient && ((!rCandidate.mpFillFloatTransGradient) || (!(*mpFillFloatTransGradient == *rCandidate.mpFillFloatTransGradient))))
+ if(mpFillFloatTransGradient)
{
delete mpFillFloatTransGradient;
- mpFillFloatTransGradient = 0L;
+ mpFillFloatTransGradient = 0;
}
// copy mpFillFloatTransGradient if necessary
- if(!mpFillFloatTransGradient && rCandidate.mpFillFloatTransGradient)
+ if(rCandidate.mpFillFloatTransGradient)
{
mpFillFloatTransGradient = new FillGradientAttribute(*rCandidate.mpFillFloatTransGradient);
}
@@ -187,14 +189,14 @@ namespace drawinglayer
// handle mpTextAttribute
{
// delete local mpTextAttribute if necessary
- if(mpTextAttribute && ((!rCandidate.mpTextAttribute) || (!(*mpTextAttribute == *rCandidate.mpTextAttribute))))
+ if(mpTextAttribute)
{
delete mpTextAttribute;
- mpTextAttribute = 0L;
+ mpTextAttribute = 0;
}
// copy mpTextAttribute if necessary
- if(!mpTextAttribute && rCandidate.mpTextAttribute)
+ if(rCandidate.mpTextAttribute)
{
mpTextAttribute = new SdrTextAttribute(*rCandidate.mpTextAttribute);
}
@@ -229,23 +231,23 @@ namespace drawinglayer
namespace attribute
{
SdrLineShadowTextAttribute::SdrLineShadowTextAttribute(
- SdrLineAttribute* pLine, SdrLineStartEndAttribute* pLineStartEnd,
- SdrShadowAttribute* pShadow, SdrTextAttribute* pTextAttribute)
+ SdrLineAttribute* pLine,
+ SdrLineStartEndAttribute* pLineStartEnd,
+ SdrShadowAttribute* pShadow,
+ SdrTextAttribute* pTextAttribute)
: SdrShadowTextAttribute(pShadow, pTextAttribute),
mpLine(pLine),
mpLineStartEnd(pLineStartEnd)
{
}
- SdrLineShadowTextAttribute::SdrLineShadowTextAttribute(const SdrLineShadowTextAttribute& rCandidate)
- : SdrShadowTextAttribute(0L, 0L),
- mpLine(0L),
- mpLineStartEnd(0L)
+ SdrLineShadowTextAttribute::SdrLineShadowTextAttribute(
+ const SdrLineShadowTextAttribute& rCandidate)
+ : SdrShadowTextAttribute(0, 0),
+ mpLine(0),
+ mpLineStartEnd(0)
{
- if(!(*this == rCandidate))
- {
- *this = rCandidate;
- }
+ *this = rCandidate;
}
SdrLineShadowTextAttribute::~SdrLineShadowTextAttribute()
@@ -262,14 +264,14 @@ namespace drawinglayer
// handle mpLine
{
// delete local mpLine if necessary
- if(mpLine && ((!rCandidate.mpLine) || (!(*mpLine == *rCandidate.mpLine))))
+ if(mpLine)
{
delete mpLine;
- mpLine = 0L;
+ mpLine = 0;
}
// copy mpLine if necessary
- if(!mpLine && rCandidate.mpLine)
+ if(rCandidate.mpLine)
{
mpLine = new SdrLineAttribute(*rCandidate.mpLine);
}
@@ -278,14 +280,14 @@ namespace drawinglayer
// handle mpLineStartEnd
{
// delete local mpLineStartEnd if necessary
- if(mpLineStartEnd && ((!rCandidate.mpLineStartEnd) || (!(*mpLineStartEnd == *rCandidate.mpLineStartEnd))))
+ if(mpLineStartEnd)
{
delete mpLineStartEnd;
- mpLineStartEnd = 0L;
+ mpLineStartEnd = 0;
}
// copy mpLineStartEnd if necessary
- if(!mpLineStartEnd && rCandidate.mpLineStartEnd)
+ if(rCandidate.mpLineStartEnd)
{
mpLineStartEnd = new SdrLineStartEndAttribute(*rCandidate.mpLineStartEnd);
}
@@ -320,23 +322,25 @@ namespace drawinglayer
namespace attribute
{
SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute(
- SdrLineAttribute* pLine, attribute::SdrFillAttribute* pFill, SdrLineStartEndAttribute* pLineStartEnd,
- SdrShadowAttribute* pShadow, FillGradientAttribute* pFillFloatTransGradient, SdrTextAttribute* pTextAttribute)
+ SdrLineAttribute* pLine,
+ attribute::SdrFillAttribute* pFill,
+ SdrLineStartEndAttribute* pLineStartEnd,
+ SdrShadowAttribute* pShadow,
+ FillGradientAttribute* pFillFloatTransGradient,
+ SdrTextAttribute* pTextAttribute)
: SdrLineShadowTextAttribute(pLine, pLineStartEnd, pShadow, pTextAttribute),
mpFill(pFill),
mpFillFloatTransGradient(pFillFloatTransGradient)
{
}
- SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute(const SdrLineFillShadowTextAttribute& rCandidate)
- : SdrLineShadowTextAttribute(0L, 0L, 0L, 0L),
- mpFill(0L),
- mpFillFloatTransGradient(0L)
+ SdrLineFillShadowTextAttribute::SdrLineFillShadowTextAttribute(
+ const SdrLineFillShadowTextAttribute& rCandidate)
+ : SdrLineShadowTextAttribute(0, 0, 0, 0),
+ mpFill(0),
+ mpFillFloatTransGradient(0)
{
- if(!(*this == rCandidate))
- {
- *this = rCandidate;
- }
+ *this = rCandidate;
}
SdrLineFillShadowTextAttribute::~SdrLineFillShadowTextAttribute()
@@ -353,14 +357,14 @@ namespace drawinglayer
// handle mpFill
{
// delete local mpFill if necessary
- if(mpFill && ((!rCandidate.mpFill) || (!(*mpFill == *rCandidate.mpFill))))
+ if(mpFill)
{
delete mpFill;
- mpFill = 0L;
+ mpFill = 0;
}
// copy mpFill if necessary
- if(!mpFill && rCandidate.mpFill)
+ if(rCandidate.mpFill)
{
mpFill = new attribute::SdrFillAttribute(*rCandidate.mpFill);
}
@@ -369,14 +373,14 @@ namespace drawinglayer
// handle mpFillFloatTransGradient
{
// delete local mpFillFloatTransGradient if necessary
- if(mpFillFloatTransGradient && ((!rCandidate.mpFillFloatTransGradient) || (!(*mpFillFloatTransGradient == *rCandidate.mpFillFloatTransGradient))))
+ if(mpFillFloatTransGradient)
{
delete mpFillFloatTransGradient;
- mpFillFloatTransGradient = 0L;
+ mpFillFloatTransGradient = 0;
}
// copy mpFillFloatTransGradient if necessary
- if(!mpFillFloatTransGradient && rCandidate.mpFillFloatTransGradient)
+ if(rCandidate.mpFillFloatTransGradient)
{
mpFillFloatTransGradient = new FillGradientAttribute(*rCandidate.mpFillFloatTransGradient);
}
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
new file mode 100644
index 000000000000..0282b519499c
--- /dev/null
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -0,0 +1,304 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrtextattribute.cxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svx.hxx"
+
+#include <svx/sdr/attribute/sdrformtextattribute.hxx>
+#include <svtools/itemset.hxx>
+
+#include <svx/xftdiit.hxx>
+#include <svx/xftstit.hxx>
+#include <svx/xftshxy.hxx>
+#include <svx/xftshtit.hxx>
+#include <svx/xtextit0.hxx>
+#include <svx/xftadit.hxx>
+#include <svx/xftshit.hxx>
+#include <svx/xftshcit.hxx>
+#include <svx/xftmrit.hxx>
+#include <svx/xftouit.hxx>
+
+#include <svx/sdshtitm.hxx>
+#include <svx/xlntrit.hxx>
+#include <drawinglayer/attribute/lineattribute.hxx>
+#include <drawinglayer/attribute/strokeattribute.hxx>
+#include <svx/sdshcitm.hxx>
+#include <svx/xlnclit.hxx>
+#include <svx/xlnwtit.hxx>
+#include <xlinjoit.hxx>
+#include <svx/xlineit0.hxx>
+#include <svx/xdash.hxx>
+#include <svx/xlndsit.hxx>
+#include <svx/sdr/attribute/sdrformtextoutlineattribute.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// pointer compare define
+#define pointerOrContentEqual(p, q) ((p == q) || (p && q && *p == *q))
+
+//////////////////////////////////////////////////////////////////////////////
+// helper to get line, stroke and transparence attributes from SfxItemSet
+
+namespace
+{
+ basegfx::B2DLineJoin impGetB2DLineJoin(XLineJoint eLineJoint)
+ {
+ switch(eLineJoint)
+ {
+ case XLINEJOINT_MIDDLE :
+ {
+ return basegfx::B2DLINEJOIN_MIDDLE;
+ }
+ case XLINEJOINT_BEVEL :
+ {
+ return basegfx::B2DLINEJOIN_BEVEL;
+ }
+ case XLINEJOINT_MITER :
+ {
+ return basegfx::B2DLINEJOIN_MITER;
+ }
+ case XLINEJOINT_ROUND :
+ {
+ return basegfx::B2DLINEJOIN_ROUND;
+ }
+ default :
+ {
+ return basegfx::B2DLINEJOIN_NONE; // XLINEJOINT_NONE
+ }
+ }
+ }
+
+ sal_uInt8 impGetStrokeTransparence(bool bShadow, const SfxItemSet& rSet)
+ {
+ sal_uInt8 nRetval;
+
+ if(bShadow)
+ {
+ nRetval = (sal_uInt8)((((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
+ }
+ else
+ {
+ nRetval = (sal_uInt8)((((XLineTransparenceItem&)(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue() * 255) / 100);
+ }
+
+ return nRetval;
+ }
+
+ drawinglayer::attribute::LineAttribute impGetLineAttribute(bool bShadow, const SfxItemSet& rSet)
+ {
+ basegfx::BColor aColorAttribute;
+
+ if(bShadow)
+ {
+ const Color aShadowColor(((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
+ aColorAttribute = aShadowColor.getBColor();
+ }
+ else
+ {
+ const Color aLineColor(((XLineColorItem&)(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
+ aColorAttribute = aLineColor.getBColor();
+ }
+
+ const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ const XLineJoint eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
+
+ return drawinglayer::attribute::LineAttribute(aColorAttribute, (double)nLineWidth, impGetB2DLineJoin(eLineJoint));
+ }
+
+ drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
+ {
+ const XLineStyle eLineStyle = ((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+ double fFullDotDashLen(0.0);
+ ::std::vector< double > aDotDashArray;
+
+ if(XLINE_DASH == eLineStyle)
+ {
+ const XDash& rDash = ((const XLineDashItem&)(rSet.Get(XATTR_LINEDASH))).GetDashValue();
+
+ if(rDash.GetDots() || rDash.GetDashes())
+ {
+ const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ fFullDotDashLen = rDash.CreateDotDashArray(aDotDashArray, (double)nLineWidth);
+ }
+ }
+
+ return drawinglayer::attribute::StrokeAttribute(aDotDashArray, fFullDotDashLen);
+ }
+} // end of anonymous namespace
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ SdrFormTextAttribute::SdrFormTextAttribute(const SfxItemSet& rSet)
+ : mnFormTextDistance(((const XFormTextDistanceItem&)rSet.Get(XATTR_FORMTXTDISTANCE)).GetValue()),
+ mnFormTextStart(((const XFormTextStartItem&)rSet.Get(XATTR_FORMTXTSTART)).GetValue()),
+ mnFormTextShdwXVal(((const XFormTextShadowXValItem&)rSet.Get(XATTR_FORMTXTSHDWXVAL)).GetValue()),
+ mnFormTextShdwYVal(((const XFormTextShadowYValItem&)rSet.Get(XATTR_FORMTXTSHDWYVAL)).GetValue()),
+ mnFormTextShdwTransp(((const XFormTextShadowTranspItem&)rSet.Get(XATTR_FORMTXTSHDWTRANSP)).GetValue()),
+ meFormTextStyle(((const XFormTextStyleItem&)rSet.Get(XATTR_FORMTXTSTYLE)).GetValue()),
+ meFormTextAdjust(((const XFormTextAdjustItem&)rSet.Get(XATTR_FORMTXTADJUST)).GetValue()),
+ meFormTextShadow(((const XFormTextShadowItem&)rSet.Get(XATTR_FORMTXTSHADOW)).GetValue()),
+ maFormTextShdwColor(((const XFormTextShadowColorItem&)rSet.Get(XATTR_FORMTXTSHDWCOLOR)).GetColorValue()),
+ mpOutline(0),
+ mpShadowOutline(0),
+ mbFormTextMirror(((const XFormTextMirrorItem&)rSet.Get(XATTR_FORMTXTMIRROR)).GetValue()),
+ mbFormTextOutline(((const XFormTextOutlineItem&)rSet.Get(XATTR_FORMTXTOUTLINE)).GetValue())
+ {
+ if(getFormTextOutline())
+ {
+ const StrokeAttribute aStrokeAttribute(impGetStrokeAttribute(rSet));
+
+ // also need to prepare attributes for outlines
+ {
+ const LineAttribute aLineAttribute(impGetLineAttribute(false, rSet));
+ const sal_uInt8 nTransparence(impGetStrokeTransparence(false, rSet));
+
+ mpOutline = new SdrFormTextOutlineAttribute(
+ aLineAttribute, aStrokeAttribute, nTransparence);
+ }
+
+ if(XFTSHADOW_NONE != getFormTextShadow())
+ {
+ // also need to prepare attributes for shadow outlines
+ const LineAttribute aLineAttribute(impGetLineAttribute(true, rSet));
+ const sal_uInt8 nTransparence(impGetStrokeTransparence(true, rSet));
+
+ mpShadowOutline = new SdrFormTextOutlineAttribute(
+ aLineAttribute, aStrokeAttribute, nTransparence);
+ }
+ }
+ }
+
+ SdrFormTextAttribute::~SdrFormTextAttribute()
+ {
+ if(mpOutline)
+ {
+ delete mpOutline;
+ mpOutline = 0;
+ }
+
+ if(mpShadowOutline)
+ {
+ delete mpShadowOutline;
+ mpShadowOutline = 0;
+ }
+ }
+
+ SdrFormTextAttribute::SdrFormTextAttribute(const SdrFormTextAttribute& rCandidate)
+ : mnFormTextDistance(rCandidate.getFormTextDistance()),
+ mnFormTextStart(rCandidate.getFormTextStart()),
+ mnFormTextShdwXVal(rCandidate.getFormTextShdwXVal()),
+ mnFormTextShdwYVal(rCandidate.getFormTextShdwYVal()),
+ mnFormTextShdwTransp(rCandidate.getFormTextShdwTransp()),
+ meFormTextStyle(rCandidate.getFormTextStyle()),
+ meFormTextAdjust(rCandidate.getFormTextAdjust()),
+ meFormTextShadow(rCandidate.getFormTextShadow()),
+ maFormTextShdwColor(rCandidate.getFormTextShdwColor()),
+ mpOutline(0),
+ mpShadowOutline(0),
+ mbFormTextMirror(rCandidate.getFormTextMirror()),
+ mbFormTextOutline(rCandidate.getFormTextOutline())
+ {
+ if(rCandidate.getOutline())
+ {
+ mpOutline = new SdrFormTextOutlineAttribute(*rCandidate.getOutline());
+ }
+
+ if(rCandidate.getShadowOutline())
+ {
+ mpShadowOutline = new SdrFormTextOutlineAttribute(*rCandidate.getShadowOutline());
+ }
+ }
+
+ SdrFormTextAttribute& SdrFormTextAttribute::operator=(const SdrFormTextAttribute& rCandidate)
+ {
+ mnFormTextDistance = rCandidate.getFormTextDistance();
+ mnFormTextStart = rCandidate.getFormTextStart();
+ mnFormTextShdwXVal = rCandidate.getFormTextShdwXVal();
+ mnFormTextShdwYVal = rCandidate.getFormTextShdwYVal();
+ mnFormTextShdwTransp = rCandidate.getFormTextShdwTransp();
+ meFormTextStyle = rCandidate.getFormTextStyle();
+ meFormTextAdjust = rCandidate.getFormTextAdjust();
+ meFormTextShadow = rCandidate.getFormTextShadow();
+ maFormTextShdwColor = rCandidate.getFormTextShdwColor();
+
+ if(mpOutline)
+ {
+ delete mpOutline;
+ }
+
+ mpOutline = 0;
+
+ if(rCandidate.getOutline())
+ {
+ mpOutline = new SdrFormTextOutlineAttribute(*rCandidate.getOutline());
+ }
+
+ if(mpShadowOutline)
+ {
+ delete mpShadowOutline;
+ }
+
+ mpShadowOutline = 0;
+
+ if(rCandidate.getShadowOutline())
+ {
+ mpShadowOutline = new SdrFormTextOutlineAttribute(*rCandidate.getShadowOutline());
+ }
+
+ mbFormTextMirror = rCandidate.getFormTextMirror();
+ mbFormTextOutline = rCandidate.getFormTextOutline();
+
+ return *this;
+ }
+
+ bool SdrFormTextAttribute::operator==(const SdrFormTextAttribute& rCandidate) const
+ {
+ return (getFormTextDistance() == rCandidate.getFormTextDistance()
+ && getFormTextStart() == rCandidate.getFormTextStart()
+ && getFormTextShdwXVal() == rCandidate.getFormTextShdwXVal()
+ && getFormTextShdwYVal() == rCandidate.getFormTextShdwYVal()
+ && getFormTextShdwTransp() == rCandidate.getFormTextShdwTransp()
+ && getFormTextStyle() == rCandidate.getFormTextStyle()
+ && getFormTextAdjust() == rCandidate.getFormTextAdjust()
+ && getFormTextShadow() == rCandidate.getFormTextShadow()
+ && getFormTextShdwColor() == rCandidate.getFormTextShdwColor()
+ && pointerOrContentEqual(getOutline(), rCandidate.getOutline())
+ && pointerOrContentEqual(getShadowOutline(), rCandidate.getShadowOutline())
+ && getFormTextMirror() == rCandidate.getFormTextMirror()
+ && getFormTextOutline() == rCandidate.getFormTextOutline());
+ }
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/inc/svx/sdr/overlay/overlaysdrobject.hxx b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
index d5c8f7ba6ba6..db2fe20ae21b 100644
--- a/svx/inc/svx/sdr/overlay/overlaysdrobject.hxx
+++ b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
@@ -6,8 +6,9 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: overlaysdrobject.hxx,v $
- * $Revision: 1.4 $
+ * $RCSfile: sdrtextattribute.cxx,v $
+ *
+ * $Revision: 1.2 $
*
* This file is part of OpenOffice.org.
*
@@ -28,47 +29,38 @@
*
************************************************************************/
-#ifndef _SDR_OVERLAY_OVERLAYSDROBJECT_HXX
-#define _SDR_OVERLAY_OVERLAYSDROBJECT_HXX
+#include "precompiled_svx.hxx"
-#include <svx/sdr/overlay/overlayobject.hxx>
+#include <svx/sdr/attribute/sdrformtextoutlineattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
-// predeclarations
-class SdrObject;
+// pointer compare define
+#define pointerOrContentEqual(p, q) ((p == q) || (p && q && *p == *q))
//////////////////////////////////////////////////////////////////////////////
-namespace sdr
+namespace drawinglayer
{
- namespace overlay
+ namespace attribute
{
- class SVX_DLLPUBLIC OverlaySdrObject : public OverlayObjectWithBasePosition
+ SdrFormTextOutlineAttribute::SdrFormTextOutlineAttribute(
+ const LineAttribute& rLineAttribute,
+ const StrokeAttribute& rStrokeAttribute,
+ sal_uInt8 nTransparence)
+ : maLineAttribute(rLineAttribute),
+ maStrokeAttribute(rStrokeAttribute),
+ mnTransparence(nTransparence)
{
- protected:
- // the SdrObject to show
- const SdrObject& mrSdrObject;
-
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
-
- // Hittest with logical coordinates. Default tests against maBaseRange.
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
+ }
- public:
- OverlaySdrObject(
- const basegfx::B2DPoint& rBasePos,
- const SdrObject& rObject);
- virtual ~OverlaySdrObject();
- };
- } // end of namespace overlay
-} // end of namespace sdr
+ bool SdrFormTextOutlineAttribute::operator==(const SdrFormTextOutlineAttribute& rCandidate) const
+ {
+ return (getLineAttribute() == rCandidate.getLineAttribute()
+ && getStrokeAttribute() == rCandidate.getStrokeAttribute()
+ && getTransparence() == rCandidate.getTransparence());
+ }
+ } // end of namespace attribute
+} // end of namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
-
-#endif //_SDR_OVERLAY_OVERLAYSDROBJECT_HXX
-
// eof
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 394f68041d7a..ae6204d15bef 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -30,11 +30,18 @@
************************************************************************/
#include "precompiled_svx.hxx"
+
#include <svx/sdr/attribute/sdrtextattribute.hxx>
+#include <svx/sdr/attribute/sdrformtextattribute.hxx>
#include <svx/svdotext.hxx>
#include <svx/outlobj.hxx>
#include <svx/editobj.hxx>
#include <svx/flditem.hxx>
+#include <svx/sdr/properties/properties.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// pointer compare define
+#define pointerOrContentEqual(p, q) ((p == q) || (p && q && *p == *q))
//////////////////////////////////////////////////////////////////////////////
@@ -50,49 +57,154 @@ namespace drawinglayer
sal_Int32 aTextUpperDistance,
sal_Int32 aTextRightDistance,
sal_Int32 aTextLowerDistance,
+ SdrTextHorzAdjust aSdrTextHorzAdjust,
+ SdrTextVertAdjust aSdrTextVertAdjust,
bool bContour,
bool bFitToSize,
bool bHideContour,
bool bBlink,
bool bScroll,
- bool bInEditMode)
- : mrSdrText(rSdrText),
+ bool bInEditMode,
+ bool bFixedCellHeight)
+ : mpSdrText(&rSdrText),
maOutlinerParaObject(rOutlinerParaObject),
- meFormTextStyle(eFormTextStyle),
+ mpSdrFormTextAttribute(0),
maTextLeftDistance(aTextLeftDistance),
maTextUpperDistance(aTextUpperDistance),
maTextRightDistance(aTextRightDistance),
maTextLowerDistance(aTextLowerDistance),
+ maPropertiesVersion(0),
+ maSdrTextHorzAdjust(aSdrTextHorzAdjust),
+ maSdrTextVertAdjust(aSdrTextVertAdjust),
mbContour(bContour),
mbFitToSize(bFitToSize),
mbHideContour(bHideContour),
mbBlink(bBlink),
mbScroll(bScroll),
- mbInEditMode(bInEditMode)
+ mbInEditMode(bInEditMode),
+ mbFixedCellHeight(bFixedCellHeight)
+ {
+ if(XFT_NONE != eFormTextStyle)
+ {
+ // text on path. Create FormText attribute
+ const SfxItemSet& rSet = getSdrText().GetItemSet();
+ mpSdrFormTextAttribute = new SdrFormTextAttribute(rSet);
+ }
+
+ // #i101556# init with version number to detect changes of single text
+ // attribute and/or style sheets in primitive data without having to
+ // copy that data locally (which would be better from principle)
+ maPropertiesVersion = rSdrText.GetObject().GetProperties().getVersion();
+ }
+
+ SdrTextAttribute::~SdrTextAttribute()
+ {
+ if(mpSdrFormTextAttribute)
+ {
+ delete mpSdrFormTextAttribute;
+ mpSdrFormTextAttribute = 0;
+ }
+ }
+
+ SdrTextAttribute::SdrTextAttribute(const SdrTextAttribute& rCandidate)
+ : mpSdrText(&rCandidate.getSdrText()),
+ maOutlinerParaObject(rCandidate.getOutlinerParaObject()),
+ mpSdrFormTextAttribute(0),
+ maTextLeftDistance(rCandidate.getTextLeftDistance()),
+ maTextUpperDistance(rCandidate.getTextUpperDistance()),
+ maTextRightDistance(rCandidate.getTextRightDistance()),
+ maTextLowerDistance(rCandidate.getTextLowerDistance()),
+ maPropertiesVersion(rCandidate.getPropertiesVersion()),
+ maSdrTextHorzAdjust(rCandidate.getSdrTextHorzAdjust()),
+ maSdrTextVertAdjust(rCandidate.getSdrTextVertAdjust()),
+ mbContour(rCandidate.isContour()),
+ mbFitToSize(rCandidate.isFitToSize()),
+ mbHideContour(rCandidate.isHideContour()),
+ mbBlink(rCandidate.isBlink()),
+ mbScroll(rCandidate.isScroll()),
+ mbInEditMode(rCandidate.isInEditMode()),
+ mbFixedCellHeight(rCandidate.isFixedCellHeight())
+ {
+ if(rCandidate.getSdrFormTextAttribute())
+ {
+ mpSdrFormTextAttribute = new SdrFormTextAttribute(*rCandidate.getSdrFormTextAttribute());
+ }
+ }
+
+ SdrTextAttribute& SdrTextAttribute::operator=(const SdrTextAttribute& rCandidate)
{
+ mpSdrText = &rCandidate.getSdrText();
+ maOutlinerParaObject = rCandidate.getOutlinerParaObject();
+
+ if(mpSdrFormTextAttribute)
+ {
+ delete mpSdrFormTextAttribute;
+ }
+
+ mpSdrFormTextAttribute = 0;
+
+ if(rCandidate.getSdrFormTextAttribute())
+ {
+ mpSdrFormTextAttribute = new SdrFormTextAttribute(*rCandidate.getSdrFormTextAttribute());
+ }
+
+ maTextLeftDistance = rCandidate.getTextLeftDistance();
+ maTextUpperDistance = rCandidate.getTextUpperDistance();
+ maTextRightDistance = rCandidate.getTextRightDistance();
+ maTextLowerDistance = rCandidate.getTextLowerDistance();
+ maPropertiesVersion = rCandidate.getPropertiesVersion();
+
+ maSdrTextHorzAdjust = rCandidate.getSdrTextHorzAdjust();
+ maSdrTextVertAdjust = rCandidate.getSdrTextVertAdjust();
+
+ mbContour = rCandidate.isContour();
+ mbFitToSize = rCandidate.isFitToSize();
+ mbHideContour = rCandidate.isHideContour();
+ mbBlink = rCandidate.isBlink();
+ mbScroll = rCandidate.isScroll();
+ mbInEditMode = rCandidate.isInEditMode();
+ mbFixedCellHeight = rCandidate.isFixedCellHeight();
+
+ return *this;
}
bool SdrTextAttribute::operator==(const SdrTextAttribute& rCandidate) const
{
- return (getOutlinerParaObject() == rCandidate.getOutlinerParaObject()
- && getFormTextStyle() == rCandidate.getFormTextStyle()
+ return (
+ // compares OPO and it's contents, but traditionally not the RedLining
+ // which is not seen as model, but as temporary information
+ getOutlinerParaObject() == rCandidate.getOutlinerParaObject()
+
+ // #i102062# for primitive visualisation, the WrongList (SpellChecking)
+ // is important, too, so use isWrongListEqual since there is no WrongList
+ // comparison in the regular OutlinerParaObject compare (since it's
+ // not-persistent data)
+ && getOutlinerParaObject().isWrongListEqual(rCandidate.getOutlinerParaObject())
+
+ && pointerOrContentEqual(getSdrFormTextAttribute(), rCandidate.getSdrFormTextAttribute())
&& getTextLeftDistance() == rCandidate.getTextLeftDistance()
&& getTextUpperDistance() == rCandidate.getTextUpperDistance()
&& getTextRightDistance() == rCandidate.getTextRightDistance()
&& getTextLowerDistance() == rCandidate.getTextLowerDistance()
+ && getPropertiesVersion() == rCandidate.getPropertiesVersion()
+
+ && getSdrTextHorzAdjust() == rCandidate.getSdrTextHorzAdjust()
+ && getSdrTextVertAdjust() == rCandidate.getSdrTextVertAdjust()
+
&& isContour() == rCandidate.isContour()
&& isFitToSize() == rCandidate.isFitToSize()
&& isHideContour() == rCandidate.isHideContour()
&& isBlink() == rCandidate.isBlink()
&& isScroll() == rCandidate.isScroll()
- && isInEditMode() == rCandidate.isInEditMode());
+ && isInEditMode() == rCandidate.isInEditMode()
+ && isFixedCellHeight() == rCandidate.isFixedCellHeight());
}
void SdrTextAttribute::getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const
{
if(isBlink())
{
- mrSdrText.GetObject().impGetBlinkTextTiming(rAnimList);
+ mpSdrText->GetObject().impGetBlinkTextTiming(rAnimList);
}
}
@@ -100,7 +212,7 @@ namespace drawinglayer
{
if(isScroll())
{
- mrSdrText.GetObject().impGetScrollTextTiming(rAnimList, fFrameLength, fTextLength);
+ mpSdrText->GetObject().impGetScrollTextTiming(rAnimList, fFrameLength, fTextLength);
}
}
} // end of namespace attribute
diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx
index 851ee1f3da58..9ae265d29362 100644
--- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx
@@ -75,8 +75,8 @@ namespace sdr
basegfx::B3DPolyPolygon aPolyPolygon3D(GetE3dPolygonObj().GetPolyPolygon3D());
const basegfx::B3DPolyPolygon aPolyNormals3D(GetE3dPolygonObj().GetPolyNormals3D());
const basegfx::B2DPolyPolygon aPolyTexture2D(GetE3dPolygonObj().GetPolyTexture2D());
- const bool bNormals(aPolyNormals3D.count());
- const bool bTexture(aPolyTexture2D.count());
+ const bool bNormals(aPolyNormals3D.count() && aPolyNormals3D.count() == aPolyPolygon3D.count());
+ const bool bTexture(aPolyTexture2D.count() && aPolyTexture2D.count() == aPolyPolygon3D.count());
if(bNormals || bTexture)
{
@@ -100,12 +100,19 @@ namespace sdr
{
if(bNormals)
{
- aCandidate3D.setNormal(b, aNormals3D.getB3DPoint(b));
+ sal_uInt32 nNormalCount = aNormals3D.count();
+ if( b < nNormalCount )
+ aCandidate3D.setNormal(b, aNormals3D.getB3DPoint(b));
+ else if( nNormalCount > 0 )
+ aCandidate3D.setNormal(b, aNormals3D.getB3DPoint(0));
}
-
if(bTexture)
{
- aCandidate3D.setTextureCoordinate(b, aTexture2D.getB2DPoint(b));
+ sal_uInt32 nTextureCount = aTexture2D.count();
+ if( b < nTextureCount )
+ aCandidate3D.setTextureCoordinate(b, aTexture2D.getB2DPoint(b));
+ else if( nTextureCount > 0 )
+ aCandidate3D.setTextureCoordinate(b, aTexture2D.getB2DPoint(0));
}
}
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index aae01c5d24ff..7527b177b3a4 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -53,6 +53,18 @@
#include <svdglob.hxx>
#include <vcl/svapp.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/textprimitive2d.hxx>
+#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+
+#include <svx/sdr/primitive2d/sdrtextprimitive2d.hxx>
+#include <svx/eeitem.hxx>
+#include <svx/colritem.hxx>
+//#include <svx/xtable.hxx>
+
//////////////////////////////////////////////////////////////////////////////
namespace sdr
@@ -78,6 +90,242 @@ namespace sdr
{
}
+ void ViewContactOfGraphic::flushGraphicObjects()
+ {
+ // #i102380# The graphic is swapped out. To let that have an effect ist is necessary to
+ // delete copies of the GraphicObject which are not swapped out and have no SwapHandler set
+ // (this is what happnes when the GraphicObject gets copied to a SdrGrafPrimitive2D). This
+ // is best achieved for the VC by clearing the local decomposition cache. It would be possible
+ // to also do this for the VOC cache, but that VOCs exist exactly expresss that the object
+ // gets visualised, so this would be wrong.
+ flushViewIndependentPrimitive2DSequence();
+ }
+
+ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createVIP2DSForPresObj(
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute,
+ const GraphicAttr& rLocalGrafInfo) const
+ {
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ GraphicObject aEmptyGraphicObject;
+ GraphicAttr aEmptyGraphicAttr;
+
+ // SdrGrafPrimitive2D without content in original size which carries all eventual attributes and texts
+ const drawinglayer::primitive2d::Primitive2DReference xReferenceA(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
+ rObjectMatrix,
+ rAttribute,
+ aEmptyGraphicObject,
+ aEmptyGraphicAttr));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReferenceA, 1);
+
+ // SdrGrafPrimitive2D with content (which is the preview graphic) scaled to smaller size and
+ // without attributes
+ basegfx::B2DHomMatrix aSmallerMatrix;
+
+ // #i94431# for some reason, i forgot to take the PrefMapMode of the graphic
+ // into account. Since EmptyPresObj's are only used in Draw/Impress, it is
+ // safe to assume 100th mm as target.
+ Size aPrefSize(GetGrafObject().GetGrafPrefSize());
+
+ if(MAP_PIXEL == GetGrafObject().GetGrafPrefMapMode().GetMapUnit())
+ {
+ aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MAP_100TH_MM);
+ }
+ else
+ {
+ aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, GetGrafObject().GetGrafPrefMapMode(), MAP_100TH_MM);
+ }
+
+ // decompose object matrix to get single values
+ basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ rObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+
+ const double fOffsetX((aScale.getX() - aPrefSize.getWidth()) / 2.0);
+ const double fOffsetY((aScale.getY() - aPrefSize.getHeight()) / 2.0);
+
+ if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0))
+ {
+ // create the EmptyPresObj fallback visualisation. The fallback graphic
+ // is already provided in rGraphicObject in this case, use it
+ aSmallerMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight());
+ aSmallerMatrix.translate(fOffsetX, fOffsetY);
+ aSmallerMatrix.shearX(fShearX);
+ aSmallerMatrix.rotate(fRotate);
+ aSmallerMatrix.translate(aTranslate.getX(), aTranslate.getY());
+
+ const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(false);
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute aEmptyAttributes(0, 0, 0, 0, 0, 0);
+ const drawinglayer::primitive2d::Primitive2DReference xReferenceB(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
+ aSmallerMatrix,
+ aEmptyAttributes,
+ rGraphicObject,
+ rLocalGrafInfo));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReferenceB);
+ }
+
+ return xRetval;
+ }
+
+ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createVIP2DSForDraft(
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const
+ {
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ GraphicObject aEmptyGraphicObject;
+ GraphicAttr aEmptyGraphicAttr;
+
+ // SdrGrafPrimitive2D without content in original size which carries all eventual attributes and texts
+ const drawinglayer::primitive2d::Primitive2DReference xReferenceA(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
+ rObjectMatrix,
+ rAttribute,
+ aEmptyGraphicObject,
+ aEmptyGraphicAttr));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReferenceA, 1);
+
+ if(!rAttribute.getLine())
+ {
+ // create a surrounding frame when no linestyle given
+ const Color aColor(Application::GetSettings().GetStyleSettings().GetShadowColor());
+ const basegfx::BColor aBColor(aColor.getBColor());
+ const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
+
+ basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aUnitRange));
+ aOutline.transform(rObjectMatrix);
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+ aOutline,
+ aBColor)));
+ }
+
+ // decompose object matrix to get single values
+ basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ rObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+
+ // define a distance value, used for distance from bitmap to borders and from bitmap
+ // to text, too (2 mm)
+ const double fDistance(200.0);
+
+ // consume borders from values
+ aScale.setX(std::max(0.0, aScale.getX() - (2.0 * fDistance)));
+ aScale.setY(std::max(0.0, aScale.getY() - (2.0 * fDistance)));
+ aTranslate.setX(aTranslate.getX() + fDistance);
+ aTranslate.setY(aTranslate.getY() + fDistance);
+
+ // draw a draft bitmap
+ const Bitmap aDraftBitmap(ResId(BMAP_GrafikEi, *ImpGetResMgr()));
+
+ if(!aDraftBitmap.IsEmpty())
+ {
+ Size aPrefSize(aDraftBitmap.GetPrefSize());
+
+ if(MAP_PIXEL == aDraftBitmap.GetPrefMapMode().GetMapUnit())
+ {
+ aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aDraftBitmap.GetSizePixel(), MAP_100TH_MM);
+ }
+ else
+ {
+ aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, aDraftBitmap.GetPrefMapMode(), MAP_100TH_MM);
+ }
+
+ const double fBitmapScaling(2.0);
+ const double fWidth(aPrefSize.getWidth() * fBitmapScaling);
+ const double fHeight(aPrefSize.getHeight() * fBitmapScaling);
+
+ if(basegfx::fTools::more(fWidth, 1.0)
+ && basegfx::fTools::more(fHeight, 1.0)
+ && basegfx::fTools::lessOrEqual(fWidth, aScale.getX())
+ && basegfx::fTools::lessOrEqual(fHeight, aScale.getY()))
+ {
+ basegfx::B2DHomMatrix aBitmapMatrix;
+
+ aBitmapMatrix.scale(fWidth, fHeight);
+ aBitmapMatrix.shearX(fShearX);
+ aBitmapMatrix.rotate(fRotate);
+ aBitmapMatrix.translate(aTranslate.getX(), aTranslate.getY());
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval,
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::BitmapPrimitive2D(
+ BitmapEx(aDraftBitmap),
+ aBitmapMatrix)));
+
+ // consume bitmap size in X
+ aScale.setX(std::max(0.0, aScale.getX() - (fWidth + fDistance)));
+ aTranslate.setX(aTranslate.getX() + fWidth + fDistance);
+ }
+ }
+
+ // Build the text for the draft object
+ XubString aDraftText = GetGrafObject().GetFileName();
+
+ if(!aDraftText.Len())
+ {
+ aDraftText = GetGrafObject().GetName();
+ aDraftText.AppendAscii(" ...");
+ }
+
+ if(aDraftText.Len() && GetGrafObject().GetModel())
+ {
+ // #i103255# Goal is to produce TextPrimitives which hold the given text as
+ // BlockText in the available space. It would be very tricky to do
+ // an own word wrap/line layout here.
+ // Using SdrBlockTextPrimitive2D OTOH is critical since it internally
+ // uses the SdrObject it references. To solve this, create a temp
+ // SdrObject with Attributes and Text, generate a SdrBlockTextPrimitive2D
+ // directly and immediately decompose it. After that, it is no longer
+ // needed and can be deleted.
+
+ // create temp RectObj as TextObj and set needed attributes
+ SdrRectObj aRectObj(OBJ_TEXT);
+ aRectObj.SetModel(GetGrafObject().GetModel());
+ aRectObj.NbcSetText(aDraftText);
+ aRectObj.SetMergedItem(SvxColorItem(Color(COL_LIGHTRED), EE_CHAR_COLOR));
+
+ // get SdrText and OPO
+ SdrText* pSdrText = aRectObj.getText(0);
+ OutlinerParaObject* pOPO = aRectObj.GetOutlinerParaObject();
+
+ if(pSdrText && pOPO)
+ {
+ // directly use the remaining space as TextRangeTransform
+ basegfx::B2DHomMatrix aTextRangeTransform;
+
+ aTextRangeTransform.scale(aScale.getX(), aScale.getY());
+ aTextRangeTransform.shearX(fShearX);
+ aTextRangeTransform.rotate(fRotate);
+ aTextRangeTransform.translate(aTranslate.getX(), aTranslate.getY());
+
+ // directly create temp SdrBlockTextPrimitive2D
+ drawinglayer::primitive2d::SdrBlockTextPrimitive2D aBlockTextPrimitive(
+ pSdrText,
+ *pOPO,
+ aTextRangeTransform,
+ SDRTEXTHORZADJUST_LEFT,
+ SDRTEXTVERTADJUST_TOP,
+ false,
+ false,
+ false,
+ false,
+ false);
+
+ // decompose immediately with neutral ViewInformation. This will
+ // layout the text to more simple TextPrimitives from drawinglayer
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+
+ drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(
+ xRetval,
+ aBlockTextPrimitive.get2DDecomposition(aViewInformation2D));
+ }
+ }
+
+ return xRetval;
+ }
+
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGraphic::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
@@ -86,7 +334,8 @@ namespace sdr
if(pSdrText)
{
const SfxItemSet& rItemSet = GetGrafObject().GetMergedItemSet();
- drawinglayer::attribute::SdrLineFillShadowTextAttribute* pAttribute = drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(rItemSet, *pSdrText);
+ drawinglayer::attribute::SdrLineFillShadowTextAttribute* pAttribute =
+ drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(rItemSet, *pSdrText);
bool bVisible(pAttribute && pAttribute->isVisible());
// create and fill GraphicAttr
@@ -131,7 +380,7 @@ namespace sdr
// which will use the primitive data we just create in the near future
const Rectangle& rRectangle = GetGrafObject().GetGeoRect();
const ::basegfx::B2DRange aObjectRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom());
- ::basegfx::B2DHomMatrix aObjectMatrix;
+ basegfx::B2DHomMatrix aObjectMatrix;
// look for mirroring
const GeoStat& rGeoStat(GetGrafObject().GetGeoStat());
@@ -170,60 +419,25 @@ namespace sdr
// get the current, unchenged graphic obect from SdrGrafObj
const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(false);
- if(GetGrafObject().IsEmptyPresObj())
+ if(visualisationUsesPresObj())
{
// it's an EmptyPresObj, create the SdrGrafPrimitive2D without content and another scaled one
// with the content which is the placeholder graphic
- GraphicObject aEmptyGraphicObject;
- GraphicAttr aEmptyGraphicAttr;
- drawinglayer::attribute::SdrLineFillShadowTextAttribute aEmptyAttributes(0, 0, 0, 0, 0, 0);
-
- // SdrGrafPrimitive2D without content in original size which carries all eventual attributes and texts
- const drawinglayer::primitive2d::Primitive2DReference xReferenceA(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
- aObjectMatrix, *pAttribute, aEmptyGraphicObject, aEmptyGraphicAttr));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReferenceA, 1);
-
- // SdrGrafPrimitive2D with content (which is the preview graphic) scaled to smaller size and
- // without attributes
- basegfx::B2DHomMatrix aSmallerMatrix;
-
- // #i94431# for some reason, i forgot to take the PrefMapMode of the graphic
- // into account. Since EmptyPresObj's are only used in Draw/Impress, it is
- // safe to assume 100th mm as target.
- Size aPrefSize(GetGrafObject().GetGrafPrefSize());
-
- if(MAP_PIXEL == GetGrafObject().GetGrafPrefMapMode().GetMapUnit())
- {
- aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MAP_100TH_MM);
- }
- else
- {
- aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, GetGrafObject().GetGrafPrefMapMode(), MAP_100TH_MM);
- }
-
- const double fOffsetX((aObjectRange.getWidth() - aPrefSize.getWidth()) / 2.0);
- const double fOffsetY((aObjectRange.getHeight() - aPrefSize.getHeight()) / 2.0);
-
- if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0))
- {
- aSmallerMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight());
- aSmallerMatrix.translate(fOffsetX, fOffsetY);
- aSmallerMatrix.shearX(fShearX);
- aSmallerMatrix.rotate(fRotate);
- aSmallerMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY());
-
- const drawinglayer::primitive2d::Primitive2DReference xReferenceB(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
- aSmallerMatrix,
- aEmptyAttributes,
- rGraphicObject,
- aLocalGrafInfo));
-
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReferenceB);
- }
+ xRetval = createVIP2DSForPresObj(aObjectMatrix, *pAttribute, aLocalGrafInfo);
+ }
+ else if(visualisationUsesDraft())
+ {
+ // #i102380# The graphic is swapped out. To not force a swap-in here, there is a mechanism
+ // which shows a swapped-out-visualisation (which gets created here now) and an asynchronious
+ // visual update mechanism for swapped-out grapgics when they were loaded (see AsynchGraphicLoadingEvent
+ // and ViewObjectContactOfGraphic implementation). Not forcing the swap-in here allows faster
+ // (non-blocking) processing here and thus in the effect e.g. fast scrolling through pages
+ xRetval = createVIP2DSForDraft(aObjectMatrix, *pAttribute);
}
else
{
- // create primitive
+ // create primitive. Info: Calling the copy-constructor of GraphicObject in this
+ // SdrGrafPrimitive2D constructor will force a full swap-in of the graphic
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
aObjectMatrix,
*pAttribute,
@@ -241,6 +455,31 @@ namespace sdr
return xRetval;
}
+ bool ViewContactOfGraphic::visualisationUsesPresObj() const
+ {
+ return GetGrafObject().IsEmptyPresObj();
+ }
+
+ bool ViewContactOfGraphic::visualisationUsesDraft() const
+ {
+ // no draft when already PresObj
+ if(visualisationUsesPresObj())
+ return false;
+
+ // draft when swapped out
+ const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(false);
+ static bool bAllowReplacements(true);
+
+ if(rGraphicObject.IsSwappedOut() && bAllowReplacements)
+ return true;
+
+ // draft when no graphic
+ if(GRAPHIC_NONE == rGraphicObject.GetType() || GRAPHIC_DEFAULT == rGraphicObject.GetType())
+ return true;
+
+ return false;
+ }
+
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 317a49bb090d..5f632f60ab85 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -37,6 +37,8 @@
#include <svx/sdr/attribute/sdrallattribute.hxx>
#include <svditer.hxx>
#include <svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -53,6 +55,66 @@ namespace sdr
{
}
+ basegfx::B2DRange ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect() const
+ {
+ const Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
+ Rectangle aTextBound(aObjectBound);
+ GetCustomShapeObj().GetTextBounds(aTextBound);
+ basegfx::B2DRange aTextRange(aTextBound.Left(), aTextBound.Top(), aTextBound.Right(), aTextBound.Bottom());
+ const basegfx::B2DRange aObjectRange(aObjectBound.Left(), aObjectBound.Top(), aObjectBound.Right(), aObjectBound.Bottom());
+
+ // no need to correct if no extra text range
+ if(aTextRange != aObjectRange)
+ {
+ const double fExtraTextRotation(GetCustomShapeObj().GetExtraTextRotation());
+ const GeoStat& rGeoStat(GetCustomShapeObj().GetGeoStat());
+
+ // only correct when rotation and/or shear is used
+ if(rGeoStat.nShearWink || rGeoStat.nDrehWink || !basegfx::fTools::equalZero(fExtraTextRotation))
+ {
+ // text range needs to be corrected by
+ // aObjectRange.getCenter() - aRotObjectRange.getCenter() since it's
+ // defined differenly by using rotation around object center. Start
+ // with positive part
+ basegfx::B2DVector aTranslation(aObjectRange.getCenter());
+
+ // get rotated and sheared object's range
+ basegfx::B2DRange aRotObjectRange(aObjectRange);
+ basegfx::B2DHomMatrix aRotMatrix;
+
+ aRotMatrix.translate(-aObjectRange.getMinimum().getX(), -aObjectRange.getMinimum().getY());
+
+ if(rGeoStat.nShearWink)
+ {
+ aRotMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000));
+ }
+
+ if(rGeoStat.nDrehWink)
+ {
+ aRotMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000);
+ }
+
+ if(!basegfx::fTools::equalZero(fExtraTextRotation))
+ {
+ aRotMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180);
+ }
+
+ aRotMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY());
+ aRotObjectRange.transform(aRotMatrix);
+
+ // add negative translation part
+ aTranslation -= aRotObjectRange.getCenter();
+
+ // create new range
+ aTextRange = basegfx::B2DRange(
+ aTextRange.getMinX() + aTranslation.getX(), aTextRange.getMinY() + aTranslation.getY(),
+ aTextRange.getMaxX() + aTranslation.getX(), aTextRange.getMaxY() + aTranslation.getY());
+ }
+ }
+
+ return aTextRange;
+ }
+
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
@@ -88,38 +150,35 @@ namespace sdr
if(bHasText || xGroup.hasElements())
{
// prepare text box geometry
- ::basegfx::B2DHomMatrix aTextBoxMatrix;
+ basegfx::B2DHomMatrix aTextBoxMatrix;
bool bWordWrap(false);
if(bHasText)
{
// take unrotated snap rect as default, then get the
// unrotated text box. Rotation needs to be done centered
- Rectangle aTextBound(GetCustomShapeObj().GetGeoRect());
- GetCustomShapeObj().GetTextBounds(aTextBound);
- const ::basegfx::B2DRange aTextBoxRange(aTextBound.Left(), aTextBound.Top(), aTextBound.Right(), aTextBound.Bottom());
+ const Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
+ const basegfx::B2DRange aObjectRange(aObjectBound.Left(), aObjectBound.Top(), aObjectBound.Right(), aObjectBound.Bottom());
- // fill object matrix
- if(!::basegfx::fTools::equalZero(aTextBoxRange.getWidth()))
- {
- aTextBoxMatrix.set(0, 0, aTextBoxRange.getWidth());
- }
+ // #i101684# get the text range unrotated and absolute to the object range
+ const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect());
- if(!::basegfx::fTools::equalZero(aTextBoxRange.getHeight()))
- {
- aTextBoxMatrix.set(1, 1, aTextBoxRange.getHeight());
- }
+ // give text object a size
+ aTextBoxMatrix.scale(aTextRange.getWidth(), aTextRange.getHeight());
+ // check if we have a rotation/shear at all to take care of
const double fExtraTextRotation(GetCustomShapeObj().GetExtraTextRotation());
const GeoStat& rGeoStat(GetCustomShapeObj().GetGeoStat());
- if(rGeoStat.nShearWink || rGeoStat.nDrehWink || !::basegfx::fTools::equalZero(fExtraTextRotation))
+ if(rGeoStat.nShearWink || rGeoStat.nDrehWink || !basegfx::fTools::equalZero(fExtraTextRotation))
{
- const double fHalfWidth(aTextBoxRange.getWidth() * 0.5);
- const double fHalfHeight(aTextBoxRange.getHeight() * 0.5);
-
- // move to it's own center to rotate around it
- aTextBoxMatrix.translate(-fHalfWidth, -fHalfHeight);
+ if(aObjectRange != aTextRange)
+ {
+ // move relative to unrotated object range
+ aTextBoxMatrix.translate(
+ aTextRange.getMinX() - aObjectRange.getMinimum().getX(),
+ aTextRange.getMinY() - aObjectRange.getMinimum().getY());
+ }
if(rGeoStat.nShearWink)
{
@@ -131,16 +190,18 @@ namespace sdr
aTextBoxMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000);
}
- if(!::basegfx::fTools::equalZero(fExtraTextRotation))
+ if(!basegfx::fTools::equalZero(fExtraTextRotation))
{
aTextBoxMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180);
}
- // move back
- aTextBoxMatrix.translate(fHalfWidth, fHalfHeight);
+ // give text it's target position
+ aTextBoxMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY());
+ }
+ else
+ {
+ aTextBoxMatrix.translate(aTextRange.getMinX(), aTextRange.getMinY());
}
-
- aTextBoxMatrix.translate(aTextBoxRange.getMinX(), aTextBoxRange.getMinY());
// check if SdrTextWordWrapItem is set
bWordWrap = ((SdrTextWordWrapItem&)(GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue();
@@ -155,7 +216,11 @@ namespace sdr
// create primitive
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrCustomShapePrimitive2D(
- *pAttribute, xGroup, aTextBoxMatrix, bWordWrap));
+ *pAttribute,
+ xGroup,
+ aTextBoxMatrix,
+ bWordWrap,
+ false)); // #SJ# New parameter to force to clipped BlockText for SC
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index e1b2867b0d66..3c239b12113c 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -45,6 +45,7 @@
#include <svtools/colorcfg.hxx>
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
#include <vcl/svapp.hxx>
+#include <svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -71,7 +72,8 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithGivenGraphic(const Graphic& rOLEGraphic, bool bScaleContent) const
+ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters(
+ bool bHighContrast) const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
SdrText* pSdrText = GetOle2Obj().getText(0);
@@ -103,80 +105,24 @@ namespace sdr
pAttribute = new drawinglayer::attribute::SdrLineFillShadowTextAttribute(0, 0, 0, 0, 0, 0);
}
- // Prepare OLE filling. This is normally the metafile describing OLE content, but may also
- // be the empty OLE bitmap for empty/not loaded OLEs
- const GraphicObject aGraphicObject(rOLEGraphic);
- const GraphicAttr aGraphicAttr;
- drawinglayer::primitive2d::Primitive2DSequence xOLEContent;
-
- if(bScaleContent)
- {
- // Create outline and placeholder graphic with some scaling
- // #i94431# for some reason, i forgot to take the PrefMapMode of the graphic
- // into account. Since EmptyPresObj's are only used in Draw/Impress, it is
- // safe to assume 100th mm as target.
- Size aPrefSize(rOLEGraphic.GetPrefSize());
-
- if(MAP_PIXEL == rOLEGraphic.GetPrefMapMode().GetMapUnit())
- {
- aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MAP_100TH_MM);
- }
- else
- {
- aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, rOLEGraphic.GetPrefMapMode(), MAP_100TH_MM);
- }
-
- const double fOffsetX((aObjectRange.getWidth() - aPrefSize.getWidth()) / 2.0);
- const double fOffsetY((aObjectRange.getHeight() - aPrefSize.getHeight()) / 2.0);
-
- if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0))
- {
- // if content fits into frame, create it
- basegfx::B2DHomMatrix aInnerObjectMatrix;
-
- aInnerObjectMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight());
- aInnerObjectMatrix.translate(fOffsetX, fOffsetY);
- aInnerObjectMatrix.shearX(fShearX);
- aInnerObjectMatrix.rotate(fRotate);
- aInnerObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY());
-
- drawinglayer::primitive2d::Primitive2DReference xScaledContent(
- new drawinglayer::primitive2d::GraphicPrimitive2D(aInnerObjectMatrix, aGraphicObject, aGraphicAttr));
- xOLEContent = drawinglayer::primitive2d::Primitive2DSequence(&xScaledContent, 1);
- }
- }
- else
- {
- // create graphic primitive for content
- drawinglayer::primitive2d::Primitive2DReference xDirectContent(
- new drawinglayer::primitive2d::GraphicPrimitive2D(aObjectMatrix, aGraphicObject, aGraphicAttr));
- xOLEContent = drawinglayer::primitive2d::Primitive2DSequence(&xDirectContent, 1);
- }
+ // #i102063# embed OLE content in an own primitive; this will be able to decompose accessing
+ // the weak SdrOle2 reference and will also implement getB2DRange() for fast BoundRect
+ // calculations without OLE Graphic access (which may trigger e.g. chart recalculation).
+ // It will also take care of HighContrast and ScaleContent
+ const drawinglayer::primitive2d::Primitive2DReference xOleContent(
+ new drawinglayer::primitive2d::SdrOleContentPrimitive2D(
+ GetOle2Obj(),
+ aObjectMatrix,
+ bHighContrast));
// create primitive. Use Ole2 primitive here. Prepare attribute settings, will be used soon anyways.
+ const drawinglayer::primitive2d::Primitive2DSequence xOLEContent(&xOleContent, 1);
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrOle2Primitive2D(
xOLEContent,
aObjectMatrix,
*pAttribute));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
delete pAttribute;
-
- // a standard gray outline is created for scaled content
- if(bScaleContent)
- {
- const svtools::ColorConfig aColorConfig;
- const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
-
- if(aColor.bIsVisible)
- {
- basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0, 0, 1, 1)));
- const Color aVclColor(aColor.nColor);
- aOutline.transform(aObjectMatrix);
- const drawinglayer::primitive2d::Primitive2DReference xOutline(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aVclColor.getBColor()));
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xOutline);
- }
- }
}
return xRetval;
@@ -184,21 +130,8 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createViewIndependentPrimitive2DSequence() const
{
- const Graphic* pOLEGraphic = GetOle2Obj().GetGraphic();
-
- if(pOLEGraphic)
- {
- // there is a graphic set, use it
- return createPrimitive2DSequenceWithGivenGraphic(*pOLEGraphic, GetOle2Obj().IsEmptyPresObj());
- }
- else
- {
- // no graphic, use default empty OLE bitmap
- const Bitmap aEmptyOLEBitmap(GetOle2Obj().GetEmtyOLEReplacementBitmap());
- const Graphic aEmtyOLEGraphic(aEmptyOLEBitmap);
-
- return createPrimitive2DSequenceWithGivenGraphic(aEmtyOLEGraphic, true);
- }
+ // do as if no HC and call standard creator
+ return createPrimitive2DSequenceWithParameters(false);
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index dc3fbcfaaa61..0f818ff40f7a 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -62,59 +62,86 @@ namespace sdr
if(pSdrText)
{
- drawinglayer::attribute::SdrLineFillShadowTextAttribute* pAttribute = drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(rItemSet, *pSdrText);
+ drawinglayer::attribute::SdrLineFillShadowTextAttribute* pAttribute =
+ drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
+ rItemSet,
+ *pSdrText);
if(pAttribute)
{
if(pAttribute->isVisible())
{
- // prepare object transformation and unit polygon (direct model data)
- ::basegfx::B2DHomMatrix aObjectMatrix;
- ::basegfx::B2DPolyPolygon aUnitPolyPolygon(GetPathObj().GetPathPoly());
- const bool bIsLine(
- !aUnitPolyPolygon.areControlPointsUsed()
- && 1L == aUnitPolyPolygon.count()
- && 2L == aUnitPolyPolygon.getB2DPolygon(0L).count());
-
- if(bIsLine)
- {
- // special handling for single line mode (2 points)
- const ::basegfx::B2DPolygon aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0L));
- const ::basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0L));
- const ::basegfx::B2DPoint aEnd(aSubPolygon.getB2DPoint(1L));
- const ::basegfx::B2DVector aLine(aEnd - aStart);
-
- // create new polygon
- ::basegfx::B2DPolygon aNewPolygon;
- aNewPolygon.append(::basegfx::B2DPoint(0.0, 0.0));
- aNewPolygon.append(::basegfx::B2DPoint(aLine.getLength(), 0.0));
- aUnitPolyPolygon.setB2DPolygon(0L, aNewPolygon);
-
- // fill objectMatrix with rotation and offset (no shear for lines, scale in polygon)
- aObjectMatrix.rotate(atan2(aLine.getY(), aLine.getX()));
- aObjectMatrix.translate(aStart.getX(), aStart.getY());
- }
- else
+ basegfx::B2DPolyPolygon aUnitPolyPolygon(GetPathObj().GetPathPoly());
+ const sal_uInt32 nPolyCount(aUnitPolyPolygon.count());
+
+ if(nPolyCount)
{
- // create scaled, but unsheared, unrotated and untranslated polygon
- // by creating the object matrix and back-transforming the polygon
- const ::basegfx::B2DRange aObjectRange(::basegfx::tools::getRange(aUnitPolyPolygon));
- const GeoStat& rGeoStat(GetPathObj().GetGeoStat());
-
- aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000));
- aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000);
- aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY());
-
- // ceate scaled unit polygon from object's absolute path
- ::basegfx::B2DHomMatrix aInverse(aObjectMatrix);
- aInverse.invert();
- aUnitPolyPolygon.transform(aInverse);
+ // prepare object transformation and unit polygon (direct model data)
+ basegfx::B2DHomMatrix aObjectMatrix;
+ const bool bIsLine(
+ !aUnitPolyPolygon.areControlPointsUsed()
+ && 1 == nPolyCount
+ && 2 == aUnitPolyPolygon.getB2DPolygon(0).count());
+
+ if(bIsLine)
+ {
+ // special handling for single line mode (2 points)
+ const basegfx::B2DPolygon aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0));
+ const basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0));
+ const basegfx::B2DPoint aEnd(aSubPolygon.getB2DPoint(1));
+ const basegfx::B2DVector aLine(aEnd - aStart);
+
+ // #i102548# create new unit polygon for line (horizontal)
+ basegfx::B2DPolygon aNewPolygon;
+ aNewPolygon.append(basegfx::B2DPoint(0.0, 0.0));
+ aNewPolygon.append(basegfx::B2DPoint(1.0, 0.0));
+ aUnitPolyPolygon.setB2DPolygon(0, aNewPolygon);
+
+ // #i102548# fill objectMatrix with rotation and offset (no shear for lines)
+ aObjectMatrix.scale(aLine.getLength(), 1.0);
+ aObjectMatrix.rotate(atan2(aLine.getY(), aLine.getX()));
+ aObjectMatrix.translate(aStart.getX(), aStart.getY());
+ }
+ else
+ {
+ // #i102548# create unscaled, unsheared, unrotated and untranslated polygon
+ // (unit polygon) by creating the object matrix and back-transforming the polygon
+ const basegfx::B2DRange aObjectRange(basegfx::tools::getRange(aUnitPolyPolygon));
+ const GeoStat& rGeoStat(GetPathObj().GetGeoStat());
+ const double fWidth(aObjectRange.getWidth());
+ const double fHeight(aObjectRange.getHeight());
+
+ aObjectMatrix.scale(
+ basegfx::fTools::equalZero(fWidth) ? 1.0 : fWidth,
+ basegfx::fTools::equalZero(fHeight) ? 1.0 : fHeight);
+
+ if(rGeoStat.nShearWink)
+ {
+ aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000));
+ }
+
+ if(rGeoStat.nDrehWink)
+ {
+ aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000);
+ }
+
+ aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY());
+
+ // ceate unit polygon from object's absolute path
+ basegfx::B2DHomMatrix aInverse(aObjectMatrix);
+ aInverse.invert();
+ aUnitPolyPolygon.transform(aInverse);
+ }
+
+ // create primitive
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::SdrPathPrimitive2D(
+ aObjectMatrix,
+ *pAttribute,
+ aUnitPolyPolygon));
+
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
-
- // create primitive
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::SdrPathPrimitive2D(aObjectMatrix, *pAttribute, aUnitPolyPolygon));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
delete pAttribute;
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index c48d110faaf2..8ba8ae8ab4c9 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -105,8 +105,14 @@ namespace sdr
drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY);
// create primitive
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrRectanglePrimitive2D(
- aObjectMatrix, *pAttribute, fCornerRadiusX, fCornerRadiusY));
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::SdrRectanglePrimitive2D(
+ aObjectMatrix,
+ *pAttribute,
+ fCornerRadiusX,
+ fCornerRadiusY,
+ GetRectObj().IsTextFrame()));
+
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index 99710ca308c9..7bea25feeeed 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -121,34 +121,18 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
ViewObjectContact& ViewContactOfUnoControl::CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact )
{
+ // print or print preview requires special handling
+ const OutputDevice* pDevice = _rObjectContact.TryToGetOutputDevice();
+ bool bPrintOrPreview = ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER );
+
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact );
- if ( pPageViewContact )
- {
- // special classes for special devices:
- // - PDF export
- ::vcl::PDFExtOutDevData* pPDFExport = PTR_CAST( ::vcl::PDFExtOutDevData, pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetExtOutDevData() );
- if ( pPDFExport != NULL )
- return *new UnoControlPDFExportContact( *pPageViewContact, *this );
-
- // - print preview
- if ( pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview() )
- return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
-
- OutDevType eDeviceType = pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetOutDevType();
- // - printing
- if ( eDeviceType == OUTDEV_PRINTER )
- return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
-
- // - any other virtual device
- if ( eDeviceType == OUTDEV_VIRDEV )
- return *new UnoControlDefaultContact( *pPageViewContact, *this );
-
- // - normal windows have special, design-mode dependent handling
- if ( eDeviceType == OUTDEV_WINDOW )
- return *new UnoControlWindowContact( *pPageViewContact, *this );
- }
+ bPrintOrPreview |= ( pPageViewContact != NULL ) && pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview();
+
+ if ( bPrintOrPreview )
+ return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
- return *new UnoControlDefaultContact( _rObjectContact, *this );
+ // all others are nowadays served by the same implementation
+ return *new ViewObjectContactOfUnoControl( _rObjectContact, *this );
}
//--------------------------------------------------------------------
@@ -171,7 +155,7 @@ namespace sdr { namespace contact {
aTransform.set(0, 2, aRange.getMinX());
aTransform.set(1, 2, aRange.getMinY());
- // create control primitive WITHOUT evtl. existing XControl; this would be done in
+ // create control primitive WITHOUT possibly existing XControl; this would be done in
// the VOC in createPrimitive2DSequence()
const drawinglayer::primitive2d::Primitive2DReference xRetval(new drawinglayer::primitive2d::ControlPrimitive2D(
aTransform, xControlModel));
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 394ae3141182..5e9ab788e392 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -38,6 +38,7 @@
#include <svx/svdograf.hxx>
#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/svdmodel.hxx>
+#include <svx/svdpage.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -219,6 +220,11 @@ namespace sdr
SdrGrafObj& rGrafObj = getSdrGrafObj();
rGrafObj.ForceSwapIn();
+ // #i103720# forget event to avoid possible deletion by the following ActionChanged call
+ // which may use createPrimitive2DSequence/impPrepareGraphicWithAsynchroniousLoading again.
+ // Deletion is actally done by the scheduler who leaded to coming here
+ mpAsynchLoadEvent = 0;
+
// Invalidate all paint areas and check existing animation (which may have changed).
GetViewContact().ActionChanged();
}
@@ -229,11 +235,15 @@ namespace sdr
void ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent)
{
(void) pEvent; // suppress warning
- DBG_ASSERT(mpAsynchLoadEvent, "ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: I did not trigger a event, why am i called (?)");
- DBG_ASSERT(mpAsynchLoadEvent == pEvent, "ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: Forced to forget another event then i have scheduled (?)");
- // forget event
- mpAsynchLoadEvent = 0;
+ if(mpAsynchLoadEvent)
+ {
+ OSL_ENSURE(!pEvent || mpAsynchLoadEvent == pEvent,
+ "ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: Forced to forget another event then i have scheduled (?)");
+
+ // forget event
+ mpAsynchLoadEvent = 0;
+ }
}
SdrGrafObj& ViewObjectContactOfGraphic::getSdrGrafObj()
@@ -245,10 +255,19 @@ namespace sdr
{
// prepare primitive generation with evtl. loading the graphic when it's swapped out
SdrGrafObj& rGrafObj = const_cast< ViewObjectContactOfGraphic* >(this)->getSdrGrafObj();
- const bool bDoAsynchronGraphicLoading(rGrafObj.GetModel() && rGrafObj.GetModel()->IsSwapGraphics());
+ bool bDoAsynchronGraphicLoading(rGrafObj.GetModel() && rGrafObj.GetModel()->IsSwapGraphics());
static bool bSuppressAsynchLoading(false);
bool bSwapInDone(false);
+ if(bDoAsynchronGraphicLoading
+ && rGrafObj.IsSwappedOut()
+ && rGrafObj.GetPage()
+ && rGrafObj.GetPage()->IsMasterPage())
+ {
+ // #i102380# force Swap-In for GraphicObjects on MasterPage to have a nicer visualisation
+ bDoAsynchronGraphicLoading = false;
+ }
+
if(bDoAsynchronGraphicLoading && !bSuppressAsynchLoading)
{
bSwapInDone = const_cast< ViewObjectContactOfGraphic* >(this)->impPrepareGraphicWithAsynchroniousLoading();
@@ -261,6 +280,23 @@ namespace sdr
// get return value by calling parent
drawinglayer::primitive2d::Primitive2DSequence xRetval = ViewObjectContactOfSdrObj::createPrimitive2DSequence(rDisplayInfo);
+ if(xRetval.hasElements())
+ {
+ // #i103255# suppress when graphic needs draft visualisation and output
+ // is for PDF export/Printer
+ const ViewContactOfGraphic& rVCOfGraphic = static_cast< const ViewContactOfGraphic& >(GetViewContact());
+
+ if(rVCOfGraphic.visualisationUsesDraft())
+ {
+ const ObjectContact& rObjectContact = GetObjectContact();
+
+ if(rObjectContact.isOutputToPDFFile() || rObjectContact.isOutputToPrinter())
+ {
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence();
+ }
+ }
+ }
+
// if swap in was forced only for printing, swap out again
const bool bSwapInExclusiveForPrinting(bSwapInDone && GetObjectContact().isOutputToPrinter());
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 87288882995e..34fddf088c98 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -291,7 +291,8 @@ namespace sdr
}
// add a gray outline frame, except not when printing
- if(!GetObjectContact().isOutputToPrinter())
+ // #i102637# add frame also when printing and page exists (handout pages)
+ if(!GetObjectContact().isOutputToPrinter() || pPage)
{
const Color aFrameColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES).nColor);
basegfx::B2DPolygon aOwnOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)));
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
index d5681c60463e..635ae9c7fcc8 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
@@ -37,10 +37,13 @@
#include <svx/sdr/contact/viewcontactofsdrole2obj.hxx>
#include <svx/svdoole2.hxx>
#include <svx/sdr/contact/objectcontact.hxx>
+#include <svx/svdview.hxx>
#include <drawinglayer/primitive2d/chartprimitive2d.hxx>
#include <drawinglayer/attribute/fillattribute.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <com/sun/star/embed/EmbedMisc.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
//////////////////////////////////////////////////////////////////////////////
@@ -57,136 +60,173 @@ namespace sdr
return static_cast< ViewContactOfSdrOle2Obj& >(GetViewContact()).GetOle2Obj();
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence(
+ const DisplayInfo& /*rDisplayInfo*/) const
{
// this method is overloaded to do some things the old SdrOle2Obj::DoPaintObject did.
// In the future, some of these may be solved different, but ATM try to stay compatible
// with the old behaviour
drawinglayer::primitive2d::Primitive2DSequence xRetval;
const SdrOle2Obj& rSdrOle2 = getSdrOle2Object();
- const bool bIsActive(rSdrOle2.executeOldDoPaintPreparations(GetObjectContact().TryToGetSdrPageView()));
- const Rectangle& rObjectRectangle(rSdrOle2.GetGeoRect());
- const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom());
-
- // create object transform
- basegfx::B2DHomMatrix aObjectTransform;
- aObjectTransform.set(0, 0, aObjectRange.getWidth());
- aObjectTransform.set(1, 1, aObjectRange.getHeight());
- aObjectTransform.set(0, 2, aObjectRange.getMinX());
- aObjectTransform.set(1, 2, aObjectRange.getMinY());
-
- if(GetObjectContact().isDrawModeHighContrast())
- {
- // directly call at the corresponding VC and force OLE Graphic to HighContrast
- const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact());
- Graphic* pOLEHighContrastGraphic = rSdrOle2.getEmbeddedObjectRef().GetHCGraphic();
+ sal_Int32 nState(-1);
- if(pOLEHighContrastGraphic)
- {
- // there is a graphic set, use it
- xRetval = rVC.createPrimitive2DSequenceWithGivenGraphic(*pOLEHighContrastGraphic, rSdrOle2.IsEmptyPresObj());
- }
- else
- {
- // no HighContrast graphic, use default empty OLE bitmap
- const Bitmap aEmptyOLEBitmap(rSdrOle2.GetEmtyOLEReplacementBitmap());
- const Graphic aEmtyOLEGraphic(aEmptyOLEBitmap);
-
- xRetval = rVC.createPrimitive2DSequenceWithGivenGraphic(aEmtyOLEGraphic, true);
- }
- }
- else
{
- // call parent which will use the regular createViewIndependentPrimitive2DSequence
- // at the corresponding VC
- xRetval = ViewObjectContactOfSdrObj::createPrimitive2DSequence(rDisplayInfo);
+ const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef();
+ if ( xObjRef.is() )
+ nState = xObjRef->getCurrentState();
}
- if(rSdrOle2.getEmbeddedObjectRef().IsChart())
+ const bool bIsOutplaceActive(nState == embed::EmbedStates::ACTIVE);
+ const bool bIsInplaceActive((nState == embed::EmbedStates::INPLACE_ACTIVE) || (nState == embed::EmbedStates::UI_ACTIVE));
+ const bool bIsChart(rSdrOle2.IsChart());
+ bool bDone(false);
+
+ if(!bDone && bIsInplaceActive)
{
- // for chart, to not lose the current better quality visualisation which
- // uses a direct paint, use a primtive wrapper for that exceptional case. The renderers
- // will then ATM paint it to an OutputDevice directly.
- // In later versions this should be replaced by getting the Primitive2DSequnce from
- // the chart and using it.
- // to be able to render something in non-VCL using renderers, the wrapper is a
- // GroupPrimitive2D which automatically decomposes to the already created Metafile
- // content.
- // For being completely compatible, ATM Window and VDEV PrettyPrinting is suppressed.
- // It works in the VCL renderers, though. So for activating again with VCL primitive
- // renderers, change conditions here.
-
- // determine if embedding and PrettyPrinting shall be done at all
- uno::Reference< frame::XModel > xChartModel;
- bool bDoChartPrettyPrinting(true);
- static bool bPrettyPrintingForBitmaps(false);
-
- // the original ChartPrettyPainter does not do it for Window
- if(!bPrettyPrintingForBitmaps && bDoChartPrettyPrinting && GetObjectContact().isOutputToWindow())
+ if( !GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile() )
{
- bDoChartPrettyPrinting = false;
+ //no need to create a primitive sequence here as the OLE object does render itself
+ //in case of charts the superfluous creation of a metafile is strongly performance relevant!
+ bDone = true;
}
+ }
+
+ if( !bDone )
+ {
+ const Rectangle& rObjectRectangle(rSdrOle2.GetGeoRect());
+ const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom());
- // the original ChartPrettyPainter does not do it for VDEV
- if(!bPrettyPrintingForBitmaps && bDoChartPrettyPrinting && GetObjectContact().isOutputToVirtualDevice())
+ // create object transform
+ basegfx::B2DHomMatrix aObjectTransform;
+ aObjectTransform.set(0, 0, aObjectRange.getWidth());
+ aObjectTransform.set(1, 1, aObjectRange.getHeight());
+ aObjectTransform.set(0, 2, aObjectRange.getMinX());
+ aObjectTransform.set(1, 2, aObjectRange.getMinY());
+
+ if(bIsChart)
{
- if(GetObjectContact().isOutputToPDFFile())
+ //charts must be painted resolution dependent!! #i82893#, #i75867#
+
+ // for chart, to not lose the current better quality visualisation which
+ // uses a direct paint, use a primtive wrapper for that exceptional case. The renderers
+ // will then ATM paint it to an OutputDevice directly.
+ // In later versions this should be replaced by getting the Primitive2DSequnce from
+ // the chart and using it.
+ // to be able to render something in non-VCL using renderers, the wrapper is a
+ // GroupPrimitive2D which automatically decomposes to the already created Metafile
+ // content.
+ // For being completely compatible, ATM Window and VDEV PrettyPrinting is suppressed.
+ // It works in the VCL renderers, though. So for activating again with VCL primitive
+ // renderers, change conditions here.
+
+ // determine if embedding and PrettyPrinting shall be done at all
+ uno::Reference< frame::XModel > xChartModel;
+ bool bDoChartPrettyPrinting(true);
+
+ // the original ChartPrettyPainter does not do it for Window
+ if(bDoChartPrettyPrinting && GetObjectContact().isOutputToWindow())
{
- // #i97982#
- // For PDF files, allow PrettyPrinting
+ bDoChartPrettyPrinting = false;
}
- else
+
+ // the original ChartPrettyPainter does not do it for VDEV
+ if(bDoChartPrettyPrinting && GetObjectContact().isOutputToVirtualDevice())
{
- bDoChartPrettyPrinting = false;
+ if(GetObjectContact().isOutputToPDFFile())
+ {
+ // #i97982#
+ // For PDF files, allow PrettyPrinting
+ }
+ else
+ {
+ bDoChartPrettyPrinting = false;
+ }
}
- }
- // the chart model is needed. Check if it's available
- if(bDoChartPrettyPrinting)
- {
- // get chart model
- xChartModel = rSdrOle2.getXModel();
+ // the chart model is needed. Check if it's available
+ if(bDoChartPrettyPrinting)
+ {
+ // get chart model
+ xChartModel = rSdrOle2.getXModel();
- if(!xChartModel.is())
+ if(!xChartModel.is())
+ {
+ bDoChartPrettyPrinting = false;
+ }
+ }
+
+ if(bDoChartPrettyPrinting)
{
- bDoChartPrettyPrinting = false;
+ // embed MetaFile data in a specialized Wrapper Primitive which holds also the ChartModel needed
+ // for PrettyPrinting
+ const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ChartPrimitive2D(
+ xChartModel, aObjectTransform, xRetval));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ bDone = true;
}
}
- if(bDoChartPrettyPrinting)
+ if( !bDone )
{
- // embed MetaFile data in a specialized Wrapper Primitive which holds also the ChartModel needed
- // for PrettyPrinting
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ChartPrimitive2D(
- xChartModel, aObjectTransform, xRetval));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ //old stuff that should be reworked
+ {
+ //if no replacement image is available load the OLE object
+ if(!rSdrOle2.GetGraphic()) //try to fetch the metafile - this can lead to the actual creation of the metafile what can be extremely expensive (e.g. for big charts)!!! #i101925#
+ {
+ // try to create embedded object
+ rSdrOle2.GetObjRef(); //this loads the OLE object if it is not loaded already
+ }
+ const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef();
+ if(xObjRef.is())
+ {
+ const sal_Int64 nMiscStatus(xObjRef->getStatus(rSdrOle2.GetAspect()));
+
+ // this hack (to change model data during PAINT argh(!)) should be reworked
+ if(!rSdrOle2.IsResizeProtect() && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE))
+ {
+ const_cast< SdrOle2Obj* >(&rSdrOle2)->SetResizeProtect(true);
+ }
+
+ SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView();
+ if(pPageView && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE))
+ {
+ // connect plugin object
+ pPageView->GetView().DoConnect(const_cast< SdrOle2Obj* >(&rSdrOle2));
+ }
+ }
+ }//end old stuff to rework
+
+ // create OLE primitive stuff directly at VC with HC as parameter
+ const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact());
+ xRetval = rVC.createPrimitive2DSequenceWithParameters(GetObjectContact().isDrawModeHighContrast());
}
- }
- if(bIsActive)
- {
- // do not shade when printing or PDF exporting
- if(!GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile())
+ if(bIsOutplaceActive)
{
- // shade the representation if the object is activated outplace
- basegfx::B2DPolygon aObjectOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)));
- aObjectOutline.transform(aObjectTransform);
-
- // Use a FillHatchPrimitive2D with necessary attributes
- const drawinglayer::attribute::FillHatchAttribute aFillHatch(
- drawinglayer::attribute::HATCHSTYLE_SINGLE, // single hatch
- 125.0, // 1.25 mm
- 45.0 * F_PI180, // 45 degree diagonal
- Color(COL_BLACK).getBColor(), // black color
- false); // no filling
-
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D(
- basegfx::B2DPolyPolygon(aObjectOutline),
- Color(COL_BLACK).getBColor(),
- aFillHatch));
-
- drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference);
+ // do not shade when printing or PDF exporting
+ if(!GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile())
+ {
+ // shade the representation if the object is activated outplace
+ basegfx::B2DPolygon aObjectOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)));
+ aObjectOutline.transform(aObjectTransform);
+
+ // Use a FillHatchPrimitive2D with necessary attributes
+ const drawinglayer::attribute::FillHatchAttribute aFillHatch(
+ drawinglayer::attribute::HATCHSTYLE_SINGLE, // single hatch
+ 125.0, // 1.25 mm
+ 45.0 * F_PI180, // 45 degree diagonal
+ Color(COL_BLACK).getBColor(), // black color
+ false); // no filling
+
+ const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D(
+ basegfx::B2DPolyPolygon(aObjectOutline),
+ Color(COL_BLACK).getBColor(),
+ aFillHatch));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference);
+ }
}
+
}
return xRetval;
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index ea260f3285f7..bbfe3eaf65ab 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -30,11 +30,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include <svx/sdr/contact/viewobjectcontactofunocontrol.hxx>
#include <svx/sdr/contact/viewcontactofunocontrol.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/sdr/properties/properties.hxx>
#include <svx/sdr/contact/objectcontactofpageview.hxx>
+#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
+#include <svx/svdouno.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/svdview.hxx>
+#include <svx/sdrpagewindow.hxx>
+#include "sdrpaintwindow.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -52,23 +59,21 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XContainer.hpp>
/** === end UNO includes === **/
-#include <svx/svdouno.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/svdview.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include "sdrpaintwindow.hxx"
+
#include <toolkit/helper/formpdfexport.hxx>
#include <vcl/pdfextoutdevdata.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/scopeguard.hxx>
#include <cppuhelper/implbase4.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
-
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
+
#include <boost/shared_ptr.hpp>
+#include <boost/bind.hpp>
//........................................................................
namespace sdr { namespace contact {
@@ -80,6 +85,7 @@ namespace sdr { namespace contact {
using ::com::sun::star::uno::XInterface;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::awt::XControl;
@@ -175,7 +181,11 @@ namespace sdr { namespace contact {
inline void addWindowListener( const Reference< XWindowListener >& _l ) const { m_xControlWindow->addWindowListener( _l ); }
inline void removeWindowListener( const Reference< XWindowListener >& _l ) const { m_xControlWindow->removeWindowListener( _l ); }
void setPosSize( const Rectangle& _rPosSize ) const;
- void setZoom( const MapMode& _rMapMode ) const;
+ Rectangle
+ getPosSize() const;
+ void setZoom( const ::basegfx::B2DVector& _rScale ) const;
+ ::basegfx::B2DVector
+ getZoom() const;
inline void setGraphics( const Reference< XGraphics >& _g ) const { m_xControlView->setGraphics( _g ); }
inline Reference< XGraphics >
@@ -214,17 +224,50 @@ namespace sdr { namespace contact {
void ControlHolder::setPosSize( const Rectangle& _rPosSize ) const
{
// no check whether we're valid, this is the responsibility of the caller
- m_xControlWindow->setPosSize(
- _rPosSize.Left(), _rPosSize.Top(), _rPosSize.GetWidth(), _rPosSize.GetHeight(),
- POSSIZE
- );
+
+ // don't call setPosSize when pos/size did not change
+ // #i104181# / 2009-08-18 / frank.schoenheit@sun.com
+ ::Rectangle aCurrentRect( getPosSize() );
+ if ( aCurrentRect != _rPosSize )
+ {
+ m_xControlWindow->setPosSize(
+ _rPosSize.Left(), _rPosSize.Top(), _rPosSize.GetWidth(), _rPosSize.GetHeight(),
+ POSSIZE
+ );
+ }
+ }
+
+ //--------------------------------------------------------------------
+ ::Rectangle ControlHolder::getPosSize() const
+ {
+ // no check whether we're valid, this is the responsibility of the caller
+ return VCLUnoHelper::ConvertToVCLRect( m_xControlWindow->getPosSize() );
+ }
+
+ //--------------------------------------------------------------------
+ void ControlHolder::setZoom( const ::basegfx::B2DVector& _rScale ) const
+ {
+ // no check whether we're valid, this is the responsibility of the caller
+ m_xControlView->setZoom( (float)_rScale.getX(), (float)_rScale.getY() );
}
//--------------------------------------------------------------------
- void ControlHolder::setZoom( const MapMode& _rMapMode ) const
+ ::basegfx::B2DVector ControlHolder::getZoom() const
{
// no check whether we're valid, this is the responsibility of the caller
- m_xControlView->setZoom( (float)double( _rMapMode.GetScaleX() ), (float)double( _rMapMode.GetScaleY() ) );
+
+ // Argh. Why does XView have a setZoom only, but not a getZoom?
+ Window* pWindow = VCLUnoHelper::GetWindow( m_xControlWindow );
+ OSL_ENSURE( pWindow, "ControlHolder::setZoom: no implementation access!" );
+
+ ::basegfx::B2DVector aZoom( 1, 1 );
+ if ( pWindow )
+ {
+ const Fraction& rZoom( pWindow->GetZoom() );
+ aZoom.setX( (double)rZoom );
+ aZoom.setY( (double)rZoom );
+ }
+ return aZoom;
}
//====================================================================
@@ -233,37 +276,13 @@ namespace sdr { namespace contact {
class UnoControlContactHelper
{
public:
- /** positions a control relative to a device
-
- @precond <arg>_pDevice</arg> is not <NULL/>
+ /** positions a control, and sets its zoom mode, using a given transformation and output device
*/
- static void positionControl_throw(
+ static void adjustControlGeometry_throw(
const ControlHolder& _rControl,
const Rectangle& _rLogicBoundingRect,
- const OutputDevice* _pDevice
- );
-
- /** sets the zoom at a UNO control, according to a Device's MapMode
-
- @precond <arg>_pDevice</arg> is not <NULL/>
- */
- static void setControlZoom(
- const ControlHolder& _rControl,
- const OutputDevice* _pDevice
- );
-
- /** draws a given control onto it's current XGraphics, at given coordinates
-
- Note that the control is not drawn onto the given device, instead you must
- use ->XView::setGraphics yourself, before calling this method. The given ->OutputDevice
- is only used to calculate pixel coordinates from logic coordinates
-
- @precond <arg>_pDevice</arg> is not <NULL/>
- */
- static void drawControl(
- const ControlHolder& _rControl,
- const Point& _rLogicTopLeft,
- const OutputDevice* _pDevice
+ const ::basegfx::B2DHomMatrix& _rViewTransformation,
+ const ::basegfx::B2DHomMatrix& _rZoomLevelNormalization
);
/** disposes the given control
@@ -279,50 +298,28 @@ namespace sdr { namespace contact {
};
//--------------------------------------------------------------------
- void UnoControlContactHelper::positionControl_throw( const ControlHolder& _rControl, const Rectangle& _rLogicBoundingRect,
- const OutputDevice* _pDevice )
- {
- OSL_PRECOND( _pDevice, "UnoControlContactHelper::positionControl_throw: no device -> no survival!" );
-
- if ( _rControl.is() )
- {
- const Rectangle aPaintRectPixel(
- _pDevice->LogicToPixel( _rLogicBoundingRect.TopLeft() ),
- _pDevice->LogicToPixel( _rLogicBoundingRect.GetSize() )
- );
-
- _rControl.setPosSize( aPaintRectPixel );
- }
- }
-
- //--------------------------------------------------------------------
- void UnoControlContactHelper::setControlZoom( const ControlHolder& _rControl, const OutputDevice* _pDevice )
- {
- OSL_PRECOND( _pDevice, "UnoControlContactHelper::setControlZoom: no device -> no survival!" );
- OSL_PRECOND( _rControl.is(), "UnoControlContactHelper::setControlZoom: illegal control!" );
-
- if ( _rControl.is() )
- _rControl.setZoom( _pDevice->GetMapMode() );
- }
-
- //--------------------------------------------------------------------
- void UnoControlContactHelper::drawControl( const ControlHolder& _rControl, const Point& _rLogicTopLeft,
- const OutputDevice* _pDevice )
+ void UnoControlContactHelper::adjustControlGeometry_throw( const ControlHolder& _rControl, const Rectangle& _rLogicBoundingRect,
+ const basegfx::B2DHomMatrix& _rViewTransformation, const ::basegfx::B2DHomMatrix& _rZoomLevelNormalization )
{
- OSL_PRECOND( _rControl.is(), "UnoControlContactHelper::drawControl: invalid control!" );
+ OSL_PRECOND( _rControl.is(), "UnoControlContactHelper::adjustControlGeometry_throw: illegal control!" );
if ( !_rControl.is() )
return;
- try
- {
- _rControl.draw(
- _pDevice->LogicToPixel( _rLogicTopLeft )
- );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
+ // transform the logic bound rect, using the view transformation, to pixel coordinates
+ ::basegfx::B2DPoint aTopLeft( _rLogicBoundingRect.Left(), _rLogicBoundingRect.Top() );
+ aTopLeft *= _rViewTransformation;
+ ::basegfx::B2DPoint aBottomRight( _rLogicBoundingRect.Right(), _rLogicBoundingRect.Bottom() );
+ aBottomRight *= _rViewTransformation;
+
+ const Rectangle aPaintRectPixel( (long)aTopLeft.getX(), (long)aTopLeft.getY(), (long)aBottomRight.getX(), (long)aBottomRight.getY() );
+ _rControl.setPosSize( aPaintRectPixel );
+
+ // determine the scale from the current view transformation, and the normalization matrix
+ ::basegfx::B2DHomMatrix aObtainResolutionDependentScale( _rViewTransformation * _rZoomLevelNormalization );
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ aObtainResolutionDependentScale.decompose( aScale, aTranslate, fRotate, fShearX );
+ _rControl.setZoom( aScale );
}
//--------------------------------------------------------------------
@@ -402,14 +399,21 @@ namespace sdr { namespace contact {
}
//====================================================================
- //= DummyPageViewAccess
+ //= InvisibleControlViewAccess
//====================================================================
- /** is a ->IPageViewAccess implementation which defaults all attribute access, and thus can be
- operated without an actual ->SdrPageView
+ /** is a ->IPageViewAccess implementation which can be used to create an invisble control for
+ an arbitrary window
*/
- class DummyPageViewAccess : public IPageViewAccess
+ class InvisibleControlViewAccess : public IPageViewAccess
{
+ private:
+ Reference< XControlContainer >& m_rControlContainer;
public:
+ InvisibleControlViewAccess( Reference< XControlContainer >& _inout_ControlContainer )
+ :m_rControlContainer( _inout_ControlContainer )
+ {
+ }
+
virtual bool isDesignMode() const;
virtual Reference< XControlContainer >
getControlContainer( const OutputDevice& _rDevice ) const;
@@ -417,36 +421,44 @@ namespace sdr { namespace contact {
};
//--------------------------------------------------------------------
- bool DummyPageViewAccess::isDesignMode() const
+ bool InvisibleControlViewAccess::isDesignMode() const
{
return true;
}
//--------------------------------------------------------------------
- Reference< XControlContainer > DummyPageViewAccess::getControlContainer( const OutputDevice& /*_rDevice*/ ) const
+ Reference< XControlContainer > InvisibleControlViewAccess::getControlContainer( const OutputDevice& _rDevice ) const
{
- return Reference< XControlContainer >();
+ if ( !m_rControlContainer.is() )
+ {
+ const Window* pWindow = dynamic_cast< const Window* >( &_rDevice );
+ OSL_ENSURE( pWindow, "InvisibleControlViewAccess::getControlContainer: expected to be called for a window only!" );
+ if ( pWindow )
+ m_rControlContainer = VCLUnoHelper::CreateControlContainer( const_cast< Window* >( pWindow ) );
+ }
+ return m_rControlContainer;
}
//--------------------------------------------------------------------
- bool DummyPageViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const
+ bool InvisibleControlViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const
{
- return true;
+ return false;
}
//====================================================================
//= DummyPageViewAccess
//====================================================================
- /** is a ->IPageViewAccess implementation which can be used to create an invisble control for
- an arbitrary device
+ /** is a ->IPageViewAccess implementation which can be used to create a control for an arbitrary
+ non-Window device
+
+ The implementation will report the "PageView" as being in design mode, all layers to be visible,
+ and will not return any ControlContainer, so all control container related features (notifications etc)
+ are not available.
*/
- class InvisibleControlViewAccess : public IPageViewAccess
+ class DummyPageViewAccess : public IPageViewAccess
{
- private:
- Reference< XControlContainer >& m_rControlContainer;
public:
- InvisibleControlViewAccess( Reference< XControlContainer >& _inout_ControlContainer )
- :m_rControlContainer( _inout_ControlContainer )
+ DummyPageViewAccess()
{
}
@@ -457,28 +469,21 @@ namespace sdr { namespace contact {
};
//--------------------------------------------------------------------
- bool InvisibleControlViewAccess::isDesignMode() const
+ bool DummyPageViewAccess::isDesignMode() const
{
return true;
}
//--------------------------------------------------------------------
- Reference< XControlContainer > InvisibleControlViewAccess::getControlContainer( const OutputDevice& _rDevice ) const
+ Reference< XControlContainer > DummyPageViewAccess::getControlContainer( const OutputDevice& /*_rDevice*/ ) const
{
- if ( !m_rControlContainer.is() )
- {
- const Window* pWindow = dynamic_cast< const Window* >( &_rDevice );
- OSL_ENSURE( pWindow, "InvisibleControlViewAccess::getControlContainer: expected to be called for a window only!" );
- if ( pWindow )
- m_rControlContainer = VCLUnoHelper::CreateControlContainer( const_cast< Window* >( pWindow ) );
- }
- return m_rControlContainer;
+ return NULL;
}
//--------------------------------------------------------------------
- bool InvisibleControlViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const
+ bool DummyPageViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const
{
- return false;
+ return true;
}
//====================================================================
@@ -494,7 +499,10 @@ namespace sdr { namespace contact {
{
private:
/// the instance whose IMPL we are
- ViewObjectContactOfUnoControl* m_pAntiImpl;
+ ViewObjectContactOfUnoControl* m_pAntiImpl;
+
+ /// are we currently inside impl_ensureControl_nothrow?
+ bool m_bCreatingControl;
/** thread safety
@@ -510,7 +518,7 @@ namespace sdr { namespace contact {
Reference< XContainer > m_xContainer;
/// the output device for which the control was created
- OutputDevice const* m_pOutputDeviceForWindow;
+ const OutputDevice* m_pOutputDeviceForWindow;
/// flag indicating whether the control is currently visible
bool m_bControlIsVisible;
@@ -527,6 +535,8 @@ namespace sdr { namespace contact {
/// is the control currently in design mode?
mutable ViewControlMode m_eControlDesignMode;
+ ::basegfx::B2DHomMatrix m_aZoomLevelNormalization;
+
public:
ViewObjectContactOfUnoControl_Impl( ViewObjectContactOfUnoControl* _pAntiImpl );
@@ -549,17 +559,13 @@ namespace sdr { namespace contact {
*/
bool getUnoObject( SdrUnoObj*& _out_rpObject ) const;
- /** ensures that we have an XControl which can be painted onto the given display
- */
- bool ensureControl( const DisplayInfo& _rDisplayInfo );
-
/** ensures that we have an ->XControl
Must only be called if a control is needed when no DisplayInfo is present, yet.
- For creating a control, an ->OutputDevice is needed, and an ->SdrPageView. Both can only be
- obtained from a ->DisplayInfo struct, or alternatively a ->ObjectContactOfPageView. So, if
- our (anti-impl's) object contact is not a ->ObjectContactOfPageView, this method fill fail.
+ For creating a control, an ->OutputDevice is needed, and an ->SdrPageView. Both will be obtained
+ from a ->ObjectContactOfPageView. So, if our (anti-impl's) object contact is not a ->ObjectContactOfPageView,
+ this method fill fail.
Failure of this method will be reported via an assertion in a non-product version.
*/
@@ -572,22 +578,16 @@ namespace sdr { namespace contact {
inline const ControlHolder&
getExistentControl() const { return m_aControl; }
- /** positions our XControl according to the geometry settings in the SdrUnoObj,
- and sets proper zoom settings according to our device
+ inline bool
+ hasControl() const { return m_aControl.is(); }
+
+ /** positions our XControl according to the geometry settings in the SdrUnoObj, modified by the given
+ transformation, and sets proper zoom settings according to our device
@precond
->m_pOutputDeviceForWindow and ->m_aControl are not <NULL/>
- @tolerant
- If the preconditions are not met, nothing is done at all
- */
- void positionAndZoomControl() const;
-
- /** positions the control for a paint onto a given device
-
- If we do not (yet) have a control, or the control does not belong to the
- device for which a paint is requested, no positioning happens.
*/
- void positionControlForPaint( const DisplayInfo& _rDisplayInfo ) const;
+ void positionAndZoomControl( const basegfx::B2DHomMatrix& _rViewTransformation ) const;
/** determines whether or not our control is printable
@@ -626,6 +626,13 @@ namespace sdr { namespace contact {
struct GuardAccess { friend class VOCGuard; private: GuardAccess() { } };
::osl::Mutex& getMutex( GuardAccess ) const { return m_aMutex; }
+ const ViewContactOfUnoControl&
+ getViewContact() const
+ {
+ ENSURE_OR_THROW( !impl_isDisposed_nofail(), "already disposed" );
+ return static_cast< const ViewContactOfUnoControl& >( m_pAntiImpl->GetViewContact() );
+ }
+
protected:
~ViewObjectContactOfUnoControl_Impl();
@@ -797,10 +804,12 @@ namespace sdr { namespace contact {
This method cares for this, by retrieving the very original OutputDevice.
*/
- const OutputDevice& imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ) const;
+ static const OutputDevice& impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact );
+
+ const OutputDevice& impl_getOutputDevice_throw() const;
private:
- ViewObjectContactOfUnoControl_Impl(); // never implemented
+ ViewObjectContactOfUnoControl_Impl(); // never implemented
ViewObjectContactOfUnoControl_Impl( const ViewObjectContactOfUnoControl_Impl& ); // never implemented
ViewObjectContactOfUnoControl_Impl& operator=( const ViewObjectContactOfUnoControl_Impl& ); // never implemented
};
@@ -812,32 +821,103 @@ namespace sdr { namespace contact {
*/
class VOCGuard
{
- const ViewObjectContactOfUnoControl_Impl& m_rImpl;
- ::osl::MutexGuard m_aMutexGuard;
+ private:
+ ::osl::MutexGuard m_aMutexGuard;
public:
VOCGuard( const ViewObjectContactOfUnoControl_Impl& _rImpl )
- :m_rImpl( _rImpl )
- ,m_aMutexGuard( _rImpl.getMutex( ViewObjectContactOfUnoControl_Impl::GuardAccess() ) )
+ :m_aMutexGuard( _rImpl.getMutex( ViewObjectContactOfUnoControl_Impl::GuardAccess() ) )
{
}
};
//====================================================================
+ //= LazyControlCreationPrimitive2D
+ //====================================================================
+ class LazyControlCreationPrimitive2D : public ::drawinglayer::primitive2d::BasePrimitive2D
+ {
+ private:
+ typedef ::drawinglayer::primitive2d::BasePrimitive2D BasePrimitive2D;
+
+ protected:
+ virtual ::drawinglayer::primitive2d::Primitive2DSequence
+ get2DDecomposition(
+ const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
+ ) const;
+
+ virtual ::drawinglayer::primitive2d::Primitive2DSequence
+ createLocalDecomposition(
+ const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
+ ) const;
+
+ virtual ::basegfx::B2DRange
+ getB2DRange(
+ const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
+ ) const;
+
+ public:
+ LazyControlCreationPrimitive2D( const ::rtl::Reference< ViewObjectContactOfUnoControl_Impl >& _pVOCImpl )
+ :m_pVOCImpl( _pVOCImpl )
+ {
+ ENSURE_OR_THROW( m_pVOCImpl.is(), "Illegal argument." );
+ getTransformation( m_pVOCImpl->getViewContact(), m_aTransformation );
+ }
+
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ // declare unique ID for this primitive class
+ DeclPrimitrive2DIDBlock()
+
+ static void getTransformation( const ViewContactOfUnoControl& _rVOC, ::basegfx::B2DHomMatrix& _out_Transformation );
+
+ private:
+ void impl_positionAndZoomControl( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
+ {
+ if ( !_rViewInformation.getViewport().isEmpty() )
+ m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
+ }
+
+ private:
+ ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pVOCImpl;
+ /** The geometry is part of the identity of an primitive, so we cannot calculate it on demand
+ (since the data the calculation is based on might have changed then), but need to calc
+ it at construction time, and remember it.
+ */
+ ::basegfx::B2DHomMatrix m_aTransformation;
+ };
+
+ //====================================================================
//= ViewObjectContactOfUnoControl_Impl
//====================================================================
DBG_NAME( ViewObjectContactOfUnoControl_Impl )
//--------------------------------------------------------------------
ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl( ViewObjectContactOfUnoControl* _pAntiImpl )
:m_pAntiImpl( _pAntiImpl )
+ ,m_bCreatingControl( false )
,m_pOutputDeviceForWindow( NULL )
,m_bControlIsVisible( false )
,m_bIsDesignModeListening( false )
,m_eControlDesignMode( eUnknown )
+ ,m_aZoomLevelNormalization()
{
DBG_CTOR( ViewObjectContactOfUnoControl_Impl, NULL );
DBG_ASSERT( m_pAntiImpl, "ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl: invalid AntiImpl!" );
- }
+
+ const OutputDevice& rPageViewDevice( impl_getOutputDevice_throw() );
+ m_aZoomLevelNormalization = rPageViewDevice.GetInverseViewTransformation();
+
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+
+ ::basegfx::B2DHomMatrix aScaleNormalization;
+ MapMode aCurrentDeviceMapMode( rPageViewDevice.GetMapMode() );
+ aScaleNormalization.set( 0, 0, (double)aCurrentDeviceMapMode.GetScaleX() );
+ aScaleNormalization.set( 1, 1, (double)aCurrentDeviceMapMode.GetScaleY() );
+ m_aZoomLevelNormalization *= aScaleNormalization;
+ }
//--------------------------------------------------------------------
ViewObjectContactOfUnoControl_Impl::~ViewObjectContactOfUnoControl_Impl()
@@ -898,27 +978,21 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- void ViewObjectContactOfUnoControl_Impl::positionControlForPaint( const DisplayInfo& /* #i74769# _rDisplayInfo*/ ) const
- {
- if ( !m_aControl.is() )
- return;
-
- positionAndZoomControl();
- }
-
- //--------------------------------------------------------------------
- void ViewObjectContactOfUnoControl_Impl::positionAndZoomControl() const
+ void ViewObjectContactOfUnoControl_Impl::positionAndZoomControl( const basegfx::B2DHomMatrix& _rViewTransformation ) const
{
- OSL_PRECOND( m_pOutputDeviceForWindow && m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no output device or no control!" );
- if ( !m_pOutputDeviceForWindow || !m_aControl.is() )
+ OSL_PRECOND( ( m_pOutputDeviceForWindow != NULL ) && m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no output device or no control!" );
+ if ( ( m_pOutputDeviceForWindow == NULL ) || !m_aControl.is() )
return;
try
{
SdrUnoObj* pUnoObject( NULL );
if ( getUnoObject( pUnoObject ) )
- UnoControlContactHelper::positionControl_throw( m_aControl, pUnoObject->GetLogicRect(), m_pOutputDeviceForWindow );
- UnoControlContactHelper::setControlZoom( m_aControl, m_pOutputDeviceForWindow );
+ {
+ UnoControlContactHelper::adjustControlGeometry_throw( m_aControl, pUnoObject->GetLogicRect(), _rViewTransformation, m_aZoomLevelNormalization );
+ }
+ else
+ OSL_ENSURE( false, "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no SdrUnoObj!" );
}
catch( const Exception& )
{
@@ -927,72 +1001,89 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::ensureControl( const DisplayInfo& /*_rDisplayInfo*/ )
+ bool ViewObjectContactOfUnoControl_Impl::ensureControl()
{
OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::ensureControl: already disposed()" );
if ( impl_isDisposed_nofail() )
return false;
- const OutputDevice* pDeviceForControl( NULL );
-
- // if we're working for a page view, use the respective OutputDevice at the proper
- // PaintWindow. The DisplayInfo might only contain a temporary (virtual) device, which
- // is dangerous to remember
- // 2006-10-24 / #i70604# / frank.schoenheit@sun.com
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
if ( pPageViewContact )
- pDeviceForControl = &imp_getPageViewDevice_nothrow( *pPageViewContact );
-
- if ( !pDeviceForControl && pPageViewContact)
- pDeviceForControl = pPageViewContact->TryToGetOutputDevice();
-
- DBG_ASSERT( pDeviceForControl, "ViewObjectContactOfUnoControl_Impl::ensureControl: no output device!" );
- if ( !pDeviceForControl )
- return false;
-
- SdrPageView* pPageView = m_pAntiImpl->GetObjectContact().TryToGetSdrPageView();
+ {
+ SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ return impl_ensureControl_nothrow(
+ aPVAccess,
+ impl_getPageViewOutputDevice_nothrow( *pPageViewContact )
+ );
+ }
- ::std::auto_ptr< IPageViewAccess > pPVAccess;
- pPVAccess.reset( pPageView ? (IPageViewAccess*)new SdrPageViewAccess( *pPageView ) : (IPageViewAccess*)new DummyPageViewAccess() );
- return impl_ensureControl_nothrow( *pPVAccess, *pDeviceForControl );
+ DummyPageViewAccess aNoPageView;
+ return impl_ensureControl_nothrow(
+ aNoPageView,
+ impl_getOutputDevice_throw()
+ );
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::ensureControl()
+ const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getOutputDevice_throw() const
{
- OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::ensureControl: already disposed()" );
- if ( impl_isDisposed_nofail() )
- return false;
-
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
- DBG_ASSERT( pPageViewContact, "ViewObjectContactOfUnoControl_Impl::ensureControl: cannot create a control if I don't have a PageView!" );
- if ( !pPageViewContact )
- return false;
+ if ( pPageViewContact )
+ {
+ // do not use ObjectContact::TryToGetOutputDevice here, it would not care for the PageWindow's
+ // OriginalPaintWindow
+ return impl_getPageViewOutputDevice_nothrow( *pPageViewContact );
+ }
- SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
- return impl_ensureControl_nothrow(
- aPVAccess,
- imp_getPageViewDevice_nothrow( *pPageViewContact )
- );
+ const OutputDevice* pDevice = m_pAntiImpl->GetObjectContact().TryToGetOutputDevice();
+ ENSURE_OR_THROW( pDevice, "no output device -> no control" );
+ return *pDevice;
}
//--------------------------------------------------------------------
- const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ) const
+ const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact )
{
// if the PageWindow has a patched PaintWindow, use the original PaintWindow
// this ensures that our control is _not_ re-created just because somebody
// (temporarily) changed the window to paint onto.
// #i72429# / 2007-02-20 / frank.schoenheit@sun.com
- const SdrPageWindow& rPageWindow( _rObjectContact.GetPageWindow() );
+ SdrPageWindow& rPageWindow( _rObjectContact.GetPageWindow() );
if ( rPageWindow.GetOriginalPaintWindow() )
return rPageWindow.GetOriginalPaintWindow()->GetOutputDevice();
return rPageWindow.GetPaintWindow().GetOutputDevice();
}
+ namespace
+ {
+ static void lcl_resetFlag( bool& rbFlag )
+ {
+ rbFlag = false;
+ }
+ }
+
//--------------------------------------------------------------------
bool ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice )
{
+ if ( m_bCreatingControl )
+ {
+ OSL_ENSURE( false, "ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow: reentrance is not really good here!" );
+ // We once had a situation where this was called reentrantly, which lead to all kind of strange effects. All
+ // those affected the grid control, which is the only control so far which is visible in design mode (and
+ // not only in alive mode).
+ // Creating the control triggered an Window::Update on some of its child windows, which triggered a
+ // Paint on parent of the grid control (e.g. the SwEditWin), which triggered a reentrant call to this method,
+ // which it is not really prepared for.
+ //
+ // /me thinks that re-entrance should be caught on a higher level, i.e. the Drawing Layer should not allow
+ // reentrant paint requests. For the moment, until /me can discuss this with AW, catch it here.
+ // 2009-08-27 / #i104544# frank.schoenheit@sun.com
+ return false;
+ }
+
+ m_bCreatingControl = true;
+ ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) );
+
if ( m_aControl.is() )
{
if ( m_pOutputDeviceForWindow == &_rDevice )
@@ -1001,7 +1092,7 @@ namespace sdr { namespace contact {
// Somebody requested a control for a new device, which means either of
// - our PageView's paint window changed since we were last here
// - we don't belong to a page view, and are simply painted onto different devices
- // The first sounds strange (doens't it?), the second means we could perhaps
+ // The first sounds strange (doens't it?), the second means we could perhaps
// optimize this in the future - there is no need to re-create the control every time,
// is it?
// #i74523# / 2007-02-15 / frank.schoenheit@sun.com
@@ -1063,44 +1154,37 @@ namespace sdr { namespace contact {
bool bSuccess = false;
try
{
- do
- {
- const ::rtl::OUString sControlServiceName( _rUnoObject.GetUnoControlTypeName() );
+ const ::rtl::OUString sControlServiceName( _rUnoObject.GetUnoControlTypeName() );
- Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- if ( xFactory.is() )
- {
- _out_rControl = Reference< XControl >( xFactory->createInstance( sControlServiceName ), UNO_QUERY );
- }
- DBG_ASSERT( _out_rControl.is(), "ViewObjectContactOfUnoControl_Impl::createControlForDevice: no control could be created!" );
- if ( !_out_rControl.is() )
- break;
-
- // knit the model and the control
- _out_rControl.setModel( xControlModel );
+ Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_SET_THROW );
+ _out_rControl = Reference< XControl >( xFactory->createInstance( sControlServiceName ), UNO_QUERY_THROW );
- UnoControlContactHelper::positionControl_throw( _out_rControl, _rUnoObject.GetLogicRect(), &_rDevice );
+ // knit the model and the control
+ _out_rControl.setModel( xControlModel );
- // proper zoom
- UnoControlContactHelper::setControlZoom( _out_rControl, &_rDevice );
+ // proper geometry
+ UnoControlContactHelper::adjustControlGeometry_throw(
+ _out_rControl,
+ _rUnoObject.GetLogicRect(),
+ _rDevice.GetViewTransformation(),
+ _rDevice.GetInverseViewTransformation()
+ );
- // #107049# set design mode before peer is created,
- // this is also needed for accessibility
- _out_rControl.setDesignMode( _rPageView.isDesignMode() );
+ // #107049# set design mode before peer is created,
+ // this is also needed for accessibility
+ _out_rControl.setDesignMode( _rPageView.isDesignMode() );
- // adjust the initial visibility according to the visibility of the layer
- // 2003-06-03 - #110592# - fs@openoffice.org
- impl_adjustControlVisibilityToLayerVisibility_throw( _out_rControl, _rUnoObject, _rPageView, false, true );
+ // adjust the initial visibility according to the visibility of the layer
+ // 2003-06-03 - #110592# - fs@openoffice.org
+ impl_adjustControlVisibilityToLayerVisibility_throw( _out_rControl, _rUnoObject, _rPageView, false, true );
- // add the control to the respective control container
- // #108327# do this last
- Reference< XControlContainer > xControlContainer( _rPageView.getControlContainer( _rDevice ) );
- if ( xControlContainer.is() )
- xControlContainer->addControl( sControlServiceName, _out_rControl.getControl() );
+ // add the control to the respective control container
+ // #108327# do this last
+ Reference< XControlContainer > xControlContainer( _rPageView.getControlContainer( _rDevice ) );
+ if ( xControlContainer.is() )
+ xControlContainer->addControl( sControlServiceName, _out_rControl.getControl() );
- bSuccess = true;
- }
- while ( false );
+ bSuccess = true;
}
catch( const Exception& )
{
@@ -1257,18 +1341,16 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
bool ViewObjectContactOfUnoControl_Impl::isPrintableControl() const
{
- if ( !m_aControl.is() )
+ SdrUnoObj* pUnoObject( NULL );
+ if ( !getUnoObject( pUnoObject ) )
return false;
bool bIsPrintable = false;
try
{
- Reference< XPropertySet > xModelProperties( m_aControl.getModel(), UNO_QUERY );
- Reference< XPropertySetInfo > xPropertyInfo( xModelProperties.is() ? xModelProperties->getPropertySetInfo() : Reference< XPropertySetInfo >() );
- const ::rtl::OUString sPrintablePropertyName( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) );
-
- if ( xPropertyInfo.is() && xPropertyInfo->hasPropertyByName( sPrintablePropertyName ) )
- OSL_VERIFY( xModelProperties->getPropertyValue( sPrintablePropertyName ) >>= bIsPrintable );
+ Reference< XPropertySet > xModelProperties( pUnoObject->GetUnoControlModel(), UNO_QUERY_THROW );
+ static const ::rtl::OUString s_sPrintablePropertyName( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) );
+ OSL_VERIFY( xModelProperties->getPropertyValue( s_sPrintablePropertyName ) >>= bIsPrintable );
}
catch( const Exception& )
{
@@ -1411,15 +1493,20 @@ namespace sdr { namespace contact {
if ( !xNewControl.is() )
return;
+ ENSURE_OR_THROW( m_pOutputDeviceForWindow, "calling this without /me having an output device should be impossible." );
+
DBG_ASSERT( xNewControl->getModel() == m_aControl.getModel(), "ViewObjectContactOfUnoControl_Impl::elementReplaced: another model at the new control?" );
// another model should - in the drawing layer - also imply another SdrUnoObj, which
// should also result in new ViewContact, and thus in new ViewObjectContacts
impl_switchControlListening_nothrow( false );
+ ControlHolder aNewControl( xNewControl );
+ aNewControl.setZoom( m_aControl.getZoom() );
+ aNewControl.setPosSize( m_aControl.getPosSize() );
+ aNewControl.setDesignMode( impl_isControlDesignMode_nothrow() );
+
m_aControl = xNewControl;
- positionAndZoomControl();
- m_aControl.setDesignMode( impl_isControlDesignMode_nothrow() );
m_bControlIsVisible = m_aControl.isVisible();
impl_switchControlListening_nothrow( true );
@@ -1449,30 +1536,106 @@ namespace sdr { namespace contact {
}
}
+ //====================================================================
+ //= LazyControlCreationPrimitive2D
+ //====================================================================
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::belongsToDevice( const OutputDevice* _pDevice ) const
+ bool LazyControlCreationPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
{
- DBG_ASSERT( _pDevice, "ViewObjectContactOfUnoControl_Impl::belongsToDevice: invalid device!" );
+ if ( !BasePrimitive2D::operator==( rPrimitive ) )
+ return false;
- OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::belongsToDevice: already disposed!" );
- if ( impl_isDisposed_nofail() )
+ const LazyControlCreationPrimitive2D* pRHS = dynamic_cast< const LazyControlCreationPrimitive2D* >( &rPrimitive );
+ if ( !pRHS )
return false;
- if ( m_pOutputDeviceForWindow )
- {
- if ( _pDevice == m_pOutputDeviceForWindow )
- return true;
+ if ( m_pVOCImpl != pRHS->m_pVOCImpl )
return false;
- }
- ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
- if ( pPageViewContact )
- return ( _pDevice == &imp_getPageViewDevice_nothrow( *pPageViewContact ) );
+ if ( m_aTransformation != pRHS->m_aTransformation )
+ return false;
- DBG_ERROR( "ViewObjectContactOfUnoControl_Impl::belongsToDevice: could not determine the device I belong to!" );
- return false;
+ return true;
+ }
+
+ //--------------------------------------------------------------------
+ void LazyControlCreationPrimitive2D::getTransformation( const ViewContactOfUnoControl& _rVOC, ::basegfx::B2DHomMatrix& _out_Transformation )
+ {
+ // Do use model data directly to create the correct geometry. Do NOT
+ // use getBoundRect()/getSnapRect() here; tese will use the sequence of
+ // primitives themselves in the long run.
+ const Rectangle aSdrGeoData( _rVOC.GetSdrUnoObj().GetGeoRect() );
+ const basegfx::B2DRange aRange(
+ aSdrGeoData.Left(),
+ aSdrGeoData.Top(),
+ aSdrGeoData.Right(),
+ aSdrGeoData.Bottom()
+ );
+
+ _out_Transformation.identity();
+ _out_Transformation.set( 0, 0, aRange.getWidth() );
+ _out_Transformation.set( 1, 1, aRange.getHeight() );
+ _out_Transformation.set( 0, 2, aRange.getMinX() );
+ _out_Transformation.set( 1, 2, aRange.getMinY() );
+ }
+
+ //--------------------------------------------------------------------
+ ::basegfx::B2DRange LazyControlCreationPrimitive2D::getB2DRange( const ::drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/ ) const
+ {
+ ::basegfx::B2DRange aRange( 0.0, 0.0, 1.0, 1.0 );
+ aRange.transform( m_aTransformation );
+ return aRange;
}
+ //--------------------------------------------------------------------
+ ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
+ {
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+ if ( m_pVOCImpl->hasControl() )
+ impl_positionAndZoomControl( _rViewInformation );
+ return BasePrimitive2D::get2DDecomposition( _rViewInformation );
+ }
+
+ //--------------------------------------------------------------------
+ ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
+ {
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+ // force control here to make it a VCL ChildWindow. Will be fetched
+ // and used below by getExistentControl()
+ m_pVOCImpl->ensureControl();
+ impl_positionAndZoomControl( _rViewInformation );
+
+ // get needed data
+ const ViewContactOfUnoControl& rViewContactOfUnoControl( m_pVOCImpl->getViewContact() );
+ Reference< XControlModel > xControlModel( rViewContactOfUnoControl.GetSdrUnoObj().GetUnoControlModel() );
+ const ControlHolder& rControl( m_pVOCImpl->getExistentControl() );
+
+ // check if we already have an XControl.
+ if ( !xControlModel.is() || !rControl.is() )
+ // use the default mechanism. This will create a ControlPrimitive2D without
+ // handing over a XControl. If not even a XControlModel exists, it will
+ // create the SdrObject fallback visualisation
+ return rViewContactOfUnoControl.getViewIndependentPrimitive2DSequence();
+
+ // create a primitive and hand over the existing xControl. This will
+ // allow the primitive to not need to create another one on demand.
+ const drawinglayer::primitive2d::Primitive2DReference xRetval( new ::drawinglayer::primitive2d::ControlPrimitive2D(
+ m_aTransformation, xControlModel, rControl.getControl() ) );
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
+ }
+
+ //--------------------------------------------------------------------
+ ImplPrimitrive2DIDBlock( LazyControlCreationPrimitive2D, PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D )
+
//====================================================================
//= ViewObjectContactOfUnoControl
//====================================================================
@@ -1522,20 +1685,6 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- void ViewObjectContactOfUnoControl::positionControlForPaint( const DisplayInfo& _rDisplayInfo ) const
- {
- VOCGuard aGuard( *m_pImpl );
-
- // ensure we have a control. If we don't, then the Drawing Layer might be tempted to
- // never draw the complete form layer.
- // #i75095# / 2007-03-05 / frank.schoenheit@sun.com
- m_pImpl->ensureControl( _rDisplayInfo );
-
- // position the control
- m_pImpl->positionControlForPaint( _rDisplayInfo );
- }
-
- //--------------------------------------------------------------------
void ViewObjectContactOfUnoControl::ensureControlVisibility( bool _bVisible ) const
{
VOCGuard aGuard( *m_pImpl );
@@ -1582,70 +1731,32 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl::belongsToDevice( const OutputDevice* _pDevice ) const
+ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfUnoControl::createPrimitive2DSequence(const DisplayInfo& /*rDisplayInfo*/) const
{
- VOCGuard aGuard( *m_pImpl );
- return m_pImpl->belongsToDevice( _pDevice );
+ if ( m_pImpl->isDisposed() )
+ // our control already died.
+ // TODO: Is it worth re-creating the control? Finally, this is a pathological situation, it means some instance
+ // disposed the control though it doesn't own it. So, /me thinks we should not bother here.
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
+ ::drawinglayer::primitive2d::Primitive2DReference xPrimitive( new LazyControlCreationPrimitive2D( m_pImpl ) );
+ return ::drawinglayer::primitive2d::Primitive2DSequence( &xPrimitive, 1 );
}
//--------------------------------------------------------------------
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfUnoControl::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
- {
- // force control here to make it a VCL ChildWindow. Will be fetched
- // and used below by getExistentControl()
- m_pImpl->ensureControl();
- m_pImpl->positionControlForPaint(rDisplayInfo);
-
- // get needed data
- const ViewContactOfUnoControl& rViewContactOfUnoControl(static_cast< const ViewContactOfUnoControl& >(GetViewContact()));
- Reference< XControlModel > xControlModel(rViewContactOfUnoControl.GetSdrUnoObj().GetUnoControlModel());
- const ControlHolder& rControl(m_pImpl->getExistentControl());
-
- // check if we already have a XControl.
- if(xControlModel.is() && rControl.is())
- {
- // create a primitive and hand over the existing xControl. This will
- // allow the primitive to not need to create another one on demand.
- // Do use model data directly to create the correct geometry. Do NOT
- // use getBoundRect()/getSnapRect() here; tese will use the sequence of
- // primitives themselves in the long run.
- const Rectangle aUnoControlModelData(rViewContactOfUnoControl.GetSdrUnoObj().GetGeoRect());
- const basegfx::B2DRange aRange(aUnoControlModelData.Left(), aUnoControlModelData.Top(), aUnoControlModelData.Right(), aUnoControlModelData.Bottom());
-
- // create object transform
- basegfx::B2DHomMatrix aTransform;
- aTransform.set(0, 0, aRange.getWidth());
- aTransform.set(1, 1, aRange.getHeight());
- aTransform.set(0, 2, aRange.getMinX());
- aTransform.set(1, 2, aRange.getMinY());
-
- // create control primitive with existing XControl
- const drawinglayer::primitive2d::Primitive2DReference xRetval(new drawinglayer::primitive2d::ControlPrimitive2D(
- aTransform, xControlModel, rControl.getControl()));
-
- return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
- }
- else
- {
- // use the default mechanism. This will create a ControlPrimitive2D without
- // handing over a XControl. If not even a XControlModel exists, it will
- // create the SdrObject fallback visualisation
- return rViewContactOfUnoControl.getViewIndependentPrimitive2DSequence();
- }
- }
-
void ViewObjectContactOfUnoControl::propertyChange()
{
// graphical invalidate at all views
ActionChanged();
// #i93318# flush Primitive2DSequence to force recreation with updated XControlModel
- // since e.g. background color has changed and existing decompositions are evtl. no
+ // since e.g. background color has changed and existing decompositions are possibly no
// longer valid. Unfortunately this is not detected from ControlPrimitive2D::operator==
// since it only has a uno reference to the XControlModel
flushPrimitive2DSequence();
}
+ //--------------------------------------------------------------------
void ViewObjectContactOfUnoControl::ActionChanged()
{
// call parent
@@ -1671,40 +1782,6 @@ namespace sdr { namespace contact {
}
//====================================================================
- //= UnoControlDefaultContact
- //====================================================================
- DBG_NAME( UnoControlDefaultContact )
- //--------------------------------------------------------------------
- UnoControlDefaultContact::UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlDefaultContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlDefaultContact::~UnoControlDefaultContact()
- {
- DBG_DTOR( UnoControlDefaultContact, NULL );
- }
-
- //====================================================================
- //= UnoControlWindowContact
- //====================================================================
- DBG_NAME( UnoControlWindowContact )
- //--------------------------------------------------------------------
- UnoControlWindowContact::UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlWindowContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlWindowContact::~UnoControlWindowContact()
- {
- DBG_DTOR( UnoControlWindowContact, NULL );
- }
-
- //====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
DBG_NAME( UnoControlPrintOrPreviewContact )
@@ -1721,21 +1798,12 @@ namespace sdr { namespace contact {
DBG_DTOR( UnoControlPrintOrPreviewContact, NULL );
}
- //====================================================================
- //= UnoControlPDFExportContact
- //====================================================================
- DBG_NAME( UnoControlPDFExportContact )
- //--------------------------------------------------------------------
- UnoControlPDFExportContact::UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlPDFExportContact, NULL );
- }
-
//--------------------------------------------------------------------
- UnoControlPDFExportContact::~UnoControlPDFExportContact()
+ drawinglayer::primitive2d::Primitive2DSequence UnoControlPrintOrPreviewContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const
{
- DBG_DTOR( UnoControlPDFExportContact, NULL );
+ if ( !m_pImpl->isPrintableControl() )
+ return drawinglayer::primitive2d::Primitive2DSequence();
+ return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo );
}
//........................................................................
diff --git a/svx/source/sdr/overlay/makefile.mk b/svx/source/sdr/overlay/makefile.mk
index 1243a71e2585..d202992c090d 100644
--- a/svx/source/sdr/overlay/makefile.mk
+++ b/svx/source/sdr/overlay/makefile.mk
@@ -43,22 +43,21 @@ ENABLE_EXCEPTIONS=TRUE
SLOFILES=\
$(SLO)$/overlayanimatedbitmapex.obj \
- $(SLO)$/overlaybitmap.obj \
$(SLO)$/overlaybitmapex.obj \
+ $(SLO)$/overlaycrosshair.obj \
+ $(SLO)$/overlayhatchrect.obj \
+ $(SLO)$/overlayhelpline.obj \
$(SLO)$/overlayline.obj \
- $(SLO)$/overlaylinestriped.obj \
$(SLO)$/overlaymanager.obj \
$(SLO)$/overlaymanagerbuffered.obj \
$(SLO)$/overlayobject.obj \
+ $(SLO)$/overlayobjectcell.obj \
$(SLO)$/overlayobjectlist.obj \
- $(SLO)$/overlaytriangle.obj \
- $(SLO)$/overlaycrosshair.obj \
- $(SLO)$/overlayhelpline.obj \
- $(SLO)$/overlayhatchrect.obj \
- $(SLO)$/overlayrollingrectangle.obj \
$(SLO)$/overlaypolypolygon.obj \
- $(SLO)$/overlaysdrobject.obj \
$(SLO)$/overlayprimitive2dsequenceobject.obj \
- $(SLO)$/overlayobjectcell.obj
+ $(SLO)$/overlayrollingrectangle.obj \
+ $(SLO)$/overlayselection.obj \
+ $(SLO)$/overlaytools.obj \
+ $(SLO)$/overlaytriangle.obj
.INCLUDE : target.mk
diff --git a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx
index 4781cc247e7e..dcfeb0ae3dc2 100644
--- a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx
+++ b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx
@@ -34,9 +34,8 @@
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
-
-// #i77674#
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdr/overlay/overlaytools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -57,43 +56,30 @@ namespace sdr
}
}
- void OverlayAnimatedBitmapEx::drawGeometry(OutputDevice& rOutputDevice)
- {
- // #i77674# calculate discrete top-left
- basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- aDiscreteTopLeft -= (mbOverlayState)
- ? basegfx::B2DPoint((double)mnCenterX1, (double)mnCenterY1)
- : basegfx::B2DPoint((double)mnCenterX2, (double)mnCenterY2);
-
- // remember MapMode and switch to pixels
- const bool bMapModeWasEnabled(rOutputDevice.IsMapModeEnabled());
- rOutputDevice.EnableMapMode(false);
-
- // draw the bitmap
- const Point aPixelTopLeft((sal_Int32)floor(aDiscreteTopLeft.getX()), (sal_Int32)floor(aDiscreteTopLeft.getY()));
- rOutputDevice.DrawBitmapEx(aPixelTopLeft, (mbOverlayState) ? maBitmapEx1 : maBitmapEx2);
-
- // restore MapMode
- rOutputDevice.EnableMapMode(bMapModeWasEnabled);
- }
-
- void OverlayAnimatedBitmapEx::createBaseRange(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayAnimatedBitmapEx::createOverlayObjectPrimitive2DSequence()
{
- // #i77674# calculate discrete top-left
- basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- aDiscreteTopLeft -= (mbOverlayState)
- ? basegfx::B2DPoint((double)mnCenterX1, (double)mnCenterY1)
- : basegfx::B2DPoint((double)mnCenterX2, (double)mnCenterY2);
-
- // calculate discrete range
- const Size aBitmapPixelSize((mbOverlayState) ? maBitmapEx1.GetSizePixel() : maBitmapEx2.GetSizePixel());
- const basegfx::B2DRange aDiscreteRange(
- aDiscreteTopLeft.getX(), aDiscreteTopLeft.getY(),
- aDiscreteTopLeft.getX() + (double)aBitmapPixelSize.getWidth(), aDiscreteTopLeft.getY() + (double)aBitmapPixelSize.getHeight());
-
- // set and go back to logic range
- maBaseRange = aDiscreteRange;
- maBaseRange.transform(rOutputDevice.GetInverseViewTransformation());
+ if(mbOverlayState)
+ {
+ const drawinglayer::primitive2d::Primitive2DReference aPrimitive(
+ new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
+ getBitmapEx1(),
+ getBasePosition(),
+ getCenterX1(),
+ getCenterY1()));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aPrimitive, 1);
+ }
+ else
+ {
+ const drawinglayer::primitive2d::Primitive2DReference aPrimitive(
+ new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
+ getBitmapEx2(),
+ getBasePosition(),
+ getCenterX2(),
+ getCenterY2()));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aPrimitive, 1);
+ }
}
OverlayAnimatedBitmapEx::OverlayAnimatedBitmapEx(
@@ -111,10 +97,10 @@ namespace sdr
mnCenterX1(nCenX1), mnCenterY1(nCenY1),
mnCenterX2(nCenX2), mnCenterY2(nCenY2),
mnBlinkTime(nBlinkTime),
- mbOverlayState(sal_False)
+ mbOverlayState(false)
{
// set AllowsAnimation flag to mark this object as animation capable
- mbAllowsAnimation = sal_True;
+ mbAllowsAnimation = true;
// #i53216# check blink time value range
impCheckBlinkTimeValueRange();
@@ -213,11 +199,11 @@ namespace sdr
// switch state
if(mbOverlayState)
{
- mbOverlayState = sal_False;
+ mbOverlayState = false;
}
else
{
- mbOverlayState = sal_True;
+ mbOverlayState = true;
}
// re-insert me as event
@@ -227,12 +213,6 @@ namespace sdr
objectChange();
}
}
-
- void OverlayAnimatedBitmapEx::zoomHasChanged()
- {
- // reset validity of range in logical coor to force recalculation
- mbIsChanged = sal_True;
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlaybitmap.cxx b/svx/source/sdr/overlay/overlaybitmap.cxx
deleted file mode 100644
index cc782d38bc7d..000000000000
--- a/svx/source/sdr/overlay/overlaybitmap.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: overlaybitmap.cxx,v $
- * $Revision: 1.5 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <svx/sdr/overlay/overlaybitmap.hxx>
-#include <vcl/salbtype.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/bitmapex.hxx>
-
-// #i77674#
-#include <basegfx/matrix/b2dhommatrix.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayBitmap::drawGeometry(OutputDevice& rOutputDevice)
- {
- // #i77674# calculate discrete top-left
- basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- aDiscreteTopLeft -= basegfx::B2DPoint((double)mnCenterX, (double)mnCenterY);
-
- // remember MapMode and switch to pixels
- const bool bMapModeWasEnabled(rOutputDevice.IsMapModeEnabled());
- rOutputDevice.EnableMapMode(false);
-
- // draw the bitmap
- const Point aPixelTopLeft((sal_Int32)floor(aDiscreteTopLeft.getX()), (sal_Int32)floor(aDiscreteTopLeft.getY()));
-
- if(mbUseTransparenceColor)
- {
- BitmapEx aBitmapEx(maBitmap, getBaseColor());
- rOutputDevice.DrawBitmapEx(aPixelTopLeft, aBitmapEx);
- }
- else
- {
- rOutputDevice.DrawBitmap(aPixelTopLeft, maBitmap);
- }
-
- // restore MapMode
- rOutputDevice.EnableMapMode(bMapModeWasEnabled);
- }
-
- void OverlayBitmap::createBaseRange(OutputDevice& rOutputDevice)
- {
- // #i77674# calculate discrete top-left
- basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- aDiscreteTopLeft -= basegfx::B2DPoint((double)mnCenterX, (double)mnCenterY);
-
- // calculate discrete range
- const Size aBitmapPixelSize(maBitmap.GetSizePixel());
- const basegfx::B2DRange aDiscreteRange(
- aDiscreteTopLeft.getX(), aDiscreteTopLeft.getY(),
- aDiscreteTopLeft.getX() + (double)aBitmapPixelSize.getWidth(), aDiscreteTopLeft.getY() + (double)aBitmapPixelSize.getHeight());
-
- // set and go back to logic range
- maBaseRange = aDiscreteRange;
- maBaseRange.transform(rOutputDevice.GetInverseViewTransformation());
- }
-
- OverlayBitmap::OverlayBitmap(
- const basegfx::B2DPoint& rBasePos,
- const Bitmap& rBitmap,
- sal_uInt16 nCenX, sal_uInt16 nCenY,
- sal_Bool bUseTransCol,
- Color aTransColor)
- : OverlayObjectWithBasePosition(rBasePos, aTransColor),
- maBitmap(rBitmap),
- mnCenterX(nCenX),
- mnCenterY(nCenY),
- mbUseTransparenceColor(bUseTransCol)
- {
- }
-
- OverlayBitmap::~OverlayBitmap()
- {
- }
-
- void OverlayBitmap::setBitmap(const Bitmap& rNew)
- {
- if(rNew != maBitmap)
- {
- // remember new Bitmap
- maBitmap = rNew;
-
- // register change (after change)
- objectChange();
- }
- }
-
- void OverlayBitmap::setTransparenceUsed(sal_Bool bNew)
- {
- if(bNew != mbUseTransparenceColor)
- {
- // remember new value
- mbUseTransparenceColor = bNew;
-
- // register change (after change)
- objectChange();
- }
- }
-
- void OverlayBitmap::setCenterXY(sal_uInt16 nNewX, sal_uInt16 nNewY)
- {
- if(nNewX != mnCenterX || nNewY != mnCenterY)
- {
- // remember new values
- if(nNewX != mnCenterX)
- {
- mnCenterX = nNewX;
- }
-
- if(nNewY != mnCenterY)
- {
- mnCenterY = nNewY;
- }
-
- // register change (after change)
- objectChange();
- }
- }
-
- void OverlayBitmap::zoomHasChanged()
- {
- // reset validity of range in logical coor to force recalculation
- mbIsChanged = sal_True;
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx
index 9f0e183f420c..cd50c9149b27 100644
--- a/svx/source/sdr/overlay/overlaybitmapex.cxx
+++ b/svx/source/sdr/overlay/overlaybitmapex.cxx
@@ -33,9 +33,8 @@
#include <svx/sdr/overlay/overlaybitmapex.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
-
-// #i77674#
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdr/overlay/overlaytools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -43,39 +42,16 @@ namespace sdr
{
namespace overlay
{
- void OverlayBitmapEx::drawGeometry(OutputDevice& rOutputDevice)
- {
- // #i77674# calculate discrete top-left
- basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- aDiscreteTopLeft -= basegfx::B2DPoint((double)mnCenterX, (double)mnCenterY);
-
- // remember MapMode and switch to pixels
- const bool bMapModeWasEnabled(rOutputDevice.IsMapModeEnabled());
- rOutputDevice.EnableMapMode(false);
-
- // draw the bitmap
- const Point aPixelTopLeft((sal_Int32)floor(aDiscreteTopLeft.getX()), (sal_Int32)floor(aDiscreteTopLeft.getY()));
- rOutputDevice.DrawBitmapEx(aPixelTopLeft, maBitmapEx);
-
- // restore MapMode
- rOutputDevice.EnableMapMode(bMapModeWasEnabled);
- }
-
- void OverlayBitmapEx::createBaseRange(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayBitmapEx::createOverlayObjectPrimitive2DSequence()
{
- // #i77674# calculate discrete top-left
- basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- aDiscreteTopLeft -= basegfx::B2DPoint((double)mnCenterX, (double)mnCenterY);
-
- // calculate discrete range
- const Size aBitmapPixelSize(maBitmapEx.GetSizePixel());
- const basegfx::B2DRange aDiscreteRange(
- aDiscreteTopLeft.getX(), aDiscreteTopLeft.getY(),
- aDiscreteTopLeft.getX() + (double)aBitmapPixelSize.getWidth(), aDiscreteTopLeft.getY() + (double)aBitmapPixelSize.getHeight());
-
- // set and go back to logic range
- maBaseRange = aDiscreteRange;
- maBaseRange.transform(rOutputDevice.GetInverseViewTransformation());
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
+ getBitmapEx(),
+ getBasePosition(),
+ getCenterX(),
+ getCenterY()));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
OverlayBitmapEx::OverlayBitmapEx(
@@ -124,12 +100,6 @@ namespace sdr
objectChange();
}
}
-
- void OverlayBitmapEx::zoomHasChanged()
- {
- // reset validity of range in logical coor to force recalculation
- mbIsChanged = sal_True;
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlaycrosshair.cxx b/svx/source/sdr/overlay/overlaycrosshair.cxx
index 7107817fad04..90bd99bc289e 100644
--- a/svx/source/sdr/overlay/overlaycrosshair.cxx
+++ b/svx/source/sdr/overlay/overlaycrosshair.cxx
@@ -34,6 +34,8 @@
#include <tools/gen.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
+#include <svx/sdr/overlay/overlaytools.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -41,31 +43,33 @@ namespace sdr
{
namespace overlay
{
- void OverlayCrosshairStriped::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayCrosshairStriped::createOverlayObjectPrimitive2DSequence()
{
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
- const basegfx::B2DPoint aStartA(aVisibleLogic.Left(), getBasePosition().getY());
- const basegfx::B2DPoint aEndA(aVisibleLogic.Right(), getBasePosition().getY());
- ImpDrawLineStriped(rOutputDevice, aStartA, aEndA);
+ if(getOverlayManager())
+ {
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
+
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::OverlayCrosshairPrimitive(
+ getBasePosition(),
+ aRGBColorA,
+ aRGBColorB,
+ fStripeLengthPixel));
+
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+ }
- const basegfx::B2DPoint aStartB(getBasePosition().getX(), aVisibleLogic.Top());
- const basegfx::B2DPoint aEndB(getBasePosition().getX(), aVisibleLogic.Bottom());
- ImpDrawLineStriped(rOutputDevice, aStartB, aEndB);
+ return aRetval;
}
- void OverlayCrosshairStriped::createBaseRange(OutputDevice& rOutputDevice)
+ void OverlayCrosshairStriped::stripeDefinitionHasChanged()
{
- // reset range and expand it
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
-
- maBaseRange.reset();
- maBaseRange.expand(basegfx::B2DPoint(aVisibleLogic.Left(), aVisibleLogic.Top()));
- maBaseRange.expand(basegfx::B2DPoint(aVisibleLogic.Right(), aVisibleLogic.Bottom()));
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
OverlayCrosshairStriped::OverlayCrosshairStriped(const basegfx::B2DPoint& rBasePos)
@@ -76,64 +80,6 @@ namespace sdr
OverlayCrosshairStriped::~OverlayCrosshairStriped()
{
}
-
- sal_Bool OverlayCrosshairStriped::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable())
- {
- // test vertical
- if(rPos.getY() >= (getBasePosition().getY() - fTol)
- && rPos.getY() <= (getBasePosition().getY() + fTol))
- {
- return sal_True;
- }
-
- // test horizontal
- if(rPos.getX() >= (getBasePosition().getX() - fTol)
- && rPos.getX() <= (getBasePosition().getX() + fTol))
- {
- return sal_True;
- }
- }
-
- return sal_False;
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayCrosshair::drawGeometry(OutputDevice& rOutputDevice)
- {
- const Point aBasePos(FRound(getBasePosition().getX()), FRound(getBasePosition().getY()));
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
-
- rOutputDevice.SetLineColor(getBaseColor());
- rOutputDevice.SetFillColor();
-
- rOutputDevice.DrawLine(Point(aVisibleLogic.Left(), aBasePos.Y()), Point(aVisibleLogic.Right(), aBasePos.Y()));
- rOutputDevice.DrawLine(Point(aBasePos.X(), aVisibleLogic.Top()), Point(aBasePos.X(), aVisibleLogic.Bottom()));
- }
-
- OverlayCrosshair::OverlayCrosshair(
- const basegfx::B2DPoint& rBasePos,
- Color aLineColor)
- : OverlayCrosshairStriped(rBasePos)
- {
- // set base color here, OverlayCrosshairStriped constructor has set
- // it to it's own default.
- maBaseColor = aLineColor;
- }
-
- OverlayCrosshair::~OverlayCrosshair()
- {
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlayhatchrect.cxx b/svx/source/sdr/overlay/overlayhatchrect.cxx
index a15d38f16bc9..9bda13816029 100644
--- a/svx/source/sdr/overlay/overlayhatchrect.cxx
+++ b/svx/source/sdr/overlay/overlayhatchrect.cxx
@@ -38,6 +38,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/numeric/ftools.hxx>
+#include <svx/sdr/overlay/overlaytools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -45,81 +46,34 @@ namespace sdr
{
namespace overlay
{
- basegfx::B2DPolyPolygon OverlayHatchRect::getGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayHatchRect::createOverlayObjectPrimitive2DSequence()
{
- const basegfx::B2DPoint aDiscreteTopLeft(rOutputDevice.GetViewTransformation() * getBasePosition());
- const basegfx::B2DPoint aDiscreteBottomRight(rOutputDevice.GetViewTransformation() * getSecondPosition());
-
- basegfx::B2DRange aInnerRange(
- floor(aDiscreteTopLeft.getX()), floor(aDiscreteTopLeft.getY()),
- floor(aDiscreteBottomRight.getX()), floor(aDiscreteBottomRight.getY()));
- basegfx::B2DRange aOuterRange(aInnerRange);
- basegfx::B2DPolyPolygon aRetval;
-
- aOuterRange.grow(getDiscreteWidth() * 0.5);
- aInnerRange.grow(getDiscreteWidth() * -0.5);
-
- aRetval.append(basegfx::tools::createPolygonFromRect(aOuterRange));
- aRetval.append(basegfx::tools::createPolygonFromRect(aInnerRange));
-
- if(!basegfx::fTools::equalZero(mfRotation))
- {
- basegfx::B2DHomMatrix aTransform;
-
- aTransform.translate(-aOuterRange.getMinX(), -aOuterRange.getMinY());
- aTransform.rotate(getRotation());
- aTransform.translate(aOuterRange.getMinX(), aOuterRange.getMinY());
-
- aRetval.transform(aTransform);
- }
-
- return aRetval;
- }
-
- void OverlayHatchRect::drawGeometry(OutputDevice& rOutputDevice)
- {
- const basegfx::B2DPolyPolygon aB2DGeometry(getGeometry(rOutputDevice));
- const bool bMapModeWasEnabled(rOutputDevice.IsMapModeEnabled());
-
- // use VCL polygon and methodology for paint
- double fFullRotation(getHatchRotation() - getRotation());
-
- while(fFullRotation < 0.0)
- {
- fFullRotation += F_2PI;
- }
-
- while(fFullRotation >= F_2PI)
- {
- fFullRotation -= F_2PI;
- }
-
- const Hatch aHatch(HATCH_SINGLE, getBaseColor(), 3, (sal_uInt16)basegfx::fround(fFullRotation * ( 10.0 / F_PI180)));
- rOutputDevice.EnableMapMode(false);
- rOutputDevice.DrawHatch(PolyPolygon(aB2DGeometry), aHatch);
- rOutputDevice.EnableMapMode(bMapModeWasEnabled);
- }
-
- void OverlayHatchRect::createBaseRange(OutputDevice& rOutputDevice)
- {
- // reset range and expand with fresh geometry
- maBaseRange = getGeometry(rOutputDevice).getB2DRange();
-
- // getGeometry data is in discrete coordinates (pixels), so transform back to
- // world coordinates (logic)
- maBaseRange.transform(rOutputDevice.GetInverseViewTransformation());
+ const basegfx::B2DRange aHatchRange(getBasePosition(), getSecondPosition());
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::OverlayHatchRectanglePrimitive(
+ aHatchRange,
+ 3.0,
+ getHatchRotation(),
+ getBaseColor().getBColor(),
+ getDiscreteGrow(),
+ getDiscreteShrink(),
+ getRotation()));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
OverlayHatchRect::OverlayHatchRect(
const basegfx::B2DPoint& rBasePosition,
const basegfx::B2DPoint& rSecondPosition,
const Color& rHatchColor,
- double fDiscreteWidth,
+ double fDiscreteGrow,
+ double fDiscreteShrink,
double fHatchRotation,
double fRotation)
: OverlayObjectWithBasePosition(rBasePosition, rHatchColor),
maSecondPosition(rSecondPosition),
- mfDiscreteWidth(fDiscreteWidth),
+ mfDiscreteGrow(fDiscreteGrow),
+ mfDiscreteShrink(fDiscreteShrink),
mfHatchRotation(fHatchRotation),
mfRotation(fRotation)
{
@@ -136,12 +90,6 @@ namespace sdr
objectChange();
}
}
-
- void OverlayHatchRect::zoomHasChanged()
- {
- // reset validity of range in logical coor to force recalculation
- mbIsChanged = sal_True;
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlayhelpline.cxx b/svx/source/sdr/overlay/overlayhelpline.cxx
index 5de8d071a292..12cb5ac660ba 100644
--- a/svx/source/sdr/overlay/overlayhelpline.cxx
+++ b/svx/source/sdr/overlay/overlayhelpline.cxx
@@ -35,6 +35,8 @@
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
#include <basegfx/vector/b2dvector.hxx>
+#include <svx/sdr/overlay/overlaytools.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -42,79 +44,38 @@ namespace sdr
{
namespace overlay
{
- void OverlayHelplineStriped::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayHelplineStriped::createOverlayObjectPrimitive2DSequence()
{
- // prepare OutputDevice
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
- switch(meKind)
+ if(getOverlayManager())
{
- case SDRHELPLINE_VERTICAL :
- {
- const basegfx::B2DPoint aStart(getBasePosition().getX(), aVisibleLogic.Top());
- const basegfx::B2DPoint aEnd(getBasePosition().getX(), aVisibleLogic.Bottom());
- ImpDrawLineStriped(rOutputDevice, aStart, aEnd);
- break;
- }
-
- case SDRHELPLINE_HORIZONTAL :
- {
- const basegfx::B2DPoint aStart(aVisibleLogic.Left(), getBasePosition().getY());
- const basegfx::B2DPoint aEnd(aVisibleLogic.Right(), getBasePosition().getY());
- ImpDrawLineStriped(rOutputDevice, aStart, aEnd);
- break;
- }
-
- case SDRHELPLINE_POINT :
- {
- const Size aPixelSize(SDRHELPLINE_POINT_PIXELSIZE, SDRHELPLINE_POINT_PIXELSIZE);
- const Size aLogicSize(rOutputDevice.PixelToLogic(aPixelSize));
-
- const basegfx::B2DPoint aStartA(getBasePosition().getX(), getBasePosition().getY() - aLogicSize.Height());
- const basegfx::B2DPoint aEndA(getBasePosition().getX(), getBasePosition().getY() + aLogicSize.Height());
- ImpDrawLineStriped(rOutputDevice, aStartA, aEndA);
-
- const basegfx::B2DPoint aStartB(getBasePosition().getX() - aLogicSize.Width(), getBasePosition().getY());
- const basegfx::B2DPoint aEndB(getBasePosition().getX() + aLogicSize.Width(), getBasePosition().getY());
- ImpDrawLineStriped(rOutputDevice, aStartB, aEndB);
-
- break;
- }
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
+ const drawinglayer::primitive2d::HelplineStyle aStyle(
+ SDRHELPLINE_POINT == getKind() ? drawinglayer::primitive2d::HELPLINESTYLE_POINT :
+ SDRHELPLINE_VERTICAL == getKind() ? drawinglayer::primitive2d::HELPLINESTYLE_VERTICAL :
+ drawinglayer::primitive2d::HELPLINESTYLE_HORIZONTAL);
+
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::OverlayHelplineStripedPrimitive(
+ getBasePosition(),
+ aStyle,
+ aRGBColorA,
+ aRGBColorB,
+ fStripeLengthPixel));
+
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
+
+ return aRetval;
}
- void OverlayHelplineStriped::createBaseRange(OutputDevice& rOutputDevice)
+ void OverlayHelplineStriped::stripeDefinitionHasChanged()
{
- // reset range and expand it
- maBaseRange.reset();
-
- if(SDRHELPLINE_POINT == meKind)
- {
- const Size aPixelSize(SDRHELPLINE_POINT_PIXELSIZE, SDRHELPLINE_POINT_PIXELSIZE);
- const Size aLogicSize(rOutputDevice.PixelToLogic(aPixelSize));
-
- maBaseRange.expand(basegfx::B2DPoint(getBasePosition().getX() - aLogicSize.Width(), getBasePosition().getY() - aLogicSize.Height()));
- maBaseRange.expand(basegfx::B2DPoint(getBasePosition().getX() + aLogicSize.Width(), getBasePosition().getY() + aLogicSize.Height()));
- }
- else
- {
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
-
- if(SDRHELPLINE_HORIZONTAL == meKind)
- {
- maBaseRange.expand(basegfx::B2DPoint(aVisibleLogic.Left(), getBasePosition().getY()));
- maBaseRange.expand(basegfx::B2DPoint(aVisibleLogic.Right(), getBasePosition().getY()));
- }
- else if(SDRHELPLINE_VERTICAL == meKind)
- {
- maBaseRange.expand(basegfx::B2DPoint(getBasePosition().getX(), aVisibleLogic.Top()));
- maBaseRange.expand(basegfx::B2DPoint(getBasePosition().getX(), aVisibleLogic.Bottom()));
- }
- }
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
OverlayHelplineStriped::OverlayHelplineStriped(
@@ -128,102 +89,6 @@ namespace sdr
OverlayHelplineStriped::~OverlayHelplineStriped()
{
}
-
- sal_Bool OverlayHelplineStriped::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable())
- {
- if(SDRHELPLINE_POINT == meKind)
- {
- // use distance to BasePosition
- const basegfx::B2DVector aVector(rPos - getBasePosition());
-
- return (aVector.getLength() < fTol);
- }
- else
- {
- if(SDRHELPLINE_HORIZONTAL == meKind)
- {
- // test vertical
- if(rPos.getY() >= (getBasePosition().getY() - fTol)
- && rPos.getY() <= (getBasePosition().getY() + fTol))
- {
- return sal_True;
- }
- }
- else if(SDRHELPLINE_VERTICAL == meKind)
- {
- // test horizontal
- if(rPos.getX() >= (getBasePosition().getX() - fTol)
- && rPos.getX() <= (getBasePosition().getX() + fTol))
- {
- return sal_True;
- }
- }
- }
- }
-
- return sal_False;
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayHelpline::drawGeometry(OutputDevice& rOutputDevice)
- {
- Point aBasePos(FRound(getBasePosition().getX()), FRound(getBasePosition().getY()));
-
- rOutputDevice.SetLineColor(getBaseColor());
- rOutputDevice.SetFillColor();
-
- if(SDRHELPLINE_POINT == meKind)
- {
- Size aPixelSize(SDRHELPLINE_POINT_PIXELSIZE, SDRHELPLINE_POINT_PIXELSIZE);
- Size aLogicSize(rOutputDevice.PixelToLogic(aPixelSize));
-
- rOutputDevice.DrawLine(
- Point(aBasePos.X() - aLogicSize.Width(), aBasePos.Y()),
- Point(aBasePos.X() + aLogicSize.Width(), aBasePos.Y()));
- rOutputDevice.DrawLine(
- Point(aBasePos.X(), aBasePos.Y() - aLogicSize.Height()),
- Point(aBasePos.X(), aBasePos.Y() + aLogicSize.Height()));
- }
- else
- {
- Point aEmptyPoint;
- Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
-
- if(SDRHELPLINE_HORIZONTAL == meKind)
- {
- rOutputDevice.DrawLine(Point(aVisibleLogic.Left(), aBasePos.Y()), Point(aVisibleLogic.Right(), aBasePos.Y()));
- }
- else if(SDRHELPLINE_VERTICAL == meKind)
- {
- rOutputDevice.DrawLine(Point(aBasePos.X(), aVisibleLogic.Top()), Point(aBasePos.X(), aVisibleLogic.Bottom()));
- }
- }
- }
-
- OverlayHelpline::OverlayHelpline(
- const basegfx::B2DPoint& rBasePos,
- Color aLineColor,
- SdrHelpLineKind eNewKind)
- : OverlayHelplineStriped(rBasePos, eNewKind)
- {
- // set base color here, OverlayCrosshairStriped constructor has set
- // it to it's own default.
- maBaseColor = aLineColor;
- }
-
- OverlayHelpline::~OverlayHelpline()
- {
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlayline.cxx b/svx/source/sdr/overlay/overlayline.cxx
index 003da41ee31d..90ecb869f4f6 100644
--- a/svx/source/sdr/overlay/overlayline.cxx
+++ b/svx/source/sdr/overlay/overlayline.cxx
@@ -37,6 +37,9 @@
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -44,17 +47,37 @@ namespace sdr
{
namespace overlay
{
- void OverlayLineStriped::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayLineStriped::createOverlayObjectPrimitive2DSequence()
{
- ImpDrawLineStriped(rOutputDevice, getBasePosition(), getSecondPosition());
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+
+ if(getOverlayManager())
+ {
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
+ basegfx::B2DPolygon aLine;
+
+ aLine.append(getBasePosition());
+ aLine.append(getSecondPosition());
+
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
+ aLine,
+ aRGBColorA,
+ aRGBColorB,
+ fStripeLengthPixel));
+
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+ }
+
+ return aRetval;
}
- void OverlayLineStriped::createBaseRange(OutputDevice& /*rOutputDevice*/)
+ void OverlayLineStriped::stripeDefinitionHasChanged()
{
- // reset range and expand it
- maBaseRange.reset();
- maBaseRange.expand(getBasePosition());
- maBaseRange.expand(getSecondPosition());
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
OverlayLineStriped::OverlayLineStriped(
@@ -80,63 +103,6 @@ namespace sdr
objectChange();
}
}
-
- sal_Bool OverlayLineStriped::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable() && !getBasePosition().equal(getSecondPosition()))
- {
- return basegfx::tools::isInEpsilonRange(getBasePosition(), getSecondPosition(), rPos, fTol);
- }
-
- return sal_False;
- }
-
- void OverlayLineStriped::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- if(!rMatrix.isIdentity())
- {
- // transform base position
- OverlayObjectWithBasePosition::transform(rMatrix);
-
- // transform maSecondPosition
- const basegfx::B2DPoint aNewSecondPosition = rMatrix * getSecondPosition();
- setSecondPosition(aNewSecondPosition);
- }
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayLine::drawGeometry(OutputDevice& rOutputDevice)
- {
- const Point aStart(FRound(getBasePosition().getX()), FRound(getBasePosition().getY()));
- const Point aEnd(FRound(getSecondPosition().getX()), FRound(getSecondPosition().getY()));
-
- rOutputDevice.SetLineColor(getBaseColor());
- rOutputDevice.SetFillColor();
-
- rOutputDevice.DrawLine(aStart, aEnd);
- }
-
- OverlayLine::OverlayLine(
- const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- Color aLineColor)
- : OverlayLineStriped(rBasePos, rSecondPos)
- {
- // set base color here, OverlayCrosshairStriped constructor has set
- // it to it's own default.
- maBaseColor = aLineColor;
- }
-
- OverlayLine::~OverlayLine()
- {
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index 8c682adfc166..79d493b6d9d0 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -50,33 +50,49 @@ namespace sdr
{
void OverlayManager::ImpDrawMembers(const basegfx::B2DRange& rRange, OutputDevice& rDestinationDevice) const
{
- ::sdr::overlay::OverlayObject* pCurrent = mpOverlayObjectStart;
+ const sal_uInt32 nSize(maOverlayObjects.size());
- if(pCurrent)
+ if(nSize)
{
const sal_uInt16 nOriginalAA(rDestinationDevice.GetAntialiasing());
+ const bool bIsAntiAliasing(getDrawinglayerOpt().IsAntiAliasing());
- // react on AntiAliasing settings
- if(maDrawinglayerOpt.IsAntiAliasing())
- {
- rDestinationDevice.SetAntialiasing(nOriginalAA | ANTIALIASING_ENABLE_B2DDRAW);
- }
- else
- {
- rDestinationDevice.SetAntialiasing(nOriginalAA & ~ANTIALIASING_ENABLE_B2DDRAW);
- }
+ // create processor
+ drawinglayer::processor2d::BaseProcessor2D* pProcessor = ::sdr::contact::createBaseProcessor2DFromOutputDevice(
+ rDestinationDevice,
+ getCurrentViewInformation2D());
- while(pCurrent)
+ if(pProcessor)
{
- if(pCurrent->isVisible())
+ for(OverlayObjectVector::const_iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
{
- if(rRange.overlaps(pCurrent->getBaseRange()))
+ OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
+ const OverlayObject& rCandidate = **aIter;
+
+ if(rCandidate.isVisible())
{
- pCurrent->drawGeometry(rDestinationDevice);
+ const drawinglayer::primitive2d::Primitive2DSequence& rSequence = rCandidate.getOverlayObjectPrimitive2DSequence();
+
+ if(rSequence.hasElements())
+ {
+ if(rRange.overlaps(rCandidate.getBaseRange()))
+ {
+ if(bIsAntiAliasing && rCandidate.allowsAntiAliase())
+ {
+ rDestinationDevice.SetAntialiasing(nOriginalAA | ANTIALIASING_ENABLE_B2DDRAW);
+ }
+ else
+ {
+ rDestinationDevice.SetAntialiasing(nOriginalAA & ~ANTIALIASING_ENABLE_B2DDRAW);
+ }
+
+ pProcessor->process(rSequence);
+ }
+ }
}
}
- pCurrent = pCurrent->mpNext;
+ delete pProcessor;
}
// restore AA settings
@@ -84,87 +100,162 @@ namespace sdr
}
}
- void OverlayManager::ImpCheckMapModeChange() const
+ void OverlayManager::ImpStripeDefinitionChanged()
{
- sal_Bool bZoomHasChanged(sal_False);
- MapMode aOutputDeviceMapMode(getOutputDevice().GetMapMode());
- ::sdr::overlay::OverlayObject* pCurrent = mpOverlayObjectStart;
+ const sal_uInt32 nSize(maOverlayObjects.size());
- if(maMapMode != aOutputDeviceMapMode)
+ if(nSize)
{
- bZoomHasChanged = (
- maMapMode.GetScaleX() != aOutputDeviceMapMode.GetScaleX()
- || maMapMode.GetScaleY() != aOutputDeviceMapMode.GetScaleY());
-
- // remember MapMode
- ((OverlayManager*)this)->maMapMode = aOutputDeviceMapMode;
- }
-
- if(bZoomHasChanged && pCurrent)
- {
- while(pCurrent)
+ for(OverlayObjectVector::iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
{
- pCurrent->zoomHasChanged();
- pCurrent = pCurrent->mpNext;
+ OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
+ OverlayObject& rCandidate = **aIter;
+ rCandidate.stripeDefinitionHasChanged();
}
}
}
- void OverlayManager::ImpStripeDefinitionChanged()
- {
- ::sdr::overlay::OverlayObject* pCurrent = mpOverlayObjectStart;
-
- while(pCurrent)
- {
- pCurrent->stripeDefinitionHasChanged();
- pCurrent = pCurrent->mpNext;
- }
- }
-
double OverlayManager::getDiscreteOne() const
{
- if(getOutputDevice().GetViewTransformation() != maViewTransformation)
+ if(basegfx::fTools::equalZero(mfDiscreteOne))
{
- OverlayManager* pThis = const_cast< OverlayManager* >(this);
- pThis->maViewTransformation = getOutputDevice().GetViewTransformation();
const basegfx::B2DVector aDiscreteInLogic(getOutputDevice().GetInverseViewTransformation() * basegfx::B2DVector(1.0, 0.0));
- pThis->mfDiscreteOne = aDiscreteInLogic.getLength();
+ const_cast< OverlayManager* >(this)->mfDiscreteOne = aDiscreteInLogic.getLength();
}
return mfDiscreteOne;
}
- OverlayManager::OverlayManager(OutputDevice& rOutputDevice)
+ OverlayManager::OverlayManager(
+ OutputDevice& rOutputDevice,
+ OverlayManager* pOldOverlayManager)
: Scheduler(),
rmOutputDevice(rOutputDevice),
- mpOverlayObjectStart(0L),
- mpOverlayObjectEnd(0L),
+ maOverlayObjects(),
maStripeColorA(Color(COL_BLACK)),
maStripeColorB(Color(COL_WHITE)),
- mnStripeLengthPixel(5L),
+ mnStripeLengthPixel(5),
maDrawinglayerOpt(),
maViewTransformation(),
+ maViewInformation2D(0),
mfDiscreteOne(0.0)
{
+ if(pOldOverlayManager)
+ {
+ // take over OverlayObjects from given OverlayManager. Copy
+ // the vector of pointers
+ maOverlayObjects = pOldOverlayManager->maOverlayObjects;
+ const sal_uInt32 nSize(maOverlayObjects.size());
+
+ if(nSize)
+ {
+ for(OverlayObjectVector::iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
+ {
+ OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
+ OverlayObject& rCandidate = **aIter;
+
+ // remove from old and add to new OverlayManager
+ pOldOverlayManager->impApplyRemoveActions(rCandidate);
+ impApplyAddActions(rCandidate);
+ }
+
+ pOldOverlayManager->maOverlayObjects.clear();
+ }
+ }
+ }
+
+ const drawinglayer::geometry::ViewInformation2D OverlayManager::getCurrentViewInformation2D() const
+ {
+ if(getOutputDevice().GetViewTransformation() != maViewTransformation)
+ {
+ basegfx::B2DRange aViewRange(maViewInformation2D.getViewport());
+
+ if(OUTDEV_WINDOW == getOutputDevice().GetOutDevType())
+ {
+ const Size aOutputSizePixel(getOutputDevice().GetOutputSizePixel());
+ aViewRange = basegfx::B2DRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight());
+ aViewRange.transform(getOutputDevice().GetInverseViewTransformation());
+ }
+
+ OverlayManager* pThis = const_cast< OverlayManager* >(this);
+
+ pThis->maViewTransformation = getOutputDevice().GetViewTransformation();
+ pThis->maViewInformation2D = drawinglayer::geometry::ViewInformation2D(
+ maViewInformation2D.getObjectTransformation(),
+ maViewTransformation,
+ aViewRange,
+ maViewInformation2D.getVisualizedPage(),
+ maViewInformation2D.getViewTime(),
+ maViewInformation2D.getExtendedInformationSequence());
+ pThis->mfDiscreteOne = 0.0;
+ }
+
+ return maViewInformation2D;
+ }
+
+ void OverlayManager::impApplyRemoveActions(OverlayObject& rTarget)
+ {
+ // handle evtl. animation
+ if(rTarget.allowsAnimation())
+ {
+ // remove from event chain
+ RemoveEvent(&rTarget);
+ }
+
+ // make invisible
+ invalidateRange(rTarget.getBaseRange());
+
+ // clear manager
+ rTarget.mpOverlayManager = 0;
+ }
+
+ void OverlayManager::impApplyAddActions(OverlayObject& rTarget)
+ {
+ // set manager
+ rTarget.mpOverlayManager = this;
+
+ // make visible
+ invalidateRange(rTarget.getBaseRange());
+
+ // handle evtl. animation
+ if(rTarget.allowsAnimation())
+ {
+ // Trigger at current time to get alive. This will do the
+ // object-specific next time calculation and hand over adding
+ // again to the scheduler to the animated object, too. This works for
+ // a paused or non-paused animator.
+ rTarget.Trigger(GetTime());
+ }
}
OverlayManager::~OverlayManager()
{
- // the OverlayManager is not the owner of the OverlayObjects
- // and thus will not delete them, but remove them.
- while(mpOverlayObjectStart)
+ // The OverlayManager is not the owner of the OverlayObjects
+ // and thus will not delete them, but remove them. Profit here
+ // from knowing that all will be removed
+ const sal_uInt32 nSize(maOverlayObjects.size());
+
+ if(nSize)
{
- remove(*mpOverlayObjectStart);
+ for(OverlayObjectVector::iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end(); aIter++)
+ {
+ OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
+ OverlayObject& rCandidate = **aIter;
+ impApplyRemoveActions(rCandidate);
+ }
+
+ // erase vector
+ maOverlayObjects.clear();
}
}
void OverlayManager::completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice) const
{
- if(!rRegion.IsEmpty() && mpOverlayObjectStart)
+ if(!rRegion.IsEmpty() && maOverlayObjects.size())
{
// check for changed MapModes. That may influence the
// logical size of pixel based OverlayObjects (like BitmapHandles)
- ImpCheckMapModeChange();
+ //ImpCheckMapModeChange();
// paint members
const Rectangle aRegionBoundRect(rRegion.GetBoundRect());
@@ -195,87 +286,38 @@ namespace sdr
void OverlayManager::add(OverlayObject& rOverlayObject)
{
- // add to the end of chain to preserve display order in paint
- DBG_ASSERT(0L == rOverlayObject.mpOverlayManager,
- "OverlayManager::add: OverlayObject is added to an OverlayManager (!)");
-
- if(mpOverlayObjectEnd)
- {
- // new element, add to end
- rOverlayObject.mpNext = mpOverlayObjectEnd->mpNext;
- rOverlayObject.mpPrevious = mpOverlayObjectEnd;
- mpOverlayObjectEnd->mpNext = &rOverlayObject;
- mpOverlayObjectEnd = &rOverlayObject;
- }
- else
- {
- // first element
- rOverlayObject.mpNext = rOverlayObject.mpPrevious = 0L;
- mpOverlayObjectEnd = mpOverlayObjectStart = &rOverlayObject;
- }
-
- // set manager
- rOverlayObject.mpOverlayManager = this;
+ OSL_ENSURE(0 == rOverlayObject.mpOverlayManager, "OverlayObject is added twice to an OverlayManager (!)");
- // make visible
- invalidateRange(rOverlayObject.getBaseRange());
+ // add to the end of chain to preserve display order in paint
+ maOverlayObjects.push_back(&rOverlayObject);
- // handle evtl. animation
- if(rOverlayObject.allowsAnimation())
- {
- // Trigger at current time to get alive. This will do the
- // object-specific next time calculation and hand over adding
- // again to the scheduler to the animated object, too. This works for
- // a paused or non-paused animator.
- rOverlayObject.Trigger(GetTime());
- }
+ // execute add actions
+ impApplyAddActions(rOverlayObject);
}
void OverlayManager::remove(OverlayObject& rOverlayObject)
{
- // handle evtl. animation
- if(rOverlayObject.allowsAnimation())
- {
- // remove from event chain
- RemoveEvent(&rOverlayObject);
- }
+ OSL_ENSURE(rOverlayObject.mpOverlayManager == this, "OverlayObject is removed from wrong OverlayManager (!)");
- // Remove from chain
- DBG_ASSERT(rOverlayObject.mpOverlayManager == this,
- "OverlayManager::remove: OverlayObject is removed from wrong OverlayManager (!)");
+ // execute remove actions
+ impApplyRemoveActions(rOverlayObject);
- if(rOverlayObject.mpPrevious)
- {
- rOverlayObject.mpPrevious->mpNext = rOverlayObject.mpNext;
- }
+ // remove from vector
+ const OverlayObjectVector::iterator aFindResult = ::std::find(maOverlayObjects.begin(), maOverlayObjects.end(), &rOverlayObject);
+ const bool bFound(aFindResult != maOverlayObjects.end());
+ OSL_ENSURE(bFound, "OverlayObject NOT found at OverlayManager (!)");
- if(rOverlayObject.mpNext)
+ if(bFound)
{
- rOverlayObject.mpNext->mpPrevious = rOverlayObject.mpPrevious;
+ maOverlayObjects.erase(aFindResult);
}
-
- if(&rOverlayObject == mpOverlayObjectStart)
- {
- mpOverlayObjectStart = rOverlayObject.mpNext;
- }
-
- if(&rOverlayObject == mpOverlayObjectEnd)
- {
- mpOverlayObjectEnd = rOverlayObject.mpPrevious;
- }
-
- // make invisible
- invalidateRange(rOverlayObject.getBaseRange());
-
- // clear manager
- rOverlayObject.mpOverlayManager = 0L;
}
void OverlayManager::invalidateRange(const basegfx::B2DRange& rRange)
{
if(OUTDEV_WINDOW == getOutputDevice().GetOutDevType())
{
- if(maDrawinglayerOpt.IsAntiAliasing())
+ if(getDrawinglayerOpt().IsAntiAliasing())
{
// assume AA needs one pixel more and invalidate one pixel more
const double fDiscreteOne(getDiscreteOne());
@@ -331,18 +373,6 @@ namespace sdr
ImpStripeDefinitionChanged();
}
}
-
- ::boost::shared_ptr<OverlayObjectVector> OverlayManager::GetOverlayObjects (void) const
- {
- ::boost::shared_ptr<OverlayObjectVector> pObjectList (new OverlayObjectVector());
- sdr::overlay::OverlayObject* pObject = mpOverlayObjectStart;
- while (pObject != NULL)
- {
- pObjectList->push_back(pObject);
- pObject = pObject->mpNext;
- }
- return pObjectList;
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 584faedcdda2..3fedc40f37cf 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -36,13 +36,10 @@
#include <basegfx/range/b2drange.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/window.hxx>
-
-// #i72754#
#include <vcl/bitmap.hxx>
#include <tools/stream.hxx>
-
-// #i75163#
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <vcl/cursor.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -63,7 +60,7 @@ namespace sdr
// compare the MapModes for zoom/scroll changes
if(maBufferDevice.GetMapMode() != getOutputDevice().GetMapMode())
{
- const sal_Bool bZoomed(
+ const bool bZoomed(
maBufferDevice.GetMapMode().GetScaleX() != getOutputDevice().GetMapMode().GetScaleX()
|| maBufferDevice.GetMapMode().GetScaleY() != getOutputDevice().GetMapMode().GetScaleY());
@@ -71,7 +68,7 @@ namespace sdr
{
const Point& rOriginOld = maBufferDevice.GetMapMode().GetOrigin();
const Point& rOriginNew = getOutputDevice().GetMapMode().GetOrigin();
- const sal_Bool bScrolled(rOriginOld != rOriginNew);
+ const bool bScrolled(rOriginOld != rOriginNew);
if(bScrolled)
{
@@ -81,8 +78,8 @@ namespace sdr
const Size aOutputSizePixel(maBufferDevice.GetOutputSizePixel());
// remember and switch off MapMode
- const sal_Bool bMapModeWasEnabled(maBufferDevice.IsMapModeEnabled());
- maBufferDevice.EnableMapMode(sal_False);
+ const bool bMapModeWasEnabled(maBufferDevice.IsMapModeEnabled());
+ maBufferDevice.EnableMapMode(false);
// scroll internally buffered stuff
const Point aDestinationOffsetPixel(aOriginNewPixel - aOriginOldPixel);
@@ -132,10 +129,10 @@ namespace sdr
Rectangle aRegionRectanglePixel;
// MapModes off
- const sal_Bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
- const sal_Bool bMapModeWasEnabledSource(maBufferDevice.IsMapModeEnabled());
- getOutputDevice().EnableMapMode(sal_False);
- ((OverlayManagerBuffered*)this)->maBufferDevice.EnableMapMode(sal_False);
+ const bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
+ const bool bMapModeWasEnabledSource(maBufferDevice.IsMapModeEnabled());
+ getOutputDevice().EnableMapMode(false);
+ ((OverlayManagerBuffered*)this)->maBufferDevice.EnableMapMode(false);
while(aRegionPixel.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
{
@@ -200,10 +197,10 @@ namespace sdr
Rectangle aRegionRectanglePixel;
// MapModes off
- const sal_Bool bMapModeWasEnabledDest(rSource.IsMapModeEnabled());
- const sal_Bool bMapModeWasEnabledSource(maBufferDevice.IsMapModeEnabled());
- rSource.EnableMapMode(sal_False);
- maBufferDevice.EnableMapMode(sal_False);
+ const bool bMapModeWasEnabledDest(rSource.IsMapModeEnabled());
+ const bool bMapModeWasEnabledSource(maBufferDevice.IsMapModeEnabled());
+ rSource.EnableMapMode(false);
+ maBufferDevice.EnableMapMode(false);
while(aRegion.GetEnumRects(aRegionHandle, aRegionRectanglePixel))
{
@@ -221,7 +218,7 @@ namespace sdr
static bool bDoPaintForVisualControl(false);
if(bDoPaintForVisualControl)
{
- const sal_Bool bMapModeWasEnabledTest(getOutputDevice().IsMapModeEnabled());
+ const bool bMapModeWasEnabledTest(getOutputDevice().IsMapModeEnabled());
getOutputDevice().EnableMapMode(false);
getOutputDevice().SetLineColor(COL_LIGHTRED);
getOutputDevice().SetFillColor();
@@ -259,15 +256,21 @@ namespace sdr
maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
aBufferRememberedRangeLogic.transform(getOutputDevice().GetInverseViewTransformation());
+ // prepare cursor handling
const bool bTargetIsWindow(OUTDEV_WINDOW == rmOutputDevice.GetOutDevType());
- Cursor* pCursor = 0;
+ bool bCursorWasEnabled(false);
- // #i75172# switch off VCL cursor during overlay refresh
+ // #i80730# switch off VCL cursor during overlay refresh
if(bTargetIsWindow)
{
Window& rWindow = static_cast< Window& >(rmOutputDevice);
- pCursor = rWindow.GetCursor();
- rWindow.SetCursor(0);
+ Cursor* pCursor = rWindow.GetCursor();
+
+ if(pCursor && pCursor->IsVisible())
+ {
+ pCursor->Hide();
+ bCursorWasEnabled = true;
+ }
}
if(DoRefreshWithPreRendering())
@@ -282,7 +285,7 @@ namespace sdr
}
maOutputBufferDevice.SetMapMode(getOutputDevice().GetMapMode());
- maOutputBufferDevice.EnableMapMode(sal_False);
+ maOutputBufferDevice.EnableMapMode(false);
maOutputBufferDevice.SetDrawMode(maBufferDevice.GetDrawMode());
maOutputBufferDevice.SetSettings(maBufferDevice.GetSettings());
maOutputBufferDevice.SetAntialiasing(maBufferDevice.GetAntialiasing());
@@ -320,8 +323,8 @@ namespace sdr
const Size aSize(aRegionRectanglePixel.GetSize());
{
- const sal_Bool bMapModeWasEnabledDest(maBufferDevice.IsMapModeEnabled());
- maBufferDevice.EnableMapMode(sal_False);
+ const bool bMapModeWasEnabledDest(maBufferDevice.IsMapModeEnabled());
+ maBufferDevice.EnableMapMode(false);
maOutputBufferDevice.DrawOutDev(
aTopLeft, aSize, // destination
@@ -334,14 +337,14 @@ namespace sdr
// paint overlay content for remembered region, use
// method from base class directly
- maOutputBufferDevice.EnableMapMode(sal_True);
+ maOutputBufferDevice.EnableMapMode(true);
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, maOutputBufferDevice);
- maOutputBufferDevice.EnableMapMode(sal_False);
+ maOutputBufferDevice.EnableMapMode(false);
// copy to output
{
- const sal_Bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
- getOutputDevice().EnableMapMode(sal_False);
+ const bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
+ getOutputDevice().EnableMapMode(false);
getOutputDevice().DrawOutDev(
aTopLeft, aSize, // destination
@@ -367,49 +370,19 @@ namespace sdr
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice());
}
- // VCL hack for transparent child windows
- // Problem is e.g. a radiobuttion form control in life mode. The used window
- // is a transparence vcl childwindow. This flag only allows the parent window to
- // paint into the child windows area, but there is no mechanism which takes
- // care for a repaint of the child window. A transparent child window is NOT
- // a window which always keeps it's content consistent over the parent, but it's
- // more like just a paint flag for the parent.
- // To get the update, the windows in question are updated manulally here.
- if(bTargetIsWindow)
+ // #i80730# restore visibility of VCL cursor
+ if(bCursorWasEnabled)
{
Window& rWindow = static_cast< Window& >(rmOutputDevice);
+ Cursor* pCursor = rWindow.GetCursor();
- if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
+ if(pCursor)
{
- const Rectangle aRegionRectanglePixel(
- maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
- maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
-
- for(sal_uInt16 a(0); a < rWindow.GetChildCount(); a++)
- {
- Window* pCandidate = rWindow.GetChild(a);
-
- if(pCandidate && pCandidate->IsPaintTransparent())
- {
- const Rectangle aCandidatePosSizePixel(pCandidate->GetPosPixel(), pCandidate->GetSizePixel());
-
- if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel))
- {
- pCandidate->Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN);
- pCandidate->Update();
- }
- }
- }
+ // check if cursor still exists. It may have been deleted from someone
+ pCursor->Show();
}
}
- // #i75172# restore VCL cursor
- if(bTargetIsWindow)
- {
- Window& rWindow = static_cast< Window& >(rmOutputDevice);
- rWindow.SetCursor(pCursor);
- }
-
// forget remembered Region
maBufferRememberedRangePixel.reset();
}
@@ -417,8 +390,11 @@ namespace sdr
return 0;
}
- OverlayManagerBuffered::OverlayManagerBuffered(OutputDevice& rOutputDevice, sal_Bool bRefreshWithPreRendering)
- : OverlayManager(rOutputDevice),
+ OverlayManagerBuffered::OverlayManagerBuffered(
+ OutputDevice& rOutputDevice,
+ OverlayManager* pOldOverlayManager,
+ bool bRefreshWithPreRendering)
+ : OverlayManager(rOutputDevice, pOldOverlayManager),
mbRefreshWithPreRendering(bRefreshWithPreRendering)
{
// Init timer
@@ -515,9 +491,9 @@ namespace sdr
}
}
- void OverlayManagerBuffered::SetRefreshWithPreRendering(sal_Bool bNew)
+ void OverlayManagerBuffered::SetRefreshWithPreRendering(bool bNew)
{
- if(mbRefreshWithPreRendering != bNew)
+ if((bool)mbRefreshWithPreRendering != bNew)
{
mbRefreshWithPreRendering = bNew;
}
diff --git a/svx/source/sdr/overlay/overlayobject.cxx b/svx/source/sdr/overlay/overlayobject.cxx
index 658b6719709e..5cddc3c63627 100644
--- a/svx/source/sdr/overlay/overlayobject.cxx
+++ b/svx/source/sdr/overlay/overlayobject.cxx
@@ -43,7 +43,6 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <svx/sdr/contact/objectcontacttools.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <drawinglayer/processor2d/baseprocessor2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -53,206 +52,94 @@ namespace sdr
{
void OverlayObject::objectChange()
{
- if(mpOverlayManager)
- {
- basegfx::B2DRange aPreviousRange(maBaseRange);
-
- if(!aPreviousRange.isEmpty())
- {
- mpOverlayManager->invalidateRange(aPreviousRange);
- }
-
- mbIsChanged = sal_True;
- const basegfx::B2DRange& rCurrentRange = getBaseRange();
-
- if(rCurrentRange != aPreviousRange && !rCurrentRange.isEmpty())
- {
- mpOverlayManager->invalidateRange(rCurrentRange);
- }
- }
- }
+ const basegfx::B2DRange aPreviousRange(maBaseRange);
+ maBaseRange.reset();
+ setPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DSequence());
- // support method to draw striped geometries
- void OverlayObject::ImpDrawRangeStriped(OutputDevice& rOutputDevice, const basegfx::B2DRange& rRange)
- {
- if(getOverlayManager())
+ if(getOverlayManager() && !aPreviousRange.isEmpty())
{
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(rRange));
-
- if(aPolygon.count())
- {
- ImpDrawPolygonStriped(rOutputDevice, aPolygon);
- }
+ getOverlayManager()->invalidateRange(aPreviousRange);
}
- }
- void OverlayObject::ImpDrawLineStriped(OutputDevice& rOutputDevice, double x1, double y1, double x2, double y2)
- {
- if(getOverlayManager())
- {
- const basegfx::B2DPoint aStart(x1, y1);
- const basegfx::B2DPoint aEnd(x2, y2);
+ const basegfx::B2DRange& rCurrentRange = getBaseRange();
- if(!aStart.equal(aEnd))
- {
- basegfx::B2DPolygon aPolygon;
- aPolygon.append(aStart);
- aPolygon.append(aEnd);
-
- ImpDrawPolygonStriped(rOutputDevice, aPolygon);
- }
+ if(getOverlayManager() && rCurrentRange != aPreviousRange && !rCurrentRange.isEmpty())
+ {
+ getOverlayManager()->invalidateRange(rCurrentRange);
}
}
- void OverlayObject::ImpDrawLineStriped(OutputDevice& rOutputDevice, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd)
+ // OverlayObject implementations.
+ drawinglayer::primitive2d::Primitive2DSequence OverlayObject::createOverlayObjectPrimitive2DSequence()
{
- if(getOverlayManager() && !rStart.equal(rEnd))
- {
- basegfx::B2DPolygon aPolygon;
- aPolygon.append(rStart);
- aPolygon.append(rEnd);
-
- ImpDrawPolygonStriped(rOutputDevice, aPolygon);
- }
+ // Default implementation has to assert a missing implementation. It cannot
+ // be useful to have overlay object derivations which have no visualisation
+ // at all
+ OSL_ENSURE(false, "OverlayObject derivation without visualisation definition (missing createOverlayObjectPrimitive2DSequence implementation) (!)");
+ return drawinglayer::primitive2d::Primitive2DSequence();
}
- void OverlayObject::ImpDrawPolygonStriped(OutputDevice& rOutputDevice, const basegfx::B2DPolygon& rPolygon)
+ void OverlayObject::allowAntiAliase(bool bNew)
{
- if(getOverlayManager() && rPolygon.count())
+ if(bNew != (bool)mbAllowsAntiAliase)
{
- if(getOverlayManager() && getOverlayManager()->getDrawinglayerOpt().IsAntiAliasing())
- {
- // prepare ViewInformation2D
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(
- basegfx::B2DHomMatrix(),
- rOutputDevice.GetViewTransformation(),
- basegfx::B2DRange(),
- 0,
- 0.0,
- 0);
-
- // create processor
- drawinglayer::processor2d::BaseProcessor2D* pProcessor = ::sdr::contact::createBaseProcessor2DFromOutputDevice(
- rOutputDevice,
- aViewInformation2D);
-
- if(pProcessor)
- {
- // prepare primitives
- const drawinglayer::primitive2d::Primitive2DReference aPolygonMarkerPrimitive2D(
- new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
- rPolygon,
- getOverlayManager()->getStripeColorA().getBColor(),
- getOverlayManager()->getStripeColorB().getBColor(),
- getOverlayManager()->getStripeLengthPixel()));
- const drawinglayer::primitive2d::Primitive2DSequence aSequence(&aPolygonMarkerPrimitive2D, 1);
-
- pProcessor->process(aSequence);
-
- delete pProcessor;
- }
- }
- else
- {
- const sal_uInt32 nLenPixel(getOverlayManager()->getStripeLengthPixel());
- const Size aDashSizePixel(nLenPixel, nLenPixel);
- const Size aDashSizeLogic(rOutputDevice.PixelToLogic(aDashSizePixel));
- const double fDashLength(aDashSizeLogic.Width());
- const double fFullDotDashLength(fDashLength + fDashLength);
-
- // fill DashDot vector
- ::std::vector<double> aDotDashArray;
- aDotDashArray.push_back(fDashLength);
- aDotDashArray.push_back(fDashLength);
-
- // get dash polygons
- basegfx::B2DPolyPolygon aStripesA;
- basegfx::B2DPolyPolygon aStripesB;
- basegfx::tools::applyLineDashing(rPolygon, aDotDashArray, &aStripesA, &aStripesB, fFullDotDashLength);
-
- // draw stripes A
- if(aStripesA.count())
- {
- rOutputDevice.SetFillColor();
- rOutputDevice.SetLineColor(getOverlayManager()->getStripeColorA());
-
- for(sal_uInt32 a(0L); a < aStripesA.count();a ++)
- {
- rOutputDevice.DrawPolyLine(aStripesA.getB2DPolygon(a));
- }
- }
-
- // draw stripes B
- if(aStripesB.count())
- {
- rOutputDevice.SetFillColor();
- rOutputDevice.SetLineColor(getOverlayManager()->getStripeColorB());
+ // remember new value
+ mbAllowsAntiAliase = bNew;
- for(sal_uInt32 a(0L); a < aStripesB.count();a ++)
- {
- rOutputDevice.DrawPolyLine(aStripesB.getB2DPolygon(a));
- }
- }
- }
+ // register change (after change)
+ objectChange();
}
}
OverlayObject::OverlayObject(Color aBaseColor)
- : Event(0L),
- mpOverlayManager(0L),
- mpNext(0L),
- mpPrevious(0L),
+ : Event(0),
+ mpOverlayManager(0),
maBaseColor(aBaseColor),
- mbIsVisible(sal_True),
- mbIsChanged(sal_True),
- mbIsHittable(sal_True),
- mbAllowsAnimation(sal_False)
+ mbIsVisible(true),
+ mbIsHittable(true),
+ mbAllowsAnimation(false),
+ mbAllowsAntiAliase(true)
{
}
OverlayObject::~OverlayObject()
{
- DBG_ASSERT(0L == mpOverlayManager,
- "OverlayObject is destructed which is still registered at OverlayManager (!)");
+ OSL_ENSURE(0 == getOverlayManager(), "OverlayObject is destructed which is still registered at OverlayManager (!)");
}
- sal_Bool OverlayObject::isHit(const basegfx::B2DPoint& rPos, double fTol) const
+ drawinglayer::primitive2d::Primitive2DSequence OverlayObject::getOverlayObjectPrimitive2DSequence() const
{
- if(isHittable())
+ if(!getPrimitive2DSequence().hasElements())
{
- if(0.0 != fTol)
- {
- basegfx::B2DRange aRange(getBaseRange());
- aRange.grow(fTol);
- return aRange.isInside(rPos);
- }
- else
- {
- return getBaseRange().isInside(rPos);
- }
+ // no existing sequence; create one
+ const_cast< OverlayObject* >(this)->setPrimitive2DSequence(
+ const_cast< OverlayObject* >(this)->createOverlayObjectPrimitive2DSequence());
}
- return sal_False;
+ return getPrimitive2DSequence();
}
const basegfx::B2DRange& OverlayObject::getBaseRange() const
{
- if(mbIsChanged)
+ if(getOverlayManager() && maBaseRange.isEmpty())
{
- if(mpOverlayManager)
+ const drawinglayer::primitive2d::Primitive2DSequence& rSequence = getOverlayObjectPrimitive2DSequence();
+
+ if(rSequence.hasElements())
{
- ((::sdr::overlay::OverlayObject*)this)->createBaseRange(mpOverlayManager->getOutputDevice());
- }
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D(getOverlayManager()->getCurrentViewInformation2D());
- ((::sdr::overlay::OverlayObject*)this)->mbIsChanged = sal_False;
+ const_cast< sdr::overlay::OverlayObject* >(this)->maBaseRange =
+ drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(rSequence, aViewInformation2D);
+ }
}
return maBaseRange;
}
- void OverlayObject::setVisible(sal_Bool bNew)
+ void OverlayObject::setVisible(bool bNew)
{
- if(bNew != mbIsVisible)
+ if(bNew != (bool)mbIsVisible)
{
// remember new value
mbIsVisible = bNew;
@@ -262,9 +149,9 @@ namespace sdr
}
}
- void OverlayObject::setHittable(sal_Bool bNew)
+ void OverlayObject::setHittable(bool bNew)
{
- if(bNew != mbIsHittable)
+ if(bNew != (bool)mbIsHittable)
{
// remember new value
mbIsHittable = bNew;
@@ -291,11 +178,6 @@ namespace sdr
// default does not register again
}
- void OverlayObject::zoomHasChanged()
- {
- // default does not need to do anything
- }
-
void OverlayObject::stripeDefinitionHasChanged()
{
// default does not need to do anything
@@ -330,15 +212,6 @@ namespace sdr
objectChange();
}
}
-
- void OverlayObjectWithBasePosition::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- if(!rMatrix.isIdentity())
- {
- basegfx::B2DPoint aNewBasePosition = rMatrix * getBasePosition();
- setBasePosition(aNewBasePosition);
- }
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlayobjectcell.cxx b/svx/source/sdr/overlay/overlayobjectcell.cxx
index 25d2dbbdd31b..5df0fc85f8f9 100644
--- a/svx/source/sdr/overlay/overlayobjectcell.cxx
+++ b/svx/source/sdr/overlay/overlayobjectcell.cxx
@@ -35,6 +35,11 @@
#include <vcl/outdev.hxx>
#include <vcl/hatch.hxx>
#include <svx/sdr/overlay/overlayobjectcell.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx>
+#include <drawinglayer/primitive2d/invertprimitive2d.hxx>
using namespace ::basegfx;
@@ -48,83 +53,60 @@ namespace sdr
mePaintType( eType ),
maRectangles( rRects )
{
+ // no AA for selection overlays
+ allowAntiAliase(false);
}
OverlayObjectCell::~OverlayObjectCell()
{
}
- void OverlayObjectCell::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayObjectCell::createOverlayObjectPrimitive2DSequence()
{
- // set colors
- rOutputDevice.SetLineColor();
- rOutputDevice.SetFillColor(getBaseColor());
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+ const sal_uInt32 nCount(maRectangles.size());
- if ( mePaintType == CELL_OVERLAY_INVERT )
+ if(nCount)
{
- rOutputDevice.Push();
- rOutputDevice.SetRasterOp( ROP_XOR );
- rOutputDevice.SetFillColor( COL_WHITE );
- }
-
- for(sal_uInt32 a(0L);a < maRectangles.size(); a++)
- {
- const basegfx::B2DRange& rRange(maRectangles[a]);
- const Rectangle aRectangle(fround(rRange.getMinX()), fround(rRange.getMinY()), fround(rRange.getMaxX()), fround(rRange.getMaxY()));
+ const basegfx::BColor aRGBColor(getBaseColor().getBColor());
+ aRetval.realloc(nCount);
- switch(mePaintType)
+ // create primitives for all ranges
+ for(sal_uInt32 a(0); a < nCount; a++)
{
- case CELL_OVERLAY_INVERT :
- {
- rOutputDevice.DrawRect( aRectangle );
+ const basegfx::B2DRange& rRange(maRectangles[a]);
+ const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(rRange));
- // if(OUTDEV_WINDOW == rOutputDevice.GetOutDevType())
- // {
- // ((Window&)rOutputDevice).Invert(aRectangle, INVERT_HIGHLIGHT);
- // }
-
- break;
- }
- case CELL_OVERLAY_HATCH :
- {
- rOutputDevice.DrawHatch(PolyPolygon(Polygon(aRectangle)), Hatch(HATCH_SINGLE, getBaseColor(), 2, 450));
- break;
- }
- case CELL_OVERLAY_TRANSPARENT :
- {
- rOutputDevice.DrawTransparent(PolyPolygon(Polygon(aRectangle)), 50);
- break;
- }
- case CELL_OVERLAY_LIGHT_TRANSPARENT :
- {
- rOutputDevice.DrawTransparent(PolyPolygon(Polygon(aRectangle)), 80);
- break;
- }
+ aRetval[a] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ basegfx::B2DPolyPolygon(aPolygon),
+ aRGBColor));
}
- }
- if ( mePaintType == CELL_OVERLAY_INVERT )
- rOutputDevice.Pop();
- }
- void OverlayObjectCell::createBaseRange(OutputDevice& /*rOutputDevice*/)
- {
- maBaseRange.reset();
+ if(mePaintType == CELL_OVERLAY_TRANSPARENT)
+ {
+ // embed in 50% transparent paint
+ const drawinglayer::primitive2d::Primitive2DReference aUnifiedAlpha(
+ new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D(
+ aRetval,
+ 0.5));
- for(sal_uInt32 a(0L); a < maRectangles.size(); a++)
- {
- maBaseRange.expand(maRectangles[a]);
- }
- }
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aUnifiedAlpha, 1);
+ }
+ else // CELL_OVERLAY_INVERT
+ {
+ // embed in invert primitive
+ const drawinglayer::primitive2d::Primitive2DReference aInvert(
+ new drawinglayer::primitive2d::InvertPrimitive2D(
+ aRetval));
- void OverlayObjectCell::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- for(sal_uInt32 a(0L); a < maRectangles.size(); a++)
- {
- maRectangles[a].transform(rMatrix);
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aInvert, 1);
+ }
}
- }
+ return aRetval;
+ }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlayobjectlist.cxx b/svx/source/sdr/overlay/overlayobjectlist.cxx
index 3c9107d94bfe..370b6d66c225 100644
--- a/svx/source/sdr/overlay/overlayobjectlist.cxx
+++ b/svx/source/sdr/overlay/overlayobjectlist.cxx
@@ -40,6 +40,8 @@
// get access to basic algos like ::std::find
#include <algorithm>
+#include <drawinglayer/processor2d/hittestprocessor2d.hxx>
+
//////////////////////////////////////////////////////////////////////////////
namespace sdr
@@ -73,63 +75,92 @@ namespace sdr
void OverlayObjectList::remove(OverlayObject& rOverlayObject)
{
const OverlayObjectVector::iterator aFindResult = ::std::find(maVector.begin(), maVector.end(), &rOverlayObject);
- DBG_ASSERT((aFindResult != maVector.end()),
- "OverlayObjectList::remove: Could not find given object in list (!)");
- maVector.erase(aFindResult);
+ const bool bFound(aFindResult != maVector.end());
+ OSL_ENSURE(bFound, "Could not find given object in list (!)");
+
+ if(bFound)
+ {
+ maVector.erase(aFindResult);
+ }
}
- sal_Bool OverlayObjectList::isHit(const basegfx::B2DPoint& rPos, double fTol) const
+ bool OverlayObjectList::isHitLogic(const basegfx::B2DPoint& rLogicPosition, double fLogicTolerance) const
{
if(maVector.size())
{
OverlayObjectVector::const_iterator aStart(maVector.begin());
+ sdr::overlay::OverlayObject* pFirst = *aStart;
+ OSL_ENSURE(pFirst, "Corrupt OverlayObjectList (!)");
+ OverlayManager* pManager = pFirst->getOverlayManager();
- if(0.0 == fTol)
+ if(pManager)
{
- ::sdr::overlay::OverlayObject* pCandidate = *aStart;
- OverlayManager* pManager = pCandidate->getOverlayManager();
-
- if(pManager)
+ if(0.0 == fLogicTolerance)
{
- Size aSizeLogic(pManager->getOutputDevice().PixelToLogic(
+ const Size aSizeLogic(pManager->getOutputDevice().PixelToLogic(
Size(DEFAULT_VALUE_FOR_HITTEST_PIXEL, DEFAULT_VALUE_FOR_HITTEST_PIXEL)));
- fTol = aSizeLogic.Width();
+ fLogicTolerance = aSizeLogic.Width();
}
- }
- for(; aStart != maVector.end(); aStart++)
- {
- ::sdr::overlay::OverlayObject* pCandidate = *aStart;
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D(pManager->getCurrentViewInformation2D());
+ drawinglayer::processor2d::HitTestProcessor2D aHitTestProcessor2D(
+ aViewInformation2D,
+ rLogicPosition,
+ fLogicTolerance,
+ false);
- if(pCandidate->isHit(rPos, fTol))
+ for(; aStart != maVector.end(); aStart++)
{
- return sal_True;
+ sdr::overlay::OverlayObject* pCandidate = *aStart;
+ OSL_ENSURE(pCandidate, "Corrupt OverlayObjectList (!)");
+
+ if(pCandidate->isHittable())
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence& rSequence = pCandidate->getOverlayObjectPrimitive2DSequence();
+
+ if(rSequence.hasElements())
+ {
+ aHitTestProcessor2D.process(rSequence);
+
+ if(aHitTestProcessor2D.getHit())
+ {
+ return true;
+ }
+ }
+ }
}
}
}
- return sal_False;
+ return false;
}
- sal_Bool OverlayObjectList::isHitPixel(const Point& rPos, sal_uInt32 nTol) const
+ bool OverlayObjectList::isHitPixel(const Point& rDiscretePosition, sal_uInt32 nDiscreteTolerance) const
{
if(maVector.size())
{
OverlayObjectVector::const_iterator aStart(maVector.begin());
- ::sdr::overlay::OverlayObject* pCandidate = *aStart;
+ sdr::overlay::OverlayObject* pCandidate = *aStart;
OverlayManager* pManager = pCandidate->getOverlayManager();
if(pManager)
{
- Point aPosLogic(pManager->getOutputDevice().PixelToLogic(rPos));
- Size aSizeLogic(pManager->getOutputDevice().PixelToLogic(Size(nTol, nTol)));
- basegfx::B2DPoint aPosition(aPosLogic.X(), aPosLogic.Y());
+ const Point aPosLogic(pManager->getOutputDevice().PixelToLogic(rDiscretePosition));
+ const basegfx::B2DPoint aPosition(aPosLogic.X(), aPosLogic.Y());
- return isHit(aPosition, (double)aSizeLogic.Width());
+ if(nDiscreteTolerance)
+ {
+ const Size aSizeLogic(pManager->getOutputDevice().PixelToLogic(Size(nDiscreteTolerance, nDiscreteTolerance)));
+ return isHitLogic(aPosition, (double)aSizeLogic.Width());
+ }
+ else
+ {
+ return isHitLogic(aPosition);
+ }
}
}
- return sal_False;
+ return false;
}
basegfx::B2DRange OverlayObjectList::getBaseRange() const
@@ -149,20 +180,6 @@ namespace sdr
return aRetval;
}
-
- void OverlayObjectList::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- if(!rMatrix.isIdentity() && maVector.size())
- {
- OverlayObjectVector::iterator aStart(maVector.begin());
-
- for(; aStart != maVector.end(); aStart++)
- {
- ::sdr::overlay::OverlayObject* pCandidate = *aStart;
- pCandidate->transform(rMatrix);
- }
- }
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx
index 3d859a9b0659..a94dbdb9d1c4 100644
--- a/svx/source/sdr/overlay/overlaypolypolygon.cxx
+++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx
@@ -35,6 +35,8 @@
#include <vcl/outdev.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -42,21 +44,33 @@ namespace sdr
{
namespace overlay
{
- void OverlayPolyPolygonStriped::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayPolyPolygonStriped::createOverlayObjectPrimitive2DSequence()
{
- if(maPolyPolygon.count())
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+
+ if(getOverlayManager())
{
- for(sal_uInt32 a(0L); a < maPolyPolygon.count(); a++)
- {
- ImpDrawPolygonStriped(rOutputDevice, maPolyPolygon.getB2DPolygon(a));
- }
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
+
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D(
+ getPolyPolygon(),
+ aRGBColorA,
+ aRGBColorB,
+ fStripeLengthPixel));
+
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
+
+ return aRetval;
}
- void OverlayPolyPolygonStriped::createBaseRange(OutputDevice& /*rOutputDevice*/)
+ void OverlayPolyPolygonStriped::stripeDefinitionHasChanged()
{
- // use tooling to get range from PolyPolygon
- maBaseRange = basegfx::tools::getRange(maPolyPolygon);
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
OverlayPolyPolygonStriped::OverlayPolyPolygonStriped(
@@ -81,67 +95,6 @@ namespace sdr
objectChange();
}
}
-
- sal_Bool OverlayPolyPolygonStriped::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable())
- {
- return basegfx::tools::isInEpsilonRange(maPolyPolygon, rPos, fTol);
- }
-
- return sal_False;
- }
-
- void OverlayPolyPolygonStriped::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- if(!rMatrix.isIdentity())
- {
- // transform maPolyPolygon
- maPolyPolygon.transform(rMatrix);
-
- // register change (after change)
- objectChange();
- }
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayPolyPolygon::drawGeometry(OutputDevice& rOutputDevice)
- {
- if(maPolyPolygon.count())
- {
- rOutputDevice.SetLineColor(getBaseColor());
- rOutputDevice.SetFillColor();
-
- // iterate self, else the single polygons will be closed when
- // using DrawPolyPolygon
- for(sal_uInt32 a(0L); a < maPolyPolygon.count(); a++)
- {
- const Polygon aPaintPoly(maPolyPolygon.getB2DPolygon(a));
- rOutputDevice.DrawPolyLine(aPaintPoly);
- }
- }
- }
-
- OverlayPolyPolygon::OverlayPolyPolygon(
- const basegfx::B2DPolyPolygon& rPolyPolygon,
- Color aPolygonColor)
- : OverlayPolyPolygonStriped(rPolyPolygon)
- {
- // set base color here, OverlayCrosshairStriped constructor has set
- // it to it's own default.
- maBaseColor = aPolygonColor;
- }
-
- OverlayPolyPolygon::~OverlayPolyPolygon()
- {
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
index 1383a296709b..c43a9494901f 100644
--- a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
+++ b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx
@@ -43,55 +43,9 @@ namespace sdr
{
namespace overlay
{
- void OverlayPrimitive2DSequenceObject::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayPrimitive2DSequenceObject::createOverlayObjectPrimitive2DSequence()
{
- if(getOverlayManager())
- {
- // prepare ViewInformation2D
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(
- basegfx::B2DHomMatrix(),
- rOutputDevice.GetViewTransformation(),
- basegfx::B2DRange(),
- 0,
- 0.0,
- 0);
-
- // create processor
- drawinglayer::processor2d::BaseProcessor2D* pProcessor = ::sdr::contact::createBaseProcessor2DFromOutputDevice(
- rOutputDevice,
- aViewInformation2D);
-
- if(pProcessor)
- {
- pProcessor->process(getSequence());
-
- delete pProcessor;
- }
- }
- }
-
- void OverlayPrimitive2DSequenceObject::createBaseRange(OutputDevice& rOutputDevice)
- {
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(
- basegfx::B2DHomMatrix(),
- rOutputDevice.GetViewTransformation(),
- basegfx::B2DRange(),
- 0,
- 0.0,
- 0);
-
- maBaseRange = drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(
- getSequence(), aViewInformation2D);
- }
-
- sal_Bool OverlayPrimitive2DSequenceObject::isHit(const basegfx::B2DPoint& /*rPos*/, double /*fTol*/) const
- {
- if(isHittable())
- {
- return false;
- }
-
- return false;
+ return getSequence();
}
OverlayPrimitive2DSequenceObject::OverlayPrimitive2DSequenceObject(const drawinglayer::primitive2d::Primitive2DSequence& rSequence)
diff --git a/svx/source/sdr/overlay/overlayrollingrectangle.cxx b/svx/source/sdr/overlay/overlayrollingrectangle.cxx
index ea5be0e4f400..42a3575288be 100644
--- a/svx/source/sdr/overlay/overlayrollingrectangle.cxx
+++ b/svx/source/sdr/overlay/overlayrollingrectangle.cxx
@@ -35,6 +35,11 @@
#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdr/overlay/overlaytools.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -42,65 +47,59 @@ namespace sdr
{
namespace overlay
{
- void OverlayRollingRectangleStriped::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayRollingRectangleStriped::createOverlayObjectPrimitive2DSequence()
{
- const basegfx::B2DRange aRange(getBasePosition(), getSecondPosition());
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
- if(getShowBounds())
+ if(getOverlayManager() && (getShowBounds() || getExtendedLines()))
{
- ImpDrawRangeStriped(rOutputDevice, aRange);
- }
-
- if(getExtendedLines())
- {
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
-
- // Left lines
- ImpDrawLineStriped(rOutputDevice, aVisibleLogic.Left(), aRange.getMinY(), aRange.getMinX(), aRange.getMinY());
- ImpDrawLineStriped(rOutputDevice, aVisibleLogic.Left(), aRange.getMaxY(), aRange.getMinX(), aRange.getMaxY());
-
- // Right lines
- ImpDrawLineStriped(rOutputDevice, aRange.getMaxX(), aRange.getMinY(), aVisibleLogic.Right(), aRange.getMinY());
- ImpDrawLineStriped(rOutputDevice, aRange.getMaxX(), aRange.getMaxY(), aVisibleLogic.Right(), aRange.getMaxY());
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
+ const basegfx::B2DRange aRollingRectangle(getBasePosition(), getSecondPosition());
- // Top lines
- ImpDrawLineStriped(rOutputDevice, aRange.getMinX(), aVisibleLogic.Top(), aRange.getMinX(), aRange.getMinY());
- ImpDrawLineStriped(rOutputDevice, aRange.getMaxX(), aVisibleLogic.Top(), aRange.getMaxX(), aRange.getMinY());
+ if(getShowBounds())
+ {
+ // view-independent part, create directly
+ const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRollingRectangle));
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
+ aPolygon,
+ aRGBColorA,
+ aRGBColorB,
+ fStripeLengthPixel));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aReference);
+ }
- // Bottom lines
- ImpDrawLineStriped(rOutputDevice, aRange.getMinX(), aRange.getMaxY(), aRange.getMinX(), aVisibleLogic.Bottom());
- ImpDrawLineStriped(rOutputDevice, aRange.getMaxX(), aRange.getMaxY(), aRange.getMaxX(), aVisibleLogic.Bottom());
+ if(getExtendedLines())
+ {
+ // view-dependent part, use helper primitive
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::OverlayRollingRectanglePrimitive(
+ aRollingRectangle,
+ aRGBColorA,
+ aRGBColorB,
+ fStripeLengthPixel));
+
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aReference);
+ }
}
+
+ return aRetval;
}
- void OverlayRollingRectangleStriped::createBaseRange(OutputDevice& rOutputDevice)
+ void OverlayRollingRectangleStriped::stripeDefinitionHasChanged()
{
- // reset range and expand it
- maBaseRange.reset();
-
- if(getExtendedLines())
- {
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
- maBaseRange.expand(basegfx::B2DPoint(aVisibleLogic.Left(), aVisibleLogic.Top()));
- maBaseRange.expand(basegfx::B2DPoint(aVisibleLogic.Right(), aVisibleLogic.Bottom()));
- }
-
- if(getShowBounds())
- {
- maBaseRange.expand(getBasePosition());
- maBaseRange.expand(getSecondPosition());
- }
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
OverlayRollingRectangleStriped::OverlayRollingRectangleStriped(
const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rSecondPos,
- sal_Bool bExtendedLines,
- sal_Bool bShowBounds)
+ bool bExtendedLines,
+ bool bShowBounds)
: OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK)),
maSecondPosition(rSecondPos),
mbExtendedLines(bExtendedLines),
@@ -124,9 +123,9 @@ namespace sdr
}
}
- void OverlayRollingRectangleStriped::setExtendedLines(sal_Bool bNew)
+ void OverlayRollingRectangleStriped::setExtendedLines(bool bNew)
{
- if(bNew != mbExtendedLines)
+ if(bNew != (bool)mbExtendedLines)
{
// remember new value
mbExtendedLines = bNew;
@@ -136,9 +135,9 @@ namespace sdr
}
}
- void OverlayRollingRectangleStriped::setShowBounds(sal_Bool bNew)
+ void OverlayRollingRectangleStriped::setShowBounds(bool bNew)
{
- if(bNew != mbShowBounds)
+ if(bNew != (bool)mbShowBounds)
{
// remember new value
mbShowBounds = bNew;
@@ -147,138 +146,6 @@ namespace sdr
objectChange();
}
}
-
- sal_Bool OverlayRollingRectangleStriped::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable())
- {
- if(getExtendedLines())
- {
- const basegfx::B2DRange aRange(getBaseRange());
- const basegfx::B2DPoint aMinimum(aRange.getMinimum());
- const basegfx::B2DPoint aMaximum(aRange.getMaximum());
-
- // test upper line horizontal
- if(rPos.getY() > (aMinimum.getY() - fTol) && rPos.getY() < (aMinimum.getY() + fTol))
- {
- return sal_True;
- }
-
- // test lower line horizontal
- if(rPos.getY() > (aMaximum.getY() - fTol) && rPos.getY() < (aMaximum.getY() + fTol))
- {
- return sal_True;
- }
-
- // test left line vertical
- if(rPos.getX() > (aMinimum.getX() - fTol) && rPos.getX() < (aMinimum.getX() + fTol))
- {
- return sal_True;
- }
-
- // test rightline vertical
- if(rPos.getX() > (aMaximum.getX() - fTol) && rPos.getX() < (aMaximum.getX() + fTol))
- {
- return sal_True;
- }
- }
-
- if(getShowBounds())
- {
- // test for inside grown range, outside shrinked one to test for border
- // hit without interiour
- basegfx::B2DRange aOuterRange(getBaseRange());
- aOuterRange.grow(fTol);
-
- if(aOuterRange.isInside(rPos))
- {
- basegfx::B2DRange aInnerRange(getBaseRange());
- aInnerRange.grow(-fTol);
-
- return !aInnerRange.isInside(rPos);
- }
- }
- }
-
- return sal_False;
- }
-
- void OverlayRollingRectangleStriped::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- if(!rMatrix.isIdentity())
- {
- // transform base position
- OverlayObjectWithBasePosition::transform(rMatrix);
-
- // transform maSecondPosition
- const basegfx::B2DPoint aNewSecondPosition = rMatrix * getSecondPosition();
- setSecondPosition(aNewSecondPosition);
- }
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayRollingRectangle::drawGeometry(OutputDevice& rOutputDevice)
- {
- const Point aStart(FRound(getBasePosition().getX()), FRound(getBasePosition().getY()));
- const Point aEnd(FRound(getSecondPosition().getX()), FRound(getSecondPosition().getY()));
- Rectangle aRectangle(aStart, aEnd);
- aRectangle.Justify();
-
- if(getShowBounds())
- {
- rOutputDevice.SetLineColor(getBaseColor());
- rOutputDevice.SetFillColor();
-
- rOutputDevice.DrawRect(aRectangle);
- }
-
- if(getExtendedLines())
- {
- const Point aEmptyPoint;
- const Rectangle aVisiblePixel(aEmptyPoint, rOutputDevice.GetOutputSizePixel());
- const Rectangle aVisibleLogic(rOutputDevice.PixelToLogic(aVisiblePixel));
-
- // Left lines
- rOutputDevice.DrawLine(Point(aVisibleLogic.Left(), aRectangle.Top()), aRectangle.TopLeft());
- rOutputDevice.DrawLine(Point(aVisibleLogic.Left(), aRectangle.Bottom()), aRectangle.BottomLeft());
-
- // Right lines
- rOutputDevice.DrawLine(aRectangle.TopRight(), Point(aVisibleLogic.Right(), aRectangle.Top()));
- rOutputDevice.DrawLine(aRectangle.BottomRight(), Point(aVisibleLogic.Right(), aRectangle.Bottom()));
-
- // Top lines
- rOutputDevice.DrawLine(Point(aRectangle.Left(), aVisibleLogic.Top()), aRectangle.TopLeft());
- rOutputDevice.DrawLine(Point(aRectangle.Right(), aVisibleLogic.Top()), aRectangle.TopRight());
-
- // Bottom lines
- rOutputDevice.DrawLine(aRectangle.BottomLeft(), Point(aRectangle.Left(), aVisibleLogic.Bottom()));
- rOutputDevice.DrawLine(aRectangle.BottomRight(), Point(aRectangle.Right(), aVisibleLogic.Bottom()));
- }
- }
-
- OverlayRollingRectangle::OverlayRollingRectangle(
- const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- Color aLineColor,
- sal_Bool bExtendedLines,
- sal_Bool bShowBounds)
- : OverlayRollingRectangleStriped(rBasePos, rSecondPos, bExtendedLines, bShowBounds)
- {
- // set base color here, OverlayCrosshairStriped constructor has set
- // it to it's own default.
- maBaseColor = aLineColor;
- }
-
- OverlayRollingRectangle::~OverlayRollingRectangle()
- {
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/overlay/overlaysdrobject.cxx b/svx/source/sdr/overlay/overlaysdrobject.cxx
deleted file mode 100644
index 7f1dbf2d5a4f..000000000000
--- a/svx/source/sdr/overlay/overlaysdrobject.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: overlaysdrobject.cxx,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <svx/sdr/overlay/overlaysdrobject.hxx>
-#include <svx/svdobj.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlaySdrObject::drawGeometry(OutputDevice& rOutputDevice)
- {
- mrSdrObject.SingleObjectPainter(rOutputDevice);
- }
-
- void OverlaySdrObject::createBaseRange(OutputDevice& /*rOutputDevice*/)
- {
- // reset range and expand it
- maBaseRange.reset();
-
- // get BoundRect
- Rectangle aBoundRect(mrSdrObject.GetCurrentBoundRect());
- const basegfx::B2DPoint aTopLeft(aBoundRect.Left(), aBoundRect.Top());
- const basegfx::B2DPoint aBottomRight(aBoundRect.Right(), aBoundRect.Bottom());
-
- maBaseRange.expand(aTopLeft);
- maBaseRange.expand(aBottomRight);
- }
-
- OverlaySdrObject::OverlaySdrObject(
- const basegfx::B2DPoint& rBasePos,
- const SdrObject& rObject)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK)),
- mrSdrObject(rObject)
- {
- }
-
- OverlaySdrObject::~OverlaySdrObject()
- {
- }
-
- sal_Bool OverlaySdrObject::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable())
- {
- Point aPnt( (long)rPos.getX(), (long)rPos.getY() );
- return mrSdrObject.CheckHit(aPnt, (USHORT)fTol, 0) != 0 ? sal_True : sal_False;
- }
-
- return sal_False;
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx
new file mode 100644
index 000000000000..2411ca3c31b4
--- /dev/null
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: overlayline.cxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+#include <svx/sdr/overlay/overlayselection.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <svtools/optionsdrawinglayer.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
+#include <drawinglayer/primitive2d/invertprimitive2d.hxx>
+#include <drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace sdr
+{
+ namespace overlay
+ {
+ // combine rages geometrically to a single, ORed polygon
+ basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const std::vector< basegfx::B2DRange >& rRanges)
+ {
+ const sal_uInt32 nCount(rRanges.size());
+ basegfx::B2DPolyPolygon aRetval;
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ const basegfx::B2DPolygon aDiscretePolygon(basegfx::tools::createPolygonFromRect(rRanges[a]));
+
+ if(0 == a)
+ {
+ aRetval.append(aDiscretePolygon);
+ }
+ else
+ {
+ aRetval = basegfx::tools::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon));
+ }
+ }
+
+ return aRetval;
+ }
+
+ // check if wanted type OVERLAY_TRANSPARENT or OVERLAY_SOLID
+ // is possible. If not, fallback to invert mode (classic mode)
+ OverlayType impCheckPossibleOverlayType(OverlayType aOverlayType)
+ {
+ if(OVERLAY_INVERT != aOverlayType)
+ {
+ const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
+
+ if(!aSvtOptionsDrawinglayer.IsTransparentSelection())
+ {
+ // not possible when switched off by user
+ return OVERLAY_INVERT;
+ }
+ else
+ {
+ const OutputDevice *pOut = Application::GetDefaultDevice();
+
+ if(pOut->GetSettings().GetStyleSettings().GetHighContrastMode())
+ {
+ // not possible when in high contrast mode
+ return OVERLAY_INVERT;
+ }
+
+ if(!pOut->supportsOperation(OutDevSupport_TransparentRect))
+ {
+ // not possible when no fast transparence paint is supported on the system
+ return OVERLAY_INVERT;
+ }
+ }
+ }
+
+ return aOverlayType;
+ }
+
+ drawinglayer::primitive2d::Primitive2DSequence OverlaySelection::createOverlayObjectPrimitive2DSequence()
+ {
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+ const sal_uInt32 nCount(getRanges().size());
+
+ if(nCount)
+ {
+ // create range primitives
+ const basegfx::BColor aRGBColor(getBaseColor().getBColor());
+ aRetval.realloc(nCount);
+
+ for(sal_uInt32 a(0);a < nCount; a++)
+ {
+ const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(maRanges[a]));
+ aRetval[a] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ basegfx::B2DPolyPolygon(aPolygon),
+ aRGBColor));
+ }
+
+ if(OVERLAY_INVERT == maLastOverlayType)
+ {
+ // embed all in invert primitive
+ const drawinglayer::primitive2d::Primitive2DReference aInvert(
+ new drawinglayer::primitive2d::InvertPrimitive2D(
+ aRetval));
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aInvert, 1);
+ }
+ else if(OVERLAY_TRANSPARENT == maLastOverlayType)
+ {
+ // embed all rectangles in transparent paint
+ const double fTransparence(mnLastTransparence / 100.0);
+ const drawinglayer::primitive2d::Primitive2DReference aUnifiedAlpha(
+ new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D(
+ aRetval,
+ fTransparence));
+
+ if(getBorder())
+ {
+ const basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges()));
+ const drawinglayer::primitive2d::Primitive2DReference aSelectionOutline(
+ new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
+ aPolyPolygon,
+ aRGBColor));
+
+ // add both to result
+ aRetval.realloc(2);
+ aRetval[0] = aUnifiedAlpha;
+ aRetval[1] = aSelectionOutline;
+ }
+ else
+ {
+ // just add transparent part
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aUnifiedAlpha, 1);
+ }
+ }
+ }
+
+ return aRetval;
+ }
+
+ OverlaySelection::OverlaySelection(
+ OverlayType eType,
+ const Color& rColor,
+ const std::vector< basegfx::B2DRange >& rRanges,
+ bool bBorder)
+ : OverlayObject(rColor),
+ meOverlayType(eType),
+ maRanges(rRanges),
+ maLastOverlayType(eType),
+ mnLastTransparence(0),
+ mbBorder(bBorder)
+ {
+ // no AA for selection overlays
+ allowAntiAliase(false);
+ }
+
+ OverlaySelection::~OverlaySelection()
+ {
+ if(getOverlayManager())
+ {
+ getOverlayManager()->remove(*this);
+ }
+ }
+
+ drawinglayer::primitive2d::Primitive2DSequence OverlaySelection::getOverlayObjectPrimitive2DSequence() const
+ {
+ // get current values
+ const OverlayType aNewOverlayType(impCheckPossibleOverlayType(meOverlayType));
+ const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
+ const sal_uInt16 nNewTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent());
+
+ if(getPrimitive2DSequence().hasElements())
+ {
+ if(aNewOverlayType != maLastOverlayType
+ || nNewTransparence != mnLastTransparence)
+ {
+ // conditions of last local decomposition have changed, delete
+ const_cast< OverlaySelection* >(this)->setPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DSequence());
+ }
+ }
+
+ if(!getPrimitive2DSequence().hasElements())
+ {
+ // remember new values
+ const_cast< OverlaySelection* >(this)->maLastOverlayType = aNewOverlayType;
+ const_cast< OverlaySelection* >(this)->mnLastTransparence = nNewTransparence;
+ }
+
+ // call base implementation
+ return OverlayObject::getOverlayObjectPrimitive2DSequence();
+ }
+
+ void OverlaySelection::setRanges(const std::vector< basegfx::B2DRange >& rNew)
+ {
+ if(rNew != maRanges)
+ {
+ maRanges = rNew;
+ objectChange();
+ }
+ }
+ } // end of namespace overlay
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx
new file mode 100644
index 000000000000..664c487c7e43
--- /dev/null
+++ b/svx/source/sdr/overlay/overlaytools.cxx
@@ -0,0 +1,498 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: overlayobject.cxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include <svx/sdr/overlay/overlaytools.hxx>
+#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ OverlayBitmapExPrimitive::OverlayBitmapExPrimitive(
+ const BitmapEx& rBitmapEx,
+ const basegfx::B2DPoint& rBasePosition,
+ sal_uInt16 nCenterX,
+ sal_uInt16 nCenterY)
+ : DiscreteMetricDependentPrimitive2D(),
+ maBitmapEx(rBitmapEx),
+ maBasePosition(rBasePosition),
+ mnCenterX(nCenterX),
+ mnCenterY(nCenterY)
+ {}
+
+ Primitive2DSequence OverlayBitmapExPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ Primitive2DSequence aRetval;
+ const Size aBitmapSize(getBitmapEx().GetSizePixel());
+
+ if(aBitmapSize.Width() && aBitmapSize.Height() && basegfx::fTools::more(getDiscreteUnit(), 0.0))
+ {
+ // calculate back from internal bitmap's extreme coordinates (the edges)
+ // to logical coordinates. Only use a unified scaling value (getDiscreteUnit(),
+ // the prepared one which expresses how many logic units form a discrete unit)
+ // for this step. This primitive is to be displayed always unscaled (in it's pixel size)
+ // and unrotated, more like a marker
+ const double fLeft(((0.0 - getCenterX()) * getDiscreteUnit()) + getBasePosition().getX());
+ const double fTop(((0.0 - getCenterY()) * getDiscreteUnit()) + getBasePosition().getY());
+ const double fRight((((aBitmapSize.getWidth() - 1.0) - getCenterX()) * getDiscreteUnit()) + getBasePosition().getX());
+ const double fBottom((((aBitmapSize.getHeight() - 1.0) - getCenterY()) * getDiscreteUnit()) + getBasePosition().getY());
+
+ // create a BitmapPrimitive2D using those positions
+ basegfx::B2DHomMatrix aTransform;
+
+ aTransform.set(0, 0, fRight - fLeft);
+ aTransform.set(1, 1, fBottom - fTop);
+ aTransform.set(0, 2, fLeft);
+ aTransform.set(1, 2, fTop);
+
+ const Primitive2DReference aPrimitive(new BitmapPrimitive2D(getBitmapEx(), aTransform));
+ aRetval = Primitive2DSequence(&aPrimitive, 1);
+ }
+
+ return aRetval;
+ }
+
+ bool OverlayBitmapExPrimitive::operator==( const BasePrimitive2D& rPrimitive ) const
+ {
+ if(DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const OverlayBitmapExPrimitive& rCompare = static_cast< const OverlayBitmapExPrimitive& >(rPrimitive);
+
+ return (getBitmapEx() == rCompare.getBitmapEx()
+ && getBasePosition() == rCompare.getBasePosition()
+ && getCenterX() == rCompare.getCenterX()
+ && getCenterY() == rCompare.getCenterY());
+ }
+
+ return false;
+ }
+
+ ImplPrimitrive2DIDBlock(OverlayBitmapExPrimitive, PRIMITIVE2D_ID_OVERLAYBITMAPEXPRIMITIVE)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ OverlayCrosshairPrimitive::OverlayCrosshairPrimitive(
+ const basegfx::B2DPoint& rBasePosition,
+ const basegfx::BColor& rRGBColorA,
+ const basegfx::BColor& rRGBColorB,
+ double fDiscreteDashLength)
+ : ViewportDependentPrimitive2D(),
+ maBasePosition(rBasePosition),
+ maRGBColorA(rRGBColorA),
+ maRGBColorB(rRGBColorB),
+ mfDiscreteDashLength(fDiscreteDashLength)
+ {}
+
+ Primitive2DSequence OverlayCrosshairPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ // use the prepared Viewport information accessible using getViewport()
+ Primitive2DSequence aRetval;
+
+ if(!getViewport().isEmpty())
+ {
+ aRetval.realloc(2);
+ basegfx::B2DPolygon aPolygon;
+
+ aPolygon.append(basegfx::B2DPoint(getViewport().getMinX(), getBasePosition().getY()));
+ aPolygon.append(basegfx::B2DPoint(getViewport().getMaxX(), getBasePosition().getY()));
+
+ aRetval[0] = Primitive2DReference(
+ new PolygonMarkerPrimitive2D(
+ aPolygon,
+ getRGBColorA(),
+ getRGBColorB(),
+ getDiscreteDashLength()));
+
+ aPolygon.clear();
+ aPolygon.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMinY()));
+ aPolygon.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMaxY()));
+
+ aRetval[1] = Primitive2DReference(
+ new PolygonMarkerPrimitive2D(
+ aPolygon,
+ getRGBColorA(),
+ getRGBColorB(),
+ getDiscreteDashLength()));
+ }
+
+ return aRetval;
+ }
+
+ bool OverlayCrosshairPrimitive::operator==( const BasePrimitive2D& rPrimitive ) const
+ {
+ if(ViewportDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const OverlayCrosshairPrimitive& rCompare = static_cast< const OverlayCrosshairPrimitive& >(rPrimitive);
+
+ return (getBasePosition() == rCompare.getBasePosition()
+ && getRGBColorA() == rCompare.getRGBColorA()
+ && getRGBColorB() == rCompare.getRGBColorB()
+ && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
+ }
+
+ return false;
+ }
+
+ ImplPrimitrive2DIDBlock(OverlayCrosshairPrimitive, PRIMITIVE2D_ID_OVERLAYCROSSHAIRPRIMITIVE)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ OverlayHatchRectanglePrimitive::OverlayHatchRectanglePrimitive(
+ const basegfx::B2DRange& rObjectRange,
+ double fDiscreteHatchDistance,
+ double fHatchRotation,
+ const basegfx::BColor& rHatchColor,
+ double fDiscreteGrow,
+ double fDiscreteShrink,
+ double fRotation)
+ : DiscreteMetricDependentPrimitive2D(),
+ maObjectRange(rObjectRange),
+ mfDiscreteHatchDistance(fDiscreteHatchDistance),
+ mfHatchRotation(fHatchRotation),
+ maHatchColor(rHatchColor),
+ mfDiscreteGrow(fDiscreteGrow),
+ mfDiscreteShrink(fDiscreteShrink),
+ mfRotation(fRotation)
+ {}
+
+ Primitive2DSequence OverlayHatchRectanglePrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ Primitive2DSequence aRetval;
+
+ if(basegfx::fTools::more(getDiscreteUnit(), 0.0))
+ {
+ basegfx::B2DRange aInnerRange(getObjectRange());
+ basegfx::B2DRange aOuterRange(getObjectRange());
+ basegfx::B2DPolyPolygon aHatchPolyPolygon;
+
+ aOuterRange.grow(getDiscreteUnit() * getDiscreteGrow());
+ aInnerRange.grow(getDiscreteUnit() * -getDiscreteShrink());
+
+ aHatchPolyPolygon.append(basegfx::tools::createPolygonFromRect(aOuterRange));
+
+ if(!aInnerRange.isEmpty())
+ {
+ aHatchPolyPolygon.append(basegfx::tools::createPolygonFromRect(aInnerRange));
+ }
+
+ if(!basegfx::fTools::equalZero(getRotation()))
+ {
+ basegfx::B2DHomMatrix aTransform;
+
+ aTransform.translate(-getObjectRange().getMinX(), -getObjectRange().getMinY());
+ aTransform.rotate(getRotation());
+ aTransform.translate(getObjectRange().getMinX(), getObjectRange().getMinY());
+
+ aHatchPolyPolygon.transform(aTransform);
+ }
+
+ const basegfx::BColor aEmptyColor(0.0, 0.0, 0.0);
+ const drawinglayer::attribute::FillHatchAttribute aFillHatchAttribute(
+ drawinglayer::attribute::HATCHSTYLE_SINGLE,
+ getDiscreteHatchDistance() * getDiscreteUnit(),
+ getHatchRotation() - getRotation(),
+ getHatchColor(),
+ false);
+ const Primitive2DReference aPrimitive(
+ new PolyPolygonHatchPrimitive2D(
+ aHatchPolyPolygon,
+ aEmptyColor,
+ aFillHatchAttribute));
+
+ aRetval = Primitive2DSequence(&aPrimitive, 1);
+ }
+
+ return aRetval;
+ }
+
+ bool OverlayHatchRectanglePrimitive::operator==( const BasePrimitive2D& rPrimitive ) const
+ {
+ if(DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const OverlayHatchRectanglePrimitive& rCompare = static_cast< const OverlayHatchRectanglePrimitive& >(rPrimitive);
+
+ return (getObjectRange() == rCompare.getObjectRange()
+ && getDiscreteHatchDistance() == rCompare.getDiscreteHatchDistance()
+ && getHatchRotation() == rCompare.getHatchRotation()
+ && getHatchColor() == rCompare.getHatchColor()
+ && getDiscreteGrow() == rCompare.getDiscreteGrow()
+ && getDiscreteShrink() == rCompare.getDiscreteShrink()
+ && getRotation() == rCompare.getRotation());
+ }
+
+ return false;
+ }
+
+ ImplPrimitrive2DIDBlock(OverlayHatchRectanglePrimitive, PRIMITIVE2D_ID_OVERLAYHATCHRECTANGLEPRIMITIVE)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ OverlayHelplineStripedPrimitive::OverlayHelplineStripedPrimitive(
+ const basegfx::B2DPoint& rBasePosition,
+ HelplineStyle eStyle,
+ const basegfx::BColor& rRGBColorA,
+ const basegfx::BColor& rRGBColorB,
+ double fDiscreteDashLength)
+ : ViewportDependentPrimitive2D(),
+ maBasePosition(rBasePosition),
+ meStyle(eStyle),
+ maRGBColorA(rRGBColorA),
+ maRGBColorB(rRGBColorB),
+ mfDiscreteDashLength(fDiscreteDashLength)
+ {}
+
+ Primitive2DSequence OverlayHelplineStripedPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ {
+ // use the prepared Viewport information accessible using getViewport()
+ Primitive2DSequence aRetval;
+
+ if(!getViewport().isEmpty())
+ {
+ switch(getStyle())
+ {
+ case HELPLINESTYLE_VERTICAL :
+ {
+ aRetval.realloc(1);
+ basegfx::B2DPolygon aLine;
+
+ aLine.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMinY()));
+ aLine.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMaxY()));
+
+ aRetval[0] = Primitive2DReference(
+ new PolygonMarkerPrimitive2D(
+ aLine,
+ getRGBColorA(),
+ getRGBColorB(),
+ getDiscreteDashLength()));
+ break;
+ }
+
+ case HELPLINESTYLE_HORIZONTAL :
+ {
+ aRetval.realloc(1);
+ basegfx::B2DPolygon aLine;
+
+ aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getBasePosition().getY()));
+ aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getBasePosition().getY()));
+
+ aRetval[0] = Primitive2DReference(
+ new PolygonMarkerPrimitive2D(
+ aLine,
+ getRGBColorA(),
+ getRGBColorB(),
+ getDiscreteDashLength()));
+ break;
+ }
+
+ default: // case HELPLINESTYLE_POINT :
+ {
+ const double fDiscreteUnit((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
+ aRetval.realloc(2);
+ basegfx::B2DPolygon aLineA, aLineB;
+
+ aLineA.append(basegfx::B2DPoint(getBasePosition().getX(), getBasePosition().getY() - fDiscreteUnit));
+ aLineA.append(basegfx::B2DPoint(getBasePosition().getX(), getBasePosition().getY() + fDiscreteUnit));
+
+ aRetval[0] = Primitive2DReference(
+ new PolygonMarkerPrimitive2D(
+ aLineA,
+ getRGBColorA(),
+ getRGBColorB(),
+ getDiscreteDashLength()));
+
+ aLineB.append(basegfx::B2DPoint(getBasePosition().getX() - fDiscreteUnit, getBasePosition().getY()));
+ aLineB.append(basegfx::B2DPoint(getBasePosition().getX() + fDiscreteUnit, getBasePosition().getY()));
+
+ aRetval[1] = Primitive2DReference(
+ new PolygonMarkerPrimitive2D(
+ aLineB,
+ getRGBColorA(),
+ getRGBColorB(),
+ getDiscreteDashLength()));
+
+ break;
+ }
+ }
+ }
+
+ return aRetval;
+ }
+
+ bool OverlayHelplineStripedPrimitive::operator==( const BasePrimitive2D& rPrimitive ) const
+ {
+ if(ViewportDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const OverlayHelplineStripedPrimitive& rCompare = static_cast< const OverlayHelplineStripedPrimitive& >(rPrimitive);
+
+ return (getBasePosition() == rCompare.getBasePosition()
+ && getStyle() == rCompare.getStyle()
+ && getRGBColorA() == rCompare.getRGBColorA()
+ && getRGBColorB() == rCompare.getRGBColorB()
+ && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
+ }
+
+ return false;
+ }
+
+ ImplPrimitrive2DIDBlock(OverlayHelplineStripedPrimitive, PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ OverlayRollingRectanglePrimitive::OverlayRollingRectanglePrimitive(
+ const basegfx::B2DRange& aRollingRectangle,
+ const basegfx::BColor& rRGBColorA,
+ const basegfx::BColor& rRGBColorB,
+ double fDiscreteDashLength)
+ : ViewportDependentPrimitive2D(),
+ maRollingRectangle(aRollingRectangle),
+ maRGBColorA(rRGBColorA),
+ maRGBColorB(rRGBColorB),
+ mfDiscreteDashLength(fDiscreteDashLength)
+ {}
+
+ Primitive2DSequence OverlayRollingRectanglePrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ // use the prepared Viewport information accessible using getViewport()
+ Primitive2DSequence aRetval;
+
+ if(!getViewport().isEmpty())
+ {
+ basegfx::B2DPolygon aLine;
+ aRetval.realloc(8);
+
+ // Left lines
+ aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getRollingRectangle().getMinY()));
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMinY()));
+ aRetval[0] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getRollingRectangle().getMaxY()));
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMaxY()));
+ aRetval[1] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ // Right lines
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMinY()));
+ aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getRollingRectangle().getMinY()));
+ aRetval[2] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMaxY()));
+ aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getRollingRectangle().getMaxY()));
+ aRetval[3] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ // Top lines
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getViewport().getMinY()));
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMinY()));
+ aRetval[4] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getViewport().getMinY()));
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMinY()));
+ aRetval[5] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ // Bottom lines
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMaxY()));
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getViewport().getMaxY()));
+ aRetval[6] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+
+ aLine.clear();
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMaxY()));
+ aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getViewport().getMaxY()));
+ aRetval[7] = Primitive2DReference(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
+ }
+
+ return aRetval;
+ }
+
+ bool OverlayRollingRectanglePrimitive::operator==( const BasePrimitive2D& rPrimitive ) const
+ {
+ if(ViewportDependentPrimitive2D::operator==(rPrimitive))
+ {
+ const OverlayRollingRectanglePrimitive& rCompare = static_cast< const OverlayRollingRectanglePrimitive& >(rPrimitive);
+
+ return (getRollingRectangle() == rCompare.getRollingRectangle()
+ && getRGBColorA() == rCompare.getRGBColorA()
+ && getRGBColorB() == rCompare.getRGBColorB()
+ && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
+ }
+
+ return false;
+ }
+
+ ImplPrimitrive2DIDBlock(OverlayRollingRectanglePrimitive, PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/source/sdr/overlay/overlaytriangle.cxx b/svx/source/sdr/overlay/overlaytriangle.cxx
index 1d01ab24e388..74f23b8f845c 100644
--- a/svx/source/sdr/overlay/overlaytriangle.cxx
+++ b/svx/source/sdr/overlay/overlaytriangle.cxx
@@ -37,6 +37,9 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -44,7 +47,7 @@ namespace sdr
{
namespace overlay
{
- void OverlayTriangleStriped::drawGeometry(OutputDevice& rOutputDevice)
+ drawinglayer::primitive2d::Primitive2DSequence OverlayTriangle::createOverlayObjectPrimitive2DSequence()
{
basegfx::B2DPolygon aPolygon;
@@ -53,33 +56,30 @@ namespace sdr
aPolygon.append(getThirdPosition());
aPolygon.setClosed(true);
- ImpDrawPolygonStriped(rOutputDevice, aPolygon);
- }
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ basegfx::B2DPolyPolygon(aPolygon),
+ getBaseColor().getBColor()));
- void OverlayTriangleStriped::createBaseRange(OutputDevice& /*rOutputDevice*/)
- {
- // reset range and expand it
- maBaseRange.reset();
- maBaseRange.expand(getBasePosition());
- maBaseRange.expand(getSecondPosition());
- maBaseRange.expand(getThirdPosition());
+ return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
- OverlayTriangleStriped::OverlayTriangleStriped(
+ OverlayTriangle::OverlayTriangle(
const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos)
- : OverlayObjectWithBasePosition(rBasePos, Color(COL_BLACK)),
+ const basegfx::B2DPoint& rThirdPos,
+ Color aTriangleColor)
+ : OverlayObjectWithBasePosition(rBasePos, aTriangleColor),
maSecondPosition(rSecondPos),
maThirdPosition(rThirdPos)
{
}
- OverlayTriangleStriped::~OverlayTriangleStriped()
+ OverlayTriangle::~OverlayTriangle()
{
}
- void OverlayTriangleStriped::setSecondPosition(const basegfx::B2DPoint& rNew)
+ void OverlayTriangle::setSecondPosition(const basegfx::B2DPoint& rNew)
{
if(rNew != maSecondPosition)
{
@@ -91,7 +91,7 @@ namespace sdr
}
}
- void OverlayTriangleStriped::setThirdPosition(const basegfx::B2DPoint& rNew)
+ void OverlayTriangle::setThirdPosition(const basegfx::B2DPoint& rNew)
{
if(rNew != maThirdPosition)
{
@@ -102,96 +102,6 @@ namespace sdr
objectChange();
}
}
-
- sal_Bool OverlayTriangleStriped::isHit(const basegfx::B2DPoint& rPos, double fTol) const
- {
- if(isHittable())
- {
- // test with all lines and epsilon-range
- if(basegfx::tools::isInEpsilonRange(getBasePosition(), getThirdPosition(), rPos, fTol))
- {
- return sal_True;
- }
- else if(basegfx::tools::isInEpsilonRange(getSecondPosition(), getBasePosition(), rPos, fTol))
- {
- return sal_True;
- }
- else if(basegfx::tools::isInEpsilonRange(getThirdPosition(), getSecondPosition(), rPos, fTol))
- {
- return sal_True;
- }
-
- // test if inside triangle
- basegfx::B2DPolygon aTestPoly;
- aTestPoly.append(getBasePosition());
- aTestPoly.append(getSecondPosition());
- aTestPoly.append(getThirdPosition());
- aTestPoly.setClosed(true);
-
- return basegfx::tools::isInside(aTestPoly, rPos);
- }
-
- return sal_False;
- }
-
- void OverlayTriangleStriped::transform(const basegfx::B2DHomMatrix& rMatrix)
- {
- if(!rMatrix.isIdentity())
- {
- // transform base position
- OverlayObjectWithBasePosition::transform(rMatrix);
-
- // transform maSecondPosition
- const basegfx::B2DPoint aNewSecondPosition = rMatrix * getSecondPosition();
- setSecondPosition(aNewSecondPosition);
-
- // transform maThirdPosition
- const basegfx::B2DPoint aNewThirdPosition = rMatrix * getThirdPosition();
- setThirdPosition(aNewThirdPosition);
- }
- }
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- void OverlayTriangle::drawGeometry(OutputDevice& rOutputDevice)
- {
- Polygon aPolygon(4);
- Point aPosition(FRound(getBasePosition().getX()), FRound(getBasePosition().getY()));
- aPolygon[0] = aPolygon[3] = aPosition;
- aPosition.X() = FRound(getSecondPosition().getX());
- aPosition.Y() = FRound(getSecondPosition().getY());
- aPolygon[1] = aPosition;
- aPosition.X() = FRound(getThirdPosition().getX());
- aPosition.Y() = FRound(getThirdPosition().getY());
- aPolygon[2] = aPosition;
-
- rOutputDevice.SetLineColor();
- rOutputDevice.SetFillColor(getBaseColor());
-
- rOutputDevice.DrawPolygon(aPolygon);
- }
-
- OverlayTriangle::OverlayTriangle(
- const basegfx::B2DPoint& rBasePos,
- const basegfx::B2DPoint& rSecondPos,
- const basegfx::B2DPoint& rThirdPos,
- Color aTriangleColor)
- : OverlayTriangleStriped(rBasePos, rSecondPos, rThirdPos)
- {
- // set base color here, OverlayCrosshairStriped constructor has set
- // it to it's own default.
- maBaseColor = aTriangleColor;
- }
-
- OverlayTriangle::~OverlayTriangle()
- {
- }
} // end of namespace overlay
} // end of namespace sdr
diff --git a/svx/source/sdr/primitive2d/makefile.mk b/svx/source/sdr/primitive2d/makefile.mk
index e9e976d434ed..7510b6a23b35 100644
--- a/svx/source/sdr/primitive2d/makefile.mk
+++ b/svx/source/sdr/primitive2d/makefile.mk
@@ -51,6 +51,7 @@ SLOFILES=\
$(SLO)$/sdrcaptionprimitive2d.obj \
$(SLO)$/sdrgrafprimitive2d.obj \
$(SLO)$/sdrole2primitive2d.obj \
+ $(SLO)$/sdrolecontentprimitive2d.obj \
$(SLO)$/sdrpathprimitive2d.obj \
$(SLO)$/sdrprimitivetools.obj \
$(SLO)$/sdrmeasureprimitive2d.obj \
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index a330362dddbc..4e57166b4723 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -76,6 +76,7 @@
#include <drawinglayer/attribute/sdrattribute3d.hxx>
#include <drawinglayer/attribute/sdrallattribute3d.hxx>
#include <svx/rectenum.hxx>
+#include <svx/sdtfchim.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -473,7 +474,14 @@ namespace drawinglayer
return pRetval;
}
- attribute::SdrTextAttribute* createNewSdrTextAttribute(const SfxItemSet& rSet, const SdrText& rText)
+ // #i101508# Support handing over given text-to-border distances
+ attribute::SdrTextAttribute* createNewSdrTextAttribute(
+ const SfxItemSet& rSet,
+ const SdrText& rText,
+ const sal_Int32* pLeft,
+ const sal_Int32* pUpper,
+ const sal_Int32* pRight,
+ const sal_Int32* pLower)
{
attribute::SdrTextAttribute* pRetval(0);
const SdrTextObj& rTextObj = rText.GetObject();
@@ -512,23 +520,26 @@ namespace drawinglayer
}
}
- const SdrFitToSizeType eFit = rTextObj.GetFitToSize();
+ const SdrFitToSizeType eFit(rTextObj.GetFitToSize());
const SdrTextAniKind eAniKind(rTextObj.GetTextAniKind());
pRetval = new attribute::SdrTextAttribute(
rText,
aOutlinerParaObject,
((const XFormTextStyleItem&)rSet.Get(XATTR_FORMTXTSTYLE)).GetValue(),
- rTextObj.GetTextLeftDistance(),
- rTextObj.GetTextUpperDistance(),
- rTextObj.GetTextRightDistance(),
- rTextObj.GetTextLowerDistance(),
+ pLeft ? *pLeft : rTextObj.GetTextLeftDistance(),
+ pUpper ? *pUpper : rTextObj.GetTextUpperDistance(),
+ pRight ? *pRight : rTextObj.GetTextRightDistance(),
+ pLower ? *pLower : rTextObj.GetTextLowerDistance(),
+ rTextObj.GetTextHorizontalAdjust(rSet),
+ rTextObj.GetTextVerticalAdjust(rSet),
((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
(SDRTEXTFIT_PROPORTIONAL == eFit || SDRTEXTFIT_ALLLINES == eFit),
((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
SDRTEXTANI_BLINK == eAniKind,
SDRTEXTANI_SCROLL == eAniKind || SDRTEXTANI_ALTERNATE == eAniKind || SDRTEXTANI_SLIDE == eAniKind,
- bInEditMode);
+ bInEditMode,
+ ((const SdrTextFixedCellHeightItem&)rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
}
return pRetval;
@@ -591,10 +602,18 @@ namespace drawinglayer
if(aBitmap.GetPrefMapMode() != aDestinationMapUnit)
{
- // #i96237# need to use LogicToLogic, source is not always pixels
- aBitmap.SetPrefSize(Application::GetDefaultDevice()->LogicToLogic(
- aBitmap.GetPrefSize(), aBitmap.GetPrefMapMode(), aDestinationMapUnit));
- aBitmap.SetPrefMapMode(aDestinationMapUnit);
+ // #i100360# for MAP_PIXEL, LogicToLogic will not work properly,
+ // so fallback to Application::GetDefaultDevice()
+ if(MAP_PIXEL == aBitmap.GetPrefMapMode().GetMapUnit())
+ {
+ aBitmap.SetPrefSize(Application::GetDefaultDevice()->PixelToLogic(
+ aBitmap.GetPrefSize(), aDestinationMapUnit));
+ }
+ else
+ {
+ aBitmap.SetPrefSize(OutputDevice::LogicToLogic(
+ aBitmap.GetPrefSize(), aBitmap.GetPrefMapMode(), aDestinationMapUnit));
+ }
}
// get size
@@ -665,7 +684,7 @@ namespace drawinglayer
// when object has text and text is fontwork and hide contour is set for fontwork, force
// line and fill style to empty
- if(pText && pText->isFontwork() && pText->isHideContour())
+ if(pText && pText->getSdrFormTextAttribute() && pText->isHideContour())
{
bFontworkHideContour = true;
}
@@ -730,7 +749,7 @@ namespace drawinglayer
// when object has text and text is fontwork and hide contour is set for fontwork, force
// line and fill style to empty
- if(pText && pText->isFontwork() && pText->isHideContour())
+ if(pText && pText->getSdrFormTextAttribute() && pText->isHideContour())
{
bFontworkHideContour = true;
}
@@ -1023,7 +1042,14 @@ namespace drawinglayer
}
}
- attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute(const SfxItemSet& rSet, const SdrText* pSdrText)
+ // #i101508# Support handing over given text-to-border distances
+ attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute(
+ const SfxItemSet& rSet,
+ const SdrText* pSdrText,
+ const sal_Int32* pLeft,
+ const sal_Int32* pUpper,
+ const sal_Int32* pRight,
+ const sal_Int32* pLower)
{
attribute::SdrFillTextAttribute* pRetval(0L);
attribute::SdrFillAttribute* pFill(0L);
@@ -1034,12 +1060,12 @@ namespace drawinglayer
// look for text first
if(pSdrText)
{
- pText = createNewSdrTextAttribute(rSet, *pSdrText);
+ pText = createNewSdrTextAttribute(rSet, *pSdrText, pLeft, pUpper, pRight, pLower);
}
// when object has text and text is fontwork and hide contour is set for fontwork, force
// fill style to empty
- if(pText && pText->isFontwork() && pText->isHideContour())
+ if(pText && pText->getSdrFormTextAttribute() && pText->isHideContour())
{
bFontworkHideContour = true;
}
diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
index 80067901483b..73d5689350c2 100644
--- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
@@ -50,62 +50,96 @@ namespace drawinglayer
Primitive2DSequence SdrCaptionPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const
{
Primitive2DSequence aRetval;
+ Primitive2DSequence aHitTestContent;
// create unit outline polygon
- ::basegfx::B2DPolygon aUnitOutline(::basegfx::tools::createPolygonFromRect(::basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), getCornerRadiusX(), getCornerRadiusY()));
+ const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRange(0.0, 0.0, 1.0, 1.0),
+ getCornerRadiusX(),
+ getCornerRadiusY()));
// add fill
if(getSdrLFSTAttribute().getFill())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient()));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ createPolyPolygonFillPrimitive(
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
+ *getSdrLFSTAttribute().getFill(),
+ getSdrLFSTAttribute().getFillFloatTransGradient()));
+ }
+ else
+ {
+ // if no fill, create one for HitTest and BoundRect fallback
+ appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent,
+ createPolyPolygonFillPrimitive(
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
+ attribute::SdrFillAttribute(0.0, basegfx::BColor(0.0, 0.0, 0.0)),
+ getSdrLFSTAttribute().getFillFloatTransGradient()));
}
// add line
if(getSdrLFSTAttribute().getLine())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(aUnitOutline, getTransform(), *getSdrLFSTAttribute().getLine()));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(getTail(), getTransform(), *getSdrLFSTAttribute().getLine(), getSdrLFSTAttribute().getLineStartEnd()));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ createPolygonLinePrimitive(
+ aUnitOutline,
+ getTransform(),
+ *getSdrLFSTAttribute().getLine()));
+
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ createPolygonLinePrimitive(
+ getTail(),
+ getTransform(),
+ *getSdrLFSTAttribute().getLine(),
+ getSdrLFSTAttribute().getLineStartEnd()));
}
else
{
- // if initially no line is defined, create one for HitTest and BoundRect
- Primitive2DSequence aLineSequence(2);
- const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0));
-
- aLineSequence[0] = createPolygonLinePrimitive(aUnitOutline, getTransform(), aBlackHairline);
- aLineSequence[1] = createPolygonLinePrimitive(getTail(), getTransform(), aBlackHairline);
+ // if initially no line is defined, create one for HitTest and BoundRect. It
+ // is sufficient to use the tail; the body is already ensured with fill creation
+ appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent,
+ createPolygonLinePrimitive(
+ getTail(),
+ getTransform(),
+ attribute::SdrLineAttribute(basegfx::BColor(0.0, 0.0, 0.0))));
+ }
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(aLineSequence)));
+ // add HitTest and BoundRect helper geometry (if exists)
+ if(aHitTestContent.hasElements())
+ {
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ Primitive2DReference(new HitTestPrimitive2D(aHitTestContent)));
}
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ createTextPrimitive(
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
+ *getSdrLFSTAttribute().getText(),
+ getSdrLFSTAttribute().getLine(),
+ false,
+ false,
+ false));
}
// add shadow
if(getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
}
SdrCaptionPrimitive2D::SdrCaptionPrimitive2D(
- const ::basegfx::B2DHomMatrix& rTransform,
+ const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
- const ::basegfx::B2DPolygon& rTail,
+ const basegfx::B2DPolygon& rTail,
double fCornerRadiusX,
double fCornerRadiusY)
: BasePrimitive2D(),
@@ -118,7 +152,7 @@ namespace drawinglayer
// transform maTail to unit polygon
if(getTail().count())
{
- ::basegfx::B2DHomMatrix aInverse(getTransform());
+ basegfx::B2DHomMatrix aInverse(getTransform());
aInverse.invert();
maTail.transform(aInverse);
}
diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
index 5ee00133588f..a04021ae21ad 100644
--- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
@@ -72,21 +72,13 @@ namespace drawinglayer
// add text
if(getSdrLSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false));
}
// add shadow
if(getSdrLSTAttribute().getShadow())
{
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLSTAttribute().getShadow());
}
return aRetval;
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index 51be7cd03033..e2dce7b551ed 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -56,22 +56,19 @@ namespace drawinglayer
{
const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)));
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(
- basegfx::B2DPolyPolygon(aUnitOutline), getTextBox(), *getSdrSTAttribute().getText(), 0, false, getWordWrap()));
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTextBox(),
+ *getSdrSTAttribute().getText(),
+ 0,
+ false,
+ getWordWrap(),
+ isForceTextClipToTextRange()));
}
// add shadow
- if(getSdrSTAttribute().getShadow())
+ if(aRetval.hasElements() && getSdrSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
}
return aRetval;
@@ -81,12 +78,14 @@ namespace drawinglayer
const attribute::SdrShadowTextAttribute& rSdrSTAttribute,
const Primitive2DSequence& rSubPrimitives,
const basegfx::B2DHomMatrix& rTextBox,
- bool bWordWrap)
+ bool bWordWrap,
+ bool bForceTextClipToTextRange)
: BasePrimitive2D(),
maSdrSTAttribute(rSdrSTAttribute),
maSubPrimitives(rSubPrimitives),
maTextBox(rTextBox),
- mbWordWrap(bWordWrap)
+ mbWordWrap(bWordWrap),
+ mbForceTextClipToTextRange(bForceTextClipToTextRange)
{
}
@@ -99,7 +98,8 @@ namespace drawinglayer
return (getSdrSTAttribute() == rCompare.getSdrSTAttribute()
&& getSubPrimitives() == rCompare.getSubPrimitives()
&& getTextBox() == rCompare.getTextBox()
- && getWordWrap() == rCompare.getWordWrap());
+ && getWordWrap() == rCompare.getWordWrap()
+ && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 4a27eb73de8e..cd426edfdd05 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -67,13 +67,13 @@ namespace drawinglayer
namespace primitive2d
{
Primitive2DReference createPolyPolygonFillPrimitive(
- const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon,
- const ::basegfx::B2DHomMatrix& rObjectTransform,
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrFillAttribute& rFill,
const attribute::FillGradientAttribute* pFillGradient)
{
// prepare fully scaled polygon
- ::basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon);
+ basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon);
aScaledPolyPolygon.transform(rObjectTransform);
BasePrimitive2D* pNewFillPrimitive = 0L;
@@ -87,7 +87,7 @@ namespace drawinglayer
}
else if(rFill.isBitmap())
{
- const ::basegfx::B2DRange aRange(::basegfx::tools::getRange(aScaledPolyPolygon));
+ const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon));
pNewFillPrimitive = new PolyPolygonBitmapPrimitive2D(aScaledPolyPolygon, rFill.getColor(), rFill.getBitmap()->getFillBitmapAttribute(aRange));
}
else
@@ -110,7 +110,7 @@ namespace drawinglayer
// create FillGradientPrimitive2D for transparence and add to new sequence
// fillGradientPrimitive is enough here (compared to PolyPolygonGradientPrimitive2D) since float transparence will be masked anyways
- const ::basegfx::B2DRange aRange(::basegfx::tools::getRange(aScaledPolyPolygon));
+ const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon));
const Primitive2DReference xRefB(new FillGradientPrimitive2D(aRange, *pFillGradient));
const Primitive2DSequence aAlpha(&xRefB, 1L);
@@ -125,13 +125,13 @@ namespace drawinglayer
}
Primitive2DReference createPolygonLinePrimitive(
- const ::basegfx::B2DPolygon& rUnitPolygon,
- const ::basegfx::B2DHomMatrix& rObjectTransform,
+ const basegfx::B2DPolygon& rUnitPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrLineAttribute& rLine,
const attribute::SdrLineStartEndAttribute* pStroke)
{
// prepare fully scaled polygon
- ::basegfx::B2DPolygon aScaledPolygon(rUnitPolygon);
+ basegfx::B2DPolygon aScaledPolygon(rUnitPolygon);
aScaledPolygon.transform(rObjectTransform);
// create line and stroke attribute
@@ -168,15 +168,16 @@ namespace drawinglayer
}
Primitive2DReference createTextPrimitive(
- const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon,
- const ::basegfx::B2DHomMatrix& rObjectTransform,
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform,
const attribute::SdrTextAttribute& rText,
const attribute::SdrLineAttribute* pStroke,
bool bCellText,
- bool bWordWrap)
+ bool bWordWrap,
+ bool bClipOnBounds)
{
- ::basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform);
- SdrTextPrimitive2D* pNew = 0L;
+ basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform);
+ SdrTextPrimitive2D* pNew = 0;
if(rText.isContour())
{
@@ -185,20 +186,20 @@ namespace drawinglayer
{
// take line width into account and shrink contour polygon accordingly
// decompose to get scale
- ::basegfx::B2DVector aScale, aTranslate;
+ basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
rObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX);
// scale outline to object's size to allow growing with value relative to that size
// and also to keep aspect ratio
- ::basegfx::B2DHomMatrix aScaleTransform;
+ basegfx::B2DHomMatrix aScaleTransform;
aScaleTransform.set(0, 0, fabs(aScale.getX()));
aScaleTransform.set(1, 1, fabs(aScale.getY()));
- ::basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon);
+ basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon);
aScaledUnitPolyPolygon.transform(aScaleTransform);
// grow the polygon. To shrink, use negative value (half width)
- aScaledUnitPolyPolygon = ::basegfx::tools::growInNormalDirection(aScaledUnitPolyPolygon, -(pStroke->getWidth() * 0.5));
+ aScaledUnitPolyPolygon = basegfx::tools::growInNormalDirection(aScaledUnitPolyPolygon, -(pStroke->getWidth() * 0.5));
// scale back to unit polygon
aScaleTransform.set(0, 0, 0.0 != aScale.getX() ? 1.0 / aScale.getX() : 1.0);
@@ -206,48 +207,60 @@ namespace drawinglayer
aScaledUnitPolyPolygon.transform(aScaleTransform);
// create with unit polygon
- pNew = new SdrContourTextPrimitive2D(rText.getSdrText(), rText.getOutlinerParaObject(), aScaledUnitPolyPolygon, rObjectTransform);
+ pNew = new SdrContourTextPrimitive2D(
+ &rText.getSdrText(),
+ rText.getOutlinerParaObject(),
+ aScaledUnitPolyPolygon,
+ rObjectTransform);
}
else
{
// create with unit polygon
- pNew = new SdrContourTextPrimitive2D(rText.getSdrText(), rText.getOutlinerParaObject(), rUnitPolyPolygon, rObjectTransform);
+ pNew = new SdrContourTextPrimitive2D(
+ &rText.getSdrText(),
+ rText.getOutlinerParaObject(),
+ rUnitPolyPolygon,
+ rObjectTransform);
}
}
- else if(rText.isFontwork() && !rText.isScroll())
+ else if(rText.getSdrFormTextAttribute())
{
- // text on path, use scaled polygon. Not allowed when text scrolling is used.
- ::basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon);
+ // text on path, use scaled polygon
+ basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon);
aScaledPolyPolygon.transform(rObjectTransform);
- pNew = new SdrPathTextPrimitive2D(rText.getSdrText(), rText.getOutlinerParaObject(), aScaledPolyPolygon);
+ pNew = new SdrPathTextPrimitive2D(
+ &rText.getSdrText(),
+ rText.getOutlinerParaObject(),
+ aScaledPolyPolygon,
+ *rText.getSdrFormTextAttribute());
}
else
{
// rObjectTransform is the whole SdrObject transformation from unit rectangle
// to it's size and position. Decompose to allow working with single values.
- ::basegfx::B2DVector aScale, aTranslate;
+ basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
rObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX);
// extract mirroring
- const bool bMirrorX(::basegfx::fTools::less(aScale.getX(), 0.0));
- const bool bMirrorY(::basegfx::fTools::less(aScale.getY(), 0.0));
+ const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
+ const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
aScale = basegfx::absolute(aScale);
// Get the real size, since polygon ountline and scale
// from the object transformation may vary (e.g. ellipse segments)
- ::basegfx::B2DHomMatrix aJustScaleTransform;
+ basegfx::B2DHomMatrix aJustScaleTransform;
aJustScaleTransform.set(0, 0, aScale.getX());
aJustScaleTransform.set(1, 1, aScale.getY());
- ::basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon);
+ basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon);
aScaledUnitPolyPolygon.transform(aJustScaleTransform);
- const ::basegfx::B2DRange aSnapRange(::basegfx::tools::getRange(aScaledUnitPolyPolygon));
+ const basegfx::B2DRange aSnapRange(basegfx::tools::getRange(aScaledUnitPolyPolygon));
// create a range describing the wanted text position and size (aTextAnchorRange). This
// means to use the text distance values here
- const ::basegfx::B2DPoint aTopLeft(aSnapRange.getMinX() + rText.getTextLeftDistance(), aSnapRange.getMinY() + rText.getTextUpperDistance());
- const ::basegfx::B2DPoint aBottomRight(aSnapRange.getMaxX() - rText.getTextRightDistance(), aSnapRange.getMaxY() - rText.getTextLowerDistance());
- ::basegfx::B2DRange aTextAnchorRange;
+ const basegfx::B2DPoint aTopLeft(aSnapRange.getMinX() + rText.getTextLeftDistance(), aSnapRange.getMinY() + rText.getTextUpperDistance());
+ const basegfx::B2DPoint aBottomRight(aSnapRange.getMaxX() - rText.getTextRightDistance(), aSnapRange.getMaxY() - rText.getTextLowerDistance());
+ basegfx::B2DRange aTextAnchorRange;
aTextAnchorRange.expand(aTopLeft);
aTextAnchorRange.expand(aBottomRight);
@@ -267,12 +280,26 @@ namespace drawinglayer
if(rText.isFitToSize())
{
// streched text in range
- pNew = new SdrStretchTextPrimitive2D(rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform);
+ pNew = new SdrStretchTextPrimitive2D(
+ &rText.getSdrText(),
+ rText.getOutlinerParaObject(),
+ aAnchorTransform,
+ rText.isFixedCellHeight());
}
else // text in range
{
// build new primitive
- pNew = new SdrBlockTextPrimitive2D(rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, rText.isScroll(), bCellText, bWordWrap);
+ pNew = new SdrBlockTextPrimitive2D(
+ &rText.getSdrText(),
+ rText.getOutlinerParaObject(),
+ aAnchorTransform,
+ rText.getSdrTextHorzAdjust(),
+ rText.getSdrTextVertAdjust(),
+ rText.isFixedCellHeight(),
+ rText.isScroll(),
+ bCellText,
+ bWordWrap,
+ bClipOnBounds);
}
}
@@ -299,154 +326,164 @@ namespace drawinglayer
return Primitive2DReference(pNew);
}
}
- else if(rText.isScroll())
- {
- // get scroll direction
- const SdrTextAniDirection eDirection(rText.getSdrText().GetObject().GetTextAniDirection());
- const bool bHorizontal(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection);
-
- // decompose to get separated values for the scroll box
- ::basegfx::B2DVector aScale, aTranslate;
- double fRotate, fShearX;
- aAnchorTransform.decompose(aScale, aTranslate, fRotate, fShearX);
-
- // build transform from scaled only to full AnchorTransform and inverse
- ::basegfx::B2DHomMatrix aSRT;
- aSRT.shearX(fShearX);
- aSRT.rotate(fRotate);
- aSRT.translate(aTranslate.getX(), aTranslate.getY());
- ::basegfx::B2DHomMatrix aISRT(aSRT);
- aISRT.invert();
-
- // bring the primitive back to scaled only and get scaled range, create new clone for this
- SdrTextPrimitive2D* pNew2 = pNew->createTransformedClone(aISRT);
- OSL_ENSURE(pNew2, "createTextPrimitive: Could not create transformed clone of text primitive (!)");
- delete pNew;
- pNew = pNew2;
-
- // create neutral geometry::ViewInformation2D for local range and decompose calls. This is okay
- // since the decompose is view-independent
- const uno::Sequence< beans::PropertyValue > xViewParameters;
- geometry::ViewInformation2D aViewInformation2D(xViewParameters);
-
- // get range
- const ::basegfx::B2DRange aScaledRange(pNew->getB2DRange(aViewInformation2D));
-
- // create left outside and right outside transformations. Also take care
- // of the clip rectangle
- ::basegfx::B2DHomMatrix aLeft, aRight;
- ::basegfx::B2DPoint aClipTopLeft(0.0, 0.0);
- ::basegfx::B2DPoint aClipBottomRight(aScale.getX(), aScale.getY());
-
- if(bHorizontal)
- {
- aClipTopLeft.setY(aScaledRange.getMinY());
- aClipBottomRight.setY(aScaledRange.getMaxY());
- aLeft.translate(-aScaledRange.getMaxX(), 0.0);
- aRight.translate(aScale.getX() - aScaledRange.getMinX(), 0.0);
- }
- else
- {
- aClipTopLeft.setX(aScaledRange.getMinX());
- aClipBottomRight.setX(aScaledRange.getMaxX());
- aLeft.translate(0.0, -aScaledRange.getMaxY());
- aRight.translate(0.0, aScale.getY() - aScaledRange.getMinY());
- }
-
- aLeft *= aSRT;
- aRight *= aSRT;
- // prepare animation list
- drawinglayer::animation::AnimationEntryList aAnimationList;
-
- if(bHorizontal)
- {
- rText.getScrollTextTiming(aAnimationList, aScale.getX(), aScaledRange.getWidth());
- }
- else
+ if(rText.isScroll())
+ {
+ // suppress scroll when FontWork
+ if(!rText.getSdrFormTextAttribute())
{
- rText.getScrollTextTiming(aAnimationList, aScale.getY(), aScaledRange.getHeight());
- }
+ // get scroll direction
+ const SdrTextAniDirection eDirection(rText.getSdrText().GetObject().GetTextAniDirection());
+ const bool bHorizontal(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection);
- if(0.0 != aAnimationList.getDuration())
- {
- // create a new Primitive2DSequence containing the animated text in it's scaled only state.
- // use the decomposition to force to simple text primitives, those will no longer
- // need the outliner for formatting (alternatively it is also possible to just add
- // pNew to aNewPrimitiveSequence)
- Primitive2DSequence aAnimSequence(pNew->get2DDecomposition(aViewInformation2D));
+ // decompose to get separated values for the scroll box
+ basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ aAnchorTransform.decompose(aScale, aTranslate, fRotate, fShearX);
+
+ // build transform from scaled only to full AnchorTransform and inverse
+ basegfx::B2DHomMatrix aSRT;
+ aSRT.shearX(fShearX);
+ aSRT.rotate(fRotate);
+ aSRT.translate(aTranslate.getX(), aTranslate.getY());
+ basegfx::B2DHomMatrix aISRT(aSRT);
+ aISRT.invert();
+
+ // bring the primitive back to scaled only and get scaled range, create new clone for this
+ SdrTextPrimitive2D* pNew2 = pNew->createTransformedClone(aISRT);
+ OSL_ENSURE(pNew2, "createTextPrimitive: Could not create transformed clone of text primitive (!)");
delete pNew;
+ pNew = pNew2;
+
+ // create neutral geometry::ViewInformation2D for local range and decompose calls. This is okay
+ // since the decompose is view-independent
+ const uno::Sequence< beans::PropertyValue > xViewParameters;
+ geometry::ViewInformation2D aViewInformation2D(xViewParameters);
+
+ // get range
+ const basegfx::B2DRange aScaledRange(pNew->getB2DRange(aViewInformation2D));
+
+ // create left outside and right outside transformations. Also take care
+ // of the clip rectangle
+ basegfx::B2DHomMatrix aLeft, aRight;
+ basegfx::B2DPoint aClipTopLeft(0.0, 0.0);
+ basegfx::B2DPoint aClipBottomRight(aScale.getX(), aScale.getY());
+
+ if(bHorizontal)
+ {
+ aClipTopLeft.setY(aScaledRange.getMinY());
+ aClipBottomRight.setY(aScaledRange.getMaxY());
+ aLeft.translate(-aScaledRange.getMaxX(), 0.0);
+ aRight.translate(aScale.getX() - aScaledRange.getMinX(), 0.0);
+ }
+ else
+ {
+ aClipTopLeft.setX(aScaledRange.getMinX());
+ aClipBottomRight.setX(aScaledRange.getMaxX());
+ aLeft.translate(0.0, -aScaledRange.getMaxY());
+ aRight.translate(0.0, aScale.getY() - aScaledRange.getMinY());
+ }
+
+ aLeft *= aSRT;
+ aRight *= aSRT;
+
+ // prepare animation list
+ drawinglayer::animation::AnimationEntryList aAnimationList;
+
+ if(bHorizontal)
+ {
+ rText.getScrollTextTiming(aAnimationList, aScale.getX(), aScaledRange.getWidth());
+ }
+ else
+ {
+ rText.getScrollTextTiming(aAnimationList, aScale.getY(), aScaledRange.getHeight());
+ }
+
+ if(0.0 != aAnimationList.getDuration())
+ {
+ // create a new Primitive2DSequence containing the animated text in it's scaled only state.
+ // use the decomposition to force to simple text primitives, those will no longer
+ // need the outliner for formatting (alternatively it is also possible to just add
+ // pNew to aNewPrimitiveSequence)
+ Primitive2DSequence aAnimSequence(pNew->get2DDecomposition(aViewInformation2D));
+ delete pNew;
+
+ // create a new animatedInterpolatePrimitive and add it
+ std::vector< basegfx::B2DHomMatrix > aMatrixStack;
+ aMatrixStack.push_back(aLeft);
+ aMatrixStack.push_back(aRight);
+ const Primitive2DReference xRefA(new AnimatedInterpolatePrimitive2D(aMatrixStack, aAnimationList, aAnimSequence, true));
+ const Primitive2DSequence aContent(&xRefA, 1L);
+
+ // scrolling needs an encapsulating clipping primitive
+ const basegfx::B2DRange aClipRange(aClipTopLeft, aClipBottomRight);
+ basegfx::B2DPolygon aClipPolygon(basegfx::tools::createPolygonFromRect(aClipRange));
+ aClipPolygon.transform(aSRT);
+ return Primitive2DReference(new MaskPrimitive2D(basegfx::B2DPolyPolygon(aClipPolygon), aContent));
+ }
+ else
+ {
+ // add to decomposition
+ return Primitive2DReference(pNew);
+ }
+ }
+ }
- // create a new animatedInterpolatePrimitive and add it
- std::vector< basegfx::B2DHomMatrix > aMatrixStack;
- aMatrixStack.push_back(aLeft);
- aMatrixStack.push_back(aRight);
- const Primitive2DReference xRefA(new AnimatedInterpolatePrimitive2D(aMatrixStack, aAnimationList, aAnimSequence, true));
- const Primitive2DSequence aContent(&xRefA, 1L);
+ if(rText.isInEditMode())
+ {
+ // #i97628#
+ // encapsulate with TextHierarchyEditPrimitive2D to allow renderers
+ // to suppress actively edited content if needed
+ const Primitive2DReference xRefA(pNew);
+ const Primitive2DSequence aContent(&xRefA, 1L);
- // scrolling needs an encapsulating clipping primitive
- const ::basegfx::B2DRange aClipRange(aClipTopLeft, aClipBottomRight);
- ::basegfx::B2DPolygon aClipPolygon(::basegfx::tools::createPolygonFromRect(aClipRange));
- aClipPolygon.transform(aSRT);
- return Primitive2DReference(new MaskPrimitive2D(::basegfx::B2DPolyPolygon(aClipPolygon), aContent));
- }
- else
- {
- // add to decomposition
- return Primitive2DReference(pNew);
- }
+ // create and add TextHierarchyEditPrimitive2D primitive
+ return Primitive2DReference(new TextHierarchyEditPrimitive2D(aContent));
}
else
{
- if(rText.isInEditMode())
- {
- // #i97628#
- // encapsulate with TextHierarchyEditPrimitive2D to allow renderers
- // to suppress actively edited content if needed
- const Primitive2DReference xRefA(pNew);
- const Primitive2DSequence aContent(&xRefA, 1L);
-
- // create and add TextHierarchyEditPrimitive2D primitive
- return Primitive2DReference(new TextHierarchyEditPrimitive2D(aContent));
- }
- else
- {
- // add to decomposition
- return Primitive2DReference(pNew);
- }
+ // add to decomposition
+ return Primitive2DReference(pNew);
}
}
- Primitive2DReference createShadowPrimitive(
- const Primitive2DSequence& rSource,
+ Primitive2DSequence createEmbeddedShadowPrimitive(
+ const Primitive2DSequence& rContent,
const attribute::SdrShadowAttribute& rShadow)
{
- // create Shadow primitives. Need to be added in front, should use already created primitives
- if(rSource.hasElements())
+ if(rContent.hasElements())
{
+ Primitive2DSequence aRetval(2);
+ basegfx::B2DHomMatrix aShadowOffset;
+
// prepare shadow offset
- ::basegfx::B2DHomMatrix aShadowOffset;
aShadowOffset.set(0, 2, rShadow.getOffset().getX());
aShadowOffset.set(1, 2, rShadow.getOffset().getY());
// create shadow primitive and add content
- const Primitive2DReference xRefShadow(new ShadowPrimitive2D(aShadowOffset, rShadow.getColor(), rSource));
+ aRetval[0] = Primitive2DReference(
+ new ShadowPrimitive2D(
+ aShadowOffset,
+ rShadow.getColor(),
+ rContent));
if(0.0 != rShadow.getTransparence())
{
// create SimpleTransparencePrimitive2D
- const Primitive2DSequence aContent(&xRefShadow, 1L);
- return Primitive2DReference(new UnifiedAlphaPrimitive2D(aContent, rShadow.getTransparence()));
- }
- else
- {
- // return directly
- return xRefShadow;
+ const Primitive2DSequence aTempContent(&aRetval[0], 1);
+
+ aRetval[0] = Primitive2DReference(
+ new UnifiedAlphaPrimitive2D(
+ aTempContent,
+ rShadow.getTransparence()));
}
+
+ aRetval[1] = Primitive2DReference(new GroupPrimitive2D(rContent));
+ return aRetval;
}
else
{
- return Primitive2DReference();
+ return rContent;
}
}
} // end of namespace primitive2d
diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index 814c20b681ac..4f7e2c768669 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -94,22 +94,13 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
if(getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
@@ -200,22 +191,13 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
if(getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index f1f88684dc6c..63d050a775af 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -104,22 +104,13 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
if(getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index 7f9b47afb2d4..f5445cefa5f6 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -52,71 +52,71 @@ namespace drawinglayer
namespace primitive2d
{
Primitive2DReference SdrMeasurePrimitive2D::impCreatePart(
- const ::basegfx::B2DHomMatrix& rObjectMatrix,
- const ::basegfx::B2DPoint& rStart,
- const ::basegfx::B2DPoint& rEnd,
+ const basegfx::B2DHomMatrix& rObjectMatrix,
+ const basegfx::B2DPoint& rStart,
+ const basegfx::B2DPoint& rEnd,
bool bLeftActive,
bool bRightActive) const
{
- ::basegfx::B2DPolygon aPolygon;
+ basegfx::B2DPolygon aPolygon;
aPolygon.append(rStart);
aPolygon.append(rEnd);
- if(!maSdrLSTAttribute.getLineStartEnd() || (!bLeftActive && !bRightActive))
+ if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive))
{
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *maSdrLSTAttribute.getLine(), 0L);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L);
}
if(bLeftActive && bRightActive)
{
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *maSdrLSTAttribute.getLine(), maSdrLSTAttribute.getLineStartEnd());
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd());
}
- const attribute::SdrLineStartEndAttribute* pLineStartEnd = maSdrLSTAttribute.getLineStartEnd();
- const ::basegfx::B2DPolyPolygon aEmpty;
+ const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd();
+ const basegfx::B2DPolyPolygon aEmpty;
const attribute::SdrLineStartEndAttribute aLineStartEnd(
bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty,
bLeftActive ? pLineStartEnd->getStartWidth() : 0.0, bRightActive ? pLineStartEnd->getEndWidth() : 0.0,
bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false,
bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false);
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *maSdrLSTAttribute.getLine(), &aLineStartEnd);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd);
}
Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
{
Primitive2DSequence aRetval;
SdrBlockTextPrimitive2D* pBlockText = 0L;
- ::basegfx::B2DRange aTextRange;
- double fTextX((maStart.getX() + maEnd.getX()) * 0.5);
- double fTextY((maStart.getX() + maEnd.getX()) * 0.5);
- const ::basegfx::B2DVector aLine(maEnd - maStart);
+ basegfx::B2DRange aTextRange;
+ double fTextX((getStart().getX() + getEnd().getX()) * 0.5);
+ double fTextY((getStart().getX() + getEnd().getX()) * 0.5);
+ const basegfx::B2DVector aLine(getEnd() - getStart());
const double fDistance(aLine.getLength());
const double fAngle(atan2(aLine.getY(), aLine.getX()));
bool bAutoUpsideDown(false);
- const attribute::SdrTextAttribute* pTextAttribute = maSdrLSTAttribute.getText();
+ const attribute::SdrTextAttribute* pTextAttribute = getSdrLSTAttribute().getText();
- ::basegfx::B2DHomMatrix aObjectMatrix;
+ basegfx::B2DHomMatrix aObjectMatrix;
aObjectMatrix.rotate(fAngle);
- aObjectMatrix.translate(maStart.getX(), maStart.getY());
+ aObjectMatrix.translate(getStart().getX(), getStart().getY());
if(pTextAttribute)
{
- ::basegfx::B2DHomMatrix aTextMatrix;
+ basegfx::B2DHomMatrix aTextMatrix;
double fTestAngle(fAngle);
- if(mbTextRotation)
+ if(getTextRotation())
{
aTextMatrix.rotate(-90.0 * F_PI180);
fTestAngle -= (90.0 * F_PI180);
- if(mbTextAutoAngle && fTestAngle < -F_PI)
+ if(getTextAutoAngle() && fTestAngle < -F_PI)
{
fTestAngle += F_2PI;
}
}
- if(mbTextAutoAngle)
+ if(getTextAutoAngle())
{
if(fTestAngle > (F_PI / 4.0) || fTestAngle < (-F_PI * (3.0 / 4.0)))
{
@@ -125,13 +125,22 @@ namespace drawinglayer
}
// create primitive and get text range
- pBlockText = new SdrBlockTextPrimitive2D(pTextAttribute->getSdrText(), pTextAttribute->getOutlinerParaObject(),
- aTextMatrix, pTextAttribute->isScroll(), false, false);
+ pBlockText = new SdrBlockTextPrimitive2D(
+ &pTextAttribute->getSdrText(),
+ pTextAttribute->getOutlinerParaObject(),
+ aTextMatrix,
+ SDRTEXTHORZADJUST_CENTER,
+ SDRTEXTVERTADJUST_CENTER,
+ pTextAttribute->isScroll(),
+ false,
+ false,
+ false,
+ false);
aTextRange = pBlockText->getB2DRange(aViewInformation);
}
// prepare line attribute and result
- const attribute::SdrLineAttribute* pLineAttribute(maSdrLSTAttribute.getLine());
+ const attribute::SdrLineAttribute* pLineAttribute(getSdrLSTAttribute().getLine());
if(!pLineAttribute)
{
@@ -142,7 +151,7 @@ namespace drawinglayer
{
bool bArrowsOutside(false);
bool bMainLineSplitted(false);
- const attribute::SdrLineStartEndAttribute* pLineStartEnd = maSdrLSTAttribute.getLineStartEnd();
+ const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd();
double fStartArrowW(0.0);
double fStartArrowH(0.0);
double fEndArrowW(0.0);
@@ -152,7 +161,7 @@ namespace drawinglayer
{
if(pLineStartEnd->isStartActive())
{
- const ::basegfx::B2DRange aArrowRange(::basegfx::tools::getRange(pLineStartEnd->getStartPolyPolygon()));
+ const basegfx::B2DRange aArrowRange(basegfx::tools::getRange(pLineStartEnd->getStartPolyPolygon()));
fStartArrowW = pLineStartEnd->getStartWidth();
fStartArrowH = aArrowRange.getHeight() * fStartArrowW / aArrowRange.getWidth();
@@ -164,7 +173,7 @@ namespace drawinglayer
if(pLineStartEnd->isEndActive())
{
- const ::basegfx::B2DRange aArrowRange(::basegfx::tools::getRange(pLineStartEnd->getEndPolyPolygon()));
+ const basegfx::B2DRange aArrowRange(basegfx::tools::getRange(pLineStartEnd->getEndPolyPolygon()));
fEndArrowW = pLineStartEnd->getEndWidth();
fEndArrowH = aArrowRange.getHeight() * fEndArrowW / aArrowRange.getWidth();
@@ -184,8 +193,8 @@ namespace drawinglayer
bArrowsOutside = true;
}
- MeasureTextPosition eHorizontal(meHorizontal);
- MeasureTextPosition eVertical(meVertical);
+ MeasureTextPosition eHorizontal(getHorizontal());
+ MeasureTextPosition eVertical(getVertical());
if(MEASURETEXTPOSITION_AUTOMATIC == eVertical)
{
@@ -232,7 +241,7 @@ namespace drawinglayer
}
// switch text above/below?
- if(mbBelow || (bAutoUpsideDown && !mbTextRotation))
+ if(getBelow() || (bAutoUpsideDown && !getTextRotation()))
{
if(MEASURETEXTPOSITION_NEGATIVE == eVertical)
{
@@ -244,9 +253,9 @@ namespace drawinglayer
}
}
- const double fMainLineOffset(mbBelow ? mfDistance : -mfDistance);
- const ::basegfx::B2DPoint aMainLeft(0.0, fMainLineOffset);
- const ::basegfx::B2DPoint aMainRight(fDistance, fMainLineOffset);
+ const double fMainLineOffset(getBelow() ? getDistance() : -getDistance());
+ const basegfx::B2DPoint aMainLeft(0.0, fMainLineOffset);
+ const basegfx::B2DPoint aMainRight(fDistance, fMainLineOffset);
// main line
if(bArrowsOutside)
@@ -266,8 +275,8 @@ namespace drawinglayer
}
}
- const ::basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY());
- const ::basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY());
+ const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY());
+ const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true));
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false));
@@ -282,8 +291,8 @@ namespace drawinglayer
if(bMainLineSplitted)
{
const double fHalfLength((fDistance - (aTextRange.getWidth() + (fStartArrowH + fEndArrowH) * 0.25)) * 0.5);
- const ::basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY());
- const ::basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY());
+ const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY());
+ const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY());
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false));
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true));
@@ -295,19 +304,19 @@ namespace drawinglayer
}
// left/right help line value preparation
- const double fTopEdge(mbBelow ? mfUpper + mfDistance : -mfUpper - mfDistance);
- const double fBottomLeft(mbBelow ? mfLower - mfLeftDelta : mfLeftDelta - mfLower);
- const double fBottomRight(mbBelow ? mfLower - mfRightDelta : mfRightDelta - mfLower);
+ const double fTopEdge(getBelow() ? getUpper() + getDistance() : -getUpper() - getDistance());
+ const double fBottomLeft(getBelow() ? getLower() - getLeftDelta() : getLeftDelta() - getLower());
+ const double fBottomRight(getBelow() ? getLower() - getRightDelta() : getRightDelta() - getLower());
// left help line
- const ::basegfx::B2DPoint aLeftUp(0.0, fTopEdge);
- const ::basegfx::B2DPoint aLeftDown(0.0, fBottomLeft);
+ const basegfx::B2DPoint aLeftUp(0.0, fTopEdge);
+ const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft);
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false));
// right help line
- const ::basegfx::B2DPoint aRightUp(fDistance, fTopEdge);
- const ::basegfx::B2DPoint aRightDown(fDistance, fBottomRight);
+ const basegfx::B2DPoint aRightUp(fDistance, fTopEdge);
+ const basegfx::B2DPoint aRightDown(fDistance, fBottomRight);
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false));
@@ -390,7 +399,7 @@ namespace drawinglayer
}
}
- if(!maSdrLSTAttribute.getLine())
+ if(!getSdrLSTAttribute().getLine())
{
// embed line geometry to invisible line group
const Primitive2DReference xHiddenLines(new HitTestPrimitive2D(aRetval));
@@ -403,7 +412,7 @@ namespace drawinglayer
if(pBlockText)
{
// create transformation to text primitive end position
- ::basegfx::B2DHomMatrix aChange;
+ basegfx::B2DHomMatrix aChange;
// handle auto text rotation
if(bAutoUpsideDown)
@@ -427,18 +436,9 @@ namespace drawinglayer
}
// add shadow
- if(maSdrLSTAttribute.getShadow())
+ if(getSdrLSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *maSdrLSTAttribute.getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLSTAttribute().getShadow());
}
return aRetval;
@@ -446,8 +446,8 @@ namespace drawinglayer
SdrMeasurePrimitive2D::SdrMeasurePrimitive2D(
const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute,
- const ::basegfx::B2DPoint& rStart,
- const ::basegfx::B2DPoint& rEnd,
+ const basegfx::B2DPoint& rStart,
+ const basegfx::B2DPoint& rEnd,
MeasureTextPosition eHorizontal,
MeasureTextPosition eVertical,
double fDistance,
@@ -481,19 +481,19 @@ namespace drawinglayer
{
const SdrMeasurePrimitive2D& rCompare = (SdrMeasurePrimitive2D&)rPrimitive;
- return (maStart == rCompare.maStart
- && maEnd == rCompare.maEnd
- && meHorizontal == rCompare.meHorizontal
- && meVertical == rCompare.meVertical
- && mfDistance == rCompare.mfDistance
- && mfUpper == rCompare.mfUpper
- && mfLower == rCompare.mfLower
- && mfLeftDelta == rCompare.mfLeftDelta
- && mfRightDelta == rCompare.mfRightDelta
- && mbBelow == rCompare.mbBelow
- && mbTextRotation == rCompare.mbTextRotation
- && mbTextAutoAngle == rCompare.mbTextAutoAngle
- && maSdrLSTAttribute == rCompare.maSdrLSTAttribute);
+ return (getStart() == rCompare.getStart()
+ && getEnd() == rCompare.getEnd()
+ && getHorizontal() == rCompare.getHorizontal()
+ && getVertical() == rCompare.getVertical()
+ && getDistance() == rCompare.getDistance()
+ && getUpper() == rCompare.getUpper()
+ && getLower() == rCompare.getLower()
+ && getLeftDelta() == rCompare.getLeftDelta()
+ && getRightDelta() == rCompare.getRightDelta()
+ && getBelow() == rCompare.getBelow()
+ && getTextRotation() == rCompare.getTextRotation()
+ && getTextAutoAngle() == rCompare.getTextAutoAngle()
+ && getSdrLSTAttribute() == rCompare.getSdrLSTAttribute());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
index 2cedb1bfce29..7c44311d3c5a 100644
--- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
@@ -110,22 +110,13 @@ namespace drawinglayer
// always supported by the old paints, too
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
if(!bBehaveCompatibleToPaintVersion && getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
new file mode 100644
index 000000000000..67fee9215b73
--- /dev/null
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrcaptionprimitive2d.cxx,v $
+ *
+ * $Revision: 1.2.18.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svx.hxx"
+#include <svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx>
+#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
+#include <svx/svdoole2.hxx>
+#include <vcl/svapp.hxx>
+#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
+#include <svtools/colorcfg.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ Primitive2DSequence SdrOleContentPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const
+ {
+ Primitive2DSequence aRetval;
+ const SdrOle2Obj* pSource = (mpSdrOle2Obj.is() ? static_cast< SdrOle2Obj* >(mpSdrOle2Obj.get()) : 0);
+ bool bScaleContent(false);
+ Graphic aGraphic;
+
+ if(pSource)
+ {
+ Graphic* pOLEGraphic = (getHighContrast())
+ ? pSource->getEmbeddedObjectRef().GetHCGraphic()
+ : pSource->GetGraphic();
+
+ if(pOLEGraphic)
+ {
+ aGraphic = *pOLEGraphic;
+ bScaleContent = pSource->IsEmptyPresObj();
+ }
+ }
+
+ if(GRAPHIC_NONE == aGraphic.GetType())
+ {
+ // no source, use fallback ressource emty OLE graphic
+ const Bitmap aEmptyOLEBitmap(SdrOle2Obj::GetEmtyOLEReplacementBitmap());
+ aGraphic = Graphic(aEmptyOLEBitmap);
+ bScaleContent = true;
+ }
+
+ if(GRAPHIC_NONE != aGraphic.GetType())
+ {
+ const GraphicObject aGraphicObject(aGraphic);
+ const GraphicAttr aGraphicAttr;
+ drawinglayer::primitive2d::Primitive2DSequence xOLEContent;
+
+ if(bScaleContent)
+ {
+ // get transformation atoms
+ basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ getObjectTransform().decompose(aScale, aTranslate, fRotate, fShearX);
+
+ // get PrefSize from the graphic in 100th mm
+ Size aPrefSize(aGraphic.GetPrefSize());
+
+ if(MAP_PIXEL == aGraphic.GetPrefMapMode().GetMapUnit())
+ {
+ aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MAP_100TH_MM);
+ }
+ else
+ {
+ aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, aGraphic.GetPrefMapMode(), MAP_100TH_MM);
+ }
+
+ const double fOffsetX((aScale.getX() - aPrefSize.getWidth()) / 2.0);
+ const double fOffsetY((aScale.getY() - aPrefSize.getHeight()) / 2.0);
+
+ if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0))
+ {
+ // if content fits into frame, create it
+ basegfx::B2DHomMatrix aInnerObjectMatrix;
+
+ aInnerObjectMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight());
+ aInnerObjectMatrix.translate(fOffsetX, fOffsetY);
+ aInnerObjectMatrix.shearX(fShearX);
+ aInnerObjectMatrix.rotate(fRotate);
+ aInnerObjectMatrix.translate(aTranslate.getX(), aTranslate.getY());
+
+ const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive(
+ new drawinglayer::primitive2d::GraphicPrimitive2D(
+ aInnerObjectMatrix,
+ aGraphicObject,
+ aGraphicAttr));
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aGraphicPrimitive);
+ }
+ }
+ else
+ {
+ // create graphic primitive for content
+ const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive(
+ new drawinglayer::primitive2d::GraphicPrimitive2D(
+ getObjectTransform(),
+ aGraphicObject,
+ aGraphicAttr));
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aGraphicPrimitive);
+ }
+
+ // a standard gray outline is created for scaled content
+ if(bScaleContent)
+ {
+ const svtools::ColorConfig aColorConfig;
+ const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
+
+ if(aColor.bIsVisible)
+ {
+ basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)));
+ const Color aVclColor(aColor.nColor);
+ aOutline.transform(getObjectTransform());
+ const drawinglayer::primitive2d::Primitive2DReference xOutline(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aVclColor.getBColor()));
+ drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xOutline);
+ }
+ }
+ }
+
+ // get graphic and check scale content state
+ return aRetval;
+ }
+
+ SdrOleContentPrimitive2D::SdrOleContentPrimitive2D(
+ const SdrOle2Obj& rSdrOle2Obj,
+ const basegfx::B2DHomMatrix& rObjectTransform,
+ bool bHighContrast)
+ : BasePrimitive2D(),
+ mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)),
+ maObjectTransform(rObjectTransform),
+ mbHighContrast(bHighContrast)
+ {
+ }
+
+ bool SdrOleContentPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+ {
+ if(BasePrimitive2D::operator==(rPrimitive))
+ {
+ const SdrOleContentPrimitive2D& rCompare = (SdrOleContentPrimitive2D&)rPrimitive;
+ const bool bBothNot(!mpSdrOle2Obj.is() && !rCompare.mpSdrOle2Obj.is());
+ const bool bBothAndEqual(mpSdrOle2Obj.is() && rCompare.mpSdrOle2Obj.is()
+ && mpSdrOle2Obj.get() == rCompare.mpSdrOle2Obj.get());
+
+ return ((bBothNot || bBothAndEqual)
+ && getObjectTransform() == rCompare.getObjectTransform()
+ && getHighContrast() == rCompare.getHighContrast());
+ }
+
+ return false;
+ }
+
+ basegfx::B2DRange SdrOleContentPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ {
+ basegfx::B2DRange aRange(0.0, 0.0, 1.0, 1.0);
+ aRange.transform(getObjectTransform());
+
+ return aRange;
+ }
+
+ // provide unique ID
+ ImplPrimitrive2DIDBlock(SdrOleContentPrimitive2D, PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index 3b6a653a7bc6..96da706fb66a 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -52,22 +52,22 @@ namespace drawinglayer
Primitive2DSequence aRetval;
// add fill
- if(maSdrLFSTAttribute.getFill() && maUnitPolyPolygon.isClosed())
+ if(getSdrLFSTAttribute().getFill() && getUnitPolyPolygon().isClosed())
{
// take care for orientations
- ::basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon(::basegfx::tools::correctOrientations(maUnitPolyPolygon));
+ basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon(basegfx::tools::correctOrientations(getUnitPolyPolygon()));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(aOrientedUnitPolyPolygon, maTransform, *maSdrLFSTAttribute.getFill(), maSdrLFSTAttribute.getFillFloatTransGradient()));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(aOrientedUnitPolyPolygon, getTransform(), *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient()));
}
// add line
- if(maSdrLFSTAttribute.getLine())
+ if(getSdrLFSTAttribute().getLine())
{
- Primitive2DSequence aTemp(maUnitPolyPolygon.count());
+ Primitive2DSequence aTemp(getUnitPolyPolygon().count());
- for(sal_uInt32 a(0L); a < maUnitPolyPolygon.count(); a++)
+ for(sal_uInt32 a(0L); a < getUnitPolyPolygon().count(); a++)
{
- aTemp[a] = createPolygonLinePrimitive(maUnitPolyPolygon.getB2DPolygon(a), maTransform, *maSdrLFSTAttribute.getLine(), maSdrLFSTAttribute.getLineStartEnd());
+ aTemp[a] = createPolygonLinePrimitive(getUnitPolyPolygon().getB2DPolygon(a), getTransform(), *getSdrLFSTAttribute().getLine(), getSdrLFSTAttribute().getLineStartEnd());
}
appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aTemp);
@@ -76,44 +76,35 @@ namespace drawinglayer
{
// if initially no line is defined, create one for HitTest and BoundRect
const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0));
- Primitive2DSequence xHiddenLineSequence(maUnitPolyPolygon.count());
+ Primitive2DSequence xHiddenLineSequence(getUnitPolyPolygon().count());
- for(sal_uInt32 a(0); a < maUnitPolyPolygon.count(); a++)
+ for(sal_uInt32 a(0); a < getUnitPolyPolygon().count(); a++)
{
- xHiddenLineSequence[a] = createPolygonLinePrimitive(maUnitPolyPolygon.getB2DPolygon(a), maTransform, aBlackHairline);
+ xHiddenLineSequence[a] = createPolygonLinePrimitive(getUnitPolyPolygon().getB2DPolygon(a), getTransform(), aBlackHairline);
}
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(xHiddenLineSequence)));
}
// add text
- if(maSdrLFSTAttribute.getText())
+ if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(maUnitPolyPolygon, maTransform, *maSdrLFSTAttribute.getText(), maSdrLFSTAttribute.getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
- if(maSdrLFSTAttribute.getShadow())
+ if(getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *maSdrLFSTAttribute.getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
}
SdrPathPrimitive2D::SdrPathPrimitive2D(
- const ::basegfx::B2DHomMatrix& rTransform,
+ const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
- const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon)
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon)
: BasePrimitive2D(),
maTransform(rTransform),
maSdrLFSTAttribute(rSdrLFSTAttribute),
@@ -127,9 +118,9 @@ namespace drawinglayer
{
const SdrPathPrimitive2D& rCompare = (SdrPathPrimitive2D&)rPrimitive;
- return (maUnitPolyPolygon == rCompare.maUnitPolyPolygon
- && maTransform == rCompare.maTransform
- && maSdrLFSTAttribute == rCompare.maSdrLFSTAttribute);
+ return (getUnitPolyPolygon() == rCompare.getUnitPolyPolygon()
+ && getTransform() == rCompare.getTransform()
+ && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
index 6c665cbef4c9..25b39ebb07d5 100644
--- a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
+++ b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
@@ -37,6 +37,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/hittestprimitive2d.hxx>
+#include <vcl/lazydelete.hxx>
//////////////////////////////////////////////////////////////////////////////
// helper methods
@@ -47,11 +48,11 @@ namespace drawinglayer
{
BitmapEx createDefaultCross_3x3(const basegfx::BColor& rBColor)
{
- static BitmapEx* pRetVal = NULL;
+ static vcl::DeleteOnDeinit< BitmapEx > aRetVal(0);
static basegfx::BColor aColor;
::osl::Mutex m_mutex;
- if(pRetVal == NULL || rBColor != aColor)
+ if(!aRetVal.get() || rBColor != aColor)
{
// copy values
aColor = rBColor;
@@ -81,23 +82,21 @@ namespace drawinglayer
aContent.ReleaseAccess(pWContent);
aMask.ReleaseAccess(pWMask);
- if( pRetVal )
- delete pRetVal;
-
- pRetVal = new BitmapEx(aContent, aMask);
+ // create and exchange at aRetVal
+ delete aRetVal.set(new BitmapEx(aContent, aMask));
}
- return *pRetVal;
+ return aRetVal.get() ? *aRetVal.get() : BitmapEx();
}
BitmapEx createDefaultGluepoint_7x7(const basegfx::BColor& rBColorA, const basegfx::BColor& rBColorB)
{
- static BitmapEx* pRetVal = NULL;
+ static vcl::DeleteOnDeinit< BitmapEx > aRetVal(0);
static basegfx::BColor aColorA;
static basegfx::BColor aColorB;
::osl::Mutex m_mutex;
- if(pRetVal == NULL || rBColorA != aColorA || rBColorB != aColorB)
+ if(!aRetVal.get() || rBColorA != aColorA || rBColorB != aColorB)
{
// copy values
aColorA = rBColorA;
@@ -171,13 +170,11 @@ namespace drawinglayer
aContent.ReleaseAccess(pWContent);
aMask.ReleaseAccess(pWMask);
- if( pRetVal )
- delete pRetVal;
-
- pRetVal = new BitmapEx(aContent, aMask);
+ // create and exchange at aRetVal
+ delete aRetVal.set(new BitmapEx(aContent, aMask));
}
- return *pRetVal;
+ return aRetVal.get() ? *aRetVal.get() : BitmapEx();
}
// #i99123#
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 97aaf2735630..edb2837ef670 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -50,65 +50,90 @@ namespace drawinglayer
Primitive2DSequence SdrRectanglePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const
{
Primitive2DSequence aRetval;
+ Primitive2DSequence aHitTestContent;
// create unit outline polygon
- ::basegfx::B2DPolygon aUnitOutline(::basegfx::tools::createPolygonFromRect(::basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), getCornerRadiusX(), getCornerRadiusY()));
+ const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRange(0.0, 0.0, 1.0, 1.0),
+ getCornerRadiusX(),
+ getCornerRadiusY()));
// add fill
if(getSdrLFSTAttribute().getFill())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient()));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ createPolyPolygonFillPrimitive(
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
+ *getSdrLFSTAttribute().getFill(),
+ getSdrLFSTAttribute().getFillFloatTransGradient()));
+ }
+ else if(getTextFrame())
+ {
+ // if no fill and it's a text frame, create a fill for HitTest and
+ // BoundRect fallback
+ appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent,
+ createPolyPolygonFillPrimitive(
+ basegfx::B2DPolyPolygon(aUnitOutline),
+ getTransform(),
+ attribute::SdrFillAttribute(0.0, basegfx::BColor(0.0, 0.0, 0.0)),
+ getSdrLFSTAttribute().getFillFloatTransGradient()));
}
// add line
if(getSdrLFSTAttribute().getLine())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(aUnitOutline, getTransform(), *getSdrLFSTAttribute().getLine()));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ createPolygonLinePrimitive(
+ aUnitOutline,
+ getTransform(),
+ *getSdrLFSTAttribute().getLine()));
}
- else
+ else if(!getTextFrame())
{
- // if initially no line is defined, create one for HitTest and BoundRect
- const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0));
- const Primitive2DReference xHiddenLineReference(createPolygonLinePrimitive(aUnitOutline, getTransform(), aBlackHairline));
- const Primitive2DSequence xHiddenLineSequence(&xHiddenLineReference, 1);
+ // if initially no line is defined and it's not a text frame, create
+ // a line for HitTest and BoundRect
+ appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent,
+ createPolygonLinePrimitive(
+ aUnitOutline,
+ getTransform(),
+ attribute::SdrLineAttribute(basegfx::BColor(0.0, 0.0, 0.0))));
+ }
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(xHiddenLineSequence)));
+ // add HitTest and BoundRect helper geometry (if exists)
+ if(aHitTestContent.hasElements())
+ {
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
+ Primitive2DReference(new HitTestPrimitive2D(aHitTestContent)));
}
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
if(getSdrLFSTAttribute().getShadow())
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()));
-
- if(xShadow.is())
- {
- Primitive2DSequence aContentWithShadow(2L);
- aContentWithShadow[0L] = xShadow;
- aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval));
- aRetval = aContentWithShadow;
- }
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow());
}
return aRetval;
}
SdrRectanglePrimitive2D::SdrRectanglePrimitive2D(
- const ::basegfx::B2DHomMatrix& rTransform,
+ const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
double fCornerRadiusX,
- double fCornerRadiusY)
+ double fCornerRadiusY,
+ bool bTextFrame)
: BasePrimitive2D(),
maTransform(rTransform),
maSdrLFSTAttribute(rSdrLFSTAttribute),
mfCornerRadiusX(fCornerRadiusX),
- mfCornerRadiusY(fCornerRadiusY)
+ mfCornerRadiusY(fCornerRadiusY),
+ mbTextFrame(bTextFrame)
{
}
@@ -121,7 +146,8 @@ namespace drawinglayer
return (getCornerRadiusX() == rCompare.getCornerRadiusX()
&& getCornerRadiusY() == rCompare.getCornerRadiusY()
&& getTransform() == rCompare.getTransform()
- && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute());
+ && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()
+ && getTextFrame() == rCompare.getTextFrame());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index 113cd226d8ba..47e85894f37e 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -41,6 +41,9 @@
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <unoapi.hxx>
#include <svx/svdpage.hxx>
+#include <svx/svdmodel.hxx>
+#include <svx/svdoutl.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
//////////////////////////////////////////////////////////////////////////////
@@ -48,6 +51,46 @@ using namespace com::sun::star;
//////////////////////////////////////////////////////////////////////////////
+namespace
+{
+ sal_Int16 getPageNumber(const uno::Reference< drawing::XDrawPage >& rxDrawPage)
+ {
+ sal_Int16 nRetval(0);
+ uno::Reference< beans::XPropertySet > xSet(rxDrawPage, uno::UNO_QUERY);
+
+ if (xSet.is())
+ {
+ try
+ {
+ const uno::Any aNumber(xSet->getPropertyValue(::rtl::OUString::createFromAscii("Number")));
+ aNumber >>= nRetval;
+ }
+ catch(const uno::Exception&)
+ {
+ OSL_ASSERT(false);
+ }
+ }
+
+ return nRetval;
+ }
+
+ sal_Int16 getPageCount(const uno::Reference< drawing::XDrawPage >& rxDrawPage)
+ {
+ sal_Int16 nRetval(0);
+ SdrPage* pPage = GetSdrPageFromXDrawPage(rxDrawPage);
+
+ if(pPage && pPage->GetModel())
+ {
+ const sal_uInt16 nPageCount(pPage->GetModel()->GetPageCount());
+ nRetval = ((sal_Int16)nPageCount - 1) / 2;
+ }
+
+ return nRetval;
+ }
+} // end of anonymous namespace
+
+//////////////////////////////////////////////////////////////////////////////
+
namespace drawinglayer
{
namespace primitive2d
@@ -64,20 +107,27 @@ namespace drawinglayer
}
SdrTextPrimitive2D::SdrTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObject)
: BasePrimitive2D(),
- mrSdrText(rSdrText),
+ mrSdrText(const_cast< SdrText* >(pSdrText)),
maOutlinerParaObject(rOutlinerParaObject),
mxLastVisualizingPage(),
- mbLastSpellCheck(false),
- mbContainsPageField(false)
+ mnLastPageNumber(0),
+ mnLastPageCount(0),
+ maLastTextBackgroundColor(),
+ mbContainsPageField(false),
+ mbContainsPageCountField(false),
+ mbContainsOtherFields(false)
{
const EditTextObject& rETO = maOutlinerParaObject.GetTextObject();
- mbContainsPageField = rETO.HasField(SvxPageField::StaticType())
- || rETO.HasField(SvxHeaderField::StaticType())
- || rETO.HasField(SvxFooterField::StaticType())
- || rETO.HasField(SvxDateTimeField::StaticType());
+
+ mbContainsPageField = rETO.HasField(SvxPageField::StaticType());
+ mbContainsPageCountField = rETO.HasField(SvxPagesField::StaticType());
+ mbContainsOtherFields = rETO.HasField(SvxHeaderField::StaticType())
+ || rETO.HasField(SvxFooterField::StaticType())
+ || rETO.HasField(SvxDateTimeField::StaticType())
+ || rETO.HasField(SvxAuthorField::StaticType());
}
bool SdrTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
@@ -86,7 +136,13 @@ namespace drawinglayer
{
const SdrTextPrimitive2D& rCompare = (SdrTextPrimitive2D&)rPrimitive;
- return (getOutlinerParaObject() == rCompare.getOutlinerParaObject());
+ return (
+
+ // compare OPO and content, but not WrongList
+ getOutlinerParaObject() == rCompare.getOutlinerParaObject()
+
+ // also compare WrongList (not-persistent data, but visualized)
+ && getOutlinerParaObject().isWrongListEqual(rCompare.getOutlinerParaObject()));
}
return false;
@@ -94,21 +150,63 @@ namespace drawinglayer
Primitive2DSequence SdrTextPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
{
- const bool bCurrentSpellCheck(getSdrText().GetObject().impCheckSpellCheckForDecomposeTextPrimitive());
uno::Reference< drawing::XDrawPage > xCurrentlyVisualizingPage;
+ bool bCurrentlyVisualizingPageIsSet(false);
+ Color aNewTextBackgroundColor;
+ bool bNewTextBackgroundColorIsSet(false);
+ sal_Int16 nCurrentlyValidPageNumber(0);
+ sal_Int16 nCurrentlyValidPageCount(0);
if(getLocalDecomposition().hasElements())
{
- bool bDoDelete(getLastSpellCheck() != bCurrentSpellCheck);
+ bool bDoDelete(false);
- if(!bDoDelete && mbContainsPageField)
+ // check visualized page
+ if(mbContainsPageField || mbContainsPageCountField || mbContainsOtherFields)
{
+ // get visualized page and remember
xCurrentlyVisualizingPage = rViewInformation.getVisualizedPage();
+ bCurrentlyVisualizingPageIsSet = true;
if(xCurrentlyVisualizingPage != mxLastVisualizingPage)
{
bDoDelete = true;
}
+
+ // #i98870# check visualized PageNumber
+ if(!bDoDelete && mbContainsPageField)
+ {
+ nCurrentlyValidPageNumber = getPageNumber(xCurrentlyVisualizingPage);
+
+ if(nCurrentlyValidPageNumber != mnLastPageNumber)
+ {
+ bDoDelete = true;
+ }
+ }
+
+ // #i98870# check visualized PageCount, too
+ if(!bDoDelete && mbContainsPageCountField)
+ {
+ nCurrentlyValidPageCount = getPageCount(xCurrentlyVisualizingPage);
+
+ if(nCurrentlyValidPageCount != mnLastPageCount)
+ {
+ bDoDelete = true;
+ }
+ }
+ }
+
+ // #i101443# check change of TextBackgroundolor
+ if(!bDoDelete && getSdrText() && getSdrText()->GetModel())
+ {
+ SdrOutliner& rDrawOutliner = getSdrText()->GetModel()->GetDrawOutliner(0);
+ aNewTextBackgroundColor = rDrawOutliner.GetBackgroundColor();
+ bNewTextBackgroundColorIsSet = true;
+
+ if(aNewTextBackgroundColor != maLastTextBackgroundColor)
+ {
+ bDoDelete = true;
+ }
}
if(bDoDelete)
@@ -119,8 +217,31 @@ namespace drawinglayer
if(!getLocalDecomposition().hasElements())
{
- const_cast< SdrTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck);
+ if(!bCurrentlyVisualizingPageIsSet && mbContainsPageField)
+ {
+ xCurrentlyVisualizingPage = rViewInformation.getVisualizedPage();
+ }
+
+ if(!nCurrentlyValidPageNumber && mbContainsPageField)
+ {
+ nCurrentlyValidPageNumber = getPageNumber(xCurrentlyVisualizingPage);
+ }
+
+ if(!nCurrentlyValidPageCount && mbContainsPageCountField)
+ {
+ nCurrentlyValidPageCount = getPageCount(xCurrentlyVisualizingPage);
+ }
+
+ if(!bNewTextBackgroundColorIsSet && getSdrText() && getSdrText()->GetModel())
+ {
+ SdrOutliner& rDrawOutliner = getSdrText()->GetModel()->GetDrawOutliner(0);
+ aNewTextBackgroundColor = rDrawOutliner.GetBackgroundColor();
+ }
+
const_cast< SdrTextPrimitive2D* >(this)->mxLastVisualizingPage = xCurrentlyVisualizingPage;
+ const_cast< SdrTextPrimitive2D* >(this)->mnLastPageNumber = nCurrentlyValidPageNumber;
+ const_cast< SdrTextPrimitive2D* >(this)->mnLastPageCount = nCurrentlyValidPageCount;
+ const_cast< SdrTextPrimitive2D* >(this)->maLastTextBackgroundColor = aNewTextBackgroundColor;
}
// call parent
@@ -138,23 +259,17 @@ namespace drawinglayer
Primitive2DSequence SdrContourTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
{
Primitive2DSequence aRetval;
- const bool bCurrentSpellCheck(getSdrText().GetObject().impDecomposeContourTextPrimitive(aRetval, *this, aViewInformation));
-
- if(getLastSpellCheck() != bCurrentSpellCheck)
- {
- // remember last spell check state; this is part of the decomposition source data definition
- const_cast< SdrContourTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck);
- }
+ getSdrText()->GetObject().impDecomposeContourTextPrimitive(aRetval, *this, aViewInformation);
return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
}
SdrContourTextPrimitive2D::SdrContourTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObject,
- const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon,
- const ::basegfx::B2DHomMatrix& rObjectTransform)
- : SdrTextPrimitive2D(rSdrText, rOutlinerParaObject),
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DHomMatrix& rObjectTransform)
+ : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
maUnitPolyPolygon(rUnitPolyPolygon),
maObjectTransform(rObjectTransform)
{
@@ -166,16 +281,20 @@ namespace drawinglayer
{
const SdrContourTextPrimitive2D& rCompare = (SdrContourTextPrimitive2D&)rPrimitive;
- return (maUnitPolyPolygon == rCompare.maUnitPolyPolygon
- && maObjectTransform == rCompare.maObjectTransform);
+ return (getUnitPolyPolygon() == rCompare.getUnitPolyPolygon()
+ && getObjectTransform() == rCompare.getObjectTransform());
}
return false;
}
- SdrTextPrimitive2D* SdrContourTextPrimitive2D::createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const
+ SdrTextPrimitive2D* SdrContourTextPrimitive2D::createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const
{
- return new SdrContourTextPrimitive2D(getSdrText(), getOutlinerParaObject(), maUnitPolyPolygon, rTransform * maObjectTransform);
+ return new SdrContourTextPrimitive2D(
+ getSdrText(),
+ getOutlinerParaObject(),
+ getUnitPolyPolygon(),
+ rTransform * getObjectTransform());
}
// provide unique ID
@@ -193,23 +312,19 @@ namespace drawinglayer
Primitive2DSequence SdrPathTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
{
Primitive2DSequence aRetval;
- const bool bCurrentSpellCheck(getSdrText().GetObject().impDecomposePathTextPrimitive(aRetval, *this, aViewInformation));
-
- if(getLastSpellCheck() != bCurrentSpellCheck)
- {
- // remember last spell check state; this is part of the decomposition source data definition
- const_cast< SdrPathTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck);
- }
+ getSdrText()->GetObject().impDecomposePathTextPrimitive(aRetval, *this, aViewInformation);
return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
}
SdrPathTextPrimitive2D::SdrPathTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObject,
- const ::basegfx::B2DPolyPolygon& rPathPolyPolygon)
- : SdrTextPrimitive2D(rSdrText, rOutlinerParaObject),
- maPathPolyPolygon(rPathPolyPolygon)
+ const basegfx::B2DPolyPolygon& rPathPolyPolygon,
+ const attribute::SdrFormTextAttribute& rSdrFormTextAttribute)
+ : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
+ maPathPolyPolygon(rPathPolyPolygon),
+ maSdrFormTextAttribute(rSdrFormTextAttribute)
{
}
@@ -219,17 +334,23 @@ namespace drawinglayer
{
const SdrPathTextPrimitive2D& rCompare = (SdrPathTextPrimitive2D&)rPrimitive;
- return (maPathPolyPolygon == rCompare.maPathPolyPolygon);
+ return (getPathPolyPolygon() == rCompare.getPathPolyPolygon()
+ && getSdrFormTextAttribute() == rCompare.getSdrFormTextAttribute());
}
return false;
}
- SdrTextPrimitive2D* SdrPathTextPrimitive2D::createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const
+ SdrTextPrimitive2D* SdrPathTextPrimitive2D::createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const
{
- ::basegfx::B2DPolyPolygon aNewPolyPolygon(maPathPolyPolygon);
+ basegfx::B2DPolyPolygon aNewPolyPolygon(getPathPolyPolygon());
aNewPolyPolygon.transform(rTransform);
- return new SdrPathTextPrimitive2D(getSdrText(), getOutlinerParaObject(), aNewPolyPolygon);
+
+ return new SdrPathTextPrimitive2D(
+ getSdrText(),
+ getOutlinerParaObject(),
+ aNewPolyPolygon,
+ getSdrFormTextAttribute());
}
// provide unique ID
@@ -247,29 +368,31 @@ namespace drawinglayer
Primitive2DSequence SdrBlockTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
{
Primitive2DSequence aRetval;
- const bool bCurrentSpellCheck(getSdrText().GetObject().impDecomposeBlockTextPrimitive(aRetval, *this, aViewInformation));
-
- if(getLastSpellCheck() != bCurrentSpellCheck)
- {
- // remember last spell check state; this is part of the decomposition source data definition
- const_cast< SdrBlockTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck);
- }
+ getSdrText()->GetObject().impDecomposeBlockTextPrimitive(aRetval, *this, aViewInformation);
return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
}
SdrBlockTextPrimitive2D::SdrBlockTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObject,
- const ::basegfx::B2DHomMatrix& rTextRangeTransform,
+ const basegfx::B2DHomMatrix& rTextRangeTransform,
+ SdrTextHorzAdjust aSdrTextHorzAdjust,
+ SdrTextVertAdjust aSdrTextVertAdjust,
+ bool bFixedCellHeight,
bool bUnlimitedPage,
bool bCellText,
- bool bWordWrap)
- : SdrTextPrimitive2D(rSdrText, rOutlinerParaObject),
+ bool bWordWrap,
+ bool bClipOnBounds)
+ : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
maTextRangeTransform(rTextRangeTransform),
+ maSdrTextHorzAdjust(aSdrTextHorzAdjust),
+ maSdrTextVertAdjust(aSdrTextVertAdjust),
+ mbFixedCellHeight(bFixedCellHeight),
mbUnlimitedPage(bUnlimitedPage),
mbCellText(bCellText),
- mbWordWrap(bWordWrap)
+ mbWordWrap(bWordWrap),
+ mbClipOnBounds(bClipOnBounds)
{
}
@@ -280,17 +403,31 @@ namespace drawinglayer
const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive;
return (getTextRangeTransform() == rCompare.getTextRangeTransform()
+ && getSdrTextHorzAdjust() == rCompare.getSdrTextHorzAdjust()
+ && getSdrTextVertAdjust() == rCompare.getSdrTextVertAdjust()
+ && isFixedCellHeight() == rCompare.isFixedCellHeight()
&& getUnlimitedPage() == rCompare.getUnlimitedPage()
&& getCellText() == rCompare.getCellText()
- && getWordWrap() == rCompare.getWordWrap());
+ && getWordWrap() == rCompare.getWordWrap()
+ && getClipOnBounds() == rCompare.getClipOnBounds());
}
return false;
}
- SdrTextPrimitive2D* SdrBlockTextPrimitive2D::createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const
+ SdrTextPrimitive2D* SdrBlockTextPrimitive2D::createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const
{
- return new SdrBlockTextPrimitive2D(getSdrText(), getOutlinerParaObject(), rTransform * getTextRangeTransform(), getUnlimitedPage(), getCellText(), getWordWrap());
+ return new SdrBlockTextPrimitive2D(
+ getSdrText(),
+ getOutlinerParaObject(),
+ rTransform * getTextRangeTransform(),
+ getSdrTextHorzAdjust(),
+ getSdrTextVertAdjust(),
+ isFixedCellHeight(),
+ getUnlimitedPage(),
+ getCellText(),
+ getWordWrap(),
+ getClipOnBounds());
}
// provide unique ID
@@ -308,23 +445,19 @@ namespace drawinglayer
Primitive2DSequence SdrStretchTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
{
Primitive2DSequence aRetval;
- const bool bCurrentSpellCheck(getSdrText().GetObject().impDecomposeStretchTextPrimitive(aRetval, *this, aViewInformation));
-
- if(getLastSpellCheck() != bCurrentSpellCheck)
- {
- // remember last spell check state; this is part of the decomposition source data definition
- const_cast< SdrStretchTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck);
- }
+ getSdrText()->GetObject().impDecomposeStretchTextPrimitive(aRetval, *this, aViewInformation);
return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
}
SdrStretchTextPrimitive2D::SdrStretchTextPrimitive2D(
- const SdrText& rSdrText,
+ const SdrText* pSdrText,
const OutlinerParaObject& rOutlinerParaObject,
- const ::basegfx::B2DHomMatrix& rTextRangeTransform)
- : SdrTextPrimitive2D(rSdrText, rOutlinerParaObject),
- maTextRangeTransform(rTextRangeTransform)
+ const basegfx::B2DHomMatrix& rTextRangeTransform,
+ bool bFixedCellHeight)
+ : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
+ maTextRangeTransform(rTextRangeTransform),
+ mbFixedCellHeight(bFixedCellHeight)
{
}
@@ -334,15 +467,20 @@ namespace drawinglayer
{
const SdrStretchTextPrimitive2D& rCompare = (SdrStretchTextPrimitive2D&)rPrimitive;
- return (maTextRangeTransform == rCompare.maTextRangeTransform);
+ return (getTextRangeTransform() == rCompare.getTextRangeTransform()
+ && isFixedCellHeight() == rCompare.isFixedCellHeight());
}
return false;
}
- SdrTextPrimitive2D* SdrStretchTextPrimitive2D::createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const
+ SdrTextPrimitive2D* SdrStretchTextPrimitive2D::createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const
{
- return new SdrStretchTextPrimitive2D(getSdrText(), getOutlinerParaObject(), rTransform * maTextRangeTransform);
+ return new SdrStretchTextPrimitive2D(
+ getSdrText(),
+ getOutlinerParaObject(),
+ rTransform * getTextRangeTransform(),
+ isFixedCellHeight());
}
// provide unique ID
diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx
index 3445e134fd0a..b3cc32d71536 100644
--- a/svx/source/sdr/properties/properties.cxx
+++ b/svx/source/sdr/properties/properties.cxx
@@ -180,6 +180,11 @@ namespace sdr
GetSdrObject().SendUserCall(SDRUSERCALL_CHGATTR, rChange.GetRectangle(a));
}
}
+
+ sal_uInt32 BaseProperties::getVersion() const
+ {
+ return 0;
+ }
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 59e1431a1487..f720e1b9d1b2 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -72,12 +72,14 @@ namespace sdr
}
TextProperties::TextProperties(SdrObject& rObj)
- : AttributeProperties(rObj)
+ : AttributeProperties(rObj),
+ maVersion(0)
{
}
TextProperties::TextProperties(const TextProperties& rProps, SdrObject& rObj)
- : AttributeProperties(rProps, rObj)
+ : AttributeProperties(rProps, rObj),
+ maVersion(rProps.getVersion())
{
}
@@ -93,10 +95,11 @@ namespace sdr
void TextProperties::ItemSetChanged(const SfxItemSet& rSet)
{
SdrTextObj& rObj = (SdrTextObj&)GetSdrObject();
-
-
sal_Int32 nText = rObj.getTextCount();
+ // #i101556# ItemSet has changed -> new version
+ maVersion++;
+
while( --nText >= 0 )
{
SdrText* pText = rObj.getText( nText );
@@ -237,7 +240,10 @@ namespace sdr
// call parent
AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
- if( rObj.GetModel() && !rObj.IsTextEditActive() && !rObj.IsLinkedText() )
+ // #i101556# StyleSheet has changed -> new version
+ maVersion++;
+
+ if( rObj.GetModel() /*&& !rObj.IsTextEditActive()*/ && !rObj.IsLinkedText() )
{
SdrOutliner& rOutliner = rObj.ImpGetDrawOutliner();
@@ -577,6 +583,9 @@ namespace sdr
rObj.ActionChanged();
//rObj.BroadcastObjectChange();
}
+
+ // #i101556# content of StyleSheet has changed -> new version
+ maVersion++;
}
if(SFX_HINT_DYING == nId)
@@ -616,6 +625,12 @@ namespace sdr
}
}
}
+
+ // #i101556# Handout version information
+ sal_uInt32 TextProperties::getVersion() const
+ {
+ return maVersion;
+ }
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx
index 2eafb7ba6290..76252d25dbd3 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -70,10 +70,7 @@ SmartTagMgr::SmartTagMgr( const rtl::OUString& rApplicationName )
maActionList(),
maDisabledSmartTagTypes(),
maSmartTagMap(),
- mxBreakIter(),
mxMSF( ::comphelper::getProcessServiceFactory() ),
- mxContext(),
- mxConfigurationSettings(),
mbLabelTextWithSmartTags(true)
{
}
@@ -93,10 +90,6 @@ void SmartTagMgr::Init( const rtl::OUString& rConfigurationGroupName )
if ( mxContext.is() )
{
- // get the break iterator
- mxBreakIter = Reference< i18n::XBreakIterator >(
- mxMSF->createInstance( C2U( "com.sun.star.i18n.BreakIterator" ) ), UNO_QUERY);
-
PrepareConfiguration( rConfigurationGroupName );
ReadConfiguration( true, true );
RegisterListener();
@@ -104,6 +97,14 @@ void SmartTagMgr::Init( const rtl::OUString& rConfigurationGroupName )
}
}
}
+void SmartTagMgr::CreateBreakIterator() const
+{
+ if ( !mxBreakIter.is() && mxMSF.is() && mxContext.is() )
+ {
+ // get the break iterator
+ mxBreakIter.set(mxMSF->createInstance( C2U( "com.sun.star.i18n.BreakIterator" ) ), UNO_QUERY);
+ }
+}
/** Dispatches the recognize call to all installed smart tag recognizers
*/
@@ -129,10 +130,13 @@ void SmartTagMgr::Recognize( const rtl::OUString& rText,
}
if ( bCallRecognizer )
+ {
+ CreateBreakIterator();
maRecognizerList[i]->recognize( rText, nStart, nLen,
smarttags::SmartTagRecognizerMode_PARAGRAPH,
rLocale, xMarkup, maApplicationName, xController,
mxBreakIter );
+ }
}
}
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index 2d9b875d6c2a..74c7c78bc897 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -1,4 +1,4 @@
-/*************************************************************************
+/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -87,6 +87,11 @@ String RID_SVXSTR_XMLSEC_NO_SIG
Text [ en-US ] = "Digital Signature: The document is not signed.";
};
+String RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG
+{
+ Text [ en-US ] = "Digital Signature: The document signature and the certificate are OK, but not all parts of the document are signed.";
+};
+
// PopupMenu -------------------------------------------------------------
Menu RID_SVXMNU_ZOOM
{
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index a994df0900a6..890cde02e428 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -143,6 +143,9 @@ void XmlSecStatusBarControl::StateChanged( USHORT nSID, SfxItemState eState, con
nResId = RID_SVXSTR_XMLSEC_SIG_NOT_OK;
else if ( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED )
nResId = RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY;
+ else if ( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_PARTIAL_OK )
+ nResId = RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG;
+
GetStatusBar().SetQuickHelpText( GetId(), SVX_RESSTR( nResId ) );
}
@@ -192,7 +195,8 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
++aRect.Top();
pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageBroken );
}
- else if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED )
+ else if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED
+ || mpImpl->mnState == SIGNATURESTATE_SIGNATURES_PARTIAL_OK)
{
++aRect.Top();
pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageNotValidated );
diff --git a/svx/source/svdraw/ActionDescriptionProvider.cxx b/svx/source/svdraw/ActionDescriptionProvider.cxx
index da3f5b3d9437..d27d2e0b209e 100644
--- a/svx/source/svdraw/ActionDescriptionProvider.cxx
+++ b/svx/source/svdraw/ActionDescriptionProvider.cxx
@@ -80,6 +80,6 @@
XubString aStr(ImpGetResStr(nResID));
XubString aName(rObjectName);
- aStr.SearchAndReplaceAscii("%O", aName);
+ aStr.SearchAndReplaceAscii("%1", aName);
return rtl::OUString(aStr);
}
diff --git a/svx/source/svdraw/makefile.mk b/svx/source/svdraw/makefile.mk
index 0ac4b70130e6..e777ad70d3f1 100644
--- a/svx/source/svdraw/makefile.mk
+++ b/svx/source/svdraw/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=svdraw
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -42,11 +43,11 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES=\
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/svdxcgv.obj \
$(SLO)$/svdmodel.obj \
$(SLO)$/svdpage.obj \
- $(SLO)$/svdoimp.obj \
$(SLO)$/svdobj.obj \
$(SLO)$/svdedtv1.obj \
$(SLO)$/svdcrtv.obj \
@@ -59,7 +60,6 @@ SLOFILES=\
$(SLO)$/svdotextdecomposition.obj \
$(SLO)$/svdotextpathdecomposition.obj \
$(SLO)$/svdouno.obj \
- $(SLO)$/svdfppt.obj \
$(SLO)$/svdpagv.obj \
$(SLO)$/svddrgmt.obj \
$(SLO)$/svdpntv.obj \
@@ -91,11 +91,11 @@ SLOFILES=\
$(SLO)$/svdedtv2.obj \
$(SLO)$/svdedxv.obj \
$(SLO)$/svdetc.obj \
+ $(SLO)$/sdrhittesthelper.obj \
$(SLO)$/svdfmtf.obj \
$(SLO)$/svdglev.obj \
$(SLO)$/svdglue.obj \
$(SLO)$/svdhlpln.obj \
- $(SLO)$/svdibrow.obj \
$(SLO)$/svditer.obj \
$(SLO)$/svdlayer.obj \
$(SLO)$/svdmark.obj \
@@ -105,20 +105,29 @@ SLOFILES=\
$(SLO)$/sdrpagewindow.obj \
$(SLO)$/sdrpaintwindow.obj \
$(SLO)$/svdpoev.obj \
- $(SLO)$/svdscrol.obj \
- $(SLO)$/svdtouch.obj \
$(SLO)$/svdtrans.obj \
- $(SLO)$/svdtxhdl.obj \
$(SLO)$/svdundo.obj \
$(SLO)$/svdviter.obj \
$(SLO)$/clonelist.obj \
- $(SLO)$/ActionDescriptionProvider.obj \
$(SLO)$/svdedtv.obj \
$(SLO)$/selectioncontroller.obj \
$(SLO)$/polypolygoneditor.obj \
- $(SLO)$/svdomedia.obj \
+ $(SLO)$/svdibrow.obj \
+ $(SLO)$/svdomedia.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/svdoimp.obj \
+ $(SLO)$/svdscrol.obj \
+ $(SLO)$/ActionDescriptionProvider.obj \
$(SLO)$/impgrfll.obj
+LIB3TARGET= $(SLB)$/$(TARGET)-msfilter.lib
+LIB3OBJFILES= \
+ $(SLO)$/svdfppt.obj \
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) $(LIB3OBJFILES)
+
SRS1NAME=svdstr
SRC1FILES= svdstr.src
diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx
new file mode 100644
index 000000000000..3b613f42e6ef
--- /dev/null
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: svdetc.cxx,v $
+ * $Revision: 1.35.18.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include <svx/sdrhittesthelper.hxx>
+#include <svx/obj3d.hxx>
+#include <svx/helperhittest3d.hxx>
+#include <svx/sdrpagewindow.hxx>
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+#include <svx/sdr/contact/displayinfo.hxx>
+#include <svx/sdr/contact/objectcontact.hxx>
+#include <drawinglayer/processor2d/hittestprocessor2d.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/sdr/contact/viewcontact.hxx>
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// #i101872# new Object HitTest as View-tooling
+
+SdrObject* SdrObjectPrimitiveHit(
+ const SdrObject& rObject,
+ const Point& rPnt,
+ sal_uInt16 nTol,
+ const SdrPageView& rSdrPageView,
+ const SetOfByte* pVisiLayer,
+ bool bTextOnly)
+{
+ SdrObject* pResult = 0;
+
+ if(rObject.GetSubList() && rObject.GetSubList()->GetObjCount())
+ {
+ // group or scene with content. Single 3D objects also have a
+ // true == rObject.GetSubList(), but no content
+ pResult = SdrObjListPrimitiveHit(*rObject.GetSubList(), rPnt, nTol, rSdrPageView, pVisiLayer, bTextOnly);
+ }
+ else
+ {
+ if(!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer()))
+ {
+ // single object, 3d object, empty scene or empty group. Check if
+ // it's a single 3D object
+ const E3dCompoundObject* pE3dCompoundObject = dynamic_cast< const E3dCompoundObject* >(&rObject);
+
+ if(pE3dCompoundObject)
+ {
+ const basegfx::B2DPoint aHitPosition(rPnt.X(), rPnt.Y());
+
+ if(checkHitSingle3DObject(aHitPosition, *pE3dCompoundObject))
+ {
+ pResult = const_cast< E3dCompoundObject* >(pE3dCompoundObject);
+ }
+ }
+ else
+ {
+ // not a single 3D object; Check in first PageWindow using prmitives (only SC
+ // with split views uses multiple PageWindows nowadays)
+ if(rSdrPageView.PageWindowCount())
+ {
+ const double fLogicTolerance(nTol);
+ const basegfx::B2DPoint aHitPosition(rPnt.X(), rPnt.Y());
+ const sdr::contact::ViewObjectContact& rVOC = rObject.GetViewContact().GetViewObjectContact(
+ rSdrPageView.GetPageWindow(0)->GetObjectContact());
+
+ if(ViewObjectContactPrimitiveHit(rVOC, aHitPosition, fLogicTolerance, bTextOnly))
+ {
+ pResult = const_cast< SdrObject* >(&rObject);
+ }
+ }
+ }
+ }
+ }
+
+ return pResult;
+}
+
+/////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrObjListPrimitiveHit(
+ const SdrObjList& rList,
+ const Point& rPnt,
+ sal_uInt16 nTol,
+ const SdrPageView& rSdrPageView,
+ const SetOfByte* pVisiLayer,
+ bool bTextOnly)
+{
+ sal_uInt32 nObjNum(rList.GetObjCount());
+ SdrObject* pRetval = 0;
+
+ while(!pRetval && nObjNum > 0)
+ {
+ nObjNum--;
+ SdrObject* pObj = rList.GetObj(nObjNum);
+
+ pRetval = SdrObjectPrimitiveHit(*pObj, rPnt, nTol, rSdrPageView, pVisiLayer, bTextOnly);
+ }
+
+ return pRetval;
+}
+
+/////////////////////////////////////////////////////////////////////
+
+bool ViewObjectContactPrimitiveHit(
+ const sdr::contact::ViewObjectContact& rVOC,
+ const basegfx::B2DPoint& rHitPosition,
+ double fLogicHitTolerance,
+ bool bTextOnly)
+{
+ basegfx::B2DRange aObjectRange(rVOC.getObjectRange());
+
+ if(!aObjectRange.isEmpty())
+ {
+ // first do a rough B2DRange based HitTest; do not forget to
+ // include the HitTolerance if given
+ if(basegfx::fTools::more(fLogicHitTolerance, 0.0))
+ {
+ aObjectRange.grow(fLogicHitTolerance);
+ }
+
+ if(aObjectRange.isInside(rHitPosition))
+ {
+ // get primitive sequence
+ sdr::contact::DisplayInfo aDisplayInfo;
+ const drawinglayer::primitive2d::Primitive2DSequence& rSequence(rVOC.getPrimitive2DSequence(aDisplayInfo));
+
+ if(rSequence.hasElements())
+ {
+ // create a HitTest processor
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation2D = rVOC.GetObjectContact().getViewInformation2D();
+ drawinglayer::processor2d::HitTestProcessor2D aHitTestProcessor2D(
+ rViewInformation2D,
+ rHitPosition,
+ fLogicHitTolerance,
+ bTextOnly);
+
+ // feed it with the primitives
+ aHitTestProcessor2D.process(rSequence);
+
+ // deliver result
+ return aHitTestProcessor2D.getHit();
+ }
+ }
+ }
+
+ return false;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index fcf824c82921..5197b870919f 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -116,8 +116,9 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
// When the buffer usage has changed then we have to create a new
// overlay manager. Save the current one so that later we can move its
// overlay objects to the new one.
- ::sdr::overlay::OverlayManager* pOldOverlayManager = NULL;
- if (mbUseBuffer != bUseBuffer)
+ sdr::overlay::OverlayManager* pOldOverlayManager = NULL;
+
+ if(mbUseBuffer != bUseBuffer)
{
mbUseBuffer = bUseBuffer;
pOldOverlayManager = mpOverlayManager;
@@ -134,15 +135,19 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer)
{
// buffered OverlayManager, buffers it's background and refreshes from there
- // for pure overlay changes (no system redraw). The 2nd parameter specifies
+ // for pure overlay changes (no system redraw). The 3rd parameter specifies
// if that refresh itself will use a 2nd vdev to avoid flickering.
- mpOverlayManager = new ::sdr::overlay::OverlayManagerBuffered(GetOutputDevice(), sal_True);
+ // Also hand over the evtl. existing old OverlayManager; this means to take over
+ // the registered OverlayObjects from it
+ mpOverlayManager = new ::sdr::overlay::OverlayManagerBuffered(GetOutputDevice(), pOldOverlayManager, true);
}
else
{
// unbuffered OverlayManager, just invalidates places where changes
// take place
- mpOverlayManager = new ::sdr::overlay::OverlayManager(GetOutputDevice());
+ // Also hand over the evtl. existing old OverlayManager; this means to take over
+ // the registered OverlayObjects from it
+ mpOverlayManager = new ::sdr::overlay::OverlayManager(GetOutputDevice(), pOldOverlayManager);
}
OSL_ENSURE(mpOverlayManager, "SdrPaintWindow::SdrPaintWindow: Could not allocate an overlayManager (!)");
@@ -169,33 +174,10 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
}
}
- // Because we can not notify the creators of the overlay objects that
- // belong to the old overlay manager we have to move these objects from
- // the old to the new overlay manager and hope for the best (ie that the
- // owner of the overlay objects did not store a pointer to the overlay
- // manager but asks the view for the current one.)
- if (pOldOverlayManager != NULL)
+ // OverlayObjects are transfered for the evtl. newly created OverlayManager by handing over
+ // at construction time
+ if(pOldOverlayManager)
{
- if (mpOverlayManager != NULL)
- {
- // Get a list of all overlay objects added to the old overlay
- // manager. This list is not modified when overlay objects are
- // moved from one overlay manager to the other so its save to
- // iterate over it.
- ::boost::shared_ptr<sdr::overlay::OverlayObjectVector> pOverlayObjects (
- pOldOverlayManager->GetOverlayObjects());
- // Iterate over the list of overlay objects and move, not copy,
- // them from the old to the new overlay manager.
- sdr::overlay::OverlayObjectVector::iterator iOverlay;
- for (iOverlay=pOverlayObjects->begin(); iOverlay!=pOverlayObjects->end(); ++iOverlay)
- {
- if (*iOverlay != NULL)
- {
- pOldOverlayManager->remove(**iOverlay);
- mpOverlayManager->add(**iOverlay);
- }
- }
- }
// The old overlay manager is not used anymore and can be (has to be) deleted.
delete pOldOverlayManager;
}
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index ebd596ac972d..6773b8edf6f5 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -41,28 +41,19 @@
#include <svx/svdetc.hxx>
#include <svx/scene3d.hxx>
#include <svx/view3d.hxx>
-
-// #116425#
#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
-
-// #116425#
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/svdouno.hxx>
-
#define XOR_CREATE_PEN PEN_SOLID
#include <svx/svdopath.hxx>
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
-#include <svx/sdr/overlay/overlaysdrobject.hxx>
#include <sdrpaintwindow.hxx>
-
-// #i72535#
#include "fmobj.hxx"
-
-// #i68562#
#include <svx/svdocirc.hxx>
+#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -172,7 +163,10 @@ void ImpSdrCreateViewExtraData::CreateAndShowOverlay(const SdrCreateView& rView,
{
if(pObject)
{
- ::sdr::overlay::OverlaySdrObject* pNew = new ::sdr::overlay::OverlaySdrObject(basegfx::B2DPoint(), *pObject);
+ const sdr::contact::ViewContact& rVC = pObject->GetViewContact();
+ const drawinglayer::primitive2d::Primitive2DSequence aSequence = rVC.getViewIndependentPrimitive2DSequence();
+ sdr::overlay::OverlayObject* pNew = new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence);
+
pOverlayManager->add(*pNew);
maObjects.append(*pNew);
}
@@ -799,6 +793,15 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, BOOL bFull*/)
// overlay objects instead.
sal_Bool bUseSolidDragging(IsSolidDragging());
+ // #i101648# check if dragged object is a naked SdrObject (no
+ // derivation of). This is e.g. used in SW Frame construction
+ // as placeholder. Do not use SolidDragging for naked SDrObjects,
+ // they cannot have a valid optical representation
+ if(bUseSolidDragging && OBJ_NONE == pAktCreate->GetObjIdentifier())
+ {
+ bUseSolidDragging = false;
+ }
+
// check for objects with no fill and no line
if(bUseSolidDragging)
{
@@ -821,13 +824,19 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, BOOL bFull*/)
}
}
- // #i68562# Force to non-solid dragging when not creating a full circle and up to step three
- if(bUseSolidDragging
- && pAktCreate->ISA(SdrCircObj)
- && OBJ_CIRC != (SdrObjKind)(static_cast< SdrCircObj* >(pAktCreate)->GetObjIdentifier())
- && aDragStat.GetPointAnz() < 4L)
+ // #i101781# force to non-solid dragging when not creating a full circle
+ if(bUseSolidDragging)
{
- bUseSolidDragging = false;
+ SdrCircObj* pCircObj = dynamic_cast< SdrCircObj* >(pAktCreate);
+
+ if(pCircObj && OBJ_CIRC != pCircObj->GetObjIdentifier())
+ {
+ // #i103058# Allow SolidDragging with four points
+ if(aDragStat.GetPointAnz() < 4)
+ {
+ bUseSolidDragging = false;
+ }
+ }
}
if(bUseSolidDragging)
@@ -869,6 +878,18 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, BOOL bFull*/)
{
mpCreateViewExtraData->CreateAndShowOverlay(*this, 0, pAktCreate->TakeCreatePoly(aDragStat));
}
+
+ // #i101679# Force changed overlay to be shown
+ for(sal_uInt32 a(0); a < PaintWindowCount(); a++)
+ {
+ SdrPaintWindow* pCandidate = GetPaintWindow(a);
+ sdr::overlay::OverlayManager* pOverlayManager = pCandidate->GetOverlayManager();
+
+ if(pOverlayManager)
+ {
+ pOverlayManager->flush();
+ }
+ }
}
aDragStat.SetShown(TRUE);
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 20523c81b9fb..eb6412b20259 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1135,11 +1135,20 @@ void SdrDragObjOwn::createSdrDragEntries()
void SdrDragObjOwn::TakeSdrDragComment(XubString& rStr) const
{
- const SdrObject* pObj = GetDragObj();
-
- if(pObj)
+ // #i103058# get info string from the clone preferred, the original will
+ // not be changed. For security, use original as fallback
+ if(mpClone)
{
- rStr = pObj->getSpecialDragComment(DragStat());
+ rStr = mpClone->getSpecialDragComment(DragStat());
+ }
+ else
+ {
+ const SdrObject* pObj = GetDragObj();
+
+ if(pObj)
+ {
+ rStr = pObj->getSpecialDragComment(DragStat());
+ }
}
}
@@ -1238,34 +1247,39 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
if(pObj)
{
- if(!getSdrDragView().IsInsObjPoint() && pObj->IsInserted() )
+ const bool bUndo = getSdrDragView().IsUndoEnabled();
+
+ if( bUndo )
{
- if (DragStat().IsEndDragChangesAttributes())
+ if(!getSdrDragView().IsInsObjPoint() && pObj->IsInserted() )
{
- pUndo=getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj);
+ if (DragStat().IsEndDragChangesAttributes())
+ {
+ pUndo=getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj);
- if (DragStat().IsEndDragChangesGeoAndAttributes())
+ if (DragStat().IsEndDragChangesGeoAndAttributes())
+ {
+ vConnectorUndoActions = getSdrDragView().CreateConnectorUndo( *pObj );
+ pUndo2 = getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj);
+ }
+ }
+ else
{
vConnectorUndoActions = getSdrDragView().CreateConnectorUndo( *pObj );
- pUndo2 = getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj);
+ pUndo= getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj);
}
}
+
+ if( pUndo )
+ {
+ getSdrDragView().BegUndo( pUndo->GetComment() );
+ }
else
{
- vConnectorUndoActions = getSdrDragView().CreateConnectorUndo( *pObj );
- pUndo= getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj);
+ getSdrDragView().BegUndo();
}
}
- if( pUndo )
- {
- getSdrDragView().BegUndo( pUndo->GetComment() );
- }
- else
- {
- getSdrDragView().BegUndo();
- }
-
// evtl. use opertator= for setting changed object data (do not change selection in
// view, this will destroy the interactor). This is possible since a clone is now
// directly modified by the modifiers. Only SdrTableObj is adding own UNDOs
@@ -1290,32 +1304,39 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
if(bRet)
{
- getSdrDragView().AddUndoActions( vConnectorUndoActions );
-
- if ( pUndo )
+ if( bUndo )
{
- getSdrDragView().AddUndo(pUndo);
- }
+ getSdrDragView().AddUndoActions( vConnectorUndoActions );
- if ( pUndo2 )
- {
- getSdrDragView().AddUndo(pUndo2);
+ if ( pUndo )
+ {
+ getSdrDragView().AddUndo(pUndo);
+ }
+
+ if ( pUndo2 )
+ {
+ getSdrDragView().AddUndo(pUndo2);
+ }
}
}
else
{
- std::vector< SdrUndoAction* >::iterator vConnectorUndoIter( vConnectorUndoActions.begin() );
-
- while( vConnectorUndoIter != vConnectorUndoActions.end() )
+ if( bUndo )
{
- delete *vConnectorUndoIter++;
- }
+ std::vector< SdrUndoAction* >::iterator vConnectorUndoIter( vConnectorUndoActions.begin() );
+
+ while( vConnectorUndoIter != vConnectorUndoActions.end() )
+ {
+ delete *vConnectorUndoIter++;
+ }
- delete pUndo;
- delete pUndo2;
+ delete pUndo;
+ delete pUndo2;
+ }
}
- getSdrDragView().EndUndo();
+ if( bUndo )
+ getSdrDragView().EndUndo();
}
return bRet;
@@ -2539,7 +2560,7 @@ bool SdrDragGradient::BeginSdrDrag()
{
basegfx::B2DPoint aPosition(DragStat().GetStart().X(), DragStat().GetStart().Y());
- if(pColHdl->getOverlayObjectList().isHit(aPosition))
+ if(pColHdl->getOverlayObjectList().isHitLogic(aPosition))
{
bHit = true;
pIAOHandle->SetMoveSingleHandle(true);
@@ -2554,7 +2575,7 @@ bool SdrDragGradient::BeginSdrDrag()
{
basegfx::B2DPoint aPosition(DragStat().GetStart().X(), DragStat().GetStart().Y());
- if(pColHdl->getOverlayObjectList().isHit(aPosition))
+ if(pColHdl->getOverlayObjectList().isHitLogic(aPosition))
{
bHit = true;
pIAOHandle->SetMoveSingleHandle(true);
@@ -2566,7 +2587,7 @@ bool SdrDragGradient::BeginSdrDrag()
{
basegfx::B2DPoint aPosition(DragStat().GetStart().X(), DragStat().GetStart().Y());
- if(pIAOHandle->getOverlayObjectList().isHit(aPosition))
+ if(pIAOHandle->getOverlayObjectList().isHitLogic(aPosition))
{
bHit = true;
}
@@ -3255,11 +3276,13 @@ bool SdrDragCrook::EndSdrDrag(bool bCopy)
if (bResize && aFact==Fraction(1,1))
bResize=false;
+ const bool bUndo = getSdrDragView().IsUndoEnabled();
+
bool bDoCrook=aCenter!=aMarkCenter && aRad.X()!=0 && aRad.Y()!=0;
if (bDoCrook || bResize)
{
- if (bResize)
+ if (bResize && bUndo)
{
XubString aStr;
ImpTakeDescriptionStr(!bContortion?STR_EditCrook:STR_EditCrookContortion,aStr);
@@ -3301,7 +3324,8 @@ bool SdrDragCrook::EndSdrDrag(bool bCopy)
ResizePoint(aCtr1,aCenter,aFact,aFact1);
Size aSiz(aCtr1.X()-aCtr0.X(),aCtr1.Y()-aCtr0.Y());
- AddUndo(getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pO,aSiz));
+ if( bUndo )
+ AddUndo(getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pO,aSiz));
pO->Move(aSiz);
}
}
@@ -3315,7 +3339,7 @@ bool SdrDragCrook::EndSdrDrag(bool bCopy)
getSdrDragView().SetLastCrookCenter(aCenter);
}
- if (bResize)
+ if (bResize && bUndo)
getSdrDragView().EndUndo();
return true;
@@ -3545,11 +3569,18 @@ bool SdrDragCrop::EndSdrDrag(bool bCopy)
return false;
const SdrGrafCropItem& rOldCrop = (const SdrGrafCropItem&)pObj->GetMergedItem(SDRATTR_GRAFCROP);
- String aUndoStr;
- ImpTakeDescriptionStr(STR_DragMethCrop, aUndoStr);
- getSdrDragView().BegUndo( aUndoStr );
- getSdrDragView().AddUndo( getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
+ const bool bUndo = getSdrDragView().IsUndoEnabled();
+
+ if( bUndo )
+ {
+ String aUndoStr;
+ ImpTakeDescriptionStr(STR_DragMethCrop, aUndoStr);
+
+ getSdrDragView().BegUndo( aUndoStr );
+ getSdrDragView().AddUndo( getSdrDragView().GetModel()->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
+ }
+
Rectangle aOldRect( pObj->GetLogicRect() );
getSdrDragView().ResizeMarkedObj(DragStat().Ref1(),aXFact,aYFact,bCopy);
Rectangle aNewRect( pObj->GetLogicRect() );
@@ -3571,7 +3602,9 @@ bool SdrDragCrop::EndSdrDrag(bool bCopy)
SfxItemSet aSet( rPool, SDRATTR_GRAFCROP, SDRATTR_GRAFCROP );
aSet.Put( SdrGrafCropItem( nLeftCrop, nTopCrop, nRightCrop, nBottomCrop ) );
getSdrDragView().SetAttributes( aSet, false );
- getSdrDragView().EndUndo();
+
+ if( bUndo )
+ getSdrDragView().EndUndo();
return true;
}
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index ab0a5d98d2b6..8236ca1f19ac 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -51,6 +51,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svx/polypolygoneditor.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
using namespace sdr;
@@ -281,7 +282,11 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
// #103894# Expand test for HDL_ANCHOR_TR
BOOL bNotDraggable = (HDL_ANCHOR == eDragHdl || HDL_ANCHOR_TR == eDragHdl);
- if(bDragHdl)
+ if(pHdl && (pHdl->GetKind() == HDL_SMARTTAG) && pForcedMeth )
+ {
+ // just use the forced method for smart tags
+ }
+ else if(bDragHdl)
{
mpCurrentSdrDragMethod = new SdrDragMovHdl(*this);
}
@@ -446,7 +451,19 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
return FALSE;
}
- mpCurrentSdrDragMethod = new SdrDragResize(*this);
+ sal_Bool bSingleTextObjMark = sal_False; // SJ: #i100490#
+ if ( GetMarkedObjectCount() == 1 )
+ {
+ pMarkedObj=GetMarkedObjectByIndex(0);
+ if ( pMarkedObj &&
+ pMarkedObj->ISA( SdrTextObj ) &&
+ static_cast<SdrTextObj*>(pMarkedObj)->IsTextFrame() )
+ bSingleTextObjMark = sal_True;
+ }
+ if ( bSingleTextObjMark )
+ mpCurrentSdrDragMethod = new SdrDragObjOwn(*this);
+ else
+ mpCurrentSdrDragMethod = new SdrDragResize(*this);
}
}
else
@@ -552,7 +569,8 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
nHdlAnzMerk=GetMarkablePointCount();
}
- if (IsInsertGluePoint())
+ const bool bUndo = IsUndoEnabled();
+ if (IsInsertGluePoint() && bUndo)
{
BegUndo(aInsPointUndoStr);
AddUndo(pInsPointUndo);
@@ -560,7 +578,7 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
bRet = mpCurrentSdrDragMethod->EndSdrDrag(bCopy);
- if (IsInsertGluePoint())
+ if( IsInsertGluePoint() && bUndo)
EndUndo();
delete mpCurrentSdrDragMethod;
@@ -578,9 +596,12 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
{
SetMarkHandles();
bInsPolyPoint=FALSE;
- BegUndo(aInsPointUndoStr);
- AddUndo(pInsPointUndo);
- EndUndo();
+ if( bUndo )
+ {
+ BegUndo(aInsPointUndoStr);
+ AddUndo(pInsPointUndo);
+ EndUndo();
+ }
}
eDragHdl=HDL_MOVE;
@@ -828,6 +849,9 @@ void SdrDragView::ShowDragObj()
if(pOverlayManager)
{
mpCurrentSdrDragMethod->CreateOverlayGeometry(*pOverlayManager);
+
+ // #i101679# Force changed overlay to be shown
+ pOverlayManager->flush();
}
}
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 85292b417e60..b95c13864776 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -135,7 +135,10 @@ SdrLayer* SdrEditView::InsertNewLayer(const XubString& rName, USHORT nPos)
USHORT nMax=rLA.GetLayerCount();
if (nPos>nMax) nPos=nMax;
SdrLayer* pNewLayer=rLA.NewLayer(rName,nPos);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewLayer(nPos,rLA,*pMod));
+
+ if( GetModel()->IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewLayer(nPos,rLA,*pMod));
+
pMod->SetChanged();
return pNewLayer;
}
@@ -181,19 +184,26 @@ void SdrEditView::ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID)
// make sure OrdNums are correct
pOL->GetObj(0)->GetOrdNum();
+ const bool bUndo = GetModel()->IsUndoEnabled();
+
for(sal_uInt32 nObjNum(nObjAnz); nObjNum > 0;)
{
nObjNum--;
SdrObject* pObj = pOL->GetObj(nObjNum);
SdrObjList* pSubOL = pObj->GetSubList();
+
// #104809# Test explicitely for group objects and 3d scenes
if(pSubOL && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dScene)))
{
if(ImpDelLayerCheck(pSubOL, nDelID))
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
pOL->RemoveObject(nObjNum);
+
+ if( !bUndo )
+ SdrObject::Free( pObj );
}
else
{
@@ -204,8 +214,11 @@ void SdrEditView::ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID)
{
if(pObj->GetLayer() == nDelID)
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
pOL->RemoveObject(nObjNum);
+ if( !bUndo )
+ SdrObject::Free( pObj );
}
}
}
@@ -219,8 +232,13 @@ void SdrEditView::DeleteLayer(const XubString& rName)
if(SDRLAYER_NOTFOUND != nLayerNum)
{
+
SdrLayerID nDelID = pLayer->GetID();
- BegUndo(ImpGetResStr(STR_UndoDelLayer));
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_UndoDelLayer));
+
sal_Bool bMaPg(sal_True);
for(sal_uInt16 nPageKind(0); nPageKind < 2; nPageKind++)
@@ -249,8 +267,11 @@ void SdrEditView::DeleteLayer(const XubString& rName)
{
if(ImpDelLayerCheck(pSubOL, nDelID))
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
pPage->RemoveObject(nObjNum);
+ if( !bUndo )
+ SdrObject::Free(pObj);
}
else
{
@@ -261,8 +282,11 @@ void SdrEditView::DeleteLayer(const XubString& rName)
{
if(pObj->GetLayer() == nDelID)
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj, true));
pPage->RemoveObject(nObjNum);
+ if( !bUndo )
+ SdrObject::Free(pObj);
}
}
}
@@ -270,9 +294,17 @@ void SdrEditView::DeleteLayer(const XubString& rName)
bMaPg = sal_False;
}
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteLayer(nLayerNum, rLA, *pMod));
- rLA.RemoveLayer(nLayerNum);
- EndUndo();
+ if( bUndo )
+ {
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteLayer(nLayerNum, rLA, *pMod));
+ rLA.RemoveLayer(nLayerNum);
+ EndUndo();
+ }
+ else
+ {
+ delete rLA.RemoveLayer(nLayerNum);
+ }
+
pMod->SetChanged();
}
}
@@ -282,8 +314,10 @@ void SdrEditView::MoveLayer(const XubString& rName, USHORT nNewPos)
SdrLayerAdmin& rLA=pMod->GetLayerAdmin();
SdrLayer* pLayer=rLA.GetLayer(rName,TRUE);
USHORT nLayerNum=rLA.GetLayerPos(pLayer);
- if (nLayerNum!=SDRLAYER_NOTFOUND) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveLayer(nLayerNum,rLA,*pMod,nNewPos));
+ if (nLayerNum!=SDRLAYER_NOTFOUND)
+ {
+ if( IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveLayer(nLayerNum,rLA,*pMod,nNewPos));
rLA.MoveLayer(nLayerNum,nNewPos);
pMod->SetChanged();
}
@@ -328,7 +362,8 @@ void SdrEditView::ImpBroadcastEdgesOfMarkedNodes()
&& LIST_ENTRY_NOTFOUND == rAllMarkedObjects.GetPos(pObj1)
&& !pEdge->CheckNodeConnection(sal_False))
{
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pEdge));
+ if( IsUndoEnabled() )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pEdge));
pEdge->DisconnectFromNode(sal_False);
}
@@ -336,7 +371,8 @@ void SdrEditView::ImpBroadcastEdgesOfMarkedNodes()
&& LIST_ENTRY_NOTFOUND == rAllMarkedObjects.GetPos(pObj2)
&& !pEdge->CheckNodeConnection(sal_True))
{
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pEdge));
+ if( IsUndoEnabled() )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pEdge));
pEdge->DisconnectFromNode(sal_True);
}
}
@@ -686,9 +722,13 @@ void SdrEditView::ForceMarkedObjToAnotherPage()
void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
{
- if (rMark.GetMarkCount()!=0) {
+ if (rMark.GetMarkCount()!=0)
+ {
rMark.ForceSort();
- BegUndo();
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo();
const sal_uInt32 nMarkAnz(rMark.GetMarkCount());
if(nMarkAnz)
@@ -696,22 +736,27 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
sal_uInt32 nm(0);
std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
- for(nm = nMarkAnz; nm > 0;)
+ if( bUndo )
{
- nm--;
- SdrMark* pM = rMark.GetMark(nm);
- SdrObject* pObj = pM->GetMarkedSdrObj();
+ for(nm = nMarkAnz; nm > 0;)
+ {
+ nm--;
+ SdrMark* pM = rMark.GetMark(nm);
+ SdrObject* pObj = pM->GetMarkedSdrObj();
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
- AddUndoActions( vConnectorUndoActions );
+ // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
+ AddUndoActions( vConnectorUndoActions );
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
+ }
}
// Sicherstellen, dass die OrderNums stimmen:
rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
+ std::vector< SdrObject* > aRemoved3DObjects;
+
for(nm = nMarkAnz; nm > 0;)
{
nm--;
@@ -720,13 +765,22 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
SdrObjList* pOL = pObj->GetObjList(); //#52680#
const sal_uInt32 nOrdNum(pObj->GetOrdNumDirect());
+ bool bIs3D = dynamic_cast< E3dObject* >(pObj);
// set up a scene updater if object is a 3d object
- if(dynamic_cast< E3dObject* >(pObj))
+ if(bIs3D)
{
aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
}
pOL->RemoveObject(nOrdNum);
+
+ if( !bUndo )
+ {
+ if( bIs3D )
+ aRemoved3DObjects.push_back( pObj ); // may be needed later
+ else
+ SdrObject::Free(pObj);
+ }
}
// fire scene updaters
@@ -735,9 +789,20 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
delete aUpdaters.back();
aUpdaters.pop_back();
}
+
+ if( !bUndo )
+ {
+ // now delete removed scene objects
+ while(aRemoved3DObjects.size())
+ {
+ SdrObject::Free( aRemoved3DObjects.back() );
+ aRemoved3DObjects.pop_back();
+ }
+ }
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
}
@@ -774,6 +839,8 @@ void SdrEditView::CopyMarkedObj()
// New mechanism to re-create the connections of cloned connectors
CloneList aCloneList;
+ const bool bUndo = IsUndoEnabled();
+
GetMarkedObjectListWriteAccess().Clear();
ULONG nCloneErrCnt=0;
ULONG nMarkAnz=aSourceObjectsForCopy.GetMarkCount();
@@ -784,7 +851,10 @@ void SdrEditView::CopyMarkedObj()
if (pO!=NULL) {
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pM->GetPageView()->GetObjList()->InsertObject(pO,CONTAINER_APPEND,&aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoCopyObject(*pO));
+
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoCopyObject(*pO));
+
SdrMark aME(*pM);
aME.SetMarkedSdrObj(pO);
aCloneList.AddPair(pM->GetMarkedSdrObj(), pO);
@@ -851,7 +921,9 @@ BOOL SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, ULONG nO
rPV.GetObjList()->InsertObject(pObj,CONTAINER_APPEND,&aReason);
}
}
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
+ if( IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
+
if ((nOptions & SDRINSERT_DONTMARK)==0) {
if ((nOptions & SDRINSERT_ADDMARK)==0) UnmarkAllObj();
MarkObj(pObj,&rPV);
@@ -862,8 +934,18 @@ BOOL SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, ULONG nO
void SdrEditView::ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrObject* pNewObj, BOOL bMark)
{
SdrObjList* pOL=pOldObj->GetObjList();
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoReplaceObject(*pOldObj,*pNewObj));
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoReplaceObject(*pOldObj,*pNewObj));
+
+ if( IsObjMarked( pOldObj ) )
+ MarkObj( pOldObj, &rPV, TRUE /*unmark!*/ );
+
pOL->ReplaceObject(pNewObj,pOldObj->GetOrdNum());
+
+ if( !bUndo )
+ SdrObject::Free( pOldObj );
+
if (bMark) MarkObj(pNewObj,&rPV);
}
@@ -901,6 +983,7 @@ void SdrEditView::SetUndoComment(const String& rComment)
pMod->SetUndoComment(rComment);
}
+
void SdrEditView::SetUndoComment(const String& rComment,
const String& rObjDescr)
{
@@ -908,3 +991,8 @@ void SdrEditView::SetUndoComment(const String& rComment,
}
#endif
+bool SdrEditView::IsUndoEnabled() const
+{
+ return pMod->IsUndoEnabled();
+}
+
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index ba1f8914ba8b..2c6f0891b396 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -98,17 +98,32 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, BOOL bCopy)
long h1=rRect.Bottom()-y1;
XubString aStr;
ImpTakeDescriptionStr(STR_EditPosSize,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
- for (ULONG nm=0; nm<nAnz; nm++) {
+ if (bCopy)
+ aStr+=ImpGetResStr(STR_EditWithCopy);
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(aStr);
+
+ if (bCopy)
+ CopyMarkedObj();
+
+ for (ULONG nm=0; nm<nAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ if( bUndo )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+
Rectangle aR1(pO->GetSnapRect());
- if (!aR1.IsEmpty()) {
- if (aR1==aR0) aR1=rRect;
- else { // aR1 von aR0 nach rRect transformieren
+ if (!aR1.IsEmpty())
+ {
+ if (aR1==aR0)
+ {
+ aR1=rRect;
+ }
+ else
+ { // aR1 von aR0 nach rRect transformieren
aR1.Move(-x0,-y0);
BigInt l(aR1.Left());
BigInt r(aR1.Right());
@@ -137,7 +152,8 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, BOOL bCopy)
DBG_ERROR("SetMarkedObjRect(): pObj->GetSnapRect() liefert leeres Rect");
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
std::vector< SdrUndoAction* > SdrEditView::CreateConnectorUndo( SdrObject& rO )
@@ -176,40 +192,69 @@ void SdrEditView::AddUndoActions( std::vector< SdrUndoAction* >& rUndoActions )
void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
{
- XubString aStr(ImpGetResStr(STR_EditMove));
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- // benoetigt eigene UndoGroup wegen Parameter
- BegUndo(aStr,GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVE);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aStr(ImpGetResStr(STR_EditMove));
+ if (bCopy)
+ aStr+=ImpGetResStr(STR_EditWithCopy);
+ // benoetigt eigene UndoGroup wegen Parameter
+ BegUndo(aStr,GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVE);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pO,rSiz));
+ if( bUndo )
+ {
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pO,rSiz));
+ }
pO->Move(rSiz);
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy)
{
- XubString aStr;
- ImpTakeDescriptionStr(STR_EditResize,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditResize,aStr);
+ if (bCopy)
+ aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ if( bUndo )
+ {
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ }
pO->Resize(rRef,xFact,yFact);
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
long SdrEditView::GetMarkedObjRotate() const
@@ -232,11 +277,18 @@ long SdrEditView::GetMarkedObjRotate() const
void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
{
- XubString aStr;
- ImpTakeDescriptionStr(STR_EditRotate,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditRotate,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
double nSin=sin(nWink*nPi180);
double nCos=cos(nWink*nPi180);
const sal_uInt32 nMarkAnz(GetMarkedObjectCount());
@@ -250,11 +302,14 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
SdrMark* pM = GetSdrMarkByIndex(nm);
SdrObject* pO = pM->GetMarkedSdrObj();
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
+ if( bUndo )
+ {
+ // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ }
// set up a scene updater if object is a 3d object
if(dynamic_cast< E3dObject* >(pO))
@@ -273,20 +328,29 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy)
{
- XubString aStr;
- Point aDif(rRef2-rRef1);
- if (aDif.X()==0) ImpTakeDescriptionStr(STR_EditMirrorHori,aStr);
- else if (aDif.Y()==0) ImpTakeDescriptionStr(STR_EditMirrorVert,aStr);
- else if (Abs(aDif.X())==Abs(aDif.Y())) ImpTakeDescriptionStr(STR_EditMirrorDiag,aStr);
- else ImpTakeDescriptionStr(STR_EditMirrorFree,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aStr;
+ Point aDif(rRef2-rRef1);
+ if (aDif.X()==0) ImpTakeDescriptionStr(STR_EditMirrorHori,aStr);
+ else if (aDif.Y()==0) ImpTakeDescriptionStr(STR_EditMirrorVert,aStr);
+ else if (Abs(aDif.X())==Abs(aDif.Y())) ImpTakeDescriptionStr(STR_EditMirrorDiag,aStr);
+ else ImpTakeDescriptionStr(STR_EditMirrorFree,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
const sal_uInt32 nMarkAnz(GetMarkedObjectCount());
if(nMarkAnz)
@@ -298,11 +362,14 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
SdrMark* pM = GetSdrMarkByIndex(nm);
SdrObject* pO = pM->GetMarkedSdrObj();
- // extra undo actions for changed connector which now may hold it's layouted path (SJ)
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
+ if( bUndo )
+ {
+ // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ }
// set up a scene updater if object is a 3d object
if(dynamic_cast< E3dObject* >(pO))
@@ -321,7 +388,8 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
void SdrEditView::MirrorMarkedObjHorizontal(BOOL bCopy)
@@ -362,22 +430,37 @@ long SdrEditView::GetMarkedObjShear() const
void SdrEditView::ShearMarkedObj(const Point& rRef, long nWink, bool bVShear, bool bCopy)
{
- XubString aStr;
- ImpTakeDescriptionStr(STR_EditShear,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditShear,aStr);
+ if (bCopy)
+ aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
double nTan=tan(nWink*nPi180);
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ if( bUndo )
+ {
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ }
pO->Shear(rRef,nWink,nTan,bVShear);
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad,
@@ -462,17 +545,30 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
bool bVertical, bool bNoContortion, bool bCopy)
{
Rectangle aMarkRect(GetMarkedObjRect());
- XubString aStr;
- BOOL bRotate=bNoContortion && eMode==SDRCROOK_ROTATE && IsRotateAllowed(FALSE);
- ImpTakeDescriptionStr(bNoContortion?STR_EditCrook:STR_EditCrookContortion,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+
+ bool bRotate=bNoContortion && eMode==SDRCROOK_ROTATE && IsRotateAllowed(FALSE);
+
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(bNoContortion?STR_EditCrook:STR_EditCrookContortion,aStr);
+ if (bCopy)
+ aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ if( bUndo )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+
const SdrObjList* pOL=pO->GetSubList();
if (bNoContortion || pOL==NULL) {
ImpCrookObj(pO,rRef,rRad,eMode,bVertical,bNoContortion,bRotate,aMarkRect);
@@ -484,7 +580,9 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
}
}
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, BOOL bNoContortion)
@@ -523,16 +621,28 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol
void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy)
{
- XubString aStr;
- ImpTakeDescriptionStr(STR_EditDistort,aStr);
- if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr);
- if (bCopy) CopyMarkedObj();
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditDistort,aStr);
+ if (bCopy)
+ aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ }
+
+ if (bCopy)
+ CopyMarkedObj();
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+ if( bUndo )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+
Rectangle aRefRect(rRef);
XPolygon aRefPoly(rDistortedRect);
const SdrObjList* pOL=pO->GetSubList();
@@ -546,7 +656,8 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto
}
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -621,13 +732,19 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, BOOL /*bRep
long nAngle=((const SdrVertShearAllItem*)pPoolItem)->GetValue();
ShearMarkedObj(aAllSnapRect.Center(),nAngle,TRUE);
}
+
+ const bool bUndo = IsUndoEnabled();
+
// Todo: WhichRange nach Notwendigkeit ueberpruefen.
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
const SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
//const SdrPageView* pPV=pM->GetPageView();
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+ if( bUndo )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+
pObj->ApplyNotPersistAttr(rAttr);
}
}
@@ -838,8 +955,6 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
// Joe, 2.7.98: Damit Undo nach Format.Standard auch die Textattribute korrekt restauriert
BOOL bHasEEItems=SearchOutlinerItems(rAttr,bReplaceAll);
- XubString aStr;
- ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
// AW 030100: save additional geom info when para or char attributes
// are changed and the geom form of the text object might be changed
@@ -864,7 +979,14 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
nWhich = aIter.NextWhich();
}
- BegUndo(aStr);
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+ BegUndo(aStr);
+ }
+
const sal_uInt32 nMarkAnz(GetMarkedObjectCount());
std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
@@ -882,31 +1004,38 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj = pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions;
- SdrEdgeObj* pEdgeObj = dynamic_cast< SdrEdgeObj* >( pObj );
- if ( pEdgeObj )
- bPossibleGeomChange = TRUE;
- else
- vConnectorUndoActions = CreateConnectorUndo( *pObj );
- AddUndoActions( vConnectorUndoActions );
+ if( bUndo )
+ {
+ std::vector< SdrUndoAction* > vConnectorUndoActions;
+ SdrEdgeObj* pEdgeObj = dynamic_cast< SdrEdgeObj* >( pObj );
+ if ( pEdgeObj )
+ bPossibleGeomChange = TRUE;
+ else if( bUndo )
+ vConnectorUndoActions = CreateConnectorUndo( *pObj );
+
+ AddUndoActions( vConnectorUndoActions );
+ }
// new geometry undo
- if(bPossibleGeomChange)
+ if(bPossibleGeomChange && bUndo)
{
// save position and size of obect, too
AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
}
- // #i8508#
- // If this is a text object also rescue the OutlinerParaObject since
- // applying attributes to the object may change text layout when
- // multiple portions exist with multiple formats. If a OutlinerParaObject
- // really exists and needs to be rescued is evaluated in the undo
- // implementation itself.
- sal_Bool bRescueText(pObj->ISA(SdrTextObj));
-
- // add attribute undo
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,FALSE,bHasEEItems || bPossibleGeomChange || bRescueText));
+ if( bUndo )
+ {
+ // #i8508#
+ // If this is a text object also rescue the OutlinerParaObject since
+ // applying attributes to the object may change text layout when
+ // multiple portions exist with multiple formats. If a OutlinerParaObject
+ // really exists and needs to be rescued is evaluated in the undo
+ // implementation itself.
+ const bool bRescueText = dynamic_cast< SdrTextObj* >(pObj) != 0;
+
+ // add attribute undo
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,FALSE,bHasEEItems || bPossibleGeomChange || bRescueText));
+ }
// set up a scxene updater if object is a 3d object
if(dynamic_cast< E3dObject* >(pObj))
@@ -965,7 +1094,9 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
// pObj->SetAttr() oder SetNotPersistAttr()
// !!! fehlende Implementation !!!
SetNotPersistAttrToMarked(rAttr,bReplaceAll);
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
}
@@ -986,19 +1117,34 @@ SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() const
void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
{
- if (AreObjectsMarked()) {
- XubString aStr;
- if (pStyleSheet!=NULL) ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr);
- else ImpTakeDescriptionStr(STR_EditDelStylesheet,aStr);
- BegUndo(aStr);
+ if (AreObjectsMarked())
+ {
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ XubString aStr;
+ if (pStyleSheet!=NULL)
+ ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr);
+ else
+ ImpTakeDescriptionStr(STR_EditDelStylesheet,aStr);
+ BegUndo(aStr);
+ }
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pM->GetMarkedSdrObj()));
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pM->GetMarkedSdrObj(),true,true));
+ if( bUndo )
+ {
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pM->GetMarkedSdrObj()));
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pM->GetMarkedSdrObj(),true,true));
+ }
pM->GetMarkedSdrObj()->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
}
@@ -1494,84 +1640,119 @@ BOOL SdrEditView::IsAlignPossible() const
void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, BOOL bBoundRects)
{
- if (eHor==SDRHALIGN_NONE && eVert==SDRVALIGN_NONE) return;
+ if (eHor==SDRHALIGN_NONE && eVert==SDRVALIGN_NONE)
+ return;
+
SortMarkedObjects();
- if (GetMarkedObjectCount()<1) return;
- XubString aStr(GetDescriptionOfMarkedObjects());
- if (eHor==SDRHALIGN_NONE) {
- switch (eVert) {
- case SDRVALIGN_TOP : ImpTakeDescriptionStr(STR_EditAlignVTop ,aStr); break;
- case SDRVALIGN_BOTTOM: ImpTakeDescriptionStr(STR_EditAlignVBottom,aStr); break;
- case SDRVALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignVCenter,aStr); break;
- default: break;
+ if (GetMarkedObjectCount()<1)
+ return;
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ XubString aStr(GetDescriptionOfMarkedObjects());
+ if (eHor==SDRHALIGN_NONE)
+ {
+ switch (eVert)
+ {
+ case SDRVALIGN_TOP : ImpTakeDescriptionStr(STR_EditAlignVTop ,aStr); break;
+ case SDRVALIGN_BOTTOM: ImpTakeDescriptionStr(STR_EditAlignVBottom,aStr); break;
+ case SDRVALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignVCenter,aStr); break;
+ default: break;
+ }
+ }
+ else if (eVert==SDRVALIGN_NONE)
+ {
+ switch (eHor)
+ {
+ case SDRHALIGN_LEFT : ImpTakeDescriptionStr(STR_EditAlignHLeft ,aStr); break;
+ case SDRHALIGN_RIGHT : ImpTakeDescriptionStr(STR_EditAlignHRight ,aStr); break;
+ case SDRHALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignHCenter,aStr); break;
+ default: break;
+ }
}
- } else if (eVert==SDRVALIGN_NONE) {
- switch (eHor) {
- case SDRHALIGN_LEFT : ImpTakeDescriptionStr(STR_EditAlignHLeft ,aStr); break;
- case SDRHALIGN_RIGHT : ImpTakeDescriptionStr(STR_EditAlignHRight ,aStr); break;
- case SDRHALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignHCenter,aStr); break;
- default: break;
+ else if (eHor==SDRHALIGN_CENTER && eVert==SDRVALIGN_CENTER)
+ {
+ ImpTakeDescriptionStr(STR_EditAlignCenter,aStr);
}
- } else if (eHor==SDRHALIGN_CENTER && eVert==SDRVALIGN_CENTER) {
- ImpTakeDescriptionStr(STR_EditAlignCenter,aStr);
- } else {
- ImpTakeDescriptionStr(STR_EditAlign,aStr);
+ else
+ {
+ ImpTakeDescriptionStr(STR_EditAlign,aStr);
+ }
+ BegUndo(aStr);
}
- BegUndo(aStr);
+
Rectangle aBound;
ULONG nMarkAnz=GetMarkedObjectCount();
ULONG nm;
BOOL bHasFixed=FALSE;
- for (nm=0; nm<nMarkAnz; nm++) {
+ for (nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrObjTransformInfoRec aInfo;
pObj->TakeObjInfo(aInfo);
- if (!aInfo.bMoveAllowed || pObj->IsMoveProtect()) {
+ if (!aInfo.bMoveAllowed || pObj->IsMoveProtect())
+ {
Rectangle aObjRect(bBoundRects?pObj->GetCurrentBoundRect():pObj->GetSnapRect());
aBound.Union(aObjRect);
bHasFixed=TRUE;
}
}
- if (!bHasFixed) {
- if (nMarkAnz==1) { // einzelnes Obj an der Seite ausrichten
+ if (!bHasFixed)
+ {
+ if (nMarkAnz==1)
+ { // einzelnes Obj an der Seite ausrichten
const SdrObject* pObj=GetMarkedObjectByIndex(0L);
const SdrPage* pPage=pObj->GetPage();
const SdrPageGridFrameList* pGFL=pPage->GetGridFrameList(GetSdrPageViewOfMarkedByIndex(0),&(pObj->GetSnapRect()));
const SdrPageGridFrame* pFrame=NULL;
- if (pGFL!=NULL && pGFL->GetCount()!=0) { // Writer
+ if (pGFL!=NULL && pGFL->GetCount()!=0)
+ { // Writer
pFrame=&((*pGFL)[0]);
}
- if (pFrame!=NULL) { // Writer
+
+ if (pFrame!=NULL)
+ { // Writer
aBound=pFrame->GetUserArea();
- } else {
+ }
+ else
+ {
aBound=Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(),
pPage->GetWdt()-pPage->GetRgtBorder(),
pPage->GetHgt()-pPage->GetLwrBorder());
}
- } else {
- if (bBoundRects) aBound=GetMarkedObjBoundRect();
- else aBound=GetMarkedObjRect();
+ }
+ else
+ {
+ if (bBoundRects)
+ aBound=GetMarkedObjBoundRect();
+ else
+ aBound=GetMarkedObjRect();
}
}
Point aCenter(aBound.Center());
- for (nm=0; nm<nMarkAnz; nm++) {
+ for (nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrObjTransformInfoRec aInfo;
pObj->TakeObjInfo(aInfo);
- if (aInfo.bMoveAllowed && !pObj->IsMoveProtect()) {
+ if (aInfo.bMoveAllowed && !pObj->IsMoveProtect())
+ {
// SdrPageView* pPV=pM->GetPageView();
long nXMov=0;
long nYMov=0;
Rectangle aObjRect(bBoundRects?pObj->GetCurrentBoundRect():pObj->GetSnapRect());
- switch (eVert) {
+ switch (eVert)
+ {
case SDRVALIGN_TOP : nYMov=aBound.Top() -aObjRect.Top() ; break;
case SDRVALIGN_BOTTOM: nYMov=aBound.Bottom()-aObjRect.Bottom() ; break;
case SDRVALIGN_CENTER: nYMov=aCenter.Y() -aObjRect.Center().Y(); break;
default: break;
}
- switch (eHor) {
+ switch (eHor)
+ {
case SDRHALIGN_LEFT : nXMov=aBound.Left() -aObjRect.Left() ; break;
case SDRHALIGN_RIGHT : nXMov=aBound.Right() -aObjRect.Right() ; break;
case SDRHALIGN_CENTER: nXMov=aCenter.X() -aObjRect.Center().X(); break;
@@ -1581,17 +1762,22 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, BOOL
{
// #104104# SdrEdgeObj needs an extra SdrUndoGeoObj since the
// connections may need to be saved
- if(pObj && pObj->ISA(SdrEdgeObj))
+ if( bUndo )
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
- }
+ if( dynamic_cast<SdrEdgeObj*>(pObj) )
+ {
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+ }
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pObj,Size(nXMov,nYMov)));
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*pObj,Size(nXMov,nYMov)));
+ }
pObj->Move(Size(nXMov,nYMov));
}
}
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 68b1679dff49..8a9c80c37ec7 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -98,22 +98,30 @@ void SdrEditView::ObjOrderChanged(SdrObject* /*pObj*/, ULONG /*nOldPos*/, ULONG
void SdrEditView::MovMarkedToTop()
{
ULONG nAnz=GetMarkedObjectCount();
- if (nAnz!=0) {
- BegUndo(ImpGetResStr(STR_EditMovToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOTOP);
+ if (nAnz!=0)
+ {
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditMovToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOTOP);
+
SortMarkedObjects();
ULONG nm;
- for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ for (nm=0; nm<nAnz; nm++)
+ { // Ordnums muessen alle stimmen!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
BOOL bChg=FALSE;
SdrObjList* pOL0=NULL;
ULONG nNewPos=0;
- for (nm=nAnz; nm>0;) {
+ for (nm=nAnz; nm>0;)
+ {
nm--;
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrObjList* pOL=pObj->GetObjList();
- if (pOL!=pOL0) {
+ if (pOL!=pOL0)
+ {
nNewPos=ULONG(pOL->GetObjCount()-1);
pOL0=pOL;
}
@@ -121,58 +129,87 @@ void SdrEditView::MovMarkedToTop()
const Rectangle& rBR=pObj->GetCurrentBoundRect();
ULONG nCmpPos=nNowPos+1;
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
- if (pMaxObj!=NULL) {
+ if (pMaxObj!=NULL)
+ {
ULONG nMaxPos=pMaxObj->GetOrdNum();
- if (nMaxPos!=0) nMaxPos--;
- if (nNewPos>nMaxPos) nNewPos=nMaxPos; // diesen nicht ueberholen.
- if (nNewPos<nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ if (nMaxPos!=0)
+ nMaxPos--;
+ if (nNewPos>nMaxPos)
+ nNewPos=nMaxPos; // diesen nicht ueberholen.
+ if (nNewPos<nNowPos)
+ nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
}
BOOL bEnd=FALSE;
- while (nCmpPos<nNewPos && !bEnd) {
+ while (nCmpPos<nNewPos && !bEnd)
+ {
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
- if (pCmpObj==NULL) {
+ if (pCmpObj==NULL)
+ {
DBG_ERROR("MovMarkedToTop(): Vergleichsobjekt nicht gefunden");
bEnd=TRUE;
- } else if (pCmpObj==pMaxObj) {
+ }
+ else if (pCmpObj==pMaxObj)
+ {
nNewPos=nCmpPos;
nNewPos--;
bEnd=TRUE;
- } else if (rBR.IsOver(pCmpObj->GetCurrentBoundRect())) {
+ }
+ else if (rBR.IsOver(pCmpObj->GetCurrentBoundRect()))
+ {
nNewPos=nCmpPos;
bEnd=TRUE;
- } else nCmpPos++;
+ }
+ else
+ {
+ nCmpPos++;
+ }
}
- if (nNowPos!=nNewPos) {
+ if (nNowPos!=nNewPos)
+ {
bChg=TRUE;
pOL->SetObjectOrdNum(nNowPos,nNewPos);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
ObjOrderChanged(pObj,nNowPos,nNewPos);
}
nNewPos--;
}
- EndUndo();
- if (bChg) MarkListHasChanged();
+
+ if( bUndo )
+ EndUndo();
+
+ if (bChg)
+ MarkListHasChanged();
}
}
void SdrEditView::MovMarkedToBtm()
{
ULONG nAnz=GetMarkedObjectCount();
- if (nAnz!=0) {
- BegUndo(ImpGetResStr(STR_EditMovToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOBTM);
+ if (nAnz!=0)
+ {
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditMovToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOBTM);
+
SortMarkedObjects();
ULONG nm;
- for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ for (nm=0; nm<nAnz; nm++)
+ { // Ordnums muessen alle stimmen!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
+
BOOL bChg=FALSE;
SdrObjList* pOL0=NULL;
ULONG nNewPos=0;
- for (nm=0; nm<nAnz; nm++) {
+ for (nm=0; nm<nAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrObjList* pOL=pObj->GetObjList();
- if (pOL!=pOL0) {
+ if (pOL!=pOL0)
+ {
nNewPos=0;
pOL0=pOL;
}
@@ -180,39 +217,58 @@ void SdrEditView::MovMarkedToBtm()
const Rectangle& rBR=pObj->GetCurrentBoundRect();
ULONG nCmpPos=nNowPos; if (nCmpPos>0) nCmpPos--;
SdrObject* pMaxObj=GetMaxToBtmObj(pObj);
- if (pMaxObj!=NULL) {
+ if (pMaxObj!=NULL)
+ {
ULONG nMinPos=pMaxObj->GetOrdNum()+1;
- if (nNewPos<nMinPos) nNewPos=nMinPos; // diesen nicht ueberholen.
- if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ if (nNewPos<nMinPos)
+ nNewPos=nMinPos; // diesen nicht ueberholen.
+ if (nNewPos>nNowPos)
+ nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
}
BOOL bEnd=FALSE;
// nNewPos ist an dieser Stelle noch die maximale Position,
// an der das Obj hinruecken darf, ohne seinen Vorgaenger
// (Mehrfachselektion) zu ueberholen.
- while (nCmpPos>nNewPos && !bEnd) {
+ while (nCmpPos>nNewPos && !bEnd)
+ {
SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
- if (pCmpObj==NULL) {
+ if (pCmpObj==NULL)
+ {
DBG_ERROR("MovMarkedToBtm(): Vergleichsobjekt nicht gefunden");
bEnd=TRUE;
- } else if (pCmpObj==pMaxObj) {
+ }
+ else if (pCmpObj==pMaxObj)
+ {
nNewPos=nCmpPos;
nNewPos++;
bEnd=TRUE;
- } else if (rBR.IsOver(pCmpObj->GetCurrentBoundRect())) {
+ }
+ else if (rBR.IsOver(pCmpObj->GetCurrentBoundRect()))
+ {
nNewPos=nCmpPos;
bEnd=TRUE;
- } else nCmpPos--;
+ }
+ else
+ {
+ nCmpPos--;
+ }
}
- if (nNowPos!=nNewPos) {
+ if (nNowPos!=nNewPos)
+ {
bChg=TRUE;
pOL->SetObjectOrdNum(nNowPos,nNewPos);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
ObjOrderChanged(pObj,nNowPos,nNewPos);
}
nNewPos++;
}
- EndUndo();
- if (bChg) MarkListHasChanged();
+
+ if(bUndo)
+ EndUndo();
+
+ if(bChg)
+ MarkListHasChanged();
}
}
@@ -224,10 +280,16 @@ void SdrEditView::PutMarkedToTop()
void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
{
ULONG nAnz=GetMarkedObjectCount();
- if (nAnz!=0) {
- BegUndo(ImpGetResStr(STR_EditPutToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOTOP);
+ if (nAnz!=0)
+ {
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditPutToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOTOP);
+
SortMarkedObjects();
- if (pRefObj!=NULL) {
+
+ if (pRefObj!=NULL)
+ {
// Damit "Vor das Objekt" auch funktioniert wenn die
// markierten Objekte bereits vor dem Objekt stehen
ULONG nRefMark=TryToFindMarkedObject(pRefObj);
@@ -245,50 +307,70 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
}
}
ULONG nm;
- for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ for (nm=0; nm<nAnz; nm++)
+ { // Ordnums muessen alle stimmen!
GetMarkedObjectByIndex(nm)->GetOrdNum();
}
BOOL bChg=FALSE;
SdrObjList* pOL0=NULL;
ULONG nNewPos=0;
- for (nm=nAnz; nm>0;) {
+ for (nm=nAnz; nm>0;)
+ {
nm--;
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
- if (pObj!=pRefObj) {
+ if (pObj!=pRefObj)
+ {
SdrObjList* pOL=pObj->GetObjList();
- if (pOL!=pOL0) {
+ if (pOL!=pOL0)
+ {
nNewPos=ULONG(pOL->GetObjCount()-1);
pOL0=pOL;
}
ULONG nNowPos=pObj->GetOrdNumDirect();
SdrObject* pMaxObj=GetMaxToTopObj(pObj);
- if (pMaxObj!=NULL) {
+ if (pMaxObj!=NULL)
+ {
ULONG nMaxOrd=pMaxObj->GetOrdNum(); // geht leider nicht anders
- if (nMaxOrd>0) nMaxOrd--;
- if (nNewPos>nMaxOrd) nNewPos=nMaxOrd; // nicht ueberholen.
- if (nNewPos<nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ if (nMaxOrd>0)
+ nMaxOrd--;
+ if (nNewPos>nMaxOrd)
+ nNewPos=nMaxOrd; // nicht ueberholen.
+ if (nNewPos<nNowPos)
+ nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
}
- if (pRefObj!=NULL) {
- if (pRefObj->GetObjList()==pObj->GetObjList()) {
+ if (pRefObj!=NULL)
+ {
+ if (pRefObj->GetObjList()==pObj->GetObjList())
+ {
ULONG nMaxOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
- if (nNewPos>nMaxOrd) nNewPos=nMaxOrd; // nicht ueberholen.
- if (nNewPos<nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
- } else {
+ if (nNewPos>nMaxOrd)
+ nNewPos=nMaxOrd; // nicht ueberholen.
+ if (nNewPos<nNowPos)
+ nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ }
+ else
+ {
nNewPos=nNowPos; // andere PageView, also nicht veraendern
}
}
- if (nNowPos!=nNewPos) {
+ if (nNowPos!=nNewPos)
+ {
bChg=TRUE;
pOL->SetObjectOrdNum(nNowPos,nNewPos);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
ObjOrderChanged(pObj,nNowPos,nNewPos);
}
nNewPos--;
} // if (pObj!=pRefObj)
} // for-Schleife ueber alle Markierten Objekte
- EndUndo();
- if (bChg) MarkListHasChanged();
+
+ if( bUndo )
+ EndUndo();
+
+ if(bChg)
+ MarkListHasChanged();
}
}
@@ -300,10 +382,16 @@ void SdrEditView::PutMarkedToBtm()
void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
{
ULONG nAnz=GetMarkedObjectCount();
- if (nAnz!=0) {
- BegUndo(ImpGetResStr(STR_EditPutToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOBTM);
+ if (nAnz!=0)
+ {
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditPutToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOBTM);
+
SortMarkedObjects();
- if (pRefObj!=NULL) {
+ if (pRefObj!=NULL)
+ {
// Damit "Hinter das Objekt" auch funktioniert wenn die
// markierten Objekte bereits hinter dem Objekt stehen
ULONG nRefMark=TryToFindMarkedObject(pRefObj);
@@ -355,14 +443,19 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
if (nNowPos!=nNewPos) {
bChg=TRUE;
pOL->SetObjectOrdNum(nNowPos,nNewPos);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj,nNowPos,nNewPos));
ObjOrderChanged(pObj,nNowPos,nNewPos);
}
nNewPos++;
} // if (pObj!=pRefObj)
} // for-Schleife ueber alle markierten Objekte
- EndUndo();
- if (bChg) MarkListHasChanged();
+
+ if(bUndo)
+ EndUndo();
+
+ if(bChg)
+ MarkListHasChanged();
}
}
@@ -370,10 +463,15 @@ void SdrEditView::ReverseOrderOfMarked()
{
SortMarkedObjects();
ULONG nMarkAnz=GetMarkedObjectCount();
- if (nMarkAnz>0) {
+ if (nMarkAnz>0)
+ {
//BOOL bNeedBundle=FALSE;
BOOL bChg=FALSE;
- BegUndo(ImpGetResStr(STR_EditRevOrder),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_REVORDER);
+
+ bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditRevOrder),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_REVORDER);
+
ULONG a=0;
do {
// Markierung ueber mehrere PageViews berueksichtigen
@@ -390,8 +488,11 @@ void SdrEditView::ReverseOrderOfMarked()
SdrObject* pObj2=GetMarkedObjectByIndex(c);
ULONG nOrd1=pObj1->GetOrdNumDirect();
ULONG nOrd2=pObj2->GetOrdNumDirect();
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj1,nOrd1,nOrd2));
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj2,nOrd2-1,nOrd1));
+ if( bUndo )
+ {
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj1,nOrd1,nOrd2));
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectOrdNum(*pObj2,nOrd2-1,nOrd1));
+ }
pOL->SetObjectOrdNum(nOrd1,nOrd2);
// Obj 2 ist um eine Position nach vorn gerutscht, deshalb nun nOrd2-1
pOL->SetObjectOrdNum(nOrd2-1,nOrd1);
@@ -401,16 +502,22 @@ void SdrEditView::ReverseOrderOfMarked()
}
a=b+1;
} while (a<nMarkAnz);
- EndUndo();
- if (bChg) MarkListHasChanged();
+
+ if(bUndo)
+ EndUndo();
+
+ if(bChg)
+ MarkListHasChanged();
}
}
void SdrEditView::ImpCheckToTopBtmPossible()
{
ULONG nAnz=GetMarkedObjectCount();
- if (nAnz==0) return;
- if (nAnz==1) { // Sonderbehandlung fuer Einzelmarkierung
+ if (nAnz==0)
+ return;
+ if (nAnz==1)
+ { // Sonderbehandlung fuer Einzelmarkierung
SdrObject* pObj=GetMarkedObjectByIndex(0);
SdrObjList* pOL=pObj->GetObjList();
ULONG nMax=pOL->GetObjCount();
@@ -700,8 +807,6 @@ DECLARE_LIST(ImpDistributeEntryList, ImpDistributeEntry*)
void SdrEditView::DistributeMarkedObjects()
{
-#ifndef SVX_LIGHT
-
UINT32 nMark(GetMarkedObjectCount());
if(nMark > 2)
@@ -723,7 +828,9 @@ void SdrEditView::DistributeMarkedObjects()
ImpDistributeEntryList aEntryList;
UINT32 a, nInsPos, nFullLength;
- BegUndo();
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo();
if(eHor != SvxDistributeHorizontalNone)
{
@@ -785,7 +892,8 @@ void SdrEditView::DistributeMarkedObjects()
ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
ImpDistributeEntry* pNext = aEntryList.GetObject(a+1);
INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
pCurr->mpObj->Move(Size(nDelta, 0));
fStepStart += fStepWidth + (double)((pCurr->mnLength + pNext->mnLength) / 2);
}
@@ -803,7 +911,8 @@ void SdrEditView::DistributeMarkedObjects()
{
ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
pCurr->mpObj->Move(Size(nDelta, 0));
fStepStart += fStepWidth;
}
@@ -874,7 +983,8 @@ void SdrEditView::DistributeMarkedObjects()
ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
ImpDistributeEntry* pNext = aEntryList.GetObject(a+1);
INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
pCurr->mpObj->Move(Size(0, nDelta));
fStepStart += fStepWidth + (double)((pCurr->mnLength + pNext->mnLength) / 2);
}
@@ -892,7 +1002,8 @@ void SdrEditView::DistributeMarkedObjects()
{
ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj));
pCurr->mpObj->Move(Size(0, nDelta));
fStepStart += fStepWidth;
}
@@ -905,13 +1016,14 @@ void SdrEditView::DistributeMarkedObjects()
// UNDO-Comment and end of UNDO
SetUndoComment(ImpGetResStr(STR_DistributeMarkedObjects));
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
delete(pDlg);
}
}
-#endif
}
void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
@@ -921,7 +1033,11 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
{
SdrMarkList aRemove;
SortMarkedObjects();
- BegUndo();
+
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo();
UINT32 nInsPos=0xFFFFFFFF;
const SdrObject* pAttrObj = NULL;
@@ -1044,7 +1160,8 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
ImpCopyAttributes(pAttrObj, pPath);
SdrInsertReason aReason(SDRREASON_VIEWCALL, pAttrObj);
pInsOL->InsertObject(pPath, nInsPos, &aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath));
MarkObj(pPath, pInsPV, FALSE, TRUE);
}
@@ -1075,7 +1192,8 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
}
DeleteMarkedList(aRemove);
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
}
@@ -1084,8 +1202,11 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
// #105899# Start of Combine-Undo put to front, else ConvertMarkedToPolyObj would
// create a 2nd Undo-action and Undo-Comment.
+ bool bUndo = IsUndoEnabled();
+
// Undo-String will be set later
- BegUndo(String(), String(), bNoPolyPoly ? SDRREPFUNC_OBJ_COMBINE_ONEPOLY : SDRREPFUNC_OBJ_COMBINE_POLYPOLY);
+ if( bUndo )
+ BegUndo(String(), String(), bNoPolyPoly ? SDRREPFUNC_OBJ_COMBINE_ONEPOLY : SDRREPFUNC_OBJ_COMBINE_POLYPOLY);
// #105899# First, guarantee that all objects are converted to polyobjects,
// especially for SdrGrafObj with bitmap filling this is necessary to not
@@ -1228,7 +1349,8 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
SdrInsertReason aReason(SDRREASON_VIEWCALL,pAttrObj);
pInsOL->InsertObject(pPath,nInsPos,&aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath));
// #111111#
// Here was a severe error: Without UnmarkAllObj, the new object was marked
@@ -1241,11 +1363,13 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly)
// UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
aRemoveMerker.ForceSort(); // wichtig fuer Remove (s.u.)
- SetUndoComment(ImpGetResStr(bNoPolyPoly?STR_EditCombine_OnePoly:STR_EditCombine_PolyPoly),aRemoveMerker.GetMarkDescription());
+ if( bUndo )
+ SetUndoComment(ImpGetResStr(bNoPolyPoly?STR_EditCombine_OnePoly:STR_EditCombine_PolyPoly),aRemoveMerker.GetMarkDescription());
// die tatsaechlich verwendeten Objekten aus der Liste entfernen
DeleteMarkedList(aRemoveMerker);
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1368,6 +1492,8 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
const SdrPathObj* pSrcPath = PTR_CAST(SdrPathObj, pObj);
const SdrObjCustomShape* pCustomShape = PTR_CAST(SdrObjCustomShape, pObj);
+ const bool bUndo = IsUndoEnabled();
+
if(pSrcPath)
{
// #i74631# redesigned due to XpolyPolygon removal and explicit constructors
@@ -1387,7 +1513,8 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
pLast = pPath;
SdrInsertReason aReason(SDRREASON_VIEWCALL, pSrcPath);
rOL.InsertObject(pPath, rPos, &aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, TRUE));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, TRUE));
MarkObj(pPath, pPV, FALSE, TRUE);
rPos++;
}
@@ -1421,7 +1548,8 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
pLast = pPath;
SdrInsertReason aReason(SDRREASON_VIEWCALL, pSrcPath);
rOL.InsertObject(pPath, rPos, &aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, TRUE));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, TRUE));
MarkObj(pPath, pPV, FALSE, TRUE);
rPos++;
}
@@ -1456,7 +1584,8 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
SdrInsertReason aReason(SDRREASON_VIEWCALL, pCustomShape);
rOL.InsertObject(pCandidate, rPos, &aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pCandidate, true));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pCandidate, true));
MarkObj(pCandidate, pPV, FALSE, TRUE);
if(pCustomShape->HasText() && !pCustomShape->IsTextPath())
@@ -1500,7 +1629,8 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
// insert object
rOL.InsertObject(pTextObj, rPos + 1, &aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pTextObj, true));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pTextObj, true));
MarkObj(pTextObj, pPV, FALSE, TRUE);
}
}
@@ -1515,9 +1645,15 @@ void SdrEditView::DismantleMarkedObjects(BOOL bMakeLines)
SdrMarkList aRemoveMerker;
SortMarkedObjects();
- // Der Comment wird spaeter zusammengebaut
- BegUndo(String(), String(),
- bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS);
+
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ // Der Comment wird spaeter zusammengebaut
+ BegUndo(String(), String(),
+ bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS);
+ }
ULONG nm;
ULONG nAnz=GetMarkedObjectCount();
@@ -1543,14 +1679,22 @@ void SdrEditView::DismantleMarkedObjects(BOOL bMakeLines)
} else {
ImpDismantleOneObject(pObj,*pOL,nPos,pPV,bMakeLines);
}
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj,TRUE));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj,TRUE));
pOL->RemoveObject(nPos0);
+
+ if( !bUndo )
+ SdrObject::Free(pObj);
}
}
- // UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
- SetUndoComment(ImpGetResStr(bMakeLines?STR_EditDismantle_Lines:STR_EditDismantle_Polys),aRemoveMerker.GetMarkDescription());
- // die tatsaechlich verwendeten Objekten aus der Liste entfernen
- EndUndo();
+
+ if( bUndo )
+ {
+ // UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
+ SetUndoComment(ImpGetResStr(bMakeLines?STR_EditDismantle_Lines:STR_EditDismantle_Polys),aRemoveMerker.GetMarkDescription());
+ // die tatsaechlich verwendeten Objekten aus der Liste entfernen
+ EndUndo();
+ }
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1565,17 +1709,26 @@ void SdrEditView::DismantleMarkedObjects(BOOL bMakeLines)
void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
{
- if (AreObjectsMarked()) {
- BegUndo(ImpGetResStr(STR_EditGroup),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_GROUP);
+ if (AreObjectsMarked())
+ {
SortMarkedObjects();
- ULONG nAnz=GetMarkedObjectCount();
- for (ULONG nm=nAnz; nm>0;) { // UndoActions fuer alle betroffenen Objekte anlegen
- nm--;
- SdrMark* pM=GetSdrMarkByIndex(nm);
- SdrObject* pObj = pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoRemoveObject( *pObj ));
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ BegUndo(ImpGetResStr(STR_EditGroup),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_GROUP);
+
+ const ULONG nAnz = GetMarkedObjectCount();
+ for(ULONG nm = nAnz; nm>0; )
+ {
+ // UndoActions fuer alle betroffenen Objekte anlegen
+ nm--;
+ SdrMark* pM=GetSdrMarkByIndex(nm);
+ SdrObject* pObj = pM->GetMarkedSdrObj();
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
+ AddUndoActions( vConnectorUndoActions );
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoRemoveObject( *pObj ));
+ }
}
SdrMarkList aNewMark;
@@ -1588,7 +1741,8 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
SdrObjList* pSrcLst0=pSrcLst;
SdrPage* pPage=pPV->GetPage();
// sicherstellen, dass die OrdNums stimmen
- if (pSrcLst->IsObjOrdNumsDirty()) pSrcLst->RecalcObjOrdNums();
+ if (pSrcLst->IsObjOrdNumsDirty())
+ pSrcLst->RecalcObjOrdNums();
SdrObject* pGrp=NULL;
SdrObject* pRefObj=NULL; // Referenz fuer InsertReason (-> rumankern im Writer)
SdrObject* pRefObj1=NULL; // Referenz fuer InsertReason (-> rumankern im Writer)
@@ -1597,55 +1751,75 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
// kommen, kommt das Gruppenobjekt an das Ende der Liste.
ULONG nInsPos=pSrcLst->GetObjCount();
BOOL bNeedInsPos=TRUE;
- for (ULONG nm=GetMarkedObjectCount(); nm>0;) {
+ for (ULONG nm=GetMarkedObjectCount(); nm>0;)
+ {
nm--;
SdrMark* pM=GetSdrMarkByIndex(nm);
- if (pM->GetPageView()==pPV) {
- if (pGrp==NULL) {
- if (pUserGrp!=NULL) pGrp=pUserGrp->Clone();
- if (pGrp==NULL) pGrp=new SdrObjGroup;
+ if (pM->GetPageView()==pPV)
+ {
+ if (pGrp==NULL)
+ {
+ if (pUserGrp!=NULL)
+ pGrp=pUserGrp->Clone();
+ if (pGrp==NULL)
+ pGrp=new SdrObjGroup;
pDstLst=pGrp->GetSubList();
DBG_ASSERT(pDstLst!=NULL,"Angebliches Gruppenobjekt liefert keine Objektliste");
}
SdrObject* pObj=pM->GetMarkedSdrObj();
pSrcLst=pObj->GetObjList();
- if (pSrcLst!=pSrcLst0) {
- if (pSrcLst->IsObjOrdNumsDirty()) pSrcLst->RecalcObjOrdNums();
+ if (pSrcLst!=pSrcLst0)
+ {
+ if (pSrcLst->IsObjOrdNumsDirty())
+ pSrcLst->RecalcObjOrdNums();
}
BOOL bForeignList=pSrcLst!=pAktLst;
BOOL bGrouped=pSrcLst!=pPage;
- if (!bForeignList && bNeedInsPos) {
+ if (!bForeignList && bNeedInsPos)
+ {
nInsPos=pObj->GetOrdNum(); // ua, damit sind alle ObjOrdNum der Page gesetzt
nInsPos++;
bNeedInsPos=FALSE;
}
pSrcLst->RemoveObject(pObj->GetOrdNumDirect());
- if (!bForeignList) nInsPos--; // InsertPos korregieren
+ if (!bForeignList)
+ nInsPos--; // InsertPos korregieren
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pDstLst->InsertObject(pObj,0,&aReason);
GetMarkedObjectListWriteAccess().DeleteMark(nm);
- if (pRefObj1==NULL) pRefObj1=pObj; // Das oberste sichtbare Objekt
- if (!bGrouped) {
- if (pRefObj==NULL) pRefObj=pObj; // Das oberste sichtbare nicht gruppierte Objekt
+ if (pRefObj1==NULL)
+ pRefObj1=pObj; // Das oberste sichtbare Objekt
+ if (!bGrouped)
+ {
+ if (pRefObj==NULL)
+ pRefObj=pObj; // Das oberste sichtbare nicht gruppierte Objekt
}
pSrcLst0=pSrcLst;
}
}
- if (pRefObj==NULL) pRefObj=pRefObj1;
- if (pGrp!=NULL) {
+ if (pRefObj==NULL)
+ pRefObj=pRefObj1;
+ if (pGrp!=NULL)
+ {
aNewMark.InsertEntry(SdrMark(pGrp,pPV));
- ULONG nAnz2=pDstLst->GetObjCount();
+ ULONG nAnz=pDstLst->GetObjCount();
SdrInsertReason aReason(SDRREASON_VIEWCALL,pRefObj);
pAktLst->InsertObject(pGrp,nInsPos,&aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // Kein Recalc!
- for (ULONG no=0; no<nAnz2; no++) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pDstLst->GetObj(no)));
+ if( bUndo )
+ {
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // Kein Recalc!
+ for (ULONG no=0; no<nAnz; no++)
+ {
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pDstLst->GetObj(no)));
+ }
}
}
}
GetMarkedObjectListWriteAccess().Merge(aNewMark);
MarkListHasChanged();
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
}
}
@@ -1663,7 +1837,10 @@ void SdrEditView::UnGroupMarked()
{
SdrMarkList aNewMark;
- BegUndo(String(), String(), SDRREPFUNC_OBJ_UNGROUP);
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(String(), String(), SDRREPFUNC_OBJ_UNGROUP);
+
ULONG nCount=0;
XubString aName1;
XubString aName;
@@ -1697,16 +1874,23 @@ void SdrEditView::UnGroupMarked()
// when AddUndo(new SdrUndoDelObj(*pGrp)) is called.
ULONG nAnz=pSrcLst->GetObjCount();
ULONG no;
- for (no=nAnz; no>0;) {
- no--;
- SdrObject* pObj=pSrcLst->GetObj(no);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoRemoveObject(*pObj));
+
+ if( bUndo )
+ {
+ for (no=nAnz; no>0;)
+ {
+ no--;
+ SdrObject* pObj=pSrcLst->GetObj(no);
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoRemoveObject(*pObj));
+ }
}
- for (no=0; no<nAnz; no++) {
+ for (no=0; no<nAnz; no++)
+ {
SdrObject* pObj=pSrcLst->RemoveObject(0);
SdrInsertReason aReason(SDRREASON_VIEWCALL,pGrp);
pDstLst->InsertObject(pObj,nDstCnt,&aReason);
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pObj,true));
+ if( bUndo )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pObj,true));
nDstCnt++;
// Kein SortCheck beim einfuegen in die MarkList, denn das
// wuerde wg. pObj->GetOrdNum() jedesmal ein RecalcOrdNums()
@@ -1714,22 +1898,32 @@ void SdrEditView::UnGroupMarked()
aNewMark.InsertEntry(SdrMark(pObj,pM->GetPageView()),FALSE);
}
- // Now it is safe to add the delete-UNDO which trigers the
- // MigrateItemPool now only for itself, not for the subobjects.
- // nDstCnt is right, because previous inserts move group
- // object deeper and increase nDstCnt.
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pGrp));
+ if( bUndo )
+ {
+ // Now it is safe to add the delete-UNDO which trigers the
+ // MigrateItemPool now only for itself, not for the subobjects.
+ // nDstCnt is right, because previous inserts move group
+ // object deeper and increase nDstCnt.
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pGrp));
+ }
pDstLst->RemoveObject(nDstCnt);
+ if( !bUndo )
+ SdrObject::Free(pGrp);
+
GetMarkedObjectListWriteAccess().DeleteMark(nm);
}
}
if (nCount!=0)
{
- if (!bNameOk) aName=ImpGetResStr(STR_ObjNamePluralGRUP); // Oberbegriff Gruppenobjekte verwenden, wenn verschiedene Objekte.
+ if (!bNameOk)
+ aName=ImpGetResStr(STR_ObjNamePluralGRUP); // Oberbegriff Gruppenobjekte verwenden, wenn verschiedene Objekte.
SetUndoComment(ImpGetResStr(STR_EditUngroup),aName);
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
+
if (nCount!=0)
{
GetMarkedObjectListWriteAccess().Merge(aNewMark,TRUE); // Durch das obige Einsortieren ist aNewMark genau verkehrtherum
@@ -1750,12 +1944,20 @@ void SdrEditView::UnGroupMarked()
SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, BOOL bPath, BOOL bLineToArea)
{
SdrObject* pNewObj = pObj->ConvertToPolyObj(bPath, bLineToArea);
- if (pNewObj!=NULL) {
+ if (pNewObj!=NULL)
+ {
SdrObjList* pOL=pObj->GetObjList();
DBG_ASSERT(pOL!=NULL,"ConvertTo: Obj liefert keine ObjList");
- if (pOL!=NULL) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoReplaceObject(*pObj,*pNewObj));
+ if (pOL!=NULL)
+ {
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoReplaceObject(*pObj,*pNewObj));
+
pOL->ReplaceObject(pNewObj,pObj->GetOrdNum());
+
+ if( !bUndo )
+ SdrObject::Free(pObj);
}
}
return pNewObj;
@@ -1838,7 +2040,11 @@ void SdrEditView::ConvertMarkedToPolyObj(BOOL bLineToArea)
void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
{
- BegUndo(String(), String(), SDRREPFUNC_OBJ_IMPORTMTF);
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo(String(), String(), SDRREPFUNC_OBJ_IMPORTMTF);
+
SortMarkedObjects();
SdrMarkList aForTheDescription;
SdrMarkList aNewMarked;
@@ -1878,10 +2084,13 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
aFilter.SetLayer(pObj->GetLayer());
nInsAnz=aFilter.DoImport(pOle2->GetGraphic()->GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
}
- if (nInsAnz!=0) {
+ if (nInsAnz!=0)
+ {
ULONG nObj=nInsPos;
- for (ULONG i=0; i<nInsAnz; i++) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));
+ for (ULONG i=0; i<nInsAnz; i++)
+ {
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));
// Neue MarkList pflegen
SdrMark aNewMark(pOL->GetObj(nObj), pPV);
@@ -1890,11 +2099,16 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
nObj++;
}
aForTheDescription.InsertEntry(*pM);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
+
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
// Objekt aus selektion loesen und loeschen
GetMarkedObjectListWriteAccess().DeleteMark(TryToFindMarkedObject(pObj));
pOL->RemoveObject(nInsPos-1);
+
+ if( !bUndo )
+ SdrObject::Free(pObj);
}
}
@@ -1910,7 +2124,10 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
SortMarkedObjects();
}
- SetUndoComment(ImpGetResStr(STR_EditImportMtf),aForTheDescription.GetMarkDescription());
- EndUndo();
+ if( bUndo )
+ {
+ SetUndoComment(ImpGetResStr(STR_EditImportMtf),aForTheDescription.GetMarkDescription());
+ EndUndo();
+ }
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 49ba83ed35ae..901bc0e7e5b6 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -246,7 +246,7 @@ void SdrObjEditView::ModelHasChanged()
eNewAnchor=(EVAnchorMode)pTextObj->GetOutlinerViewAnchorMode();
bAnchorChg=eOldAnchor!=eNewAnchor;
Color aOldColor(pTextEditOutlinerView->GetBackgroundColor());
- aNewColor=ImpGetTextEditBackgroundColor();
+ aNewColor = GetTextEditBackgroundColor(*this);
bColorChg=aOldColor!=aNewColor;
}
// #104082# refresh always when it's a contour frame. That
@@ -425,52 +425,10 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const
}
}
-Color SdrObjEditView::ImpGetTextEditBackgroundColor() const
-{
- // #108759# Extracted significant parts to SdrPaintView::CalcBackgroundColor()
- svtools::ColorConfig aColorConfig;
- Color aBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-
- if(!rStyleSettings.GetHighContrastMode())
- {
- bool bFound=false;
- SdrTextObj* pText = dynamic_cast< SdrTextObj * >( mxTextEditObj.get());
- if (pText!=NULL && pText->IsClosedObj())
- {
- ::sdr::table::SdrTableObj* pTable = dynamic_cast< ::sdr::table::SdrTableObj * >( pText );
- if( pTable )
- bFound = GetDraftFillColor(pTable->GetActiveCellItemSet(), aBackground );
-
- if( !bFound )
- bFound=GetDraftFillColor(pText->GetMergedItemSet(), aBackground);
- }
- if (!bFound && pTextEditPV!=NULL && pText)
- {
- // #108784#
- Point aPvOfs(pText->GetTextEditOffset());
-
- const SdrPage* pPg=pTextEditPV->GetPage();
-
- // #112690#
- // Test existance of the page before using CalcBackgroundColor
- if(pPg)
- {
- Rectangle aSnapRect( pText->GetSnapRect() );
- aSnapRect.Move(aPvOfs.X(), aPvOfs.Y());
-
- return CalcBackgroundColor( aSnapRect, pTextEditPV->GetVisibleLayers(), *pPg );
- }
- }
- }
-
- return aBackground;
-}
-
OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, BOOL /*bNoPaint*/, OutlinerView* pGivenView) const
{
// Hintergrund
- Color aBackground(ImpGetTextEditBackgroundColor());
+ Color aBackground(GetTextEditBackgroundColor(*this));
SdrTextObj* pText = dynamic_cast< SdrTextObj * >( mxTextEditObj.get() );
BOOL bTextFrame=pText!=NULL && pText->IsTextFrame();
BOOL bContourFrame=pText!=NULL && pText->IsContourTextFrame();
@@ -858,7 +816,8 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
pTextEditCursorMerker=NULL;
aTextEditArea=Rectangle();
- if (pTEOutliner!=NULL) {
+ if (pTEOutliner!=NULL)
+ {
BOOL bModified=pTEOutliner->IsModified();
if (pTEOutlinerView!=NULL)
{
@@ -886,9 +845,13 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
pTEOutliner->SetBeginPasteOrDropHdl(Link());
pTEOutliner->SetEndPasteOrDropHdl(Link());
- XubString aObjName;
- pTEObj->TakeObjNameSingul(aObjName);
- BegUndo(ImpGetResStr(STR_UndoObjSetText),aObjName);
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ XubString aObjName;
+ pTEObj->TakeObjNameSingul(aObjName);
+ BegUndo(ImpGetResStr(STR_UndoObjSetText),aObjName);
+ }
pTEObj->EndTextEdit(*pTEOutliner);
@@ -922,25 +885,43 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
if(pTEObj->IsInserted() && bDelObj && pTextObj->GetObjInventor()==SdrInventor && !bDontDeleteReally)
{
SdrObjKind eIdent=(SdrObjKind)pTextObj->GetObjIdentifier();
- if (eIdent==OBJ_TEXT || eIdent==OBJ_TEXTEXT)
+ if(eIdent==OBJ_TEXT || eIdent==OBJ_TEXTEXT)
{
pDelUndo= GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pTEObj);
}
}
}
- if (pTxtUndo!=NULL) { AddUndo(pTxtUndo); eRet=SDRENDTEXTEDIT_CHANGED; }
- if (pDelUndo!=NULL) {
- AddUndo(pDelUndo);
+ if (pTxtUndo!=NULL)
+ {
+ if( bUndo )
+ AddUndo(pTxtUndo);
+ eRet=SDRENDTEXTEDIT_CHANGED;
+ }
+ if (pDelUndo!=NULL)
+ {
+ if( bUndo )
+ {
+ AddUndo(pDelUndo);
+ }
+ else
+ {
+ delete pDelUndo;
+ }
eRet=SDRENDTEXTEDIT_DELETED;
DBG_ASSERT(pTEObj->GetObjList()!=NULL,"SdrObjEditView::SdrEndTextEdit(): Fatal: Editiertes Objekt hat keine ObjList!");
- if (pTEObj->GetObjList()!=NULL) {
+ if (pTEObj->GetObjList()!=NULL)
+ {
pTEObj->GetObjList()->RemoveObject(pTEObj->GetOrdNum());
CheckMarked(); // und gleich die Maekierung entfernen...
}
- } else if (bDelObj) { // Fuer den Writer: Loeschen muss die App nachholen.
+ }
+ else if (bDelObj)
+ { // Fuer den Writer: Loeschen muss die App nachholen.
eRet=SDRENDTEXTEDIT_SHOULDBEDELETED;
}
- EndUndo(); // EndUndo hinter Remove, falls der UndoStack gleich weggehaun' wird
+
+ if( bUndo )
+ EndUndo(); // EndUndo hinter Remove, falls der UndoStack gleich weggehaun' wird
// #111096#
// Switch on evtl. TextAnimation again after TextEdit
@@ -955,14 +936,16 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
AdjustMarkHdl();
}
// alle OutlinerViews loeschen
- for (ULONG i=pTEOutliner->GetViewCount(); i>0;) {
+ for (ULONG i=pTEOutliner->GetViewCount(); i>0;)
+ {
i--;
OutlinerView* pOLV=pTEOutliner->GetView(i);
USHORT nMorePix=pOLV->GetInvalidateMore() + 10; // solaris aw033 test #i#
Window* pWin=pOLV->GetWindow();
Rectangle aRect(pOLV->GetOutputArea());
pTEOutliner->RemoveView(i);
- if (!bTextEditDontDelete || i!=0) {
+ if (!bTextEditDontDelete || i!=0)
+ {
// die nullte gehoert mir u.U. nicht.
delete pOLV;
}
@@ -1564,21 +1547,26 @@ BOOL SdrObjEditView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
if( !bRet )
{
- String aStr;
- ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
- BegUndo(aStr);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*mxTextEditObj.get()));
-
- // #i43537#
- // If this is a text object also rescue the OutlinerParaObject since
- // applying attributes to the object may change text layout when
- // multiple portions exist with multiple formats. If a OutlinerParaObject
- // really exists and needs to be rescued is evaluated in the undo
- // implementation itself.
- sal_Bool bRescueText(mxTextEditObj->ISA(SdrTextObj));
-
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*mxTextEditObj.get(),false,!bNoEEItems || bRescueText));
- EndUndo();
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ {
+ String aStr;
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+ BegUndo(aStr);
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*mxTextEditObj.get()));
+
+ // #i43537#
+ // If this is a text object also rescue the OutlinerParaObject since
+ // applying attributes to the object may change text layout when
+ // multiple portions exist with multiple formats. If a OutlinerParaObject
+ // really exists and needs to be rescued is evaluated in the undo
+ // implementation itself.
+ bool bRescueText = dynamic_cast< SdrTextObj* >(mxTextEditObj.get());
+
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*mxTextEditObj.get(),false,!bNoEEItems || bRescueText));
+ EndUndo();
+ }
mxTextEditObj->SetMergedItemSetAndBroadcast(*pSet, bReplaceAll);
@@ -1610,12 +1598,15 @@ BOOL SdrObjEditView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
if( !bRet )
{
- String aStr;
- ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
- BegUndo(aStr);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*mxTextEditObj.get()));
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*mxTextEditObj.get(),false,false));
- EndUndo();
+ if( IsUndoEnabled() )
+ {
+ String aStr;
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+ BegUndo(aStr);
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*mxTextEditObj.get()));
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*mxTextEditObj.get(),false,false));
+ EndUndo();
+ }
mxTextEditObj->SetMergedItemSetAndBroadcast(aSet, bReplaceAll);
@@ -1645,7 +1636,8 @@ BOOL SdrObjEditView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
}
bRet=TRUE;
}
- if (pModifiedSet!=NULL) delete pModifiedSet;
+ if (pModifiedSet!=NULL)
+ delete pModifiedSet;
return bRet;
}
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index b3aa3daf522f..6f4ee781dc37 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -31,10 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include "forbiddencharacterstable.hxx"
-
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
-
#include <svx/svdetc.hxx>
#include "svditext.hxx"
#include <svx/svdmodel.hxx>
@@ -68,15 +66,14 @@
#include <i18npool/lang.h>
#include <unotools/charclass.hxx>
#include <svtools/syslocale.hxx>
-
-// #97870#
#include <svx/xflbckit.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
#include <vcl/svapp.hxx> //add CHINA001
-
-//#i80528#
#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdotable.hxx>
+#include <svx/sdrhittesthelper.hxx>
using namespace ::com::sun::star;
@@ -85,14 +82,17 @@ using namespace ::com::sun::star;
******************************************************************************/
SdrGlobalData::SdrGlobalData() :
+ pSysLocale(NULL),
+ pCharClass(NULL),
+ pLocaleData(NULL),
pOutliner(NULL),
pDefaults(NULL),
pResMgr(NULL),
nExchangeFormat(0)
{
- pSysLocale = new SvtSysLocale;
- pCharClass = pSysLocale->GetCharClassPtr();
- pLocaleData = pSysLocale->GetLocaleDataPtr();
+ //pSysLocale = new SvtSysLocale;
+ //pCharClass = pSysLocale->GetCharClassPtr();
+ //pLocaleData = pSysLocale->GetLocaleDataPtr();
svx::ExtrusionBar::RegisterInterface();
svx::FontworkBar::RegisterInterface();
@@ -106,7 +106,24 @@ SdrGlobalData::~SdrGlobalData()
//! do NOT delete pCharClass and pLocaleData
delete pSysLocale;
}
-
+const SvtSysLocale* SdrGlobalData::GetSysLocale()
+{
+ if ( !pSysLocale )
+ pSysLocale = new SvtSysLocale;
+ return pSysLocale;
+}
+const CharClass* SdrGlobalData::GetCharClass()
+{
+ if ( !pCharClass )
+ pCharClass = GetSysLocale()->GetCharClassPtr();
+ return pCharClass;
+}
+const LocaleDataWrapper* SdrGlobalData::GetLocaleData()
+{
+ if ( !pLocaleData )
+ pLocaleData = GetSysLocale()->GetLocaleDataPtr();
+ return pLocaleData;
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
OLEObjCache::OLEObjCache()
@@ -146,10 +163,13 @@ void OLEObjCache::UnloadOnDemand()
{
try
{
- sal_Bool bUnload = sal_True;
// it is important to get object without reinitialization to avoid reentrance
uno::Reference< embed::XEmbeddedObject > xUnloadObj = pUnloadObj->GetObjRef_NoInit();
- if ( xUnloadObj.is() )
+
+ sal_Bool bUnload = SdrOle2Obj::CanUnloadRunningObj( xUnloadObj, pUnloadObj->GetAspect() );
+
+ // check whether the object can be unloaded before looking for the parent objects
+ if ( xUnloadObj.is() && bUnload )
{
uno::Reference< frame::XModel > xUnloadModel( xUnloadObj->getComponent(), uno::UNO_QUERY );
if ( xUnloadModel.is() )
@@ -193,11 +213,18 @@ void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
return;
}
+ // get the old position of the object to know whether it is already in container
+ ULONG nOldPos = GetPos( pObj );
+
// insert object into first position
- Remove(pObj);
+ Remove( nOldPos );
Insert(pObj, (ULONG) 0L);
- UnloadOnDemand();
+ if ( nOldPos == CONTAINER_ENTRY_NOTFOUND )
+ {
+ // a new object was inserted, recalculate the cache
+ UnloadOnDemand();
+ }
}
void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
@@ -837,6 +864,258 @@ void SvdProgressInfo::ReportError()
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+// #i101872# isolate GetTextEditBackgroundColor to tooling; it woll anyways only be used as long
+// as text edit is not running on overlay
+
+namespace
+{
+ bool impGetSdrObjListFillColor(
+ const SdrObjList& rList,
+ const Point& rPnt,
+ const SdrPageView& rTextEditPV,
+ const SetOfByte& rVisLayers,
+ Color& rCol)
+ {
+ if(!rList.GetModel())
+ return false;
+
+ bool bRet(false);
+ bool bMaster(rList.GetPage() ? rList.GetPage()->IsMasterPage() : false);
+
+ for(ULONG no(rList.GetObjCount()); !bRet && no > 0; )
+ {
+ no--;
+ SdrObject* pObj = rList.GetObj(no);
+ SdrObjList* pOL = pObj->GetSubList();
+
+ if(pOL)
+ {
+ // group object
+ bRet = impGetSdrObjListFillColor(*pOL, rPnt, rTextEditPV, rVisLayers, rCol);
+ }
+ else
+ {
+ SdrTextObj* pText = dynamic_cast< SdrTextObj * >(pObj);
+
+ // #108867# Exclude zero master page object (i.e. background shape) from color query
+ if(pText
+ && pObj->IsClosedObj()
+ && (!bMaster || (!pObj->IsNotVisibleAsMaster() && 0 != no))
+ && pObj->GetCurrentBoundRect().IsInside(rPnt)
+ && !pText->IsHideContour()
+ && SdrObjectPrimitiveHit(*pObj, rPnt, 0, rTextEditPV, &rVisLayers, false))
+ {
+ bRet = GetDraftFillColor(pObj->GetMergedItemSet(), rCol);
+ }
+ }
+ }
+
+ return bRet;
+ }
+
+ bool impGetSdrPageFillColor(
+ const SdrPage& rPage,
+ const Point& rPnt,
+ const SdrPageView& rTextEditPV,
+ const SetOfByte& rVisLayers,
+ Color& rCol,
+ bool bSkipBackgroundShape)
+ {
+ if(!rPage.GetModel())
+ return false;
+
+ bool bRet(impGetSdrObjListFillColor(rPage, rPnt, rTextEditPV, rVisLayers, rCol));
+
+ if(!bRet && !rPage.IsMasterPage())
+ {
+ if(rPage.TRG_HasMasterPage())
+ {
+ SetOfByte aSet(rVisLayers);
+ aSet &= rPage.TRG_GetMasterPageVisibleLayers();
+ SdrPage& rMasterPage = rPage.TRG_GetMasterPage();
+
+ // #108867# Don't fall back to background shape on
+ // master pages. This is later handled by
+ // GetBackgroundColor, and is necessary to cater for
+ // the silly ordering: 1. shapes, 2. master page
+ // shapes, 3. page background, 4. master page
+ // background.
+ bRet = impGetSdrPageFillColor(rMasterPage, rPnt, rTextEditPV, aSet, rCol, true);
+ }
+ }
+
+ // #108867# Only now determine background color from background shapes
+ if(!bRet && !bSkipBackgroundShape)
+ {
+ rCol = rPage.GetPageBackgroundColor();
+ return true;
+ }
+
+ return bRet;
+ }
+
+ Color impCalcBackgroundColor(
+ const Rectangle& rArea,
+ const SdrPageView& rTextEditPV,
+ const SdrPage& rPage)
+ {
+ svtools::ColorConfig aColorConfig;
+ Color aBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if(!rStyleSettings.GetHighContrastMode())
+ {
+ // search in page
+ const USHORT SPOTCOUNT(5);
+ Point aSpotPos[SPOTCOUNT];
+ Color aSpotColor[SPOTCOUNT];
+ ULONG nHeight( rArea.GetSize().Height() );
+ ULONG nWidth( rArea.GetSize().Width() );
+ ULONG nWidth14 = nWidth / 4;
+ ULONG nHeight14 = nHeight / 4;
+ ULONG nWidth34 = ( 3 * nWidth ) / 4;
+ ULONG nHeight34 = ( 3 * nHeight ) / 4;
+
+ USHORT i;
+ for ( i = 0; i < SPOTCOUNT; i++ )
+ {
+ // five spots are used
+ switch ( i )
+ {
+ case 0 :
+ {
+ // Center-Spot
+ aSpotPos[i] = rArea.Center();
+ }
+ break;
+
+ case 1 :
+ {
+ // TopLeft-Spot
+ aSpotPos[i] = rArea.TopLeft();
+ aSpotPos[i].X() += nWidth14;
+ aSpotPos[i].Y() += nHeight14;
+ }
+ break;
+
+ case 2 :
+ {
+ // TopRight-Spot
+ aSpotPos[i] = rArea.TopLeft();
+ aSpotPos[i].X() += nWidth34;
+ aSpotPos[i].Y() += nHeight14;
+ }
+ break;
+ case 3 :
+ {
+ // BottomLeft-Spot
+ aSpotPos[i] = rArea.TopLeft();
+ aSpotPos[i].X() += nWidth14;
+ aSpotPos[i].Y() += nHeight34;
+ }
+ break;
+ case 4 :
+ {
+ // BottomRight-Spot
+ aSpotPos[i] = rArea.TopLeft();
+ aSpotPos[i].X() += nWidth34;
+ aSpotPos[i].Y() += nHeight34;
+ }
+ break;
+
+ }
+
+ aSpotColor[i] = Color( COL_WHITE );
+ impGetSdrPageFillColor(rPage, aSpotPos[i], rTextEditPV, rTextEditPV.GetVisibleLayers(), aSpotColor[i], false);
+ }
+
+ USHORT aMatch[SPOTCOUNT];
+
+ for ( i = 0; i < SPOTCOUNT; i++ )
+ {
+ // were same spot colors found?
+ aMatch[i] = 0;
+ for ( USHORT j = 0; j < SPOTCOUNT; j++ )
+ {
+ if( j != i )
+ {
+ if( aSpotColor[i] == aSpotColor[j] )
+ {
+ aMatch[i]++;
+ }
+ }
+ }
+ }
+
+ // highest weight to center spot
+ aBackground = aSpotColor[0];
+
+ for ( USHORT nMatchCount = SPOTCOUNT - 1; nMatchCount > 1; nMatchCount-- )
+ {
+ // which spot color was found most?
+ for ( i = 0; i < SPOTCOUNT; i++ )
+ {
+ if( aMatch[i] == nMatchCount )
+ {
+ aBackground = aSpotColor[i];
+ nMatchCount = 1; // break outer for-loop
+ break;
+ }
+ }
+ }
+ }
+
+ return aBackground;
+ }
+} // end of anonymous namespace
+
+Color GetTextEditBackgroundColor(const SdrObjEditView& rView)
+{
+ svtools::ColorConfig aColorConfig;
+ Color aBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if(!rStyleSettings.GetHighContrastMode())
+ {
+ bool bFound(false);
+ SdrTextObj* pText = dynamic_cast< SdrTextObj * >(rView.GetTextEditObject());
+
+ if(pText && pText->IsClosedObj())
+ {
+ ::sdr::table::SdrTableObj* pTable = dynamic_cast< ::sdr::table::SdrTableObj * >( pText );
+
+ if( pTable )
+ bFound = GetDraftFillColor(pTable->GetActiveCellItemSet(), aBackground );
+
+ if( !bFound )
+ bFound=GetDraftFillColor(pText->GetMergedItemSet(), aBackground);
+ }
+
+ if(!bFound && pText)
+ {
+ SdrPageView* pTextEditPV = rView.GetTextEditPageView();
+
+ if(pTextEditPV)
+ {
+ Point aPvOfs(pText->GetTextEditOffset());
+ const SdrPage* pPg = pTextEditPV->GetPage();
+
+ if(pPg)
+ {
+ Rectangle aSnapRect( pText->GetSnapRect() );
+ aSnapRect.Move(aPvOfs.X(), aPvOfs.Y());
+
+ return impCalcBackgroundColor(aSnapRect, *pTextEditPV, *pPg);
+ }
+ }
+ }
+ }
+
+ return aBackground;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 49e3fc87ae68..30c3ff62531a 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -476,6 +476,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaChordAction& rAct)
bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrcPoly)
{
+ // #i102706# Do not merge closed polygons
+ if(rSrcPoly.isClosed())
+ {
+ return false;
+ }
+
// #i73407# reformulation to use new B2DPolygon classes
if(bLastObjWasLine && (aOldLineColor == aVD.GetLineColor()) && rSrcPoly.count())
{
@@ -489,6 +495,12 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc
bool bOk(false);
basegfx::B2DPolygon aDstPoly(pLastPoly->GetPathPoly().getB2DPolygon(0L));
+ // #i102706# Do not merge closed polygons
+ if(aDstPoly.isClosed())
+ {
+ return false;
+ }
+
if(aDstPoly.count())
{
const sal_uInt32 nMaxDstPnt(aDstPoly.count() - 1L);
diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
index 741cc2cc6e40..af38c34e0749 100644
--- a/svx/source/svdraw/svdfppt.cxx
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -39,6 +39,11 @@
#include <sot/storinfo.hxx>
#include <sot/stg.hxx>
#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/office/XAnnotation.hpp>
+#include <com/sun/star/office/XAnnotationAccess.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/geometry/RealPoint2D.hpp>
+#include <com/sun/star/util/DateTime.hpp>
#include <unotools/streamwrap.hxx>
@@ -120,6 +125,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <svx/writingmodeitem.hxx>
#include <vcl/print.hxx>
#include <svx/svxfont.hxx>
@@ -887,7 +893,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
// replacing the object which we will return with a SdrPageObj
SdrObject::Free( pRet );
- pRet = new SdrPageObj( rObjData.rBoundRect, pSdrModel->GetPage( nPageNum - 1 ) );
+ pRet = new SdrPageObj( rObjData.aBoundRect, pSdrModel->GetPage( nPageNum - 1 ) );
}
else
{
@@ -1155,7 +1161,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
pTObj->SetModel( pSdrModel );
SfxItemSet aSet( pSdrModel->GetItemPool() );
if ( !pRet )
- ((SdrEscherImport*)this)->ApplyAttributes( rSt, aSet, rObjData.eShapeType, rObjData.nSpFlags );
+ ((SdrEscherImport*)this)->ApplyAttributes( rSt, aSet, rObjData );
pTObj->SetMergedItemSet( aSet );
if ( pRet )
{
@@ -1278,7 +1284,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( nAngle )
{
double a = nAngle * nPi180;
- pTObj->NbcRotate( rObjData.rBoundRect.Center(), nAngle, sin( a ), cos( a ) );
+ pTObj->NbcRotate( rObjData.aBoundRect.Center(), nAngle, sin( a ), cos( a ) );
}
}
if ( pRet )
@@ -2562,9 +2568,11 @@ sal_Bool SdrPowerPointImport::SeekToContentOfProgTag( sal_Int32 nVersion, SvStre
sal_uInt32 nOldPos = rSt.Tell();
DffRecordHeader aProgTagsHd, aProgTagBinaryDataHd;
-
rSourceHd.SeekToContent( rSt );
- if ( SeekToRec( rSt, PPT_PST_ProgTags, rSourceHd.GetRecEndFilePos(), &aProgTagsHd ) )
+ sal_Bool bFound = rSourceHd.nRecType == PPT_PST_ProgTags;
+ if ( !bFound )
+ bFound = SeekToRec( rSt, PPT_PST_ProgTags, rSourceHd.GetRecEndFilePos(), &aProgTagsHd );
+ if ( bFound )
{
while( SeekToRec( rSt, PPT_PST_ProgBinaryTag, aProgTagsHd.GetRecEndFilePos(), &aProgTagBinaryDataHd ) )
{
@@ -2859,6 +2867,75 @@ SdrPage* SdrPowerPointImport::MakeBlancPage( sal_Bool bMaster ) const
return pRet;
}
+void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage, DffRecordHeader& rComment10Hd )
+{
+ rtl::OUString sAuthor;
+ rtl::OUString sText;
+ rtl::OUString sInitials;
+
+ sal_Int32 nIndex = 0;
+ util::DateTime aDateTime;
+ sal_Int32 nPosX = 0;
+ sal_Int32 nPosY = 0;
+
+ while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < rComment10Hd.GetRecEndFilePos() ) )
+ {
+ DffRecordHeader aCommentHd;
+ rStCtrl >> aCommentHd;
+ switch( aCommentHd.nRecType )
+ {
+ case PPT_PST_CString :
+ {
+ String aString;
+ SvxMSDffManager::MSDFFReadZString( rStCtrl, aString, aCommentHd.nRecLen, TRUE );
+ switch ( aCommentHd.nRecInstance )
+ {
+ case 0 : sAuthor = aString; break;
+ case 1 : sText = aString; break;
+ case 2 : sInitials = aString; break;
+ }
+ }
+ break;
+
+ case PPT_PST_CommentAtom10 :
+ {
+ rStCtrl >> nIndex
+ >> aDateTime.Year
+ >> aDateTime.Month
+ >> aDateTime.Day // DayOfWeek
+ >> aDateTime.Day
+ >> aDateTime.Hours
+ >> aDateTime.Minutes
+ >> aDateTime.Seconds
+ >> aDateTime.HundredthSeconds
+ >> nPosX
+ >> nPosY;
+
+ aDateTime.HundredthSeconds /= 10;
+ }
+ break;
+ }
+ aCommentHd.SeekToEndOfRecord( rStCtrl );
+ }
+ Point aPosition( nPosX, nPosY );
+ rMan.Scale( aPosition );
+
+ try
+ {
+ uno::Reference< office::XAnnotationAccess > xAnnotationAccess( pPage->getUnoPage(), UNO_QUERY_THROW );
+ uno::Reference< office::XAnnotation > xAnnotation( xAnnotationAccess->createAndInsertAnnotation() );
+ xAnnotation->setPosition( geometry::RealPoint2D( aPosition.X() / 100.0, aPosition.Y() / 100.0 ) );
+ xAnnotation->setAuthor( sAuthor );
+ xAnnotation->setDateTime( aDateTime );
+ uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
+ xText->setString( sText );
+ }
+ catch( uno::Exception& )
+ {
+
+ }
+}
+
// be sure not to import masterpages with this method
// be sure not to import masterpages with this method
@@ -2895,6 +2972,21 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
}
break;
+ case PPT_PST_ProgTags :
+ {
+ DffRecordHeader aContentDataHd;
+ if ( SeekToContentOfProgTag( 10, rStCtrl, aHd, aContentDataHd ) )
+ {
+ DffRecordHeader aComment10Hd;
+ while( ( rStCtrl.GetError() == 0 ) && SeekToRec( rStCtrl, PPT_PST_Comment10, aContentDataHd.GetRecEndFilePos(), &aComment10Hd ) )
+ {
+ ImportComment10( *this, rStCtrl, pRet, aComment10Hd );
+ aComment10Hd.SeekToEndOfRecord( rStCtrl );
+ }
+ }
+ }
+ break;
+
case PPT_PST_PPDrawing :
{
DffRecordHeader aPPDrawHd;
@@ -2911,7 +3003,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
{
case DFF_msofbtSpContainer :
{
- Rectangle aEmpty;
+ Rectangle aPageSize( Point(), pRet->GetSize() );
if ( rSlidePersist.aSlideAtom.nFlags & 4 ) // follow master background ?
{
if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
@@ -2933,7 +3025,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
sal_Bool bTemporary = ( rSlidePersist.aSlideAtom.nFlags & 2 ) != 0;
sal_uInt32 nPos = rStCtrl.Tell();
rStCtrl.Seek( pE->nBackgroundOffset );
- rSlidePersist.pBObj = ImportObj( rStCtrl, (void*)&aProcessData, aEmpty, aEmpty );
+ rSlidePersist.pBObj = ImportObj( rStCtrl, (void*)&aProcessData, aPageSize, aPageSize );
rSlidePersist.bBObjIsTemporary = bTemporary;
rStCtrl.Seek( nPos );
}
@@ -2950,7 +3042,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
if ( nSpFlags & SP_FBACKGROUND )
{
aEscherObjListHd.SeekToBegOfRecord( rStCtrl );
- rSlidePersist.pBObj = ImportObj( rStCtrl, (void*)&aProcessData, aEmpty, aEmpty );
+ rSlidePersist.pBObj = ImportObj( rStCtrl, (void*)&aProcessData, aPageSize, aPageSize );
rSlidePersist.bBObjIsTemporary = sal_False;
}
}
@@ -3150,7 +3242,8 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) );
UINT32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
pSet = new SfxItemSet( pSdrModel->GetItemPool() );
- ApplyAttributes( rStCtrl, *pSet );
+ DffObjData aObjData( aEscherObjectHd, Rectangle( 0, 0, 28000, 21000 ), 0 );
+ ApplyAttributes( rStCtrl, *pSet, aObjData );
Color aColor( MSO_CLR_ToColor( nColor ) );
pSet->Put( XFillColorItem( String(), aColor ) );
}
@@ -3818,21 +3911,20 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOfs, nBulletOfs, nDestinationInstance );
if ( nIsBullet )
- {
rNumberFormat.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
- UINT32 nFontHeight = 24;
- PPTPortionObj* pPtr = pParaObj->First();
- if ( pPtr )
- pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
+ UINT32 nFontHeight = 24;
+ PPTPortionObj* pPtr = pParaObj->First();
+ if ( pPtr )
+ pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance );
+ if ( nIsBullet )
nHardCount += ImplGetExtNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth,
pParaObj->mnInstance, nDestinationInstance, rStartNumbering, nFontHeight, pParaObj );
- if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP )
- pParaObj->UpdateBulletRelSize( nBulletHeight );
- if ( nHardCount )
- ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
- }
+ if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP )
+ pParaObj->UpdateBulletRelSize( nBulletHeight );
+ if ( nHardCount )
+ ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
if ( nHardCount )
{
@@ -3846,7 +3938,6 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_LOWER_LETTER_N :
{
- PPTPortionObj* pPtr = pParaObj->First();
if ( pPtr )
{
sal_uInt32 nFont;
@@ -3881,7 +3972,7 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager,
aFont.SetFamily( pAtom->eFamily );
aFont.SetPitch( pAtom->ePitch );
}
- Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nBulletColor ) );
aFont.SetColor( aCol );
sal_uInt16 nBuChar = (sal_uInt16)nBulletChar;
@@ -4972,6 +5063,246 @@ void StyleTextProp9::Read( SvStream& rIn )
PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
PPTTextRulerInterpreter& rRuler, const DffRecordHeader& rExtParaHd, sal_uInt32 nInstance )
{
+ Init(rIn, rMan, rTextHeader, rRuler, rExtParaHd, nInstance);
+}
+
+void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
+ const String& aString, PPTTextRulerInterpreter& rRuler,
+ sal_uInt32& nCharCount, sal_Bool& bTextPropAtom )
+{
+ sal_uInt32 nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
+ sal_uInt32 nCharAnzRead = 0;
+ sal_uInt16 nDummy16;
+
+ sal_uInt16 nStringLen = aString.Len();
+
+ DffRecordHeader aTextHd2;
+ rTextHeader.SeekToContent( rIn );
+ if ( rMan.SeekToRec( rIn, PPT_PST_StyleTextPropAtom, rTextHeader.GetRecEndFilePos(), &aTextHd2 ) )
+ bTextPropAtom = sal_True;
+ while ( nCharAnzRead <= nStringLen )
+ {
+ PPTParaPropSet aParaPropSet;
+ ImplPPTParaPropSet& aSet = *aParaPropSet.pParaSet;
+ if ( bTextPropAtom )
+ {
+ rIn >> nCharCount
+ >> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe
+
+ nCharCount--;
+
+ rIn >> nMask;
+ aSet.mnAttrSet = nMask & 0x207df7;
+ sal_uInt16 nBulFlg = 0;
+ if ( nMask & 0xF )
+ rIn >> nBulFlg; // Bullet-HardAttr-Flags
+ aSet.mpArry[ PPT_ParaAttr_BulletOn ] = ( nBulFlg & 1 ) ? 1 : 0;
+ aSet.mpArry[ PPT_ParaAttr_BuHardFont ] = ( nBulFlg & 2 ) ? 1 : 0;
+ aSet.mpArry[ PPT_ParaAttr_BuHardColor ] = ( nBulFlg & 4 ) ? 1 : 0;
+
+ if ( nMask & 0x0080 ) // buChar
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletChar ];
+ if ( nMask & 0x0010 ) // buTypeface
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletFont ];
+ if ( nMask & 0x0040 ) // buSize
+ {
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
+ if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
+ && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
+ aSet.mnAttrSet ^= 0x40;
+ }
+ if ( nMask & 0x0020 ) // buColor
+ {
+ sal_uInt32 nVal32, nHiByte;
+ rIn >> nVal32;
+ nHiByte = nVal32 >> 24;
+ if ( nHiByte <= 8 )
+ nVal32 = nHiByte | PPT_COLSCHEME;
+ aSet.mnBulletColor = nVal32;
+ }
+ if ( nMask & 0x0800 ) // pfAlignment
+ {
+ rIn >> nDummy16;
+ aSet.mpArry[ PPT_ParaAttr_Adjust ] = nDummy16 & 3;
+ }
+ if ( nMask & 0x1000 ) // pfLineSpacing
+ rIn >> aSet.mpArry[ PPT_ParaAttr_LineFeed ];
+ if ( nMask & 0x2000 ) // pfSpaceBefore
+ rIn >> aSet.mpArry[ PPT_ParaAttr_UpperDist ];
+ if ( nMask & 0x4000 ) // pfSpaceAfter
+ rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
+ if ( nMask & 0x100 ) // pfLeftMargin
+ rIn >> nDummy16;
+ if ( nMask & 0x400 ) // pfIndent
+ rIn >> nDummy16;
+ if ( nMask & 0x8000 ) // pfDefaultTabSize
+ rIn >> nDummy16;
+ if ( nMask & 0x100000 ) // pfTabStops
+ {
+ sal_uInt16 i, nDistance, nAlignment, nNumberOfTabStops = 0;
+ rIn >> nNumberOfTabStops;
+ for ( i = 0; i < nNumberOfTabStops; i++ )
+ {
+ rIn >> nDistance
+ >> nAlignment;
+ }
+ }
+ if ( nMask & 0x10000 ) // pfBaseLine
+ rIn >> nDummy16;
+ if ( nMask & 0xe0000 ) // pfCharWrap, pfWordWrap, pfOverflow
+ {
+ rIn >> nDummy16;
+ if ( nMask & 0x20000 )
+ aSet.mpArry[ PPT_ParaAttr_AsianLB_1 ] = nDummy16 & 1;
+ if ( nMask & 0x40000 )
+ aSet.mpArry[ PPT_ParaAttr_AsianLB_2 ] = ( nDummy16 >> 1 ) & 1;
+ if ( nMask & 0x80000 )
+ aSet.mpArry[ PPT_ParaAttr_AsianLB_3 ] = ( nDummy16 >> 2 ) & 1;
+ aSet.mnAttrSet |= ( ( nMask >> 17 ) & 7 ) << PPT_ParaAttr_AsianLB_1;
+ }
+ if ( nMask & 0x200000 ) // pfTextDirection
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BiDi ];
+ }
+ else
+ nCharCount = nStringLen;
+
+ if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
+ if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
+ if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
+
+ if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharAnzRead + nCharCount ) )
+ {
+ bTextPropAtom = sal_False;
+ nCharCount = nStringLen - nCharAnzRead;
+ // please fix the right hand side of
+ // PPTParaPropSet& PPTParaPropSet::operator=(PPTParaPropSet&),
+ // it should be a const reference
+ PPTParaPropSet aTmpPPTParaPropSet;
+ aParaPropSet = aTmpPPTParaPropSet;
+ DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the paragraph attributes" );
+ }
+ PPTParaPropSet* pPara = new PPTParaPropSet( aParaPropSet );
+ pPara->mnOriginalTextPos = nCharAnzRead;
+ aParaPropList.Insert( pPara, LIST_APPEND );
+ if ( nCharCount )
+ {
+ sal_uInt32 nCount;
+ const sal_Unicode* pDat = aString.GetBuffer() + nCharAnzRead;
+ for ( nCount = 0; nCount < nCharCount; nCount++ )
+ {
+ if ( pDat[ nCount ] == 0xd )
+ {
+ pPara = new PPTParaPropSet( aParaPropSet );
+ pPara->mnOriginalTextPos = nCharAnzRead + nCount + 1;
+ aParaPropList.Insert( pPara, LIST_APPEND );
+ }
+ }
+ }
+ nCharAnzRead += nCharCount + 1;
+ }
+}
+
+void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const String& aString,
+ sal_uInt32& nCharCount, sal_uInt32 nCharAnzRead,
+ sal_Bool& bTextPropAtom, sal_uInt32 nExtParaPos,
+ const std::vector< StyleTextProp9 >& aStyleTextProp9,
+ sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip,
+ sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme )
+{
+ sal_uInt32 nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
+ sal_uInt16 nDummy16;
+ sal_Int32 nCharsToRead;
+ sal_uInt32 nExtParaNibble = 0;
+
+ sal_uInt16 nStringLen = aString.Len();
+
+ rIn >> nDummy16;
+ nCharCount = nDummy16;
+ rIn >> nDummy16;
+ nCharsToRead = nStringLen - ( nCharAnzRead + nCharCount );
+ if ( nCharsToRead < 0 )
+ {
+ nCharCount = nStringLen - nCharAnzRead;
+ if ( nCharsToRead < -1 )
+ {
+ bTextPropAtom = sal_False;
+ DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the character attributes" );
+ }
+ }
+ ImplPPTCharPropSet& aSet = *aCharPropSet.pCharSet;
+
+ // character attributes
+ rIn >> nMask;
+ if ( (sal_uInt16)nMask )
+ {
+ aSet.mnAttrSet |= (sal_uInt16)nMask;
+ rIn >> aSet.mnFlags;
+ }
+ if ( nMask & 0x10000 ) // cfTypeface
+ {
+ rIn >> aSet.mnFont;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_Font;
+ }
+ if ( nMask & 0x200000 ) // cfFEOldTypeface
+ {
+ rIn >> aSet.mnAsianOrComplexFont;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_AsianOrComplexFont;
+ }
+ if ( nMask & 0x400000 ) // cfANSITypeface
+ {
+ rIn >> aSet.mnANSITypeface;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_ANSITypeface;
+ }
+ if ( nMask & 0x800000 ) // cfSymbolTypeface
+ {
+ rIn >> aSet.mnSymbolFont;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_Symbol;
+ }
+ if ( nMask & 0x20000 ) // cfSize
+ {
+ rIn >> aSet.mnFontHeight;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_FontHeight;
+ }
+ if ( nMask & 0x40000 ) // cfColor
+ {
+ sal_uInt32 nVal;
+ rIn >> nVal;
+ if ( !( nVal & 0xff000000 ) )
+ nVal = PPT_COLSCHEME_HINTERGRUND;
+ aSet.mnColor = nVal;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_FontColor;
+ }
+ if ( nMask & 0x80000 ) // cfPosition
+ {
+ rIn >> aSet.mnEscapement;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_Escapement;
+ }
+ if ( nExtParaPos )
+ {
+ sal_uInt32 nExtBuInd = nMask & 0x3c00;
+ if ( nExtBuInd )
+ nExtBuInd = ( aSet.mnFlags & 0x3c00 ) >> 10;
+ if ( nExtBuInd < aStyleTextProp9.size() )
+ {
+ if ( nExtParaNibble && ( ( nExtBuInd + nExtParaNibble ) < aStyleTextProp9.size() ) )
+ nExtBuInd += nExtParaNibble;
+
+ nExtParaFlags = aStyleTextProp9[ nExtBuInd ].mnExtParagraphMask;
+ nBuBlip = aStyleTextProp9[ nExtBuInd ].mnBuBlip;
+ nHasAnm = aStyleTextProp9[ nExtBuInd ].mnHasAnm;
+ nAnmScheme = aStyleTextProp9[ nExtBuInd ].mnAnmScheme;
+ }
+ if ( ( nExtBuInd & 0xf ) == 0xf )
+ nExtParaNibble += 16;
+ }
+}
+
+void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
+ PPTTextRulerInterpreter& rRuler, const DffRecordHeader& rExtParaHd, sal_uInt32 nInstance )
+{
sal_uInt32 nMerk = rIn.Tell();
sal_uInt32 nExtParaPos = ( rExtParaHd.nRecType == PPT_PST_ExtendedParagraphAtom ) ? rExtParaHd.nFilePos + 8 : 0;
@@ -5031,7 +5362,7 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
aString = String( pBuf, (sal_uInt16)i );
delete[] pBuf;
}
- else
+ else if( aTextHd.nRecType == PPT_PST_TextBytesAtom )
{
sal_Char *pBuf = new sal_Char[ nMaxLen + 1 ];
pBuf[ nMaxLen ] = 0;
@@ -5056,148 +5387,44 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
aString = String( pBuf, nLen, RTL_TEXTENCODING_MS_1252 );
delete[] pBuf;
}
- if ( aString.Len() )
+ else
{
- sal_uInt32 nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
- sal_uInt32 nCharCount, nCharAnzRead = 0;
- sal_Int32 nCharsToRead;
- sal_uInt16 nDummy16;
+ // no chars, but potentially char/para props?
+ sal_uInt32 nCharCount;
sal_Bool bTextPropAtom = sal_False;
+ ReadParaProps( rIn, rMan, rTextHeader, aString, rRuler, nCharCount, bTextPropAtom );
- sal_uInt16 nStringLen = aString.Len();
-
- DffRecordHeader aTextHd2;
- rTextHeader.SeekToContent( rIn );
- if ( rMan.SeekToRec( rIn, PPT_PST_StyleTextPropAtom, rTextHeader.GetRecEndFilePos(), &aTextHd2 ) )
- bTextPropAtom = sal_True;
- while ( nCharAnzRead <= nStringLen )
+ if ( bTextPropAtom )
{
- PPTParaPropSet aParaPropSet;
- ImplPPTParaPropSet& aSet = *aParaPropSet.pParaSet;
- if ( bTextPropAtom )
- {
- rIn >> nCharCount
- >> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe
-
- nCharCount--;
-
- rIn >> nMask;
- aSet.mnAttrSet = nMask & 0x207df7;
- sal_uInt16 nBulFlg = 0;
- if ( nMask & 0xF )
- rIn >> nBulFlg; // Bullet-HardAttr-Flags
- aSet.mpArry[ PPT_ParaAttr_BulletOn ] = ( nBulFlg & 1 ) ? 1 : 0;
- aSet.mpArry[ PPT_ParaAttr_BuHardFont ] = ( nBulFlg & 2 ) ? 1 : 0;
- aSet.mpArry[ PPT_ParaAttr_BuHardColor ] = ( nBulFlg & 4 ) ? 1 : 0;
-
- if ( nMask & 0x0080 ) // buChar
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletChar ];
- if ( nMask & 0x0010 ) // buTypeface
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletFont ];
- if ( nMask & 0x0040 ) // buSize
- {
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
- if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
- && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
- aSet.mnAttrSet ^= 0x40;
- }
- if ( nMask & 0x0020 ) // buColor
- {
- sal_uInt32 nVal32, nHiByte;
- rIn >> nVal32;
- nHiByte = nVal32 >> 24;
- if ( nHiByte <= 8 )
- nVal32 = nHiByte | PPT_COLSCHEME;
- aSet.mnBulletColor = nVal32;
- }
- if ( nMask & 0x0800 ) // pfAlignment
- {
- rIn >> nDummy16;
- aSet.mpArry[ PPT_ParaAttr_Adjust ] = nDummy16 & 3;
- }
- if ( nMask & 0x1000 ) // pfLineSpacing
- rIn >> aSet.mpArry[ PPT_ParaAttr_LineFeed ];
- if ( nMask & 0x2000 ) // pfSpaceBefore
- rIn >> aSet.mpArry[ PPT_ParaAttr_UpperDist ];
- if ( nMask & 0x4000 ) // pfSpaceAfter
- rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
- if ( nMask & 0x100 ) // pfLeftMargin
- rIn >> nDummy16;
- if ( nMask & 0x400 ) // pfIndent
- rIn >> nDummy16;
- if ( nMask & 0x8000 ) // pfDefaultTabSize
- rIn >> nDummy16;
- if ( nMask & 0x100000 ) // pfTabStops
- {
- sal_uInt16 i, nDistance, nAlignment, nNumberOfTabStops = 0;
- rIn >> nNumberOfTabStops;
- for ( i = 0; i < nNumberOfTabStops; i++ )
- {
- rIn >> nDistance
- >> nAlignment;
- }
- }
- if ( nMask & 0x10000 ) // pfBaseLine
- rIn >> nDummy16;
- if ( nMask & 0xe0000 ) // pfCharWrap, pfWordWrap, pfOverflow
- {
- rIn >> nDummy16;
- if ( nMask & 0x20000 )
- aSet.mpArry[ PPT_ParaAttr_AsianLB_1 ] = nDummy16 & 1;
- if ( nMask & 0x40000 )
- aSet.mpArry[ PPT_ParaAttr_AsianLB_2 ] = ( nDummy16 >> 1 ) & 1;
- if ( nMask & 0x80000 )
- aSet.mpArry[ PPT_ParaAttr_AsianLB_3 ] = ( nDummy16 >> 2 ) & 1;
- aSet.mnAttrSet |= ( ( nMask >> 17 ) & 7 ) << PPT_ParaAttr_AsianLB_1;
- }
- if ( nMask & 0x200000 ) // pfTextDirection
- rIn >> aSet.mpArry[ PPT_ParaAttr_BiDi ];
- }
- else
- nCharCount = nStringLen;
+ // yeah, StyleTextProp is there, read it all & push to
+ // aParaPropList
+ PPTCharPropSet aCharPropSet(0);
+ aCharPropSet.mnOriginalTextPos = 0;
- if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
- aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
- if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
- aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
- if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
- aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
-
- if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharAnzRead + nCharCount ) )
- {
- bTextPropAtom = sal_False;
- nCharCount = nStringLen - nCharAnzRead;
- // please fix the right hand side of
- // PPTParaPropSet& PPTParaPropSet::operator=(PPTParaPropSet&),
- // it should be a const reference
- PPTParaPropSet aTmpPPTParaPropSet;
- aParaPropSet = aTmpPPTParaPropSet;
- DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the paragraph attributes" );
- }
- PPTParaPropSet* pPara = new PPTParaPropSet( aParaPropSet );
- pPara->mnOriginalTextPos = nCharAnzRead;
- aParaPropList.Insert( pPara, LIST_APPEND );
- if ( nCharCount )
- {
- sal_uInt32 nCount;
- const sal_Unicode* pDat = aString.GetBuffer() + nCharAnzRead;
- for ( nCount = 0; nCount < nCharCount; nCount++ )
- {
- if ( pDat[ nCount ] == 0xd )
- {
- pPara = new PPTParaPropSet( aParaPropSet );
- pPara->mnOriginalTextPos = nCharAnzRead + nCount + 1;
- aParaPropList.Insert( pPara, LIST_APPEND );
- }
- }
- }
- nCharAnzRead += nCharCount + 1;
+ sal_uInt32 nCharAnzRead = 0;
+ sal_uInt32 nExtParaFlags = 0, nAnmScheme = 0;
+ sal_uInt16 nBuBlip = 0xffff, nHasAnm = 0;
+ ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
+ bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
+ nBuBlip, nHasAnm, nAnmScheme );
+
+ aCharPropList.Insert(
+ new PPTCharPropSet( aCharPropSet, 0 ), LIST_APPEND );
}
+ }
+
+ if ( aString.Len() )
+ {
+ sal_uInt32 nCharCount;
+ sal_Bool bTextPropAtom = sal_False;
+
+ ReadParaProps( rIn, rMan, rTextHeader, aString, rRuler, nCharCount, bTextPropAtom );
sal_Bool bEmptyParaPossible = sal_True;
- sal_uInt32 nCurrentPara = nCharAnzRead = 0;
+ sal_uInt32 nCharAnzRead = 0;
+ sal_uInt32 nCurrentPara = 0;
sal_uInt32 nCurrentSpecMarker = (sal_uInt32)(sal_uIntPtr)aSpecMarkerList.First();
- sal_uInt32 nExtParaNibble = 0;
+ sal_uInt16 nStringLen = aString.Len();
while ( nCharAnzRead < nStringLen )
{
@@ -5206,87 +5433,9 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
PPTCharPropSet aCharPropSet( nCurrentPara );
if ( bTextPropAtom )
- {
- rIn >> nDummy16;
- nCharCount = nDummy16;
- rIn >> nDummy16;
- nCharsToRead = nStringLen - ( nCharAnzRead + nCharCount );
- if ( nCharsToRead < 0 )
- {
- nCharCount = nStringLen - nCharAnzRead;
- if ( nCharsToRead < -1 )
- {
- bTextPropAtom = sal_False;
- DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the character attributes" );
- }
- }
- ImplPPTCharPropSet& aSet = *aCharPropSet.pCharSet;
-
- // character attributes
- rIn >> nMask;
- if ( (sal_uInt16)nMask )
- {
- aSet.mnAttrSet |= (sal_uInt16)nMask;
- rIn >> aSet.mnFlags;
- }
- if ( nMask & 0x10000 ) // cfTypeface
- {
- rIn >> aSet.mnFont;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_Font;
- }
- if ( nMask & 0x200000 ) // cfFEOldTypeface
- {
- rIn >> aSet.mnAsianOrComplexFont;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_AsianOrComplexFont;
- }
- if ( nMask & 0x400000 ) // cfANSITypeface
- {
- rIn >> aSet.mnANSITypeface;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_ANSITypeface;
- }
- if ( nMask & 0x800000 ) // cfSymbolTypeface
- {
- rIn >> aSet.mnSymbolFont;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_Symbol;
- }
- if ( nMask & 0x20000 ) // cfSize
- {
- rIn >> aSet.mnFontHeight;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_FontHeight;
- }
- if ( nMask & 0x40000 ) // cfColor
- {
- sal_uInt32 nVal;
- rIn >> nVal;
- if ( !( nVal & 0xff000000 ) )
- nVal = PPT_COLSCHEME_HINTERGRUND;
- aSet.mnColor = nVal;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_FontColor;
- }
- if ( nMask & 0x80000 ) // cfPosition
- {
- rIn >> aSet.mnEscapement;
- aSet.mnAttrSet |= 1 << PPT_CharAttr_Escapement;
- }
- if ( nExtParaPos )
- {
- sal_uInt32 nExtBuInd = nMask & 0x3c00;
- if ( nExtBuInd )
- nExtBuInd = ( aSet.mnFlags & 0x3c00 ) >> 10;
- if ( nExtBuInd < aStyleTextProp9.size() )
- {
- if ( nExtParaNibble && ( ( nExtBuInd + nExtParaNibble ) < aStyleTextProp9.size() ) )
- nExtBuInd += nExtParaNibble;
-
- nExtParaFlags = aStyleTextProp9[ nExtBuInd ].mnExtParagraphMask;
- nBuBlip = aStyleTextProp9[ nExtBuInd ].mnBuBlip;
- nHasAnm = aStyleTextProp9[ nExtBuInd ].mnHasAnm;
- nAnmScheme = aStyleTextProp9[ nExtBuInd ].mnAnmScheme;
- }
- if ( ( nExtBuInd & 0xf ) == 0xf )
- nExtParaNibble += 16;
- }
- }
+ ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
+ bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
+ nBuBlip, nHasAnm, nAnmScheme );
else
nCharCount = nStringLen;
@@ -5507,11 +5656,6 @@ BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinat
if ( nRetValue != nTmp )
bIsHardAttribute = 1;
}
- if ( nRetValue && ( nDestinationInstance == TSS_TYPE_TEXT_IN_SHAPE ) )
- {
- nRetValue = 0; // no inheritance for standard textobjects
- bIsHardAttribute = 1; // this attribute must be hard formatted
- }
}
break;
case PPT_CharAttr_Font :
@@ -5742,14 +5886,14 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
{
if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nDestinationInstance ) ) // Textfarbe (4Byte-Arg)
{
- Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
if ( nDestinationInstance == 0xffffffff )
mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol;
}
else if ( nVal & 0x0f000000 ) // this is not a hard attribute, but maybe the page has a different colerscheme,
{ // so that in this case we must use a hard color attribute
- Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
Color& aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet;
if ( aColorInSheet != aCol )
rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
@@ -6156,10 +6300,10 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
if ( pRule )
{
pRule->SetLevel( pParaSet->mnDepth, aNumberFormat );
- if ( nDestinationInstance == 0xffffffff )
+ sal_uInt16 i, n;
+ for ( i = 0; i < pRule->GetLevelCount(); i++ )
{
- sal_uInt16 i, n;
- for ( i = 0; i < pRule->GetLevelCount(); i++ )
+ if ( i != pParaSet->mnDepth )
{
n = i > 4 ? 4 : i;
@@ -6171,7 +6315,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
nColor = rParaLevel.mnBulletColor;
else
nColor = rCharLevel.mnFontColor;
- aNumberFormat2.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) );
+ aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
pRule->SetLevel( i, aNumberFormat2 );
}
}
@@ -6631,7 +6775,12 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
mpImplTextObj->mnInstance = nInstance;
UINT32 nFilePos = rIn.Tell();
- if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom, PPT_PST_TextCharsAtom, aClientTextBoxHd.GetRecEndFilePos() ) )
+ if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom,
+ PPT_PST_TextCharsAtom,
+ aClientTextBoxHd.GetRecEndFilePos() )
+ || rSdrPowerPointImport.SeekToRec( rIn,
+ PPT_PST_StyleTextPropAtom,
+ aClientTextBoxHd.GetRecEndFilePos() ) )
{
PPTTextRulerInterpreter aTextRulerInterpreter( nTextRulerAtomOfs, rSdrPowerPointImport,
aClientTextBoxHd, rIn );
@@ -7365,6 +7514,15 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue( sLeftBorder, Any( nLeftDist ) );
xPropSet->setPropertyValue( sBottomBorder, Any( nLowerDist ) );
+ static const rtl::OUString sTextVerticalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextVerticalAdjust" ) );
+ const SdrTextVertAdjust eTextVertAdjust(((const SdrTextVertAdjustItem&)pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
+ drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
+ if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER )
+ eVA = drawing::TextVerticalAdjust_CENTER;
+ else if ( eTextVertAdjust == SDRTEXTVERTADJUST_BOTTOM )
+ eVA = drawing::TextVerticalAdjust_BOTTOM;
+ xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
+
SfxItemSet aSet( pObj->GetMergedItemSet() );
XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE );
@@ -7453,8 +7611,8 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
{
Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor();
- aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() );
- aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
+ aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
aBorderLine.LineDistance = 0;
}
break;
@@ -7537,6 +7695,11 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
CreateTableRows( xColumnRowRange->getRows(), aRows, pGroup->GetSnapRect().Bottom() );
CreateTableColumns( xColumnRowRange->getColumns(), aColumns, pGroup->GetSnapRect().Right() );
+ sal_Int32 nCellCount = aRows.size() * aColumns.size();
+ sal_Int32 *pMergedCellIndexTable = new sal_Int32[ nCellCount ];
+ for ( sal_Int32 i = 0; i < nCellCount; i++ )
+ pMergedCellIndexTable[ i ] = i;
+
aGroupIter.Reset();
while( aGroupIter.IsMore() )
{
@@ -7557,7 +7720,16 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
ApplyCellAttributes( pObj, xCell );
if ( ( nRowCount > 1 ) || ( nColumnCount > 1 ) ) // cell merging
+ {
MergeCells( xTable, nColumn, nRow, nColumnCount, nRowCount );
+ for ( sal_Int32 nRowIter = 0; nRowIter < nRowCount; nRowIter++ )
+ {
+ for ( sal_Int32 nColumnIter = 0; nColumnIter < nColumnCount; nColumnIter++ )
+ { // now set the correct index for the merged cell
+ pMergedCellIndexTable[ ( ( nRow + nRowIter ) * aColumns.size() ) + nColumn + nColumnIter ] = nTableIndex;
+ }
+ }
+ }
// applying text
OutlinerParaObject* pParaObject = pObj->GetOutlinerParaObject();
@@ -7569,13 +7741,30 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
}
}
}
- else
+ }
+ aGroupIter.Reset();
+ while( aGroupIter.IsMore() )
+ {
+ SdrObject* pObj( aGroupIter.Next() );
+ if ( IsLine( pObj ) )
{
std::vector< sal_Int32 > vPositions; // containing cell indexes + cell position
GetLinePositions( pObj, aRows, aColumns, vPositions, pGroup->GetSnapRect() );
+
+ // correcting merged cell position
+ std::vector< sal_Int32 >::iterator aIter( vPositions.begin() );
+ while( aIter != vPositions.end() )
+ {
+ sal_Int32 nOldPosition = *aIter & 0xffff;
+ sal_Int32 nOldFlags = *aIter & 0xffff0000;
+ sal_Int32 nNewPosition = pMergedCellIndexTable[ nOldPosition ] | nOldFlags;
+ *aIter++ = nNewPosition;
+ }
ApplyCellLineAttributes( pObj, xTable, vPositions, aColumns.size() );
}
}
+ delete[] pMergedCellIndexTable;
+
// we are replacing the whole group object by a single table object, so
// possibly connections to the group object have to be removed.
if ( pSolverContainer )
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index dfc4fe171850..ac33106d3555 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -76,12 +76,17 @@ void SdrGlueEditView::ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, BOOL bConst, co
} else {
pGPL=pObj->ForceGluePointList();
}
- if (pGPL!=NULL) {
- if (!bConst) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
- for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ if (pGPL!=NULL)
+ {
+ if(!bConst && IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++)
+ {
USHORT nPtId=pPts->GetObject(nPtNum);
USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
- if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND)
+ {
SdrGluePoint& rGP=(*pGPL)[nGlueIdx];
(*pDoFunc)(rGP,pObj,p1,p2,p3,p4,p5);
}
@@ -240,21 +245,31 @@ void SdrGlueEditView::DeleteMarkedGluePoints()
{
BrkAction();
ForceUndirtyMrkPnt();
- BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_DELETE);
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_DELETE);
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
- if (nPtAnz!=0) {
+ if (nPtAnz!=0)
+ {
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- if (pGPL!=NULL) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
- for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ if (pGPL!=NULL)
+ {
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++)
+ {
USHORT nPtId=pPts->GetObject(nPtNum);
USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
- if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND)
+ {
pGPL->Delete(nGlueIdx);
}
}
@@ -263,29 +278,41 @@ void SdrGlueEditView::DeleteMarkedGluePoints()
}
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
UnmarkAllGluePoints();
- if (nMarkAnz!=0) pMod->SetChanged();
+ if (nMarkAnz!=0)
+ pMod->SetChanged();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrGlueEditView::ImpCopyMarkedGluePoints()
{
- BegUndo();
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo();
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
SdrUShortCont* pPts=pM->GetMarkedGluePoints();
SdrGluePointList* pGPL=pObj->ForceGluePointList();
ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
- if (nPtAnz!=0 && pGPL!=NULL) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
- for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ if (nPtAnz!=0 && pGPL!=NULL)
+ {
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++)
+ {
USHORT nPtId=pPts->GetObject(nPtNum);
USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
- if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND)
+ {
SdrGluePoint aNewGP((*pGPL)[nGlueIdx]); // GluePoint klonen
USHORT nNewIdx=pGPL->Insert(aNewGP); // und einfuegen
USHORT nNewId=(*pGPL)[nNewIdx].GetId(); // Id des neuen GluePoints ermitteln
@@ -294,8 +321,11 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints()
}
}
}
- EndUndo();
- if (nMarkAnz!=0) pMod->SetChanged();
+ if( bUndo )
+ EndUndo();
+
+ if (nMarkAnz!=0)
+ pMod->SetChanged();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -310,8 +340,11 @@ void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const vo
ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
if (nPtAnz!=0) {
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- if (pGPL!=NULL) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+ if (pGPL!=NULL)
+ {
+ if( IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+
for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
USHORT nPtId=pPts->GetObject(nPtNum);
USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index c338d9845c21..936c073f6e84 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -34,7 +34,6 @@
#include <algorithm>
#include <svx/svdhdl.hxx>
-#include "svdtouch.hxx"
#include <svx/svdpagv.hxx>
#include <svx/svdetc.hxx>
#include <svx/svdmrkv.hxx>
@@ -62,14 +61,14 @@
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/sdr/overlay/overlayanimatedbitmapex.hxx>
#include <svx/sdr/overlay/overlaybitmapex.hxx>
-#include <svx/sdr/overlay/overlaybitmap.hxx>
-#include <svx/sdr/overlay/overlaylinestriped.hxx>
+#include <svx/sdr/overlay/overlayline.hxx>
#include <svx/sdr/overlay/overlaytriangle.hxx>
#include <svx/sdr/overlay/overlayhatchrect.hxx>
#include <svx/sdrpagewindow.hxx>
#include <sdrpaintwindow.hxx>
#include <vcl/svapp.hxx>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
+#include <vcl/lazydelete.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
// #i15222#
@@ -83,36 +82,63 @@
class SdrHdlBitmapSet
{
// the bitmap holding all infos
- BitmapEx maMarkersBitmap;
+ BitmapEx maMarkersBitmap;
+
+ // the cropped Bitmaps for reusage
+ ::std::vector< BitmapEx > maRealMarkers;
+
+ // elpers
+ BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle);
public:
SdrHdlBitmapSet(UINT16 nResId);
~SdrHdlBitmapSet();
- BitmapEx GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nInd=0);
+ const BitmapEx& GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nInd=0);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
+#define KIND_COUNT (14)
+#define INDEX_COUNT (6)
+#define INDIVIDUAL_COUNT (4)
SdrHdlBitmapSet::SdrHdlBitmapSet(UINT16 nResId)
+: maMarkersBitmap(),
+ // 14 kinds (BitmapMarkerKind) use index [0..5], 4 extra
+ maRealMarkers((KIND_COUNT * INDEX_COUNT) + INDIVIDUAL_COUNT)
{
// #101928# change color used for transparent parts to 0x00ff00ff (ImageList standard)
- Color aColTransparent(0x00ff00ff);
- Bitmap aBitmap(ResId(nResId, *ImpGetResMgr()));
- maMarkersBitmap = BitmapEx(aBitmap, aColTransparent);
+ const Color aColTransparent(0x00ff00ff);
+ const Bitmap aBitmap(ResId(nResId, *ImpGetResMgr()));
+ const Bitmap aMask(aBitmap.CreateMask(aColTransparent));
+
+ // create a real BitmapEx with an AlphaMask
+ maMarkersBitmap = BitmapEx(aBitmap, aMask);
+ // maMarkersBitmap = BitmapEx(aBitmap, aColTransparent);
}
SdrHdlBitmapSet::~SdrHdlBitmapSet()
{
}
-// #i15222#
+BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle)
+{
+ BitmapEx& rTargetBitmap = maRealMarkers[nIndex];
+
+ if(rTargetBitmap.IsEmpty())
+ {
+ rTargetBitmap = maMarkersBitmap;
+ rTargetBitmap.Crop(rRectangle);
+ }
+
+ return rTargetBitmap;
+}
+
// change getting of bitmap to use the big ressource bitmap
-BitmapEx SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nInd)
+const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nInd)
{
// fill in size and source position in maMarkersBitmap
const sal_uInt16 nYPos(nInd * 11);
- Rectangle aSourceRect;
switch(eKindOfMarker)
{
@@ -123,141 +149,150 @@ BitmapEx SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nIn
}
case Rect_7x7:
{
- aSourceRect = Rectangle(Point(0, nYPos), Size(7, 7));
- break;
+ return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, Rectangle(Point(0, nYPos), Size(7, 7)));
}
case Rect_9x9:
{
- aSourceRect = Rectangle(Point(7, nYPos), Size(9, 9));
- break;
+ return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, Rectangle(Point(7, nYPos), Size(9, 9)));
}
case Rect_11x11:
{
- aSourceRect = Rectangle(Point(16, nYPos), Size(11, 11));
- break;
+ return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, Rectangle(Point(16, nYPos), Size(11, 11)));
}
case Rect_13x13:
{
+ const sal_uInt16 nIndex((3 * INDEX_COUNT) + nInd);
+
switch(nInd)
{
- case 0: aSourceRect = Rectangle(Point(72, 66), Size(13, 13)); break;
- case 1: aSourceRect = Rectangle(Point(85, 66), Size(13, 13)); break;
- case 2: aSourceRect = Rectangle(Point(72, 78), Size(13, 13)); break;
- case 3: aSourceRect = Rectangle(Point(85, 78), Size(13, 13)); break;
- case 4: aSourceRect = Rectangle(Point(98, 78), Size(13, 13)); break;
- case 5: aSourceRect = Rectangle(Point(98, 66), Size(13, 13)); break;
+ case 0:
+ {
+ return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13)));
+ }
+ case 1:
+ {
+ return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13)));
+ }
+ case 2:
+ {
+ return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 78), Size(13, 13)));
+ }
+ case 3:
+ {
+ return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 78), Size(13, 13)));
+ }
+ case 4:
+ {
+ return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 78), Size(13, 13)));
+ }
+ default: // case 5:
+ {
+ return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13)));
+ }
}
-
- break;
}
case Circ_7x7:
{
- aSourceRect = Rectangle(Point(27, nYPos), Size(7, 7));
- break;
+ return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7)));
}
case Circ_9x9:
case Customshape1:
{
- aSourceRect = Rectangle(Point(34, nYPos), Size(9, 9));
- break;
+ return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9)));
}
case Circ_11x11:
{
- aSourceRect = Rectangle(Point(43, nYPos), Size(11, 11));
- break;
+ return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11)));
}
case Elli_7x9:
{
- aSourceRect = Rectangle(Point(54, nYPos), Size(7, 9));
- break;
+ return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9)));
}
case Elli_9x11:
{
- aSourceRect = Rectangle(Point(61, nYPos), Size(9, 11));
- break;
+ return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, Rectangle(Point(61, nYPos), Size(9, 11)));
}
case Elli_9x7:
{
- aSourceRect = Rectangle(Point(70, nYPos), Size(9, 7));
- break;
+ return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, Rectangle(Point(70, nYPos), Size(9, 7)));
}
case Elli_11x9:
{
- aSourceRect = Rectangle(Point(79, nYPos), Size(11, 9));
- break;
+ return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, Rectangle(Point(79, nYPos), Size(11, 9)));
}
case RectPlus_7x7:
{
- aSourceRect = Rectangle(Point(90, nYPos), Size(7, 7));
- break;
+ return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, Rectangle(Point(90, nYPos), Size(7, 7)));
}
case RectPlus_9x9:
{
- aSourceRect = Rectangle(Point(97, nYPos), Size(9, 9));
- break;
+ return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, Rectangle(Point(97, nYPos), Size(9, 9)));
}
case RectPlus_11x11:
{
- aSourceRect = Rectangle(Point(106, nYPos), Size(11, 11));
- break;
+ return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, Rectangle(Point(106, nYPos), Size(11, 11)));
}
case Crosshair:
{
- aSourceRect = Rectangle(Point(0, 68), Size(15, 15));
- break;
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, Rectangle(Point(0, 68), Size(15, 15)));
}
case Glue:
{
- aSourceRect = Rectangle(Point(15, 74), Size(9, 9));
- break;
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 74), Size(9, 9)));
}
- case Anchor:
- // #101688# AnchorTR for SW
+ case Anchor: // #101688# AnchorTR for SW
case AnchorTR:
{
- aSourceRect = Rectangle(Point(24, 68), Size(24, 23));
- break;
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 68), Size(24, 23)));
}
// #98388# add AnchorPressed to be able to aninate anchor control
case AnchorPressed:
case AnchorPressedTR:
{
- aSourceRect = Rectangle(Point(48, 68), Size(24, 23));
- break;
+ return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(48, 68), Size(24, 23)));
}
}
- // construct return bitmap
- BitmapEx aRetval(maMarkersBitmap);
- aRetval.Crop(aSourceRect);
-
- return aRetval;
+ // cannot happen since all pathes return something; return Rect_7x7 as default (see switch)
+ return maRealMarkers[0];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-SdrHdlBitmapSet* SdrHdl::pSimpleSet = NULL;
-SdrHdlBitmapSet* SdrHdl::pModernSet = NULL;
+SdrHdlBitmapSet& getSimpleSet()
+{
+ static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aSimpleSet(new SdrHdlBitmapSet(SIP_SA_MARKERS));
+ return *aSimpleSet.get();
+}
-// #101928#
-SdrHdlBitmapSet* SdrHdl::pHighContrastSet = NULL;
+SdrHdlBitmapSet& getModernSet()
+{
+ static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aModernSet(new SdrHdlBitmapSet(SIP_SA_MARKERS));
+ return *aModernSet.get();
+}
+
+SdrHdlBitmapSet& getHighContrastSet()
+{
+ static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aHighContrastSet(new SdrHdlBitmapSet(SIP_SA_MARKERS));
+ return *aHighContrastSet.get();
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -276,18 +311,6 @@ SdrHdl::SdrHdl():
bPlusHdl(FALSE),
mbMoveOutside(false)
{
- if(!pSimpleSet)
- pSimpleSet = new SdrHdlBitmapSet(SIP_SA_MARKERS);
- DBG_ASSERT(pSimpleSet, "Could not construct SdrHdlBitmapSet()!");
-
- if(!pModernSet)
- pModernSet = new SdrHdlBitmapSet(SIP_SA_FINE_MARKERS);
- DBG_ASSERT(pModernSet, "Could not construct SdrHdlBitmapSet()!");
-
- // #101928#
- if(!pHighContrastSet)
- pHighContrastSet = new SdrHdlBitmapSet(SIP_SA_ACCESSIBILITY_MARKERS);
- DBG_ASSERT(pHighContrastSet, "Could not construct SdrHdlBitmapSet()!");
}
SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind):
@@ -306,18 +329,6 @@ SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind):
bPlusHdl(FALSE),
mbMoveOutside(false)
{
- if(!pSimpleSet)
- pSimpleSet = new SdrHdlBitmapSet(SIP_SA_MARKERS);
- DBG_ASSERT(pSimpleSet, "Could not construct SdrHdlBitmapSet()!");
-
- if(!pModernSet)
- pModernSet = new SdrHdlBitmapSet(SIP_SA_FINE_MARKERS);
- DBG_ASSERT(pModernSet, "Could not construct SdrHdlBitmapSet()!");
-
- // #101928#
- if(!pHighContrastSet)
- pHighContrastSet = new SdrHdlBitmapSet(SIP_SA_ACCESSIBILITY_MARKERS);
- DBG_ASSERT(pHighContrastSet, "Could not construct SdrHdlBitmapSet()!");
}
SdrHdl::~SdrHdl()
@@ -650,17 +661,17 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd,
{
if(bIsHighContrast)
{
- return pHighContrastSet->GetBitmapEx(eKindOfMarker, nInd);
+ return getHighContrastSet().GetBitmapEx(eKindOfMarker, nInd);
}
else
{
if(bFine)
{
- return pModernSet->GetBitmapEx(eKindOfMarker, nInd);
+ return getModernSet().GetBitmapEx(eKindOfMarker, nInd);
}
else
{
- return pSimpleSet->GetBitmapEx(eKindOfMarker, nInd);
+ return getSimpleSet().GetBitmapEx(eKindOfMarker, nInd);
}
}
}
@@ -810,7 +821,7 @@ bool SdrHdl::IsHdlHit(const Point& rPnt) const
{
// OVERLAYMANAGER
basegfx::B2DPoint aPosition(rPnt.X(), rPnt.Y());
- return maOverlayGroup.isHit(aPosition);
+ return maOverlayGroup.isHitLogic(aPosition);
}
Pointer SdrHdl::GetPointer() const
@@ -984,8 +995,9 @@ void SdrHdlColor::CreateB2dIAObject()
Bitmap aBmpCol(CreateColorDropper(aMarkerColor));
basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
::sdr::overlay::OverlayObject* pNewOverlayObject = new
- ::sdr::overlay::OverlayBitmap(
- aPosition, aBmpCol,
+ ::sdr::overlay::OverlayBitmapEx(
+ aPosition,
+ BitmapEx(aBmpCol),
(UINT16)(aBmpCol.GetSizePixel().Width() - 1) >> 1,
(UINT16)(aBmpCol.GetSizePixel().Height() - 1) >> 1
);
@@ -1183,11 +1195,13 @@ void SdrHdlGradient::CreateB2dIAObject()
pNewOverlayObject = new
::sdr::overlay::OverlayTriangle(
- aPositionLeft, aPosition2, aPositionRight
+ aPositionLeft,
+ aPosition2,
+ aPositionRight,
+ IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE)
);
DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!");
- pNewOverlayObject->setBaseColor(IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE));
rPageWindow.GetOverlayManager()->add(*pNewOverlayObject);
maOverlayGroup.append(*pNewOverlayObject);
}
@@ -1250,7 +1264,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, BOOL bSetItemOnObject, BOOL
aNewSet.Put(aNewTransItem);
}
- if(bUndo)
+ if(bUndo && pModel->IsUndoEnabled())
{
pModel->BegUndo(SVX_RESSTR(IsGradient() ? SIP_XA_FILLGRADIENT : SIP_XA_FILLTRANSPARENCE));
pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*_pObj));
@@ -1331,13 +1345,6 @@ void SdrHdlLine::CreateB2dIAObject()
}
}
-bool SdrHdlLine::IsHdlHit(const Point& rPnt) const
-{
- // OVERLAYMANAGER
- basegfx::B2DPoint aPosition(rPnt.X(), rPnt.Y());
- return maOverlayGroup.isHit(aPosition);
-}
-
Pointer SdrHdlLine::GetPointer() const
{
return Pointer(POINTER_REFHAND);
@@ -1689,7 +1696,8 @@ void ImpTextframeHdl::CreateB2dIAObject()
aTopLeft,
aBottomRight,
aHatchCol,
- 6.0,
+ 3.0,
+ 3.0,
45 * F_PI180,
nDrehWink * -F_PI18000);
pNewOverlayObject->setHittable(false);
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 60761a2d3557..0eab890b49f0 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -144,6 +144,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
nMaxUndoCount=16;
pAktUndoGroup=NULL;
nUndoLevel=0;
+ mbUndoEnabled=true;
nProgressPercent=0;
nLoadVersion=0;
bExtColorTable=FALSE;
@@ -461,10 +462,13 @@ FASTBOOL SdrModel::Undo()
SfxUndoAction* pDo=(SfxUndoAction*)GetUndoAction(0);
if(pDo!=NULL)
{
+ const bool bWasUndoEnabled = mbUndoEnabled;
+ mbUndoEnabled = false;
pDo->Undo();
if(pRedoStack==NULL)
pRedoStack=new Container(1024,16,16);
pRedoStack->Insert(pUndoStack->Remove((ULONG)0),(ULONG)0);
+ mbUndoEnabled = bWasUndoEnabled;
}
}
return bRet;
@@ -482,10 +486,13 @@ FASTBOOL SdrModel::Redo()
SfxUndoAction* pDo=(SfxUndoAction*)GetRedoAction(0);
if(pDo!=NULL)
{
+ const bool bWasUndoEnabled = mbUndoEnabled;
+ mbUndoEnabled = false;
pDo->Redo();
if(pUndoStack==NULL)
pUndoStack=new Container(1024,16,16);
pUndoStack->Insert(pRedoStack->Remove((ULONG)0),(ULONG)0);
+ mbUndoEnabled = bWasUndoEnabled;
}
}
return bRet;
@@ -516,15 +523,28 @@ FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView)
void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
{
DBG_ASSERT( mpImpl->mpUndoManager == 0, "svx::SdrModel::ImpPostUndoAction(), method not supported with application undo manager!" );
- if (aUndoLink.IsSet()) {
- aUndoLink.Call(pUndo);
- } else {
- if (pUndoStack==NULL) pUndoStack=new Container(1024,16,16);
- pUndoStack->Insert(pUndo,(ULONG)0);
- while (pUndoStack->Count()>nMaxUndoCount) {
- delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count()-1);
+ if( IsUndoEnabled() )
+ {
+ if (aUndoLink.IsSet())
+ {
+ aUndoLink.Call(pUndo);
+ }
+ else
+ {
+ if (pUndoStack==NULL)
+ pUndoStack=new Container(1024,16,16);
+ pUndoStack->Insert(pUndo,(ULONG)0);
+ while (pUndoStack->Count()>nMaxUndoCount)
+ {
+ delete (SfxUndoAction*)pUndoStack->Remove(pUndoStack->Count()-1);
+ }
+ if (pRedoStack!=NULL)
+ pRedoStack->Clear();
}
- if (pRedoStack!=NULL) pRedoStack->Clear();
+ }
+ else
+ {
+ delete pUndo;
}
}
@@ -536,7 +556,7 @@ void SdrModel::BegUndo()
mpImpl->mpUndoManager->EnterListAction(aEmpty,aEmpty);
nUndoLevel++;
}
- else
+ else if( IsUndoEnabled() )
{
if(pAktUndoGroup==NULL)
{
@@ -558,7 +578,7 @@ void SdrModel::BegUndo(const XubString& rComment)
mpImpl->mpUndoManager->EnterListAction( rComment, aEmpty );
nUndoLevel++;
}
- else
+ else if( IsUndoEnabled() )
{
BegUndo();
if (nUndoLevel==1)
@@ -582,7 +602,7 @@ void SdrModel::BegUndo(const XubString& rComment, const XubString& rObjDescr, Sd
mpImpl->mpUndoManager->EnterListAction( aComment,aEmpty );
nUndoLevel++;
}
- else
+ else if( IsUndoEnabled() )
{
BegUndo();
if (nUndoLevel==1)
@@ -601,7 +621,7 @@ void SdrModel::BegUndo(SdrUndoGroup* pUndoGrp)
DBG_ERROR("svx::SdrModel::BegUndo(), method not supported with application undo manager!" );
nUndoLevel++;
}
- else
+ else if( IsUndoEnabled() )
{
if (pAktUndoGroup==NULL)
{
@@ -614,6 +634,10 @@ void SdrModel::BegUndo(SdrUndoGroup* pUndoGrp)
nUndoLevel++;
}
}
+ else
+ {
+ delete pUndoGrp;
+ }
}
void SdrModel::EndUndo()
@@ -629,7 +653,7 @@ void SdrModel::EndUndo()
}
else
{
- if(pAktUndoGroup!=NULL)
+ if(pAktUndoGroup!=NULL && IsUndoEnabled())
{
nUndoLevel--;
if(nUndoLevel==0)
@@ -659,7 +683,7 @@ void SdrModel::SetUndoComment(const XubString& rComment)
{
DBG_ERROR("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" );
}
- else
+ else if( IsUndoEnabled() )
{
if(nUndoLevel==1)
{
@@ -691,6 +715,10 @@ void SdrModel::AddUndo(SdrUndoAction* pUndo)
{
mpImpl->mpUndoManager->AddUndoAction( pUndo );
}
+ else if( !IsUndoEnabled() )
+ {
+ delete pUndo;
+ }
else
{
if (pAktUndoGroup!=NULL)
@@ -704,6 +732,30 @@ void SdrModel::AddUndo(SdrUndoAction* pUndo)
}
}
+void SdrModel::EnableUndo( bool bEnable )
+{
+ if( mpImpl->mpUndoManager )
+ {
+ mpImpl->mpUndoManager->EnableUndo( bEnable );
+ }
+ else
+ {
+ mbUndoEnabled = bEnable;
+ }
+}
+
+bool SdrModel::IsUndoEnabled() const
+{
+ if( mpImpl->mpUndoManager )
+ {
+ return mpImpl->mpUndoManager->IsUndoEnabled();
+ }
+ else
+ {
+ return mbUndoEnabled;
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
void SdrModel::ImpCreateTables()
@@ -1568,53 +1620,77 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
USHORT nDestPos,
FASTBOOL bUndo, FASTBOOL bMoveNoCopy)
{
- if (bUndo) {
+ if( bUndo && !IsUndoEnabled() )
+ bUndo = false;
+
+ if( bUndo )
BegUndo(ImpGetResStr(STR_UndoMergeModel));
- }
+
USHORT nPageAnz=GetPageCount();
- USHORT nMaxPage=nPageAnz; if (nMaxPage!=0) nMaxPage--;
- if (nFirstPageNum>nMaxPage) nFirstPageNum=nMaxPage;
- if (nLastPageNum>nMaxPage) nLastPageNum =nMaxPage;
+ USHORT nMaxPage=nPageAnz;
+
+ if (nMaxPage!=0)
+ nMaxPage--;
+ if (nFirstPageNum>nMaxPage)
+ nFirstPageNum=nMaxPage;
+ if (nLastPageNum>nMaxPage)
+ nLastPageNum =nMaxPage;
FASTBOOL bReverse=nLastPageNum<nFirstPageNum;
- if (nDestPos>nPageAnz) nDestPos=nPageAnz;
+ if (nDestPos>nPageAnz)
+ nDestPos=nPageAnz;
// Zunaechst die Zeiger der betroffenen Seiten in einem Array sichern
USHORT nPageNum=nFirstPageNum;
USHORT nCopyAnz=((!bReverse)?(nLastPageNum-nFirstPageNum):(nFirstPageNum-nLastPageNum))+1;
SdrPage** pPagePtrs=new SdrPage*[nCopyAnz];
USHORT nCopyNum;
- for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++) {
+ for(nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++)
+ {
pPagePtrs[nCopyNum]=GetPage(nPageNum);
- if (bReverse) nPageNum--;
- else nPageNum++;
+ if (bReverse)
+ nPageNum--;
+ else
+ nPageNum++;
}
// Jetzt die Seiten kopieren
USHORT nDestNum=nDestPos;
- for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++) {
+ for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++)
+ {
SdrPage* pPg=pPagePtrs[nCopyNum];
USHORT nPageNum2=pPg->GetPageNum();
- if (!bMoveNoCopy) {
+ if (!bMoveNoCopy)
+ {
const SdrPage* pPg1=GetPage(nPageNum2);
pPg=pPg1->Clone();
InsertPage(pPg,nDestNum);
- if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoCopyPage(*pPg));
+ if (bUndo)
+ AddUndo(GetSdrUndoFactory().CreateUndoCopyPage(*pPg));
nDestNum++;
- } else {
+ }
+ else
+ {
// Move ist nicht getestet!
- if (nDestNum>nPageNum2) nDestNum--;
- if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*GetPage(nPageNum2),nPageNum2,nDestNum));
+ if (nDestNum>nPageNum2)
+ nDestNum--;
+
+ if(bUndo)
+ AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*GetPage(nPageNum2),nPageNum2,nDestNum));
+
pPg=RemovePage(nPageNum2);
InsertPage(pPg,nDestNum);
nDestNum++;
}
- if (bReverse) nPageNum2--;
- else nPageNum2++;
+ if(bReverse)
+ nPageNum2--;
+ else
+ nPageNum2++;
}
delete[] pPagePtrs;
- if (bUndo) EndUndo();
+ if(bUndo)
+ EndUndo();
}
void SdrModel::Merge(SdrModel& rSourceModel,
@@ -1623,13 +1699,18 @@ void SdrModel::Merge(SdrModel& rSourceModel,
FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages,
FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst)
{
- if (&rSourceModel==this) { // #48289#
+ if (&rSourceModel==this)
+ { // #48289#
CopyPages(nFirstPageNum,nLastPageNum,nDestPos,bUndo,!bTreadSourceAsConst);
return;
}
- if (bUndo) {
+
+ if( bUndo && !IsUndoEnabled() )
+ bUndo = false;
+
+ if (bUndo)
BegUndo(ImpGetResStr(STR_UndoMergeModel));
- }
+
USHORT nSrcPageAnz=rSourceModel.GetPageCount();
USHORT nSrcMasterPageAnz=rSourceModel.GetMasterPageCount();
USHORT nDstMasterPageAnz=GetMasterPageCount();
@@ -1801,6 +1882,11 @@ uno::Reference< uno::XInterface > SdrModel::getUnoModel()
return mxUnoModel;
}
+void SdrModel::setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel )
+{
+ mxUnoModel = xModel;
+}
+
uno::Reference< uno::XInterface > SdrModel::createUnoModel()
{
DBG_ERROR( "SdrModel::createUnoModel() - base implementation should not be called!" );
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 6499708c6186..f80b14503914 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -48,26 +48,19 @@
#include <svx/svdoole2.hxx>
#include <svx/xgrad.hxx>
#include <svx/xflgrit.hxx>
-
#include "gradtrns.hxx"
#include <svx/xflftrit.hxx>
-
#include <svx/dialmgr.hxx>
#include "svdstr.hrc"
#include <svx/svdundo.hxx>
-
-// #105722#
#include <svx/svdopath.hxx>
-
-// #i13033#
#include <svx/scene3d.hxx>
-
-// OD 30.06.2003 #108784#
#include <svx/svdovirt.hxx>
#include <svx/sdr/overlay/overlayrollingrectangle.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <sdrpaintwindow.hxx>
#include <svx/sdrpagewindow.hxx>
+#include <svx/sdrhittesthelper.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
// predefines
@@ -109,7 +102,7 @@ ImplMarkingOverlay::ImplMarkingOverlay(const SdrPaintView& rView, const basegfx:
if(pTargetOverlay)
{
::sdr::overlay::OverlayRollingRectangleStriped* pNew = new ::sdr::overlay::OverlayRollingRectangleStriped(
- rStartPos, rStartPos, sal_False);
+ rStartPos, rStartPos, false);
pTargetOverlay->add(*pNew);
maObjects.append(*pNew);
}
@@ -215,6 +208,12 @@ void __EXPORT SdrMarkView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
bMarkedObjRectDirty=TRUE;
bMarkedPointsRectsDirty=TRUE;
}
+/* removed for now since this breaks existing code who iterates over the mark list and sequentially replaces objects
+ if( eKind==HINT_OBJREMOVED && IsObjMarked( const_cast<SdrObject*>(pSdrHint->GetObject()) ) )
+ {
+ MarkObj( const_cast<SdrObject*>(pSdrHint->GetObject()), GetSdrPageView(), TRUE );
+ }
+*/
}
SdrSnapView::Notify(rBC,rHint);
}
@@ -970,9 +969,12 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
aNewItem.SetGradientValue(aGrad);
// add undo to allow user to take back this step
- pModel->BegUndo(SVX_RESSTR(SIP_XA_FILLTRANSPARENCE));
- pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
- pModel->EndUndo();
+ if( pModel->IsUndoEnabled() )
+ {
+ pModel->BegUndo(SVX_RESSTR(SIP_XA_FILLTRANSPARENCE));
+ pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
+ pModel->EndUndo();
+ }
//pObj->SetItemAndBroadcast(aNewItem);
SfxItemSet aNewSet(pModel->GetItemPool());
@@ -1287,7 +1289,7 @@ BOOL SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const
Point aPt(rPnt);
for (ULONG nm=0; nm<GetMarkedObjectCount() && !bRet; nm++) {
SdrMark* pM=GetSdrMarkByIndex(nm);
- bRet=ImpIsObjHit(aPt,USHORT(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),0);
+ bRet = 0 != CheckSingleSdrObjectHit(aPt,USHORT(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),0,0);
}
return bRet;
}
@@ -1388,7 +1390,8 @@ BOOL SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, BOOL bPrev)
for (nm=nMarkAnz; nm>0 && pTopMarkHit==NULL;) {
nm--;
SdrMark* pM=GetSdrMarkByIndex(nm);
- if (ImpIsObjHit(aPt,USHORT(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),0)) {
+ if(CheckSingleSdrObjectHit(aPt,USHORT(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),0,0))
+ {
pTopMarkHit=pM;
nTopMarkHit=nm;
}
@@ -1404,7 +1407,8 @@ BOOL SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, BOOL bPrev)
for (nm=0; nm<nMarkAnz && pBtmMarkHit==NULL; nm++) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrPageView* pPV2=pM->GetPageView();
- if (pPV2==pPV && ImpIsObjHit(aPt,USHORT(nTol),pM->GetMarkedSdrObj(),pPV2,0)) {
+ if (pPV2==pPV && CheckSingleSdrObjectHit(aPt,USHORT(nTol),pM->GetMarkedSdrObj(),pPV2,0,0))
+ {
pBtmMarkHit=pM;
nBtmMarkHit=nm;
}
@@ -1461,7 +1465,8 @@ BOOL SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, BOOL bPrev)
pObj = pObjList->GetObj(no);
}
- if (ImpIsObjHit(aPt,USHORT(nTol),pObj,pPV,SDRSEARCH_TESTMARKABLE)) {
+ if (CheckSingleSdrObjectHit(aPt,USHORT(nTol),pObj,pPV,SDRSEARCH_TESTMARKABLE,0))
+ {
if (TryToFindMarkedObject(pObj)==CONTAINER_ENTRY_NOTFOUND) {
pFndObj=pObj;
} else {
@@ -1587,7 +1592,7 @@ void SdrMarkView::SetMarkHdlSizePixel(USHORT nSiz)
}
#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */
-SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
+SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
{
if((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster())
{
@@ -1633,15 +1638,13 @@ SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObject
aPnt.Move( -aOffset.X(), -aOffset.Y() );
}
- pRet=ImpCheckObjHit(aPnt,nTol,pOL,pPV,nOptions,pMVisLay,pTmpObj);
+ pRet=CheckSingleSdrObjectHit(aPnt,nTol,pOL,pPV,nOptions,pMVisLay,pTmpObj);
}
else
{
- SdrLayerID nLay=pObj->GetLayer();
-
- if(pPV->GetVisibleLayers().IsSet(nLay) && (pMVisLay==NULL || pMVisLay->IsSet(nLay)))
+ if(!pMVisLay || pMVisLay->IsSet(pObj->GetLayer()))
{
- pRet=pObj->CheckHit(rPnt,nTol2,&pPV->GetVisibleLayers());
+ pRet = SdrObjectPrimitiveHit(*pObj, rPnt, nTol2, *pPV, &pPV->GetVisibleLayers(), false);
}
}
}
@@ -1655,7 +1658,7 @@ SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObject
return pRet;
}
-SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
+SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
{
BOOL bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
SdrObject* pRet=NULL;
@@ -1682,7 +1685,7 @@ SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObjLis
pObj = pOL->GetObj(nObjNum);
}
- pRet=ImpCheckObjHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
+ pRet=CheckSingleSdrObjectHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
if (pRet!=NULL) rpRootObj=pObj;
if (bBack) nObjNum++;
}
@@ -1730,7 +1733,7 @@ BOOL SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
SdrMark* pM=GetSdrMarkByIndex(nMrkNum);
pObj=pM->GetMarkedSdrObj();
pPV=pM->GetPageView();
- pHitObj=ImpCheckObjHit(aPt,nTol,pObj,pPV,nOptions,NULL);
+ pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,nOptions,NULL);
if (bBack) nMrkNum++;
}
}
@@ -1775,7 +1778,7 @@ BOOL SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
if (pnPassNum!=NULL) *pnPassNum|=SDRSEARCHPASS_MASTERPAGE;
nTmpOptions=nTmpOptions | SDRSEARCH_IMPISMASTER;
}
- pHitObj=ImpCheckObjHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj);
+ pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj);
if (bBack) nPgNum++;
}
}
@@ -1798,8 +1801,12 @@ BOOL SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=NULL;
}
if (pObj!=NULL && (nOptions & SDRSEARCH_WITHTEXT) !=0 && pObj->GetOutlinerParaObject()==NULL) pObj=NULL;
- if (pObj!=NULL && (nOptions & SDRSEARCH_TESTTEXTAREA) !=0) {
- if (!pObj->IsTextEditHit(aPt,0/*nTol*/,NULL)) pObj=NULL;
+ if (pObj!=NULL && (nOptions & SDRSEARCH_TESTTEXTAREA) !=0)
+ {
+ if(!SdrObjectPrimitiveHit(*pObj, aPt, 0, *pPV, 0, true))
+ {
+ pObj = 0;
+ }
}
if (pObj!=NULL) {
rpObj=pObj;
@@ -1828,7 +1835,7 @@ BOOL SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj();
- bFnd=ImpIsObjHit(aPt,nTol,pObj,pPV,SDRSEARCH_TESTMARKABLE);
+ bFnd = 0 != CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,SDRSEARCH_TESTMARKABLE,0);
if (bFnd) {
rpObj=pObj;
rpPV=pPV;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 70dda490a540..dab855fa6f41 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1630,7 +1630,7 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
rInfo.bMirror90Allowed =TRUE;
rInfo.bTransparenceAllowed = FALSE;
rInfo.bGradientAllowed = FALSE;
- rInfo.bShearAllowed =FALSE;
+ rInfo.bShearAllowed =TRUE;
rInfo.bEdgeRadiusAllowed=FALSE;
rInfo.bNoContortion =TRUE;
@@ -1965,19 +1965,56 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 )
InvalidateRenderGeometry();
}
-void SdrObjCustomShape::Shear( const Point& /*rRef*/, long /*nWink*/, double /*tn*/, FASTBOOL /*bVShear*/)
+void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear )
{
-/*
SdrTextObj::Shear( rRef, nWink, tn, bVShear );
InvalidateRenderGeometry();
-*/
}
-void SdrObjCustomShape::NbcShear( const Point& /*rRef*/, long /*nWink*/, double /*tn*/, FASTBOOL /*bVShear*/)
+void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear )
{
-/*
+ long nDrehWink = aGeo.nDrehWink;
+ if ( nDrehWink )
+ {
+ aGeo.nDrehWink = -nDrehWink;
+ aGeo.RecalcSinCos();
+ NbcRotate( rRef, aGeo.nDrehWink, aGeo.nSin, aGeo.nCos );
+ }
SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+ if ( nDrehWink )
+ {
+ aGeo.nDrehWink = nDrehWink;
+ aGeo.RecalcSinCos();
+ Rotate( rRef, aGeo.nDrehWink, aGeo.nSin, aGeo.nCos );
+ }
InvalidateRenderGeometry();
-*/
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrGluePoint SdrObjCustomShape::GetVertexGluePoint(USHORT nPosNum) const
+{
+ INT32 nWdt = ImpGetLineWdt(); // #i25616# ((XLineWidthItem&)(GetObjectItem(XATTR_LINEWIDTH))).GetValue();
+
+ // #i25616#
+ if(!LineIsOutsideGeometry())
+ {
+ nWdt++;
+ nWdt /= 2;
+ }
+
+ Point aPt;
+ switch (nPosNum) {
+ case 0: aPt=aRect.TopCenter(); aPt.Y()-=nWdt; break;
+ case 1: aPt=aRect.RightCenter(); aPt.X()+=nWdt; break;
+ case 2: aPt=aRect.BottomCenter(); aPt.Y()+=nWdt; break;
+ case 3: aPt=aRect.LeftCenter(); aPt.X()-=nWdt; break;
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ aPt-=GetSnapRect().Center();
+ SdrGluePoint aGP(aPt);
+ aGP.SetPercent(FALSE);
+ return aGP;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -2012,6 +2049,53 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
aNewList.Insert(aCopy);
}
+ sal_Bool bMirroredX = IsMirroredX();
+ sal_Bool bMirroredY = IsMirroredY();
+
+ long nShearWink = aGeo.nShearWink;
+ double fTan = aGeo.nTan;
+
+ if ( aGeo.nDrehWink || nShearWink || bMirroredX || bMirroredY )
+ {
+ Polygon aPoly( aRect );
+ if( nShearWink )
+ {
+ USHORT nPointCount=aPoly.GetSize();
+ for (USHORT i=0; i<nPointCount; i++)
+ ShearPoint(aPoly[i],aRect.Center(), fTan, FALSE );
+ }
+ if ( aGeo.nDrehWink )
+ aPoly.Rotate( aRect.Center(), aGeo.nDrehWink / 10 );
+
+ Rectangle aBoundRect( aPoly.GetBoundRect() );
+ sal_Int32 nXDiff = aBoundRect.Left() - aRect.Left();
+ sal_Int32 nYDiff = aBoundRect.Top() - aRect.Top();
+
+ if (nShearWink&&(bMirroredX&&!bMirroredY)||(bMirroredY&&!bMirroredX))
+ {
+ nShearWink = -nShearWink;
+ fTan = -fTan;
+ }
+
+ Point aRef( aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
+ for ( a = 0; a < aNewList.GetCount(); a++ )
+ {
+ SdrGluePoint& rPoint = aNewList[ a ];
+ Point aGlue( rPoint.GetPos() );
+ if ( nShearWink )
+ ShearPoint( aGlue, aRef, fTan );
+
+ RotatePoint( aGlue, aRef, sin( fObjectRotation * F_PI180 ), cos( fObjectRotation * F_PI180 ) );
+ if ( bMirroredX )
+ aGlue.X() = aRect.GetWidth() - aGlue.X();
+ if ( bMirroredY )
+ aGlue.Y() = aRect.GetHeight() - aGlue.Y();
+ aGlue.X() -= nXDiff;
+ aGlue.Y() -= nYDiff;
+ rPoint.SetPos( aGlue );
+ }
+ }
+
for(a = 0; a < pList->GetCount(); a++)
{
const SdrGluePoint& rCandidate = (*pList)[a];
@@ -2162,12 +2246,13 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect, SdrObj
std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles( pObj ) );
+ GeoStat aGeoStat( pObj->GetGeoStat() );
if ( aNewRect.TopLeft()!= pObj->aRect.TopLeft() &&
( pObj->aGeo.nDrehWink || pObj->aGeo.nShearWink ) )
{
Point aNewPos( aNewRect.TopLeft() );
- if ( pObj->aGeo.nShearWink ) ShearPoint( aNewPos, aOld.TopLeft(), pObj->aGeo.nTan );
- if ( pObj->aGeo.nDrehWink ) RotatePoint(aNewPos, aOld.TopLeft(), pObj->aGeo.nSin, pObj->aGeo.nCos );
+ if ( pObj->aGeo.nShearWink ) ShearPoint( aNewPos, aOld.TopLeft(), aGeoStat.nTan );
+ if ( pObj->aGeo.nDrehWink ) RotatePoint(aNewPos, aOld.TopLeft(), aGeoStat.nSin, aGeoStat.nCos );
aNewRect.SetPos( aNewPos );
}
if ( aNewRect != pObj->aRect )
@@ -2180,7 +2265,6 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect, SdrObj
Point aTop( ( pObj->GetSnapRect().Left() + pObj->GetSnapRect().Right() ) >> 1, pObj->GetSnapRect().Top() );
Point aBottom( aTop.X(), aTop.Y() + 1000 );
pObj->NbcMirror( aTop, aBottom );
-
}
if ( rNewRect.Top() > rNewRect.Bottom() )
{
@@ -2188,6 +2272,7 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect, SdrObj
Point aRight( aLeft.X() + 1000, aLeft.Y() );
pObj->NbcMirror( aLeft, aRight );
}
+
std::vector< SdrCustomShapeInteraction >::iterator aIter( aInteractionHandles.begin() );
while ( aIter != aInteractionHandles.end() )
{
@@ -3008,10 +3093,6 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe
rTextRect=Rectangle(aTextPos,aTextSiz);
}
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
void SdrObjCustomShape::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
{
SdrTextObj::NbcSetOutlinerParaObject( pTextObject );
@@ -3020,81 +3101,6 @@ void SdrObjCustomShape::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject
InvalidateRenderGeometry();
}
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-SdrObject* SdrObjCustomShape::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- SdrObject* pHitObj = NULL;
- const SdrObject* pSdrObject = GetSdrObjectFromCustomShape();
- if ( pSdrObject )
- {
- SdrObjList* pOL = pSdrObject->GetSubList();
- if ( pOL )
- {
- ULONG nObjNum = pOL->GetObjCount();
- while ( ( pHitObj == NULL ) && nObjNum )
- {
- nObjNum--;
- SdrObject* pObj = pOL->GetObj( nObjNum );
- if ( pObj->CheckHit( rPnt, nTol, pVisiLayer ) )
- pHitObj = (SdrObject*)this;
- }
- }
- else if ( pSdrObject->CheckHit( rPnt, nTol, pVisiLayer ) )
- pHitObj = (SdrObject*)this;
- }
-
- if ( !pHitObj && HasText() )
- {
- // paint text over object
- double fTextRotation = GetExtraTextRotation();
- if ( fTextRotation != 0.0 )
- {
- GeoStat aOldGeoStat( aGeo );
- Rectangle aOldRect( aRect );
- Rectangle aTextBound( aRect );
- GetTextBounds( aTextBound );
-
- // determining the correct refpoint
- Point aRef( aTextBound.Center() );
- Rectangle aUnrotatedSnapRect( aOutRect );
- RotatePoint( aRef, aUnrotatedSnapRect.Center(), -aGeo.nSin, -aGeo.nCos );
-
- long dx = aRect.Right()-aRect.Left();
- long dy = aRect.Bottom()-aRect.Top();
- Point aP( aRect.TopLeft() );
- double sn = sin( F_PI180 * fTextRotation );
- double cs = cos( F_PI180 * fTextRotation );
- RotatePoint( aP, aRef, sn, cs );
- ((SdrObjCustomShape*)this)->aRect.Left()=aP.X();
- ((SdrObjCustomShape*)this)->aRect.Top()=aP.Y();
- ((SdrObjCustomShape*)this)->aRect.Right()=aRect.Left()+dx;
- ((SdrObjCustomShape*)this)->aRect.Bottom()=aRect.Top()+dy;
- if ( aGeo.nDrehWink == 0 )
- {
- ((SdrObjCustomShape*)this)->aGeo.nDrehWink=NormAngle360( (sal_Int32)( fTextRotation * 100.0 ) );
- ((SdrObjCustomShape*)this)->aGeo.nSin = sn;
- ((SdrObjCustomShape*)this)->aGeo.nCos = cs;
- }
- else
- {
- ((SdrObjCustomShape*)this)->aGeo.nDrehWink=NormAngle360( aGeo.nDrehWink + (sal_Int32)( fTextRotation * 100.0 ) );
- ((SdrObjCustomShape*)this)->aGeo.RecalcSinCos();
- }
- pHitObj = SdrTextObj::CheckHit( rPnt, nTol, pVisiLayer );
- ((SdrObjCustomShape*)this)->aGeo = aOldGeoStat;
- ((SdrObjCustomShape*)this)->aRect = aOldRect;
-
- }
- else
- pHitObj = SdrTextObj::CheckHit( rPnt, nTol, pVisiLayer );
- }
-
- return pHitObj;
-}
-
void SdrObjCustomShape::operator=(const SdrObject& rObj)
{
SdrTextObj::operator=( rObj );
@@ -3301,13 +3307,13 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
SetSnapRect(aBaseRect);
// shear?
-// if(!basegfx::fTools::equalZero(fShearX))
-// {
-// GeoStat aGeoStat;
-// aGeoStat.nShearWink = FRound((atan(fShearX) / F_PI180) * 100.0);
-// aGeoStat.RecalcTan();
-// Shear(Point(), aGeoStat.nShearWink, aGeoStat.nTan, FALSE);
-// }
+ if(!basegfx::fTools::equalZero(fShearX))
+ {
+ GeoStat aGeoStat;
+ aGeoStat.nShearWink = FRound((atan(fShearX) / F_PI180) * 100.0);
+ aGeoStat.RecalcTan();
+ Shear(Point(), aGeoStat.nShearWink, aGeoStat.nTan, FALSE);
+ }
// rotation?
if(!basegfx::fTools::equalZero(fRotate))
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index f192221bd880..d4d4717535b8 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -34,7 +34,6 @@
#include <svx/svdoattr.hxx>
#include <svx/xpool.hxx>
#include "svditext.hxx"
-#include "svdtouch.hxx"
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdattr.hxx>
@@ -171,26 +170,6 @@ sal_Int32 SdrAttrObj::ImpGetLineWdt() const
return nRetval;
}
-//////////////////////////////////////////////////////////////////////////////
-
-FASTBOOL SdrAttrObj::ImpGetShadowDist(sal_Int32& nXDist, sal_Int32& nYDist) const
-{
- const SfxItemSet& rSet = GetMergedItemSet();
-
- nXDist = 0L;
- nYDist = 0L;
-
- BOOL bShadOn = ((SdrShadowItem&)(rSet.Get(SDRATTR_SHADOW))).GetValue();
- if(bShadOn)
- {
- nXDist = ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
- nYDist = ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
- return TRUE;
- }
-
- return FALSE;
-}
-
BOOL SdrAttrObj::HasFill() const
{
return bClosedObj && ((XFillStyleItem&)(GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE))).GetValue()!=XFILL_NONE;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 6ec9c607188b..7ba4aec3e565 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -126,6 +126,12 @@
#include <drawinglayer/processor2d/linegeometryextractor2d.hxx>
#include <svx/polysc3d.hxx>
#include "svx/svdotable.hxx"
+#include "svx/shapepropertynotifier.hxx"
+#include <svx/sdrhittesthelper.hxx>
+
+// --> OD 2009-07-10 #i73249#
+#include <svx/svdundo.hxx>
+// <--
using namespace ::com::sun::star;
@@ -174,8 +180,15 @@ FASTBOOL SdrObjUserData::HasMacro(const SdrObject* /*pObj*/) const
SdrObject* SdrObjUserData::CheckMacroHit(const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const
{
- if (pObj==NULL) return NULL;
- return pObj->CheckHit(rRec.aPos,rRec.nTol,rRec.pVisiLayer);
+ if(pObj)
+ {
+ if(rRec.pPageView)
+ {
+ return SdrObjectPrimitiveHit(*pObj, rRec.aPos, rRec.nTol, *rRec.pPageView, rRec.pVisiLayer, false);
+ }
+ }
+
+ return 0;
}
Pointer SdrObjUserData::GetMacroPointer(const SdrObjMacroHitRec& /*rRec*/, const SdrObject* /*pObj*/) const
@@ -430,17 +443,18 @@ DBG_NAME(SdrObject);
TYPEINIT1(SdrObject,SfxListener);
SdrObject::SdrObject()
-: mpProperties(0L),
- mpViewContact(0L),
- pObjList(NULL),
- pPage(NULL),
- pModel(NULL),
- pUserCall(NULL),
- pPlusData(NULL),
- nOrdNum(0),
- mnNavigationPosition(SAL_MAX_UINT32),
- mnLayerID(0),
- mpSvxShape(0)
+ :mpProperties(0L)
+ ,mpViewContact(0L)
+ ,pObjList(NULL)
+ ,pPage(NULL)
+ ,pModel(NULL)
+ ,pUserCall(NULL)
+ ,pPlusData(NULL)
+ ,nOrdNum(0)
+ ,mnNavigationPosition(SAL_MAX_UINT32)
+ ,mnLayerID(0)
+ ,mpSvxShape( NULL )
+ ,maWeakUnoShape()
{
DBG_CTOR(SdrObject,NULL);
bVirtObj =FALSE;
@@ -488,13 +502,12 @@ SdrObject::~SdrObject()
try
{
- uno::Reference< uno::XInterface > xShape;
- SvxShape* pSvxShape = getSvxShape( xShape );
+ SvxShape* pSvxShape = getSvxShape();
if ( pSvxShape )
{
OSL_ENSURE(!pSvxShape->HasSdrObjectOwnership(),"Please check where this call come from and replace it with SdrObject::Free");
pSvxShape->InvalidateSdrObject();
- uno::Reference< lang::XComponent > xShapeComp( xShape, uno::UNO_QUERY_THROW );
+ uno::Reference< lang::XComponent > xShapeComp( getWeakUnoShape(), uno::UNO_QUERY_THROW );
xShapeComp->dispose();
}
}
@@ -528,8 +541,7 @@ void SdrObject::Free( SdrObject*& _rpObject )
// nothing to do
return;
- uno::Reference< uno::XInterface > xShape;
- SvxShape* pShape = pObject->getSvxShape( xShape );
+ SvxShape* pShape = pObject->getSvxShape();
if ( pShape && pShape->HasSdrObjectOwnership() )
// only the shape is allowed to delete me, and will reset the ownership before doing so
return;
@@ -566,8 +578,7 @@ void SdrObject::SetModel(SdrModel* pNewModel)
// update listeners at possible api wrapper object
if( pModel != pNewModel )
{
- uno::Reference< uno::XInterface > xShapeGuard;
- SvxShape* pShape = getSvxShape( xShapeGuard );
+ SvxShape* pShape = getSvxShape();
if( pShape )
pShape->ChangeModel( pNewModel );
}
@@ -752,7 +763,29 @@ void SdrObject::SetName(const String& rStr)
if(pPlusData && pPlusData->aObjName != rStr)
{
+ // --> OD 2009-07-09 #i73249#
+ // Undo/Redo for setting object's name
+ bool bUndo( false );
+ if ( GetModel() && GetModel()->IsUndoEnabled() )
+ {
+ bUndo = true;
+ SdrUndoAction* pUndoAction =
+ GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr(
+ *this,
+ SdrUndoObjStrAttr::OBJ_NAME,
+ GetName(),
+ rStr );
+ GetModel()->BegUndo( pUndoAction->GetComment() );
+ GetModel()->AddUndo( pUndoAction );
+ }
+ // <--
pPlusData->aObjName = rStr;
+ // --> OD 2009-07-09 #i73249#
+ if ( bUndo )
+ {
+ GetModel()->EndUndo();
+ }
+ // <--
SetChanged();
BroadcastObjectChange();
}
@@ -777,7 +810,29 @@ void SdrObject::SetTitle(const String& rStr)
if(pPlusData && pPlusData->aObjTitle != rStr)
{
+ // --> OD 2009-07-13 #i73249#
+ // Undo/Redo for setting object's title
+ bool bUndo( false );
+ if ( GetModel() && GetModel()->IsUndoEnabled() )
+ {
+ bUndo = true;
+ SdrUndoAction* pUndoAction =
+ GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr(
+ *this,
+ SdrUndoObjStrAttr::OBJ_TITLE,
+ GetTitle(),
+ rStr );
+ GetModel()->BegUndo( pUndoAction->GetComment() );
+ GetModel()->AddUndo( pUndoAction );
+ }
+ // <--
pPlusData->aObjTitle = rStr;
+ // --> OD 2009-07-13 #i73249#
+ if ( bUndo )
+ {
+ GetModel()->EndUndo();
+ }
+ // <--
SetChanged();
BroadcastObjectChange();
}
@@ -802,7 +857,29 @@ void SdrObject::SetDescription(const String& rStr)
if(pPlusData && pPlusData->aObjDescription != rStr)
{
+ // --> OD 2009-07-13 #i73249#
+ // Undo/Redo for setting object's description
+ bool bUndo( false );
+ if ( GetModel() && GetModel()->IsUndoEnabled() )
+ {
+ bUndo = true;
+ SdrUndoAction* pUndoAction =
+ GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr(
+ *this,
+ SdrUndoObjStrAttr::OBJ_DESCRIPTION,
+ GetDescription(),
+ rStr );
+ GetModel()->BegUndo( pUndoAction->GetComment() );
+ GetModel()->AddUndo( pUndoAction );
+ }
+ // <--
pPlusData->aObjDescription = rStr;
+ // --> OD 2009-07-13 #i73249#
+ if ( bUndo )
+ {
+ GetModel()->EndUndo();
+ }
+ // <--
SetChanged();
BroadcastObjectChange();
}
@@ -903,6 +980,10 @@ const Rectangle& SdrObject::GetLastBoundRect() const
void SdrObject::RecalcBoundRect()
{
+ // #i101680# suppress BoundRect calculations on import(s)
+ if(pModel && pModel->isLocked() )
+ return;
+
// central new method which will calculate the BoundRect using primitive geometry
if(aOutRect.IsEmpty())
{
@@ -983,19 +1064,6 @@ BOOL SdrObject::LineGeometryUsageIsNecessary() const
return (eXLS != XLINE_NONE);
}
-SdrObject* SdrObject::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return 0L;
- }
-
- Rectangle aO(GetCurrentBoundRect());
- aO.Left()-=nTol; aO.Top()-=nTol; aO.Right()+=nTol; aO.Bottom()+=nTol;
- FASTBOOL bRet=aO.IsInside(rPnt);
- return bRet ? (SdrObject*)this : NULL;
-}
-
SdrObject* SdrObject::Clone() const
{
SdrObject* pObj=SdrObjFactory::MakeNewObject(GetObjInventor(),GetObjIdentifier(),NULL);
@@ -1167,6 +1235,11 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
SfxItemSet aNewSet(*GetObjectItemPool());
+ // #i101980# ignore LineWidth; that's what the old implementation
+ // did. With linewidth, the result may be huge due to fat/thick
+ // line decompositions
+ aNewSet.Put(XLineWidthItem(0));
+
// solid black lines and no fill
aNewSet.Put(XLineStyleItem(XLINE_SOLID));
aNewSet.Put(XLineColorItem(String(), Color(COL_BLACK)));
@@ -1394,8 +1467,15 @@ FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat)
rStat.TakeCreateRect(aOutRect);
rStat.SetActionRect(aOutRect);
aOutRect.Justify();
- SetBoundRectDirty();
- bSnapRectDirty=TRUE;
+
+ // #i101648# for naked (non-derived) SdrObjects, do not invalidate aOutRect
+ // by calling SetBoundRectDirty(); aOutRect IS the geometry for such objects.
+ // No derivation implementation calls the parent implementation, so this will
+ // cause no further prolems
+ //
+ // SetBoundRectDirty();
+ // bSnapRectDirty=TRUE;
+
return TRUE;
}
@@ -1403,7 +1483,11 @@ FASTBOOL SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
rStat.TakeCreateRect(aOutRect);
aOutRect.Justify();
- SetRectsDirty();
+
+ // #i101648# see description at MovCreate
+ //
+ // SetRectsDirty();
+
return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
}
@@ -1731,11 +1815,6 @@ FASTBOOL SdrObject::HasTextEdit() const
return FALSE;
}
-SdrObject* SdrObject::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- return CheckHit(rPnt,nTol,pVisiLayer);
-}
-
sal_Bool SdrObject::BegTextEdit(SdrOutliner& /*rOutl*/)
{
return FALSE;
@@ -1807,11 +1886,19 @@ FASTBOOL SdrObject::HasMacro() const
SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
{
- SdrObjUserData* pData=ImpGetMacroUserData();
- if (pData!=NULL) {
- return pData->CheckMacroHit(rRec,this);
+ SdrObjUserData* pData = ImpGetMacroUserData();
+
+ if(pData)
+ {
+ return pData->CheckMacroHit(rRec, this);
}
- return CheckHit(rRec.aPos,rRec.nTol,rRec.pVisiLayer);
+
+ if(rRec.pPageView)
+ {
+ return SdrObjectPrimitiveHit(*this, rRec.aPos, rRec.nTol, *rRec.pPageView, rRec.pVisiLayer, false);
+ }
+
+ return 0;
}
Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec& rRec) const
@@ -2375,8 +2462,8 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
if(pRet->LineGeometryUsageIsNecessary())
{
- basegfx::B2DPolyPolygon aAreaPolyPolygon;
- basegfx::B2DPolyPolygon aLinePolyPolygon;
+ basegfx::B2DPolyPolygon aMergedLineFillPolyPolygon;
+ basegfx::B2DPolyPolygon aMergedHairlinePolyPolygon;
const drawinglayer::primitive2d::Primitive2DSequence xSequence(pRet->GetViewContact().getViewIndependentPrimitive2DSequence());
if(xSequence.hasElements())
@@ -2388,36 +2475,31 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
drawinglayer::processor2d::LineGeometryExtractor2D aExtractor(aViewInformation2D);
aExtractor.process(xSequence);
- aAreaPolyPolygon = aExtractor.getExtractedLineFills();
- aLinePolyPolygon = aExtractor.getExtractedHairlines();
- }
+ // #i102241# check for line results
+ const std::vector< basegfx::B2DPolygon >& rHairlineVector = aExtractor.getExtractedHairlines();
- // Since this may in some cases lead to a count of 0 after
- // the merge i moved the merge to the front.
- if(aAreaPolyPolygon.count())
- {
- // bezier geometry got created, even for straight edges since the given
- // object is a result of DoConvertToPolyObj. For conversion to contour
- // this is not really needed and can be reduced again AFAP
- aAreaPolyPolygon = basegfx::tools::simplifyCurveSegments(aAreaPolyPolygon);
+ if(rHairlineVector.size())
+ {
+ // for SdrObject creation, just copy all to a single Hairline-PolyPolygon
+ for(sal_uInt32 a(0); a < rHairlineVector.size(); a++)
+ {
+ aMergedHairlinePolyPolygon.append(rHairlineVector[a]);
+ }
+ }
- // merge all to a decent result (try to use AND, but remember original)
- const basegfx::B2DPolyPolygon aTemp(aAreaPolyPolygon);
- aAreaPolyPolygon = basegfx::tools::solveCrossovers(aAreaPolyPolygon);
- aAreaPolyPolygon = basegfx::tools::stripNeutralPolygons(aAreaPolyPolygon);
- aAreaPolyPolygon = basegfx::tools::stripDispensablePolygons(aAreaPolyPolygon, false);
+ // #i102241# check for fill rsults
+ const std::vector< basegfx::B2DPolyPolygon >& rLineFillVector(aExtractor.getExtractedLineFills());
- if(!aAreaPolyPolygon.count())
+ if(rLineFillVector.size())
{
- // OOps, AND is empty, this means there were no overlapping parts. Use
- // remembered parts as result
- aAreaPolyPolygon = aTemp;
+ // merge to a single PolyPolygon (OR)
+ aMergedLineFillPolyPolygon = basegfx::tools::mergeToSinglePolyPolygon(rLineFillVector);
}
}
- // || aLinePolyPolygon.Count() removed; the conversion is ONLY
+ // || aMergedHairlinePolyPolygon.Count() removed; the conversion is ONLY
// useful when new closed filled polygons are created
- if(aAreaPolyPolygon.count() || (bForceLineDash && aLinePolyPolygon.count()))
+ if(aMergedLineFillPolyPolygon.count() || (bForceLineDash && aMergedHairlinePolyPolygon.count()))
{
SfxItemSet aSet(pRet->GetMergedItemSet());
XFillStyle eOldFillStyle = ((const XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
@@ -2425,10 +2507,10 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
SdrPathObj* aLineHairlinePart = NULL;
bool bBuildGroup(false);
- if(aAreaPolyPolygon.count())
+ if(aMergedLineFillPolyPolygon.count())
{
// create SdrObject for filled line geometry
- aLinePolygonPart = new SdrPathObj(OBJ_PATHFILL, aAreaPolyPolygon);
+ aLinePolygonPart = new SdrPathObj(OBJ_PATHFILL, aMergedLineFillPolyPolygon);
aLinePolygonPart->SetModel(pRet->GetModel());
// correct item properties
@@ -2443,13 +2525,13 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
aLinePolygonPart->SetMergedItemSet(aSet);
}
- if(aLinePolyPolygon.count())
+ if(aMergedHairlinePolyPolygon.count())
{
// create SdrObject for hairline geometry
// OBJ_PATHLINE is necessary here, not OBJ_PATHFILL. This is intended
// to get a non-filled object. If the poly is closed, the PathObj takes care for
// the correct closed state.
- aLineHairlinePart = new SdrPathObj(OBJ_PATHLINE, aLinePolyPolygon);
+ aLineHairlinePart = new SdrPathObj(OBJ_PATHLINE, aMergedHairlinePolyPolygon);
aLineHairlinePart->SetModel(pRet->GetModel());
aSet.Put(XLineWidthItem(0L));
@@ -2770,15 +2852,18 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundR
pGroup = NULL;
}
- if( eUserCall == SDRUSERCALL_CHGATTR )
+ // notify our UNO shape listeners
+ switch ( eUserCall )
{
- if( pModel && pModel->IsAllowShapePropertyChangeListener() )
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xShapeGuard;
- SvxShape* pShape = const_cast< SdrObject* >(this)->getSvxShape( xShapeGuard );
- if( pShape )
- pShape->onUserCall( eUserCall, rBoundRect );
- }
+ case SDRUSERCALL_RESIZE:
+ notifyShapePropertyChange( ::svx::eShapeSize );
+ // fall through - RESIZE might also imply a change of the position
+ case SDRUSERCALL_MOVEONLY:
+ notifyShapePropertyChange( ::svx::eShapePosition );
+ break;
+ default:
+ // not interested in
+ break;
}
}
@@ -2844,30 +2929,26 @@ sal_Bool SdrObject::IsTransparent( BOOL /*bCheckForAlphaChannel*/) const
return bRet;
}
-void SdrObject::setUnoShape(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape,
- SdrObject::GrantXShapeAccess /*aGrant*/
-)
+void SdrObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& _rxUnoShape )
{
- mxUnoShape = _rxUnoShape;
- mpSvxShape = 0;
+ maWeakUnoShape = _rxUnoShape;
+ mpSvxShape = SvxShape::getImplementation( _rxUnoShape );
+// OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(),
+// "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." );
}
/** only for internal use! */
-SvxShape* SdrObject::getSvxShape( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xShapeGuard )
+SvxShape* SdrObject::getSvxShape() const
{
- xShapeGuard = xShapeGuard.query( mxUnoShape );
- if( xShapeGuard.is() )
- {
- if( !mpSvxShape )
- {
- mpSvxShape = SvxShape::getImplementation( xShapeGuard );
- }
- }
- else if( mpSvxShape )
- {
- mpSvxShape = NULL;
- }
+ DBG_TESTSOLARMUTEX();
+ // retrieving the impl pointer and subsequently using it is not thread-safe, of course, so it needs to be
+ // guarded by the SolarMutex
+
+#if OSL_DEBUG_LEVE > 0
+ uno::Reference< uno::XInterface > xShape( maWeakUnoShape );
+ OSL_ENSURE( !( !xShapeGuard.is() && mpSvxShape ),
+ "SdrObject::getSvxShape: still having IMPL-Pointer to dead object!" );
+#endif
return mpSvxShape;
}
@@ -2875,12 +2956,12 @@ SvxShape* SdrObject::getSvxShape( ::com::sun::star::uno::Reference< ::com::sun::
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SdrObject::getUnoShape()
{
// try weak reference first
- uno::Reference< uno::XInterface > xShape( mxUnoShape );
+ uno::Reference< uno::XInterface > xShape( getWeakUnoShape() );
if( !xShape.is() )
{
+ OSL_ENSURE( mpSvxShape == NULL, "SdrObject::getUnoShape: XShape already dead, but still an IMPL pointer!" );
if ( pPage )
{
- mpSvxShape = 0;
uno::Reference< uno::XInterface > xPage( pPage->getUnoPage() );
if( xPage.is() )
{
@@ -2888,20 +2969,39 @@ SvxShape* SdrObject::getSvxShape( ::com::sun::star::uno::Reference< ::com::sun::
if( pDrawPage )
{
// create one
- mxUnoShape = xShape = pDrawPage->_CreateShape( this );
+ xShape = pDrawPage->_CreateShape( this );
+ impl_setUnoShape( xShape );
}
}
}
else
{
mpSvxShape = SvxDrawPage::CreateShapeByTypeAndInventor( GetObjIdentifier(), GetObjInventor(), this, NULL );
- mxUnoShape = xShape = static_cast< ::cppu::OWeakObject* >( mpSvxShape );
+ maWeakUnoShape = xShape = static_cast< ::cppu::OWeakObject* >( mpSvxShape );
}
}
return xShape;
}
+::svx::PropertyChangeNotifier& SdrObject::getShapePropertyChangeNotifier()
+{
+ DBG_TESTSOLARMUTEX();
+
+ SvxShape* pSvxShape = getSvxShape();
+ ENSURE_OR_THROW( pSvxShape, "no SvxShape, yet!" );
+ return pSvxShape->getShapePropertyChangeNotifier();
+}
+
+void SdrObject::notifyShapePropertyChange( const ::svx::ShapeProperty _eProperty ) const
+{
+ DBG_TESTSOLARMUTEX();
+
+ SvxShape* pSvxShape = const_cast< SdrObject* >( this )->getSvxShape();
+ if ( pSvxShape )
+ return pSvxShape->getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty );
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// transformation interface for StarOfficeAPI. This implements support for
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 47fc34dba5ba..102b5b1eb824 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -40,7 +40,6 @@
#include <svx/svdpool.hxx>
#include <svx/svdetc.hxx>
#include <svx/svdtrans.hxx>
-#include "svdtouch.hxx"
#include <svx/svdhdl.hxx>
#include <svx/svddrag.hxx>
#include <svx/svdmodel.hxx>
@@ -61,6 +60,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <svx/sdrhittesthelper.hxx>
// #i32599#
inline double ImplTwipsToMM(double fVal) { return (fVal * (127.0 / 72.0)); }
@@ -253,31 +253,6 @@ UINT16 SdrCaptionObj::GetObjIdentifier() const
return UINT16(OBJ_CAPTION);
}
-SdrObject* SdrCaptionObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- sal_Bool bHit(SdrRectObj::CheckHit(rPnt,nTol,pVisiLayer) != NULL);
- if (!bHit) {
- INT32 nMyTol=nTol;
- INT32 nWdt = ((XLineWidthItem&)(GetObjectItem(XATTR_LINEWIDTH))).GetValue();
- nWdt++;
- nWdt /= 2;
-
- if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
- Rectangle aR(rPnt,rPnt);
- aR.Left() -=nMyTol;
- aR.Right() +=nMyTol;
- aR.Top() -=nMyTol;
- aR.Bottom()+=nMyTol;
- bHit = IsRectTouchesLine(aTailPoly,aR);
- }
- return bHit ? (SdrObject*)this : NULL;
-}
-
void SdrCaptionObj::operator=(const SdrObject& rObj)
{
SdrRectObj::operator=(rObj);
@@ -377,8 +352,10 @@ bool SdrCaptionObj::beginSpecialDrag(SdrDragStat& rDrag) const
Point aHit(rDrag.GetStart());
- if(SdrRectObj::CheckHit(aHit, 0, NULL))
+ if(rDrag.GetPageView() && SdrObjectPrimitiveHit(*this, aHit, 0, *rDrag.GetPageView(), 0, false))
+ {
return true;
+ }
}
else
{
@@ -424,26 +401,35 @@ bool SdrCaptionObj::applySpecialDrag(SdrDragStat& rDrag)
String SdrCaptionObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
- const SdrHdl* pHdl = rDrag.GetHdl();
+ const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
- if(pHdl && 0 == pHdl->GetPolyNum())
+ if(bCreateComment)
{
- return SdrRectObj::getSpecialDragComment(rDrag);
+ return String();
}
else
{
- XubString aStr;
+ const SdrHdl* pHdl = rDrag.GetHdl();
- if(!pHdl)
+ if(pHdl && 0 == pHdl->GetPolyNum())
{
- ImpTakeDescriptionStr(STR_DragCaptFram, aStr);
+ return SdrRectObj::getSpecialDragComment(rDrag);
}
else
{
- ImpTakeDescriptionStr(STR_DragCaptTail, aStr);
- }
+ XubString aStr;
- return aStr;
+ if(!pHdl)
+ {
+ ImpTakeDescriptionStr(STR_DragCaptFram, aStr);
+ }
+ else
+ {
+ ImpTakeDescriptionStr(STR_DragCaptTail, aStr);
+ }
+
+ return aStr;
+ }
}
}
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 9c8b8bf81937..b3175566d561 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -40,7 +40,6 @@
#include <svx/svdocirc.hxx>
#include <math.h>
#include <svx/xpool.hxx>
-#include "svdtouch.hxx"
#include <svx/svdattr.hxx>
#include <svx/svdpool.hxx>
#include <svx/svdattrx.hxx>
@@ -312,127 +311,6 @@ void SdrCircObj::RecalcXPoly()
mpXPoly = new XPolygon(aPolyCirc);
}
-SdrObject* SdrCircObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- Point aPt(rPnt);
- Point aZero;
- aPt.X()-=aRect.Left();
- aPt.Y()-=aRect.Top();
-
- INT32 nMyTol=nTol;
- FASTBOOL bFilled=meCircleKind!=OBJ_CARC && (bTextFrame || HasFill());
-
- INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
- long nBoundWdt=aRect.GetWidth()-1;
- long nBoundHgt=aRect.GetHeight()-1;
- if (meCircleKind==OBJ_SECT) {
- long nTmpWink=NormAngle360(nEndWink-nStartWink);
- if (nTmpWink<9000) {
- nBoundWdt=0;
- nBoundHgt=0;
- } else if (nTmpWink<27000) {
- nBoundWdt/=2;
- nBoundHgt/=2;
- }
- }
- if (bFilled && nBoundWdt>short(nTol) && nBoundHgt>short(nTol) && Abs(aGeo.nShearWink)<=4500) nMyTol=0; // Keine Toleranz noetig hier
- if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Umrandung keine Toleranz noetig
-
- // Den uebergebenen Punkt auf den gedrehten, geshearten Kreis transformieren
- // Unrotate:
- if (aGeo.nDrehWink!=0) RotatePoint(aPt,aZero,-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
- // Unshear:
- if (aGeo.nShearWink!=0) ShearPoint(aPt,aZero,-aGeo.nTan); // -tan fuer Umkehrung
-
- long nXRad=aRect.GetWidth()/2; if (nXRad<1) nXRad=1;
- long nYRad=aRect.GetHeight()/2; if (nYRad<1) nYRad=1;
-
- // Die wirklichen Radien fuer spaeter merken
- long nXRadReal=nXRad;
- long nYRadReal=nYRad;
- aPt.X()-=nXRad;
- aPt.Y()-=nYRad;
- Point aPtNoStretch(aPt);
-
- if (nXRad>nYRad) {
- aPt.Y()=BigMulDiv(aPt.Y(),nXRad,nYRad);
- // Da die Strichstaerke bei Ellipsen ueberall gleich ist:
- if (Abs(aPt.X())<Abs(aPt.Y())) {
- nMyTol=BigMulDiv(nMyTol,nXRad,nYRad);
- }
- nYRad=nXRad;
- }
- if (nYRad>nXRad) {
- aPt.X()=BigMulDiv(aPt.X(),nYRad,nXRad);
- // Da die Strichstaerke bei Ellipsen ueberall gleich ist:
- if (Abs(aPt.Y())<Abs(aPt.X())) {
- nMyTol=BigMulDiv(nMyTol,nYRad,nXRad);
- }
- nXRad=nYRad;
- }
-
- // Die BigInts haben bei *= leider ein Vorzeichenproblem (a*=a;)
- // (SV250A), deshalb hier soviele Instanzen. (JOE)
- long nAussen=nXRad+nMyTol;
- BigInt nBigTmpA(nAussen);
- BigInt nAusRadQ(nBigTmpA*nBigTmpA);
- long nInnen=nXRad-nMyTol; if (nInnen<=0) nInnen=0;
- BigInt nBigTmpI(nInnen);
- // wird sonst nicht benoetigt, ggf. BugMul sparen:
- BigInt nInnRadQ((!bFilled && nInnen!=0) ? nBigTmpI*nBigTmpI : nBigTmpI);
-
- // Radius von aPt berechnen
- BigInt nBigTmpX(aPt.X());
- BigInt nBigTmpY(aPt.Y());
- BigInt nPntRadQ(nBigTmpX*nBigTmpX+nBigTmpY*nBigTmpY);
-
- sal_Bool bRet(sal_False);
- if (nPntRadQ<=nAusRadQ) { // sonst ausserhalb
- if (nInnen==0) bRet = sal_True;
- else if (meCircleKind==OBJ_CIRC) { // Vollkreis
- if (bFilled) bRet = sal_True;
- else if (nPntRadQ>=nInnRadQ) bRet = sal_True;
- } else { // Teilkreise
- long nWink=NormAngle360(GetAngle(aPt));
- long a=nStartWink;
- long e=nEndWink;
- if (e<a) e+=36000;
- if (nWink<a) nWink+=36000;
- if (nWink>=a && nWink<=e) {
- if (bFilled) bRet = sal_True;
- else if (nPntRadQ>=nInnRadQ) bRet = sal_True;
- }
- if (!bRet) {
- Rectangle aR(aPtNoStretch.X()-nMyTol,aPtNoStretch.Y()-nMyTol,
- aPtNoStretch.X()+nMyTol,aPtNoStretch.Y()+nMyTol);
- Point aP1(GetWinkPnt(aRect,nStartWink));
- aP1.X()-=aRect.Left()+nXRadReal;
- aP1.Y()-=aRect.Top()+nYRadReal;
- Point aP2(GetWinkPnt(aRect,nEndWink));
- aP2.X()-=aRect.Left()+nXRadReal;
- aP2.Y()-=aRect.Top()+nYRadReal;
- if (meCircleKind==OBJ_SECT) { // Kreissektor: nur noch die beiden Strecken testen
- bRet=IsRectTouchesLine(aZero,aP1,aR) || IsRectTouchesLine(aZero,aP2,aR);
- }
- if (meCircleKind==OBJ_CCUT) { // Kreisabschnitt noch die Sehne und die MaeuseEcke (Dreieck) testen
- if (IsRectTouchesLine(aP1,aP2,aR)) bRet = sal_True; // die Sehne
- else if (bFilled) { // und nun die Maeusescke
- const Polygon aPoly(GetXPoly().getB2DPolygon().getDefaultAdaptiveSubdivision());
- bRet=IsPointInsidePoly(aPoly,rPnt);
- }
- }
- }
- }
- }
- if (!bRet && HasText()) bRet=SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
- return bRet ? (SdrObject*)this : NULL;
-}
-
void SdrCircObj::TakeObjNameSingul(XubString& rName) const
{
USHORT nID=STR_ObjNameSingulCIRC;
@@ -711,23 +589,56 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag)
String SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
- const bool bWink(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind());
+ const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
- if(bWink)
+ if(bCreateComment)
{
XubString aStr;
- const sal_Int32 nWink(1 == rDrag.GetHdl()->GetPointNum() ? nStartWink : nEndWink);
+ ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
+ const sal_uInt32 nPntAnz(rDrag.GetPointAnz());
- ImpTakeDescriptionStr(STR_DragCircAngle, aStr);
- aStr.AppendAscii(" (");
- aStr += GetWinkStr(nWink,FALSE);
- aStr += sal_Unicode(')');
+ if(OBJ_CIRC != meCircleKind && nPntAnz > 2)
+ {
+ ImpCircUser* pU = (ImpCircUser*)rDrag.GetUser();
+ sal_Int32 nWink;
+
+ aStr.AppendAscii(" (");
+
+ if(3 == nPntAnz)
+ {
+ nWink = pU->nStart;
+ }
+ else
+ {
+ nWink = pU->nEnd;
+ }
+
+ aStr += GetWinkStr(nWink,FALSE);
+ aStr += sal_Unicode(')');
+ }
return aStr;
}
else
{
- return SdrTextObj::getSpecialDragComment(rDrag);
+ const bool bWink(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind());
+
+ if(bWink)
+ {
+ XubString aStr;
+ const sal_Int32 nWink(1 == rDrag.GetHdl()->GetPointNum() ? nStartWink : nEndWink);
+
+ ImpTakeDescriptionStr(STR_DragCircAngle, aStr);
+ aStr.AppendAscii(" (");
+ aStr += GetWinkStr(nWink,FALSE);
+ aStr += sal_Unicode(')');
+
+ return aStr;
+ }
+ else
+ {
+ return SdrTextObj::getSpecialDragComment(rDrag);
+ }
}
}
@@ -820,6 +731,14 @@ FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat)
SetBoundRectDirty();
bSnapRectDirty=TRUE;
SetXPolyDirty();
+
+ // #i103058# push current angle settings to ItemSet to
+ // allow FullDrag visualisation
+ if(rStat.GetPointAnz() >= 4)
+ {
+ ImpSetCircInfoToAttr();
+ }
+
return TRUE;
}
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 4d4b9a985e15..e55eeaae42b7 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -44,7 +44,6 @@
#include <svx/svddrgv.hxx>
#include "svddrgm1.hxx"
#include <svx/svdhdl.hxx>
-#include "svdtouch.hxx"
#include <svx/svdtrans.hxx>
#include <svx/svdetc.hxx>
#include "svdglob.hxx" // StringCache
@@ -58,6 +57,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <svx/sdrhittesthelper.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -417,30 +417,6 @@ void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
rRect=GetSnapRect();
}
-SdrObject* SdrEdgeObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- INT32 nMyTol=nTol;
- INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
- if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
- Rectangle aR(rPnt,rPnt);
- aR.Left() -=nMyTol;
- aR.Right() +=nMyTol;
- aR.Top() -=nMyTol;
- aR.Bottom()+=nMyTol;
-
- sal_Bool bHit(sal_False);
-
- const Polygon aPoly(pEdgeTrack->getB2DPolygon().getDefaultAdaptiveSubdivision());
- bHit = IsRectTouchesLine(aPoly,aR);
- if (!bHit && HasText()) bHit = SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
- return bHit ? (SdrObject*)this : NULL;
-}
-
FASTBOOL SdrEdgeObj::IsNode() const
{
return TRUE;
@@ -1944,11 +1920,21 @@ bool SdrEdgeObj::applySpecialDrag(SdrDragStat& rDragStat)
return true;
}
-String SdrEdgeObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const
+String SdrEdgeObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
- XubString aStr;
- ImpTakeDescriptionStr(STR_DragEdgeTail,aStr);
- return aStr;
+ const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
+
+ if(bCreateComment)
+ {
+ return String();
+ }
+ else
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_DragEdgeTail, aStr);
+
+ return aStr;
+ }
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -2134,7 +2120,8 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV,
USHORT nGesAnz=nConAnz+9;
FASTBOOL bUserFnd=FALSE;
ULONG nBestDist=0xFFFFFFFF;
- for (USHORT i=0; i<nGesAnz; i++) {
+ for (USHORT i=0; i<nGesAnz; i++)
+ {
FASTBOOL bUser=i<nConAnz;
FASTBOOL bVertex=i>=nConAnz+0 && i<nConAnz+4;
FASTBOOL bCorner=i>=nConAnz+4 && i<nConAnz+8;
@@ -2191,7 +2178,9 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV,
}
// Falls kein Konnektor getroffen wird nochmal
// HitTest versucht fuer BestConnector (=bCenter)
- if (!bFnd && !bEdge && pObj->IsHit(rPt,nBoundHitTol,&rVisLayer))
+ if(!bFnd &&
+ !bEdge &&
+ SdrObjectPrimitiveHit(*pObj, rPt, nBoundHitTol, rPV, &rVisLayer, false))
{
// #109007#
// Suppress default connect at object inside bound
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 805577df9b72..3f5da01e101b 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -581,13 +581,6 @@ sal_Bool SdrGrafObj::ImpUpdateGraphicLink() const
// -----------------------------------------------------------------------------
-SdrObject* SdrGrafObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- return ImpCheckHit( rPnt, nTol, pVisiLayer, TRUE );
-}
-
-// -----------------------------------------------------------------------------
-
void SdrGrafObj::TakeObjNameSingul(XubString& rName) const
{
switch( pGraphic->GetType() )
@@ -666,6 +659,23 @@ void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const
// -----------------------------------------------------------------------------
+SdrObject* SdrGrafObj::getFullDragClone() const
+{
+ // call parent
+ SdrGrafObj* pRetval = static_cast< SdrGrafObj* >(SdrRectObj::getFullDragClone());
+
+ // #i103116# the full drag clone leads to problems
+ // with linked graphics, so reset the link in this
+ // temporary interaction object and load graphic
+ if(pRetval && IsLinkedGraphic())
+ {
+ pRetval->ForceSwapIn();
+ pRetval->ReleaseGraphicLink();
+ }
+
+ return pRetval;
+}
+
void SdrGrafObj::operator=( const SdrObject& rObj )
{
SdrRectObj::operator=( rObj );
@@ -1097,6 +1107,14 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
pGraphic->SetUserData();
}
+
+ // #i102380#
+ sdr::contact::ViewContactOfGraphic* pVC = dynamic_cast< sdr::contact::ViewContactOfGraphic* >(&GetViewContact());
+
+ if(pVC)
+ {
+ pVC->flushGraphicObjects();
+ }
}
}
}
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 879a53851919..5782ca91b74b 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -295,32 +295,6 @@ const Rectangle& SdrObjGroup::GetSnapRect() const
// <--
}
-SdrObject* SdrObjGroup::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if (pSub->GetObjCount()!=0) {
- return pSub->CheckHit(rPnt,nTol,pVisiLayer);
- } else { // ansonsten ist es eine leere Gruppe
- if(!pVisiLayer || pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- Rectangle aAussen(aOutRect);
- aAussen.Top() -=nTol;
- aAussen.Left() -=nTol;
- aAussen.Bottom()+=nTol;
- aAussen.Right() +=nTol;
- nTol++;
- Rectangle aInnen(aOutRect);
- aInnen.Top() +=nTol;
- aInnen.Left() +=nTol;
- aInnen.Bottom()-=nTol;
- aInnen.Right() -=nTol;
- if (aAussen.IsInside(rPnt) && !aInnen.IsInside(rPnt)) {
- return (SdrObject*)this;
- }
- }
- }
- return NULL;
-}
-
void SdrObjGroup::operator=(const SdrObject& rObj)
{
if(rObj.IsGroupObject())
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 6f97d4051b28..330b7f5c37f6 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -36,7 +36,6 @@
#include "svditext.hxx" //
#include <svx/xpoly.hxx>
#include <svx/svdtrans.hxx>
-#include "svdtouch.hxx"
#include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svddrag.hxx>
@@ -766,37 +765,6 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
}
}
-SdrObject* SdrMeasureObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- sal_Bool bHit(sal_False);
- INT32 nMyTol=nTol;
- INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
- if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
- Rectangle aR(rPnt,rPnt);
- aR.Left() -=nMyTol;
- aR.Right() +=nMyTol;
- aR.Top() -=nMyTol;
- aR.Bottom()+=nMyTol;
-
- if (bTextDirty) UndirtyText();
- ImpMeasureRec aRec;
- ImpMeasurePoly aMPol;
- ImpTakeAttr(aRec);
- ImpCalcGeometrics(aRec,aMPol);
- bHit=IsRectTouchesLine(aMPol.aMainline1.aP1,aMPol.aMainline1.aP2,aR) ||
- IsRectTouchesLine(aMPol.aMainline2.aP1,aMPol.aMainline2.aP2,aR) ||
- IsRectTouchesLine(aMPol.aHelpline1.aP1,aMPol.aHelpline1.aP2,aR) ||
- IsRectTouchesLine(aMPol.aHelpline2.aP1,aMPol.aHelpline2.aP2,aR);
- // und nun noch ggf. den Textbereich checken
- bHit=bHit || SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
- return bHit ? (SdrObject*)this : NULL;
-}
-
void SdrMeasureObj::operator=(const SdrObject& rObj)
{
SdrTextObj::operator=(rObj);
@@ -1381,12 +1349,6 @@ void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle
SdrTextObj::TakeTextEditArea(pPaperMin,pPaperMax,pViewInit,pViewMin);
}
-SdrObject* SdrMeasureObj::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if (bTextDirty) UndirtyText();
- return SdrTextObj::CheckTextEditHit(rPnt,nTol,pVisiLayer);
-}
-
USHORT SdrMeasureObj::GetOutlinerViewAnchorMode() const
{
if (bTextDirty) UndirtyText();
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 595b31b5207e..a2b6991773e1 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1478,48 +1478,48 @@ void SdrOle2Obj::SetClosedObj( bool bIsClosed )
// -----------------------------------------------------------------------------
-SdrObject* SdrOle2Obj::getFullDragClone() const
-{
- // special handling for OLE. The default handling works, but is too
- // slow when the whole OLE needs to be cloned. Get the Metafile and
- // create a graphic object with it
- Graphic* pOLEGraphic = GetGraphic();
- SdrObject* pClone = 0;
-
- if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
- {
- pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic();
- }
-
- if(pOLEGraphic)
- {
- pClone = new SdrGrafObj(*pOLEGraphic, GetSnapRect());
-
- // this would be the place where to copy all attributes
- // when OLE will support fill and line style
- // pClone->SetMergedItem(pOleObject->GetMergedItemSet());
- }
- else
- {
- // #i100710# pOLEGraphic may be zero (no visualisation available),
- // so we need to use the OLE replacement graphic
- pClone = new SdrRectObj(GetSnapRect());
-
- // gray outline
- pClone->SetMergedItem(XLineStyleItem(XLINE_SOLID));
- const svtools::ColorConfig aColorConfig;
- const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
- pClone->SetMergedItem(XLineColorItem(String(), aColor.nColor));
-
- // bitmap fill
- pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
- pClone->SetMergedItem(XFillBitmapItem(String(), GetEmtyOLEReplacementBitmap()));
- pClone->SetMergedItem(XFillBmpTileItem(false));
- pClone->SetMergedItem(XFillBmpStretchItem(false));
- }
-
- return pClone;
-}
+SdrObject* SdrOle2Obj::getFullDragClone() const
+{
+ // special handling for OLE. The default handling works, but is too
+ // slow when the whole OLE needs to be cloned. Get the Metafile and
+ // create a graphic object with it
+ Graphic* pOLEGraphic = GetGraphic();
+ SdrObject* pClone = 0;
+
+ if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ {
+ pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic();
+ }
+
+ if(pOLEGraphic)
+ {
+ pClone = new SdrGrafObj(*pOLEGraphic, GetSnapRect());
+
+ // this would be the place where to copy all attributes
+ // when OLE will support fill and line style
+ // pClone->SetMergedItem(pOleObject->GetMergedItemSet());
+ }
+ else
+ {
+ // #i100710# pOLEGraphic may be zero (no visualisation available),
+ // so we need to use the OLE replacement graphic
+ pClone = new SdrRectObj(GetSnapRect());
+
+ // gray outline
+ pClone->SetMergedItem(XLineStyleItem(XLINE_SOLID));
+ const svtools::ColorConfig aColorConfig;
+ const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
+ pClone->SetMergedItem(XLineColorItem(String(), aColor.nColor));
+
+ // bitmap fill
+ pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
+ pClone->SetMergedItem(XFillBitmapItem(String(), GetEmtyOLEReplacementBitmap()));
+ pClone->SetMergedItem(XFillBmpTileItem(false));
+ pClone->SetMergedItem(XFillBmpStretchItem(false));
+ }
+
+ return pClone;
+}
// -----------------------------------------------------------------------------
@@ -1578,13 +1578,6 @@ UINT16 SdrOle2Obj::GetObjIdentifier() const
// -----------------------------------------------------------------------------
-SdrObject* SdrOle2Obj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- return ImpCheckHit(rPnt,nTol,pVisiLayer,TRUE,TRUE);
-}
-
-// -----------------------------------------------------------------------------
-
void SdrOle2Obj::TakeObjNameSingul(XubString& rName) const
{
rName = ImpGetResStr(bFrame ? STR_ObjNameSingulFrame : STR_ObjNameSingulOLE2);
@@ -1874,6 +1867,14 @@ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
SdrRectObj::NbcSetSnapRect(rRect);
if( pModel && !pModel->isLocked() )
ImpSetVisAreaSize();
+
+ if ( xObjRef.is() && IsChart() )
+ {
+ //#i103460# charts do not necessaryly have an own size within ODF files,
+ //for this case they need to use the size settings from the surrounding frame,
+ //which is made available with this method as there is no other way
+ xObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) );
+ }
}
// -----------------------------------------------------------------------------
@@ -1916,40 +1917,60 @@ void SdrOle2Obj::NbcMove(const Size& rSize)
// -----------------------------------------------------------------------------
-sal_Bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
+sal_Bool SdrOle2Obj::CanUnloadRunningObj( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
{
sal_Bool bResult = sal_False;
sal_Int32 nState = xObj->getCurrentState();
if ( nState == embed::EmbedStates::LOADED )
{
+ // the object is already unloaded
bResult = sal_True;
}
else
{
- sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
uno::Reference < util::XModifiable > xModifiable( xObj->getComponent(), uno::UNO_QUERY );
-
- if ( embed::EmbedMisc::MS_EMBED_ALWAYSRUN != ( nMiscStatus & embed::EmbedMisc::MS_EMBED_ALWAYSRUN ) &&
- embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY != ( nMiscStatus & embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY ) &&
- !( xModifiable.is() && xModifiable->isModified() ) &&
- !( nState == embed::EmbedStates::INPLACE_ACTIVE || nState == embed::EmbedStates::UI_ACTIVE || nState == embed::EmbedStates::ACTIVE ) )
+ if ( !xModifiable.is() )
+ bResult = sal_True;
+ else
{
- try
+ sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
+
+ if ( embed::EmbedMisc::MS_EMBED_ALWAYSRUN != ( nMiscStatus & embed::EmbedMisc::MS_EMBED_ALWAYSRUN ) &&
+ embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY != ( nMiscStatus & embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY ) &&
+ !( xModifiable.is() && xModifiable->isModified() ) &&
+ !( nState == embed::EmbedStates::INPLACE_ACTIVE || nState == embed::EmbedStates::UI_ACTIVE || nState == embed::EmbedStates::ACTIVE ) )
{
- xObj->changeState( embed::EmbedStates::LOADED );
bResult = sal_True;
}
- catch( ::com::sun::star::uno::Exception& e )
- {
- (void)e;
- DBG_ERROR(
- (OString("SdrOle2Obj::Unload=(), "
- "exception caught: ") +
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
- }
+ }
+ }
+
+ return bResult;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
+{
+ sal_Bool bResult = sal_False;
+
+ if ( CanUnloadRunningObj( xObj, nAspect ) )
+ {
+ try
+ {
+ xObj->changeState( embed::EmbedStates::LOADED );
+ bResult = sal_True;
+ }
+ catch( ::com::sun::star::uno::Exception& e )
+ {
+ (void)e;
+ DBG_ERROR(
+ (OString("SdrOle2Obj::Unload=(), "
+ "exception caught: ") +
+ rtl::OUStringToOString(
+ comphelper::anyToString( cppu::getCaughtException() ),
+ RTL_TEXTENCODING_UTF8 )).getStr() );
}
}
@@ -2195,82 +2216,7 @@ sal_Bool SdrOle2Obj::AddOwnLightClient()
//////////////////////////////////////////////////////////////////////////////
-bool SdrOle2Obj::executeOldDoPaintPreparations(SdrPageView* pPageVew) const
-{
- bool bIsActive(false);
- // copy of the old SdrOle2Obj::Do_PaintObject stuff which evtl. needs
- // to be emulated.
-
- // //charts must be painted resolution dependent!! #i82893#, #i75867#
- // if( ChartPrettyPainter::IsChart(xObjRef) && ChartPrettyPainter::ShouldPrettyPaintChartOnThisDevice( rOut.GetOutDev() ) )
- // if( !rOut.GetOffset().nA && !rOut.GetOffset().nB )//offset!=0 is the scenario 'copy -> past special gdi metafile' which does not work with direct painting so far
- // if( ChartPrettyPainter::DoPrettyPaintChart( this->getXModel(), rOut.GetOutDev(), aRect ) )
- // return bOk;
- //
- // if( !GetGraphic() )
- // ( (SdrOle2Obj*) this)->GetObjRef_Impl(); // try to create embedded object
-
- // this one can be used directly, just reformatting a bit
- if(!GetGraphic())
- {
- // try to create embedded object
- const_cast< SdrOle2Obj* >(this)->GetObjRef_Impl();
- }
-
- // if ( xObjRef.is() )
- // {
- // sal_Int64 nMiscStatus = xObjRef->getStatus( GetAspect() );
- // if( !bSizProt && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE) )
- // ( (SdrOle2Obj*) this)->bSizProt = TRUE;
-
- // old stuff which relies on xObjRef and nMiscStatus
- if(xObjRef.is())
- {
- const sal_Int64 nMiscStatus(xObjRef->getStatus(GetAspect()));
-
- // this hack (to change model data during PAINT argh(!)) can also be reproduced
- // directly
- if(!IsResizeProtect() && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE))
- {
- const_cast< SdrOle2Obj* >(this)->SetResizeProtect(true);
- }
-
- // OutputDevice* pOut = rOut.GetOutDev();
- //
- // //TODO/LATER: currently it's not possible to compare the windows, the XOutDev contains a virtual device
- // sal_Int32 nState = xObjRef->getCurrentState();
- // //if ( ( nState != embed::EmbedStates::INPLACE_ACTIVE && nState != embed::EmbedStates::UI_ACTIVE ) ||
- // // pModel && SfxInPlaceClient::GetActiveWindow( pModel->GetPersist(), xObjRef ) != pOut )
- // {
- // if ( nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
- // {
- // // PlugIn-Objekt connecten
- // if (rInfoRec.pPV!=NULL)
- // {
- // SdrOle2Obj* pOle2Obj = (SdrOle2Obj*) this;
- // SdrView* pSdrView = (SdrView*) &rInfoRec.pPV->GetView();
- // pSdrView->DoConnect(pOle2Obj);
- // }
- // }
-
- // nState is used in old paint to see if OLE is activated and to do
- // a different paint
- const sal_Int32 nState(xObjRef->getCurrentState());
-
- bIsActive = (nState == embed::EmbedStates::ACTIVE);
-
- // for this one i need the view.
- if(pPageVew && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE))
- {
- // connect plugin object
- pPageVew->GetView().DoConnect(const_cast< SdrOle2Obj* >(this));
- }
- }
-
- return bIsActive;
-}
-
-Bitmap SdrOle2Obj::GetEmtyOLEReplacementBitmap() const
+Bitmap SdrOle2Obj::GetEmtyOLEReplacementBitmap()
{
return Bitmap(ResId(BMP_SVXOLEOBJ, *ImpGetResMgr()));
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index d40c4a40d0ad..f44efe3c5dfa 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -37,7 +37,6 @@
#include <svx/xpool.hxx>
#include <svx/xpoly.hxx>
#include <svx/svdattr.hxx>
-#include "svdtouch.hxx"
#include <svx/svdtrans.hxx>
#include <svx/svdetc.hxx>
#include <svx/svddrag.hxx>
@@ -79,6 +78,10 @@ inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); }
#include <basegfx/curve/b2dcubicbezier.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+// #i89784#
+#include <svx/sdr/attribute/sdrtextattribute.hxx>
+#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
+
using namespace sdr;
inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed)
@@ -948,32 +951,86 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag)
String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) const
{
- ImpSdrPathDragData* pDragData = mpSdrPathDragData;
+ XubString aStr;
+ const SdrHdl* pHdl = rDrag.GetHdl();
+ const bool bCreateComment(rDrag.GetView() && &mrSdrPathObject == rDrag.GetView()->GetCreateObj());
- if(!pDragData)
+ if(bCreateComment && rDrag.GetUser())
{
- // getSpecialDragComment is also used from create, so fallback to GetUser()
- // when mpSdrPathDragData is not set
- pDragData = (ImpSdrPathDragData*)rDrag.GetUser();
- }
+ // #i103058# re-add old creation comment mode
+ ImpPathCreateUser* pU = (ImpPathCreateUser*)rDrag.GetUser();
+ const SdrObjKind eKindMerk(meObjectKind);
+ mrSdrPathObject.meKind = pU->eAktKind;
+ mrSdrPathObject.ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
+ mrSdrPathObject.meKind = eKindMerk;
- if(!pDragData)
- {
- DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig");
- return String();
- }
+ Point aPrev(rDrag.GetPrev());
+ Point aNow(rDrag.GetNow());
- // Hier auch mal pDragData verwenden !!!
- XubString aStr;
+ if(pU->bLine)
+ aNow = pU->aLineEnd;
- const SdrHdl* pHdl = rDrag.GetHdl();
+ aNow -= aPrev;
+ aStr.AppendAscii(" (");
+
+ XubString aMetr;
+
+ if(pU->bCircle)
+ {
+ mrSdrPathObject.GetModel()->TakeWinkStr(Abs(pU->nCircRelWink), aMetr);
+ aStr += aMetr;
+ aStr.AppendAscii(" r=");
+ mrSdrPathObject.GetModel()->TakeMetricStr(pU->nCircRadius, aMetr, TRUE);
+ aStr += aMetr;
+ }
+
+ aStr.AppendAscii("dx=");
+ mrSdrPathObject.GetModel()->TakeMetricStr(aNow.X(), aMetr, TRUE);
+ aStr += aMetr;
+
+ aStr.AppendAscii(" dy=");
+ mrSdrPathObject.GetModel()->TakeMetricStr(aNow.Y(), aMetr, TRUE);
+ aStr += aMetr;
- if(!mrSdrPathObject.GetModel() || !pHdl)
+ if(!IsFreeHand(meObjectKind))
+ {
+ INT32 nLen(GetLen(aNow));
+ aStr.AppendAscii(" l=");
+ mrSdrPathObject.GetModel()->TakeMetricStr(nLen, aMetr, TRUE);
+ aStr += aMetr;
+
+ INT32 nWink(GetAngle(aNow));
+ aStr += sal_Unicode(' ');
+ mrSdrPathObject.GetModel()->TakeWinkStr(nWink, aMetr);
+ aStr += aMetr;
+ }
+
+ aStr += sal_Unicode(')');
+ }
+ else if(!mrSdrPathObject.GetModel() || !pHdl)
{
+ // #i103058# fallback when no model and/or Handle, both needed
+ // for else-path
mrSdrPathObject.ImpTakeDescriptionStr(STR_DragPathObj, aStr);
}
else
{
+ // #i103058# standard for modification; model and handle needed
+ ImpSdrPathDragData* pDragData = mpSdrPathDragData;
+
+ if(!pDragData)
+ {
+ // getSpecialDragComment is also used from create, so fallback to GetUser()
+ // when mpSdrPathDragData is not set
+ pDragData = (ImpSdrPathDragData*)rDrag.GetUser();
+ }
+
+ if(!pDragData)
+ {
+ DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig");
+ return String();
+ }
+
if(!pDragData->IsMultiPointDrag() && pDragData->bEliminate)
{
// Punkt von ...
@@ -983,7 +1040,7 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag)
XubString aStr2(ImpGetResStr(STR_EditDelete));
// UNICODE: Punkt von ... loeschen
- aStr2.SearchAndReplaceAscii("%O", aStr);
+ aStr2.SearchAndReplaceAscii("%1", aStr);
return aStr2;
}
@@ -1746,7 +1803,10 @@ void SdrPathObj::ImpForceKind()
// was called, once here below and once on a 2nd place below.
// #i10659# for SdrTextObj, keep aRect up to date
- aRect = ImpGetBoundRect(GetPathPoly());
+ if(GetPathPoly().count())
+ {
+ aRect = ImpGetBoundRect(GetPathPoly());
+ }
}
// #i75974# adapt polygon state to object type. This may include a reinterpretation
@@ -1825,51 +1885,6 @@ UINT16 SdrPathObj::GetObjIdentifier() const
return USHORT(meKind);
}
-SdrObject* SdrPathObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- sal_Bool bHit(sal_False);
- const basegfx::B2DPoint aHitPoint(rPnt.X(), rPnt.Y());
-
- if(GetPathPoly().isClosed() && (bTextFrame || HasFill()))
- {
- // hit in filled polygon? Subdivbide needed for better precision
- if(GetPathPoly().areControlPointsUsed())
- {
- bHit = basegfx::tools::isInside(GetPathPoly().getDefaultAdaptiveSubdivision(), aHitPoint);
- }
- else
- {
- bHit = basegfx::tools::isInside(GetPathPoly(), aHitPoint);
- }
- }
-
- if(!bHit)
- {
- // hit polygon line?
- const double fHalfLineWidth(ImpGetLineWdt() / 2.0);
- double fDistance(nTol);
-
- if(fHalfLineWidth > fDistance)
- {
- fDistance = fHalfLineWidth;
- }
-
- bHit = basegfx::tools::isInEpsilonRange(GetPathPoly(), aHitPoint, fDistance);
- }
-
- if(!bHit && !IsTextFrame() && HasText())
- {
- bHit = (0L != SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer));
- }
-
- return bHit ? (SdrObject*)this : 0L;
-}
-
void SdrPathObj::operator=(const SdrObject& rObj)
{
SdrTextObj::operator=(rObj);
@@ -2189,12 +2204,26 @@ bool SdrPathObj::applySpecialDrag(SdrDragStat& rDrag)
String SdrPathObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
String aRetval;
- ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this));
- bool bDidWork(aDragAndCreate.beginPathDrag((SdrDragStat&)rDrag));
- if(bDidWork)
+ if(mpDAC)
+ {
+ // #i103058# also get a comment when in creation
+ const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
+
+ if(bCreateComment)
+ {
+ aRetval = mpDAC->getSpecialDragComment(rDrag);
+ }
+ }
+ else
{
- aRetval = aDragAndCreate.getSpecialDragComment(rDrag);
+ ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this));
+ bool bDidWork(aDragAndCreate.beginPathDrag((SdrDragStat&)rDrag));
+
+ if(bDidWork)
+ {
+ aRetval = aDragAndCreate.getSpecialDragComment(rDrag);
+ }
}
return aRetval;
@@ -2424,7 +2453,10 @@ void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
void SdrPathObj::RecalcSnapRect()
{
- maSnapRect = ImpGetBoundRect(GetPathPoly());
+ if(GetPathPoly().count())
+ {
+ maSnapRect = ImpGetBoundRect(GetPathPoly());
+ }
}
void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect)
@@ -2514,8 +2546,11 @@ void SdrPathObj::NbcSetPoint(const Point& rPnt, sal_uInt32 nHdlNum)
}
else
{
- // #i10659# for SdrTextObj, keep aRect up to date
- aRect = ImpGetBoundRect(GetPathPoly()); // fuer SdrTextObj
+ if(GetPathPoly().count())
+ {
+ // #i10659# for SdrTextObj, keep aRect up to date
+ aRect = ImpGetBoundRect(GetPathPoly()); // fuer SdrTextObj#
+ }
}
SetRectsDirty();
@@ -2717,7 +2752,19 @@ SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index)
SdrObject* SdrPathObj::DoConvertToPolyObj(BOOL bBezier) const
{
- SdrObject* pRet = ImpConvertMakeObj(GetPathPoly(), IsClosed(), bBezier);
+ // #i89784# check for FontWork with activated HideContour
+ bool bHideContour(false);
+
+ {
+ drawinglayer::attribute::SdrTextAttribute* pText = drawinglayer::primitive2d::createNewSdrTextAttribute(GetObjectItemSet(), *getText(0));
+ bHideContour = pText && pText->getSdrFormTextAttribute() && pText->isHideContour();
+ delete pText;
+ }
+
+ SdrObject* pRet = bHideContour ?
+ 0 :
+ ImpConvertMakeObj(GetPathPoly(), IsClosed(), bBezier);
+
SdrPathObj* pPath = PTR_CAST(SdrPathObj, pRet);
if(pPath)
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index ed841692a5f8..7d69955ec441 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -38,7 +38,6 @@
#include <svx/xpoly.hxx>
#include <svx/svdattr.hxx>
#include <svx/svdpool.hxx>
-#include "svdtouch.hxx"
#include <svx/svdtrans.hxx>
#include <svx/svdetc.hxx>
#include <svx/svddrag.hxx>
@@ -239,81 +238,6 @@ void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
}
}
-SdrObject* SdrRectObj::ImpCheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bForceFilled, FASTBOOL bForceTol) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- INT32 nMyTol=nTol;
- FASTBOOL bFilled=bForceFilled || HasFill();
- FASTBOOL bPickThrough=pModel!=NULL && pModel->IsPickThroughTransparentTextFrames();
- if (bTextFrame && !bPickThrough) bFilled=TRUE;
- FASTBOOL bLine=HasLine();
-
- INT32 nWdt=bLine ? ImpGetLineWdt() :0; // Halbe Strichstaerke
-
- // #i25616#
- if(nWdt && !LineIsOutsideGeometry())
- {
- nWdt /= 2;
- }
-
- long nBoundWdt=aRect.GetWidth()-1;
- long nBoundHgt=aRect.GetHeight()-1;
- if (bFilled && nBoundWdt>short(nTol) && nBoundHgt>short(nTol) && Abs(aGeo.nShearWink)<=4500) {
- if (!bForceTol && !bTextFrame ) nMyTol=0; // Keine Toleranz noetig hier
- }
- if (nWdt>nMyTol && (!bTextFrame || pEdtOutl==NULL)) nMyTol=nWdt; // Bei dicker Umrandung keine Toleranz noetig, ausser wenn bei TextEdit
- Rectangle aR(aRect);
- if (nMyTol!=0 && bFilled) {
- aR.Left ()-=nMyTol;
- aR.Top ()-=nMyTol;
- aR.Right ()+=nMyTol;
- aR.Bottom()+=nMyTol;
- }
-
- if (bFilled || bLine || bTextFrame) { // Bei TextFrame so tun, alsob Linie da
- unsigned nCnt=0;
- INT32 nXShad=0,nYShad=0;
- long nEckRad=/*bTextFrame ? 0 :*/ GetEckenradius();
- do { // 1 Durchlauf, bei Schatten 2 Durchlaeufe.
- if (nCnt!=0) aR.Move(nXShad,nYShad);
- if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0 || !bFilled) {
- Polygon aPol(aR);
- if (nEckRad!=0) {
- INT32 nRad=nEckRad;
- if (bFilled) nRad+=nMyTol; // um korrekt zu sein ...
- XPolygon aXPoly(ImpCalcXPoly(aR,nRad));
- aPol = Polygon(aXPoly.getB2DPolygon().getDefaultAdaptiveSubdivision());
- } else {
- if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
- }
- if (bFilled) {
- if (IsPointInsidePoly(aPol,rPnt)) return (SdrObject*)this;
- } else {
- Rectangle aTouchRect(rPnt.X()-nMyTol,rPnt.Y()-nMyTol,rPnt.X()+nMyTol,rPnt.Y()+nMyTol);
- if (IsRectTouchesLine(aPol,aTouchRect)) return (SdrObject*)this;
- }
- } else {
- if (aR.IsInside(rPnt)) return (SdrObject*)this;
- }
- } while (nCnt++==0 && ImpGetShadowDist(nXShad,nYShad));
- }
- FASTBOOL bCheckText=TRUE;
- if (bCheckText && HasText() && (!bTextFrame || bPickThrough)) {
- return SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer);
- }
- return NULL;
-}
-
-SdrObject* SdrRectObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- return ImpCheckHit(rPnt,nTol,pVisiLayer,FALSE/*,bTextFrame*/);
-}
-
void SdrRectObj::TakeObjNameSingul(XubString& rName) const
{
if (IsTextFrame())
@@ -495,33 +419,42 @@ bool SdrRectObj::applySpecialDrag(SdrDragStat& rDrag)
String SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
- const bool bRad(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind());
+ const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
- if(bRad)
+ if(bCreateComment)
{
- Point aPt(rDrag.GetNow());
+ return String();
+ }
+ else
+ {
+ const bool bRad(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind());
- // -sin fuer Umkehrung
- if(aGeo.nDrehWink)
- RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos);
+ if(bRad)
+ {
+ Point aPt(rDrag.GetNow());
- sal_Int32 nRad(aPt.X() - aRect.Left());
+ // -sin fuer Umkehrung
+ if(aGeo.nDrehWink)
+ RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos);
- if(nRad < 0)
- nRad = 0;
+ sal_Int32 nRad(aPt.X() - aRect.Left());
- XubString aStr;
+ if(nRad < 0)
+ nRad = 0;
- ImpTakeDescriptionStr(STR_DragRectEckRad, aStr);
- aStr.AppendAscii(" (");
- aStr += GetMetrStr(nRad);
- aStr += sal_Unicode(')');
+ XubString aStr;
- return aStr;
- }
- else
- {
- return SdrTextObj::getSpecialDragComment(rDrag);
+ ImpTakeDescriptionStr(STR_DragRectEckRad, aStr);
+ aStr.AppendAscii(" (");
+ aStr += GetMetrStr(nRad);
+ aStr += sal_Unicode(')');
+
+ return aStr;
+ }
+ else
+ {
+ return SdrTextObj::getSpecialDragComment(rDrag);
+ }
}
}
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 9abf3950d694..6b2f02299d4a 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -36,7 +36,6 @@
#include <svx/svdpagv.hxx> // fuer Abfrage im Paint, ob das
#include <svx/svdview.hxx> // Objekt gerade editiert wird
#include <svx/svdpage.hxx> // und fuer AnimationHandler (Laufschrift)
-#include "svdtouch.hxx"
#include <svx/svdetc.hxx>
#include <svx/svdoutl.hxx>
#include "svdscrol.hxx" // fuer Laufschrift
@@ -1129,101 +1128,6 @@ void SdrTextObj::StopTextAnimation(OutputDevice* /*pOutDev*/, long /*nExtraData*
SetTextAnimationAllowed(sal_False);
}
-SdrObject* SdrTextObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- if(!bTextFrame && !GetOutlinerParaObject() )
- {
- return NULL;
- }
-
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- INT32 nMyTol=nTol;
- FASTBOOL bFontwork=IsFontwork();
- SdrFitToSizeType eFit=GetFitToSize();
- FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
- Rectangle aR(aRect);
- Rectangle aAnchor2(aR);
- Rectangle aTextRect(aR);
- SdrOutliner* pOutliner = NULL;
- pOutliner = &pModel->GetHitTestOutliner();
-
- if (bFontwork) {
- if (pFormTextBoundRect!=NULL) aR=*pFormTextBoundRect;
- else aR=GetCurrentBoundRect();
- }
- else
- {
- TakeTextRect( *pOutliner, aTextRect, FALSE, &aAnchor2, FALSE ); // EditText nicht mehr ignorieren! TRUE); // EditText ignorieren!
-
- if (bFitToSize)
- aR=aAnchor2;
- else
- aR=aTextRect;
- }
- if (aR.GetWidth()-1>short(nTol) && aR.GetHeight()-1>short(nTol)) nMyTol=0; // Keine Toleranz noetig hier
- if (nMyTol!=0) {
- aR.Left ()-=nMyTol;
- aR.Top ()-=nMyTol;
- aR.Right ()+=nMyTol;
- aR.Bottom()+=nMyTol;
- }
- FASTBOOL bRet=FALSE;
-
- if(bFontwork)
- {
- bRet = aR.IsInside(rPnt);
-
- // #105130# Include aRect here in measurements to be able to hit a
- // fontwork object on its border
- if(!bRet)
- {
- const Rectangle aSnapRect = GetSnapRect();
-
- if( (rPnt.X() >= aSnapRect.Left() - nTol && rPnt.X() <= aSnapRect.Left() + nTol)
- || (rPnt.X() >= aSnapRect.Right() - nTol && rPnt.X() <= aSnapRect.Right() + nTol)
- || (rPnt.Y() >= aSnapRect.Top() - nTol && rPnt.Y() <= aSnapRect.Top() + nTol)
- || (rPnt.Y() >= aSnapRect.Bottom() - nTol && rPnt.Y() <= aSnapRect.Bottom() + nTol))
- {
- bRet = TRUE;
- }
- }
- }
- else
- {
- if (aGeo.nDrehWink!=0) {
- Polygon aPol(aR);
- RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
- bRet=IsPointInsidePoly(aPol,rPnt);
- } else {
- bRet=aR.IsInside(rPnt);
- }
- if (bRet) { // und nun noch checken, ob wirklich Buchstaben getroffen sind
- // Featurewunsch zur 4.0
- // Zunaechst meine Dok-Koordinaten in EE-Dok-Koordinaten umwandeln.
- Point aPt(rPnt); aPt-=aR.TopLeft();
- if (bFitToSize) { // #38214#: FitToSize berueksichtigen
- Fraction aX(aTextRect.GetWidth()-1,aAnchor2.GetWidth()-1);
- Fraction aY(aTextRect.GetHeight()-1,aAnchor2.GetHeight()-1);
- ResizePoint(aPt,Point(),aX,aY);
- }
- if (aGeo.nDrehWink!=0) RotatePoint(aPt,Point(),-aGeo.nSin,aGeo.nCos); // -sin fuer Unrotate
- // Und nun im EE-Dok auf Buchstabensuche gehen
- long nHitTol = 2000;
- OutputDevice* pRef = pOutliner->GetRefDevice();
- if( pRef )
- nHitTol = pRef->LogicToLogic( nHitTol, MAP_100TH_MM, pRef->GetMapMode().GetMapUnit() );
-
- bRet = pOutliner->IsTextPos( aPt, (sal_uInt16)nHitTol );
- }
- }
-
- return bRet ? (SdrObject*)this : NULL;
-}
-
void SdrTextObj::TakeObjNameSingul(XubString& rName) const
{
XubString aStr;
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index fe56b2da4e61..e72b606f3b53 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -119,6 +119,12 @@ namespace
// the visible area for contour text decomposition
basegfx::B2DVector maScale;
+ // #SJ# ClipRange for BlockText decomposition; only text portions completely
+ // inside are to be accepted, so this is different from geometric clipping
+ // (which would allow e.g. upper parts of portions to remain). Only used for
+ // BlockText (see there)
+ basegfx::B2DRange maClipRange;
+
DECL_LINK(decomposeContourTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeBlockTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeStretchTextPrimitive, DrawPortionInfo* );
@@ -137,7 +143,14 @@ namespace
public:
impTextBreakupHandler(SdrOutliner& rOutliner)
- : mrOutliner(rOutliner)
+ : maTextPortionPrimitives(),
+ maLinePrimitives(),
+ maParagraphPrimitives(),
+ mrOutliner(rOutliner),
+ maNewTransformA(),
+ maNewTransformB(),
+ maScale(),
+ maClipRange()
{
}
@@ -153,10 +166,14 @@ namespace
mrOutliner.SetDrawBulletHdl(Link());
}
- void decomposeBlockTextPrimitive(const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB)
+ void decomposeBlockTextPrimitive(
+ const basegfx::B2DHomMatrix& rNewTransformA,
+ const basegfx::B2DHomMatrix& rNewTransformB,
+ const basegfx::B2DRange& rClipRange)
{
maNewTransformA = rNewTransformA;
maNewTransformB = rNewTransformB;
+ maClipRange = rClipRange;
mrOutliner.SetDrawPortionHdl(LINK(this, impTextBreakupHandler, decomposeBlockTextPrimitive));
mrOutliner.SetDrawBulletHdl(LINK(this, impTextBreakupHandler, decomposeBlockBulletPrimitive));
mrOutliner.StripPortions();
@@ -198,30 +215,23 @@ namespace
{
if(rInfo.mrText.Len() && rInfo.mnTextLen)
{
- basegfx::B2DVector aSize;
- drawinglayer::primitive2d::FontAttributes aFontAttributes(drawinglayer::primitive2d::getFontAttributesFromVclFont(
- aSize,
- rInfo.mrFont,
- rInfo.IsRTL(),
- false));
+ basegfx::B2DVector aFontScaling;
+ drawinglayer::primitive2d::FontAttributes aFontAttributes(
+ drawinglayer::primitive2d::getFontAttributesFromVclFont(
+ aFontScaling,
+ rInfo.mrFont,
+ rInfo.IsRTL(),
+ false));
basegfx::B2DHomMatrix aNewTransform;
- // #i100489# need extra scale factor for DXArray which collects all scalings
- // which are needed to get the DXArray to unit coordinates
- double fDXArrayScaleFactor(aSize.getX());
-
// add font scale to new transform
- aNewTransform.scale(aSize.getX(), aSize.getY());
+ aNewTransform.scale(aFontScaling.getX(), aFontScaling.getY());
// look for proportional font scaling, evtl scale accordingly
if(100 != rInfo.mrFont.GetPropr())
{
const double fFactor(rInfo.mrFont.GetPropr() / 100.0);
aNewTransform.scale(fFactor, fFactor);
-
- // #i100489# proportional font scaling influences the DXArray,
- // add to factor
- fDXArrayScaleFactor *= fFactor;
}
// apply font rotate
@@ -254,7 +264,7 @@ namespace
}
const double fEscapement(nEsc / -100.0);
- aNewTransform.translate(0.0, fEscapement * aSize.getY());
+ aNewTransform.translate(0.0, fEscapement * aFontScaling.getY());
}
// apply transformA
@@ -273,13 +283,11 @@ namespace
if(!bDisableTextArray && rInfo.mpDXArray && rInfo.mnTextLen)
{
- // #i100489# use fDXArrayScaleFactor here
- const double fScaleFactor(basegfx::fTools::equalZero(fDXArrayScaleFactor) ? 1.0 : 1.0 / fDXArrayScaleFactor);
aDXArray.reserve(rInfo.mnTextLen);
for(xub_StrLen a(0); a < rInfo.mnTextLen; a++)
{
- aDXArray.push_back((double)rInfo.mpDXArray[a] * fScaleFactor);
+ aDXArray.push_back((double)rInfo.mpDXArray[a]);
}
}
@@ -455,6 +463,17 @@ namespace
fEnd = fTextWidth - fEnd;
}
+ // need to take FontScaling out of values; it's already part of
+ // aNewTransform and would be double applied
+ const double fFontScaleX(aFontScaling.getX());
+
+ if(!basegfx::fTools::equal(fFontScaleX, 1.0)
+ && !basegfx::fTools::equalZero(fFontScaleX))
+ {
+ fStart /= fFontScaleX;
+ fEnd /= fFontScaleX;
+ }
+
maTextPortionPrimitives.push_back(new drawinglayer::primitive2d::WrongSpellPrimitive2D(
aNewTransform,
fStart,
@@ -588,6 +607,43 @@ namespace
{
if(pInfo)
{
+ // #SJ# Is clipping wanted? This is text clipping; only accept a portion
+ // if it's completely in the range
+ if(!maClipRange.isEmpty())
+ {
+ // Test start position first; this allows to not get the text range at
+ // all if text is far outside
+ const basegfx::B2DPoint aStartPosition(pInfo->mrStartPos.X(), pInfo->mrStartPos.Y());
+
+ if(!maClipRange.isInside(aStartPosition))
+ {
+ return 0;
+ }
+
+ // Start position is inside. Get TextBoundRect and TopLeft next
+ drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ aTextLayouterDevice.setFont(pInfo->mrFont);
+
+ const basegfx::B2DRange aTextBoundRect(
+ aTextLayouterDevice.getTextBoundRect(
+ pInfo->mrText, pInfo->mnTextStart, pInfo->mnTextLen));
+ const basegfx::B2DPoint aTopLeft(aTextBoundRect.getMinimum() + aStartPosition);
+
+ if(!maClipRange.isInside(aTopLeft))
+ {
+ return 0;
+ }
+
+ // TopLeft is inside. Get BottomRight and check
+ const basegfx::B2DPoint aBottomRight(aTextBoundRect.getMaximum() + aStartPosition);
+
+ if(!maClipRange.isInside(aBottomRight))
+ {
+ return 0;
+ }
+
+ // all inside, clip was successful
+ }
impHandleDrawPortionInfo(*pInfo);
}
@@ -655,12 +711,7 @@ namespace
//////////////////////////////////////////////////////////////////////////////
// primitive decompositions
-bool SdrTextObj::impCheckSpellCheckForDecomposeTextPrimitive() const
-{
- return false;
-}
-
-bool SdrTextObj::impDecomposeContourTextPrimitive(
+void SdrTextObj::impDecomposeContourTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
@@ -712,10 +763,9 @@ bool SdrTextObj::impDecomposeContourTextPrimitive(
rOutliner.setVisualizedPage(0);
rTarget = aConverter.getPrimitive2DSequence();
- return false;
}
-bool SdrTextObj::impDecomposeBlockTextPrimitive(
+void SdrTextObj::impDecomposeBlockTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
@@ -731,17 +781,15 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive(
// prepare outliner
const bool bIsCell(rSdrBlockTextPrimitive.getCellText());
- const SfxItemSet& rTextItemSet = rSdrBlockTextPrimitive.getSdrText().GetItemSet();
SdrOutliner& rOutliner = ImpGetDrawOutliner();
- SdrTextVertAdjust eVAdj = GetTextVerticalAdjust(rTextItemSet);
- SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust(rTextItemSet);
+ SdrTextHorzAdjust eHAdj = rSdrBlockTextPrimitive.getSdrTextHorzAdjust();
+ SdrTextVertAdjust eVAdj = rSdrBlockTextPrimitive.getSdrTextVertAdjust();
const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord());
const Size aNullSize;
// set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
-
- rOutliner.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)rTextItemSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutliner.SetFixedCellHeight(rSdrBlockTextPrimitive.isFixedCellHeight());
rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE);
rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
@@ -752,34 +800,55 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive(
const bool bVerticalWritintg(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical());
const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
+ // check if block text is used (only one of them can be true)
+ const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
+ const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
+
+ // set minimal paper size hor/ver if needed
+ if(bHorizontalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
+ }
+ else if(bVerticalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
+ }
+
if(bIsCell)
{
// cell text is formated neither like a text object nor like a object
// text, so use a special setup here
- rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
rOutliner.SetPaperSize(aAnchorTextSize);
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetUpdateMode(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
- rOutliner.SetUpdateMode(TRUE);
rOutliner.SetControlWord(nOriginalControlWord);
}
else
{
- if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
- {
- rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
- }
- if(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg)
+ if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
{
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- }
+ // #i103454# maximal paper size hor/ver needs to be limited to text
+ // frame size. If it's block text, still allow the 'other' direction
+ // to grow to get a correct real text size when using GetPaperSize().
+ // When just using aAnchorTextSize as maximum, GetPaperSize()
+ // would just return aAnchorTextSize again: this means, the wanted
+ // 'measurement' of the real size of block text would not work
+ Size aMaxAutoPaperSize(aAnchorTextSize);
+
+ if(bHorizontalIsBlock)
+ {
+ // allow to grow vertical for horizontal blocks
+ aMaxAutoPaperSize.setHeight(1000000);
+ }
+ else if(bVerticalIsBlock)
+ {
+ // allow to grow horizontal for vertical blocks
+ aMaxAutoPaperSize.setWidth(1000000);
+ }
- if(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg)
- {
- rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
+ rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize);
}
rOutliner.SetPaperSize(aNullSize);
@@ -860,7 +929,8 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive(
// as the master shape we are working on. For vertical, use the top-right
// corner
const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX());
- aNewTransformA.translate(fStartInX, aAdjustTranslate.getY());
+ const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY());
+ aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY());
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
// move the null point which was top left to bottom right.
@@ -874,19 +944,27 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive(
aNewTransformB.rotate(fRotate);
aNewTransformB.translate(aTranslate.getX(), aTranslate.getY());
+ // #SJ# create ClipRange (if needed)
+ basegfx::B2DRange aClipRange;
+
+ if(rSdrBlockTextPrimitive.getClipOnBounds())
+ {
+ aClipRange.expand(-aAdjOffset);
+ aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset);
+ }
+
// now break up text primitives.
impTextBreakupHandler aConverter(rOutliner);
- aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB);
+ aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB, aClipRange);
// cleanup outliner
rOutliner.Clear();
rOutliner.setVisualizedPage(0);
rTarget = aConverter.getPrimitive2DSequence();
- return false;
}
-bool SdrTextObj::impDecomposeStretchTextPrimitive(
+void SdrTextObj::impDecomposeStretchTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
@@ -903,11 +981,10 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive(
// prepare outliner
SdrOutliner& rOutliner = ImpGetDrawOutliner();
const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord());
- const SfxItemSet& rTextItemSet = rSdrStretchTextPrimitive.getSdrText().GetItemSet();
const Size aNullSize;
rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE);
- rOutliner.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)rTextItemSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue());
+ rOutliner.SetFixedCellHeight(rSdrStretchTextPrimitive.isFixedCellHeight());
rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
rOutliner.SetPaperSize(aNullSize);
@@ -927,6 +1004,16 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive(
basegfx::B2DHomMatrix aNewTransformA;
basegfx::B2DHomMatrix aNewTransformB;
+ // #i101957# Check for vertical text. If used, aNewTransformA
+ // needs to translate the text initially around object width to orient
+ // it relative to the topper right instead of the topper left
+ const bool bVertical(rSdrStretchTextPrimitive.getOutlinerParaObject().IsVertical());
+
+ if(bVertical)
+ {
+ aNewTransformA.translate(aScale.getX(), 0.0);
+ }
+
// calculate global char stretching scale parameters. Use non-mirrored sizes
// to layout without mirroring
const double fScaleX(fabs(aScale.getX()) / aOutlinerScale.getX());
@@ -955,7 +1042,6 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive(
rOutliner.setVisualizedPage(0);
rTarget = aConverter.getPrimitive2DSequence();
- return false;
}
//////////////////////////////////////////////////////////////////////////////
@@ -1196,4 +1282,5 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL
}
}
+//////////////////////////////////////////////////////////////////////////////
// eof
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 57fec8fbfaaa..f6a30d40b3d5 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -70,6 +70,7 @@
#include <editstat.hxx>
#include <unoapi.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <svx/sdr/attribute/sdrformtextoutlineattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -223,65 +224,13 @@ namespace
} // end of anonymous namespace
//////////////////////////////////////////////////////////////////////////////
-// TextBreakup data helper
-
-namespace
-{
- class impFormTextValues
- {
- sal_Int32 mnFormTextDistance; // distance from line in upright direction
- sal_Int32 mnFormTextStart; // shift from polygon start
- sal_Int32 mnFormTextShdwXVal; // shadow distance or 10th degrees
- sal_Int32 mnFormTextShdwYVal; // shadow distance or scaling
- sal_uInt16 mnFormTextShdwTransp; // shadow transparence
- XFormTextStyle meFormTextStyle; // on/off and char orientation
- XFormTextAdjust meFormTextAdjust; // adjustment (left/right/center) and scale
- XFormTextShadow meFormTextShadow; // shadow mode
- Color maFormTextShdwColor; // shadow color
-
- // bitfield
- unsigned mbFormTextMirror : 1; // change orientation
- unsigned mbFormTextOutline : 1; // show contour of objects
-
- public:
- impFormTextValues(const SfxItemSet& rSet)
- : mnFormTextDistance(((const XFormTextDistanceItem&)rSet.Get(XATTR_FORMTXTDISTANCE)).GetValue()),
- mnFormTextStart(((const XFormTextStartItem&)rSet.Get(XATTR_FORMTXTSTART)).GetValue()),
- mnFormTextShdwXVal(((const XFormTextShadowXValItem&)rSet.Get(XATTR_FORMTXTSHDWXVAL)).GetValue()),
- mnFormTextShdwYVal(((const XFormTextShadowYValItem&)rSet.Get(XATTR_FORMTXTSHDWYVAL)).GetValue()),
- mnFormTextShdwTransp(((const XFormTextShadowTranspItem&)rSet.Get(XATTR_FORMTXTSHDWTRANSP)).GetValue()),
- meFormTextStyle(((const XFormTextStyleItem&)rSet.Get(XATTR_FORMTXTSTYLE)).GetValue()),
- meFormTextAdjust(((const XFormTextAdjustItem&)rSet.Get(XATTR_FORMTXTADJUST)).GetValue()),
- meFormTextShadow(((const XFormTextShadowItem&)rSet.Get(XATTR_FORMTXTSHADOW)).GetValue()),
- maFormTextShdwColor(((const XFormTextShadowColorItem&)rSet.Get(XATTR_FORMTXTSHDWCOLOR)).GetColorValue()),
- mbFormTextMirror(((const XFormTextMirrorItem&)rSet.Get(XATTR_FORMTXTMIRROR)).GetValue()),
- mbFormTextOutline(((const XFormTextOutlineItem&)rSet.Get(XATTR_FORMTXTOUTLINE)).GetValue())
- {
- }
-
- // data access
- sal_Int32 getFormTextDistance() const { return mnFormTextDistance; }
- sal_Int32 getFormTextStart() const { return mnFormTextStart; }
- sal_Int32 getFormTextShdwXVal() const { return mnFormTextShdwXVal; }
- sal_Int32 getFormTextShdwYVal() const { return mnFormTextShdwYVal; }
- sal_uInt16 getFormTextShdwTransp() const { return mnFormTextShdwTransp; }
- XFormTextStyle getFormTextStyle() const { return meFormTextStyle; }
- XFormTextAdjust getFormTextAdjust() const { return meFormTextAdjust; }
- XFormTextShadow getFormTextShadow() const { return meFormTextShadow; }
- Color getFormTextShdwColor() const { return maFormTextShdwColor; }
- bool getFormTextMirror() const { return mbFormTextMirror; }
- bool getFormTextOutline() const { return mbFormTextOutline; }
- };
-} // end of anonymous namespace
-
-//////////////////////////////////////////////////////////////////////////////
// TextBreakup one poly and one paragraph helper
namespace
{
class impPolygonParagraphHandler
{
- const impFormTextValues& mrVal; // FormText parameters
+ const drawinglayer::attribute::SdrFormTextAttribute& mrSdrFormTextAttribute; // FormText parameters
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrDecomposition; // destination primitive list
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow
Reference < com::sun::star::i18n::XBreakIterator > mxBreak; // break iterator
@@ -321,10 +270,10 @@ namespace
public:
impPolygonParagraphHandler(
- const impFormTextValues& rVal,
+ const drawinglayer::attribute::SdrFormTextAttribute& rSdrFormTextAttribute,
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rDecomposition,
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rShadowDecomposition)
- : mrVal(rVal),
+ : mrSdrFormTextAttribute(rSdrFormTextAttribute),
mrDecomposition(rDecomposition),
mrShadowDecomposition(rShadowDecomposition)
{
@@ -348,16 +297,18 @@ namespace
double fPolyStart(0.0);
double fScaleFactor(1.0);
- if(mrVal.getFormTextMirror())
+ if(mrSdrFormTextAttribute.getFormTextMirror())
{
aPolygonCandidate.flip();
}
- if(mrVal.getFormTextStart() && (XFT_LEFT == mrVal.getFormTextAdjust() || XFT_RIGHT == mrVal.getFormTextAdjust()))
+ if(mrSdrFormTextAttribute.getFormTextStart()
+ && (XFT_LEFT == mrSdrFormTextAttribute.getFormTextAdjust()
+ || XFT_RIGHT == mrSdrFormTextAttribute.getFormTextAdjust()))
{
- if(XFT_LEFT == mrVal.getFormTextAdjust())
+ if(XFT_LEFT == mrSdrFormTextAttribute.getFormTextAdjust())
{
- fPolyStart += mrVal.getFormTextStart();
+ fPolyStart += mrSdrFormTextAttribute.getFormTextStart();
if(fPolyStart > fPolyEnd)
{
@@ -366,7 +317,7 @@ namespace
}
else
{
- fPolyEnd -= mrVal.getFormTextStart();
+ fPolyEnd -= mrSdrFormTextAttribute.getFormTextStart();
if(fPolyEnd < fPolyStart)
{
@@ -375,7 +326,7 @@ namespace
}
}
- if(XFT_LEFT != mrVal.getFormTextAdjust())
+ if(XFT_LEFT != mrSdrFormTextAttribute.getFormTextAdjust())
{
// calculate total text length of this paragraph, some layout needs to be done
const double fParagraphTextLength(getParagraphTextLength(rTextPortions));
@@ -384,7 +335,7 @@ namespace
// but still take care of XFT_AUTOSIZE in that case
const bool bTextTooLong(fParagraphTextLength > (fPolyEnd - fPolyStart));
- if(XFT_RIGHT == mrVal.getFormTextAdjust())
+ if(XFT_RIGHT == mrSdrFormTextAttribute.getFormTextAdjust())
{
if(!bTextTooLong)
{
@@ -392,7 +343,7 @@ namespace
fPolyStart += ((fPolyEnd - fPolyStart) - fParagraphTextLength);
}
}
- else if(XFT_CENTER == mrVal.getFormTextAdjust())
+ else if(XFT_CENTER == mrSdrFormTextAttribute.getFormTextAdjust())
{
if(!bTextTooLong)
{
@@ -400,7 +351,7 @@ namespace
fPolyStart += ((fPolyEnd - fPolyStart) - fParagraphTextLength) / 2.0;
}
}
- else if(XFT_AUTOSIZE == mrVal.getFormTextAdjust())
+ else if(XFT_AUTOSIZE == mrSdrFormTextAttribute.getFormTextAdjust())
{
// if scale, prepare scale factor between curve length and text length
if(0.0 != fParagraphTextLength)
@@ -414,12 +365,13 @@ namespace
for(sal_uInt32 a(0L); a < rTextPortions.size() && fPolyStart < fPolyEnd; a++)
{
const impPathTextPortion* pCandidate = rTextPortions[a];
- basegfx::B2DVector aSize;
- const drawinglayer::primitive2d::FontAttributes aCandidateFontAttributes(drawinglayer::primitive2d::getFontAttributesFromVclFont(
- aSize,
- pCandidate->getFont(),
- pCandidate->isRTL(),
- false));
+ basegfx::B2DVector aFontScaling;
+ const drawinglayer::primitive2d::FontAttributes aCandidateFontAttributes(
+ drawinglayer::primitive2d::getFontAttributesFromVclFont(
+ aFontScaling,
+ pCandidate->getFont(),
+ pCandidate->isRTL(),
+ false));
if(pCandidate && pCandidate->getTextLength())
{
@@ -434,7 +386,7 @@ namespace
// prepare portion length. Takes RTL sections into account.
double fPortionLength(pCandidate->getDisplayLength(nUsedTextLength, nNextGlyphLen));
- if(XFT_AUTOSIZE == mrVal.getFormTextAdjust())
+ if(XFT_AUTOSIZE == mrSdrFormTextAttribute.getFormTextAdjust())
{
// when scaling, expand portion length
fPortionLength *= fScaleFactor;
@@ -446,28 +398,30 @@ namespace
basegfx::B2DPoint aEndPos(aStartPos);
// add font scaling
- aNewTransformA.scale(aSize.getX(), aSize.getY());
+ aNewTransformA.scale(aFontScaling.getX(), aFontScaling.getY());
// prepare scaling of text primitive
- if(XFT_AUTOSIZE == mrVal.getFormTextAdjust())
+ if(XFT_AUTOSIZE == mrSdrFormTextAttribute.getFormTextAdjust())
{
// when scaling, expand text primitive scaling
aNewTransformA.scale(fScaleFactor, fScaleFactor);
}
// eventually create shadow primitives from aDecomposition and add to rDecomposition
- const bool bShadow(XFTSHADOW_NONE != mrVal.getFormTextShadow());
+ const bool bShadow(XFTSHADOW_NONE != mrSdrFormTextAttribute.getFormTextShadow());
if(bShadow)
{
- if(XFTSHADOW_NORMAL == mrVal.getFormTextShadow())
+ if(XFTSHADOW_NORMAL == mrSdrFormTextAttribute.getFormTextShadow())
{
- aNewShadowTransform.translate(mrVal.getFormTextShdwXVal(), -mrVal.getFormTextShdwYVal());
+ aNewShadowTransform.translate(
+ mrSdrFormTextAttribute.getFormTextShdwXVal(),
+ -mrSdrFormTextAttribute.getFormTextShdwYVal());
}
else // XFTSHADOW_SLANT
{
- double fScaleValue(mrVal.getFormTextShdwYVal() / 100.0);
- double fShearValue(-mrVal.getFormTextShdwXVal() * F_PI1800);
+ double fScaleValue(mrSdrFormTextAttribute.getFormTextShdwYVal() / 100.0);
+ double fShearValue(-mrSdrFormTextAttribute.getFormTextShdwXVal() * F_PI1800);
aNewShadowTransform.scale(1.0, fScaleValue);
aNewShadowTransform.shearX(sin(fShearValue));
@@ -475,7 +429,7 @@ namespace
}
}
- switch(mrVal.getFormTextStyle())
+ switch(mrSdrFormTextAttribute.getFormTextStyle())
{
case XFT_ROTATE :
{
@@ -533,7 +487,7 @@ namespace
}
// distance from path?
- if(mrVal.getFormTextDistance())
+ if(mrSdrFormTextAttribute.getFormTextDistance())
{
if(aEndPos.equal(aStartPos))
{
@@ -541,7 +495,9 @@ namespace
}
// use back vector (aStartPos - aEndPos) here to get mirrored perpendicular as in old stuff
- const basegfx::B2DVector aPerpendicular(basegfx::getNormalizedPerpendicular(aStartPos - aEndPos) * mrVal.getFormTextDistance());
+ const basegfx::B2DVector aPerpendicular(
+ basegfx::getNormalizedPerpendicular(aStartPos - aEndPos) *
+ mrSdrFormTextAttribute.getFormTextDistance());
aNewTransformB.translate(aPerpendicular.getX(), aPerpendicular.getY());
}
@@ -550,22 +506,23 @@ namespace
{
if(pCandidate->getText().Len() && nNextGlyphLen)
{
- const Color aShadowColor(mrVal.getFormTextShdwColor());
+ const Color aShadowColor(mrSdrFormTextAttribute.getFormTextShdwColor());
const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor());
const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
const ::std::vector< double > aNewDXArray(
pCandidate->getDoubleDXArray().begin() + nPortionIndex,
pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen);
- drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aNewTransformB * aNewShadowTransform * aNewTransformA,
- pCandidate->getText(),
- nPortionIndex,
- nNextGlyphLen,
- aNewDXArray,
- aCandidateFontAttributes,
- pCandidate->getLocale(),
- aRGBShadowColor);
+ drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
+ new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+ aNewTransformB * aNewShadowTransform * aNewTransformA,
+ pCandidate->getText(),
+ nPortionIndex,
+ nNextGlyphLen,
+ aNewDXArray,
+ aCandidateFontAttributes,
+ pCandidate->getLocale(),
+ aRGBShadowColor);
mrShadowDecomposition.push_back(pNew);
}
@@ -581,15 +538,16 @@ namespace
pCandidate->getDoubleDXArray().begin() + nPortionIndex,
pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen);
- drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aNewTransformB * aNewTransformA,
- pCandidate->getText(),
- nPortionIndex,
- nNextGlyphLen,
- aNewDXArray,
- aCandidateFontAttributes,
- pCandidate->getLocale(),
- aRGBColor);
+ drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
+ new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+ aNewTransformB * aNewTransformA,
+ pCandidate->getText(),
+ nPortionIndex,
+ nNextGlyphLen,
+ aNewDXArray,
+ aCandidateFontAttributes,
+ pCandidate->getLocale(),
+ aRGBColor);
mrDecomposition.push_back(pNew);
}
@@ -611,101 +569,6 @@ namespace
namespace
{
- basegfx::B2DLineJoin impGetB2DLineJoin(XLineJoint eLineJoint)
- {
- switch(eLineJoint)
- {
- case XLINEJOINT_MIDDLE :
- {
- return basegfx::B2DLINEJOIN_MIDDLE;
- }
- case XLINEJOINT_BEVEL :
- {
- return basegfx::B2DLINEJOIN_BEVEL;
- }
- case XLINEJOINT_MITER :
- {
- return basegfx::B2DLINEJOIN_MITER;
- }
- case XLINEJOINT_ROUND :
- {
- return basegfx::B2DLINEJOIN_ROUND;
- }
- default :
- {
- return basegfx::B2DLINEJOIN_NONE; // XLINEJOINT_NONE
- }
- }
- }
-} // end of anonymous namespace
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace
-{
- sal_uInt8 impGetStrokeTransparence(bool bShadow, const SfxItemSet& rSet)
- {
- sal_uInt8 nRetval;
-
- if(bShadow)
- {
- nRetval = (sal_uInt8)((((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue() * 255) / 100);
- }
- else
- {
- nRetval = (sal_uInt8)((((XLineTransparenceItem&)(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue() * 255) / 100);
- }
-
- return nRetval;
- }
-
- drawinglayer::attribute::LineAttribute impGetLineAttribute(bool bShadow, const SfxItemSet& rSet)
- {
- basegfx::BColor aColorAttribute;
-
- if(bShadow)
- {
- const Color aShadowColor(((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR))).GetColorValue());
- aColorAttribute = aShadowColor.getBColor();
- }
- else
- {
- const Color aLineColor(((XLineColorItem&)(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
- aColorAttribute = aLineColor.getBColor();
- }
-
- const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
- const XLineJoint eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
-
- return drawinglayer::attribute::LineAttribute(aColorAttribute, (double)nLineWidth, impGetB2DLineJoin(eLineJoint));
- }
-
- drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
- {
- const XLineStyle eLineStyle = ((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
- double fFullDotDashLen(0.0);
- ::std::vector< double > aDotDashArray;
-
- if(XLINE_DASH == eLineStyle)
- {
- const XDash& rDash = ((const XLineDashItem&)(rSet.Get(XATTR_LINEDASH))).GetDashValue();
-
- if(rDash.GetDots() || rDash.GetDashes())
- {
- const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
- fFullDotDashLen = rDash.CreateDotDashArray(aDotDashArray, (double)nLineWidth);
- }
- }
-
- return drawinglayer::attribute::StrokeAttribute(aDotDashArray, fFullDotDashLen);
- }
-} // end of anonymous namespace
-
-//////////////////////////////////////////////////////////////////////////////
-// primitive decomposition helpers
-
-namespace
-{
void impAddPolygonStrokePrimitives(
const basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector,
const basegfx::B2DHomMatrix& rTransform,
@@ -732,8 +595,7 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence impAddPathTextOutlines(
const std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rSource,
- bool bShadow,
- const SfxItemSet& rSet)
+ const drawinglayer::attribute::SdrFormTextOutlineAttribute& rOutlineAttribute)
{
std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aNewPrimitives;
@@ -751,19 +613,19 @@ namespace
if(aB2DPolyPolyVector.size())
{
- // prepare Line and Stroke Attribute
- const drawinglayer::attribute::LineAttribute aLineAttribute(impGetLineAttribute(bShadow, rSet));
- const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(impGetStrokeAttribute(rSet));
- const sal_uInt8 nTransparence(impGetStrokeTransparence(bShadow, rSet));
-
// create stroke primitives
std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aStrokePrimitives;
- impAddPolygonStrokePrimitives(aB2DPolyPolyVector, aPolygonTransform, aLineAttribute, aStrokeAttribute, aStrokePrimitives);
+ impAddPolygonStrokePrimitives(
+ aB2DPolyPolyVector,
+ aPolygonTransform,
+ rOutlineAttribute.getLineAttribute(),
+ rOutlineAttribute.getStrokeAttribute(),
+ aStrokePrimitives);
const sal_uInt32 nStrokeCount(aStrokePrimitives.size());
if(nStrokeCount)
{
- if(nTransparence)
+ if(rOutlineAttribute.getTransparence())
{
// create UnifiedAlphaPrimitive2D
drawinglayer::primitive2d::Primitive2DSequence aStrokePrimitiveSequence(nStrokeCount);
@@ -773,7 +635,10 @@ namespace
aStrokePrimitiveSequence[b] = drawinglayer::primitive2d::Primitive2DReference(aStrokePrimitives[b]);
}
- drawinglayer::primitive2d::UnifiedAlphaPrimitive2D* pNew2 = new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D(aStrokePrimitiveSequence, (double)nTransparence / 100.0);
+ drawinglayer::primitive2d::UnifiedAlphaPrimitive2D* pNew2 =
+ new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D(
+ aStrokePrimitiveSequence,
+ (double)rOutlineAttribute.getTransparence() / 100.0);
aNewPrimitives.push_back(pNew2);
}
else
@@ -809,7 +674,7 @@ namespace
//////////////////////////////////////////////////////////////////////////////
// primitive decomposition
-bool SdrTextObj::impDecomposePathTextPrimitive(
+void SdrTextObj::impDecomposePathTextPrimitive(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
@@ -822,7 +687,7 @@ bool SdrTextObj::impDecomposePathTextPrimitive(
rOutliner.SetUpdateMode(true);
rOutliner.Clear();
rOutliner.SetPaperSize(Size(LONG_MAX,LONG_MAX));
- rOutliner.SetText(*rSdrPathTextPrimitive.getSdrText().GetOutlinerParaObject());
+ rOutliner.SetText(rSdrPathTextPrimitive.getOutlinerParaObject());
// set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
@@ -833,11 +698,8 @@ bool SdrTextObj::impDecomposePathTextPrimitive(
if(rPathTextPortions.size())
{
- // get FormText values
- const SfxItemSet& rSet = rSdrPathTextPrimitive.getSdrText().GetItemSet();
- const impFormTextValues aVal(rSet);
-
- // get polygon values
+ // get FormText and polygon values
+ const drawinglayer::attribute::SdrFormTextAttribute& rFormTextAttribute = rSdrPathTextPrimitive.getSdrFormTextAttribute();
const basegfx::B2DPolyPolygon& rPathPolyPolygon(rSdrPathTextPrimitive.getPathPolyPolygon());
// get loop count
@@ -848,12 +710,13 @@ bool SdrTextObj::impDecomposePathTextPrimitive(
nLoopCount = rOutliner.GetParagraphCount();
}
- if(nLoopCount && XFT_NONE != aVal.getFormTextStyle())
+ if(nLoopCount)
{
// prepare common decomposition stuff
std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aRegularDecomposition;
std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aShadowDecomposition;
- impPolygonParagraphHandler aPolygonParagraphHandler(aVal, aRegularDecomposition, aShadowDecomposition);
+ impPolygonParagraphHandler aPolygonParagraphHandler(
+ rFormTextAttribute, aRegularDecomposition, aShadowDecomposition);
sal_uInt32 a;
for(a = 0L; a < nLoopCount; a++)
@@ -892,10 +755,10 @@ bool SdrTextObj::impDecomposePathTextPrimitive(
}
// evtl. add shadow outlines
- if(aVal.getFormTextOutline())
+ if(rFormTextAttribute.getFormTextOutline() && rFormTextAttribute.getShadowOutline())
{
- const SfxItemSet& rLocalSet = rSdrPathTextPrimitive.getSdrText().GetObject().GetMergedItemSet();
- const drawinglayer::primitive2d::Primitive2DSequence aOutlines(impAddPathTextOutlines(aShadowDecomposition, true, rLocalSet));
+ const drawinglayer::primitive2d::Primitive2DSequence aOutlines(
+ impAddPathTextOutlines(aShadowDecomposition, *rFormTextAttribute.getShadowOutline()));
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(aRetvalA, aOutlines);
}
}
@@ -911,10 +774,10 @@ bool SdrTextObj::impDecomposePathTextPrimitive(
}
// evtl. add outlines
- if(aVal.getFormTextOutline())
+ if(rFormTextAttribute.getFormTextOutline() && rFormTextAttribute.getOutline())
{
- const SfxItemSet& rLocalSet = rSdrPathTextPrimitive.getSdrText().GetObject().GetMergedItemSet();
- const drawinglayer::primitive2d::Primitive2DSequence aOutlines(impAddPathTextOutlines(aRegularDecomposition, false, rLocalSet));
+ const drawinglayer::primitive2d::Primitive2DSequence aOutlines(
+ impAddPathTextOutlines(aRegularDecomposition, *rFormTextAttribute.getOutline()));
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(aRetvalB, aOutlines);
}
}
@@ -929,8 +792,6 @@ bool SdrTextObj::impDecomposePathTextPrimitive(
// concatenate all results
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aRetvalA);
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aRetvalB);
-
- return false;
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 3b1a304bf9d4..f384cc9b4326 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -291,11 +291,6 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
mbInEditMode = FALSE;
}
-SdrObject* SdrTextObj::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- return SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer);
-}
-
USHORT SdrTextObj::GetOutlinerViewAnchorMode() const
{
SdrTextHorzAdjust eH=GetTextHorizontalAdjust();
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index addc538efb25..aaed882cae3d 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -43,9 +43,13 @@
#include <svx/sdr/properties/itemsettools.hxx>
#include <svx/sdr/properties/properties.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include "svdtxhdl.hxx"
#include <svtools/itemset.hxx>
#include <svditer.hxx>
+#include <drawinglayer/processor2d/textaspolygonextractor2d.hxx>
+#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/xflclit.hxx>
+#include <svx/xlnclit.hxx>
+#include <svx/xlnwtit.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -335,37 +339,139 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
SetGlueReallyAbsolute(FALSE);
}
-SdrObject* SdrTextObj::ImpConvertObj(FASTBOOL bToPoly) const
+//////////////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const
{
- if (!ImpCanConvTextToCurve()) return NULL;
- SdrObjGroup* pGroup=new SdrObjGroup();
+ SdrObject* pRetval = 0;
- boost::shared_ptr< SdrOutliner > xOutl( const_cast< SdrTextObj* >(this)->CreateDrawOutliner() );
- xOutl->SetUpdateMode(TRUE);
- ImpTextPortionHandler aConverter(*(xOutl.get()),*this);
+ if(!ImpCanConvTextToCurve())
+ {
+ // suppress HelpTexts from PresObj's
+ return 0;
+ }
- aConverter.ConvertToPathObj(*pGroup,bToPoly);
+ // get primitives
+ const drawinglayer::primitive2d::Primitive2DSequence xSequence(GetViewContact().getViewIndependentPrimitive2DSequence());
- // Nachsehen, ob ueberhaupt was drin ist:
- SdrObjList* pOL=pGroup->GetSubList();
+ if(xSequence.hasElements())
+ {
+ // create an extractor with neutral ViewInformation
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ drawinglayer::processor2d::TextAsPolygonExtractor2D aExtractor(aViewInformation2D);
- if (pOL->GetObjCount()==0) {
- delete pGroup;
- return NULL;
- }
- // Ein einzelnes Objekt muss nicht gruppiert werden:
- if (pOL->GetObjCount()==1) {
- SdrObject* pObj=pOL->RemoveObject(0);
- delete pGroup;
- return pObj;
+ // extract text as polygons
+ aExtractor.process(xSequence);
+
+ // get results
+ const drawinglayer::processor2d::TextAsPolygonDataNodeVector& rResult = aExtractor.getTarget();
+ const sal_uInt32 nResultCount(rResult.size());
+
+ if(nResultCount)
+ {
+ // prepare own target
+ SdrObjGroup* pGroup = new SdrObjGroup();
+ SdrObjList* pObjectList = pGroup->GetSubList();
+
+ // process results
+ for(sal_uInt32 a(0); a < nResultCount; a++)
+ {
+ const drawinglayer::processor2d::TextAsPolygonDataNode& rCandidate = rResult[a];
+ basegfx::B2DPolyPolygon aPolyPolygon(rCandidate.getB2DPolyPolygon());
+
+ if(aPolyPolygon.count())
+ {
+ // take care of wanted polygon type
+ if(bToPoly)
+ {
+ if(aPolyPolygon.areControlPointsUsed())
+ {
+ aPolyPolygon = basegfx::tools::adaptiveSubdivideByAngle(aPolyPolygon);
+ }
+ }
+ else
+ {
+ if(!aPolyPolygon.areControlPointsUsed())
+ {
+ aPolyPolygon = basegfx::tools::expandToCurve(aPolyPolygon);
+ }
+ }
+
+ // create ItemSet with object attributes
+ SfxItemSet aAttributeSet(GetObjectItemSet());
+ SdrPathObj* pPathObj = 0;
+
+ // always clear objectshadow; this is included in the extraction
+ aAttributeSet.Put(SdrShadowItem(false));
+
+ if(rCandidate.getIsFilled())
+ {
+ // set needed items
+ aAttributeSet.Put(XFillColorItem(String(), Color(rCandidate.getBColor())));
+ aAttributeSet.Put(XLineStyleItem(XLINE_NONE));
+ aAttributeSet.Put(XFillStyleItem(XFILL_SOLID));
+
+ // create filled SdrPathObj
+ pPathObj = new SdrPathObj(OBJ_PATHFILL, aPolyPolygon);
+ }
+ else
+ {
+ // set needed items
+ aAttributeSet.Put(XLineColorItem(String(), Color(rCandidate.getBColor())));
+ aAttributeSet.Put(XLineStyleItem(XLINE_SOLID));
+ aAttributeSet.Put(XLineWidthItem(0));
+ aAttributeSet.Put(XFillStyleItem(XFILL_NONE));
+
+ // create line SdrPathObj
+ pPathObj = new SdrPathObj(OBJ_PATHLINE, aPolyPolygon);
+ }
+
+ // copy basic information from original
+ pPathObj->ImpSetAnchorPos(GetAnchorPos());
+ pPathObj->NbcSetLayer(GetLayer());
+
+ if(GetModel())
+ {
+ pPathObj->SetModel(GetModel());
+ pPathObj->NbcSetStyleSheet(GetStyleSheet(), true);
+ }
+
+ // apply prepared ItemSet and add to target
+ pPathObj->SetMergedItemSet(aAttributeSet);
+ pObjectList->InsertObject(pPathObj);
+ }
+ }
+
+ // postprocess; if no result and/or only one object, simplify
+ if(!pObjectList->GetObjCount())
+ {
+ delete pGroup;
+ }
+ else if(1 == pObjectList->GetObjCount())
+ {
+ pRetval = pObjectList->RemoveObject(0);
+ delete pGroup;
+ }
+ else
+ {
+ pRetval = pGroup;
+ }
+ }
}
- // Ansonsten die Gruppe zurueckgeben
- return pGroup;
+
+ return pRetval;
}
+//////////////////////////////////////////////////////////////////////////////
+
SdrObject* SdrTextObj::DoConvertToPolyObj(BOOL bBezier) const
{
- return ImpConvertObj(!bBezier);
+ return ImpConvertContainedTextToSdrPathObjs(!bBezier);
+}
+
+bool SdrTextObj::ImpCanConvTextToCurve() const
+{
+ return !IsOutlText();
}
SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, sal_Bool bClosed, sal_Bool bBezier, sal_Bool bNoSetAttr) const
@@ -388,25 +494,23 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol
pPathObj->SetPathPoly(basegfx::tools::expandToCurve(pPathObj->GetPathPoly()));
}
+ if(pPathObj)
{
- if(pPathObj)
+ pPathObj->ImpSetAnchorPos(aAnchor);
+ pPathObj->NbcSetLayer(SdrLayerID(GetLayer()));
+
+ if(pModel)
{
- pPathObj->ImpSetAnchorPos(aAnchor);
- pPathObj->NbcSetLayer(SdrLayerID(GetLayer()));
+ pPathObj->SetModel(pModel);
- if(pModel)
+ if(!bNoSetAttr)
{
- pPathObj->SetModel(pModel);
+ sdr::properties::ItemChangeBroadcaster aC(*pPathObj);
- if(!bNoSetAttr)
- {
- sdr::properties::ItemChangeBroadcaster aC(*pPathObj);
-
- pPathObj->ClearMergedItem();
- pPathObj->SetMergedItemSet(GetObjectItemSet());
- pPathObj->GetProperties().BroadcastItemChange(aC);
- pPathObj->NbcSetStyleSheet(GetStyleSheet(), sal_True);
- }
+ pPathObj->ClearMergedItem();
+ pPathObj->SetMergedItemSet(GetObjectItemSet());
+ pPathObj->GetProperties().BroadcastItemChange(aC);
+ pPathObj->NbcSetStyleSheet(GetStyleSheet(), sal_True);
}
}
}
@@ -421,7 +525,7 @@ SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) cons
return pObj;
}
- SdrObject* pText = ImpConvertObj(!bBezier);
+ SdrObject* pText = ImpConvertContainedTextToSdrPathObjs(!bBezier);
if(!pText)
{
@@ -433,40 +537,6 @@ SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) cons
return pText;
}
- // #i97874#
- // if shadow is set, apply it to created text, too
- const bool bShadowOn(((SdrShadowItem&)GetObjectItem(SDRATTR_SHADOW)).GetValue());
- SfxItemSet aShadowSet(*(GetObjectItemSet().GetPool()), SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST);
-
- if(bShadowOn)
- {
- // filter shadow items
- aShadowSet.Put(GetObjectItemSet());
- }
-
- { // #i97874#
- // copy needed attributes from local object to all newly created objects
- SdrObjListIter aIter(*pText);
-
- while(aIter.IsMore())
- {
- SdrObject* pCandidate = aIter.Next();
-
- // make sure Layer and model are correct
- pCandidate->NbcSetLayer(SdrLayerID(GetLayer()));
- pCandidate->SetModel(pModel);
-
- // set shadow if needed
- if(bShadowOn)
- {
- pCandidate->SetMergedItemSet(aShadowSet);
- }
-
- // set used StyleSheet
- pCandidate->NbcSetStyleSheet(GetStyleSheet(), true);
- }
- }
-
if(pText->IsGroupObject())
{
// is already group object, add partial shape in front
@@ -487,4 +557,5 @@ SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) cons
}
}
+//////////////////////////////////////////////////////////////////////////////
// eof
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index d6020908bef0..74a3b0a49ada 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -297,11 +297,6 @@ namespace
};
}
-SdrObject* SdrUnoObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- return ImpCheckHit(rPnt, nTol, pVisiLayer, TRUE, TRUE);
-}
-
void SdrUnoObj::TakeObjNameSingul(XubString& rName) const
{
rName = ImpGetResStr(STR_ObjNameSingulUno);
@@ -579,7 +574,7 @@ void SdrUnoObj::CreateUnoControlModel(const String& rModelName,
SetUnoControlModel(xModel);
}
-void SdrUnoObj::SetUnoControlModel( uno::Reference< awt::XControlModel > xModel)
+void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >& xModel)
{
if (xUnoControlModel.is())
{
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index a93905fe21ed..18840cde18e0 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -161,13 +161,6 @@ void SdrVirtObj::SetChanged()
SdrObject::SetChanged();
}
-SdrObject* SdrVirtObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
-{
- Point aPnt(rPnt-aAnchor);
- FASTBOOL bRet=rRefObj.CheckHit(aPnt,nTol,pVisiLayer)!=NULL;
- return bRet ? (SdrObject*)this : NULL;
-}
-
SdrObject* SdrVirtObj::Clone() const
{
SdrObject* pObj=new SdrVirtObj(((SdrVirtObj*)this)->rRefObj); // Nur eine weitere Referenz
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 2986cb482aae..05b5b5e5aca6 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -678,33 +678,6 @@ const Rectangle& SdrObjList::GetAllObjBoundRect() const
return aOutRect;
}
-SdrObject* SdrObjList::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bBackward) const
-{
- SdrObject* pHit=NULL;
- Rectangle R(rPnt.X()-nTol,rPnt.Y()-nTol,rPnt.X()+nTol,rPnt.Y()+nTol);
- if (R.IsOver(GetAllObjBoundRect())) {
- ULONG nObjAnz=GetObjCount();
- ULONG nObjNum=bBackward ? 0 : nObjAnz;
- while (pHit==NULL && (bBackward ? nObjNum<nObjAnz : nObjNum>0)) {
- if (!bBackward) nObjNum--;
- SdrObject* pObj=GetObj(nObjNum);
- if (R.IsOver(pObj->GetCurrentBoundRect())) {
- SdrObjList* pSubList=pObj->GetSubList();
- if (pSubList!=NULL || pVisiLayer==NULL) { // Gruppenobjekte beruecksichtigen sichtbare Layer selbst
- pHit=pObj->CheckHit(rPnt,nTol,pVisiLayer/*,bBackward*/);
- } else { // Ansonsten nur wenn Layer sichtbar
- SdrLayerID nLayer=pObj->GetLayer();
- if (pVisiLayer->IsSet(nLayer)) {
- pHit=pObj->CheckHit(rPnt,nTol,pVisiLayer/*,bBackward*/);
- }
- }
- }
- if (bBackward) nObjNum++;
- }
- }
- return pHit;
-}
-
void SdrObjList::NbcReformatAllTextObjects()
{
ULONG nAnz=GetObjCount();
@@ -773,42 +746,6 @@ void SdrObjList::BurnInStyleSheetAttributes()
}
}
-FASTBOOL SdrObjList::ImpGetFillColor(SdrObject* pObj, Color& rCol) const
-{
- return GetDraftFillColor(pObj->GetMergedItemSet(), rCol);
-}
-
-FASTBOOL SdrObjList::GetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
- /*FASTBOOL bLayerSorted,*/ Color& rCol) const
-{
- if (pModel==NULL) return FALSE;
- FASTBOOL bRet=FALSE;
- FASTBOOL bMaster=pPage!=NULL ? pPage->IsMasterPage() : FALSE;
- for (ULONG no=GetObjCount(); !bRet && no>0; ) {
- no--;
- SdrObject* pObj=GetObj(no);
- SdrObjList* pOL=pObj->GetSubList();
- if (pOL!=NULL) { // Aha, Gruppenobjekt
- bRet=pOL->GetFillColor(rPnt,rVisLayers,/*bLayerSorted,*/rCol);
- } else {
- SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pObj);
- // #108867# Exclude zero master page object (i.e. background
- // shape) from color query
- if (pTextObj!=NULL &&
- pObj->IsClosedObj() && rVisLayers.IsSet(pObj->GetLayer()) &&
- (!bMaster || (!pObj->IsNotVisibleAsMaster() && no!=0)) &&
- pObj->GetCurrentBoundRect().IsInside(rPnt) &&
- !pTextObj->IsHideContour() && pObj->IsHit(rPnt,0,NULL))
- { // Nachfolgend extra Funktion um Stack zu sparen,
- // da diese Methode hier rekursiv ist.
- bRet=ImpGetFillColor(pObj,rCol);
- }
- }
- }
- return bRet;
-}
-
-
ULONG SdrObjList::GetObjCount() const
{
return maList.size();
@@ -1706,56 +1643,6 @@ void SdrPage::TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage)
}
}
-// MasterPage interface
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-FASTBOOL SdrPage::ImplGetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
- /* FASTBOOL bLayerSorted,*/ Color& rCol, FASTBOOL bSkipBackgroundShape) const
-{
- if (pModel==NULL) return FALSE;
- FASTBOOL bRet=SdrObjList::GetFillColor(rPnt,rVisLayers,/*bLayerSorted,*/rCol);
- if (!bRet && !mbMaster)
- {
- // nun zu den Masterpages
- if(TRG_HasMasterPage())
- {
- SetOfByte aSet(rVisLayers);
- aSet &= TRG_GetMasterPageVisibleLayers();
- SdrPage& rMasterPage = TRG_GetMasterPage();
-
- // #108867# Don't fall back to background shape on
- // master pages. This is later handled by
- // GetBackgroundColor, and is necessary to cater for
- // the silly ordering: 1. shapes, 2. master page
- // shapes, 3. page background, 4. master page
- // background.
- bRet = rMasterPage.ImplGetFillColor(rPnt, aSet, rCol, TRUE);
- }
- }
-
- // #108867# Only now determine background color from background shapes
- if( !bRet && !bSkipBackgroundShape )
- {
- rCol = GetPageBackgroundColor();
- return TRUE;
- }
-
- return bRet;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-FASTBOOL SdrPage::GetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
- /*FASTBOOL bLayerSorted,*/ Color& rCol) const
-{
- // #108867# Wrapper for ImplGetFillColor. Used to properly set the
- // bSkipBackgroundShape parameter. Never skip background shape on
- // first level of recursion
- return ImplGetFillColor(rPnt,rVisLayers,/*bLayerSorted,*/rCol,FALSE);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const Rectangle* /*pRect*/) const
{
return NULL;
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index c42497d73507..c89c458aa9c7 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -113,7 +113,7 @@ ImplEncirclementOverlay::ImplEncirclementOverlay(const SdrPaintView& rView, cons
if(pTargetOverlay)
{
::sdr::overlay::OverlayRollingRectangleStriped* aNew = new ::sdr::overlay::OverlayRollingRectangleStriped(
- rStartPos, rStartPos, sal_False);
+ rStartPos, rStartPos, false);
pTargetOverlay->add(*aNew);
maObjects.append(*aNew);
}
@@ -1466,130 +1466,6 @@ void SdrPaintView::SetApplicationDocumentColor(Color aDocumentColor)
}
}
-// declaration extracted from svdedxv.cxx
-#define SPOTCOUNT 5
-
-Color SdrPaintView::CalcBackgroundColor( const Rectangle& rArea,
- const SetOfByte& rVisibleLayers,
- const SdrPage& rCurrPage ) const
-{
- // code extracted from SdrObjEditView::ImpGetTextEditBackgroundColor
- svtools::ColorConfig aColorConfig;
- Color aBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
-
- // #98988# test if we are in High contrast mode; if yes, take
- // application background color
- // #10049# wrong, always use svtools::DOCCOLOR as default and use document settings if
- // not hc mode
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-
- if(!rStyleSettings.GetHighContrastMode())
- {
- // Ok, dann eben die Page durchsuchen!
- Point aSpotPos[SPOTCOUNT];
- Color aSpotColor[SPOTCOUNT];
- ULONG nHeight( rArea.GetSize().Height() );
- ULONG nWidth( rArea.GetSize().Width() );
- ULONG nWidth14 = nWidth / 4;
- ULONG nHeight14 = nHeight / 4;
- ULONG nWidth34 = ( 3 * nWidth ) / 4;
- ULONG nHeight34 = ( 3 * nHeight ) / 4;
-
- USHORT i;
- for ( i = 0; i < SPOTCOUNT; i++ )
- {
- // Es wird anhand von fuenf Spots die Farbe untersucht
- switch ( i )
- {
- case 0 :
- {
- // Center-Spot
- aSpotPos[i] = rArea.Center();
- }
- break;
-
- case 1 :
- {
- // TopLeft-Spot
- aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth14;
- aSpotPos[i].Y() += nHeight14;
- }
- break;
-
- case 2 :
- {
- // TopRight-Spot
- aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth34;
- aSpotPos[i].Y() += nHeight14;
- }
- break;
-
- case 3 :
- {
- // BottomLeft-Spot
- aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth14;
- aSpotPos[i].Y() += nHeight34;
- }
- break;
-
- case 4 :
- {
- // BottomRight-Spot
- aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth34;
- aSpotPos[i].Y() += nHeight34;
- }
- break;
-
- }
-
- aSpotColor[i] = Color( COL_WHITE );
- rCurrPage.GetFillColor(aSpotPos[i], rVisibleLayers, /*bLayerSortedRedraw,*/ aSpotColor[i]);
- }
-
- USHORT aMatch[SPOTCOUNT];
-
- for ( i = 0; i < SPOTCOUNT; i++ )
- {
- // Wurden gleiche Spot-Farben gefuden?
- aMatch[i] = 0;
-
- for ( USHORT j = 0; j < SPOTCOUNT; j++ )
- {
- if( j != i )
- {
- if( aSpotColor[i] == aSpotColor[j] )
- {
- aMatch[i]++;
- }
- }
- }
- }
-
- // Das hoechste Gewicht hat der Spot in der Mitte
- aBackground = aSpotColor[0];
-
- for ( USHORT nMatchCount = SPOTCOUNT - 1; nMatchCount > 1; nMatchCount-- )
- {
- // Welche Spot-Farbe wurde am haeufigsten gefunden?
- for ( i = 0; i < SPOTCOUNT; i++ )
- {
- if( aMatch[i] == nMatchCount )
- {
- aBackground = aSpotColor[i];
- nMatchCount = 1; // Abbruch auch der aeusseren for-Schleife
- break;
- }
- }
- }
- }
-
- return aBackground;
-}
-
// #114898#
bool SdrPaintView::IsBufferedOutputAllowed() const
{
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 483fb829d8b6..3b5100f9c278 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -213,7 +213,10 @@ void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
if(HasMarkedPoints())
{
SortMarkedObjects();
- BegUndo(ImpGetResStr(STR_EditSetPointsSmooth), GetDescriptionOfMarkedPoints());
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditSetPointsSmooth), GetDescriptionOfMarkedPoints());
ULONG nMarkAnz(GetMarkedObjectCount());
for(ULONG nMarkNum(nMarkAnz); nMarkNum > 0L;)
@@ -228,13 +231,15 @@ void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
PolyPolygonEditor aEditor( pPath->GetPathPoly(), pPath->IsClosed() );
if(aEditor.SetPointsSmooth( eFlags, pPts->getContainer() ) )
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
pPath->SetPathPoly(aEditor.GetPolyPolygon());
}
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
}
@@ -243,7 +248,10 @@ void SdrPolyEditView::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
if(HasMarkedPoints())
{
SortMarkedObjects();
- BegUndo(ImpGetResStr(STR_EditSetSegmentsKind), GetDescriptionOfMarkedPoints());
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditSetSegmentsKind), GetDescriptionOfMarkedPoints());
ULONG nMarkAnz(GetMarkedObjectCount());
for(ULONG nMarkNum(nMarkAnz); nMarkNum > 0L;)
@@ -258,13 +266,15 @@ void SdrPolyEditView::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
PolyPolygonEditor aEditor( pPath->GetPathPoly(), pPath->IsClosed() );
if(aEditor.SetSegmentsKind( eKind, pPts->getContainer()) )
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pPath));
pPath->SetPathPoly(aEditor.GetPolyPolygon());
}
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
}
}
@@ -305,8 +315,12 @@ void SdrPolyEditView::DeleteMarkedPoints()
SortMarkedObjects();
ULONG nMarkAnz=GetMarkedObjectCount();
- // Description
- BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_DELETE);
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ {
+ // Description
+ BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_DELETE);
+ }
for (ULONG nMarkNum=nMarkAnz; nMarkNum>0;)
{
@@ -322,19 +336,27 @@ void SdrPolyEditView::DeleteMarkedPoints()
{
if( aEditor.GetPolyPolygon().count() )
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pPath ));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pPath ));
pPath->SetPathPoly( aEditor.GetPolyPolygon() );
}
else
{
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pPath ) );
+ if( bUndo )
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pPath ) );
pM->GetPageView()->GetObjList()->RemoveObject(pPath->GetOrdNum());
+ if( !bUndo )
+ {
+ SdrObject* pObj = pPath;
+ SdrObject::Free(pObj);
+ }
}
}
}
}
- EndUndo();
+ if( bUndo )
+ EndUndo();
UnmarkAllPoints();
MarkListHasChanged();
}
@@ -346,7 +368,10 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
{
SortMarkedObjects();
sal_uInt32 nMarkAnz(GetMarkedObjectCount());
- BegUndo(ImpGetResStr(STR_EditRipUp), GetDescriptionOfMarkedPoints());
+
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditRipUp), GetDescriptionOfMarkedPoints());
for(sal_uInt32 nMarkNum(nMarkAnz); nMarkNum > 0L;)
{
@@ -358,7 +383,8 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
if(pPts && pObj)
{
pPts->ForceSort();
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
sal_Bool bKorregFlag(sal_False);
sal_Bool bInsAny(sal_False);
sal_uInt32 nMarkPtsAnz(pPts->GetCount());
@@ -375,7 +401,8 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
bInsAny = sal_True;
SdrInsertReason aReason(SDRREASON_VIEWCALL, pObj);
pM->GetPageView()->GetObjList()->InsertObject(pNeuObj, pObj->GetOrdNum() + 1, &aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
MarkObj(pNeuObj, pM->GetPageView(), FALSE, TRUE);
}
@@ -408,7 +435,8 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
}
UnmarkAllPoints();
- EndUndo();
+ if( bUndo )
+ EndUndo();
MarkListHasChanged();
}
}
@@ -532,24 +560,36 @@ void SdrPolyEditView::ShutMarkedObjects()
void SdrPolyEditView::CloseMarkedObjects(BOOL bToggle, BOOL bOpen) // , long nOpenDistance)
{
- if (AreObjectsMarked()) {
- BegUndo(ImpGetResStr(STR_EditShut),GetDescriptionOfMarkedPoints());
- BOOL bChg=FALSE;
+ if (AreObjectsMarked())
+ {
+ const bool bUndo = IsUndoEnabled();
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_EditShut),GetDescriptionOfMarkedPoints());
+
+ bool bChg=false;
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
BOOL bClosed=pO->IsClosedObj();
- if (pO->IsPolyObj() && (bClosed==bOpen) || bToggle) {
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
- if (pO->ISA(SdrPathObj)) {
- ((SdrPathObj*)pO)->ToggleClosed(); // nOpenDistance);
- }
- bChg=TRUE;
+ if (pO->IsPolyObj() && (bClosed==bOpen) || bToggle)
+ {
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+
+ SdrPathObj* pPathObj = dynamic_cast< SdrPathObj* >( pO );
+ if(pPathObj)
+ pPathObj->ToggleClosed();
+ bChg=true;
}
}
- EndUndo();
- if (bChg) {
+
+ if( bUndo )
+ EndUndo();
+
+ if (bChg)
+ {
UnmarkAllPoints();
MarkListHasChanged();
}
@@ -566,8 +606,11 @@ void SdrPolyEditView::ImpCopyMarkedPoints()
void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
{
+ const bool bUndo = IsUndoEnabled();
+
ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrUShortCont* pPts=pM->GetMarkedPoints();
@@ -575,7 +618,9 @@ void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void*
SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
if (nPtAnz!=0 && pPath!=NULL)
{
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
+
basegfx::B2DPolyPolygon aXPP(pPath->GetPathPoly());
for(sal_uInt32 nPtNum(0L); nPtNum < nPtAnz; nPtNum++)
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index be0e871d61bf..0f126e2ec701 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -93,11 +93,16 @@ void ImplPageOriginOverlay::SetPosition(const basegfx::B2DPoint& rNewPosition)
if(rNewPosition != maPosition)
{
// apply to OverlayObjects
- basegfx::B2DHomMatrix aMatrix;
- aMatrix.translate(
- rNewPosition.getX() - maPosition.getX(),
- rNewPosition.getY() - maPosition.getY());
- maObjects.transform(aMatrix);
+ for(sal_uInt32 a(0); a < maObjects.count(); a++)
+ {
+ sdr::overlay::OverlayCrosshairStriped* pCandidate =
+ static_cast< sdr::overlay::OverlayCrosshairStriped* >(&maObjects.getOverlayObject(a));
+
+ if(pCandidate)
+ {
+ pCandidate->setBasePosition(rNewPosition);
+ }
+ }
// remember new position
maPosition = rNewPosition;
@@ -167,11 +172,17 @@ void ImplHelpLineOverlay::SetPosition(const basegfx::B2DPoint& rNewPosition)
if(rNewPosition != maPosition)
{
// apply to OverlayObjects
- basegfx::B2DHomMatrix aMatrix;
- aMatrix.translate(
- rNewPosition.getX() - maPosition.getX(),
- rNewPosition.getY() - maPosition.getY());
- maObjects.transform(aMatrix);
+ // apply to OverlayObjects
+ for(sal_uInt32 a(0); a < maObjects.count(); a++)
+ {
+ sdr::overlay::OverlayHelplineStriped* pCandidate =
+ static_cast< sdr::overlay::OverlayHelplineStriped* >(&maObjects.getOverlayObject(a));
+
+ if(pCandidate)
+ {
+ pCandidate->setBasePosition(rNewPosition);
+ }
+ }
// remember new position
maPosition = rNewPosition;
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 32c457cf3d02..144db41d515f 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -1127,6 +1127,20 @@ String STR_UndoMovLayer
{
Text [ en-US ] = "Change order of layers" ;
};
+// --> OD 2009-07-09 #i73249#
+String STR_UndoObjName
+{
+ Text [ en-US ] = "Change object name of %1 to" ;
+};
+String STR_UndoObjTitle
+{
+ Text [ en-US ] = "Change object title of %1" ;
+};
+String STR_UndoObjDescription
+{
+ Text [ en-US ] = "Change object description of %1" ;
+};
+// <--
String STR_StandardLayerName
{
Text [ en-US ] = "Standard" ;
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index cbf80e23c91d..038eb96b35e6 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -53,6 +53,7 @@ SdrText::SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject /
SdrText::~SdrText()
{
+ clearWeak();
delete mpOutlinerParaObject;
}
@@ -60,10 +61,19 @@ void SdrText::CheckPortionInfo( SdrOutliner& rOutliner )
{
if(!mbPortionInfoChecked)
{
+ // #i102062# no action when the Outliner is the HitTestOutliner,
+ // this will remove WrongList info at the OPO
+ if(mpModel && &rOutliner == &mpModel->GetHitTestOutliner())
+ return;
+
// Optimierung: ggf. BigTextObject erzeugen
mbPortionInfoChecked=true;
if(mpOutlinerParaObject!=NULL && rOutliner.ShouldCreateBigTextObject())
- mpOutlinerParaObject= rOutliner.CreateParaObject();
+ {
+ // #i102062# MemoryLeak closed
+ delete mpOutlinerParaObject;
+ mpOutlinerParaObject = rOutliner.CreateParaObject();
+ }
}
}
diff --git a/svx/source/svdraw/svdtouch.cxx b/svx/source/svdraw/svdtouch.cxx
deleted file mode 100644
index 918855b6d665..000000000000
--- a/svx/source/svdraw/svdtouch.cxx
+++ /dev/null
@@ -1,299 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: svdtouch.cxx,v $
- * $Revision: 1.11 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-
-#include "svdtouch.hxx"
-#include <svx/xpoly.hxx>
-#include <tools/bigint.hxx>
-#include <tools/poly.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-class ImpPolyHitCalc {
-public:
- long x1,x2,y1,y2; // Koordinaten des Rect, muessen sortiert sein!
- FASTBOOL bEdge; // ein Punkt lag genau auf einer Kante
- FASTBOOL bIntersect; // mind. 2 Punkte auf verschiedenen Seiten einer Kante
- FASTBOOL bPntInRect; // mind. 1 Punkt war vollstaendig im Rect
- USHORT nOCnt; // wenn Counter ungerade, dann getroffen
- USHORT nUCnt; // wenn Counter ungerade, dann getroffen
- USHORT nLCnt; // wenn Counter ungerade, dann getroffen
- USHORT nRCnt; // wenn Counter ungerade, dann getroffen
- FASTBOOL bLine; // TRUE=PolyLine, kein Polygon
-public:
- ImpPolyHitCalc(const Rectangle& aR, FASTBOOL bIsLine=FALSE)
- {
- bLine=bIsLine;
- bEdge=FALSE;
- bIntersect=FALSE;
- bPntInRect=FALSE;
- x1=aR.Left();
- x2=aR.Right();
- y1=aR.Top();
- y2=aR.Bottom();
- nOCnt=0;
- nUCnt=0;
- nLCnt=0;
- nRCnt=0;
- }
- FASTBOOL IsDecided() { return bEdge || bIntersect || bPntInRect; }
- void CheckPntInRect(const Point& rP)
- {
- if (!bPntInRect) {
- bPntInRect=rP.X()>=x1 && rP.X()<=x2 && rP.Y()>=y1 && rP.Y()<=y2;
- }
- }
- bool IsHit() { return (!bLine && (nOCnt & 1)==1) || IsDecided(); }
-};
-
-#define CAREFUL_MULDIV(Res,Val,Mul,Div) { \
- if (Abs(Val)>0xB504 || Abs(Mul)>0xB504) { \
- BigInt aBigTemp(Val); \
- aBigTemp*=Mul; \
- aBigTemp/=Div; \
- Res=long(aBigTemp); \
- } else { \
- Res=Val*Mul/Div; \
- } \
-}
-
-void ImpCheckIt(ImpPolyHitCalc& rH, long lx1, long ly1, long lx2, long ly2,
- long rx1, long ry1, long rx2, long ry2, USHORT& nOCnt, USHORT& nUCnt)
-{
- if ((ly1>ly2) || ((ly1==ly2) && (lx1>lx2))) {
- long nTmp; // die 2 Punkte nach Y sortieren
- nTmp=lx1;
- lx1=lx2;
- lx2=nTmp;
- nTmp=ly1;
- ly1=ly2;
- ly2=nTmp;
- }
- FASTBOOL b1=FALSE,b2=FALSE,b3=FALSE,b4=FALSE; // je 1 Flag fuer jeden der 4 Punkte LO,RO,LU,RU
- FASTBOOL bx1,bx2;
- FASTBOOL by1=ly1<=ry1 && ly2>ry1;
- FASTBOOL by2=ly1<=ry2 && ly2>ry2;
- long dx(0),dy(0),a(0);
- if (by1 || by2) {
- dx=lx2-lx1;
- dy=ly2-ly1;
- }
- if (by1) { // Nur wer die Scanline schneidet
- bx1=lx1<rx1; // x1,y1
- bx2=lx2<rx1;
- FASTBOOL bA=FALSE; // Optimierung: ggf eine Division sparen
- if (bx1 && bx2) b1=TRUE;
- else if (bx1 || bx2) {
- long yTemp=ry1-ly1;
- CAREFUL_MULDIV(a,dx,yTemp,dy); // a=dx*yTemp/dy;
- a+=lx1;
- bA=TRUE;
- rH.bEdge=(a==rx1);
- if (a<rx1) b1=TRUE;
- } // x2,y1
- bx1=lx1<rx2;
- bx2=lx2<rx2;
- if (bx1 && bx2) b2=TRUE;
- else if (bx1 || bx2) {
- if (!bA) {
- long yTemp=ry1-ly1;
- CAREFUL_MULDIV(a,dx,yTemp,dy);
- a+=lx1;
- }
- rH.bEdge=(a==rx2);
- if (a<rx2) b2=TRUE;
- }
- }
- if (by2) { // Nur wer die Scanline schneidet
- bx1=lx1<rx1; // x1,y2
- bx2=lx2<rx1;
- FASTBOOL bA=FALSE; // Optimierung: ggf eine Division sparen
- if (bx1 && bx2) b3=TRUE;
- else if (bx1 || bx2) {
- long yTemp=ry2-ly1;
- CAREFUL_MULDIV(a,dx,yTemp,dy);
- a+=lx1;
- bA=TRUE;
- rH.bEdge=(a==rx1);
- if (a<rx1) b3=TRUE;
- }
- bx1=lx1<rx2; // x2,y2
- bx2=lx2<rx2;
- if (bx1 && bx2) b4=TRUE;
- else if (bx1 || bx2) {
- if (!bA) {
- long yTemp=ry2-ly1;
- CAREFUL_MULDIV(a,dx,yTemp,dy);
- a+=lx1;
- }
- rH.bEdge=(a==rx2);
- if (a<rx2) b4=TRUE;
- }
- }
- if (by1 || by2) { // nun die Ergebnisse auswerten
- if (by1 && by2) { // Linie durch beide Scanlines
- if (b1 && b2 && b3 && b4) { nOCnt++; nUCnt++; } // Rect komplett rechts neben der Linie
- else if (b1 || b2 || b3 || b4) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
- } else { // ansonsten Ober- und Unterkante des Rects getrennt betrachten
- if (by1) { // Linie durch Oberkante
- if (b1 && b2) nOCnt++; // Oberkante komplett rechts neben der Linie
- else if (b1 || b2) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
- }
- if (by2) { // Linie durch Unterkante
- if (b3 && b4) nUCnt++; // Unterkante komplett rechts neben der Linie
- else if (b3 || b4) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
- }
- }
- }
-}
-
-void CheckPolyHit(const Polygon& rPoly, ImpPolyHitCalc& rH)
-{
- USHORT nAnz=rPoly.GetSize();
- if (nAnz==0) return;
- if (nAnz==1) { rH.CheckPntInRect(rPoly[0]); return; }
- Point aPt0=rPoly[USHORT(nAnz-1)];
- rH.CheckPntInRect(aPt0);
- USHORT i=0;
- if (rH.bLine) {
- aPt0=rPoly[0];
- i++;
- }
- for (; i<nAnz && !rH.IsDecided(); i++) {
- Point aP1(aPt0);
- Point aP2(rPoly[i]);
- rH.CheckPntInRect(aP2);
- if (!rH.IsDecided()) {
- ImpCheckIt(rH,aP1.X(),aP1.Y(),aP2.X(),aP2.Y(),rH.x1,rH.y1,rH.x2,rH.y2,rH.nOCnt,rH.nUCnt);
- ImpCheckIt(rH,aP1.Y(),aP1.X(),aP2.Y(),aP2.X(),rH.y1,rH.x1,rH.y2,rH.x2,rH.nLCnt,rH.nRCnt);
- }
- aPt0=rPoly[i];
- }
- if (!rH.bLine) { // Sicherheitshalber nochmal checken
- if ((rH.nOCnt&1)!=(rH.nUCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
- if ((rH.nLCnt&1)!=(rH.nRCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
- if ((rH.nOCnt&1)!=(rH.nLCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
- }
-}
-
-bool IsRectTouchesLine(const Point& rPt1, const Point& rPt2, const Rectangle& rHit)
-{
- Polygon aPol(2);
- aPol[0]=rPt1;
- aPol[1]=rPt2;
- ImpPolyHitCalc aHit(rHit,TRUE);
- CheckPolyHit(aPol,aHit);
- return aHit.IsHit();
-}
-
-bool IsRectTouchesLine(const Polygon& rLine, const Rectangle& rHit)
-{
- ImpPolyHitCalc aHit(rHit,TRUE);
- CheckPolyHit(rLine,aHit);
- return aHit.IsHit();
-}
-
-bool IsRectTouchesLine(const PolyPolygon& rLine, const Rectangle& rHit)
-{
- ImpPolyHitCalc aHit(rHit,TRUE);
- USHORT nAnz=rLine.Count();
- for (USHORT nNum=0; nNum<nAnz && !aHit.IsHit(); nNum++) {
- CheckPolyHit(rLine[nNum],aHit);
- }
- return aHit.IsHit();
-}
-
-BYTE CheckPointTouchesPoly(const Polygon& rPoly, const Point& rHit) // 0=Ausserhalb, 1=Innerhalb, 2=Beruehrung
-{
- USHORT nAnz=rPoly.GetSize();
- if (nAnz<2) return FALSE;
- FASTBOOL bEdge=FALSE;
- USHORT nCnt=0;
- Point aPt0=rPoly[USHORT(nAnz-1)];
- for (USHORT i=0; i<nAnz && !bEdge; i++) {
- Point aP1(rPoly[i]);
- Point aP2(aPt0);
- if ((aP1.Y()>aP2.Y()) || ((aP1.Y()==aP2.Y()) && (aP1.X()>aP2.X()))) { Point aTmp(aP1); aP1=aP2; aP2=aTmp; }
- bEdge=((aP1.X()==aP2.X()) && (rHit.X()==aP1.X()) && (rHit.Y()>=aP1.Y()) && (rHit.Y()<=aP2.Y())) ||
- ((aP1.Y()==aP2.Y()) && (rHit.Y()==aP1.Y()) && (rHit.X()>=aP1.X()) && (rHit.X()<=aP2.X())) ||
- (rHit.X()==aP1.X()) && (rHit.Y()==aP1.Y());
- if (!bEdge && aP1.Y()<=rHit.Y() && aP2.Y()>rHit.Y()) { // Nur wer die Scanline schneidet
- FASTBOOL bx1=aP1.X()<rHit.X();
- FASTBOOL bx2=aP2.X()<rHit.X();
- if (bx1 && bx2) nCnt++;
- else if (bx1 || bx2) {
- long dx=aP2.X()-aP1.X();
- long dy=aP2.Y()-aP1.Y();
- long yTemp=rHit.Y()-aP1.Y();
- long xTemp;
- if (Abs(dx)>0xB504 || Abs(yTemp)>0xB504) { // gegen Integerueberlaeufe
- BigInt aBigTemp(dx);
- aBigTemp*=yTemp;
- aBigTemp/=dy;
- xTemp=long(aBigTemp);
- } else {
- xTemp=dx*yTemp /dy;
- }
- xTemp+=aP1.X();
- bEdge=(xTemp==rHit.X());
- if (xTemp<rHit.X()) nCnt++;
- }
- }
- aPt0=rPoly[i];
- }
- if (bEdge) return 2;
- return (nCnt & 1)==1;
-}
-
-bool IsPointInsidePoly(const Polygon& rPoly, const Point& rHit)
-{
- return CheckPointTouchesPoly(rPoly,rHit)!=0;
-}
-
-bool IsPointInsidePoly(const PolyPolygon& rPoly, const Point& rHit)
-{
- FASTBOOL bInside=FALSE;
- FASTBOOL bEdge=FALSE;
- USHORT nAnz=rPoly.Count();
- for (USHORT i=0; i<nAnz && !bEdge; i++) {
- BYTE n=CheckPointTouchesPoly(rPoly.GetObject(i),rHit);
- bEdge=n==2;
- if (n==1) bInside=!bInside;
- }
- return bInside || bEdge;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
diff --git a/svx/source/svdraw/svdtxhdl.cxx b/svx/source/svdraw/svdtxhdl.cxx
deleted file mode 100644
index e78b85ff10d0..000000000000
--- a/svx/source/svdraw/svdtxhdl.cxx
+++ /dev/null
@@ -1,400 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: svdtxhdl.cxx,v $
- * $Revision: 1.29 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-
-#include "svdtxhdl.hxx"
-#include <limits.h>
-#include "svditext.hxx"
-#include <svx/svdmodel.hxx>
-#include <svx/svdpage.hxx>
-#include <svx/svdogrp.hxx>
-#include <svx/svdotext.hxx>
-#include <svx/svdoutl.hxx>
-#include <svx/outliner.hxx>
-#include <svx/outlobj.hxx>
-#include <svx/svxfont.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/xlnwtit.hxx>
-#include <svx/xflclit.hxx>
-#include <vcl/metric.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#include <com/sun/star/i18n/ScriptType.hdl>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <comphelper/processfactory.hxx>
-
-#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
-#include "unolingu.hxx"
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <svtools/itemset.hxx>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::i18n;
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-ImpTextPortionHandler::ImpTextPortionHandler(SdrOutliner& rOutln, const SdrTextObj& rTxtObj):
- rOutliner(rOutln),
- rTextObj(rTxtObj)
-{
- SdrModel* pModel = rTextObj.GetModel();
- MapMode aMap=aVDev.GetMapMode();
-
- aMap.SetMapUnit(pModel->GetScaleUnit());
- aMap.SetScaleX(pModel->GetScaleFraction());
- aMap.SetScaleY(pModel->GetScaleFraction());
- aVDev.SetMapMode(aMap);
-}
-
-void ImpTextPortionHandler::ConvertToPathObj(SdrObjGroup& rGroup, FASTBOOL bPoly)
-{
- bToPoly=bPoly;
- pGroup=&rGroup;
-
- Rectangle aAnchorRect;
- Rectangle aTextRect;
- SdrFitToSizeType eFit=rTextObj.GetFitToSize();
- FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
- // Bei TakeTextRect wird u.a. auch der Text in
- // den Outliner gesteckt
- rTextObj.TakeTextRect(rOutliner,aTextRect,FALSE,&aAnchorRect);
- maTextRect=aTextRect;
- if (bFitToSize) maTextRect=aAnchorRect;
- rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,ConvertHdl));
- rOutliner.StripPortions();
- rOutliner.SetDrawPortionHdl(Link());
- rOutliner.Clear();
-
- if(bFitToSize)
- {
- Fraction nX(aAnchorRect.Right()-aAnchorRect.Left(),aTextRect.Right()-aTextRect.Left());
- Fraction nY(aAnchorRect.Bottom()-aAnchorRect.Top(),aTextRect.Bottom()-aTextRect.Top());
-
- // #95395# scale from top-right when vertical text
- if(rOutliner.IsVertical())
- pGroup->NbcResize(aAnchorRect.TopRight(),nX,nY);
- else
- pGroup->NbcResize(aAnchorRect.TopLeft(),nX,nY);
- }
- if (rTextObj.aGeo.nDrehWink!=0) { // #35825# Rotieren erst nach Resize (wg. FitToSize)
- pGroup->NbcRotate(maTextRect.TopLeft(),rTextObj.aGeo.nDrehWink,rTextObj.aGeo.nSin,rTextObj.aGeo.nCos);
- }
-}
-
-// #101498# Helper class to remember text portions in sorted manner
-class ImpRecordPortion
-{
-public:
- Point maPosition;
- String maText;
- xub_StrLen mnTextStart;
- xub_StrLen mnTextLength;
- sal_uInt16 mnPara;
- xub_StrLen mnIndex;
-
- // #102819# Here SvxFont needs to be used instead of Font
- SvxFont maFont;
-
- sal_Int32* mpDXArray;
- sal_uInt8 mnBiDiLevel;
-
- ImpRecordPortion(DrawPortionInfo* pInfo);
- ~ImpRecordPortion();
-
- sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
-};
-
-ImpRecordPortion::ImpRecordPortion(DrawPortionInfo* pInfo)
-: maPosition(pInfo->mrStartPos),
- maText(pInfo->mrText),
- mnTextStart((xub_StrLen)pInfo->mnTextStart),
- mnTextLength((xub_StrLen)pInfo->mnTextLen),
- mnPara(pInfo->mnPara),
- mnIndex(pInfo->mnIndex),
- maFont(pInfo->mrFont),
- mpDXArray(NULL),
- mnBiDiLevel(pInfo->GetBiDiLevel())
-{
- if(pInfo->mpDXArray)
- {
- mpDXArray = new sal_Int32[pInfo->mnTextLen];
-
- for(sal_uInt32 a(0L); a < pInfo->mnTextLen; a++)
- {
- mpDXArray[a] = pInfo->mpDXArray[a];
- }
- }
-}
-
-ImpRecordPortion::~ImpRecordPortion()
-{
- if(mpDXArray)
- {
- delete[] mpDXArray;
- }
-}
-
-IMPL_LINK(ImpTextPortionHandler,ConvertHdl,DrawPortionInfo*,pInfo)
-{
- // maTextRect enthaelt den Ausgabebereich des Textobjekts
- BOOL bIsVertical(rOutliner.IsVertical());
- Point aPos2(maTextRect.TopLeft() + pInfo->mrStartPos);
- Color aColor(pInfo->mrFont.GetColor());
-
- if(bIsVertical)
- aPos2 = maTextRect.TopRight() + pInfo->mrStartPos;
-
- Point aStartPos(aPos2);
- SfxItemSet aAttrSet((SfxItemPool&)(*rTextObj.GetObjectItemPool()));
- long nHochTief(pInfo->mrFont.GetEscapement());
- FontMetric aFontMetric(aVDev.GetFontMetric());
- sal_Int32 nLineLen(0L);
-
- Font aFont( pInfo->mrFont );
-
- if( nHochTief)
- {
- // shrink the font for sub-/superscripting
- long nPercent(pInfo->mrFont.GetPropr());
-
- if(nPercent != 100)
- {
- Size aSize(aFont.GetSize());
- aSize.Height() = (aSize.Height() * nPercent +50) / 100;
- aSize.Width() = (aSize.Width() * nPercent +50) / 100;
- aFont.SetSize(aSize);
- }
-
- sal_Bool bNeg(nHochTief < 0);
-
- if(bNeg)
- nHochTief = -nHochTief;
-
- nHochTief = (nHochTief * pInfo->mrFont.GetSize().Height() +50) /100;
-
- if(bNeg)
- nHochTief = -nHochTief;
- }
-
- aFont.SetOrientation( 0 );
- aVDev.SetFont( aFont );
-
- if(bIsVertical)
- // #83068#
- aPos2.X() += aFontMetric.GetAscent() + nHochTief;
- else
- aPos2.Y() -= aFontMetric.GetAscent() + nHochTief;
-
- if (pInfo->mrFont.IsOutline())
- {
- aAttrSet.Put(XLineColorItem(String(),aColor));
- aAttrSet.Put(XLineStyleItem(XLINE_SOLID));
- aAttrSet.Put(XLineWidthItem(0));
- aAttrSet.Put(XFillStyleItem(XFILL_NONE));
- }
- else
- {
- aAttrSet.Put(XFillColorItem(String(),aColor));
- aAttrSet.Put(XLineStyleItem(XLINE_NONE));
- aAttrSet.Put(XFillStyleItem(XFILL_SOLID));
- }
-
- // #100318# convert in a single step
- // #101499# Use GetTextOutlines and a PolyPolyVector now
- PolyPolyVector aPolyPolyVector;
- if(aVDev.GetTextOutlines(aPolyPolyVector, pInfo->mrText, pInfo->mnTextStart, pInfo->mnTextStart, pInfo->mnTextLen)
- && aPolyPolyVector.size())
- {
- for(sal_uInt32 a(0); a < aPolyPolyVector.size(); a++)
- {
- PolyPolygon aPolyPoly(aPolyPolyVector[a]);
-
- if(aPolyPoly.Count() > 0 && aPolyPoly[0].GetSize() > 0)
- {
- basegfx::B2DPolyPolygon aPolyPolygon(aPolyPoly.getB2DPolyPolygon());
- basegfx::B2DHomMatrix aMatrix;
-
- // rotate 270 degree if vertical since result is unrotated
- if(pInfo->mrFont.GetOrientation())
- {
- double fAngle(F_PI * (pInfo->mrFont.GetOrientation() % 3600) / 1800.0);
- aMatrix.rotate(fAngle);
- }
-
- // result is baseline oriented, thus move one line height, too
- if(bIsVertical)
- {
- aMatrix.translate(-aFontMetric.GetAscent(), 0.0);
- }
- else
- {
- aMatrix.translate(0.0, aFontMetric.GetAscent());
- }
-
- // move to output coordinates
- aMatrix.translate(aPos2.X(), aPos2.Y());
-
- // transform
- aPolyPolygon.transform(aMatrix);
-
- // create object
- SdrObject* pObj = rTextObj.ImpConvertMakeObj(aPolyPolygon, sal_True, !bToPoly, sal_True);
- pObj->SetMergedItemSet(aAttrSet);
- pGroup->GetSubList()->InsertObject(pObj);
- }
- }
-
- nLineLen = pInfo->mpDXArray[pInfo->mnTextLen - 1];
- }
-
- FontUnderline eUndl=pInfo->mrFont.GetUnderline();
- FontStrikeout eStrk=pInfo->mrFont.GetStrikeout();
- if (eUndl!=UNDERLINE_NONE) {
- FASTBOOL bDouble=eUndl==UNDERLINE_DOUBLE;
- long nDescent=aFontMetric.GetDescent();
- long nAscend=aFontMetric.GetAscent();
- long nDick=nDescent / (bDouble ? 5 : 3);
- long nDist=(nDescent-nDick*2)/3; // Linienabstand bei doppelt
- basegfx::B2DPolyPolygon aPolyPolygon;
-
- if (eUndl!=UNDERLINE_DOTTED) {
- Point aPoint(0,0);
- XPolygon aXP(Rectangle(aPoint,bIsVertical ? Point(nDick,nLineLen) : Point(nLineLen,nDick)));
- if(bIsVertical)
- aXP.Move(nAscend-nDist,0);
- aPolyPolygon.append(aXP.getB2DPolygon());
- if (bDouble) {
- if(bIsVertical)
- aXP.Move(-(nDick+nDist),0);
- else
- aXP.Move(0,nDick+nDist);
- aPolyPolygon.append(aXP.getB2DPolygon());
- }
- } else {
- Point aPoint(0,0);
- XPolygon aXP(Rectangle(aPoint,Point(nDick,nDick)));
- long n=0;
- while (n<=nLineLen) {
- if (n+nDick>nLineLen) { // ler letzte Dot ggf. etwas schmaler
- aXP=XPolygon(Rectangle(
- bIsVertical ? Point(0,n) : Point(n,0),
- bIsVertical ? Point(nDick,nLineLen) : Point(nLineLen,nDick)));
- }
- aPolyPolygon.append(aXP.getB2DPolygon());
- if(bIsVertical)
- aXP.Move(0,2*nDick);
- else
- aXP.Move(2*nDick,0);
- n+=2*nDick;
- }
- }
-
- long y=nDescent-nDick; // y-Position der Striche zur Baseline bestimmen
- if (bDouble) y-=nDick+nDist;
- y=(y+1)/2;
-
- basegfx::B2DHomMatrix aMatrix;
-
- if(bIsVertical)
- {
- aMatrix.translate(aStartPos.X() - (y - nHochTief), aStartPos.Y());
- }
- else
- {
- aMatrix.translate(aStartPos.X(), aStartPos.Y() + y - nHochTief);
- }
-
- aPolyPolygon.transform(aMatrix);
-
- // maTextRect enthaelt den Ausgabebereich des Textobjekts
- SdrObject* pObj=rTextObj.ImpConvertMakeObj(aPolyPolygon, sal_True, !bToPoly, sal_True);
- pObj->SetMergedItemSet(aAttrSet);
- pGroup->GetSubList()->InsertObject(pObj);
- }
- if (eStrk!=STRIKEOUT_NONE) {
- FASTBOOL bDouble=eStrk==STRIKEOUT_DOUBLE;
- long nDescent=aFontMetric.GetDescent();
- //long nAscend=aFontMetric.GetAscent();
- long nDick=nDescent / (bDouble ? 5 : 3);
- long nDist=(nDescent-nDick*2)/3; // Linienabstand bei doppelt
- basegfx::B2DPolyPolygon aPolyPolygon;
-
- const Point aPoint(0,0);
- const Rectangle aRect(aPoint,bIsVertical ? Point(nDick,nLineLen) : Point(nLineLen,nDick));
- const basegfx::B2DRange aRectRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom());
- basegfx::B2DPolygon aPolyFromRect(basegfx::tools::createPolygonFromRect(aRectRange));
- aPolyPolygon.append(aPolyFromRect);
-
- if (bDouble)
- {
- basegfx::B2DHomMatrix aMatrix;
-
- if(bIsVertical)
- aMatrix.translate(-(nDick+nDist), 0.0);
- else
- aMatrix.translate(0.0, nDick+nDist);
-
- aPolyFromRect.transform(aMatrix);
- aPolyPolygon.append(aPolyFromRect);
- }
-
- // y-Position der Striche zur Baseline bestimmen
- long y=-(long)(aFontMetric.GetAscent()-aFontMetric.GetIntLeading()+1)/3;
- if (!bDouble) y-=(nDick+1)/2;
- else y-=nDick+(nDist+1)/2;
-
- basegfx::B2DHomMatrix aMatrix;
-
- if(bIsVertical)
- {
- aMatrix.translate(aStartPos.X() - (y - nHochTief), aStartPos.Y());
- }
- else
- {
- aMatrix.translate(aStartPos.X(), aStartPos.Y() + y - nHochTief);
- }
-
- aPolyPolygon.transform(aMatrix);
-
- // maTextRect enthaelt den Ausgabebereich des Textobjekts
- SdrObject* pObj=rTextObj.ImpConvertMakeObj(aPolyPolygon, sal_True, !bToPoly, sal_True);
- pObj->SetMergedItemSet(aAttrSet);
- pGroup->GetSubList()->InsertObject(pObj);
- }
-
- return 0;
-}
-
-// eof
diff --git a/svx/source/svdraw/svdtxhdl.hxx b/svx/source/svdraw/svdtxhdl.hxx
deleted file mode 100644
index 82fd38519171..000000000000
--- a/svx/source/svdraw/svdtxhdl.hxx
+++ /dev/null
@@ -1,73 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: svdtxhdl.hxx,v $
- * $Revision: 1.9 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SVDTXHDL_HXX
-#define _SVDTXHDL_HXX
-
-#include <vcl/virdev.hxx>
-#include <tools/poly.hxx>
-#include <tools/link.hxx>
-
-//************************************************************
-// Vorausdeklarationen
-//************************************************************
-
-class SdrOutliner;
-class DrawPortionInfo;
-class SdrTextObj;
-class SdrObjGroup;
-class SdrModel;
-
-//************************************************************
-// ImpTextPortionHandler
-//************************************************************
-
-class ImpTextPortionHandler
-{
- VirtualDevice aVDev;
- SdrOutliner& rOutliner;
- const SdrTextObj& rTextObj;
-
- // Variablen fuer ConvertToPathObj
- SdrObjGroup* pGroup;
- FASTBOOL bToPoly;
- Rectangle maTextRect;
-
-public:
- ImpTextPortionHandler(SdrOutliner& rOutln, const SdrTextObj& rTxtObj);
- void ConvertToPathObj(SdrObjGroup& rGroup, FASTBOOL bToPoly);
-
- DECL_LINK(ConvertHdl,DrawPortionInfo*);
-};
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-#endif //_SVDTXHDL_HXX
-
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index eb52bfb62c9e..08cee1eb17d3 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -1179,9 +1179,15 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
if (bNewTextAvailable && rView.AreObjectsMarked())
{
const SdrMarkList& rML=rView.GetMarkedObjectList();
- XubString aStr;
- ImpTakeDescriptionStr(STR_UndoObjSetText,aStr);
- rView.BegUndo(aStr);
+
+ const bool bUndo = rView.IsUndoEnabled();
+ if( bUndo )
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoObjSetText,aStr);
+ rView.BegUndo(aStr);
+ }
+
ULONG nAnz=rML.GetMarkCount();
for (ULONG nm=0; nm<nAnz; nm++)
{
@@ -1189,14 +1195,18 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pObj2);
if (pTextObj!=NULL)
{
- rView.AddUndo(new SdrUndoObjSetText(*pTextObj,0));
+ if( bUndo )
+ rView.AddUndo(new SdrUndoObjSetText(*pTextObj,0));
+
OutlinerParaObject* pText1=pNewText;
if (pText1!=NULL)
pText1 = new OutlinerParaObject(*pText1);
pTextObj->SetOutlinerParaObject(pText1);
}
}
- rView.EndUndo();
+
+ if( bUndo )
+ rView.EndUndo();
}
}
@@ -1209,6 +1219,95 @@ bool SdrUndoObjSetText::CanSdrRepeat(SdrView& rView) const
return bOk;
}
+// --> OD 2009-07-09 #i73249#
+SdrUndoObjStrAttr::SdrUndoObjStrAttr( SdrObject& rNewObj,
+ const ObjStrAttrType eObjStrAttr,
+ const String& sOldStr,
+ const String& sNewStr)
+ : SdrUndoObj( rNewObj ),
+ meObjStrAttr( eObjStrAttr ),
+ msOldStr( sOldStr ),
+ msNewStr( sNewStr )
+{
+}
+
+void SdrUndoObjStrAttr::Undo()
+{
+ ImpShowPageOfThisObject();
+
+ switch ( meObjStrAttr )
+ {
+ case OBJ_NAME:
+ {
+ pObj->SetName( msOldStr );
+ }
+ break;
+ case OBJ_TITLE:
+ {
+ pObj->SetTitle( msOldStr );
+ }
+ break;
+ case OBJ_DESCRIPTION:
+ {
+ pObj->SetDescription( msOldStr );
+ }
+ break;
+ }
+}
+
+void SdrUndoObjStrAttr::Redo()
+{
+ switch ( meObjStrAttr )
+ {
+ case OBJ_NAME:
+ {
+ pObj->SetName( msNewStr );
+ }
+ break;
+ case OBJ_TITLE:
+ {
+ pObj->SetTitle( msNewStr );
+ }
+ break;
+ case OBJ_DESCRIPTION:
+ {
+ pObj->SetDescription( msNewStr );
+ }
+ break;
+ }
+
+ ImpShowPageOfThisObject();
+}
+
+String SdrUndoObjStrAttr::GetComment() const
+{
+ String aStr;
+ switch ( meObjStrAttr )
+ {
+ case OBJ_NAME:
+ {
+ ImpTakeDescriptionStr( STR_UndoObjName, aStr );
+ aStr += sal_Unicode(' ');
+ aStr += sal_Unicode('\'');
+ aStr += msNewStr;
+ aStr += sal_Unicode('\'');
+ }
+ break;
+ case OBJ_TITLE:
+ {
+ ImpTakeDescriptionStr( STR_UndoObjTitle, aStr );
+ }
+ break;
+ case OBJ_DESCRIPTION:
+ {
+ ImpTakeDescriptionStr( STR_UndoObjDescription, aStr );
+ }
+ break;
+ }
+
+ return aStr;
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -1716,6 +1815,15 @@ SdrUndoAction* SdrUndoFactory::CreateUndoObjectSetText( SdrObject& rNewObj, sal_
return new SdrUndoObjSetText( rNewObj, nText );
}
+SdrUndoAction* SdrUndoFactory::CreateUndoObjectStrAttr( SdrObject& rObject,
+ SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
+ String sOldStr,
+ String sNewStr )
+{
+ return new SdrUndoObjStrAttr( rObject, eObjStrAttrType, sOldStr, sNewStr );
+}
+
+
// layer
SdrUndoAction* SdrUndoFactory::CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
{
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 84ddc594f97e..cd37fa21f9f5 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -55,13 +55,12 @@
#include "svx/svddrgmt.hxx"
#include "svx/svdoutl.hxx"
#include "svx/svdotable.hxx"
-
-// #90477#
#include <tools/tenccvt.hxx>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <sdrpaintwindow.hxx>
#include <svx/sdrpagewindow.hxx>
+#include <svx/sdrhittesthelper.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -489,7 +488,9 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pHitObj);
if (pTextObj!=NULL && pTextObj->HasText())
{
- BOOL bTEHit=pTextObj->IsTextEditHit(aLocalLogicPosition,0/*nHitTolLog*/,&pPV->GetVisibleLayers());
+ bool bTEHit(pPV &&
+ SdrObjectPrimitiveHit(*pTextObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
+
if (bTEHit)
{
Rectangle aTextRect;
@@ -566,11 +567,15 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
if(!bBoundRectHit)
{
- BOOL bTEHit=pHitObj->IsTextEditHit(aLocalLogicPosition,0,&pPV->GetVisibleLayers());
+ bool bTEHit(pPV &&
+ SdrObjectPrimitiveHit(*pHitObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
// TextEdit an Objekten im gesperrten Layer
if (pPV->GetLockedLayers().IsSet(pHitObj->GetLayer()))
+ {
bTEHit=FALSE;
+ }
+
if (bTEHit)
{
rVEvt.pRootObj=pObj;
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 58ef0c2e9743..b9a197ed89fb 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -305,13 +305,18 @@ BOOL SdrExchangeView::Paste(SvStream& rInput, const String& rBaseURL, USHORT eFo
BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, UINT32 nOptions)
{
const SdrModel* pSrcMod=&rMod;
- if (pSrcMod==pMod) return FALSE; // na so geht's ja nun nicht
+ if (pSrcMod==pMod)
+ return FALSE; // na so geht's ja nun nicht
- BegUndo(ImpGetResStr(STR_ExchangePaste));
+ const bool bUndo = IsUndoEnabled();
+
+ if( bUndo )
+ BegUndo(ImpGetResStr(STR_ExchangePaste));
if( mxSelectionController.is() && mxSelectionController->PasteObjModel( rMod ) )
{
- EndUndo();
+ if( bUndo )
+ EndUndo();
return TRUE;
}
@@ -327,9 +332,12 @@ BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList*
}
ImpLimitToWorkArea( aPos );
- if (pLst==NULL) return FALSE;
+ if (pLst==NULL)
+ return FALSE;
+
BOOL bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
- if (bUnmark) UnmarkAllObj();
+ if (bUnmark)
+ UnmarkAllObj();
// evtl. umskalieren bei unterschiedlicher MapUnit am Model
// Dafuer erstmal die Faktoren berechnen
@@ -338,20 +346,23 @@ BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList*
BOOL bResize=eSrcUnit!=eDstUnit;
Fraction xResize,yResize;
Point aPt0;
- if (bResize) {
+ if (bResize)
+ {
FrPair aResize(GetMapFactor(eSrcUnit,eDstUnit));
xResize=aResize.X();
yResize=aResize.Y();
}
SdrObjList* pDstLst=pLst;
USHORT nPg,nPgAnz=pSrcMod->GetPageCount();
- for (nPg=0; nPg<nPgAnz; nPg++) {
+ for (nPg=0; nPg<nPgAnz; nPg++)
+ {
const SdrPage* pSrcPg=pSrcMod->GetPage(nPg);
// #104148# Use SnapRect, not BoundRect here
Rectangle aR=pSrcPg->GetAllObjSnapRect();
- if (bResize) ResizeRect(aR,aPt0,xResize,yResize);
+ if (bResize)
+ ResizeRect(aR,aPt0,xResize,yResize);
Point aDist(aPos-aR.Center());
Size aSiz(aDist.X(),aDist.Y());
//ULONG nDstObjAnz0=pDstLst->GetObjCount();
@@ -363,7 +374,8 @@ BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList*
// New mechanism to re-create the connections of cloned connectors
CloneList aCloneList;
- for (nOb=0; nOb<nObAnz; nOb++) {
+ for (nOb=0; nOb<nObAnz; nOb++)
+ {
const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
// #116235#
@@ -413,7 +425,9 @@ BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList*
SdrInsertReason aReason(SDRREASON_VIEWCALL);
pDstLst->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
+ if( bUndo )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
+
if (bMark) {
// Markhandles noch nicht sofort setzen!
// Das erledigt das ModelHasChanged der MarkView.
@@ -455,7 +469,10 @@ BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList*
#endif
}
}
- EndUndo();
+
+ if( bUndo )
+ EndUndo();
+
return TRUE;
}
@@ -497,17 +514,22 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
pObj->SetLogicRect(aR);
SdrInsertReason aReason(SDRREASON_VIEWCALL);
rLst.InsertObject(pObj,CONTAINER_APPEND,&aReason);
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
+
+ if( IsUndoEnabled() )
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
+
SdrPageView* pMarkPV=NULL;
SdrPageView* pPV = GetSdrPageView();
if(pPV)
{
- if (pPV->GetObjList()==&rLst) pMarkPV=pPV;
+ if (pPV->GetObjList()==&rLst)
+ pMarkPV=pPV;
}
BOOL bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
- if (bMark) { // Obj in der ersten gefundenen PageView markieren
+ if (bMark)
+ { // Obj in der ersten gefundenen PageView markieren
MarkObj(pObj,pMarkPV);
}
}
@@ -532,7 +554,17 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap( BOOL bNoVDevIfOneBmpMarked ) const
if( !aBmp )
{
const Graphic aGraphic( GetMarkedObjMetaFile( bNoVDevIfOneBmpMarked ) );
- aBmp = aGraphic.GetBitmap();
+
+ // #i102089# support user's settings of AA and LineSnap when the MetaFile gets
+ // rasterconverted to a bitmap
+ const SvtOptionsDrawinglayer aDrawinglayerOpt;
+ const GraphicConversionParameters aParameters(
+ Size(),
+ false,
+ aDrawinglayerOpt.IsAntiAliasing(),
+ aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
+
+ aBmp = aGraphic.GetBitmap(aParameters);
}
}
@@ -665,17 +697,16 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
aOut.EnableOutput( FALSE );
aOut.SetMapMode( aMap );
aMtf.Record( &aOut );
-
- // aXOut.SetOffset( Point( -aBoundRect.Left(), -aBoundRect.Top() ) );
- // #i92760# offset set in wrong direction, corrected
- MapMode aOffsetMapMode(aOut.GetMapMode());
- aOffsetMapMode.SetOrigin(Point(-aBoundRect.Left(), -aBoundRect.Top()));
- aOut.SetMapMode(aOffsetMapMode);
-
pObj->SingleObjectPainter( aOut ); // #110094#-17
-
aMtf.Stop();
aMtf.WindStart();
+
+ // #i99268# replace the original offset from using XOutDev's SetOffset
+ // NOT (as tried with #i92760#) with another MapMode which gets recorded
+ // by the Metafile itself (what always leads to problems), but by hardly
+ // moving the result
+ aMtf.Move(-aBoundRect.Left(), -aBoundRect.Top());
+
aMtf.SetPrefMapMode( aMap );
aMtf.SetPrefSize( aBoundRect.GetSize() );
diff --git a/svx/source/svrtf/makefile.mk b/svx/source/svrtf/makefile.mk
index 8dbbd79a82fe..950036034d41 100644
--- a/svx/source/svrtf/makefile.mk
+++ b/svx/source/svrtf/makefile.mk
@@ -36,6 +36,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
PRJNAME=svx
TARGET=svxrtf
+LIBTARGET=NO
AUTOSEG=true
# --- Settings -----------------------------------------------------
@@ -48,11 +49,17 @@ AUTOSEG=true
EXCEPTIONSFILES= \
$(SLO)$/svxrtf.obj
-SLOFILES = \
- $(SLO)$/rtfgrf.obj \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/rtfitem.obj \
$(SLO)$/svxrtf.obj
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/rtfgrf.obj
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
# ==========================================================================
.INCLUDE : target.mk
diff --git a/svx/source/svrtf/rtfgrf.cxx b/svx/source/svrtf/rtfgrf.cxx
index 417c72cf02b1..de90302586d0 100644
--- a/svx/source/svrtf/rtfgrf.cxx
+++ b/svx/source/svrtf/rtfgrf.cxx
@@ -559,17 +559,4 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
return bValidBmp;
}
- // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen !
-void SvxRTFPictureType::ResetValues()
-{ // setze alle Werte RTF-Defaults
- eStyle = RTF_BITMAP;
- nMode = HEX_MODE;
- nType = nGoalWidth = nGoalHeight = 0;
- nWidth = nHeight = nWidthBytes = 0;
- uPicLen = 0;
- nBitsPerPixel = nPlanes = 1;
- nScalX = nScalY = 100; // Skalierung in Prozent
- nCropT = nCropB = nCropL = nCropR = 0;
-}
-
/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/svx/source/svrtf/rtfitem.cxx b/svx/source/svrtf/rtfitem.cxx
index bab67c91b1ef..889298b89f35 100644
--- a/svx/source/svrtf/rtfitem.cxx
+++ b/svx/source/svrtf/rtfitem.cxx
@@ -1257,12 +1257,16 @@ ATTR_SETEMPHASIS:
ReadTabAttr( nToken, *pSet );
/*
- cmc: #i76140, he who reads the { must read the }
+ cmc: #i76140, he who consumed the { must consume the }
We rewound to a state of { being the current
- token so it is our responsibility to read the }
- token.
+ token so it is our responsibility to consume the }
+ token if we consumed the {. We will not have consumed
+ the { if it belonged to our caller, i.e. if the { we
+ are handling is the "firsttoken" passed to us then
+ the *caller* must consume it, not us. Otherwise *we*
+ should consume it.
*/
- if (nToken == BRACELEFT)
+ if (nToken == BRACELEFT && !bFirstToken)
{
nToken = GetNextToken();
DBG_ASSERT( nToken == BRACERIGHT,
diff --git a/svx/source/svxlink/fileobj.cxx b/svx/source/svxlink/fileobj.cxx
index f2628f181d31..d159c7f78abe 100644
--- a/svx/source/svxlink/fileobj.cxx
+++ b/svx/source/svxlink/fileobj.cxx
@@ -121,37 +121,6 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
// relativen Datei Links aufzuloesen!!!! Wird ueber den
// LinkManager und damit von dessen Storage erledigt.
rData <<= rtl::OUString( sFileNm );
-
-/*
-===========================================================================
-JP 28.02.96: noch eine Baustelle:
- Idee: hier das Medium und die DocShell anlegen, Doc laden
- und ueber OLE-SS (GetObj(...)) den Bereich als
- PseudoObject erfragen. Dieses mit den Daten oder
- dessen Daten verschicken.
-
-===========================================================================
-
- SfxMedium aMed( aFileNm.GetFull(), STREAM_READ, TRUE );
- aMed.DownLoad(); // nur mal das Medium anfassen (DownLoaden)
-
- if( aMed.IsStorage() )
- pSvData->SetData( SvStorageRef( aMed.GetStorage() ),
- TRANSFER_COPY );
- else
- {
- SvStream* pStream = aMed.GetInStream();
- if( !pStream )
- return FALSE;
-
- UINT32 nLen = pStream->Seek( STREAM_SEEK_TO_END );
- pStream->Seek( STREAM_SEEK_TO_BEGIN );
-
- void* pData = SvMemAlloc( nLen );
- pStream->Read( pData, nLen );
- pSvData->SetData( pData, nLen, TRANSFER_MOVE );
- }
-*/
}
break;
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index 6f4bea3cbd40..d76d5e1b3079 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -573,4 +573,15 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt
return mnIndexInParent;
}
+::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException)
+{
+ ThrowIfDisposed ();
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+
+ if( mxCell.is() )
+ return mxCell->getName();
+
+ return AccessibleCellBase::getAccessibleName();
+}
+
} // end of namespace accessibility
diff --git a/svx/source/table/accessiblecell.hxx b/svx/source/table/accessiblecell.hxx
index 166495ecc83d..95c8d684fe3b 100644
--- a/svx/source/table/accessiblecell.hxx
+++ b/svx/source/table/accessiblecell.hxx
@@ -85,6 +85,7 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL getAccessibleChild(sal_Int32 nIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL getAccessibleStateSet(void) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(void) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
// XAccessibleComponent
virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint) throw (::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index 89e18137eeb0..455d39eee467 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -160,6 +160,8 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild( sal_Int32
maChildMap[xCell] = xAccessibleCell;
+ xAccessibleCell->Init();
+
Reference< XAccessible > xChild( xAccessibleCell.get() );
return xChild;
}
@@ -501,10 +503,11 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleCellAt( sal
::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
checkCellPosition( nColumn, nRow );
- (void)nRow;
- (void)nColumn;
- Reference< XAccessible > xRet;
- return xRet;
+ sal_Int32 nChildIndex = 0;
+ if( mxImpl->mxTable.is() )
+ nChildIndex = mxImpl->mxTable->getColumnCount() * nRow + nColumn;
+
+ return getAccessibleChild( nChildIndex );
}
//--------------------------------------------------------------------
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index ddc20c7ae3d9..42034f2bd0cb 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -81,10 +81,10 @@ extern BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine, sal_Bool bConver
// -----------------------------------------------------------------------------
-static const SfxItemPropertyMap* ImplGetSvxCellPropertyMap()
+static const SvxItemPropertySet* ImplGetSvxCellPropertySet()
{
// Propertymap fuer einen Outliner Text
- static const SfxItemPropertyMap aSvxCellPropertyMap[] =
+ static const SfxItemPropertyMapEntry aSvxCellPropertyMap[] =
{
FILL_PROPERTIES
// { MAP_CHAR_LEN("HasLevels"), OWN_ATTR_HASLEVELS, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
@@ -110,7 +110,8 @@ static const SfxItemPropertyMap* ImplGetSvxCellPropertyMap()
{0,0,0,0,0,0}
};
- return aSvxCellPropertyMap;
+ static SvxItemPropertySet aSvxCellPropertySet( aSvxCellPropertyMap );
+ return &aSvxCellPropertySet;
}
namespace sdr
@@ -142,6 +143,8 @@ namespace sdr
void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem);
+ void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr);
+
sdr::table::CellRef mxCell;
};
@@ -272,6 +275,10 @@ namespace sdr
AttributeProperties::ItemChange( nWhich, pNewItem );
}
+ void CellProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr)
+ {
+ TextProperties::SetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr );
+ }
} // end of namespace properties
} // end of namespace sdr
@@ -281,10 +288,23 @@ namespace sdr { namespace table {
// Cell
// -----------------------------------------------------------------------------
+rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject )
+{
+ rtl::Reference< Cell > xCell( new Cell( rTableObj, pOutlinerParaObject ) );
+ if( xCell->mxTable.is() )
+ {
+ Reference< XEventListener > xListener( xCell.get() );
+ xCell->mxTable->addEventListener( xListener );
+ }
+ return xCell;
+}
+
+// -----------------------------------------------------------------------------
+
Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw()
: SdrText( rTableObj, pOutlinerParaObject )
-, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
-, maPropSet( ImplGetSvxCellPropertyMap() )
+, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
+, mpPropSet( ImplGetSvxCellPropertySet() )
, mpProperties( new sdr::properties::CellProperties( rTableObj, this ) )
, mnCellContentType( CellContentType_EMPTY )
, mfValue( 0.0 )
@@ -309,7 +329,19 @@ Cell::~Cell() throw()
void Cell::dispose()
{
- mxTable.clear();
+ if( mxTable.is() )
+ {
+ try
+ {
+ Reference< XEventListener > xThis( this );
+ mxTable->removeEventListener( xThis );
+ }
+ catch( Exception& )
+ {
+ DBG_ERROR("Cell::dispose(), exception caught!");
+ }
+ mxTable.clear();
+ }
if( mpProperties )
{
@@ -405,6 +437,11 @@ void Cell::cloneFrom( const CellRef& xCell )
msFormula = xCell->msFormula;
mfValue = xCell->mfValue;
mnError = xCell->mnError;
+
+ mbMerged = xCell->mbMerged;
+ mnRowSpan = xCell->mnRowSpan;
+ mnColSpan = xCell->mnColSpan;
+
}
notifyModified();
}
@@ -621,7 +658,7 @@ sal_Int32 Cell::getMinimumHeight()
pEditOutliner->SetMaxAutoPaperSize(aSize);
nMinimumHeight = pEditOutliner->GetTextHeight()+1;
}
- else
+ else /*if ( hasText() )*/
{
Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
rOutliner.SetPaperSize(aSize);
@@ -698,7 +735,7 @@ void Cell::SetOutlinerParaObject( OutlinerParaObject* pTextObject )
void Cell::AddUndo()
{
SdrObject& rObj = GetObject();
- if( rObj.IsInserted() && GetModel() )
+ if( rObj.IsInserted() && GetModel() && GetModel()->IsUndoEnabled() )
{
CellRef xCell( this );
GetModel()->AddUndo( new CellUndo( &rObj, xCell ) );
@@ -737,6 +774,9 @@ Any SAL_CALL Cell::queryInterface( const Type & rType ) throw(RuntimeException)
if( rType == XLayoutConstrains::static_type() )
return Any( Reference< XLayoutConstrains >( this ) );
+ if( rType == XEventListener::static_type() )
+ return Any( Reference< XEventListener >( this ) );
+
Any aRet( SvxUnoTextBase::queryAggregation( rType ) );
if( aRet.hasValue() )
return aRet;
@@ -926,9 +966,9 @@ sal_Int32 SAL_CALL Cell::getError( ) throw (RuntimeException)
// XPropertySet
// -----------------------------------------------------------------------------
-Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap )
+Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap )
{
- Any aAny( maPropSet.getPropertyValue( pMap, aSet ) );
+ Any aAny( mpPropSet->getPropertyValue( pMap, aSet ) );
if( *pMap->pType != aAny.getValueType() )
{
@@ -950,7 +990,7 @@ Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap )
Reference< XPropertySetInfo > SAL_CALL Cell::getPropertySetInfo() throw(RuntimeException)
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
// -----------------------------------------------------------------------------
@@ -962,7 +1002,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(rPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName);
if( pMap )
{
if( (pMap->nFlags & PropertyAttribute::READONLY ) != 0 )
@@ -1084,7 +1124,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
if( aSet.GetItemState( pMap->nWID ) == SFX_ITEM_SET )
{
- maPropSet.setPropertyValue( pMap, rValue, aSet );
+ mpPropSet->setPropertyValue( pMap, rValue, aSet );
}
}
}
@@ -1107,7 +1147,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(Unknow
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( pMap )
{
switch( pMap->nWID )
@@ -1308,7 +1348,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( pMap )
{
@@ -1451,7 +1491,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(U
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( pMap )
{
switch( pMap->nWID )
@@ -1494,7 +1534,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(Unk
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName);
if( pMap )
{
switch( pMap->nWID )
@@ -1697,5 +1737,78 @@ void SAL_CALL Cell::setString( const OUString& aString ) throw (RuntimeException
notifyModified();
}
+// XEventListener
+void SAL_CALL Cell::disposing( const EventObject& /*Source*/ ) throw (RuntimeException)
+{
+ mxTable.clear();
+ dispose();
+}
+
+static OUString getCellName( sal_Int32 nCol, sal_Int32 nRow )
+{
+ rtl::OUStringBuffer aBuf;
+
+ if (nCol < 26*26)
+ {
+ if (nCol < 26)
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol)));
+ else
+ {
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ (static_cast<sal_uInt16>(nCol) / 26) - 1));
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ (static_cast<sal_uInt16>(nCol) % 26)));
+ }
+ }
+ else
+ {
+ String aStr;
+ while (nCol >= 26)
+ {
+ sal_Int32 nC = nCol % 26;
+ aStr += static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nC));
+ nCol = nCol - nC;
+ nCol = nCol / 26 - 1;
+ }
+ aStr += static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol));
+ aStr.Reverse();
+ aBuf.append( aStr);
+ }
+ aBuf.append( OUString::valueOf(nRow+1) );
+ return aBuf.makeStringAndClear();
+}
+
+OUString Cell::getName()
+{
+ // todo: optimize!
+ OUString sName;
+ if( mxTable.is() ) try
+ {
+ Reference< XCell > xThis( static_cast< XCell* >( this ) );
+
+ sal_Int32 nRowCount = mxTable->getRowCount();
+ sal_Int32 nColCount = mxTable->getColumnCount();
+ for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
+ {
+ for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
+ {
+ Reference< XCell > xCell( mxTable->getCellByPosition( nCol, nRow ) );
+ if( xCell == xThis )
+ {
+ return getCellName( nCol, nRow );
+ }
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ }
+
+ return sName;
+}
+
} }
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index 119b389c75fa..901fe4735e51 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -34,6 +34,7 @@
#include <com/sun/star/table/XMergeableCell.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
#include <rtl/ref.hxx>
@@ -46,7 +47,7 @@
class SfxItemSet;
class OutlinerParaObject;
-struct SfxItemPropertyMap;
+
namespace sdr { namespace properties {
class TextProperties;
} }
@@ -57,162 +58,170 @@ namespace sdr { namespace table {
// -----------------------------------------------------------------------------
-class Cell : public SdrText,
+class SVX_DLLPUBLIC Cell : public SdrText,
public SvxUnoTextBase,
public ::com::sun::star::table::XMergeableCell,
public ::com::sun::star::awt::XLayoutConstrains,
+ public ::com::sun::star::lang::XEventListener,
public ::cppu::OWeakObject
{
friend class CellUndo;
public:
- Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw();
- virtual ~Cell() throw();
+ SVX_DLLPRIVATE static rtl::Reference< Cell > create( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject );
// private
- void dispose();
+ SVX_DLLPRIVATE void dispose();
// SdrTextShape proxy
bool IsTextEditActive();
- bool hasText() const;
+ SVX_DLLPRIVATE bool hasText() const;
- void cloneFrom( const CellRef& rCell );
+ SVX_DLLPRIVATE void cloneFrom( const CellRef& rCell );
- void setCellRect( ::Rectangle& rCellRect ) { maCellRect = rCellRect; }
- const ::Rectangle& getCellRect() const { return maCellRect; }
- ::Rectangle& getCellRect() { return maCellRect; }
+ SVX_DLLPRIVATE void setCellRect( ::Rectangle& rCellRect ) { maCellRect = rCellRect; }
+ SVX_DLLPRIVATE const ::Rectangle& getCellRect() const { return maCellRect; }
+ SVX_DLLPRIVATE ::Rectangle& getCellRect() { return maCellRect; }
OutlinerParaObject* GetEditOutlinerParaObject() const;
- void SetStyleSheet( SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr );
- virtual SfxStyleSheet* GetStyleSheet() const;
+ SVX_DLLPRIVATE void SetStyleSheet( SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr );
+ SVX_DLLPRIVATE virtual SfxStyleSheet* GetStyleSheet() const;
SfxStyleSheetPool* GetStyleSheetPool() const;
- virtual const Rectangle& GetCurrentBoundRect() const;
- virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const;
+ SVX_DLLPRIVATE virtual const Rectangle& GetCurrentBoundRect() const;
+ SVX_DLLPRIVATE virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const;
- virtual const SfxItemSet& GetItemSet() const;
- void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, sal_Bool bClearAllItems);
+ SVX_DLLPRIVATE virtual const SfxItemSet& GetItemSet() const;
+ SVX_DLLPRIVATE void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, sal_Bool bClearAllItems);
void SetMergedItem(const SfxPoolItem& rItem);
- sal_Int32 getMinimumWidth();
- sal_Int32 getMinimumHeight();
+ SVX_DLLPRIVATE sal_Int32 getMinimumWidth();
+ SVX_DLLPRIVATE sal_Int32 getMinimumHeight();
- long GetTextLeftDistance() const;
- long GetTextRightDistance() const;
- long GetTextUpperDistance() const;
- long GetTextLowerDistance() const;
+ SVX_DLLPRIVATE long GetTextLeftDistance() const;
+ SVX_DLLPRIVATE long GetTextRightDistance() const;
+ SVX_DLLPRIVATE long GetTextUpperDistance() const;
+ SVX_DLLPRIVATE long GetTextLowerDistance() const;
- SdrTextVertAdjust GetTextVerticalAdjust() const;
+ SVX_DLLPRIVATE SdrTextVertAdjust GetTextVerticalAdjust() const;
SdrTextHorzAdjust GetTextHorizontalAdjust() const;
- virtual void SetModel(SdrModel* pNewModel);
+ SVX_DLLPRIVATE virtual void SetModel(SdrModel* pNewModel);
- void merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan );
- void mergeContent( const CellRef& xSourceCell );
- void replaceContentAndFormating( const CellRef& xSourceCell );
+ SVX_DLLPRIVATE void merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan );
+ SVX_DLLPRIVATE void mergeContent( const CellRef& xSourceCell );
+ SVX_DLLPRIVATE void replaceContentAndFormating( const CellRef& xSourceCell );
- void setMerged();
+ SVX_DLLPRIVATE void setMerged();
// XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& Type ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw ();
- virtual void SAL_CALL release() throw ();
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& Type ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL acquire() throw ();
+ SVX_DLLPRIVATE virtual void SAL_CALL release() throw ();
// XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
// XLayoutConstrains
- virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw (::com::sun::star::uno::RuntimeException);
// XMergeableCell
- virtual ::sal_Int32 SAL_CALL getRowSpan() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getColumnSpan() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL isMerged() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getRowSpan() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getColumnSpan() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::sal_Bool SAL_CALL isMerged() throw (::com::sun::star::uno::RuntimeException);
// XCell
- virtual ::rtl::OUString SAL_CALL getFormula() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw (::com::sun::star::uno::RuntimeException);
- virtual double SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setValue( double nValue ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::table::CellContentType SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getError() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getFormula() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual double SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setValue( double nValue ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::table::CellContentType SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual sal_Int32 SAL_CALL getError() throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::beans::XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
// XMultiPropertySet
- virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::beans::XPropertyState
- virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
// XMultiPropertyStates
- virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
// XFastPropertySet
- virtual void SAL_CALL setFastPropertyValue( ::sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( ::sal_Int32 nHandle ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setFastPropertyValue( ::sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( ::sal_Int32 nHandle ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
// XText
- virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
// XSimpleText
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& aTextPosition ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::rtl::OUString& aString, ::sal_Bool bAbsorb ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, ::sal_Int16 nControlCharacter, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& aTextPosition ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::rtl::OUString& aString, ::sal_Bool bAbsorb ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, ::sal_Int16 nControlCharacter, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
// XTextRange
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getString( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getString( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ SVX_DLLPRIVATE virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject );
+ SVX_DLLPRIVATE virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject );
- void AddUndo();
+ SVX_DLLPRIVATE void AddUndo();
using SvxUnoTextRangeBase::setPropertyValue;
using SvxUnoTextRangeBase::getPropertyValue;
- sdr::properties::TextProperties* CloneProperties( SdrObject& rNewObj, Cell& rNewCell );
+ SVX_DLLPRIVATE sdr::properties::TextProperties* CloneProperties( SdrObject& rNewObj, Cell& rNewCell );
- static sdr::properties::TextProperties* CloneProperties( sdr::properties::TextProperties* pProperties, SdrObject& rNewObj, Cell& rNewCell );
+ SVX_DLLPRIVATE static sdr::properties::TextProperties* CloneProperties( sdr::properties::TextProperties* pProperties, SdrObject& rNewObj, Cell& rNewCell );
- void notifyModified();
+ SVX_DLLPRIVATE void notifyModified();
+
+ ::rtl::OUString getName();
protected:
- virtual const SfxItemSet& GetObjectItemSet();
- virtual void SetObjectItem(const SfxPoolItem& rItem);
+ SVX_DLLPRIVATE virtual const SfxItemSet& GetObjectItemSet();
+ SVX_DLLPRIVATE virtual void SetObjectItem(const SfxPoolItem& rItem);
- ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap );
+ SVX_DLLPRIVATE ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap );
private:
- SvxItemPropertySet maPropSet;
+ SVX_DLLPRIVATE Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw();
+ SVX_DLLPRIVATE virtual ~Cell() throw();
+
+ const SvxItemPropertySet* mpPropSet;
sdr::properties::TextProperties* mpProperties;
diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx
index 4d7b6fa02e76..f3b33a12f932 100644
--- a/svx/source/table/cellcursor.cxx
+++ b/svx/source/table/cellcursor.cxx
@@ -201,6 +201,9 @@ bool CellCursor::GetMergedSelection( CellPos& rStart, CellPos& rEnd )
if( xCell->isMerged() )
{
findMergeOrigin( mxTable, mnRight, mnBottom, rEnd.mnCol, rEnd.mnRow );
+ // merge not possible if selection is only one cell and all its merges
+ if( rEnd == rStart )
+ return false;
xCell.set( dynamic_cast< Cell* >( mxTable->getCellByPosition( rEnd.mnCol, rEnd.mnRow ).get() ) );
}
}
@@ -266,12 +269,14 @@ void SAL_CALL CellCursor::merge( ) throw (NoSupportException, RuntimeException)
throw DisposedException();
SdrModel* pModel = mxTable->getSdrTableObj()->GetModel();
- if( pModel )
+ const bool bUndo = pModel && mxTable->getSdrTableObj()->IsInserted() && pModel->IsUndoEnabled();
+
+ if( bUndo )
pModel->BegUndo( ImpGetResStr(STR_TABLE_MERGE) );
try
{
- merge( aStart.mnCol, aStart.mnRow, aEnd.mnCol - aStart.mnCol + 1, aEnd.mnRow - aStart.mnRow + 1 );
+ mxTable->merge( aStart.mnCol, aStart.mnRow, aEnd.mnCol - aStart.mnCol + 1, aEnd.mnRow - aStart.mnRow + 1 );
mxTable->optimize();
mxTable->setModified(sal_True);
}
@@ -280,42 +285,11 @@ void SAL_CALL CellCursor::merge( ) throw (NoSupportException, RuntimeException)
DBG_ERROR("sdr::table::CellCursor::merge(), exception caught!");
}
- if( pModel )
+ if( bUndo )
pModel->EndUndo();
-}
-
-// -----------------------------------------------------------------------------
-
-void CellCursor::merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan )
-{
- // merge first cell
- CellRef xOriginCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
- if( xOriginCell.is() )
- {
- xOriginCell->AddUndo();
- xOriginCell->merge( nColSpan, nRowSpan );
- }
-
- const sal_Int32 nLastRow = nRow + nRowSpan;
- const sal_Int32 nLastCol = nCol + nColSpan;
- sal_Int32 nTempCol = nCol + 1;
-
- // merge remaining cells
- for( ; nRow < nLastRow; nRow++ )
- {
- for( ; nTempCol < nLastCol; nTempCol++ )
- {
- CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nTempCol, nRow ).get() ) );
- if( xCell.is() && !xCell->isMerged() )
- {
- xCell->AddUndo();
- xCell->setMerged();
- xOriginCell->mergeContent( xCell );
- }
- }
- nTempCol = nCol;
- }
+ if( pModel )
+ pModel->SetChanged();
}
// -----------------------------------------------------------------------------
@@ -362,8 +336,13 @@ void CellCursor::split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector<
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( !xCell.is() || xCell->isMerged() )
{
- // merged cells are ignored, but newly added columns will be added to leftovers
- rLeftOvers[nRow] += nNewCols;
+ if( nNewCols > 0 )
+ {
+ // merged cells are ignored, but newly added columns will be added to leftovers
+ xCell.set( dynamic_cast< Cell* >(mxTable->getCellByPosition( nCol+1, nRow ).get() ) );
+ if( !xCell.is() || !xCell->isMerged() )
+ rLeftOvers[nRow] += nNewCols;
+ }
}
else
{
@@ -388,12 +367,9 @@ void CellCursor::split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector<
if( nSplits == 0 )
nSplitSpan = nCellsAvailable - ((nSplitSpan+1) * nColumns) - 1;
- xCell->merge( nSplitSpan + 1, nRowSpan + 1);
+ mxTable->merge( nSplitCol, nRow, nSplitSpan + 1, nRowSpan + 1);
if( nSplits > 0 )
- {
nSplitCol += nSplitSpan + 1;
- xCell.set( dynamic_cast< Cell* >( mxTable->getCellByPosition( nSplitCol, nRow ).get() ) );
- }
}
do
@@ -407,7 +383,7 @@ void CellCursor::split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector<
{
// cope with outside cells, merge if needed
if( nColSpan < (rLeftOvers[nRow] + nNewCols) )
- merge( nCol, nRow, (rLeftOvers[nRow] + nNewCols) + 1, nRowSpan + 1 );
+ mxTable->merge( nCol, nRow, (rLeftOvers[nRow] + nNewCols) + 1, nRowSpan + 1 );
do
{
@@ -476,8 +452,13 @@ void CellCursor::split_row( sal_Int32 nRow, sal_Int32 nRows, std::vector< sal_In
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( !xCell.is() || xCell->isMerged() )
{
- // merged cells are ignored, but newly added columns will be added to leftovers
- rLeftOvers[nCol] += nNewRows;
+ if( nNewRows )
+ {
+ // merged cells are ignored, but newly added columns will be added to leftovers
+ xCell.set( dynamic_cast< Cell* >(mxTable->getCellByPosition( nCol, nRow+1 ).get() ) );
+ if( !xCell.is() || !xCell->isMerged() )
+ rLeftOvers[nCol] += nNewRows;
+ }
}
else
{
@@ -502,12 +483,9 @@ void CellCursor::split_row( sal_Int32 nRow, sal_Int32 nRows, std::vector< sal_In
if( nSplits == 0 )
nSplitSpan = nCellsAvailable - ((nSplitSpan+1) * nRows) - 1;
- xCell->merge( nColSpan + 1, nSplitSpan + 1 );
+ mxTable->merge( nCol, nSplitRow, nColSpan + 1, nSplitSpan + 1 );
if( nSplits > 0 )
- {
nSplitRow += nSplitSpan + 1;
- xCell.set( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nSplitRow ).get() ) );
- }
}
do
@@ -521,7 +499,7 @@ void CellCursor::split_row( sal_Int32 nRow, sal_Int32 nRows, std::vector< sal_In
{
// cope with outside cells, merge if needed
if( nRowSpan < (rLeftOvers[nCol] + nNewRows) )
- merge( nCol, nRow, nColSpan + 1, (rLeftOvers[nCol] + nNewRows) + 1 );
+ mxTable->merge( nCol, nRow, nColSpan + 1, (rLeftOvers[nCol] + nNewRows) + 1 );
do
{
@@ -557,7 +535,8 @@ void SAL_CALL CellCursor::split( sal_Int32 nColumns, sal_Int32 nRows ) throw (No
throw DisposedException();
SdrModel* pModel = mxTable->getSdrTableObj()->GetModel();
- if( pModel )
+ const bool bUndo = pModel && mxTable->getSdrTableObj()->IsInserted() && pModel->IsUndoEnabled();
+ if( bUndo )
pModel->BegUndo( ImpGetResStr(STR_TABLE_SPLIT) );
try
@@ -577,8 +556,11 @@ void SAL_CALL CellCursor::split( sal_Int32 nColumns, sal_Int32 nRows ) throw (No
throw NoSupportException();
}
- if( pModel )
+ if( bUndo )
pModel->EndUndo();
+
+ if( pModel )
+ pModel->SetChanged();
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/table/cellcursor.hxx b/svx/source/table/cellcursor.hxx
index f4f242f39c0e..c23dbf12b210 100644
--- a/svx/source/table/cellcursor.hxx
+++ b/svx/source/table/cellcursor.hxx
@@ -75,8 +75,6 @@ public:
protected:
bool GetMergedSelection( CellPos& rStart, CellPos& rEnd );
- void merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan );
-
void split_column( sal_Int32 nCol, sal_Int32 nColumns, std::vector< sal_Int32 >& rLeftOvers );
void split_horizontal( sal_Int32 nColumns );
void split_row( sal_Int32 nRow, sal_Int32 nRows, std::vector< sal_Int32 >& rLeftOvers );
diff --git a/svx/source/table/celleditsource.hxx b/svx/source/table/celleditsource.hxx
index 72d0f18c582f..1d097dc6ede5 100644
--- a/svx/source/table/celleditsource.hxx
+++ b/svx/source/table/celleditsource.hxx
@@ -73,7 +73,7 @@ public:
void lock();
void unlock();
- // the viewforwarder interface
+ // the SvxViewForwarder interface
virtual BOOL IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point&, const MapMode& ) const;
diff --git a/svx/source/table/makefile.mk b/svx/source/table/makefile.mk
index 8789cd4da86b..ae0dc5eb685a 100644
--- a/svx/source/table/makefile.mk
+++ b/svx/source/table/makefile.mk
@@ -36,6 +36,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
PRJNAME=svx
TARGET=table
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE;
# --- Settings -----------------------------------------------------
@@ -45,9 +46,9 @@ ENABLE_EXCEPTIONS=TRUE;
# --- Files --------------------------------------------------------
-SLOFILES= \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/propertyset.obj\
- $(SLO)$/celleditsource.obj\
$(SLO)$/cell.obj\
$(SLO)$/cellrange.obj\
$(SLO)$/cellcursor.obj\
@@ -61,13 +62,19 @@ SLOFILES= \
$(SLO)$/tablelayouter.obj\
$(SLO)$/tablehandles.obj\
$(SLO)$/tablecontroller.obj\
- $(SLO)$/tabledesign.obj\
- $(SLO)$/tableundo.obj\
- $(SLO)$/accessibletableshape.obj\
+ $(SLO)$/tableundo.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/celleditsource.obj \
+ $(SLO)$/tabledesign.obj \
+ $(SLO)$/accessibletableshape.obj \
$(SLO)$/accessiblecell.obj \
$(SLO)$/tablertfexporter.obj \
$(SLO)$/tablertfimporter.obj
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
SRS1NAME=table
SRC1FILES= table.src
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index b47f91d13b23..44caaee6c148 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1930,21 +1930,6 @@ void lcl_VertLine( OutputDevice& rDev, const Point& rTop, const Point& rBottom,
// --------------------------------------------------------------------
-SdrObject* SdrTableObj::CheckHit(const Point& rPnt, USHORT /*nTol*/, const SetOfByte* pVisiLayer) const
-{
- if(pVisiLayer && !pVisiLayer->IsSet(sal::static_int_cast< sal_uInt8 >(GetLayer())))
- {
- return NULL;
- }
-
- if( (rPnt.X() >= aOutRect.Left()) && (rPnt.X() <= aOutRect.Right()) && (rPnt.Y() >= aOutRect.Top()) && rPnt.Y() <= aOutRect.Bottom() )
- return const_cast<SdrObject*>(static_cast<const SdrObject*>(this));
-
- return NULL;
-}
-
-// --------------------------------------------------------------------
-
void SdrTableObj::TakeObjNameSingul(XubString& rName) const
{
rName = ImpGetResStr(STR_ObjNameSingulTable);
@@ -2106,7 +2091,7 @@ void SdrTableObj::EndTextEdit(SdrOutliner& rOutl)
{
if(rOutl.IsModified())
{
- if( GetModel() )
+ if( GetModel() && GetModel()->IsUndoEnabled() )
GetModel()->AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*this) );
OutlinerParaObject* pNewText = 0;
@@ -2676,7 +2661,7 @@ Pointer SdrTableObj::GetCreatePointer() const
void SdrTableObj::createCell( CellRef& xNewCell )
{
- xNewCell.set( new Cell( *this, 0 ) );
+ xNewCell = Cell::create( *this, 0 );
}
// --------------------------------------------------------------------
diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx
index 81644a8c3384..f0ee7ec88413 100644
--- a/svx/source/table/tablecolumn.cxx
+++ b/svx/source/table/tablecolumn.cxx
@@ -161,8 +161,10 @@ void SAL_CALL TableColumn::setFastPropertyValue( sal_Int32 nHandle, const Any& a
bool bOk = false;
bool bChange = false;
+ SdrModel* pModel = mxTableModel->getSdrTableObj()->GetModel();
+
TableColumnUndo* pUndo = 0;
- if( mxTableModel.is() && mxTableModel->getSdrTableObj() && mxTableModel->getSdrTableObj()->IsInserted() )
+ if( mxTableModel.is() && mxTableModel->getSdrTableObj() && mxTableModel->getSdrTableObj()->IsInserted() && pModel && pModel->IsUndoEnabled() )
{
TableColumnRef xThis( this );
pUndo = new TableColumnUndo( xThis );
@@ -228,12 +230,8 @@ void SAL_CALL TableColumn::setFastPropertyValue( sal_Int32 nHandle, const Any& a
{
if( pUndo )
{
- SdrModel* pModel = mxTableModel->getSdrTableObj()->GetModel();
- if( pModel )
- {
- pModel->AddUndo( pUndo );
- pUndo = 0;
- }
+ pModel->AddUndo( pUndo );
+ pUndo = 0;
}
mxTableModel->setModified(sal_True);
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index fa68a40e0c2a..d7f64c852fc6 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -493,7 +493,7 @@ void SvxTableController::GetState( SfxItemSet& rSet )
// --------------------------------------------------------------------
-void SvxTableController::onInsert( sal_uInt16 nSId )
+void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
{
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( !pTableObj )
@@ -501,6 +501,21 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
if( mxTable.is() ) try
{
+ //
+ bool bInsertAfter = true;
+ sal_uInt16 nCount = 0;
+ if( pArgs )
+ {
+ const SfxPoolItem* pItem = 0;
+ pArgs->GetItemState(nSId, FALSE, &pItem);
+ if (pItem)
+ {
+ nCount = ((const SfxInt16Item* )pItem)->GetValue();
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, TRUE, &pItem))
+ bInsertAfter = ((const SfxBoolItem* )pItem)->GetValue();
+ }
+ }
+
CellPos aStart, aEnd;
if( hasSelectedCells() )
{
@@ -508,9 +523,12 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
}
else
{
- aStart.mnCol = mxTable->getColumnCount() - 1;
- aStart.mnRow = mxTable->getRowCount() - 1;
- aEnd = aStart;
+ if( bInsertAfter )
+ {
+ aStart.mnCol = mxTable->getColumnCount() - 1;
+ aStart.mnRow = mxTable->getRowCount() - 1;
+ aEnd = aStart;
+ }
}
if( pTableObj->IsTextEditActive() )
@@ -520,21 +538,24 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
const OUString sSize( RTL_CONSTASCII_USTRINGPARAM( "Size" ) );
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+
switch( nSId )
{
case SID_TABLE_INSERT_COL:
{
TableModelNotifyGuard aGuard( mxTable.get() );
- if( mpModel )
+ if( bUndo )
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_INSCOL) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
Reference< XTableColumns > xCols( mxTable->getColumns() );
- const sal_Int32 nNewColumns = aEnd.mnCol - aStart.mnCol + 1;
- xCols->insertByIndex( aEnd.mnCol + 1, nNewColumns );
+ const sal_Int32 nNewColumns = (nCount == 0) ? (aEnd.mnCol - aStart.mnCol + 1) : nCount;
+ const sal_Int32 nNewStartColumn = aEnd.mnCol + (bInsertAfter ? 1 : 0);
+ xCols->insertByIndex( nNewStartColumn, nNewColumns );
for( sal_Int32 nOffset = 0; nOffset < nNewColumns; nOffset++ )
{
@@ -544,13 +565,10 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
getPropertyValue( sSize ) );
}
- if( mpModel )
- {
+ if( bUndo )
mpModel->EndUndo();
- mpModel->SetChanged();
- }
- aStart.mnCol = aEnd.mnCol+1;
+ aStart.mnCol = nNewStartColumn;
aStart.mnRow = 0;
aEnd.mnCol = aStart.mnCol + nNewColumns - 1;
aEnd.mnRow = mxTable->getRowCount() - 1;
@@ -561,15 +579,16 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
{
TableModelNotifyGuard aGuard( mxTable.get() );
- if( mpModel )
+ if( bUndo )
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_INSROW ) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
}
Reference< XTableRows > xRows( mxTable->getRows() );
- const sal_Int32 nNewRows = aEnd.mnRow - aStart.mnRow + 1;
- xRows->insertByIndex( aEnd.mnRow + 1, nNewRows );
+ const sal_Int32 nNewRows = (nCount == 0) ? (aEnd.mnRow - aStart.mnRow + 1) : nCount;
+ const sal_Int32 nNewRowStart = aEnd.mnRow + (bInsertAfter ? 1 : 0);
+ xRows->insertByIndex( nNewRowStart, nNewRows );
for( sal_Int32 nOffset = 0; nOffset < nNewRows; nOffset++ )
{
@@ -579,11 +598,11 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
getPropertyValue( sSize ) );
}
- if( mpModel )
+ if( bUndo )
mpModel->EndUndo();
aStart.mnCol = 0;
- aStart.mnRow = aEnd.mnRow+1;
+ aStart.mnRow = nNewRowStart;
aEnd.mnCol = mxTable->getColumnCount() - 1;
aEnd.mnRow = aStart.mnRow + nNewRows - 1;
break;
@@ -751,7 +770,7 @@ void SvxTableController::Execute( SfxRequest& rReq )
{
case SID_TABLE_INSERT_ROW:
case SID_TABLE_INSERT_COL:
- onInsert( nSId );
+ onInsert( nSId, rReq.GetArgs() );
break;
case SID_TABLE_DELETE_ROW:
case SID_TABLE_DELETE_COL:
@@ -843,9 +862,15 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
// found table style with the same name
Reference< XIndexAccess > xNewTableStyle( xTableFamilyAccess->getByName( pArg->GetValue() ), UNO_QUERY_THROW );
- pModel->BegUndo( ImpGetResStr(STR_TABLE_STYLE) );
+ const bool bUndo = pModel->IsUndoEnabled();
- pModel->AddUndo( new TableStyleUndo( *pTableObj ) );
+ if( bUndo )
+ {
+ pModel->BegUndo( ImpGetResStr(STR_TABLE_STYLE) );
+ pModel->AddUndo( new TableStyleUndo( *pTableObj ) );
+ }
+
+ pTableObj->setTableStyle( xNewTableStyle );
const sal_Int32 nRowCount = mxTable->getRowCount();
const sal_Int32 nColCount = mxTable->getColumnCount();
@@ -856,8 +881,26 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
{
- xCell->AddUndo();
- xCell->setAllPropertiesToDefault();
+ SfxItemSet aSet( xCell->GetItemSet() );
+ bool bChanges = false;
+ const SfxItemSet& rStyleAttribs = xCell->GetStyleSheet()->GetItemSet();
+
+ for ( USHORT nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ )
+ {
+ if( (rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON) && (aSet.GetItemState( nWhich ) == SFX_ITEM_ON) )
+ {
+ aSet.ClearItem( nWhich );
+ bChanges = true;
+ }
+ }
+
+ if( bChanges )
+ {
+ if( bUndo )
+ xCell->AddUndo();
+
+ xCell->SetMergedItemSetAndBroadcast( aSet, sal_True );
+ }
}
}
catch( Exception& e )
@@ -867,8 +910,8 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
}
}
- pTableObj->setTableStyle( xNewTableStyle );
- pModel->EndUndo();
+ if( bUndo )
+ pModel->EndUndo();
}
}
catch( Exception& e )
@@ -911,10 +954,18 @@ void SvxTableController::SetTableStyleSettings( const SfxItemSet* pArgs )
if( aSettings == pTableObj->getTableStyleSettings() )
return;
- pModel->BegUndo( ImpGetResStr(STR_TABLE_STYLE_SETTINGS) );
- pModel->AddUndo( new TableStyleUndo( *pTableObj ) );
+ const bool bUndo = pModel->IsUndoEnabled();
+
+ if( bUndo )
+ {
+ pModel->BegUndo( ImpGetResStr(STR_TABLE_STYLE_SETTINGS) );
+ pModel->AddUndo( new TableStyleUndo( *pTableObj ) );
+ }
+
pTableObj->setTableStyleSettings( aSettings );
- pModel->EndUndo();
+
+ if( bUndo )
+ pModel->EndUndo();
}
void SvxTableController::SetVertical( sal_uInt16 nSId )
@@ -965,6 +1016,9 @@ void SvxTableController::MergeMarkedCells()
SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
+ if( pTableObj->IsTextEditActive() )
+ mpView->SdrEndTextEdit(sal_True);
+
TableModelNotifyGuard aGuard( mxTable.get() );
MergeRange( aStart.mnCol, aStart.mnRow, aEnd.mnCol, aEnd.mnRow );
}
@@ -996,9 +1050,13 @@ void SvxTableController::SplitMarkedCells()
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
+ if( pTableObj->IsTextEditActive() )
+ mpView->SdrEndTextEdit(sal_True);
+
TableModelNotifyGuard aGuard( mxTable.get() );
- if( mpModel )
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+ if( bUndo )
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_SPLIT) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
@@ -1013,11 +1071,8 @@ void SvxTableController::SplitMarkedCells()
xRange->split( nCount, 0 );
}
- if( mpModel )
- {
+ if( bUndo )
mpModel->EndUndo();
- mpModel->SetChanged();
- }
}
aEnd.mnRow += mxTable->getRowCount() - nRowCount;
aEnd.mnCol += mxTable->getColumnCount() - nColCount;
@@ -1032,7 +1087,8 @@ void SvxTableController::DistributeColumns()
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
- if( mpModel )
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+ if( bUndo )
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_DISTRIBUTE_COLUMNS) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
@@ -1042,7 +1098,7 @@ void SvxTableController::DistributeColumns()
getSelectedCells( aStart, aEnd );
pTableObj->DistributeColumns( aStart.mnCol, aEnd.mnCol );
- if( mpModel )
+ if( bUndo )
mpModel->EndUndo();
}
}
@@ -1052,7 +1108,8 @@ void SvxTableController::DistributeRows()
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
- if( mpModel )
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+ if( bUndo )
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_DISTRIBUTE_ROWS) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*pTableObj) );
@@ -1062,7 +1119,7 @@ void SvxTableController::DistributeRows()
getSelectedCells( aStart, aEnd );
pTableObj->DistributeRows( aStart.mnRow, aEnd.mnRow );
- if( mpModel )
+ if( bUndo )
mpModel->EndUndo();
}
}
@@ -1451,7 +1508,16 @@ bool SvxTableController::executeAction( sal_uInt16 nAction, bool bSelect, Window
if( bSelect )
gotoCell( pTableObj->getPreviousCell( getSelectionEnd(), true ), false, pWindow, nAction );
else
- gotoCell( pTableObj->getNextCell( getSelectionEnd(), true ), false, pWindow, nAction );
+ {
+ CellPos aSelectionEnd( getSelectionEnd() );
+ CellPos aNextCell( pTableObj->getNextCell( aSelectionEnd, true ) );
+ if( aSelectionEnd == aNextCell )
+ {
+ onInsert( SID_TABLE_INSERT_ROW, 0 );
+ aNextCell = pTableObj->getNextCell( aSelectionEnd, true );
+ }
+ gotoCell( aNextCell, false, pWindow, nAction );
+ }
break;
}
}
@@ -1541,7 +1607,8 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s
Reference< XMergeableCellRange > xRange( mxTable->createCursorByRange( mxTable->getCellRangeByPosition( nFirstCol, nFirstRow,nLastCol, nLastRow ) ), UNO_QUERY_THROW );
if( xRange->isMergeable() )
{
- if( mpModel )
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+ if( bUndo )
{
mpModel->BegUndo( ImpGetResStr(STR_TABLE_MERGE) );
mpModel->AddUndo( mpModel->GetSdrUndoFactory().CreateUndoGeoObject(*mxTableObj.get()) );
@@ -1549,7 +1616,7 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s
xRange->merge();
- if( mpModel )
+ if( bUndo )
mpModel->EndUndo();
}
}
@@ -1908,7 +1975,6 @@ void SvxTableController::updateSelectionOverlay()
if( pOverlayManager )
{
// sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_INVERT;
- // sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_HATCH;
sdr::overlay::CellOverlayType eType = sdr::overlay::CELL_OVERLAY_TRANSPARENT;
sdr::overlay::OverlayObjectCell* pOverlay = new sdr::overlay::OverlayObjectCell( eType, aHighlight, aRanges );
@@ -1948,7 +2014,7 @@ void SvxTableController::MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnl
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
- if( xCell.is() )
+ if( xCell.is() && !xCell->isMerged() )
{
const SfxItemSet& rSet = xCell->GetItemSet();
SfxWhichIter aIter(rSet);
@@ -2255,7 +2321,9 @@ void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bR
{
if( mxTable.is() )
{
- if( mpModel )
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+
+ if( bUndo )
mpModel->BegUndo( ImpGetResStr(STR_TABLE_NUMFORMAT) );
CellPos aStart, aEnd;
@@ -2279,7 +2347,8 @@ void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bR
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
if( xCell.is() )
{
- xCell->AddUndo();
+ if( bUndo )
+ xCell->AddUndo();
xCell->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
}
}
@@ -2292,7 +2361,7 @@ void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bR
UpdateTableShape();
- if( mpModel )
+ if( bUndo )
mpModel->EndUndo();
}
diff --git a/svx/source/table/tablecontroller.hxx b/svx/source/table/tablecontroller.hxx
index 4caf7cd957a1..e13fad84179e 100644
--- a/svx/source/table/tablecontroller.hxx
+++ b/svx/source/table/tablecontroller.hxx
@@ -43,6 +43,7 @@
class SdrObjEditView;
class SdrObject;
+class SfxItemSet;
namespace sdr { namespace table {
@@ -50,97 +51,97 @@ const sal_Int16 SELTYPE_NONE = 0;
const sal_Int16 SELTYPE_MOUSE = 1;
const sal_Int16 SELTYPE_KEYS = 2;
-class SvxTableController: public sdr::SelectionController
+class SVX_DLLPUBLIC SvxTableController: public sdr::SelectionController
{
public:
- SvxTableController( SdrObjEditView* pView, const SdrObject* pObj );
- virtual ~SvxTableController();
+ SVX_DLLPRIVATE SvxTableController( SdrObjEditView* pView, const SdrObject* pObj );
+ SVX_DLLPRIVATE virtual ~SvxTableController();
- virtual bool onKeyInput(const KeyEvent& rKEvt, Window* pWin);
- virtual bool onMouseButtonDown(const MouseEvent& rMEvt, Window* pWin);
- virtual bool onMouseButtonUp(const MouseEvent& rMEvt, Window* pWin);
- virtual bool onMouseMove(const MouseEvent& rMEvt, Window* pWin);
+ SVX_DLLPRIVATE virtual bool onKeyInput(const KeyEvent& rKEvt, Window* pWin);
+ SVX_DLLPRIVATE virtual bool onMouseButtonDown(const MouseEvent& rMEvt, Window* pWin);
+ SVX_DLLPRIVATE virtual bool onMouseButtonUp(const MouseEvent& rMEvt, Window* pWin);
+ SVX_DLLPRIVATE virtual bool onMouseMove(const MouseEvent& rMEvt, Window* pWin);
- virtual bool DeleteMarked();
+ SVX_DLLPRIVATE virtual bool DeleteMarked();
- virtual void onSelectionHasChanged();
+ SVX_DLLPRIVATE virtual void onSelectionHasChanged();
- virtual void GetState( SfxItemSet& rSet );
- virtual void Execute( SfxRequest& rReq );
+ SVX_DLLPRIVATE virtual void GetState( SfxItemSet& rSet );
+ SVX_DLLPRIVATE virtual void Execute( SfxRequest& rReq );
- virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const;
- virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr );
+ SVX_DLLPRIVATE virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const;
+ SVX_DLLPRIVATE virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr );
// slots
- void onInsert( sal_uInt16 nSId );
- void onDelete( sal_uInt16 nSId );
- void onSelect( sal_uInt16 nSId );
- void onFormatTable( SfxRequest& rReq );
- void MergeMarkedCells();
- void SplitMarkedCells();
- void DistributeColumns();
- void DistributeRows();
- void SetVertical( sal_uInt16 nSId );
+ SVX_DLLPRIVATE void onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs = 0 );
+ SVX_DLLPRIVATE void onDelete( sal_uInt16 nSId );
+ SVX_DLLPRIVATE void onSelect( sal_uInt16 nSId );
+ SVX_DLLPRIVATE void onFormatTable( SfxRequest& rReq );
+ SVX_DLLPRIVATE void MergeMarkedCells();
+ SVX_DLLPRIVATE void SplitMarkedCells();
+ SVX_DLLPRIVATE void DistributeColumns();
+ SVX_DLLPRIVATE void DistributeRows();
+ SVX_DLLPRIVATE void SetVertical( sal_uInt16 nSId );
- static rtl::Reference< sdr::SelectionController > create( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController );
+ SVX_DLLPRIVATE static rtl::Reference< sdr::SelectionController > create( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController );
- void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const;
- void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll);
+ SVX_DLLPRIVATE void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const;
+ SVX_DLLPRIVATE void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll);
- virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
- virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ SVX_DLLPRIVATE virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+ SVX_DLLPRIVATE virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
- virtual bool GetMarkedObjModel( SdrPage* pNewPage );
- virtual bool PasteObjModel( const SdrModel& rModel );
+ SVX_DLLPRIVATE virtual bool GetMarkedObjModel( SdrPage* pNewPage );
+ SVX_DLLPRIVATE virtual bool PasteObjModel( const SdrModel& rModel );
- bool hasSelectedCells() const { return mbCellSelectionMode || mpView->IsTextEdit(); }
+ SVX_DLLPRIVATE bool hasSelectedCells() const { return mbCellSelectionMode || mpView->IsTextEdit(); }
void getSelectedCells( CellPos& rFirstPos, CellPos& rLastPos );
void setSelectedCells( const CellPos& rFirstPos, const CellPos& rLastPos );
void clearSelection();
void selectAll();
- void onTableModified();
+ SVX_DLLPRIVATE void onTableModified();
private:
SvxTableController(SvxTableController &); // not defined
void operator =(SvxTableController &); // not defined
// internals
- void ApplyBorderAttr( const SfxItemSet& rAttr );
- void UpdateTableShape();
+ SVX_DLLPRIVATE void ApplyBorderAttr( const SfxItemSet& rAttr );
+ SVX_DLLPRIVATE void UpdateTableShape();
- void SetTableStyle( const SfxItemSet* pArgs );
- void SetTableStyleSettings( const SfxItemSet* pArgs );
+ SVX_DLLPRIVATE void SetTableStyle( const SfxItemSet* pArgs );
+ SVX_DLLPRIVATE void SetTableStyleSettings( const SfxItemSet* pArgs );
- bool PasteObject( SdrTableObj* pPasteTableObj );
+ SVX_DLLPRIVATE bool PasteObject( SdrTableObj* pPasteTableObj );
- bool checkTableObject();
- bool updateTableObject();
- const CellPos& getSelectionStart();
- void setSelectionStart( const CellPos& rPos );
- const CellPos& getSelectionEnd();
- ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellCursor > getSelectionCursor();
- void checkCell( CellPos& rPos );
+ SVX_DLLPRIVATE bool checkTableObject();
+ SVX_DLLPRIVATE bool updateTableObject();
+ SVX_DLLPRIVATE const CellPos& getSelectionStart();
+ SVX_DLLPRIVATE void setSelectionStart( const CellPos& rPos );
+ SVX_DLLPRIVATE const CellPos& getSelectionEnd();
+ SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellCursor > getSelectionCursor();
+ SVX_DLLPRIVATE void checkCell( CellPos& rPos );
- void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow );
+ SVX_DLLPRIVATE void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow );
- void EditCell( const CellPos& rPos, ::Window* pWindow, const ::com::sun::star::awt::MouseEvent* pMouseEvent = 0, sal_uInt16 nAction = 0 );
- bool StopTextEdit();
+ SVX_DLLPRIVATE void EditCell( const CellPos& rPos, ::Window* pWindow, const ::com::sun::star::awt::MouseEvent* pMouseEvent = 0, sal_uInt16 nAction = 0 );
+ SVX_DLLPRIVATE bool StopTextEdit();
- void DeleteTable();
+ SVX_DLLPRIVATE void DeleteTable();
- sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, Window* pWindow );
- bool executeAction( sal_uInt16 nAction, bool bSelect, Window* pWindow );
- void gotoCell( const CellPos& rCell, bool bSelect, Window* pWindow, sal_uInt16 nAction = 0 );
+ SVX_DLLPRIVATE sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, Window* pWindow );
+ SVX_DLLPRIVATE bool executeAction( sal_uInt16 nAction, bool bSelect, Window* pWindow );
+ SVX_DLLPRIVATE void gotoCell( const CellPos& rCell, bool bSelect, Window* pWindow, sal_uInt16 nAction = 0 );
- void StartSelection( const CellPos& rPos );
- void UpdateSelection( const CellPos& rPos );
- void RemoveSelection();
- void updateSelectionOverlay();
- void destroySelectionOverlay();
+ 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();
- void findMergeOrigin( CellPos& rPos );
+ SVX_DLLPRIVATE void findMergeOrigin( CellPos& rPos );
DECL_LINK( UpdateHdl, void * );
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index 6b88e1d9a0ac..72e10e29c336 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -38,60 +38,36 @@
#include <vcl/salbtype.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/hatch.hxx>
-
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
-
#include <svx/sdr/overlay/overlayobject.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/sdrpagewindow.hxx>
#include <sdrpaintwindow.hxx>
#include <svx/svdmrkv.hxx>
#include <svx/svdpagv.hxx>
-
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+#include <svx/sdr/overlay/overlayhatchrect.hxx>
+#include <drawinglayer/primitive2d/hittestprimitive2d.hxx>
namespace sdr { namespace table {
-class OverlayTableEdge : public sdr::overlay::OverlayObject
-{
-protected:
- basegfx::B2DPolyPolygon maPolyPolygon;
-
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
-
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
-
-public:
- OverlayTableEdge( const basegfx::B2DPolyPolygon& rPolyPolygon );
- virtual ~OverlayTableEdge();
-};
-
// --------------------------------------------------------------------
-class OverlayTableBorder : public sdr::overlay::OverlayObject
+class OverlayTableEdge : public sdr::overlay::OverlayObject
{
protected:
basegfx::B2DPolyPolygon maPolyPolygon;
+ bool mbVisible;
- // Draw geometry
- virtual void drawGeometry(OutputDevice& rOutputDevice);
-
- // Create the BaseRange. This method needs to calculate maBaseRange.
- virtual void createBaseRange(OutputDevice& rOutputDevice);
-
- virtual void transform(const basegfx::B2DHomMatrix& rMatrix);
-
- virtual sal_Bool isHit(const basegfx::B2DPoint& rPos, double fTol = 0.0) const;
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
- OverlayTableBorder( const basegfx::B2DPolyPolygon& rPolyPolygon );
- virtual ~OverlayTableBorder();
+ OverlayTableEdge( const basegfx::B2DPolyPolygon& rPolyPolygon, bool bVisible );
+ virtual ~OverlayTableEdge();
};
// --------------------------------------------------------------------
@@ -134,40 +110,23 @@ sal_Int32 TableEdgeHdl::GetValidDragOffset( const SdrDragStat& rDrag ) const
basegfx::B2DPolyPolygon TableEdgeHdl::getSpecialDragPoly(const SdrDragStat& rDrag) const
{
- return GetPolyPolygon(false, &rDrag);
-}
+ basegfx::B2DPolyPolygon aVisible;
+ basegfx::B2DPolyPolygon aInvisible;
-bool TableEdgeHdl::IsHdlHit(const Point& rPnt) const
-{
- if( GetPointNum() != 0 )
- {
- double fTol = 0.0;
- if( pHdlList )
- {
- SdrMarkView* pView = pHdlList->GetView();
- if( pView )
- {
- OutputDevice* pOutDev = pView->GetFirstOutputDevice();
- if( pOutDev )
- {
- fTol = static_cast<double>(pOutDev->PixelToLogic(Size(3, 3)).Width());
- }
- }
- }
+ // create and return visible and non-visible parts for drag
+ getPolyPolygon(aVisible, aInvisible, &rDrag);
+ aVisible.append(aInvisible);
- basegfx::B2DPoint aPosition(rPnt.X(), rPnt.Y());
- if( basegfx::tools::isInEpsilonRange( maVisiblePolygon, aPosition, fTol ) )
- return sal_True;
- }
- return false;
+ return aVisible;
}
-
-basegfx::B2DPolyPolygon TableEdgeHdl::GetPolyPolygon( bool bOnlyVisible, const SdrDragStat* pDrag /*= 0*/ ) const
+void TableEdgeHdl::getPolyPolygon(basegfx::B2DPolyPolygon& rVisible, basegfx::B2DPolyPolygon& rInvisible, const SdrDragStat* pDrag) const
{
- basegfx::B2DPolyPolygon aRetValue;
-
+ // changed method to create visible and invisible partial polygons in one run in
+ // separate PolyPolygons; both kinds are used
basegfx::B2DPoint aOffset(aPos.X(), aPos.Y());
+ rVisible.clear();
+ rInvisible.clear();
if( pDrag )
{
@@ -176,37 +135,35 @@ basegfx::B2DPolyPolygon TableEdgeHdl::GetPolyPolygon( bool bOnlyVisible, const S
}
basegfx::B2DPoint aStart(aOffset), aEnd(aOffset);
-
int nPos = mbHorizontal ? 0 : 1;
-
- // base line hit, check for edges
TableEdgeVector::const_iterator aIter( maEdges.begin() );
+
while( aIter != maEdges.end() )
{
TableEdge aEdge(*aIter++);
- if( aEdge.meState == Visible || ( aEdge.meState == Invisible && !bOnlyVisible ) )
- {
- aStart[nPos] = aOffset[nPos] + aEdge.mnStart;
- aEnd[nPos] = aOffset[nPos] + aEdge.mnEnd;
+ aStart[nPos] = aOffset[nPos] + aEdge.mnStart;
+ aEnd[nPos] = aOffset[nPos] + aEdge.mnEnd;
- basegfx::B2DPolygon aPolygon;
- aPolygon.append( aStart );
- aPolygon.append( aEnd );
+ basegfx::B2DPolygon aPolygon;
+ aPolygon.append( aStart );
+ aPolygon.append( aEnd );
- aRetValue.append( aPolygon );
+ if(aEdge.meState == Visible)
+ {
+ rVisible.append(aPolygon);
+ }
+ else
+ {
+ rInvisible.append(aPolygon);
}
}
-
- return aRetValue;
}
void TableEdgeHdl::CreateB2dIAObject()
{
GetRidOfIAObject();
- maVisiblePolygon = GetPolyPolygon(false);
-
if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->areMarkHandlesHidden())
{
SdrMarkView* pView = pHdlList->GetView();
@@ -214,20 +171,40 @@ void TableEdgeHdl::CreateB2dIAObject()
if(pPageView)
{
- for(sal_uInt32 nWindow = 0; nWindow < pPageView->PageWindowCount(); nWindow++)
- {
- // const SdrPageViewWinRec& rPageViewWinRec = rPageViewWinList[b];
- const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(nWindow);
+ basegfx::B2DPolyPolygon aVisible;
+ basegfx::B2DPolyPolygon aInvisible;
- if(rPageWindow.GetPaintWindow().OutputToWindow())
+ // get visible and invisible parts
+ getPolyPolygon(aVisible, aInvisible, 0);
+
+ if(aVisible.count() || aInvisible.count())
+ {
+ for(sal_uInt32 nWindow = 0; nWindow < pPageView->PageWindowCount(); nWindow++)
{
- if(rPageWindow.GetOverlayManager())
- {
- ::sdr::overlay::OverlayObject* pOverlayObject =
- new OverlayTableEdge( GetPolyPolygon(true) );
+ const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(nWindow);
- rPageWindow.GetOverlayManager()->add(*pOverlayObject);
- maOverlayGroup.append(*pOverlayObject);
+ if(rPageWindow.GetPaintWindow().OutputToWindow())
+ {
+ if(rPageWindow.GetOverlayManager())
+ {
+ if(aVisible.count())
+ {
+ // create overlay object for visible parts
+ sdr::overlay::OverlayObject* pOverlayObject = new OverlayTableEdge(aVisible, true);
+ rPageWindow.GetOverlayManager()->add(*pOverlayObject);
+ maOverlayGroup.append(*pOverlayObject);
+ }
+
+ if(aInvisible.count())
+ {
+ // also create overlay object vor invisible parts to allow
+ // a standard HitTest using the primitives from that overlay object
+ // (see OverlayTableEdge implementation)
+ sdr::overlay::OverlayObject* pOverlayObject = new OverlayTableEdge(aInvisible, false);
+ rPageWindow.GetOverlayManager()->add(*pOverlayObject);
+ maOverlayGroup.append(*pOverlayObject);
+ }
+ }
}
}
}
@@ -237,9 +214,10 @@ void TableEdgeHdl::CreateB2dIAObject()
//////////////////////////////////////////////////////////////////////////////
-OverlayTableEdge::OverlayTableEdge( const basegfx::B2DPolyPolygon& rPolyPolygon )
+OverlayTableEdge::OverlayTableEdge( const basegfx::B2DPolyPolygon& rPolyPolygon, bool bVisible )
: OverlayObject(Color(COL_GRAY))
, maPolyPolygon( rPolyPolygon )
+, mbVisible(bVisible)
{
}
@@ -247,47 +225,35 @@ OverlayTableEdge::~OverlayTableEdge()
{
}
-void OverlayTableEdge::drawGeometry(OutputDevice& rOutputDevice)
+drawinglayer::primitive2d::Primitive2DSequence OverlayTableEdge::createOverlayObjectPrimitive2DSequence()
{
- rOutputDevice.SetLineColor(getBaseColor());
- rOutputDevice.SetFillColor();
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
- for(sal_uInt32 a(0L); a < maPolyPolygon.count();a ++)
+ if(maPolyPolygon.count())
{
-/*
- const basegfx::B2DPolygon aPolygon = maPolyPolygon.getB2DPolygon(a);
- const basegfx::B2DPoint aStart(aPolygon.getB2DPoint(0L));
- const basegfx::B2DPoint aEnd(aPolygon.getB2DPoint(aPolygon.count() - 1L));
- const Point aStartPoint(FRound(aStart.getX()), FRound(aStart.getY()));
- const Point aEndPoint(FRound(aEnd.getX()), FRound(aEnd.getY()));
- rOutputDevice.DrawLine(aStartPoint, aEndPoint);
-*/
- PolyPolygon aPolyPolygon( maPolyPolygon );
- rOutputDevice.DrawTransparent( aPolyPolygon, 50 );
- }
-}
-
-void OverlayTableEdge::transform(const basegfx::B2DHomMatrix& rMatrix)
-{
- maPolyPolygon.transform( rMatrix );
-}
-
-void OverlayTableEdge::createBaseRange(OutputDevice& /*rOutputDevice*/)
-{
- // reset range and expand it
- maBaseRange.reset();
-
- if(isHittable())
- {
- for(sal_uInt32 a(0L); a < maPolyPolygon.count();a ++)
+ // Discussed with CL. Currently i will leave the transparence out since this
+ // a little bit expensive. We may check the look with drag polygons later
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
+ maPolyPolygon,
+ getBaseColor().getBColor()));
+
+ if(mbVisible)
+ {
+ // visible, just return as sequence
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+ }
+ else
{
- const basegfx::B2DPolygon aPolygon = maPolyPolygon.getB2DPolygon(a);
- const basegfx::B2DPoint aStart(aPolygon.getB2DPoint(0L));
- const basegfx::B2DPoint aEnd(aPolygon.getB2DPoint(aPolygon.count() - 1L));
- maBaseRange.expand(aStart);
- maBaseRange.expand(aEnd);
+ // embed in HitTest primitive to support HitTest of this overlay object
+ const drawinglayer::primitive2d::Primitive2DSequence aSequence(&aReference, 1);
+ const drawinglayer::primitive2d::Primitive2DReference aNewReference(
+ new drawinglayer::primitive2d::HitTestPrimitive2D(aSequence));
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aNewReference, 1);
}
}
+
+ return aRetval;
}
// ====================================================================
@@ -325,16 +291,15 @@ void TableBorderHdl::CreateB2dIAObject()
{
if(rPageWindow.GetOverlayManager())
{
- OutputDevice& rOutDev = rPageWindow.GetPaintWindow().GetOutputDevice();
-
- Size aBorderSize( rOutDev.PixelToLogic( Size( 6, 6 ) ) );
- basegfx::B2DRectangle aRect( vcl::unotools::b2DRectangleFromRectangle( maRectangle ) );
- basegfx::B2DPolyPolygon aPolyPolygon;
- aPolyPolygon.append(basegfx::tools::createPolygonFromRect( aRect ) );
- aRect.grow( aBorderSize.nA );
- aPolyPolygon.append(basegfx::tools::createPolygonFromRect( aRect ) );
-
- ::sdr::overlay::OverlayObject* pOverlayObject = new OverlayTableBorder( aPolyPolygon );
+ const basegfx::B2DRange aRange(vcl::unotools::b2DRectangleFromRectangle(maRectangle));
+ sdr::overlay::OverlayObject* pOverlayObject = new sdr::overlay::OverlayHatchRect(
+ aRange.getMinimum(),
+ aRange.getMaximum(),
+ Color(0x80, 0x80, 0x80),
+ 6.0,
+ 0.0,
+ 45 * F_PI180,
+ 0.0);
rPageWindow.GetOverlayManager()->add(*pOverlayObject);
maOverlayGroup.append(*pOverlayObject);
@@ -345,55 +310,7 @@ void TableBorderHdl::CreateB2dIAObject()
}
}
-OverlayTableBorder::OverlayTableBorder( const basegfx::B2DPolyPolygon& rPolyPolygon )
-: OverlayObject(Color(COL_GRAY))
-, maPolyPolygon( rPolyPolygon )
-{
-}
-
-OverlayTableBorder::~OverlayTableBorder()
-{
-}
-
-// Hittest with logical coordinates
-sal_Bool OverlayTableBorder::isHit(const basegfx::B2DPoint& rPos, double /*fTol = 0.0*/) const
-{
- if(isHittable())
- {
- if( basegfx::tools::isInside( maPolyPolygon.getB2DPolygon(1), rPos, true ) )
- if( !basegfx::tools::isInside( maPolyPolygon.getB2DPolygon(0), rPos, false ) )
- return sal_True;
- }
- return sal_False;
-}
-
-// Draw geometry
-void OverlayTableBorder::drawGeometry(OutputDevice& rOutputDevice)
-{
- svtools::ColorConfig aColorConfig;
- Color aHatchCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
- const Hatch aHatch( HATCH_SINGLE, aHatchCol, 3, 450 );
- PolyPolygon aPolyPolygon( maPolyPolygon );
- rOutputDevice.DrawHatch( aPolyPolygon, aHatch );
-}
-
-// Create the BaseRange. This method needs to calculate maBaseRange.
-void OverlayTableBorder::createBaseRange(OutputDevice& /*rOutputDevice*/)
-{
- if(isHittable())
- {
- maBaseRange = basegfx::tools::getRange(maPolyPolygon);
- }
- else
- {
- maBaseRange.reset();
- }
-}
-
-void OverlayTableBorder::transform(const basegfx::B2DHomMatrix& rMatrix)
-{
- maPolyPolygon.transform( rMatrix );
-}
+//////////////////////////////////////////////////////////////////////////////
} // end of namespace table
} // end of namespace sdr
diff --git a/svx/source/table/tablehandles.hxx b/svx/source/table/tablehandles.hxx
index a6831f72bc88..e78d7fc4bdd3 100644
--- a/svx/source/table/tablehandles.hxx
+++ b/svx/source/table/tablehandles.hxx
@@ -57,8 +57,6 @@ class TableEdgeHdl : public SdrHdl
public:
TableEdgeHdl( const Point& rPnt, bool bHorizontal, sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nEdges );
- virtual bool IsHdlHit(const Point& rPnt) const;
-
sal_Int32 GetValidDragOffset( const SdrDragStat& rDrag ) const;
virtual Pointer GetPointer() const;
@@ -68,7 +66,7 @@ public:
bool IsHorizontalEdge() const { return mbHorizontal; }
basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const;
- basegfx::B2DPolyPolygon GetPolyPolygon( bool bOnlyVisible, const SdrDragStat* pDrag = 0 ) const;
+ void getPolyPolygon(basegfx::B2DPolyPolygon& rVisible, basegfx::B2DPolyPolygon& rInvisible, const SdrDragStat* pDrag) const;
protected:
// create marker for this kind
@@ -77,7 +75,6 @@ protected:
private:
bool mbHorizontal;
sal_Int32 mnMin, mnMax;
- basegfx::B2DPolyPolygon maVisiblePolygon;
TableEdgeVector maEdges;
};
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 66c9c1ab113a..2d19a9994c41 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -98,19 +98,27 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const
{
CellPos aPos( rPos );
- sal_Int32 nRowSpan = xCell->getRowSpan()-1;
- do
+ sal_Int32 nRowCount = getRowCount();
+ sal_Int32 nRowSpan = std::max( xCell->getRowSpan(), (sal_Int32)1 );
+ while( nRowSpan && (aPos.mnRow < nRowCount) )
{
+ if( ((sal_Int32)maRows.size()) <= aPos.mnRow )
+ break;
+
height += maRows[aPos.mnRow++].mnSize;
+ nRowSpan--;
}
- while( nRowSpan-- );
- sal_Int32 nColSpan = xCell->getColumnSpan()-1;
- do
+ sal_Int32 nColCount = getColumnCount();
+ sal_Int32 nColSpan = std::max( xCell->getColumnSpan(), (sal_Int32)1 );
+ while( nColSpan && (aPos.mnCol < nColCount ) )
{
+ if( ((sal_Int32)maColumns.size()) <= aPos.mnCol )
+ break;
+
width += maColumns[aPos.mnCol++].mnSize;
+ nColSpan--;
}
- while( nColSpan-- );
}
}
catch( Exception& )
@@ -120,6 +128,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const
return basegfx::B2ITuple( width, height );
}
+
// -----------------------------------------------------------------------------
bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rArea ) const
@@ -127,15 +136,18 @@ bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rAr
try
{
CellRef xCell( getCell( rPos ) );
- if( xCell.is() && !xCell->isMerged() )
+ if( xCell.is() && !xCell->isMerged() && isValid(rPos) )
{
const basegfx::B2ITuple aCellSize( getCellSize( rPos ) );
- const sal_Int32 x = maColumns[rPos.mnCol].mnPos;
- const sal_Int32 y = maRows[rPos.mnRow].mnPos;
+ if( (rPos.mnCol < ((sal_Int32)maColumns.size()) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) )
+ {
+ const sal_Int32 x = maColumns[rPos.mnCol].mnPos;
+ const sal_Int32 y = maRows[rPos.mnRow].mnPos;
- rArea = basegfx::B2IRectangle( x, y, x + aCellSize.getX(), y + aCellSize.getY() );
- return true;
+ rArea = basegfx::B2IRectangle( x, y, x + aCellSize.getX(), y + aCellSize.getY() );
+ return true;
+ }
}
}
catch( Exception& )
@@ -149,7 +161,7 @@ bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rAr
sal_Int32 TableLayouter::getRowHeight( sal_Int32 nRow )
{
- if( (nRow >= 0) && (nRow < getRowCount()) )
+ if( isValidRow(nRow) )
return maRows[nRow].mnSize;
else
return 0;
@@ -159,18 +171,21 @@ sal_Int32 TableLayouter::getRowHeight( sal_Int32 nRow )
void TableLayouter::setRowHeight( sal_Int32 nRow, sal_Int32 nHeight )
{
- const sal_Int32 nCount = getRowCount();
-
- DBG_ASSERT( (nRow >= 0) && (nRow < nCount), "TableLayouter::setRowHeight(), row out of range!" );
- if( (nRow >= 0) && (nRow < nCount) && (nHeight != maRows[nRow].mnSize) )
+ if( isValidRow(nRow) )
+ {
maRows[nRow].mnSize = nHeight;
+ }
+ else
+ {
+ DBG_ERROR( "TableLayouter::setRowHeight(), row out of range!" );
+ }
}
// -----------------------------------------------------------------------------
sal_Int32 TableLayouter::getColumnWidth( sal_Int32 nColumn )
{
- if( (nColumn >= 0) && (nColumn < getColumnCount()) )
+ if( isValidColumn(nColumn) )
return maColumns[nColumn].mnSize;
else
return 0;
@@ -180,11 +195,10 @@ sal_Int32 TableLayouter::getColumnWidth( sal_Int32 nColumn )
void TableLayouter::setColumnWidth( sal_Int32 nColumn, sal_Int32 nWidth )
{
- const sal_Int32 nCount = getColumnCount();
-
- DBG_ASSERT( (nColumn >= 0) && (nColumn < nCount), "TableLayouter::setColumnWidth(), column out of range!" );
- if( (nColumn >= 0) && (nColumn < nCount) )
+ if( isValidColumn(nColumn) )
maColumns[nColumn].mnSize = nWidth;
+ else
+ DBG_ERROR( "TableLayouter::setColumnWidth(), column out of range!" );
}
// -----------------------------------------------------------------------------
@@ -317,6 +331,21 @@ sal_Int32 TableLayouter::getVerticalEdge( int nEdgeX, sal_Int32* pnMin /*= 0*/,
// -----------------------------------------------------------------------------
+static bool checkMergeOrigin( const TableModelRef& xTable, sal_Int32 nMergedX, sal_Int32 nMergedY, sal_Int32 nCellX, sal_Int32 nCellY, bool& bRunning )
+{
+ Reference< XMergeableCell > xCell( xTable->getCellByPosition( nCellX, nCellY ), UNO_QUERY );
+ if( xCell.is() && !xCell->isMerged() )
+ {
+ const sal_Int32 nRight = xCell->getColumnSpan() + nCellX;
+ const sal_Int32 nBottom = xCell->getRowSpan() + nCellY;
+ if( (nMergedX < nRight) && (nMergedY < nBottom) )
+ return true;
+
+ bRunning = false;
+ }
+ return false;
+}
+
/** returns true if the cell(nMergedX,nMergedY) is merged with other cells.
the returned cell( rOriginX, rOriginY ) is the origin( top left cell ) of the merge.
*/
@@ -332,49 +361,87 @@ bool findMergeOrigin( const TableModelRef& xTable, sal_Int32 nMergedX, sal_Int32
if( !xCell.is() || !xCell->isMerged() )
return true;
- // check horizontal
- sal_Int32 nCol = nMergedX-1;
- while( nCol >= 0 )
+ bool bCheckVert = true;
+ bool bCheckHorz = true;
+
+ sal_Int32 nMinCol = 0;
+ sal_Int32 nMinRow = 0;
+
+ sal_Int32 nStep = 1, i;
+
+ sal_Int32 nRow, nCol;
+ do
{
- xCell = xCell.query( xTable->getCellByPosition( nCol, nMergedY ) );
- if( xCell.is() && !xCell->isMerged() )
+ if( bCheckVert )
{
- if( xCell->getColumnSpan() > 1 )
+ nRow = nMergedY - nStep;
+ if( nRow >= nMinRow )
+ {
+ nCol = nMergedX;
+ for( i = 0; (i <= nStep) && (nCol >= nMinCol); i++, nCol-- )
+ {
+ if( checkMergeOrigin( xTable, nMergedX, nMergedY, nCol, nRow, bCheckVert ) )
+ {
+ rOriginX = nCol; rOriginY = nRow;
+ return true;
+ }
+
+ if( !bCheckVert )
+ {
+ if( nCol == nMergedX )
+ {
+ nMinRow = nRow+1;
+ }
+ else
+ {
+ bCheckVert = true;
+ }
+ break;
+ }
+ }
+ }
+ else
{
- // hit!
- rOriginX = nCol;
- rOriginY = nMergedY;
- return true;
+ bCheckVert = false;
}
- break;
}
- nCol--;
- }
- // check vertical
- sal_Int32 nRow = nMergedY-1;
- while( nRow >= 0 )
- {
- xCell = xCell.query( xTable->getCellByPosition( nMergedX, nRow ) );
- if( xCell.is() && !xCell->isMerged() )
+ if( bCheckHorz )
{
- if( xCell->getRowSpan() > 1 )
+ nCol = nMergedX - nStep;
+ if( nCol >= nMinCol )
{
- // hit!
- rOriginX = nMergedX;
- rOriginY = nRow;
- return true;
+ nRow = nMergedY;
+ for( i = 0; (i < nStep) && (nRow >= nMinRow); i++, nRow-- )
+ {
+ if( checkMergeOrigin( xTable, nMergedX, nMergedY, nCol, nRow, bCheckHorz ) )
+ {
+ rOriginX = nCol; rOriginY = nRow;
+ return true;
+ }
+
+ if( !bCheckHorz )
+ {
+ if( nRow == nMergedY )
+ {
+ nMinCol = nCol+1;
+ }
+ else
+ {
+ bCheckHorz = true;
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ bCheckHorz = false;
}
- break;
}
- nRow--;
+ nStep++;
}
-
- // if origin is not at the edges, it must be the top left cell of the merged edges
- rOriginX = nCol+1;
- rOriginY = nRow+1;
- xCell = xCell.query( xTable->getCellByPosition( rOriginX, rOriginY ) );
- return xCell.is() && (xCell->getRowSpan() > 1) && (xCell->getColumnSpan() > 1);
+ while( bCheckVert || bCheckHorz );
}
catch( Exception& )
{
@@ -1149,7 +1216,7 @@ void TableLayouter::SetWritingMode( com::sun::star::text::WritingMode eWritingMo
sal_Int32 TableLayouter::getColumnStart( sal_Int32 nColumn ) const
{
- if( (nColumn >= 0) && (nColumn < getColumnCount()) )
+ if( isValidColumn(nColumn) )
return maColumns[nColumn].mnPos;
else
return 0;
@@ -1159,7 +1226,7 @@ sal_Int32 TableLayouter::getColumnStart( sal_Int32 nColumn ) const
sal_Int32 TableLayouter::getRowStart( sal_Int32 nRow ) const
{
- if( (nRow >= 0) && (nRow < getRowCount()) )
+ if( isValidRow(nRow) )
return maRows[nRow].mnPos;
else
return 0;
diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx
index 4ae1f02ee443..bfc576680005 100644
--- a/svx/source/table/tablelayouter.hxx
+++ b/svx/source/table/tablelayouter.hxx
@@ -140,6 +140,7 @@ private:
inline bool isValidColumn( sal_Int32 nColumn ) const { return (nColumn >= 0) && (nColumn < static_cast<sal_Int32>( maColumns.size())); }
inline bool isValidRow( sal_Int32 nRow ) const { return (nRow >= 0) && (nRow < static_cast<sal_Int32>( maRows.size())); }
+ inline bool isValid( const CellPos& rPos ) const { return isValidColumn( rPos.mnCol ) && isValidRow( rPos.mnRow ); }
void ClearBorderLayout();
void ClearBorderLayout(BorderLineMap& rMap);
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index 988cf1a5dc23..34ef52f6d701 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -52,6 +52,8 @@
#include "svdstr.hrc"
#include "svdglob.hxx"
+//#define PLEASE_DEBUG_THE_TABLES 1
+
using ::rtl::OUString;
using namespace ::osl;
using namespace ::vos;
@@ -620,14 +622,29 @@ void TableModel::notifyModification()
::osl::MutexGuard guard( m_aMutex );
if( (mnNotifyLock == 0) && mpTableObj && mpTableObj->GetModel() )
{
+ mbNotifyPending = false;
+
+ ::cppu::OInterfaceContainerHelper * pModifyListeners = rBHelper.getContainer( XModifyListener::static_type() );
+ if( pModifyListeners )
+ {
+ EventObject aSource;
+ aSource.Source = static_cast< ::cppu::OWeakObject* >(this);
+ pModifyListeners->notifyEach( &XModifyListener::modified, aSource);
+ }
+ }
+ else
+ {
+ mbNotifyPending = true;
+ }
#ifdef PLEASE_DEBUG_THE_TABLES
- FILE* file = fopen( "e:\\table.log","a+" );
+ FILE* file = fopen( "c:\\table.xml","w" );
const sal_Int32 nColCount = getColumnCountImpl();
const sal_Int32 nRowCount = getRowCountImpl();
- fprintf( file, "<table columns=\"%ld\" rows=\"%ld\">\n\r", nColCount, nRowCount );
+ fprintf( file, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\r" );
+ fprintf( file, "<table columns=\"%ld\" rows=\"%ld\" updated=\"%s\">\n\r", nColCount, nRowCount, mbNotifyPending ? "false" : "true");
for( sal_Int32 nCol = 0; nCol < nColCount; ++nCol )
{
@@ -647,9 +664,9 @@ void TableModel::notifyModification()
sal_Int32 nColSpan = xCell->getColumnSpan();
sal_Bool bMerged = xCell->isMerged();
- if( nColSpan > 1 )
+ if( nColSpan != 1 )
fprintf( file, " column-span=\"%ld\"", nColSpan );
- if( nRowSpan > 1 )
+ if( nRowSpan != 1 )
fprintf( file, " row-span=\"%ld\"", nRowSpan );
if( bMerged )
@@ -663,20 +680,6 @@ void TableModel::notifyModification()
fprintf( file, "</table>\n\r" );
fclose( file );
#endif
- mbNotifyPending = false;
-
- ::cppu::OInterfaceContainerHelper * pModifyListeners = rBHelper.getContainer( XModifyListener::static_type() );
- if( pModifyListeners )
- {
- EventObject aSource;
- aSource.Source = static_cast< ::cppu::OWeakObject* >(this);
- pModifyListeners->notifyEach( &XModifyListener::modified, aSource);
- }
- }
- else
- {
- mbNotifyPending = true;
- }
}
// -----------------------------------------------------------------------------
@@ -749,7 +752,8 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount )
aNewColumns[nOffset] = xNewCol;
}
- if( pModel && mpTableObj->IsInserted() )
+ const bool bUndo = pModel && mpTableObj->IsInserted() && pModel->IsUndoEnabled();
+ if( bUndo )
{
pModel->BegUndo( ImpGetResStr(STR_TABLE_INSCOL) );
pModel->AddUndo( pModel->GetSdrUndoFactory().CreateUndoGeoObject(*mpTableObj) );
@@ -783,26 +787,17 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount )
// cell merges over newly created columns, so add the new columns to the merged cell
const sal_Int32 nRowSpan = xCell->getRowSpan();
nColSpan += nCount;
- if( pModel && mpTableObj->IsInserted() )
- xCell->AddUndo();
- xCell->merge( nColSpan, nRowSpan );
- // set newly inserted cells to merged state
- for( sal_Int32 nColOffset = 0; nColOffset < nCount; ++nColOffset )
- {
- for( sal_Int32 nRowOffset = 0; nRowOffset < nRowSpan; ++nRowOffset )
- {
- CellRef xMergedCell( getCell( nIndex + nColOffset, nRow + nRowOffset ) );
- if( xMergedCell.is() )
- xMergedCell->setMerged();
- }
- }
+ merge( nCol, nRow, nColSpan, nRowSpan );
}
}
}
- if( pModel && mpTableObj->IsInserted() )
+ if( bUndo )
pModel->EndUndo();
+ if( pModel )
+ pModel->SetChanged();
+
}
catch( Exception& )
{
@@ -832,7 +827,9 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount )
sal_Int32 nRows = getRowCountImpl();
SdrModel* pModel = mpTableObj->GetModel();
- if( pModel && mpTableObj->IsInserted() )
+
+ const bool bUndo = pModel && mpTableObj->IsInserted() && pModel->IsUndoEnabled();
+ if( bUndo )
{
pModel->BegUndo( ImpGetResStr(STR_UNDO_COL_DELETE) );
pModel->AddUndo( pModel->GetSdrUndoFactory().CreateUndoGeoObject(*mpTableObj) );
@@ -882,7 +879,8 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount )
CellRef xTargetCell( getCell( nIndex + nCount, nRow ) );
if( xTargetCell.is() )
{
- xTargetCell->AddUndo();
+ if( bUndo )
+ xTargetCell->AddUndo();
xTargetCell->merge( nColSpan - nRemove, xCell->getRowSpan() );
xTargetCell->replaceContentAndFormating( xCell );
}
@@ -892,7 +890,7 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount )
{
// current cells spans inside the removed columns, so adjust
const sal_Int32 nRemove = ::std::min( nCount, nCol + nColSpan - nIndex );
- if( mpTableObj->IsInserted() )
+ if( bUndo )
xCell->AddUndo();
xCell->merge( nColSpan - nRemove, xCell->getRowSpan() );
}
@@ -904,8 +902,11 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount )
while( nRows-- )
maRows[nRows]->removeColumns( nIndex, nCount );
- if( pModel && mpTableObj->IsInserted() )
+ if( bUndo )
pModel->EndUndo();
+
+ if( pModel )
+ pModel->SetChanged();
}
catch( Exception& )
{
@@ -924,7 +925,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount )
if( nCount && mpTableObj )
{
SdrModel* pModel = mpTableObj->GetModel();
- bool bBegUndo = false;
+ const bool bUndo = pModel && mpTableObj->IsInserted() && pModel->IsUndoEnabled();
try
{
TableModelNotifyGuard aGuard( this );
@@ -940,13 +941,12 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount )
aNewRows[nOffset] = xNewRow;
}
- if( pModel && mpTableObj->IsInserted() )
- {
+ if( bUndo )
+ {
pModel->BegUndo( ImpGetResStr(STR_TABLE_INSROW) );
pModel->AddUndo( pModel->GetSdrUndoFactory().CreateUndoGeoObject(*mpTableObj) );
TableModelRef xThis( this );
pModel->AddUndo( new InsertRowUndo( xThis, nIndex, aNewRows ) );
- bBegUndo = true;
}
// check if cells merge over new columns
@@ -961,19 +961,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount )
// cell merges over newly created columns, so add the new columns to the merged cell
const sal_Int32 nColSpan = xCell->getColumnSpan();
nRowSpan += nCount;
- xCell->AddUndo();
- xCell->merge( nColSpan, nRowSpan );
-
- // set newly inserted cells to merged state
- for( sal_Int32 nColOffset = 1; nColOffset < nColSpan; ++nColOffset )
- {
- for( sal_Int32 nRowOffset = 0; nRowOffset <= nCount; ++nRowOffset )
- {
- CellRef xMergedCell( getCell( nCol + nColOffset - 1, nIndex + nRowOffset ) );
- if( xMergedCell.is() )
- xMergedCell->setMerged();
- }
- }
+ merge( nCol, nRow, nColSpan, nRowSpan );
}
}
}
@@ -982,9 +970,12 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount )
{
DBG_ERROR("sdr::table::TableModel::insertRows(), exception caught!");
}
- if( pModel && bBegUndo )
+ if( bUndo )
pModel->EndUndo();
+ if( pModel )
+ pModel->SetChanged();
+
updateRows();
setModified(sal_True);
}
@@ -998,6 +989,9 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount )
if( mpTableObj && nCount && (nIndex >= 0) && (nIndex < nRowCount) )
{
+ SdrModel* pModel = mpTableObj->GetModel();
+ const bool bUndo = pModel && mpTableObj->IsInserted()&& pModel->IsUndoEnabled();
+
try
{
TableModelNotifyGuard aGuard( this );
@@ -1006,8 +1000,7 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount )
if( (nIndex + nCount) > nRowCount )
nCount = nRowCount - nIndex;
- SdrModel* pModel = mpTableObj->GetModel();
- if( pModel && mpTableObj->IsInserted() )
+ if( bUndo )
{
pModel->BegUndo( ImpGetResStr(STR_UNDO_ROW_DELETE) );
pModel->AddUndo( pModel->GetSdrUndoFactory().CreateUndoGeoObject(*mpTableObj) );
@@ -1047,7 +1040,8 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount )
CellRef xTargetCell( getCell( nCol, nIndex + nCount ) );
if( xTargetCell.is() )
{
- xTargetCell->AddUndo();
+ if( bUndo )
+ xTargetCell->AddUndo();
xTargetCell->merge( xCell->getColumnSpan(), nRowSpan - nRemove );
xTargetCell->replaceContentAndFormating( xCell );
}
@@ -1057,7 +1051,8 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount )
{
// current cells spans inside the removed rows, so adjust
const sal_Int32 nRemove = ::std::min( nCount, nRow + nRowSpan - nIndex );
- xCell->AddUndo();
+ if( bUndo )
+ xCell->AddUndo();
xCell->merge( xCell->getColumnSpan(), nRowSpan - nRemove );
}
}
@@ -1066,8 +1061,11 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount )
// now remove the rows
remove_range<RowVector,RowVector::iterator>( maRows, nIndex, nCount );
- if( pModel )
+ if( bUndo )
pModel->EndUndo();
+
+ if( pModel )
+ pModel->SetChanged();
}
catch( Exception& )
{
@@ -1190,6 +1188,52 @@ void TableModel::optimize()
// -----------------------------------------------------------------------------
+void TableModel::merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan )
+{
+ SdrModel* pModel = mpTableObj->GetModel();
+
+ const bool bUndo = pModel && mpTableObj->IsInserted() && pModel->IsUndoEnabled();
+
+ const sal_Int32 nLastRow = nRow + nRowSpan;
+ const sal_Int32 nLastCol = nCol + nColSpan;
+
+ if( (nLastRow > getRowCount()) || (nLastCol > getRowCount() ) )
+ {
+ DBG_ERROR("TableModel::merge(), merge beyound the table!");
+ }
+
+ // merge first cell
+ CellRef xOriginCell( dynamic_cast< Cell* >( getCellByPosition( nCol, nRow ).get() ) );
+ if( xOriginCell.is() )
+ {
+ if( bUndo )
+ xOriginCell->AddUndo();
+ xOriginCell->merge( nColSpan, nRowSpan );
+ }
+
+ sal_Int32 nTempCol = nCol + 1;
+
+ // merge remaining cells
+ for( ; nRow < nLastRow; nRow++ )
+ {
+ for( ; nTempCol < nLastCol; nTempCol++ )
+ {
+ CellRef xCell( dynamic_cast< Cell* >( getCellByPosition( nTempCol, nRow ).get() ) );
+ if( xCell.is() && !xCell->isMerged() )
+ {
+ if( bUndo )
+ xCell->AddUndo();
+ xCell->setMerged();
+ xOriginCell->mergeContent( xCell );
+ }
+ }
+ nTempCol = nCol;
+ }
+}
+
+
+// -----------------------------------------------------------------------------
+
void TableModel::updateRows()
{
sal_Int32 nRow = 0;
diff --git a/svx/source/table/tablemodel.hxx b/svx/source/table/tablemodel.hxx
index 73e188dd3f5c..e118999b276f 100644
--- a/svx/source/table/tablemodel.hxx
+++ b/svx/source/table/tablemodel.hxx
@@ -96,6 +96,9 @@ public:
/** deletes rows and columns that are completly merged. Must be called between BegUndo/EndUndo! */
void optimize();
+ /// merges the cell at the given position with the given span
+ void merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan );
+
// ICellRange
virtual sal_Int32 getLeft();
virtual sal_Int32 getTop();
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index e4f35bad6d58..abca50b71254 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -233,7 +233,12 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal
bool bChange = false;
TableRowUndo* pUndo = 0;
- if( mxTableModel.is() && mxTableModel->getSdrTableObj() && mxTableModel->getSdrTableObj()->IsInserted() )
+
+ SdrModel* pModel = mxTableModel->getSdrTableObj()->GetModel();
+
+ const bool bUndo = mxTableModel.is() && mxTableModel->getSdrTableObj() && mxTableModel->getSdrTableObj()->IsInserted() && pModel && pModel->IsUndoEnabled();
+
+ if( bUndo )
{
TableRowRef xThis( this );
pUndo = new TableRowUndo( xThis );
@@ -300,12 +305,8 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal
{
if( pUndo )
{
- SdrModel* pModel = mxTableModel->getSdrTableObj()->GetModel();
- if( pModel )
- {
- pModel->AddUndo( pUndo );
- pUndo = 0;
- }
+ pModel->AddUndo( pUndo );
+ pUndo = 0;
}
mxTableModel->setModified(sal_True);
}
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index c1c58977be64..e53f41251ff2 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -123,7 +123,7 @@ namespace drawinglayer
getTransform(),
*getSdrFTAttribute().getText(),
0,
- true, false));
+ true, false, false));
}
}
@@ -599,7 +599,30 @@ namespace sdr
const SfxItemSet& rCellItemSet = xCurrentCell->GetItemSet();
const sal_uInt32 nTextIndex(nColCount * aCellPos.mnRow + aCellPos.mnCol);
const SdrText* pSdrText = rTableObj.getText(nTextIndex);
- drawinglayer::attribute::SdrFillTextAttribute* pAttribute = drawinglayer::primitive2d::createNewSdrFillTextAttribute(rCellItemSet, pSdrText);
+ drawinglayer::attribute::SdrFillTextAttribute* pAttribute = 0;
+
+ if(pSdrText)
+ {
+ // #i101508# take cell's local text frame distances into account
+ const sal_Int32 nLeft(xCurrentCell->GetTextLeftDistance());
+ const sal_Int32 nRight(xCurrentCell->GetTextRightDistance());
+ const sal_Int32 nUpper(xCurrentCell->GetTextUpperDistance());
+ const sal_Int32 nLower(xCurrentCell->GetTextLowerDistance());
+
+ pAttribute = drawinglayer::primitive2d::createNewSdrFillTextAttribute(
+ rCellItemSet,
+ pSdrText,
+ &nLeft,
+ &nUpper,
+ &nRight,
+ &nLower);
+ }
+ else
+ {
+ pAttribute = drawinglayer::primitive2d::createNewSdrFillTextAttribute(
+ rCellItemSet,
+ pSdrText);
+ }
if(pAttribute)
{
@@ -664,17 +687,7 @@ namespace sdr
if(pNewShadowAttribute)
{
- // attention: shadow is added BEFORE object stuff to render it BEHIND object (!)
- const drawinglayer::primitive2d::Primitive2DReference xShadow(drawinglayer::primitive2d::createShadowPrimitive(xRetval, *pNewShadowAttribute));
-
- if(xShadow.is())
- {
- drawinglayer::primitive2d::Primitive2DSequence xContentWithShadow(2);
- xContentWithShadow[0] = xShadow;
- xContentWithShadow[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::GroupPrimitive2D(xRetval));
- xRetval = xContentWithShadow;
- }
-
+ xRetval = drawinglayer::primitive2d::createEmbeddedShadowPrimitive(xRetval, *pNewShadowAttribute);
delete pNewShadowAttribute;
}
}
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 0e207ef7bc0a..a556110c69c5 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -861,7 +861,16 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
SfxItemPool& rPool = rView.GetModel()->GetItemPool();
SfxItemSet aSet( rPool, SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST );
- String aUndoStr( rView.GetDescriptionOfMarkedObjects() );
+ const bool bUndo = rView.IsUndoEnabled();
+
+ String aUndoStr;
+
+ if( bUndo )
+ {
+ aUndoStr = rView.GetDescriptionOfMarkedObjects();
+ aUndoStr.Append( sal_Unicode(' ') );
+ }
+
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
USHORT nSlot = rReq.GetSlot();
@@ -869,8 +878,6 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem ))
pItem = 0;
- aUndoStr.Append( sal_Unicode(' ') );
-
switch( nSlot )
{
case SID_ATTR_GRAF_RED:
@@ -878,7 +885,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafRedItem( ((SfxInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFRED ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFRED ) ) );
}
}
break;
@@ -888,7 +896,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafGreenItem( ((SfxInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGREEN ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGREEN ) ) );
}
}
break;
@@ -898,7 +907,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafBlueItem( ((SfxInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFBLUE ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFBLUE ) ) );
}
}
break;
@@ -908,7 +918,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafLuminanceItem( ((SfxInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFLUMINANCE ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFLUMINANCE ) ) );
}
}
break;
@@ -918,7 +929,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafContrastItem( ((SfxInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCONTRAST ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCONTRAST ) ) );
}
}
break;
@@ -928,7 +940,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafGamma100Item( ((SfxUInt32Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGAMMA ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGAMMA ) ) );
}
}
break;
@@ -938,7 +951,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafTransparenceItem( ((SfxUInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFTRANSPARENCY ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFTRANSPARENCY ) ) );
}
}
break;
@@ -948,7 +962,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( pItem )
{
aSet.Put( SdrGrafModeItem( (GraphicDrawMode) ((SfxUInt16Item*)pItem)->GetValue() ));
- aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFMODE ) ) );
+ if( bUndo )
+ aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFMODE ) ) );
}
}
break;
@@ -1075,11 +1090,16 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
rView.SetMarkedObjRect( aNewRect );
else
{
- rView.BegUndo( aUndoStr );
- rView.AddUndo( rView.GetModel()->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
+ if( bUndo )
+ {
+ rView.BegUndo( aUndoStr );
+ rView.AddUndo( rView.GetModel()->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
+ }
pObj->SetSnapRect( aNewRect );
rView.SetAttributes( aSet );
- rView.EndUndo();
+
+ if( bUndo )
+ rView.EndUndo();
aSet.ClearItem();
}
}
@@ -1106,9 +1126,13 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if( aSet.Count() )
{
- rView.BegUndo( aUndoStr );
+ if( bUndo )
+ rView.BegUndo( aUndoStr );
+
rView.SetAttributes( aSet );
- rView.EndUndo();
+
+ if( bUndo )
+ rView.EndUndo();
}
}
diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk
index 02bbd865d4fb..9bca3b979841 100644
--- a/svx/source/tbxctrls/makefile.mk
+++ b/svx/source/tbxctrls/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=tbxctrls
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -42,10 +43,17 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES= \
- $(SLO)$/formatpaintbrushctrl.obj\
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/fontworkgallery.obj\
$(SLO)$/extrusioncontrols.obj \
+ $(SLO)$/tbcontrl.obj \
+ $(SLO)$/toolbarmenu.obj \
+ $(SLO)$/tbxcolorupdate.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/formatpaintbrushctrl.obj\
$(SLO)$/colrctrl.obj \
$(SLO)$/fillctrl.obj \
$(SLO)$/grafctrl.obj \
@@ -53,16 +61,15 @@ SLOFILES= \
$(SLO)$/layctrl.obj \
$(SLO)$/lboxctrl.obj \
$(SLO)$/linectrl.obj \
- $(SLO)$/tbcontrl.obj \
$(SLO)$/tbxalign.obj \
$(SLO)$/tbxdrctl.obj \
$(SLO)$/verttexttbxctrl.obj \
- $(SLO)$/toolbarmenu.obj \
$(SLO)$/subtoolboxcontrol.obj \
$(SLO)$/tbxcolor.obj \
- $(SLO)$/tbxcolorupdate.obj \
$(SLO)$/tbunocontroller.obj
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
SRS1NAME=$(TARGET)
SRC1FILES = \
fontworkgallery.src \
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 392b4c608ac6..efa49025bbc4 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -292,6 +292,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow
{
private:
ValueSet aLineSet;
+ bool m_bIsWriter;
#if _SOLAR__PRIVATE
void MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& rSize, String& rStr,
@@ -1335,6 +1336,14 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) )
{
+ try
+ {
+ Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW );
+ m_bIsWriter = xServices->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument")));
+ }
+ catch(const uno::Exception& )
+ {
+ }
Size aBmpSize( 55, 12 );
CreateBitmaps();
@@ -1598,7 +1607,7 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG )
Any a;
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" ));
- aLineItem.QueryValue( a );
+ aLineItem.QueryValue( a, m_bIsWriter ? CONVERT_TWIPS : 0 );
aArgs[0].Value = a;
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
@@ -2631,7 +2640,6 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
{
SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() );
-
pLineWin->StartPopupMode( &GetToolBox(), TRUE );
pLineWin->StartSelection();
SetPopupWindow( pLineWin );
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 996d9efeb431..734c43a15098 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -514,6 +514,9 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB
{
sal_uInt16 nSID = rReq.GetSlot();
sal_uInt16 nStrResId = 0;
+
+ const bool bUndo = pSdrView && pSdrView->IsUndoEnabled();
+
switch( nSID )
{
case SID_EXTRUSION_TOOGLE:
@@ -584,14 +587,18 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( pObj->ISA(SdrObjCustomShape) )
{
- String aStr( SVX_RES( nStrResId ) );
- pSdrView->BegUndo( aStr );
- pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
+ if( bUndo )
+ {
+ String aStr( SVX_RES( nStrResId ) );
+ pSdrView->BegUndo( aStr );
+ pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
+ }
SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
impl_execute( pSdrView, rReq, aGeometryItem, pObj );
pObj->SetMergedItem( aGeometryItem );
pObj->BroadcastObjectChange();
- pSdrView->EndUndo();
+ if( bUndo )
+ pSdrView->EndUndo();
// simulate a context change:
// force SelectionHasChanged() being called
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 469833597483..d18fcaeb3cba 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -492,9 +492,14 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
if( pObj->ISA(SdrObjCustomShape) )
{
- String aStr( SVX_RES( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE ) );
- pSdrView->BegUndo( aStr );
- pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
+ const bool bUndo = pSdrView->IsUndoEnabled();
+
+ if( bUndo )
+ {
+ String aStr( SVX_RES( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE ) );
+ pSdrView->BegUndo( aStr );
+ pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
+ }
SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
GetGeometryForCustomShape( aGeometryItem, aCustomShape );
pObj->SetMergedItem( aGeometryItem );
@@ -508,7 +513,8 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
}
pObj->BroadcastObjectChange();
- pSdrView->EndUndo();
+ if( bUndo )
+ pSdrView->EndUndo();
pSdrView->AdjustMarkHdl(); //HMH sal_True );
rBindings.Invalidate( SID_FONTWORK_SHAPE_TYPE );
}
@@ -562,14 +568,19 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( pObj->ISA(SdrObjCustomShape) )
{
- String aStr( SVX_RES( nStrResId ) );
- pSdrView->BegUndo( aStr );
- pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
+ const bool bUndo = pSdrView->IsUndoEnabled();
+ if( bUndo )
+ {
+ String aStr( SVX_RES( nStrResId ) );
+ pSdrView->BegUndo( aStr );
+ pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
+ }
SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
impl_execute( pSdrView, rReq, aGeometryItem, pObj );
pObj->SetMergedItem( aGeometryItem );
pObj->BroadcastObjectChange();
- pSdrView->EndUndo();
+ if( bUndo )
+ pSdrView->EndUndo();
}
}
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hrc b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hrc
index bef26a78a0fd..286e5dc94971 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hrc
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hrc
@@ -32,7 +32,7 @@
#include "resids.hrc"
#include "buttongroup.hrc"
-#include "chinese_direction.hrc"
+#include "chinese_direction_ids.hrc"
#define ED_TERM 1
#define ED_MAPPING 2
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src
index 7653a18bb79c..8b9cf5936f61 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.src
@@ -29,6 +29,7 @@
************************************************************************/
#include "chinese_dictionarydialog.hrc"
+#include "chinese_direction.hrc"
#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
diff --git a/svx/inc/svx/sdr/overlay/overlaylinestriped.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_direction_ids.hrc
index 7ec84401d2bd..6a54146441b5 100644
--- a/svx/inc/svx/sdr/overlay/overlaylinestriped.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_direction_ids.hrc
@@ -6,8 +6,8 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: overlaylinestriped.hxx,v $
- * $Revision: 1.3 $
+ * $RCSfile: chinese_direction_ids.hrc,v $
+ * $Revision: 1.1 $
*
* This file is part of OpenOffice.org.
*
@@ -28,22 +28,10 @@
*
************************************************************************/
-#ifndef _SDR_OVERLAY_OVERLAYLINESTRIPED_HXX
-#define _SDR_OVERLAY_OVERLAYLINESTRIPED_HXX
+#ifndef _TEXTCONVERSIONDLGS_CHINESE_DIRECTION_IDS_HXX
+#define _TEXTCONVERSIONDLGS_CHINESE_DIRECTION_IDS_HXX
-#include <svx/sdr/overlay/overlayline.hxx>
+#define RB_TO_SIMPLIFIED 1
+#define RB_TO_TRADITIONAL 2
-//////////////////////////////////////////////////////////////////////////////
-
-namespace sdr
-{
- namespace overlay
- {
- } // end of namespace overlay
-} // end of namespace sdr
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //_SDR_OVERLAY_OVERLAYLINESTRIPED_HXX
-
-// eof
+#endif
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc b/svx/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc
index 2fd39e003175..e795b753208f 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_direction_tmpl.hrc
@@ -31,13 +31,12 @@
#ifndef _TEXTCONVERSIONDLGS_CHINESE_DIRECTION_HRC
#define _TEXTCONVERSIONDLGS_CHINESE_DIRECTION_HRC
+#include "chinese_direction_ids.hrc"
+
#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
#endif
-#define RB_TO_SIMPLIFIED 1
-#define RB_TO_TRADITIONAL 2
-
#define DIRECTION_RADIOBUTTONS( D_XPOS, D_YPOS, D_FULLWIDTH ) \
RadioButton RB_TO_SIMPLIFIED \
{ \
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hrc b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hrc
index 833dd33f20f4..415bf5230d94 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hrc
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hrc
@@ -32,7 +32,7 @@
#include "resids.hrc"
#include "buttongroup.hrc"
-#include "chinese_direction.hrc"
+#include "chinese_direction_ids.hrc"
#define PB_EDITTERMS 1
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src
index 3cf9402e832e..601f2594a080 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src
@@ -29,6 +29,7 @@
************************************************************************/
#include "chinese_translationdialog.hrc"
+#include "chinese_direction.hrc"
#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
@@ -39,7 +40,7 @@
#define FULL_WIDTH (220)
#define FULL_HEIGHT (120)
-#define EDITBUTTON_WIDTH (70)
+#define EDITBUTTON_WIDTH (75)
#define COL_1 (RSC_SP_DLG_INNERBORDER_LEFT)
#define COL_2 (COL_1+RSC_SP_FLGR_SPACE_X)
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index b5f3e5c6ec5f..5d1af9af2190 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -104,6 +104,9 @@ using namespace ::com::sun::star::task;
#include <svx/sdr/contact/viewobjectcontact.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
+// #i102251#
+#include <editstat.hxx>
+
//////////////////////////////////////////////////////////////////////////////
namespace svx
@@ -198,13 +201,13 @@ namespace svx
SdrModel* mpDoc;
};
- Reference< XInterface > SAL_CALL GraphicExporter_createInstance(const Reference< XMultiServiceFactory > & )
+ SVX_DLLPUBLIC Reference< XInterface > SAL_CALL GraphicExporter_createInstance(const Reference< XMultiServiceFactory > & )
throw( Exception )
{
return (XWeak*)new GraphicExporter();
}
- Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames()
+ SVX_DLLPUBLIC Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames()
throw()
{
Sequence< OUString > aSupportedServiceNames( 1 );
@@ -212,7 +215,7 @@ namespace svx
return aSupportedServiceNames;
}
- OUString SAL_CALL GraphicExporter_getImplementationName()
+ SVX_DLLPUBLIC OUString SAL_CALL GraphicExporter_getImplementationName()
throw()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Draw.GraphicExporter" ) );
@@ -225,16 +228,27 @@ namespace svx
Graphic aGraphic( rMtf );
BitmapEx aBmpEx;
+ // #i102089# support user's settings of AA and LineSnap when the MetaFile gets
+ // rasterconverted to a bitmap
+ const SvtOptionsDrawinglayer aDrawinglayerOpt;
+ const GraphicConversionParameters aParameters(
+ pSize ? *pSize : Size(0, 0),
+ true, // allow unlimited size
+ aDrawinglayerOpt.IsAntiAliasing(),
+ aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
+
if( bTransparent )
{
- Graphic aMaskGraphic( rMtf.GetMonochromeMtf( COL_BLACK ) );
- Bitmap aMaskBmp( aMaskGraphic.GetUnlimitedBitmap( pSize ) );
+ Graphic aMaskGraphic(rMtf.GetMonochromeMtf(COL_BLACK));
+ Bitmap aMaskBmp(aMaskGraphic.GetBitmap(aParameters));
- aMaskBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
- aBmpEx = BitmapEx( aGraphic.GetUnlimitedBitmap( pSize ), aMaskBmp );
+ aMaskBmp.Convert(BMP_CONVERSION_1BIT_THRESHOLD);
+ aBmpEx = BitmapEx(aGraphic.GetBitmap(aParameters), aMaskBmp);
}
else
- aBmpEx = BitmapEx( aGraphic.GetUnlimitedBitmap( pSize ) );
+ {
+ aBmpEx = BitmapEx(aGraphic.GetBitmap(aParameters));
+ }
aBmpEx.SetPrefMapMode( rMtf.GetPrefMapMode() );
aBmpEx.SetPrefSize( rMtf.GetPrefSize() );
@@ -625,8 +639,12 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
rOutl.SetCalcFieldValueHdl( LINK(this, GraphicExporter, CalcFieldValueHdl) );
rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor(pView->GetSdrPageView()) );
- std::vector< SdrObject* > aShapes;
+ // #i102251#
+ const sal_uInt32 nOldCntrl(rOutl.GetControlWord());
+ sal_uInt32 nCntrl = nOldCntrl & ~EE_CNTRL_ONLINESPELLING;
+ rOutl.SetControlWord(nCntrl);
+ std::vector< SdrObject* > aShapes;
bool bRet = true;
// export complete page?
@@ -977,6 +995,9 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
rOutl.SetCalcFieldValueHdl( maOldCalcFieldValueHdl );
+ // #i102251#
+ rOutl.SetControlWord(nOldCntrl);
+
return bRet;
}
diff --git a/svx/source/unodraw/UnoGraphicExporter.hxx b/svx/source/unodraw/UnoGraphicExporter.hxx
index e8a4621ac63f..a2fbc38dd3d9 100644
--- a/svx/source/unodraw/UnoGraphicExporter.hxx
+++ b/svx/source/unodraw/UnoGraphicExporter.hxx
@@ -35,9 +35,9 @@
namespace svx
{
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GraphicExporter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
- ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw();
- ::rtl::OUString SAL_CALL GraphicExporter_getImplementationName() throw();
+ SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GraphicExporter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
+ SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw();
+ SVX_DLLPUBLIC ::rtl::OUString SAL_CALL GraphicExporter_getImplementationName() throw();
}
#endif
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index 1210a3847a96..d742cf63ece8 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -49,19 +49,15 @@ using namespace ::cppu;
const USHORT NON_USER_DEFINED_GLUE_POINTS = 4;
-class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >,
- public SfxListener
+class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >
{
private:
- SdrObject* mpObject;
+ SdrObjectWeakRef mpObject;
public:
SvxUnoGluePointAccess( SdrObject* pObject ) throw();
virtual ~SvxUnoGluePointAccess() throw();
- // SfxListener
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
-
// XIdentifierContainer
virtual sal_Int32 SAL_CALL insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
virtual void SAL_CALL removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
@@ -223,52 +219,16 @@ static void convert( const drawing::GluePoint2& rUnoGlue, SdrGluePoint& rSdrGlue
SvxUnoGluePointAccess::SvxUnoGluePointAccess( SdrObject* pObject ) throw()
: mpObject( pObject )
{
- StartListening( *mpObject->GetModel() );
-
}
SvxUnoGluePointAccess::~SvxUnoGluePointAccess() throw()
{
- if( mpObject && mpObject->GetModel())
- EndListening( *mpObject->GetModel() );
-}
-
-void SvxUnoGluePointAccess::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
-{
- const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
-
- if( pSdrHint && mpObject)
- {
- if( pSdrHint->GetKind() == HINT_OBJREMOVED )
- {
- if( mpObject == pSdrHint->GetObject() )
- mpObject = NULL;
- }
- else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
- {
- mpObject = NULL;
- }
- // #110094#-9
- //else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
- //{
- // SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
- // while( pObjList )
- // {
- // if( pSdrHint->GetObjList() == pObjList )
- // {
- // mpObject = NULL;
- // break;
- // }
- // pObjList = pObjList->GetUpList();
- // }
- //}
- }
}
// XIdentifierContainer
sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject )
+ if( mpObject.is() )
{
SdrGluePointList* pList = mpObject->ForceGluePointList();
if( pList )
@@ -298,7 +258,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) thr
void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
+ if( mpObject.is() && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
{
const USHORT nId = (USHORT)(Identifier - NON_USER_DEFINED_GLUE_POINTS) + 1;
@@ -327,7 +287,7 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier )
// XIdentifierReplace
void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject && mpObject->IsNode() )
+ if( mpObject.is() && mpObject->IsNode() )
{
struct drawing::GluePoint2 aGluePoint;
if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint))
@@ -361,7 +321,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, c
// XIdentifierAccess
uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject && mpObject->IsNode() )
+ if( mpObject.is() && mpObject->IsNode() )
{
struct drawing::GluePoint2 aGluePoint;
@@ -401,21 +361,29 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier )
uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() throw (uno::RuntimeException)
{
- const SdrGluePointList* pList = mpObject->GetGluePointList();
- const USHORT nCount = pList ? pList->GetCount() : 0;
+ if( mpObject.is() )
+ {
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ const USHORT nCount = pList ? pList->GetCount() : 0;
- USHORT i;
+ USHORT i;
- uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
- sal_Int32 *pIdentifier = aIdSequence.getArray();
+ uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
+ sal_Int32 *pIdentifier = aIdSequence.getArray();
- for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
- *pIdentifier++ = (sal_Int32)i;
+ for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
+ *pIdentifier++ = (sal_Int32)i;
- for( i = 0; i < nCount; i++ )
- *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1;
+ for( i = 0; i < nCount; i++ )
+ *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1;
- return aIdSequence;
+ return aIdSequence;
+ }
+ else
+ {
+ uno::Sequence< sal_Int32 > aEmpty;
+ return aEmpty;
+ }
}
/* deprecated */
@@ -425,7 +393,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E
throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject )
+ if( mpObject.is() )
{
SdrGluePointList* pList = mpObject->ForceGluePointList();
if( pList )
@@ -455,7 +423,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E
void SAL_CALL SvxUnoGluePointAccess::removeByIndex( sal_Int32 Index )
throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpObject )
+ if( mpObject.is() )
{
SdrGluePointList* pList = mpObject->ForceGluePointList();
if( pList )
@@ -487,7 +455,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIndex( sal_Int32 Index, const uno:
throw lang::IllegalArgumentException();
Index -= 4;
- if( mpObject && Index >= 0 )
+ if( mpObject.is() && Index >= 0 )
{
SdrGluePointList* pList = const_cast< SdrGluePointList* >( mpObject->GetGluePointList() );
if( pList && Index < pList->GetCount() )
@@ -509,7 +477,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
throw(uno::RuntimeException)
{
sal_Int32 nCount = 0;
- if( mpObject )
+ if( mpObject.is() )
{
// each node has a default of 4 glue points
// and any number of user defined glue points
@@ -529,7 +497,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( Index >= 0 && mpObject && mpObject->IsNode() )
+ if( Index >= 0 && mpObject.is() && mpObject->IsNode() )
{
struct drawing::GluePoint2 aGluePoint;
@@ -571,7 +539,7 @@ uno::Type SAL_CALL SvxUnoGluePointAccess::getElementType()
sal_Bool SAL_CALL SvxUnoGluePointAccess::hasElements()
throw( uno::RuntimeException)
{
- return mpObject && mpObject->IsNode();
+ return mpObject.is() && mpObject->IsNode();
}
/**
diff --git a/svx/source/unodraw/makefile.mk b/svx/source/unodraw/makefile.mk
index 3eee2c74f8d5..4b8ecb093df4 100644
--- a/svx/source/unodraw/makefile.mk
+++ b/svx/source/unodraw/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=unodraw
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -42,21 +43,18 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES = \
- $(SLO)$/UnoNamespaceMap.obj \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/UnoGraphicExporter.obj \
- $(SLO)$/unopool.obj \
$(SLO)$/XPropertyTable.obj \
$(SLO)$/UnoNameItemTable.obj \
$(SLO)$/unoshape.obj \
$(SLO)$/unoipset.obj \
- $(SLO)$/unoctabl.obj \
$(SLO)$/unoshap2.obj \
$(SLO)$/unoshap3.obj \
$(SLO)$/unoshap4.obj \
$(SLO)$/unopage.obj \
$(SLO)$/unoshtxt.obj \
- $(SLO)$/unoshcol.obj \
$(SLO)$/unoprov.obj \
$(SLO)$/unomod.obj \
$(SLO)$/unonrule.obj \
@@ -69,8 +67,18 @@ SLOFILES = \
$(SLO)$/unomtabl.obj \
$(SLO)$/unodtabl.obj \
$(SLO)$/gluepts.obj \
- $(SLO)$/recoveryui.obj \
- $(SLO)$/tableshape.obj
+ $(SLO)$/tableshape.obj \
+ $(SLO)$/shapepropertynotifier.obj
+
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/UnoNamespaceMap.obj \
+ $(SLO)$/unopool.obj \
+ $(SLO)$/unoctabl.obj \
+ $(SLO)$/unoshcol.obj \
+ $(SLO)$/recoveryui.obj
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
SRS1NAME=unodraw
SRC1FILES = \
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index efbcb07dab7d..131bb087f118 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -53,8 +53,8 @@ class SvxPluginShape : public SvxOle2Shape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxPluginShape( SdrObject* pObj ) throw();
@@ -63,7 +63,7 @@ public:
virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
};
/***********************************************************************
@@ -74,8 +74,8 @@ class SvxAppletShape : public SvxOle2Shape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxAppletShape( SdrObject* pObj ) throw();
@@ -84,7 +84,7 @@ public:
virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
};
/***********************************************************************
@@ -95,8 +95,8 @@ class SvxFrameShape : public SvxOle2Shape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxFrameShape( SdrObject* pObj ) throw();
@@ -115,8 +115,8 @@ class SvxTableShape : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void lock();
virtual void unlock();
diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx
new file mode 100644
index 000000000000..5e6cb2345765
--- /dev/null
+++ b/svx/source/unodraw/shapepropertynotifier.cxx
@@ -0,0 +1,206 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include "svx/shapepropertynotifier.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/XPropertySet.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/stl_types.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/weak.hxx>
+#include <tools/diagnose_ex.h>
+
+#include <hash_map>
+
+namespace
+{
+
+ struct ShapePropertyHash
+ {
+ size_t operator()( ::svx::ShapeProperty __x ) const
+ {
+ return size_t( __x );
+ }
+ };
+}
+
+//........................................................................
+namespace svx
+{
+//........................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::beans::PropertyChangeEvent;
+ using ::com::sun::star::beans::XPropertyChangeListener;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::beans::XPropertySet;
+ /** === end UNO using === **/
+
+ typedef ::std::hash_map< ShapeProperty, PPropertyValueProvider, ShapePropertyHash > PropertyProviders;
+
+ typedef ::cppu::OMultiTypeInterfaceContainerHelperVar < ::rtl::OUString
+ , ::comphelper::UStringHash
+ , ::comphelper::UStringEqual
+ > PropertyChangeListenerContainer;
+
+ //====================================================================
+ //= IPropertyValueProvider
+ //====================================================================
+ IPropertyValueProvider::~IPropertyValueProvider()
+ {
+ }
+
+ //====================================================================
+ //= PropertyChangeNotifier_Data
+ //====================================================================
+ struct PropertyChangeNotifier_Data
+ {
+ ::cppu::OWeakObject& m_rContext;
+ PropertyProviders m_aProviders;
+ PropertyChangeListenerContainer m_aPropertyChangeListeners;
+
+ PropertyChangeNotifier_Data( ::cppu::OWeakObject& _rContext, ::osl::Mutex& _rMutex )
+ :m_rContext( _rContext )
+ ,m_aPropertyChangeListeners( _rMutex )
+ {
+ }
+ };
+ //====================================================================
+ //= PropertyValueProvider
+ //====================================================================
+ //--------------------------------------------------------------------
+ ::rtl::OUString PropertyValueProvider::getPropertyName() const
+ {
+ return m_sPropertyName;
+ }
+
+ //--------------------------------------------------------------------
+ void PropertyValueProvider::getCurrentValue( Any& _out_rValue ) const
+ {
+ Reference< XPropertySet > xContextProps( const_cast< PropertyValueProvider* >( this )->m_rContext, UNO_QUERY_THROW );
+ _out_rValue = xContextProps->getPropertyValue( getPropertyName() );
+ }
+
+ //====================================================================
+ //= PropertyChangeNotifier
+ //====================================================================
+ //--------------------------------------------------------------------
+ PropertyChangeNotifier::PropertyChangeNotifier( ::cppu::OWeakObject& _rOwner, ::osl::Mutex& _rMutex )
+ :m_pData( new PropertyChangeNotifier_Data( _rOwner, _rMutex ) )
+ {
+ }
+
+ //--------------------------------------------------------------------
+ PropertyChangeNotifier::~PropertyChangeNotifier()
+ {
+ }
+
+ //--------------------------------------------------------------------
+ void PropertyChangeNotifier::registerProvider( const ShapeProperty _eProperty, const PPropertyValueProvider _pProvider )
+ {
+ ENSURE_OR_THROW( _eProperty != eInvalidShapeProperty, "Illegal ShapeProperty value!" );
+ ENSURE_OR_THROW( !!_pProvider, "NULL factory not allowed." );
+
+ OSL_ENSURE( m_pData->m_aProviders.find( _eProperty ) == m_pData->m_aProviders.end(),
+ "PropertyChangeNotifier::registerProvider: factory for this ID already present!" );
+
+ m_pData->m_aProviders[ _eProperty ] = _pProvider;
+ }
+
+ //--------------------------------------------------------------------
+ void PropertyChangeNotifier::notifyPropertyChange( const ShapeProperty _eProperty ) const
+ {
+ ENSURE_OR_THROW( _eProperty != eInvalidShapeProperty, "Illegal ShapeProperty value!" );
+
+ PropertyProviders::const_iterator provPos = m_pData->m_aProviders.find( _eProperty );
+ OSL_ENSURE( provPos != m_pData->m_aProviders.end(), "PropertyChangeNotifier::notifyPropertyChange: no factory!" );
+ if ( provPos == m_pData->m_aProviders.end() )
+ return;
+
+ ::rtl::OUString sPropertyName( provPos->second->getPropertyName() );
+
+ ::cppu::OInterfaceContainerHelper* pPropListeners = m_pData->m_aPropertyChangeListeners.getContainer( sPropertyName );
+ ::cppu::OInterfaceContainerHelper* pAllListeners = m_pData->m_aPropertyChangeListeners.getContainer( ::rtl::OUString() );
+ if ( !pPropListeners && !pAllListeners )
+ return;
+
+ try
+ {
+ PropertyChangeEvent aEvent;
+ aEvent.Source = m_pData->m_rContext;
+ // Handle/OldValue not supported
+ aEvent.PropertyName = provPos->second->getPropertyName();
+ provPos->second->getCurrentValue( aEvent.NewValue );
+
+ if ( pPropListeners )
+ pPropListeners->notifyEach( &XPropertyChangeListener::propertyChange, aEvent );
+ if ( pAllListeners )
+ pAllListeners->notifyEach( &XPropertyChangeListener::propertyChange, aEvent );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ void PropertyChangeNotifier::addPropertyChangeListener( const ::rtl::OUString& _rPropertyName, const Reference< XPropertyChangeListener >& _rxListener )
+ {
+ m_pData->m_aPropertyChangeListeners.addInterface( _rPropertyName, _rxListener );
+ }
+
+ //--------------------------------------------------------------------
+ void PropertyChangeNotifier::removePropertyChangeListener( const ::rtl::OUString& _rPropertyName, const Reference< XPropertyChangeListener >& _rxListener )
+ {
+ m_pData->m_aPropertyChangeListeners.removeInterface( _rPropertyName, _rxListener );
+ }
+
+ //--------------------------------------------------------------------
+ void PropertyChangeNotifier::disposing()
+ {
+ EventObject aEvent;
+ aEvent.Source = m_pData->m_rContext;
+ m_pData->m_aPropertyChangeListeners.disposeAndClear( aEvent );
+ }
+
+//........................................................................
+} // namespace svx
+//........................................................................
diff --git a/svx/source/unodraw/tableshape.cxx b/svx/source/unodraw/tableshape.cxx
index 4d892e6533da..f0cf9e549409 100644
--- a/svx/source/unodraw/tableshape.cxx
+++ b/svx/source/unodraw/tableshape.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
SvxTableShape::SvxTableShape( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_TABLE) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_TABLE), aSvxMapProvider.GetPropertySet(SVXMAP_TABLE) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TableShape" ) ) );
}
@@ -62,7 +62,11 @@ SvxTableShape::~SvxTableShape() throw()
//----------------------------------------------------------------------
-bool SvxTableShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxTableShape::setPropertyValueImpl(
+ const ::rtl::OUString& rName,
+ const SfxItemPropertySimpleEntry* pProperty,
+ const ::com::sun::star::uno::Any& rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -106,14 +110,18 @@ bool SvxTableShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
}
default:
{
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
}
extern Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector );
-bool SvxTableShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxTableShape::getPropertyValueImpl(
+ const ::rtl::OUString& rName,
+ const SfxItemPropertySimpleEntry* pProperty,
+ ::com::sun::star::uno::Any& rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -168,7 +176,7 @@ bool SvxTableShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
}
default:
{
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
}
diff --git a/svx/source/unodraw/unoipset.cxx b/svx/source/unodraw/unoipset.cxx
index dcd654961ced..36c7139bd3ad 100644
--- a/svx/source/unodraw/unoipset.cxx
+++ b/svx/source/unodraw/unoipset.cxx
@@ -54,176 +54,11 @@ using namespace ::rtl;
//----------------------------------------------------------------------
-struct SfxItemPropertyMapHash
+struct SfxItemPropertyMapEntryHash
{
- size_t operator()(const SfxItemPropertyMap* pMap) const { return (size_t)pMap; }
+ size_t operator()(const SfxItemPropertyMapEntry* pMap) const { return (size_t)pMap; }
};
-class SvxInfoSetCache;
-
-class SvxCachedItemPropertySetInfo : public SfxItemPropertySetInfo
-{
-private:
- SvxInfoSetCache* mpCache;
-
-public:
- SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache );
- virtual void SAL_CALL release() throw ();
-};
-
-/** this class caches the created XPropertySetInfo objects for each different
- SfxItemPropertyMap pointer. This class can't be used with dynamicly created
- SfxItemPropertyMaps!
-*/
-
-class SvxInfoSetCache
-{
-private:
- typedef std::hash_map< const SfxItemPropertyMap*, uno::Reference< beans::XPropertySetInfo >, SfxItemPropertyMapHash > InfoMap;
- typedef std::hash_map< const SfxItemPropertyMap*, const SfxItemPropertyMap*, SfxItemPropertyMapHash > PropertyMap;
-
- InfoMap maInfoMap;
- PropertyMap maPropertyMap;
-
- static ::osl::Mutex maMutex;
- static SvxInfoSetCache* mpGlobalCache;
-
- SvxInfoSetCache() {};
- ~SvxInfoSetCache() {};
-public:
- static uno::Reference< beans::XPropertySetInfo > getCachedPropertySetInfo( const SfxItemPropertyMap* pMap );
- static const SfxItemPropertyMap* getSortedPropertyMap( const SfxItemPropertyMap* pMap );
-
- void dispose( SvxCachedItemPropertySetInfo* pInfo );
-};
-
-SvxCachedItemPropertySetInfo::SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache )
-: SfxItemPropertySetInfo( pMap ), mpCache( pCache )
-{
-}
-
-void SAL_CALL SvxCachedItemPropertySetInfo::release() throw ()
-{
- SvxInfoSetCache* pCache = mpCache;
- if( pCache && m_refCount == 2 )
- {
- mpCache = NULL;
- pCache->dispose( this );
- }
- SfxItemPropertySetInfo::release();
-}
-
-::osl::Mutex SvxInfoSetCache::maMutex;
-SvxInfoSetCache* SvxInfoSetCache::mpGlobalCache = NULL;
-
-uno::Reference< beans::XPropertySetInfo > SvxInfoSetCache::getCachedPropertySetInfo( const SfxItemPropertyMap* pMap )
-{
- ::osl::MutexGuard aGuard(maMutex);
-
- if( NULL == mpGlobalCache )
- mpGlobalCache = new SvxInfoSetCache();
-
- InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pMap));
- if (aIt != mpGlobalCache->maInfoMap.end())
- return aIt->second.get();
-
- uno::Reference< beans::XPropertySetInfo > xInfo( new SvxCachedItemPropertySetInfo( pMap, mpGlobalCache ) );
- mpGlobalCache->maInfoMap.insert(InfoMap::value_type(pMap,xInfo));
-
- /* if this assertion is triggered this class is possible used with dynamicly created
- SfxItemPropertyMap pointers. This will cause a cache overflow as the current
- implementation is designed for a limited number of different SfxItemPropertyMap
- pointers */
- DBG_ASSERT( mpGlobalCache->maInfoMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" );
-
- return xInfo;
-}
-
-/** removes a cached property set info from the cache. This is called by the property set
- info when its refcount goes to 1, meaning the cache holds the last reference to the
- info
-*/
-void SvxInfoSetCache::dispose( SvxCachedItemPropertySetInfo* pInfo )
-{
- if( pInfo )
- {
- ::osl::MutexGuard aGuard(maMutex);
-
- InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pInfo->getMap()));
- if (aIt != mpGlobalCache->maInfoMap.end())
- {
- mpGlobalCache->maInfoMap.erase( aIt );
- }
- }
-}
-
-inline bool greater_size_pmap( const SfxItemPropertyMap* pFirst,
- const SfxItemPropertyMap* pSecond )
-{
- return strcmp( pFirst->pName, pSecond->pName ) < 0;
-}
-
-
-const SfxItemPropertyMap* SvxInfoSetCache::getSortedPropertyMap( const SfxItemPropertyMap* pMap )
-{
- ::osl::MutexGuard aGuard(maMutex);
-
- if( NULL == mpGlobalCache )
- mpGlobalCache = new SvxInfoSetCache();
-
- const SfxItemPropertyMap* pSortedMap = NULL;
- PropertyMap::iterator aIt( mpGlobalCache->maPropertyMap.find(pMap) );
- if (aIt != mpGlobalCache->maPropertyMap.end())
- pSortedMap = aIt->second;
-
- if( NULL == pSortedMap )
- {
- // count the entries in the map
- std::vector< const SfxItemPropertyMap * >::size_type nCount = 0;
- const SfxItemPropertyMap* pTempMap = pMap;
- while( pTempMap->pName )
- {
- pTempMap++;
- nCount++;
- }
-
- // fill a stl vector with the entry pointers
- std::vector< const SfxItemPropertyMap * > aMap( nCount );
- std::vector< const SfxItemPropertyMap * >::iterator aIter( aMap.begin() );
-
- pTempMap = pMap;
- while( pTempMap->pName )
- *aIter++ = pTempMap++;
-
- // sort the vector
- std::sort( aMap.begin(), aMap.end(), greater_size_pmap );
-
- // create a new map
- pSortedMap = new SfxItemPropertyMap[nCount+1];
- pTempMap = pSortedMap;
-
- // copy the sorted entries to a new map
- aIter = aMap.begin();
- while( aIter != aMap.end() )
- {
- memcpy( (void*)pTempMap, *aIter++, sizeof( SfxItemPropertyMap ) );
- pTempMap++;
- }
-
- ((SfxItemPropertyMap*)pTempMap)->pName = NULL;
-
- mpGlobalCache->maPropertyMap[pMap] = pSortedMap;
-
- /* if this assertion is triggered this class is possible used with dynamicly created
- SfxItemPropertyMap pointers. This will cause a cache overflow as the current
- implementation is designed for a limited number of different SfxItemPropertyMap
- pointers */
- DBG_ASSERT( mpGlobalCache->maPropertyMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" );
- }
-
- return pSortedMap;
-}
-
//----------------------------------------------------------------------
struct SvxIDPropertyCombine
@@ -234,10 +69,10 @@ struct SvxIDPropertyCombine
DECLARE_LIST( SvxIDPropertyCombineList, SvxIDPropertyCombine * )
-SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMap* pMap, sal_Bool bConvertTwips )
-: _pMap(SvxInfoSetCache::getSortedPropertyMap(pMap)), mbConvertTwips(bConvertTwips)
+SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, sal_Bool bConvertTwips )
+: m_aPropertyMap( pMap ),
+ _pMap(pMap), mbConvertTwips(bConvertTwips)
{
- mpLastMap = NULL;
pCombiList = NULL;
}
@@ -285,55 +120,46 @@ void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID)
}
//----------------------------------------------------------------------
-void SvxItemPropertySet::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet,
- SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet )
+void SvxItemPropertySet::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet,
+ SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet ) const
{
if(rPropSet.AreThereOwnUsrAnys())
{
const SfxItemPropertyMap* pSrc = rPropSet.getPropertyMap();
- const SfxItemPropertyMap* pDst = _pMap;
- while(pSrc->pName)
+ PropertyEntryVector_t aSrcPropVector = pSrc->getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aSrcIt = aSrcPropVector.begin();
+ while(aSrcIt != aSrcPropVector.end())
{
- if(pSrc->nWID)
+ if(aSrcIt->nWID)
{
- uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(pSrc->nWID);
+ uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(aSrcIt->nWID);
if(pUsrAny)
{
// Aequivalenten Eintrag in pDst suchen
- const SfxItemPropertyMap* pTmp = pDst;
- int nDiff = strcmp( pSrc->pName, pTmp->pName );
- while(nDiff > 0)
- {
- pTmp++;
- nDiff = strcmp( pSrc->pName, pTmp->pName );
- }
-
- if(nDiff == 0)
+ const SfxItemPropertySimpleEntry* pEntry = m_aPropertyMap.getByName( aSrcIt->sName );
+ if(pEntry)
{
- // Eintrag gefunden
- pDst = pTmp;
-
- if(pDst->nWID >= OWN_ATTR_VALUE_START && pDst->nWID <= OWN_ATTR_VALUE_END)
+ // entry found
+ if(pEntry->nWID >= OWN_ATTR_VALUE_START && pEntry->nWID <= OWN_ATTR_VALUE_END)
{
// Special ID im PropertySet, kann nur direkt am
// Objekt gesetzt werden+
- OUString aName( OUString::createFromAscii( pDst->pName ) );
- xSet->setPropertyValue( aName, *pUsrAny);
+ xSet->setPropertyValue( aSrcIt->sName, *pUsrAny);
}
else
{
- if(rSet.GetPool()->IsWhich(pDst->nWID))
- rSet.Put(rSet.GetPool()->GetDefaultItem(pDst->nWID));
+ if(rSet.GetPool()->IsWhich(pEntry->nWID))
+ rSet.Put(rSet.GetPool()->GetDefaultItem(pEntry->nWID));
// setzen
- setPropertyValue(pDst, *pUsrAny, rSet);
+ setPropertyValue(pEntry, *pUsrAny, rSet);
}
}
}
}
- // Naechster Eintrag
- pSrc++;
+ // next entry
+ ++aSrcIt;
}
}
}
@@ -363,7 +189,7 @@ sal_Bool SvxUnoCheckForConversion( const SfxItemSet&, sal_Int32 nWID, const uno:
}
//----------------------------------------------------------------------
-uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, const SfxItemSet& rSet ) const
+uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) const
{
uno::Any aVal;
if(!pMap || !pMap->nWID)
@@ -419,7 +245,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, c
}
//----------------------------------------------------------------------
-void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const
+void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const
{
if(!pMap || !pMap->nWID)
return;
@@ -475,7 +301,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const
}
//----------------------------------------------------------------------
-uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap ) const
+uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const
{
// Schon ein Wert eingetragen? Dann schnell fertig
uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID);
@@ -535,7 +361,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap )
//----------------------------------------------------------------------
-void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal ) const
+void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal ) const
{
uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID);
if(!pUsrAny)
@@ -546,46 +372,18 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const
//----------------------------------------------------------------------
-const SfxItemPropertyMap* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const
+const SfxItemPropertySimpleEntry* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const
{
- const SfxItemPropertyMap* pMap = mpLastMap ? mpLastMap : _pMap;
- while ( pMap->pName )
- {
- if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) )
- {
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1;
- if( NULL == mpLastMap->pName )
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL;
-
- return pMap;
- }
- ++pMap;
- }
-
- if( mpLastMap == NULL )
- return 0;
-
- pMap = _pMap;
- while ( pMap->pName && (_pMap != mpLastMap) )
- {
- if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) )
- {
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1;
- if( NULL == mpLastMap->pName )
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL;
- return pMap;
- }
- ++pMap;
- }
-
- return 0;
-}
+ return m_aPropertyMap.getByName( rName );
+ }
//----------------------------------------------------------------------
uno::Reference< beans::XPropertySetInfo > SvxItemPropertySet::getPropertySetInfo() const
{
- return SvxInfoSetCache::getCachedPropertySetInfo( _pMap );
+ if( !m_xInfo.is() )
+ m_xInfo = new SfxItemPropertySetInfo( &m_aPropertyMap );
+ return m_xInfo;
}
//----------------------------------------------------------------------
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index fdac6b7a9c1a..c0e301f3792e 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -215,9 +215,14 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField(
{
uno::Reference< uno::XInterface > xRet;
- const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
+ const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.textfield.") );
- if( ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0 )
+ // #i93308# up to OOo 3.2 we used this wrong namespace name with the capital T & F. This is
+ // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation.
+ const OUString aTextFieldPrexit2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
+
+ if( (ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0) ||
+ (ServiceSpecifier.compareTo( aTextFieldPrexit2, aTextFieldPrexit2.getLength() ) == 0) )
{
OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) );
@@ -247,7 +252,10 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField(
{
nId = ID_EXT_FILEFIELD;
}
- else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
+ else if (aFieldType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("docinfo.Title") ) ||
+ aFieldType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
{
nId = ID_FILEFIELD;
}
diff --git a/svx/source/unodraw/unonrule.cxx b/svx/source/unodraw/unonrule.cxx
index da20980e34db..7947cde7e790 100644
--- a/svx/source/unodraw/unonrule.cxx
+++ b/svx/source/unodraw/unonrule.cxx
@@ -50,7 +50,7 @@
#include <vos/mutex.hxx>
#include <vcl/graph.hxx>
-#include <unotools/servicehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <toolkit/unohlp.hxx>
#include <rtl/uuid.h>
#include <rtl/memory.h>
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 8690fa97c0bf..3c47dadf7b0c 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -79,8 +79,6 @@ using namespace ::com::sun::star::drawing;
DECLARE_LIST( SvxDrawPageList, SvxDrawPage * )
-extern SfxItemPropertyMap* ImplGetSvxOle2PropertyMap();
-extern SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap();
/**********************************************************************
* class SvxDrawPage *
@@ -828,7 +826,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
}
if( pRet == NULL )
{
- pRet = new SvxOle2Shape( pObj, ImplGetSvxOle2PropertyMap() );
+ pRet = new SvxOle2Shape( pObj, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2) );
}
}
break;
@@ -842,7 +840,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PATHPLIN );
break;
case OBJ_PAGE:
- pRet = new SvxShape( pObj, ImplGetSvxPageShapePropertyMap() );
+ pRet = new SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_PAGE), aSvxMapProvider.GetPropertySet(SVXMAP_PAGE) );
break;
case OBJ_MEASURE:
pRet = new SvxShapeDimensioning( pObj );
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index a897b486b5e3..914d46f48e28 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -64,9 +64,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::beans::PropertyAttribute;
using ::com::sun::star::drawing::TextVerticalAdjust;
-SfxItemPropertyMap* ImplGetSvxShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxShapePropertyMap()
{
- static SfxItemPropertyMap aShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aShapePropertyMap_Impl[] =
{
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
@@ -89,9 +89,9 @@ SfxItemPropertyMap* ImplGetSvxShapePropertyMap()
return aShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxTextShapePropertyMap()
{
- static SfxItemPropertyMap aTextShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aTextShapePropertyMap_Impl[] =
{
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
@@ -114,9 +114,9 @@ SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap()
return aTextShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxConnectorPropertyMap()
{
- static SfxItemPropertyMap aConnectorPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aConnectorPropertyMap_Impl[] =
{
SPECIAL_CONNECTOR_PROPERTIES
EDGERADIUS_PROPERTIES
@@ -139,9 +139,9 @@ SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap()
return aConnectorPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxDimensioningPropertyMap()
{
- static SfxItemPropertyMap aDimensioningPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDimensioningPropertyMap_Impl[] =
{
SPECIAL_DIMENSIONING_PROPERTIES
EDGERADIUS_PROPERTIES
@@ -164,9 +164,9 @@ SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap()
return aDimensioningPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxCirclePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxCirclePropertyMap()
{
- static SfxItemPropertyMap aCirclePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCirclePropertyMap_Impl[] =
{
SPECIAL_CIRCLE_PROPERTIES
EDGERADIUS_PROPERTIES
@@ -190,9 +190,9 @@ SfxItemPropertyMap* ImplGetSvxCirclePropertyMap()
return aCirclePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonPropertyMap()
{
- static SfxItemPropertyMap aPolyPolygonPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPolyPolygonPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0 },
SPECIAL_POLYGON_PROPERTIES
@@ -217,9 +217,9 @@ SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap()
return aPolyPolygonPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonBezierPropertyMap()
{
- static SfxItemPropertyMap aPolyPolygonBezierPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPolyPolygonBezierPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0 },
SPECIAL_POLYGON_PROPERTIES
@@ -244,9 +244,9 @@ SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap()
return aPolyPolygonBezierPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxGraphicObjectPropertyMap()
{
- static SfxItemPropertyMap aGraphicObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aGraphicObjectPropertyMap_Impl[] =
{
SPECIAL_GRAPHOBJ_PROPERTIES
@@ -273,9 +273,9 @@ SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap()
return aGraphicObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DSceneObjectPropertyMap()
{
- static SfxItemPropertyMap a3DSceneObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DSceneObjectPropertyMap_Impl[] =
{
SPECIAL_3DSCENEOBJECT_PROPERTIES
FILL_PROPERTIES
@@ -292,9 +292,9 @@ SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap()
return a3DSceneObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DCubeObjectPropertyMap()
{
- static SfxItemPropertyMap a3DCubeObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DCubeObjectPropertyMap_Impl[] =
{
SPECIAL_3DCUBEOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
@@ -314,9 +314,9 @@ SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap()
return a3DCubeObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DSphereObjectPropertyMap()
{
- static SfxItemPropertyMap a3DSphereObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DSphereObjectPropertyMap_Impl[] =
{
SPECIAL_3DSPHEREOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
@@ -335,9 +335,9 @@ SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap()
return a3DSphereObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DLatheObjectPropertyMap()
{
- static SfxItemPropertyMap a3DLatheObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DLatheObjectPropertyMap_Impl[] =
{
SPECIAL_3DLATHEOBJECT_PROPERTIES
@@ -362,9 +362,9 @@ SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap()
return a3DLatheObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DExtrudeObjectPropertyMap()
{
- static SfxItemPropertyMap a3DExtrudeObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DExtrudeObjectPropertyMap_Impl[] =
{
SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
@@ -389,9 +389,9 @@ SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap()
return a3DExtrudeObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DPolygonObjectPropertyMap()
{
- static SfxItemPropertyMap a3DPolygonObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DPolygonObjectPropertyMap_Impl[] =
{
SPECIAL_3DPOLYGONOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
@@ -411,9 +411,9 @@ SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap()
return a3DPolygonObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxAllPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxAllPropertyMap()
{
- static SfxItemPropertyMap aAllPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAllPropertyMap_Impl[] =
{
SHADOW_PROPERTIES
LINE_PROPERTIES
@@ -455,9 +455,9 @@ SfxItemPropertyMap* ImplGetSvxAllPropertyMap()
return aAllPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxGroupPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxGroupPropertyMap()
{
- static SfxItemPropertyMap aGroupPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aGroupPropertyMap_Impl[] =
{
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
@@ -469,9 +469,9 @@ SfxItemPropertyMap* ImplGetSvxGroupPropertyMap()
return aGroupPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxOle2PropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap()
{
- static SfxItemPropertyMap aOle2PropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aOle2PropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
@@ -504,9 +504,9 @@ SfxItemPropertyMap* ImplGetSvxOle2PropertyMap()
return aOle2PropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPluginPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPluginPropertyMap()
{
- static SfxItemPropertyMap aPluginPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
@@ -535,10 +535,10 @@ SfxItemPropertyMap* ImplGetSvxPluginPropertyMap()
return aPluginPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxFramePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxFramePropertyMap()
{
//TODO/LATER: new properties for ScrollingMode and DefaultBorder
- static SfxItemPropertyMap aFramePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aFramePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
@@ -570,9 +570,9 @@ SfxItemPropertyMap* ImplGetSvxFramePropertyMap()
return aFramePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxAppletPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxAppletPropertyMap()
{
- static SfxItemPropertyMap aAppletPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
@@ -604,9 +604,9 @@ SfxItemPropertyMap* ImplGetSvxAppletPropertyMap()
return aAppletPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap()
{
- static SfxItemPropertyMap aControlPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aControlPropertyMap_Impl[] =
{
// the following properties are mapped to the XControl Model of this shape
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
@@ -655,9 +655,9 @@ SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap()
return aControlPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPageShapePropertyMap()
{
- static SfxItemPropertyMap aPageShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPageShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER , &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
@@ -679,9 +679,9 @@ SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap()
return aPageShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxCaptionPropertyMap()
{
- static SfxItemPropertyMap aCaptionPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCaptionPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT, &::getCppuType((const com::sun::star::awt::Point*)0), 0, 0 },
{ MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -714,9 +714,9 @@ SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap()
return aCaptionPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxCustomShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxCustomShapePropertyMap()
{
- static SfxItemPropertyMap aCustomShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCustomShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
{ MAP_CHAR_LEN("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
@@ -739,9 +739,9 @@ SfxItemPropertyMap* ImplGetSvxCustomShapePropertyMap()
return aCustomShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxMediaShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxMediaShapePropertyMap()
{
- static SfxItemPropertyMap aMediaShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aMediaShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -768,9 +768,9 @@ SfxItemPropertyMap* ImplGetSvxMediaShapePropertyMap()
return aMediaShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxTableShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxTableShapePropertyMap()
{
- static SfxItemPropertyMap aTableShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aTableShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -931,8 +931,8 @@ int
#endif
Svx_CompareMap(const void* pSmaller, const void* pBigger )
{
- int nDiff = strcmp( ((const SfxItemPropertyMap*)pSmaller)->pName,
- ((const SfxItemPropertyMap*)pBigger)->pName );
+ int nDiff = strcmp( ((const SfxItemPropertyMapEntry*)pSmaller)->pName,
+ ((const SfxItemPropertyMapEntry*)pBigger)->pName );
return nDiff;
}
@@ -940,22 +940,32 @@ Svx_CompareMap(const void* pSmaller, const void* pBigger )
SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
{
- for(UINT16 i=0;i<SVXMAP_END;aMapArr[i++]=NULL) ;
+ for(UINT16 i=0;i<SVXMAP_END; i++)
+ {
+ aSetArr[i] = 0;
+ aMapArr[i] = 0;
+ }
+}
+
+SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
+{
+ for(UINT16 i=0;i<SVXMAP_END; i++)
+ delete aSetArr[i];
}
// ---------------------------------------------------------------------
-void SvxUnoPropertyMapProvider::Sort(USHORT nId)
+/*void SvxUnoPropertyMapProvider::Sort(USHORT nId)
{
- SfxItemPropertyMap* pTemp = aMapArr[nId];
+ SfxItemPropertyMapEntry* pTemp = aMapArr[nId];
UINT16 i = 0;
while(pTemp[i].pName) { i++; }
- qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMap), Svx_CompareMap);
-}
+ qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMapEntry), Svx_CompareMap);
+}*/
// ---------------------------------------------------------------------
-SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
+const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
{
DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" );
if(!aMapArr[nPropertyId]) {
@@ -985,14 +995,21 @@ SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break;
case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break;
case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break;
+ case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break;
default:
DBG_ERROR( "Unknown property map for SvxUnoPropertyMapProvider!" );
}
- Sort(nPropertyId);
+// Sort(nPropertyId);
}
return aMapArr[nPropertyId];
}
+const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(UINT16 nPropertyId)
+{
+ if( !aSetArr[nPropertyId] )
+ aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ) );
+ return aSetArr[nPropertyId];
+}
// #####################################################################
@@ -1219,20 +1236,20 @@ bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResI
return TRUE;
}
-sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName )
+/*sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName )
{
sal_Int16 nWhich = 0;
- const SfxItemPropertyMap* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE );
+ const SfxItemPropertyMapEntry* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE );
if( pMap )
{
- const SfxItemPropertyMap* pFound = SfxItemPropertyMap::GetByName( pMap, rPropName );
+ const SfxItemPropertyMapEntry* pFound = SfxItemPropertyMapEntry::getByName( pMap, rPropName );
if( pFound )
nWhich = pFound->nWID;
}
return nWhich;
-}
+} */
bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, String& rString ) throw()
{
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 654318630069..d6d0913c4070 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -65,6 +65,7 @@
#include "shapeimpl.hxx"
#include "svx/unoshprp.hxx"
#include <svx/svdoashp.hxx>
+#include "unopolyhelper.hxx"
// #i29181#
#include "svdviter.hxx"
@@ -100,7 +101,7 @@ sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetSt
***********************************************************************/
SvxShapeGroup::SvxShapeGroup( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw() :
- SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP) ),
+ SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP), aSvxMapProvider.GetPropertySet(SVXMAP_GROUP) ),
mxPage( pDrawPage )
{
}
@@ -111,7 +112,7 @@ SvxShapeGroup::~SvxShapeGroup() throw()
}
//----------------------------------------------------------------------
-void SvxShapeGroup::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+void SvxShapeGroup::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
SvxShape::Create( pNewObj, pNewPage );
mxPage = pNewPage;
@@ -383,7 +384,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeGroup::getSupportedServiceNames()
***********************************************************************/
SvxShapeConnector::SvxShapeConnector( SdrObject* pObj ) throw() :
- SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR) )
+ SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR), aSvxMapProvider.GetPropertySet(SVXMAP_CONNECTOR) )
{
}
@@ -550,7 +551,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeConnector::getSupportedServiceNames()
DBG_NAME(SvxShapeControl)
SvxShapeControl::SvxShapeControl( SdrObject* pObj ) throw() :
- SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL) )
+ SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL), aSvxMapProvider.GetPropertySet(SVXMAP_CONTROL) )
{
DBG_CTOR(SvxShapeControl,NULL);
setShapeKind( OBJ_UNO );
@@ -1013,7 +1014,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const ::rtl::OUString& aP
//----------------------------------------------------------------------
SvxShapeDimensioning::SvxShapeDimensioning( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING), aSvxMapProvider.GetPropertySet(SVXMAP_DIMENSIONING) )
{
}
@@ -1034,7 +1035,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeDimensioning::getSupportedServiceName
//----------------------------------------------------------------------
SvxShapeCircle::SvxShapeCircle( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE), aSvxMapProvider.GetPropertySet(SVXMAP_CIRCLE) )
{
}
@@ -1059,7 +1060,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCircle::getSupportedServiceNames() th
//----------------------------------------------------------------------
SvxShapePolyPolygon::SvxShapePolyPolygon( SdrObject* pObj , drawing::PolygonKind eNew )
throw( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException)
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON), aSvxMapProvider.GetPropertySet(SVXMAP_POLYPOLYGON) )
, mePolygonKind( eNew )
{
}
@@ -1103,7 +1104,7 @@ basegfx::B2DPolyPolygon SAL_CALL ImplSvxPointSequenceSequenceToB2DPolyPolygon( c
//----------------------------------------------------------------------
-bool SvxShapePolyPolygon::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygon::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1163,7 +1164,7 @@ bool SvxShapePolyPolygon::setPropertyValueImpl( const SfxItemPropertyMap* pPrope
break;
}
default:
- return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
throw lang::IllegalArgumentException();
@@ -1213,7 +1214,7 @@ void SAL_CALL B2DPolyPolygonToSvxPointSequenceSequence( const basegfx::B2DPolyPo
//----------------------------------------------------------------------
-bool SvxShapePolyPolygon::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygon::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1277,7 +1278,7 @@ bool SvxShapePolyPolygon::getPropertyValueImpl( const SfxItemPropertyMap* pPrope
break;
}
default:
- return SvxShapeText::getPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -1326,7 +1327,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygon::getSupportedServiceNames
#include <com/sun/star/drawing/FlagSequence.hpp>
//----------------------------------------------------------------------
SvxShapePolyPolygonBezier::SvxShapePolyPolygonBezier( SdrObject* pObj , drawing::PolygonKind eNew ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER), aSvxMapProvider.GetPropertySet(SVXMAP_POLYPOLYGONBEZIER) )
, mePolygonKind( eNew )
{
}
@@ -1464,7 +1465,7 @@ basegfx::B2DPolyPolygon SvxConvertPolyPolygonBezierToB2DPolyPolygon(const drawin
//----------------------------------------------------------------------
-bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1496,7 +1497,7 @@ bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const SfxItemPropertyMap*
break;
}
default:
- return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -1542,7 +1543,7 @@ void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon&
//----------------------------------------------------------------------
-bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1574,7 +1575,7 @@ bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const SfxItemPropertyMap*
break;
}
default:
- return SvxShapeText::getPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
}
@@ -1634,7 +1635,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic
//----------------------------------------------------------------------
SvxGraphicObject::SvxGraphicObject( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_GRAPHICOBJECT) )
{
}
@@ -1645,7 +1646,7 @@ SvxGraphicObject::~SvxGraphicObject() throw()
//----------------------------------------------------------------------
-bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxGraphicObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
bool bOk = false;
switch( pProperty->nWID )
@@ -1786,7 +1787,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
if( !bOk )
@@ -1800,7 +1801,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
//----------------------------------------------------------------------
-bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1833,7 +1834,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
}
else
{
- const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject();
+ const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject(true);
OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
aURL += OUString::createFromAscii( rGrafObj.GetUniqueID().GetBuffer() );
rValue <<= aURL;
@@ -1862,7 +1863,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShapeText::getPropertyValueImpl(pProperty,rValue);
+ return SvxShapeText::getPropertyValueImpl(rName, pProperty,rValue);
}
return true;
@@ -1871,7 +1872,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
///////////////////////////////////////////////////////////////////////
SvxShapeCaption::SvxShapeCaption( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION), aSvxMapProvider.GetPropertySet(SVXMAP_CAPTION) )
{
}
@@ -1884,7 +1885,7 @@ SvxShapeCaption::~SvxShapeCaption() throw()
***********************************************************************/
SvxCustomShape::SvxCustomShape( SdrObject* pObj ) throw() :
- SvxShapeText( pObj, aSvxMapProvider.GetMap( SVXMAP_CUSTOMSHAPE ) )
+ SvxShapeText( pObj, aSvxMapProvider.GetMap( SVXMAP_CUSTOMSHAPE ), aSvxMapProvider.GetPropertySet(SVXMAP_CUSTOMSHAPE) )
{
}
@@ -1895,7 +1896,7 @@ SvxCustomShape::~SvxCustomShape() throw()
//----------------------------------------------------------------------
-void SvxCustomShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+void SvxCustomShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
SvxShapeText::Create( pNewObj, pNewPage );
}
@@ -2125,7 +2126,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c
}
}
-bool SvxCustomShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxCustomShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -2137,7 +2138,7 @@ bool SvxCustomShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
return true;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
//----------------------------------------------------------------------
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 3792e98641e1..f7826c546d60 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star::container;
//----------------------------------------------------------------------
Svx3DSceneObject::Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DSCENEOBJECT) )
, mxPage( pDrawPage )
{
}
@@ -92,7 +92,7 @@ Svx3DSceneObject::~Svx3DSceneObject() throw()
}
//----------------------------------------------------------------------
-void Svx3DSceneObject::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+void Svx3DSceneObject::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
SvxShape::Create( pNewObj, pNewPage );
mxPage = pNewPage;
@@ -334,7 +334,7 @@ struct ImpRememberTransAndRect
Rectangle maRect;
};
-bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSceneObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -438,7 +438,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::setPropertyValueImpl(pProperty, rValue);
+ return SvxShape::setPropertyValueImpl(rName, pProperty, rValue);
}
throw IllegalArgumentException();
@@ -446,7 +446,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
//----------------------------------------------------------------------
-bool Svx3DSceneObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSceneObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -483,7 +483,7 @@ bool Svx3DSceneObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -504,7 +504,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSceneObject::getSupportedServiceNames()
//----------------------------------------------------------------------
Svx3DCubeObject::Svx3DCubeObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT), aSvxMapProvider.GetPropertySet(SVXMAP_3DCUBEOBJEKT) )
{
}
@@ -514,7 +514,7 @@ Svx3DCubeObject::~Svx3DCubeObject() throw()
}
//----------------------------------------------------------------------
-bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DCubeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -563,7 +563,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -571,7 +571,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
//----------------------------------------------------------------------
-bool Svx3DCubeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DCubeObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -613,7 +613,7 @@ bool Svx3DCubeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -635,7 +635,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DCubeObject::getSupportedServiceNames()
//----------------------------------------------------------------------
Svx3DSphereObject::Svx3DSphereObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DSPHEREOBJECT) )
{
}
@@ -646,7 +646,7 @@ Svx3DSphereObject::~Svx3DSphereObject() throw()
//----------------------------------------------------------------------
-bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSphereObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -684,7 +684,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pPropert
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -692,7 +692,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pPropert
//----------------------------------------------------------------------
-bool Svx3DSphereObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSphereObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -729,7 +729,7 @@ bool Svx3DSphereObject::getPropertyValueImpl( const SfxItemPropertyMap* pPropert
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -751,7 +751,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSphereObject::getSupportedServiceNames()
//----------------------------------------------------------------------
Svx3DLatheObject::Svx3DLatheObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DLATHEOBJECT) )
{
}
@@ -760,7 +760,10 @@ Svx3DLatheObject::~Svx3DLatheObject() throw()
{
}
-static bool PolyPolygonShape3D_to_B3dPolyPolygon( const Any& rValue, basegfx::B3DPolyPolygon& rResultPolygon )
+bool PolyPolygonShape3D_to_B3dPolyPolygon(
+ const Any& rValue,
+ basegfx::B3DPolyPolygon& rResultPolygon,
+ bool bCorrectPolygon)
{
drawing::PolyPolygonShape3D aSourcePolyPolygon;
if( !(rValue >>= aSourcePolyPolygon) )
@@ -791,7 +794,14 @@ static bool PolyPolygonShape3D_to_B3dPolyPolygon( const Any& rValue, basegfx::B3
pInnerSequenceX++;
pInnerSequenceY++;
pInnerSequenceZ++;
- basegfx::tools::checkClosed(aNewPolygon);
+
+ // #i101520# correction is needed for imported polygons of old format,
+ // see callers
+ if(bCorrectPolygon)
+ {
+ basegfx::tools::checkClosed(aNewPolygon);
+ }
+
rResultPolygon.append(aNewPolygon);
}
return true;
@@ -840,7 +850,7 @@ static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon&
//----------------------------------------------------------------------
-bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DLatheObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -855,7 +865,9 @@ bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
{
// Polygondefinition in das Objekt packen
basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
- if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) )
+
+ // #i101520# Probably imported
+ if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, true ) )
{
// #105127# SetPolyPoly3D sets the Svx3DVerticalSegmentsItem to the number
// of points of the polygon. Thus, value gets lost. To avoid this, rescue
@@ -878,14 +890,14 @@ bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
}
//----------------------------------------------------------------------
-bool Svx3DLatheObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DLatheObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -925,7 +937,7 @@ bool Svx3DLatheObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -946,7 +958,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DLatheObject::getSupportedServiceNames()
***********************************************************************/
Svx3DExtrudeObject::Svx3DExtrudeObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DEXTRUDEOBJECT) )
{
}
@@ -957,7 +969,7 @@ Svx3DExtrudeObject::~Svx3DExtrudeObject() throw()
//----------------------------------------------------------------------
-bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DExtrudeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -973,7 +985,9 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
{
// Polygondefinition in das Objekt packen
basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
- if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) )
+
+ // #i101520# Probably imported
+ if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, true ) )
{
// Polygon setzen
const basegfx::B3DHomMatrix aIdentity;
@@ -984,7 +998,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -992,7 +1006,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
//----------------------------------------------------------------------
-bool Svx3DExtrudeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DExtrudeObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1034,7 +1048,7 @@ bool Svx3DExtrudeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProper
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -1056,7 +1070,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DExtrudeObject::getSupportedServiceNames(
//----------------------------------------------------------------------
Svx3DPolygonObject::Svx3DPolygonObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DPOLYGONOBJECT) )
{
}
@@ -1066,7 +1080,7 @@ Svx3DPolygonObject::~Svx3DPolygonObject() throw()
}
//----------------------------------------------------------------------
-bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DPolygonObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1082,7 +1096,9 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
{
// Polygondefinition in das Objekt packen
basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
- if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) )
+
+ // #i101520# Direct API data (e.g. from chart)
+ if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) )
{
// Polygon setzen
static_cast<E3dPolygonObj*>(mpObj.get())->SetPolyPolygon3D(aNewB3DPolyPolygon);
@@ -1094,7 +1110,9 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
{
// Normalendefinition in das Objekt packen
basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
- if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) )
+
+ // #i101520# Direct API data (e.g. from chart)
+ if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) )
{
// Polygon setzen
static_cast<E3dPolygonObj*>(mpObj.get())->SetPolyNormals3D(aNewB3DPolyPolygon);
@@ -1106,7 +1124,9 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
{
// Texturdefinition in das Objekt packen
basegfx::B3DPolyPolygon aNewB3DPolyPolygon;
- if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) )
+
+ // #i101520# Direct API data (e.g. from chart)
+ if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) )
{
// Polygon setzen
const basegfx::B3DHomMatrix aIdentity;
@@ -1127,14 +1147,14 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
}
//----------------------------------------------------------------------
-bool Svx3DPolygonObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DPolygonObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1173,7 +1193,7 @@ bool Svx3DPolygonObject::getPropertyValueImpl( const SfxItemPropertyMap* pProper
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 1d4be0a30654..674cb8fdb24d 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -87,12 +87,12 @@ using namespace ::com::sun::star::beans;
///////////////////////////////////////////////////////////////////////
SvxOle2Shape::SvxOle2Shape( SdrObject* pObject ) throw()
-: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_OLE2) )
+: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2) )
{
}
-SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ()
-: SvxShape( pObject, pPropertySet )
+SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ()
+: SvxShape( pObject, pPropertyMap, pPropertySet )
{
}
@@ -106,7 +106,7 @@ SvxOle2Shape::~SvxOle2Shape() throw()
}
//XPropertySet
-bool SvxOle2Shape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -255,13 +255,13 @@ bool SvxOle2Shape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, co
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
}
-bool SvxOle2Shape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -450,7 +450,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -630,7 +630,7 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(rtl::OUString& rHexCLSID)
///////////////////////////////////////////////////////////////////////
SvxAppletShape::SvxAppletShape( SdrObject* pObject ) throw()
-: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET) )
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET), aSvxMapProvider.GetPropertySet(SVXMAP_APPLET) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) );
}
@@ -639,7 +639,7 @@ SvxAppletShape::~SvxAppletShape() throw()
{
}
-void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
SvxShape::Create( pNewObj, pNewPage );
const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID );
@@ -659,7 +659,7 @@ void SAL_CALL SvxAppletShape::setPropertyValues( const ::com::sun::star::uno::Se
resetModifiedState();
}
-bool SvxAppletShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxAppletShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
{
@@ -669,18 +669,18 @@ bool SvxAppletShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
if( xSet.is() )
{
// allow exceptions to pass through
- xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue );
+ xSet->setPropertyValue( rName, rValue );
}
}
return true;
}
else
{
- return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
-bool SvxAppletShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxAppletShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
{
@@ -689,21 +689,21 @@ bool SvxAppletShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY );
if( xSet.is() )
{
- rValue = xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) );
+ rValue = xSet->getPropertyValue( rName );
}
}
return true;
}
else
{
- return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
///////////////////////////////////////////////////////////////////////
SvxPluginShape::SvxPluginShape( SdrObject* pObject ) throw()
-: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN) )
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN), aSvxMapProvider.GetPropertySet(SVXMAP_PLUGIN) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) );
}
@@ -712,7 +712,7 @@ SvxPluginShape::~SvxPluginShape() throw()
{
}
-void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
SvxShape::Create( pNewObj, pNewPage );
const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID );
@@ -732,7 +732,7 @@ void SAL_CALL SvxPluginShape::setPropertyValues( const ::com::sun::star::uno::Se
resetModifiedState();
}
-bool SvxPluginShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxPluginShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
{
@@ -742,18 +742,18 @@ bool SvxPluginShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
if( xSet.is() )
{
// allow exceptions to pass through
- xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue );
+ xSet->setPropertyValue( rName, rValue );
}
}
return true;
}
else
{
- return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
-bool SvxPluginShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxPluginShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
{
@@ -762,21 +762,21 @@ bool SvxPluginShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY );
if( xSet.is() )
{
- rValue <<= xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) );
+ rValue <<= xSet->getPropertyValue( rName );
}
}
return true;
}
else
{
- return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
///////////////////////////////////////////////////////////////////////
SvxFrameShape::SvxFrameShape( SdrObject* pObject ) throw()
-: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME) )
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME), aSvxMapProvider.GetPropertySet(SVXMAP_FRAME) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) );
}
@@ -805,7 +805,7 @@ void SAL_CALL SvxFrameShape::setPropertyValues( const ::com::sun::star::uno::Seq
resetModifiedState();
}
-bool SvxFrameShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxFrameShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) )
{
@@ -815,18 +815,18 @@ bool SvxFrameShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
if( xSet.is() )
{
// allow exceptions to pass through
- xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue );
+ xSet->setPropertyValue( rName, rValue );
}
}
return true;
}
else
{
- return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
-bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxFrameShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) )
{
@@ -835,14 +835,14 @@ bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY );
if( xSet.is() )
{
- rValue <<= xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) );
+ rValue <<= xSet->getPropertyValue( rName );
}
}
return true;
}
else
{
- return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
@@ -851,7 +851,7 @@ bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
***********************************************************************/
SvxMediaShape::SvxMediaShape( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_MEDIA) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_MEDIA), aSvxMapProvider.GetPropertySet(SVXMAP_MEDIA) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MediaShape" ) ) );
}
@@ -863,7 +863,7 @@ SvxMediaShape::~SvxMediaShape() throw()
//----------------------------------------------------------------------
-bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxMediaShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_MEDIA_URL) && (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM) )
{
@@ -944,7 +944,7 @@ bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
}
else
{
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -952,7 +952,7 @@ bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
//----------------------------------------------------------------------
-bool SvxMediaShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( ( pProperty->nWID >= OWN_ATTR_MEDIA_URL ) && ( pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM ) )
{
@@ -988,6 +988,6 @@ bool SvxMediaShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
}
else
{
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index e45095492e1b..3f7f58a1e9ad 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -37,7 +37,6 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/drawing/CircleKind.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
-#include <cppuhelper/interfacecontainer.hxx>
#include <vcl/svapp.hxx>
#include <svtools/itemprop.hxx>
#include <svtools/fltcall.hxx>
@@ -47,6 +46,7 @@
#include <svx/svdoole2.hxx>
#include <osl/mutex.hxx>
#include <comphelper/extract.hxx>
+#include "svx/shapepropertynotifier.hxx"
#include <toolkit/unohlp.hxx>
@@ -84,6 +84,7 @@
#include "svx/dialogs.hrc" //
#include "svx/svdocapt.hxx"
#include <svx/obj3d.hxx>
+#include <tools/diagnose_ex.h>
#include "svx/xflftrit.hxx"
#include "svx/xtable.hxx"
#include "svx/xbtmpit.hxx"
@@ -116,15 +117,17 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
+using ::svx::PropertyValueProvider;
+using ::svx::IPropertyValueProvider;
#define QUERYINT( xint ) \
if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
aAny <<= uno::Reference< xint >(this)
-const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
+const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
{
// Propertymap fuer einen Outliner Text
- static const SfxItemPropertyMap aSvxUnoOutlinerTextCursorPropertyMap[] =
+ static const SfxItemPropertyMapEntry aSvxUnoOutlinerTextCursorPropertyMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -137,24 +140,15 @@ const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
return aSvxUnoOutlinerTextCursorPropertyMap;
}
-
-const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap()
+const SfxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSfxPropertySet()
{
- // Propertymap fuer einen Outliner Text
- static const SfxItemPropertyMap aSvxTextPortionPropertyMap[] =
- {
- SVX_UNOEDIT_CHAR_PROPERTIES,
- SVX_UNOEDIT_FONT_PROPERTIES,
- SVX_UNOEDIT_OUTLINER_PROPERTIES,
- SVX_UNOEDIT_PARA_PROPERTIES,
- {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {0,0,0,0,0,0}
- };
-
- return aSvxTextPortionPropertyMap;
+ static SfxItemPropertySet aTextCursorSfxPropertySet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() );
+ return &aTextCursorSfxPropertySet;
+}
+const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
+{
+ static SvxItemPropertySet aTextCursorSvxPropertySet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() );
+ return &aTextCursorSvxPropertySet;
}
class GDIMetaFile;
@@ -165,15 +159,17 @@ sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetSt
uno::Reference< uno::XInterface > SAL_CALL SvxUnoGluePointAccess_createInstance( SdrObject* pObject );
/***********************************************************************
-* class SvxShape *
+* class SvxShapeImpl *
***********************************************************************/
struct SvxShapeImpl
{
+ SvxShape& mrAntiImpl;
SfxItemSet* mpItemSet;
sal_uInt32 mnObjId;
SvxShapeMaster* mpMaster;
bool mbHasSdrObjectOwnership;
+ bool mbDisposing;
/** CL, OD 2005-07-19 #i52126# - this is initially 0 and set when
* a SvxShape::Create() call is executed. It is then set to the created
@@ -181,55 +177,105 @@ struct SvxShapeImpl
* is prohibited.
*/
SdrObject* mpCreatedObj;
+
+ // for xComponent
+ ::cppu::OInterfaceContainerHelper maDisposeListeners;
+ ::svx::PropertyChangeNotifier maPropertyNotifier;
+
+ SvxShapeImpl( SvxShape& _rAntiImpl, ::osl::Mutex& _rMutex )
+ :mrAntiImpl( _rAntiImpl )
+ ,mpItemSet( NULL )
+ ,mnObjId( 0 )
+ ,mpMaster( NULL )
+ ,mbHasSdrObjectOwnership( false )
+ ,mbDisposing( false )
+ ,mpCreatedObj( NULL )
+ ,maDisposeListeners( _rMutex )
+ ,maPropertyNotifier( _rAntiImpl, _rMutex )
+ {
+ }
};
+/**********************************************************************/
+class ShapePositionProvider : public PropertyValueProvider
+{
+public:
+ ShapePositionProvider( const SvxShapeImpl& _shapeImpl )
+ :PropertyValueProvider( _shapeImpl.mrAntiImpl, "Position" )
+ {
+ }
+
+protected:
+ virtual void getCurrentValue( Any& _out_rCurrentValue ) const
+ {
+ _out_rCurrentValue <<= static_cast< SvxShape& >( getContext() ).getPosition();
+ }
+};
+
+//----------------------------------------------------------------------
+class ShapeSizeProvider : public PropertyValueProvider
+{
+public:
+ ShapeSizeProvider( const SvxShapeImpl& _shapeImpl )
+ :PropertyValueProvider( _shapeImpl.mrAntiImpl, "Size" )
+ {
+ }
+
+protected:
+ virtual void getCurrentValue( Any& _out_rCurrentValue ) const
+ {
+ _out_rCurrentValue <<= static_cast< SvxShape& >( getContext() ).getSize();
+ }
+};
+
+/***********************************************************************
+* class SvxShape *
+***********************************************************************/
+
DBG_NAME(SvxShape)
SvxShape::SvxShape( SdrObject* pObject ) throw()
: maSize(100,100)
-, mpImpl(NULL)
+, mpImpl( new SvxShapeImpl( *this, maMutex ) )
, mbIsMultiPropertyCall(false)
-, maPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
-, maDisposeListeners( maMutex )
-, mbDisposing( false )
+, mpPropSet(aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE))
+, maPropMapEntries(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
, mpObj(pObject)
, mpModel(NULL)
, mnLockCount(0)
{
DBG_CTOR(SvxShape,NULL);
- Init();
+ impl_construct();
}
//----------------------------------------------------------------------
-SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertyMap ) throw()
+SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw()
: maSize(100,100)
-, mpImpl(NULL)
+, mpImpl( new SvxShapeImpl( *this, maMutex ) )
, mbIsMultiPropertyCall(false)
-, maPropSet(pPropertyMap)
-, maDisposeListeners( maMutex )
-, mbDisposing( false )
+, mpPropSet(pPropertySet)
+, maPropMapEntries(pEntries)
, mpObj(pObject)
, mpModel(NULL)
, mnLockCount(0)
{
DBG_CTOR(SvxShape,NULL);
- Init();
+ impl_construct();
}
//----------------------------------------------------------------------
SvxShape::SvxShape() throw()
: maSize(100,100)
-, mpImpl(NULL)
+, mpImpl( new SvxShapeImpl( *this, maMutex ) )
, mbIsMultiPropertyCall(false)
-, maPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
-, maDisposeListeners( maMutex )
-, mbDisposing( false )
+, mpPropSet(aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE))
+, maPropMapEntries(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
, mpObj(NULL)
, mpModel(NULL)
, mnLockCount(0)
{
DBG_CTOR(SvxShape,NULL);
- Init();
+ impl_construct();
}
//----------------------------------------------------------------------
@@ -239,12 +285,15 @@ SvxShape::~SvxShape() throw()
DBG_ASSERT( mnLockCount == 0, "Locked shape was disposed!" );
- if( mpModel )
+ if ( mpModel )
EndListening( *mpModel );
- if(mpImpl && mpImpl->mpMaster)
+ if ( mpImpl->mpMaster )
mpImpl->mpMaster->dispose();
+ if ( mpObj.is() )
+ mpObj->setUnoShape( NULL, SdrObject::GrantXShapeAccess() );
+
if( HasSdrObjectOwnership() && mpObj.is() )
{
mpImpl->mbHasSdrObjectOwnership = false;
@@ -261,18 +310,13 @@ SvxShape::~SvxShape() throw()
void SvxShape::TakeSdrObjectOwnership()
{
- if ( mpImpl )
- mpImpl->mbHasSdrObjectOwnership = true;
+ mpImpl->mbHasSdrObjectOwnership = true;
}
//----------------------------------------------------------------------
bool SvxShape::HasSdrObjectOwnership() const
{
- OSL_PRECOND( mpImpl, "SvxShape::HasSdrObjectOwnership: no impl!?" );
- if ( !mpImpl )
- return false;
-
if ( !mpImpl->mbHasSdrObjectOwnership )
return false;
@@ -284,15 +328,14 @@ bool SvxShape::HasSdrObjectOwnership() const
void SvxShape::setShapeKind( sal_uInt32 nKind )
{
- if( mpImpl )
- mpImpl->mnObjId = nKind;
+ mpImpl->mnObjId = nKind;
}
//----------------------------------------------------------------------
sal_uInt32 SvxShape::getShapeKind() const
{
- return mpImpl ? mpImpl->mnObjId : (sal_uInt32)OBJ_NONE;
+ return mpImpl->mnObjId;
}
//----------------------------------------------------------------------
@@ -304,12 +347,12 @@ void SvxShape::setMaster( SvxShapeMaster* pMaster )
SvxShapeMaster* SvxShape::getMaster()
{
- return mpImpl ? mpImpl->mpMaster : NULL;
+ return mpImpl->mpMaster;
}
const SvxShapeMaster* SvxShape::getMaster() const
{
- return mpImpl ? mpImpl->mpMaster : NULL;
+ return mpImpl->mpMaster;
}
//----------------------------------------------------------------------
@@ -344,7 +387,7 @@ const ::com::sun::star::uno::Sequence< sal_Int8 > & SvxShape::getUnoTunnelId() t
}
//----------------------------------------------------------------------
-SvxShape* SvxShape::getImplementation( uno::Reference< uno::XInterface > xInt ) throw()
+SvxShape* SvxShape::getImplementation( const uno::Reference< uno::XInterface >& xInt )
{
uno::Reference< lang::XUnoTunnel > xUT( xInt, ::com::sun::star::uno::UNO_QUERY );
if( xUT.is() )
@@ -372,27 +415,30 @@ SvxShape* SvxShape::GetShapeForSdrObj( SdrObject* pObj ) throw()
return getImplementation( pObj->getUnoShape() );
}
-void SvxShape::Init() throw()
+//----------------------------------------------------------------------
+::svx::PropertyChangeNotifier& SvxShape::getShapePropertyChangeNotifier()
{
- if( NULL == mpImpl )
- {
- mpImpl = new SvxShapeImpl;
- mpImpl->mpItemSet = NULL;
- mpImpl->mpMaster = NULL;
- mpImpl->mnObjId = 0;
- mpImpl->mbHasSdrObjectOwnership= false;
- // --> CL, OD 2005-07-19 #i52126#
- mpImpl->mpCreatedObj = NULL;
- // <--
- }
+ return mpImpl->maPropertyNotifier;
+}
- mbIsMultiPropertyCall = sal_False;
+//----------------------------------------------------------------------
+void SvxShape::impl_construct()
+{
+ mpImpl->maPropertyNotifier.registerProvider( ::svx::eShapePosition,
+ ::svx::PPropertyValueProvider( new ShapePositionProvider( *mpImpl ) ) );
+ mpImpl->maPropertyNotifier.registerProvider( ::svx::eShapeSize,
+ ::svx::PPropertyValueProvider( new ShapeSizeProvider( *mpImpl ) ) );
+
+ if ( mpObj.is() )
+ impl_initFromSdrObject();
+}
- // only init if we already have an object
- // if we get an object later Init() will
- // be called again
+//----------------------------------------------------------------------
+void SvxShape::impl_initFromSdrObject()
+{
DBG_TESTSOLARMUTEX();
- if(!mpObj.is())
+ OSL_PRECOND( mpObj.is(), "SvxShape::impl_initFromSdrObject: not to be called without SdrObject!" );
+ if ( !mpObj.is() )
return;
osl_incrementInterlockedCount( &m_refCount );
@@ -443,14 +489,19 @@ void SvxShape::Init() throw()
}
//----------------------------------------------------------------------
-void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) throw()
+void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ )
{
- DBG_ASSERT( mpImpl, "svx::SvxShape::Create(), no mpImpl!" );
-
DBG_TESTSOLARMUTEX();
+ OSL_PRECOND( pNewObj, "SvxShape::Create: invalid new object!" );
+ if ( !pNewObj )
+ return;
+
+ OSL_ENSURE( ( mpImpl->mpCreatedObj == NULL ) || ( mpImpl->mpCreatedObj == pNewObj ),
+ "SvxShape::Create: the same shape used for two different objects?! Strange ..." );
+
// --> CL, OD 2005-07-19 #i52126# - correct condition
- if ( pNewObj && (mpImpl && (mpImpl->mpCreatedObj != pNewObj) ) )
+ if ( mpImpl->mpCreatedObj != pNewObj )
// <--
{
DBG_ASSERT( pNewObj->GetModel(), "no model for SdrObject?" );
@@ -465,9 +516,13 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) throw()
mpObj.reset( pNewObj );
- Init();
+ OSL_ENSURE( !mbIsMultiPropertyCall, "SvxShape::Create: hmm?" );
+ // this was previously set in impl_initFromSdrObject, but I think it was superfluous
+ // (it definitely was in the other context where it was called, but I strongly suppose
+ // it was also superfluous when called from here)
+ impl_initFromSdrObject();
- ObtainSettingsFromPropertySet( maPropSet );
+ ObtainSettingsFromPropertySet( *mpPropSet );
// save user call
SdrObjUserCall* pUser = mpObj->GetUserCall();
@@ -551,37 +606,6 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw()
}
//----------------------------------------------------------------------
-// --> OD 2009-01-16 #i59051#
-void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
-{
- DBG_TESTSOLARMUTEX();
- if(mpModel)
- {
- SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- switch(eMapUnit)
- {
- case SFX_MAPUNIT_TWIP :
- {
- basegfx::B2DHomMatrix aTransform;
- const double fMMToTWIPS(72.0 / 127.0);
-
- aTransform.scale(fMMToTWIPS, fMMToTWIPS);
- rPolyPolygon.transform(aTransform);
- break;
- }
- default:
- {
- DBG_ERROR("Missing unit translation to PoolMetric!");
- }
- }
- }
- }
-}
-// <--
-
-//----------------------------------------------------------------------
void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
{
DBG_TESTSOLARMUTEX();
@@ -609,45 +633,14 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
}
//----------------------------------------------------------------------
-// --> OD 2009-01-16 #i59051#
-void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
-{
- DBG_TESTSOLARMUTEX();
- SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM;
- if(mpModel)
- {
- eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- switch(eMapUnit)
- {
- case SFX_MAPUNIT_TWIP :
- {
- basegfx::B2DHomMatrix aTransform;
- const double fTWIPSToMM(127.0 / 72.0);
-
- aTransform.scale(fTWIPSToMM, fTWIPSToMM);
- rPolyPolygon.transform(aTransform);
- break;
- }
- default:
- {
- DBG_ERROR("Missing unit translation to 100th mm!");
- }
- }
- }
- }
-}
-// <--
-//----------------------------------------------------------------------
-void SvxShape::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw()
+void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet)
{
DBG_TESTSOLARMUTEX();
if(mpObj.is() && rPropSet.AreThereOwnUsrAnys() && mpModel)
{
SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0);
Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY );
- maPropSet.ObtainSettingsFromPropertySet(rPropSet, aSet, xShape);
+ mpPropSet->ObtainSettingsFromPropertySet(rPropSet, aSet, xShape);
mpObj->SetMergedItemSetAndBroadcast(aSet);
@@ -1041,25 +1034,9 @@ Reference< uno::XInterface > SvxShape_NewInstance()
//----------------------------------------------------------------------
-/** called from SdrObject::SendUserCall
- Currently only called for SDRUSERCALL_CHILD_CHGATTR
-*/
-void SvxShape::onUserCall(SdrUserCallType eUserCall, const Rectangle& )
+void SvxShape::onUserCall(SdrUserCallType /*_eUserCall*/, const Rectangle& /*_rNewBoundRect*/ )
{
- switch( eUserCall )
- {
- case SDRUSERCALL_CHILD_CHGATTR:
- {
- beans::PropertyChangeEvent aEvent;
- aEvent.Further = sal_False;
- aEvent.PropertyHandle = 0;
- aEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
- maDisposeListeners.notifyEach( &beans::XPropertyChangeListener::propertyChange, aEvent );
- }
- break;
- default:
- break;
- }
+ // obsolete, not called anymore
}
//----------------------------------------------------------------------
@@ -1111,9 +1088,7 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
{
if( !HasSdrObjectOwnership() )
mpObj.reset( NULL );
- /*mpImpl->mbHasSdrObjectOwnerhship = false;
- mpObj.reset( NULL );*/
- if(!mbDisposing)
+ if ( !mpImpl->mbDisposing )
dispose();
}
}
@@ -1355,33 +1330,50 @@ void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
- if( mbDisposing )
+ if( mpImpl->mbDisposing )
return; // caught a recursion
- mbDisposing = true;
+ mpImpl->mbDisposing = true;
lang::EventObject aEvt;
aEvt.Source = *(OWeakAggObject*) this;
- maDisposeListeners.disposeAndClear(aEvt);
+ mpImpl->maDisposeListeners.disposeAndClear(aEvt);
+ mpImpl->maPropertyNotifier.disposing();
- if(mpObj.is() && mpObj->IsInserted() && mpObj->GetPage() )
+ if ( mpObj.is() )
{
- SdrPage* pPage = mpObj->GetPage();
- // SdrObject aus der Page loeschen
- sal_uInt32 nCount = pPage->GetObjCount();
- for( sal_uInt32 nNum = 0; nNum < nCount; nNum++ )
+ bool bFreeSdrObject = false;
+
+ if ( mpObj->IsInserted() && mpObj->GetPage() )
{
- if(pPage->GetObj(nNum) == mpObj.get())
+ OSL_ENSURE( HasSdrObjectOwnership(), "SvxShape::dispose: is the below code correct?" );
+ // normally, we are allowed to free the SdrObject only if we have its ownership.
+ // Why isn't this checked here?
+
+ SdrPage* pPage = mpObj->GetPage();
+ // SdrObject aus der Page loeschen
+ sal_uInt32 nCount = pPage->GetObjCount();
+ for ( sal_uInt32 nNum = 0; nNum < nCount; ++nNum )
{
- OSL_VERIFY( pPage->RemoveObject(nNum) == mpObj.get() );
- // in case we have the ownership of the SdrObject, a Free
- // would do nothing. So ensure the ownership is reset.
- mpImpl->mbHasSdrObjectOwnership = false;
- SdrObject* pObject = mpObj.get();
- SdrObject::Free( pObject );
- break;
+ if ( pPage->GetObj( nNum ) == mpObj.get() )
+ {
+ OSL_VERIFY( pPage->RemoveObject( nNum ) == mpObj.get() );
+ bFreeSdrObject = true;
+ break;
+ }
}
}
+
+ mpObj->setUnoShape( NULL, SdrObject::GrantXShapeAccess() );
+
+ if ( bFreeSdrObject )
+ {
+ // in case we have the ownership of the SdrObject, a Free
+ // would do nothing. So ensure the ownership is reset.
+ mpImpl->mbHasSdrObjectOwnership = false;
+ SdrObject* pObject = mpObj.get();
+ SdrObject::Free( pObject );
+ }
}
if( mpModel )
@@ -1396,14 +1388,14 @@ void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException)
void SAL_CALL SvxShape::addEventListener( const Reference< lang::XEventListener >& xListener )
throw(uno::RuntimeException)
{
- maDisposeListeners.addInterface(xListener);
+ mpImpl->maDisposeListeners.addInterface(xListener);
}
//----------------------------------------------------------------------
void SAL_CALL SvxShape::removeEventListener( const Reference< lang::XEventListener >& aListener ) throw(uno::RuntimeException)
{
- maDisposeListeners.removeInterface(aListener);
+ mpImpl->maDisposeListeners.removeInterface(aListener);
}
// XPropertySet
@@ -1426,27 +1418,38 @@ Reference< beans::XPropertySetInfo > SAL_CALL
Reference< beans::XPropertySetInfo > SAL_CALL
SvxShape::_getPropertySetInfo() throw(uno::RuntimeException)
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::addPropertyChangeListener( const OUString& _propertyName, const Reference< beans::XPropertyChangeListener >& _listener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+ mpImpl->maPropertyNotifier.addPropertyChangeListener( _propertyName, _listener );
}
//----------------------------------------------------------------------
-void SAL_CALL SvxShape::addPropertyChangeListener( const OUString& , const Reference< beans::XPropertyChangeListener >& xListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+void SAL_CALL SvxShape::removePropertyChangeListener( const OUString& _propertyName, const Reference< beans::XPropertyChangeListener >& _listener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- maDisposeListeners.addInterface(xListener);
+ ::osl::MutexGuard aGuard( maMutex );
+ mpImpl->maPropertyNotifier.removePropertyChangeListener( _propertyName, _listener );
}
//----------------------------------------------------------------------
-void SAL_CALL SvxShape::removePropertyChangeListener( const OUString& , const Reference< beans::XPropertyChangeListener >& xListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+void SAL_CALL SvxShape::addVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- maDisposeListeners.removeInterface(xListener);
+ OSL_ENSURE( false, "SvxShape::addVetoableChangeListener: don't have any vetoable properties, so why ...?" );
}
//----------------------------------------------------------------------
-void SAL_CALL SvxShape::addVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
-void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OSL_ENSURE( false, "SvxShape::removeVetoableChangeListener: don't have any vetoable properties, so why ...?" );
+}
//----------------------------------------------------------------------
@@ -1656,7 +1659,8 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
//----------------------------------------------------------------------
// static
-uno::Any SAL_CALL SvxShape::GetFillAttributeByName(
+/* os: unused function
+ uno::Any SAL_CALL SvxShape::GetFillAttributeByName(
const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel )
{
uno::Any aResult;
@@ -1837,7 +1841,7 @@ uno::Any SAL_CALL SvxShape::GetFillAttributeByName(
}
return aResult;
-}
+} */
//----------------------------------------------------------------------
@@ -1859,7 +1863,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(rPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName);
if( mpObj.is() && mpModel )
{
@@ -1871,7 +1875,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
mpModel->SetChanged();
- if(!setPropertyValueImpl( pMap, rVal ) )
+ if(!setPropertyValueImpl( rPropertyName, pMap, rVal ) )
{
DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" );
DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
@@ -1925,7 +1929,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
if( pSet->GetItemState( pMap->nWID ) == SFX_ITEM_SET )
{
- maPropSet.setPropertyValue( pMap, rVal, *pSet );
+ mpPropSet->setPropertyValue( pMap, rVal, *pSet );
}
}
@@ -1963,7 +1967,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
// that support additional properties that we don't
// know here we silently store *all* properties, even
// if they may be not supported after creation
- maPropSet.setPropertyValue( pMap, rVal );
+ mpPropSet->setPropertyValue( pMap, rVal );
}
}
@@ -1972,7 +1976,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- if( mpImpl && mpImpl->mpMaster )
+ if ( mpImpl->mpMaster )
return mpImpl->mpMaster->getPropertyValue( PropertyName );
else
return _getPropertyValue( PropertyName );
@@ -1985,7 +1989,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
uno::Any aAny;
if( mpObj.is() && mpModel )
@@ -1993,7 +1997,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
if(pMap == NULL )
throw beans::UnknownPropertyException();
- if( !getPropertyValueImpl( pMap, aAny ) )
+ if( !getPropertyValueImpl( PropertyName, pMap, aAny ) )
{
DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || (pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST), "Not persist item not handled!" );
DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
@@ -2031,7 +2035,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
if(pMap && pMap->nWID)
// FixMe: see setPropertyValue
- aAny = maPropSet.getPropertyValue( pMap );
+ aAny = mpPropSet->getPropertyValue( pMap );
}
return aAny;
@@ -2170,7 +2174,7 @@ void SAL_CALL SvxShape::firePropertiesChangeEvent( const ::com::sun::star::uno::
//----------------------------------------------------------------------
-uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const
+uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const
{
DBG_TESTSOLARMUTEX();
uno::Any aAny;
@@ -2226,7 +2230,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pM
default:
{
// Hole Wert aus ItemSet
- aAny = maPropSet.getPropertyValue( pMap, aSet );
+ aAny = mpPropSet->getPropertyValue( pMap, aSet );
if( *pMap->pType != aAny.getValueType() )
{
@@ -2270,7 +2274,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( !mpObj.is() || pMap == NULL )
throw beans::UnknownPropertyException();
@@ -2338,7 +2342,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
//----------------------------------------------------------------------
-bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -2482,15 +2486,10 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if( rValue >>= aUnoPoint )
{
Point aPoint( aUnoPoint.X, aUnoPoint.Y );
- // --> OD 2009-01-16 #i59051#
- // perform metric change before applying anchor position,
- // because the anchor position is in pool metric.
- ForceMetricToItemPoolMetric( aPoint );
- // <--
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
-// ForceMetricToItemPoolMetric( aPoint );
+ ForceMetricToItemPoolMetric( aPoint );
pEdgeObj->SetTailPoint( pProperty->nWID == OWN_ATTR_EDGE_START_POS, aPoint );
return true;
}
@@ -2514,9 +2513,6 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if ( rValue >>= aPolyPoly )
{
basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) );
- // --> OD 2009-01-16 #i59051#
- ForceMetricToItemPoolMetric( aNewPolyPolygon );
- // <--
if( mpModel->IsWriter() )
{
Point aPoint( mpObj->GetAnchorPos() );
@@ -2541,9 +2537,6 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if(pMeasureObj && ( rValue >>= aUnoPoint ) )
{
Point aPoint( aUnoPoint.X, aUnoPoint.Y );
- // --> OD 2009-01-12 #i59051#
- ForceMetricToItemPoolMetric( aPoint );
- // <--
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
@@ -2760,7 +2753,7 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
//----------------------------------------------------------------------
-bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -2964,9 +2957,6 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
aMatrix.translate( -aPoint.X(), -aPoint.Y() );
aPolyPoly.transform( aMatrix );
}
- // --> OD 2009-01-16 #i59051#
- ForceMetricTo100th_mm( aPolyPoly );
- // <--
drawing::PolyPolygonBezierCoords aRetval;
SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval);
rValue <<= aRetval;
@@ -2987,9 +2977,6 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
if( mpModel->IsWriter() )
aPoint -= mpObj->GetAnchorPos();
- // --> OD 2009-01-12 #i59051#
- ForceMetricTo100th_mm( aPoint );
- // <--
awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
rValue <<= aUnoPoint;
@@ -3161,7 +3148,7 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
//----------------------------------------------------------------------
-bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE )
{
@@ -3192,7 +3179,7 @@ bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com:
//----------------------------------------------------------------------
-bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE )
{
@@ -3257,7 +3244,7 @@ void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pProperty = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName);
if( !mpObj.is() || mpModel == NULL || pProperty == NULL )
throw beans::UnknownPropertyException();
@@ -3290,7 +3277,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName);
if( !mpObj.is() || pMap == NULL || mpModel == NULL )
throw beans::UnknownPropertyException();
@@ -4243,21 +4230,21 @@ void SvxShape::updateShapeKind()
* class SvxShapeText *
***********************************************************************/
SvxShapeText::SvxShapeText() throw ()
-: SvxShape(NULL, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+: SvxShape(NULL, aSvxMapProvider.GetMap(SVXMAP_TEXT), aSvxMapProvider.GetPropertySet(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
}
//----------------------------------------------------------------------
SvxShapeText::SvxShapeText( SdrObject* pObject ) throw ()
-: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT), aSvxMapProvider.GetPropertySet(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) );
}
//----------------------------------------------------------------------
-SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ()
-: SvxShape( pObject, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ()
+: SvxShape( pObject, pPropertyMap, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) );
@@ -4271,7 +4258,7 @@ SvxShapeText::~SvxShapeText() throw ()
"svx::SvxShapeText::~SvxShapeText(), text shape with living text ranges destroyed!");
}
-void SvxShapeText::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+void SvxShapeText::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
if( pNewObj && (NULL == GetEditSource()))
SetEditSource( new SvxTextEditSource( pNewObj, 0, static_cast< uno::XWeak* >(this) ) );
@@ -4433,7 +4420,7 @@ void SAL_CALL SvxShapeText::setString( const OUString& aString ) throw(uno::Runt
}
// overide these for special property handling in subcasses. Return true if property is handled
-bool SvxShapeText::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
// HACK-fix #99090#
// since SdrTextObj::SetVerticalWriting exchanges
@@ -4453,10 +4440,10 @@ bool SvxShapeText::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, co
}
return true;
}
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
-bool SvxShapeText::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( pProperty->nWID == SDRATTR_TEXTDIRECTION )
{
@@ -4468,15 +4455,15 @@ bool SvxShapeText::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::
return true;
}
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
-bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
return SvxShape::getPropertyStateImpl( pProperty, rState );
}
-bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
return SvxShape::setPropertyToDefaultImpl( pProperty );
}
@@ -4486,7 +4473,7 @@ bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty
***********************************************************************/
DBG_NAME(SvxShapeRect)
SvxShapeRect::SvxShapeRect( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE), aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE) )
{
DBG_CTOR(SvxShapeRect,NULL);
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 08e83fc889fb..81439effcfc1 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -620,25 +620,29 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
mpTextForwarder->flushCache();
OutlinerParaObject* pOutlinerParaObject = NULL;
- bool bTextEditActive = false;
SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
if( pTextObj && pTextObj->getActiveText() == mpText )
pOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
+ bool bOwnParaObj(false);
if( pOutlinerParaObject )
- bTextEditActive = true; // text edit active
+ bOwnParaObj = true; // text edit active
else
pOutlinerParaObject = mpText->GetOutlinerParaObject();
- if( pOutlinerParaObject && ( bTextEditActive || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) )
+ if( pOutlinerParaObject && ( bOwnParaObj || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) )
{
mpOutliner->SetText( *pOutlinerParaObject );
// #91254# put text to object and set EmptyPresObj to FALSE
- if( mpText && bTextEditActive && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() )
+ if( mpText && bOwnParaObj && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() )
{
mpObject->SetEmptyPresObj( FALSE );
static_cast< SdrTextObj* >( mpObject)->NbcSetOutlinerParaObjectForText( pOutlinerParaObject, mpText );
+
+ // #i103982# Here, due to mpObject->NbcSetOutlinerParaObjectForText, we LOSE ownership of the
+ // OPO, so do NOT delete it when leaving this method (!)
+ bOwnParaObj = false;
}
}
else
@@ -676,7 +680,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
mbDataValid = TRUE;
- if( bTextEditActive )
+ if( bOwnParaObj )
delete pOutlinerParaObject;
}
diff --git a/svx/source/unoedit/makefile.mk b/svx/source/unoedit/makefile.mk
index e808dbe02799..802ded5aa7c1 100644
--- a/svx/source/unoedit/makefile.mk
+++ b/svx/source/unoedit/makefile.mk
@@ -33,6 +33,7 @@ PRJ=..$/..
PRJNAME=svx
TARGET=unoedit
+LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
@@ -42,13 +43,10 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES = \
- $(SLO)$/UnoForbiddenCharsTable.obj \
+LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
+LIB1OBJFILES= \
$(SLO)$/unoedsrc.obj \
$(SLO)$/unoedhlp.obj \
- $(SLO)$/unopracc.obj \
- $(SLO)$/unoedprx.obj \
- $(SLO)$/unoviwed.obj \
$(SLO)$/unoviwou.obj \
$(SLO)$/unofored.obj \
$(SLO)$/unoforou.obj \
@@ -56,6 +54,15 @@ SLOFILES = \
$(SLO)$/unotext2.obj \
$(SLO)$/unofield.obj
+LIB2TARGET= $(SLB)$/$(TARGET).lib
+LIB2OBJFILES= \
+ $(SLO)$/UnoForbiddenCharsTable.obj \
+ $(SLO)$/unopracc.obj \
+ $(SLO)$/unoedprx.obj \
+ $(SLO)$/unoviwed.obj
+
+SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
+
# --- Tagets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/svx/source/unoedit/unoedprx.cxx b/svx/source/unoedit/unoedprx.cxx
index 7c31f8b14ffc..e7bbcea519b8 100644
--- a/svx/source/unoedit/unoedprx.cxx
+++ b/svx/source/unoedit/unoedprx.cxx
@@ -1044,6 +1044,16 @@ USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const
return static_cast< USHORT >(aEndIndex.GetIndex());
}
+void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const
+{
+ mrTextForwarder->GetLineBoundaries( rStart, rEnd, nParagraph, nLine );
+}
+
+USHORT SvxAccessibleTextAdapter::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+{
+ return mrTextForwarder->GetLineNumberAtIndex( nPara, nIndex );
+}
+
sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel )
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx
index 6c6ad758fb91..6ff4c2aafe3e 100644
--- a/svx/source/unoedit/unofield.cxx
+++ b/svx/source/unoedit/unofield.cxx
@@ -81,9 +81,9 @@ public:
OUString msPresentation;
};
-SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
+const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{
- static SfxItemPropertyMap aExDateTimeFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aExDateTimeFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("DateTime"), WID_DATE, &::getCppuType((const util::DateTime*)0), 0, 0 },
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
@@ -91,14 +91,16 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("NumberFormat"), WID_INT32, &::getCppuType((const sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
- static SfxItemPropertyMap aDateTimeFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsDate"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
- static SfxItemPropertyMap aUrlFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Format"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
@@ -107,21 +109,24 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("URL"), WID_STRING3, &::getCppuType((const OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
- static SfxItemPropertyMap aEmptyPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
{
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
- static SfxItemPropertyMap aExtFileFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("FileFormat"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
{ MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
- static SfxItemPropertyMap aAuthorFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAuthorFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
@@ -130,29 +135,31 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("FullName"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
- static SfxItemPropertyMap aMeasureFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Kind"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
switch( mnId )
{
case ID_EXT_DATEFIELD:
case ID_EXT_TIMEFIELD:
- return aExDateTimeFieldPropertyMap_Impl;
+ return &aExDateTimeFieldPropertySet_Impl;
case ID_URLFIELD:
- return aUrlFieldPropertyMap_Impl;
+ return &aUrlFieldPropertySet_Impl;
case ID_DATEFIELD:
case ID_TIMEFIELD:
- return aDateTimeFieldPropertyMap_Impl;
+ return &aDateTimeFieldPropertySet_Impl;
case ID_EXT_FILEFIELD:
- return aExtFileFieldPropertyMap_Impl;
+ return &aExtFileFieldPropertySet_Impl;
case ID_AUTHORFIELD:
- return aAuthorFieldPropertyMap_Impl;
+ return &aAuthorFieldPropertySet_Impl;
case ID_MEASUREFIELD:
- return aMeasureFieldPropertyMap_Impl;
+ return &aMeasureFieldPropertySet_Impl;
// case ID_PAGEFIELD:
// case ID_PAGESFIELD:
// case ID_FILEFIELD:
@@ -161,7 +168,7 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
// case ID_FOOTERFIELD:
// case ID_DATETIMEFIELD::
default:
- return aEmptyPropertyMap_Impl;
+ return &aEmptyPropertySet_Impl;
}
}
@@ -262,7 +269,7 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw()
, mnServiceId(nServiceId)
, mpImpl( new SvxUnoFieldData_Impl )
{
- mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+ mpPropSet = ImplGetFieldItemPropertySet(mnServiceId);
memset( &(mpImpl->maDateTime), 0, sizeof( util::DateTime ) );
@@ -388,12 +395,11 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co
}
}
- mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+ mpPropSet = ImplGetFieldItemPropertySet(mnServiceId);
}
SvxUnoTextField::~SvxUnoTextField() throw()
{
- delete mpPropSet;
delete mpImpl;
}
@@ -671,7 +677,7 @@ void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName,
if( mpImpl == NULL )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), aPropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap()->getByName( aPropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
@@ -840,7 +846,7 @@ uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyNam
uno::Any aValue;
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap()->getByName( PropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
@@ -1056,7 +1062,7 @@ OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeExc
return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField"));
}
-static const sal_Char* pServiceNames[] =
+static const sal_Char* pOldServiceNames[] =
{
"com.sun.star.text.TextField.DateTime",
"com.sun.star.text.TextField.URL",
@@ -1075,14 +1081,34 @@ static const sal_Char* pServiceNames[] =
"com.sun.star.presentation.TextField.DateTime"
};
+static const sal_Char* pNewServiceNames[] =
+{
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.URL",
+ "com.sun.star.text.textfield.PageNumber",
+ "com.sun.star.text.textfield.PageCount",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.docinfo.Title", // SvxFileField is used for title
+ "com.sun.star.text.textfield.SheetName",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.FileName",
+ "com.sun.star.text.textfield.Author",
+ "com.sun.star.text.textfield.Measure",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.presentation.textfield.Header",
+ "com.sun.star.presentation.textfield.Footer",
+ "com.sun.star.presentation.textfield.DateTime"
+};
+
uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSeq( 3 );
+ uno::Sequence< OUString > aSeq( 4 );
OUString* pServices = aSeq.getArray();
- pServices[0] = OUString::createFromAscii( pServiceNames[mnServiceId] );
- pServices[1] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
- pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextField" );
+ pServices[0] = OUString::createFromAscii( pNewServiceNames[mnServiceId] );
+ pServices[1] = OUString::createFromAscii( pOldServiceNames[mnServiceId] );
+ pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
+ pServices[3] = OUString::createFromAscii( "com.sun.star.text.TextField" );
return aSeq;
}
diff --git a/svx/source/unoedit/unofored.cxx b/svx/source/unoedit/unofored.cxx
index 685e5973b39f..c06c37ae2070 100644
--- a/svx/source/unoedit/unofored.cxx
+++ b/svx/source/unoedit/unofored.cxx
@@ -471,6 +471,17 @@ USHORT SvxEditEngineForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
return rEditEngine.GetLineLen(nPara, nLine);
}
+void SvxEditEngineForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+{
+ rEditEngine.GetLineBoundaries(rStart, rEnd, nPara, nLine);
+}
+
+USHORT SvxEditEngineForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+{
+ return rEditEngine.GetLineNumberAtIndex(nPara, nIndex);
+}
+
+
sal_Bool SvxEditEngineForwarder::QuickFormatDoc( BOOL )
{
rEditEngine.QuickFormatDoc();
diff --git a/svx/source/unoedit/unoforou.cxx b/svx/source/unoedit/unoforou.cxx
index c46551d52d4f..c54f76d5f4dc 100644
--- a/svx/source/unoedit/unoforou.cxx
+++ b/svx/source/unoedit/unoforou.cxx
@@ -430,6 +430,16 @@ USHORT SvxOutlinerForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
return rOutliner.GetLineLen(nPara, nLine);
}
+void SvxOutlinerForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+{
+ return rOutliner.GetEditEngine().GetLineBoundaries( rStart, rEnd, nPara, nLine );
+}
+
+USHORT SvxOutlinerForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+{
+ return rOutliner.GetEditEngine().GetLineNumberAtIndex( nPara, nIndex );
+}
+
sal_Bool SvxOutlinerForwarder::QuickFormatDoc( BOOL )
{
rOutliner.QuickFormatDoc();
@@ -480,7 +490,7 @@ sal_Bool SvxOutlinerForwarder::SetDepth( USHORT nPara, sal_Int16 nNewDepth )
{
rOutliner.SetDepth( pPara, nNewDepth );
- const bool bOutlinerText = (pSdrObject->GetObjInventor() == SdrInventor) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT);
+ const bool bOutlinerText = pSdrObject && (pSdrObject->GetObjInventor() == SdrInventor) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT);
if( bOutlinerText )
rOutliner.SetLevelDependendStyleSheet( nPara );
diff --git a/svx/source/unoedit/unopracc.cxx b/svx/source/unoedit/unopracc.cxx
index 49d117db55ab..bb2547ebc832 100644
--- a/svx/source/unoedit/unopracc.cxx
+++ b/svx/source/unoedit/unopracc.cxx
@@ -63,8 +63,8 @@ using namespace ::com::sun::star;
//
//------------------------------------------------------------------------
-SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SfxItemPropertyMap* pPropMap )
- : SvxUnoTextRangeBase( pEditSrc, pPropMap )
+SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SvxItemPropertySet* pPropSet )
+ : SvxUnoTextRangeBase( pEditSrc, pPropSet )
{
}
diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx
index b1acb8518786..a46533657f1c 100644
--- a/svx/source/unoedit/unotext.cxx
+++ b/svx/source/unoedit/unotext.cxx
@@ -37,9 +37,6 @@
#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HDL_
#include <com/sun/star/text/XTextField.hdl>
#endif
-//#ifndef _COM_SUN_STAR_BEANS_TOLERANTPROPERTYSETRESULTTYPE_HPP_
-//#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
-//#endif
#include <vos/mutex.hxx>
#include <svtools/itemset.hxx>
@@ -78,8 +75,36 @@ using namespace ::com::sun::star;
if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
return uno::makeAny(uno::Reference< xint >(this))
-extern const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap();
-extern const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
+
+extern const SfxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSfxPropertySet();
+const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap()
+{
+ // Propertymap fuer einen Outliner Text
+ static const SfxItemPropertyMapEntry aSvxTextPortionPropertyMap[] =
+ {
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_FONT_PROPERTIES,
+ SVX_UNOEDIT_OUTLINER_PROPERTIES,
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+ return aSvxTextPortionPropertyMap;
+}
+const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet()
+{
+ static SvxItemPropertySet aSvxTextPortionPropertySet( ImplGetSvxTextPortionPropertyMap() );
+ return &aSvxTextPortionPropertySet;
+}
+
+const SfxItemPropertySet* ImplGetSvxTextPortionSfxPropertySet()
+{
+ static SfxItemPropertySet aSvxTextPortionSfxPropertySet( ImplGetSvxTextPortionPropertyMap() );
+ return &aSvxTextPortionSfxPropertySet;
+}
// ====================================================================
// helper fuer Item/Property Konvertierung
@@ -204,16 +229,16 @@ static check_me gNumRanges;
UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextRangeBase );
-SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SfxItemPropertyMap* _pMap ) throw()
-: mpEditSource(NULL) , maPropSet(_pMap)
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) throw()
+: mpEditSource(NULL) , mpPropSet(_pSet)
{
#ifdef DEBUG
gNumRanges.add(this);
#endif
}
-SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
-: maPropSet(_pMap)
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw()
+: mpPropSet(_pSet)
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -240,7 +265,7 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) th
, lang::XServiceInfo()
, text::XTextRangeCompare()
, lang::XUnoTunnel()
-, maPropSet(rRange.getPropertyMap())
+, mpPropSet(rRange.getPropertySet())
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -421,7 +446,7 @@ void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextRangeBase::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
void SAL_CALL SvxUnoTextRangeBase::setPropertyValue(const OUString& PropertyName, const uno::Any& aValue)
@@ -441,7 +466,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
CheckSelection( maSelection, pForwarder );
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName );
if ( pMap )
{
ESelection aSel( GetSelection() );
@@ -491,18 +516,18 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
+void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
{
if(!SetPropertyValueHelper( rOldSet, pMap, rValue, rNewSet, &rSelection, (SvxTextEditSource*)GetEditSource() ))
{
// Fuer Teile von zusammengesetzten Items mit mehreren Properties (z.B. Hintergrund)
// muss vorher das alte Item aus dem Dokument geholt werden
rNewSet.Put(rOldSet.Get(pMap->nWID)); // altes Item in neuen Set
- maPropSet.setPropertyValue(pMap, rValue, rNewSet);
+ mpPropSet->setPropertyValue(pMap, rValue, rNewSet);
}
}
-sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertyMap* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( uno::RuntimeException )
+sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertySimpleEntry* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( uno::RuntimeException )
{
switch( pMap->nWID )
{
@@ -606,7 +631,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName );
if( pMap )
{
SfxItemSet* pAttribs = NULL;
@@ -628,7 +653,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
+void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
{
switch( pMap->nWID )
{
@@ -669,11 +694,11 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno:
default:
if(!GetPropertyValueHelper( *((SfxItemSet*)(&rSet)), pMap, rAny, &maSelection, (SvxTextEditSource*)GetEditSource() ))
- rAny = maPropSet.getPropertyValue(pMap, rSet);
+ rAny = mpPropSet->getPropertyValue(pMap, rSet);
}
}
-sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertyMap* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
+sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
throw( uno::RuntimeException )
{
switch( pMap->nWID )
@@ -788,34 +813,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt
SfxItemSet* pOldParaSet = NULL;
SfxItemSet* pNewParaSet = NULL;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
-
- const OUString* pLastPropertyName = 0;
-
for( ; nCount; nCount--, pPropertyNames++, pValues++ )
{
- if( pLastPropertyName )
- {
- sal_Int32 nComp = pLastPropertyName->compareTo( *pPropertyNames );
- if( nComp < 0 )
- {
- if(pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
- }
- else if( nComp > 0 )
- {
- pMap = maPropSet.getPropertyMap();
- }
- else
- {
- DBG_ERROR( "svx::SvxUnoTextRangeBase::_setPropertyValues(), duplicate property in parameter sequence!" );
- }
- }
-
- pLastPropertyName = pPropertyNames;
- pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pPropertyNames );
if( pMap )
{
@@ -930,34 +930,9 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( cons
const OUString* pPropertyNames = aPropertyNames.getConstArray();
uno::Any* pValues = aValues.getArray();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
-
- const OUString* pLastPropertyName = 0;
-
for( ; nCount; nCount--, pPropertyNames++, pValues++ )
{
- if( pLastPropertyName )
- {
- sal_Int32 nComp = pLastPropertyName->compareTo( *pPropertyNames );
- if( nComp < 0 )
- {
- if(pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
- }
- else if( nComp > 0 )
- {
- pMap = maPropSet.getPropertyMap();
- }
- else
- {
- DBG_ERROR( "svx::SvxUnoTextRangeBase::_getPropertyValues(), duplicate property in parameter sequence!" );
- }
- }
-
- pLastPropertyName = pPropertyNames;
- pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pPropertyNames );
if( pMap )
{
getPropertyValue( pMap, *pValues, *pAttribs );
@@ -994,7 +969,7 @@ static sal_uInt16 aSvxUnoFontDescriptorWhichMap[] = { EE_CHAR_FONTINFO, EE_CHAR_
EE_CHAR_UNDERLINE, EE_CHAR_WEIGHT, EE_CHAR_STRIKEOUT,
EE_CHAR_WLM, 0 };
-beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropertyMap* pMap, sal_Int32 nPara)
+beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
if ( pMap )
@@ -1090,7 +1065,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const OUStr
{
OGuard aGuard( Application::GetSolarMutex() );
- return _getPropertyState(SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName ), nPara);
+ return _getPropertyState( mpPropSet->getPropertyMapEntry( PropertyName ), nPara);
}
uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextRangeBase::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
@@ -1124,22 +1099,15 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
}
sal_Bool bUnknownPropertyFound = sal_False;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
{
- pMap = SfxItemPropertyMap::GetByName(pMap, *pNames++ );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pNames++ );
if( NULL == pMap )
{
bUnknownPropertyFound = sal_True;
break;
}
-
bUnknownPropertyFound = !_getOnePropertyStates(pSet, pMap, *pState++);
-
- if (pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
}
delete pSet;
@@ -1151,7 +1119,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
return aRet;
}
-sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertyMap* pMap, beans::PropertyState& rState)
+sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, beans::PropertyState& rState)
{
sal_Bool bUnknownPropertyFound = sal_False;
if(pSet && pMap)
@@ -1252,8 +1220,8 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(const OUString& PropertyName, sa
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
- if( pMap )
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( PropertyName );
+ if ( pMap )
{
CheckSelection( maSelection, mpEditSource->GetTextForwarder() );
_setPropertyToDefault( pForwarder, pMap, nPara );
@@ -1264,7 +1232,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(const OUString& PropertyName, sa
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, const SfxItemPropertyMap* pMap, sal_Int32 nPara )
+void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara )
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
do
@@ -1314,7 +1282,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), aPropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( aPropertyName );
if( pMap )
{
SfxItemPool* pPool = pForwarder->GetPool();
@@ -1343,7 +1311,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
{
SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID);
aSet.Put(pPool->GetDefaultItem(pMap->nWID));
- return maPropSet.getPropertyValue(pMap, aSet);
+ return mpPropSet->getPropertyValue(pMap, aSet);
}
}
}
@@ -1361,9 +1329,12 @@ void SAL_CALL SvxUnoTextRangeBase::setAllPropertiesToDefault( ) throw (uno::Run
if( pForwarder )
{
- for( const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap(); pMap->pName; pMap++ )
+ PropertyEntryVector_t aEntries = mpPropSet->getPropertyMap()->getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aIt = aEntries.begin();
+ while( aIt != aEntries.end() )
{
- _setPropertyToDefault( pForwarder, pMap, -1 );
+ _setPropertyToDefault( pForwarder, &(*aIt), -1 );
+ ++aIt;
}
}
}
@@ -1613,7 +1584,7 @@ uno::Reference< uno::XInterface > SvxUnoTextRange_NewInstance()
}
SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion /* = sal_False */ ) throw()
-:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionPropertyMap() : rParent.getPropertyMap() ),
+:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionSvxPropertySet() : rParent.getPropertySet() ),
mbPortion( bPortion )
{
xParentText = (text::XText*)&rParent;
@@ -1723,21 +1694,21 @@ SvxUnoTextBase::SvxUnoTextBase() throw()
}
-SvxUnoTextBase::SvxUnoTextBase( const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextRangeBase( _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextRangeBase( _pSet )
{
}
-SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextRangeBase( pSource, _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextRangeBase( pSource, _pSet )
{
ESelection aSelection;
::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
SetSelection( aSelection );
}
-SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
-: SvxUnoTextRangeBase( pSource, _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextRangeBase( pSource, _pSet )
{
xParentText = xParent;
ESelection aSelection;
@@ -2131,17 +2102,16 @@ void SAL_CALL SvxUnoTextBase::moveTextRange( const uno::Reference< text::XTextRa
void SvxPropertyValuesToItemSet(
SfxItemSet &rItemSet,
const uno::Sequence< beans::PropertyValue > rPropertyVaules,
- const SfxItemPropertyMap &rMap,
+ const SfxItemPropertySet *pPropSet,
SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/,
USHORT nPara /*needed for WID_NUMLEVEL*/)
throw(lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
{
- SfxItemPropertySet aPropSet( &rMap );
sal_Int32 nProps = rPropertyVaules.getLength();
const beans::PropertyValue *pProps = rPropertyVaules.getConstArray();
for (sal_Int32 i = 0; i < nProps; ++i)
{
- const SfxItemPropertyMap *pEntry = SfxItemPropertyMap::GetByName( &rMap, pProps[i].Name );
+ const SfxItemPropertySimpleEntry *pEntry = pPropSet->getPropertyMap()->getByName( pProps[i].Name );
if (pEntry)
{
// Note: there is no need to take special care of the properties
@@ -2195,7 +2165,7 @@ void SvxPropertyValuesToItemSet(
}
}
else
- aPropSet.setPropertyValue( *pEntry, pProps[i].Value, rItemSet );
+ pPropSet->setPropertyValue( pProps[i].Name, pProps[i].Value, rItemSet );
}
else
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) );
@@ -2220,8 +2190,10 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph(
// set properties for new appended (now last) paragraph
ESelection aSel( nParaCount, 0, nParaCount, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxUnoOutlinerTextCursorPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nParaCount );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxUnoOutlinerTextCursorSfxPropertySet(),
+ pTextForwarder,
+ nParaCount );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
pEditSource->UpdateData();
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
@@ -2250,8 +2222,8 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph(
USHORT nPara = nParaCount - 1;
ESelection aSel( nPara, 0, nPara, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxUnoOutlinerTextCursorPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nPara );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxUnoOutlinerTextCursorSfxPropertySet(), pTextForwarder, nPara );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
pEditSource->UpdateData();
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
@@ -2288,8 +2260,8 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion(
pEditSource->UpdateData();
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxTextPortionPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nPara );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxTextPortionSfxPropertySet(), pTextForwarder, nPara );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
xRet = pRange;
@@ -2371,7 +2343,7 @@ const uno::Sequence< sal_Int8 > & SvxUnoTextBase::getUnoTunnelId() throw()
return *pSeq;
}
-SvxUnoTextBase* SvxUnoTextBase::getImplementation( uno::Reference< uno::XInterface > xInt ) throw()
+SvxUnoTextBase* SvxUnoTextBase::getImplementation( const uno::Reference< uno::XInterface >& xInt )
{
uno::Reference< lang::XUnoTunnel > xUT( xInt, uno::UNO_QUERY );
if( xUT.is() )
@@ -2399,13 +2371,13 @@ SvxUnoText::SvxUnoText( ) throw()
{
}
-SvxUnoText::SvxUnoText( const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextBase( _pMap )
+SvxUnoText::SvxUnoText( const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextBase( _pSet )
{
}
-SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
-: SvxUnoTextBase( pSource, _pMap, xParent )
+SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextBase( pSource, _pSet, xParent )
{
}
@@ -2466,7 +2438,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SvxUnoText::getImplementationId( ) throw( un
return aId;
}
-SvxUnoText* SvxUnoText::getImplementation( uno::Reference< uno::XInterface > xInt ) throw()
+SvxUnoText* SvxUnoText::getImplementation( const uno::Reference< uno::XInterface >& xInt )
{
uno::Reference< lang::XUnoTunnel > xUT( xInt, uno::UNO_QUERY );
if( xUT.is() )
@@ -2675,6 +2647,16 @@ USHORT SvxDummyTextSource::GetLineLen( USHORT, USHORT ) const
return 0;
}
+void SvxDummyTextSource::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const
+{
+ rStart = rEnd = 0;
+}
+
+USHORT SvxDummyTextSource::GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const
+{
+ return 0;
+}
+
sal_Bool SvxDummyTextSource::QuickFormatDoc( BOOL )
{
return sal_False;
diff --git a/svx/source/unoedit/unoviwou.cxx b/svx/source/unoedit/unoviwou.cxx
index aff102a09900..3826a4d6a330 100644
--- a/svx/source/unoedit/unoviwou.cxx
+++ b/svx/source/unoedit/unoviwou.cxx
@@ -35,6 +35,7 @@
#include <svx/unoviwou.hxx>
#include <svx/outliner.hxx>
+#include <svx/editeng.hxx>
#include <svx/svdotext.hxx>
diff --git a/svx/source/unogallery/makefile.mk b/svx/source/unogallery/makefile.mk
index a63b79bb6f67..a699208f4f01 100755
--- a/svx/source/unogallery/makefile.mk
+++ b/svx/source/unogallery/makefile.mk
@@ -38,14 +38,10 @@ ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
-CXXFILES= \
- unogalthemeprovider.cxx \
- unogaltheme.cxx \
- unogalitem.cxx
-
SLOFILES= \
$(SLO)$/unogalthemeprovider.obj \
$(SLO)$/unogaltheme.obj \
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index ebeeffe742b8..126f49fe0b50 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -92,7 +92,7 @@ GalleryThemeProvider::~GalleryThemeProvider()
// ------------------------------------------------------------------------------
-::rtl::OUString GalleryThemeProvider::getImplementationName_Static()
+SVX_DLLPUBLIC ::rtl::OUString GalleryThemeProvider::getImplementationName_Static()
throw()
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.gallery.GalleryThemeProvider" ) );
@@ -100,7 +100,7 @@ GalleryThemeProvider::~GalleryThemeProvider()
// ------------------------------------------------------------------------------
-uno::Sequence< ::rtl::OUString > GalleryThemeProvider::getSupportedServiceNames_Static()
+SVX_DLLPUBLIC uno::Sequence< ::rtl::OUString > GalleryThemeProvider::getSupportedServiceNames_Static()
throw()
{
uno::Sequence< ::rtl::OUString > aSeq( 1 );
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index e6f7221623fd..ab9eb5aeb36d 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -326,11 +326,29 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
}
else
{
- sal_Int32 nPathStart = 0;
- if( 0 == aURLNoPar.compareToAscii( "./", 2 ) )
- nPathStart = 2;
- if( _nPos >= nPathStart )
- rContainerStorageName = aURLNoPar.copy( nPathStart, _nPos-nPathStart);
+ //eliminate 'superfluous' slashes at start and end
+ //#i103076# load objects with all allowed xlink:href syntaxes
+ {
+ //eliminate './' at start
+ sal_Int32 nStart = 0;
+ sal_Int32 nCount = aURLNoPar.getLength();
+ if( 0 == aURLNoPar.compareToAscii( "./", 2 ) )
+ {
+ nStart = 2;
+ nCount -= 2;
+ }
+
+ //eliminate '/' at end
+ sal_Int32 nEnd = aURLNoPar.lastIndexOf( '/' );
+ if( nEnd == aURLNoPar.getLength()-1 && nEnd != (nStart-1) )
+ nCount--;
+
+ aURLNoPar = aURLNoPar.copy( nStart, nCount );
+ }
+
+ _nPos = aURLNoPar.lastIndexOf( '/' );
+ if( _nPos >= 0 )
+ rContainerStorageName = aURLNoPar.copy( 0, _nPos );
rObjectStorageName = aURLNoPar.copy( _nPos+1 );
}
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 4cc56d5ca427..7ab6a44fd3fb 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -670,17 +670,16 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
// -----------------------------------------------------------------------------
-void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos )
+void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName )
{
+ rtl::OUString aURLString( rURLStr );
::rtl::OUString aPictureStorageName, aPictureStreamName;
-
- if( ( maURLSet.find( rURLStr ) != maURLSet.end() ) )
+ if( ( maURLSet.find( aURLString ) != maURLSet.end() ) )
{
URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() );
-
while( aIter != aEnd )
{
- if( rURLStr == (*aIter).first )
+ if( aURLString == (*aIter).first )
{
maGrfURLs[ nInsertPos ].second = (*aIter).second;
aIter = aEnd;
@@ -689,7 +688,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
aIter++;
}
}
- else if( ImplGetStreamNames( rURLStr, aPictureStorageName, aPictureStreamName ) )
+ else if( ImplGetStreamNames( aURLString, aPictureStorageName, aPictureStreamName ) )
{
URLPair& rURLPair = maGrfURLs[ nInsertPos ];
@@ -718,22 +717,23 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
String aStreamName( aGraphicObjectId );
Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() );
const GfxLink aGfxLink( aGraphic.GetLink() );
+ String aExtension;
if( aGfxLink.GetDataSize() )
{
switch( aGfxLink.GetType() )
{
- case( GFX_LINK_TYPE_EPS_BUFFER ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_GIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_JPG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_PNG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_TIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_WMF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_MET ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
- case( GFX_LINK_TYPE_NATIVE_PCT ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
+ case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
default:
- aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
+ aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
break;
}
}
@@ -742,30 +742,52 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
if( aGrfObject.GetType() == GRAPHIC_BITMAP )
{
if( aGrfObject.IsAnimated() )
- aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) );
+ aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) );
else
- aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) );
+ aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) );
}
else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE )
{
// SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm
GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() );
if ( ImplCheckForEPS( rMtf ) )
- aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) );
+ aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) );
else
- aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
+ aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
}
}
+ rtl::OUString aURLEntry;
+ const String sPictures( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) );
+
+ if ( rRequestedFileName.getLength() )
+ {
+ aURLEntry = sPictures;
+ aURLEntry += rRequestedFileName;
+ aURLEntry += aExtension;
+
+ URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() );
+ while( aIter != aEnd )
+ {
+ if( aURLEntry == (*aIter).second )
+ break;
+ aIter++;
+ }
+ if ( aIter == aEnd )
+ aStreamName = rRequestedFileName;
+ }
+
+ aStreamName += aExtension;
+
if( mbDirect && aStreamName.Len() )
ImplWriteGraphic( aPictureStorageName, aStreamName, aGraphicObjectId );
- rURLPair.second = String( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) );
+ rURLPair.second = sPictures;
rURLPair.second += aStreamName;
}
}
- maURLSet.insert( rURLStr );
+ maURLSet.insert( aURLString );
}
}
@@ -820,14 +842,45 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper )
// -----------------------------------------------------------------------------
// XGraphicObjectResolver
-::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& aURL )
+::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& rURL )
throw(uno::RuntimeException)
{
::osl::MutexGuard aGuard( maMutex );
const sal_Int32 nIndex = maGrfURLs.size();
+ rtl::OUString aURL( rURL );
+ rtl::OUString aUserData;
+ rtl::OUString aRequestedFileName;
+
+ sal_Int32 nUser = rURL.indexOf( '?', 0 );
+ if ( nUser >= 0 )
+ {
+ aURL = rtl::OUString( rURL.copy( 0, nUser ) );
+ nUser++;
+ aUserData = rURL.copy( nUser, rURL.getLength() - nUser );
+ }
+ if ( aUserData.getLength() )
+ {
+ sal_Int32 nIndex2 = 0;
+ do
+ {
+ rtl::OUString aToken = aUserData.getToken( 0, ';', nIndex2 );
+ sal_Int32 n = aToken.indexOf( '=' );
+ if ( ( n > 0 ) && ( ( n + 1 ) < aToken.getLength() ) )
+ {
+ rtl::OUString aParam( aToken.copy( 0, n ) );
+ rtl::OUString aValue( aToken.copy( n + 1, aToken.getLength() - ( n + 1 ) ) );
+
+ const rtl::OUString sRequestedName( RTL_CONSTASCII_USTRINGPARAM("requestedName") );
+ if ( aParam.match( sRequestedName ) )
+ aRequestedFileName = aValue;
+ }
+ }
+ while ( nIndex2 >= 0 );
+ }
+
maGrfURLs.push_back( ::std::make_pair( aURL, ::rtl::OUString() ) );
- ImplInsertGraphicURL( aURL, nIndex );
+ ImplInsertGraphicURL( aURL, nIndex, aRequestedFileName );
return maGrfURLs[ nIndex ].second;
}
diff --git a/svx/source/xml/xmltxtexp.cxx b/svx/source/xml/xmltxtexp.cxx
index 906f08c91989..5db6cc809bce 100644
--- a/svx/source/xml/xmltxtexp.cxx
+++ b/svx/source/xml/xmltxtexp.cxx
@@ -247,7 +247,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( co
return uno::Reference< uno::XInterface >(
SvxCreateNumRule( (SdrModel*)NULL ), uno::UNO_QUERY );
}
- if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) )
+ if ( (0 == aServiceSpecifier.reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.textfield.DateTime")))
+ || (0 == aServiceSpecifier.reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime")))
+ )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( ID_EXT_DATEFIELD );
}
@@ -395,7 +399,7 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
{
SvxEditEngineSource aEditSource( pEditEngine );
- static const SfxItemPropertyMap SvxXMLTextExportComponentPropertyMap[] =
+ static const SfxItemPropertyMapEntry SvxXMLTextExportComponentPropertyMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -406,8 +410,9 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
SVX_UNOEDIT_PARA_PROPERTIES,
{0,0,0,0,0,0}
};
+ static SvxItemPropertySet aSvxXMLTextExportComponentPropertySet( SvxXMLTextExportComponentPropertyMap );
- SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, SvxXMLTextExportComponentPropertyMap, mxText );
+ SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, &aSvxXMLTextExportComponentPropertySet, mxText );
pUnoText->SetSelection( rSel );
mxText = pUnoText;
diff --git a/svx/source/xml/xmltxtimp.cxx b/svx/source/xml/xmltxtimp.cxx
index 7c7059bda563..9bbe425dce66 100644
--- a/svx/source/xml/xmltxtimp.cxx
+++ b/svx/source/xml/xmltxtimp.cxx
@@ -157,7 +157,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
{
SvxEditEngineSource aEditSource( &rEditEngine );
- static const SfxItemPropertyMap SvxXMLTextImportComponentPropertyMap[] =
+ static const SfxItemPropertyMapEntry SvxXMLTextImportComponentPropertyMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -165,9 +165,10 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
SVX_UNOEDIT_PARA_PROPERTIES,
{0,0,0,0,0,0}
};
+ static SvxItemPropertySet aSvxXMLTextImportComponentPropertySet( SvxXMLTextImportComponentPropertyMap );
uno::Reference<text::XText > xParent;
- SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, SvxXMLTextImportComponentPropertyMap, xParent );
+ SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, &aSvxXMLTextImportComponentPropertySet, xParent );
pUnoText->SetSelection( rSel );
uno::Reference<text::XText > xText( pUnoText );
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index e211c98f6834..70e8af36c838 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -394,7 +394,7 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const uno::Reference< X
if( aMedium.IsStorage() )
{
- uno::Reference < embed::XStorage > xStorage( aMedium.GetStorage(), uno::UNO_QUERY_THROW );
+ uno::Reference < embed::XStorage > xStorage( aMedium.GetStorage( sal_False ), uno::UNO_QUERY_THROW );
const String aContentStmName( RTL_CONSTASCII_USTRINGPARAM( "Content.xml" ) );
xIStm.set( xStorage->openStreamElement( aContentStmName, embed::ElementModes::READ ), uno::UNO_QUERY_THROW );
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 21dd7fcb1acd..6fae754662ee 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -66,6 +66,8 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/vector/b2dvector.hxx>
+#include <stdio.h>
+
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -108,7 +110,7 @@ long ScaleMetricValue( long nVal, long nMul, long nDiv )
/*************************************************************************
|*
-|* NameOrIndex::NameOrIndex(USHORT nWhich, long nIndex)
+|* NameOrIndex::NameOrIndex(USHORT nWhich, INT32 nIndex)
|*
|* Beschreibung
|* Ersterstellung 14.11.94
@@ -116,7 +118,7 @@ long ScaleMetricValue( long nVal, long nMul, long nDiv )
|*
*************************************************************************/
-NameOrIndex::NameOrIndex(USHORT _nWhich, long nIndex) :
+NameOrIndex::NameOrIndex(USHORT _nWhich, INT32 nIndex) :
SfxStringItem(_nWhich, aNameOrIndexEmptyString),
nPalIndex(nIndex)
{
@@ -134,7 +136,7 @@ NameOrIndex::NameOrIndex(USHORT _nWhich, long nIndex) :
NameOrIndex::NameOrIndex(USHORT _nWhich, const XubString& rName) :
SfxStringItem(_nWhich, rName),
- nPalIndex((long)-1)
+ nPalIndex(-1)
{
}
@@ -230,7 +232,7 @@ SfxPoolItem* NameOrIndex::Create(SvStream& rIn, USHORT /*nVer*/) const
SvStream& NameOrIndex::Store( SvStream& rOut, USHORT nItemVersion ) const
{
SfxStringItem::Store( rOut, nItemVersion );
- rOut << (INT32)nPalIndex;
+ rOut << nPalIndex;
return rOut;
}
@@ -369,11 +371,11 @@ TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
/*************************************************************************
|*
-|* XColorItem::XColorItem(USHORT nWhich, long nIndex, const Color& rTheColor)
+|* XColorItem::XColorItem(USHORT nWhich, INT32 nIndex, const Color& rTheColor)
|*
\************************************************************************/
-XColorItem::XColorItem(USHORT _nWhich, long nIndex, const Color& rTheColor) :
+XColorItem::XColorItem(USHORT _nWhich, INT32 nIndex, const Color& rTheColor) :
NameOrIndex(_nWhich, nIndex),
aColor(rTheColor)
{
@@ -884,7 +886,7 @@ TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
/*************************************************************************
|*
-|* XLineDashItem::XLineDashItem(long nIndex, const XDash& rTheDash)
+|* XLineDashItem::XLineDashItem(INT32 nIndex, const XDash& rTheDash)
|*
|* Beschreibung
|* Ersterstellung 15.11.94
@@ -892,7 +894,7 @@ TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
|*
*************************************************************************/
-XLineDashItem::XLineDashItem(long nIndex, const XDash& rTheDash) :
+XLineDashItem::XLineDashItem(INT32 nIndex, const XDash& rTheDash) :
NameOrIndex(XATTR_LINEDASH, nIndex),
aDash(rTheDash)
{
@@ -1501,7 +1503,7 @@ TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
/*************************************************************************
|*
-|* XLineColorItem::XLineColorItem(long nIndex, const Color& rTheColor)
+|* XLineColorItem::XLineColorItem(INT32 nIndex, const Color& rTheColor)
|*
|* Beschreibung
|* Ersterstellung 15.11.94
@@ -1509,7 +1511,7 @@ TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
|*
*************************************************************************/
-XLineColorItem::XLineColorItem(long nIndex, const Color& rTheColor) :
+XLineColorItem::XLineColorItem(INT32 nIndex, const Color& rTheColor) :
XColorItem(XATTR_LINECOLOR, nIndex, rTheColor)
{
}
@@ -1720,7 +1722,7 @@ TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
/*************************************************************************
|*
-|* XLineStartItem::XLineStartItem(long nIndex)
+|* XLineStartItem::XLineStartItem(INT32 nIndex)
|*
|* Beschreibung
|* Ersterstellung 15.11.94
@@ -1728,7 +1730,7 @@ TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
|*
*************************************************************************/
-XLineStartItem::XLineStartItem(long nIndex)
+XLineStartItem::XLineStartItem(INT32 nIndex)
: NameOrIndex(XATTR_LINESTART, nIndex)
{
}
@@ -2192,7 +2194,7 @@ TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
/*************************************************************************
|*
-|* XLineEndItem::XLineEndItem(long nIndex)
+|* XLineEndItem::XLineEndItem(INT32 nIndex)
|*
|* Beschreibung
|* Ersterstellung 15.11.94
@@ -2200,7 +2202,7 @@ TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
|*
*************************************************************************/
-XLineEndItem::XLineEndItem(long nIndex)
+XLineEndItem::XLineEndItem(INT32 nIndex)
: NameOrIndex(XATTR_LINEEND, nIndex)
{
}
@@ -2664,7 +2666,7 @@ TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem);
/*************************************************************************
|*
-|* XLineStartWidthItem::XLineStartWidthItem(long nWidth)
+|* XLineStartWidthItem::XLineStartWidthItem(INT32 nWidth)
|*
|* Beschreibung
|* Ersterstellung 15.11.94
@@ -3249,7 +3251,7 @@ TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
/*************************************************************************
|*
-|* XFillColorItem::XFillColorItem(long nIndex, const Color& rTheColor)
+|* XFillColorItem::XFillColorItem(INT32 nIndex, const Color& rTheColor)
|*
|* Beschreibung
|* Ersterstellung 15.11.94
@@ -3257,7 +3259,7 @@ TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
|*
*************************************************************************/
-XFillColorItem::XFillColorItem(long nIndex, const Color& rTheColor) :
+XFillColorItem::XFillColorItem(INT32 nIndex, const Color& rTheColor) :
XColorItem(XATTR_FILLCOLOR, nIndex, rTheColor)
{
}
@@ -3372,7 +3374,7 @@ sal_Bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE
// -----------------------------
TYPEINIT1_AUTOFACTORY(XSecondaryFillColorItem, XColorItem);
-XSecondaryFillColorItem::XSecondaryFillColorItem(long nIndex, const Color& rTheColor) :
+XSecondaryFillColorItem::XSecondaryFillColorItem(INT32 nIndex, const Color& rTheColor) :
XColorItem(XATTR_SECONDARYFILLCOLOR, nIndex, rTheColor)
{
}
@@ -3510,7 +3512,7 @@ TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
/*************************************************************************
|*
-|* XFillGradientItem::XFillGradientItem(long nIndex,
+|* XFillGradientItem::XFillGradientItem(INT32 nIndex,
|* const XGradient& rTheGradient)
|*
|* Beschreibung
@@ -3519,7 +3521,7 @@ TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
|*
*************************************************************************/
-XFillGradientItem::XFillGradientItem(long nIndex,
+XFillGradientItem::XFillGradientItem(INT32 nIndex,
const XGradient& rTheGradient) :
NameOrIndex(XATTR_FILLGRADIENT, nIndex),
aGradient(rTheGradient)
@@ -4042,7 +4044,7 @@ XFillFloatTransparenceItem::XFillFloatTransparenceItem() :
//------------------------------------------------------------------------
-XFillFloatTransparenceItem::XFillFloatTransparenceItem( long nIndex, const XGradient& rGradient, BOOL bEnable ) :
+XFillFloatTransparenceItem::XFillFloatTransparenceItem( INT32 nIndex, const XGradient& rGradient, BOOL bEnable ) :
XFillGradientItem ( nIndex, rGradient ),
bEnabled ( bEnable )
{
@@ -4246,7 +4248,7 @@ TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex);
/*************************************************************************
|*
-|* XFillHatchItem::XFillHatchItem(long nIndex,
+|* XFillHatchItem::XFillHatchItem(INT32 nIndex,
|* const XHatch& rTheHatch)
|*
|* Beschreibung
@@ -4255,7 +4257,7 @@ TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex);
|*
*************************************************************************/
-XFillHatchItem::XFillHatchItem(long nIndex,
+XFillHatchItem::XFillHatchItem(INT32 nIndex,
const XHatch& rTheHatch) :
NameOrIndex(XATTR_FILLHATCH, nIndex),
aHatch(rTheHatch)
@@ -5258,7 +5260,7 @@ TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem);
|*
*************************************************************************/
-XFormTextShadowColorItem::XFormTextShadowColorItem(long nIndex,
+XFormTextShadowColorItem::XFormTextShadowColorItem(INT32 nIndex,
const Color& rTheColor) :
XColorItem(XATTR_FORMTXTSHDWCOLOR, nIndex, rTheColor)
{
diff --git a/svx/util/hidother.src b/svx/util/hidother.src
index 9da8c59bcd63..6ef00e2640a2 100644
--- a/svx/util/hidother.src
+++ b/svx/util/hidother.src
@@ -58,109 +58,6 @@ hidspecial HID_TPCOLOR_CMYK_2 { HelpID = HID_TPCOLOR_CMYK_2; };
hidspecial HID_TPCOLOR_CMYK_3 { HelpID = HID_TPCOLOR_CMYK_3; };
hidspecial HID_REDLINING_FILTER_CB_ACTION { HelpID = HID_REDLINING_FILTER_CB_ACTION; };
-hidspecial HID_PROP_GROUPBOX { HelpID = HID_PROP_GROUPBOX; };
-hidspecial HID_PROP_CONTROLSOURCE { HelpID = HID_PROP_CONTROLSOURCE; };
-hidspecial HID_PROP_NAME { HelpID = HID_PROP_NAME; };
-hidspecial HID_PROP_TABINDEX { HelpID = HID_PROP_TABINDEX; };
-hidspecial HID_PROP_MASTERFIELDS { HelpID = HID_PROP_MASTERFIELDS; };
-hidspecial HID_PROP_SLAVEFIELDS { HelpID = HID_PROP_SLAVEFIELDS; };
-hidspecial HID_PROP_DATASOURCE { HelpID = HID_PROP_DATASOURCE; };
-hidspecial HID_PROP_CURSORSOURCE { HelpID = HID_PROP_CURSORSOURCE; };
-hidspecial HID_PROP_CURSORSOURCETYPE { HelpID = HID_PROP_CURSORSOURCETYPE; };
-hidspecial HID_PROP_ESCAPE_PROCESSING { HelpID = HID_PROP_ESCAPE_PROCESSING; };
-hidspecial HID_PROP_IMAGE_ALIGN { HelpID = HID_PROP_IMAGE_ALIGN; };
-hidspecial HID_PROP_CURSORTYPE { HelpID = HID_PROP_CURSORTYPE; };
-hidspecial HID_PROP_READONLY { HelpID = HID_PROP_READONLY; };
-hidspecial HID_PROP_DATAENTRY { HelpID = HID_PROP_DATAENTRY; };
-hidspecial HID_PROP_NAVIGATION { HelpID = HID_PROP_NAVIGATION; };
-hidspecial HID_PROP_CYCLE { HelpID = HID_PROP_CYCLE; };
-hidspecial HID_PROP_ALLOW_ADDITIONS { HelpID = HID_PROP_ALLOW_ADDITIONS ; };
-hidspecial HID_PROP_ALLOW_EDITS { HelpID = HID_PROP_ALLOW_EDITS ; };
-hidspecial HID_PROP_ALLOW_DELETIONS { HelpID = HID_PROP_ALLOW_DELETIONS ; };
-hidspecial HID_PROP_DIRTY { HelpID = HID_PROP_DIRTY; };
-hidspecial HID_PROP_OLDVALUE { HelpID = HID_PROP_OLDVALUE; };
-hidspecial HID_PROP_LOCKED { HelpID = HID_PROP_LOCKED; };
-hidspecial HID_PROP_FORMATKEY { HelpID = HID_PROP_FORMATKEY ; };
-hidspecial HID_PROP_REQUIRED { HelpID = HID_PROP_REQUIRED; };
-hidspecial HID_PROP_SCALE { HelpID = HID_PROP_SCALE; };
-hidspecial HID_PROP_SIZE { HelpID = HID_PROP_SIZE; };
-hidspecial HID_PROP_UNIQUE { HelpID = HID_PROP_UNIQUE; };
-hidspecial HID_PROP_CLASSID { HelpID = HID_PROP_CLASSID; };
-hidspecial HID_PROP_LEFT { HelpID = HID_PROP_LEFT; };
-hidspecial HID_PROP_RIGHT { HelpID = HID_PROP_RIGHT; };
-hidspecial HID_PROP_HEIGHT { HelpID = HID_PROP_HEIGHT; };
-hidspecial HID_PROP_WIDTH { HelpID = HID_PROP_WIDTH; };
-hidspecial HID_PROP_BOUNDCOLUMN { HelpID = HID_PROP_BOUNDCOLUMN; };
-hidspecial HID_PROP_LISTSOURCETYPE { HelpID = HID_PROP_LISTSOURCETYPE; };
-hidspecial HID_PROP_LISTSOURCE { HelpID = HID_PROP_LISTSOURCE; };
-hidspecial HID_PROP_LISTINDEX { HelpID = HID_PROP_LISTINDEX; };
-hidspecial HID_PROP_TEXT { HelpID = HID_PROP_TEXT; };
-hidspecial HID_PROP_LABEL { HelpID = HID_PROP_LABEL; };
-hidspecial HID_PROP_STRINGITEMLIST { HelpID = HID_PROP_STRINGITEMLIST; };
-hidspecial HID_PROP_SEARCHING { HelpID = HID_PROP_SEARCHING; };
-hidspecial HID_PROP_FONT { HelpID = HID_PROP_FONT; };
-hidspecial HID_PROP_ROWHEIGHT { HelpID = HID_PROP_ROWHEIGHT; };
-hidspecial HID_PROP_BACKGROUNDCOLOR { HelpID = HID_PROP_BACKGROUNDCOLOR ; };
-hidspecial HID_PROP_FILLCOLOR { HelpID = HID_PROP_FILLCOLOR; };
-hidspecial HID_PROP_TEXTCOLOR { HelpID = HID_PROP_TEXTCOLOR; };
-hidspecial HID_PROP_LINECOLOR { HelpID = HID_PROP_LINECOLOR; };
-hidspecial HID_PROP_BORDER { HelpID = HID_PROP_BORDER; };
-hidspecial HID_PROP_ALIGN { HelpID = HID_PROP_ALIGN; };
-hidspecial HID_PROP_DROPDOWN { HelpID = HID_PROP_DROPDOWN; };
-hidspecial HID_PROP_MULTILINE { HelpID = HID_PROP_MULTILINE; };
-hidspecial HID_PROP_HSCROLL { HelpID = HID_PROP_HSCROLL; };
-hidspecial HID_PROP_VSCROLL { HelpID = HID_PROP_VSCROLL; };
-hidspecial HID_PROP_TABSTOP { HelpID = HID_PROP_TABSTOP; };
-hidspecial HID_PROP_REFVALUE { HelpID = HID_PROP_REFVALUE; };
-hidspecial HID_PROP_BUTTONTYPE { HelpID = HID_PROP_BUTTONTYPE; };
-hidspecial HID_PROP_SUBMIT_ACTION { HelpID = HID_PROP_SUBMIT_ACTION; };
-hidspecial HID_PROP_SUBMIT_METHOD { HelpID = HID_PROP_SUBMIT_METHOD; };
-hidspecial HID_PROP_SUBMIT_ENCODING { HelpID = HID_PROP_SUBMIT_ENCODING; };
-hidspecial HID_PROP_DEFAULTVALUE { HelpID = HID_PROP_DEFAULTVALUE; };
-hidspecial HID_PROP_SUBMIT_TARGET { HelpID = HID_PROP_SUBMIT_TARGET; };
-hidspecial HID_PROP_DEFAULT_CHECKED { HelpID = HID_PROP_DEFAULT_CHECKED; };
-hidspecial HID_PROP_IMAGE_URL { HelpID = HID_PROP_IMAGE_URL; };
-hidspecial HID_PROP_DEFAULT_SELECT_SEQ { HelpID = HID_PROP_DEFAULT_SELECT_SEQ; };
-hidspecial HID_PROP_MULTISELECTION { HelpID = HID_PROP_MULTISELECTION; };
-
-hidspecial HID_PROP_DATE { HelpID = HID_PROP_DATE; };
-hidspecial HID_PROP_DATEMIN { HelpID = HID_PROP_DATEMIN; };
-hidspecial HID_PROP_DATEMAX { HelpID = HID_PROP_DATEMAX; };
-hidspecial HID_PROP_DATEFORMAT { HelpID = HID_PROP_DATEFORMAT; };
-hidspecial HID_PROP_TIME { HelpID = HID_PROP_TIME; };
-hidspecial HID_PROP_TIMEMIN { HelpID = HID_PROP_TIMEMIN; };
-hidspecial HID_PROP_TIMEMAX { HelpID = HID_PROP_TIMEMAX; };
-hidspecial HID_PROP_TIMEFORMAT { HelpID = HID_PROP_TIMEFORMAT; };
-hidspecial HID_PROP_VALUEMIN { HelpID = HID_PROP_VALUEMIN; };
-hidspecial HID_PROP_VALUEMAX { HelpID = HID_PROP_VALUEMAX; };
-hidspecial HID_PROP_VALUESTEP { HelpID = HID_PROP_VALUESTEP; };
-hidspecial HID_PROP_CURRENCYSYMBOL { HelpID = HID_PROP_CURRENCYSYMBOL; };
-hidspecial HID_PROP_EDITMASK { HelpID = HID_PROP_EDITMASK; };
-hidspecial HID_PROP_LITERALMASK { HelpID = HID_PROP_LITERALMASK; };
-hidspecial HID_PROP_ENABLED { HelpID = HID_PROP_ENABLED; };
-hidspecial HID_PROP_AUTOCOMPLETE { HelpID = HID_PROP_AUTOCOMPLETE; };
-hidspecial HID_PROP_LINECOUNT { HelpID = HID_PROP_LINECOUNT; };
-hidspecial HID_PROP_MAXTEXTLEN { HelpID = HID_PROP_MAXTEXTLEN; };
-hidspecial HID_PROP_SPIN { HelpID = HID_PROP_SPIN; };
-hidspecial HID_PROP_STRICTFORMAT { HelpID = HID_PROP_STRICTFORMAT; };
-hidspecial HID_PROP_SHOWTHOUSANDSEP { HelpID = HID_PROP_SHOWTHOUSANDSEP; };
-hidspecial HID_PROP_TARGET_URL { HelpID = HID_PROP_TARGET_URL; };
-hidspecial HID_PROP_TARGET_FRAME { HelpID = HID_PROP_TARGET_FRAME; };
-hidspecial HID_PROP_TAG { HelpID = HID_PROP_TAG; };
-hidspecial HID_PROP_ECHO_CHAR { HelpID = HID_PROP_ECHO_CHAR; };
-hidspecial HID_PROP_EMPTY_IS_NULL { HelpID = HID_PROP_EMPTY_IS_NULL; };
-hidspecial HID_PROP_DECIMAL_ACCURACY { HelpID = HID_PROP_DECIMAL_ACCURACY; };
-hidspecial HID_PROP_DEFAULT_BUTTON { HelpID = HID_PROP_DEFAULT_BUTTON; };
-hidspecial HID_PROP_HIDDEN_VALUE { HelpID = HID_PROP_HIDDEN_VALUE; };
-hidspecial HID_PROP_TRISTATE { HelpID =HID_PROP_TRISTATE; };
-hidspecial HID_PROP_NAVIGATIONBAR { HelpID =HID_PROP_NAVIGATIONBAR; };
-hidspecial HID_PROP_FILTER_CRITERIA { HelpID =HID_PROP_FILTER_CRITERIA; };
-hidspecial HID_PROP_SORT_CRITERIA { HelpID =HID_PROP_SORT_CRITERIA; };
-hidspecial HID_PROP_DEFAULT_LONG_VALUE { HelpID =HID_PROP_DEFAULT_LONG_VALUE; };
-hidspecial HID_PROP_DEFAULT_TIME { HelpID =HID_PROP_DEFAULT_TIME; };
-hidspecial HID_PROP_DEFAULT_DATE { HelpID =HID_PROP_DEFAULT_DATE; };
-hidspecial HID_PROP_HELPTEXT { HelpID = HID_PROP_HELPTEXT ;};
-
hidspecial HID_REDLINING_DLG { HelpID = HID_REDLINING_DLG; };
hidspecial HID_REDLINING_EDIT { HelpID = HID_REDLINING_EDIT; };
hidspecial HID_REDLINING_PREV { HelpID = HID_REDLINING_PREV; };
@@ -173,7 +70,6 @@ hidspecial HID_FIELD_SEL { HelpID =HID_FIELD_SEL
hidspecial HID_FIELD_SEL_WIN { HelpID =HID_FIELD_SEL_WIN ;};
hidspecial HID_FILTER_NAVIGATOR { HelpID =HID_FILTER_NAVIGATOR ;};
hidspecial HID_FILTER_NAVIGATOR_WIN { HelpID =HID_FILTER_NAVIGATOR_WIN ;};
-hidspecial HID_PROP_PRINTABLE { HelpID =HID_PROP_PRINTABLE ;};
hidspecial HID_FM_PROPDLG_TABCTR { HelpID =HID_FM_PROPDLG_TABCTR ;};
hidspecial HID_FM_PROPDLG_TAB_GENERAL { HelpID =HID_FM_PROPDLG_TAB_GENERAL;};
@@ -185,9 +81,6 @@ hidspecial HID_VALUESET_BULLET { HelpID = HID_VALUESET_BULLET ;};
hidspecial HID_VALUESET_NUM { HelpID = HID_VALUESET_NUM ;};
hidspecial HID_VALUESET_NUMBMP { HelpID = HID_VALUESET_NUMBMP ;};
-hidspecial HID_PROP_HELPURL { HelpID = HID_PROP_HELPURL ;};
-hidspecial HID_PROP_RECORDMARKER { HelpID = HID_PROP_RECORDMARKER ;};
-
hidspecial HID_OPTPATH_HEADERBAR { HelpId = HID_OPTPATH_HEADERBAR ;};
hidspecial HID_OPTCOOKIES_HEADERBAR { HelpId = HID_OPTCOOKIES_HEADERBAR ;};
@@ -200,11 +93,6 @@ hidspecial HID_TABORDER_CONTROLS { HelpId = HID_TABORDER_CONTROLS
hidspecial HID_POPUP_LINEEND { HelpId = HID_POPUP_LINEEND ;};
hidspecial HID_POPUP_LINEEND_CTRL { HelpId = HID_POPUP_LINEEND_CTRL ;};
-hidspecial HID_PROP_EFFECTIVEMIN { HelpId = HID_PROP_EFFECTIVEMIN ;};
-hidspecial HID_PROP_EFFECTIVEMAX { HelpId = HID_PROP_EFFECTIVEMAX ;};
-hidspecial HID_PROP_EFFECTIVEDEFAULT { HelpId = HID_PROP_EFFECTIVEDEFAULT ;};
-hidspecial HID_PROP_CONTROLLABEL { HelpId = HID_PROP_CONTROLLABEL ;};
-
hidspecial HID_GRID_TRAVEL_FIRST { HelpID = HID_GRID_TRAVEL_FIRST ;};
hidspecial HID_GRID_TRAVEL_PREV { HelpID = HID_GRID_TRAVEL_PREV ;};
hidspecial HID_GRID_TRAVEL_NEXT { HelpID = HID_GRID_TRAVEL_NEXT ;};
@@ -224,9 +112,6 @@ hidspecial HID_HYPERDLG_INET_PATH { HelpID = HID_HYPERDLG_INET_PATH ;}
hidspecial HID_HYPERDLG_MAIL_PATH { HelpID = HID_HYPERDLG_MAIL_PATH ;};
hidspecial HID_HYPERDLG_DOC_PATH { HelpID = HID_HYPERDLG_DOC_PATH ;};
-hidspecial HID_PROP_FILTERPROPOSAL { HelpID = HID_PROP_FILTERPROPOSAL ;};
-hidspecial HID_PROP_CURRSYM_POSITION { HelpID = HID_PROP_CURRSYM_POSITION ;};
-
//HID_AUTOCORR_HELP_START
#define HID_AUTOCORR_HELP_WORD HID_AUTOCORR_HELP_START+0
#define HID_AUTOCORR_HELP_SENT HID_AUTOCORR_HELP_START+1
@@ -507,4 +392,5 @@ hidspecial HID_MACRO_HEADERTABLISTBOX { HelpID = HID_MACRO_HEADERTABLI
hidspecial HID_PASTE_DLG { HelpId = HID_PASTE_DLG; };
hidspecial HID_LINKDLG_TABLB { HelpId = HID_LINKDLG_TABLB; };
+hidspecial HID_OPTIONS_JAVA_LIST { HelpId = HID_OPTIONS_JAVA_LIST; };
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
index f3e180140cdd..3dcf5ca250f3 100644
--- a/svx/util/makefile.mk
+++ b/svx/util/makefile.mk
@@ -52,11 +52,6 @@ RSCLOCINC+=-I$(PRJ)$/source$/svdraw
LIB1TARGET= $(SLB)$/$(TARGET).lib
LIB1FILES=\
- $(SLB)$/animation.lib \
- $(SLB)$/overlay.lib \
- $(SLB)$/attribute.lib \
- $(SLB)$/primitive2d.lib \
- $(SLB)$/primitive3d.lib \
$(SLB)$/svdraw.lib \
$(SLB)$/form.lib
@@ -67,10 +62,6 @@ LIB1FILES+=$(SLB)$/ibrwimp.lib
LIB2TARGET= $(SLB)$/$(TARGET)_2.lib
LIB2FILES=\
$(SLB)$/items.lib \
- $(SLB)$/svxlink.lib \
- $(SLB)$/svxrtf.lib \
- $(SLB)$/editeng.lib \
- $(SLB)$/outliner.lib \
$(SLB)$/dialogs.lib \
$(SLB)$/mnuctrls.lib \
$(SLB)$/options.lib \
@@ -83,40 +74,112 @@ LIB3TARGET= $(SLB)$/$(TARGET)_3.lib
LIB3FILES=\
$(SLB)$/unodraw.lib \
$(SLB)$/unogallery.lib\
- $(SLB)$/gal.lib \
$(SLB)$/accessibility.lib \
- $(SLB)$/customshapes.lib\
- $(SLB)$/toolbars.lib \
- $(SLB)$/properties.lib \
- $(SLB)$/contact.lib \
- $(SLB)$/event.lib
+ $(SLB)$/customshapes.lib
LIB4TARGET= $(SLB)$/$(TARGET)_4.lib
LIB4FILES=\
$(SLB)$/fmcomp.lib \
$(SLB)$/engine3d.lib \
- $(SLB)$/msfilter.lib \
- $(SLB)$/xout.lib \
- $(SLB)$/xml.lib \
$(SLB)$/table.lib
+# Objects needed for the svxcore library.
+LIB5TARGET= $(SLB)$/$(TARGET)_5.lib
+LIB5FILES=\
+ $(SLB)$/accessibility-core.lib \
+ $(SLB)$/animation.lib \
+ $(SLB)$/attribute.lib \
+ $(SLB)$/contact.lib \
+ $(SLB)$/customshapes-core.lib \
+ $(SLB)$/dialogs-core.lib \
+ $(SLB)$/editeng.lib \
+ $(SLB)$/engine3d-core.lib \
+ $(SLB)$/event.lib \
+ $(SLB)$/fmcomp-core.lib \
+ $(SLB)$/form-core.lib \
+ $(SLB)$/gal.lib \
+ $(SLB)$/items-core.lib \
+ $(SLB)$/msfilter-core.lib \
+ $(SLB)$/options-core.lib
+
+LIB6TARGET= $(SLB)$/$(TARGET)_6.lib
+LIB6FILES=\
+ $(SLB)$/outliner.lib \
+ $(SLB)$/overlay.lib \
+ $(SLB)$/primitive2d.lib \
+ $(SLB)$/primitive3d.lib \
+ $(SLB)$/properties.lib \
+ $(SLB)$/svdraw-core.lib \
+ $(SLB)$/svxlink.lib \
+ $(SLB)$/svxrtf-core.lib \
+ $(SLB)$/table-core.lib \
+ $(SLB)$/tbxctrls-core.lib \
+ $(SLB)$/toolbars.lib \
+ $(SLB)$/unodraw-core.lib \
+ $(SLB)$/unoedit-core.lib \
+ $(SLB)$/xml.lib \
+ $(SLB)$/xout.lib
+
+# Objects needed for the svxmsfilter library.
+LIB7TARGET= $(SLB)$/$(TARGET)_7.lib
+LIB7FILES=\
+ $(SLB)$/msfilter-msfilter.lib \
+ $(SLB)$/svdraw-msfilter.lib \
+ $(SLB)$/svxrtf.lib
+
HELPIDFILES= ..$/inc$/helpid.hrc
-# svx
-SHL1TARGET= svx$(DLLPOSTFIX)
-SHL1IMPLIB= i$(TARGET)
+# svxcore
+SHL1TARGET= svxcore$(DLLPOSTFIX)
+SHL1IMPLIB= isvxcore
SHL1USE_EXPORTS=name
+SHL1LIBS= $(LIB5TARGET) $(LIB6TARGET)
-SHL1LIBS= $(LIB1TARGET) $(LIB2TARGET) $(LIB3TARGET) $(LIB4TARGET)
SHL1STDLIBS= \
- $(AVMEDIALIB) \
+ $(AVMEDIALIB) \
+ $(SFX2LIB) \
+ $(XMLOFFLIB) \
+ $(GOODIESLIB) \
+ $(BASEGFXLIB) \
+ $(DRAWINGLAYERLIB) \
+ $(LNGLIB) \
+ $(BASICLIB) \
+ $(SVTOOLLIB) \
+ $(TKLIB) \
+ $(VCLLIB) \
+ $(SVLLIB) \
+ $(SOTLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(I18NPAPERLIB) \
+ $(COMPHELPERLIB) \
+ $(UCBHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(VOSLIB) \
+ $(SALLIB) \
+ $(ICUUCLIB)
+
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+DEF1NAME= $(SHL1TARGET)
+DEFLIB1NAME=$(TARGET)_5 $(TARGET)_6
+
+# svx
+SHL2TARGET= svx$(DLLPOSTFIX)
+SHL2IMPLIB= i$(TARGET)
+SHL2USE_EXPORTS=name
+SHL2DEPN=$(SHL1TARGETN)
+
+SHL2LIBS= $(LIB1TARGET) $(LIB2TARGET) $(LIB3TARGET) $(LIB4TARGET)
+SHL2STDLIBS= \
+ $(SVXCORELIB) \
$(SFX2LIB) \
$(XMLOFFLIB) \
$(GOODIESLIB) \
$(BASEGFXLIB) \
$(DRAWINGLAYERLIB) \
$(BASICLIB) \
- $(LNGLIB) \
$(SVTOOLLIB) \
$(TKLIB) \
$(VCLLIB) \
@@ -135,25 +198,26 @@ SHL1STDLIBS= \
$(ICUUCLIB)
.IF "$(GUI)"=="WNT"
-SHL1STDLIBS+=$(SHELLLIB)
+SHL2STDLIBS+=$(SHELLLIB)
.ENDIF # WNT
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-DEF1NAME= $(SHL1TARGET)
-DEFLIB1NAME=$(TARGET) $(TARGET)_2 $(TARGET)_3 $(TARGET)_4
+SHL2DEF= $(MISC)$/$(SHL2TARGET).def
+DEF2NAME= $(SHL2TARGET)
+DEFLIB2NAME=$(TARGET) $(TARGET)_2 $(TARGET)_3 $(TARGET)_4
# cui
-SHL2TARGET= cui$(DLLPOSTFIX)
-SHL2VERSIONMAP= cui.map
-SHL2IMPLIB=icui
-SHL2DEPN=$(SHL1TARGETN)
+SHL3TARGET= cui$(DLLPOSTFIX)
+SHL3VERSIONMAP= cui.map
+SHL3IMPLIB=icui
+SHL3DEPN=$(SHL2TARGETN)
-SHL2DEF= $(MISC)$/$(SHL2TARGET).def
-DEF2NAME= $(SHL2TARGET)
+SHL3DEF= $(MISC)$/$(SHL3TARGET).def
+DEF3NAME= $(SHL3TARGET)
-SHL2LIBS= $(SLB)$/cui.lib
+SHL3LIBS= $(SLB)$/cui.lib
-SHL2STDLIBS= \
+SHL3STDLIBS= \
+ $(SVXCORELIB) \
$(SVXLIB) \
$(AVMEDIALIB) \
$(SFX2LIB) \
@@ -174,18 +238,50 @@ SHL2STDLIBS= \
$(CPPULIB) \
$(VOSLIB) \
$(SALLIB) \
- $(JVMFWKLIB)
+ $(JVMFWKLIB) \
+ $(ICUUCLIB)
.IF "$(debug)$(dbgutil)"!=""
SHL2STDLIBS += $(CPPUHELPERLIB)
.ENDIF # "$(debug)$(dbgutil)"!=""
.IF "$(GUI)"=="WNT"
-SHL2STDLIBS+= \
+SHL3STDLIBS+= \
$(SHLWAPILIB) \
$(ADVAPI32LIB)
.ENDIF # WNT
+# svxmsfilter library
+SHL4TARGET= svxmsfilter$(DLLPOSTFIX)
+SHL4IMPLIB= isvxmsfilter
+SHL4USE_EXPORTS=name
+SHL4DEPN=$(SHL1TARGETN)
+SHL4LIBS= $(LIB7TARGET)
+
+SHL4STDLIBS= \
+ $(SVXCORELIB) \
+ $(SFX2LIB) \
+ $(XMLOFFLIB) \
+ $(GOODIESLIB) \
+ $(BASEGFXLIB) \
+ $(BASICLIB) \
+ $(SVTOOLLIB) \
+ $(TKLIB) \
+ $(VCLLIB) \
+ $(SVLLIB) \
+ $(SOTLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(XMLSCRIPTLIB) \
+ $(COMPHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB)
+
+SHL4DEF= $(MISC)$/$(SHL4TARGET).def
+DEF4NAME= $(SHL4TARGET)
+DEFLIB4NAME=$(TARGET)_7
+
# ------------------------------------------------------------------------------
# Resource files
diff --git a/svx/util/makefile.pmk b/svx/util/makefile.pmk
index 27f185e936bd..b2aae3329111 100644
--- a/svx/util/makefile.pmk
+++ b/svx/util/makefile.pmk
@@ -36,4 +36,12 @@ CDEFS += -DSVX_DLLIMPLEMENTATION
CFLAGS+=-DENABLE_GTK
.ENDIF
+.IF "$(ENABLE_KDE)" != ""
+CFLAGS+=-DENABLE_KDE
+.ENDIF
+
+.IF "$(ENABLE_KDE4)" != ""
+CFLAGS+=-DENABLE_KDE4
+.ENDIF
+
VISIBILITY_HIDDEN=TRUE