Exemple #1
0
 protected EscherTextboxWrapper GetEscherTextboxWrapper(){
     if(_txtbox == null){
         EscherTextboxRecord textRecord = (EscherTextboxRecord)Shape.GetEscherChild(_escherContainer, EscherTextboxRecord.RECORD_ID);
         if(textRecord != null) _txtbox = new EscherTextboxWrapper(textRecord);
     }
     return _txtbox;
 }
Exemple #2
0
    public TextRun CreateTextRun(){
        _txtbox = GetEscherTextboxWrapper();
        if(_txtbox == null) _txtbox = new EscherTextboxWrapper();

        _txtrun = GetTextRun();
        if(_txtrun == null){
            TextHeaderAtom tha = new TextHeaderAtom();
            tha.SetParentRecord(_txtbox);
            _txtbox.AppendChildRecord(tha);

            TextCharsAtom tca = new TextCharsAtom();
            _txtbox.AppendChildRecord(tca);

            StyleTextPropAtom sta = new StyleTextPropAtom(0);
            _txtbox.AppendChildRecord(sta);

            _txtrun = new TextRun(tha,tca,sta);
            _txtRun._records = new Record[]{tha, tca, sta};
            _txtRun.SetText("");

            _escherContainer.AddChildRecord(_txtbox.GetEscherRecord());

            SetDefaultTextProperties(_txtRun);
        }

        return _txtRun;
    }