Commit 1a5b91ff authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63352 954022d7-b5bf-4e40-9824-e11837661b57
parent f1e60665
......@@ -29,6 +29,19 @@ std::wostream & operator << (std::wostream & _Wostream, const border_style & bor
return _Wostream;
}
bool operator == (border_style & _b1, border_style & _b2)
{
if (_b1.is_none() && _b2.is_none()) return true;
if (_b1.is_none() || _b2.is_none()) return false;
if ( _b1.get_color() == _b2.get_color() &&
_b1.get_length() == _b2.get_length() &&
_b1.get_style() == _b2.get_style()) return true;
return false;
}
border_style::border_style(const border_style & Value)
{
color_ = Value.get_color();
......@@ -39,7 +52,18 @@ border_style::border_style(const border_style & Value)
initialized_ = true;
}
border_style& border_style::operator =(const border_style& Value)
{
color_ = Value.get_color();
length_ = Value.get_length();
style_ = Value.get_style();
none_ = Value.is_none();
initialized_ = true;
return *this;
}
border_style::border_style(const std::wstring & Value) : initialized_(false), none_(false)
{
std::wstring tmp = boost::algorithm::trim_copy(Value);
......
......@@ -37,7 +37,7 @@ public:
border_style(const color & color_, const type & style_, const length & length_);
static border_style parse(const std::wstring & Str);
border_style& operator=(const border_style& ob);
public:
bool initialized() const { return initialized_; }
bool is_none() const { return none_; }
......@@ -55,6 +55,7 @@ private:
};
std::wostream & operator << (std::wostream & _Wostream, const border_style & _Val);
bool operator == (border_style & _b1, border_style & _b2);
}
APPLY_PARSE_XML_ATTRIBUTES(odf_types::border_style);
......
......@@ -14,7 +14,11 @@ std::wostream & operator << (std::wostream & _Wostream, const color & _Color)
_Wostream << _Color.get_color();
return _Wostream;
}
bool operator== (const color & c1, const color & c2)
{
if (c1.get_hex_value() == c2.get_hex_value())return true;
else return false;
}
color color::parse(const std::wstring & Str)
{
return color(Str);
......
......@@ -28,7 +28,7 @@ private:
};
std::wostream & operator << (std::wostream & _Wostream, const color & _Color);
bool operator== (const color & c1, const color & c2);
}
APPLY_PARSE_XML_ATTRIBUTES(odf_types::color);
......
......@@ -73,6 +73,11 @@ bool operator== (length & _Length1, length & _Length2)
if (_Length1.get_value() == _Length2.get_value())return true;
else return false;
}
bool operator== (const length & _Length1, const length & _Length2)
{
if (_Length1.get_value() == _Length2.get_value())return true;
else return false;
}
length length::parse(const std::wstring & Str)
{
......
......@@ -53,6 +53,7 @@ length operator- (length & _Length1, length & _Length2);
length operator/ (length & _Length1, double val);
length operator* (length & _Length1, double val);
bool operator== (length & _Length1, length & _Length2);
bool operator== (const length & _Length1, const length & _Length2);
typedef length coordinate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment