internal CT_Shape newCommentShape() { CT_Shape shape = new CT_Shape(); shape.id = "_x0000_s" + (++_shapeId); shape.type = "#" + _shapeTypeId; shape.style = "position:absolute; visibility:hidden"; shape.fillcolor = ("#ffffe1"); shape.insetmode = (ST_InsetMode.auto); shape.AddNewFill().color = ("#ffffe1"); CT_Shadow shadow = shape.AddNewShadow(); shadow.on = NPOI.OpenXmlFormats.Vml.ST_TrueFalse.t; shadow.color = "black"; shadow.obscured = NPOI.OpenXmlFormats.Vml.ST_TrueFalse.t; shape.AddNewPath().connecttype = (ST_ConnectType.none); shape.AddNewTextbox().style = ("mso-direction-alt:auto"); CT_ClientData cldata = shape.AddNewClientData(); cldata.ObjectType = ST_ObjectType.Note; cldata.AddNewMoveWithCells(); cldata.AddNewSizeWithCells(); cldata.AddNewAnchor("1, 15, 0, 2, 3, 15, 3, 16"); cldata.AddNewAutoFill(ST_TrueFalseBlank.@false); cldata.AddNewRow(0); cldata.AddNewColumn(0); _items.Add(shape); return(shape); }
internal CT_Shape newCommentShape() { CT_Shape ctShape = new CT_Shape(); ctShape.id = "_x0000_s" + (object)++this._shapeId; ctShape.type = "#" + this._shapeTypeId; ctShape.style = "position:absolute; visibility:hidden"; ctShape.fillcolor = "#ffffe1"; ctShape.insetmode = ST_InsetMode.auto; ctShape.AddNewFill().color = "#ffffe1"; CT_Shadow ctShadow = ctShape.AddNewShadow(); ctShadow.on = ST_TrueFalse.t; ctShadow.color = "black"; ctShadow.obscured = ST_TrueFalse.t; ctShape.AddNewPath().connecttype = ST_ConnectType.none; ctShape.AddNewTextbox().style = "mso-direction-alt:auto"; CT_ClientData ctClientData = ctShape.AddNewClientData(); ctClientData.ObjectType = ST_ObjectType.Note; ctClientData.AddNewMoveWithCells(); ctClientData.AddNewSizeWithCells(); ctClientData.AddNewAnchor("1, 15, 0, 2, 3, 15, 3, 16"); ctClientData.AddNewAutoFill(ST_TrueFalseBlank.@false); ctClientData.AddNewRow(0); ctClientData.AddNewColumn(0); this._items.Add((object)ctShape); return(ctShape); }
internal CT_Shape newCommentShape() { CT_Shape shape = new CT_Shape(); shape.id = "_x0000_s" + (++_shapeId); shape.type ="#_x0000_t" + (++_shapeTypeId); shape.style="position:absolute; visibility:hidden"; shape.fillcolor = ("#ffffe1"); shape.insetmode = (ST_InsetMode.auto); shape.AddNewFill().color=("#ffffe1"); CT_Shadow shadow = shape.AddNewShadow(); shadow.on= ST_TrueFalse.t; shadow.color = "black"; shadow.obscured = ST_TrueFalse.t; shape.AddNewPath().connecttype = (ST_ConnectType.none); shape.AddNewTextbox().style = ("mso-direction-alt:auto"); CT_ClientData cldata = shape.AddNewClientData(); cldata.ObjectType=ST_ObjectType.Note; cldata.AddNewMoveWithCells(); cldata.AddNewSizeWithCells(); cldata.AddNewAnchor("1, 15, 0, 2, 3, 15, 3, 16"); cldata.AddNewAutoFill(ST_TrueFalseBlank.@false); cldata.AddNewRow(0); cldata.AddNewColumn(0); _items.Add(shape); return shape; }
internal CT_Shape newCheckboxShape() { int checkboxShapeType = 201; // correct layout and shape type foreach (Object item in _items) { if (item.GetType() == typeof(CT_ShapeLayout)) { CT_ShapeLayout layout = (CT_ShapeLayout)item; } else if (item.GetType() == typeof(CT_Shapetype)) { CT_Shapetype shapetype = (CT_Shapetype)item; shapetype.id = "_x0000_t" + checkboxShapeType; shapetype.coordsize = "21600,21600"; shapetype.spt = checkboxShapeType; shapetype.path2 = ("m,l,21600r21600,l21600,xe"); shapetype.stroke.joinstyle = ST_StrokeJoinStyle.miter; shapetype.path = null; CT_Path path = shapetype.AddNewPath(); path.shadowok = OpenXmlFormats.Vml.ST_TrueFalse.f; path.extrusionok = OpenXmlFormats.Vml.ST_TrueFalse.f; path.strokeok = OpenXmlFormats.Vml.ST_TrueFalse.f; path.fillok = OpenXmlFormats.Vml.ST_TrueFalse.f; path.connecttype = ST_ConnectType.rect; CT_Lock ctlock = shapetype.AddNewLock(); ctlock.ext = ST_Ext.edit; ctlock.shapetype = OpenXmlFormats.Vml.Office.ST_TrueFalse.t; } } // actual checkbox CT_Shape shape = new CT_Shape(); shape.id = "_x0000_s" + (++_shapeId); shape.type = "#_x0000_t" + checkboxShapeType; shape.style = "position:absolute;margin-left:202.5pt;margin-top:169.5pt;width:87.75pt;height:19.5pt;z-index:1;mso-wrap-style:tight"; shape.fill = null; shape.filled = OpenXmlFormats.Vml.ST_TrueFalse.f; shape.fillcolor = ("window [65]"); shape.stroked = OpenXmlFormats.Vml.ST_TrueFalse.f; shape.strokecolor = "windowText [64]"; shape.insetmode = (ST_InsetMode.auto); shape.textbox = new CT_Textbox(); shape.textbox.ItemXml = "<div style='text-align:left'>" + "<font face=\"Segoe UI\" size=\"160\" color=\"auto\">" + "Kontrollkästchen 1" + "</font>" + "</div>"; shape.@lock = new CT_Lock(); [email protected] = ST_Ext.edit; [email protected] = OpenXmlFormats.Vml.Office.ST_TrueFalse.t; CT_ClientData cldata = shape.AddNewClientData(); cldata.ObjectType = ST_ObjectType.Checkbox; cldata.AddNewSizeWithCells(); cldata.AddNewAnchor("1, 15, 0, 2, 3, 15, 3, 16"); cldata.AddNewAutoFill(ST_TrueFalseBlank.@false); cldata.AddNewAutoLine(ST_TrueFalseBlank.@false); cldata.AddNewTextVAlign("Center"); _items.Add(shape); return shape; }