34#ifndef STOFF_POSITION_H 
   35#define STOFF_POSITION_H 
   39#include <librevenge/librevenge.h> 
   64  void addTo(librevenge::RVNGPropertyList &propList)
 const 
   69      propList.insert(
"text:anchor-type", 
"cell");
 
   72      propList.insert(
"text:anchor-type", 
"char");
 
   75      propList.insert(
"text:anchor-type", 
"as-char");
 
   78      propList.insert(
"text:anchor-type", 
"frame");
 
   81      propList.insert(
"text:anchor-type", 
"paragraph");
 
   84      propList.insert(
"text:anchor-type", 
"page");
 
   91    for (i.rewind(); i.next();) {
 
   93        STOFF_DEBUG_MSG((
"STOFFPosition::addTo: find unexpected property child\n"));
 
   94        propList.insert(i.key(), *i.child());
 
   97      propList.insert(i.key(), i()->clone());
 
 
  104    m_propertyList.insert(
"svg:x",
double(origin[0]), librevenge::RVNG_POINT);
 
  105    m_propertyList.insert(
"svg:y",
double(origin[1]), librevenge::RVNG_POINT);
 
 
  112      m_propertyList.insert(
"svg:width",
double(size.
x()), librevenge::RVNG_POINT);
 
  114      m_propertyList.insert(
"fo:min-width",
double(-size.
x()), librevenge::RVNG_POINT);
 
  116      m_propertyList.insert(
"svg:height",
double(size.
y()), librevenge::RVNG_POINT);
 
  118      m_propertyList.insert(
"fo:min-height",
double(-size.
y()), librevenge::RVNG_POINT);
 
 
  128    o << 
"prop=[" << pos.
m_propertyList.getPropString().cstr() << 
"],";
 
 
 
bool operator==(STOFFPosition const &f) const
basic operator==
Definition STOFFPosition.hxx:132
STOFFPosition()
constructor
Definition STOFFPosition.hxx:55
bool operator!=(STOFFPosition const &f) const
basic operator!=
Definition STOFFPosition.hxx:139
void setOrigin(STOFFVec2f const &origin)
utility function to set a origin in point
Definition STOFFPosition.hxx:101
librevenge::RVNGPropertyList m_propertyList
the property list
Definition STOFFPosition.hxx:153
void setSize(STOFFVec2f const &size)
utility function to set a size in point
Definition STOFFPosition.hxx:108
STOFFVec2f m_size
the size in point
Definition STOFFPosition.hxx:149
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition STOFFPosition.hxx:64
AnchorTo
a list of enum used to defined the anchor
Definition STOFFPosition.hxx:51
@ Unknown
Definition STOFFPosition.hxx:51
@ Frame
Definition STOFFPosition.hxx:51
@ CharBaseLine
Definition STOFFPosition.hxx:51
@ Cell
Definition STOFFPosition.hxx:51
@ Page
Definition STOFFPosition.hxx:51
@ Char
Definition STOFFPosition.hxx:51
@ Paragraph
Definition STOFFPosition.hxx:51
friend std::ostream & operator<<(std::ostream &o, STOFFPosition const &pos)
operator<<
Definition STOFFPosition.hxx:126
virtual ~STOFFPosition()
destructor
Definition STOFFPosition.cxx:36
AnchorTo m_anchorTo
anchor position
Definition STOFFPosition.hxx:145
STOFFVec2f m_offset
internal: an offset used to retrieve the local position in a DrawingLayer
Definition STOFFPosition.hxx:151
void setAnchor(AnchorTo anchor)
set the anchor
Definition STOFFPosition.hxx:121
STOFFVec2f m_origin
the origin in point
Definition STOFFPosition.hxx:147
T y() const
second element
Definition libstaroffice_internal.hxx:602
T x() const
first element
Definition libstaroffice_internal.hxx:597
STOFFVec2< float > STOFFVec2f
STOFFVec2 of float.
Definition libstaroffice_internal.hxx:771
#define STOFF_DEBUG_MSG(M)
Definition libstaroffice_internal.hxx:129