Просмотр исходного кода

Added FileName property for Picture

master
AndreyKovalenko_cp 15 лет назад
Родитель
Сommit
0fdf00aeed
1 измененных файлов: 16 добавлений и 0 удалений
  1. 16
    0
      DocX/Picture.cs

+ 16
- 0
DocX/Picture.cs Просмотреть файл

@@ -20,6 +20,7 @@ namespace Novacode
private string name;
private string descr;
private int cx, cy;
private string fileName;
private uint rotation;
private bool hFlip, vFlip;
private object pictureShape;
@@ -59,6 +60,13 @@ namespace Novacode
select a.Value
).First();
this.fileName =
(
from e in Xml.Descendants(XName.Get("cNvPr", "http://schemas.openxmlformats.org/drawingml/2006/picture"))
select e.Attribute("name").Value
).First();
this.descr =
(
from e in Xml.Descendants()
@@ -275,6 +283,14 @@ namespace Novacode
}
}
///<summary>
/// Returns the name of the image file for the picture.
///</summary>
public string FileName
{
get { return fileName; }
}
/// <summary>
/// Get or sets the Width of this Image.
/// </summary>

Загрузка…
Отмена
Сохранить