JPH05266016A - Ruled line position deciding device for table - Google Patents

Ruled line position deciding device for table

Info

Publication number
JPH05266016A
JPH05266016A JP4090142A JP9014292A JPH05266016A JP H05266016 A JPH05266016 A JP H05266016A JP 4090142 A JP4090142 A JP 4090142A JP 9014292 A JP9014292 A JP 9014292A JP H05266016 A JPH05266016 A JP H05266016A
Authority
JP
Japan
Prior art keywords
ruled line
ruled
line
horizontal
rectangular area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4090142A
Other languages
Japanese (ja)
Inventor
Yasuo Taguchi
安男 田口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP4090142A priority Critical patent/JPH05266016A/en
Publication of JPH05266016A publication Critical patent/JPH05266016A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PURPOSE:To attain the automatic change of the space between the lateral ruled lines even when the character size is changed or the number of characters is increased within a cell of a table that allows a non-matrix form by providing a specific ruled line space arrangement processing means. CONSTITUTION:A ruled line position deciding part 11 is provided with a 1st ruled line space deciding means 111 which decides all spaces between two lateral ruled lines in a rectangular area forming a table and also searches the rectangular area formed between both ruled lines when a new table is edited to decide the largest space, a 2nd ruled line space deciding means 112 which decides the space between the continuous lateral ruled lines, and a ruled line space arrangement processing means 113 which automatically rearranges the edited lateral ruled lines in sequence at and after the highest reference line based on the spaces decided by both means 111 and 112. In such a constitution, the position of each ruled line can be decided from the height of each rectangular area even with a table of a non-matrix shape.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ワードプロセッサ、パ
ーソナルコンピュータ、あるいはワークステーション等
における文書処理装置によって文書および表を作成する
際に、表の罫線位置決定装置に関するものである。な
お、上記ワードプロセッサ、パーソナルコンピュータ、
あるいはワークステーション等によって文書および表を
作成処理する装置のことを、以下、本明細書において、
単に「文書処理装置」と記載する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a ruled line position determining device for a table when a document and a table are created by a document processing device in a word processor, a personal computer, a workstation or the like. The word processor, personal computer,
Alternatively, a device that creates and processes documents and tables by a workstation, etc.
It is simply described as "document processing device".

【0002】[0002]

【従来の技術】図11(イ)ないし(ニ)は従来例にお
ける文書処理装置で罫線を引く場合を説明するための図
である。表と共に文書を作成する文書処理装置は、罫線
を文字と同様にコードとして取り扱っている。このよう
に、罫線および文字のどちらもコード体系のなかで扱っ
た文書処理装置は、表および文書を編集するための編集
プログラムがシンプルで簡単に作成できる。しかし、上
記文書処理装置において、たとえば図11(イ)に示す
表の矩形領域(以下、本明細書において、「表の矩形領
域」を単に「セル」と記載する。)に「あいうえお」な
る文字が挿入されていたとする。この表の中央に横罫線
を一本引く場合、「う」および「え」は、消えて図11
(ロ)のようになる。すなわち、文字も罫線もコードで
あるため、「う」および「え」は、横罫線によって上書
きされる。
2. Description of the Related Art FIGS. 11 (a) to 11 (d) are views for explaining a case of drawing a ruled line in a conventional document processing apparatus. A document processing apparatus that creates a document together with a table handles ruled lines as codes in the same manner as characters. As described above, in the document processing apparatus in which both ruled lines and characters are handled in the code system, an editing program for editing tables and documents can be simply and easily created. However, in the above document processing apparatus, for example, a character "aiueo" is added to a rectangular area of the table shown in FIG. 11A (hereinafter, "rectangular area of table" is simply referred to as "cell" in this specification). Was inserted. When a horizontal ruled line is drawn in the center of this table, "u" and "e" disappear and
It becomes like (b). That is, since both characters and ruled lines are codes, “u” and “e” are overwritten by the horizontal ruled lines.

【0003】また、マトリックス状の表において、セル
内の内容を増減する場合は、たとえば図11(ハ)に示
す表に改行マークを入れて行く。しかし、図11(ニ)
に示すように、改行を入れたことによって、縦罫線は、
連続しない部分ができるため、その部分に縦罫線を入れ
て修復を行う必要があった。このため、マトリックス状
の表において、そのセル内の内容を増減することは、操
作が煩雑になった。
Further, in the case of increasing or decreasing the contents in cells in a matrix table, a line feed mark is put in the table shown in FIG. 11C, for example. However, Fig. 11 (d)
As shown in, the vertical ruled line is
Since there is a non-continuous part, it was necessary to put vertical ruled lines in that part for repair. Therefore, in the matrix-shaped table, the operation becomes complicated to increase or decrease the content in the cell.

【0004】上記マトリックス状の表において、横罫線
を引く際に文字が消えないようにするために考えられた
技術がある。たとえば、特開平3−38774号公報に
記載された表枠整形方式は、指定されたセルのサイズが
変更された場合に、指定されたセルと同一の行および列
に含まれる他のセル内のテキストデータの配置に応じ
て、各行および列のサイズを仮決定する。次に、各セル
のテキストデータの溢れに応じて、そのセルに含む行お
よび列のサイズを修正する。
In the above matrix-like table, there is a technique designed to prevent characters from being erased when a horizontal ruled line is drawn. For example, in the table frame shaping method described in Japanese Patent Laid-Open No. 3-38774, when the size of the designated cell is changed, the size of the designated cell is changed to the other cells in the same row and column. The size of each row and column is provisionally determined according to the arrangement of the text data. Next, according to the overflow of the text data of each cell, the size of the row and column contained in that cell is corrected.

【0005】また、マトリックス状の表における枠を自
動的に修復できるものとして、たとえば特開平3−77
127号公報に記載されたデータ処理装置がある。この
データ処理装置は、表を構成するセル内のデータに加
入、削除を加え、そのデータ長を変更する際に、そのデ
ータを納めるセルを表示する表示枠も、データ長の変更
に応じて自動的に変更させることができる。
Further, as a device capable of automatically repairing a frame in a matrix-shaped table, for example, Japanese Patent Laid-Open No. 3-77.
There is a data processing device described in Japanese Patent Publication No. 127. When adding or deleting data in the cells that make up the table and changing the data length, this data processing device automatically displays the display frame that displays the cell that contains the data according to the change in the data length. Can be changed.

【0006】さらに、罫線データと文字データとを別々
に分けて構造化して管理し、これらを合わせて表のデー
タとして考えたものがある。たとえば、本出願人が先に
提案した特願平2−320701号(平成2年11月2
7日出願)における表作成処理装置は、罫線を表す罫線
データと、セルの内容を表すセルデータとを分離して記
憶すると共に、縦横の罫線データと、当該罫線によって
形成されるセルの属性データとを対応させることによっ
て、罫線がセルの中にある文字と無関係に移動、追加、
あるいは削除できる。これによって、マトリックス状で
ない表に関しても自由に表の編集(罫線の移動、追加、
削除等)ができる。
Further, there is a method in which ruled line data and character data are separately structured and managed, and these are combined and considered as table data. For example, Japanese Patent Application No. 2-320701 (November 2, 1990) previously proposed by the present applicant.
The table creation processing device in (7th application) separately stores ruled line data indicating ruled lines and cell data indicating cell contents, and also sets vertical and horizontal ruled line data and attribute data of cells formed by the ruled lines. By matching with and, the ruled line can be moved, added, regardless of the characters in the cell,
Or you can delete it. This allows you to freely edit tables (moving rules, adding rules,
Can be deleted).

【0007】[0007]

【発明が解決しようとする課題】前記本出願人が提案し
た表作成装置は、文字データと表を構成する罫線データ
とを記憶し、操作者からの罫線の移動、追加、あるいは
削除等の指示を受けて、セルを分割、合成するため、非
マトリックス状の表を作成できる。
The table preparation device proposed by the applicant of the present invention stores character data and ruled line data forming a table, and gives an instruction from the operator to move, add, or delete ruled lines. In response, the cells are divided and combined, so that a non-matrix table can be created.

【0008】しかし、非マトリックス状の表は、文字の
大きさを変えたり、文字数を増加させるような編集作業
を行なう際に、その横罫線の間隔を自動的に変える処理
については考慮されていなかった。
However, the non-matrix table does not take into consideration the process of automatically changing the interval between the horizontal ruled lines when performing editing work such as changing the size of characters or increasing the number of characters. It was

【0009】本発明は、以上のような課題を解決するた
めのもので、非マトリックス状を許容する表のセル内
で、文字の大きさを変えたり、文字数を増加させるよう
な編集作業を行なっても、その横罫線の間隔を自動的に
変える処理を行なうことができる表の罫線位置決定装置
を提供することを目的とする。
The present invention is intended to solve the above problems, and performs editing work such as changing the size of characters or increasing the number of characters in a cell of a table that allows non-matrix. Even so, an object of the present invention is to provide a table ruled line position determining device capable of automatically changing the interval between the horizontal ruled lines.

【0010】[0010]

【課題を解決するための手段】非マトリックス状の形状
を許容する表の罫線位置を決定する表の罫線位置決定装
置は、罫線の位置を表す情報を記憶する罫線情報記憶手
段(図1の131)と、前記矩形領域の属性と当該矩形
領域に記載された内容とからなる情報を記憶する矩形領
域情報記憶手段(図1の132)と、表を形成する矩形
領域における全ての2本の横罫線における間隔、および
表を編集した際に、2本の横罫線によって形成された矩
形領域を探索し、その矩形領域における一番幅の広い間
隔をそれぞれ決定する第1罫線間隔決定処理手段(図1
の111)と、連続する2本の横罫線の間隔を決定する
第2罫線間隔決定処理手段(図1の112)と、前記第
1罫線間隔決定処理手段(111)および第2罫線間隔
決定処理手段(112)によって決定された間隔に基づ
いて、編集後の横罫線を最上位の基準線から順次自動的
に再配置する罫線間隔整列処理手段(図1の113)と
から構成される。
A ruled line position determining device for determining a ruled line position of a table that allows a non-matrix shape is a ruled line information storage unit (131 in FIG. 1) that stores information indicating the position of the ruled line. ), A rectangular area information storage unit (132 in FIG. 1) for storing information consisting of the attributes of the rectangular area and the contents described in the rectangular area, and all two horizontal lines in the rectangular area forming the table. First ruled line interval determination processing means for searching a rectangular area formed by two horizontal ruled lines and determining the widest interval in each of the rectangular areas when the ruled line interval and the table are edited (Fig. 1
No. 111), second ruled line interval determination processing means (112 in FIG. 1) for determining the interval between two consecutive horizontal ruled lines, the first ruled line interval determination processing means (111) and second ruled line interval determination processing. Based on the spacing determined by the means (112), it comprises a ruled line spacing alignment processing means (113 in FIG. 1) for automatically rearranging the edited horizontal ruled lines sequentially from the uppermost reference line.

【0011】[0011]

【作 用】本発明における表の罫線位置決定装置は、
矩形領域および罫線により構成される非マトリックス状
の形状を許容する表の矩形領域の内容を編集した際に、
横罫線間隔が自動的に拡縮して、矩形領域内の内容に横
罫線をフィットさせることを特徴とする。
[Operation] The table ruled line position determining device in the present invention is
When editing the contents of the rectangular area of the table that allows non-matrix shapes composed of rectangular areas and ruled lines,
The feature is that the horizontal ruled line interval is automatically expanded or reduced to fit the horizontal ruled line to the contents in the rectangular area.

【0012】罫線情報記憶手段には、罫線の位置、たと
えば横あるいは縦の罫線の始点と終点、および罫線の形
状、たとえば実線、細線、点線、等が記憶される。矩形
領域情報記憶手段には、前記罫線情報記憶手段に記憶さ
れている罫線情報によって囲まれた矩形領域に記載され
る内容を表すデータが記憶されている。そして、第1罫
線間隔決定処理手段は、表における全ての横罫線毎にそ
の間隔を計算し、それぞれの横罫線どうしの間隔を決定
する。また、第1罫線間隔決定処理手段は、新たな表を
編集した際、たとえば矩形領域における文字の大きさを
変えたり、文字数を増加させるような編集作業が行なわ
れた際に、2本の横罫線によって形成された矩形領域を
探索し、それらの矩形領域における一番幅の広い間隔を
決定する。また、第2罫線間隔決定処理手段は、第1罫
線間隔決定処理手段によって決定された全ての2本の横
罫線の間の間隔を基にして、連続する2本の横罫線の間
隔を決定するための計算を行なう。
The ruled line information storage means stores the position of the ruled line, for example, the start and end points of a horizontal or vertical ruled line, and the shape of the ruled line, such as a solid line, a thin line, and a dotted line. The rectangular area information storage means stores data representing the contents described in the rectangular area surrounded by the ruled line information stored in the ruled line information storage means. Then, the first ruled line interval determination processing means calculates the interval for every horizontal ruled line in the table, and determines the interval between the respective horizontal ruled lines. Further, the first ruled line interval determination processing means, when a new table is edited, for example, when an editing operation such as changing the size of characters in the rectangular area or increasing the number of characters is performed, two horizontal lines are arranged. The rectangular areas formed by the ruled lines are searched, and the widest interval in those rectangular areas is determined. Further, the second ruled line interval determination processing means determines the interval between two continuous horizontal ruled lines based on the interval between all the two horizontal ruled lines determined by the first ruled line interval determination processing means. Do the calculations for.

【0013】その後、罫線間隔整列処理手段は、連続す
る2本の横罫線の間隔に基づいて、全ての横罫線の位置
を決定し、編集後の横罫線を最上位の基準線から順次自
動的に再配置する。したがって、新たな表を編集した際
に、たとえば各矩形領域に記載された文字の大きさが変
わったり、あるいは文字数の増加があった場合、横罫線
の間隔は、自動的に拡縮される。すなわち、編集後の矩
形領域における文字等は、矩形領域からはみ出して見え
たり、あるいは表示するために無駄な空白を持つことが
ない。
After that, the ruled line interval alignment processing means determines the positions of all the horizontal ruled lines based on the interval between the two continuous horizontal ruled lines, and automatically edits the edited horizontal ruled lines sequentially from the uppermost reference line. Relocate to. Therefore, when a new table is edited, for example, when the size of the characters written in each rectangular area changes or the number of characters increases, the interval between the horizontal ruled lines is automatically expanded or reduced. That is, a character or the like in the edited rectangular area does not have a useless blank for being displayed or displayed outside the rectangular area.

【0014】[0014]

【実 施 例】図1は本発明における表の罫線位置決定
装置の一実施例を説明するためのブロック構成図であ
る。図1における表の罫線位置決定装置は、罫線位置決
定部11と、後述の各種制御回路等を結ぶデータバス1
2と、文書編集プログラム、その他のプログラム、ある
いは各種処理を行うために一時的にデータを格納するた
めのランダム・アクセス・メモリ(以下、本明細書にお
いて、単にRAMと記載する)13と、前記プログラム
あるいは各種文書データ等が格納されている磁気ディス
ク14と、当該磁気ディスク14に対するデータの入出
力を制御する磁気ディスク制御回路15と、文書あるい
は表等を視覚的に表示させる、たとえばCRT等のディ
スプレイ16と、当該ディスプレイ16を制御するディ
スプレイ制御回路17と、前記ディスプレイ16におけ
る位置を指示するポインテイング・デバイスとしてのマ
ウス18と、文字あるいは罫線等のデータを入力するキ
ーボード19と、マウス18およびキーボード19から
入力された入力情報を制御する入力制御回路20とから
構成される。また、図示されていないCPUは、コンピ
ュータとしての通常の処理を行うと共に表の罫線位置を
決定するための演算を行う。
EXAMPLE FIG. 1 is a block diagram for explaining an example of a ruled line position determining apparatus for a table according to the present invention. The ruled line position determination device for the table in FIG. 1 includes a data bus 1 that connects the ruled line position determination unit 11 and various control circuits described later.
2, a document editing program, other programs, or a random access memory (hereinafter simply referred to as RAM in the present specification) 13 for temporarily storing data for performing various processes, and A magnetic disk 14 in which a program or various document data is stored, a magnetic disk control circuit 15 for controlling the input / output of data to / from the magnetic disk 14, and a document or a table are visually displayed, such as a CRT. A display 16, a display control circuit 17 for controlling the display 16, a mouse 18 as a pointing device for designating a position on the display 16, a keyboard 19 for inputting data such as characters or ruled lines, a mouse 18, and Input information input from the keyboard 19 And an input control circuit 20 which controls. Further, the CPU (not shown) performs normal processing as a computer and also performs calculation for determining the ruled line position of the table.

【0015】なお、上記表の罫線位置決定装置は、本発
明の実施例を説明するために必要な構成以外が省略され
ている。たとえば、他のワークステーションと接続する
通信制御回路、データを印刷するための印刷制御装置、
あるいはイメージ情報を処理するための画像処理制御装
置等が必要に応じて接続される。
The ruled line position determining device in the above table is omitted except for the configuration necessary for explaining the embodiment of the present invention. For example, a communication control circuit connected to another workstation, a print control device for printing data,
Alternatively, an image processing control device or the like for processing image information is connected as necessary.

【0016】前記罫線位置決定部11は、表を形成する
矩形領域における全ての2本の横罫線における間隔を決
定すると共に、新たな表を編集した際に、2本の横罫線
内に形成された矩形領域を探索し、それら矩形領域にお
ける一番幅の広い間隔を決定する第1罫線間隔決定処理
手段111と、連続する横罫線の間隔を決定する第2罫
線間隔決定処理手段112と、前記第1罫線間隔決定処
理手段111および第2罫線間隔決定処理手段112に
よって決定された間隔に基づいて、編集後の横罫線を最
上位の基準線から順次自動的に再配置する罫線間隔整列
処理手段113とを備えている。
The ruled line position deciding unit 11 decides the intervals between all two horizontal ruled lines in the rectangular area forming the table, and when the new table is edited, it is formed within the two horizontal ruled lines. First ruled line interval determination processing means 111 for determining the widest interval in these rectangular areas, and second ruled line interval determination processing means 112 for determining the interval between consecutive horizontal ruled lines. Ruled line spacing alignment processing means for automatically rearranging the edited horizontal ruled lines sequentially from the uppermost reference line based on the intervals determined by the first ruled line spacing determination processing means 111 and the second ruled line spacing determination processing means 112. And 113.

【0017】RAM13は、各種プログラムの実行およ
び各種処理を行うため、一時的にデータを格納する以外
に、表の縦罫線および横罫線を決定する位置と、各罫線
の形状、たとえば実線、細線、一点鎖線等を記憶する罫
線情報記憶手段131と、前記罫線情報によって形成さ
れる矩形領域(以下、本明細書において、罫線情報によ
って囲まれた矩形領域を単に「セル」と記載する)の属
性、たとえばセルを構成する罫線とセル内の文字とのマ
ージン、あるいはセル内のシェード(網かけ等)、およ
びセル内に記載される文字等の内容を記憶する矩形領域
情報記憶手段132とを備えている。
Since the RAM 13 executes various programs and executes various processes, in addition to temporarily storing data, the position for determining vertical and horizontal ruled lines in the table and the shape of each ruled line, such as a solid line and a thin line, are stored in the RAM 13. Ruled line information storage means 131 for storing a one-dot chain line and the like, attributes of a rectangular area formed by the ruled line information (hereinafter, a rectangular area surrounded by the ruled line information is simply referred to as a “cell”), For example, a margin between a ruled line forming a cell and a character in the cell, a shade (shading, etc.) in the cell, and a rectangular area information storage unit 132 for storing the contents of the character described in the cell are provided. There is.

【0018】図2は本発明における表を表すためのデー
タ構成を説明する図である。図2において、RAM13
に格納されている表に関する罫線情報記憶手段131
は、全縦罫線データ21と全横罫線データ22とから構
成されている。また、縦罫線と横罫線とによって形成さ
れているセルは、全セル属性データ23から構成されて
いる。そして、全縦罫線データ21は、表の一番左側の
縦罫線を表す第1の縦罫線データ211、同じく表の左
から第2番目の縦罫線を表す第2の縦罫線データ21
2、順次第3の縦罫線データ213、・・・から構成さ
れる。また、全横罫線データ22は、表の一番上側から
順に第1の横罫線データ221、第2横縦罫線データ2
22、第3の横罫線データ223、・・・から構成され
る。そして、各順番の罫線データは、たとえば罫線の始
点および終点となる座標位置を表す罫線位置データ21
11、2121、2131、・・・、2211、222
1、2231、・・・から構成される。各セルを形成す
る全縦罫線データ21および全横罫線データ22には、
たとえば罫線が実線、点線、あるいは一点鎖線等の罫線
形状を表す罫線形状データ2112、2122、213
2、・・・、2212、2222、2232、・・・か
ら構成される。
FIG. 2 is a diagram for explaining the data structure for representing the table in the present invention. In FIG. 2, the RAM 13
Ruled line information storage means 131 for tables stored in
Is composed of all vertical ruled line data 21 and all horizontal ruled line data 22. A cell formed by vertical ruled lines and horizontal ruled lines is composed of all cell attribute data 23. The entire vertical ruled line data 21 is the first vertical ruled line data 211 that represents the leftmost vertical ruled line in the table, and the second vertical ruled line data 21 that also represents the second vertical ruled line from the left in the table.
2, sequentially composed of third vertical ruled line data 213, ... All horizontal ruled line data 22 includes first horizontal ruled line data 221 and second horizontal vertical ruled line data 2 in order from the top of the table.
22, third horizontal ruled line data 223, ... The ruled line data in each order is, for example, ruled line position data 21 that represents the coordinate positions of the start and end points of the ruled line.
11, 2121, 2131, ..., 2211, 222
1, 2231, ... All vertical ruled line data 21 and all horizontal ruled line data 22 forming each cell are
For example, the ruled line shape data 2112, 2122, 213 representing the ruled line shape such as a solid line, a dotted line, or a dashed-dotted line.
2, ..., 2212, 2222, 2232 ,.

【0019】縦罫線データおよび横罫線データによって
形成されたセルの属性を表す全セル属性データ23は、
表の左上から順に第1セル属性データ231、232、
233、・・・が構成され、各セル属性データは、たと
えばセル内に記載された文字と縦罫線あるいは横罫線と
のマージンデータ2311、2321、・・・と、セル
内に網かけ等を行なうか否を決めるシェードデータ23
12、2322、・・・と、セル内に記載する文字等の
内容データ2313、2323、・・・とから構成され
る。
The all-cell attribute data 23 representing the attributes of the cells formed by the vertical ruled line data and the horizontal ruled line data is
First cell attribute data 231, 232, from the upper left of the table,
.., and each cell attribute data is, for example, margin data 2311, 2321, ... Between characters and vertical ruled lines or horizontal ruled lines described in the cell, and shading in the cell. Shade data 23 to decide whether or not
12, 2322, ... And content data 2313, 2323, ..

【0020】図3は本発明における完全なマトリックス
状にならない表を説明するための図である。図3におい
て、表は、縦罫線V0、V1、V2、V3と、横罫線H
0、H1、H2、H3、H4とからなり、各縦罫線およ
び横罫線によってセルが構成され、このセルに対して、
表の左上から順次、C1、C2、・・・C8と符号を付
ける。図3に示す表における縦罫線V2、横罫線H1、
H2は、その罫線位置データが他の罫線とその始点ある
いは終点で相違している。
FIG. 3 is a diagram for explaining a table that does not form a perfect matrix according to the present invention. In FIG. 3, the table has vertical ruled lines V0, V1, V2, V3 and horizontal ruled lines H.
0, H1, H2, H3, H4, and each vertical ruled line and horizontal ruled line constitutes a cell. For this cell,
The numbers C1, C2, ... C8 are sequentially assigned from the upper left of the table. Vertical ruled line V2, horizontal ruled line H1 in the table shown in FIG.
H2 has different ruled line position data from other ruled lines at the start point or the end point.

【0021】図4は本発明における表の罫線位置決定装
置を使用した表の作成例を示すフローチャートである。
図4において、表の作成に当たり、図1におけるマウス
18またはキーボード19によって表上の1点が選択さ
れる。そして、選択された点が示す罫線あるいはセルが
判定される。このようにして、決まった対象は、利用者
によって指示され、編集操作が行われる。すなわち、表
を含む文書の編集が行われる(ステップ41)。
FIG. 4 is a flow chart showing an example of creating a table using the table ruled line position determining device according to the present invention.
4, when creating the table, one point on the table is selected by the mouse 18 or the keyboard 19 in FIG. Then, the ruled line or cell indicated by the selected point is determined. In this way, the fixed target is instructed by the user and the editing operation is performed. That is, the document including the table is edited (step 41).

【0022】次に、セル内に文字を入れた文書を編集し
た際に、その文字が当該表のセルの大きさにフィットす
るような横罫線を決定し、表の横罫線データを修正す
る。なお、本明細書において、「編集」とは、文字によ
る編集のみならず、罫線を変えるような編集も含むもの
である。たとえば、セル内に文字を入力して表を編集す
る際に、文字数が多くなったり、高さの高い文字を使用
したために、横罫線からはみ出して見えない場合があ
る。また、文字数が少なくなったり、高さの低い文字を
使用しために、横罫線の上下あるいは一方に大きな空間
を作るような場合がある。このような場合に、後述の手
段によって表を自動的に拡縮する(ステップ42)。な
お、自動拡縮については、次に図5を参照しつつ詳細に
説明する。自動拡縮によって編集された表は、ディスプ
レイ制御回路17の制御に基づいてディスプレイ16に
表示される(ステップ43)。
Next, when a document having characters in cells is edited, horizontal ruled lines are determined so that the characters fit the size of the cells of the table, and the horizontal ruled line data of the table is corrected. In the present specification, "editing" includes not only editing by characters but also editing by changing ruled lines. For example, when a character is input in a cell to edit a table, the character may be too large or a character with a high height may be used, so that the character may extend beyond the horizontal ruled line and cannot be seen. In addition, there are cases in which a large space is created above or below a horizontal ruled line or on one side of the horizontal ruled line because the number of characters is reduced or characters with a low height are used. In such a case, the table is automatically expanded / contracted by the means described later (step 42). The automatic scaling will be described in detail next with reference to FIG. The table edited by the automatic scaling is displayed on the display 16 under the control of the display control circuit 17 (step 43).

【0023】図5は本発明における表の自動拡縮を行う
ための処理を説明するフローチャートである。図6は本
発明における横罫線の間隔を決定するための説明図であ
る。図7は2本の横罫線によって区切られた編集前のセ
ルを説明するための図である。図8は本発明における自
動拡縮処理を行った後のセルの大きさを示した例を説明
するための図である。図9は本発明における連続する2
本の横罫線を決定するための説明図である。図6におい
て、第1罫線間隔決定手段は、全ての横罫線との間隔W
i,j を決定する。すなわち、L0とL1、L0とL2、
L0とL3、・・・、L0とLn、L1とL2、L1と
L3、L1とL4、・・・L1とLn、L2とL3、・
・・Ln、L3とL4、・・・Ln、・・・、L(n−
1)とLn、のように2本の罫線の全ての組み合わせに
関して、その間隔Wi,j を決定する。
FIG. 5 is a flow chart for explaining a process for automatically expanding / contracting a table according to the present invention. FIG. 6 is an explanatory diagram for determining the interval between the horizontal ruled lines in the present invention. FIG. 7 is a diagram for explaining a cell before editing which is divided by two horizontal ruled lines. FIG. 8 is a diagram for explaining an example showing the cell size after the automatic scaling processing according to the present invention. FIG. 9 shows two consecutive lines in the present invention.
It is explanatory drawing for determining the horizontal ruled line of a book. In FIG. 6, the first ruled line interval determining means determines the interval W between all the horizontal ruled lines.
Determine i, j. That is, L0 and L1, L0 and L2,
L0 and L3, ..., L0 and Ln, L1 and L2, L1 and L3, L1 and L4, ... L1 and Ln, L2 and L3 ,.
..Ln, L3 and L4, ... Ln, ..., L (n-
The intervals Wi, j are determined for all combinations of two ruled lines, such as 1) and Ln.

【0024】次に、横罫線Liと横罫線Ljとによって
区切られた全てのセルを探索する。たとえば、前記L0
とL1、L0とL2、L0とL3、・・・、L0とL
n、・・・・・、Ln−1とLnに関する各罫線間につ
いてセルがあるか否かを一つ一つ探す。すなわち、図3
に示すように横罫線H0と横罫線H3との間にセルC1
がある場合があるので、上記のような2本の全ての横罫
線の組み合わせについてセルを探索する。たとえば、図
7に示すような横罫線Liと横罫線Ljとの間におい
て、セルC11、C12、C13とが探索されたとす
る。そして、各セルC11、C12、C13における編
集後の幅を求める。たとえば、各セルの上下の横罫線デ
ータからその幅に相当する間隔を求め、各間隔を比較し
て、一番間隔の大きいものを選ぶ。
Next, all cells divided by the horizontal ruled line Li and the horizontal ruled line Lj are searched. For example, the L0
, L1, L0 and L2, L0 and L3, ..., L0 and L
It is searched for each cell between the ruled lines for n, ..., Ln−1 and Ln one by one. That is, FIG.
Cell C1 between the horizontal ruled line H0 and the horizontal ruled line H3 as shown in FIG.
Since there is a case where there is a case, a cell is searched for a combination of all two horizontal ruled lines as described above. For example, assume that cells C11, C12, and C13 are searched between the horizontal ruled line Li and the horizontal ruled line Lj as shown in FIG. Then, the width after editing in each cell C11, C12, C13 is obtained. For example, from the upper and lower horizontal ruled line data of each cell, an interval corresponding to the width thereof is obtained, and the intervals are compared, and the one with the largest interval is selected.

【0025】上記編集後の各セルの大きさを調べる。た
とえば、図8に示すように、セルC11はその幅が増
し、セルC12はその幅が減り、セルC13はその幅が
変わらなかったものとする。編集後の横罫線Liと横罫
線Ljとの間隔Wi,j は、前記各セルC11、C12、
C13の内一番幅の広いものと決定する。なお、横罫線
Liと横罫線Ljとによって区切られるセルが探索でき
ない場合、たとえばセルが編集において削除された場合
は、横罫線Liと横罫線Ljとの間隔Wi,j を罫線の幅
程度の小さな正の定数とする。こうすることにより、編
集前の連続する2本の横罫線が逆転したり、重なったり
することが防止できる。以上の処理を図5に示すステッ
プ51で行う。
The size of each cell after the above editing is checked. For example, as shown in FIG. 8, it is assumed that cell C11 has its width increased, cell C12 has its width reduced, and cell C13 has its width unchanged. The distance Wi, j between the edited horizontal ruled line Li and the horizontal ruled line Lj is determined by the cells C11, C12,
Determined to be the widest of C13. When a cell delimited by the horizontal ruled line Li and the horizontal ruled line Lj cannot be searched, for example, when the cell is deleted in the editing, the interval Wi, j between the horizontal ruled line Li and the horizontal ruled line Lj is set to be smaller than the width of the ruled line. It is a positive constant. By doing so, it is possible to prevent two consecutive horizontal ruled lines before editing from being reversed or overlapped. The above processing is performed in step 51 shown in FIG.

【0026】次に、連続する2本の横罫線の間隔diの
決定について説明する(ステップ52)。ステップ51
によって求まった横罫線の間隔Wi,j を使用して、連続
する2本の横罫線の間隔diを順次決定する。たとえ
ば、図3において、横罫線H3は、セルC1の大きさに
よって決定したW0,3 のみで決定することができない。
すなわち、W0,3 (セルのC1の大きさ)と、W0,1 +
W1,2 +W2,3 (セルC2、C4、C6を足した大き
さ)と、W0,1 +W1,3 (セルC3とC5とを足した大
きさ)の内一番幅の広いものを選ぶ必要がある。そこ
で、次のような計算を行なう。 d1を横罫線L0と横罫線L1との間隔とする。横罫線
L0と横罫線L1との間にあるセルの内一番幅の広いも
のがW0,1 と決定されていからこの値を自動的に、 d1=W0,1 と決定する。
Next, the determination of the distance di between two continuous horizontal ruled lines will be described (step 52). Step 51
By using the interval Wi, j between the horizontal ruled lines obtained by the above, the interval di between two continuous horizontal ruled lines is sequentially determined. For example, in FIG. 3, the horizontal ruled line H3 cannot be determined only by W0,3 determined by the size of the cell C1.
That is, W0,3 (size of C1 of cell) and W0,1 +
It is necessary to select the widest one of W1,2 + W2,3 (size of cells C2, C4, C6 added) and W0,1 + W1,3 (size of cells C3 and C5 added) There is. Therefore, the following calculation is performed. Let d1 be the distance between the horizontal ruled line L0 and the horizontal ruled line L1. Since the widest cell among the cells between the horizontal ruled line L0 and the horizontal ruled line L1 is determined to be W0,1, this value is automatically determined to be d1 = W0,1.

【0027】図9に示す間隔d2の決定は、横罫線L0
とL1間、横罫線L1とL2間、および横罫線L0とL
2間にセルを持つ可能性があるため、これらの間隔を比
較して一番間隔の大きいものにする必要がある。しか
し、既に計算されている横罫線L0とL1間の間隔d1
=W0,1 は決定されているので、横罫線L1とL2間に
あるセルで一番幅の広い間隔W1,2 と、横罫線L0と横
罫線L2間にあるセルで一番幅の広い間隔W0,2 から既
に決定している間隔d1を引いた間隔(W0,2 −d1)
を比較して、大きい間隔をd2と決定する。すなわち、
図10(イ)に示すように、 d21 =(横罫線L1と横罫線L2との間隔)=W1,2
とする。 d22 =(横罫線L0と横罫線L2との間隔)=W0,2
−d1とする。 d2は上記d21 とd22 とを比較して大きい方の値と
する。 d2=max{W1,2 、(W0,2 −d1)} ここで d2≧小さな正の定数 である。
The interval d2 shown in FIG. 9 is determined by the horizontal ruled line L0.
And L1, between horizontal ruled lines L1 and L2, and between horizontal ruled lines L0 and L
Since there is a possibility of having a cell between two, it is necessary to compare these intervals and make the largest interval. However, the distance d1 between the horizontal ruled lines L0 and L1 that has already been calculated
= W0,1 has been determined, so the widest spacing W1,2 between cells between horizontal ruled lines L1 and L2 and the widest spacing between cells between horizontal ruled lines L0 and horizontal ruled line L2 Interval (W0,2-d1) obtained by subtracting the previously determined interval d1 from W0,2
And a large interval is determined as d2. That is,
As shown in FIG. 10A, d2 1 = (spacing between horizontal ruled line L1 and horizontal ruled line L2) = W1,2
And d2 2 = (spacing between horizontal ruled line L0 and horizontal ruled line L2) = W0,2
-D1. d2 is the larger value by comparing the above d2 1 and d2 2 . d2 = max {W1,2, (W0,2-d1)} where d2 ≧ small positive constant.

【0028】同様にして、図10(ロ)に示すように、 d31 =(横罫線L2と横罫線L3との間隔)=W2,3
とする。 d32 =(横罫線L1と横罫線L3との間隔)=W1,3
−d1とする。 d33 =(横罫線L0と横罫線L3との間隔)=W0,3
−d1−d2とする。 d3は上記d31 とd32 とd33 とを比較して大きい
方の値とする。前記と同様に、 d3=max{W1,2 、(W1,3 −d2)、(W0,3 −d1−d2)} 以下、d4においても図10(ハ)に示すような比較を
行なう。ここで d3≧小さな正の定数 である。
Similarly, as shown in FIG. 10B, d3 1 = (spacing between horizontal ruled line L2 and horizontal ruled line L3) = W2,3
And d3 2 = (spacing between horizontal ruled line L1 and horizontal ruled line L3) = W1,3
-D1. d3 3 = (spacing between horizontal ruled line L0 and horizontal ruled line L3) = W0,3
-D1-d2. d3 is the larger value by comparing the above d3 1 , d3 2 and d3 3 . Similarly to the above, d3 = max {W1,2, (W1,3-d2), (W0,3-d1-d2)} Hereinafter, at d4, the comparison as shown in FIG. Here, d3 ≧ small positive constant.

【0029】横罫線に対して上記と同様な罫線をdiま
で続ける。 di1 =W(i−1),i、 di2 ={W(i−2),i}−d(i−1)、 di3 ={W(i−3),i}−{d(i−2)+d(i−1)}、 ・・・・ ・・・・ dii =W0,i −{d1+d2+・・・+d(i−1)} diはdi1 、di2 、di3 、di4 、・・・dii
を比較して一番大きい値とする。ここで di≧小さな
正の定数 である。ここで、上記のようにして求まった
diは、 Wi,j ≦{d1+d2+d3+・・・+d(i−1)}
を満足する。
A ruled line similar to the above is continued for the horizontal ruled line up to di. di 1 = W (i-1), i, di 2 = {W (i-2), i} -d (i-1), di 3 = {W (i-3), i}-{d ( i-2) + d (i -1)}, ···· ···· di i = W0, it - {d1 + d2 + ··· + d (i-1)} di is di 1, di 2, di 3 , di 4 , ... di i
Is compared and set to the largest value. Here, di ≧ small positive constant. Here, di obtained as described above is Wi, j ≤ {d1 + d2 + d3 + ... + d (i-1)}
To be satisfied.

【0030】上記計算によって、連続する2本の横罫線
の間隔diの位置が決定されるので、この連続した2本
の横罫線の間隔diを基にして、表の最上位の横罫線L
0を基準にして、全ての横罫線Liの位置を決定する
(ステップ53)。 ここで、di≧小さな正の定数であるため、編集前の連
続する2本の横罫線は、編集後に位置が逆転、あるいは
1本に重なることはない。たとえば、横罫線Liの位置
は、(d1+d2+d3+・・+di)で決定される。
次に、新しく決まった横罫線Liを表データとして、R
AM13における罫線情報記憶手段131および矩形領
域情報記憶手段132に書き込む。以後上記編集を繰り
返す。
By the above calculation, the position of the interval di between two consecutive horizontal ruled lines is determined, and therefore, the highest horizontal ruled line L in the table is based on the interval di between the two consecutive horizontal ruled lines.
The positions of all the horizontal ruled lines Li are determined based on 0 (step 53). Here, since di ≧ a small positive constant, the positions of two consecutive horizontal ruled lines before editing are not reversed or overlapped with one after editing. For example, the position of the horizontal ruled line Li is determined by (d1 + d2 + d3 + ... + di).
Next, using the newly determined horizontal ruled line Li as table data, R
Writing to the ruled line information storage means 131 and the rectangular area information storage means 132 in the AM 13. After that, the above editing is repeated.

【0031】[0031]

【発明の効果】本発明によれば、罫線情報と矩形領域情
報とを別にして記憶すると共に、全ての2本の横罫線に
おける間隔を決定する第1罫線間隔決定処理手段と、連
続する罫線の間隔を決定する第2罫線間隔決定処理手段
と、編集後の横罫線を最上位の基準線から順次自動的に
再配置する罫線間隔整列処理手段とを備えることによ
り、マトリックス状でない表においても、マトリックス
状の表と同様に各矩形領域の高さから表の各横罫線の位
置が決定できる。したがって、表における矩形領域の大
きさが変化しても、矩形領域の高さにフィットした表が
自動的に作成される。
According to the present invention, the ruled line information and the rectangular area information are separately stored, and the first ruled line interval determination processing means for determining the intervals between all two horizontal ruled lines, and the continuous ruled lines. By providing the second ruled line interval determination processing means for determining the interval between the two and the ruled line interval alignment processing means for automatically rearranging the edited horizontal ruled lines sequentially from the uppermost reference line, even in a non-matrix table. The position of each horizontal ruled line in the table can be determined from the height of each rectangular area as in the matrix table. Therefore, even if the size of the rectangular area in the table changes, a table that fits the height of the rectangular area is automatically created.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明における表の罫線位置決定装置の一実
施例を説明するためのブロック構成図である。
FIG. 1 is a block diagram illustrating an embodiment of a table ruled line position determining device according to the present invention.

【図2】 本発明における表を表すためのデータ構成を
説明する図である。
FIG. 2 is a diagram illustrating a data structure for representing a table according to the present invention.

【図3】 本発明における完全なマトリックス状になら
ない表を説明するための図である。
FIG. 3 is a diagram for explaining a table that does not form a perfect matrix according to the present invention.

【図4】 本発明における表の罫線位置決定装置を使用
した表の作成例を示すフローチャートである。
FIG. 4 is a flowchart showing an example of creating a table using the table ruled line position determining device according to the present invention.

【図5】 本発明における表の自動拡縮を行うための処
理を説明するフローチャートである。
FIG. 5 is a flowchart illustrating a process for automatically scaling a table according to the present invention.

【図6】 本発明における横罫線の間隔を決定するため
の説明図である。
FIG. 6 is an explanatory diagram for determining an interval between horizontal ruled lines in the present invention.

【図7】 2本の横罫線によって区切られた編集前のセ
ルを説明するための図である。
FIG. 7 is a diagram for explaining a cell before editing, which is divided by two horizontal ruled lines.

【図8】 本発明における自動拡縮処理を行った後のセ
ルの大きさを示した例を説明するための図である。
FIG. 8 is a diagram for explaining an example showing a cell size after performing an automatic scaling process according to the present invention.

【図9】 本発明における連続する2本の横罫線を決定
するための説明図である。
FIG. 9 is an explanatory diagram for determining two continuous horizontal ruled lines in the present invention.

【図10】 本発明における横罫線間の幅を表す記号W
ij、diを説明した図である。
FIG. 10 is a symbol W representing a width between horizontal ruled lines in the present invention.
It is a figure explaining ij and di.

【図11】 (イ)ないし(ニ)は従来例における文書
処理装置で罫線を引く場合を説明するための図である。
11A to 11D are diagrams for explaining a case where a ruled line is drawn in the conventional document processing apparatus.

【符号の説明】[Explanation of symbols]

11・・・罫線位置決定部 111・・・第1罫線間隔決定処理手段 112・・・第2罫線間隔決定処理手段 113・・・罫線間隔整列処理手段 12・・・データバス 13・・・RAM 131・・・罫線情報記憶手段 132・・・矩形領域情報記憶手段 14・・・磁気ディスク 15・・・磁気ディスク制御回路 16・・・ディスプレイ 17・・・ディスプレイ制御回路 18・・・マウス 19・・・キーボード 20・・・入力制御回路 21・・・全縦罫線データ 22・・・全横罫線データ 23・・・全セル属性データ 11 ... Ruled line position determination unit 111 ... First ruled line interval determination processing means 112 ... Second ruled line interval determination processing means 113 ... Ruled line interval alignment processing means 12 ... Data bus 13 ... RAM 131 ... Ruled line information storage means 132 ... Rectangular area information storage means 14 ... Magnetic disk 15 ... Magnetic disk control circuit 16 ... Display 17 ... Display control circuit 18 ... Mouse 19. ..Keyboard 20 ... input control circuit 21 ... all vertical ruled line data 22 ... all horizontal ruled line data 23 ... all cell attribute data

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の矩形領域から構成され、非マトリ
ックス状の形状を許容する表の罫線位置を決定する表の
罫線位置決定装置において、 罫線の位置を表す情報を記憶する罫線情報記憶手段と、 前記矩形領域の属性と当該矩形領域に記載された内容と
からなる情報を記憶する矩形領域情報記憶手段と、 表を形成する矩形領域における全ての2本の横罫線にお
ける間隔、および表を編集した際に、2本の横罫線によ
って形成された矩形領域を探索し、その矩形領域におけ
る一番幅の広い間隔をそれぞれ決定する第1罫線間隔決
定処理手段と、 連続する2本の横罫線の間隔を決定する第2罫線間隔決
定処理手段と、 前記第1罫線間隔決定処理手段および第2罫線間隔決定
処理手段によって決定された間隔に基づいて、編集後の
横罫線を最上位の基準線から順次自動的に再配置する罫
線間隔整列処理手段と、 を備えたことを特徴とする表の罫線位置決定装置。
1. A ruled-line-position determining device for determining a ruled-line position of a table configured from a plurality of rectangular areas and allowing a non-matrix shape, and ruled-line information storage means for storing information indicating the position of the ruled line. , A rectangular area information storage unit for storing information consisting of the attributes of the rectangular area and the contents described in the rectangular area, an interval between all two horizontal ruled lines in the rectangular area forming a table, and a table In doing so, a first ruled line interval determination processing unit that searches for a rectangular area formed by two horizontal ruled lines and determines the widest interval in the rectangular area, and a continuous horizontal ruled line Second ruled line spacing determination processing means for determining the spacing, and based on the spacing determined by the first ruled line spacing determination processing means and the second ruled line spacing determination processing means, the horizontal ruled line after editing is set to the highest position. Table borders positioning apparatus characterized by comprising: a ruled line spacing alignment processing means for sequentially automatically relocated from the reference line, the.
JP4090142A 1992-03-17 1992-03-17 Ruled line position deciding device for table Pending JPH05266016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4090142A JPH05266016A (en) 1992-03-17 1992-03-17 Ruled line position deciding device for table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4090142A JPH05266016A (en) 1992-03-17 1992-03-17 Ruled line position deciding device for table

Publications (1)

Publication Number Publication Date
JPH05266016A true JPH05266016A (en) 1993-10-15

Family

ID=13990263

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4090142A Pending JPH05266016A (en) 1992-03-17 1992-03-17 Ruled line position deciding device for table

Country Status (1)

Country Link
JP (1) JPH05266016A (en)

Similar Documents

Publication Publication Date Title
JPH0445874B2 (en)
US7305617B2 (en) Method for aligning text to baseline grids and to CJK character grids
JP3396404B2 (en) Automatic string editing system
JPS6290751A (en) Documentation device
US5727224A (en) Document image processor for inserting and editing bracket symbols and associated text
JPH05266016A (en) Ruled line position deciding device for table
JP2001216292A (en) Layout image editing device and layout image editing method
JPH0512398A (en) Method and device for image editing
JPH0736433A (en) Character data base preparing device
US5185854A (en) Document processing apparatus having a ruled line print control function
JPH06342430A (en) Automatic page divided display editing device
JPH0969098A (en) Document preparation device
JP2699974B2 (en) Pattern registration method
JP3144792B2 (en) Table editing device
JPH05210661A (en) Word processor and method therefor
JP2773145B2 (en) Document shaping method and document processing device
JPH06101028B2 (en) Character dot / font line segmentation method
JPH08293033A (en) Information processor
JPH1011425A (en) Rectangular area production method for document preparing device
JPH06110631A (en) Display controller
JPH02148094A (en) Character information processor
JPH0764727A (en) Cursor inter-stage moving method
JPH0447359A (en) Method and device for generating text area in documentation device
JPS62138959A (en) Page index system for document processor
JPH04112262A (en) Text editting device