SmartParagraphBreakReplacement
FindReplaceOptions.SmartParagraphBreakReplacement property
الحصول على أو تحديد قيمة منطقية تشير إلى أنه يُسمح باستبدال فقرة break في حالة عدم وجود فقرة شقيقة تالية.
النظام الأساسيخاطئة
.
public bool SmartParagraphBreakReplacement { get; set; }
ملاحظات
يسمح هذا الخيار باستبدال فاصل الفقرة في حالة عدم وجود فقرة أخوية تالية يمكن نقل جميع العقد child إليها ، من خلال البحث عن أي فقرة تالية (وليس بالضرورة شقيقة) بعد استبدال الفقرة.
أمثلة
يوضح كيفية إزالة فقرة من خلية جدول مع جدول متداخل.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// إنشاء جدول مع فقرة وجدول داخلي في الخلية الأولى.
builder.StartTable();
builder.InsertCell();
builder.Write("TEXT1");
builder.StartTable();
builder.InsertCell();
builder.EndTable();
builder.EndTable();
builder.Writeln();
FindReplaceOptions options = new FindReplaceOptions();
// عندما يتم تعيين الخيار التالي على "صواب" ، فإن Aspose.Words سيزيل نص الفقرة
// بالكامل بعلامة الفقرة الخاصة بها. خلاف ذلك ، فإن Aspose.Words ستحاكي Word وتزيلها
// فقط نص الفقرة ويترك علامة الفقرة كما هي (عندما يتبع الجدول النص).
options.SmartParagraphBreakReplacement = isSmartParagraphBreakReplacement;
doc.Range.Replace(new Regex(@"TEXT1&p"), "", options);
doc.Save(ArtifactsDir + "Table.RemoveParagraphTextAndMark.docx");
أنظر أيضا
- class FindReplaceOptions
- مساحة الاسم Aspose.Words.Replacing
- المجسم Aspose.Words