When posting here, always mention OS name, LO version and save format.
There is no “primitive object” as a horizontal line. Primitive object in Writer is a paragraph. A paragraph has many attributes, among which a border. The border is used to “simulate” a horizontal line (may be in upper or lower position) extending from paragraph margin to paragraph margin.
From the wording of your question, it looks like you apply formatting manually. Writer is based on the concept of styles which automate formatting and allow separation of contents (text) from appearance. Have a look at the Writer Guide.