Spire.Doc for C++

ニュース&リリース

2026-01-29

Spire.Doc for C++ 14.1.4 が .NET 版と機能を同期

Spire.Doc for C++ 14.1.4 のリリースをお知らせします。本バージョンでは、Spire.Doc の .NET 版と複数の機能を同期し、特に表およびリスト関連の機能強化に重点を置いています。詳細は以下のとおりです。

変更内容一覧
カテゴリー ID 説明
新機能 - Bookmark クラスに GetFirstColumn および GetLastColumn プロパティを追加しました。これにより、テーブル内にあるブックマークの開始列および終了列のインデックスを取得できます。
int firstColumn = doc->GetBookmarks()->FindByName(L"t_insert")->GetFirstColumn();
int lastColumn = doc->GetBookmarks()->FindByName(L"t_insert")->GetLastColumn();
新機能 - TableFormat クラスに SetStyle、SetStyleOptions、SetStyleName プロパティを追加し、テーブルスタイルの操作を強化しました。
intrusive_ptr<TableStyle> tableStyle = Object::Dynamic_cast<TableStyle>(
    doc->GetStyles()->Add(StyleType::TableStyle, L"TestTableStyle1")
);
tableStyle->GetBorders()->SetColor(Color::GetBlue());
tableStyle->GetBorders()->SetBorderType(BorderStyle::Single);
tableStyle->SetHorizontalAlignment(RowAlignment::Center);

intrusive_ptr<Table> table = sec->AddTable();
table->ResetCells(1, 1);
table->GetRows()->GetItemInRowCollection(0)
    ->GetCells()->GetItemInCellCollection(0)
    ->AddParagraph()->AppendText(L"Aligned to the center of the page");
table->SetPreferredWidth(PreferredWidth::FromPoints(300));
table->ApplyStyle(tableStyle);

sec->AddParagraph()->AppendText(L"");
tableStyle = Object::Dynamic_cast<TableStyle>(
    doc->GetStyles()->Add(StyleType::TableStyle, L"TestTableStyle2")
);
tableStyle->SetLeftIndent(55);
tableStyle->GetBorders()->SetColor(Color::GetGreen());
tableStyle->GetBorders()->SetBorderType(BorderStyle::Single);

table = sec->AddTable();
table->ResetCells(1, 1);
table->GetRows()->GetItemInRowCollection(0)
    ->GetCells()->GetItemInCellCollection(0)
    ->AddParagraph()->AppendText(L"Aligned according to left indent");
table->SetPreferredWidth(PreferredWidth::FromPoints(300));
table->GetFormat()->SetStyle(tableStyle);


intrusive_ptr<TableStyle> tableStyle = Object::Dynamic_cast<TableStyle>(
    doc->GetStyles()->Add(StyleType::TableStyle, L"TestTableStyle1")
);

tableStyle->GetBorders()->SetColor(Color::GetBlack());
tableStyle->GetBorders()->SetBorderType(BorderStyle::Double);
tableStyle->SetRowStripe(3);
tableStyle->GetConditionalStyles()->GetItem(TableConditionalStyleType::OddRowStripe)
    ->GetShading()->SetBackgroundPatternColor(Color::GetLightBlue());
tableStyle->GetConditionalStyles()->GetItem(TableConditionalStyleType::EvenRowStripe)
    ->GetShading()->SetBackgroundPatternColor(Color::GetLightCyan());
tableStyle->SetColumnStripe(1);
tableStyle->GetConditionalStyles()->GetItem(TableConditionalStyleType::EvenColumnStripe)
    ->GetShading()->SetBackgroundPatternColor(Color::GetLightPink());

table->ApplyStyle(tableStyle);
table->GetFormat()->SetStyleOptions(TableStyleOptions::ColumnStripe);


tableStyle = Object::Dynamic_cast<TableStyle>(
    doc->GetStyles()->Add(StyleType::TableStyle, L"TestTableStyle3")
);
tableStyle->SetLeftIndent(55);
tableStyle->GetBorders()->SetColor(Color::GetGreen());
tableStyle->GetBorders()->SetBorderType(BorderStyle::Single);
tableStyle->SetHorizontalAlignment(RowAlignment::Right);

table = sec->AddTable();
table->ResetCells(1, 1);
table->GetRows()->GetItemInRowCollection(0)
    ->GetCells()->GetItemInCellCollection(0)
    ->AddParagraph()->AppendText(L"Aligned according to left indent");
table->SetPreferredWidth(PreferredWidth::FromPoints(300));
table->GetFormat()->SetStyleName(L"TestTableStyle3");
新機能 - Style クラスに RemoveSelf メソッドを追加し、スタイルを削除できるようになりました。
document->GetStyles()->GetItem(L"Normal")->RemoveSelf();
新機能 - Document クラスを拡張し、ページ抽出(ExtractPages)、最初のセクション取得(FirstSection)、ハイフネーション辞書の登録・解除(RegisterHyphenationDictionary、UnregisterHyphenationDictionary、IsHyphenationDictionaryRegistered)をサポートしました。
新機能 - DocumentNavigator クラスを追加しました。このクラスは「仮想カーソル」ベースの API を提供し、スタイル制御を行いながら、テキスト、段落、リスト、テーブル、画像、チェックボックス、OLE オブジェクトなどを簡単に挿入できます。
intrusive_ptr doc = ConvertUtil::GetNewEngineDocument();
intrusive_ptr navigator = new DocumentNavigator(doc);
doc->LoadFromFile(inputFile.c_str());

navigator->MoveToDocumentStart();
navigator->Writeln(L"Test insert at DocumentStart");
navigator->Writeln(L"Test insert without move");
navigator->MoveToDocumentEnd();
navigator->Writeln(L"Test insert at DocumentEnd");

doc->SaveToFile(outputFile.c_str(), FileFormat::Docx);
doc->Close();
新機能 - コア要素の詳細な書式設定機能を追加。
クラス 新メンバー 説明
Paragraph GetText 段落のテキスト内容を取得します。
Table SetBorders,ClearBorders テーブル罫線を設定/すべての罫線書式をクリアします。
CellFormat ClearFormatting セルの書式設定をクリアします。
Borders ClearFormatting,IsShadow 罫線書式をクリアし、影効果の有無を制御します。
RowFormat ClearBackground, Height 行の背景色をクリアし、高さを設定します。
StyleCollection Add(オーバーロード) スタイル追加用のオーバーロードメソッドを追加しました。
PreferredWidth FromPercent,
FromPoints
幅指定用のデータ型を追加しました。
CharacterFormat LocaleIdBi 双方向テキストのロケール設定をサポートします。
Frame IsFrame オブジェクトが Frame かどうかを判定します。
OfficeMath ToLaTexMathCode,
FromOMMLCode
数式を LaTeX に変換、または OMML 文字列から数式を生成します。
新機能 - 変更履歴管理・コンテンツコントロール・比較機能の強化。
クラス 新メンバー 説明
CompareOptions IgnoreTable, IgnoreHeadersAndFooters 比較時にテーブルやヘッダー/フッターを無視できます。
DifferRevisions MoveToRevisions, MoveFromRevisions 「移動先」「移動元」タイプの変更履歴を取得します。
StructureDocumentTag* RemoveSelfOnly コンテンツを保持したまま、コンテンツコントロールのみを削除します。
新機能 - アクセシビリティおよびエクスポート機能の改善。
クラス 新メンバー 説明
ToPdfParameterList PdfImageCompression, DigitalSignatureInfo PDF 保存時の画像圧縮およびデジタル署名情報を設定します。
Document MarkdownExportOptions, ListReferences Markdown エクスポートオプションおよびリスト参照をサポートします。
新機能 - リストシステムのリファクタリング。
クラス 新メンバー 説明
ListFormat ApplyStyle, ApplyListRef スタイル適用およびリスト参照の使用をサポートします。
ListLevel Equals, CreatePictureBullet, DeletePictureBullet, PictureBullet 画像箇条書きおよび等価比較をサポートします。
ListStyle ListRef, BaseStyle リスト参照およびベーススタイルをサポートします。
Document ListReferences ドキュメント内のリスト参照コレクションを取得します。
新機能 - API 全体の一貫性向上のため、冗長または設計上不適切なプロパティやメソッドを削除しました。これには、OfficeMath.SaveToImage や SaveImageToStream などの旧式なエクスポート API の削除が含まれます。
ここで Spire.Doc for C++ 14.1.4をダウンロードする: