summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-10-25 01:11:49 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-10-25 01:23:08 +0200
commit38cf494f90d19d1673773437cd52e8f0cfbf4eb5 (patch)
treed3e5e6ef27c6158144c213dacc97434aab25a6f0 /writerperfect
parent0a6132d7de81e33f6d632f621cf30eb232c3b5df (diff)
White-space change to fix messy mix of different coding styles
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/filter/DocumentElement.cxx2
-rw-r--r--writerperfect/source/filter/DocumentElement.hxx5
-rw-r--r--writerperfect/source/filter/DocumentHandler.cxx22
-rw-r--r--writerperfect/source/filter/DocumentHandler.hxx14
-rw-r--r--writerperfect/source/filter/FontStyle.cxx6
-rw-r--r--writerperfect/source/filter/FontStyle.hxx28
-rw-r--r--writerperfect/source/filter/InternalHandler.cxx14
-rw-r--r--writerperfect/source/filter/InternalHandler.hxx2
-rw-r--r--writerperfect/source/filter/ListStyle.cxx9
-rw-r--r--writerperfect/source/filter/ListStyle.hxx9
-rw-r--r--writerperfect/source/filter/OdgGenerator.cxx140
-rw-r--r--writerperfect/source/filter/OdgGenerator.hxx15
-rw-r--r--writerperfect/source/filter/OdtGenerator.cxx115
-rw-r--r--writerperfect/source/filter/OdtGenerator.hxx22
-rw-r--r--writerperfect/source/filter/PageSpan.cxx102
-rw-r--r--writerperfect/source/filter/PageSpan.hxx4
-rw-r--r--writerperfect/source/filter/SectionStyle.cxx16
-rw-r--r--writerperfect/source/filter/SectionStyle.hxx2
-rw-r--r--writerperfect/source/filter/Style.hxx28
-rw-r--r--writerperfect/source/filter/TableStyle.cxx52
-rw-r--r--writerperfect/source/filter/TableStyle.hxx31
-rw-r--r--writerperfect/source/filter/TextRunStyle.cxx29
-rw-r--r--writerperfect/source/filter/TextRunStyle.hxx53
-rw-r--r--writerperfect/source/filter/libwriterperfect_filter.cxx2
-rw-r--r--writerperfect/source/filter/libwriterperfect_filter.hxx4
-rw-r--r--writerperfect/source/stream/WPXSvStream.cxx20
-rw-r--r--writerperfect/source/vsdimp/VisioImportFilter.cxx44
-rw-r--r--writerperfect/source/vsdimp/VisioImportFilter.hxx34
-rw-r--r--writerperfect/source/vsdimp/visioimport_genericfilter.cxx34
-rw-r--r--writerperfect/source/wpdimp/WordPerfectImportFilter.cxx102
-rw-r--r--writerperfect/source/wpdimp/WordPerfectImportFilter.hxx104
-rw-r--r--writerperfect/source/wpdimp/wpft_genericfilter.cxx34
-rw-r--r--writerperfect/source/wpgimp/WPGImportFilter.cxx44
-rw-r--r--writerperfect/source/wpgimp/WPGImportFilter.hxx34
-rw-r--r--writerperfect/source/wpgimp/wpgimport_genericfilter.cxx34
-rw-r--r--writerperfect/source/wpsimp/MSWorksImportFilter.cxx64
-rw-r--r--writerperfect/source/wpsimp/MSWorksImportFilter.hxx48
-rw-r--r--writerperfect/source/wpsimp/msworks_genericfilter.cxx34
38 files changed, 725 insertions, 631 deletions
diff --git a/writerperfect/source/filter/DocumentElement.cxx b/writerperfect/source/filter/DocumentElement.cxx
index e523f07d4101..bb2c97218b72 100644
--- a/writerperfect/source/filter/DocumentElement.cxx
+++ b/writerperfect/source/filter/DocumentElement.cxx
@@ -50,7 +50,7 @@ void TagOpenElement::print() const
void TagOpenElement::addAttribute(const WPXString &szAttributeName, const WPXString &sAttributeValue)
{
- maAttrList.insert(szAttributeName.cstr(), sAttributeValue);
+ maAttrList.insert(szAttributeName.cstr(), sAttributeValue);
}
void TagCloseElement::write(OdfDocumentHandler *pHandler) const
diff --git a/writerperfect/source/filter/DocumentElement.hxx b/writerperfect/source/filter/DocumentElement.hxx
index 4032a399b52c..ab195f40fd5a 100644
--- a/writerperfect/source/filter/DocumentElement.hxx
+++ b/writerperfect/source/filter/DocumentElement.hxx
@@ -48,7 +48,10 @@ class TagElement : public DocumentElement
public:
virtual ~TagElement() {}
TagElement(const WPXString &szTagName) : msTagName(szTagName) {}
- const WPXString & getTagName() const { return msTagName; }
+ const WPXString &getTagName() const
+ {
+ return msTagName;
+ }
virtual void print() const;
private:
WPXString msTagName;
diff --git a/writerperfect/source/filter/DocumentHandler.cxx b/writerperfect/source/filter/DocumentHandler.cxx
index c61ffc0c19c5..c2a7386d6ef7 100644
--- a/writerperfect/source/filter/DocumentHandler.cxx
+++ b/writerperfect/source/filter/DocumentHandler.cxx
@@ -37,7 +37,7 @@ using rtl::OUString;
using com::sun::star::xml::sax::XAttributeList;
DocumentHandler::DocumentHandler(Reference < XDocumentHandler > &xHandler) :
- mxHandler(xHandler)
+ mxHandler(xHandler)
{
}
@@ -56,26 +56,26 @@ void DocumentHandler::startElement(const char *psName, const WPXPropertyList &xP
#ifdef DEBUG_XML
printf("<%s", psName);
#endif
- SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
+ SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
Reference < XAttributeList > xAttrList(pAttrList);
WPXPropertyList::Iter i(xPropList);
for (i.rewind(); i.next(); )
{
- // filter out libwpd elements
- if (strncmp(i.key(), "libwpd", 6) != 0)
+ // filter out libwpd elements
+ if (strncmp(i.key(), "libwpd", 6) != 0)
{
- pAttrList->AddAttribute(OUString::createFromAscii(i.key()),
- OUString::createFromAscii(i()->getStr().cstr()));
+ pAttrList->AddAttribute(OUString::createFromAscii(i.key()),
+ OUString::createFromAscii(i()->getStr().cstr()));
#ifdef DEBUG_XML
printf(" %s=\"%s\"", i.key(), i()->getStr().cstr());
#endif
}
- }
+ }
#ifdef DEBUG_XML
printf(">");
#endif
- mxHandler->startElement(OUString::createFromAscii(psName), xAttrList);
+ mxHandler->startElement(OUString::createFromAscii(psName), xAttrList);
}
void DocumentHandler::endElement(const char *psName)
@@ -83,17 +83,17 @@ void DocumentHandler::endElement(const char *psName)
#ifdef DEBUG_XML
printf("</%s>", psName);
#endif
- mxHandler->endElement(OUString::createFromAscii(psName));
+ mxHandler->endElement(OUString::createFromAscii(psName));
}
void DocumentHandler::characters(const WPXString &sCharacters)
{
- OUString sCharU16(sCharacters.cstr(), strlen(sCharacters.cstr()), RTL_TEXTENCODING_UTF8);
+ OUString sCharU16(sCharacters.cstr(), strlen(sCharacters.cstr()), RTL_TEXTENCODING_UTF8);
#ifdef DEBUG_XML
WPXString sEscapedCharacters(sCharacters, true);
printf("%s", sEscapedCharacters.cstr());
#endif
- mxHandler->characters(sCharU16);
+ mxHandler->characters(sCharU16);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/filter/DocumentHandler.hxx b/writerperfect/source/filter/DocumentHandler.hxx
index 692c35e3b462..1747c18ace44 100644
--- a/writerperfect/source/filter/DocumentHandler.hxx
+++ b/writerperfect/source/filter/DocumentHandler.hxx
@@ -20,15 +20,15 @@ using com::sun::star::xml::sax::XDocumentHandler;
class DocumentHandler: public OdfDocumentHandler
{
public:
- DocumentHandler(Reference < XDocumentHandler > &xHandler);
- void startDocument();
- void endDocument();
- void startElement(const char *psName, const WPXPropertyList &xPropList);
- void endElement(const char *psName);
- void characters(const WPXString &sCharacters);
+ DocumentHandler(Reference < XDocumentHandler > &xHandler);
+ void startDocument();
+ void endDocument();
+ void startElement(const char *psName, const WPXPropertyList &xPropList);
+ void endElement(const char *psName);
+ void characters(const WPXString &sCharacters);
private:
- Reference < XDocumentHandler > mxHandler;
+ Reference < XDocumentHandler > mxHandler;
};
#endif // _OODOCUMENTHANDLER_HXX_
diff --git a/writerperfect/source/filter/FontStyle.cxx b/writerperfect/source/filter/FontStyle.cxx
index 5743e1e6e533..ac501c64f335 100644
--- a/writerperfect/source/filter/FontStyle.cxx
+++ b/writerperfect/source/filter/FontStyle.cxx
@@ -49,12 +49,10 @@ void FontStyle::write(OdfDocumentHandler *pHandler) const
styleClose.write(pHandler);
}
-////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////
void FontStyleManager::clean()
{
for (std::map<WPXString, FontStyle *, ltstr>::iterator iter = mHash.begin();
- iter != mHash.end(); ++iter)
+ iter != mHash.end(); iter++)
{
delete(iter->second);
}
@@ -65,7 +63,7 @@ void FontStyleManager::writeFontsDeclaration(OdfDocumentHandler *pHandler) const
{
TagOpenElement("office:font-face-decls").write(pHandler);
for (std::map<WPXString, FontStyle *, ltstr>::const_iterator iter = mHash.begin();
- iter != mHash.end(); ++iter)
+ iter != mHash.end(); iter++)
{
(iter->second)->write(pHandler);
}
diff --git a/writerperfect/source/filter/FontStyle.hxx b/writerperfect/source/filter/FontStyle.hxx
index 129846ef9e35..f58bdf6b7783 100644
--- a/writerperfect/source/filter/FontStyle.hxx
+++ b/writerperfect/source/filter/FontStyle.hxx
@@ -40,7 +40,10 @@ public:
FontStyle(const char *psName, const char *psFontFamily);
~FontStyle();
virtual void write(OdfDocumentHandler *pHandler) const;
- const WPXString &getFontFamily() const { return msFontFamily; }
+ const WPXString &getFontFamily() const
+ {
+ return msFontFamily;
+ }
private:
WPXString msFontFamily;
@@ -50,22 +53,25 @@ private:
class FontStyleManager : public StyleManager
{
public:
- FontStyleManager() : mHash() {}
- virtual ~FontStyleManager() { FontStyleManager::clean(); }
+ FontStyleManager() : mHash() {}
+ virtual ~FontStyleManager()
+ {
+ FontStyleManager::clean();
+ }
- /* create a new font if the font does not exists and returns a font name
+ /* create a new font if the font does not exists and returns a font name
- Note: the returned font name is actually equalled to psFontFamily
- */
- WPXString findOrAdd(const char *psFontFamily);
+ Note: the returned font name is actually equalled to psFontFamily
+ */
+ WPXString findOrAdd(const char *psFontFamily);
- virtual void clean();
- virtual void write(OdfDocumentHandler *) const {}
- virtual void writeFontsDeclaration(OdfDocumentHandler *) const;
+ virtual void clean();
+ virtual void write(OdfDocumentHandler *) const {}
+ virtual void writeFontsDeclaration(OdfDocumentHandler *) const;
protected:
- std::map<WPXString, FontStyle *, ltstr> mHash;
+ std::map<WPXString, FontStyle *, ltstr> mHash;
};
#endif
diff --git a/writerperfect/source/filter/InternalHandler.cxx b/writerperfect/source/filter/InternalHandler.cxx
index 32b6e438fca7..8a1389d6f81c 100644
--- a/writerperfect/source/filter/InternalHandler.cxx
+++ b/writerperfect/source/filter/InternalHandler.cxx
@@ -34,13 +34,13 @@ InternalHandler::InternalHandler(std::vector<DocumentElement *> *elements):
void InternalHandler::startElement(const char *psName, const WPXPropertyList &xPropList)
{
TagOpenElement *element = new TagOpenElement(psName);
- WPXPropertyList::Iter i(xPropList);
- for (i.rewind(); i.next(); )
- {
- // filter out libwpd elements
- if (strncmp(i.key(), "libwpd", 6) != 0)
- element->addAttribute(i.key(), i()->getStr());
- }
+ WPXPropertyList::Iter i(xPropList);
+ for (i.rewind(); i.next(); )
+ {
+ // filter out libwpd elements
+ if (strncmp(i.key(), "libwpd", 6) != 0)
+ element->addAttribute(i.key(), i()->getStr());
+ }
mpElements->push_back(element);
}
diff --git a/writerperfect/source/filter/InternalHandler.hxx b/writerperfect/source/filter/InternalHandler.hxx
index c132db765d79..a7b58f9af4c2 100644
--- a/writerperfect/source/filter/InternalHandler.hxx
+++ b/writerperfect/source/filter/InternalHandler.hxx
@@ -43,6 +43,8 @@ public:
void endElement(const char *psName);
void characters(const WPXString &sCharacters);
private:
+ InternalHandler(const InternalHandler &);
+ InternalHandler &operator=(const InternalHandler &);
std::vector<DocumentElement *> *mpElements;
};
#endif
diff --git a/writerperfect/source/filter/ListStyle.cxx b/writerperfect/source/filter/ListStyle.cxx
index 7d7a59b5e2f1..cee4ac12eb59 100644
--- a/writerperfect/source/filter/ListStyle.cxx
+++ b/writerperfect/source/filter/ListStyle.cxx
@@ -108,7 +108,8 @@ void UnorderedListLevelStyle::write(OdfDocumentHandler *pHandler, int iLevel) co
if (mPropList["text:bullet-char"] && (mPropList["text:bullet-char"]->getStr().len()))
{
// The following is needed because the odf format does not accept bullet chars longer than one character
- WPXString::Iter i(mPropList["text:bullet-char"]->getStr()); i.rewind();
+ WPXString::Iter i(mPropList["text:bullet-char"]->getStr());
+ i.rewind();
WPXString sEscapedString(".");
if (i.next())
sEscapedString = WPXString(i(), true);
@@ -145,7 +146,8 @@ ListStyle::ListStyle(const char *psName, const int iListID) :
ListStyle::~ListStyle()
{
- for (int i=0; i<WP6_NUM_LIST_LEVELS; i++) {
+ for (int i=0; i<WP6_NUM_LIST_LEVELS; i++)
+ {
if (mppListLevels[i])
delete(mppListLevels[i]);
}
@@ -175,7 +177,8 @@ void ListStyle::write(OdfDocumentHandler *pHandler) const
listStyleOpenElement.addAttribute("style:name", getName());
listStyleOpenElement.write(pHandler);
- for (int i=0; i<WP6_NUM_LIST_LEVELS; i++) {
+ for (int i=0; i<WP6_NUM_LIST_LEVELS; i++)
+ {
if (mppListLevels[i] != NULL)
mppListLevels[i]->write(pHandler, i);
}
diff --git a/writerperfect/source/filter/ListStyle.hxx b/writerperfect/source/filter/ListStyle.hxx
index 882b1266320a..68d314f25bc9 100644
--- a/writerperfect/source/filter/ListStyle.hxx
+++ b/writerperfect/source/filter/ListStyle.hxx
@@ -49,7 +49,7 @@ public:
OrderedListLevelStyle(const WPXPropertyList &xPropList);
void write(OdfDocumentHandler *pHandler, int iLevel) const;
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
};
class UnorderedListLevelStyle : public ListLevelStyle
@@ -58,7 +58,7 @@ public:
UnorderedListLevelStyle(const WPXPropertyList &xPropList);
void write(OdfDocumentHandler *pHandler, int iLevel) const;
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
};
class ListStyle : public Style
@@ -68,7 +68,10 @@ public:
virtual ~ListStyle();
virtual void updateListLevel(const int iLevel, const WPXPropertyList &xPropList) = 0;
virtual void write(OdfDocumentHandler *pHandler) const;
- int getListID() { return miListID; }
+ int getListID()
+ {
+ return miListID;
+ }
bool isListLevelDefined(int iLevel) const;
protected:
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 2de6f4ab7faf..637ba76bcd83 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -241,8 +241,8 @@ public:
OdgGeneratorPrivate(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
~OdgGeneratorPrivate();
void _writeGraphicsStyle();
- void _drawPolySomething(const ::WPXPropertyListVector& vertices, bool isClosed);
- void _drawPath(const WPXPropertyListVector& path);
+ void _drawPolySomething(const ::WPXPropertyListVector &vertices, bool isClosed);
+ void _drawPath(const WPXPropertyListVector &path);
// body elements
std::vector <DocumentElement *> mBodyElements;
@@ -320,31 +320,31 @@ OdgGeneratorPrivate::~OdgGeneratorPrivate()
}
for (std::vector<DocumentElement *>::iterator iterGraphicsAutomaticStyles = mGraphicsAutomaticStyles.begin();
- iterGraphicsAutomaticStyles != mGraphicsAutomaticStyles.end(); ++iterGraphicsAutomaticStyles)
+ iterGraphicsAutomaticStyles != mGraphicsAutomaticStyles.end(); ++iterGraphicsAutomaticStyles)
{
delete((*iterGraphicsAutomaticStyles));
}
for (std::vector<DocumentElement *>::iterator iterGraphicsStrokeDashStyles = mGraphicsStrokeDashStyles.begin();
- iterGraphicsStrokeDashStyles != mGraphicsStrokeDashStyles.end(); ++iterGraphicsStrokeDashStyles)
+ iterGraphicsStrokeDashStyles != mGraphicsStrokeDashStyles.end(); ++iterGraphicsStrokeDashStyles)
{
delete((*iterGraphicsStrokeDashStyles));
}
for (std::vector<DocumentElement *>::iterator iterGraphicsGradientStyles = mGraphicsGradientStyles.begin();
- iterGraphicsGradientStyles != mGraphicsGradientStyles.end(); ++iterGraphicsGradientStyles)
+ iterGraphicsGradientStyles != mGraphicsGradientStyles.end(); ++iterGraphicsGradientStyles)
{
delete((*iterGraphicsGradientStyles));
}
for (std::vector<DocumentElement *>::iterator iterPageAutomaticStyles = mPageAutomaticStyles.begin();
- iterPageAutomaticStyles != mPageAutomaticStyles.end(); ++iterPageAutomaticStyles)
+ iterPageAutomaticStyles != mPageAutomaticStyles.end(); ++iterPageAutomaticStyles)
{
delete((*iterPageAutomaticStyles));
}
for (std::vector<DocumentElement *>::iterator iterPageMasterStyles = mPageMasterStyles.begin();
- iterPageMasterStyles != mPageMasterStyles.end(); ++iterPageMasterStyles)
+ iterPageMasterStyles != mPageMasterStyles.end(); ++iterPageMasterStyles)
{
delete((*iterPageMasterStyles));
}
@@ -361,10 +361,10 @@ OdgGenerator::OdgGenerator(OdfDocumentHandler *pHandler, const OdfStreamType str
mpImpl->mpHandler->startDocument();
TagOpenElement tmpOfficeDocumentContent(
(mpImpl->mxStreamType == ODF_FLAT_XML) ? "office:document" : (
- (mpImpl->mxStreamType == ODF_CONTENT_XML) ? "office:document-content" : (
- (mpImpl->mxStreamType == ODF_STYLES_XML) ? "office:document-styles" : (
- (mpImpl->mxStreamType == ODF_SETTINGS_XML) ? "office:document-settings" : (
- (mpImpl->mxStreamType == ODF_META_XML) ? "office:document-meta" : "office:document" )))));
+ (mpImpl->mxStreamType == ODF_CONTENT_XML) ? "office:document-content" : (
+ (mpImpl->mxStreamType == ODF_STYLES_XML) ? "office:document-styles" : (
+ (mpImpl->mxStreamType == ODF_SETTINGS_XML) ? "office:document-settings" : (
+ (mpImpl->mxStreamType == ODF_META_XML) ? "office:document-meta" : "office:document" )))));
tmpOfficeDocumentContent.addAttribute("xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0");
tmpOfficeDocumentContent.addAttribute("xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
tmpOfficeDocumentContent.addAttribute("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0");
@@ -407,14 +407,16 @@ OdgGenerator::~OdgGenerator()
configItemOpenElement.addAttribute("config:name", "VisibleAreaWidth");
configItemOpenElement.addAttribute("config:type", "int");
configItemOpenElement.write(mpImpl->mpHandler);
- WPXString sWidth; sWidth.sprintf("%li", (unsigned long)(2540 * mpImpl->mfMaxWidth));
+ WPXString sWidth;
+ sWidth.sprintf("%li", (unsigned long)(2540 * mpImpl->mfMaxWidth));
mpImpl->mpHandler->characters(sWidth);
mpImpl->mpHandler->endElement("config:config-item");
configItemOpenElement.addAttribute("config:name", "VisibleAreaHeight");
configItemOpenElement.addAttribute("config:type", "int");
configItemOpenElement.write(mpImpl->mpHandler);
- WPXString sHeight; sHeight.sprintf("%li", (unsigned long)(2540 * mpImpl->mfMaxHeight));
+ WPXString sHeight;
+ sHeight.sprintf("%li", (unsigned long)(2540 * mpImpl->mfMaxHeight));
mpImpl->mpHandler->characters(sHeight);
mpImpl->mpHandler->endElement("config:config-item");
@@ -429,13 +431,13 @@ OdgGenerator::~OdgGenerator()
TagOpenElement("office:styles").write(mpImpl->mpHandler);
for (std::vector<DocumentElement *>::const_iterator iterGraphicsStrokeDashStyles = mpImpl->mGraphicsStrokeDashStyles.begin();
- iterGraphicsStrokeDashStyles != mpImpl->mGraphicsStrokeDashStyles.end(); ++iterGraphicsStrokeDashStyles)
+ iterGraphicsStrokeDashStyles != mpImpl->mGraphicsStrokeDashStyles.end(); ++iterGraphicsStrokeDashStyles)
{
(*iterGraphicsStrokeDashStyles)->write(mpImpl->mpHandler);
}
for (std::vector<DocumentElement *>::const_iterator iterGraphicsGradientStyles = mpImpl->mGraphicsGradientStyles.begin();
- iterGraphicsGradientStyles != mpImpl->mGraphicsGradientStyles.end(); ++iterGraphicsGradientStyles)
+ iterGraphicsGradientStyles != mpImpl->mGraphicsGradientStyles.end(); ++iterGraphicsGradientStyles)
{
(*iterGraphicsGradientStyles)->write(mpImpl->mpHandler);
}
@@ -455,7 +457,7 @@ OdgGenerator::~OdgGenerator()
{
// writing out the graphics automatic styles
for (std::vector<DocumentElement *>::iterator iterGraphicsAutomaticStyles = mpImpl->mGraphicsAutomaticStyles.begin();
- iterGraphicsAutomaticStyles != mpImpl->mGraphicsAutomaticStyles.end(); ++iterGraphicsAutomaticStyles)
+ iterGraphicsAutomaticStyles != mpImpl->mGraphicsAutomaticStyles.end(); ++iterGraphicsAutomaticStyles)
{
(*iterGraphicsAutomaticStyles)->write(mpImpl->mpHandler);
}
@@ -475,9 +477,11 @@ OdgGenerator::~OdgGenerator()
tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-left", "0in");
tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:margin-right", "0in");
WPXString sValue;
- sValue = doubleToString(mpImpl->mfMaxWidth); sValue.append("in");
+ sValue = doubleToString(mpImpl->mfMaxWidth);
+ sValue.append("in");
tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-width", sValue);
- sValue = doubleToString(mpImpl->mfMaxHeight); sValue.append("in");
+ sValue = doubleToString(mpImpl->mfMaxHeight);
+ sValue.append("in");
tmpStylePageLayoutPropertiesOpenElement.addAttribute("fo:page-height", sValue);
tmpStylePageLayoutPropertiesOpenElement.addAttribute("style:print-orientation", "portrait");
tmpStylePageLayoutPropertiesOpenElement.write(mpImpl->mpHandler);
@@ -505,7 +509,7 @@ OdgGenerator::~OdgGenerator()
{
// writing out the page automatic styles
for (std::vector<DocumentElement *>::iterator iterPageAutomaticStyles = mpImpl->mPageAutomaticStyles.begin();
- iterPageAutomaticStyles != mpImpl->mPageAutomaticStyles.end(); iterPageAutomaticStyles++)
+ iterPageAutomaticStyles != mpImpl->mPageAutomaticStyles.end(); iterPageAutomaticStyles++)
{
(*iterPageAutomaticStyles)->write(mpImpl->mpHandler);
}
@@ -521,7 +525,7 @@ OdgGenerator::~OdgGenerator()
TagOpenElement("office:master-styles").write(mpImpl->mpHandler);
for (std::vector<DocumentElement *>::const_iterator pageMasterIter = mpImpl->mPageMasterStyles.begin();
- pageMasterIter != mpImpl->mPageMasterStyles.end(); ++pageMasterIter)
+ pageMasterIter != mpImpl->mPageMasterStyles.end(); ++pageMasterIter)
{
(*pageMasterIter)->write(mpImpl->mpHandler);
}
@@ -535,7 +539,7 @@ OdgGenerator::~OdgGenerator()
TagOpenElement("office:drawing").write(mpImpl->mpHandler);
for (std::vector<DocumentElement *>::const_iterator bodyIter = mpImpl->mBodyElements.begin();
- bodyIter != mpImpl->mBodyElements.end(); ++bodyIter)
+ bodyIter != mpImpl->mBodyElements.end(); ++bodyIter)
{
(*bodyIter)->write(mpImpl->mpHandler);
}
@@ -546,10 +550,10 @@ OdgGenerator::~OdgGenerator()
mpImpl->mpHandler->endElement(
(mpImpl->mxStreamType == ODF_FLAT_XML) ? "office:document" : (
- (mpImpl->mxStreamType == ODF_CONTENT_XML) ? "office:document-content" : (
- (mpImpl->mxStreamType == ODF_STYLES_XML) ? "office:document-styles" : (
- (mpImpl->mxStreamType == ODF_SETTINGS_XML) ? "office:document-settings" : (
- (mpImpl->mxStreamType == ODF_META_XML) ? "office:document-meta" : "office:document" )))));
+ (mpImpl->mxStreamType == ODF_CONTENT_XML) ? "office:document-content" : (
+ (mpImpl->mxStreamType == ODF_STYLES_XML) ? "office:document-styles" : (
+ (mpImpl->mxStreamType == ODF_SETTINGS_XML) ? "office:document-settings" : (
+ (mpImpl->mxStreamType == ODF_META_XML) ? "office:document-meta" : "office:document" )))));
mpImpl->mpHandler->endDocument();
@@ -652,7 +656,7 @@ void OdgGenerator::endGraphics()
mpImpl->miPageIndex++;
}
-void OdgGenerator::setStyle(const ::WPXPropertyList & propList, const ::WPXPropertyListVector& gradient)
+void OdgGenerator::setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient)
{
mpImpl->mxStyle.clear();
mpImpl->mxStyle = propList;
@@ -694,9 +698,11 @@ void OdgGenerator::drawEllipse(const ::WPXPropertyList &propList)
WPXString sValue;
sValue.sprintf("gr%i", mpImpl->miGraphicsStyleIndex-1);
pDrawEllipseElement->addAttribute("draw:style-name", sValue);
- sValue = doubleToString(2 * propList["svg:rx"]->getDouble()); sValue.append("in");
+ sValue = doubleToString(2 * propList["svg:rx"]->getDouble());
+ sValue.append("in");
pDrawEllipseElement->addAttribute("svg:width", sValue);
- sValue = doubleToString(2 * propList["svg:ry"]->getDouble()); sValue.append("in");
+ sValue = doubleToString(2 * propList["svg:ry"]->getDouble());
+ sValue.append("in");
pDrawEllipseElement->addAttribute("svg:height", sValue);
if (propList["libwpg:rotate"] && propList["libwpg:rotate"]->getDouble() != 0.0)
{
@@ -707,39 +713,45 @@ void OdgGenerator::drawEllipse(const ::WPXPropertyList &propList)
rotation -= 360;
double radrotation = rotation*M_PI/180.0;
double deltax = sqrt(pow(propList["svg:rx"]->getDouble(), 2.0)
- + pow(propList["svg:ry"]->getDouble(), 2.0))*cos(atan(propList["svg:ry"]->getDouble()/propList["svg:rx"]->getDouble())
- - radrotation ) - propList["svg:rx"]->getDouble();
+ + pow(propList["svg:ry"]->getDouble(), 2.0))*cos(atan(propList["svg:ry"]->getDouble()/propList["svg:rx"]->getDouble())
+ - radrotation ) - propList["svg:rx"]->getDouble();
double deltay = sqrt(pow(propList["svg:rx"]->getDouble(), 2.0)
- + pow(propList["svg:ry"]->getDouble(), 2.0))*sin(atan(propList["svg:ry"]->getDouble()/propList["svg:rx"]->getDouble())
- - radrotation ) - propList["svg:ry"]->getDouble();
- sValue = "rotate("; sValue.append(doubleToString(radrotation)); sValue.append(") ");
- sValue.append("translate("); sValue.append(doubleToString(propList["svg:cx"]->getDouble() - propList["svg:rx"]->getDouble() - deltax));
+ + pow(propList["svg:ry"]->getDouble(), 2.0))*sin(atan(propList["svg:ry"]->getDouble()/propList["svg:rx"]->getDouble())
+ - radrotation ) - propList["svg:ry"]->getDouble();
+ sValue = "rotate(";
+ sValue.append(doubleToString(radrotation));
+ sValue.append(") ");
+ sValue.append("translate(");
+ sValue.append(doubleToString(propList["svg:cx"]->getDouble() - propList["svg:rx"]->getDouble() - deltax));
sValue.append("in, ");
- sValue.append(doubleToString(propList["svg:cy"]->getDouble() - propList["svg:ry"]->getDouble() - deltay)); sValue.append("in)");
+ sValue.append(doubleToString(propList["svg:cy"]->getDouble() - propList["svg:ry"]->getDouble() - deltay));
+ sValue.append("in)");
pDrawEllipseElement->addAttribute("draw:transform", sValue);
}
else
{
- sValue = doubleToString(propList["svg:cx"]->getDouble()-propList["svg:rx"]->getDouble()); sValue.append("in");
+ sValue = doubleToString(propList["svg:cx"]->getDouble()-propList["svg:rx"]->getDouble());
+ sValue.append("in");
pDrawEllipseElement->addAttribute("svg:x", sValue);
- sValue = doubleToString(propList["svg:cy"]->getDouble()-propList["svg:ry"]->getDouble()); sValue.append("in");
+ sValue = doubleToString(propList["svg:cy"]->getDouble()-propList["svg:ry"]->getDouble());
+ sValue.append("in");
pDrawEllipseElement->addAttribute("svg:y", sValue);
}
mpImpl->mBodyElements.push_back(pDrawEllipseElement);
mpImpl->mBodyElements.push_back(new TagCloseElement("draw:ellipse"));
}
-void OdgGenerator::drawPolyline(const ::WPXPropertyListVector& vertices)
+void OdgGenerator::drawPolyline(const ::WPXPropertyListVector &vertices)
{
mpImpl->_drawPolySomething(vertices, false);
}
-void OdgGenerator::drawPolygon(const ::WPXPropertyListVector& vertices)
+void OdgGenerator::drawPolygon(const ::WPXPropertyListVector &vertices)
{
mpImpl->_drawPolySomething(vertices, true);
}
-void OdgGeneratorPrivate::_drawPolySomething(const ::WPXPropertyListVector& vertices, bool isClosed)
+void OdgGeneratorPrivate::_drawPolySomething(const ::WPXPropertyListVector &vertices, bool isClosed)
{
if(vertices.count() < 2)
return;
@@ -783,7 +795,7 @@ void OdgGeneratorPrivate::_drawPolySomething(const ::WPXPropertyListVector& vert
}
}
-void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path)
+void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector &path)
{
if(path.count() == 0)
return;
@@ -856,13 +868,17 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path)
sValue.sprintf("gr%i", miGraphicsStyleIndex-1);
pDrawPathElement->addAttribute("draw:style-name", sValue);
pDrawPathElement->addAttribute("draw:layer", "layout");
- sValue = doubleToString(px); sValue.append("in");
+ sValue = doubleToString(px);
+ sValue.append("in");
pDrawPathElement->addAttribute("svg:x", sValue);
- sValue = doubleToString(py); sValue.append("in");
+ sValue = doubleToString(py);
+ sValue.append("in");
pDrawPathElement->addAttribute("svg:y", sValue);
- sValue = doubleToString((qx - px)); sValue.append("in");
+ sValue = doubleToString((qx - px));
+ sValue.append("in");
pDrawPathElement->addAttribute("svg:width", sValue);
- sValue = doubleToString((qy - py)); sValue.append("in");
+ sValue = doubleToString((qy - py));
+ sValue.append("in");
pDrawPathElement->addAttribute("svg:height", sValue);
sValue.sprintf("%i %i %i %i", 0, 0, (unsigned)(2540*(qx - px)), (unsigned)(2540*(qy - py)));
pDrawPathElement->addAttribute("svg:viewBox", sValue);
@@ -875,30 +891,30 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path)
{
// 2540 is 2.54*1000, 2.54 in = 1 inch
sElement.sprintf("M%i %i", (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540),
- (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
+ (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
sValue.append(sElement);
}
else if (path[i]["libwpg:path-action"]->getStr() == "L")
{
sElement.sprintf("L%i %i", (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540),
- (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
+ (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
sValue.append(sElement);
}
else if (path[i]["libwpg:path-action"]->getStr() == "C")
{
sElement.sprintf("C%i %i %i %i %i %i", (unsigned)((path[i]["svg:x1"]->getDouble()-px)*2540),
- (unsigned)((path[i]["svg:y1"]->getDouble()-py)*2540), (unsigned)((path[i]["svg:x2"]->getDouble()-px)*2540),
- (unsigned)((path[i]["svg:y2"]->getDouble()-py)*2540), (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540),
- (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
+ (unsigned)((path[i]["svg:y1"]->getDouble()-py)*2540), (unsigned)((path[i]["svg:x2"]->getDouble()-px)*2540),
+ (unsigned)((path[i]["svg:y2"]->getDouble()-py)*2540), (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540),
+ (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
sValue.append(sElement);
}
else if (path[i]["libwpg:path-action"]->getStr() == "A")
{
sElement.sprintf("A%i %i %i %i %i %i %i", (unsigned)((path[i]["svg:rx"]->getDouble())*2540),
- (unsigned)((path[i]["svg:ry"]->getDouble())*2540), (path[i]["libwpg:rotate"] ? path[i]["libwpg:rotate"]->getInt() : 0),
- (path[i]["libwpg:large-arc"] ? path[i]["libwpg:large-arc"]->getInt() : 1),
- (path[i]["libwpg:sweep"] ? path[i]["libwpg:sweep"]->getInt() : 1),
- (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
+ (unsigned)((path[i]["svg:ry"]->getDouble())*2540), (path[i]["libwpg:rotate"] ? path[i]["libwpg:rotate"]->getInt() : 0),
+ (path[i]["libwpg:large-arc"] ? path[i]["libwpg:large-arc"]->getInt() : 1),
+ (path[i]["libwpg:sweep"] ? path[i]["libwpg:sweep"]->getInt() : 1),
+ (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540));
sValue.append(sElement);
}
else if (path[i]["libwpg:path-action"]->getStr() == "Z")
@@ -909,12 +925,12 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path)
mBodyElements.push_back(new TagCloseElement("draw:path"));
}
-void OdgGenerator::drawPath(const WPXPropertyListVector& path)
+void OdgGenerator::drawPath(const WPXPropertyListVector &path)
{
mpImpl->_drawPath(path);
}
-void OdgGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData& binaryData)
+void OdgGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
{
if (!propList["libwpg:mime-type"] && propList["libwpg:mime-type"]->getStr().len() <= 0)
return;
@@ -1161,8 +1177,8 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
pStyleGraphicsPropertiesElement->addAttribute("draw:shadow-color", mxStyle["draw:shadow-color"]->getStr());
if (mxStyle["draw:shadow-opacity"])
pStyleGraphicsPropertiesElement->addAttribute("draw:shadow-opacity", mxStyle["draw:shadow-opacity"]->getStr());
- if (mxStyle["svg:fill-rule"])
- pStyleGraphicsPropertiesElement->addAttribute("svg:fill-rule", mxStyle["svg:fill-rule"]->getStr());
+ if (mxStyle["svg:fill-rule"])
+ pStyleGraphicsPropertiesElement->addAttribute("svg:fill-rule", mxStyle["svg:fill-rule"]->getStr());
}
if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "solid")
@@ -1206,7 +1222,7 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
miGraphicsStyleIndex++;
}
-void OdgGenerator::startEmbeddedGraphics(WPXPropertyList const&)
+void OdgGenerator::startEmbeddedGraphics(WPXPropertyList const &)
{
}
@@ -1225,7 +1241,7 @@ void OdgGenerator::startTextObject(WPXPropertyList const &propList, WPXPropertyL
pStyleStyleOpenElement->addAttribute("style:family", "graphic");
pStyleStyleOpenElement->addAttribute("style:parent-style-name", "standard");
mpImpl->mGraphicsAutomaticStyles.push_back(pStyleStyleOpenElement);
-
+
pDrawFrameOpenElement->addAttribute("draw:style-name", sValue);
pDrawFrameOpenElement->addAttribute("draw:layer", "layout");
@@ -1239,7 +1255,7 @@ void OdgGenerator::startTextObject(WPXPropertyList const &propList, WPXPropertyL
pDrawFrameOpenElement->addAttribute("svg:x", propList["svg:x"]->getStr());
if (propList["svg:y"])
pDrawFrameOpenElement->addAttribute("svg:y", propList["svg:y"]->getStr());
-
+
if (!propList["svg:width"] && !propList["svg:height"])
{
if (!propList["fo:min-width"])
@@ -1352,7 +1368,7 @@ void OdgGenerator::endTextLine()
mpImpl->mBodyElements.push_back(new TagCloseElement("text:p"));
}
-void OdgGenerator::startTextSpan(WPXPropertyList const&propList)
+void OdgGenerator::startTextSpan(WPXPropertyList const &propList)
{
if (propList["style:font-name"])
mpImpl->mFontManager.findOrAdd(propList["style:font-name"]->getStr().cstr());
diff --git a/writerperfect/source/filter/OdgGenerator.hxx b/writerperfect/source/filter/OdgGenerator.hxx
index fb3ca5ee2359..5c08d4fc1241 100644
--- a/writerperfect/source/filter/OdgGenerator.hxx
+++ b/writerperfect/source/filter/OdgGenerator.hxx
@@ -33,7 +33,8 @@
class OdgGeneratorPrivate;
-class OdgGenerator : public libwpg::WPGPaintInterface {
+class OdgGenerator : public libwpg::WPGPaintInterface
+{
public:
OdgGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
~OdgGenerator();
@@ -42,17 +43,17 @@ public:
void endGraphics();
void startLayer(const ::WPXPropertyList &propList);
void endLayer();
- void startEmbeddedGraphics(const ::WPXPropertyList&propList);
+ void startEmbeddedGraphics(const ::WPXPropertyList &propList);
void endEmbeddedGraphics();
- void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector& gradient);
+ void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
void drawRectangle(const ::WPXPropertyList &propList);
void drawEllipse(const ::WPXPropertyList &propList);
- void drawPolyline(const ::WPXPropertyListVector& vertices);
- void drawPolygon(const ::WPXPropertyListVector& vertices);
- void drawPath(const ::WPXPropertyListVector& path);
- void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData& binaryData);
+ void drawPolyline(const ::WPXPropertyListVector &vertices);
+ void drawPolygon(const ::WPXPropertyListVector &vertices);
+ void drawPath(const ::WPXPropertyListVector &path);
+ void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
void endTextObject();
diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx
index 69e8f245f7ff..7eb277355e94 100644
--- a/writerperfect/source/filter/OdtGenerator.cxx
+++ b/writerperfect/source/filter/OdtGenerator.cxx
@@ -120,7 +120,7 @@ public:
void _openListLevel(TagOpenElement *pListLevelOpenElement);
void _closeListLevel();
- OdfEmbeddedObject _findEmbeddedObjectHandler(const WPXString& mimeType);
+ OdfEmbeddedObject _findEmbeddedObjectHandler(const WPXString &mimeType);
WPXInputStream *mpInput;
OdfDocumentHandler *mpHandler;
@@ -180,7 +180,7 @@ public:
const OdfStreamType mxStreamType;
- const char * mpPassword;
+ const char *mpPassword;
};
@@ -211,11 +211,12 @@ OdtGeneratorPrivate::OdtGeneratorPrivate(OdfDocumentHandler *pHandler, const Odf
OdtGeneratorPrivate::~OdtGeneratorPrivate()
{
- // clean up the mess we made
- WRITER_DEBUG_MSG(("WriterWordPerfect: Cleaning up our mess..\n"));
+ // clean up the mess we made
+ WRITER_DEBUG_MSG(("WriterWordPerfect: Cleaning up our mess..\n"));
WRITER_DEBUG_MSG(("Destroying the body elements\n"));
- for (std::vector<DocumentElement *>::iterator iterBody = mBodyElements.begin(); iterBody != mBodyElements.end(); ++iterBody) {
+ for (std::vector<DocumentElement *>::iterator iterBody = mBodyElements.begin(); iterBody != mBodyElements.end(); iterBody++)
+ {
delete (*iterBody);
(*iterBody) = 0;
}
@@ -225,37 +226,44 @@ OdtGeneratorPrivate::~OdtGeneratorPrivate()
mFontManager.clean();
for (std::vector<ListStyle *>::iterator iterListStyles = mListStyles.begin();
- iterListStyles != mListStyles.end(); ++iterListStyles) {
+ iterListStyles != mListStyles.end(); iterListStyles++)
+ {
delete(*iterListStyles);
}
for (std::vector<SectionStyle *>::iterator iterSectionStyles = mSectionStyles.begin();
- iterSectionStyles != mSectionStyles.end(); ++iterSectionStyles) {
+ iterSectionStyles != mSectionStyles.end(); iterSectionStyles++)
+ {
delete(*iterSectionStyles);
}
for (std::vector<TableStyle *>::iterator iterTableStyles = mTableStyles.begin();
- iterTableStyles != mTableStyles.end(); ++iterTableStyles) {
+ iterTableStyles != mTableStyles.end(); iterTableStyles++)
+ {
delete((*iterTableStyles));
}
for (std::vector<PageSpan *>::iterator iterPageSpans = mPageSpans.begin();
- iterPageSpans != mPageSpans.end(); ++iterPageSpans) {
+ iterPageSpans != mPageSpans.end(); iterPageSpans++)
+ {
delete(*iterPageSpans);
}
for (std::vector<DocumentElement *>::iterator iterFrameStyles = mFrameStyles.begin();
- iterFrameStyles != mFrameStyles.end(); ++iterFrameStyles) {
+ iterFrameStyles != mFrameStyles.end(); iterFrameStyles++)
+ {
delete(*iterFrameStyles);
}
for (std::vector<DocumentElement *>::iterator iterFrameAutomaticStyles = mFrameAutomaticStyles.begin();
- iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); ++iterFrameAutomaticStyles) {
+ iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); iterFrameAutomaticStyles++)
+ {
delete(*iterFrameAutomaticStyles);
}
for (std::vector<DocumentElement *>::iterator iterMetaData = mMetaData.begin();
- iterMetaData != mMetaData.end(); ++iterMetaData) {
+ iterMetaData != mMetaData.end(); iterMetaData++)
+ {
delete(*iterMetaData);
}
}
-OdfEmbeddedObject OdtGeneratorPrivate::_findEmbeddedObjectHandler(const WPXString& mimeType)
+OdfEmbeddedObject OdtGeneratorPrivate::_findEmbeddedObjectHandler(const WPXString &mimeType)
{
std::map<WPXString, OdfEmbeddedObject, ltstr>::iterator i = mObjectHandlers.find(mimeType);
if (i != mObjectHandlers.end())
@@ -341,10 +349,8 @@ void OdtGeneratorPrivate::_writeDefaultStyles(OdfDocumentHandler *pHandler)
pHandler->endElement("style:style");
for (std::vector<DocumentElement *>::const_iterator iter = mFrameStyles.begin();
- iter != mFrameStyles.end(); ++iter)
- {
+ iter != mFrameStyles.end(); ++iter)
(*iter)->write(pHandler);
- }
pHandler->endElement("office:styles");
}
@@ -413,7 +419,8 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler)
// write out the metadata
TagOpenElement("office:meta").write(mpHandler);
- for (std::vector<DocumentElement *>::const_iterator iterMetaData = mMetaData.begin(); iterMetaData != mMetaData.end(); ++iterMetaData) {
+ for (std::vector<DocumentElement *>::const_iterator iterMetaData = mMetaData.begin(); iterMetaData != mMetaData.end(); ++iterMetaData)
+ {
(*iterMetaData)->write(mpHandler);
}
mpHandler->endElement("office:meta");
@@ -428,7 +435,7 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler)
TagOpenElement("office:automatic-styles").write(mpHandler);
for (std::vector<DocumentElement *>::const_iterator iterFrameAutomaticStyles = mFrameAutomaticStyles.begin();
- iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); ++iterFrameAutomaticStyles)
+ iterFrameAutomaticStyles != mFrameAutomaticStyles.end(); ++iterFrameAutomaticStyles)
{
(*iterFrameAutomaticStyles)->write(pHandler);
}
@@ -437,18 +444,21 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler)
mParagraphManager.write(pHandler);
mSpanManager.write(pHandler);
- // writing out the sections styles
- for (std::vector<SectionStyle *>::const_iterator iterSectionStyles = mSectionStyles.begin(); iterSectionStyles != mSectionStyles.end(); ++iterSectionStyles) {
+ // writing out the sections styles
+ for (std::vector<SectionStyle *>::const_iterator iterSectionStyles = mSectionStyles.begin(); iterSectionStyles != mSectionStyles.end(); ++iterSectionStyles)
+ {
(*iterSectionStyles)->write(pHandler);
}
// writing out the lists styles
- for (std::vector<ListStyle *>::const_iterator iterListStyles = mListStyles.begin(); iterListStyles != mListStyles.end(); ++iterListStyles) {
+ for (std::vector<ListStyle *>::const_iterator iterListStyles = mListStyles.begin(); iterListStyles != mListStyles.end(); ++iterListStyles)
+ {
(*iterListStyles)->write(pHandler);
}
- // writing out the table styles
- for (std::vector<TableStyle *>::const_iterator iterTableStyles = mTableStyles.begin(); iterTableStyles != mTableStyles.end(); ++iterTableStyles) {
+ // writing out the table styles
+ for (std::vector<TableStyle *>::const_iterator iterTableStyles = mTableStyles.begin(); iterTableStyles != mTableStyles.end(); ++iterTableStyles)
+ {
(*iterTableStyles)->write(pHandler);
}
@@ -460,15 +470,16 @@ bool OdtGeneratorPrivate::_writeTargetDocument(OdfDocumentHandler *pHandler)
_writeMasterPages(pHandler);
- WRITER_DEBUG_MSG(("WriterWordPerfect: Document Body: Writing out the document..\n"));
- // writing out the document
+ WRITER_DEBUG_MSG(("WriterWordPerfect: Document Body: Writing out the document..\n"));
+ // writing out the document
TagOpenElement("office:body").write(mpHandler);
TagOpenElement("office:text").write(mpHandler);
- for (std::vector<DocumentElement *>::const_iterator iterBodyElements = mBodyElements.begin(); iterBodyElements != mBodyElements.end(); ++iterBodyElements) {
+ for (std::vector<DocumentElement *>::const_iterator iterBodyElements = mBodyElements.begin(); iterBodyElements != mBodyElements.end(); ++iterBodyElements)
+ {
(*iterBodyElements)->write(pHandler);
}
- WRITER_DEBUG_MSG(("WriterWordPerfect: Document Body: Finished writing all doc els..\n"));
+ WRITER_DEBUG_MSG(("WriterWordPerfect: Document Body: Finished writing all doc els..\n"));
pHandler->endElement("office:text");
pHandler->endElement("office:body");
@@ -497,6 +508,7 @@ void OdtGenerator::setDocumentMetaData(const WPXPropertyList &propList)
mpImpl->mMetaData.push_back(new TagCloseElement(i.key()));
}
}
+
}
void OdtGenerator::openPageSpan(const WPXPropertyList &propList)
@@ -523,7 +535,7 @@ void OdtGenerator::openHeader(const WPXPropertyList &propList)
void OdtGenerator::closeHeader()
{
- mpImpl->mpCurrentContentElements = &(mpImpl->mBodyElements);
+ mpImpl->mpCurrentContentElements = &(mpImpl->mBodyElements);
}
void OdtGenerator::openFooter(const WPXPropertyList &propList)
@@ -552,6 +564,10 @@ void OdtGenerator::openSection(const WPXPropertyList &propList, const WPXPropert
fSectionMarginLeft = propList["fo:margin-left"]->getDouble();
if (propList["fo:margin-right"])
fSectionMarginRight = propList["fo:margin-right"]->getDouble();
+ if (propList["fo:margin-bottom"])
+ fSectionSpaceAfter = propList["fo:margin-bottom"]->getDouble();
+ else if (propList["libwpd:margin-bottom"])
+ fSectionSpaceAfter = propList["libwpd:margin-bottom"]->getDouble();
if (iNumColumns > 1 || fSectionMarginLeft != 0 || fSectionMarginRight != 0)
{
@@ -641,7 +657,7 @@ void OdtGenerator::defineOrderedListLevel(const WPXPropertyList &propList)
if (propList["libwpd:id"])
id = propList["libwpd:id"]->getInt();
- OrderedListStyle *pOrderedListStyle = NULL;
+ OrderedListStyle *pOrderedListStyle = NULL;
if (mpImpl->mWriterListStates.top().mpCurrentListStyle && mpImpl->mWriterListStates.top().mpCurrentListStyle->getListID() == id)
pOrderedListStyle = static_cast<OrderedListStyle *>(mpImpl->mWriterListStates.top().mpCurrentListStyle); // FIXME: using a dynamic cast here causes oo to crash?!
@@ -650,8 +666,8 @@ void OdtGenerator::defineOrderedListLevel(const WPXPropertyList &propList)
// from the list that is just being defined (listIDs differ) OR (3) we can tell that the user actually
// is starting a new list at level 1 (and only level 1)
if (pOrderedListStyle == NULL || pOrderedListStyle->getListID() != id ||
- (propList["libwpd:level"] && propList["libwpd:level"]->getInt()==1 &&
- (propList["text:start-value"] && static_cast<unsigned>(propList["text:start-value"]->getInt()) != mpImpl->mWriterListStates.top().miLastListNumber+1)))
+ (propList["libwpd:level"] && propList["libwpd:level"]->getInt()==1 &&
+ (propList["text:start-value"] && static_cast<unsigned>(propList["text:start-value"]->getInt()) != int(mpImpl->mWriterListStates.top().miLastListNumber+1))))
{
WRITER_DEBUG_MSG(("Attempting to create a new ordered list style (listid: %i)\n", id));
WPXString sName;
@@ -682,11 +698,12 @@ void OdtGenerator::defineUnorderedListLevel(const WPXPropertyList &propList)
if (propList["libwpd:id"])
id = propList["libwpd:id"]->getInt();
- UnorderedListStyle *pUnorderedListStyle = NULL;
+ UnorderedListStyle *pUnorderedListStyle = NULL;
if (mpImpl->mWriterListStates.top().mpCurrentListStyle && mpImpl->mWriterListStates.top().mpCurrentListStyle->getListID() == id)
pUnorderedListStyle = static_cast<UnorderedListStyle *>(mpImpl->mWriterListStates.top().mpCurrentListStyle); // FIXME: using a dynamic cast here causes oo to crash?!
- if (pUnorderedListStyle == NULL) {
+ if (pUnorderedListStyle == NULL)
+ {
WRITER_DEBUG_MSG(("Attempting to create a new unordered list style (listid: %i)\n", id));
WPXString sName;
sName.sprintf("UL%i", mpImpl->miNumListStyles);
@@ -704,7 +721,7 @@ void OdtGenerator::defineUnorderedListLevel(const WPXPropertyList &propList)
}
}
-void OdtGenerator::openOrderedListLevel(const WPXPropertyList&)
+void OdtGenerator::openOrderedListLevel(const WPXPropertyList &)
{
if (mpImpl->mWriterListStates.top().mbListElementParagraphOpened)
{
@@ -714,14 +731,15 @@ void OdtGenerator::openOrderedListLevel(const WPXPropertyList&)
TagOpenElement *pListLevelOpenElement = new TagOpenElement("text:list");
mpImpl->_openListLevel(pListLevelOpenElement);
- if (mpImpl->mWriterListStates.top().mbListContinueNumbering) {
+ if (mpImpl->mWriterListStates.top().mbListContinueNumbering)
+ {
pListLevelOpenElement->addAttribute("text:continue-numbering", "true");
}
mpImpl->mpCurrentContentElements->push_back(pListLevelOpenElement);
}
-void OdtGenerator::openUnorderedListLevel(const WPXPropertyList&)
+void OdtGenerator::openUnorderedListLevel(const WPXPropertyList &)
{
if (mpImpl->mWriterListStates.top().mbListElementParagraphOpened)
{
@@ -737,14 +755,15 @@ void OdtGenerator::openUnorderedListLevel(const WPXPropertyList&)
void OdtGeneratorPrivate::_openListLevel(TagOpenElement *pListLevelOpenElement)
{
if (!mWriterListStates.top().mbListElementOpened.empty() &&
- !mWriterListStates.top().mbListElementOpened.top())
+ !mWriterListStates.top().mbListElementOpened.top())
{
mpCurrentContentElements->push_back(new TagOpenElement("text:list-item"));
mWriterListStates.top().mbListElementOpened.top() = true;
}
mWriterListStates.top().mbListElementOpened.push(false);
- if (mWriterListStates.top().mbListElementOpened.size() == 1) {
+ if (mWriterListStates.top().mbListElementOpened.size() == 1)
+ {
pListLevelOpenElement->addAttribute("text:style-name", mWriterListStates.top().mpCurrentListStyle->getName());
}
}
@@ -797,11 +816,11 @@ void OdtGenerator::openListElement(const WPXPropertyList &propList, const WPXPro
mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("text:list-item"));
- TagOpenElement *pOpenListElementParagraph = new TagOpenElement("text:p");
+ TagOpenElement *pOpenListElementParagraph = new TagOpenElement("text:p");
pOpenListElementParagraph->addAttribute("text:style-name", paragName);
mpImpl->mpCurrentContentElements->push_back(pOpenListElementParagraph);
- if (mpImpl->mpCurrentContentElements == &(mpImpl->mBodyElements))
+ if (mpImpl->mpCurrentContentElements == &(mpImpl->mBodyElements))
mpImpl->mWriterDocumentStates.top().mbFirstParagraphInPageSpan = false;
mpImpl->mWriterListStates.top().mbListElementOpened.top() = true;
@@ -995,10 +1014,10 @@ void OdtGenerator::openTableCell(const WPXPropertyList &propList)
pTableCellOpenElement->addAttribute("table:style-name", sTableCellStyleName);
if (propList["table:number-columns-spanned"])
pTableCellOpenElement->addAttribute("table:number-columns-spanned",
- propList["table:number-columns-spanned"]->getStr().cstr());
+ propList["table:number-columns-spanned"]->getStr().cstr());
if (propList["table:number-rows-spanned"])
pTableCellOpenElement->addAttribute("table:number-rows-spanned",
- propList["table:number-rows-spanned"]->getStr().cstr());
+ propList["table:number-rows-spanned"]->getStr().cstr());
// pTableCellOpenElement->addAttribute("table:value-type", "string");
mpImpl->mpCurrentContentElements->push_back(pTableCellOpenElement);
@@ -1247,7 +1266,7 @@ void OdtGenerator::insertBinaryObject(const WPXPropertyList &propList, const WPX
}
}
else
- // assuming we have a binary image that we can just insert as it is
+ // assuming we have a binary image that we can just insert as it is
{
mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("draw:image"));
@@ -1286,11 +1305,11 @@ void OdtGenerator::closeTextBox()
mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("draw:text-box"));
}
-void OdtGenerator::defineSectionStyle(WPXPropertyList const&, WPXPropertyListVector const&)
+void OdtGenerator::defineSectionStyle(WPXPropertyList const &, WPXPropertyListVector const &)
{
}
-void OdtGenerator::insertEquation(WPXPropertyList const&, WPXString const&)
+void OdtGenerator::insertEquation(WPXPropertyList const &, WPXString const &)
{
}
@@ -1308,15 +1327,15 @@ void OdtGenerator::closePageSpan()
{
}
-void OdtGenerator::definePageStyle(WPXPropertyList const&)
+void OdtGenerator::definePageStyle(WPXPropertyList const &)
{
}
-void OdtGenerator::defineParagraphStyle(WPXPropertyList const&, WPXPropertyListVector const&)
+void OdtGenerator::defineParagraphStyle(WPXPropertyList const &, WPXPropertyListVector const &)
{
}
-void OdtGenerator::defineCharacterStyle(WPXPropertyList const&)
+void OdtGenerator::defineCharacterStyle(WPXPropertyList const &)
{
}
diff --git a/writerperfect/source/filter/OdtGenerator.hxx b/writerperfect/source/filter/OdtGenerator.hxx
index d2b224fc0061..12c6df39978e 100644
--- a/writerperfect/source/filter/OdtGenerator.hxx
+++ b/writerperfect/source/filter/OdtGenerator.hxx
@@ -48,15 +48,15 @@ public:
~OdtGenerator();
// WPXDocumentInterface's implementation
- void setDocumentMetaData(const WPXPropertyList &propList);
+ void setDocumentMetaData(const WPXPropertyList &propList);
void startDocument();
void endDocument();
- void definePageStyle(const WPXPropertyList&);
+ void definePageStyle(const WPXPropertyList &);
void openPageSpan(const WPXPropertyList &propList);
void closePageSpan();
- void defineSectionStyle(const WPXPropertyList&, const WPXPropertyListVector&);
+ void defineSectionStyle(const WPXPropertyList &, const WPXPropertyListVector &);
void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
void closeSection();
@@ -65,18 +65,18 @@ public:
void openFooter(const WPXPropertyList &propList);
void closeFooter();
- void defineParagraphStyle(const WPXPropertyList&, const WPXPropertyListVector&);
+ void defineParagraphStyle(const WPXPropertyList &, const WPXPropertyListVector &);
void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
void closeParagraph();
- void defineCharacterStyle(const WPXPropertyList&);
+ void defineCharacterStyle(const WPXPropertyList &);
void openSpan(const WPXPropertyList &propList);
void closeSpan();
void insertTab();
void insertSpace();
void insertText(const WPXString &text);
- void insertLineBreak();
+ void insertLineBreak();
void insertField(const WPXString &type, const WPXPropertyList &propList);
void defineOrderedListLevel(const WPXPropertyList &propList);
@@ -97,15 +97,15 @@ public:
void openTextBox(const WPXPropertyList &propList);
void closeTextBox();
- void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
- void openTableRow(const WPXPropertyList &propList);
+ void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
+ void openTableRow(const WPXPropertyList &propList);
void closeTableRow();
- void openTableCell(const WPXPropertyList &propList);
+ void openTableCell(const WPXPropertyList &propList);
void closeTableCell();
void insertCoveredTableCell(const WPXPropertyList &propList);
- void closeTable();
+ void closeTable();
- void openFrame(const WPXPropertyList & propList);
+ void openFrame(const WPXPropertyList &propList);
void closeFrame();
void insertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data);
diff --git a/writerperfect/source/filter/PageSpan.cxx b/writerperfect/source/filter/PageSpan.cxx
index bee269dd8dde..20ce463ef8c3 100644
--- a/writerperfect/source/filter/PageSpan.cxx
+++ b/writerperfect/source/filter/PageSpan.cxx
@@ -34,7 +34,7 @@
#include "DocumentElement.hxx"
PageSpan::PageSpan(const WPXPropertyList &xPropList) :
- mxPropList(xPropList),
+ mxPropList(xPropList),
mpHeaderContent(NULL),
mpFooterContent(NULL),
mpHeaderLeftContent(NULL),
@@ -42,8 +42,9 @@ PageSpan::PageSpan(const WPXPropertyList &xPropList) :
{
}
-namespace {
- typedef std::vector<DocumentElement *>::iterator DEVIter;
+namespace
+{
+typedef std::vector<DocumentElement *>::iterator DEVIter;
}
PageSpan::~PageSpan()
@@ -51,62 +52,62 @@ PageSpan::~PageSpan()
if (mpHeaderContent)
{
for (DEVIter iterHeaderContent = mpHeaderContent->begin();
- iterHeaderContent != mpHeaderContent->end();
- iterHeaderContent++)
- delete(*iterHeaderContent);
+ iterHeaderContent != mpHeaderContent->end();
+ iterHeaderContent++)
+ delete(*iterHeaderContent);
delete mpHeaderContent;
}
if (mpHeaderLeftContent)
{
for (DEVIter iterHeaderLeftContent = mpHeaderLeftContent->begin();
- iterHeaderLeftContent != mpHeaderLeftContent->end();
- iterHeaderLeftContent++)
- delete(*iterHeaderLeftContent);
+ iterHeaderLeftContent != mpHeaderLeftContent->end();
+ iterHeaderLeftContent++)
+ delete(*iterHeaderLeftContent);
delete mpHeaderLeftContent;
}
if (mpFooterContent)
{
for (DEVIter iterFooterContent = mpFooterContent->begin();
- iterFooterContent != mpFooterContent->end();
- iterFooterContent++)
- delete(*iterFooterContent);
+ iterFooterContent != mpFooterContent->end();
+ iterFooterContent++)
+ delete(*iterFooterContent);
delete mpFooterContent;
}
if (mpFooterLeftContent)
{
for (DEVIter iterFooterLeftContent = mpFooterLeftContent->begin();
- iterFooterLeftContent != mpFooterLeftContent->end();
- iterFooterLeftContent++)
- delete(*iterFooterLeftContent);
+ iterFooterLeftContent != mpFooterLeftContent->end();
+ iterFooterLeftContent++)
+ delete(*iterFooterLeftContent);
delete mpFooterLeftContent;
}
}
int PageSpan::getSpan() const
{
- if (mxPropList["libwpd:num-pages"])
- return mxPropList["libwpd:num-pages"]->getInt();
+ if (mxPropList["libwpd:num-pages"])
+ return mxPropList["libwpd:num-pages"]->getInt();
- return 0; // should never happen
+ return 0; // should never happen
}
double PageSpan::getMarginLeft() const
{
- if (mxPropList["fo:margin-left"])
- return mxPropList["fo:margin-left"]->getDouble();
+ if (mxPropList["fo:margin-left"])
+ return mxPropList["fo:margin-left"]->getDouble();
- return 0.0;
+ return 0.0;
}
double PageSpan::getMarginRight() const
{
- if (mxPropList["fo:margin-right"])
- return mxPropList["fo:margin-right"]->getDouble();
+ if (mxPropList["fo:margin-right"])
+ return mxPropList["fo:margin-right"]->getDouble();
- return 0.0;
+ return 0.0;
}
void PageSpan::setHeaderContent(std::vector<DocumentElement *> * pHeaderContent)
@@ -114,9 +115,9 @@ void PageSpan::setHeaderContent(std::vector<DocumentElement *> * pHeaderContent)
if (mpHeaderContent)
{
for (DEVIter iterHeaderContent = mpHeaderContent->begin();
- iterHeaderContent != mpHeaderContent->end();
- iterHeaderContent++)
- delete(*iterHeaderContent);
+ iterHeaderContent != mpHeaderContent->end();
+ iterHeaderContent++)
+ delete(*iterHeaderContent);
delete mpHeaderContent;
}
@@ -128,9 +129,9 @@ void PageSpan::setFooterContent(std::vector<DocumentElement *> * pFooterContent)
if (mpFooterContent)
{
for (DEVIter iterFooterContent = mpFooterContent->begin();
- iterFooterContent != mpFooterContent->end();
- iterFooterContent++)
- delete(*iterFooterContent);
+ iterFooterContent != mpFooterContent->end();
+ iterFooterContent++)
+ delete(*iterFooterContent);
delete mpFooterContent;
}
@@ -142,9 +143,9 @@ void PageSpan::setHeaderLeftContent(std::vector<DocumentElement *> * pHeaderCont
if (mpHeaderLeftContent)
{
for (DEVIter iterHeaderLeftContent = mpHeaderLeftContent->begin();
- iterHeaderLeftContent != mpHeaderLeftContent->end();
- iterHeaderLeftContent++)
- delete(*iterHeaderLeftContent);
+ iterHeaderLeftContent != mpHeaderLeftContent->end();
+ iterHeaderLeftContent++)
+ delete(*iterHeaderLeftContent);
delete mpHeaderLeftContent;
}
@@ -156,9 +157,9 @@ void PageSpan::setFooterLeftContent(std::vector<DocumentElement *> * pFooterCont
if (mpFooterLeftContent)
{
for (DEVIter iterFooterLeftContent = mpFooterLeftContent->begin();
- iterFooterLeftContent != mpFooterLeftContent->end();
- iterFooterLeftContent++)
- delete(*iterFooterLeftContent);
+ iterFooterLeftContent != mpFooterLeftContent->end();
+ iterFooterLeftContent++)
+ delete(*iterFooterLeftContent);
delete mpFooterLeftContent;
}
@@ -167,11 +168,11 @@ void PageSpan::setFooterLeftContent(std::vector<DocumentElement *> * pFooterCont
void PageSpan::writePageLayout(const int iNum, OdfDocumentHandler *pHandler) const
{
- WPXPropertyList propList;
+ WPXPropertyList propList;
WPXString sPageLayoutName;
- sPageLayoutName.sprintf("PM%i", iNum+2);
- propList.insert("style:name", sPageLayoutName);
+ sPageLayoutName.sprintf("PM%i", iNum+2);
+ propList.insert("style:name", sPageLayoutName);
pHandler->startElement("style:page-layout", propList);
WPXPropertyList tempPropList = mxPropList;
@@ -179,7 +180,7 @@ void PageSpan::writePageLayout(const int iNum, OdfDocumentHandler *pHandler) con
tempPropList.insert("style:writing-mode", WPXString("lr-tb"));
if (!tempPropList["style:footnote-max-height"])
tempPropList.insert("style:footnote-max-height", WPXString("0in"));
- pHandler->startElement("style:page-layout-properties", tempPropList);
+ pHandler->startElement("style:page-layout-properties", tempPropList);
WPXPropertyList footnoteSepPropList;
footnoteSepPropList.insert("style:width", WPXString("0.0071in"));
@@ -191,8 +192,8 @@ void PageSpan::writePageLayout(const int iNum, OdfDocumentHandler *pHandler) con
pHandler->startElement("style:footnote-sep", footnoteSepPropList);
pHandler->endElement("style:footnote-sep");
- pHandler->endElement("style:page-layout-properties");
- pHandler->endElement("style:page-layout");
+ pHandler->endElement("style:page-layout-properties");
+ pHandler->endElement("style:page-layout");
}
void PageSpan::writeMasterPages(const int iStartingNum, const int iPageLayoutNum, const bool bLastPageSpan,
@@ -210,16 +211,16 @@ void PageSpan::writeMasterPages(const int iStartingNum, const int iPageLayoutNum
WPXString sPageLayoutName;
WPXPropertyList propList;
sPageLayoutName.sprintf("PM%i", iPageLayoutNum+2);
- propList.insert("style:name", sMasterPageName);
+ propList.insert("style:name", sMasterPageName);
propList.insert("style:display-name", sMasterPageDisplayName);
propList.insert("style:page-layout-name", sPageLayoutName);
if (!bLastPageSpan)
{
WPXString sNextMasterPageName;
sNextMasterPageName.sprintf("Page_Style_%i", (i+1));
- propList.insert("style:next-style-name", sNextMasterPageName);
+ propList.insert("style:next-style-name", sNextMasterPageName);
}
- pHandler->startElement("style:master-page", propList);
+ pHandler->startElement("style:master-page", propList);
if (mpHeaderContent)
{
@@ -257,19 +258,20 @@ void PageSpan::writeMasterPages(const int iStartingNum, const int iPageLayoutNum
pHandler->endElement("style:footer-left");
}
- pHandler->endElement("style:master-page");
+ pHandler->endElement("style:master-page");
}
}
void PageSpan::_writeHeaderFooter(const char *headerFooterTagName,
- const std::vector<DocumentElement *> & headerFooterContent,
- OdfDocumentHandler *pHandler) const
+ const std::vector<DocumentElement *> & headerFooterContent,
+ OdfDocumentHandler *pHandler) const
{
TagOpenElement headerFooterOpen(headerFooterTagName);
headerFooterOpen.write(pHandler);
for (std::vector<DocumentElement *>::const_iterator iter = headerFooterContent.begin();
- iter != headerFooterContent.end();
- ++iter) {
+ iter != headerFooterContent.end();
+ ++iter)
+ {
(*iter)->write(pHandler);
}
}
diff --git a/writerperfect/source/filter/PageSpan.hxx b/writerperfect/source/filter/PageSpan.hxx
index 4cf2246b5a50..c3d5cc16dd28 100644
--- a/writerperfect/source/filter/PageSpan.hxx
+++ b/writerperfect/source/filter/PageSpan.hxx
@@ -50,9 +50,9 @@ public:
void setFooterLeftContent(std::vector<DocumentElement *> * pFooterContent);
protected:
void _writeHeaderFooter(const char *headerFooterTagName, const std::vector<DocumentElement *> & headerFooterContent,
- OdfDocumentHandler *pHandler) const;
+ OdfDocumentHandler *pHandler) const;
private:
- WPXPropertyList mxPropList;
+ WPXPropertyList mxPropList;
std::vector<DocumentElement *> * mpHeaderContent;
std::vector<DocumentElement *> * mpFooterContent;
std::vector<DocumentElement *> * mpHeaderLeftContent;
diff --git a/writerperfect/source/filter/SectionStyle.cxx b/writerperfect/source/filter/SectionStyle.cxx
index 7ca547f6aea8..87c5ac91cc96 100644
--- a/writerperfect/source/filter/SectionStyle.cxx
+++ b/writerperfect/source/filter/SectionStyle.cxx
@@ -39,9 +39,9 @@ double rint(double x);
SectionStyle::SectionStyle(const WPXPropertyList &xPropList,
const WPXPropertyListVector &xColumns,
const char *psName) :
- Style(psName),
- mPropList(xPropList),
- mColumns(xColumns)
+ Style(psName),
+ mPropList(xPropList),
+ mColumns(xColumns)
{
}
@@ -62,13 +62,13 @@ void SectionStyle::write(OdfDocumentHandler *pHandler) const
if (mColumns.count() > 1)
{
columnProps.insert("fo:column-count", (int)mColumns.count());
- pHandler->startElement("style:columns", columnProps);
+ pHandler->startElement("style:columns", columnProps);
- WPXPropertyListVector::Iter i(mColumns);
- for (i.rewind(); i.next();)
+ WPXPropertyListVector::Iter i(mColumns);
+ for (i.rewind(); i.next();)
{
- pHandler->startElement("style:column", i());
- pHandler->endElement("style:column");
+ pHandler->startElement("style:column", i());
+ pHandler->endElement("style:column");
}
}
else
diff --git a/writerperfect/source/filter/SectionStyle.hxx b/writerperfect/source/filter/SectionStyle.hxx
index 3fced0d10eeb..df9a57639c03 100644
--- a/writerperfect/source/filter/SectionStyle.hxx
+++ b/writerperfect/source/filter/SectionStyle.hxx
@@ -41,7 +41,7 @@ public:
virtual void write(OdfDocumentHandler *pHandler) const;
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
WPXPropertyListVector mColumns;
};
#endif
diff --git a/writerperfect/source/filter/Style.hxx b/writerperfect/source/filter/Style.hxx
index ab38d6db48f2..6126e2660fc1 100644
--- a/writerperfect/source/filter/Style.hxx
+++ b/writerperfect/source/filter/Style.hxx
@@ -38,10 +38,22 @@ class TopLevelElementStyle : private boost::noncopyable
{
public:
TopLevelElementStyle() : mpsMasterPageName(NULL) { }
- virtual ~TopLevelElementStyle() { if (mpsMasterPageName) delete mpsMasterPageName; }
- void setMasterPageName(WPXString &sMasterPageName) { mpsMasterPageName = new WPXString(sMasterPageName); }
- const WPXString * getMasterPageName() const { return mpsMasterPageName; }
+ virtual ~TopLevelElementStyle()
+ {
+ if (mpsMasterPageName) delete mpsMasterPageName;
+ }
+ void setMasterPageName(WPXString &sMasterPageName)
+ {
+ mpsMasterPageName = new WPXString(sMasterPageName);
+ }
+ const WPXString *getMasterPageName() const
+ {
+ return mpsMasterPageName;
+ }
+
private:
+ TopLevelElementStyle(const TopLevelElementStyle &);
+ TopLevelElementStyle &operator=(const TopLevelElementStyle &);
WPXString *mpsMasterPageName;
};
@@ -52,7 +64,10 @@ public:
virtual ~Style() {}
virtual void write(OdfDocumentHandler *) const {};
- const WPXString &getName() const { return msName; }
+ const WPXString &getName() const
+ {
+ return msName;
+ }
private:
WPXString msName;
@@ -66,6 +81,11 @@ public:
virtual void clean() {};
virtual void write(OdfDocumentHandler *) const = 0;
+
+private:
+ // forbide copy constructor/operator
+ StyleManager(const StyleManager &);
+ StyleManager &operator=(const StyleManager &);
};
#endif
diff --git a/writerperfect/source/filter/TableStyle.cxx b/writerperfect/source/filter/TableStyle.cxx
index 75f420e5b6ae..846fbf741c4f 100644
--- a/writerperfect/source/filter/TableStyle.cxx
+++ b/writerperfect/source/filter/TableStyle.cxx
@@ -40,7 +40,7 @@
TableCellStyle::TableCellStyle(const WPXPropertyList &xPropList, const char *psName) :
Style(psName),
- mPropList(xPropList)
+ mPropList(xPropList)
{
}
@@ -51,17 +51,17 @@ void TableCellStyle::write(OdfDocumentHandler *pHandler) const
styleOpen.addAttribute("style:family", "table-cell");
styleOpen.write(pHandler);
- // WLACH_REFACTORING: Only temporary.. a much better solution is to
- // generalize this sort of thing into the "Style" superclass
- WPXPropertyList stylePropList;
- WPXPropertyList::Iter i(mPropList);
- for (i.rewind(); i.next();)
- {
- if (strlen(i.key()) > 2 && strncmp(i.key(), "fo", 2) == 0)
- stylePropList.insert(i.key(), i()->clone());
- }
- stylePropList.insert("fo:padding", "0.0382in");
- pHandler->startElement("style:table-cell-properties", stylePropList);
+ // WLACH_REFACTORING: Only temporary.. a much better solution is to
+ // generalize this sort of thing into the "Style" superclass
+ WPXPropertyList stylePropList;
+ WPXPropertyList::Iter i(mPropList);
+ for (i.rewind(); i.next();)
+ {
+ if (strlen(i.key()) > 2 && strncmp(i.key(), "fo", 2) == 0)
+ stylePropList.insert(i.key(), i()->clone());
+ }
+ stylePropList.insert("fo:padding", "0.0382in");
+ pHandler->startElement("style:table-cell-properties", stylePropList);
pHandler->endElement("style:table-cell-properties");
pHandler->endElement("style:style");
@@ -69,7 +69,7 @@ void TableCellStyle::write(OdfDocumentHandler *pHandler) const
TableRowStyle::TableRowStyle(const WPXPropertyList &propList, const char *psName) :
Style(psName),
- mPropList(propList)
+ mPropList(propList)
{
}
@@ -80,14 +80,14 @@ void TableRowStyle::write(OdfDocumentHandler *pHandler) const
styleOpen.addAttribute("style:family", "table-row");
styleOpen.write(pHandler);
- TagOpenElement stylePropertiesOpen("style:table-row-properties");
- if (mPropList["style:min-row-height"])
- stylePropertiesOpen.addAttribute("style:min-row-height", mPropList["style:min-row-height"]->getStr());
- else if (mPropList["style:row-height"])
- stylePropertiesOpen.addAttribute("style:row-height", mPropList["style:row-height"]->getStr());
+ TagOpenElement stylePropertiesOpen("style:table-row-properties");
+ if (mPropList["style:min-row-height"])
+ stylePropertiesOpen.addAttribute("style:min-row-height", mPropList["style:min-row-height"]->getStr());
+ else if (mPropList["style:row-height"])
+ stylePropertiesOpen.addAttribute("style:row-height", mPropList["style:row-height"]->getStr());
stylePropertiesOpen.addAttribute("fo:keep-together", "auto");
- stylePropertiesOpen.write(pHandler);
- pHandler->endElement("style:table-row-properties");
+ stylePropertiesOpen.write(pHandler);
+ pHandler->endElement("style:table-row-properties");
pHandler->endElement("style:style");
}
@@ -95,8 +95,8 @@ void TableRowStyle::write(OdfDocumentHandler *pHandler) const
TableStyle::TableStyle(const WPXPropertyList &xPropList, const WPXPropertyListVector &columns, const char *psName) :
Style(psName),
- mPropList(xPropList),
- mColumns(columns)
+ mPropList(xPropList),
+ mColumns(columns)
{
}
@@ -120,8 +120,8 @@ void TableStyle::write(OdfDocumentHandler *pHandler) const
styleOpen.write(pHandler);
TagOpenElement stylePropertiesOpen("style:table-properties");
- if (mPropList["table:align"])
- stylePropertiesOpen.addAttribute("table:align", mPropList["table:align"]->getStr());
+ if (mPropList["table:align"])
+ stylePropertiesOpen.addAttribute("table:align", mPropList["table:align"]->getStr());
if (mPropList["fo:margin-left"])
stylePropertiesOpen.addAttribute("fo:margin-left", mPropList["fo:margin-left"]->getStr());
if (mPropList["fo:margin-right"])
@@ -137,7 +137,7 @@ void TableStyle::write(OdfDocumentHandler *pHandler) const
pHandler->endElement("style:style");
int i=1;
- WPXPropertyListVector::Iter j(mColumns);
+ WPXPropertyListVector::Iter j(mColumns);
for (j.rewind(); j.next();)
{
TagOpenElement columnStyleOpen("style:style");
@@ -147,7 +147,7 @@ void TableStyle::write(OdfDocumentHandler *pHandler) const
columnStyleOpen.addAttribute("style:family", "table-column");
columnStyleOpen.write(pHandler);
- pHandler->startElement("style:table-column-properties", j());
+ pHandler->startElement("style:table-column-properties", j());
pHandler->endElement("style:table-column-properties");
pHandler->endElement("style:style");
diff --git a/writerperfect/source/filter/TableStyle.hxx b/writerperfect/source/filter/TableStyle.hxx
index cbde69af9e36..dd20f93b2996 100644
--- a/writerperfect/source/filter/TableStyle.hxx
+++ b/writerperfect/source/filter/TableStyle.hxx
@@ -44,7 +44,7 @@ public:
TableCellStyle(const WPXPropertyList &xPropList, const char *psName);
virtual void write(OdfDocumentHandler *pHandler) const;
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
};
class TableRowStyle : public Style
@@ -54,7 +54,7 @@ public:
TableRowStyle(const WPXPropertyList &propList, const char *psName);
virtual void write(OdfDocumentHandler *pHandler) const;
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
};
class TableStyle : public Style, public TopLevelElementStyle
@@ -63,13 +63,28 @@ public:
TableStyle(const WPXPropertyList &xPropList, const WPXPropertyListVector &columns, const char *psName);
virtual ~TableStyle();
virtual void write(OdfDocumentHandler *pHandler) const;
- int getNumColumns() const { return mColumns.count(); }
- void addTableCellStyle(TableCellStyle *pTableCellStyle) { mTableCellStyles.push_back(pTableCellStyle); }
- int getNumTableCellStyles() { return mTableCellStyles.size(); }
- void addTableRowStyle(TableRowStyle *pTableRowStyle) { mTableRowStyles.push_back(pTableRowStyle); }
- int getNumTableRowStyles() { return mTableRowStyles.size(); }
+ int getNumColumns() const
+ {
+ return mColumns.count();
+ }
+ void addTableCellStyle(TableCellStyle *pTableCellStyle)
+ {
+ mTableCellStyles.push_back(pTableCellStyle);
+ }
+ int getNumTableCellStyles()
+ {
+ return mTableCellStyles.size();
+ }
+ void addTableRowStyle(TableRowStyle *pTableRowStyle)
+ {
+ mTableRowStyles.push_back(pTableRowStyle);
+ }
+ int getNumTableRowStyles()
+ {
+ return mTableRowStyles.size();
+ }
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
WPXPropertyListVector mColumns;
std::vector<TableCellStyle *> mTableCellStyles;
std::vector<TableRowStyle *> mTableRowStyles;
diff --git a/writerperfect/source/filter/TextRunStyle.cxx b/writerperfect/source/filter/TextRunStyle.cxx
index caa70af6f421..a7001d393490 100644
--- a/writerperfect/source/filter/TextRunStyle.cxx
+++ b/writerperfect/source/filter/TextRunStyle.cxx
@@ -39,7 +39,7 @@
#include <string.h>
-ParagraphStyle::ParagraphStyle(WPXPropertyList const &pPropList, const WPXPropertyListVector &xTabStops, const WPXString &sName) :
+ParagraphStyle::ParagraphStyle(const WPXPropertylist &pPropList, const WPXPropertyListVector &xTabStops, const WPXString &sName) :
mpPropList(pPropList),
mxTabStops(xTabStops),
msName(sName)
@@ -179,21 +179,20 @@ void SpanStyle::write(OdfDocumentHandler *pHandler) const
pHandler->endElement("style:style");
}
-////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////
void ParagraphStyleManager::clean()
{
- for (std::map<WPXString, ParagraphStyle *, ltstr>::iterator iter = mHash.begin();
- iter != mHash.end(); ++iter) {
- delete(iter->second);
- }
- mHash.clear();
+ for (std::map<WPXString, ParagraphStyle *, ltstr>::iterator iter = mHash.begin();
+ iter != mHash.end(); iter++)
+ {
+ delete(iter->second);
+ }
+ mHash.clear();
}
void ParagraphStyleManager::write(OdfDocumentHandler *pHandler) const
{
for (std::map<WPXString, ParagraphStyle *, ltstr>::const_iterator iter = mHash.begin();
- iter != mHash.end(); ++iter)
+ iter != mHash.end(); iter++)
{
if (strcmp(iter->second->getName().cstr(), "Standard") == 0)
continue;
@@ -201,7 +200,7 @@ void ParagraphStyleManager::write(OdfDocumentHandler *pHandler) const
}
}
-WPXString ParagraphStyleManager::getKey(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops) const
+WPXString ParagraphStyleManager::getKey(const WPXPropertylist &xPropList, const WPXPropertyListVector &tabStops) const
{
WPXString sKey = propListToStyleKey(xPropList);
@@ -215,7 +214,7 @@ WPXString ParagraphStyleManager::getKey(WPXPropertyList const &xPropList, WPXPro
return sKey;
}
-WPXString ParagraphStyleManager::findOrAdd (WPXPropertyList const &propList, WPXPropertyListVector const &tabStops)
+WPXString ParagraphStyleManager::findOrAdd (const WPXPropertylist &propList, const WPXPropertyListVector &tabStops)
{
WPXString hashKey = getKey(propList, tabStops);
std::map<WPXString, ParagraphStyle *, ltstr>::const_iterator iter = mHash.find(hashKey);
@@ -232,12 +231,10 @@ WPXString ParagraphStyleManager::findOrAdd (WPXPropertyList const &propList, WPX
return sName;
}
-////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////
void SpanStyleManager::clean()
{
for (std::map<WPXString, SpanStyle *, ltstr>::iterator iter = mHash.begin();
- iter != mHash.end(); ++iter)
+ iter != mHash.end(); iter++)
delete(iter->second);
mHash.clear();
}
@@ -245,11 +242,11 @@ void SpanStyleManager::clean()
void SpanStyleManager::write(OdfDocumentHandler *pHandler) const
{
for (std::map<WPXString, SpanStyle *, ltstr>::const_iterator iter = mHash.begin();
- iter != mHash.end(); ++iter)
+ iter != mHash.end(); iter++)
iter->second->write(pHandler);
}
-WPXString SpanStyleManager::findOrAdd(WPXPropertyList const &propList)
+WPXString SpanStyleManager::findOrAdd(const WPXPropertylist &propList)
{
WPXString hashKey = propListToStyleKey(propList);
std::map<WPXString, SpanStyle *, ltstr>::const_iterator iter = mHash.find(hashKey);
diff --git a/writerperfect/source/filter/TextRunStyle.hxx b/writerperfect/source/filter/TextRunStyle.hxx
index a460c858d054..b990f45d0193 100644
--- a/writerperfect/source/filter/TextRunStyle.hxx
+++ b/writerperfect/source/filter/TextRunStyle.hxx
@@ -47,7 +47,10 @@ public:
ParagraphStyle(WPXPropertyList const &propList, const WPXPropertyListVector &tabStops, const WPXString &sName);
virtual ~ParagraphStyle();
virtual void write(OdfDocumentHandler *pHandler) const;
- WPXString getName() const { return msName; }
+ WPXString getName() const
+ {
+ return msName;
+ }
private:
WPXPropertyList mpPropList;
WPXPropertyListVector mxTabStops;
@@ -62,50 +65,56 @@ public:
virtual void write(OdfDocumentHandler *pHandler) const;
private:
- WPXPropertyList mPropList;
+ WPXPropertyList mPropList;
};
class ParagraphStyleManager : public StyleManager
{
public:
- ParagraphStyleManager() : mHash() {}
- virtual ~ParagraphStyleManager() { ParagraphStyleManager::clean(); }
+ ParagraphStyleManager() : mHash() {}
+ virtual ~ParagraphStyleManager()
+ {
+ ParagraphStyleManager::clean();
+ }
- /* create a new style if it does not exists. In all case, returns the name of the style
+ /* create a new style if it does not exists. In all case, returns the name of the style
- Note: using S%i as new name*/
- WPXString findOrAdd(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops);
+ Note: using S%i as new name*/
+ WPXString findOrAdd(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops);
- virtual void clean();
- virtual void write(OdfDocumentHandler *) const;
+ virtual void clean();
+ virtual void write(OdfDocumentHandler *) const;
protected:
- // return a unique key
- WPXString getKey(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops) const;
+ // return a unique key
+ WPXString getKey(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops) const;
- // paragraph styles
- std::map<WPXString, ParagraphStyle *, ltstr> mHash;
+ // paragraph styles
+ std::map<WPXString, ParagraphStyle *, ltstr> mHash;
};
class SpanStyleManager : public StyleManager
{
public:
- SpanStyleManager() : mHash() {}
- virtual ~SpanStyleManager() { SpanStyleManager::clean(); }
+ SpanStyleManager() : mHash() {}
+ virtual ~SpanStyleManager()
+ {
+ SpanStyleManager::clean();
+ }
- /* create a new style if it does not exists. In all case, returns the name of the style
+ /* create a new style if it does not exists. In all case, returns the name of the style
- Note: using Span%i as new name*/
- WPXString findOrAdd(WPXPropertyList const &xPropList);
+ Note: using Span%i as new name*/
+ WPXString findOrAdd(WPXPropertyList const &xPropList);
- virtual void clean();
- virtual void write(OdfDocumentHandler *) const;
+ virtual void clean();
+ virtual void write(OdfDocumentHandler *) const;
protected:
- // span styles
- std::map<WPXString, SpanStyle *, ltstr> mHash;
+ // span styles
+ std::map<WPXString, SpanStyle *, ltstr> mHash;
};
#endif
diff --git a/writerperfect/source/filter/libwriterperfect_filter.cxx b/writerperfect/source/filter/libwriterperfect_filter.cxx
index 684c034ce416..700f204ce7cb 100644
--- a/writerperfect/source/filter/libwriterperfect_filter.cxx
+++ b/writerperfect/source/filter/libwriterperfect_filter.cxx
@@ -30,7 +30,7 @@
#include "libwriterperfect_filter.hxx"
-WPXString propListToStyleKey(const WPXPropertyList & xPropList)
+WPXString propListToStyleKey(const WPXPropertyList &xPropList)
{
WPXString sKey;
WPXPropertyList::Iter i(xPropList);
diff --git a/writerperfect/source/filter/libwriterperfect_filter.hxx b/writerperfect/source/filter/libwriterperfect_filter.hxx
index b908da300864..9b5b78f369f8 100644
--- a/writerperfect/source/filter/libwriterperfect_filter.hxx
+++ b/writerperfect/source/filter/libwriterperfect_filter.hxx
@@ -34,11 +34,11 @@
class WPXPropertyList;
-WPXString propListToStyleKey(const WPXPropertyList & xPropList);
+WPXString propListToStyleKey(const WPXPropertyList &xPropList);
struct ltstr
{
- bool operator()(const WPXString & s1, const WPXString & s2) const
+ bool operator()(const WPXString &s1, const WPXString &s2) const
{
return strcmp(s1.cstr(), s2.cstr()) < 0;
}
diff --git a/writerperfect/source/stream/WPXSvStream.cxx b/writerperfect/source/stream/WPXSvStream.cxx
index 594944e63cf5..762220c372a2 100644
--- a/writerperfect/source/stream/WPXSvStream.cxx
+++ b/writerperfect/source/stream/WPXSvStream.cxx
@@ -10,12 +10,12 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
WPXSvInputStream::WPXSvInputStream( Reference< XInputStream > xStream ) :
- WPXInputStream(),
- mxChildStorage(),
- mxChildStream(),
- mxStream(xStream),
- mxSeekable(xStream, UNO_QUERY),
- maData(0)
+ WPXInputStream(),
+ mxChildStorage(),
+ mxChildStream(),
+ mxStream(xStream),
+ mxSeekable(xStream, UNO_QUERY),
+ maData(0)
{
if (!xStream.is() || !mxStream.is())
mnLength = 0;
@@ -42,7 +42,7 @@ WPXSvInputStream::~WPXSvInputStream()
{
}
-const unsigned char * WPXSvInputStream::read(unsigned long numBytes, unsigned long &numBytesRead)
+const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned long &numBytesRead)
{
numBytesRead = 0;
@@ -131,7 +131,7 @@ bool WPXSvInputStream::isOLEStream()
return bAns;
}
-WPXInputStream * WPXSvInputStream::getDocumentOLEStream(const char * name)
+WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
{
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return 0;
@@ -150,8 +150,8 @@ WPXInputStream * WPXSvInputStream::getDocumentOLEStream(const char * name)
mxChildStorage = new SotStorage( pStream, sal_True );
mxChildStream = mxChildStorage->OpenSotStream(
- rtl::OUString::createFromAscii( name ),
- STREAM_STD_READ );
+ rtl::OUString::createFromAscii( name ),
+ STREAM_STD_READ );
mxSeekable->seek(tmpPosition);
diff --git a/writerperfect/source/vsdimp/VisioImportFilter.cxx b/writerperfect/source/vsdimp/VisioImportFilter.cxx
index cfc507d89dff..ba56087589d4 100644
--- a/writerperfect/source/vsdimp/VisioImportFilter.cxx
+++ b/writerperfect/source/vsdimp/VisioImportFilter.cxx
@@ -83,21 +83,21 @@ using com::sun::star::xml::sax::XParser;
sal_Bool SAL_CALL VisioImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::filter" << std::endl;
#endif
sal_Int32 nLength = aDescriptor.getLength();
- const PropertyValue * pValue = aDescriptor.getConstArray();
+ const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
- pValue[i].Value >>= xInputStream;
+ pValue[i].Value >>= xInputStream;
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
- pValue[i].Value >>= sURL;
+ pValue[i].Value >>= sURL;
}
if ( !xInputStream.is() )
{
@@ -127,7 +127,7 @@ sal_Bool SAL_CALL VisioImportFilter::filter( const Sequence< ::com::sun::star::b
}
void SAL_CALL VisioImportFilter::cancel( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::cancel" << std::endl;
@@ -136,7 +136,7 @@ void SAL_CALL VisioImportFilter::cancel( )
// XImporter
void SAL_CALL VisioImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::setTargetDocument" << std::endl;
@@ -147,7 +147,7 @@ void SAL_CALL VisioImportFilter::setTargetDocument( const Reference< ::com::sun:
// XExtendedFilterDetection
OUString SAL_CALL VisioImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException )
+throw( com::sun::star::uno::RuntimeException )
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::detect" << std::endl;
@@ -155,7 +155,7 @@ OUString SAL_CALL VisioImportFilter::detect( com::sun::star::uno::Sequence< Prop
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
- const PropertyValue * pValue = Descriptor.getConstArray();
+ const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -186,7 +186,7 @@ OUString SAL_CALL VisioImportFilter::detect( com::sun::star::uno::Sequence< Prop
// XInitialization
void SAL_CALL VisioImportFilter::initialize( const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException)
+throw (Exception, RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::initialize" << std::endl;
@@ -195,7 +195,7 @@ void SAL_CALL VisioImportFilter::initialize( const Sequence< Any >& aArguments )
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
{
- const PropertyValue * pValue = aAnySeq.getConstArray();
+ const PropertyValue *pValue = aAnySeq.getConstArray();
nLength = aAnySeq.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -208,7 +208,7 @@ void SAL_CALL VisioImportFilter::initialize( const Sequence< Any >& aArguments )
}
}
OUString VisioImportFilter_getImplementationName ()
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter_getImplementationName" << std::endl;
@@ -218,23 +218,23 @@ OUString VisioImportFilter_getImplementationName ()
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL VisioImportFilter_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL VisioImportFilter_supportsService( const OUString &ServiceName )
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter_supportsService" << std::endl;
#endif
return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
+ ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
}
Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter_getSupportedServiceNames" << std::endl;
#endif
Sequence < OUString > aRet(2);
- OUString* pArray = aRet.getArray();
+ OUString *pArray = aRet.getArray();
pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
return aRet;
@@ -243,25 +243,25 @@ Sequence< OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
#undef SERVICE_NAME1
Reference< XInterface > SAL_CALL VisioImportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+throw( Exception )
{
#ifdef DEBUG
std::cerr << "VisioImportFilter_createInstance" << std::endl;
#endif
- return (cppu::OWeakObject*) new VisioImportFilter( rSMgr );
+ return (cppu::OWeakObject *) new VisioImportFilter( rSMgr );
}
// XServiceInfo
OUString SAL_CALL VisioImportFilter::getImplementationName( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::getImplementationName" << std::endl;
#endif
return VisioImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL VisioImportFilter::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL VisioImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::supportsService" << std::endl;
@@ -269,7 +269,7 @@ sal_Bool SAL_CALL VisioImportFilter::supportsService( const OUString& rServiceNa
return VisioImportFilter_supportsService( rServiceName );
}
Sequence< OUString > SAL_CALL VisioImportFilter::getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "VisioImportFilter::getSupportedServiceNames" << std::endl;
diff --git a/writerperfect/source/vsdimp/VisioImportFilter.hxx b/writerperfect/source/vsdimp/VisioImportFilter.hxx
index 7bfa5e8bedf1..aaeac49df69a 100644
--- a/writerperfect/source/vsdimp/VisioImportFilter.hxx
+++ b/writerperfect/source/vsdimp/VisioImportFilter.hxx
@@ -49,13 +49,13 @@ enum FilterType
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
class VisioImportFilter : public cppu::WeakImplHelper5
-<
+ <
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
com::sun::star::document::XExtendedFilterDetection,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+ >
{
protected:
// oo.org declares
@@ -68,49 +68,49 @@ protected:
public:
VisioImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ), meType((FilterType)0) {}
+ : mxMSF( rxMSF ), meType((FilterType)0) {}
virtual ~VisioImportFilter() {}
// XFilter
virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL cancel( )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
// XImporter
virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//XExtendedFilterDetection
virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException );
+ throw( com::sun::star::uno::RuntimeException );
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
};
::rtl::OUString VisioImportFilter_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL VisioImportFilter_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
+sal_Bool SAL_CALL VisioImportFilter_supportsService( const ::rtl::OUString &ServiceName )
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL VisioImportFilter_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL VisioImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
+throw ( ::com::sun::star::uno::Exception );
#endif
diff --git a/writerperfect/source/vsdimp/visioimport_genericfilter.cxx b/writerperfect/source/vsdimp/visioimport_genericfilter.cxx
index ddc3f25fcb09..bfed51ac9ecf 100644
--- a/writerperfect/source/vsdimp/visioimport_genericfilter.cxx
+++ b/writerperfect/source/vsdimp/visioimport_genericfilter.cxx
@@ -41,28 +41,28 @@ using namespace ::com::sun::star::registry;
extern "C"
{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
-{
- void * pRet = 0;
-
- OUString implName = OUString::createFromAscii( pImplName );
- if ( pServiceManager && implName.equals(VisioImportFilter_getImplementationName()) )
+ SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
+ const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ )
{
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- VisioImportFilter_createInstance, VisioImportFilter_getSupportedServiceNames() ) );
+ void *pRet = 0;
- if (xFactory.is())
+ OUString implName = OUString::createFromAscii( pImplName );
+ if ( pServiceManager && implName.equals(VisioImportFilter_getImplementationName()) )
{
- xFactory->acquire();
- pRet = xFactory.get();
+ Reference< XSingleServiceFactory > xFactory( createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ OUString::createFromAscii( pImplName ),
+ VisioImportFilter_createInstance, VisioImportFilter_getSupportedServiceNames() ) );
+
+ if (xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
}
- }
- return pRet;
-}
+ return pRet;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
index 4c82715b17f2..534a0610fe77 100644
--- a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
@@ -98,20 +98,20 @@ static bool handleEmbeddedWPG(const WPXBinaryData &data, OdfDocumentHandler *pHa
}
sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
+throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::importImpl: Got here!\n"));
sal_Int32 nLength = aDescriptor.getLength();
- const PropertyValue * pValue = aDescriptor.getConstArray();
+ const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
uno::Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
- pValue[i].Value >>= xInputStream;
+ pValue[i].Value >>= xInputStream;
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
- pValue[i].Value >>= sURL;
+ pValue[i].Value >>= sURL;
}
if ( !xInputStream.is() )
{
@@ -166,20 +166,20 @@ sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::su
}
sal_Bool SAL_CALL WordPerfectImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
+throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::filter: Got here!\n"));
return importImpl ( aDescriptor );
}
void SAL_CALL WordPerfectImportFilter::cancel( )
- throw (RuntimeException)
+throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::cancel: Got here!\n"));
}
// XImporter
void SAL_CALL WordPerfectImportFilter::setTargetDocument( const uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::getTargetDocument: Got here!\n"));
meType = FILTER_IMPORT;
@@ -188,7 +188,7 @@ void SAL_CALL WordPerfectImportFilter::setTargetDocument( const uno::Reference<
// XExtendedFilterDetection
OUString SAL_CALL WordPerfectImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException )
+throw( com::sun::star::uno::RuntimeException )
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::detect: Got here!\n"));
@@ -197,7 +197,7 @@ OUString SAL_CALL WordPerfectImportFilter::detect( com::sun::star::uno::Sequence
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
OUString sURL;
- const PropertyValue * pValue = Descriptor.getConstArray();
+ const PropertyValue *pValue = Descriptor.getConstArray();
uno::Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -209,9 +209,9 @@ OUString SAL_CALL WordPerfectImportFilter::detect( com::sun::star::uno::Sequence
pValue[i].Value >>= sURL;
}
- uno::Reference< com::sun::star::ucb::XCommandEnvironment > xEnv;
- if (!xInputStream.is())
- {
+ uno::Reference< com::sun::star::ucb::XCommandEnvironment > xEnv;
+ if (!xInputStream.is())
+ {
try
{
::ucbhelper::Content aContent(sURL, xEnv);
@@ -222,9 +222,9 @@ OUString SAL_CALL WordPerfectImportFilter::detect( com::sun::star::uno::Sequence
return ::rtl::OUString();
}
- if (!xInputStream.is())
- return ::rtl::OUString();
- }
+ if (!xInputStream.is())
+ return ::rtl::OUString();
+ }
WPXSvInputStream input( xInputStream );
@@ -244,7 +244,7 @@ OUString SAL_CALL WordPerfectImportFilter::detect( com::sun::star::uno::Sequence
Descriptor[location].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName"));
}
- Descriptor[location].Value <<=sTypeName;
+ Descriptor[location].Value <<=sTypeName;
}
return sTypeName;
@@ -253,14 +253,14 @@ OUString SAL_CALL WordPerfectImportFilter::detect( com::sun::star::uno::Sequence
// XInitialization
void SAL_CALL WordPerfectImportFilter::initialize( const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException)
+throw (Exception, RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::initialize: Got here!\n"));
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
{
- const PropertyValue * pValue = aAnySeq.getConstArray();
+ const PropertyValue *pValue = aAnySeq.getConstArray();
nLength = aAnySeq.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -273,50 +273,50 @@ void SAL_CALL WordPerfectImportFilter::initialize( const Sequence< Any >& aArgum
}
}
OUString WordPerfectImportFilter_getImplementationName ()
- throw (RuntimeException)
+throw (RuntimeException)
{
return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WordPerfectImportFilter" ) );
}
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL WordPerfectImportFilter_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL WordPerfectImportFilter_supportsService( const OUString &ServiceName )
+throw (RuntimeException)
{
return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
+ ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
}
Sequence< OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
Sequence < OUString > aRet(2);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
+ OUString *pArray = aRet.getArray();
+ pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
- return aRet;
+ return aRet;
}
#undef SERVICE_NAME2
#undef SERVICE_NAME1
uno::Reference< XInterface > SAL_CALL WordPerfectImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+throw( Exception )
{
- return (cppu::OWeakObject*) new WordPerfectImportFilter( rSMgr );
+ return (cppu::OWeakObject *) new WordPerfectImportFilter( rSMgr );
}
// XServiceInfo
OUString SAL_CALL WordPerfectImportFilter::getImplementationName( )
- throw (RuntimeException)
+throw (RuntimeException)
{
return WordPerfectImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL WordPerfectImportFilter::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL WordPerfectImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
{
return WordPerfectImportFilter_supportsService( rServiceName );
}
Sequence< OUString > SAL_CALL WordPerfectImportFilter::getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
return WordPerfectImportFilter_getSupportedServiceNames();
}
@@ -329,13 +329,13 @@ WordPerfectImportFilterDialog::~WordPerfectImportFilterDialog()
{
}
-void SAL_CALL WordPerfectImportFilterDialog::setTitle( const ::rtl::OUString& )
- throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL WordPerfectImportFilterDialog::setTitle( const ::rtl::OUString & )
+throw (::com::sun::star::uno::RuntimeException)
{
}
sal_Int16 SAL_CALL WordPerfectImportFilterDialog::execute()
- throw (::com::sun::star::uno::RuntimeException)
+throw (::com::sun::star::uno::RuntimeException)
{
WPXSvInputStream input( mxInputStream );
@@ -368,7 +368,7 @@ sal_Int16 SAL_CALL WordPerfectImportFilterDialog::execute()
uno::Sequence<beans::PropertyValue> SAL_CALL WordPerfectImportFilterDialog::getPropertyValues() throw(uno::RuntimeException)
{
uno::Sequence<beans::PropertyValue> aRet(1);
- beans::PropertyValue* pArray = aRet.getArray();
+ beans::PropertyValue *pArray = aRet.getArray();
pArray[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Password") );
pArray[0].Value <<= msPassword;
@@ -377,14 +377,14 @@ uno::Sequence<beans::PropertyValue> SAL_CALL WordPerfectImportFilterDialog::getP
}
void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues( const uno::Sequence<beans::PropertyValue>& aProps)
- throw(beans::UnknownPropertyException, beans::PropertyVetoException,
- lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+throw(beans::UnknownPropertyException, beans::PropertyVetoException,
+ lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- const beans::PropertyValue* pPropArray = aProps.getConstArray();
+ const beans::PropertyValue *pPropArray = aProps.getConstArray();
long nPropCount = aProps.getLength();
for (long i = 0; i < nPropCount; i++)
{
- const beans::PropertyValue& rProp = pPropArray[i];
+ const beans::PropertyValue &rProp = pPropArray[i];
::rtl::OUString aPropName = rProp.Name;
if ( aPropName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")) )
@@ -397,50 +397,50 @@ void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues( const uno::Seque
// XServiceInfo
OUString SAL_CALL WordPerfectImportFilterDialog::getImplementationName( )
- throw (RuntimeException)
+throw (RuntimeException)
{
return WordPerfectImportFilterDialog_getImplementationName();
}
-sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
{
return WordPerfectImportFilterDialog_supportsService( rServiceName );
}
Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog::getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
return WordPerfectImportFilterDialog_getSupportedServiceNames();
}
OUString WordPerfectImportFilterDialog_getImplementationName ()
- throw (RuntimeException)
+throw (RuntimeException)
{
return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WordPerfectImportFilterDialog" ) );
}
#define SERVICE_NAME "com.sun.star.ui.dialogs.FilterOptionsDialog"
-sal_Bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const OUString &ServiceName )
+throw (RuntimeException)
{
return ( ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) ) );
}
Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
Sequence < OUString > aRet(1);
- OUString* pArray = aRet.getArray();
+ OUString *pArray = aRet.getArray();
pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
return aRet;
}
#undef SERVICE_NAME
uno::Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+throw( Exception )
{
- return (cppu::OWeakObject*) new WordPerfectImportFilterDialog( rSMgr );
+ return (cppu::OWeakObject *) new WordPerfectImportFilterDialog( rSMgr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx
index 9f73d8f231d1..7ad56934f017 100644
--- a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx
+++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx
@@ -51,13 +51,13 @@ enum FilterType
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
class WordPerfectImportFilter : public cppu::WeakImplHelper5
-<
+ <
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
com::sun::star::document::XExtendedFilterDetection,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+ >
{
protected:
// oo.org declares
@@ -69,7 +69,7 @@ protected:
FilterType meType;
sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
public:
WordPerfectImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
@@ -77,52 +77,52 @@ public:
virtual ~WordPerfectImportFilter() {}
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL cancel( )
- throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancel( )
+ throw (::com::sun::star::uno::RuntimeException);
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- //XExtendedFilterDetection
+ //XExtendedFilterDetection
virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException );
+ throw( com::sun::star::uno::RuntimeException );
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ throw (::com::sun::star::uno::RuntimeException);
};
::rtl::OUString WordPerfectImportFilter_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL WordPerfectImportFilter_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
+sal_Bool SAL_CALL WordPerfectImportFilter_supportsService( const ::rtl::OUString &ServiceName )
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL WordPerfectImportFilter_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL WordPerfectImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
+throw ( ::com::sun::star::uno::Exception );
class WordPerfectImportFilterDialog : public cppu::WeakImplHelper3 <
- com::sun::star::ui::dialogs::XExecutableDialog,
- com::sun::star::lang::XServiceInfo,
- com::sun::star::beans::XPropertyAccess
->
+ com::sun::star::ui::dialogs::XExecutableDialog,
+ com::sun::star::lang::XServiceInfo,
+ com::sun::star::beans::XPropertyAccess
+ >
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
::rtl::OUString msPassword;
@@ -131,29 +131,29 @@ class WordPerfectImportFilterDialog : public cppu::WeakImplHelper3 <
~WordPerfectImportFilterDialog();
// XExecutableDialog
- virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int16 SAL_CALL execute()
- throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTitle( const ::rtl::OUString &aTitle )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL execute()
+ throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ throw (::com::sun::star::uno::RuntimeException);
// XPropertyAccess
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
- SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::PropertyValue >& aProps )
- throw (::com::sun::star::beans::UnknownPropertyException,
- ::com::sun::star::beans::PropertyVetoException,
- ::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::lang::WrappedTargetException,
- ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& aProps )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
public:
WordPerfectImportFilterDialog(const ::com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory > &r );
@@ -161,17 +161,17 @@ public:
};
::rtl::OUString WordPerfectImportFilterDialog_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
+sal_Bool SAL_CALL WordPerfectImportFilterDialog_supportsService( const ::rtl::OUString &ServiceName )
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL WordPerfectImportFilterDialog_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL WordPerfectImportFilterDialog_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
+throw ( ::com::sun::star::uno::Exception );
#endif
diff --git a/writerperfect/source/wpdimp/wpft_genericfilter.cxx b/writerperfect/source/wpdimp/wpft_genericfilter.cxx
index 240707e796c8..8e3534bbfb85 100644
--- a/writerperfect/source/wpdimp/wpft_genericfilter.cxx
+++ b/writerperfect/source/wpdimp/wpft_genericfilter.cxx
@@ -40,28 +40,28 @@ using namespace ::com::sun::star::registry;
extern "C"
{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
-{
- void * pRet = 0;
-
- OUString implName = OUString::createFromAscii( pImplName );
- if ( pServiceManager && implName.equals(WordPerfectImportFilter_getImplementationName()) )
+ SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
+ const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ )
{
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- WordPerfectImportFilter_createInstance, WordPerfectImportFilter_getSupportedServiceNames() ) );
+ void *pRet = 0;
- if (xFactory.is())
+ OUString implName = OUString::createFromAscii( pImplName );
+ if ( pServiceManager && implName.equals(WordPerfectImportFilter_getImplementationName()) )
{
- xFactory->acquire();
- pRet = xFactory.get();
+ Reference< XSingleServiceFactory > xFactory( createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ OUString::createFromAscii( pImplName ),
+ WordPerfectImportFilter_createInstance, WordPerfectImportFilter_getSupportedServiceNames() ) );
+
+ if (xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
}
- }
- return pRet;
-}
+ return pRet;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/wpgimp/WPGImportFilter.cxx
index 9674e79e136e..e338b86f467a 100644
--- a/writerperfect/source/wpgimp/WPGImportFilter.cxx
+++ b/writerperfect/source/wpgimp/WPGImportFilter.cxx
@@ -82,21 +82,21 @@ using com::sun::star::xml::sax::XParser;
sal_Bool SAL_CALL WPGImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::filter" << std::endl;
#endif
sal_Int32 nLength = aDescriptor.getLength();
- const PropertyValue * pValue = aDescriptor.getConstArray();
+ const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
- pValue[i].Value >>= xInputStream;
+ pValue[i].Value >>= xInputStream;
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
- pValue[i].Value >>= sURL;
+ pValue[i].Value >>= sURL;
}
if ( !xInputStream.is() )
{
@@ -126,7 +126,7 @@ sal_Bool SAL_CALL WPGImportFilter::filter( const Sequence< ::com::sun::star::bea
}
void SAL_CALL WPGImportFilter::cancel( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::cancel" << std::endl;
@@ -135,7 +135,7 @@ void SAL_CALL WPGImportFilter::cancel( )
// XImporter
void SAL_CALL WPGImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::setTargetDocument" << std::endl;
@@ -146,7 +146,7 @@ void SAL_CALL WPGImportFilter::setTargetDocument( const Reference< ::com::sun::s
// XExtendedFilterDetection
OUString SAL_CALL WPGImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException )
+throw( com::sun::star::uno::RuntimeException )
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::detect" << std::endl;
@@ -154,7 +154,7 @@ OUString SAL_CALL WPGImportFilter::detect( com::sun::star::uno::Sequence< Proper
OUString sTypeName;
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
- const PropertyValue * pValue = Descriptor.getConstArray();
+ const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -185,7 +185,7 @@ OUString SAL_CALL WPGImportFilter::detect( com::sun::star::uno::Sequence< Proper
// XInitialization
void SAL_CALL WPGImportFilter::initialize( const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException)
+throw (Exception, RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::initialize" << std::endl;
@@ -194,7 +194,7 @@ void SAL_CALL WPGImportFilter::initialize( const Sequence< Any >& aArguments )
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
{
- const PropertyValue * pValue = aAnySeq.getConstArray();
+ const PropertyValue *pValue = aAnySeq.getConstArray();
nLength = aAnySeq.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -207,7 +207,7 @@ void SAL_CALL WPGImportFilter::initialize( const Sequence< Any >& aArguments )
}
}
OUString WPGImportFilter_getImplementationName ()
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter_getImplementationName" << std::endl;
@@ -217,23 +217,23 @@ OUString WPGImportFilter_getImplementationName ()
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL WPGImportFilter_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL WPGImportFilter_supportsService( const OUString &ServiceName )
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter_supportsService" << std::endl;
#endif
return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
+ ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
}
Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter_getSupportedServiceNames" << std::endl;
#endif
Sequence < OUString > aRet(2);
- OUString* pArray = aRet.getArray();
+ OUString *pArray = aRet.getArray();
pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
return aRet;
@@ -242,25 +242,25 @@ Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
#undef SERVICE_NAME1
Reference< XInterface > SAL_CALL WPGImportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+throw( Exception )
{
#ifdef DEBUG
std::cerr << "WPGImportFilter_createInstance" << std::endl;
#endif
- return (cppu::OWeakObject*) new WPGImportFilter( rSMgr );
+ return (cppu::OWeakObject *) new WPGImportFilter( rSMgr );
}
// XServiceInfo
OUString SAL_CALL WPGImportFilter::getImplementationName( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::getImplementationName" << std::endl;
#endif
return WPGImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL WPGImportFilter::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL WPGImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::supportsService" << std::endl;
@@ -268,7 +268,7 @@ sal_Bool SAL_CALL WPGImportFilter::supportsService( const OUString& rServiceName
return WPGImportFilter_supportsService( rServiceName );
}
Sequence< OUString > SAL_CALL WPGImportFilter::getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
#ifdef DEBUG
std::cerr << "WPGImportFilter::getSupportedServiceNames" << std::endl;
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.hxx b/writerperfect/source/wpgimp/WPGImportFilter.hxx
index 2b5385103fb4..43731324748c 100644
--- a/writerperfect/source/wpgimp/WPGImportFilter.hxx
+++ b/writerperfect/source/wpgimp/WPGImportFilter.hxx
@@ -49,13 +49,13 @@ enum FilterType
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
class WPGImportFilter : public cppu::WeakImplHelper5
-<
+ <
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
com::sun::star::document::XExtendedFilterDetection,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+ >
{
protected:
// oo.org declares
@@ -68,49 +68,49 @@ protected:
public:
WPGImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ), meType((FilterType)0) {}
+ : mxMSF( rxMSF ), meType((FilterType)0) {}
virtual ~WPGImportFilter() {}
// XFilter
virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL cancel( )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
// XImporter
virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//XExtendedFilterDetection
virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException );
+ throw( com::sun::star::uno::RuntimeException );
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
};
::rtl::OUString WPGImportFilter_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL WPGImportFilter_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
+sal_Bool SAL_CALL WPGImportFilter_supportsService( const ::rtl::OUString &ServiceName )
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL WPGImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
+throw ( ::com::sun::star::uno::Exception );
#endif
diff --git a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
index 4a7f97a0dd1a..287091504492 100644
--- a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
+++ b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
@@ -41,28 +41,28 @@ using namespace ::com::sun::star::registry;
extern "C"
{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
-{
- void * pRet = 0;
-
- OUString implName = OUString::createFromAscii( pImplName );
- if ( pServiceManager && implName.equals(WPGImportFilter_getImplementationName()) )
+ SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
+ const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ )
{
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- WPGImportFilter_createInstance, WPGImportFilter_getSupportedServiceNames() ) );
+ void *pRet = 0;
- if (xFactory.is())
+ OUString implName = OUString::createFromAscii( pImplName );
+ if ( pServiceManager && implName.equals(WPGImportFilter_getImplementationName()) )
{
- xFactory->acquire();
- pRet = xFactory.get();
+ Reference< XSingleServiceFactory > xFactory( createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ OUString::createFromAscii( pImplName ),
+ WPGImportFilter_createInstance, WPGImportFilter_getSupportedServiceNames() ) );
+
+ if (xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
}
- }
- return pRet;
-}
+ return pRet;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx b/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
index 55bd83d118d7..10daff676a5a 100644
--- a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
+++ b/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
@@ -77,20 +77,20 @@ using com::sun::star::xml::sax::XParser;
void callHandler(Reference < XDocumentHandler > xDocHandler);
sal_Bool SAL_CALL MSWorksImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
+throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::importImpl: Got here!\n"));
sal_Int32 nLength = aDescriptor.getLength();
- const PropertyValue * pValue = aDescriptor.getConstArray();
+ const PropertyValue *pValue = aDescriptor.getConstArray();
OUString sURL;
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
- pValue[i].Value >>= xInputStream;
+ pValue[i].Value >>= xInputStream;
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
- pValue[i].Value >>= sURL;
+ pValue[i].Value >>= sURL;
}
if ( !xInputStream.is() )
{
@@ -121,20 +121,20 @@ sal_Bool SAL_CALL MSWorksImportFilter::importImpl( const Sequence< ::com::sun::s
}
sal_Bool SAL_CALL MSWorksImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
+throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::filter: Got here!\n"));
return importImpl ( aDescriptor );
}
void SAL_CALL MSWorksImportFilter::cancel( )
- throw (RuntimeException)
+throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::cancel: Got here!\n"));
}
// XImporter
void SAL_CALL MSWorksImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::getTargetDocument: Got here!\n"));
meType = FILTER_IMPORT;
@@ -143,7 +143,7 @@ void SAL_CALL MSWorksImportFilter::setTargetDocument( const Reference< ::com::su
// XExtendedFilterDetection
OUString SAL_CALL MSWorksImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException )
+throw( com::sun::star::uno::RuntimeException )
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::detect: Got here!\n"));
@@ -152,7 +152,7 @@ OUString SAL_CALL MSWorksImportFilter::detect( com::sun::star::uno::Sequence< Pr
sal_Int32 nLength = Descriptor.getLength();
sal_Int32 location = nLength;
OUString sURL;
- const PropertyValue * pValue = Descriptor.getConstArray();
+ const PropertyValue *pValue = Descriptor.getConstArray();
Reference < XInputStream > xInputStream;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -164,22 +164,22 @@ OUString SAL_CALL MSWorksImportFilter::detect( com::sun::star::uno::Sequence< Pr
pValue[i].Value >>= sURL;
}
- Reference< com::sun::star::ucb::XCommandEnvironment > xEnv;
- if (!xInputStream.is())
- {
+ Reference< com::sun::star::ucb::XCommandEnvironment > xEnv;
+ if (!xInputStream.is())
+ {
try
{
::ucbhelper::Content aContent(sURL, xEnv);
- xInputStream = aContent.openStream();
+ xInputStream = aContent.openStream();
}
catch ( ... )
{
return ::rtl::OUString();
}
- if (!xInputStream.is())
- return ::rtl::OUString();
- }
+ if (!xInputStream.is())
+ return ::rtl::OUString();
+ }
WPXSvInputStream input( xInputStream );
@@ -208,14 +208,14 @@ OUString SAL_CALL MSWorksImportFilter::detect( com::sun::star::uno::Sequence< Pr
// XInitialization
void SAL_CALL MSWorksImportFilter::initialize( const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException)
+throw (Exception, RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::initialize: Got here!\n"));
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
{
- const PropertyValue * pValue = aAnySeq.getConstArray();
+ const PropertyValue *pValue = aAnySeq.getConstArray();
nLength = aAnySeq.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
@@ -228,50 +228,50 @@ void SAL_CALL MSWorksImportFilter::initialize( const Sequence< Any >& aArguments
}
}
OUString MSWorksImportFilter_getImplementationName ()
- throw (RuntimeException)
+throw (RuntimeException)
{
return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.MSWorksImportFilter" ) );
}
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const OUString &ServiceName )
+throw (RuntimeException)
{
return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
+ ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
}
Sequence< OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
Sequence < OUString > aRet(2);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
+ OUString *pArray = aRet.getArray();
+ pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
- return aRet;
+ return aRet;
}
#undef SERVICE_NAME2
#undef SERVICE_NAME1
Reference< XInterface > SAL_CALL MSWorksImportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+throw( Exception )
{
- return (cppu::OWeakObject*) new MSWorksImportFilter( rSMgr );
+ return (cppu::OWeakObject *) new MSWorksImportFilter( rSMgr );
}
// XServiceInfo
OUString SAL_CALL MSWorksImportFilter::getImplementationName( )
- throw (RuntimeException)
+throw (RuntimeException)
{
return MSWorksImportFilter_getImplementationName();
}
-sal_Bool SAL_CALL MSWorksImportFilter::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
+sal_Bool SAL_CALL MSWorksImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
{
return MSWorksImportFilter_supportsService( rServiceName );
}
Sequence< OUString > SAL_CALL MSWorksImportFilter::getSupportedServiceNames( )
- throw (RuntimeException)
+throw (RuntimeException)
{
return MSWorksImportFilter_getSupportedServiceNames();
}
diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx b/writerperfect/source/wpsimp/MSWorksImportFilter.hxx
index 71e621298f35..4de92f3870c0 100644
--- a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx
+++ b/writerperfect/source/wpsimp/MSWorksImportFilter.hxx
@@ -47,13 +47,13 @@ enum FilterType
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
class MSWorksImportFilter : public cppu::WeakImplHelper5
-<
+ <
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
com::sun::star::document::XExtendedFilterDetection,
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo
->
+ >
{
protected:
// oo.org declares
@@ -65,55 +65,55 @@ protected:
FilterType meType;
sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
public:
MSWorksImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
: mxMSF( rxMSF )
, meType( FILTER_IMPORT )
- {}
+ {}
virtual ~MSWorksImportFilter() {}
// XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL cancel( )
- throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancel( )
+ throw (::com::sun::star::uno::RuntimeException);
// XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//XExtendedFilterDetection
virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException );
+ throw( com::sun::star::uno::RuntimeException );
// XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ throw (::com::sun::star::uno::RuntimeException);
};
::rtl::OUString MSWorksImportFilter_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
-sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
+sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const ::rtl::OUString &ServiceName )
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
+throw ( ::com::sun::star::uno::RuntimeException );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL MSWorksImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
+throw ( ::com::sun::star::uno::Exception );
#endif
diff --git a/writerperfect/source/wpsimp/msworks_genericfilter.cxx b/writerperfect/source/wpsimp/msworks_genericfilter.cxx
index 87dc407c9a81..b53707c67dc7 100644
--- a/writerperfect/source/wpsimp/msworks_genericfilter.cxx
+++ b/writerperfect/source/wpsimp/msworks_genericfilter.cxx
@@ -41,28 +41,28 @@ using namespace ::com::sun::star::registry;
extern "C"
{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
-{
- void * pRet = 0;
-
- OUString implName = OUString::createFromAscii( pImplName );
- if ( pServiceManager && implName.equals(MSWorksImportFilter_getImplementationName()) )
+ SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
+ const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ )
{
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- MSWorksImportFilter_createInstance, MSWorksImportFilter_getSupportedServiceNames() ) );
+ void *pRet = 0;
- if (xFactory.is())
+ OUString implName = OUString::createFromAscii( pImplName );
+ if ( pServiceManager && implName.equals(MSWorksImportFilter_getImplementationName()) )
{
- xFactory->acquire();
- pRet = xFactory.get();
+ Reference< XSingleServiceFactory > xFactory( createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ OUString::createFromAscii( pImplName ),
+ MSWorksImportFilter_createInstance, MSWorksImportFilter_getSupportedServiceNames() ) );
+
+ if (xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
}
- }
- return pRet;
-}
+ return pRet;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */