Files
core/ASCOfficeOdtFile/Source/DocxFormat/Logic/Index.cpp
Elen.Subbotina 6138139c4e исправлен проект - подключен "старый" DocxFormat (тот который с AVS - без вытирания буста)
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 22:37:54 +03:00

71 lines
1.0 KiB
C++

// auto inserted precompiled begin
#include "precompiled_docxformat.h"
// auto inserted precompiled end
#include "Index.h"
namespace OOX
{
namespace Logic
{
Index::Index()
{
}
Index::Index(const Common::Index& index)
{
fromBase(index);
}
Index::Index(const std::string& value)
{
fromString(value);
}
const Index& Index::operator= (const Common::Index& index)
{
fromBase(index);
return *this;
}
const Index& Index::operator= (const std::string& value)
{
fromString(value);
return *this;
}
const std::string Index::ToString() const
{
switch (type())
{
case super:
return "superscript";
case normal:
return "";
case sub:
return "subscript";
default:
return "";
}
}
void Index::fromString(const std::string& value)
{
if (value == "superscript")
setSuper();
else if (value == "subscript")
setSub();
else
setNormal();
}
} // namespace Logic
} // namespace OOX